-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtestbench.sv
More file actions
54 lines (43 loc) · 1.65 KB
/
testbench.sv
File metadata and controls
54 lines (43 loc) · 1.65 KB
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
`include "interface.sv"
`include "tb_pkg.sv"
module top;
import uvm_pkg::*;
import tb_pkg::*;
bit clk; // external signal declaration
//----------------------------------------------------------------------------
intf i_intf(clk);
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
FIFO_memory DUT(.din (i_intf.din),
.read (i_intf.read),
.write(i_intf.write),
.reset(i_intf.reset),
.clk (i_intf.clk),
.dout (i_intf.dout),
.full (i_intf.full),
.empty(i_intf.empty),
.ale (i_intf.ale),
.alf (i_intf.alf)
);
//----------------------------------------------------------------------------
initial begin
clk<=0;
end
always #5 clk=~clk;
//----------------------------------------------------------------------------
initial begin
$dumpfile("dumpfile.vcd");
$dumpvars;
end
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
initial begin
uvm_config_db#(virtual intf)::set(uvm_root::get(),"","vif",i_intf);
end
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
initial begin
run_test("fifo_test");
end
//----------------------------------------------------------------------------
endmodule