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

DE1-SoC memory transfer

Altera_Forum
Honored Contributor II
934 Views

I need to improve data transfer between arm and fpga.(DE1-SoC) 

 

I've read programming guide and found this solution: 

"To transfer data from shared hard processor system (HPS) DDR to FPGA DDRefficiently, include a kernel that performs the memcpy function, as shown below. 

__attribute__((num_simd_work_items(8))) 

mem_stream(__global uint * src, __global uint * dst){ 

size_t gid = get_global_id(0); dst[gid] = src[gid]; 

}" 

 

But I am still dont understand how to use it and as I've read before  

"The ARM CPU and the FPGA can access the shared memory simultaneously. You do notneed to include the clEnqueueReadBuffer and clEnqueueWriteBuffer calls inyour host code to make data visible to either the FPGA or the CPU." as I grasp it, I dont need to transfer data manually between host and device if I use shared memory, so in this case why and how have I use mem_stream kernel? 

 

It seems like I dont understand the difference between shared memory(is it CMA memory?) and FPGA DDR memory. Could you explain me?
0 Kudos
0 Replies
Reply