diff --git a/test_regress/t/t_array_pattern_bad.out b/test_regress/t/t_array_pattern_bad.out new file mode 100644 index 000000000..02ac9e880 --- /dev/null +++ b/test_regress/t/t_array_pattern_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_array_pattern_bad.v:23: Assignment pattern key 'valids' not found as member +%Error: Exiting due to diff --git a/test_regress/t/t_array_pattern_bad.pl b/test_regress/t/t_array_pattern_bad.pl index 9bcc2f2a9..3361369bf 100755 --- a/test_regress/t/t_array_pattern_bad.pl +++ b/test_regress/t/t_array_pattern_bad.pl @@ -11,9 +11,7 @@ scenarios(simulator => 1); compile( fails => 1, - expect => -q{%Error: t/t_array_pattern_bad.v:23: Assignment pattern key 'valids' not found as member -.*%Error: Exiting due to.*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_bitsel_const_bad.out b/test_regress/t/t_bitsel_const_bad.out new file mode 100644 index 000000000..4a088c918 --- /dev/null +++ b/test_regress/t/t_bitsel_const_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_bitsel_const_bad.v:20: Illegal bit or array select; type does not have a bit range, or bad dimension: type is logic +%Error: Exiting due to diff --git a/test_regress/t/t_bitsel_const_bad.pl b/test_regress/t/t_bitsel_const_bad.pl index a6b950c20..8bc867659 100755 --- a/test_regress/t/t_bitsel_const_bad.pl +++ b/test_regress/t/t_bitsel_const_bad.pl @@ -12,9 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -'%Error: t/t_bitsel_const_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_case_genx_bad.out b/test_regress/t/t_case_genx_bad.out new file mode 100644 index 000000000..0676c543b --- /dev/null +++ b/test_regress/t/t_case_genx_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_case_genx_bad.v:13: Use of x/? constant in generate case statement, (no such thing as 'generate casez') +%Error: Exiting due to diff --git a/test_regress/t/t_case_genx_bad.pl b/test_regress/t/t_case_genx_bad.pl index 4e0e02d6a..677f982e6 100755 --- a/test_regress/t/t_case_genx_bad.pl +++ b/test_regress/t/t_case_genx_bad.pl @@ -12,9 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -'%Error: t/t_case_genx_bad.v:\d+: Use of x/\? constant in generate case statement, \(no such thing as \'generate casez\'\) -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_concat_large_bad.out b/test_regress/t/t_concat_large_bad.out new file mode 100644 index 000000000..409362b78 --- /dev/null +++ b/test_regress/t/t_concat_large_bad.out @@ -0,0 +1,3 @@ +%Warning-WIDTHCONCAT: t/t_concat_large_bad.v:8: More than a 8k bit replication is probably wrong: 32768 +%Warning-WIDTHCONCAT: Use "/* verilator lint_off WIDTHCONCAT */" and lint_on around source to disable this message. +%Error: Exiting due to diff --git a/test_regress/t/t_concat_large_bad.pl b/test_regress/t/t_concat_large_bad.pl index 410c391bf..f11d3fd4f 100755 --- a/test_regress/t/t_concat_large_bad.pl +++ b/test_regress/t/t_concat_large_bad.pl @@ -12,10 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -'%Warning-WIDTHCONCAT: t/t_concat_large_bad.v:\d+: More than a 8k bit replication is probably wrong: 32768 -%Warning-WIDTHCONCAT: Use .* -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_dpi_openreg_bad.out b/test_regress/t/t_dpi_openreg_bad.out new file mode 100644 index 000000000..e8aed3c4d --- /dev/null +++ b/test_regress/t/t_dpi_openreg_bad.out @@ -0,0 +1,3 @@ +%Error: t/t_dpi_openreg_bad.v:13: Unsized/open arrays ('[]') are only supported in DPI imports +%Error: t/t_dpi_openreg_bad.v:14: Unsized/open arrays ('[]') are only supported in DPI imports +%Error: Exiting due to diff --git a/test_regress/t/t_dpi_openreg_bad.pl b/test_regress/t/t_dpi_openreg_bad.pl index e759482f5..96456db03 100755 --- a/test_regress/t/t_dpi_openreg_bad.pl +++ b/test_regress/t/t_dpi_openreg_bad.pl @@ -12,10 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => $Self->{vlt_all}, - expect => -'%Error: t/t_dpi_openreg_bad.v:\d+: Unsized/open arrays \(\'\[\]\'\) are only supported in DPI imports -%Error: t/t_dpi_openreg_bad.v:\d+: Unsized/open arrays \(\'\[\]\'\) are only supported in DPI imports -%Error: Exiting due to .*' + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_enum_overlap_bad.out b/test_regress/t/t_enum_overlap_bad.out new file mode 100644 index 000000000..a3c1f2aaa --- /dev/null +++ b/test_regress/t/t_enum_overlap_bad.out @@ -0,0 +1,3 @@ +%Error: t/t_enum_overlap_bad.v:11: Overlapping enumeration value: e1b +%Error: t/t_enum_overlap_bad.v:9: ... Location of original declaration +%Error: Exiting due to diff --git a/test_regress/t/t_enum_overlap_bad.pl b/test_regress/t/t_enum_overlap_bad.pl index f61051b6e..1db26a03a 100755 --- a/test_regress/t/t_enum_overlap_bad.pl +++ b/test_regress/t/t_enum_overlap_bad.pl @@ -12,10 +12,7 @@ scenarios(vlt => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -'%Error: t/t_enum_overlap_bad.v:\d+: Overlapping enumeration value: e1b -%Error: t/t_enum_overlap_bad.v:\d+: ... Location of original declaration -%Error: Exiting due to', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_flag_werror_bad1.out b/test_regress/t/t_flag_werror_bad1.out new file mode 100644 index 000000000..c4b7272af --- /dev/null +++ b/test_regress/t/t_flag_werror_bad1.out @@ -0,0 +1,3 @@ +%Warning-WIDTH: t/t_flag_werror.v:9: Operator ASSIGNW expects 4 bits on the Assign RHS, but Assign RHS's CONST '6'h2e' generates 6 bits. +%Warning-WIDTH: 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_flag_werror_bad1.pl b/test_regress/t/t_flag_werror_bad1.pl index 1c2bcb92a..fbd2c1f5c 100755 --- a/test_regress/t/t_flag_werror_bad1.pl +++ b/test_regress/t/t_flag_werror_bad1.pl @@ -14,10 +14,7 @@ top_filename("t/t_flag_werror.v"); compile( v_flags2 => ["--lint-only"], fails => $Self->{vlt_all}, - expect => -q{%Warning-WIDTH: t/t_flag_werror.v:\d+: Operator ASSIGNW expects 4 bits on the Assign RHS, but Assign RHS.s CONST '6'h2e' generates 6 bits. -%Warning-WIDTH: Use .* and lint_on around source to disable this message. -%Error: Exiting due to}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_flag_werror_bad2.out b/test_regress/t/t_flag_werror_bad2.out new file mode 100644 index 000000000..431bbc2a2 --- /dev/null +++ b/test_regress/t/t_flag_werror_bad2.out @@ -0,0 +1,2 @@ +%Error-WIDTH: t/t_flag_werror.v:9: Operator ASSIGNW expects 4 bits on the Assign RHS, but Assign RHS's CONST '6'h2e' generates 6 bits. +%Error: Exiting due to diff --git a/test_regress/t/t_flag_werror_bad2.pl b/test_regress/t/t_flag_werror_bad2.pl index 0acb342a9..bd48ee93f 100755 --- a/test_regress/t/t_flag_werror_bad2.pl +++ b/test_regress/t/t_flag_werror_bad2.pl @@ -15,9 +15,7 @@ compile( v_flags2 => ["--lint-only"], fails => 1, verilator_flags => [qw(-cc -Werror-WIDTH)], - expect => -q{%Error-WIDTH: t/t_flag_werror.v:\d+: Operator ASSIGNW expects 4 bits on the Assign RHS, but Assign RHS.s CONST '6'h2e' generates 6 bits. -%Error: Exiting due to}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_flag_wfatal.out b/test_regress/t/t_flag_wfatal.out new file mode 100644 index 000000000..d923dae22 --- /dev/null +++ b/test_regress/t/t_flag_wfatal.out @@ -0,0 +1,2 @@ +%Warning-WIDTH: t/t_flag_wfatal.v:9: Operator ASSIGNW expects 4 bits on the Assign RHS, but Assign RHS's CONST '6'h2e' generates 6 bits. +%Warning-WIDTH: Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message. diff --git a/test_regress/t/t_flag_wfatal.pl b/test_regress/t/t_flag_wfatal.pl index 62c21941c..658c8f71f 100755 --- a/test_regress/t/t_flag_wfatal.pl +++ b/test_regress/t/t_flag_wfatal.pl @@ -17,10 +17,7 @@ compile( verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect => -q{%Warning-WIDTH: t/t_flag_wfatal.v:\d+: Operator ASSIGNW expects 4 bits on the Assign RHS, but Assign RHS.s CONST '6'h2e' generates 6 bits. -%Warning-WIDTH: Use .* and lint_on around source to disable this message. -}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_func_bad2.out b/test_regress/t/t_func_bad2.out new file mode 100644 index 000000000..09f7e5f84 --- /dev/null +++ b/test_regress/t/t_func_bad2.out @@ -0,0 +1,2 @@ +%Error: t/t_func_bad2.v:7: Unsupported: Recursive function or task call +%Error: Exiting due to diff --git a/test_regress/t/t_func_bad2.pl b/test_regress/t/t_func_bad2.pl index 96b513a5b..37764365f 100755 --- a/test_regress/t/t_func_bad2.pl +++ b/test_regress/t/t_func_bad2.pl @@ -11,9 +11,7 @@ scenarios(simulator => 1); compile( fails => $Self->{vlt_all}, - expect => -'%Error: t/t_func_bad2.v:\d+: Unsupported: Recursive function or task call -%Error: Exiting due to', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_func_wide_out_bad.out b/test_regress/t/t_func_wide_out_bad.out new file mode 100644 index 000000000..6e1458475 --- /dev/null +++ b/test_regress/t/t_func_wide_out_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_func_wide_out_bad.v:16: Unsupported: Function output argument 'data' requires 4352 bits, but connection's VARREF 'msg' generates 4350 bits. +%Error: Exiting due to diff --git a/test_regress/t/t_func_wide_out_bad.pl b/test_regress/t/t_func_wide_out_bad.pl index ec42e1260..8bc867659 100755 --- a/test_regress/t/t_func_wide_out_bad.pl +++ b/test_regress/t/t_func_wide_out_bad.pl @@ -12,9 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -q{%Error: t/t_func_wide_out_bad.v:\d+: Unsupported: Function output argument 'data' requires 4352 bits, but connection's VARREF 'msg' generates 4350 bits. -%Error: Exiting due to.*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_gen_var_bad.out b/test_regress/t/t_gen_var_bad.out new file mode 100644 index 000000000..dbd19cbb1 --- /dev/null +++ b/test_regress/t/t_gen_var_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_gen_var_bad.v:9: Non-genvar used in generate for: i +%Error: Exiting due to diff --git a/test_regress/t/t_gen_var_bad.pl b/test_regress/t/t_gen_var_bad.pl index c4230c3cf..8bc867659 100755 --- a/test_regress/t/t_gen_var_bad.pl +++ b/test_regress/t/t_gen_var_bad.pl @@ -12,9 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -'.*%Error: t/t_gen_var_bad.v:\d+: Non-genvar used in generate for: i -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_inst_array_bad.out b/test_regress/t/t_inst_array_bad.out new file mode 100644 index 000000000..95b87a386 --- /dev/null +++ b/test_regress/t/t_inst_array_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_inst_array_bad.v:18: Input port connection 'onebit' as part of a module instance array requires 1 or 8 bits, but connection's VARREF 'onebitbad' generates 9 bits. +%Error: Exiting due to diff --git a/test_regress/t/t_inst_array_bad.pl b/test_regress/t/t_inst_array_bad.pl index dc544d3d6..677f982e6 100755 --- a/test_regress/t/t_inst_array_bad.pl +++ b/test_regress/t/t_inst_array_bad.pl @@ -12,9 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -q{%Error: t/t_inst_array_bad.v:\d+: Input port connection 'onebit' as part of a module instance array requires 1 or 8 bits, but connection's VARREF 'onebitbad' generates 9 bits. -%Error: Exiting due to.*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_inst_misarray_bad.out b/test_regress/t/t_inst_misarray_bad.out new file mode 100644 index 000000000..7d8e9de28 --- /dev/null +++ b/test_regress/t/t_inst_misarray_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_inst_misarray_bad.v:16: VARREF 't.foo' is not an unpacked array, but is in an unpacked array context +%Error: Exiting due to diff --git a/test_regress/t/t_inst_misarray_bad.pl b/test_regress/t/t_inst_misarray_bad.pl index b87a8f781..49e80bde3 100755 --- a/test_regress/t/t_inst_misarray_bad.pl +++ b/test_regress/t/t_inst_misarray_bad.pl @@ -15,9 +15,7 @@ compile( verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect => -q{%Error: t/t_inst_misarray_bad.v:16: VARREF 't.foo' is not an unpacked array, but is in an unpacked array context -%Error: Exiting due to.*}, + expect_filename => $Self->{golden_filename}, ); diff --git a/test_regress/t/t_inst_recurse2_bad.out b/test_regress/t/t_inst_recurse2_bad.out new file mode 100644 index 000000000..7550b55f7 --- /dev/null +++ b/test_regress/t/t_inst_recurse2_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_inst_recurse2_bad.v:17: Unsupported: Identically recursive module (module instantiates itself, without changing parameters): looped +%Error: Exiting due to diff --git a/test_regress/t/t_inst_recurse2_bad.pl b/test_regress/t/t_inst_recurse2_bad.pl index 95e358ccc..ac8a3e44a 100755 --- a/test_regress/t/t_inst_recurse2_bad.pl +++ b/test_regress/t/t_inst_recurse2_bad.pl @@ -11,9 +11,7 @@ scenarios(simulator => 1); compile( fails => 1, - expect => -'.*%Error: t/t_inst_recurse2_bad.v:\d+: Unsupported: Identically recursive module \(module instantiates itself, without changing parameters\): looped -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_interface_array_bad.out b/test_regress/t/t_interface_array_bad.out new file mode 100644 index 000000000..7249be815 --- /dev/null +++ b/test_regress/t/t_interface_array_bad.out @@ -0,0 +1,3 @@ +%Error: t/t_interface_array_bad.v:22: Expecting expression to be constant, but variable isn't const: bar +%Error: t/t_interface_array_bad.v:22: Could not expand constant selection inside dotted reference: bar +%Error: Exiting due to diff --git a/test_regress/t/t_interface_array_bad.pl b/test_regress/t/t_interface_array_bad.pl index 292c6da02..3361369bf 100755 --- a/test_regress/t/t_interface_array_bad.pl +++ b/test_regress/t/t_interface_array_bad.pl @@ -11,10 +11,7 @@ scenarios(simulator => 1); compile( fails => 1, - expect => -'%Error: t/t_interface_array_bad.v:\d+: Expecting expression to be constant, but variable isn\'t const: bar -%Error: t/t_interface_array_bad.v:\d+: Could not expand constant selection inside dotted reference: bar -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_interface_mismodport_bad.out b/test_regress/t/t_interface_mismodport_bad.out new file mode 100644 index 000000000..ec1b46f5c --- /dev/null +++ b/test_regress/t/t_interface_mismodport_bad.out @@ -0,0 +1,3 @@ +%Error: t/t_interface_mismodport_bad.v:35: Can't find definition of 'bad' in dotted signal: isub.bad +%Error: Known scopes under 'bad': +%Error: Exiting due to diff --git a/test_regress/t/t_interface_mismodport_bad.pl b/test_regress/t/t_interface_mismodport_bad.pl index d5634a519..1f28eb091 100755 --- a/test_regress/t/t_interface_mismodport_bad.pl +++ b/test_regress/t/t_interface_mismodport_bad.pl @@ -15,9 +15,7 @@ compile( make_top_shell => 0, make_main => 0, fails => 1, - expect => -'%Error: t/t_interface_mismodport_bad.v:\d+: Can\'t find definition of \'bad\' in dotted signal: isub.bad -.*%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_interface_param_another_bad.out b/test_regress/t/t_interface_param_another_bad.out new file mode 100644 index 000000000..923ee74d8 --- /dev/null +++ b/test_regress/t/t_interface_param_another_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_interface_param_another_bad.v:8: Parameter-resolved constants must not use dotted references: dummy +%Error: Exiting due to diff --git a/test_regress/t/t_interface_param_another_bad.pl b/test_regress/t/t_interface_param_another_bad.pl index cbe619317..3361369bf 100755 --- a/test_regress/t/t_interface_param_another_bad.pl +++ b/test_regress/t/t_interface_param_another_bad.pl @@ -11,9 +11,7 @@ scenarios(simulator => 1); compile( fails => 1, - expect => -q{%Error: t/t_interface_param_another_bad.v:\d+: Parameter-resolved constants must not use dotted references: dummy -%Error: Exiting due to.*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_interface_wrong_bad.out b/test_regress/t/t_interface_wrong_bad.out new file mode 100644 index 000000000..cc0e3ec0f --- /dev/null +++ b/test_regress/t/t_interface_wrong_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_interface_wrong_bad.v:31: Port 'foo_port' expects 'foo_intf' interface but pin connects 'bar_intf' interface +%Error: Exiting due to diff --git a/test_regress/t/t_interface_wrong_bad.pl b/test_regress/t/t_interface_wrong_bad.pl index c97b5af9e..3361369bf 100755 --- a/test_regress/t/t_interface_wrong_bad.pl +++ b/test_regress/t/t_interface_wrong_bad.pl @@ -11,8 +11,7 @@ scenarios(simulator => 1); compile( fails => 1, - expect => -q{%Error: t/t_interface_wrong_bad.v:\d+: Port 'foo_port' expects 'foo_intf' interface but pin connects 'bar_intf' interface}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_always_comb_bad.out b/test_regress/t/t_lint_always_comb_bad.out new file mode 100644 index 000000000..81bc36f64 --- /dev/null +++ b/test_regress/t/t_lint_always_comb_bad.out @@ -0,0 +1,6 @@ +%Error-PROCASSWIRE: t/t_lint_always_comb_bad.v:28: Procedural assignment to wire, perhaps intended var (IEEE 2017 6.5): temp1 +%Error-PROCASSWIRE: t/t_lint_always_comb_bad.v:30: Procedural assignment to wire, perhaps intended var (IEEE 2017 6.5): temp1 +%Warning-ALWCOMBORDER: t/t_lint_always_comb_bad.v:31: Always_comb variable driven after use: mid +%Warning-ALWCOMBORDER: Use "/* verilator lint_off ALWCOMBORDER */" and lint_on around source to disable this message. +%Error-PROCASSWIRE: t/t_lint_always_comb_bad.v:45: Procedural assignment to wire, perhaps intended var (IEEE 2017 6.5): temp1_d1r +%Error: Exiting due to diff --git a/test_regress/t/t_lint_always_comb_bad.pl b/test_regress/t/t_lint_always_comb_bad.pl index da46dbfa0..1f28eb091 100755 --- a/test_regress/t/t_lint_always_comb_bad.pl +++ b/test_regress/t/t_lint_always_comb_bad.pl @@ -15,9 +15,7 @@ compile( make_top_shell => 0, make_main => 0, fails => 1, - expect => -'%Warning-ALWCOMBORDER: t/t_lint_always_comb_bad.v:\d+: Always_comb variable driven after use: mid -.*%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_ifdepth_bad.out b/test_regress/t/t_lint_ifdepth_bad.out new file mode 100644 index 000000000..986b61e0f --- /dev/null +++ b/test_regress/t/t_lint_ifdepth_bad.out @@ -0,0 +1,3 @@ +%Warning-IFDEPTH: t/t_lint_ifdepth_bad.v:21: Deep 'if' statement; suggest unique/priority to avoid slow logic +%Warning-IFDEPTH: Use "/* verilator lint_off IFDEPTH */" and lint_on around source to disable this message. +%Error: Exiting due to diff --git a/test_regress/t/t_lint_ifdepth_bad.pl b/test_regress/t/t_lint_ifdepth_bad.pl index 3e3498652..a1c7569ad 100755 --- a/test_regress/t/t_lint_ifdepth_bad.pl +++ b/test_regress/t/t_lint_ifdepth_bad.pl @@ -15,10 +15,7 @@ compile( verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect => -'%Warning-IFDEPTH: t/t_lint_ifdepth_bad.v:\d+: Deep \'if\' statement; suggest unique/priority to avoid slow logic -%Warning-IFDEPTH: Use .* to disable this message. -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_modport_dir_bad.out b/test_regress/t/t_lint_modport_dir_bad.out new file mode 100644 index 000000000..20e676d62 --- /dev/null +++ b/test_regress/t/t_lint_modport_dir_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_lint_modport_dir_bad.v:25: Attempt to drive input-only modport: signal +%Error: Exiting due to diff --git a/test_regress/t/t_lint_modport_dir_bad.pl b/test_regress/t/t_lint_modport_dir_bad.pl index 5174323ac..c36dc274a 100755 --- a/test_regress/t/t_lint_modport_dir_bad.pl +++ b/test_regress/t/t_lint_modport_dir_bad.pl @@ -15,9 +15,7 @@ compile( verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect => -'%Error: t/t_lint_modport_dir_bad.v:\d+: Attempt to drive input-only modport: signal -%Error: Exiting due to .*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_once_bad.out b/test_regress/t/t_lint_once_bad.out new file mode 100644 index 000000000..c7996f476 --- /dev/null +++ b/test_regress/t/t_lint_once_bad.out @@ -0,0 +1,4 @@ +%Warning-UNUSED: t/t_lint_once_bad.v:18: Signal is not driven, nor used: unus1 +%Warning-UNUSED: Use "/* verilator lint_off UNUSED */" and lint_on around source to disable this message. +%Warning-UNUSED: t/t_lint_once_bad.v:18: Signal is not driven, nor used: unus2 +%Error: Exiting due to diff --git a/test_regress/t/t_lint_once_bad.pl b/test_regress/t/t_lint_once_bad.pl index 2eb1edcac..4f0e34ed7 100755 --- a/test_regress/t/t_lint_once_bad.pl +++ b/test_regress/t/t_lint_once_bad.pl @@ -15,11 +15,7 @@ compile( make_top_shell => 0, make_main => 0, fails => 1, - expect => -'%Warning-UNUSED: t/t_lint_once_bad.v:\d+: Signal is not driven, nor used: unus1 -%Warning-UNUSED: Use .* to disable this message. -%Warning-UNUSED: t/t_lint_once_bad.v:\d+: Signal is not driven, nor used: unus2 -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_repeat_bad.out b/test_regress/t/t_lint_repeat_bad.out new file mode 100644 index 000000000..8d318b6dd --- /dev/null +++ b/test_regress/t/t_lint_repeat_bad.out @@ -0,0 +1,3 @@ +%Warning-WIDTH: t/t_lint_repeat_bad.v:17: Operator ASSIGNW expects 1 bits on the Assign RHS, but Assign RHS's VARREF 'a' generates 2 bits. +%Warning-WIDTH: 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_repeat_bad.pl b/test_regress/t/t_lint_repeat_bad.pl index ed667e7ea..8bc867659 100755 --- a/test_regress/t/t_lint_repeat_bad.pl +++ b/test_regress/t/t_lint_repeat_bad.pl @@ -12,10 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -q{%Warning-WIDTH: t/t_lint_repeat_bad.v:17: Operator ASSIGNW expects 1 bits on the Assign RHS, but Assign RHS's VARREF 'a' generates 2 bits. -%Warning-WIDTH: Use \"\/\* verilator lint_off WIDTH \*\/\" and lint_on around source to disable this message. -%Error: Exiting due to 1 warning} + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_lint_restore_bad.out b/test_regress/t/t_lint_restore_bad.out new file mode 100644 index 000000000..ae6b7db53 --- /dev/null +++ b/test_regress/t/t_lint_restore_bad.out @@ -0,0 +1,3 @@ +%Warning-WIDTH: t/t_lint_restore_bad.v:18: Operator ASSIGN expects 5 bits on the Assign RHS, but Assign RHS's CONST '64'h1' generates 64 bits. +%Warning-WIDTH: 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_restore_bad.pl b/test_regress/t/t_lint_restore_bad.pl index 854be8e74..1d5701949 100755 --- a/test_regress/t/t_lint_restore_bad.pl +++ b/test_regress/t/t_lint_restore_bad.pl @@ -12,10 +12,7 @@ scenarios(vlt_all => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -q{.*%Warning-WIDTH: t/t_lint_restore_bad.v:\d+: Operator ASSIGN expects 5 bits on the Assign RHS, but Assign RHS's CONST '64'h1' generates 64 bits. -%Warning-WIDTH: Use .* -%Error: Exiting due to.*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_param_circ_bad.out b/test_regress/t/t_param_circ_bad.out new file mode 100644 index 000000000..1eb75d6f7 --- /dev/null +++ b/test_regress/t/t_param_circ_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_param_circ_bad.v:10: Variable's initial value is circular: X +%Error: Exiting due to diff --git a/test_regress/t/t_param_circ_bad.pl b/test_regress/t/t_param_circ_bad.pl index c0997311d..022fe59ea 100755 --- a/test_regress/t/t_param_circ_bad.pl +++ b/test_regress/t/t_param_circ_bad.pl @@ -15,9 +15,7 @@ compile( verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect => -'%Error: t/t_param_circ_bad.v:\d+: Variable\'s initial value is circular: X -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_param_concat_bad.out b/test_regress/t/t_param_concat_bad.out new file mode 100644 index 000000000..c7612e141 --- /dev/null +++ b/test_regress/t/t_param_concat_bad.out @@ -0,0 +1,5 @@ +%Warning-WIDTHCONCAT: t/t_param_concat.v:18: Unsized numbers/parameters not allowed in concatenations. +%Warning-WIDTHCONCAT: Use "/* verilator lint_off WIDTHCONCAT */" and lint_on around source to disable this message. +%Warning-WIDTHCONCAT: t/t_param_concat.v:18: Unsized numbers/parameters not allowed in replications. +%Warning-WIDTHCONCAT: t/t_param_concat.v:19: Unsized numbers/parameters not allowed in replications. +%Error: Exiting due to diff --git a/test_regress/t/t_param_concat_bad.pl b/test_regress/t/t_param_concat_bad.pl index 27e7256ad..a31c54525 100755 --- a/test_regress/t/t_param_concat_bad.pl +++ b/test_regress/t/t_param_concat_bad.pl @@ -13,11 +13,7 @@ top_filename("t/t_param_concat.v"); compile( fails => 1, - expect => -'%Warning-WIDTHCONCAT: t/t_param_concat.v:\d+: Unsized numbers/parameters not allowed in concatenations. -%Warning-WIDTHCONCAT: Use "/\* verilator lint_off WIDTHCONCAT \*/" and lint_on around source to disable this message. -%Warning-WIDTHCONCAT: t/t_param_concat.v:\d+: Unsized numbers/parameters not allowed in replications. -.*%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_param_sel_range_bad.out b/test_regress/t/t_param_sel_range_bad.out new file mode 100644 index 000000000..9eec9f6f7 --- /dev/null +++ b/test_regress/t/t_param_sel_range_bad.out @@ -0,0 +1,3 @@ +%Warning-SELRANGE: t/t_param_sel_range.v:40: Selection index out of range: 7:7 outside 4:0 +%Warning-SELRANGE: Use "/* verilator lint_off SELRANGE */" and lint_on around source to disable this message. +%Error: Exiting due to diff --git a/test_regress/t/t_param_sel_range_bad.pl b/test_regress/t/t_param_sel_range_bad.pl index 0e1114afa..fbe25283e 100755 --- a/test_regress/t/t_param_sel_range_bad.pl +++ b/test_regress/t/t_param_sel_range_bad.pl @@ -17,10 +17,7 @@ compile( verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect => -'%Warning-SELRANGE: t/t_param_sel_range.v:\d+: Selection index out of range: 7:7 outside 4:0 -%Warning-SELRANGE: Use .* to disable this message. -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_past_bad.out b/test_regress/t/t_past_bad.out new file mode 100644 index 000000000..548b0ec85 --- /dev/null +++ b/test_regress/t/t_past_bad.out @@ -0,0 +1,4 @@ +%Error: t/t_past_bad.v:11: $past tick value must be constant and >= 1 (IEEE 2017 16.9.3) +%Warning-TICKCOUNT: t/t_past_bad.v:12: $past tick value of 10000 may have a large performance cost +%Warning-TICKCOUNT: Use "/* verilator lint_off TICKCOUNT */" and lint_on around source to disable this message. +%Error: Exiting due to diff --git a/test_regress/t/t_past_bad.pl b/test_regress/t/t_past_bad.pl index 26610cc88..4f336495a 100755 --- a/test_regress/t/t_past_bad.pl +++ b/test_regress/t/t_past_bad.pl @@ -11,10 +11,7 @@ scenarios(vlt_all => 1); compile( fails => 1, - expect => -'%Error: t/t_past_bad.v:\d+:.* \$past tick value must be constant and >= 1 \(IEEE 2017 16.9.3\) -%Warning-TICKCOUNT: t/t_past_bad.v:\d+: \$past tick value of 10000 may have a large performance cost -.*%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_select_bad_range2.out b/test_regress/t/t_select_bad_range2.out new file mode 100644 index 000000000..e0897fce0 --- /dev/null +++ b/test_regress/t/t_select_bad_range2.out @@ -0,0 +1,3 @@ +%Warning-SELRANGE: t/t_select_bad_range2.v:50: Selection index out of range: 3:2 outside 1:0 +%Warning-SELRANGE: Use "/* verilator lint_off SELRANGE */" and lint_on around source to disable this message. +%Error: Exiting due to diff --git a/test_regress/t/t_select_bad_range2.pl b/test_regress/t/t_select_bad_range2.pl index a9301dc99..8bfbcfc8b 100755 --- a/test_regress/t/t_select_bad_range2.pl +++ b/test_regress/t/t_select_bad_range2.pl @@ -12,10 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => $Self->{vlt_all}, - expect => -'%Warning-SELRANGE: t/t_select_bad_range2.v:\d+: Selection index out of range: 3:2 outside 1:0 -%Warning-SELRANGE: Use .* -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_select_bad_range3.out b/test_regress/t/t_select_bad_range3.out new file mode 100644 index 000000000..37db8655d --- /dev/null +++ b/test_regress/t/t_select_bad_range3.out @@ -0,0 +1,3 @@ +%Warning-SELRANGE: t/t_select_bad_range3.v:18: Selection index out of range: 13 outside 12:10 +%Warning-SELRANGE: Use "/* verilator lint_off SELRANGE */" and lint_on around source to disable this message. +%Error: Exiting due to diff --git a/test_regress/t/t_select_bad_range3.pl b/test_regress/t/t_select_bad_range3.pl index b9843ef16..8bfbcfc8b 100755 --- a/test_regress/t/t_select_bad_range3.pl +++ b/test_regress/t/t_select_bad_range3.pl @@ -12,10 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => $Self->{vlt_all}, - expect => -'%Warning-SELRANGE: t/t_select_bad_range3.v:\d+: Selection index out of range: 13 outside 12:10 -%Warning-SELRANGE: Use .* -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_select_bad_tri.out b/test_regress/t/t_select_bad_tri.out new file mode 100644 index 000000000..c33b55fae --- /dev/null +++ b/test_regress/t/t_select_bad_tri.out @@ -0,0 +1,2 @@ +%Error: t/t_select_bad_tri.v:10: Selection index is constantly unknown or tristated: lsb=7'bxxxxxxx width=32'sh47 +%Error: Exiting due to diff --git a/test_regress/t/t_select_bad_tri.pl b/test_regress/t/t_select_bad_tri.pl index c2929eb9c..8bfbcfc8b 100755 --- a/test_regress/t/t_select_bad_tri.pl +++ b/test_regress/t/t_select_bad_tri.pl @@ -12,9 +12,7 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], fails => $Self->{vlt_all}, - expect => -q{%Error: t/t_select_bad_tri.v:\d+: Selection index is constantly unknown or tristated: lsb=7'bxxxxxxx width=32'sh47 -%Error: Exiting due to.*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_struct_init_bad.out b/test_regress/t/t_struct_init_bad.out new file mode 100644 index 000000000..71597196b --- /dev/null +++ b/test_regress/t/t_struct_init_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_struct_init.v:53: Assignment pattern contains duplicate entry: b1 +%Error: Exiting due to diff --git a/test_regress/t/t_struct_init_bad.pl b/test_regress/t/t_struct_init_bad.pl index cb1856bf2..43c15946f 100755 --- a/test_regress/t/t_struct_init_bad.pl +++ b/test_regress/t/t_struct_init_bad.pl @@ -14,9 +14,7 @@ top_filename("t/t_struct_init.v"); compile( v_flags2 => ['+define+T_STRUCT_INIT_BAD'], fails => 1, - expect => -'%Error: t/t_struct_init.v:\d+: Assignment pattern contains duplicate entry: b1 -%Error: Exiting due to.*' + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_struct_notfound_bad.out b/test_regress/t/t_struct_notfound_bad.out new file mode 100644 index 000000000..b823fe88d --- /dev/null +++ b/test_regress/t/t_struct_notfound_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_struct_notfound_bad.v:12: Member 'nfmember' not found in structure +%Error: Exiting due to diff --git a/test_regress/t/t_struct_notfound_bad.pl b/test_regress/t/t_struct_notfound_bad.pl index 54190c119..3361369bf 100755 --- a/test_regress/t/t_struct_notfound_bad.pl +++ b/test_regress/t/t_struct_notfound_bad.pl @@ -11,9 +11,7 @@ scenarios(simulator => 1); compile( fails => 1, - expect => -'%Error: t/t_struct_notfound_bad.v:\d+: Member \'nfmember\' not found in structure -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_tri_pull2_bad.out b/test_regress/t/t_tri_pull2_bad.out new file mode 100644 index 000000000..933d6c838 --- /dev/null +++ b/test_regress/t/t_tri_pull2_bad.out @@ -0,0 +1,3 @@ +%Error: t/t_tri_pull2_bad.v:9: Unsupported: Conflicting pull directions. +%Error: t/t_tri_pull2_bad.v:19: ... Location of conflicting pull. +%Error: Exiting due to diff --git a/test_regress/t/t_tri_pull2_bad.pl b/test_regress/t/t_tri_pull2_bad.pl index 009d3966c..37764365f 100755 --- a/test_regress/t/t_tri_pull2_bad.pl +++ b/test_regress/t/t_tri_pull2_bad.pl @@ -11,10 +11,7 @@ scenarios(simulator => 1); compile( fails => $Self->{vlt_all}, - expect => -'%Error: t/t_tri_pull2_bad.v:\d+: Unsupported: Conflicting pull directions. -%Error: t/t_tri_pull2_bad.v:\d+: ... Location of conflicting pull. -%Error: Exiting due to', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_tri_pull_bad.out b/test_regress/t/t_tri_pull_bad.out new file mode 100644 index 000000000..932e381f0 --- /dev/null +++ b/test_regress/t/t_tri_pull_bad.out @@ -0,0 +1,3 @@ +%Error: t/t_tri_pull_bad.v:10: Unsupported: Conflicting pull directions. +%Error: t/t_tri_pull_bad.v:9: ... Location of conflicting pull. +%Error: Exiting due to diff --git a/test_regress/t/t_tri_pull_bad.pl b/test_regress/t/t_tri_pull_bad.pl index 94ed9054e..37764365f 100755 --- a/test_regress/t/t_tri_pull_bad.pl +++ b/test_regress/t/t_tri_pull_bad.pl @@ -11,10 +11,7 @@ scenarios(simulator => 1); compile( fails => $Self->{vlt_all}, - expect => -'%Error: t/t_tri_pull_bad.v:\d+: Unsupported: Conflicting pull directions. -%Error: t/t_tri_pull_bad.v:\d+: ... Location of conflicting pull. -%Error: Exiting due to', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_var_const_bad.out b/test_regress/t/t_var_const_bad.out new file mode 100644 index 000000000..511162a6c --- /dev/null +++ b/test_regress/t/t_var_const_bad.out @@ -0,0 +1,2 @@ +%Error: t/t_var_const_bad.v:16: Assigning to const variable: five +%Error: Exiting due to diff --git a/test_regress/t/t_var_const_bad.pl b/test_regress/t/t_var_const_bad.pl index 0dc969173..a84eef7e0 100755 --- a/test_regress/t/t_var_const_bad.pl +++ b/test_regress/t/t_var_const_bad.pl @@ -12,9 +12,7 @@ scenarios(vlt_all => 1); compile( v_flags2 => ["--lint-only"], fails => 1, - expect => -'%Error: t/t_var_const_bad.v:\d+: Assigning to const variable: five -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_var_in_assign_bad.out b/test_regress/t/t_var_in_assign_bad.out new file mode 100644 index 000000000..d8c02533b --- /dev/null +++ b/test_regress/t/t_var_in_assign_bad.out @@ -0,0 +1,3 @@ +%Error-ASSIGNIN: t/t_var_in_assign_bad.v:11: Assigning to input/const variable: value +%Error-ASSIGNIN: t/t_var_in_assign_bad.v:20: Assigning to input/const variable: valueSub +%Error: Exiting due to diff --git a/test_regress/t/t_var_in_assign_bad.pl b/test_regress/t/t_var_in_assign_bad.pl index 7e99b6048..73451596c 100755 --- a/test_regress/t/t_var_in_assign_bad.pl +++ b/test_regress/t/t_var_in_assign_bad.pl @@ -12,10 +12,7 @@ scenarios(vlt => 1); compile( v_flags2 => ["--lint-only --Mdir obj_lint_only"], fails => 1, - expect => -'%Error-ASSIGNIN: t/t_var_in_assign_bad.v:\d+: Assigning to input/const variable: value -%Error-ASSIGNIN: t/t_var_in_assign_bad.v:\d+: Assigning to input/const variable: valueSub -%Error: Exiting due to.*', + expect_filename => $Self->{golden_filename}, ); (!-d "obj_lint_only") or error("%Error: lint-only shouldn't make output directory"); diff --git a/test_regress/t/t_var_ref_bad1.out b/test_regress/t/t_var_ref_bad1.out new file mode 100644 index 000000000..3f2605033 --- /dev/null +++ b/test_regress/t/t_var_ref_bad1.out @@ -0,0 +1,2 @@ +%Error: t/t_var_ref_bad1.v:13: Ref connection 'bad_sub_ref' requires matching types; ref requires BASICDTYPE 'real' but connection is BASICDTYPE 'bit'. +%Error: Exiting due to diff --git a/test_regress/t/t_var_ref_bad1.pl b/test_regress/t/t_var_ref_bad1.pl index 1486932d8..39542df3e 100755 --- a/test_regress/t/t_var_ref_bad1.pl +++ b/test_regress/t/t_var_ref_bad1.pl @@ -15,9 +15,7 @@ compile( make_top_shell => 0, make_main => 0, fails => 1, - expect => -q{%Error: t/t_var_ref_bad1.v:\d+: Ref connection 'bad_sub_ref' requires matching types; ref requires BASICDTYPE 'real' but connection is BASICDTYPE 'bit'. -.*%Error: Exiting due to.*}, + expect_filename => $Self->{golden_filename}, ); ok(1); diff --git a/test_regress/t/t_var_ref_bad2.out b/test_regress/t/t_var_ref_bad2.out new file mode 100644 index 000000000..e5186eefc --- /dev/null +++ b/test_regress/t/t_var_ref_bad2.out @@ -0,0 +1,3 @@ +%Error: t/t_var_ref_bad2.v:12: Assigning to const ref variable: bad_const_set +%Error: t/t_var_ref_bad2.v:22: Ref argument requires matching types; port 'int_ref' requires VAR 'int_ref' but connection is VARREF 'bad_non_int'. +%Error: Exiting due to diff --git a/test_regress/t/t_var_ref_bad2.pl b/test_regress/t/t_var_ref_bad2.pl index 7c2a13f47..39542df3e 100755 --- a/test_regress/t/t_var_ref_bad2.pl +++ b/test_regress/t/t_var_ref_bad2.pl @@ -15,10 +15,7 @@ compile( make_top_shell => 0, make_main => 0, fails => 1, - expect => -q{%Error: t/t_var_ref_bad2.v:\d+: Assigning to const ref variable: bad_const_set -%Error: t/t_var_ref_bad2.v:\d+: Ref argument requires matching types; port 'int_ref' requires VAR 'int_ref' but connection is VARREF 'bad_non_int'. -.*%Error: Exiting due to.*}, + expect_filename => $Self->{golden_filename}, ); ok(1);