[an error occurred while processing this directive]
|
type mem is array (0 to 7) of std_logic_vector(3 downto 0);
signal ram_block1 : mem;
по фронту, проверяю попадание в BAR и адрес 0, затем в зависимости от C/BE пишу в RAM.
if clk'event and clk='1'
then
if lt_tsr='1' and adro_obsh="00000000"
then
if l_beno="1110"
then ram_block1 (conv_integer (adro_obsh)) <=l_dato (7 DOWNTO 0);
end if;
if l_beno="1101"
then ram_block1 (conv_integer(adro_obsh)) <=l_dato (15 DOWNTO 8);
end if;
if l_beno="1011"
then ram_block1 (conv_integer(adro_obsh)) <=l_dato (23 DOWNTO 16);
end if;
if l_beno="0111"
then ram_block1 (conv_integer(adro_obsh)) <=l_dato (31 DOWNTO 24);
end if;
запись
clk80_s частота clk деленная на 24
по фронту этой частоты и по значению счетчика count2_s считываю с адреса 0.
if clk80_s'event and clk80_s='1'
then
if (count2_s=2 or count2_s=34 or count2_s=66)
then DOUT_s<=ram_block1 (conv_integer(adress_rd));
adress_rd<="00000000";
else DOUT_s<= (DOUT_s'range=> '0');
end if;
end if;
E-mail: info@telesys.ru