-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAdderWithShift_Tb.vhd
71 lines (52 loc) · 1.53 KB
/
AdderWithShift_Tb.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
--------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--USE ieee.numeric_std.ALL;
ENTITY AdderWithShift_Tb IS
END AdderWithShift_Tb;
ARCHITECTURE behavior OF AdderWithShift_Tb IS
-- Component Declaration for the Unit Under Test (UUT)
COMPONENT AdderWithShift
PORT(
A : IN std_logic_vector(31 downto 0);
B : IN std_logic_vector(31 downto 0);
sum : OUT std_logic_vector(31 downto 0)
);
END COMPONENT;
--Inputs
signal A : std_logic_vector(31 downto 0) := (others => '0');
signal B : std_logic_vector(31 downto 0) := (others => '0');
--Outputs
signal sum : std_logic_vector(31 downto 0);
-- No clocks detected in port list. Replace <clock> below with
-- appropriate port name
BEGIN
-- Instantiate the Unit Under Test (UUT)
uut: AdderWithShift PORT MAP (
A => A,
B => B,
sum => sum
);
-- Stimulus process
stim_proc: process
begin
-- hold reset state for 100 ns.
wait for 100 ns;
A<=x"12445566";
B<=x"ABCD1234";
wait for 100 ns;
A<=x"CEFD5566";
B<=x"44441234";
wait for 100 ns;
A<=x"EAFD5566";
B<=x"33331234";
wait for 100 ns;
-- insert stimulus here
wait;
end process;
END;