Use COVERIGN to replace UNSUPPORTED

This commit is contained in:
Yilou Wang 2026-06-15 12:35:17 +02:00
parent b2dfd03a17
commit e51961469c
3 changed files with 14 additions and 12 deletions

View File

@ -418,7 +418,8 @@ class SvaNfaBuilder final {
// overlapping ends and the nested-sequence merge collapses them, so
// reject those for a cover sequence rather than under-count.
if (m_isCoverSeq && (range > kChainLimit || VN_IS(rhsExprp, SExpr))) {
flp->v3warn(E_UNSUPPORTED, "Unsupported: cover sequence with this ranged cycle delay");
flp->v3warn(COVERIGN,
"Ignoring unsupported: cover sequence with this ranged cycle delay");
outErrorEmitted = true;
return false;
}
@ -653,8 +654,8 @@ class SvaNfaBuilder final {
// terminal, so a cover sequence would under-count. Reject the ranged form
// (the single-count b[->N] has one end and is enumerated correctly).
if (m_isCoverSeq && hasMax && maxN > minN) {
flp->v3warn(E_UNSUPPORTED,
"Unsupported: cover sequence with a ranged goto repetition");
flp->v3warn(COVERIGN,
"Ignoring unsupported: cover sequence with a ranged goto repetition");
return BuildResult::failWithError();
}
@ -718,8 +719,8 @@ class SvaNfaBuilder final {
// than under-count. Plain boolean disjunction has one end per cycle and
// is handled by the OR-fold.
if (m_isCoverSeq && (lhs.termVertexp != entryVtxp || rhs.termVertexp != entryVtxp)) {
flp->v3warn(E_UNSUPPORTED,
"Unsupported: cover sequence with a sequence operand of 'or'");
flp->v3warn(COVERIGN,
"Ignoring unsupported: cover sequence with a sequence operand of 'or'");
return BuildResult::failWithError();
}
SvaStateVertex* const mergeVtxp = scopedCreateVertex();

View File

@ -1,17 +1,18 @@
%Error-UNSUPPORTED: t/t_cover_sequence_unsup.v:21:33: Unsupported: cover sequence with a sequence operand of 'or'
%Warning-COVERIGN: t/t_cover_sequence_unsup.v:21:33: Ignoring unsupported: cover sequence with a sequence operand of 'or'
21 | cover sequence ((a ##[1:3] b) or 1'b0);
| ^~
... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest
%Error-UNSUPPORTED: t/t_cover_sequence_unsup.v:24:32: Unsupported: cover sequence with a sequence operand of 'or'
... For warning description see https://verilator.org/warn/COVERIGN?v=latest
... Use "/* verilator lint_off COVERIGN */" and lint_on around source to disable this message.
%Warning-COVERIGN: t/t_cover_sequence_unsup.v:24:32: Ignoring unsupported: cover sequence with a sequence operand of 'or'
24 | cover sequence ((a [* 1: 3]) or 1'b0);
| ^~
%Error-UNSUPPORTED: t/t_cover_sequence_unsup.v:27:21: Unsupported: cover sequence with this ranged cycle delay
%Warning-COVERIGN: t/t_cover_sequence_unsup.v:27:21: Ignoring unsupported: cover sequence with this ranged cycle delay
27 | cover sequence (a ##[1:2] (b ##1 c));
| ^~
%Error-UNSUPPORTED: t/t_cover_sequence_unsup.v:30:21: Unsupported: cover sequence with this ranged cycle delay
%Warning-COVERIGN: t/t_cover_sequence_unsup.v:30:21: Ignoring unsupported: cover sequence with this ranged cycle delay
30 | cover sequence (a ##[1:300] b);
| ^~
%Error-UNSUPPORTED: t/t_cover_sequence_unsup.v:33:21: Unsupported: cover sequence with a ranged goto repetition
%Warning-COVERIGN: t/t_cover_sequence_unsup.v:33:21: Ignoring unsupported: cover sequence with a ranged goto repetition
33 | cover sequence (a [-> 2: 3]);
| ^~~
%Error: Exiting due to

View File

@ -15,7 +15,7 @@ module t (
// cover sequence (IEEE 1800-2023 16.14.3) counts every end-of-match. The
// following forms put a sub-sequence where only its final end is forwarded,
// so they are rejected rather than under-counted.
// so they are ignored (COVERIGN) rather than under-counted.
// Sequence operand of 'or' (ranged cycle delay).
cover sequence ((a ##[1:3] b) or 1'b0);