tests: use verilator_flags and skip more widely

This commit is contained in:
Wilson Snyder 2011-10-12 23:03:53 -04:00
parent 86e3c78776
commit 4aa7222022
119 changed files with 395 additions and 265 deletions

View File

@ -11,7 +11,7 @@ compile (
verilator_flags2 => ["--stats"],
);
if ($Self->{v3}) {
if ($Self->{vlt}) {
file_grep ($Self->{stats}, qr/Optimizations, Split always\s+6/i);
}

View File

@ -11,7 +11,7 @@ compile (
verilator_flags2 => ["--stats"],
);
if ($Self->{v3}) {
if ($Self->{vlt}) {
file_grep ($Self->{stats}, qr/Optimizations, Split always\s+0/i);
}

View File

@ -8,7 +8,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
compile (
v_flags2 => [$Self->{v3}?'--assert':($Self->{nc}?'+assert':'')],
verilator_flags2 => ['--assert'],
nc_flags2 => ['+assert'],
);
execute (

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_assert_basic.v");
compile (
v_flags2 => [$Self->{v3}?'--assert --sp --coverage-user':''],
verilator_flags2 => ['--assert --sp --coverage-user'],
);
execute (

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_assert_cover.v");
compile (
v_flags2 => [$Self->{v3}?'--assert --sp --coverage-user':''],
verilator_flags2 => ['--assert --sp --coverage-user'],
nc_flags2 => ["+nccovoverwrite +nccoverage+all +nccovtest+$Self->{name}"]
);

View File

@ -8,7 +8,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
compile (
v_flags2 => [$Self->{v3}?'--assert':($Self->{nc}?'+assert':'')],
verilator_flags2 => ['--assert'],
nc_flags2 => ['+assert'],
);
execute (

View File

@ -10,8 +10,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_assert_synth.v");
compile (
v_flags2 => [$Self->{v3}?'--assert':($Self->{nc}?'+assert':''),
'+define+FAILING_FULL',],
v_flags2 => ['+define+FAILING_FULL'],
verilator_flags2 => ['--assert'],
nc_flags2 => ['+assert'],
);
execute (

View File

@ -10,8 +10,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_assert_synth.v");
compile (
v_flags2 => [$Self->{v3}?'--assert':($Self->{nc}?'+assert':''),
'+define+FAILING_PARALLEL',],
v_flags2 => ['+define+FAILING_PARALLEL'],
verilator_flags2 => ['--assert'],
nc_flags2 => ['+assert'],
);
execute (

View File

@ -11,7 +11,7 @@ compile (
verilator_flags2 => ["--stats --profile-cfuncs"],
);
if ($Self->{v3}) {
if ($Self->{vlt}) {
file_grep ($Self->{stats}, qr/Optimizations, Tables created\s+10/i);
file_grep ($Self->{stats}, qr/Optimizations, Combined CFuncs\s+10/i);
}

View File

@ -7,14 +7,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
make_top_shell => 0,
make_main => 0,
v_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"],
) if $Self->{v3};
v_flags2 => ["$Self->{t_dir}/$Self->{name}.cpp"],
verilator_flags2 => ["--exe"],
);
execute (
check_finished=>1,
) if $Self->{v3};
);
ok(1);
1;

View File

@ -9,14 +9,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_clk_2in.v");
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
make_top_shell => 0,
make_main => 0,
v_flags2 => ["+define+T_CLK_2IN_VEC=1 --exe $Self->{t_dir}/t_clk_2in.cpp"],
) if $Self->{v3};
v_flags2 => ["+define+T_CLK_2IN_VEC=1 $Self->{t_dir}/t_clk_2in.cpp"],
verilator_flags2 => ["--exe"],
);
execute (
check_finished=>1,
) if $Self->{v3};
);
ok(1);
1;

View File

@ -15,7 +15,7 @@ execute (
check_finished=>1,
);
if ($Self->{v3}) {
if ($Self->{vlt}) {
#Optimization is disabled
#file_grep ($Self->{stats}, qr/Optimizations, Gaters inserted\s+3/i);
}

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--debug-fatalsrc"],
verilator_flags2 => ["--debug-fatalsrc"],
fails=>$Self->{v3},
expect=>
'%Error: Internal Error: .*: --debug-fatal-src

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--debug-sigsegv"],
verilator_flags2 => ["--debug-sigsegv"],
fails=>$Self->{v3},
expect=>
'%Error: Verilator internal fault, sorry. Consider trying --debug --gdbbt

View File

@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
compile (
v_flags2 => [$Self->{v3}?'-Wno-STMTDLY':''],
verilator_flags2 => ['-Wno-STMTDLY'],
);
execute (

View File

@ -9,12 +9,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_delay.v");
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
fails=>1,
expect=>
'%Warning-STMTDLY: t/t_delay.v:\d+: Ignoring delay on this delayed statement.
.*%Error: Exiting due to.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_display.v");
compile (
v_flags2 => [$Self->{v3}?"-O0":""],
verilator_flags2 => ["-O0"],
);
execute (

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_display_real.v");
compile (
v_flags2 => [$Self->{v3}?"-O0":""],
verilator_flags2 => ["-O0"],
);
execute (

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_display_signed.v");
compile (
v_flags2 => [$Self->{v3}?"-O0":""],
verilator_flags2 => ["-O0"],
);
execute (

View File

@ -11,8 +11,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
compile (
# Amazingly VCS, NC and Verilator all just accept the C file here!
v_flags2 => ["-Wall -Wno-DECLFILENAME t/t_dpi_export_c.cpp"],
verilator_flags2 => ["-no-l2name"],
v_flags2 => ["t/t_dpi_export_c.cpp"],
verilator_flags2 => ["-Wall -Wno-DECLFILENAME -no-l2name"],
);
execute (

View File

@ -9,7 +9,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
compile (
# Amazingly VCS, NC and Verilator all just accept the C file here!
v_flags2 => ["-Wall -Wno-DECLFILENAME t/t_dpi_import_c.cpp"],
v_flags2 => ["t/t_dpi_import_c.cpp"],
verilator_flags2 => ["-Wall -Wno-DECLFILENAME"],
);
execute (

View File

@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
compile (
v_flags2 => [$Self->{v3}?'--Ox':''],
verilator_flags2 => ['--Ox'],
);
execute (

View File

@ -7,6 +7,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only"],
fails=>$Self->{v3},
@ -14,7 +16,7 @@ compile (
'%Error: t/t_enum_overlap_bad.v:\d+: Overlapping enumeration value: e1b
%Error: t/t_enum_overlap_bad.v:\d+: ... Location of original declaration
%Error: Exiting due to',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,14 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
if ($Self->{v3}) {
compile (
make_flags => "CPPFLAGS_ADD=-I$Self->{t_dir}",
);
execute (
check_finished=>1,
);
}
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
make_flags => "CPPFLAGS_ADD=-I$Self->{t_dir}",
);
execute (
check_finished=>1,
);
ok(1);
1;

View File

@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--bbox-sys"],
) if $Self->{v3};
verilator_flags2 => ["--bbox-sys"],
);
execute (
check_finished=>1,
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only"],
fails=>$Self->{v3},
expect=>
'%Error: No top level module found
%Error: Exiting due to',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
if ($Self->{v3}) {
$Self->{vlt} or $Self->skip("Verilator only test");
{
compile ();
my $outfile = "$Self->{obj_dir}/V".$Self->{name}.".cpp";

View File

@ -7,6 +7,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--top-module a "],
fails=>$Self->{v3},
@ -14,7 +16,7 @@ compile (
expect=>
'%Error: Specified --top-module \'a\' isn.t at the top level, it.s under another cell.
%Error: Exiting due to.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--top-module b "],
) if $Self->{v3};
);
execute (
check_finished=>1,
) if $Self->{v3};
);
ok(1);
1;

View File

@ -9,6 +9,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_flag_topmodule.v");
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
fails=>$Self->{v3},
nc=>0, # Need to get it not to give the prompt
@ -16,7 +18,7 @@ compile (
'%Error-MULTITOP: t/t_flag_topmodule.v:\d+: Unsupported: Multiple top level modules: .*
%Error-MULTITOP: t/t_flag_topmodule.v:\d+: Fix, or use --top-module option to select which you want.
%Error: Exiting due to.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -9,6 +9,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_flag_topmodule.v");
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
fails=>$Self->{v3},
v_flags2 => ["--top-module notfound"],
@ -16,7 +18,7 @@ compile (
expect=>
'%Error: Specified --top-module \'notfound\' was not found in design.
%Error: Exiting due to.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--top-module b"],
) if $Self->{v3};
);
execute (
check_finished=>1,
) if $Self->{v3};
);
ok(1);
1;

View File

@ -9,6 +9,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_flag_werror.v");
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only"],
fails=>$Self->{v3},
@ -16,7 +18,7 @@ compile (
q{%Warning-WIDTH: t/t_flag_werror.v:\d+: Operator ASSIGNW expects 4 bits on the Assign RHS, but Assign RHS.s CONST '6'h2e' generates 6 bits.
%Warning-WIDTH: Use .* and lint_on around source to disable this message.
%Error: Exiting due to},
) if $Self->{v3};
);
ok(1);
1;

View File

@ -9,6 +9,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_flag_wfatal.v");
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only -Wno-fatal"],
fails=>0,
@ -19,7 +21,7 @@ compile (
q{%Warning-WIDTH: t/t_flag_wfatal.v:\d+: Operator ASSIGNW expects 4 bits on the Assign RHS, but Assign RHS.s CONST '6'h2e' generates 6 bits.
%Warning-WIDTH: Use .* and lint_on around source to disable this message.
},
) if $Self->{v3};
);
ok(1);
1;

View File

@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
compile (
v_flags2 => [$Self->{v3}?'+define+VERILATOR_PUBLIC_TASKS':''],
verilator_flags2 => ['+define+VERILATOR_PUBLIC_TASKS'],
fails => $fail,
);

View File

@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
make_top_shell => 0,
make_main => 0,
v_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"],
) if $Self->{v3};
verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"],
);
execute (
check_finished=>1,
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,8 +7,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,8 +7,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
) if $Self->{v3};
);
ok(1);
1;

View File

@ -13,7 +13,7 @@ compile (
verilator_flags2 => ['+define+NOUSE_INLINE', '+define+USE_PUBLIC', '--stats'],
);
if ($Self->{v3}) {
if ($Self->{vlt}) {
file_grep ($Self->{stats}, qr/Optimizations, Combined CFuncs\s+16/i);
}

View File

@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
make_top_shell => 0,
make_main => 0,
v_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"],
) if $Self->{v3};
verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"],
);
execute (
check_finished=>1,
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,6 +7,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only -Wwarn-BLKSEQ -Wwarn-COMBDLY"],
fails=>1,
@ -20,7 +22,7 @@ compile (
%Warning-COMBDLY: \*\*\* See the manual before disabling this,
%Warning-COMBDLY: else you may end up with different sim results.
%Error: Exiting due to.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only -Wwarn-BLKSEQ -Wwarn-COMBDLY"],
verilator_flags2 => ["--lint-only -Wwarn-BLKSEQ -Wwarn-COMBDLY"],
fails=>0,
verilator_make_gcc => 0,
make_top_shell => 0,
make_main => 0,
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only"],
verilator_make_gcc => 0,
make_top_shell => 0,
make_main => 0,
) if $Self->{v3};
);
ok(1);
1;

View File

@ -9,6 +9,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_lint_declfilename.v");
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only -Wall"],
fails=>1,
@ -19,7 +21,7 @@ compile (
'%Warning-DECLFILENAME: t/t_lint_declfilename.v:6: Filename \'t_lint_declfilename\' does not match MODULE name: t
%Warning-DECLFILENAME: Use .* to disable this message.
%Error: Exiting due to.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only"],
verilator_make_gcc => 0,
make_top_shell => 0,
make_main => 0,
) if $Self->{v3};
);
ok(1);
1;

View File

@ -9,6 +9,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_lint_defparam.v");
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only -Wwarn-style -Wno-DECLFILENAME"],
fails=>1,
@ -19,7 +21,7 @@ compile (
'%Warning-DEFPARAM: t/t_lint_defparam.v:\d+: Suggest replace defparam with Verilog 2001 #\(.P\(...etc...\)\)
%Warning-DEFPARAM: Use .* to disable this message.
%Error: Exiting due to.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,6 +7,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only -Wall -Wno-DECLFILENAME --if-depth 10"],
fails=>1,
@ -17,7 +19,7 @@ compile (
'%Warning-IFDEPTH: t/t_lint_ifdepth_bad.v:\d+: Deep \'if\' statement; suggest unique/priority to avoid slow logic
%Warning-IFDEPTH: Use .* to disable this message.
%Error: Exiting due to.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,9 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["-Wno-IMPLICIT"],
) if $Self->{v3};
verilator_flags2 => ["-Wno-IMPLICIT"],
);
ok(1);
1;

View File

@ -9,6 +9,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_lint_implicit.v");
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only -Wwarn-IMPLICIT"],
fails=>1,
@ -19,7 +21,7 @@ compile (
%Warning-IMPLICIT: t/t_lint_implicit.v:\d+: Signal definition not found, creating implicitly: dummy1
%Warning-IMPLICIT: t/t_lint_implicit.v:\d+: Signal definition not found, creating implicitly: dummy2
%Error: Exiting due to.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only -Wall -Wno-DECLFILENAME"],
verilator_flags2 => ["--lint-only -Wall -Wno-DECLFILENAME"],
fails=>1,
expect=>
'%Warning-IMPLICIT: t/t_lint_implicit_def_bad.v:\d+: Signal definition not found, creating implicitly: imp_warn
%Warning-IMPLICIT: Use "/\* verilator lint_off IMPLICIT \*/" and lint_on around source to disable this message.
%Error: t/t_lint_implicit_def_bad.v:\d+: Signal definition not found, and implicit disabled with `default_nettype: imp_err
%Error: Exiting due to.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only"],
verilator_flags2 => ["--lint-only"],
verilator_make_gcc => 0,
make_top_shell => 0,
make_main => 0,
) if $Self->{v3};
);
ok(1);
1;

View File

@ -9,6 +9,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_lint_incabspath.v");
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only -Wall -Wno-DECLFILENAME"],
fails=>1,
@ -19,7 +21,7 @@ compile (
'%Warning-INCABSPATH: t/t_lint_incabspath.v:\d+: Suggest `include with absolute path be made relative, and use \+include: /dev/null
%Warning-INCABSPATH: Use .* to disable this message.
%Error: Exiting due to.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,10 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
make_top_shell => 0,
make_main => 0,
v_flags2 => ["--lint-only -Wwarn-UNUSED"],
verilator_flags2 => ["--lint-only -Wwarn-UNUSED"],
verilator_make_gcc => 0,
fails=>1,
expect=>
@ -18,7 +20,7 @@ compile (
%Warning-UNUSED: Use .* to disable this message.
%Warning-UNUSED: t/t_lint_once_bad.v:\d+: Signal is not driven, nor used: unus2
%Error: Exiting due to.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
make_top_shell => 0,
make_main => 0,
v_flags2 => ["--lint-only"],
verilator_make_gcc => 0,
) if $Self->{v3};
);
foreach my $file (glob("$Self->{obj_dir}/*t_lint_only*")) {
next if $file =~ /simx_compile.log/; # Made by driver.pl, not Verilator

View File

@ -7,6 +7,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only"],
fails=>1,
@ -22,7 +24,7 @@ compile (
%Error: t/t_lint_pindup_bad.v:\d+: Duplicate pin connection: P
%Error: t/t_lint_pindup_bad.v:\d+: ... Location of original pin connection
%Error: Exiting due to.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,6 +7,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
make_top_shell => 0,
make_main => 0,
@ -17,7 +19,7 @@ compile (
'%Warning-REALCVT: t/t_lint_realcvt_bad.v:\d+: Implicit conversion of real to integer
%Warning-REALCVT: Use .* to disable this message.
%Error: Exiting due to.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,6 +7,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only"],
fails=>1,
@ -14,7 +16,7 @@ compile (
q{.*%Warning-WIDTH: t/t_lint_restore_bad.v:\d+: Operator ASSIGN expects 5 bits on the Assign RHS, but Assign RHS's CONST '64'h1' generates 64 bits.
%Warning-WIDTH: Use .*
%Error: Exiting due to.*},
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,6 +7,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only"],
fails=>1,
@ -16,7 +18,7 @@ compile (
expect=>
'%Error: t/t_lint_setout_bad.v:\d+: Output port is connected to a constant pin, electrical short
.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -9,6 +9,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_lint_setout_bad.v");
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only -Oi"],
fails=>1,
@ -18,7 +20,7 @@ compile (
expect=>
'%Error: t/t_lint_setout_bad.v:\d+: Output port is connected to a constant pin, electrical short
.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,6 +7,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only -Wall -Wno-DECLFILENAME --if-depth 10"],
fails=>1,
@ -19,7 +21,7 @@ compile (
%Warning-SYNCASYNCNET: t/t_lint_syncasyncnet_bad.v:\d+: ... Location of async usage
%Warning-SYNCASYNCNET: t/t_lint_syncasyncnet_bad.v:\d+: ... Location of sync usage
%Error: Exiting due to.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,6 +7,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only --bbox-sys -Wall -Wno-DECLFILENAME"],
fails=>1,
@ -22,7 +24,7 @@ compile (
%Warning-UNUSED: t/t_lint_unused_bad.v:\d+: Bits of signal are not used: mixed\[2\]
%Warning-UNDRIVEN: t/t_lint_unused_bad.v:\d+: Bits of signal are not driven: mixed\[1\]
%Error: Exiting due to.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only"],
make_top_shell => 0,
make_main => 0,
verilator_make_gcc => 0,
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,6 +7,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only"],
fails=>1,
@ -14,7 +16,7 @@ compile (
q{.*%Warning-WIDTH: t/t_lint_width_bad.v:\d+: Operator ASSIGNW expects 5 bits on the Assign RHS, but Assign RHS's VARREF 'in' generates 4 bits.
%Warning-WIDTH: Use .*
%Error: Exiting due to.*},
) if $Self->{v3};
);
ok(1);
1;

View File

@ -12,7 +12,7 @@ $Self->skip("Verilator only test") if !$Self->{vlt};
compile (
make_top_shell => 0,
make_main => 0,
v_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"],
verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"],
);
execute (

View File

@ -7,8 +7,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
) if $Self->{v3};
);
execute (
check_finished=>1,
@ -16,7 +18,7 @@ execute (
expect=>
'\*-\* All Finished \*-\*
Goodbye world, at cycle \d+.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_mem_multidim.v");
compile (
v_flags2 => [$Self->{v3}?'--Ox':''],
verilator_flags2 => ['--Ox'],
);
execute (

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_mem_multidim.v");
compile (
v_flags2 => [$Self->{v3}?'--sp --trace':''],
verilator_flags2 => ['--sp --trace'],
);
execute (

View File

@ -7,6 +7,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
verilator_flags2 => ["--lint-only"],
fails=>1,
@ -16,7 +18,7 @@ compile (
%Error: t/t_mem_packed_bad.v:\d+: Unsupported: Assignment between packed arrays of different dimensions
%Error: t/t_mem_packed_bad.v:\d+: Unsupported: Assignment between packed arrays of different dimensions
%Error: Exiting due to.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -11,7 +11,7 @@ compile (
verilator_flags2 => ["--stats"],
);
if ($Self->{v3}) {
if ($Self->{vlt}) {
file_grep ($Self->{stats}, qr/Optimizations, Delayed shared-sets\s+14/i);
}

View File

@ -7,6 +7,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only"],
fails=>1,
@ -19,7 +21,7 @@ compile (
%Error: t/t_mem_slice_bad.v:\d+: Slices of arrays in assignments must have the same unpacked dimensions
%Error: t/t_mem_slice_bad.v:\d+: Slices of arrays in assignments must have the same unpacked dimensions
%Error: Exiting due to.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,10 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only"],
fails=>1,
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,14 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
make_top_shell => 0,
make_main => 0,
v_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"],
) if $Self->{v3};
verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"],
);
execute (
check_finished=>1,
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,6 +7,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only"],
fails=>1,
@ -16,7 +18,7 @@ compile (
expect=>
'%Error: t/t_param_circ_bad.v:\d+: Variable\'s initial value is circular: X
%Error: Exiting due to.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,22 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->skip("Verilator only test") if !$Self->{vlt};
top_filename("t/t_pipe_filter.v");
if (!$Self->{v3}) {
ok(1);
} else {
compile (
v_flags2 => ['-E --pipe-filter \'perl t/t_pipe_exit_bad.pf\' '],
verilator_make_gcc=>0,
stdout_filename => $stdout_filename,
fails=>1,
expect=>
compile (
verilator_flags2 => ['-E --pipe-filter \'perl t/t_pipe_exit_bad.pf\' '],
verilator_make_gcc=>0,
stdout_filename => $stdout_filename,
fails=>1,
expect=>
'%Error: t_pipe_exit_bad.pf: Intentional bad exit status...
%Error: File not found: t/t_pipe_filter.v
%Error: Exiting due to.*',
);
ok(1);
}
);
ok(1);
1;

View File

@ -7,18 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->skip("Verilator only test") if !$Self->{vlt};
$Self->{golden_out} ||= "t/$Self->{name}.out";
my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp";
if (!$Self->{v3}) {
ok(1);
} else {
compile (
v_flags2 => ['-E --pipe-filter \'perl t/t_pipe_filter.pf\' '],
verilator_make_gcc=>0,
stdout_filename => $stdout_filename,
);
ok(files_identical($stdout_filename, $Self->{golden_out}));
}
compile (
verilator_flags2 => ['-E --pipe-filter \'perl t/t_pipe_filter.pf\' '],
verilator_make_gcc=>0,
stdout_filename => $stdout_filename,
);
ok(files_identical($stdout_filename, $Self->{golden_out}));
1;

View File

@ -7,9 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["-Wno-REDEFMACRO"],
) if $Self->{v3};
verilator_flags2 => ["-Wno-REDEFMACRO"],
);
ok(1);
1;

View File

@ -9,6 +9,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_pp_dupdef.v");
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only"],
fails=>1,
@ -19,7 +21,7 @@ compile (
%Warning-REDEFMACRO: t/t_pp_dupdef.v:\d+: Redefining existing define: DUPP, with different value: .*
%Warning-REDEFMACRO: t/t_pp_dupdef.v:\d+: Previous definition is here, with value: .*
%Error: Exiting due to.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
v_flags2 => ["--lint-only"],
fails=>1,
expect=>
'%Error: t/t_pp_misdef_bad.v:\d+: Define or directive not defined: `NOTDEF
%Error: Exiting due to.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,20 +7,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
$Self->{golden_out} ||= "t/$Self->{name}.out";
my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp";
if (!$Self->{v3}) {
ok(1);
} else {
compile (
v_flags2 => ['-DDEF_A0 -DPREDEF_COMMAND_LINE -E'],
verilator_make_gcc=>0,
stdout_filename => $stdout_filename,
);
ok(preproc_check($Self->{top_filename}, $stdout_filename)
&& files_identical($stdout_filename, $Self->{golden_out}));
}
compile (
verilator_flags2 => ['-DDEF_A0 -DPREDEF_COMMAND_LINE -E'],
verilator_make_gcc=>0,
stdout_filename => $stdout_filename,
);
ok(preproc_check($Self->{top_filename}, $stdout_filename)
&& files_identical($stdout_filename, $Self->{golden_out}));
sub preproc_check {
my $filename1 = shift;

View File

@ -7,17 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp";
if (!$Self->{v3}) {
ok(1);
} else {
compile (
v_flags2 => ['-E'],
verilator_make_gcc=>0,
stdout_filename => $stdout_filename,
);
ok(files_identical($stdout_filename, "t/$Self->{name}.out"));
}
compile (
verilator_flags2 => ['-E'],
verilator_make_gcc=>0,
stdout_filename => $stdout_filename,
);
ok(files_identical($stdout_filename, "t/$Self->{name}.out"));
1;

View File

@ -7,19 +7,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp";
top_filename("t/t_preproc_psl.v");
if (!$Self->{v3}) {
ok(1);
} else {
compile (
v_flags2 => ['-E'],
verilator_make_gcc=>0,
stdout_filename => $stdout_filename,
);
ok(files_identical($stdout_filename, "t/$Self->{name}.out"));
}
compile (
verilator_flags2 => ['-E'],
verilator_make_gcc=>0,
stdout_filename => $stdout_filename,
);
ok(files_identical($stdout_filename, "t/$Self->{name}.out"));
1;

View File

@ -7,19 +7,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp";
top_filename("t/t_preproc_psl.v");
if (!$Self->{v3}) {
ok(1);
} else {
compile (
v_flags2 => ['-psl -E'],
verilator_make_gcc=>0,
stdout_filename => $stdout_filename,
);
ok(files_identical($stdout_filename, "t/$Self->{name}.out"));
}
compile (
verilator_flags2 => ['-psl -E'],
verilator_make_gcc=>0,
stdout_filename => $stdout_filename,
);
ok(files_identical($stdout_filename, "t/$Self->{name}.out"));
1;

View File

@ -8,8 +8,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
compile (
v_flags2 => ['+define+PREDEF_COMMAND_LINE',
"--lint-only"],
v_flags2 => ['+define+PREDEF_COMMAND_LINE'],
verilator_flags2 => ["--lint-only"],
verilator_make_gcc => 0,
make_top_shell => 0,
make_main => 0,

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_psl_basic.v");
compile (
v_flags2 => [$Self->{v3}?'--psl --sp --coverage-user':''],
verilator_flags2 => ['--psl --sp --coverage-user'],
);
execute (

View File

@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
fails=>1,
expect=>
'%Warning-LITENDIAN: t/t_select_bad_msb.v:\d+: Little bit endian vector: MSB < LSB of bit range: 0:22
.*
%Error: Exiting due to.*',
) if $Self->{v3};
);
ok(1);
1;

View File

@ -10,9 +10,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
unlink("$Self->{obj_dir}/t_sys_file_basic_test.log");
compile (
v_flags2 => ['+incdir+../include',
# Build without cached objects, see bug363
"--exe ../$Self->{main_filename}"],
v_flags2 => ['+incdir+../include'],
# Build without cached objects, see bug363
verilator_flags2 => ["--exe ../$Self->{main_filename}"],
make_flags=>'MAKE_MAIN=0 VM_PARALLEL_BUILDS=0',
);

View File

@ -10,14 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_trace_ena.v");
compile (
v_flags2 => [$Self->{v3}?'-trace':''],
verilator_flags2 => ['-trace'],
);
execute (
check_finished=>1,
);
if ($Self->{v3}) {
if ($Self->{vlt}) {
file_grep ("$Self->{obj_dir}/V$Self->{name}__Trace__Slow.cpp", qr/c_trace_on\"/x);
file_grep_not ("$Self->{obj_dir}/V$Self->{name}__Trace__Slow.cpp", qr/_trace_off\"/x);
file_grep ("$Self->{obj_dir}/simx.vcd", qr/\$enddefinitions/x);

View File

@ -10,14 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_trace_ena.v");
compile (
v_flags2 => [$Self->{v3}?'-trace -sc':''],
verilator_flags2 => ['-trace -sc'],
);
execute (
check_finished=>1,
);
if ($Self->{v3}) {
if ($Self->{vlt}) {
# Note more checks in _cc.pl
file_grep ("$Self->{obj_dir}/simx.vcd", qr/\$enddefinitions/x);
}

View File

@ -10,14 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_trace_ena.v");
compile (
v_flags2 => [$Self->{v3}?'-trace -sp':''],
verilator_flags2 => ['-trace -sp'],
);
execute (
check_finished=>1,
);
if ($Self->{v3}) {
if ($Self->{vlt}) {
# Note more checks in _cc.pl
file_grep ("$Self->{obj_dir}/simx.vcd", qr/\$enddefinitions/x);
}

View File

@ -10,14 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_trace_ena.v");
compile (
v_flags2 => [$Self->{v3}?'-notrace':''],
verilator_flags2 => ['-notrace'],
);
execute (
check_finished=>1,
);
if ($Self->{v3}) {
if ($Self->{vlt}) {
!-r "$Self->{obj_dir}/simx.vcd" or $Self->error("Tracing should be off\n");
}

View File

@ -10,14 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_trace_ena.v");
compile (
v_flags2 => [$Self->{v3}?'-notrace -sc':''],
verilator_flags2 => ['-notrace -sc'],
);
execute (
check_finished=>1,
);
if ($Self->{v3}) {
if ($Self->{vlt}) {
!-r "$Self->{obj_dir}/simx.vcd" or $Self->error("Tracing should be off\n");
}

View File

@ -10,14 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_trace_ena.v");
compile (
v_flags2 => [$Self->{v3}?'-notrace -sp':''],
verilator_flags2 => ['-notrace -sp'],
);
execute (
check_finished=>1,
);
if ($Self->{v3}) {
if ($Self->{vlt}) {
!-r "$Self->{obj_dir}/simx.vcd" or $Self->error("Tracing should be off\n");
}

View File

@ -9,20 +9,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_trace_public.v");
if ($Self->{v3}) {
compile (
make_top_shell => 0,
make_main => 0,
v_flags2 => ["-DPUB_FUNC --trace --exe $Self->{t_dir}/$Self->{name}.cpp"],
);
$Self->{vlt} or $Self->skip("Verilator only test");
execute (
check_finished=>1,
);
compile (
make_top_shell => 0,
make_main => 0,
v_flags2 => ["-DPUB_FUNC --trace --exe $Self->{t_dir}/$Self->{name}.cpp"],
);
vcd_identical ("$Self->{obj_dir}/simx.vcd",
"t/t_trace_public.out");
}
execute (
check_finished=>1,
);
vcd_identical ("$Self->{obj_dir}/simx.vcd",
"t/t_trace_public.out");
ok(1);
1;

View File

@ -9,21 +9,23 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_trace_public.v");
if ($Self->{v3}) {
compile (
make_top_shell => 0,
make_main => 0,
v_flags2 => ["--trace --exe $Self->{t_dir}/$Self->{name}.cpp"],
);
$Self->{vlt} or $Self->skip("Verilator only test");
execute (
check_finished=>1,
);
compile (
make_top_shell => 0,
make_main => 0,
v_flags2 => ["--trace --exe $Self->{t_dir}/$Self->{name}.cpp"],
);
execute (
check_finished=>1,
);
vcd_identical ("$Self->{obj_dir}/simx.vcd",
"t/t_trace_public.out");
# vcd_identical doesn't detect "$var a.b;" vs "$scope module a; $var b;"
file_grep ("$Self->{obj_dir}/simx.vcd", qr/module glbl/i);
vcd_identical ("$Self->{obj_dir}/simx.vcd",
"t/t_trace_public.out");
# vcd_identical doesn't detect "$var a.b;" vs "$scope module a; $var b;"
file_grep ("$Self->{obj_dir}/simx.vcd", qr/module glbl/i);
}
ok(1);
1;

View File

@ -9,17 +9,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_tri_gate.v");
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
make_top_shell => 0,
make_main => 0,
v_flags2 => ['+define+T_BUFIF0',],
make_flags => 'CPPFLAGS_ADD=-DT_BUFIF0',
verilator_flags2 => ["--exe $Self->{t_dir}/t_tri_gate.cpp"],
) if $Self->{v3};
);
execute (
check_finished=>1,
) if $Self->{v3};
);
ok(1);
1;

View File

@ -9,17 +9,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_tri_gate.v");
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
make_top_shell => 0,
make_main => 0,
v_flags2 => ['+define+T_BUFIF1',],
make_flags => 'CPPFLAGS_ADD=-DT_BUFIF1',
verilator_flags2 => ["--exe $Self->{t_dir}/t_tri_gate.cpp"],
) if $Self->{v3};
);
execute (
check_finished=>1,
) if $Self->{v3};
);
ok(1);
1;

View File

@ -9,17 +9,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_tri_gate.v");
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
make_top_shell => 0,
make_main => 0,
v_flags2 => ['+define+T_COND',],
make_flags => 'CPPFLAGS_ADD=-DT_COND',
verilator_flags2 => ["--exe $Self->{t_dir}/t_tri_gate.cpp"],
) if $Self->{v3};
);
execute (
check_finished=>1,
) if $Self->{v3};
);
ok(1);
1;

View File

@ -9,17 +9,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_tri_gate.v");
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
make_top_shell => 0,
make_main => 0,
v_flags2 => ['+define+T_NOTIF0',],
make_flags => 'CPPFLAGS_ADD=-DT_NOTIF0',
verilator_flags2 => ["--exe $Self->{t_dir}/t_tri_gate.cpp"],
) if $Self->{v3};
);
execute (
check_finished=>1,
) if $Self->{v3};
);
ok(1);
1;

View File

@ -9,17 +9,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
top_filename("t/t_tri_gate.v");
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
make_top_shell => 0,
make_main => 0,
v_flags2 => ['+define+T_NOTIF1',],
make_flags => 'CPPFLAGS_ADD=-DT_NOTIF1',
verilator_flags2 => ["--exe $Self->{t_dir}/t_tri_gate.cpp"],
) if $Self->{v3};
);
execute (
check_finished=>1,
) if $Self->{v3};
);
ok(1);
1;

View File

@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} or $Self->skip("Verilator only test");
compile (
make_top_shell => 0,
make_main => 0,
v_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"],
) if $Self->{v3};
verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"],
);
execute (
check_finished=>1,
) if $Self->{v3};
);
ok(1);
1;

Some files were not shown because too many files have changed in this diff Show More