-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeco.vhd
More file actions
94 lines (84 loc) · 1.45 KB
/
Copy pathDeco.vhd
File metadata and controls
94 lines (84 loc) · 1.45 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
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity Deco is
Port ( cp_code : in STD_LOGIC_VECTOR (4 downto 0);
tipor : out STD_LOGIC;
beq : out STD_LOGIC;
bneq : out STD_LOGIC;
blt : out STD_LOGIC;
ble : out STD_LOGIC;
bgt : out STD_LOGIC;
bget : out STD_LOGIC);
end Deco;
architecture Behavioral of Deco is
begin
deco: process(cp_code)
begin
case cp_code is
when "00000" =>
tipor<='1';
beq<='0';
bneq<='0';
blt<='0';
ble<='0';
bgt<='0';
bget<='0';
when "01101" =>
tipor<='0';
beq<='1';
bneq<='0';
blt<='0';
ble<='0';
bgt<='0';
bget<='0';
when "01110" =>
tipor<='0';
beq<='0';
bneq<='1';
blt<='0';
ble<='0';
bgt<='0';
bget<='0';
when "01111" =>
tipor<='0';
beq<='0';
bneq<='0';
blt<='1';
ble<='0';
bgt<='0';
bget<='0';
when "10000" =>
tipor<='0';
beq<='0';
bneq<='0';
blt<='0';
ble<='1';
bgt<='0';
bget<='0';
when "10001" =>
tipor<='0';
beq<='0';
bneq<='0';
blt<='0';
ble<='0';
bgt<='1';
bget<='0';
when "10010" =>
tipor<='0';
beq<='0';
bneq<='0';
blt<='0';
ble<='0';
bgt<='0';
bget<='1';
when others =>
tipor<='0';
beq<='0';
bneq<='0';
blt<='0';
ble<='0';
bgt<='0';
bget<='0';
end case;
end process;
end Behavioral;