Skip to content

Commit

Permalink
Internals: Cleanup 'error error' on fatals
Browse files Browse the repository at this point in the history
  • Loading branch information
wsnyder committed Dec 11, 2024
1 parent 58ddf99 commit 6e204ed
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/verilated.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion include/verilated_cov.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class VerilatedCovImp final : public VerilatedCovContext {
// 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*");
Expand Down
2 changes: 1 addition & 1 deletion include/verilated_timing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
3 changes: 1 addition & 2 deletions src/V3EmitCModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down

0 comments on commit 6e204ed

Please sign in to comment.