-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestbench.vhd
More file actions
53 lines (38 loc) · 872 Bytes
/
testbench.vhd
File metadata and controls
53 lines (38 loc) · 872 Bytes
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 is
end entity;
architecture arch of testbench is
component CPU is
port (
clock : in std_logic;
reset : in std_logic
);
end component;
signal clock_i : std_logic;
signal reset_i : std_logic;
begin
dut: CPU port map (
clock => clock_i,
reset => reset_i
);
drive: process begin
reset_i <= '0';
clock_i <= '0';
wait for 10 ns;
reset_i <= '1';
clock_i <= '1';
wait for 10 ns;
reset_i <= '0';
clock_i <= '0';
wait for 10 ns;
for i in 0 to 30 loop
clock_i <= '1';
wait for 10 ns;
clock_i <= '0';
wait for 10 ns;
end loop;
wait;
end process;
end arch;