Unified RAM memory content signals
This commit is contained in:
@@ -54,8 +54,8 @@ end dpram_2w2r2c_ro;
|
||||
architecture Behavioral of dpram_2w2r2c_ro is
|
||||
|
||||
constant depth : integer := 2**addr_width;
|
||||
type RAMtype is array (0 to depth-1) of unsigned (data_width-1 downto 0);
|
||||
shared variable RAM : RAMtype;
|
||||
type memory_type is array (0 to depth-1) of unsigned (data_width-1 downto 0);
|
||||
shared variable memory_content : memory_type;
|
||||
|
||||
begin
|
||||
|
||||
@@ -63,10 +63,10 @@ process (clk_a)
|
||||
begin
|
||||
if clk_a'event and clk_a = '1' then
|
||||
if we_a = '1' then
|
||||
RAM(to_integer(addr_a)) := din_a;
|
||||
memory_content(to_integer(addr_a)) := din_a;
|
||||
end if;
|
||||
if re_a = '1' then
|
||||
dout_a <= RAM(to_integer(addr_a));
|
||||
dout_a <= memory_content(to_integer(addr_a));
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
@@ -75,10 +75,10 @@ process (clk_b)
|
||||
begin
|
||||
if clk_b'event and clk_b = '1' then
|
||||
if we_b = '1' then
|
||||
RAM(to_integer(addr_b)) := din_b;
|
||||
memory_content(to_integer(addr_b)) := din_b;
|
||||
end if;
|
||||
if re_b = '1' then
|
||||
dout_b <= RAM(to_integer(addr_b));
|
||||
dout_b <= memory_content(to_integer(addr_b));
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
Reference in New Issue
Block a user