2 use ieee.std_logic_1164.all;
3 use ieee.numeric_std.all;
8 DEPTH : positive := 256;
15 write_enable: in std_logic;
16 active_way: in natural range 0 to WAYS-1;
17 write_address: in natural range 0 to DEPTH-1;
18 input: in std_logic_vector(WIDTH-1 downto 0);
20 read_address: in natural range 0 to DEPTH-1;
21 output: out std_logic_vector(WIDTH-1 downto 0)
25 architecture a of ent5 is
28 type memory_t is array(0 to DEPTH-1) of std_logic_vector(WIDTH-1 downto 0);
29 type memories_t is array(0 to WAYS-1) of memory_t;
31 variable memories : memories_t;
33 if rising_edge(clk) then
34 output <= memories(active_way)(read_address);
37 memories(active_way)(write_address) := input;