From f970485e1951cf1abbc58483c3dd22a2f5d29d50 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sat, 20 Sep 2025 08:19:42 -0400 Subject: [PATCH] Fix some missing E_UNSUPPORTED errors --- src/V3Assert.cpp | 5 +++-- src/V3Control.cpp | 2 +- src/V3Force.cpp | 3 ++- src/V3Inst.cpp | 2 +- src/V3ParseGrammar.h | 7 ++++--- src/V3Premit.cpp | 5 +++-- src/V3Tristate.cpp | 11 ++++++----- test_regress/t/t_assert_procedural_clk_bad.out | 10 +++++----- test_regress/t/t_dpi_type_bad.out | 4 ++-- test_regress/t/t_force_bad_rw.out | 4 ++-- test_regress/t/t_force_readwrite_unsup.out | 6 +++--- test_regress/t/t_interface_ar3.out | 6 +++--- 12 files changed, 35 insertions(+), 30 deletions(-) diff --git a/src/V3Assert.cpp b/src/V3Assert.cpp index 75cd26822..1e8d44b28 100644 --- a/src/V3Assert.cpp +++ b/src/V3Assert.cpp @@ -315,8 +315,9 @@ class AssertVisitor final : public VNVisitor { sentreep->unlinkFrBack(); if (m_procedurep) { // To support this need queue of asserts to activate - nodep->v3error("Unsupported: Procedural concurrent assertion with" - " clocking event inside always (IEEE 1800-2023 16.14.6)"); + nodep->v3warn(E_UNSUPPORTED, + "Unsupported: Procedural concurrent assertion with" + " clocking event inside always (IEEE 1800-2023 16.14.6)"); } } // diff --git a/src/V3Control.cpp b/src/V3Control.cpp index e757cd406..30d742dfd 100644 --- a/src/V3Control.cpp +++ b/src/V3Control.cpp @@ -651,7 +651,7 @@ void V3Control::addInline(FileLine* fl, const string& module, const string& ftas V3ControlResolver::s().modules().at(module).setInline(on); } else { if (!on) { - fl->v3error("Unsupported: no_inline for tasks"); + fl->v3warn(E_UNSUPPORTED, "Unsupported: no_inline for tasks"); } else { V3ControlResolver::s().modules().at(module).ftasks().at(ftask).setNoInline(on); } diff --git a/src/V3Force.cpp b/src/V3Force.cpp index 006208259..224d5abf2 100644 --- a/src/V3Force.cpp +++ b/src/V3Force.cpp @@ -408,7 +408,8 @@ class ForceReplaceVisitor final : public VNVisitor { default: if (!m_inLogic) return; if (m_state.tryGetForceComponents(nodep) || m_state.getValVscps(nodep)) { - nodep->v3error( + nodep->v3warn( + E_UNSUPPORTED, "Unsupported: Signals used via read-write reference cannot be forced"); } break; diff --git a/src/V3Inst.cpp b/src/V3Inst.cpp index fccaa5709..8a2dcec51 100644 --- a/src/V3Inst.cpp +++ b/src/V3Inst.cpp @@ -377,7 +377,7 @@ private: } const string index = AstNode::encodeNumber(constp->toSInt() + arrp->lo()); if (VN_IS(arrselp->fromp(), SliceSel)) - arrselp->fromp()->v3error("Unsupported: interface slices"); + arrselp->fromp()->v3warn(E_UNSUPPORTED, "Unsupported: interface slices"); const AstVarRef* const varrefp = VN_CAST(arrselp->fromp(), VarRef); UASSERT_OBJ(varrefp, arrselp, "No interface varref under array"); AstVarXRef* const newp = new AstVarXRef{ diff --git a/src/V3ParseGrammar.h b/src/V3ParseGrammar.h index 8d07847d7..2462ef0fd 100644 --- a/src/V3ParseGrammar.h +++ b/src/V3ParseGrammar.h @@ -269,9 +269,10 @@ public: } string unquoteString(FileLine* fileline, const std::string& text) VL_MT_DISABLED; void checkDpiVer(FileLine* fileline, const string& str) { - if (str != "DPI-C" && !v3Global.opt.bboxSys()) { - fileline->v3error("Unsupported DPI type '" << str << "': Use 'DPI-C'"); - } + if (str != "DPI-C" && !v3Global.opt.bboxSys()) + fileline->v3warn(E_UNSUPPORTED, "Unsupported DPI type '" + << str + << "': Use 'DPI-C' (IEEE 1800-2023 35.5.4)"); } // Given a list of clocking declarations, put them in clocking items AstClockingItem* makeClockingItemList(FileLine* flp, const VDirection direction, diff --git a/src/V3Premit.cpp b/src/V3Premit.cpp index 1318c47d2..7662d571f 100644 --- a/src/V3Premit.cpp +++ b/src/V3Premit.cpp @@ -118,9 +118,10 @@ class PremitVisitor final : public VNVisitor { UINFO(4, " ShiftFix " << nodep); const AstConst* const shiftp = VN_CAST(nodep->rhsp(), Const); if (shiftp && shiftp->num().mostSetBitP1() > 32) { - shiftp->v3error( + shiftp->v3warn( + E_UNSUPPORTED, "Unsupported: Shifting of by over 32-bit number isn't supported." - << " (This isn't a shift of 32 bits, but a shift of 2^32, or 4 billion!)\n"); + << " (This isn't a shift of 32 bits, but a shift of 2^32, or 4 billion!)\n"); } if (nodep->widthMin() <= 64 // Else we'll use large operators which work right // C operator's width must be < maximum shift which is diff --git a/src/V3Tristate.cpp b/src/V3Tristate.cpp index c4371ca35..d6cb478df 100644 --- a/src/V3Tristate.cpp +++ b/src/V3Tristate.cpp @@ -274,9 +274,9 @@ public: const TristateVertex& vvertex = static_cast(vtx); if (vvertex.isTristate() && !vvertex.processed()) { // Not v3errorSrc as no reason to stop the world - vvertex.nodep()->v3error("Unsupported tristate construct" - " (in graph; not converted): " - << vvertex.nodep()->prettyTypeName()); + vvertex.nodep()->v3warn(E_UNSUPPORTED, "Unsupported tristate construct" + " (in graph; not converted): " + << vvertex.nodep()->prettyTypeName()); } } m_graph.clear(); @@ -320,8 +320,9 @@ public: TristateVertex* const vertexp = reinterpret_cast(nodep->user4p()); if (!vertexp) { // Not v3errorSrc as no reason to stop the world - nodep->v3error("Unsupported tristate construct (not in propagation graph): " - << nodep->prettyTypeName()); + nodep->v3warn(E_UNSUPPORTED, + "Unsupported tristate construct (not in propagation graph): " + << nodep->prettyTypeName()); } else { // We don't warn if no vertexp->isTristate() as the creation // process makes midling nodes that don't have it set diff --git a/test_regress/t/t_assert_procedural_clk_bad.out b/test_regress/t/t_assert_procedural_clk_bad.out index cb94ec8d8..9214de450 100644 --- a/test_regress/t/t_assert_procedural_clk_bad.out +++ b/test_regress/t/t_assert_procedural_clk_bad.out @@ -1,10 +1,10 @@ -%Error: t/t_assert_procedural_clk_bad.v:21:13: Unsupported: Procedural concurrent assertion with clocking event inside always (IEEE 1800-2023 16.14.6) - : ... note: In instance 't' +%Error-UNSUPPORTED: t/t_assert_procedural_clk_bad.v:21:13: Unsupported: Procedural concurrent assertion with clocking event inside always (IEEE 1800-2023 16.14.6) + : ... note: In instance 't' 21 | assume property (@(posedge clk) cyc == 9); | ^~~~~~ - ... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance. -%Error: t/t_assert_procedural_clk_bad.v:22:13: Unsupported: Procedural concurrent assertion with clocking event inside always (IEEE 1800-2023 16.14.6) - : ... note: In instance 't' + ... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest +%Error-UNSUPPORTED: t/t_assert_procedural_clk_bad.v:22:13: Unsupported: Procedural concurrent assertion with clocking event inside always (IEEE 1800-2023 16.14.6) + : ... note: In instance 't' 22 | assume property (@(negedge clk) cyc == 9); | ^~~~~~ %Error: Exiting due to diff --git a/test_regress/t/t_dpi_type_bad.out b/test_regress/t/t_dpi_type_bad.out index b949c381b..de3df00e1 100644 --- a/test_regress/t/t_dpi_type_bad.out +++ b/test_regress/t/t_dpi_type_bad.out @@ -1,5 +1,5 @@ -%Error: t/t_dpi_type_bad.v:11:4: Unsupported DPI type 'DPI-BAD': Use 'DPI-C' +%Error-UNSUPPORTED: t/t_dpi_type_bad.v:11:4: Unsupported DPI type 'DPI-BAD': Use 'DPI-C' (IEEE 1800-2023 35.5.4) 11 | import "DPI-BAD" task dpix_twice; | ^~~~~~ - ... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance. + ... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest %Error: Exiting due to diff --git a/test_regress/t/t_force_bad_rw.out b/test_regress/t/t_force_bad_rw.out index 28a841ba4..65c9076b4 100644 --- a/test_regress/t/t_force_bad_rw.out +++ b/test_regress/t/t_force_bad_rw.out @@ -1,5 +1,5 @@ -%Error: t/t_force_bad_rw.v:14:20: Unsupported: Signals used via read-write reference cannot be forced +%Error-UNSUPPORTED: t/t_force_bad_rw.v:14:20: Unsupported: Signals used via read-write reference cannot be forced 14 | foreach (ass[index]) begin | ^~~~~ - ... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance. + ... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest %Error: Exiting due to diff --git a/test_regress/t/t_force_readwrite_unsup.out b/test_regress/t/t_force_readwrite_unsup.out index 97d7ed581..a7423e077 100644 --- a/test_regress/t/t_force_readwrite_unsup.out +++ b/test_regress/t/t_force_readwrite_unsup.out @@ -1,8 +1,8 @@ -%Error: t/t_force_readwrite_unsup.v:25:18: Unsupported: Signals used via read-write reference cannot be forced +%Error-UNSUPPORTED: t/t_force_readwrite_unsup.v:25:18: Unsupported: Signals used via read-write reference cannot be forced 25 | cls.take_ref(a); | ^ - ... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance. -%Error: t/t_force_readwrite_unsup.v:26:18: Unsupported: Signals used via read-write reference cannot be forced + ... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest +%Error-UNSUPPORTED: t/t_force_readwrite_unsup.v:26:18: Unsupported: Signals used via read-write reference cannot be forced 26 | cls.take_ref(b); | ^ %Error: Exiting due to diff --git a/test_regress/t/t_interface_ar3.out b/test_regress/t/t_interface_ar3.out index 6a10890ab..bebabf4bb 100644 --- a/test_regress/t/t_interface_ar3.out +++ b/test_regress/t/t_interface_ar3.out @@ -1,8 +1,8 @@ -%Error: t/t_interface_ar3.v:16:36: Unsupported: interface slices - : ... note: In instance 't' +%Error-UNSUPPORTED: t/t_interface_ar3.v:16:36: Unsupported: interface slices + : ... note: In instance 't' 16 | sub sub01 [2] (.clk, .infc(iinst[0:1])); | ^ - ... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance. + ... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest %Error: Internal Error: t/t_interface_ar3.v:16:36: ../V3Inst.cpp:#: No interface varref under array : ... note: In instance 't' 16 | sub sub01 [2] (.clk, .infc(iinst[0:1]));