-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathESCOMipsPackage.vhd
More file actions
115 lines (101 loc) · 2.69 KB
/
Copy pathESCOMipsPackage.vhd
File metadata and controls
115 lines (101 loc) · 2.69 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
library IEEE;
use IEEE.STD_LOGIC_1164.all;
package ESCOMipsPackage is
component main is
port(
clk: in std_logic;
clr: in std_logic;
lf: in std_logic;
op_code: in std_logic_vector(4 downto 0);
i30: in std_logic_vector(3 downto 0);
banderas: in std_logic_vector(3 downto 0);
nivel2: out std_logic;
S: out std_logic_vector(19 downto 0)
);
end component;
component Registros is
Generic (
n: integer := 16 --Para generico
);
Port(
clk : in STD_LOGIC;
clr : in STD_LOGIC;
dir : in STD_LOGIC; --1 izq, 0 der
wr : in STD_LOGIC;
she : in STD_LOGIC;
write_reg : in STD_LOGIC_VECTOR (3 downto 0);
write_data : in STD_LOGIC_VECTOR (n-1 downto 0);
read_reg1 : in STD_LOGIC_VECTOR (3 downto 0);
read_reg2 : in STD_LOGIC_VECTOR (3 downto 0);
shamt : in STD_LOGIC_VECTOR (3 downto 0);
read_data1 : out STD_LOGIC_VECTOR (n-1 downto 0);
read_data2 : out STD_LOGIC_VECTOR (n-1 downto 0)
);
end component;
component ALU4Bits is
port(
a : in STD_LOGIC_VECTOR (15 downto 0);
b : in STD_LOGIC_VECTOR (15 downto 0);
sel_a : in STD_LOGIC;
sel_b : in STD_LOGIC;
op : in STD_LOGIC_VECTOR (1 downto 0);
res : inout STD_LOGIC_VECTOR (15 downto 0);
flags : out STD_LOGIC_VECTOR (3 downto 0)
);
end component;
component mem1 is
generic(
m :integer := 11; --modificacion
n :integer := 16
);
port(
din : in STD_LOGIC_VECTOR (n-1 downto 0);
add : in STD_LOGIC_VECTOR (m-1 downto 0);
wd : in STD_LOGIC;
clk : in STD_LOGIC;
dout : inout STD_LOGIC_VECTOR (n-1 downto 0)
);
end component;
component Pila is
generic(
NBITS : INTEGER := 16
);
port(
D : in STD_LOGIC_VECTOR (NBITS-1 downto 0);
Q : out STD_LOGIC_VECTOR (NBITS-1 downto 0);
CLK : in STD_LOGIC;
CLR : in STD_LOGIC;
UP : in STD_LOGIC;
DW : in STD_LOGIC;
WPC : in STD_LOGIC
);
end component;
component Mem2P6 is
generic(
m: integer := 10; --modificacion
n: integer := 25
);
port(
dir : in STD_LOGIC_VECTOR (m-1 downto 0);
ins : out STD_LOGIC_VECTOR (n-1 downto 0)
);
end component;
component Extensor_signo is
port(
entrada : in std_logic_vector(11 downto 0);
salida : out std_logic_vector(15 downto 0)
);
end component;
component Extensor_direccion is
port(
entrada : in std_logic_vector(11 downto 0);
salida : out std_logic_vector(15 downto 0)
);
end component;
component divisor is
Port ( OSC_CLK : in STD_LOGIC;
CLR : in STD_LOGIC;
CLK : INOUT STD_LOGIC
);
end component;
end ESCOMipsPackage;