Fix flushCall for backward compatibility (#2580).

This commit is contained in:
Wilson Snyder 2020-10-04 07:47:25 -04:00
parent 5033c906fd
commit efbcb094ca
3 changed files with 7 additions and 0 deletions

View File

@ -17,6 +17,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
**** Fix class wide member display (#2567). [Nandu Raj P]
**** Fix flushCall for backward compatibility (#2580). [chenguokai]
* Verilator 4.100 2020-09-07

View File

@ -499,6 +499,7 @@ public:
static void addFlushCb(VoidPCb cb, void* datap) VL_MT_SAFE;
static void removeFlushCb(VoidPCb cb, void* datap) VL_MT_SAFE;
static void runFlushCallbacks() VL_MT_SAFE;
static void flushCall() VL_MT_SAFE { runFlushCallbacks(); } // Deprecated
/// Callbacks to run prior to termination
static void addExitCb(VoidPCb cb, void* datap) VL_MT_SAFE;
static void removeExitCb(VoidPCb cb, void* datap) VL_MT_SAFE;

View File

@ -115,6 +115,9 @@ int main(int argc, char** argv, char** env) {
tfp->dump((unsigned int)(main_time));
++main_time;
// Code coverage of historical flush function
Verilated::flushCall();
for (VerilatedScopeNameMap::const_iterator it = scopeMapp->begin(); it != scopeMapp->end();
++it) {
VerilatedVarNameMap* varNameMap = it->second->varsp();
@ -159,5 +162,6 @@ int main(int argc, char** argv, char** env) {
tfp->close();
top->final();
VL_PRINTF("*-* All Finished *-*\n");
return 0;
}