-
Notifications
You must be signed in to change notification settings - Fork 0
/
IITB_RISC.vhd
55 lines (43 loc) · 1.42 KB
/
IITB_RISC.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
library ieee;
use ieee.numeric_std.all;
use ieee.std_logic_1164.all;
library work;
use work.components.all;
entity IITB_RISC is
port(
clk: in std_logic);
end entity;
architecture overview of IITB_RISC is
component control_path is
port(
clock: in std_logic;
op_code: in std_logic_vector(3 downto 0);
CZ: in std_logic_vector(1 downto 0);
C: out std_logic_vector(29 downto 0);
state: out std_logic_vector(4 downto 0);
wren,rden:out std_logic;
CY, Z,invalid_next: in std_logic);
end component;
component data_path is
port(
op_code: out std_logic_vector(3 downto 0);
CZ: out std_logic_vector(1 downto 0);
clock,wren,rden: in std_logic;
C: in std_logic_vector(29 downto 0);
state: out std_logic_vector(4 downto 0));
end component;
signal op_code: std_logic_vector(3 downto 0);
signal CZ: std_logic_vector(1 downto 0);
signal C: std_logic_vector(29 downto 0);
signal CY, Z, invalid_next,wren,rden: std_logic;
signal state: std_logic_vector(4 downto 0);
begin
data: data_path
port map(op_code => op_code, CZ=>CZ,wren=> wren,rden=>rden,
clock => clk, C => C, state => state);
control: control_path
port map( clock => clk,
op_code => op_code, CZ => CZ,wren=> wren,rden=>rden,
C => C, CY => CY, Z => Z, invalid_next => invalid_next);
invalid_next <= state(0);
end architecture;