File tree Expand file tree Collapse file tree 4 files changed +80
-2
lines changed
Expand file tree Collapse file tree 4 files changed +80
-2
lines changed Original file line number Diff line number Diff line change 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+ test .pli_filename = uvm_root + "/src/dpi/uvm_dpi.cc"
19+
20+ if not os .path .exists (uvm_root ):
21+ test .run (cmd = [
22+ "cd " + uvm_git +
23+ " && git worktree prune && git worktree add --detach " + uvm_root +
24+ " origin/uvm-2017-1.0-vlt"
25+ ])
26+
27+ ## Test
28+
29+ test .compile (verilator_flags2 = [
30+ "--binary -j 0 -Wall --dump-inputs" , #
31+ "--vpi" , #
32+ "+incdir+" + uvm_root + "/src" ,
33+ test .pli_filename ,
34+ ])
35+
36+ test .execute ()
37+
38+ test .file_grep (test .run_log_filename , r'Hello World' )
39+
40+ test .passes ()
Original file line number Diff line number Diff line change 1818if not os .path .exists (uvm_root ):
1919 test .run (cmd = [
2020 "cd " + uvm_git +
21- # " && git fetch --tags" # .gitmodules doesn't pull tags - now using branch
2221 " && git worktree prune && git worktree add --detach " + uvm_root +
2322 " origin/uvm-2017-1.0-vlt"
2423 ])
Original file line number Diff line number Diff line change 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+ test .pli_filename = uvm_root + "/src/dpi/uvm_dpi.cc"
19+
20+ if not os .path .exists (uvm_root ):
21+ test .run (cmd = [
22+ "cd " + uvm_git +
23+ " && git worktree prune && git worktree add --detach " + uvm_root +
24+ " origin/uvm-2020-3.1-vlt"
25+ ])
26+
27+ ## Test
28+
29+ test .compile (verilator_flags2 = [
30+ "--binary -j 0 -Wall --dump-inputs" , #
31+ "--vpi" , #
32+ "+incdir+" + uvm_root + "/src" ,
33+ test .pli_filename ,
34+ ])
35+
36+ test .execute ()
37+
38+ test .file_grep (test .run_log_filename , r'Hello World' )
39+
40+ test .passes ()
Original file line number Diff line number Diff line change 1818if not os .path .exists (uvm_root ):
1919 test .run (cmd = [
2020 "cd " + uvm_git +
21- # " && git fetch --tags" # .gitmodules doesn't pull tags - now using branch
2221 " && git worktree prune && git worktree add --detach " + uvm_root +
2322 " origin/uvm-2020-3.1-vlt"
2423 ])
You can’t perform that action at this time.
0 commit comments