diff --git a/test_regress/driver.pl b/test_regress/driver.pl index 2d5e5622a..549f3fd08 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -771,8 +771,9 @@ sub compile { $self->_run(logfile=>"$self->{obj_dir}/vlt_compile.log", fails=>$param{fails}, - expect=>$param{expect}, - cmd=>\@cmdargs) if $::Opt_Verilation; + expect=>$param{expect}, + expect_filename=>$param{expect_filename}, + cmd=>\@cmdargs) if $::Opt_Verilation; return 1 if $self->errors || $self->skips || $self->unsupporteds; if (!$param{fails} && $param{verilator_make_gcc}) { @@ -826,8 +827,9 @@ sub execute { @{$param{all_run_flags}}, ], %param, - expect=>$param{atsim_run_expect}, # non-verilator expect isn't the same - ); + expect=>$param{atsim_run_expect}, # non-verilator expect isn't the same + expect_filename=>$param{atsim_run_expect_filename}, + ); } elsif ($param{ghdl}) { $self->_run(logfile=>"$self->{obj_dir}/ghdl_sim.log", @@ -837,8 +839,9 @@ sub execute { @{$param{all_run_flags}}, ], %param, - expect=>$param{ghdl_run_expect}, # non-verilator expect isn't the same - ); + expect=>$param{ghdl_run_expect}, # non-verilator expect isn't the same + expect_filename=>$param{ghdl_run_expect_filename}, + ); } elsif ($param{iv}) { my @cmd = ($run_env."$self->{obj_dir}/simiv", @@ -852,8 +855,9 @@ sub execute { fails=>$param{fails}, cmd=> \@cmd, %param, - expect=>$param{iv_run_expect}, # non-verilator expect isn't the same - ); + expect=>$param{iv_run_expect}, # non-verilator expect isn't the same + expect_filename=>$param{iv_run_expect_filename}, + ); } elsif ($param{ms}) { $self->_run(logfile=>"$self->{obj_dir}/ms_sim.log", @@ -864,8 +868,9 @@ sub execute { (" top") ], %param, - expect=>$param{ms_run_expect}, # non-verilator expect isn't the same - ); + expect=>$param{ms_run_expect}, # non-verilator expect isn't the same + expect_filename=>$param{ms_expect_filename}, + ); } elsif ($param{nc}) { $self->_run(logfile=>"$self->{obj_dir}/nc_sim.log", @@ -875,8 +880,9 @@ sub execute { @{$param{all_run_flags}}, ], %param, - expect=>$param{nc_run_expect}, # non-verilator expect isn't the same - ); + expect=>$param{nc_run_expect}, # non-verilator expect isn't the same + expect_filename=>$param{nc_run_expect_filename}, + ); } elsif ($param{vcs}) { #my $fh = IO::File->new(">simv.key") or die "%Error: $! simv.key,"; @@ -887,8 +893,9 @@ sub execute { @{$param{all_run_flags}}, ], %param, - expect=>$param{vcs_run_expect}, # non-verilator expect isn't the same - ); + expect=>$param{vcs_run_expect}, # non-verilator expect isn't the same + expect_filename=>$param{vcs_run_expect_filename}, + ); } elsif ($param{vlt_all} #&& (!$param{needs_v4} || -r "$ENV{VERILATOR_ROOT}/src/V3Gate.cpp") @@ -903,8 +910,9 @@ sub execute { ($opt_gdbsim ? "'" : ""), ], %param, - expect=>$param{expect}, # backward compatible name - ); + expect=>$param{expect}, # backward compatible name + expect_filename=>$param{expect_filename}, # backward compatible name + ); } else { $self->error("No execute step for this simulator"); @@ -1148,6 +1156,9 @@ sub _run { last; } } + if ($param{expect_filename}) { + files_identical($param{logfile}, $param{expect_filename}, 'logfile'); + } } ####################################################################### @@ -1548,29 +1559,64 @@ sub files_identical { my $self = (ref $_[0]? shift : $Self); my $fn1 = shift; my $fn2 = shift; - my $f1 = IO::File->new("<$fn1"); - my $f2 = IO::File->new("<$fn2"); - if (!$f1) { $self->error("Files_identical file does not exist $fn1\n"); return 0; } - if (!$f2) { $self->error("Files_identical file does not exist $fn2\n"); return 0; } - my @l1 = $f1->getlines(); - my @l2 = $f2->getlines(); - my $nl = $#l1; $nl = $#l2 if ($#l2 > $nl); - for (my $l=0; $l<=$nl; $l++) { - if (($l1[$l]||"") ne ($l2[$l]||"")) { - $self->error("Line ".($l+1)." mismatches; $fn1 != $fn2"); - warn("F1: ".($l1[$l]||"*EOF*\n") - ."F2: ".($l2[$l]||"*EOF*\n")); - if ($ENV{HARNESS_UPDATE_GOLDEN}) { # Update golden files with current - warn "%Warning: HARNESS_UPDATE_GOLDEN set: cp $fn1 $fn2\n"; - eval "use File::Copy;"; - File::Copy::copy($fn1,$fn2); - } else { - warn "To update reference: HARNESS_UPDATE_GOLDEN=1 {command} or --golden\n"; - } - return 0; - } + my $fn1_is_logfile = shift; + + my $tries = $self->tries; + try: + for (my $try=$tries-1; $try>=0; $try--) { + sleep 1 if ($try!=$tries-1); + my $moretry = $try!=0; + + my $f1 = IO::File->new("<$fn1"); + my $f2 = IO::File->new("<$fn2"); + if (!$f1) { + next try if $moretry; + $self->error("Files_identical file does not exist $fn1\n"); + return 0; + } + if (!$f2 && !$ENV{HARNESS_UPDATE_GOLDEN}) { + next try if $moretry; + $self->error("Files_identical file does not exist $fn2\n"); + return 0; + } + my @l1 = $f1 && $f1->getlines(); + my @l2 = $f2 && $f2->getlines(); + if ($fn1_is_logfile) { + @l1 = grep { + !/^- [^\n]+\n/ + && !/^- [a-z.0-9]+:\d+:[^\n]+\n/ + && !/^-node:/ + && !/^dot [^\n]+\n/ + } @l1; + for (my $l=0; $l<=$#l1; ++$l) { + # Don't put control chars into our source repository + $l1[$l] =~ s/\r/<#013>/mig; + $l1[$l] =~ s/Command Failed[^\n]+/Command Failed/mig; + if ($l1[$l] =~ s/Exiting due to.*/Exiting due to/mig) { + splice @l1, $l+1; # Trunc rest + last; + } + } + } + my $nl = $#l1; $nl = $#l2 if ($#l2 > $nl); + for (my $l=0; $l<=$nl; ++$l) { + if (($l1[$l]||"") ne ($l2[$l]||"")) { + next try if $moretry; + $self->error("Line ".($l+1)." mismatches; $fn1 != $fn2"); + warn("F1: ".($l1[$l]||"*EOF*\n") + ."F2: ".($l2[$l]||"*EOF*\n")); + if ($ENV{HARNESS_UPDATE_GOLDEN}) { # Update golden files with current + warn "%Warning: HARNESS_UPDATE_GOLDEN set: cp $fn1 $fn2\n"; + my $fhw = IO::File->new(">$fn2") or $self->error("Files_identical $! $fn2\n"); + $fhw->print(join('',@l1)); + } else { + warn "To update reference: HARNESS_UPDATE_GOLDEN=1 {command} or --golden\n"; + } + return 0; + } + } + return 1; } - return 1; } sub vcd_identical { @@ -1991,24 +2037,22 @@ Or in a hand-written C++ wrapper: cout << "Read a = " << a << endl; #endif -The C argument should not generally be used to decide if a test has -succeeded. However, in the case of tests that are designed to fail at +The C specifies a filename that should be used to check +the output results. This should not generally be used to decide if a test +has succeeded. However, in the case of tests that are designed to fail at compile time, it is the only option. For example: - compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> - q{%Error: t/t_gen_cond_bitrange_bad.v:\d+: Selection index out of range: 2:2 outside 1:0 - %Error: t/t_gen_cond_bitrange_bad.v:\d+: Selection index out of range: 2:2 outside 1:0 - %Error: t/t_gen_cond_bitrange_bad.v:\d+: Selection index out of range: 2:2 outside 1:0 - %Error: t/t_gen_cond_bitrange_bad.v:\d+: Selection index out of range: 2:2 outside 1:0 - %Error: Exiting due to .*}, - ); + compile( + v_flags2 => ["--lint-only"], + fails=>1, + expect_filename => $Self->{golden_filename}, + ); -The strings to match should be made general - for example the line numbers -in the Verilog should not be critical and the total number of errors should -not matter. This makes it easier to extend or modify the test in future. +Note expect_filename strips some debugging information from the logfile +when comparing. + +The C argument specifies a regular expression which must match the +output. =head1 DRIVER ARGUMENTS diff --git a/test_regress/t/t_array_backw_index_bad.out b/test_regress/t/t_array_backw_index_bad.out new file mode 100644 index 000000000..eddc7f808 --- /dev/null +++ b/test_regress/t/t_array_backw_index_bad.out @@ -0,0 +1,6 @@ +%Error: t/t_array_backw_index_bad.v:13: Slice selection '[1:3]' has backward indexing versus data type's '[3:0]' +%Error: t/t_array_backw_index_bad.v:14: Slice selection '[3:1]' has backward indexing versus data type's '[0:3]' +%Error: t/t_array_backw_index_bad.v:16: Slice selection index '[4:3]' outside data type's '[3:0]' +%Error: t/t_array_backw_index_bad.v:17: Slice selection index '[1:-1]' outside data type's '[3:0]' +%Error: t/t_array_backw_index_bad.v:17: Assignment pattern missed initializing elements: -1 +%Error: Exiting due to diff --git a/test_regress/t/t_array_backw_index_bad.pl b/test_regress/t/t_array_backw_index_bad.pl index a4cdf3295..3361369bf 100755 --- a/test_regress/t/t_array_backw_index_bad.pl +++ b/test_regress/t/t_array_backw_index_bad.pl @@ -11,12 +11,7 @@ scenarios(simulator => 1); compile( fails => 1, - expect => -q{%Error: t/t_array_backw_index_bad.v:\d+: Slice selection '\[1:3\]' has backward indexing versus data type's '\[3:0\]' -%Error: t/t_array_backw_index_bad.v:\d+: Slice selection '\[3:1\]' has backward indexing versus data type's '\[0:3\]' -%Error: t/t_array_backw_index_bad.v:\d+: Slice selection index '\[4:3\]' outside data type's '\[3:0\]' -%Error: t/t_array_backw_index_bad.v:\d+: Slice selection index '\[1:-1\]' outside data type's '\[3:0\]' -.*%Error: Exiting due to.*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_assert_dup_bad.out b/test_regress/t/t_assert_dup_bad.out new file mode 100644 index 000000000..0a22e5042 --- /dev/null +++ b/test_regress/t/t_assert_dup_bad.out @@ -0,0 +1,3 @@ +%Error: t/t_assert_dup_bad.v:16: Duplicate declaration of block: covlabel +%Error: t/t_assert_dup_bad.v:14: ... Location of original declaration +%Error: Exiting due to diff --git a/test_regress/t/t_assert_dup_bad.pl b/test_regress/t/t_assert_dup_bad.pl index 622515a19..8bc867659 100755 --- a/test_regress/t/t_assert_dup_bad.pl +++ b/test_regress/t/t_assert_dup_bad.pl @@ -12,10 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -'%Error: t/t_assert_dup_bad.v:\d+: Duplicate declaration of block: covlabel -%Error: t/t_assert_dup_bad.v:\d+: ... Location of original declaration -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_cdc_async_bad.out b/test_regress/t/t_cdc_async_bad.out new file mode 100644 index 000000000..f3b5d0c4f --- /dev/null +++ b/test_regress/t/t_cdc_async_bad.out @@ -0,0 +1,6 @@ +%Warning-CDCRSTLOGIC: t/t_cdc_async_bad.v:27: Logic in path that feeds async reset, via signal: t.rst2_bad_n +%Warning-CDCRSTLOGIC: Use "/* verilator lint_off CDCRSTLOGIC */" and lint_on around source to disable this message. +%Warning-CDCRSTLOGIC: See details in obj_vlt/t_cdc_async_bad/Vt_cdc_async_bad__cdc.txt +%Warning-CDCRSTLOGIC: t/t_cdc_async_bad.v:52: Logic in path that feeds async reset, via signal: t.rst6a_bad_n +%Warning-CDCRSTLOGIC: t/t_cdc_async_bad.v:53: Logic in path that feeds async reset, via signal: t.rst6b_bad_n +%Error: Exiting due to diff --git a/test_regress/t/t_cdc_async_bad.pl b/test_regress/t/t_cdc_async_bad.pl index 4c7f7e1f0..ba7a4260f 100755 --- a/test_regress/t/t_cdc_async_bad.pl +++ b/test_regress/t/t_cdc_async_bad.pl @@ -13,13 +13,7 @@ compile( v_flags => ['--cdc'], verilator_make_gcc => 0, fails => 1, - expect => -'%Warning-CDCRSTLOGIC: t/t_cdc_async_bad.v:\d+: Logic in path that feeds async reset, via signal: t.rst2_bad_n -%Warning-CDCRSTLOGIC: Use "/\* verilator lint_off CDCRSTLOGIC \*/" and lint_on around source to disable this message. -%Warning-CDCRSTLOGIC: See details in obj_vlt/t_cdc_async_bad/Vt_cdc_async_bad__cdc.txt -%Warning-CDCRSTLOGIC: t/t_cdc_async_bad.v:\d+: Logic in path that feeds async reset, via signal: t.rst6a_bad_n -%Warning-CDCRSTLOGIC: t/t_cdc_async_bad.v:\d+: Logic in path that feeds async reset, via signal: t.rst6b_bad_n -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); file_grep ("$Self->{obj_dir}/V$Self->{name}__cdc.txt", qr/CDC Report/); diff --git a/test_regress/t/t_const_overflow_bad.out b/test_regress/t/t_const_overflow_bad.out new file mode 100644 index 000000000..aac637312 --- /dev/null +++ b/test_regress/t/t_const_overflow_bad.out @@ -0,0 +1,5 @@ +%Error: t/t_const_overflow_bad.v:8: Too many digits for 94 bit number: 94'd123456789012345678901234567890 +%Error: t/t_const_overflow_bad.v:10: Too many digits for 8 bit number: 8'habc +%Error: t/t_const_overflow_bad.v:11: Too many digits for 6 bit number: 6'o1234 +%Error: t/t_const_overflow_bad.v:12: Too many digits for 3 bit number: 3'b1111 +%Error: Exiting due to diff --git a/test_regress/t/t_const_overflow_bad.pl b/test_regress/t/t_const_overflow_bad.pl index 2fc1f09dd..677f982e6 100755 --- a/test_regress/t/t_const_overflow_bad.pl +++ b/test_regress/t/t_const_overflow_bad.pl @@ -12,12 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -'%Error: t/t_const_overflow_bad.v:\d+: Too many digits for 94 bit number: 94\'d123456789012345678901234567890 -%Error: t/t_const_overflow_bad.v:\d+: Too many digits for 8 bit number: 8\'habc -%Error: t/t_const_overflow_bad.v:\d+: Too many digits for 6 bit number: 6\'o1234 -%Error: t/t_const_overflow_bad.v:\d+: Too many digits for 3 bit number: 3\'b1111 -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_delay_stmtdly_bad.out b/test_regress/t/t_delay_stmtdly_bad.out new file mode 100644 index 000000000..104bbf162 --- /dev/null +++ b/test_regress/t/t_delay_stmtdly_bad.out @@ -0,0 +1,6 @@ +%Warning-ASSIGNDLY: t/t_delay.v:19: Unsupported: Ignoring delay on this assignment/primitive. +%Warning-ASSIGNDLY: Use "/* verilator lint_off ASSIGNDLY */" and lint_on around source to disable this message. +%Warning-ASSIGNDLY: t/t_delay.v:24: Unsupported: Ignoring delay on this assignment/primitive. +%Warning-ASSIGNDLY: t/t_delay.v:27: Unsupported: Ignoring delay on this assignment/primitive. +%Warning-STMTDLY: t/t_delay.v:33: Unsupported: Ignoring delay on this delayed statement. +%Error: Exiting due to diff --git a/test_regress/t/t_delay_stmtdly_bad.pl b/test_regress/t/t_delay_stmtdly_bad.pl index 3bd5845cc..3de95217c 100755 --- a/test_regress/t/t_delay_stmtdly_bad.pl +++ b/test_regress/t/t_delay_stmtdly_bad.pl @@ -14,13 +14,7 @@ top_filename("t/t_delay.v"); compile( verilator_flags2 => ['-Wall -Wno-DECLFILENAME'], fails => 1, - expect => -'%Warning-ASSIGNDLY: t/t_delay.v:\d+: Unsupported: Ignoring delay on this assignment/primitive. -%Warning-ASSIGNDLY: Use .* -%Warning-ASSIGNDLY: t/t_delay.v:\d+: Unsupported: Ignoring delay on this assignment/primitive. -%Warning-ASSIGNDLY: t/t_delay.v:\d+: Unsupported: Ignoring delay on this assignment/primitive. -%Warning-STMTDLY: t/t_delay.v:\d+: Unsupported: Ignoring delay on this delayed statement. -.*%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_display.out b/test_regress/t/t_display.out new file mode 100644 index 000000000..ee0f9a472 --- /dev/null +++ b/test_regress/t/t_display.out @@ -0,0 +1,52 @@ +[0] In top.t: Hi +[0] In top.t.sub (sub) +[0] In top.t.sub.subblock (sub) +[0] In top.t.sub2 (sub2) +[0] In top.t.sub2.subblock2 (sub2) +[0] Back \ Quote " +[0] %b=000001100 %0b=1100 %b=00000101010111011101110111100110011001100 %0b=101010111011101110111100110011001100 %b=000001010101111000001001000110100010101100111100000010010001101000101011001111000 %0b=1010101111000001001000110100010101100111100000010010001101000101011001111000 +[0] %B=000001100 %0B=1100 %B=00000101010111011101110111100110011001100 %0B=101010111011101110111100110011001100 %B=000001010101111000001001000110100010101100111100000010010001101000101011001111000 %0B=1010101111000001001000110100010101100111100000010010001101000101011001111000 +[0] %d= 12 %0d=12 %d= 46099320012 %0d=46099320012 %d= 50692964483019020981880 %0d=50692964483019020981880 +[0] %D= 12 %0D=12 %D= 46099320012 %0D=46099320012 %D= 50692964483019020981880 %0D=50692964483019020981880 +[0] %h=00c %0h=c %h=00abbbbcccc %0h=abbbbcccc %h=00abc1234567812345678 %0h=abc1234567812345678 +[0] %H=00c %0H=c %H=00abbbbcccc %0H=abbbbcccc %H=00abc1234567812345678 %0H=abc1234567812345678 +[0] %o=014 %0o=14 %o=00527356746314 %0o=527356746314 %o=012570110642547402215053170 %0o=12570110642547402215053170 +[0] %O=014 %0O=14 %O=00527356746314 %0O=527356746314 %O=012570110642547402215053170 %0O=12570110642547402215053170 +[0] %x=00c %0x=c %x=00abbbbcccc %0x=abbbbcccc %x=00abc1234567812345678 %0x=abc1234567812345678 +[0] %X=00c %0X=c %X=00abbbbcccc %0X=abbbbcccc %X=00abc1234567812345678 %0X=abc1234567812345678 +[0] %d= 12 %0d=12 %d= -46099320012 %0d=-46099320012 %d= 50692964483019020981880 %0d=50692964483019020981880 +[0] %D= 12 %0D=12 %D= -46099320012 %0D=-46099320012 %D= -50692964483019020981880 %0D=-50692964483019020981880 +[0] %b=000001100 %0b=1100 %b=00000101010111011101110111100110011001100 %0b=101010111011101110111100110011001100 %b=000001010101111000001001000110100010101100111100000010010001101000101011001111000 %0b=1010101111000001001000110100010101100111100000010010001101000101011001111000 +[0] %B=000001100 %0B=1100 %B=00000101010111011101110111100110011001100 %0B=101010111011101110111100110011001100 %B=000001010101111000001001000110100010101100111100000010010001101000101011001111000 %0B=1010101111000001001000110100010101100111100000010010001101000101011001111000 +[0] %d= 12 %0d=12 %d= 46099320012 %0d=46099320012 %d= 50692964483019020981880 %0d=50692964483019020981880 +[0] %D= 12 %0D=12 %D= 46099320012 %0D=46099320012 %D= 50692964483019020981880 %0D=50692964483019020981880 +[0] %h=00c %0h=c %h=00abbbbcccc %0h=abbbbcccc %h=00abc1234567812345678 %0h=abc1234567812345678 +[0] %H=00c %0H=c %H=00abbbbcccc %0H=abbbbcccc %H=00abc1234567812345678 %0H=abc1234567812345678 +[0] %o=014 %0o=14 %o=00527356746314 %0o=527356746314 %o=012570110642547402215053170 %0o=12570110642547402215053170 +[0] %O=014 %0O=14 %O=00527356746314 %0O=527356746314 %O=012570110642547402215053170 %0O=12570110642547402215053170 +[0] %x=00c %0x=c %x=00abbbbcccc %0x=abbbbcccc %x=00abc1234567812345678 %0x=abc1234567812345678 +[0] %X=00c %0X=c %X=00abbbbcccc %0X=abbbbcccc %X=00abc1234567812345678 %0X=abc1234567812345678 +[0] %d= -12 %0d=-12 %d= -46099320012 %0d=-46099320012 %d= -50692964483019020981880 %0d=-50692964483019020981880 +[0] %D= -12 %0D=-12 %D= -46099320012 %0D=-46099320012 %D= -50692964483019020981880 %0D=-50692964483019020981880 +[0] %C=m %0C=m +[0] %c=m %0c=m +[0] %v=St0 St0 St0 St0 St0 St1 St1 St0 St0 %0v=St0 St0 St0 St0 St0 St1 St1 St0 St0 %v=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 %0v=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 %v=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 %0v=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 < +[0] %V=St0 St0 St0 St0 St0 St1 St1 St0 St0 %0V=St0 St0 St0 St0 St0 St1 St1 St0 St0 %V=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 %0V=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 %V=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 %0V=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 < +[0] %p='hc %0p='hc %p='habbbbcccc %0p='habbbbcccc %p='habc1234567812345678 %0p='habc1234567812345678 +[0] %P='hc %0P='hc %P='habbbbcccc %0P='habbbbcccc %P='habc1234567812345678 %0P='habc1234567812345678 +[0] %P="sv-str" +[0] %u=dcba %0u=dcba +[0] %U=dcba %0U=dcba +[0] %D= 12 %d= 12 %01d=12 %06d=000012 %6d= 12 +[0] %t= 0 %03t= 0 %0t=0 + +[0] %s=! %s= what! %s= hmmm!1234 +[0] hello, from a very long string. Percent %s are literally substituted in. +hello, from a concatenated string. +hello, from a concatenated format string [0]. +extra argument: 0000000000000000 +0000000000000000: pre argument +[0] Embedded <#013> return +[0] Embedded +multiline +*-* All Finished *-* diff --git a/test_regress/t/t_display.pl b/test_regress/t/t_display.pl index f2d31d473..e7b4fce25 100755 --- a/test_regress/t/t_display.pl +++ b/test_regress/t/t_display.pl @@ -14,65 +14,9 @@ compile( execute( check_finished => 1, - expect => dequote( -q{[0] In top.t: Hi -[0] In top.t.sub (sub) -[0] In top.t.sub.subblock (sub) -[0] In top.t.sub2 (sub2) -[0] In top.t.sub2.subblock2 (sub2) -[0] Back \ Quote " -[0] %b=000001100 %0b=1100 %b=00000101010111011101110111100110011001100 %0b=101010111011101110111100110011001100 %b=000001010101111000001001000110100010101100111100000010010001101000101011001111000 %0b=1010101111000001001000110100010101100111100000010010001101000101011001111000 -[0] %B=000001100 %0B=1100 %B=00000101010111011101110111100110011001100 %0B=101010111011101110111100110011001100 %B=000001010101111000001001000110100010101100111100000010010001101000101011001111000 %0B=1010101111000001001000110100010101100111100000010010001101000101011001111000 -[0] %d= 12 %0d=12 %d= 46099320012 %0d=46099320012 %d= 50692964483019020981880 %0d=50692964483019020981880 -[0] %D= 12 %0D=12 %D= 46099320012 %0D=46099320012 %D= 50692964483019020981880 %0D=50692964483019020981880 -[0] %h=00c %0h=c %h=00abbbbcccc %0h=abbbbcccc %h=00abc1234567812345678 %0h=abc1234567812345678 -[0] %H=00c %0H=c %H=00abbbbcccc %0H=abbbbcccc %H=00abc1234567812345678 %0H=abc1234567812345678 -[0] %o=014 %0o=14 %o=00527356746314 %0o=527356746314 %o=012570110642547402215053170 %0o=12570110642547402215053170 -[0] %O=014 %0O=14 %O=00527356746314 %0O=527356746314 %O=012570110642547402215053170 %0O=12570110642547402215053170 -[0] %x=00c %0x=c %x=00abbbbcccc %0x=abbbbcccc %x=00abc1234567812345678 %0x=abc1234567812345678 -[0] %X=00c %0X=c %X=00abbbbcccc %0X=abbbbcccc %X=00abc1234567812345678 %0X=abc1234567812345678 -[0] %d= 12 %0d=12 %d= -46099320012 %0d=-46099320012 %d= 50692964483019020981880 %0d=50692964483019020981880 -[0] %D= 12 %0D=12 %D= -46099320012 %0D=-46099320012 %D= -50692964483019020981880 %0D=-50692964483019020981880 -[0] %b=000001100 %0b=1100 %b=00000101010111011101110111100110011001100 %0b=101010111011101110111100110011001100 %b=000001010101111000001001000110100010101100111100000010010001101000101011001111000 %0b=1010101111000001001000110100010101100111100000010010001101000101011001111000 -[0] %B=000001100 %0B=1100 %B=00000101010111011101110111100110011001100 %0B=101010111011101110111100110011001100 %B=000001010101111000001001000110100010101100111100000010010001101000101011001111000 %0B=1010101111000001001000110100010101100111100000010010001101000101011001111000 -[0] %d= 12 %0d=12 %d= 46099320012 %0d=46099320012 %d= 50692964483019020981880 %0d=50692964483019020981880 -[0] %D= 12 %0D=12 %D= 46099320012 %0D=46099320012 %D= 50692964483019020981880 %0D=50692964483019020981880 -[0] %h=00c %0h=c %h=00abbbbcccc %0h=abbbbcccc %h=00abc1234567812345678 %0h=abc1234567812345678 -[0] %H=00c %0H=c %H=00abbbbcccc %0H=abbbbcccc %H=00abc1234567812345678 %0H=abc1234567812345678 -[0] %o=014 %0o=14 %o=00527356746314 %0o=527356746314 %o=012570110642547402215053170 %0o=12570110642547402215053170 -[0] %O=014 %0O=14 %O=00527356746314 %0O=527356746314 %O=012570110642547402215053170 %0O=12570110642547402215053170 -[0] %x=00c %0x=c %x=00abbbbcccc %0x=abbbbcccc %x=00abc1234567812345678 %0x=abc1234567812345678 -[0] %X=00c %0X=c %X=00abbbbcccc %0X=abbbbcccc %X=00abc1234567812345678 %0X=abc1234567812345678 -[0] %d= -12 %0d=-12 %d= -46099320012 %0d=-46099320012 %d= -50692964483019020981880 %0d=-50692964483019020981880 -[0] %D= -12 %0D=-12 %D= -46099320012 %0D=-46099320012 %D= -50692964483019020981880 %0D=-50692964483019020981880 -[0] %C=m %0C=m -[0] %c=m %0c=m -[0] %v=St0 St0 St0 St0 St0 St1 St1 St0 St0 %0v=St0 St0 St0 St0 St0 St1 St1 St0 St0 %v=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 %0v=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 %v=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 %0v=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 < -[0] %V=St0 St0 St0 St0 St0 St1 St1 St0 St0 %0V=St0 St0 St0 St0 St0 St1 St1 St0 St0 %V=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 %0V=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 %V=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 %0V=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 < -[0] %p='hc %0p='hc %p='habbbbcccc %0p='habbbbcccc %p='habc1234567812345678 %0p='habc1234567812345678 -[0] %P='hc %0P='hc %P='habbbbcccc %0P='habbbbcccc %P='habc1234567812345678 %0P='habc1234567812345678 -[0] %P="sv-str" -[0] %u=dcba %0u=dcba -[0] %U=dcba %0U=dcba -[0] %D= 12 %d= 12 %01d=12 %06d=000012 %6d= 12 -[0] %t= 0 %03t= 0 %0t=0 - -[0] %s=! %s= what! %s= hmmm!1234 -[0] hello, from a very long string. Percent %s are literally substituted in. -hello, from a concatenated string. -hello, from a concatenated format string [0]. -extra argument: 0000000000000000 -0000000000000000: pre argument -[0] Embedded <#013> return -[0] Embedded -multiline -*-* All Finished *-* -}), - ); + expect_filename => $Self->{golden_filename}, + ); ok(1); -# Don't put control chars into our source repository, pre-compress instead -sub dequote { my $s = shift; $s =~ s/<#013>/\r/g; $s; } - 1; diff --git a/test_regress/t/t_display_bad.out b/test_regress/t/t_display_bad.out new file mode 100644 index 000000000..53abb34d6 --- /dev/null +++ b/test_regress/t/t_display_bad.out @@ -0,0 +1,3 @@ +%Error: t/t_display_bad.v:10: Missing arguments for $display-like format +%Error: t/t_display_bad.v:12: Unknown $display-like format code: %q +%Error: Exiting due to diff --git a/test_regress/t/t_display_bad.pl b/test_regress/t/t_display_bad.pl index 796da5092..fdfdab856 100755 --- a/test_regress/t/t_display_bad.pl +++ b/test_regress/t/t_display_bad.pl @@ -12,10 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -'%Error: t/t_display_bad.v:\d+: Missing arguments for \$display-like format -%Error: t/t_display_bad.v:\d+: Unknown \$display-like format code: %q -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_display_mcd.out b/test_regress/t/t_display_mcd.out new file mode 100644 index 000000000..655bac816 --- /dev/null +++ b/test_regress/t/t_display_mcd.out @@ -0,0 +1,3 @@ +To stdout +To stderr +*-* All Finished *-* diff --git a/test_regress/t/t_display_mcd.pl b/test_regress/t/t_display_mcd.pl index 26266f883..e7b4fce25 100755 --- a/test_regress/t/t_display_mcd.pl +++ b/test_regress/t/t_display_mcd.pl @@ -14,16 +14,9 @@ compile( execute( check_finished => 1, - expect => quotemeta(dequote( -'To stdout -To stderr -*-* All Finished *-* -')), - ); + expect_filename => $Self->{golden_filename}, + ); ok(1); -# Don't put control chars into our source repository, pre-compress instead -sub dequote { my $s = shift; $s =~ s/<#013>/\r/g; $s; } - 1; diff --git a/test_regress/t/t_display_merge.out b/test_regress/t/t_display_merge.out new file mode 100644 index 000000000..5d290cba7 --- /dev/null +++ b/test_regress/t/t_display_merge.out @@ -0,0 +1,19 @@ +Merge: +This should merge +f + a=top.t + b=top.t + pre + t=0 + t2=0 + post + t3=0 + t4=0 t5=00000000000000000 +m + t=0 t2=0 t3=0 t4=0 t5=0 + t=0 t2=0 t3=0 t4=0 t5=0 +mm + +f a=top.t b=top.t pre t=0 t2=0 post t3=0 t4=0 t5=00000000000000000m t=0 t2=0 t3=0 t4=0 t5=0 t=0 t2=0 t3=0 t4=0 t5=0mm + +*-* All Finished *-* diff --git a/test_regress/t/t_display_merge.pl b/test_regress/t/t_display_merge.pl index 9e3d22c1f..927d3025c 100755 --- a/test_regress/t/t_display_merge.pl +++ b/test_regress/t/t_display_merge.pl @@ -15,27 +15,7 @@ compile( execute( check_finished => 1, - expect => (quotemeta( -'Merge: -This should merge -f - a=top.t - b=top.t - pre - t=0 - t2=0 - post - t3=0 - t4=0 t5=00000000000000000 -m - t=0 t2=0 t3=0 t4=0 t5=0 - t=0 t2=0 t3=0 t4=0 t5=0 -mm - -f a=top.t b=top.t pre t=0 t2=0 post t3=0 t4=0 t5=00000000000000000m t=0 t2=0 t3=0 t4=0 t5=0 t=0 t2=0 t3=0 t4=0 t5=0mm - -*-* All Finished *-*') - .'.*') + expect_filename => $Self->{golden_filename}, ); file_grep ("$Self->{obj_dir}/$Self->{VM_PREFIX}__stats.txt", diff --git a/test_regress/t/t_display_noopt.pl b/test_regress/t/t_display_noopt.pl index ee29d6649..0912cc664 100755 --- a/test_regress/t/t_display_noopt.pl +++ b/test_regress/t/t_display_noopt.pl @@ -10,6 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); top_filename("t/t_display.v"); +$Self->{golden_filename} = "t/t_display.out"; # Match unopt version compile( verilator_flags2 => ["-O0"], @@ -17,65 +18,9 @@ compile( execute( check_finished => 1, - expect => dequote( -q{[0] In top.t: Hi -[0] In top.t.sub (sub) -[0] In top.t.sub.subblock (sub) -[0] In top.t.sub2 (sub2) -[0] In top.t.sub2.subblock2 (sub2) -[0] Back \ Quote " -[0] %b=000001100 %0b=1100 %b=00000101010111011101110111100110011001100 %0b=101010111011101110111100110011001100 %b=000001010101111000001001000110100010101100111100000010010001101000101011001111000 %0b=1010101111000001001000110100010101100111100000010010001101000101011001111000 -[0] %B=000001100 %0B=1100 %B=00000101010111011101110111100110011001100 %0B=101010111011101110111100110011001100 %B=000001010101111000001001000110100010101100111100000010010001101000101011001111000 %0B=1010101111000001001000110100010101100111100000010010001101000101011001111000 -[0] %d= 12 %0d=12 %d= 46099320012 %0d=46099320012 %d= 50692964483019020981880 %0d=50692964483019020981880 -[0] %D= 12 %0D=12 %D= 46099320012 %0D=46099320012 %D= 50692964483019020981880 %0D=50692964483019020981880 -[0] %h=00c %0h=c %h=00abbbbcccc %0h=abbbbcccc %h=00abc1234567812345678 %0h=abc1234567812345678 -[0] %H=00c %0H=c %H=00abbbbcccc %0H=abbbbcccc %H=00abc1234567812345678 %0H=abc1234567812345678 -[0] %o=014 %0o=14 %o=00527356746314 %0o=527356746314 %o=012570110642547402215053170 %0o=12570110642547402215053170 -[0] %O=014 %0O=14 %O=00527356746314 %0O=527356746314 %O=012570110642547402215053170 %0O=12570110642547402215053170 -[0] %x=00c %0x=c %x=00abbbbcccc %0x=abbbbcccc %x=00abc1234567812345678 %0x=abc1234567812345678 -[0] %X=00c %0X=c %X=00abbbbcccc %0X=abbbbcccc %X=00abc1234567812345678 %0X=abc1234567812345678 -[0] %d= 12 %0d=12 %d= -46099320012 %0d=-46099320012 %d= 50692964483019020981880 %0d=50692964483019020981880 -[0] %D= 12 %0D=12 %D= -46099320012 %0D=-46099320012 %D= -50692964483019020981880 %0D=-50692964483019020981880 -[0] %b=000001100 %0b=1100 %b=00000101010111011101110111100110011001100 %0b=101010111011101110111100110011001100 %b=000001010101111000001001000110100010101100111100000010010001101000101011001111000 %0b=1010101111000001001000110100010101100111100000010010001101000101011001111000 -[0] %B=000001100 %0B=1100 %B=00000101010111011101110111100110011001100 %0B=101010111011101110111100110011001100 %B=000001010101111000001001000110100010101100111100000010010001101000101011001111000 %0B=1010101111000001001000110100010101100111100000010010001101000101011001111000 -[0] %d= 12 %0d=12 %d= 46099320012 %0d=46099320012 %d= 50692964483019020981880 %0d=50692964483019020981880 -[0] %D= 12 %0D=12 %D= 46099320012 %0D=46099320012 %D= 50692964483019020981880 %0D=50692964483019020981880 -[0] %h=00c %0h=c %h=00abbbbcccc %0h=abbbbcccc %h=00abc1234567812345678 %0h=abc1234567812345678 -[0] %H=00c %0H=c %H=00abbbbcccc %0H=abbbbcccc %H=00abc1234567812345678 %0H=abc1234567812345678 -[0] %o=014 %0o=14 %o=00527356746314 %0o=527356746314 %o=012570110642547402215053170 %0o=12570110642547402215053170 -[0] %O=014 %0O=14 %O=00527356746314 %0O=527356746314 %O=012570110642547402215053170 %0O=12570110642547402215053170 -[0] %x=00c %0x=c %x=00abbbbcccc %0x=abbbbcccc %x=00abc1234567812345678 %0x=abc1234567812345678 -[0] %X=00c %0X=c %X=00abbbbcccc %0X=abbbbcccc %X=00abc1234567812345678 %0X=abc1234567812345678 -[0] %d= -12 %0d=-12 %d= -46099320012 %0d=-46099320012 %d= -50692964483019020981880 %0d=-50692964483019020981880 -[0] %D= -12 %0D=-12 %D= -46099320012 %0D=-46099320012 %D= -50692964483019020981880 %0D=-50692964483019020981880 -[0] %C=m %0C=m -[0] %c=m %0c=m -[0] %v=St0 St0 St0 St0 St0 St1 St1 St0 St0 %0v=St0 St0 St0 St0 St0 St1 St1 St0 St0 %v=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 %0v=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 %v=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 %0v=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 < -[0] %V=St0 St0 St0 St0 St0 St1 St1 St0 St0 %0V=St0 St0 St0 St0 St0 St1 St1 St0 St0 %V=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 %0V=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St0 St1 St1 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 St1 St1 St0 St0 %V=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 %0V=St0 St0 St0 St0 St0 St1 St0 St1 St0 St1 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 St0 St0 St0 St1 St0 St0 St1 St0 St0 St0 St1 St1 St0 St1 St0 St0 St0 St1 St0 St1 St0 St1 St1 St0 St0 St1 St1 St1 St1 St0 St0 St0 < -[0] %p='hc %0p='hc %p='habbbbcccc %0p='habbbbcccc %p='habc1234567812345678 %0p='habc1234567812345678 -[0] %P='hc %0P='hc %P='habbbbcccc %0P='habbbbcccc %P='habc1234567812345678 %0P='habc1234567812345678 -[0] %P="sv-str" -[0] %u=dcba %0u=dcba -[0] %U=dcba %0U=dcba -[0] %D= 12 %d= 12 %01d=12 %06d=000012 %6d= 12 -[0] %t= 0 %03t= 0 %0t=0 - -[0] %s=! %s= what! %s= hmmm!1234 -[0] hello, from a very long string. Percent %s are literally substituted in. -hello, from a concatenated string. -hello, from a concatenated format string [0]. -extra argument: 0000000000000000 -0000000000000000: pre argument -[0] Embedded <#013> return -[0] Embedded -multiline -*-* All Finished *-* -}), - ); + expect_filename => $Self->{golden_filename}, + ); ok(1); -# Don't put control chars into our source repository, pre-compress instead -sub dequote { my $s = shift; $s =~ s/<#013>/\r/g; $s; } - 1; diff --git a/test_regress/t/t_display_real.out b/test_regress/t/t_display_real.out new file mode 100644 index 000000000..bb738ecb3 --- /dev/null +++ b/test_regress/t/t_display_real.out @@ -0,0 +1,23 @@ +[0] e=0.000000e+00 e1=0.000000e+00 e30=0e+00 e32=0.00e+00 +[0] f=0.000000 f1=0.000000e+00 f30=0e+00 f32=0.00e+00 +[0] g=0 g1=0.000000e+00 g30=0e+00 g32=0.00e+00 + +[0] e=1.000000e+00 e1=1.000000e+00 e30=1e+00 e32=1.00e+00 +[0] f=1.000000 f1=1.000000e+00 f30=1e+00 f32=1.00e+00 +[0] g=1 g1=1.000000e+00 g30=1e+00 g32=1.00e+00 + +[0] e=1.000000e-01 e1=1.000000e-01 e30=1e-01 e32=1.00e-01 +[0] f=0.100000 f1=1.000000e-01 f30=1e-01 f32=1.00e-01 +[0] g=0.1 g1=1.000000e-01 g30=1e-01 g32=1.00e-01 + +[0] e=1.234500e-15 e1=1.234500e-15 e30=1e-15 e32=1.23e-15 +[0] f=0.000000 f1=1.234500e-15 f30=1e-15 f32=1.23e-15 +[0] g=1.2345e-15 g1=1.234500e-15 g30=1e-15 g32=1.23e-15 + +[0] e=2.579000e+15 e1=2.579000e+15 e30=3e+15 e32=2.58e+15 +[0] f=2579000000000000.000000 f1=2.579000e+15 f30=3e+15 f32=2.58e+15 +[0] g=2.579e+15 g1=2.579000e+15 g30=3e+15 g32=2.58e+15 + +r8= 3 n1=1 n2=0.1 +n1=1 n2=0.1 r8= 3 +*-* All Finished *-* diff --git a/test_regress/t/t_display_real.pl b/test_regress/t/t_display_real.pl index 98aee4fa0..f79178f86 100755 --- a/test_regress/t/t_display_real.pl +++ b/test_regress/t/t_display_real.pl @@ -14,31 +14,8 @@ compile( execute( check_finished => 1, - expect => quotemeta( -'[0] e=0.000000e+00 e1=0.000000e+00 e30=0e+00 e32=0.00e+00 -[0] f=0.000000 f1=0.000000e+00 f30=0e+00 f32=0.00e+00 -[0] g=0 g1=0.000000e+00 g30=0e+00 g32=0.00e+00 - -[0] e=1.000000e+00 e1=1.000000e+00 e30=1e+00 e32=1.00e+00 -[0] f=1.000000 f1=1.000000e+00 f30=1e+00 f32=1.00e+00 -[0] g=1 g1=1.000000e+00 g30=1e+00 g32=1.00e+00 - -[0] e=1.000000e-01 e1=1.000000e-01 e30=1e-01 e32=1.00e-01 -[0] f=0.100000 f1=1.000000e-01 f30=1e-01 f32=1.00e-01 -[0] g=0.1 g1=1.000000e-01 g30=1e-01 g32=1.00e-01 - -[0] e=1.234500e-15 e1=1.234500e-15 e30=1e-15 e32=1.23e-15 -[0] f=0.000000 f1=1.234500e-15 f30=1e-15 f32=1.23e-15 -[0] g=1.2345e-15 g1=1.234500e-15 g30=1e-15 g32=1.23e-15 - -[0] e=2.579000e+15 e1=2.579000e+15 e30=3e+15 e32=2.58e+15 -[0] f=2579000000000000.000000 f1=2.579000e+15 f30=3e+15 f32=2.58e+15 -[0] g=2.579e+15 g1=2.579000e+15 g30=3e+15 g32=2.58e+15 - -r8= 3 n1=1 n2=0.1 -n1=1 n2=0.1 r8= 3 -'), - ); + expect_filename => $Self->{golden_filename}, + ); ok(1); 1; diff --git a/test_regress/t/t_display_real_noopt.pl b/test_regress/t/t_display_real_noopt.pl index 2b8ccddf9..3841a9de6 100755 --- a/test_regress/t/t_display_real_noopt.pl +++ b/test_regress/t/t_display_real_noopt.pl @@ -10,6 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); top_filename("t/t_display_real.v"); +$Self->{golden_filename} = "t/t_display_real.out"; # Match unopt version compile( verilator_flags2 => ["-O0"], @@ -17,31 +18,8 @@ compile( execute( check_finished => 1, - expect => quotemeta( -'[0] e=0.000000e+00 e1=0.000000e+00 e30=0e+00 e32=0.00e+00 -[0] f=0.000000 f1=0.000000e+00 f30=0e+00 f32=0.00e+00 -[0] g=0 g1=0.000000e+00 g30=0e+00 g32=0.00e+00 - -[0] e=1.000000e+00 e1=1.000000e+00 e30=1e+00 e32=1.00e+00 -[0] f=1.000000 f1=1.000000e+00 f30=1e+00 f32=1.00e+00 -[0] g=1 g1=1.000000e+00 g30=1e+00 g32=1.00e+00 - -[0] e=1.000000e-01 e1=1.000000e-01 e30=1e-01 e32=1.00e-01 -[0] f=0.100000 f1=1.000000e-01 f30=1e-01 f32=1.00e-01 -[0] g=0.1 g1=1.000000e-01 g30=1e-01 g32=1.00e-01 - -[0] e=1.234500e-15 e1=1.234500e-15 e30=1e-15 e32=1.23e-15 -[0] f=0.000000 f1=1.234500e-15 f30=1e-15 f32=1.23e-15 -[0] g=1.2345e-15 g1=1.234500e-15 g30=1e-15 g32=1.23e-15 - -[0] e=2.579000e+15 e1=2.579000e+15 e30=3e+15 e32=2.58e+15 -[0] f=2579000000000000.000000 f1=2.579000e+15 f30=3e+15 f32=2.58e+15 -[0] g=2.579e+15 g1=2.579000e+15 g30=3e+15 g32=2.58e+15 - -r8= 3 n1=1 n2=0.1 -n1=1 n2=0.1 r8= 3 -'), - ); + expect_filename => $Self->{golden_filename}, + ); ok(1); 1; diff --git a/test_regress/t/t_display_signed.out b/test_regress/t/t_display_signed.out new file mode 100644 index 000000000..2eae74513 --- /dev/null +++ b/test_regress/t/t_display_signed.out @@ -0,0 +1,8 @@ +[0] lp %x=0bbccc %x=0bbccc %o=2736314 %b=010111011110011001100 %0d=769228 %d= 769228 +[0] ln %x=1bbccc %x=1bbccc %o=6736314 %b=110111011110011001100 %0d=-279348 %d= -279348 +[0] qp %x=001bbbbcccc %x=001bbbbcccc %o=00067356746314 %b=00000000110111011101110111100110011001100 %0d=7444614348 %d= 7444614348 +[0] qn %x=101bbbbcccc %x=101bbbbcccc %o=20067356746314 %b=10000000110111011101110111100110011001100 %0d=-1092067013428 %d=-1092067013428 +[0] wp %x=000bc1234567812345678 %x=000bc1234567812345678 %o=000570110642547402215053170 %b=000000000101111000001001000110100010101100111100000010010001101000101011001111000 +[0] wn %x=000bc1234577812345678 %x=000bc1234577812345678 %o=000570110642567402215053170 %b=000000000101111000001001000110100010101110111100000010010001101000101011001111000 + +*-* All Finished *-* diff --git a/test_regress/t/t_display_signed.pl b/test_regress/t/t_display_signed.pl index 7fbb489b5..f79178f86 100755 --- a/test_regress/t/t_display_signed.pl +++ b/test_regress/t/t_display_signed.pl @@ -14,15 +14,8 @@ compile( execute( check_finished => 1, - expect => quotemeta( -'[0] lp %x=0bbccc %x=0bbccc %o=2736314 %b=010111011110011001100 %0d=769228 %d= 769228 -[0] ln %x=1bbccc %x=1bbccc %o=6736314 %b=110111011110011001100 %0d=-279348 %d= -279348 -[0] qp %x=001bbbbcccc %x=001bbbbcccc %o=00067356746314 %b=00000000110111011101110111100110011001100 %0d=7444614348 %d= 7444614348 -[0] qn %x=101bbbbcccc %x=101bbbbcccc %o=20067356746314 %b=10000000110111011101110111100110011001100 %0d=-1092067013428 %d=-1092067013428 -[0] wp %x=000bc1234567812345678 %x=000bc1234567812345678 %o=000570110642547402215053170 %b=000000000101111000001001000110100010101100111100000010010001101000101011001111000 -[0] wn %x=000bc1234577812345678 %x=000bc1234577812345678 %o=000570110642567402215053170 %b=000000000101111000001001000110100010101110111100000010010001101000101011001111000 -'), - ); + expect_filename => $Self->{golden_filename}, + ); ok(1); 1; diff --git a/test_regress/t/t_display_signed_noopt.pl b/test_regress/t/t_display_signed_noopt.pl index 104839544..082c36770 100755 --- a/test_regress/t/t_display_signed_noopt.pl +++ b/test_regress/t/t_display_signed_noopt.pl @@ -10,6 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); top_filename("t/t_display_signed.v"); +$Self->{golden_filename} = "t/t_display_signed.out"; # Match unopt version compile( verilator_flags2 => ["-O0"], @@ -17,15 +18,8 @@ compile( execute( check_finished => 1, - expect => quotemeta( -'[0] lp %x=0bbccc %x=0bbccc %o=2736314 %b=010111011110011001100 %0d=769228 %d= 769228 -[0] ln %x=1bbccc %x=1bbccc %o=6736314 %b=110111011110011001100 %0d=-279348 %d= -279348 -[0] qp %x=001bbbbcccc %x=001bbbbcccc %o=00067356746314 %b=00000000110111011101110111100110011001100 %0d=7444614348 %d= 7444614348 -[0] qn %x=101bbbbcccc %x=101bbbbcccc %o=20067356746314 %b=10000000110111011101110111100110011001100 %0d=-1092067013428 %d=-1092067013428 -[0] wp %x=000bc1234567812345678 %x=000bc1234567812345678 %o=000570110642547402215053170 %b=000000000101111000001001000110100010101100111100000010010001101000101011001111000 -[0] wn %x=000bc1234577812345678 %x=000bc1234577812345678 %o=000570110642567402215053170 %b=000000000101111000001001000110100010101110111100000010010001101000101011001111000 -'), - ); + expect_filename => $Self->{golden_filename}, + ); ok(1); 1; diff --git a/test_regress/t/t_display_time.out b/test_regress/t/t_display_time.out new file mode 100644 index 000000000..ba4c28eaf --- /dev/null +++ b/test_regress/t/t_display_time.out @@ -0,0 +1,3 @@ +default: [0.000] 0t time [ 0.000] No0 time + +*-* All Finished *-* diff --git a/test_regress/t/t_display_time.pl b/test_regress/t/t_display_time.pl index 6bdd258fc..037ef9593 100755 --- a/test_regress/t/t_display_time.pl +++ b/test_regress/t/t_display_time.pl @@ -17,18 +17,8 @@ compile( execute( check_finished => 1, - expect => quotemeta( -'default: [0.000] 0t time [ 0.000] No0 time -' -# Unsupported: -#'default: [0] 0t time [ 0] No0 time -#-9,0,,0: [0] 0t time [0] No0 time -#-9,0,,10: [0] 0t time [ 0] No0 time -#-9,0,ns,5: [0ns] 0t time [ 0ns] No0 time -#-9,3,ns,8: [0.000ns] 0t time [ 0.000ns] No0 time -#' -), - ); + expect_filename => $Self->{golden_filename}, + ); ok(1); 1; diff --git a/test_regress/t/t_display_wide.out b/test_regress/t/t_display_wide.out new file mode 100644 index 000000000..73da012fd --- /dev/null +++ b/test_regress/t/t_display_wide.out @@ -0,0 +1,3 @@ +[1000.000] cyc==99 crc=2961926edde3e5c6018be970cdbf327b72b5f3c5eab42995891005eec8767e5fdf03051edbe9d222ee756ee34d8d6c83ee877aad65c487140ac87d26c636a66214b4a69acad924c568cc8e8c79f97d07a6eedf91011919d0e3cdda5215ee58c942f6c4dea48b3f38abc77bf47e4f6d6a859fcc5b5d46ec9d2f6a5bf7b978b1ba7ca15d0713a2eb06ade1570c4e3a12db687625eef8dfebcb4095ab4bdffe79c1298f609307a5ef773a6432b855e3e54deb88ca342bf5a7fecc5f2f3e165a59cdb9179718a2d11c9d55f14d69f40b01e41fcb7335a8872a6ba7876ec684d6a3af0b82aa31cca6e26340a2589cf7bf886faa8d23844596dc71233c7025c5250a968b770ab72db90b03d8c045fb8848159df544a3a3bf063269be0aa11d5507f5c8b328b760a6df9e3fbe276faad8eadee126443ad3f99d595b12d0ae514b20693298a58642a07718f9ab7ea8c66575f7f8d0e3ba77d992235b3d5a4e015a7ff9b97a8c4f48ebdbfc2365e6bca4dd3ba6bfc7e850f7c8e2842c717a1d85a977a033f564fc +[1000.000] cyc==99 crc=001010010110000110010010011011101101110111100011111001011100011000000001100010111110100101110000110011011011111100110010011110110111001010110101111100111100010111101010101101000010100110010101100010010001000000000101111011101100100001110110011111100101111111011111000000110000010100011110110110111110100111010010001000101110111001110101011011101110001101001101100011010110110010000011111011101000011101111010101011010110010111000100100001110001010000001010110010000111110100100110110001100011011010100110011000100001010010110100101001101001101011001010110110010010010011000101011010001100110010001110100011000111100111111001011111010000011110100110111011101101111110010001000000010001100100011001110100001110001111001101110110100101001000010101111011100101100011001001010000101111011011000100110111101010010010001011001111110011100010101011110001110111101111110100011111100100111101101101011010101000010110011111110011000101101101011101010001101110110010011101001011110110101001011011111101111011100101111000101100011011101001111100101000010101110100000111000100111010001011101011000001101010110111100001010101110000110001001110001110100001001011011011011010000111011000100101111011101111100011011111111010111100101101000000100101011010101101001011110111111111111001111001110000010010100110001111011000001001001100000111101001011110111101110111001110100110010000110010101110000101010111100011111001010100110111101011100010001100101000110100001010111111010110100111111111101100110001011111001011110011111000010110010110100101100111001101101110010001011110010111000110001010001011010001000111001001110101010101111100010100110101101001111101000000101100000001111001000001111111001011011100110011010110101000100001110010101001101011101001111000011101101110110001101000010011010110101000111010111100001011100000101010101000110001110011001010011011100010011000110100000010100010010110001001110011110111101111111000100001101111101010101000110100100011100001000100010110010110110111000111000100100011001111000111000000100101110001010010010100001010100101101000101101110111000010101011011100101101101110010000101100000011110110001100000001000101111110111000100001001000000101011001110111110101010001001010001110100011101111110000011000110010011010011011111000001010101000010001110101010101000001111111010111001000101100110010100010110111011000001010011011011111100111100011111110111110001001110110111110101010110110001110101011011110111000010010011001000100001110101101001111111001100111010101100101011011000100101101000010101110010100010100101100100000011010010011001010011000101001011000011001000010101000000111011100011000111110011010101101111110101010001100011001100101011101011111011111111000110100001110001110111010011101111101100110010010001000110101101100111101010110100100111000000001010110100111111111111001101110010111101010001100010011110100100011101011110110111111110000100011011001011110011010111100101001001101110100111011101001101011111111000111111010000101000011110111110010001110001010000100001011000111000101111010000111011000010110101001011101111010000000110011111101010110010011111100 +*-* All Finished *-* diff --git a/test_regress/t/t_display_wide.pl b/test_regress/t/t_display_wide.pl index d27f62e4e..514e0bd6d 100755 --- a/test_regress/t/t_display_wide.pl +++ b/test_regress/t/t_display_wide.pl @@ -16,10 +16,7 @@ compile( execute( check_finished => 1, - expect => quotemeta( -'[1000.000] cyc==99 crc=2961926edde3e5c6018be970cdbf327b72b5f3c5eab42995891005eec8767e5fdf03051edbe9d222ee756ee34d8d6c83ee877aad65c487140ac87d26c636a66214b4a69acad924c568cc8e8c79f97d07a6eedf91011919d0e3cdda5215ee58c942f6c4dea48b3f38abc77bf47e4f6d6a859fcc5b5d46ec9d2f6a5bf7b978b1ba7ca15d0713a2eb06ade1570c4e3a12db687625eef8dfebcb4095ab4bdffe79c1298f609307a5ef773a6432b855e3e54deb88ca342bf5a7fecc5f2f3e165a59cdb9179718a2d11c9d55f14d69f40b01e41fcb7335a8872a6ba7876ec684d6a3af0b82aa31cca6e26340a2589cf7bf886faa8d23844596dc71233c7025c5250a968b770ab72db90b03d8c045fb8848159df544a3a3bf063269be0aa11d5507f5c8b328b760a6df9e3fbe276faad8eadee126443ad3f99d595b12d0ae514b20693298a58642a07718f9ab7ea8c66575f7f8d0e3ba77d992235b3d5a4e015a7ff9b97a8c4f48ebdbfc2365e6bca4dd3ba6bfc7e850f7c8e2842c717a1d85a977a033f564fc -[1000.000] cyc==99 crc=001010010110000110010010011011101101110111100011111001011100011000000001100010111110100101110000110011011011111100110010011110110111001010110101111100111100010111101010101101000010100110010101100010010001000000000101111011101100100001110110011111100101111111011111000000110000010100011110110110111110100111010010001000101110111001110101011011101110001101001101100011010110110010000011111011101000011101111010101011010110010111000100100001110001010000001010110010000111110100100110110001100011011010100110011000100001010010110100101001101001101011001010110110010010010011000101011010001100110010001110100011000111100111111001011111010000011110100110111011101101111110010001000000010001100100011001110100001110001111001101110110100101001000010101111011100101100011001001010000101111011011000100110111101010010010001011001111110011100010101011110001110111101111110100011111100100111101101101011010101000010110011111110011000101101101011101010001101110110010011101001011110110101001011011111101111011100101111000101100011011101001111100101000010101110100000111000100111010001011101011000001101010110111100001010101110000110001001110001110100001001011011011011010000111011000100101111011101111100011011111111010111100101101000000100101011010101101001011110111111111111001111001110000010010100110001111011000001001001100000111101001011110111101110111001110100110010000110010101110000101010111100011111001010100110111101011100010001100101000110100001010111111010110100111111111101100110001011111001011110011111000010110010110100101100111001101101110010001011110010111000110001010001011010001000111001001110101010101111100010100110101101001111101000000101100000001111001000001111111001011011100110011010110101000100001110010101001101011101001111000011101101110110001101000010011010110101000111010111100001011100000101010101000110001110011001010011011100010011000110100000010100010010110001001110011110111101111111000100001101111101010101000110100100011100001000100010110010110110111000111000100100011001111000111000000100101110001010010010100001010100101101000101101110111000010101011011100101101101110010000101100000011110110001100000001000101111110111000100001001000000101011001110111110101010001001010001110100011101111110000011000110010011010011011111000001010101000010001110101010101000001111111010111001000101100110010100010110111011000001010011011011111100111100011111110111110001001110110111110101010110110001110101011011110111000010010011001000100001110101101001111111001100111010101100101011011000100101101000010101110010100010100101100100000011010010011001010011000101001011000011001000010101000000111011100011000111110011010101101111110101010001100011001100101011101011111011111111000110100001110001110111010011101111101100110010010001000110101101100111101010110100100111000000001010110100111111111111001101110010111101010001100010011110100100011101011110110111111110000100011011001011110011010111100101001001101110100111011101001101011111111000111111010000101000011110111110010001110001010000100001011000111000101111010000111011000010110101001011101111010000000110011111101010110010011111100' -), + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_dpi_display.out b/test_regress/t/t_dpi_display.out new file mode 100644 index 000000000..5dc44d6f2 --- /dev/null +++ b/test_regress/t/t_dpi_display.out @@ -0,0 +1,11 @@ +dpii_display_call: '' +dpii_display_call: 'c' +dpii_display_call: 'co' +dpii_display_call: 'cons' +dpii_display_call: 'constant' +dpii_display_call: 'constant_value' +one10=0000000a +dpii_display_call: 'one10=0000000a' +Mod=top.t 16= 10 10=0000000a +dpii_display_call: 'Mod=top.t 16= 10 10=0000000a' +*-* All Finished *-* diff --git a/test_regress/t/t_dpi_display.pl b/test_regress/t/t_dpi_display.pl index 4999351dd..058201cc0 100755 --- a/test_regress/t/t_dpi_display.pl +++ b/test_regress/t/t_dpi_display.pl @@ -15,20 +15,8 @@ compile( execute( check_finished => 1, - expect => quotemeta( -q{dpii_display_call: '' -dpii_display_call: 'c' -dpii_display_call: 'co' -dpii_display_call: 'cons' -dpii_display_call: 'constant' -dpii_display_call: 'constant_value' -one10=0000000a -dpii_display_call: 'one10=0000000a' -Mod=top.t 16= 10 10=0000000a -dpii_display_call: 'Mod=top.t 16= 10 10=0000000a' -*-* All Finished *-* -}), - ); + expect_filename => $Self->{golden_filename}, + ); ok(1); 1; diff --git a/test_regress/t/t_dpi_dup_bad.out b/test_regress/t/t_dpi_dup_bad.out new file mode 100644 index 000000000..af98cf1bf --- /dev/null +++ b/test_regress/t/t_dpi_dup_bad.out @@ -0,0 +1,4 @@ +%Error: t/t_dpi_dup_bad.v:12: Duplicate declaration of DPI function with different formal arguments: t.oth_f_int2 +%Error: t/t_dpi_dup_bad.v:12: ... New prototype: pure int dpii_fa_bit (int, int) +%Error: t/t_dpi_dup_bad.v:11: ... Original prototype: int dpii_fa_bit (int) +%Error: Exiting due to diff --git a/test_regress/t/t_dpi_dup_bad.pl b/test_regress/t/t_dpi_dup_bad.pl index 890853aac..96456db03 100755 --- a/test_regress/t/t_dpi_dup_bad.pl +++ b/test_regress/t/t_dpi_dup_bad.pl @@ -12,11 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => $Self->{vlt_all}, - expect => -'%Error: t/t_dpi_dup_bad.v:\d+: Duplicate declaration of DPI function with different formal arguments: t.oth_f_int2 -%Error: t/t_dpi_dup_bad.v:\d+: ... New prototype: pure int dpii_fa_bit \(int, int\) -%Error: t/t_dpi_dup_bad.v:\d+: ... Original prototype: int dpii_fa_bit \(int\) -%Error: Exiting due to .*' + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_func_bad.out b/test_regress/t/t_func_bad.out new file mode 100644 index 000000000..a0a15d909 --- /dev/null +++ b/test_regress/t/t_func_bad.out @@ -0,0 +1,8 @@ +%Error: t/t_func_bad.v:8: Missing argument on non-defaulted argument 'from2' in function call to FUNC 'add' +%Error: t/t_func_bad.v:9: Too many arguments in function call to FUNC 'add' +%Error: t/t_func_bad.v:10: Missing argument on non-defaulted argument 'y' in function call to TASK 'x' +%Error: t/t_func_bad.v:10: Unsupported: Function output argument 'y' requires 1 bits, but connection's CONST '?32?h0' generates 32 bits. +%Error: t/t_func_bad.v:13: No such argument 'no_such' in function call to FUNC 'f' +%Error: t/t_func_bad.v:14: Duplicate argument 'dup' in function call to FUNC 'f' +%Error: t/t_func_bad.v:15: Too many arguments in function call to FUNC 'f' +%Error: Exiting due to diff --git a/test_regress/t/t_func_bad.pl b/test_regress/t/t_func_bad.pl index 7d8f21362..fdfdab856 100755 --- a/test_regress/t/t_func_bad.pl +++ b/test_regress/t/t_func_bad.pl @@ -12,15 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -q{%Error: t/t_func_bad.v:\d+: Missing argument on non-defaulted argument 'from2' in function call to FUNC 'add' -%Error: t/t_func_bad.v:\d+: Too many arguments in function call to FUNC 'add' -%Error: t/t_func_bad.v:\d+: Missing argument on non-defaulted argument 'y' in function call to TASK 'x' -%Error: t/t_func_bad.v:\d+: Unsupported: Function output argument 'y' requires 1 bits, but connection's CONST '.*' generates 32 bits. -%Error: t/t_func_bad.v:\d+: No such argument 'no_such' in function call to FUNC 'f' -%Error: t/t_func_bad.v:\d+: Duplicate argument 'dup' in function call to FUNC 'f' -%Error: t/t_func_bad.v:\d+: Too many arguments in function call to FUNC 'f' -%Error: Exiting due to}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_func_bad_width.out b/test_regress/t/t_func_bad_width.out new file mode 100644 index 000000000..88926d41d --- /dev/null +++ b/test_regress/t/t_func_bad_width.out @@ -0,0 +1,4 @@ +%Warning-WIDTH: t/t_func_bad_width.v:12: Operator FUNCREF 'MUX' expects 40 bits on the Function Argument, but Function Argument's VARREF 'in' generates 39 bits. +%Warning-WIDTH: Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message. +%Warning-WIDTH: t/t_func_bad_width.v:12: Operator ASSIGN expects 4 bits on the Assign RHS, but Assign RHS's FUNCREF 'MUX' generates 32 bits. +%Error: Exiting due to diff --git a/test_regress/t/t_func_bad_width.pl b/test_regress/t/t_func_bad_width.pl index 1fd45bb03..96456db03 100755 --- a/test_regress/t/t_func_bad_width.pl +++ b/test_regress/t/t_func_bad_width.pl @@ -12,11 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => $Self->{vlt_all}, - expect => -q{%Warning-WIDTH: t/t_func_bad_width.v:\d+: Operator FUNCREF 'MUX' expects 40 bits on the Function Argument, but Function Argument's VARREF 'in' generates 39 bits. -%Warning-WIDTH: Use [^\n]+ -%Warning-WIDTH: t/t_func_bad_width.v:\d+: Operator ASSIGN expects 4 bits on the Assign RHS, but Assign RHS.s FUNCREF 'MUX' generates 32 bits. -%Error: Exiting due to}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_func_const2_bad.out b/test_regress/t/t_func_const2_bad.out new file mode 100644 index 000000000..48d3b8c58 --- /dev/null +++ b/test_regress/t/t_func_const2_bad.out @@ -0,0 +1,14 @@ +%Warning-USERFATAL: f_add = 15 +%Warning-USERFATAL: Use "/* verilator lint_off USERFATAL */" and lint_on around source to disable this message. +%Error: t/t_func_const2_bad.v:10: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_add2' +%Error: t/t_func_const2_bad.v:21: ... Location of non-constant STOP: $stop executed during function constification; maybe indicates assertion firing +Called from: +t/t_func_const2_bad.v:26: f_add() with parameters: + a = 32'h7 + b = 32'h8 +Called from: +t/t_func_const2_bad.v:10: f_add2() with parameters: + a = ?32?sh7 + b = ?32?sh8 + c = ?32?sh9 +%Error: Exiting due to diff --git a/test_regress/t/t_func_const2_bad.pl b/test_regress/t/t_func_const2_bad.pl index 83548112c..e29c27375 100755 --- a/test_regress/t/t_func_const2_bad.pl +++ b/test_regress/t/t_func_const2_bad.pl @@ -12,21 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -q{%Warning-USERFATAL: f_add = 15 -%Warning-USERFATAL: Use "/* verilator lint_off USERFATAL */" and lint_on around source to disable this message. -%Error: t/t_func_const2_bad.v:10: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_add2' -%Error: t/t_func_const2_bad.v:21: ... Location of non-constant STOP: $stop executed during function constification; maybe indicates assertion firing -Called from: -t/t_func_const2_bad.v:26: f_add() with parameters: - a = 32'h7 - b = 32'h8 -Called from: -t/t_func_const2_bad.v:10: f_add2() with parameters: - a = ?32?sh7 - b = ?32?sh8 - c = ?32?sh9 -}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_func_const_bad.out b/test_regress/t/t_func_const_bad.out new file mode 100644 index 000000000..4caa310e7 --- /dev/null +++ b/test_regress/t/t_func_const_bad.out @@ -0,0 +1,33 @@ +%Error: t/t_func_const_bad.v:11: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_bad_output' +%Error: t/t_func_const_bad.v:12: ... Location of non-constant VAR 'o': Language violation: Outputs/refs not allowed in constant functions +%Error: t/t_func_const_bad.v:20: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_bad_dotted' +%Error: t/t_func_const_bad.v:22: ... Location of non-constant VARXREF 'EIGHT': Language violation: Dotted hierarchical references not allowed in constant functions +Called from: +t/t_func_const_bad.v:20: f_bad_dotted() with parameters: + a = ?32?sh2 +%Error: t/t_func_const_bad.v:27: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_bad_nonparam' +%Error: t/t_func_const_bad.v:29: ... Location of non-constant VARREF 'modvar': Language violation: reference to non-function-local variable +Called from: +t/t_func_const_bad.v:27: f_bad_nonparam() with parameters: + a = ?32?sh3 +%Error: t/t_func_const_bad.v:35: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_bad_infinite' +%Error: t/t_func_const_bad.v:37: ... Location of non-constant WHILE: Loop unrolling took too long; probably this is an infinite loop, or set --unroll-count above 1024 +Called from: +t/t_func_const_bad.v:35: f_bad_infinite() with parameters: + a = ?32?sh3 +%Error: t/t_func_const_bad.v:43: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_bad_stop' +%Error: t/t_func_const_bad.v:45: ... Location of non-constant STOP: $stop executed during function constification; maybe indicates assertion firing +Called from: +t/t_func_const_bad.v:43: f_bad_stop() with parameters: + a = ?32?sh3 +-Info: Printing in loop: 0 +-Info: Printing in loop: 1 +-Info: Printing in loop: 2 +%Warning-USERFATAL: Fatal Error +%Warning-USERFATAL: Use "/* verilator lint_off USERFATAL */" and lint_on around source to disable this message. +%Error: t/t_func_const_bad.v:49: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_bad_fatal' +%Error: t/t_func_const_bad.v:54: ... Location of non-constant STOP: $stop executed during function constification; maybe indicates assertion firing +Called from: +t/t_func_const_bad.v:49: f_bad_fatal() with parameters: + a = ?32?sh3 +%Error: Exiting due to diff --git a/test_regress/t/t_func_const_bad.pl b/test_regress/t/t_func_const_bad.pl index 22ee67228..8bc867659 100755 --- a/test_regress/t/t_func_const_bad.pl +++ b/test_regress/t/t_func_const_bad.pl @@ -12,41 +12,8 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -q{%Error: t/t_func_const_bad.v:11: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_bad_output' -%Error: t/t_func_const_bad.v:12: ... Location of non-constant VAR 'o': Language violation: Outputs/refs not allowed in constant functions -%Error: t/t_func_const_bad.v:20: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_bad_dotted' -%Error: t/t_func_const_bad.v:22: ... Location of non-constant VARXREF 'EIGHT': Language violation: Dotted hierarchical references not allowed in constant functions -Called from: -t/t_func_const_bad.v:20: f_bad_dotted() with parameters: - a = ?32?sh2 -%Error: t/t_func_const_bad.v:27: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_bad_nonparam' -%Error: t/t_func_const_bad.v:29: ... Location of non-constant VARREF 'modvar': Language violation: reference to non-function-local variable -Called from: -t/t_func_const_bad.v:27: f_bad_nonparam() with parameters: - a = ?32?sh3 -%Error: t/t_func_const_bad.v:35: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_bad_infinite' -%Error: t/t_func_const_bad.v:37: ... Location of non-constant WHILE: Loop unrolling took too long; probably this is an infinite loop, or set --unroll-count above 1024 -Called from: -t/t_func_const_bad.v:35: f_bad_infinite() with parameters: - a = ?32?sh3 -%Error: t/t_func_const_bad.v:43: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_bad_stop' -%Error: t/t_func_const_bad.v:45: ... Location of non-constant STOP: $stop executed during function constification; maybe indicates assertion firing -Called from: -t/t_func_const_bad.v:43: f_bad_stop() with parameters: - a = ?32?sh3 --Info: Printing in loop: 0 --Info: Printing in loop: 1 --Info: Printing in loop: 2 -%Warning-USERFATAL: Fatal Error -%Warning-USERFATAL: Use "/* verilator lint_off USERFATAL */" and lint_on around source to disable this message. -%Error: t/t_func_const_bad.v:49: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_bad_fatal' -%Error: t/t_func_const_bad.v:54: ... Location of non-constant STOP: $stop executed during function constification; maybe indicates assertion firing -Called from: -t/t_func_const_bad.v:49: f_bad_fatal() with parameters: - a = ?32?sh3 -}, - ); + expect_filename => $Self->{golden_filename}, + ); ok(1); 1; diff --git a/test_regress/t/t_func_const_packed_array_bad.out b/test_regress/t/t_func_const_packed_array_bad.out new file mode 100644 index 000000000..a05fa144c --- /dev/null +++ b/test_regress/t/t_func_const_packed_array_bad.out @@ -0,0 +1,13 @@ +%Warning-USERFATAL: f_add = 15 +%Warning-USERFATAL: Use "/* verilator lint_off USERFATAL */" and lint_on around source to disable this message. +%Error: t/t_func_const_packed_array_bad.v:11: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_add2' +%Error: t/t_func_const_packed_array_bad.v:22: ... Location of non-constant STOP: $stop executed during function constification; maybe indicates assertion firing +Called from: +t/t_func_const_packed_array_bad.v:30: f_add() with parameters: + params = [0 = 32'h7, 1 = 32'h8] +Called from: +t/t_func_const_packed_array_bad.v:11: f_add2() with parameters: + a = ?32?sh7 + b = ?32?sh8 + c = ?32?sh9 +%Error: Exiting due to diff --git a/test_regress/t/t_func_const_packed_array_bad.pl b/test_regress/t/t_func_const_packed_array_bad.pl index 1c4925e5a..e29c27375 100755 --- a/test_regress/t/t_func_const_packed_array_bad.pl +++ b/test_regress/t/t_func_const_packed_array_bad.pl @@ -12,20 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -q{%Warning-USERFATAL: f_add = 15 -%Warning-USERFATAL: Use "/* verilator lint_off USERFATAL */" and lint_on around source to disable this message. -%Error: t/t_func_const_packed_array_bad.v:11: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_add2' -%Error: t/t_func_const_packed_array_bad.v:22: ... Location of non-constant STOP: $stop executed during function constification; maybe indicates assertion firing -Called from: -t/t_func_const_packed_array_bad.v:30: f_add() with parameters: - params = [0 = 32'h7, 1 = 32'h8] -Called from: -t/t_func_const_packed_array_bad.v:11: f_add2() with parameters: - a = ?32?sh7 - b = ?32?sh8 - c = ?32?sh9 -}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_func_const_packed_struct_bad.out b/test_regress/t/t_func_const_packed_struct_bad.out new file mode 100644 index 000000000..2b59b7eda --- /dev/null +++ b/test_regress/t/t_func_const_packed_struct_bad.out @@ -0,0 +1,13 @@ +%Warning-USERFATAL: f_add = 15 +%Warning-USERFATAL: Use "/* verilator lint_off USERFATAL */" and lint_on around source to disable this message. +%Error: t/t_func_const_packed_struct_bad.v:13: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_add2' +%Error: t/t_func_const_packed_struct_bad.v:24: ... Location of non-constant STOP: $stop executed during function constification; maybe indicates assertion firing +Called from: +t/t_func_const_packed_struct_bad.v:32: f_add() with parameters: + params = [0 = '{a: 32'h7, b: 32'h22b}, 1 = '{a: 32'h3039, b: 32'h8}] +Called from: +t/t_func_const_packed_struct_bad.v:13: f_add2() with parameters: + a = ?32?sh7 + b = ?32?sh8 + c = ?32?sh9 +%Error: Exiting due to diff --git a/test_regress/t/t_func_const_packed_struct_bad.pl b/test_regress/t/t_func_const_packed_struct_bad.pl index b07a16aa8..e29c27375 100755 --- a/test_regress/t/t_func_const_packed_struct_bad.pl +++ b/test_regress/t/t_func_const_packed_struct_bad.pl @@ -12,20 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -q{%Warning-USERFATAL: f_add = 15 -%Warning-USERFATAL: Use "/* verilator lint_off USERFATAL */" and lint_on around source to disable this message. -%Error: t/t_func_const_packed_struct_bad.v:13: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_add2' -%Error: t/t_func_const_packed_struct_bad.v:24: ... Location of non-constant STOP: $stop executed during function constification; maybe indicates assertion firing -Called from: -t/t_func_const_packed_struct_bad.v:32: f_add() with parameters: - params = [0 = '{a: 32'h7, b: 32'h22b}, 1 = '{a: 32'h3039, b: 32'h8}] -Called from: -t/t_func_const_packed_struct_bad.v:13: f_add2() with parameters: - a = ?32?sh7 - b = ?32?sh8 - c = ?32?sh9 -}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_func_const_packed_struct_bad2.out b/test_regress/t/t_func_const_packed_struct_bad2.out new file mode 100644 index 000000000..e58c94383 --- /dev/null +++ b/test_regress/t/t_func_const_packed_struct_bad2.out @@ -0,0 +1,13 @@ +%Warning-USERFATAL: f_add = 15 +%Warning-USERFATAL: Use "/* verilator lint_off USERFATAL */" and lint_on around source to disable this message. +%Error: t/t_func_const_packed_struct_bad2.v:19: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_add2' +%Error: t/t_func_const_packed_struct_bad2.v:30: ... Location of non-constant STOP: $stop executed during function constification; maybe indicates assertion firing +Called from: +t/t_func_const_packed_struct_bad2.v:42: f_add() with parameters: + params = [0 = '{a: 32'h7, foo: 6'hb, sub_params: '{b: 32'h37, bar: 8'h6f}}, 1 = '{a: 32'h3039, foo: 6'hc, sub_params: '{b: 32'h8, bar: 8'h70}}] +Called from: +t/t_func_const_packed_struct_bad2.v:19: f_add2() with parameters: + a = ?32?sh7 + b = ?32?sh8 + c = ?32?sh9 +%Error: Exiting due to diff --git a/test_regress/t/t_func_const_packed_struct_bad2.pl b/test_regress/t/t_func_const_packed_struct_bad2.pl index d61e7daeb..e29c27375 100755 --- a/test_regress/t/t_func_const_packed_struct_bad2.pl +++ b/test_regress/t/t_func_const_packed_struct_bad2.pl @@ -12,20 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -q{%Warning-USERFATAL: f_add = 15 -%Warning-USERFATAL: Use "/* verilator lint_off USERFATAL */" and lint_on around source to disable this message. -%Error: t/t_func_const_packed_struct_bad2.v:19: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_add2' -%Error: t/t_func_const_packed_struct_bad2.v:30: ... Location of non-constant STOP: $stop executed during function constification; maybe indicates assertion firing -Called from: -t/t_func_const_packed_struct_bad2.v:42: f_add() with parameters: - params = [0 = '{a: 32'h7, foo: 6'hb, sub_params: '{b: 32'h37, bar: 8'h6f}}, 1 = '{a: 32'h3039, foo: 6'hc, sub_params: '{b: 32'h8, bar: 8'h70}}] -Called from: -t/t_func_const_packed_struct_bad2.v:19: f_add2() with parameters: - a = ?32?sh7 - b = ?32?sh8 - c = ?32?sh9 -}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_func_const_struct_bad.out b/test_regress/t/t_func_const_struct_bad.out new file mode 100644 index 000000000..7a693139a --- /dev/null +++ b/test_regress/t/t_func_const_struct_bad.out @@ -0,0 +1,13 @@ +%Warning-USERFATAL: f_add = 15 +%Warning-USERFATAL: Use "/* verilator lint_off USERFATAL */" and lint_on around source to disable this message. +%Error: t/t_func_const_struct_bad.v:16: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_add2' +%Error: t/t_func_const_struct_bad.v:27: ... Location of non-constant STOP: $stop executed during function constification; maybe indicates assertion firing +Called from: +t/t_func_const_struct_bad.v:37: f_add() with parameters: + params = '{a: 32'h7, b: 32'h8} +Called from: +t/t_func_const_struct_bad.v:16: f_add2() with parameters: + a = ?32?sh7 + b = ?32?sh8 + c = ?32?sh9 +%Error: Exiting due to diff --git a/test_regress/t/t_func_const_struct_bad.pl b/test_regress/t/t_func_const_struct_bad.pl index 5395c257e..e29c27375 100755 --- a/test_regress/t/t_func_const_struct_bad.pl +++ b/test_regress/t/t_func_const_struct_bad.pl @@ -12,20 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -q{%Warning-USERFATAL: f_add = 15 -%Warning-USERFATAL: Use "/* verilator lint_off USERFATAL */" and lint_on around source to disable this message. -%Error: t/t_func_const_struct_bad.v:16: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_add2' -%Error: t/t_func_const_struct_bad.v:27: ... Location of non-constant STOP: $stop executed during function constification; maybe indicates assertion firing -Called from: -t/t_func_const_struct_bad.v:37: f_add() with parameters: - params = '{a: 32'h7, b: 32'h8} -Called from: -t/t_func_const_struct_bad.v:16: f_add2() with parameters: - a = ?32?sh7 - b = ?32?sh8 - c = ?32?sh9 -}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_gen_cond_bitrange_bad.out b/test_regress/t/t_gen_cond_bitrange_bad.out new file mode 100644 index 000000000..0026efaeb --- /dev/null +++ b/test_regress/t/t_gen_cond_bitrange_bad.out @@ -0,0 +1,6 @@ +%Warning-SELRANGE: t/t_gen_cond_bitrange_bad.v:58: Selection index out of range: 2:2 outside 1:0 +%Warning-SELRANGE: Use "/* verilator lint_off SELRANGE */" and lint_on around source to disable this message. +%Warning-SELRANGE: t/t_gen_cond_bitrange_bad.v:70: Selection index out of range: 2:2 outside 1:0 +%Warning-SELRANGE: t/t_gen_cond_bitrange_bad.v:83: Selection index out of range: 2:2 outside 1:0 +%Warning-SELRANGE: t/t_gen_cond_bitrange_bad.v:96: Selection index out of range: 2:2 outside 1:0 +%Error: Exiting due to diff --git a/test_regress/t/t_gen_cond_bitrange_bad.pl b/test_regress/t/t_gen_cond_bitrange_bad.pl index 3cec319f2..8bc867659 100755 --- a/test_regress/t/t_gen_cond_bitrange_bad.pl +++ b/test_regress/t/t_gen_cond_bitrange_bad.pl @@ -12,13 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -q{%Warning-SELRANGE: t/t_gen_cond_bitrange_bad.v:\d+: Selection index out of range: 2:2 outside 1:0 -%Warning-SELRANGE: Use .* -%Warning-SELRANGE: t/t_gen_cond_bitrange_bad.v:\d+: Selection index out of range: 2:2 outside 1:0 -%Warning-SELRANGE: t/t_gen_cond_bitrange_bad.v:\d+: Selection index out of range: 2:2 outside 1:0 -%Warning-SELRANGE: t/t_gen_cond_bitrange_bad.v:\d+: Selection index out of range: 2:2 outside 1:0 -%Error: Exiting due to .*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_gen_missing_bad.out b/test_regress/t/t_gen_missing_bad.out new file mode 100644 index 000000000..cd887c786 --- /dev/null +++ b/test_regress/t/t_gen_missing_bad.out @@ -0,0 +1,18 @@ +%Error: t/t_gen_missing.v:42: Cannot find file containing module: foo_not_needed +%Error: t/t_gen_missing.v:42: Looked in: +%Error: t/t_gen_missing.v:42: t/foo_not_needed +%Error: t/t_gen_missing.v:42: t/foo_not_needed.v +%Error: t/t_gen_missing.v:42: t/foo_not_needed.sv +%Error: t/t_gen_missing.v:42: obj_dir//foo_not_needed +%Error: t/t_gen_missing.v:42: obj_dir//foo_not_needed.v +%Error: t/t_gen_missing.v:42: obj_dir//foo_not_needed.sv +%Error: t/t_gen_missing.v:42: ../include/foo_not_needed +%Error: t/t_gen_missing.v:42: ../include/foo_not_needed.v +%Error: t/t_gen_missing.v:42: ../include/foo_not_needed.sv +%Error: t/t_gen_missing.v:42: foo_not_needed +%Error: t/t_gen_missing.v:42: foo_not_needed.v +%Error: t/t_gen_missing.v:42: foo_not_needed.sv +%Error: t/t_gen_missing.v:42: obj_vlt/t_gen_missing_bad/foo_not_needed +%Error: t/t_gen_missing.v:42: obj_vlt/t_gen_missing_bad/foo_not_needed.v +%Error: t/t_gen_missing.v:42: obj_vlt/t_gen_missing_bad/foo_not_needed.sv +%Error: Exiting due to diff --git a/test_regress/t/t_gen_missing_bad.pl b/test_regress/t/t_gen_missing_bad.pl index 407bc7eb2..98670e56d 100755 --- a/test_regress/t/t_gen_missing_bad.pl +++ b/test_regress/t/t_gen_missing_bad.pl @@ -14,13 +14,7 @@ top_filename("t/t_gen_missing.v"); compile( v_flags2 => ['+define+T_GEN_MISSING_BAD'], fails => 1, - expect => -'%Error: t/t_gen_missing.v:\d+: Cannot find file containing module: foo_not_needed -%Error: t/t_gen_missing.v:\d+: Looked in: -%Error: t/t_gen_missing.v:\d+: t/foo_not_needed -%Error: t/t_gen_missing.v:\d+: t/foo_not_needed.v -%Error: t/t_gen_missing.v:\d+: t/foo_not_needed.sv -.*%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_gen_upscope.out b/test_regress/t/t_gen_upscope.out new file mode 100644 index 000000000..d20955fe2 --- /dev/null +++ b/test_regress/t/t_gen_upscope.out @@ -0,0 +1,12 @@ +created tag with scope = top.t.b.gen[0].tag +created tag with scope = top.t.b.gen[1].tag +created tag with scope = top.t.tag +mod a has scope = top.t +mod a has tag = top.t.tag +mod b has scope = top.t.b +mod b has tag = top.t.tag +mod c has scope = top.t.b.gen[0].c +mod c has tag = top.t.b.gen[0].tag +mod c has scope = top.t.b.gen[1].c +mod c has tag = top.t.b.gen[1].tag +*-* All Finished *-* diff --git a/test_regress/t/t_gen_upscope.pl b/test_regress/t/t_gen_upscope.pl index 7b502e256..f79178f86 100755 --- a/test_regress/t/t_gen_upscope.pl +++ b/test_regress/t/t_gen_upscope.pl @@ -14,19 +14,7 @@ compile( execute( check_finished => 1, - expect => quotemeta( -q{created tag with scope = top.t.b.gen[0].tag -created tag with scope = top.t.b.gen[1].tag -created tag with scope = top.t.tag -mod a has scope = top.t -mod a has tag = top.t.tag -mod b has scope = top.t.b -mod b has tag = top.t.tag -mod c has scope = top.t.b.gen[0].c -mod c has tag = top.t.b.gen[0].tag -mod c has scope = top.t.b.gen[1].c -mod c has tag = top.t.b.gen[1].tag -*-* All Finished *-*}), + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_hierarchy_identifier_bad.out b/test_regress/t/t_hierarchy_identifier_bad.out new file mode 100644 index 000000000..0da1c3aa0 --- /dev/null +++ b/test_regress/t/t_hierarchy_identifier_bad.out @@ -0,0 +1,7 @@ +%Warning-ENDLABEL: t/t_hierarchy_identifier_bad.v:33: End label 'if_cnt_finish_bad' does not match begin label 'if_cnt_finish' +%Warning-ENDLABEL: Use "/* verilator lint_off ENDLABEL */" and lint_on around source to disable this message. +%Warning-ENDLABEL: t/t_hierarchy_identifier_bad.v:39: End label 'generate_for_bad' does not match begin label 'generate_for' +%Warning-ENDLABEL: t/t_hierarchy_identifier_bad.v:46: End label 'generate_if_if_bad' does not match begin label 'generate_if_if' +%Warning-ENDLABEL: t/t_hierarchy_identifier_bad.v:50: End label 'generate_if_else_bad' does not match begin label 'generate_if_else' +%Warning-ENDLABEL: t/t_hierarchy_identifier_bad.v:53: End label 't_bad' does not match begin label 't' +%Error: Exiting due to diff --git a/test_regress/t/t_hierarchy_identifier_bad.pl b/test_regress/t/t_hierarchy_identifier_bad.pl index 5f1ed88d5..8bc867659 100755 --- a/test_regress/t/t_hierarchy_identifier_bad.pl +++ b/test_regress/t/t_hierarchy_identifier_bad.pl @@ -12,15 +12,8 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -q{%Warning-ENDLABEL: t/t_hierarchy_identifier_bad.v:\d+: End label 'if_cnt_finish_bad' does not match begin label 'if_cnt_finish' -%Warning-ENDLABEL: Use .* -%Warning-ENDLABEL: t/t_hierarchy_identifier_bad.v:\d+: End label 'generate_for_bad' does not match begin label 'generate_for' -%Warning-ENDLABEL: t/t_hierarchy_identifier_bad.v:\d+: End label 'generate_if_if_bad' does not match begin label 'generate_if_if' -%Warning-ENDLABEL: t/t_hierarchy_identifier_bad.v:\d+: End label 'generate_if_else_bad' does not match begin label 'generate_if_else' -%Warning-ENDLABEL: t/t_hierarchy_identifier_bad.v:\d+: End label 't_bad' does not match begin label 't' -%Error: Exiting due to.*}, - ); + expect_filename => $Self->{golden_filename}, + ); ok(1); 1; diff --git a/test_regress/t/t_inst_missing_bad.out b/test_regress/t/t_inst_missing_bad.out new file mode 100644 index 000000000..ddb56f204 --- /dev/null +++ b/test_regress/t/t_inst_missing_bad.out @@ -0,0 +1,5 @@ +%Warning-PINNOCONNECT: t/t_inst_missing_bad.v:8: Cell pin is not connected: __pinNumber2 +%Warning-PINNOCONNECT: Use "/* verilator lint_off PINNOCONNECT */" and lint_on around source to disable this message. +%Warning-PINCONNECTEMPTY: t/t_inst_missing_bad.v:8: Cell pin connected by name with empty reference: nc +%Warning-PINMISSING: t/t_inst_missing_bad.v:8: Cell has missing pin: missing +%Error: Exiting due to diff --git a/test_regress/t/t_inst_missing_bad.pl b/test_regress/t/t_inst_missing_bad.pl index cac41ce28..9a2dc5fca 100755 --- a/test_regress/t/t_inst_missing_bad.pl +++ b/test_regress/t/t_inst_missing_bad.pl @@ -12,12 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only --Wall -Wno-DECLFILENAME"], fails => 1, - expect => -q{%Warning-PINNOCONNECT: t/t_inst_missing_bad.v:8: Cell pin is not connected: __pinNumber2 -%Warning-PINNOCONNECT: Use .* -%Warning-PINCONNECTEMPTY: t/t_inst_missing_bad.v:8: Cell pin connected by name with empty reference: nc -%Warning-PINMISSING: t/t_inst_missing_bad.v:8: Cell has missing pin: missing -%Error: Exiting due to.*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_inst_overwide_bad.out b/test_regress/t/t_inst_overwide_bad.out new file mode 100644 index 000000000..88dbf90f0 --- /dev/null +++ b/test_regress/t/t_inst_overwide_bad.out @@ -0,0 +1,6 @@ +%Warning-WIDTH: t/t_inst_overwide.v:22: Output port connection 'outy_w92' expects 92 bits on the pin connection, but pin connection's VARREF 'outc_w30' generates 30 bits. +%Warning-WIDTH: Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message. +%Warning-WIDTH: t/t_inst_overwide.v:23: Output port connection 'outz_w22' expects 22 bits on the pin connection, but pin connection's VARREF 'outd_w73' generates 73 bits. +%Warning-WIDTH: t/t_inst_overwide.v:26: Input port connection 'inw_w31' expects 31 bits on the pin connection, but pin connection's VARREF 'ina_w1' generates 1 bits. +%Warning-WIDTH: t/t_inst_overwide.v:27: Input port connection 'inx_w11' expects 11 bits on the pin connection, but pin connection's VARREF 'inb_w61' generates 61 bits. +%Error: Exiting due to diff --git a/test_regress/t/t_inst_overwide_bad.pl b/test_regress/t/t_inst_overwide_bad.pl index 83535d6e1..413bd59e7 100755 --- a/test_regress/t/t_inst_overwide_bad.pl +++ b/test_regress/t/t_inst_overwide_bad.pl @@ -17,13 +17,7 @@ compile( verilator_flags => [qw(-cc)], verilator_make_gcc => 0, fails => $Self->{vlt_all}, - expect => -q{%Warning-WIDTH: t/t_inst_overwide.v:\d+: Output port connection 'outy_w92' expects 92 bits on the pin connection, but pin connection's VARREF 'outc_w30' generates 30 bits. -%Warning-WIDTH: Use .* to disable this message. -%Warning-WIDTH: t/t_inst_overwide.v:\d+: Output port connection 'outz_w22' expects 22 bits on the pin connection, but pin connection's VARREF 'outd_w73' generates 73 bits. -%Warning-WIDTH: t/t_inst_overwide.v:\d+: Input port connection 'inw_w31' expects 31 bits on the pin connection, but pin connection's VARREF 'ina_w1' generates 1 bits. -%Warning-WIDTH: t/t_inst_overwide.v:\d+: Input port connection 'inx_w11' expects 11 bits on the pin connection, but pin connection's VARREF 'inb_w61' generates 61 bits. -%Error: Exiting due to.*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_interface_array_nocolon_bad.out b/test_regress/t/t_interface_array_nocolon_bad.out new file mode 100644 index 000000000..363dc8cb5 --- /dev/null +++ b/test_regress/t/t_interface_array_nocolon_bad.out @@ -0,0 +1,6 @@ +%Warning-LITENDIAN: t/t_interface_array_nocolon_bad.v:25: Little endian cell range connecting to vector: MSB < LSB of cell range: 0:2 +%Warning-LITENDIAN: Use "/* verilator lint_off LITENDIAN */" and lint_on around source to disable this message. +%Warning-LITENDIAN: t/t_interface_array_nocolon_bad.v:26: Little endian cell range connecting to vector: MSB < LSB of cell range: 1:3 +%Warning-LITENDIAN: t/t_interface_array_nocolon_bad.v:29: Little endian cell range connecting to vector: MSB < LSB of cell range: 0:2 +%Warning-LITENDIAN: t/t_interface_array_nocolon_bad.v:30: Little endian cell range connecting to vector: MSB < LSB of cell range: 1:3 +%Error: Exiting due to diff --git a/test_regress/t/t_interface_array_nocolon_bad.pl b/test_regress/t/t_interface_array_nocolon_bad.pl index 4a4d8ea9a..96456db03 100755 --- a/test_regress/t/t_interface_array_nocolon_bad.pl +++ b/test_regress/t/t_interface_array_nocolon_bad.pl @@ -12,13 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => $Self->{vlt_all}, - expect => -q{%Warning-LITENDIAN: t/t_interface_array_nocolon_bad.v:\d+: Little endian cell range connecting to vector: MSB < LSB of cell range: 0:2 -%Warning-LITENDIAN: Use [^\n]+ -%Warning-LITENDIAN: t/t_interface_array_nocolon_bad.v:\d+: Little endian cell range connecting to vector: MSB < LSB of cell range: 1:3 -%Warning-LITENDIAN: t/t_interface_array_nocolon_bad.v:\d+: Little endian cell range connecting to vector: MSB < LSB of cell range: 0:2 -%Warning-LITENDIAN: t/t_interface_array_nocolon_bad.v:\d+: Little endian cell range connecting to vector: MSB < LSB of cell range: 1:3 -%Error: Exiting due to}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_interface_size_bad.out b/test_regress/t/t_interface_size_bad.out new file mode 100644 index 000000000..223198a17 --- /dev/null +++ b/test_regress/t/t_interface_size_bad.out @@ -0,0 +1,3 @@ +%Error: t/t_interface_size_bad.v:15: Illegal port connection 'foo', mismatch between port which is an interface array of size 5, and expression which is an interface array of size 4. +%Error: t/t_interface_size_bad.v:16: Illegal port connection 'foo', mismatch between port which is an interface array of size 5, and expression which is an interface array of size 6. +%Error: Exiting due to diff --git a/test_regress/t/t_interface_size_bad.pl b/test_regress/t/t_interface_size_bad.pl index 8ffad8833..3361369bf 100755 --- a/test_regress/t/t_interface_size_bad.pl +++ b/test_regress/t/t_interface_size_bad.pl @@ -11,10 +11,7 @@ scenarios(simulator => 1); compile( fails => 1, - expect => -q{%Error: t/t_interface_size_bad.v:\d+: Illegal port connection 'foo', mismatch between port which is an interface array of size 5, and expression which is an interface array of size 4. -%Error: t/t_interface_size_bad.v:\d+: Illegal port connection 'foo', mismatch between port which is an interface array of size 5, and expression which is an interface array of size 6. -%Error: Exiting due to.*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_blksync_bad.out b/test_regress/t/t_lint_blksync_bad.out new file mode 100644 index 000000000..1d4ffef0f --- /dev/null +++ b/test_regress/t/t_lint_blksync_bad.out @@ -0,0 +1,6 @@ +%Warning-BLKSEQ: t/t_lint_blksync_bad.v:23: Blocking assignments (=) in sequential (flop or latch) block; suggest delayed assignments (<=). +%Warning-BLKSEQ: Use "/* verilator lint_off BLKSEQ */" and lint_on around source to disable this message. +%Warning-COMBDLY: t/t_lint_blksync_bad.v:30: Delayed assignments (<=) in non-clocked (non flop or latch) block; suggest blocking assignments (=). +%Warning-COMBDLY: *** See the manual before disabling this, +%Warning-COMBDLY: else you may end up with different sim results. +%Error: Exiting due to diff --git a/test_regress/t/t_lint_blksync_bad.pl b/test_regress/t/t_lint_blksync_bad.pl index 099a67126..4da2ba728 100755 --- a/test_regress/t/t_lint_blksync_bad.pl +++ b/test_regress/t/t_lint_blksync_bad.pl @@ -15,13 +15,7 @@ compile( verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect => -'%Warning-BLKSEQ: t/t_lint_blksync_bad.v:\d+: Blocking assignments \(=\) in sequential \(flop or latch\) block; suggest delayed assignments \(<=\). -%Warning-BLKSEQ: Use .* to disable this message. -%Warning-COMBDLY: t/t_lint_blksync_bad.v:\d+: Delayed assignments \(<=\) in non-clocked \(non flop or latch\) block; suggest blocking assignments \(=\). -%Warning-COMBDLY: \*\*\* See the manual before disabling this, -%Warning-COMBDLY: else you may end up with different sim results. -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_implicit_bad.out b/test_regress/t/t_lint_implicit_bad.out new file mode 100644 index 000000000..207a453ec --- /dev/null +++ b/test_regress/t/t_lint_implicit_bad.out @@ -0,0 +1,6 @@ +%Warning-IMPLICIT: t/t_lint_implicit.v:10: Signal definition not found, creating implicitly: b +%Warning-IMPLICIT: Use "/* verilator lint_off IMPLICIT */" and lint_on around source to disable this message. +%Warning-IMPLICIT: t/t_lint_implicit.v:12: Signal definition not found, creating implicitly: nt0 +%Warning-IMPLICIT: t/t_lint_implicit.v:15: Signal definition not found, creating implicitly: dummy1 +%Warning-IMPLICIT: t/t_lint_implicit.v:15: Signal definition not found, creating implicitly: dummy2 +%Error: Exiting due to diff --git a/test_regress/t/t_lint_implicit_bad.pl b/test_regress/t/t_lint_implicit_bad.pl index 541b8f1e5..0971891d6 100755 --- a/test_regress/t/t_lint_implicit_bad.pl +++ b/test_regress/t/t_lint_implicit_bad.pl @@ -14,13 +14,7 @@ top_filename("t/t_lint_implicit.v"); compile( v_flags2 => ["--lint-only -Wwarn-IMPLICIT"], fails => 1, - expect => -'%Warning-IMPLICIT: t/t_lint_implicit.v:\d+: Signal definition not found, creating implicitly: b -%Warning-IMPLICIT: Use .* to disable this message. -%Warning-IMPLICIT: t/t_lint_implicit.v:\d+: Signal definition not found, creating implicitly: nt0 -%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.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_implicit_def_bad.out b/test_regress/t/t_lint_implicit_def_bad.out new file mode 100644 index 000000000..8227b7f38 --- /dev/null +++ b/test_regress/t/t_lint_implicit_def_bad.out @@ -0,0 +1,4 @@ +%Warning-IMPLICIT: t/t_lint_implicit_def_bad.v:10: 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:15: Signal definition not found, and implicit disabled with `default_nettype: imp_err +%Error: Exiting due to diff --git a/test_regress/t/t_lint_implicit_def_bad.pl b/test_regress/t/t_lint_implicit_def_bad.pl index 9d74fa4f5..827d54923 100755 --- a/test_regress/t/t_lint_implicit_def_bad.pl +++ b/test_regress/t/t_lint_implicit_def_bad.pl @@ -12,11 +12,7 @@ scenarios(vlt_all => 1); compile( 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.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_infinite.out b/test_regress/t/t_lint_infinite.out new file mode 100644 index 000000000..420d93243 --- /dev/null +++ b/test_regress/t/t_lint_infinite.out @@ -0,0 +1,4 @@ +%Warning-INFINITELOOP: t/t_lint_infinite.v:9: Infinite loop (condition always true) +%Warning-INFINITELOOP: Use "/* verilator lint_off INFINITELOOP */" and lint_on around source to disable this message. +%Warning-INFINITELOOP: t/t_lint_infinite.v:11: Infinite loop (condition always true) +%Error: Exiting due to diff --git a/test_regress/t/t_lint_infinite.pl b/test_regress/t/t_lint_infinite.pl index c717c1b23..9b5936a1d 100755 --- a/test_regress/t/t_lint_infinite.pl +++ b/test_regress/t/t_lint_infinite.pl @@ -15,11 +15,7 @@ compile( make_main => 0, verilator_make_gcc => 0, fails => 1, - expect => -'%Warning-INFINITELOOP: t/t_lint_infinite.v:\d+: Infinite loop \(condition always true\) -%Warning-INFINITELOOP: Use .* -%Warning-INFINITELOOP: t/t_lint_infinite.v:\d+: Infinite loop \(condition always true\) -.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_latch_bad.out b/test_regress/t/t_lint_latch_bad.out new file mode 100644 index 000000000..aa66c70f9 --- /dev/null +++ b/test_regress/t/t_lint_latch_bad.out @@ -0,0 +1,5 @@ +%Warning-COMBDLY: t/t_lint_latch_bad.v:24: Delayed assignments (<=) in non-clocked (non flop or latch) block; suggest blocking assignments (=). +%Warning-COMBDLY: Use "/* verilator lint_off COMBDLY */" and lint_on around source to disable this message. +%Warning-COMBDLY: *** See the manual before disabling this, +%Warning-COMBDLY: else you may end up with different sim results. +%Error: Exiting due to diff --git a/test_regress/t/t_lint_latch_bad.pl b/test_regress/t/t_lint_latch_bad.pl index 518c711ae..41457686b 100755 --- a/test_regress/t/t_lint_latch_bad.pl +++ b/test_regress/t/t_lint_latch_bad.pl @@ -15,13 +15,7 @@ compile( verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect => -quotemeta( -'%Warning-COMBDLY: t/t_lint_latch_bad.v:24: Delayed assignments (<=) in non-clocked (non flop or latch) block; suggest blocking assignments (=). -%Warning-COMBDLY: Use "/* verilator lint_off COMBDLY */" and lint_on around source to disable this message. -%Warning-COMBDLY: *** See the manual before disabling this, -%Warning-COMBDLY: else you may end up with different sim results. -%Error: Exiting due to 1 warning').'.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_multidriven_bad.out b/test_regress/t/t_lint_multidriven_bad.out new file mode 100644 index 000000000..9936093ac --- /dev/null +++ b/test_regress/t/t_lint_multidriven_bad.out @@ -0,0 +1,8 @@ +%Warning-MULTIDRIVEN: t/t_lint_multidriven_bad.v:20: Signal has multiple driving blocks with different clocking: t.mem +%Warning-MULTIDRIVEN: t/t_lint_multidriven_bad.v:26: ... Location of first driving block +%Warning-MULTIDRIVEN: t/t_lint_multidriven_bad.v:23: ... Location of other driving block +%Warning-MULTIDRIVEN: Use "/* verilator lint_off MULTIDRIVEN */" and lint_on around source to disable this message. +%Warning-MULTIDRIVEN: t/t_lint_multidriven_bad.v:18: Signal has multiple driving blocks with different clocking: out2 +%Warning-MULTIDRIVEN: t/t_lint_multidriven_bad.v:34: ... Location of first driving block +%Warning-MULTIDRIVEN: t/t_lint_multidriven_bad.v:31: ... Location of other driving block +%Error: Exiting due to diff --git a/test_regress/t/t_lint_multidriven_bad.pl b/test_regress/t/t_lint_multidriven_bad.pl index 627ccd56d..022fe59ea 100755 --- a/test_regress/t/t_lint_multidriven_bad.pl +++ b/test_regress/t/t_lint_multidriven_bad.pl @@ -15,15 +15,7 @@ compile( verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect => -'%Warning-MULTIDRIVEN: t/t_lint_multidriven_bad.v:\d+: Signal has multiple driving blocks with different clocking: t.mem -%Warning-MULTIDRIVEN: t/t_lint_multidriven_bad.v:\d+: ... Location of first driving block -%Warning-MULTIDRIVEN: t/t_lint_multidriven_bad.v:\d+: ... Location of other driving block -%Warning-MULTIDRIVEN: Use ".*" and lint_on around source to disable this message. -%Warning-MULTIDRIVEN: t/t_lint_multidriven_bad.v:\d+: Signal has multiple driving blocks with different clocking: out2 -%Warning-MULTIDRIVEN: t/t_lint_multidriven_bad.v:\d+: ... Location of first driving block -%Warning-MULTIDRIVEN: t/t_lint_multidriven_bad.v:\d+: ... Location of other driving block -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_pindup_bad.out b/test_regress/t/t_lint_pindup_bad.out new file mode 100644 index 000000000..b013a844f --- /dev/null +++ b/test_regress/t/t_lint_pindup_bad.out @@ -0,0 +1,6 @@ +%Error: t/t_lint_pindup_bad.v:17: Duplicate pin connection: i +%Error: t/t_lint_pindup_bad.v:16: ... Location of original pin connection +%Error: t/t_lint_pindup_bad.v:18: Pin not found: __pinNumber4 +%Error: t/t_lint_pindup_bad.v:14: Duplicate parameter pin connection: P +%Error: t/t_lint_pindup_bad.v:14: ... Location of original parameter pin connection +%Error: Exiting due to diff --git a/test_regress/t/t_lint_pindup_bad.pl b/test_regress/t/t_lint_pindup_bad.pl index 3015d3519..022fe59ea 100755 --- a/test_regress/t/t_lint_pindup_bad.pl +++ b/test_regress/t/t_lint_pindup_bad.pl @@ -15,13 +15,7 @@ compile( verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect => -'%Error: t/t_lint_pindup_bad.v:\d+: Duplicate pin connection: i -%Error: t/t_lint_pindup_bad.v:\d+: ... Location of original pin connection -%Error: t/t_lint_pindup_bad.v:\d+: Pin not found: __pinNumber4 -%Error: t/t_lint_pindup_bad.v:\d+: Duplicate parameter pin connection: P -%Error: t/t_lint_pindup_bad.v:\d+: ... Location of original parameter pin connection -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_pkg_colon_bad.out b/test_regress/t/t_lint_pkg_colon_bad.out new file mode 100644 index 000000000..7bddff295 --- /dev/null +++ b/test_regress/t/t_lint_pkg_colon_bad.out @@ -0,0 +1,4 @@ +%Error: t/t_lint_pkg_colon_bad.v:6: syntax error, unexpected ::, expecting ')' or ',' +%Error: t/t_lint_pkg_colon_bad.v:6: Perhaps 'mispkg' is a package which needs to be predeclared? (IEEE 2017 26.3) +%Error: t/t_lint_pkg_colon_bad.v:7: syntax error, unexpected ::, expecting ',' or ';' +%Error: Exiting due to diff --git a/test_regress/t/t_lint_pkg_colon_bad.pl b/test_regress/t/t_lint_pkg_colon_bad.pl index 1a04c85a0..022fe59ea 100755 --- a/test_regress/t/t_lint_pkg_colon_bad.pl +++ b/test_regress/t/t_lint_pkg_colon_bad.pl @@ -15,11 +15,7 @@ compile( verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect => quotemeta( -qq{%Error: t/t_lint_pkg_colon_bad.v:6: syntax error, unexpected ::, expecting ')' or ',' -%Error: t/t_lint_pkg_colon_bad.v:6: Perhaps 'mispkg' is a package which needs to be predeclared? (IEEE 2017 26.3) -%Error: t/t_lint_pkg_colon_bad.v:7: syntax error, unexpected ::, expecting ',' or ';' -}).'%Error: Exiting due to.*' + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_syncasyncnet_bad.out b/test_regress/t/t_lint_syncasyncnet_bad.out new file mode 100644 index 000000000..45b959673 --- /dev/null +++ b/test_regress/t/t_lint_syncasyncnet_bad.out @@ -0,0 +1,5 @@ +%Warning-SYNCASYNCNET: t/t_lint_syncasyncnet_bad.v:15: Signal flopped as both synchronous and async: rst_both_l +%Warning-SYNCASYNCNET: t/t_lint_syncasyncnet_bad.v:90: ... Location of async usage +%Warning-SYNCASYNCNET: t/t_lint_syncasyncnet_bad.v:58: ... Location of sync usage +%Warning-SYNCASYNCNET: Use "/* verilator lint_off SYNCASYNCNET */" and lint_on around source to disable this message. +%Error: Exiting due to diff --git a/test_regress/t/t_lint_syncasyncnet_bad.pl b/test_regress/t/t_lint_syncasyncnet_bad.pl index e907c3f4a..a1c7569ad 100755 --- a/test_regress/t/t_lint_syncasyncnet_bad.pl +++ b/test_regress/t/t_lint_syncasyncnet_bad.pl @@ -15,12 +15,7 @@ compile( verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect => -'%Warning-SYNCASYNCNET: t/t_lint_syncasyncnet_bad.v:\d+: Signal flopped as both synchronous and async: rst_both_l -%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 -%Warning-SYNCASYNCNET: Use .* around source to disable this message. -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_unsized_bad.out b/test_regress/t/t_lint_unsized_bad.out new file mode 100644 index 000000000..91eebe714 --- /dev/null +++ b/test_regress/t/t_lint_unsized_bad.out @@ -0,0 +1,3 @@ +%Error: t/t_lint_unsized_bad.v:7: Too many digits for 32 bit number: 'd123456789123456789123456789 +%Error: t/t_lint_unsized_bad.v:7: As that number was unsized ('d...) it is limited to 32 bits (IEEE 2017 5.7.1) +%Error: Exiting due to diff --git a/test_regress/t/t_lint_unsized_bad.pl b/test_regress/t/t_lint_unsized_bad.pl index 96c9046aa..022fe59ea 100755 --- a/test_regress/t/t_lint_unsized_bad.pl +++ b/test_regress/t/t_lint_unsized_bad.pl @@ -15,10 +15,7 @@ compile( verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect => quotemeta( -qq{%Error: t/t_lint_unsized_bad.v:7: Too many digits for 32 bit number: 'd123456789123456789123456789 -%Error: t/t_lint_unsized_bad.v:7: As that number was unsized ('d...) it is limited to 32 bits (IEEE 2017 5.7.1) -}).'%Error: Exiting due to.*' + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_unused_bad.out b/test_regress/t/t_lint_unused_bad.out new file mode 100644 index 000000000..aa38595c4 --- /dev/null +++ b/test_regress/t/t_lint_unused_bad.out @@ -0,0 +1,8 @@ +%Warning-UNUSED: t/t_lint_unused_bad.v:16: Bits of signal are not used: assunu1[5:1] +%Warning-UNUSED: Use "/* verilator lint_off UNUSED */" and lint_on around source to disable this message. +%Warning-UNDRIVEN: t/t_lint_unused_bad.v:20: Bits of signal are not driven: udrb2[14:13,11] +%Warning-UNUSED: t/t_lint_unused_bad.v:25: Signal is not driven, nor used: unu3 +%Warning-UNUSED: t/t_lint_unused_bad.v:27: Bits of signal are not driven, nor used: mixed[3] +%Warning-UNUSED: t/t_lint_unused_bad.v:27: Bits of signal are not used: mixed[2] +%Warning-UNDRIVEN: t/t_lint_unused_bad.v:27: Bits of signal are not driven: mixed[1] +%Error: Exiting due to diff --git a/test_regress/t/t_lint_unused_bad.pl b/test_regress/t/t_lint_unused_bad.pl index 4def8e938..d90485d28 100755 --- a/test_regress/t/t_lint_unused_bad.pl +++ b/test_regress/t/t_lint_unused_bad.pl @@ -15,15 +15,7 @@ compile( verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect => -'%Warning-UNUSED: t/t_lint_unused_bad.v:\d+: Bits of signal are not used: assunu1\[5:1\] -%Warning-UNUSED: Use .* to disable this message. -%Warning-UNDRIVEN: t/t_lint_unused_bad.v:\d+: Bits of signal are not driven: udrb2\[14:13,11\] -%Warning-UNUSED: t/t_lint_unused_bad.v:\d+: Signal is not driven, nor used: unu3 -%Warning-UNUSED: t/t_lint_unused_bad.v:\d+: Bits of signal are not driven, nor used: mixed\[3\] -%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.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_unused_iface_bad.out b/test_regress/t/t_lint_unused_iface_bad.out new file mode 100644 index 000000000..597313383 --- /dev/null +++ b/test_regress/t/t_lint_unused_iface_bad.out @@ -0,0 +1,4 @@ +%Warning-UNDRIVEN: t/t_lint_unused_iface_bad.v:7: Signal is not driven: sig_udrv +%Warning-UNDRIVEN: Use "/* verilator lint_off UNDRIVEN */" and lint_on around source to disable this message. +%Warning-UNUSED: t/t_lint_unused_iface_bad.v:8: Signal is not used: sig_uusd +%Error: Exiting due to diff --git a/test_regress/t/t_lint_unused_iface_bad.pl b/test_regress/t/t_lint_unused_iface_bad.pl index 0859fbe9e..e942e9b7b 100755 --- a/test_regress/t/t_lint_unused_iface_bad.pl +++ b/test_regress/t/t_lint_unused_iface_bad.pl @@ -15,11 +15,7 @@ compile( verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect => -'%Warning-UNDRIVEN: t/t_lint_unused_iface_bad.v:\d+: Signal is not driven: sig_udrv -%Warning-UNDRIVEN: Use .* -%Warning-UNUSED: t/t_lint_unused_iface_bad.v:\d+: Signal is not used: sig_uusd -%Error: Exiting due to .*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_width_bad.out b/test_regress/t/t_lint_width_bad.out new file mode 100644 index 000000000..a808446bc --- /dev/null +++ b/test_regress/t/t_lint_width_bad.out @@ -0,0 +1,8 @@ +%Warning-WIDTH: t/t_lint_width_bad.v:16: Operator VAR 'XS' expects 4 bits on the Initial value, but Initial value's CONST '?32?bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' generates 32 bits. +%Warning-WIDTH: Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message. +%Warning-WIDTH: t/t_lint_width_bad.v:38: Operator ASSIGNW expects 5 bits on the Assign RHS, but Assign RHS's VARREF 'in' generates 4 bits. +%Warning-WIDTH: t/t_lint_width_bad.v:20: Operator SHIFTL expects 5 bits on the LHS, but LHS's CONST '1'h1' generates 1 bits. +%Warning-WIDTH: t/t_lint_width_bad.v:26: Operator ASSIGNW expects 6 bits on the Assign RHS, but Assign RHS's SHIFTL generates 7 bits. +%Warning-WIDTH: t/t_lint_width_bad.v:31: Operator ADD expects 3 bits on the LHS, but LHS's VARREF 'one' generates 1 bits. +%Warning-WIDTH: t/t_lint_width_bad.v:31: Operator ADD expects 3 bits on the RHS, but RHS's VARREF 'one' generates 1 bits. +%Error: Exiting due to diff --git a/test_regress/t/t_lint_width_bad.pl b/test_regress/t/t_lint_width_bad.pl index 13284af33..1d5701949 100755 --- a/test_regress/t/t_lint_width_bad.pl +++ b/test_regress/t/t_lint_width_bad.pl @@ -12,15 +12,7 @@ scenarios(vlt_all => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -q{.*%Warning-WIDTH: t/t_lint_width_bad.v:\d+: Operator VAR 'XS' expects 4 bits on the Initial value, but Initial value's CONST '\?32\?bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' generates 32 bits. -%Warning-WIDTH: Use .* -%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: t/t_lint_width_bad.v:\d+: Operator SHIFTL expects 5 bits on the LHS, but LHS's CONST '1'h1' generates 1 bits. -%Warning-WIDTH: t/t_lint_width_bad.v:\d+: Operator ASSIGNW expects 6 bits on the Assign RHS, but Assign RHS's SHIFTL generates 7 bits. -%Warning-WIDTH: t/t_lint_width_bad.v:\d+: Operator ADD expects 3 bits on the LHS, but LHS's VARREF 'one' generates 1 bits. -%Warning-WIDTH: t/t_lint_width_bad.v:\d+: Operator ADD expects 3 bits on the RHS, but RHS's VARREF 'one' generates 1 bits. -%Error: Exiting due to.*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_mem_multi_ref_bad.out b/test_regress/t/t_mem_multi_ref_bad.out new file mode 100644 index 000000000..adae2e2a9 --- /dev/null +++ b/test_regress/t/t_mem_multi_ref_bad.out @@ -0,0 +1,11 @@ +%Error: t/t_mem_multi_ref_bad.v:14: Illegal bit or array select; type does not have a bit range, or bad dimension: type is logic +%Error: t/t_mem_multi_ref_bad.v:14: Extracting 2 bits from only 1 bit number +%Error: t/t_mem_multi_ref_bad.v:15: Illegal bit or array select; type does not have a bit range, or bad dimension: type is logic +%Warning-SELRANGE: t/t_mem_multi_ref_bad.v:15: Selection index out of range: 1:1 outside 0:0 +%Warning-SELRANGE: Use "/* verilator lint_off SELRANGE */" and lint_on around source to disable this message. +%Error: t/t_mem_multi_ref_bad.v:16: Illegal bit or array select; type does not have a bit range, or bad dimension: type is logic +%Warning-SELRANGE: t/t_mem_multi_ref_bad.v:16: Selection index out of range: 1:1 outside 0:0 +%Error: t/t_mem_multi_ref_bad.v:18: Illegal +: or -: select; type already selected, or bad dimension: type is UNPACKARRAYDTYPE +%Error: t/t_mem_multi_ref_bad.v:22: Illegal bit or array select; type does not have a bit range, or bad dimension: type is logic +%Warning-SELRANGE: t/t_mem_multi_ref_bad.v:22: Selection index out of range: 1:1 outside 0:0 +%Error: Exiting due to diff --git a/test_regress/t/t_mem_multi_ref_bad.pl b/test_regress/t/t_mem_multi_ref_bad.pl index f3476ceae..113565b37 100755 --- a/test_regress/t/t_mem_multi_ref_bad.pl +++ b/test_regress/t/t_mem_multi_ref_bad.pl @@ -12,13 +12,7 @@ scenarios(simulator => 1); compile( fails => $Self->{vlt_all}, nc => 0, # Need to get it not to give the prompt - expect => -q{%Error: t/t_mem_multi_ref_bad.v:\d+: Illegal bit or array select; type does not have a bit range, or bad dimension: type is (bit|logic) -.*%Error: t/t_mem_multi_ref_bad.v:\d+: Illegal bit or array select; type does not have a bit range, or bad dimension: type is (bit|logic) -.*%Error: t/t_mem_multi_ref_bad.v:\d+: Illegal bit or array select; type does not have a bit range, or bad dimension: type is (bit|logic) -.*%Error: t/t_mem_multi_ref_bad.v:\d+: Illegal \+: or -: select; type already selected, or bad dimension: type is UNPACKARRAYDTYPE -.*%Error: t/t_mem_multi_ref_bad.v:\d+: Illegal bit or array select; type does not have a bit range, or bad dimension: type is logic -.*%Error: Exiting due to.*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_mem_slice_bad.out b/test_regress/t/t_mem_slice_bad.out new file mode 100644 index 000000000..06a36554f --- /dev/null +++ b/test_regress/t/t_mem_slice_bad.out @@ -0,0 +1,5 @@ +%Error: t/t_mem_slice_bad.v:38: Slice selection index '[2:0]' outside data type's '[1:0]' +%Error: t/t_mem_slice_bad.v:38: Slice selection index '[3:0]' outside data type's '[2:0]' +%Error: t/t_mem_slice_bad.v:38: Slice selection index '[3:0]' outside data type's '[1:0]' +%Error: t/t_mem_slice_bad.v:50: Slice selection index '[8:0]' outside data type's '[7:0]' +%Error: Exiting due to diff --git a/test_regress/t/t_mem_slice_bad.pl b/test_regress/t/t_mem_slice_bad.pl index 9ae1f10e9..f99e228d7 100755 --- a/test_regress/t/t_mem_slice_bad.pl +++ b/test_regress/t/t_mem_slice_bad.pl @@ -12,12 +12,7 @@ scenarios(vlt_all => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -q{%Error: t/t_mem_slice_bad.v:\d+: Slice selection index '\[2:0\]' outside data type's '\[1:0\]' -%Error: t/t_mem_slice_bad.v:\d+: Slice selection index '\[3:0\]' outside data type's '\[2:0\]' -%Error: t/t_mem_slice_bad.v:\d+: Slice selection index '\[3:0\]' outside data type's '\[1:0\]' -%Error: t/t_mem_slice_bad.v:\d+: Slice selection index '\[8:0\]' outside data type's '\[7:0\]' -%Error: Exiting due to.*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_metacmt_onoff.out b/test_regress/t/t_metacmt_onoff.out new file mode 100644 index 000000000..a29efcc4e --- /dev/null +++ b/test_regress/t/t_metacmt_onoff.out @@ -0,0 +1,4 @@ +%Warning-LITENDIAN: t/t_metacmt_onoff.v:5: Little bit endian vector: MSB < LSB of bit range: 0:1 +%Warning-LITENDIAN: Use "/* verilator lint_off LITENDIAN */" and lint_on around source to disable this message. +%Warning-LITENDIAN: t/t_metacmt_onoff.v:5: Little bit endian vector: MSB < LSB of bit range: 0:3 +%Error: Exiting due to diff --git a/test_regress/t/t_metacmt_onoff.pl b/test_regress/t/t_metacmt_onoff.pl index 073c00c5f..f5b5f8fd5 100755 --- a/test_regress/t/t_metacmt_onoff.pl +++ b/test_regress/t/t_metacmt_onoff.pl @@ -15,11 +15,7 @@ compile( make_top_shell => 0, make_main => 0, fails => $Self->{vlt_all}, - expect => -'%Warning-LITENDIAN: t/t_metacmt_onoff.v:\d+: Little bit endian vector: MSB < LSB of bit range: 0:1 -%Warning-LITENDIAN: Use "/\* verilator lint_off LITENDIAN \*/" and lint_on around source to disable this message. -%Warning-LITENDIAN: t/t_metacmt_onoff.v:\d+: Little bit endian vector: MSB < LSB of bit range: 0:3 -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_pp_display.out b/test_regress/t/t_pp_display.out new file mode 100644 index 000000000..90c146e4f --- /dev/null +++ b/test_regress/t/t_pp_display.out @@ -0,0 +1,16 @@ +pre thrupre thrumid thrupost post: "right side" +left side: "right side" +left side: "right side" +left_side: "right_side" +na: "right_side" +prep ( midp1 left_side midp2 ( outp ) ): "right_side" +na: "nana" +left_side right_side: "left_side right_side" +left side: "right side" +: "" +left side: "right side" +left side: "right side" +standalone +twoline: "first second" +Line 49 File "t/t_pp_display.v" +*-* All Finished *-* diff --git a/test_regress/t/t_pp_display.pl b/test_regress/t/t_pp_display.pl index 77c3ca8a0..25bcb3853 100755 --- a/test_regress/t/t_pp_display.pl +++ b/test_regress/t/t_pp_display.pl @@ -14,24 +14,8 @@ compile( execute( check_finished => 1, - expect => quotemeta( -qq{pre thrupre thrumid thrupost post: "right side" -left side: "right side" -left side: "right side" -left_side: "right_side" -na: "right_side" -prep ( midp1 left_side midp2 ( outp ) ): "right_side" -na: "nana" -left_side right_side: "left_side right_side" -left side: "right side" -: "" -left side: "right side" -left side: "right side" -standalone -twoline: "first second" -Line 49 File "t/t_pp_display.v" -*-* All Finished *-* -})); + expect_filename => $Self->{golden_filename}, + ); ok(1); 1; diff --git a/test_regress/t/t_pp_dupdef_bad.out b/test_regress/t/t_pp_dupdef_bad.out new file mode 100644 index 000000000..6de6783ee --- /dev/null +++ b/test_regress/t/t_pp_dupdef_bad.out @@ -0,0 +1,6 @@ +%Warning-REDEFMACRO: t/t_pp_dupdef.v:10: Redefining existing define: DUP, with different value: barney +%Warning-REDEFMACRO: Use "/* verilator lint_off REDEFMACRO */" and lint_on around source to disable this message. +%Warning-REDEFMACRO: t/t_pp_dupdef.v:10: Previous definition is here, with value: fred +%Warning-REDEFMACRO: t/t_pp_dupdef.v:13: Redefining existing define: DUPP, with different value: paramed(x,z) (x*z) +%Warning-REDEFMACRO: t/t_pp_dupdef.v:13: Previous definition is here, with value: paramed(x) (x) +%Error: Exiting due to diff --git a/test_regress/t/t_pp_dupdef_bad.pl b/test_regress/t/t_pp_dupdef_bad.pl index 91f18972a..bf1d4b40e 100755 --- a/test_regress/t/t_pp_dupdef_bad.pl +++ b/test_regress/t/t_pp_dupdef_bad.pl @@ -14,13 +14,7 @@ top_filename("t/t_pp_dupdef.v"); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -'%Warning-REDEFMACRO: t/t_pp_dupdef.v:\d+: Redefining existing define: DUP, with different value: barney -%Warning-REDEFMACRO: Use .* to disable this message. -%Warning-REDEFMACRO: t/t_pp_dupdef.v:\d+: Previous definition is here, with value: fred -%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.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_select_bad_range.out b/test_regress/t/t_select_bad_range.out new file mode 100644 index 000000000..21a97befd --- /dev/null +++ b/test_regress/t/t_select_bad_range.out @@ -0,0 +1,4 @@ +%Warning-SELRANGE: t/t_select_bad_range.v:15: Selection index out of range: 44:44 outside 43:0 +%Warning-SELRANGE: Use "/* verilator lint_off SELRANGE */" and lint_on around source to disable this message. +%Warning-SELRANGE: t/t_select_bad_range.v:16: Selection index out of range: 44:41 outside 43:0 +%Error: Exiting due to diff --git a/test_regress/t/t_select_bad_range.pl b/test_regress/t/t_select_bad_range.pl index 349e99bf2..8bfbcfc8b 100755 --- a/test_regress/t/t_select_bad_range.pl +++ b/test_regress/t/t_select_bad_range.pl @@ -12,11 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => $Self->{vlt_all}, - expect => -'%Warning-SELRANGE: t/t_select_bad_range.v:\d+: Selection index out of range: 44:44 outside 43:0 -%Warning-SELRANGE: Use .* -%Warning-SELRANGE: t/t_select_bad_range.v:\d+: Selection index out of range: 44:41 outside 43:0 -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_tri_pullvec_bad.out b/test_regress/t/t_tri_pullvec_bad.out new file mode 100644 index 000000000..d1ee749df --- /dev/null +++ b/test_regress/t/t_tri_pullvec_bad.out @@ -0,0 +1,4 @@ +%Error: t/t_tri_pullvec_bad.v:10: Unsupported: Conflicting pull directions. +%Error: t/t_tri_pullvec_bad.v:9: ... Location of conflicting pull. +%Error: t/t_tri_pullvec_bad.v:11: Unsupported: Conflicting pull directions. +%Error: Exiting due to diff --git a/test_regress/t/t_tri_pullvec_bad.pl b/test_regress/t/t_tri_pullvec_bad.pl index 44a0a2b6e..e88bd5043 100755 --- a/test_regress/t/t_tri_pullvec_bad.pl +++ b/test_regress/t/t_tri_pullvec_bad.pl @@ -12,11 +12,7 @@ scenarios(vlt_all => 1); compile( v_flags2 => ["--lint-only"], fails => $Self->{vlt_all}, - expect => -'%Error: t/t_tri_pullvec_bad.v:\d+: Unsupported: Conflicting pull directions. -%Error: t/t_tri_pullvec_bad.v:\d+: ... Location of conflicting pull. -%Error: t/t_tri_pullvec_bad.v:\d+: Unsupported: Conflicting pull directions. -%Error: Exiting due to .*' + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_udp_bad.out b/test_regress/t/t_udp_bad.out new file mode 100644 index 000000000..b7c074535 --- /dev/null +++ b/test_regress/t/t_udp_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_udp.v:106: Unsupported: Verilog 1995 UDP Tables. Use --bbox-unsup to ignore tables. +%Error: Exiting due to diff --git a/test_regress/t/t_udp_bad.pl b/test_regress/t/t_udp_bad.pl index cc95f4d72..79dccc3a2 100755 --- a/test_regress/t/t_udp_bad.pl +++ b/test_regress/t/t_udp_bad.pl @@ -13,9 +13,7 @@ top_filename("t/t_udp.v"); compile( fails => $Self->{vlt_all}, - expect => -'%Error: t/t_udp.v:\d+: Unsupported: Verilog 1995 UDP Tables. Use --bbox-unsup to ignore tables. -%Error: Exiting due to ' + expect_filename => $Self->{golden_filename}, ); execute( diff --git a/test_regress/t/t_unopt_combo_bad.out b/test_regress/t/t_unopt_combo_bad.out new file mode 100644 index 000000000..5e02f0e7b --- /dev/null +++ b/test_regress/t/t_unopt_combo_bad.out @@ -0,0 +1,8 @@ +%Warning-UNOPTFLAT: t/t_unopt_combo.v:23: Signal unoptimizable: Feedback to clock or circular logic: t.c +%Warning-UNOPTFLAT: Use "/* verilator lint_off UNOPTFLAT */" and lint_on around source to disable this message. +%Warning-UNOPTFLAT: Example path: t/t_unopt_combo.v:23: t.c +%Warning-UNOPTFLAT: Example path: t/t_unopt_combo.v:80: ALWAYS +%Warning-UNOPTFLAT: Example path: t/t_unopt_combo.v:22: t.b +%Warning-UNOPTFLAT: Example path: t/t_unopt_combo.v:116: ALWAYS +%Warning-UNOPTFLAT: Example path: t/t_unopt_combo.v:23: t.c +%Error: Exiting due to diff --git a/test_regress/t/t_unopt_combo_bad.pl b/test_regress/t/t_unopt_combo_bad.pl index be94a1a97..6ba52ae7a 100755 --- a/test_regress/t/t_unopt_combo_bad.pl +++ b/test_regress/t/t_unopt_combo_bad.pl @@ -13,15 +13,7 @@ top_filename("t/t_unopt_combo.v"); compile( fails => $Self->{vlt_all}, - expect => -'%Warning-UNOPTFLAT: t/t_unopt_combo.v:\d+: Signal unoptimizable: Feedback to clock or circular logic: t.c -%Warning-UNOPTFLAT: Use "/\* verilator lint_off UNOPTFLAT \*/" and lint_on around source to disable this message. -%Warning-UNOPTFLAT: Example path: t/t_unopt_combo.v:\d+: t.c -%Warning-UNOPTFLAT: Example path: t/t_unopt_combo.v:\d+: ALWAYS -%Warning-UNOPTFLAT: Example path: t/t_unopt_combo.v:\d+: t.b -%Warning-UNOPTFLAT: Example path: t/t_unopt_combo.v:\d+: ALWAYS -%Warning-UNOPTFLAT: Example path: t/t_unopt_combo.v:\d+: t.c -%Error: Exiting due to ' + expect_filename => $Self->{golden_filename}, ); execute( diff --git a/test_regress/t/t_unopt_converge_unopt_bad.out b/test_regress/t/t_unopt_converge_unopt_bad.out new file mode 100644 index 000000000..7129e3eec --- /dev/null +++ b/test_regress/t/t_unopt_converge_unopt_bad.out @@ -0,0 +1,6 @@ +%Warning-UNOPT: t/t_unopt_converge.v:18: Signal unoptimizable: Feedback to public clock or circular logic: x +%Warning-UNOPT: Use "/* verilator lint_off UNOPT */" and lint_on around source to disable this message. +%Warning-UNOPT: Example path: t/t_unopt_converge.v:18: x +%Warning-UNOPT: Example path: t/t_unopt_converge.v:21: ALWAYS +%Warning-UNOPT: Example path: t/t_unopt_converge.v:18: x +%Error: Exiting due to diff --git a/test_regress/t/t_unopt_converge_unopt_bad.pl b/test_regress/t/t_unopt_converge_unopt_bad.pl index 517b15153..0310a823a 100755 --- a/test_regress/t/t_unopt_converge_unopt_bad.pl +++ b/test_regress/t/t_unopt_converge_unopt_bad.pl @@ -13,9 +13,7 @@ top_filename("t/t_unopt_converge.v"); compile( fails => 1, - expect => '%Warning-UNOPT: t/t_unopt_converge.v:\d+: Signal unoptimizable: Feedback to public clock or circular logic: x -.* -%Error: Exiting due to ' + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_unoptflat_simple_2_bad.out b/test_regress/t/t_unoptflat_simple_2_bad.out new file mode 100644 index 000000000..3901a8db4 --- /dev/null +++ b/test_regress/t/t_unoptflat_simple_2_bad.out @@ -0,0 +1,10 @@ +%Warning-UNOPTFLAT: t/t_unoptflat_simple_2.v:14: Signal unoptimizable: Feedback to clock or circular logic: t.x +%Warning-UNOPTFLAT: Use "/* verilator lint_off UNOPTFLAT */" and lint_on around source to disable this message. +%Warning-UNOPTFLAT: Example path: t/t_unoptflat_simple_2.v:14: t.x +%Warning-UNOPTFLAT: Example path: t/t_unoptflat_simple_2.v:20: ASSIGNW +%Warning-UNOPTFLAT: Example path: t/t_unoptflat_simple_2.v:14: t.x +%Warning-UNOPTFLAT: Widest candidate vars to split: +%Warning-UNOPTFLAT: t/t_unoptflat_simple_2.v:14: t.x, width 3, fanout 13 +%Warning-UNOPTFLAT: Most fanned out candidate vars to split: +%Warning-UNOPTFLAT: t/t_unoptflat_simple_2.v:14: t.x, width 3, fanout 13 +%Error: Exiting due to diff --git a/test_regress/t/t_unoptflat_simple_2_bad.pl b/test_regress/t/t_unoptflat_simple_2_bad.pl index 6323be90f..18b3fcc9b 100755 --- a/test_regress/t/t_unoptflat_simple_2_bad.pl +++ b/test_regress/t/t_unoptflat_simple_2_bad.pl @@ -16,10 +16,7 @@ compile( verilator_flags3 => [], verilator_flags2 => ["--report-unoptflat"], fails => 1, - expect => -'.*%Warning-UNOPTFLAT: Widest candidate vars to split: -%Warning-UNOPTFLAT: t/t_unoptflat_simple_2.v:\d+: t.x, width 3, fanout \d+ -.*%Error: Exiting due to ', + expect_filename => $Self->{golden_filename}, ); diff --git a/test_regress/t/t_var_bad_hide.out b/test_regress/t/t_var_bad_hide.out new file mode 100644 index 000000000..52e25fe37 --- /dev/null +++ b/test_regress/t/t_var_bad_hide.out @@ -0,0 +1,6 @@ +%Warning-VARHIDDEN: t/t_var_bad_hide.v:15: Declaration of signal hides declaration in upper scope: top +%Warning-VARHIDDEN: t/t_var_bad_hide.v:12: ... Location of original declaration +%Warning-VARHIDDEN: Use "/* verilator lint_off VARHIDDEN */" and lint_on around source to disable this message. +%Warning-VARHIDDEN: t/t_var_bad_hide.v:21: Declaration of signal hides declaration in upper scope: top +%Warning-VARHIDDEN: t/t_var_bad_hide.v:12: ... Location of original declaration +%Error: Exiting due to diff --git a/test_regress/t/t_var_bad_hide.pl b/test_regress/t/t_var_bad_hide.pl index f2cc3e239..42639f55b 100755 --- a/test_regress/t/t_var_bad_hide.pl +++ b/test_regress/t/t_var_bad_hide.pl @@ -12,11 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only -Wwarn-VARHIDDEN"], fails => $Self->{vlt_all}, - expect => -'%Warning-VARHIDDEN: t/t_var_bad_hide.v:\d+: Declaration of signal hides declaration in upper scope: top -.* -%Warning-VARHIDDEN: t/t_var_bad_hide.v:\d+: ... Location of original declaration -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_var_bad_hide2.out b/test_regress/t/t_var_bad_hide2.out new file mode 100644 index 000000000..881972ebf --- /dev/null +++ b/test_regress/t/t_var_bad_hide2.out @@ -0,0 +1,4 @@ +%Warning-VARHIDDEN: t/t_var_bad_hide2.v:13: Declaration of signal hides declaration in upper scope: t +%Warning-VARHIDDEN: t/t_var_bad_hide2.v:6: ... Location of original declaration +%Warning-VARHIDDEN: Use "/* verilator lint_off VARHIDDEN */" and lint_on around source to disable this message. +%Error: Exiting due to diff --git a/test_regress/t/t_var_bad_hide2.pl b/test_regress/t/t_var_bad_hide2.pl index 52c00d893..42639f55b 100755 --- a/test_regress/t/t_var_bad_hide2.pl +++ b/test_regress/t/t_var_bad_hide2.pl @@ -12,11 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only -Wwarn-VARHIDDEN"], fails => $Self->{vlt_all}, - expect => -'%Warning-VARHIDDEN: t/t_var_bad_hide2.v:\d+: Declaration of signal hides declaration in upper scope: t -%Warning-VARHIDDEN: t/t_var_bad_hide2.v:\d+: ... Location of original declaration -.* -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_var_bad_sameas.out b/test_regress/t/t_var_bad_sameas.out new file mode 100644 index 000000000..42003a1f3 --- /dev/null +++ b/test_regress/t/t_var_bad_sameas.out @@ -0,0 +1,11 @@ +%Error: t/t_var_bad_sameas.v:9: Unsupported in C: Cell has the same name as variable: varfirst +%Error: t/t_var_bad_sameas.v:8: ... Location of original declaration +%Error: t/t_var_bad_sameas.v:10: Unsupported in C: Task has the same name as cell: varfirst +%Error: t/t_var_bad_sameas.v:9: ... Location of original declaration +%Error: t/t_var_bad_sameas.v:13: Unsupported in C: Variable has same name as cell: cellfirst +%Error: t/t_var_bad_sameas.v:14: Unsupported in C: Task has the same name as cell: cellfirst +%Error: t/t_var_bad_sameas.v:12: ... Location of original declaration +%Error: t/t_var_bad_sameas.v:17: Unsupported in C: Variable has same name as task: taskfirst +%Error: t/t_var_bad_sameas.v:18: Unsupported in C: Cell has the same name as task: taskfirst +%Error: t/t_var_bad_sameas.v:16: ... Location of original declaration +%Error: Exiting due to diff --git a/test_regress/t/t_var_bad_sameas.pl b/test_regress/t/t_var_bad_sameas.pl index 474386b36..3361369bf 100755 --- a/test_regress/t/t_var_bad_sameas.pl +++ b/test_regress/t/t_var_bad_sameas.pl @@ -11,18 +11,7 @@ scenarios(simulator => 1); compile( fails => 1, - expect => -'%Error: t/t_var_bad_sameas.v:\d+: Unsupported in C: Cell has the same name as variable: varfirst -%Error: t/t_var_bad_sameas.v:\d+: ... Location of original declaration -%Error: t/t_var_bad_sameas.v:\d+: Unsupported in C: Task has the same name as (variable|cell): varfirst -%Error: t/t_var_bad_sameas.v:\d+: ... Location of original declaration -%Error: t/t_var_bad_sameas.v:\d+: Unsupported in C: Variable has same name as cell: cellfirst -%Error: t/t_var_bad_sameas.v:\d+: Unsupported in C: Task has the same name as cell: cellfirst -%Error: t/t_var_bad_sameas.v:\d+: ... Location of original declaration -%Error: t/t_var_bad_sameas.v:\d+: Unsupported in C: Variable has same name as task: taskfirst -%Error: t/t_var_bad_sameas.v:\d+: Unsupported in C: Cell has the same name as task: taskfirst -%Error: t/t_var_bad_sameas.v:\d+: ... Location of original declaration -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_var_bad_sv.out b/test_regress/t/t_var_bad_sv.out new file mode 100644 index 000000000..80dfe9fcd --- /dev/null +++ b/test_regress/t/t_var_bad_sv.out @@ -0,0 +1,5 @@ +%Error: t/t_var_bad_sv.v:7: Unexpected "do": "do" is a SystemVerilog keyword misused as an identifier. +%Error: t/t_var_bad_sv.v:7: Modify the Verilog-2001 code to avoid SV keywords, or use `begin_keywords or --language. +%Error: t/t_var_bad_sv.v:8: Unexpected "do": "do" is a SystemVerilog keyword misused as an identifier. +%Error: t/t_var_bad_sv.v:8: syntax error, unexpected '(', expecting ')' +%Error: Exiting due to diff --git a/test_regress/t/t_var_bad_sv.pl b/test_regress/t/t_var_bad_sv.pl index 92ac50bf8..96456db03 100755 --- a/test_regress/t/t_var_bad_sv.pl +++ b/test_regress/t/t_var_bad_sv.pl @@ -12,12 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => $Self->{vlt_all}, - expect => -'%Error: t/t_var_bad_sv.v:\d+: Unexpected "do": "do" is a SystemVerilog keyword misused as an identifier. -%Error: t/t_var_bad_sv.v:\d+: Modify the Verilog-2001 code to avoid SV keywords, or use `begin_keywords or --language. -%Error: t/t_var_bad_sv.v:\d+: Unexpected "do": "do" is a SystemVerilog keyword misused as an identifier. -.* -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_var_nonamebegin.pl b/test_regress/t/t_var_nonamebegin.pl index 9bb0db71f..1957c0219 100755 --- a/test_regress/t/t_var_nonamebegin.pl +++ b/test_regress/t/t_var_nonamebegin.pl @@ -14,16 +14,7 @@ compile( ); execute( - expect => quotemeta( -'ingen: {mod}.genblk1 top.t.genblk1 -d3a: {mod}.d3nameda top.t.d3nameda -b2: {mod} top.t -b3n: {mod}.b3named: top.t.b3named -b3: {mod} top.t -b4: {mod} top.t -t1 {mod}.tsk top.t -t2 {mod}.tsk top.t -*-* All Finished *-*'), + expect_filename => "t/$Self->{name}__log.out" ); if ($Self->{vlt_all}) { diff --git a/test_regress/t/t_var_nonamebegin__log.out b/test_regress/t/t_var_nonamebegin__log.out new file mode 100644 index 000000000..e9277860e --- /dev/null +++ b/test_regress/t/t_var_nonamebegin__log.out @@ -0,0 +1,9 @@ +ingen: {mod}.genblk1 top.t.genblk1 +d3a: {mod}.d3nameda top.t.d3nameda +b2: {mod} top.t +b3n: {mod}.b3named: top.t.b3named +b3: {mod} top.t +b4: {mod} top.t +t1 {mod}.tsk top.t +t2 {mod}.tsk top.t +*-* All Finished *-* diff --git a/test_regress/t/t_var_notfound_bad.out b/test_regress/t/t_var_notfound_bad.out new file mode 100644 index 000000000..485f68d5c --- /dev/null +++ b/test_regress/t/t_var_notfound_bad.out @@ -0,0 +1,7 @@ +%Error: t/t_var_notfound_bad.v:14: Can't find definition of variable: nf +%Error: t/t_var_notfound_bad.v:15: Can't find definition of 'subsubz' in dotted scope/variable: sub.subsubz +%Error: Known scopes under 'sub': subsub +%Error: t/t_var_notfound_bad.v:16: Can't find definition of task/function: nofunc +%Error: t/t_var_notfound_bad.v:17: Can't find definition of task/function: notask +%Error: t/t_var_notfound_bad.v:18: Found definition of 'a_var' as a VAR but expected a task/function +%Error: Exiting due to diff --git a/test_regress/t/t_var_notfound_bad.pl b/test_regress/t/t_var_notfound_bad.pl index 458a8d8e5..3361369bf 100755 --- a/test_regress/t/t_var_notfound_bad.pl +++ b/test_regress/t/t_var_notfound_bad.pl @@ -11,14 +11,7 @@ scenarios(simulator => 1); compile( fails => 1, - expect => -'%Error: t/t_var_notfound_bad.v:\d+: Can\'t find definition of variable: nf -%Error: t/t_var_notfound_bad.v:\d+: Can\'t find definition of \'subsubz\' in dotted scope/variable: sub.subsubz -%Error: Known scopes under \'sub\': subsub -%Error: t/t_var_notfound_bad.v:\d+: Can\'t find definition of task/function: nofunc -%Error: t/t_var_notfound_bad.v:\d+: Can\'t find definition of task/function: notask -%Error: t/t_var_notfound_bad.v:\d+: Found definition of \'a_var\' as a VAR but expected a task/function -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_var_rsvd_bad.out b/test_regress/t/t_var_rsvd_bad.out new file mode 100644 index 000000000..661c1a96d --- /dev/null +++ b/test_regress/t/t_var_rsvd_bad.out @@ -0,0 +1,4 @@ +%Warning-SYMRSVDWORD: t/t_var_rsvd_port.v:11: Symbol matches C++ keyword: 'bool' +%Warning-SYMRSVDWORD: Use "/* verilator lint_off SYMRSVDWORD */" and lint_on around source to disable this message. +%Warning-SYMRSVDWORD: t/t_var_rsvd_port.v:14: Symbol matches C++ keyword: 'switch' +%Error: Exiting due to diff --git a/test_regress/t/t_var_rsvd_bad.pl b/test_regress/t/t_var_rsvd_bad.pl index c28db9b81..478bb3ef1 100755 --- a/test_regress/t/t_var_rsvd_bad.pl +++ b/test_regress/t/t_var_rsvd_bad.pl @@ -13,11 +13,7 @@ top_filename("t/t_var_rsvd_port.v"); compile( fails => $Self->{vlt_all}, - expect => -q{%Warning-SYMRSVDWORD: t/t_var_rsvd_port.v:\d+: Symbol matches C\+\+ keyword: 'bool' -.* -%Warning-SYMRSVDWORD: t/t_var_rsvd_port.v:\d+: Symbol matches C\+\+ keyword: 'switch' -%Error: Exiting due to.*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_var_types_bad.out b/test_regress/t/t_var_types_bad.out new file mode 100644 index 000000000..5b1f911cd --- /dev/null +++ b/test_regress/t/t_var_types_bad.out @@ -0,0 +1,11 @@ +%Error: t/t_var_types_bad.v:38: Illegal bit or array select; type does not have a bit range, or bad dimension: type is bit +%Error: t/t_var_types_bad.v:39: Illegal bit or array select; type does not have a bit range, or bad dimension: type is logic +%Error: t/t_var_types_bad.v:40: Illegal bit or array select; type does not have a bit range, or bad dimension: type is logic +%Error: t/t_var_types_bad.v:45: Illegal bit or array select; type does not have a bit range, or bad dimension: type is real +%Error: t/t_var_types_bad.v:45: Expected integral (non-real) input to SEL +%Warning-REALCVT: t/t_var_types_bad.v:45: Implicit conversion of real to integer +%Warning-REALCVT: Use "/* verilator lint_off REALCVT */" and lint_on around source to disable this message. +%Error: t/t_var_types_bad.v:46: Illegal bit or array select; type does not have a bit range, or bad dimension: type is real +%Error: t/t_var_types_bad.v:46: Expected integral (non-real) input to SEL +%Warning-REALCVT: t/t_var_types_bad.v:46: Implicit conversion of real to integer +%Error: Exiting due to diff --git a/test_regress/t/t_var_types_bad.pl b/test_regress/t/t_var_types_bad.pl index fb26beffd..63de4f6d5 100755 --- a/test_regress/t/t_var_types_bad.pl +++ b/test_regress/t/t_var_types_bad.pl @@ -13,13 +13,7 @@ $Self->{verilated_randReset} = 1; # allow checking if we initialize vars to zer compile( fails => 1, - expect => -'%Error: t/t_var_types_bad.v:\d+: Illegal bit or array select; type does not have a bit range, or bad dimension: type is bit -.*%Error: t/t_var_types_bad.v:\d+: Illegal bit or array select; type does not have a bit range, or bad dimension: type is logic -.*%Error: t/t_var_types_bad.v:\d+: Illegal bit or array select; type does not have a bit range, or bad dimension: type is logic -.*%Error: t/t_var_types_bad.v:\d+: Illegal bit or array select; type does not have a bit range, or bad dimension: type is real -.*%Error: t/t_var_types_bad.v:\d+: Illegal bit or array select; type does not have a bit range, or bad dimension: type is real -.*%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1);