-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
99 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
obj_* | ||
*.swp | ||
.gdb_history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env perl | ||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } | ||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition | ||
# | ||
# Copyright 2003 by Wilson Snyder. This program is free software; you | ||
# can redistribute it and/or modify it under the terms of either the GNU | ||
# Lesser General Public License Version 3 or the Perl Artistic License | ||
# Version 2.0. | ||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 | ||
|
||
# test whether json dumps don't "crash" astsee | ||
|
||
scenarios(vlt => 1); | ||
|
||
{ | ||
my $cmd = qq{astsee_verilator -h >/dev/null 2>&1}; | ||
print "\t$cmd\n" if $::Debug; | ||
system($cmd) and do { skip("No astsee installed\n"); return 1 } | ||
} | ||
|
||
top_filename("$ENV{VERILATOR_ROOT}/test_regress/t/t_dump.v"); | ||
|
||
lint( | ||
v_flags => ["--lint-only --dump-tree-json"], | ||
); | ||
|
||
|
||
run(cmd => ["cd $Self->{obj_dir} && astsee_verilator *001*.json > astsee.log"], | ||
logfile => "$Self->{obj_dir}/astsee.log"); | ||
|
||
ok(1); | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright 2024 by Wilson Snyder. This program is free software; you | ||
# can redistribute it and/or modify it under the terms of either the GNU | ||
# Lesser General Public License Version 3 or the Perl Artistic License | ||
# Version 2.0. | ||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 | ||
|
||
watch v3Global.m_rootp | ||
run | ||
python | ||
try: gdb.execute("jtree v3Global.m_rootp") | ||
except Exception: exit(1) | ||
try: gdb.execute("jtree v3Global.m_rootp v3Global.m_rootp") | ||
except Exception: exit(1) | ||
|
||
# stash and use stashed dump | ||
try: gdb.execute("jstash v3Global.m_rootp") | ||
except Exception: exit(1) | ||
# we assume that stash will end up in $1 (we can't use gdb.history_count() since it is not available in older gdb) | ||
try: gdb.execute("jtree $1") | ||
except Exception: exit(1) | ||
try: gdb.execute("jtree $1 v3Global.m_rootp") | ||
except Exception: exit(1) | ||
end | ||
quit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env perl | ||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } | ||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition | ||
# | ||
# Copyright 2003 by Wilson Snyder. This program is free software; you | ||
# can redistribute it and/or modify it under the terms of either the GNU | ||
# Lesser General Public License Version 3 or the Perl Artistic License | ||
# Version 2.0. | ||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 | ||
|
||
# test whether jtree gdb command doesn't crash | ||
|
||
scenarios(vlt => 1); | ||
|
||
{ | ||
my $cmd = qq{astsee_verilator -h >/dev/null 2>&1}; | ||
print "\t$cmd\n" if $::Debug; | ||
system($cmd) and do { skip("No astsee installed\n"); return 1 } | ||
} | ||
|
||
setenv("VERILATOR_GDB", "gdb --return-child-result" | ||
. ($::Debug ? " --batch" : " --batch-silent --quiet") | ||
. ' -init-eval-command "set auto-load no"' | ||
. " --command $ENV{VERILATOR_ROOT}/src/.gdbinit" | ||
. " --command $Self->{t_dir}/t_gdb_jtree.gdb"); | ||
|
||
top_filename("t/t_dump.v"); | ||
|
||
lint(v_flags => ["--gdb", "--debug"]); | ||
|
||
ok(1); | ||
|
||
1; |