Altera_Forum
Honored Contributor
15 years agoRAM uninferred due to asynchronous read logic
Hello,
I have a cache module which uses an inferred synchronous RAM block. When I synthesize the module by itself (as the project's top module) the synthesis works as intended and the RAM is inferred correctly. When I instantiate the module from another module, the RAM inference fails with this error message: --start of Quartus II error message Info: RAM logic "mips_cache:cache|code_line_table" is uninferred due to asynchronous read logic -- end of error message This the process that should infer the RAM and fails:
...
code_line_memory:
process(clk)
begin
if clk'event and clk='1' then
if ps=code_refill_bram_1 or ps=code_refill_sram8_3 or ps=code_refill_sram_1 then
code_line_table(conv_integer(code_word_addr_wr)) <= code_refill_data;
end if;
code_cache_rd <= code_line_table(conv_integer(code_word_addr));
end if;
end process code_line_memory;
...
please note that the RAM output is registered. It is identical to other process in the same module that does work, and it's identical to the VHDL RAM templates I've been using for years (as far as I can tell). When I re-register the output signal (that is, load code_cache_rd on a register before feeding it to the rest of the circuit), then the error disappears but at the cost of an extra delay cycle that should not be necessary (since the RAM output is already registered). I have tried a number of random changes, with an increasing level of desperation, and can't figure what's wrong. I'm using Quartus-II 9.0 build 235. Any help will be appreciated. Thanks!