Internals: Fix some getter/setter ordering. No functional change intended.

This commit is contained in:
Wilson Snyder 2024-09-02 18:48:49 -04:00
parent 551862a55e
commit 7a74ddc1af
2 changed files with 22 additions and 22 deletions

View File

@ -796,8 +796,6 @@ class Verilated final {
public: public:
// METHODS - User called // METHODS - User called
/// Enable debug of internal verilated code
static void debug(int level) VL_MT_SAFE;
#ifdef VL_DEBUG #ifdef VL_DEBUG
/// Return debug level /// Return debug level
/// When multithreaded this may not immediately react to another thread /// When multithreaded this may not immediately react to another thread
@ -807,6 +805,8 @@ public:
/// Return constant 0 debug level, so C++'s optimizer rips up /// Return constant 0 debug level, so C++'s optimizer rips up
static constexpr int debug() VL_PURE { return 0; } static constexpr int debug() VL_PURE { return 0; }
#endif #endif
/// Enable debug of internal verilated code
static void debug(int level) VL_MT_SAFE;
/// Set the last VerilatedContext accessed /// Set the last VerilatedContext accessed
/// Generally threadContextp(value) should be called instead /// Generally threadContextp(value) should be called instead
@ -865,44 +865,44 @@ public:
static const char* commandArgsPlusMatch(const char* prefixp) VL_MT_SAFE { static const char* commandArgsPlusMatch(const char* prefixp) VL_MT_SAFE {
return Verilated::threadContextp()->commandArgsPlusMatch(prefixp); return Verilated::threadContextp()->commandArgsPlusMatch(prefixp);
} }
/// Call VerilatedContext::errorLimit using current thread's VerilatedContext
static void errorLimit(int val) VL_MT_SAFE { Verilated::threadContextp()->errorLimit(val); }
/// Return VerilatedContext::errorLimit using current thread's VerilatedContext /// Return VerilatedContext::errorLimit using current thread's VerilatedContext
static int errorLimit() VL_MT_SAFE { return Verilated::threadContextp()->errorLimit(); } static int errorLimit() VL_MT_SAFE { return Verilated::threadContextp()->errorLimit(); }
/// Call VerilatedContext::errorLimit using current thread's VerilatedContext
static void errorLimit(int val) VL_MT_SAFE { Verilated::threadContextp()->errorLimit(val); }
/// Return VerilatedContext::fatalOnError using current thread's VerilatedContext
static bool fatalOnError() VL_MT_SAFE { return Verilated::threadContextp()->fatalOnError(); }
/// Call VerilatedContext::fatalOnError using current thread's VerilatedContext /// Call VerilatedContext::fatalOnError using current thread's VerilatedContext
static void fatalOnError(bool flag) VL_MT_SAFE { static void fatalOnError(bool flag) VL_MT_SAFE {
Verilated::threadContextp()->fatalOnError(flag); Verilated::threadContextp()->fatalOnError(flag);
} }
/// Return VerilatedContext::fatalOnError using current thread's VerilatedContext
static bool fatalOnError() VL_MT_SAFE { return Verilated::threadContextp()->fatalOnError(); }
/// Call VerilatedContext::fatalOnVpiError using current thread's VerilatedContext
static void fatalOnVpiError(bool flag) VL_MT_SAFE {
Verilated::threadContextp()->fatalOnVpiError(flag);
}
/// Return VerilatedContext::fatalOnVpiError using current thread's VerilatedContext /// Return VerilatedContext::fatalOnVpiError using current thread's VerilatedContext
static bool fatalOnVpiError() VL_MT_SAFE { static bool fatalOnVpiError() VL_MT_SAFE {
return Verilated::threadContextp()->fatalOnVpiError(); return Verilated::threadContextp()->fatalOnVpiError();
} }
/// Call VerilatedContext::gotError using current thread's VerilatedContext /// Call VerilatedContext::fatalOnVpiError using current thread's VerilatedContext
static void gotError(bool flag) VL_MT_SAFE { Verilated::threadContextp()->gotError(flag); } static void fatalOnVpiError(bool flag) VL_MT_SAFE {
Verilated::threadContextp()->fatalOnVpiError(flag);
}
/// Return VerilatedContext::gotError using current thread's VerilatedContext /// Return VerilatedContext::gotError using current thread's VerilatedContext
static bool gotError() VL_MT_SAFE { return Verilated::threadContextp()->gotError(); } static bool gotError() VL_MT_SAFE { return Verilated::threadContextp()->gotError(); }
/// Call VerilatedContext::gotFinish using current thread's VerilatedContext /// Call VerilatedContext::gotError using current thread's VerilatedContext
static void gotFinish(bool flag) VL_MT_SAFE { Verilated::threadContextp()->gotFinish(flag); } static void gotError(bool flag) VL_MT_SAFE { Verilated::threadContextp()->gotError(flag); }
/// Return VerilatedContext::gotFinish using current thread's VerilatedContext /// Return VerilatedContext::gotFinish using current thread's VerilatedContext
static bool gotFinish() VL_MT_SAFE { return Verilated::threadContextp()->gotFinish(); } static bool gotFinish() VL_MT_SAFE { return Verilated::threadContextp()->gotFinish(); }
/// Call VerilatedContext::randReset using current thread's VerilatedContext /// Call VerilatedContext::gotFinish using current thread's VerilatedContext
static void randReset(int val) VL_MT_SAFE { Verilated::threadContextp()->randReset(val); } static void gotFinish(bool flag) VL_MT_SAFE { Verilated::threadContextp()->gotFinish(flag); }
/// Return VerilatedContext::randReset using current thread's VerilatedContext /// Return VerilatedContext::randReset using current thread's VerilatedContext
static int randReset() VL_MT_SAFE { return Verilated::threadContextp()->randReset(); } static int randReset() VL_MT_SAFE { return Verilated::threadContextp()->randReset(); }
/// Call VerilatedContext::randSeed using current thread's VerilatedContext /// Call VerilatedContext::randReset using current thread's VerilatedContext
static void randSeed(int val) VL_MT_SAFE { Verilated::threadContextp()->randSeed(val); } static void randReset(int val) VL_MT_SAFE { Verilated::threadContextp()->randReset(val); }
/// Return VerilatedContext::randSeed using current thread's VerilatedContext /// Return VerilatedContext::randSeed using current thread's VerilatedContext
static int randSeed() VL_MT_SAFE { return Verilated::threadContextp()->randSeed(); } static int randSeed() VL_MT_SAFE { return Verilated::threadContextp()->randSeed(); }
/// Call VerilatedContext::time using current thread's VerilatedContext /// Call VerilatedContext::randSeed using current thread's VerilatedContext
static void time(uint64_t val) VL_MT_SAFE { Verilated::threadContextp()->time(val); } static void randSeed(int val) VL_MT_SAFE { Verilated::threadContextp()->randSeed(val); }
/// Return VerilatedContext::time using current thread's VerilatedContext /// Return VerilatedContext::time using current thread's VerilatedContext
static uint64_t time() VL_MT_SAFE { return Verilated::threadContextp()->time(); } static uint64_t time() VL_MT_SAFE { return Verilated::threadContextp()->time(); }
/// Call VerilatedContext::time using current thread's VerilatedContext
static void time(uint64_t val) VL_MT_SAFE { Verilated::threadContextp()->time(val); }
/// Call VerilatedContext::timeInc using current thread's VerilatedContext /// Call VerilatedContext::timeInc using current thread's VerilatedContext
static void timeInc(uint64_t add) VL_MT_UNSAFE { Verilated::threadContextp()->timeInc(add); } static void timeInc(uint64_t add) VL_MT_UNSAFE { Verilated::threadContextp()->timeInc(add); }
// Deprecated // Deprecated

View File

@ -92,8 +92,8 @@ public:
std::string defaultFilename() VL_MT_SAFE; std::string defaultFilename() VL_MT_SAFE;
/// Make all data per_instance, overriding point's per_instance /// Make all data per_instance, overriding point's per_instance
void forcePerInstance(bool flag) VL_MT_SAFE; void forcePerInstance(bool flag) VL_MT_SAFE;
void write() VL_MT_SAFE { write(defaultFilename()); }
/// Write all coverage data to a file /// Write all coverage data to a file
void write() VL_MT_SAFE { write(defaultFilename()); }
void write(const std::string& filename) VL_MT_SAFE; void write(const std::string& filename) VL_MT_SAFE;
/// Clear coverage points (and call delete on all items) /// Clear coverage points (and call delete on all items)
void clear() VL_MT_SAFE; void clear() VL_MT_SAFE;
@ -165,8 +165,8 @@ public:
/// Return default filename for the current thread /// Return default filename for the current thread
static std::string defaultFilename() VL_MT_SAFE { return threadCovp()->defaultFilename(); } static std::string defaultFilename() VL_MT_SAFE { return threadCovp()->defaultFilename(); }
/// Write all coverage data to a file for the current thread /// Write all coverage data to a file for the current thread
static void write(const std::string& filename) VL_MT_SAFE { threadCovp()->write(filename); }
static void write() VL_MT_SAFE { write(defaultFilename()); } static void write() VL_MT_SAFE { write(defaultFilename()); }
static void write(const std::string& filename) VL_MT_SAFE { threadCovp()->write(filename); }
/// Clear coverage points (and call delete on all items) for the current thread /// Clear coverage points (and call delete on all items) for the current thread
static void clear() VL_MT_SAFE { threadCovp()->clear(); } static void clear() VL_MT_SAFE { threadCovp()->clear(); }
/// Clear items not matching the provided string for the current thread /// Clear items not matching the provided string for the current thread