forked from AndrewMcClelland/RISC_Computer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMDMux_tb.vhd
More file actions
53 lines (37 loc) · 1.1 KB
/
Copy pathMDMux_tb.vhd
File metadata and controls
53 lines (37 loc) · 1.1 KB
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 MDMux_tb IS
END;
ARCHITECTURE MDMux_tb_arch OF MDMux_tb IS
SIGNAL Mdatain_tb : std_logic_vector (31 downto 0);
SIGNAL BusMuxOut_tb : std_logic_vector (31 downto 0);
SIGNAL Read_input_tb : std_logic;
SIGNAL MDMux_out_tb : std_logic_vector(31 downto 0);
COMPONENT MDMux
PORT (
Mdatain : IN std_logic_vector(31 DOWNTO 0);
BusMuxOut : IN std_logic_vector(31 DOWNTO 0);
Read_input :IN std_logic;
MDMux_out : OUT std_logic_vector(31 DOWNTO 0));
END COMPONENT MDMux;
BEGIN
DUT1 : MDMux
PORT MAP (
Mdatain => Mdatain_tb,
BusMuxOut => BusMuxOut_tb,
Read_input => Read_input_tb,
MDMux_out => MDMux_out_tb);
sim_process: process
begin
wait for 0 ns;
Read_input_tb <= '1';
BusMuxOut_tb <= b"0000_0000_0000_0000_0000_0000_0000_0001";
Mdatain_tb <= b"0000_0000_0000_0000_0000_0000_0000_0011";
wait for 30 ns;
Read_input_tb <= '0';
BusMuxOut_tb <= b"0000_0000_0000_0000_0000_0000_0000_0001";
Mdatain_tb <= b"0000_0000_0000_0000_0000_0000_0000_0011";
wait;
end process sim_process;
end;