Forum Discussion
Altera_Forum
Honored Contributor
10 years ago --- Quote Start --- You can try allocating shared memory between the FPGA and ARM CPU. For example, see page 1-63 of the Altera SDK for OpenCL Programming Guide: https://www.altera.com/content/dam/altera-www/global/en_us/pdfs/literature/hb/opencl-sdk/aocl_programming_guide.pdf . --- Quote End --- Thanks for the tip. It works, but unfortunately it doesn't quite solve my problem, since writing into the shared memory buffer (with memcpy) is just as slow as the clEnqueuWriteBuffer call. It is quite interesting though that memcpy is slower for some memory buffers than for others when there is supposedly only one physical DDR3 memory on the board. The document you linked mentions a HPS DDR and a FPGA DDR. Maybe is not one physical memory after all. I see no other explanation. --- Quote Start --- How did you get the problem is from there? you read from report? --- Quote End --- I simply measured the time the clEnqueueWriteBuffer and clEnqueueReadBuffer calls take.