Intel® FPGA University Program
University Program Material, Education Boards, and Laboratory Exercises
1183 Discussions

Using a pinned memory in OpenCL

alhussain779
Beginner
927 Views

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

Labels (2)
0 Kudos
5 Replies
aikeu
Employee
872 Views

Hi alhussain779,


I will get back to you when I have relevant info to your queston.


Thanks.

Regards,

Aik Eu


0 Kudos
alhussain779
Beginner
744 Views

Hi @aikeu ,

Thanks for your reply. I would appreciate your help

 

Regards,

Alhussain

0 Kudos
aikeu
Employee
699 Views

Hi alhussain779,


For better way to transfer data, would suggest perhaps to try burst transfer on global memory (can refer to section 8.2) OR using non blocking channels (can refer to section 10.1.3), for more details in the link below

https://www.intel.com/content/www/us/en/docs/programmable/683521/22-4/introduction-to-pro-edition-best-practices.html



Thanks.

Regards,

Aik Eu


0 Kudos
aikeu
Employee
675 Views

Hi alhussain779,


Do let me know if you have further question from my previous reply.


Thanks.

Regards,

Aik Eu


0 Kudos
aikeu
Employee
584 Views

Hi alhussain779,


We do not receive any response from you to the previous question/reply/answer that I have provided. This thread will be transitioned to community support. If you have a new question, feel free to open a new thread to get the support from Intel experts. Otherwise, the community users will continue to help you on this thread. Thank you


Thanks.

Regards,

Aik Eu


0 Kudos
Reply