cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
937 Views
Registered: ‎10-11-2018

Share global memory between C/C++ kernels

Can data be shared between (C/C++) kernels in the same binary container xclbin? Does something exist which is similar to concept of global memory ("global int g_var0[4096];") in ocl for C/C++.

Thanks in advance

0 Kudos
6 Replies
Highlighted
Moderator
Moderator
899 Views
Registered: ‎11-04-2010

Hi, @snorwin ,

As I know, you cannot share between kernels currently. 

 

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Visitor
Visitor
888 Views
Registered: ‎10-11-2018

Thanks, but is it possible to create a channel to exchange data between two kernels using a stream or some special ports?

0 Kudos
Highlighted
Moderator
Moderator
833 Views
Registered: ‎11-04-2010

Hi, @snorwin ,

Data written to global memory by a kernel can be directly read by another kernel, but it has to be controlled by host. You can search PLRAM in UG1023(V2018.3).

 

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Visitor
Visitor
806 Views
Registered: ‎10-11-2018

Hi @hongh,

Thank you for pointing that out. What is the difference between PLRAM and DDR?

0 Kudos
Highlighted
Moderator
Moderator
749 Views
Registered: ‎11-04-2010

PLRAM is the on-chip Memory.

DDR is intended to access off-chip memory.

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
744 Views
Registered: ‎06-04-2018

Hi @snorwin,

For reference you can check the below example from public github regarding PLRAM usecase.

https://github.com/Xilinx/SDAccel_Examples/tree/master/getting_started/kernel_to_gmem/plram_access_c

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

0 Kudos