Altera_Forum
Honored Contributor
17 years agoInferring DP-ROM
I’d like to infer a 2-port ROM with a read-enable signal using VHDL. Without the read-enable everything is o.k.. Using the read-enable, Quartus use a single ported ROM with the double size instead of the dual ported one. Is it not possible to build up an enabled DP-ROM?
...
type memory_t is array (0 to (2**TAB_ADR_BITS)-1) of std_logic_vector (BITS-2 downto 0);
function init_rom
return memory_t is
variable tmp : memory_t := (others => (others => '0'));
begin
for k in 0 to 2**TAB_ADR_BITS - 1 loop
tmp(k) := ...
end loop;
return tmp;
end init_rom;
signal TAB: memory_t := init_rom;
begin
ROM_read:
process(clk)
begin
if clk'event and clk = '1' then
--if ena = ‘1’ then
Signal_1 <= TAB(index_1);
Signal_2 <= TAB(index_2);
--end if;
end if;
end process;
...
Has anyone an idea how to do it?