diff --git a/src/V3Ast.h b/src/V3Ast.h index cf6c9a100..6a523b5ef 100644 --- a/src/V3Ast.h +++ b/src/V3Ast.h @@ -36,8 +36,8 @@ // class V3AstNode; // Hint class so we can choose constructors -class AstLogicPacked {}; -class AstBitPacked {}; +class VFlagLogicPacked {}; +class VFlagBitPacked {}; //###################################################################### diff --git a/src/V3AstNodes.h b/src/V3AstNodes.h index c11d764d8..234a3bbae 100644 --- a/src/V3AstNodes.h +++ b/src/V3AstNodes.h @@ -258,11 +258,11 @@ public: : AstNodeDType(fl) { init(kwd, signst, 0, NULL); } - AstBasicDType(FileLine* fl, AstLogicPacked, int wantwidth) + AstBasicDType(FileLine* fl, VFlagLogicPacked, int wantwidth) : AstNodeDType(fl) { init(AstBasicDTypeKwd::LOGIC, signedst_NOSIGNED, wantwidth, NULL); } - AstBasicDType(FileLine* fl, AstBitPacked, int wantwidth) + AstBasicDType(FileLine* fl, VFlagBitPacked, int wantwidth) : AstNodeDType(fl) { init(AstBasicDTypeKwd::BIT, signedst_NOSIGNED, wantwidth, NULL); } @@ -647,20 +647,20 @@ public: width(dtp->basicp()->width(), 0); } else width(1, 0); } - AstVar(FileLine* fl, AstVarType type, const string& name, AstLogicPacked, int wantwidth) + AstVar(FileLine* fl, AstVarType type, const string& name, VFlagLogicPacked, int wantwidth) :AstNode(fl) , m_name(name) { init(); combineType(type); - setOp1p(new AstBasicDType(fl, AstLogicPacked(), wantwidth)); + setOp1p(new AstBasicDType(fl, VFlagLogicPacked(), wantwidth)); width(wantwidth,0); } - AstVar(FileLine* fl, AstVarType type, const string& name, AstBitPacked, int wantwidth) + AstVar(FileLine* fl, AstVarType type, const string& name, VFlagBitPacked, int wantwidth) :AstNode(fl) , m_name(name) { init(); combineType(type); - setOp1p(new AstBasicDType(fl, AstBitPacked(), wantwidth)); + setOp1p(new AstBasicDType(fl, VFlagBitPacked(), wantwidth)); width(wantwidth,0); } AstVar(FileLine* fl, AstVarType type, const string& name, AstVar* examplep) diff --git a/src/V3Clock.cpp b/src/V3Clock.cpp index f4387315b..29cd765fe 100644 --- a/src/V3Clock.cpp +++ b/src/V3Clock.cpp @@ -85,7 +85,7 @@ private: AstVar* varp = vscp->varp(); if (!varp->width1()) varp->v3error("Unsupported: Clock edge on non-single bit signal: "<prettyName()); string newvarname = ((string)"__Vclklast__"+vscp->scopep()->nameDotless()+"__"+varp->shortName()); - AstVar* newvarp = new AstVar (vscp->fileline(), AstVarType::MODULETEMP, newvarname, AstLogicPacked(), 1); + AstVar* newvarp = new AstVar (vscp->fileline(), AstVarType::MODULETEMP, newvarname, VFlagLogicPacked(), 1); m_modp->addStmtp(newvarp); AstVarScope* newvscp = new AstVarScope(vscp->fileline(), m_scopep, newvarp); vscp->user1p(newvscp); @@ -103,7 +103,7 @@ private: AstVarScope* getCreateLocalVar(FileLine* fl, const string& name, AstVar* examplep, int width) { AstVar* newvarp; if (width) { - newvarp = new AstVar (fl, AstVarType::BLOCKTEMP, name, AstLogicPacked(), width); + newvarp = new AstVar (fl, AstVarType::BLOCKTEMP, name, VFlagLogicPacked(), width); } else { newvarp = new AstVar (fl, AstVarType::BLOCKTEMP, name, examplep); // No range; 1 bit. } diff --git a/src/V3Const.cpp b/src/V3Const.cpp index 29e34c9b0..4a1b7a2cd 100644 --- a/src/V3Const.cpp +++ b/src/V3Const.cpp @@ -858,9 +858,9 @@ private: string name1 = ((string)"__Vconcswap"+cvtToStr(m_modp->varNumGetInc())); string name2 = ((string)"__Vconcswap"+cvtToStr(m_modp->varNumGetInc())); AstVar* temp1p = new AstVar(sel1p->fileline(), AstVarType::BLOCKTEMP, name1, - AstLogicPacked(), msb1-lsb1+1); + VFlagLogicPacked(), msb1-lsb1+1); AstVar* temp2p = new AstVar(sel2p->fileline(), AstVarType::BLOCKTEMP, name2, - AstLogicPacked(), msb2-lsb2+1); + VFlagLogicPacked(), msb2-lsb2+1); m_modp->addStmtp(temp1p); m_modp->addStmtp(temp2p); AstNodeAssign* asn1ap=nodep->cloneType diff --git a/src/V3Delayed.cpp b/src/V3Delayed.cpp index 4abc458b3..bc56ba31f 100644 --- a/src/V3Delayed.cpp +++ b/src/V3Delayed.cpp @@ -134,7 +134,7 @@ private: varp = new AstVar (oldvarscp->fileline(), AstVarType::BLOCKTEMP, name, oldvarscp->varp()); varp->widthSignedFrom(oldvarscp); } else { // Used for vset and dimensions, so can zero init - varp = new AstVar (oldvarscp->fileline(), AstVarType::BLOCKTEMP, name, AstBitPacked(), width); + varp = new AstVar (oldvarscp->fileline(), AstVarType::BLOCKTEMP, name, VFlagBitPacked(), width); } addmodp->addStmtp(varp); m_modVarMap.insert(make_pair(make_pair(addmodp, name), varp)); diff --git a/src/V3Depth.cpp b/src/V3Depth.cpp index a1b397f4f..3eb8e6396 100644 --- a/src/V3Depth.cpp +++ b/src/V3Depth.cpp @@ -69,7 +69,7 @@ private: // though it's one bit wide, needs the mask in the upper bits. // (Someday we'll have a valid bitmask instead of widths....) // See t_func_crc for an example test that requires this - AstLogicPacked(), nodep->width()); + VFlagLogicPacked(), nodep->width()); if (!m_funcp) nodep->v3fatalSrc("Deep expression not under a function"); m_funcp->addInitsp(varp); // Replace node tree with reference to var diff --git a/src/V3Link.cpp b/src/V3Link.cpp index 0cb50f1e1..408267c4c 100644 --- a/src/V3Link.cpp +++ b/src/V3Link.cpp @@ -198,7 +198,7 @@ private: } } AstVar* newp = new AstVar (forrefp->fileline(), AstVarType::WIRE, - forrefp->name(), AstLogicPacked(), 1); + forrefp->name(), VFlagLogicPacked(), 1); newp->trace(m_modp->modTrace()); m_modp->addStmtp(newp); diff --git a/src/V3LinkJump.cpp b/src/V3LinkJump.cpp index 90d4f2b38..99943e414 100644 --- a/src/V3LinkJump.cpp +++ b/src/V3LinkJump.cpp @@ -139,7 +139,7 @@ private: string name = string("__Vrepeat")+cvtToStr(m_repeatNum++); // Spec says value is integral, if negative is ignored AstVar* varp = new AstVar(nodep->fileline(), AstVarType::BLOCKTEMP, name, - AstBitPacked(), 32); + VFlagBitPacked(), 32); varp->numeric(AstNumeric::SIGNED); varp->dtypep()->numeric(AstNumeric::SIGNED); varp->usedLoopIdx(true); diff --git a/src/V3LinkResolve.cpp b/src/V3LinkResolve.cpp index 984c901ab..41df8d2f9 100644 --- a/src/V3LinkResolve.cpp +++ b/src/V3LinkResolve.cpp @@ -144,7 +144,7 @@ private: // Make a new temp wire string newvarname = "__Vsenitemexpr"+cvtToStr(++m_senitemCvtNum); AstVar* newvarp = new AstVar (sensp->fileline(), AstVarType::MODULETEMP, newvarname, - AstLogicPacked(), 1); + VFlagLogicPacked(), 1); // We can't just add under the module, because we may be inside a generate, begin, etc. // We know a SenItem should be under a SenTree/Always etc, we we'll just hunt upwards AstNode* addwherep = nodep; // Add to this element's next diff --git a/src/V3Premit.cpp b/src/V3Premit.cpp index 162f63b6c..656f74536 100644 --- a/src/V3Premit.cpp +++ b/src/V3Premit.cpp @@ -103,7 +103,7 @@ private: AstVar* getBlockTemp(AstNode* nodep) { string newvarname = ((string)"__Vtemp"+cvtToStr(m_modp->varNumGetInc())); AstVar* varp = new AstVar (nodep->fileline(), AstVarType::STMTTEMP, newvarname, - AstLogicPacked(), nodep->widthMin()); + VFlagLogicPacked(), nodep->widthMin()); m_funcp->addInitsp(varp); return varp; } diff --git a/src/V3Table.cpp b/src/V3Table.cpp index 143c0f894..fe45fa044 100644 --- a/src/V3Table.cpp +++ b/src/V3Table.cpp @@ -182,7 +182,7 @@ private: // Index into our table AstVar* indexVarp = new AstVar (nodep->fileline(), AstVarType::BLOCKTEMP, "__Vtableidx" + cvtToStr(m_modTables), - AstBitPacked(), m_inWidth); + VFlagBitPacked(), m_inWidth); m_modp->addStmtp(indexVarp); AstVarScope* indexVscp = new AstVarScope (indexVarp->fileline(), m_scopep, indexVarp); m_scopep->addVarp(indexVscp); @@ -191,7 +191,7 @@ private: FileLine* fl = nodep->fileline(); AstNodeDType* dtypep = new AstArrayDType (fl, - new AstBasicDType(fl, AstBitPacked(), m_outVarps.size()), + new AstBasicDType(fl, VFlagBitPacked(), m_outVarps.size()), new AstRange (fl, VL_MASK_I(m_inWidth), 0)); AstVar* chgVarp = new AstVar (fl, AstVarType::MODULETEMP, @@ -238,7 +238,7 @@ private: AstNodeDType* dtypep = new AstArrayDType (fl, // FUTURE: If support more types, below can use outvarp->dtype() - new AstBasicDType(fl, AstLogicPacked(), outvarp->width()), + new AstBasicDType(fl, VFlagLogicPacked(), outvarp->width()), new AstRange (fl, VL_MASK_I(m_inWidth), 0)); AstVar* tablevarp = new AstVar (fl, AstVarType::MODULETEMP, diff --git a/src/V3Trace.cpp b/src/V3Trace.cpp index 715ebdc88..b5b9eee25 100644 --- a/src/V3Trace.cpp +++ b/src/V3Trace.cpp @@ -313,7 +313,7 @@ private: if (!activityNumber) activityNumber++; // For simplicity, always create it int activityBits = VL_WORDS_I(activityNumber)*VL_WORDSIZE; // For tighter code; round to next 32 bit point. AstVar* newvarp = new AstVar (m_chgFuncp->fileline(), AstVarType::MODULETEMP, - "__Vm_traceActivity", AstBitPacked(), activityBits); + "__Vm_traceActivity", VFlagBitPacked(), activityBits); m_topModp->addStmtp(newvarp); AstVarScope* newvscp = new AstVarScope(newvarp->fileline(), m_highScopep, newvarp); m_highScopep->addVarp(newvscp); diff --git a/src/V3Tristate.cpp b/src/V3Tristate.cpp index 46b7a8a4c..cf51dd4a5 100644 --- a/src/V3Tristate.cpp +++ b/src/V3Tristate.cpp @@ -233,7 +233,7 @@ private: AstVar* enp = new AstVar (outrefp->varp()->fileline(), AstVarType::MODULETEMP, outrefp->name() + "__en" + suffix + cvtToStr(m_unique++), - AstLogicPacked(), width); + VFlagLogicPacked(), width); enp->varType2Out(); if (enp->width() != enrhsp->width()) { @@ -412,7 +412,7 @@ private: AstVar* newlhsp = new AstVar(lhsp->fileline(), AstVarType::MODULETEMP, lhsp->name()+"__lhs"+cvtToStr(m_unique++), - AstLogicPacked(), w); + VFlagLogicPacked(), w); nodep->addStmtp(newlhsp); // now append this driver to the driver logic. @@ -427,7 +427,7 @@ private: bitselp = new AstVar(lhsp->fileline(), AstVarType::MODULETEMP, lhsp->name()+"__sel"+cvtToStr(m_unique-1), - AstLogicPacked(), ws); + VFlagLogicPacked(), ws); // nodep->addStmtp(bitselp); nodep->addStmtp(new AstAssignW(lhsp->fileline(), diff --git a/src/V3Unknown.cpp b/src/V3Unknown.cpp index 817462da8..2957b9ef7 100644 --- a/src/V3Unknown.cpp +++ b/src/V3Unknown.cpp @@ -127,7 +127,7 @@ private: else { string name = ((string)"__Vlvbound"+cvtToStr(m_modp->varNumGetInc())); AstVar* varp = new AstVar(fl, AstVarType::MODULETEMP, name, - AstLogicPacked(), prep->width()); + VFlagLogicPacked(), prep->width()); m_modp->addStmtp(varp); AstNode* abovep = prep->backp(); // Grab above point before lose it w/ next replace @@ -288,7 +288,7 @@ private: +cvtToStr(m_modp->varNumGetInc())); AstVar* newvarp = new AstVar (nodep->fileline(), AstVarType::XTEMP, newvarname, - AstLogicPacked(), nodep->width()); + VFlagLogicPacked(), nodep->width()); ++m_statUnkVars; AstNRelinker replaceHandle; nodep->unlinkFrBack(&replaceHandle); diff --git a/src/V3Width.cpp b/src/V3Width.cpp index c67d7a5ad..d3723a46d 100644 --- a/src/V3Width.cpp +++ b/src/V3Width.cpp @@ -729,7 +729,7 @@ private: width=32; } if (!nodep->isDouble()) { - AstBasicDType* newp = new AstBasicDType(nodep->fileline(), AstLogicPacked(), width); + AstBasicDType* newp = new AstBasicDType(nodep->fileline(), VFlagLogicPacked(), width); newp->implicit(true); newp->numeric(rs); // SIGNED or UNSIGNED bdtypep->replaceWith(newp);