From 9bf6135f6dbd59473946164cdf4877559d4b9bc6 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sat, 5 Oct 2019 17:35:08 -0400 Subject: [PATCH] Remove some output tabs. --- src/V3EmitC.cpp | 2 +- src/V3EmitCSyms.cpp | 15 +++++++-------- src/V3File.h | 4 ---- src/V3Gate.cpp | 12 ++++++------ src/V3Hashed.cpp | 2 +- src/V3LinkDot.cpp | 12 ++++++------ src/V3Param.cpp | 6 +++--- src/V3ParseSym.h | 2 +- src/V3SymTable.h | 2 +- test_regress/driver.pl | 8 ++++---- 10 files changed, 30 insertions(+), 35 deletions(-) diff --git a/src/V3EmitC.cpp b/src/V3EmitC.cpp index 1d334355c..2f938e4a7 100644 --- a/src/V3EmitC.cpp +++ b/src/V3EmitC.cpp @@ -2559,7 +2559,7 @@ void EmitCImp::emitInt(AstNodeModule* modp) { if (modp->isTop()) puts("// Public to allow access to /*verilator_public*/ items;\n"); if (modp->isTop()) puts("// otherwise the application code can consider these internals.\n"); } - ofp()->putsCellDecl(modClassName(cellp->modp()), cellp->name()); + puts(modClassName(cellp->modp())+"* "+cellp->name()+";\n"); } } } diff --git a/src/V3EmitCSyms.cpp b/src/V3EmitCSyms.cpp index b4e022b3c..e0b9dced9 100644 --- a/src/V3EmitCSyms.cpp +++ b/src/V3EmitCSyms.cpp @@ -580,25 +580,24 @@ void EmitCSyms::emitSymImp() { puts("\n// FUNCTIONS\n"); puts(symClassName()+"::"+symClassName()+"("+topClassName()+"* topp, const char* namep)\n"); - puts("\t// Setup locals\n"); - puts("\t: __Vm_namep(namep)\n"); // No leak, as we get destroyed when the top is destroyed + puts(" // Setup locals\n"); + puts(" : __Vm_namep(namep)\n"); // No leak, as we get destroyed when the top is destroyed if (v3Global.opt.trace()) { - puts("\t, __Vm_activity(false)\n"); + puts(" , __Vm_activity(false)\n"); } - puts("\t, __Vm_didInit(false)\n"); - puts("\t// Setup submodule names\n"); + puts(" , __Vm_didInit(false)\n"); + puts(" // Setup submodule names\n"); char comma=','; for (std::vector::iterator it = m_scopes.begin(); it != m_scopes.end(); ++it) { AstScope* scopep = it->first; AstNodeModule* modp = it->second; if (modp->isTop()) { } else { - string nameDl = scopep->nameDotless(); - ofp()->printf("\t%c %-30s ", comma, nameDl.c_str()); + puts(string(" ")+comma+" "+scopep->nameDotless()); puts("(Verilated::catName(topp->name(),"); // The "." is added by catName putsQuoted(scopep->prettyName()); puts("))\n"); - comma=','; + comma = ','; ++m_numStmts; } } diff --git a/src/V3File.h b/src/V3File.h index 91800d195..774c7d84e 100644 --- a/src/V3File.h +++ b/src/V3File.h @@ -192,10 +192,6 @@ public: resetPrivate(); } virtual ~V3OutCFile() {} - virtual void putsCellDecl(const string& classname, const string& cellname) { - string classStar = classname + "*"; - this->printf("%-19s\t%s;\n", classStar.c_str(), cellname.c_str()); - } virtual void putsHeader() { puts("// Verilated -*- C++ -*-\n"); } virtual void putsIntTopInclude() { putsForceIncs(); diff --git a/src/V3Gate.cpp b/src/V3Gate.cpp index 53c1215ef..253ee22c7 100644 --- a/src/V3Gate.cpp +++ b/src/V3Gate.cpp @@ -290,7 +290,7 @@ public: } } if (debug()>=9 && !m_isSimple) { - nodep->dumpTree(cout, "\tgate!Ok: "); + nodep->dumpTree(cout, " gate!Ok: "); } } virtual ~GateOkVisitor() {} @@ -628,8 +628,8 @@ void GateVisitor::optimizeSignals(bool allowMultiIn) { } else { AstNode* substp = okVisitor.substTree(); - if (debug()>=5) logicp->dumpTree(cout, "\telimVar: "); - if (debug()>=5) substp->dumpTree(cout, "\t subst: "); + if (debug()>=5) logicp->dumpTree(cout, " elimVar: "); + if (debug()>=5) substp->dumpTree(cout, " subst: "); ++m_statSigs; bool removedAllUsages = true; for (V3GraphEdge* edgep = vvertexp->outBeginp(); @@ -895,14 +895,14 @@ public: }; void GateVisitor::optimizeElimVar(AstVarScope* varscp, AstNode* substp, AstNode* consumerp) { - if (debug()>=5) consumerp->dumpTree(cout, "\telimUsePre: "); + if (debug()>=5) consumerp->dumpTree(cout, " elimUsePre: "); GateElimVisitor elimVisitor (consumerp, varscp, substp, NULL); if (elimVisitor.didReplace()) { - if (debug()>=9) consumerp->dumpTree(cout, "\telimUseCns: "); + if (debug()>=9) consumerp->dumpTree(cout, " elimUseCns: "); //Caution: Can't let V3Const change our handle to consumerp, such as by // optimizing away this assignment, etc. consumerp = V3Const::constifyEdit(consumerp); - if (debug()>=5) consumerp->dumpTree(cout, "\telimUseDne: "); + if (debug()>=5) consumerp->dumpTree(cout, " elimUseDne: "); // Some previous input edges may have disappeared, perhaps all of them. // If we remove the edges we can further optimize // See e.g t_var_overzero.v. diff --git a/src/V3Hashed.cpp b/src/V3Hashed.cpp index 2f74be3dd..c7f69bf0a 100644 --- a/src/V3Hashed.cpp +++ b/src/V3Hashed.cpp @@ -196,7 +196,7 @@ void V3Hashed::dumpFile(const string& filename, bool tree) { *logp <<"\t"<second<second->dumpTree(*logp, "\t\t"); + if (tree) it->second->dumpTree(*logp, " "); } } diff --git a/src/V3LinkDot.cpp b/src/V3LinkDot.cpp index c00d4a03e..2ed28a8a0 100644 --- a/src/V3LinkDot.cpp +++ b/src/V3LinkDot.cpp @@ -584,7 +584,7 @@ public: cellp = lookupSymp ? VN_CAST(lookupSymp->nodep(), Cell) : NULL; // Replicated above inlinep = lookupSymp ? VN_CAST(lookupSymp->nodep(), CellInline) : NULL; // Replicated above if (lookupSymp) { - UINFO(9,"\t\tUp to "<nodep(), Var)) { - UINFO(9,"\t\tNot found but matches var name in parent " + UINFO(9," Not found but matches var name in parent " <symPrefix()=="") ? "" : " as ") <<((lookupSymp->symPrefix()=="") ? "" : lookupSymp->symPrefix()+dotname) @@ -1435,7 +1435,7 @@ class LinkDotScopeVisitor : public AstNVisitor { virtual void visit(AstAssignAlias* nodep) { // Track aliases created by V3Inline; if we get a VARXREF(aliased_from) // we'll need to replace it with a VARXREF(aliased_to) - if (debug()>=9) nodep->dumpTree(cout, "-\t\t\t\talias: "); + if (debug()>=9) nodep->dumpTree(cout, "- alias: "); AstVarScope* fromVscp = VN_CAST(nodep->lhsp(), VarRef)->varScopep(); AstVarScope* toVscp = VN_CAST(nodep->rhsp(), VarRef)->varScopep(); UASSERT_OBJ(fromVscp && toVscp, nodep, "Bad alias scopes"); @@ -1444,7 +1444,7 @@ class LinkDotScopeVisitor : public AstNVisitor { } virtual void visit(AstAssignVarScope* nodep) { UINFO(5,"ASSIGNVARSCOPE "<=9) nodep->dumpTree(cout, "-\t\t\t\tavs: "); + if (debug()>=9) nodep->dumpTree(cout, "- avs: "); VSymEnt* rhsSymp; { AstVarRef* refp = VN_CAST(nodep->rhsp(), VarRef); @@ -2334,7 +2334,7 @@ private: if (nodep->inlinedDots()!="") { // Correct for current scope dotSymp = m_modSymp; // Dotted lookup is always relative to module, as maybe variable name lower down with same scope name we want to ignore (t_math_divw) string inl = AstNode::dedotName(nodep->inlinedDots()); - UINFO(8,"\t\tInlined "<findDotted(dotSymp, inl, baddot, okSymp); if (!dotSymp) { okSymp->cellErrorScopes(nodep); diff --git a/src/V3Param.cpp b/src/V3Param.cpp index e0b67e0bc..a771c0a72 100644 --- a/src/V3Param.cpp +++ b/src/V3Param.cpp @@ -585,7 +585,7 @@ void ParamVisitor::visitCell(AstCell* nodep, const string& hierName) { { UINFO(4,"De-parameterize: "<=10) nodep->dumpTree(cout, "-cell:\t"); + if (debug()>=10) nodep->dumpTree(cout, "-cell: "); // Evaluate all module constants V3Const::constifyParamsEdit(nodep); AstNodeModule* srcModp = nodep->modp(); @@ -593,12 +593,12 @@ void ParamVisitor::visitCell(AstCell* nodep, const string& hierName) { // Make sure constification worked // Must be a separate loop, as constant conversion may have changed some pointers. - //if (debug()) nodep->dumpTree(cout, "-cel2:\t"); + //if (debug()) nodep->dumpTree(cout, "-cel2: "); string longname = srcModp->name(); bool any_overrides = false; if (nodep->recursive()) any_overrides = true; // Must always clone __Vrcm (recursive modules) longname += "_"; - if (debug()>8) nodep->paramsp()->dumpTreeAndNext(cout, "-cellparams:\t"); + if (debug()>8) nodep->paramsp()->dumpTreeAndNext(cout, "-cellparams: "); for (AstPin* pinp = nodep->paramsp(); pinp; pinp=VN_CAST(pinp->nextp(), Pin)) { if (!pinp->exprp()) continue; // No-connect if (AstVar* modvarp = pinp->modVarp()) { diff --git a/src/V3ParseSym.h b/src/V3ParseSym.h index 77c109e97..9d7282292 100644 --- a/src/V3ParseSym.h +++ b/src/V3ParseSym.h @@ -123,7 +123,7 @@ public: UINFO(1,"ParseSym Stack:\n"); for (SymStack::reverse_iterator it=m_sympStack.rbegin(); it!=m_sympStack.rend(); ++it) { VSymEnt* symp = *it; - UINFO(1,"\t"<nodep()<nodep()<nodep()<print(" {\n"); } - print $fh " ${set}fastclk = false;\n" if $self->{inputs}{fastclk}; - print $fh " ${set}clk = false;\n" if $self->{inputs}{clk}; + print $fh " ${set}fastclk = false;\n" if $self->{inputs}{fastclk}; + print $fh " ${set}clk = false;\n" if $self->{inputs}{clk}; _print_advance_time($self, $fh, 10); print $fh " }\n"; @@ -1574,11 +1574,11 @@ sub _make_main { for (my $i=0; $i<5; $i++) { my $action = 0; if ($self->{inputs}{fastclk}) { - print $fh " ${set}fastclk=!${set}fastclk;\n"; + print $fh " ${set}fastclk = !${set}fastclk;\n"; $action = 1; } if ($i==0 && $self->{inputs}{clk}) { - print $fh " ${set}clk=!${set}clk;\n"; + print $fh " ${set}clk = !${set}clk;\n"; $action = 1; } if ($self->{savable}) {