-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathsystem.tb.v
62 lines (44 loc) · 1.29 KB
/
system.tb.v
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
56
57
58
59
60
61
62
//-----------------------------------------------------------------------------
// system.tb.v
//-----------------------------------------------------------------------------
`timescale 1 ps / 100 fs
// START USER CODE (Do not remove this line)
// User: Put your directives here. Code in this
// section will not be overwritten.
// END USER CODE (Do not remove this line)
module system_tb
(
);
// START USER CODE (Do not remove this line)
// User: Put your signals here. Code in this
// section will not be overwritten.
parameter PERIOD = 10000;
// END USER CODE (Do not remove this line)
// Internal signals
reg CLK;
reg RST_N;
wire INTR;
system
dut (
.RST_N ( RST_N ),
.CLK ( CLK ),
.INTR_IN ( INTR ),
.INTR_OUT ( INTR )
);
// START USER CODE (Do not remove this line)
// User: Put your stimulus here. Code in this
// section will not be overwritten.
initial begin
RST_N = 1'b0;
@(negedge CLK);
@(negedge CLK);
@(negedge CLK);
RST_N = 1'b1;
end
always begin
CLK = 1'b0;
#(PERIOD/2) CLK = 1'b1;
#(PERIOD/2);
end
// END USER CODE (Do not remove this line)
endmodule