-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTB_HalfAdd.vhd
55 lines (40 loc) · 910 Bytes
/
TB_HalfAdd.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
library IEEE;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity TestBench_Half_Adder is
end TestBench_Half_Adder;
architecture ARC_half_1 of TestBench_Half_Adder is
component Half_Adder
port(
A, B : in std_logic;
Sum, Carry : out std_logic
);
end component;
signal A, B : std_logic :='0';
signal S,C : std_logic;
begin
dev_test : Half_Adder
port map
(
A => A,
B => B,
Sum => S,
Carry => C
);
stim : process
begin
A <= '0';
B <= '0';
wait for 20ns;
A <= '1';
B <= '0';
wait for 20ns;
A <= '0';
B <= '1';
wait for 20ns;
A <= '1';
B <= '1';
wait for 20ns;
wait;
end process;
end ARC_half_1;