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

Custom PCIe DMA on Cyclone 10GX FPGA burst read stucks

MAlek2
Beginner
893 Views

I'm writing a custom DMA machine to read and write data to the host system from FPGA memory. I use the Altera PCIe IP core as end point device in Avalon-MM mode. BAR0 is set as 64bit bar, Avalon-MM slave bus (txs port) also has 64bit address bus. Bar 0 is used to read/write control and status registers. While the port txs of this IP core is connected to my DMA. Completer-Only Endpoint option is disabled.

 

In linux driver I allocate a memory buffer using dma_allocate_coherent() function. Than I pass the physical address of this buffer and data size to my DMA through the BAR0. After that the DMA starts burst read operation and then stucks because the waitrequest signal on Avalon-MM bus between the DMA and PCIe never falls to 0 and is always held at 1.

 

So the question is what is the problem can be?

Do I need to told the host system that there will be an DMA request from the pcie device?

Or do I need to apply some special settings to the PCIe IP core?

 

 

0 Kudos
3 Replies
Nathan_R_Intel
Employee
508 Views
Hie, I will need to know the IP configuration used to answer your questions. Hence could you help provide the following. i. Quartus version ii. Device iii. Which QSYS or Paltform IP type used iv. Details on IP configuration. Will it be possible to provide a simplified achieve ".qar" (only containing Quartus IP configuration) without any of your code. Regards, Nathan
0 Kudos
MAlek2
Beginner
508 Views

Thank you for your reply, but i've already found out what was wrong. I needed to enable bus mastering to my PCIE device. Without that the host system doesn't allow DMA transactions to end point.

0 Kudos
Nathan_R_Intel
Employee
508 Views
Good to know you have resolved your issue. Regards, Nathan
0 Kudos
Reply