-
Notifications
You must be signed in to change notification settings - Fork 0
/
testbench.vhd
44 lines (37 loc) · 1.14 KB
/
testbench.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
----------------------------------------------------------
-- Testebench --
-- Max Santana --
-- Antonio Filho (2023) --
-- CEComp/Univasf --
----------------------------------------------------------
library IEEE;
use IEEE.std_logic_1164.all;
entity testbench is
end entity testbench;
architecture behavior of testbench is
signal wire_clock, wire_reset: std_logic;
constant clock_period: time := 10 ns;
begin
PROCESSOR: entity work.processor port map(
clock => wire_clock,
reset => wire_reset
);
CLOCKGENERATOR: process
begin
for i in 0 to 5 loop
wire_clock <= '0';
wait for clock_period/2;
wire_clock <= '1';
wait for clock_period/2;
end loop;
wait;
end process;
process
begin
wire_reset <= '1';
wait for 10 ns;
wire_reset <= '0';
wait for 10 ns;
wait;
end process;
end architecture behavior;