Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Comunicados
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
21615 Discussões

What is the most effective way to copy subsets of arrays between local and global memory?

WWP00
Principiante
1.257 Visualizações

For example, suppose we have a local memory array:

 

float local[10];

 

And a much larger, global memory array. Would we copy like:

 

int memStart = 50;

for (int i = 0; i < 10; ++i)

         local[i] = globalMem[memStart + i];

 

Or should we use #pragma unroll for this copy, to avoid making the loop take one clock cycle per copy? Or is there some other recommended way to move array data between local and global memory?

0 Kudos
3 Respostas
KennyTan_Altera
Moderador
963 Visualizações
Hi, You may found information here: https://stackoverflow.com/questions/20616844/how-to-transfer-array-data-in-vhdl I would suggest you post it to there as it involve IEEE std. Thanks
WWP00
Principiante
963 Visualizações

Sorry, I meant in Intel's OpenCL for FPGAs, not in RTL.

KennyTan_Altera
Moderador
963 Visualizações

You can refer to https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/opencl-sdk/archives/aocl-best-practices-guide-15.1.pdf page 1-47.

Transferring Loop-Carried Dependency to Local Memory 

 

For more queries, can you put this to the correct category fall under open cl? https://forums.intel.com/s/topic/0TO0P0000001AUUWA2/intel-high-level-design

 

Thanks

Responder