-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtop_tb.vhd
More file actions
52 lines (41 loc) · 954 Bytes
/
top_tb.vhd
File metadata and controls
52 lines (41 loc) · 954 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
library IEEE;
use IEEE.Std_logic_1164.all;
use IEEE.Numeric_Std.all;
entity top_tb is
end;
architecture bench of top_tb is
component top
port (
clk : in std_logic;
rst : in std_logic;
start : in std_logic;
done : out std_logic);
end component;
signal clk: std_logic := '0';
signal rst: std_logic := '0';
signal start: std_logic:= '0';
signal done: std_logic;
begin
uut: top port map ( clk => clk,
rst => rst,
start => start,
done => done );
-- full clk = 10 ns
process
begin
wait for 10 ns / 2;
clk <= (NOT clk);
end process;
process
begin
wait for 20 ns;
rst <= '1' ;
wait for 20 ns;
rst <= '0' ;
wait for 20 ns;
start <= '1' ;
wait for 40 ns;
start <= '0' ;
wait;
end process;
end architecture bench;