Altera_Forum
Honored Contributor
8 years agopartitioning __constant cache into parallel local memory banks
Is there a way to partition __constant cache into parallel memory banks? The following code snippet should give some idea of what I'm trying to do. Instead of explicitly moving the message data into the msgMem banks, I'd like for the data to be pre-loaded once the kernel is executed.
# define M 64 __kernel __attribute__((task)) void test( __constant volatile char * restrict message, ) { local char msgMem[256)][M]; // **************************************** // store input data across M memory banks // **************************************** for(uint k=0; k<NLDPC/M; k++) { for(uint r=0; r<M; r++) { msgMem[k][r]=message[(k*M)+r]; } } }