Altera Forum






Threads: 18,959
Posts: 77,485
Members: 29,245
Welcome to our newest member, Solarpreiswert
User
Reputation
9135
7620
5891
4150
3030
2197
2056
1706
1388
1300




 
Register
Quick Search
 
  Altera Forums > IP and Dev Kit Related > IP Discussion

How Can I set up DMA operation with my own PC software application?

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old July 22nd, 2008, 08:49 AM
huzj_ecc huzj_ecc is offline
Altera Pupil
 
Join Date: Jun 2008
Posts: 8
Rep Power: 823
huzj_ecc is on a distinguished road
Post How Can I set up DMA operation with my own PC software application?

Hi All:

I want to re-use the pcie_highperformancedesign example provided by the Arria GX Development Kit. Now I am confused with the PC software application altpcie_demo.exe.
I am trying to control FPGA to initiate dma read and write operation just like altpcie_demo does with my own PC software application but failed.

Firstly, I used Jungo Windriver to generate a pcie driver. With the API functions provided by the driver I can access(R/W) configure registers ,memory bar 1:0(the syncram) and bar2(dma control registers).

Secondly, I creat a Read Descriptor Table--Header+2 Descriptors and set data(Length,Ep mem addr, RC mem addr)for desciptors. The header has four dw(DW0,DW1,DW2,DW3). For DMA Read, I set DW0=0x00040002,DW1=0,DW2=addr of header,DW3=0x1. Then I write DW0 to Bar2+0x10,DW1 to Bar2+0x14,DW2 to Bar2+0x18,DW3 to Bar2+0x1c.

My first question: Where(mem addr) can I poll the RCLast value to indicate the completion of DMA read?

Thirdly, I want to transfer the DMA Read data back to PC. I creat a Write Descriptor Table--Header+2 Descriptors.In each descriptor, I set PC mem addr for write back data and addr of EP mem correctly .The header has four dw(DW0-DW3). For DMA Write, I set DW0=0x00050002,DW1=0,DW2=addr of Header,DW3=0x1. Then I write DW0 to Bar2+0x0,DW1 to Bar2+0x4,DW2 to Bar2+0x8,DW3 to Bar2+0xc.

At the end, I checked the write back data and found that the write back data are all zeros.It seems like that the FPGA does nothing at all.

What are the detailed steps I should follow to set up the DMA operation correctly? I read the pci express compiler doc but didn't get enough information about software application.

Thanks a lot for any help.

Last edited by huzj_ecc : July 22nd, 2008 at 08:52 AM.
Reply With Quote
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cancel DMA operation. Major General Discussion Forum 1 December 1st, 2009 05:47 AM
PCI with SGDMA operation newfrance IP Discussion 2 November 10th, 2008 11:30 PM
Weird Operation With Out PRINTF cfavreau General Software Forum 5 September 6th, 2006 08:24 PM
UART hardware operation arat016 General Discussion Forum 1 August 1st, 2006 05:45 AM
CF operation icesword General Software Forum 1 October 12th, 2005 03:49 PM


All times are GMT -8. The time now is 10:03 PM.