-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTb_Top.sv
49 lines (39 loc) · 1.13 KB
/
Tb_Top.sv
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
`include "interface.sv"
//-------------------------[NOTE]---------------------------------
//Particular testcase can be run by uncommenting, and commenting the rest
`include "random_test.sv"
//`include "directed_test.sv"
//----------------------------------------------------------------
module tbench_top;
//clock and reset signal declaration
bit clk;
bit resetn;
//clock generation
always #5 clk = ~clk;
//reset Generation
initial begin
resetn = 0;
#5 resetn =1;
end
//creatinng instance of interface, inorder to connect DUT and testcase
intf i_intf(clk,resetn);
//Testcase instance, interface handle is passed to test as an argument
test t1(i_intf);
//DUT instance, interface signals are connected to the DUT ports
Arbiter DUT (
.clk(i_intf.clk),
.resetn(i_intf.resetn),
.Rqst0(i_intf.Rqst0),
.Rqst1(i_intf.Rqst1),
.Rqst2(i_intf.Rqst2),
.Rqst3(i_intf.Rqst3),
.Grant0(i_intf.Grant0),
.Grant1(i_intf.Grant1),
.Grant2(i_intf.Grant2),
.Grant3(i_intf.Grant3)
);
//enabling the wave dump
initial begin
$dumpfile("dump.vcd"); $dumpvars;
end
endmodule