2 use ieee.std_logic_1164.all;
3 use ieee.numeric_std.all;
8 rden_i : in std_ulogic;
9 wren_i : in std_ulogic;
10 addr_i : in std_ulogic_vector(7 downto 0);
11 data_i : in std_ulogic_vector(15 downto 0);
12 data_o : out std_ulogic_vector(15 downto 0)
16 architecture notok of simple2 is
17 type ram_t is array(0 to 2**8-1) of std_ulogic_vector(15 downto 0);
20 variable memory : ram_t;
22 if rising_edge(clk_i) then
24 memory(to_integer(unsigned(addr_i))) := data_i;
27 data_o <= memory(to_integer(unsigned(addr_i)));