blob: 07c068ebfba13b9b7c36b8ae5d88f89cf6dcb401 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
library ieee;
context ieee.ieee_std_context;
use work.uCPUtypes.all;
entity ROM is
port (
abus : in unsigned_byte;
dbus : out code_word;
en : in logic
);
end entity ROM;
architecture RTL of ROM is
type memory is array (0 to 255) of code_word;
constant mem : memory := (x"777", others => x"000");
begin
dbus <= mem(to_integer(abus)) when en else x"ZZZ";
end architecture RTL;
|