diff --git a/src/V3EmitV.cpp b/src/V3EmitV.cpp index 8d23825d3..046e120e0 100644 --- a/src/V3EmitV.cpp +++ b/src/V3EmitV.cpp @@ -109,7 +109,7 @@ class EmitVBaseVisitor : public EmitCBaseVisitor { puts(";\n"); } virtual void visit(AstAssignAlias* nodep, AstNUser*) { - putbs("assign "); + putbs("alias "); nodep->lhsp()->iterateAndNext(*this); putbs(" = "); nodep->rhsp()->iterateAndNext(*this); diff --git a/src/V3Inst.cpp b/src/V3Inst.cpp index 1883ba9ba..39db6a893 100644 --- a/src/V3Inst.cpp +++ b/src/V3Inst.cpp @@ -87,7 +87,7 @@ private: UINFO(4," PIN "<=9) nodep->dumpTree(cout," Pin_oldb: "); if (nodep->modVarp()->isOutOnly() && nodep->exprp()->castConst()) - nodep->v3error("Output pin is assigned to a constant, electrical short"); + nodep->v3error("Output port is connected to a constant pin, electrical short"); // Use user1p on the PIN to indicate we created an assign for this pin if (!nodep->user1()) { nodep->user1(1); diff --git a/src/Verilator.cpp b/src/Verilator.cpp index 30b7e4b0d..f71c0944a 100644 --- a/src/Verilator.cpp +++ b/src/Verilator.cpp @@ -196,16 +196,16 @@ void process () { V3Tristate::tristateAll(v3Global.rootp()); v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("tristate.tree")); - // Move assignments from X into MODULE temps. - // (Before flattening, so each new X variable is shared between all scopes of that module.) - V3Unknown::unknownAll(v3Global.rootp()); - v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("unknown.tree")); - // Task inlining & pushing BEGINs names to variables/cells // Begin processing must be after Param, before module inlining V3Begin::debeginAll(v3Global.rootp()); // Flatten cell names, before inliner v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("begin.tree")); + // Move assignments from X into MODULE temps. + // (Before flattening, so each new X variable is shared between all scopes of that module.) + V3Unknown::unknownAll(v3Global.rootp()); + v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("unknown.tree")); + // Module inlining // Cannot remove dead variables after this, as alias information for final // V3Scope's V3LinkDot is in the AstVar. @@ -273,13 +273,12 @@ void process () { // Push constants across variables and remove redundant assignments V3Const::constifyAll(v3Global.rootp()); + //v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("const.tree")); if (v3Global.opt.oLife()) { V3Life::lifeAll(v3Global.rootp()); v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("life.tree")); } - //v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("const.tree")); - // Make large low-fanin logic blocks into lookup tables // This should probably be done much later, once we have common logic elimination. if (v3Global.opt.oTable()) {