diff --git a/src/V3Changed.cpp b/src/V3Changed.cpp index ee6d9208c..c17eec78e 100644 --- a/src/V3Changed.cpp +++ b/src/V3Changed.cpp @@ -241,7 +241,7 @@ private: VL_DEBUG_FUNC; // Declare debug() void genChangeDet(AstVarScope* vscp) { - vscp->v3warn(IMPERFECTSCH, "Imperfect scheduling of variable: "<v3warn(IMPERFECTSCH, "Imperfect scheduling of variable: "<prettyName()); ChangedInsertVisitor visitor (vscp, m_statep); } diff --git a/test_regress/t/t_bitsel_wire_array_bad.out b/test_regress/t/t_bitsel_wire_array_bad.out new file mode 100644 index 000000000..db50a1e84 --- /dev/null +++ b/test_regress/t/t_bitsel_wire_array_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_bitsel_wire_array_bad.v:20: Illegal assignment of constant to unpacked array +%Error: Exiting due to diff --git a/test_regress/t/t_bitsel_wire_array_bad.pl b/test_regress/t/t_bitsel_wire_array_bad.pl index 98eea8856..c40b6592b 100755 --- a/test_regress/t/t_bitsel_wire_array_bad.pl +++ b/test_regress/t/t_bitsel_wire_array_bad.pl @@ -13,9 +13,7 @@ scenarios(linter => 1); lint( fails => 1, - expect => -'.*%Error: t/t_bitsel_wire_array_bad.v:\d+: Illegal assignment of constant to unpacked array -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_case_default_bad.out b/test_regress/t/t_case_default_bad.out new file mode 100644 index 000000000..f66e2fcf9 --- /dev/null +++ b/test_regress/t/t_case_default_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_case_default_bad.v:12: Multiple default statements in case statement. +%Error: Exiting due to diff --git a/test_regress/t/t_case_default_bad.pl b/test_regress/t/t_case_default_bad.pl index 956310b68..b09f43e8b 100755 --- a/test_regress/t/t_case_default_bad.pl +++ b/test_regress/t/t_case_default_bad.pl @@ -11,9 +11,7 @@ scenarios(linter => 1); lint( fails => 1, - expect => -'%Error: t/t_case_default_bad.v:\d+: Multiple default statements in case statement. -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_case_x_bad.out b/test_regress/t/t_case_x_bad.out new file mode 100644 index 000000000..8f2dcb4a1 --- /dev/null +++ b/test_regress/t/t_case_x_bad.out @@ -0,0 +1,4 @@ +%Warning-CASEX: t/t_case_x_bad.v:13: Suggest casez (with ?'s) in place of casex (with X's) + ... Use "/* verilator lint_off CASEX */" and lint_on around source to disable this message. +%Warning-CASEWITHX: t/t_case_x_bad.v:18: Use of x/? constant in case statement, (perhaps intended casex/casez) +%Error: Exiting due to diff --git a/test_regress/t/t_case_x_bad.pl b/test_regress/t/t_case_x_bad.pl index 561271660..518625206 100755 --- a/test_regress/t/t_case_x_bad.pl +++ b/test_regress/t/t_case_x_bad.pl @@ -11,10 +11,7 @@ scenarios(linter => 1); lint( fails => 1, - expect => -'%Warning-CASEX: t/t_case_x_bad.v:\d+: Suggest casez \(with \?\'s\) in place of casex \(with X\'s\) -.*%Warning-CASEWITHX: t/t_case_x_bad.v:\d+: Use of x/\? constant in case statement, \(perhaps intended casex/casez\) -.*%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_case_zx_bad.out b/test_regress/t/t_case_zx_bad.out new file mode 100644 index 000000000..70fca0f81 --- /dev/null +++ b/test_regress/t/t_case_zx_bad.out @@ -0,0 +1,3 @@ +%Warning-CASEWITHX: t/t_case_zx_bad.v:15: Use of x constant in casez statement, (perhaps intended ?/z in constant) + ... Use "/* verilator lint_off CASEWITHX */" and lint_on around source to disable this message. +%Error: Exiting due to diff --git a/test_regress/t/t_case_zx_bad.pl b/test_regress/t/t_case_zx_bad.pl index 0262521e7..518625206 100755 --- a/test_regress/t/t_case_zx_bad.pl +++ b/test_regress/t/t_case_zx_bad.pl @@ -11,10 +11,7 @@ scenarios(linter => 1); lint( fails => 1, - expect => -'%Warning-CASEWITHX: t/t_case_zx_bad.v:\d+: Use of x constant in casez statement, \(perhaps intended \?/z in constant\) -.* -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_const_dec_mixed_bad.out b/test_regress/t/t_const_dec_mixed_bad.out new file mode 100644 index 000000000..512f9f447 --- /dev/null +++ b/test_regress/t/t_const_dec_mixed_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_const_dec_mixed_bad.v:8: Mixing X/Z/? with digits not legal in decimal constant: x_1 +%Error: Exiting due to diff --git a/test_regress/t/t_const_dec_mixed_bad.pl b/test_regress/t/t_const_dec_mixed_bad.pl index 8ac6e5a4e..518625206 100755 --- a/test_regress/t/t_const_dec_mixed_bad.pl +++ b/test_regress/t/t_const_dec_mixed_bad.pl @@ -11,9 +11,7 @@ scenarios(linter => 1); lint( fails => 1, - expect => -'%Error: t/t_const_dec_mixed_bad.v:\d+: Mixing X/Z/\? with digits not legal in decimal constant: x_1 -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_dpi_2exp_bad.out b/test_regress/t/t_dpi_2exp_bad.out new file mode 100644 index 000000000..241ce9788 --- /dev/null +++ b/test_regress/t/t_dpi_2exp_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_dpi_2exp_bad.v:11: Function was already DPI Exported, duplicate not allowed: dpix_twice +%Error: Exiting due to diff --git a/test_regress/t/t_dpi_2exp_bad.pl b/test_regress/t/t_dpi_2exp_bad.pl index a5176d1d1..57ecc0da2 100755 --- a/test_regress/t/t_dpi_2exp_bad.pl +++ b/test_regress/t/t_dpi_2exp_bad.pl @@ -11,9 +11,7 @@ scenarios(linter => 1); lint( fails => $Self->{vlt_all}, - expect => -'%Error: t/t_dpi_2exp_bad.v:11: Function was already DPI Exported, duplicate not allowed: dpix_twice -%Error: Exiting due to .*' + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_dpi_exp_bad.out b/test_regress/t/t_dpi_exp_bad.out new file mode 100644 index 000000000..2b06090a6 --- /dev/null +++ b/test_regress/t/t_dpi_exp_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_dpi_exp_bad.v:11: DPI functions cannot return > 32 bits or four-state; use a two-state type or task instead: dpix_f_bit48__Vfuncrtn +%Error: Exiting due to diff --git a/test_regress/t/t_dpi_exp_bad.pl b/test_regress/t/t_dpi_exp_bad.pl index b68c7f209..b09f43e8b 100755 --- a/test_regress/t/t_dpi_exp_bad.pl +++ b/test_regress/t/t_dpi_exp_bad.pl @@ -11,9 +11,7 @@ scenarios(linter => 1); lint( fails => 1, - expect => -'%Error: t/t_dpi_exp_bad.v:\d+: DPI functions cannot return > 32 bits or four-state; use a two-state type or task instead: dpix_f_bit48__Vfuncrtn -%Error: Exiting due to .*' + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_dpi_logic_bad.out b/test_regress/t/t_dpi_logic_bad.out new file mode 100644 index 000000000..1000d5a50 --- /dev/null +++ b/test_regress/t/t_dpi_logic_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_dpi_logic_bad.v:11: DPI function may not return type BASICDTYPE 'logic' (IEEE 2017 35.5.5) +%Error: Exiting due to diff --git a/test_regress/t/t_dpi_logic_bad.pl b/test_regress/t/t_dpi_logic_bad.pl index fbf4dbabf..57ecc0da2 100755 --- a/test_regress/t/t_dpi_logic_bad.pl +++ b/test_regress/t/t_dpi_logic_bad.pl @@ -11,9 +11,7 @@ scenarios(linter => 1); lint( fails => $Self->{vlt_all}, - expect => -'%Error: t/t_dpi_logic_bad.v:\d+: DPI function may not return type BASICDTYPE \'logic\' \(IEEE 2017 35.5.5\) -%Error: Exiting due to .*' + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_dpi_name_bad.out b/test_regress/t/t_dpi_name_bad.out new file mode 100644 index 000000000..6849f5f42 --- /dev/null +++ b/test_regress/t/t_dpi_name_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_dpi_name_bad.v:11: DPI function has illegal characters in C identifier name: badly.named +%Error: Exiting due to diff --git a/test_regress/t/t_dpi_name_bad.pl b/test_regress/t/t_dpi_name_bad.pl index 89f566bbd..57ecc0da2 100755 --- a/test_regress/t/t_dpi_name_bad.pl +++ b/test_regress/t/t_dpi_name_bad.pl @@ -11,9 +11,7 @@ scenarios(linter => 1); lint( fails => $Self->{vlt_all}, - expect => -'%Error: t/t_dpi_name_bad.v:\d+: DPI function has illegal characters in C identifier name: badly.named -%Error: Exiting due to .*' + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_flag_nomod_bad.out b/test_regress/t/t_flag_nomod_bad.out new file mode 100644 index 000000000..c5d48e9b9 --- /dev/null +++ b/test_regress/t/t_flag_nomod_bad.out @@ -0,0 +1,2 @@ +%Error: No top level module found +%Error: Exiting due to diff --git a/test_regress/t/t_flag_nomod_bad.pl b/test_regress/t/t_flag_nomod_bad.pl index b03c82a27..72de436c6 100755 --- a/test_regress/t/t_flag_nomod_bad.pl +++ b/test_regress/t/t_flag_nomod_bad.pl @@ -11,9 +11,7 @@ scenarios(vlt => 1); lint( fails => 1, - expect => -'%Error: No top level module found -%Error: Exiting due to', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_flag_topmod2_bad.out b/test_regress/t/t_flag_topmod2_bad.out new file mode 100644 index 000000000..79a337a4a --- /dev/null +++ b/test_regress/t/t_flag_topmod2_bad.out @@ -0,0 +1,2 @@ +%Error: Specified --top-module 'a' isn't at the top level, it's under another cell 'a_top' +%Error: Exiting due to diff --git a/test_regress/t/t_flag_topmod2_bad.pl b/test_regress/t/t_flag_topmod2_bad.pl index 9ce7ebabf..e2811ebe0 100755 --- a/test_regress/t/t_flag_topmod2_bad.pl +++ b/test_regress/t/t_flag_topmod2_bad.pl @@ -12,9 +12,7 @@ scenarios(vlt => 1); compile( v_flags2 => ["--top-module a "], fails => 1, - expect => -'%Error: Specified --top-module \'a\' isn.t at the top level, it.s under another cell \'a_top\' -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_flag_topmodule_bad2.out b/test_regress/t/t_flag_topmodule_bad2.out new file mode 100644 index 000000000..e3b86be55 --- /dev/null +++ b/test_regress/t/t_flag_topmodule_bad2.out @@ -0,0 +1,2 @@ +%Error: Specified --top-module 'notfound' was not found in design. +%Error: Exiting due to diff --git a/test_regress/t/t_flag_topmodule_bad2.pl b/test_regress/t/t_flag_topmodule_bad2.pl index 5d152476d..c4368e07a 100755 --- a/test_regress/t/t_flag_topmodule_bad2.pl +++ b/test_regress/t/t_flag_topmodule_bad2.pl @@ -15,9 +15,7 @@ compile( fails => 1, v_flags2 => ["--top-module notfound"], nc => 0, # Need to get it not to give the prompt - expect => -'%Error: Specified --top-module \'notfound\' was not found in design. -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_func_task_bad.out b/test_regress/t/t_func_task_bad.out new file mode 100644 index 000000000..73a966d6b --- /dev/null +++ b/test_regress/t/t_func_task_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_func_task_bad.v:9: Illegal call of a task as a function: task_as_func +%Error: Exiting due to diff --git a/test_regress/t/t_func_task_bad.pl b/test_regress/t/t_func_task_bad.pl index 8512ba682..6ed771616 100755 --- a/test_regress/t/t_func_task_bad.pl +++ b/test_regress/t/t_func_task_bad.pl @@ -11,9 +11,7 @@ scenarios(linter => 1); lint( fails => 1, - expect => -q{%Error: t/t_func_task_bad.v:\d+: Illegal call of a task as a function: task_as_func -%Error: Exiting due to.*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_func_tie_bad.out b/test_regress/t/t_func_tie_bad.out new file mode 100644 index 000000000..460d747bb --- /dev/null +++ b/test_regress/t/t_func_tie_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_func_tie_bad.v:10: Function/task output connected to constant instead of variable: b +%Error: Exiting due to diff --git a/test_regress/t/t_func_tie_bad.pl b/test_regress/t/t_func_tie_bad.pl index 4fdd13faf..6ed771616 100755 --- a/test_regress/t/t_func_tie_bad.pl +++ b/test_regress/t/t_func_tie_bad.pl @@ -11,9 +11,7 @@ scenarios(linter => 1); lint( fails => 1, - expect => -q{%Error: t/t_func_tie_bad.v:\d+: Function/task output connected to constant instead of variable: b -%Error: Exiting due to.*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_genvar_misuse_bad.pl b/test_regress/t/t_genvar_misuse_bad.pl index 7d2854dd9..829aa9986 100755 --- a/test_regress/t/t_genvar_misuse_bad.pl +++ b/test_regress/t/t_genvar_misuse_bad.pl @@ -12,9 +12,7 @@ $Self->{vlt_all} and unsupported("Verilator unsupported, bug408"); lint( fails => 1, - expect => -'.*%Error: t/t_genvar_misuse_bad.v:\d+: Use of genvar where not convertible to constant: i -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_initial_dlyass_bad.out b/test_regress/t/t_initial_dlyass_bad.out new file mode 100644 index 000000000..4a084c56d --- /dev/null +++ b/test_regress/t/t_initial_dlyass_bad.out @@ -0,0 +1,4 @@ +%Warning-INITIALDLY: t/t_initial_dlyass.v:17: Delayed assignments (<=) in initial or final block; suggest blocking assignments (=). + ... Use "/* verilator lint_off INITIALDLY */" and lint_on around source to disable this message. +%Warning-INITIALDLY: t/t_initial_dlyass.v:18: Delayed assignments (<=) in initial or final block; suggest blocking assignments (=). +%Error: Exiting due to diff --git a/test_regress/t/t_initial_dlyass_bad.pl b/test_regress/t/t_initial_dlyass_bad.pl index 08c0db3ed..70a304e53 100755 --- a/test_regress/t/t_initial_dlyass_bad.pl +++ b/test_regress/t/t_initial_dlyass_bad.pl @@ -13,10 +13,8 @@ top_filename("t_initial_dlyass.v"); lint( fails => 1, - expect => -qr{%Warning-INITIALDLY: t/t_initial_dlyass.v:\d+: Delayed assignments .* -%Error: Exiting due to.*}, - ); + expect_filename => $Self->{golden_filename}, + ); ok(1); 1; diff --git a/test_regress/t/t_interface_missing_bad.out b/test_regress/t/t_interface_missing_bad.out new file mode 100644 index 000000000..329b8afeb --- /dev/null +++ b/test_regress/t/t_interface_missing_bad.out @@ -0,0 +1,4 @@ +%Error: t/t_interface_missing_bad.v:13: Cannot find file containing interface: foo_intf +%Error: t/t_interface_missing_bad.v:19: Cannot find file containing interface: foo_intf +%Error: t/t_interface_missing_bad.v:24: Found definition of 'the_foo' as a CELL but expected a variable +%Error: Exiting due to diff --git a/test_regress/t/t_interface_missing_bad.pl b/test_regress/t/t_interface_missing_bad.pl index 5d14aaaa2..3361369bf 100755 --- a/test_regress/t/t_interface_missing_bad.pl +++ b/test_regress/t/t_interface_missing_bad.pl @@ -11,9 +11,7 @@ scenarios(simulator => 1); compile( fails => 1, - expect => -qr{%Error: t/t_interface_missing_bad.v:\d+: Cannot find file containing interface: foo_intf -.*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_interface_top_bad.out b/test_regress/t/t_interface_top_bad.out new file mode 100644 index 000000000..810bf23c0 --- /dev/null +++ b/test_regress/t/t_interface_top_bad.out @@ -0,0 +1,3 @@ +%Error: t/t_interface_top_bad.v:16: Unsupported: Interfaced port on top level module +%Error: t/t_interface_top_bad.v:16: Parent cell's interface is not found: ifc +%Error: Exiting due to diff --git a/test_regress/t/t_interface_top_bad.pl b/test_regress/t/t_interface_top_bad.pl index b8f902f45..9832155f2 100755 --- a/test_regress/t/t_interface_top_bad.pl +++ b/test_regress/t/t_interface_top_bad.pl @@ -11,8 +11,7 @@ scenarios(vlt => 1); lint( fails => 1, - expect => -'%Error: t/t_interface_top_bad.v:\d+: Unsupported: Interfaced port on top level module', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_interface_typo_bad.out b/test_regress/t/t_interface_typo_bad.out new file mode 100644 index 000000000..2e51a99ff --- /dev/null +++ b/test_regress/t/t_interface_typo_bad.out @@ -0,0 +1,4 @@ +%Error: t/t_interface_typo_bad.v:13: Parent cell's interface is not found: foo_intf +%Error: t/t_interface_typo_bad.v:21: Cannot find file containing interface: fo_intf +%Error: t/t_interface_typo_bad.v:26: Found definition of 'the_foo' as a CELL but expected a variable +%Error: Exiting due to diff --git a/test_regress/t/t_interface_typo_bad.pl b/test_regress/t/t_interface_typo_bad.pl index 129be8e26..1cc3d45e3 100755 --- a/test_regress/t/t_interface_typo_bad.pl +++ b/test_regress/t/t_interface_typo_bad.pl @@ -13,11 +13,7 @@ lint( fails => 1, # Used to be %Error: t/t_order_wireloop.v:\d+: Wire inputs its own output, creating circular logic .wire x=x. # However we no longer gate optimize this - expect => -q{%Error: t/t_interface_typo_bad.v:\d+: Parent cell's interface is not found: foo_intf -%Error: t/t_interface_typo_bad.v:\d+: Cannot find file containing interface: fo_intf -%Error: t/t_interface_typo_bad.v:\d+: Found definition of 'the_foo' as a CELL but expected a variable -.*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_block_redecl_bad.pl b/test_regress/t/t_lint_block_redecl_bad.pl index f5ffd347a..cf5892768 100755 --- a/test_regress/t/t_lint_block_redecl_bad.pl +++ b/test_regress/t/t_lint_block_redecl_bad.pl @@ -12,9 +12,7 @@ $Self->{vlt_all} and unsupported("Verilator unsupported, bug485, false begin due lint( fails => 1, - expect => -'%Warning: duplicate... -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_bsspace_bad.out b/test_regress/t/t_lint_bsspace_bad.out new file mode 100644 index 000000000..76753bce0 --- /dev/null +++ b/test_regress/t/t_lint_bsspace_bad.out @@ -0,0 +1,4 @@ +%Warning-BSSPACE: t/t_lint_bsspace_bad.v:9: Backslash followed by whitespace, perhaps the whitespace is accidental? + ... Use "/* verilator lint_off BSSPACE */" and lint_on around source to disable this message. +%Error: t/t_lint_bsspace_bad.v:10: syntax error, unexpected IDENTIFIER +%Error: Exiting due to diff --git a/test_regress/t/t_lint_bsspace_bad.pl b/test_regress/t/t_lint_bsspace_bad.pl index 1dfc4b1e4..385b304e3 100755 --- a/test_regress/t/t_lint_bsspace_bad.pl +++ b/test_regress/t/t_lint_bsspace_bad.pl @@ -11,9 +11,7 @@ scenarios(vlt => 1); lint( fails => 1, - expect => -'%Warning-BSSPACE: t/t_lint_bsspace_bad.v:\d+: Backslash followed by whitespace, perhaps the whitespace is accidental\? -.*%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_comb_bad.out b/test_regress/t/t_lint_comb_bad.out new file mode 100644 index 000000000..9dd830c36 --- /dev/null +++ b/test_regress/t/t_lint_comb_bad.out @@ -0,0 +1,3 @@ +%Error: t/t_lint_comb_bad.v:13: syntax error, unexpected '@' +%Error: Cannot continue +%Error: Command Failed diff --git a/test_regress/t/t_lint_comb_bad.pl b/test_regress/t/t_lint_comb_bad.pl index b984faf66..385b304e3 100755 --- a/test_regress/t/t_lint_comb_bad.pl +++ b/test_regress/t/t_lint_comb_bad.pl @@ -11,9 +11,7 @@ scenarios(vlt => 1); lint( fails => 1, - expect => -q{%Error: t/t_lint_comb_bad.v:\d+: syntax error, unexpected '@' -.*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_input_eq_bad.out b/test_regress/t/t_lint_input_eq_bad.out new file mode 100644 index 000000000..9515395ef --- /dev/null +++ b/test_regress/t/t_lint_input_eq_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_lint_input_eq_bad.v:9: Unsupported: Default value on module input: i2 +%Error: Exiting due to diff --git a/test_regress/t/t_lint_input_eq_bad.pl b/test_regress/t/t_lint_input_eq_bad.pl index 1430ed85a..72de436c6 100755 --- a/test_regress/t/t_lint_input_eq_bad.pl +++ b/test_regress/t/t_lint_input_eq_bad.pl @@ -11,9 +11,7 @@ scenarios(vlt => 1); lint( fails => 1, - expect => -'%Error: t/t_lint_input_eq_bad.v:\d+: Unsupported: Default value on module input: i2 -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_literal_bad.out b/test_regress/t/t_lint_literal_bad.out new file mode 100644 index 000000000..c437ad24b --- /dev/null +++ b/test_regress/t/t_lint_literal_bad.out @@ -0,0 +1,3 @@ +%Warning-WIDTH: t/t_lint_literal_bad.v:9: Value too large for 8 bit number: 256 + ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message. +%Error: Exiting due to diff --git a/test_regress/t/t_lint_literal_bad.pl b/test_regress/t/t_lint_literal_bad.pl index 6f2c81d8d..93c6cc548 100755 --- a/test_regress/t/t_lint_literal_bad.pl +++ b/test_regress/t/t_lint_literal_bad.pl @@ -11,9 +11,7 @@ scenarios(vlt_all => 1); compile( fails => 1, - expect => -'%Warning-WIDTH: t/t_lint_literal_bad.v:9: Value too large for 8 bit number: 256 -', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_mod_paren_bad.out b/test_regress/t/t_lint_mod_paren_bad.out new file mode 100644 index 000000000..d2f556cd9 --- /dev/null +++ b/test_regress/t/t_lint_mod_paren_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_lint_mod_paren_bad.v:13: syntax error, unexpected '(', expecting ';' +%Error: Exiting due to diff --git a/test_regress/t/t_lint_mod_paren_bad.pl b/test_regress/t/t_lint_mod_paren_bad.pl index 568a3f645..ef5190d79 100755 --- a/test_regress/t/t_lint_mod_paren_bad.pl +++ b/test_regress/t/t_lint_mod_paren_bad.pl @@ -12,9 +12,7 @@ scenarios(vlt => 1); lint( verilator_flags2 => ["--lint-only -Wno-DECLFILENAME"], fails => 1, - expect => -q{%Error: t/t_lint_mod_paren_bad.v:\d+: syntax error, unexpected '\(', expecting ';' -%Error: Exiting due to .*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_math_shift_over_bad.out b/test_regress/t/t_math_shift_over_bad.out new file mode 100644 index 000000000..e46ee6404 --- /dev/null +++ b/test_regress/t/t_math_shift_over_bad.out @@ -0,0 +1,3 @@ +%Error: Internal Error: ../V3Number.cpp:668: Value too wide for 32-bits expected in this context 64'h123456789abcdef + ... See the manual and http://www.veripool.org/verilator for more assistance. +%Error: Command Failed diff --git a/test_regress/t/t_math_shift_over_bad.pl b/test_regress/t/t_math_shift_over_bad.pl index a76bb9809..4ba881869 100755 --- a/test_regress/t/t_math_shift_over_bad.pl +++ b/test_regress/t/t_math_shift_over_bad.pl @@ -11,9 +11,7 @@ scenarios(linter => 1); lint( fails => 1, - expect => -'%Error: Internal Error: .*: Value too wide for 32-bits expected in this context 64\'h123456789abcdef -.', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_mem_packed_bad.out b/test_regress/t/t_mem_packed_bad.out new file mode 100644 index 000000000..3a6a8ab72 --- /dev/null +++ b/test_regress/t/t_mem_packed_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_mem_packed_bad.v:26: CONST '28'h0' unexpected in assignment to unpacked array +%Error: Exiting due to diff --git a/test_regress/t/t_mem_packed_bad.pl b/test_regress/t/t_mem_packed_bad.pl index cf306aa82..4ba881869 100755 --- a/test_regress/t/t_mem_packed_bad.pl +++ b/test_regress/t/t_mem_packed_bad.pl @@ -11,9 +11,7 @@ scenarios(linter => 1); lint( fails => 1, - expect => -q{%Error: t/t_mem_packed_bad.v:\d+: CONST '28'h0' unexpected in assignment to unpacked array -%Error: Exiting due to.*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_mem_slice_dtype_bad.out b/test_regress/t/t_mem_slice_dtype_bad.out new file mode 100644 index 000000000..ac31ee92a --- /dev/null +++ b/test_regress/t/t_mem_slice_dtype_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_mem_slice_dtype_bad.v:22: ADD unexpected in assignment to unpacked array +%Error: Exiting due to diff --git a/test_regress/t/t_mem_slice_dtype_bad.pl b/test_regress/t/t_mem_slice_dtype_bad.pl index 2c72e1d70..3361369bf 100755 --- a/test_regress/t/t_mem_slice_dtype_bad.pl +++ b/test_regress/t/t_mem_slice_dtype_bad.pl @@ -11,9 +11,7 @@ scenarios(simulator => 1); compile( fails => 1, - expect => -'%Error: t/t_mem_slice_dtype_bad.v:\d+: ADD unexpected in assignment to unpacked array -.*%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_order_clkinst_bad.out b/test_regress/t/t_order_clkinst_bad.out new file mode 100644 index 000000000..f000bbfab --- /dev/null +++ b/test_regress/t/t_order_clkinst_bad.out @@ -0,0 +1,9 @@ +%Warning-IMPERFECTSCH: t/t_order_clkinst.v:17: Imperfect scheduling of variable: t.c1_start + ... Use "/* verilator lint_off IMPERFECTSCH */" and lint_on around source to disable this message. +%Warning-IMPERFECTSCH: t/t_order_clkinst.v:18: Imperfect scheduling of variable: t.c1_count +%Warning-IMPERFECTSCH: t/t_order_clkinst.v:22: Imperfect scheduling of variable: t.s2_count +%Warning-IMPERFECTSCH: t/t_order_clkinst.v:26: Imperfect scheduling of variable: t.c3_count +%Warning-IMPERFECTSCH: t/t_order_clkinst.v:70: Imperfect scheduling of variable: t.c1.runner +%Warning-IMPERFECTSCH: t/t_order_clkinst.v:99: Imperfect scheduling of variable: t.s2.runner +%Warning-IMPERFECTSCH: t/t_order_clkinst.v:70: Imperfect scheduling of variable: t.c3.runner +%Error: Exiting due to diff --git a/test_regress/t/t_order_clkinst_bad.pl b/test_regress/t/t_order_clkinst_bad.pl index 51f214681..62ff8731a 100755 --- a/test_regress/t/t_order_clkinst_bad.pl +++ b/test_regress/t/t_order_clkinst_bad.pl @@ -14,9 +14,7 @@ top_filename("t/t_order_clkinst.v"); compile( v_flags2 => ["-Wwarn-IMPERFECTSCH"], fails => 1, - expect => -q{.*%Warning-IMPERFECTSCH: .* -.*%Error: Exiting due to.*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_order_loop_bad.pl b/test_regress/t/t_order_loop_bad.pl index 4e0675420..c7478bafa 100755 --- a/test_regress/t/t_order_loop_bad.pl +++ b/test_regress/t/t_order_loop_bad.pl @@ -11,6 +11,7 @@ scenarios(vlt => 1); lint( fails => 1, + # Can't use expect_filename here as unstable output expect => '%Error: Circular logic when ordering code .* *t/t_order_loop_bad.v:\d+: + Example path: ALWAYS diff --git a/test_regress/t/t_order_wireloop.pl b/test_regress/t/t_order_wireloop.pl index 440c45707..a5a405f6f 100755 --- a/test_regress/t/t_order_wireloop.pl +++ b/test_regress/t/t_order_wireloop.pl @@ -13,6 +13,7 @@ compile( fails => $Self->{vlt_all}, # Used to be %Error: t/t_order_wireloop.v:\d+: Wire inputs its own output, creating circular logic .wire x=x. # However we no longer gate optimize this + # Can't use expect_filename here as unstable output expect => '%Warning-UNOPT: t/t_order_wireloop.v:\d+: Signal unoptimizable: Feedback to public clock or circular logic: bar ', diff --git a/test_regress/t/t_package_export_bad.out b/test_regress/t/t_package_export_bad.out new file mode 100644 index 000000000..ab63e59af --- /dev/null +++ b/test_regress/t/t_package_export_bad.out @@ -0,0 +1,7 @@ +%Error: t/t_package_export.v:56: Can't find definition of scope/variable: PARAM2 +%Error: t/t_package_export.v:57: Can't find definition of scope/variable: PARAM3 +%Error: t/t_package_export.v:60: Can't find definition of scope/variable: PARAM2 +%Error: t/t_package_export.v:61: Can't find definition of scope/variable: PARAM3 +%Error: t/t_package_export.v:64: Can't find definition of scope/variable: PARAM2 +%Error: t/t_package_export.v:65: Can't find definition of scope/variable: PARAM3 +%Error: Exiting due to diff --git a/test_regress/t/t_package_export_bad.pl b/test_regress/t/t_package_export_bad.pl index 9e56c6000..506f5b1b3 100755 --- a/test_regress/t/t_package_export_bad.pl +++ b/test_regress/t/t_package_export_bad.pl @@ -14,14 +14,7 @@ top_filename("t/t_package_export.v"); lint( v_flags2 => ['+define+T_PACKAGE_EXPORT_BAD',], fails => 1, - expect => -'%Error: t/t_package_export.v:\d+: Can\'t find definition of scope/variable: PARAM2 -%Error: t/t_package_export.v:\d+: Can\'t find definition of scope/variable: PARAM3 -%Error: t/t_package_export.v:\d+: Can\'t find definition of scope/variable: PARAM2 -%Error: t/t_package_export.v:\d+: Can\'t find definition of scope/variable: PARAM3 -%Error: t/t_package_export.v:\d+: Can\'t find definition of scope/variable: PARAM2 -%Error: t/t_package_export.v:\d+: Can\'t find definition of scope/variable: PARAM3 -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); diff --git a/test_regress/t/t_param_up_bad.out b/test_regress/t/t_param_up_bad.out new file mode 100644 index 000000000..97baf196a --- /dev/null +++ b/test_regress/t/t_param_up_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_param_up_bad.v:15: Can't find definition of scope/variable: bar +%Error: Exiting due to diff --git a/test_regress/t/t_param_up_bad.pl b/test_regress/t/t_param_up_bad.pl index 11f9214d6..b09f43e8b 100755 --- a/test_regress/t/t_param_up_bad.pl +++ b/test_regress/t/t_param_up_bad.pl @@ -11,9 +11,7 @@ scenarios(linter => 1); lint( fails => 1, - expect => -'%Error: t/t_param_up_bad.v:\d+: Can\'t find definition of scope/variable: bar -.*%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_past_unsup_bad.out b/test_regress/t/t_past_unsup_bad.out new file mode 100644 index 000000000..2d6b38bed --- /dev/null +++ b/test_regress/t/t_past_unsup_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_past_unsup_bad.v:12: Unsupported: $past expr2 and clock arguments +%Error: Exiting due to diff --git a/test_regress/t/t_past_unsup_bad.pl b/test_regress/t/t_past_unsup_bad.pl index 519231f47..385b304e3 100755 --- a/test_regress/t/t_past_unsup_bad.pl +++ b/test_regress/t/t_past_unsup_bad.pl @@ -7,13 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -scenarios(vlt_all => 1); +scenarios(vlt => 1); -compile( +lint( fails => 1, - expect => -'%Error: t/t_past_unsup_bad.v:12: Unsupported: \$past expr2 and clock arguments -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_pp_circdef_bad.out b/test_regress/t/t_pp_circdef_bad.out new file mode 100644 index 000000000..1039efb61 --- /dev/null +++ b/test_regress/t/t_pp_circdef_bad.out @@ -0,0 +1,3 @@ +%Error: t/t_pp_circdef_bad.v:13: Recursive `define or other nested inclusion +%Error: t/t_pp_circdef_bad.v:14: syntax error, unexpected $end, expecting TYPE-IDENTIFIER +%Error: Exiting due to diff --git a/test_regress/t/t_pp_circdef_bad.pl b/test_regress/t/t_pp_circdef_bad.pl index f48c960f5..385b304e3 100755 --- a/test_regress/t/t_pp_circdef_bad.pl +++ b/test_regress/t/t_pp_circdef_bad.pl @@ -11,10 +11,7 @@ scenarios(vlt => 1); lint( fails => 1, - expect => -'%Error: t/t_pp_circdef_bad.v:\d+: Recursive `define or other nested inclusion -.* -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_pp_misdef_bad.out b/test_regress/t/t_pp_misdef_bad.out new file mode 100644 index 000000000..ce4e90bf3 --- /dev/null +++ b/test_regress/t/t_pp_misdef_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_pp_misdef_bad.v:10: Define or directive not defined: `NOTDEF +%Error: Exiting due to diff --git a/test_regress/t/t_pp_misdef_bad.pl b/test_regress/t/t_pp_misdef_bad.pl index 5736c7c70..385b304e3 100755 --- a/test_regress/t/t_pp_misdef_bad.pl +++ b/test_regress/t/t_pp_misdef_bad.pl @@ -11,9 +11,7 @@ scenarios(vlt => 1); lint( fails => 1, - expect => -'%Error: t/t_pp_misdef_bad.v:\d+: Define or directive not defined: `NOTDEF -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_pp_underline_bad.out b/test_regress/t/t_pp_underline_bad.out new file mode 100644 index 000000000..3aaf91f5a --- /dev/null +++ b/test_regress/t/t_pp_underline_bad.out @@ -0,0 +1,3 @@ +%Error: t/t_pp_underline_bad.v:7: Extra underscore in meta-comment; use /*verilator {...}*/ not /*verilator_{...}*/ +%Error: t/t_pp_underline_bad.v:7: Unknown verilator comment: /*verilator _no_inline_module*/ +%Error: Exiting due to diff --git a/test_regress/t/t_pp_underline_bad.pl b/test_regress/t/t_pp_underline_bad.pl index 8ea1c3465..385b304e3 100755 --- a/test_regress/t/t_pp_underline_bad.pl +++ b/test_regress/t/t_pp_underline_bad.pl @@ -11,9 +11,7 @@ scenarios(vlt => 1); lint( fails => 1, - expect => -'%Error: t/t_pp_underline_bad.v:\d+: Extra underscore in meta-comment.* -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_select_bad_msb.out b/test_regress/t/t_select_bad_msb.out new file mode 100644 index 000000000..f2d205eea --- /dev/null +++ b/test_regress/t/t_select_bad_msb.out @@ -0,0 +1,4 @@ +%Warning-LITENDIAN: t/t_select_bad_msb.v:11: Little bit endian vector: MSB < LSB of bit range: 0:22 + ... Use "/* verilator lint_off LITENDIAN */" and lint_on around source to disable this message. +%Error: t/t_select_bad_msb.v:15: [1:4] Range extract has backward bit ordering, perhaps you wanted [4:1] +%Error: Exiting due to diff --git a/test_regress/t/t_select_bad_msb.pl b/test_regress/t/t_select_bad_msb.pl index 96eb3a182..b3eb5b75d 100755 --- a/test_regress/t/t_select_bad_msb.pl +++ b/test_regress/t/t_select_bad_msb.pl @@ -11,10 +11,7 @@ scenarios(vlt_all => 1); compile( fails => 1, - expect => -'%Warning-LITENDIAN: t/t_select_bad_msb.v:\d+: Little bit endian vector: MSB < LSB of bit range: 0:22 -.* -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_var_port_bad.out b/test_regress/t/t_var_port_bad.out new file mode 100644 index 000000000..f8e950462 --- /dev/null +++ b/test_regress/t/t_var_port_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_var_port_bad.v:15: Input/output/inout does not appear in port list: b +%Error: Exiting due to diff --git a/test_regress/t/t_var_port_bad.pl b/test_regress/t/t_var_port_bad.pl index e9f3c1e38..5ee4228c2 100755 --- a/test_regress/t/t_var_port_bad.pl +++ b/test_regress/t/t_var_port_bad.pl @@ -7,13 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -scenarios(simulator => 1); +scenarios(linter => 1); compile( fails => 1, - expect => -'%Error: t/t_var_port_bad.v:\d+: Input/output/inout does not appear in port list: b -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_var_ref_bad3.out b/test_regress/t/t_var_ref_bad3.out new file mode 100644 index 000000000..3288c2385 --- /dev/null +++ b/test_regress/t/t_var_ref_bad3.out @@ -0,0 +1,2 @@ +%Error: t/t_var_ref_bad3.v:9: Unsupported: ref/const ref as primary input/output: bad_primary_ref +%Error: Exiting due to diff --git a/test_regress/t/t_var_ref_bad3.pl b/test_regress/t/t_var_ref_bad3.pl index 8d6676da4..385b304e3 100755 --- a/test_regress/t/t_var_ref_bad3.pl +++ b/test_regress/t/t_var_ref_bad3.pl @@ -11,9 +11,7 @@ scenarios(vlt => 1); lint( fails => 1, - expect => -q{%Error: t/t_var_ref_bad3.v:\d+: Unsupported: ref/const ref as primary input/output: bad_primary_ref -.*%Error: Exiting due to.*}, + expect_filename => $Self->{golden_filename}, ); ok(1);