Altera Forum






Threads: 18,959
Posts: 77,484
Members: 29,244
Welcome to our newest member, pearl87
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?

Reply
 
Thread Tools Display Modes
  #1  
Old August 4th, 2008, 07:12 PM
Hey_Hey Hey_Hey is offline
Altera Scholar
 
Join Date: Sep 2007
Posts: 23
Rep Power: 1123
Hey_Hey will become famous soon enough
Default Re: How Can I set up DMA operation with my own PC software application?

Another suggestion, when setting USE_RCSLAVE to 1 and trying to Write and Read from BAR0, use an offset above 32 (and less than 32KB) when accessing it. That should be some just plain old Read/Write memory. Offsets 0-31 from BAR0 have some undocumented internal testing features.
Reply With Quote
  #2  
Old August 6th, 2008, 12:45 PM
likewise likewise is offline
Altera Scholar
 
Join Date: Jul 2008
Posts: 21
Rep Power: 782
likewise is on a distinguished road
Post Re: How Can I set up DMA operation with my own PC software application?

Hello,

in first instance I would like to mimick what the testbench does, when starting a device driver. I am reading PCIe Compiler 8.0 UG, May 2008.

Page 7-16 describes the Test Module:

the Descriptor Header for write DMA is at 0x00-0x10, and for reads is at 0x10-x20. In the Descriptor Header, the base address descriptor fields is set to 0x800.

However, the first Descriptor is placed at 0x810, the next at 0x820, etc.

Now, my question is, what must be at 0x800??

The only reference to 0x800, is page 7-18 where it is said that at 0x80c the DMA engine is writing its completed DMA number.

My suspicion is that at 0x800 a copy of the header must be, which is written by the DMA engine and where EPLAST is written.

Any ideas?

Regards, Leon.
Reply With Quote
  #3  
Old October 30th, 2008, 01:29 PM
johan_s johan_s is offline
Altera Pupil
 
Join Date: Oct 2008
Posts: 5
Rep Power: 691
johan_s is on a distinguished road
Default Re: How Can I set up DMA operation with my own PC software application?

Ok we found the problem. We were reseting only the dma read (the only we use) and we need to reset the dma write to !!! and that working fine
Reply With Quote
  #4  
Old October 31st, 2008, 10:28 AM
johan_s johan_s is offline
Altera Pupil
 
Join Date: Oct 2008
Posts: 5
Rep Power: 691
johan_s is on a distinguished road
Default Re: How Can I set up DMA operation with my own PC software application?

The last problem we have is that using chainning dma exmemple in verilog the every thing is ok when it is generated in VHDL dma transfers are halted ?!? using the same pc driver and api : (
any ideas ?
Reply With Quote
  #5  
Old December 1st, 2008, 08:19 AM
likewise likewise is offline
Altera Scholar
 
Join Date: Jul 2008
Posts: 21
Rep Power: 782
likewise is on a distinguished road
Default Re: How Can I set up DMA operation with my own PC software application?

I have published a Linux device driver:

http://marc.info/?l=linux-kernel&m=122813921631142&w=2
Reply With Quote
  #6  
Old November 10th, 2009, 04:35 PM
BrettFavre's Avatar
BrettFavre BrettFavre is offline
Altera Scholar
 
Join Date: Nov 2007
Posts: 48
Rep Power: 1188
BrettFavre has a spectacular aura aboutBrettFavre has a spectacular aura aboutBrettFavre has a spectacular aura about
Default Re: How Can I set up DMA operation with my own PC software application?

I am having some difficulty generating multiple DMA transfers in the chaining DMA design example that is used in the PCI Express high performance reference design. After looking through the RTL, it appears to me that I must perform the following sequence prior to initiating a new transfer:

[1] write the value 0x0000ffff to the control register DW0 (either read or write depending on the desired transfer) prior to initiating a new transfer
[2] setup DW0, DW1, DW2, and DW3 with desired transfer parameters
[3] be sure to write DW3 last as writing DW3 puts the DMA engine in motion

From what I can tell, step[1] is required for each descriptor table that describes a transfer. Without step [1], it appears that a write to DW3 will not initiate a new transfer.

There have been a few comments in this thread that seem to support this. However, I wanted to spell it out in detail and get clarification. Can anyone comment?
Reply With Quote
Reply



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 09:24 PM.