-
Notifications
You must be signed in to change notification settings - Fork 0
/
simu_tb.vhdl
56 lines (47 loc) · 937 Bytes
/
simu_tb.vhdl
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
library ieee;
use ieee.std_logic_1164.all;
entity simu_tb is
end;
architecture rtl of simu_tb is
signal clk: std_logic;
signal dut1_a1: std_logic;
signal dut1_b1: std_logic;
signal dut1_a2: std_logic;
signal dut1_b2: std_logic;
signal dut2_a1: std_logic;
signal dut2_b1: std_logic;
signal dut2_a2: std_logic;
signal dut2_b2: std_logic;
begin
clk_pr: process
begin
clk <= '1';
wait for 5 ns;
clk <= '0';
wait for 5 ns;
end process;
dut1_a1 <= '0';
dut2_a1 <= '0';
tb_pr: process
begin
dut1_a2 <= '1';
dut2_a2 <= '1';
for i in 1 to 20 loop
wait until rising_edge(clk);
end loop;
dut2_a2 <= '0';
wait;
end process;
dut: entity work.tb_dut
port map(
clk_in => clk,
dut1_a1_in => dut1_a1,
dut1_b1_out => dut1_b1,
dut1_a2_in => dut1_a2,
dut1_b2_out => dut1_b2,
dut2_a1_in => dut2_a1,
dut2_b1_out => dut2_b1,
dut2_a2_in => dut2_a2,
dut2_b2_out => dut2_b2
);
end;