Altera_Forum
Honored Contributor
15 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.
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.
This piece of code sets the bit manually.
I don't know if there also is a specific function/macro to change the bit. # include "altera_avalon_dma_regs.h" int reg; reg = IORD_ALTERA_AVALON_DMA_CONTROL (dma_base_address); IOWR_ALTERA_AVALON_DMA_CONTROL (dma_base_address, reg | ALTERA_AVALON_DMA_CONTROL_RCON_MSK);Thanks a lot Cris!! Last question, how can i connect the RD signal that the DMA gives before reading to the FIFO that is outsite my system? I probably have to read it from somewhere. I looked into the embbeded periphals guide from ALTERA but found nothing regarding this RD signal to synchronize with the fifo.
If i understood correctly it should happen like that: 1. DMA sends RD signal 2. FIFO gets the RD signal 3. FIFO updated the output data 4. DMA reads from output data Thanks a lot Cris you are helping me so much!You understood correctly. That sequence is correct.
Anyway I don't know how to make the RD signal available outside the sopc system. You must expose the Avalon PIO read (or select) signal, so I think you probably need a modified version of the pio core. Maybe there's a way to export that signal, but I've never made something alike. You can try this workaround: use a tristate bus with a fake sram component; discard address,wr and rd signals; connect data to your fifo and use cs signal to update fifo output.Thanks Cris. I will try that.
Please take a look at my other thread too ^.^