-
Notifications
You must be signed in to change notification settings - Fork 0
/
tb_top.svh
executable file
·76 lines (57 loc) · 1.44 KB
/
tb_top.svh
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
`include "../src/uvm_macros.svh"
//`include "tb_test.svh"
//`include "tb_sequence.svh"
import uvm_pkg::*;
import flash_pkg::*;
`include "tb_coverage.svh"
module tbench_top;
NF_coverage coverage_inst;
// instantiation of flash interface
flash_bfm bfm();
nfcm_top nfcm(
.DIO(bfm.DIO),
.CLE(bfm.CLE),
.ALE(bfm.ALE),
.WE_n(bfm.WE_n),
.RE_n(bfm.RE_n),
.CE_n(bfm.CE_n),
.R_nB(bfm.R_nB),
.CLK(bfm.clk),
.RES(bfm.rst),
.BF_sel(bfm.BF_sel),
.BF_ad (bfm.BF_ad ),
.BF_din(bfm.BF_din),
.BF_we (bfm.BF_we ),
.RWA (bfm.RWA ),
.BF_dou(bfm.BF_dr),
.PErr(bfm.PErr),
.EErr(bfm.EErr),
.RErr(bfm.RErr),
.nfc_cmd (bfm.nfc_cmd ),
.nfc_strt(bfm.nfc_strt),
.nfc_done(bfm.nfc_done)
);
flash_interface nand_flash(
.DIO(bfm.DIO),
.CLE(bfm.CLE), // -- CLE
.ALE(bfm.ALE), // -- ALE
.WE_n(bfm.WE_n), // -- ~WE
.RE_n(bfm.RE_n), //-- ~RE
.CE_n(bfm.CE_n), //-- ~CE
.R_nB(bfm.R_nB), //-- R/~B
.rst(bfm.rst)
);
initial begin
uvm_config_db#(virtual flash_bfm)::set(uvm_root::get(), "*","vif", bfm);
$dumpfile("dump.vcd"); $dumpvars;
end // initial
initial begin
$display("inside top module not. about to run_test",);
run_test("NF_test");
end // initial
initial
begin
coverage_inst = new(bfm);
coverage_inst.execute();
end
endmodule // tbench_top