Altera_Forum
Honored Contributor
8 years agomemory replication
I'm confused about when and why the compiler replicates memory. I have a kernel that reads in a block of data and fills up a 2D memory array. THe read process is done serially through a channel. After having read in a block of data the computation portion of the kernel begins. During the computation phase data is read out in parallel from the memory bank. I want the memory bank to be implemented as a bank of parallel BRAMs and not replicated. The code is below.
local msg_t msgMem[180][512]; // **************************************** // store input data across M memory banks // **************************************** for(uint k=0; k<NLDPC/M; k++) { # pragma unroll 1 for(uint r=0; r<M; r++){ msgMem[k][r] = read_channel_intel(LDPC_DEC_SDATA_OUT); } } /* More code here */ # pragma unroll for(int r=0; r<M; r++) msg[r] = msgMem[jOffset][r]; Thanks in advance for the help,