I've been having trouble the last little while with a project that uses look up table arrays quite a bit and getting yosys to infer them as block ram. Yosys keeps thinking one or the other of my arrays should be implemented using logic cells.
example:
reg signed [11:0] dynamicBuffer [0:2047];
gets inferred as IceStorm LC and thus quickly overflows my logic cell budget.
Info: Device utilisation:
Info: ICESTORM_LC: 83524/ 7680 1087%
Info: ICESTORM_RAM: 18/ 32 56%
Info: SB_IO: 36/ 256 14%
Info: SB_GB: 8/ 8 100%
Info: ICESTORM_PLL: 2/ 2 100%
Info: SB_WARMBOOT: 0/ 1 0%
I've read that an array needs to have a registered output or Yosys does not see it as ram (is this true?) I've tried to rework things such that my arrays are ultimately routed to a register at each clock count. But I still cannot get it working. What is the right way of working with multiple arrays, copying them one to the other, and getting yosys to infer them as block ram? What do I need to avoid?