instrmem.vhd (1113B)
1 library ieee; 2 use ieee.std_logic_1164.all; 3 use ieee.std_logic_unsigned.all; 4 use ieee.numeric_std.all; 5 6 entity instrmem is port ( 7 addr: in std_logic_vector(3 downto 0); 8 c: out std_logic_vector(31 downto 0) 9 ); 10 end instrmem; 11 12 architecture dataflow of instrmem is 13 14 type instr_arr is array(0 to 15) of std_logic_vector (31 downto 0); 15 constant instr_mem: instr_arr := ( 16 "11111111111111111111111111111111", -- 0 17 "10001010100101010101000011101111", -- 1 18 "11111111111111111111111111111111", -- 2 19 "00000000000000000000000000000000", -- 3 20 "11111111111111111111111111111111", -- 4 21 "00000000000000000000000000000000", -- 5 22 "00000000101001100010000000100000", -- 6 23 "11111111111111111111111111111111", -- 7 24 "11111111111111111111111111111111", -- 8 25 "11111111111111111111111111111111", -- 9 26 "10101010101011110000101110001010", -- 10 27 "11111111111111100000000000000000", -- 11 28 "10001011101010111010111101010111", -- 12 29 "11111111111111111111111111111111", -- 13 30 "10110111000111010101010101111111", -- 14 31 "11111111111111111111111111111111" -- 15 32 ); 33 34 begin 35 c <= instr_mem(to_integer(unsigned(addr))); 36 end dataflow;