Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16557 Discussions

Using Avalon MSGDMA to transfer data with PCIe device under OpenCL

Altera_Forum
Honored Contributor II
987 Views

Hello, 

I'm attempting to implement the data transfer between FPGA and GPU devices over PCIe. I use the OpenCL framework, Altera OpenCL SDK v13.1 and Ubuntu 14.04 LTS as my programming environment. On the FPGA side, I use the Avalon Modular SGDMA engine to do the DMA transfer. On the GPU side, I use the Nvidia GPUDirect RDMA technique. 

 

 

As I know, when using Avalon Modular SGDMA, DMA descriptors are first set so that the DMA controller could subsequently do the actual transfer. My code works well when transferring data from FPGA to GPU, but it crashes when transferring data from GPU to FPGA. I believe the source and destination addresses are set properly (otherwise the direction of FPGA to GPU will not work). When transferring in the other direction, I just swap the source and destination addresses (Would this be OK or should I modify the address?). I think maybe the DMA controller could not recognize the source address of the GPU device and thus cannot consume the DMA descriptors. 

 

 

So is there anything wrong with my code? Or does anyone know how to debug this problem? 

 

 

Hope you can help me about this. thanks!
0 Kudos
0 Replies
Reply