From: shantesh on


I'm curious to know if there is a way we could tell the synthesizer to use
registered mode of BRAM when using ram_style "block" attribute.

The registered mode otherwise can be enabled by instantiating a BRAM with
DOA_REG, DOB_REG set to 1 and REGCEA, REGCEB set to '1'.

For example, the VHDLcode below infers a BRAM. However, it does not enable
the registered mode. To get around with it, I've added a process which
registers the output wherever this memory is instantiated. This added
register occupies a slice. Is there a way I can tell the synthesizer to use
the register inside of BRAM (that way I could save resources).

attribute ram_style : string;
attribute ram_style of RAM : signal is "block";


process (clk)
if clk'event and clk = '1' then
if en = '1' then
if we = '1' then
RAM(conv_integer(addr)) <= di;
end if;
do <= RAM(conv_integer(addr));
end if;
end if;
end process;



Posted through