Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers

Urgent: FIFO

Altera_Forum
Honored Contributor II
1,323 Views

Hello. anyone has FIFO example or tutorial or guide? I am trying to do DMA peripheral to memory transfer. I am using FIFO together with my peripheral so that DMA can transfer data from peripheral to memory? Or maybe beside using FIFO, how can initiate a transfer from peripheral to memory using DMA? I am using DMA Controller only, not SGDMA. Thanks!  

 

P/S: Begineer in Altera stuffs.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
652 Views

If you put data in a FIFO to be transfered through a DMA you should really consider using the (modular) SGDMA instead. Signals from a FIFO can almost be directly connected to an Avalon Stream interface and the data will be buffered for you. 

Have a look at the scfifo megafunction (http://www.altera.com/literature/ug/ug_fifo.pdf) to see how to easily add a FIFO to your design.
0 Kudos
Altera_Forum
Honored Contributor II
652 Views

Yes, SGDMA is easier but the code for SGDMA is complicated. I read the manual but it is mostly about theoretical information about FIFO.

0 Kudos
Altera_Forum
Honored Contributor II
652 Views

The modular SGDMA should have a somewhat similar API as the DMA you are currently trying to use. The masters have FIFOs built in so it practically does all the work for you. The same is true for the SGDMA that comes with the ACDS, it's just that one has a more complicated software API. 

 

Also as a heads up I plan on moving the modular SGDMA to the alterawiki.... I haven't had the time to do it just in case you go looking for it and can't find it.
0 Kudos
Reply