Skip to content

Commit 697dc19

Browse files
authored
Tests: Add DPI flavors of UVM (#10)
1 parent 1e0b704 commit 697dc19

File tree

2 files changed

+58
-2
lines changed

2 files changed

+58
-2
lines changed

t/t_uvm_hello_v2017_1_0_dpi.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,42 @@
1313
test.top_filename = "t/t_uvm_hello.v"
1414

1515
uvm_root = os.path.abspath(test.t_dir + "/../submodules/uvm-2017-1.0-vlt")
16-
1716
test.pli_filename = uvm_root + "/src/dpi/uvm_dpi.cc"
1817

18+
## Make uvm_pkg_all
19+
20+
e_filename = test.obj_dir + "/pp__" + test.name + "__all1.vpp"
21+
22+
test.run(
23+
cmd=[
24+
os.environ["VERILATOR_ROOT"] + "/bin/verilator",
25+
"--E --preproc-defines --no-preproc-comments ", #
26+
"+incdir+" + uvm_root + "/src",
27+
test.top_filename,
28+
"> " + e_filename,
29+
],
30+
verilator_run=True)
31+
32+
packed_filename = test.obj_dir + "/pp__" + test.name + "__all2.vpp"
33+
34+
test.run(cmd=[
35+
os.environ["VERILATOR_ROOT"] + "/nodist/uvm_pkg_packer",
36+
"--test-name " + test.name,
37+
"--uvm-header-filename " + uvm_root + "/src/uvm_pkg.sv", #
38+
"< " + e_filename,
39+
"> " + packed_filename,
40+
])
41+
42+
test.copy_if_golden(
43+
packed_filename, os.environ["VERILATOR_ROOT"] +
44+
"/test_regress/t/uvm/uvm_pkg_all_v2017_1_0_dpi.svh")
45+
1946
## Test
2047

2148
test.compile(verilator_flags2=[
2249
"--binary -j 0 -Wall --dump-inputs", #
2350
"--vpi", #
51+
"-Wno-EOFNEWLINE", # Temp - need to cleanup UVM repo
2452
"+incdir+" + uvm_root + "/src",
2553
test.pli_filename,
2654
])

t/t_uvm_hello_v2020_3_1_dpi.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,42 @@
1313
test.top_filename = "t/t_uvm_hello.v"
1414

1515
uvm_root = os.path.abspath(test.t_dir + "/../submodules/uvm-2020-3.1-vlt")
16-
1716
test.pli_filename = uvm_root + "/src/dpi/uvm_dpi.cc"
1817

18+
## Make uvm_pkg_all
19+
20+
e_filename = test.obj_dir + "/pp__" + test.name + "__all1.vpp"
21+
22+
test.run(
23+
cmd=[
24+
os.environ["VERILATOR_ROOT"] + "/bin/verilator",
25+
"--E --preproc-defines --no-preproc-comments ", #
26+
"+incdir+" + uvm_root + "/src",
27+
test.top_filename,
28+
"> " + e_filename,
29+
],
30+
verilator_run=True)
31+
32+
packed_filename = test.obj_dir + "/pp__" + test.name + "__all2.vpp"
33+
34+
test.run(cmd=[
35+
os.environ["VERILATOR_ROOT"] + "/nodist/uvm_pkg_packer",
36+
"--test-name " + test.name,
37+
"--uvm-header-filename " + uvm_root + "/src/uvm_pkg.sv", #
38+
"< " + e_filename,
39+
"> " + packed_filename,
40+
])
41+
42+
test.copy_if_golden(
43+
packed_filename, os.environ["VERILATOR_ROOT"] +
44+
"/test_regress/t/uvm/uvm_pkg_all_v2020_3_1_dpi.svh")
45+
1946
## Test
2047

2148
test.compile(verilator_flags2=[
2249
"--binary -j 0 -Wall --dump-inputs", #
2350
"--vpi", #
51+
"-Wno-EOFNEWLINE", # Temp - need to cleanup UVM repo
2452
"+incdir+" + uvm_root + "/src",
2553
test.pli_filename,
2654
])

0 commit comments

Comments
 (0)