-
Notifications
You must be signed in to change notification settings - Fork 1
/
FA_TB.vhd
72 lines (56 loc) · 997 Bytes
/
FA_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
72
library ieee;
use ieee.std_logic_1164.ALL;
entity FA_TB is
end FA_TB;
architecture behavior of FA_TB is
component FA
port(
X : in std_logic;
Y : in std_logic;
CIN : in std_logic;
S : out std_logic;
COUT : out std_logic
);
end component;
--Inputs
signal X : std_logic;
signal Y : std_logic;
signal CIN : std_logic;
--Outputs
signal S : std_logic;
signal COUT : std_logic;
begin
-- Instantiate the Unit Under Test (UUT)
UUT: FA
port map(
X => X,
Y => Y,
CIN => CIN,
S => S,
COUT => COUT
);
-- Stimulus process
process
begin
X <= '0';
Y <= '0';
CIN <= '0';
wait for 20 ns;
X <= '1';
Y <= '0';
CIN <= '0';
wait for 20 ns;
X <= '1';
Y <= '1';
CIN <= '0';
wait for 20 ns;
X <= '1';
Y <= '1';
CIN <= '1';
wait for 20 ns;
X <= '1';
Y <= '0';
CIN <= '1';
wait;
end process;
end;