Altera_Forum
Honored Contributor
8 years agoDifference between RAM blocks and Memory Bits?
I recently encounter abnormal usage about RAM blocks.
my code is like: # define A_PARALLEL 16# define B_PARALLEL 32 typedef struct{ float kk[A_PARALLEL]; } A_parallel; typedef struct{ A_parallel ff[B_PARALLEL]; } B_parallel; __kernel foo(__global const B_parallel *W, int count){ B_parallel temp; for(int i=0; i<count ;i++){ temp = W[idx+i]; } } In acl_quartus_report: ALUTs: 169508 Registers: 286,128 Logic utilization: 131,657 / 427,200 ( 31 % ) I/O pins: 277 / 826 ( 34 % ) DSP blocks: 680 / 1,518 ( 45 % ) Memory bits: 31,849,144 / 55,562,240 ( 57 % ) RAM blocks: 2,458 / 2,713 ( 91 % ) In report.html, it tells most of RAM blocks usage comes from temp. my question is what is difference between RAM blocks and memory bits? and my temp only use 512 floats, why it has such large RAM usage? I want to force it use register with attribute((register)) but can't work, how to solve it?