Hello everyone,
As you can see in the title , i have a problem with a memory that I infer as block RAM but it is implemented as distributed leading to excessive resources being used.
The error showing up in Xilinx XST is the following :
INFO:Xst:3218 - HDL ADVISOR - The RAM will be implemented on LUTs either because you have described an asynchronous read or because of currently unsupported block RAM features.
The read operation of the RAM is (pretty much ) this one :
Code Verilog - [expand]
1
2
3
4
5
6
always@(posedge clk)beginif( counter <972)begin// RAM <banks> has 972 banks of 5 bits each
read_reg <= banks[counter][max_error_bits -1:0];
counter <= counter +1;endbegin
If i understand correctly , the tool says that i read from the memory asynchronously but i am pretty sure i do it synchronously. Is there something that i am missing?
perhaps it is the declaration (eg, using 972 or 1024 vs 1023) or the extra [max_error_bits-1:0]. I think the latter is ok and the former is not ok. ISE is really bad at explaining why something isn't a BRAM.
The write operation is also in the same always block, but it is a bit more complicated that's why i dont include it. The important thing is that i write only at 1 address per clock cycle, so that shouldnt be a problem for the RAM to be interpreted as distributed.
Anyway, back to the read operation, do you suggest to change the depth to a power of 2 ( 1023 for example ) and write to/read from the first 972 addresses?
The takeaway here is there is no complicated comparisons or other code in the template. Just simple enableA and enableB placeholder. I would avoid having anything but a single signal name in those <xxxxxx> spots. Having comparisons and other signals (e.g. counter) buried within your inferred RAM code is more likely to result in problems.
Also on that page I referenced is the use of the RAM_STYLE attribute, which can force the type of inferred RAM used.