- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello all,
I would like to use a DMA controller to fill a SDRAM memory in a "circular" way (as a circular buffer). I currently use the DMA controller (provided by Altera) to fill the memory from a constant address (my custom peripheral). I start the DMA transfer from software and the DMA stops when the length reaches 0. It works fine. But my new requirement is: when the transfer length reaches 0 I need the DMA controller reloads the start address and begin a new transfer (as a loop or rollover). I read in the Altera datasheet that if the bit "LEEN" is set the DMA controller stops the transfer when the length reaches 0 but what's happen if LEEN = 0? Is the controller begin a new transfer from the start address? Any help would be very appreciated. Regards, -PierreLink Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try SGDMA,it is more flexible,you can arrange bundles of DMA transfer very easy!search SGDMA in altera website,you can find example code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sunnywang,
Thank you for your answer, I will have a look on the SGDMA. Actually I already use SGDMA with the TSE (triple speed ethernet) MAC IP from Altera but I didn't deep into details on this DMA. Anyway, I solved my problem by programming my own simple "rollover" or "circular buffer" DMA and it works fine. Thanks again Regards, -Pierre- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
pierre, how did you get the dma controller running? i'm trying to write a linux driver and must have some wrong settings.
(i get an interrupt, which looks very nice; but my data is not copied (memory to memory)) have you got any examples of code...? thx- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you use NIOS or pure Verilog??????
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I really want to set my DMA to work in loop/circular also. How did you do it? I used to write an infinite loop to loop the receive request (from stream to memory) but I need CPU to initialize the request. How about your method? Do you need any interaction from the CPU? Thanks very much, Pat- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
woo~~How deep you are....I am a Novice....
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page