Improve some error message formats

This commit is contained in:
Wilson Snyder 2025-10-13 20:30:47 -04:00
parent 9dfc050fb5
commit 958d096e7f
10 changed files with 25 additions and 22 deletions

View File

@ -42,7 +42,7 @@ class AssertDeFuture final : public VNVisitor {
if (m_unsupported) return;
m_unsupported = true;
nodep->v3warn(E_UNSUPPORTED,
"Unsupported/illegal: future value function used with expression with "
"Unsupported/illegal: Future value function used with expression with "
<< nodep->prettyOperatorName());
}
// VISITORS
@ -809,12 +809,15 @@ class AssertVisitor final : public VNVisitor {
case VAssertCtlType::NONVACUOUS_ON:
case VAssertCtlType::VACUOUS_OFF: {
nodep->unlinkFrBack();
nodep->v3warn(E_UNSUPPORTED, "Unsupported assertcontrol control_type");
nodep->v3warn(E_UNSUPPORTED, "Unsupported: $assertcontrol control_type '" << cvtToStr(
static_cast<int>(nodep->ctlType())) << "'");
break;
}
default: {
nodep->unlinkFrBack();
nodep->v3warn(EC_ERROR, "Bad assertcontrol control_type (IEEE 1800-2023 Table 20-5)");
nodep->v3warn(EC_ERROR, "Bad $assertcontrol control_type '"
<< cvtToStr(static_cast<int>(nodep->ctlType()))
<< "' (IEEE 1800-2023 Table 20-5)");
}
}
VL_DO_DANGLING(pushDeletep(nodep), nodep);

View File

@ -541,7 +541,7 @@ private:
lhsp = newarrselp;
} else {
nodep->v3warn(E_UNSUPPORTED,
"Unsupported lhs node type in array assignment");
"Unsupported LHS node type in array assignment");
return;
}
const AstVarRef* const rhsrefp = VN_CAST(nodep->rhsp(), VarRef);

View File

@ -111,7 +111,7 @@ private:
if (!nodep) return;
foreachWrittenVirtIface(nodep, [locationp](AstVarRef* const selp, AstIface*) {
selp->v3warn(E_UNSUPPORTED,
"Unsupported: write to virtual interface in " << locationp);
"Unsupported: Write to virtual interface in " << locationp);
});
}
// Create trigger var for the given interface if it doesn't exist; return a write ref to it

View File

@ -6623,7 +6623,7 @@ sexpr<nodeExprp>: // ==IEEE: sequence_expr (The name sexpr is important as reg
// // "'(' sexpr ')' boolean_abbrev" matches "[sexpr:'(' expr ')'] boolean_abbrev" so we can drop it
| '(' ~p~sexpr ')' { $$ = $2; }
| '(' ~p~sexpr ',' sequence_match_itemList ')'
{ $$ = $2; BBUNSUP($3, "Unsupported sequence match items"); DEL($4); }
{ $$ = $2; BBUNSUP($3, "Unsupported: sequence match items"); DEL($4); }
//
// // AND/OR are between pexprs OR sexprs
| ~p~sexpr yAND ~p~sexpr

View File

@ -1,8 +1,8 @@
%Error: t/t_assert_ctl_type_bad.v:9:5: Bad assertcontrol control_type (IEEE 1800-2023 Table 20-5)
%Error: t/t_assert_ctl_type_bad.v:9:5: Bad $assertcontrol control_type '0' (IEEE 1800-2023 Table 20-5)
9 | $assertcontrol(0);
| ^~~~~~~~~~~~~~
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
%Error: t/t_assert_ctl_type_bad.v:10:5: Bad assertcontrol control_type (IEEE 1800-2023 Table 20-5)
%Error: t/t_assert_ctl_type_bad.v:10:5: Bad $assertcontrol control_type '100' (IEEE 1800-2023 Table 20-5)
10 | $assertcontrol(100);
| ^~~~~~~~~~~~~~
%Error: Exiting due to

View File

@ -3,10 +3,10 @@
25 | $assertcontrol(Lock, a);
| ^~~~~~~~~~~~~~
... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest
%Error-UNSUPPORTED: t/t_assert_ctl_unsup.v:27:7: Unsupported assertcontrol control_type
%Error-UNSUPPORTED: t/t_assert_ctl_unsup.v:27:7: Unsupported: $assertcontrol control_type '2'
27 | $assertcontrol(Unlock);
| ^~~~~~~~~~~~~~
%Error-UNSUPPORTED: t/t_assert_ctl_unsup.v:29:7: Unsupported assertcontrol control_type
%Error-UNSUPPORTED: t/t_assert_ctl_unsup.v:29:7: Unsupported: $assertcontrol control_type '6'
29 | $assertcontrol(PassOn);
| ^~~~~~~~~~~~~~
%Error-UNSUPPORTED: t/t_assert_ctl_unsup.v:30:7: Unsupported: assert control assertion_type
@ -21,7 +21,7 @@
: ... note: In instance 't.unsupported_ctl_type'
32 | $assertpasson(a, t);
| ^~~~~~~~~~~~~
%Error-UNSUPPORTED: t/t_assert_ctl_unsup.v:34:7: Unsupported assertcontrol control_type
%Error-UNSUPPORTED: t/t_assert_ctl_unsup.v:34:7: Unsupported: $assertcontrol control_type '7'
34 | $assertcontrol(PassOff);
| ^~~~~~~~~~~~~~
%Error-UNSUPPORTED: t/t_assert_ctl_unsup.v:35:7: Unsupported: assert control assertion_type
@ -36,7 +36,7 @@
: ... note: In instance 't.unsupported_ctl_type'
37 | $assertpassoff(a, t);
| ^~~~~~~~~~~~~~
%Error-UNSUPPORTED: t/t_assert_ctl_unsup.v:39:7: Unsupported assertcontrol control_type
%Error-UNSUPPORTED: t/t_assert_ctl_unsup.v:39:7: Unsupported: $assertcontrol control_type '8'
39 | $assertcontrol(FailOn);
| ^~~~~~~~~~~~~~
%Error-UNSUPPORTED: t/t_assert_ctl_unsup.v:40:7: Unsupported: assert control assertion_type
@ -51,7 +51,7 @@
: ... note: In instance 't.unsupported_ctl_type'
42 | $assertfailon(a, t);
| ^~~~~~~~~~~~~
%Error-UNSUPPORTED: t/t_assert_ctl_unsup.v:44:7: Unsupported assertcontrol control_type
%Error-UNSUPPORTED: t/t_assert_ctl_unsup.v:44:7: Unsupported: $assertcontrol control_type '9'
44 | $assertcontrol(FailOff);
| ^~~~~~~~~~~~~~
%Error-UNSUPPORTED: t/t_assert_ctl_unsup.v:45:7: Unsupported: assert control assertion_type
@ -66,7 +66,7 @@
: ... note: In instance 't.unsupported_ctl_type'
47 | $assertfailoff(a, t);
| ^~~~~~~~~~~~~~
%Error-UNSUPPORTED: t/t_assert_ctl_unsup.v:49:7: Unsupported assertcontrol control_type
%Error-UNSUPPORTED: t/t_assert_ctl_unsup.v:49:7: Unsupported: $assertcontrol control_type '10'
49 | $assertcontrol(NonvacuousOn);
| ^~~~~~~~~~~~~~
%Error-UNSUPPORTED: t/t_assert_ctl_unsup.v:50:7: Unsupported: assert control assertion_type
@ -81,7 +81,7 @@
: ... note: In instance 't.unsupported_ctl_type'
52 | $assertnonvacuouson(a, t);
| ^~~~~~~~~~~~~~~~~~~
%Error-UNSUPPORTED: t/t_assert_ctl_unsup.v:54:7: Unsupported assertcontrol control_type
%Error-UNSUPPORTED: t/t_assert_ctl_unsup.v:54:7: Unsupported: $assertcontrol control_type '11'
54 | $assertcontrol(VacuousOff);
| ^~~~~~~~~~~~~~
%Error-UNSUPPORTED: t/t_assert_ctl_unsup.v:55:7: Unsupported: assert control assertion_type

View File

@ -1,4 +1,4 @@
%Error-UNSUPPORTED: t/t_assert_future_unsup.v:21:54: Unsupported/illegal: future value function used with expression with operator FUNCREF 'func'
%Error-UNSUPPORTED: t/t_assert_future_unsup.v:21:54: Unsupported/illegal: Future value function used with expression with operator FUNCREF 'func'
: ... note: In instance 't'
21 | assert property (@(posedge clk) $future_gclk(a) == func(a));
| ^~~~

View File

@ -1,11 +1,11 @@
%Error-UNSUPPORTED: t/t_interface_virtual_unsup.v:22:22: Unsupported: write to virtual interface in if condition
%Error-UNSUPPORTED: t/t_interface_virtual_unsup.v:22:22: Unsupported: Write to virtual interface in if condition
22 | if (write_data(vif.data)) $write("dummy op");
| ^~~
... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest
%Error-UNSUPPORTED: t/t_interface_virtual_unsup.v:23:25: Unsupported: write to virtual interface in loop condition
%Error-UNSUPPORTED: t/t_interface_virtual_unsup.v:23:25: Unsupported: Write to virtual interface in loop condition
23 | while (write_data(vif.data));
| ^~~
%Error-UNSUPPORTED: t/t_interface_virtual_unsup.v:24:30: Unsupported: write to virtual interface in loop condition
%Error-UNSUPPORTED: t/t_interface_virtual_unsup.v:24:30: Unsupported: Write to virtual interface in loop condition
24 | do ; while (write_data(vif.data));
| ^~~
%Error: Exiting due to

View File

@ -5,7 +5,7 @@
%Error-UNSUPPORTED: t/t_property_sexpr_unsup.v:30:43: Unsupported: ## (in sequence expression)
30 | assert property (@(posedge clk) ##1 val ##2 val) $display("[%0t] sequence stmt, fileline:%d", $time, 30);
| ^~
%Error-UNSUPPORTED: t/t_property_sexpr_unsup.v:71:14: Unsupported sequence match items
%Error-UNSUPPORTED: t/t_property_sexpr_unsup.v:71:14: Unsupported: sequence match items
71 | ($rose(a), l_b = b) |-> ##[3:10] q[l_b];
| ^
%Error-UNSUPPORTED: t/t_property_sexpr_unsup.v:71:29: Unsupported: ## range cycle delay range expression
@ -14,7 +14,7 @@
%Error-UNSUPPORTED: t/t_property_sexpr_unsup.v:70:13: Unsupported: property variable declaration
70 | integer l_b;
| ^~~
%Error-UNSUPPORTED: t/t_property_sexpr_unsup.v:88:16: Unsupported sequence match items
%Error-UNSUPPORTED: t/t_property_sexpr_unsup.v:88:16: Unsupported: sequence match items
88 | (count == 0, l_t = $realtime) ##1 (count == 7)[->1] |-> $realtime - l_t < 50.5;
| ^
%Error-UNSUPPORTED: t/t_property_sexpr_unsup.v:88:51: Unsupported: [-> boolean abbrev expression

View File

@ -1,4 +1,4 @@
%Error-UNSUPPORTED: t/t_property_var_unsup.v:18:13: Unsupported sequence match items
%Error-UNSUPPORTED: t/t_property_var_unsup.v:18:13: Unsupported: sequence match items
18 | (valid, prevcyc = cyc) |=> (cyc == prevcyc + 1);
| ^
... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest