[an error occurred while processing this directive]
|
задача инициализировать память, чтоб из нее Х не лезли при моделировании
там где закоментировано - не работает, цикл выполняется, но в памяти остаются "U"
второй вариант - работает
почему так?
type ram_type is array (4095 downto 0)
of std_logic_vector (3 downto 0);
signal RAM : ram_type; -- assume 4x4096 DPRAMbegin
-- Initialize memory for behavioral modeling
-- synthesis translate_off
--process
-- begin
-- for i in ram_type'range loop
-- RAM(i)<=(others=>'0');
-- end loop; -- i
-- wait;
-- end process;
-- synthesis translate_on
begin
if (clk'event and clk = '1') then
if (reset = '0') then
RAM(conv_integer(addr_wr)) <= sign_i & val_i & sign_q & val_q; --unsigned
else
-- Initialize memory for behavioral modeling
-- synthesis translate_off
for i in ram_type'range loop
RAM(i)<=(others=>'0');
end loop; -- i
-- synthesis translate_on
end if;
rd_dpra <= addr_rd;
end if;
end process;
E-mail: info@telesys.ru