Add simulation context (VerilatedContext) (#2660). (#2813)

**   Add simulation context (VerilatedContext) to allow multiple fully independent
      models to be in the same process.  Please see the updated examples.
**   Add context->time() and context->timeInc() API calls, to set simulation time.
      These now are recommended in place of the legacy sc_time_stamp().
This commit is contained in:
Wilson Snyder
2021-03-07 11:01:54 -05:00
committed by GitHub
parent caa9c99837
commit 2cad22a22a
45 changed files with 2216 additions and 1128 deletions
+2 -1
View File
@@ -96,7 +96,8 @@ private:
: // If assertions are off, have constant propagation rip them out later
// This allows syntax errors and such to be detected normally.
(v3Global.opt.assertOn()
? static_cast<AstNode*>(new AstCMath(fl, "Verilated::assertOn()", 1))
? static_cast<AstNode*>(
new AstCMath(fl, "vlSymsp->_vm_contextp__->assertOn()", 1))
: static_cast<AstNode*>(new AstConst(fl, AstConst::BitFalse())))),
nodep, nullptr);
newp->user1(true); // Don't assert/cover this if