-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathIR.vhd
More file actions
executable file
·32 lines (23 loc) · 807 Bytes
/
IR.vhd
File metadata and controls
executable file
·32 lines (23 loc) · 807 Bytes
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
----------------------------------------------------------------------------------
--Instruction register
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity IR is
port(
IL:in std_logic;
mem_out:in std_logic_vector(15 downto 0);
opcode:out std_logic_vector(6 downto 0);
DR_out:out std_logic_vector(2 downto 0);
SA_out:out std_logic_vector(2 downto 0);
SB_out:out std_logic_vector(2 downto 0);
CLK:in std_logic
);
end IR;
architecture Behavioral of IR is
begin
opcode<=mem_out(15 downto 9) after 1 ns when IL='1';
SB_out<=mem_out(2 downto 0) after 1 ns when IL='1';
SA_out<=mem_out(5 downto 3) after 1 ns when IL='1';
DR_out<=mem_out(8 downto 6) after 1 ns when IL='1';
end Behavioral;