From 6e204ed0dda3f51ccd185ff144a6d7ef5b9f1239 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Wed, 11 Dec 2024 08:52:41 -0500 Subject: [PATCH] Internals: Cleanup 'error error' on fatals --- include/verilated.cpp | 2 +- include/verilated_cov.cpp | 2 +- include/verilated_timing.cpp | 2 +- src/V3EmitCModel.cpp | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/verilated.cpp b/include/verilated.cpp index a4968ccd7..fd80ae41a 100644 --- a/include/verilated.cpp +++ b/include/verilated.cpp @@ -2650,7 +2650,7 @@ const char* VerilatedContext::timeprecisionString() const VL_MT_SAFE { } void VerilatedContext::threads(unsigned n) { - if (n == 0) VL_FATAL_MT(__FILE__, __LINE__, "", "%Error: Simulation threads must be >= 1"); + if (n == 0) VL_FATAL_MT(__FILE__, __LINE__, "", "Simulation threads must be >= 1"); if (m_threadPool) { VL_FATAL_MT( diff --git a/include/verilated_cov.cpp b/include/verilated_cov.cpp index 412102476..6aa1ec5eb 100644 --- a/include/verilated_cov.cpp +++ b/include/verilated_cov.cpp @@ -233,7 +233,7 @@ private: // Little selftest #define SELF_CHECK(got, exp) \ do { \ - if ((got) != (exp)) VL_FATAL_MT(__FILE__, __LINE__, "", "%Error: selftest"); \ + if ((got) != (exp)) VL_FATAL_MT(__FILE__, __LINE__, "", "selftest"); \ } while (0) SELF_CHECK(combineHier("a.b.c", "a.b.c"), "a.b.c"); SELF_CHECK(combineHier("a.b.c", "a.b"), "a.b*"); diff --git a/include/verilated_timing.cpp b/include/verilated_timing.cpp index f7ceec357..0724a43e9 100644 --- a/include/verilated_timing.cpp +++ b/include/verilated_timing.cpp @@ -89,7 +89,7 @@ void VlDelayScheduler::resume() { uint64_t VlDelayScheduler::nextTimeSlot() const { if (!m_queue.empty()) return m_queue.cbegin()->first; if (m_zeroDelayed.empty()) - VL_FATAL_MT(__FILE__, __LINE__, "", "%Error: There is no next time slot scheduled"); + VL_FATAL_MT(__FILE__, __LINE__, "", "There is no next time slot scheduled"); return m_context.time(); } diff --git a/src/V3EmitCModel.cpp b/src/V3EmitCModel.cpp index 54f625d13..d31dc8ca6 100644 --- a/src/V3EmitCModel.cpp +++ b/src/V3EmitCModel.cpp @@ -473,8 +473,7 @@ class EmitCModel final : public EmitCFunc { } else { putns(modp, "bool " + topClassName() + "::eventsPending() { return false; }\n\n"); puts("uint64_t " + topClassName() + "::nextTimeSlot() {\n"); - puts("VL_FATAL_MT(__FILE__, __LINE__, \"\", \"%Error: No delays in the " - "design\");\n"); + puts("VL_FATAL_MT(__FILE__, __LINE__, \"\", \"No delays in the design\");\n"); puts("return 0;\n}\n"); }