-
Notifications
You must be signed in to change notification settings - Fork 0
/
tb_ALUControl.vhd
83 lines (64 loc) · 2.03 KB
/
tb_ALUControl.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
75
76
77
78
79
80
81
82
83
-- Testbench automatically generated online
-- at http://vhdl.lapinoo.net
-- Generation date : 31.3.2019 22:11:17 GMT
library ieee;
use ieee.std_logic_1164.all;
entity tb_ALUControl is
end tb_ALUControl;
architecture tb of tb_ALUControl is
component ALUControl
port (Funct : in std_logic_vector (8 downto 0);
ALU_op : in std_logic_vector (1 downto 0);
ALUControlFunct : out std_logic_vector (2 downto 0));
end component;
signal Funct : std_logic_vector (8 downto 0);
signal ALU_op : std_logic_vector (1 downto 0);
signal ALUControlFunct : std_logic_vector (2 downto 0);
begin
dut : ALUControl
port map (Funct => Funct,
ALU_op => ALU_op,
ALUControlFunct => ALUControlFunct);
stimuli : process
begin
-- EDIT Adapt initialization as needed
Funct <= (others => '0');
ALU_op <= (others => '0');
-- EDIT Add stimuli here
ALU_op <= "00";
wait for 10 ns;
-- ALUControlFunct <= "010
ALU_op <= "10";
Funct <= "000100000";
wait for 10 ns;
-- ALUControlFunct <= "010
ALU_op <= "01";
wait for 10 ns;
-- ALUControlFunct <= "110
ALU_op <= "10";
Funct <= "000100010";
wait for 10 ns;
-- ALUControlFunct <= "110
ALU_op <= "11";
wait for 10 ns;
-- ALUControlFunct <= "000
ALU_op <= "10";
Funct <= "000100100";
wait for 10 ns;
-- ALUControlFunct <= "001"
ALU_op <= "10";
Funct <= "000101010";
wait for 10 ns;
-- ALUControlFunct <= "111"
ALU_op <= "10";
Funct <= "111111010";
wait for 10 ns;
-- ALUControlFunct <= "000"
wait;
end process;
end tb;
-- Configuration block below is required by some simulators. Usually no need to edit.
configuration cfg_tb_ALUControl of tb_ALUControl is
for tb
end for;
end cfg_tb_ALUControl;