mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
** 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:
+5
-3
@@ -467,7 +467,8 @@ void EmitCSyms::emitSymHdr() {
|
||||
}
|
||||
|
||||
puts("\n// CREATORS\n");
|
||||
puts(symClassName() + "(" + topClassName() + "* topp, const char* namep);\n");
|
||||
puts(symClassName() + "(VerilatedContext* contextp, " + topClassName()
|
||||
+ "* topp, const char* namep);\n");
|
||||
puts(string("~") + symClassName() + "();\n");
|
||||
|
||||
for (const auto& i : m_usesVfinal) {
|
||||
@@ -643,10 +644,11 @@ void EmitCSyms::emitSymImp() {
|
||||
puts("{\n");
|
||||
emitScopeHier(true);
|
||||
puts("}\n\n");
|
||||
puts(symClassName() + "::" + symClassName() + "(" + topClassName()
|
||||
puts(symClassName() + "::" + symClassName() + "(VerilatedContext* contextp, " + topClassName()
|
||||
+ "* topp, const char* namep)\n");
|
||||
puts(" // Setup locals\n");
|
||||
puts(" : __Vm_namep(namep)\n"); // No leak, as gets destroyed when the top is destroyed
|
||||
puts(" : VerilatedSyms{contextp}\n");
|
||||
puts(" , __Vm_namep(namep)\n"); // No leak, as gets destroyed when the top is destroyed
|
||||
if (v3Global.needTraceDumper()) {
|
||||
puts(" , __Vm_dumping(false)\n");
|
||||
puts(" , __Vm_dumperp(nullptr)\n");
|
||||
|
||||
Reference in New Issue
Block a user