Forum Discussion
Altera_Forum
Honored Contributor
16 years agoNiosII DMA Tutorial
Hello, may I know where can I get NiosII DMA Tutorial? Currently, I am doing a project to implement DMA on FPGA board. So I would to refer to some tutorials that can help me. Thanks.
25 Replies
- Altera_Forum
Honored Contributor
Dear all,
Sorry for asking other questions about DMA in this post. I have tried to do memory-to-memory data transfer using DMA and it worked successfully. But when I tried to do peripheral-to-memory data transfer using DMA, it was failed. Currently in my system I'm trying to move data that received by a PIO to memory using DMA. Here are some points about the current condition : - The DMA can write data which length is same as its DMA length configuration (for example, if I configure my DMA to do 10 bytes data transfer, it will write 10 bytes data in memory) - However, the data that are written by DMA in memory is only the last data that is received by PIO (for example, if the PIO is suppose to receive 10 bytes data which values are 1 to 10, the DMA will write only the last data, 10, and copy it as 10 bytes to the memory):confused:. I have tried to configure my DMA either using Altera API or accessing DMA register directly, but the result is same. :( According to these results, do you have any suggestions about how is the correct way to handle PIO - memory data transfer using DMA? Is this PIO-memory data transfer really possible? I'm wondering that the data transfer that can be handled by dma is only a data transfer case from an address range (like fifo, or memory, not from a pio) to another address range. Is it true?? Please help me....:( I have tried many times to find out in this forum about the peripheral-to-memory DMA configuration (DMA as Rx channel), but only one post about it and it can't solve my problem. - Altera_Forum
Honored Contributor
Software: Look at nios ii software developer's handbook (10.0) page 6-25 following. It's not exactly a tutorial but it's an example on how to use the DMA with HAL-driver.
I prefer to write the registers of the DMA directly without using the HAL. The functionality of the various registers and bits are described in the user guide mentioned above by Cris. See dma controller core -> software programming model -> register map. - Altera_Forum
Honored Contributor
pillemann: both hardware and software
Cris72: Ok, thanks. will see it.. - Altera_Forum
Honored Contributor
Start with DMA module user guide:
www.altera.com/literature/ug/ug_embedded_ip.pdf Then, you can refer to any sample code using dma. Which one, depends on what you mean to do. You can find many examples and a lot of information by browsing the forum. Regards - Altera_Forum
Honored Contributor
Software or Hardware tutorial?