Prepatory code for tracing escaped dots

This commit is contained in:
Wilson Snyder 2009-05-08 14:48:33 -04:00
parent a3e463030d
commit 592b2e76a8
2 changed files with 7 additions and 1 deletions

View File

@ -172,7 +172,8 @@ string AstNode::prettyName(const string& namein) {
pos++; pos++;
} }
} }
return AstNode::dedotName(pretty); if (pretty.substr(0,4) == "TOP.") pretty.replace(0,4,"");
return pretty;
} }
int AstNode::widthPow2() const { int AstNode::widthPow2() const {

View File

@ -1794,7 +1794,12 @@ class EmitCTrace : EmitCStmts {
puts(topClassName()+"* t=("+topClassName()+"*)userthis;\n"); puts(topClassName()+"* t=("+topClassName()+"*)userthis;\n");
puts(EmitCBaseVisitor::symClassVar()+" = t->__VlSymsp; // Setup global symbol table\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"); 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("t->traceInitThis (vlSymsp, vcdp, code);\n");
//puts("vcdp->scopeEscape('.');\n"); // Restore so SystemPerl traced files won't break
puts("}\n"); puts("}\n");
puts("void "+topClassName()+"::traceFull(SpTraceVcd* vcdp, void* userthis, uint32_t code) {\n"); puts("void "+topClassName()+"::traceFull(SpTraceVcd* vcdp, void* userthis, uint32_t code) {\n");