-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtb_MUX.vhd
42 lines (32 loc) · 816 Bytes
/
tb_MUX.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
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
ENTITY tb_MUX IS
END tb_MUX;
ARCHITECTURE tb OF tb_MUX IS
COMPONENT MUX
PORT(
A : IN std_logic_vector(3 downto 0);
B : IN std_logic_vector(3 downto 0);
SEL : IN std_logic;
Y : OUT std_logic_vector(3 downto 0)
);
END COMPONENT;
--Inputs
signal A : std_logic_vector(3 downto 0) := (others => 'U');
signal B : std_logic_vector(3 downto 0) := (others => 'U');
signal SEL : std_logic := 'U';
--Outputs
signal Y : std_logic_vector(3 downto 0);
BEGIN
-- Instantiate the Unit Under Test (UUT)
uut: MUX PORT MAP (
A => A,
B => B,
SEL => SEL,
Y => Y
);
A <= "1100";
B <= "1010";
SEL <= '0' after 100ns,
'1' after 200ns;
END;