Forum Discussion
Altera_Forum
Honored Contributor
12 years agoWith the Cyclone V SoC, how can I use the FPGA fabric to access the HPS DMA?
Hello everyone,
I want to make something that records values that are in my FPGA. I thought of using the Cyclone V SoC DMA, I do have the Altera SoC kit. With the Cyclone V SoC, how can I use the FPGA fabric to access the HPS DMA? I want to set a trigger in the HPS DMA, so that when I send a signal to high level at FPGA Fabric, the DMA starts to copy a FPGA FABRIC RAM content to the DDR connected in the HPS and visible by the Linux running in the ARM. *Is this the easiest/fastest way of achieving what I want?22 Replies
- Altera_Forum
Honored Contributor
Yes F2S, sorry for the typo.
Thanks for your help BadOmen, going to handle the FPGA Design to the firmware team and let's see if it works :) Cheers - Altera_Forum
Honored Contributor
Where can find the reference design of F2S usage ?
- Altera_Forum
Honored Contributor
So, I've tried this architecture and it worked!!!
However I am getting only 150MB/s throughtput, I expected around 300MB/s I just took a look in the DMA Core and Enabled the Burst transfer. Then I configured it to 1024 max words. And I've also increased the FIFO depth to 256. I am going to try and see the results. In the Address span extender, my data width is set to 64 bits. The burstcount Width is 1 bit and maximum pending reads is also set to 1. Any ideas on a configuration that could help the throughput? --- Quote Start --- As long as when you say "F2H" you really mean F2S (i.e. the HPS SDRAM dedicated ports) then yes this is the correct way to set up the hardware. You can probably reduce the DMA length register width since you are only exposing 512kB of memory in the HPS at a time. Make sure the DMA control port is connected to the lightweight HPS-to-FPGA bridge so that MPU can tell the DMA what to do. --- Quote End --- - Altera_Forum
Honored Contributor
Well with the Enabled Burst Transfer no more IRQs comes from the DMA.
- Altera_Forum
Honored Contributor
I've tried some configurations with the DMA and the mem addr spammer but without success, can't get past 150MB/sec in the HW side... :(
- Altera_Forum
Honored Contributor
So, I've increased the data width of the onchip ram to 64 bits and enabled only words/double-words transfers in the DMA.
With this I was able to get 224MB/Sec, a little bit better. Final update: The device driver wasn't enabling the double word transfer, with it enabled now I am hitting 324MBytes/Sec. - Altera_Forum
Honored Contributor
hi aprado,
I have do the QSYS interconnect as you mentions, but after trig DMA, it stay with BUSY bit, and can't go through... Can you share your design for me ? ( FPGA project or QSYS file) [email protected] Thanks in advance. Lucian - Altera_Forum
Honored Contributor
--- Quote Start --- So, I've increased the data width of the onchip ram to 64 bits and enabled only words/double-words transfers in the DMA. With this I was able to get 224MB/Sec, a little bit better. Final update: The device driver wasn't enabling the double word transfer, with it enabled now I am hitting 324MBytes/Sec. --- Quote End --- Hi Aprado, Would it be possible that you posted your design or possibly email me? I'm trying to do a similar task but I'm having issues with the dma and how it gets controlled by hps. [email protected] - Altera_Forum
Honored Contributor
--- Quote Start --- Hi Aprado, Would it be possible that you posted your design or possibly email me? I'm trying to do a similar task but I'm having issues with the dma and how it gets controlled by hps. [email protected] --- Quote End --- I am also very interested in example driver code for controlling the DMA from the HPS. Would you please share? [email protected] - Altera_Forum
Honored Contributor
Hi aprado,
Is it possible to share your design to [email protected] please. I am also have the same thing to do, but struggling to get it done. Best Regards.