Skip to content

Commit c8e3a63

Browse files
committed
Tests: Add t_uvm_hello version-based test
1 parent b3ec32b commit c8e3a63

File tree

5 files changed

+48
-37
lines changed

5 files changed

+48
-37
lines changed

submodules/verilator

Submodule verilator updated 81 files

t/t_a_hello.v

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
// any use, without warranty, 2019 by Wilson Snyder.
66
// SPDX-License-Identifier: CC0-1.0
77

8-
module t (/*AUTOARG*/);
9-
initial begin
10-
$write("Hello World\n");
11-
$write("*-* All Finished *-*\n");
12-
$finish;
13-
end
8+
module t;
9+
initial begin
10+
$write("Hello World\n");
11+
$write("*-* All Finished *-*\n");
12+
$finish;
13+
end
1414
endmodule

t/t_uvm_parse.v renamed to t/t_uvm_hello.v

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
// verilator lint_off DECLFILENAME
1414

15-
module t (/*AUTOARG*/);
16-
initial begin
17-
$write("Hello World\n");
18-
$write("*-* All Finished *-*\n");
19-
$finish;
20-
end
15+
module t;
16+
import uvm_pkg::*;
17+
initial begin
18+
// verilator lint_off WIDTHTRUNC
19+
`uvm_info("TOP", "Hello World!", UVM_MEDIUM);
20+
end
2121
endmodule

t/t_uvm_hello_v2017_1_0.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env python3
2+
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
3+
#
4+
# Copyright 2024 by Wilson Snyder. This program is free software; you
5+
# can redistribute it and/or modify it under the terms of either the GNU
6+
# Lesser General Public License Version 3 or the Perl Artistic License
7+
# Version 2.0.
8+
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
9+
10+
import vltest_bootstrap
11+
12+
test.scenarios('vlt')
13+
test.top_filename = "t/t_uvm_hello.v"
14+
15+
uvm_git = os.path.abspath(test.t_dir + "/../submodules/uvm")
16+
uvm_root = os.path.abspath(test.obj_dir + "/uvm-worktree")
17+
18+
if not os.path.exists(uvm_root):
19+
test.run(cmd=[
20+
"cd " + uvm_git +
21+
" && git worktree prune && git worktree add --detach " + uvm_root +
22+
" 2017-1.0"
23+
])
24+
25+
test.compile(v_flags=[
26+
"--binary -j 0 -Wall", #
27+
"-Wno-EOFNEWLINE", # Temp - need to cleanup UVM repo
28+
"+incdir+" + uvm_root + "/src"
29+
])
30+
31+
test.execute()
32+
33+
test.file_grep(test.run_log_filename, r'Hello World')
34+
35+
test.passes()

t/t_uvm_parse.py

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)