diff --git a/src/V3Ast.cpp b/src/V3Ast.cpp index 6fba33d07..e535afbf3 100644 --- a/src/V3Ast.cpp +++ b/src/V3Ast.cpp @@ -172,7 +172,8 @@ string AstNode::prettyName(const string& namein) { pos++; } } - return AstNode::dedotName(pretty); + if (pretty.substr(0,4) == "TOP.") pretty.replace(0,4,""); + return pretty; } int AstNode::widthPow2() const { diff --git a/src/V3EmitC.cpp b/src/V3EmitC.cpp index 5604ccdea..13b5219f0 100644 --- a/src/V3EmitC.cpp +++ b/src/V3EmitC.cpp @@ -1794,7 +1794,12 @@ class EmitCTrace : EmitCStmts { puts(topClassName()+"* t=("+topClassName()+"*)userthis;\n"); puts(EmitCBaseVisitor::symClassVar()+" = t->__VlSymsp; // Setup global symbol table\n"); puts("if (!Verilated::calcUnusedSigs()) vl_fatal(__FILE__,__LINE__,__FILE__,\"Turning on wave traces requires Verilated::traceEverOn(true) call before time 0.\");\n"); + + //Future; need to wait to estabilish backwards compatibility + //puts("#if defined(SPTRACEVCDC_VERSION) && SPTRACEVCDC_VERSION >= 1320\n"); + //puts("vcdp->scopeEscape(' ');\n"); puts("t->traceInitThis (vlSymsp, vcdp, code);\n"); + //puts("vcdp->scopeEscape('.');\n"); // Restore so SystemPerl traced files won't break puts("}\n"); puts("void "+topClassName()+"::traceFull(SpTraceVcd* vcdp, void* userthis, uint32_t code) {\n");