-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTOP_MICRO.vhd
75 lines (65 loc) · 1.46 KB
/
TOP_MICRO.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
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use WORK.MP_PACK.ALL;
entity TOP_MICRO is
Port ( CLK : in STD_LOGIC;
RESET : in STD_LOGIC);
end TOP_MICRO;
architecture Behavioral of TOP_MICRO is
COMPONENT ROM
PORT(
CS : IN std_logic;
RD_BAR : IN std_logic;
ADR_IN : IN std_logic_vector(3 downto 0);
D : OUT std_logic_vector(3 downto 0)
);
END COMPONENT;
COMPONENT RAM
PORT(
ADR_IN : IN std_logic_vector(3 downto 0);
CS_BAR : IN std_logic;
WR_BAR : IN std_logic;
RD_BAR : IN std_logic;
D : INOUT std_logic_vector(3 downto 0)
);
END COMPONENT;
COMPONENT BLK_MICRO
PORT(
CLK : IN std_logic;
RESET : IN std_logic;
D : INOUT std_logic_vector(3 downto 0);
P_D : OUT std_logic;
RD_BAR : OUT std_logic;
WR_BAR : OUT std_logic;
ADR : OUT std_logic_vector(3 downto 0)
);
END COMPONENT;
SIGNAL CON_CS : std_logic := 'Z';
SIGNAL CON_RD : std_logic := 'Z';
SIGNAL CON_WR : std_logic := 'Z';
SIGNAL BUS_D : std_logic_vector(3 downto 0) := "ZZZZ";
SIGNAL BUS_A : std_logic_vector(3 downto 0) := "ZZZZ";
begin
Inst_ROM: ROM PORT MAP(
CS => CON_CS,
RD_BAR => CON_RD,
ADR_IN => BUS_A,
D => BUS_D
);
Inst_RAM: RAM PORT MAP(
ADR_IN => BUS_A,
CS_BAR => CON_CS,
WR_BAR => CON_WR,
RD_BAR => CON_RD,
D => BUS_D
);
Inst_BLK_MICRO: BLK_MICRO PORT MAP(
CLK => CLK,
RESET => RESET,
P_D => CON_CS,
RD_BAR => CON_RD,
WR_BAR => CON_WR,
ADR => BUS_A,
D => BUS_D
);
end Behavioral;