-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmultiplier4bit_tb.vhd.bak
65 lines (49 loc) · 1.07 KB
/
multiplier4bit_tb.vhd.bak
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
-- Engineer: Stavros Kalapothas
-- Create Date: 22/12/2019
-- Project Name: ask1_tb
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
ENTITY Tb_multiplier4bit IS
END Tb_multiplier4bit;
ARCHITECTURE behavior OF Tb_multiplier4bit IS
-- Component Declaration for the Unit Under Test (UUT)
COMPONENT multiplier4bit
port ( A: in STD_LOGIC_VECTOR (3 downto 0);
B: in STD_LOGIC_VECTOR (3 downto 0);
S: out STD_LOGIC_VECTOR (7 downto 0));
END COMPONENT;
--Inputs
signal A : std_logic_vector(3 downto 0) := (others => '0');
signal B : std_logic_vector(3 downto 0) := (others => '0');
--Outputs
signal S: STD_LOGIC_VECTOR (7 downto 0) := (others => '0');
BEGIN
-- Instantiate the Unit Under Test (UUT)
uut: multiplier4bit PORT MAP (
A => A,
B => B,
S => S
);
-- Stimulus process
stim_proc: process
begin
-- hold reset state for 2 ns.
--wait for 2 ns;
A <= "0110";
B <= "1100";
wait for 2 ns;
A <= "1111";
B <= "1101";
wait for 2 ns;
A <= "0100";
B <= "0101";
wait for 2 ns;
A <= "0010";
B <= "1110";
wait for 2 ns;
A <= "1011";
B <= "1011";
wait for 2 ns;
wait;
end process;
END;