-
Notifications
You must be signed in to change notification settings - Fork 0
/
base_computer.vhd
81 lines (69 loc) · 1.98 KB
/
base_computer.vhd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
library IEEE;
use IEEE.std_logic_1164.all;
entity base_computer is
port (
external_reset, clk : in std_logic
);
end base_computer;
architecture rtl of base_computer is
component components
port (
clk : in std_logic;
external_reset : in std_logic;
mem_data_ready : in std_logic;
databus: inout std_logic_vector(15 downto 0);
ir_out : out std_logic_vector(15 downto 0);
read_mem : out std_logic;
write_mem : out std_logic;
read_io : out std_logic;
write_io : out std_logic
);
end component;
component memory
port (
clk,
readmem,
writemem : in std_logic;
addressbus: in std_logic_vector (15 downto 0);
databus : inout std_logic_vector (15 downto 0);
memdataready : out std_logic
);
end component;
component port_manager
port (
clk, readio, writeio: in std_logic;
addressbus: in std_logic_vector (15 downto 0);
databus : inout std_logic_vector (15 downto 0)
);
end component;
signal readmem_signal, writemem_signal, read_io_signal, write_io_signal : std_logic;
signal memdataready_signal : std_logic;
signal addressbus_signal, databus_signal : std_logic_vector(15 downto 0);
begin
memory_module : memory port map(
clk,
readmem_signal,
writemem_signal,
addressbus_signal,
databus_signal,
memdataready_signal
);
components_module : components port map(
clk,
external_reset,
memdataready_signal,
databus_signal,
addressbus_signal,
readmem_signal,
writemem_signal,
read_io_signal,
write_io_signal
);
port_manager_module : port_manager port map(
clk,
read_io_signal,
write_io_signal,
addressbus,
databus
);
end rtl;