Forum Discussion

alhussain779's avatar
alhussain779
Icon for New Contributor rankNew Contributor
2 years ago

Using a pinned memory in OpenCL

Hello,

I am using Intel® FPGA SDK for OpenCL. The board I am using is from Terasic DE10-PRO SX.

In my application, I produce data to a buffer in the memory. Then I send this data to the FPGA using the function clEnqueueWriteBuffer and process it there. After that, I send the results back to the host using clEnqueueReadBuffer. I would like to enhance the process of sending the data back and forth between the host machine and the FPGA.

My understanding of the function clEnqueueWriteBuffer is that it copies the data from the provided pointer to a pinned memory, then sends the data from the pinned memory to device. Is this correct?

If yes, is there a way to write data directly to a pinned memory?

In addition, is there a better way to transfer data between the FPGA and host machine?

Best regards,

Alhussain

5 Replies