Internals: Refactor into cvtToHex function. No functional change.
This commit is contained in:
parent
d87b9d25ca
commit
5ae1ce90ad
|
|
@ -231,7 +231,7 @@ inline void AstNode::debugTreeChange(const char* prefix, int lineno, bool next)
|
|||
// Only for use for those really nasty bugs relating to internals
|
||||
// Note this may be null.
|
||||
//if (debug()) cout<<"-treeChange: V3Ast.cpp:"<<lineno<<" Tree Change for "
|
||||
// <<prefix<<": "<<(void*)this<<" <e"<<AstNode::s_editCntGbl<<">"<<endl;
|
||||
// <<prefix<<": "<<cvtToHex(this)<<" <e"<<AstNode::s_editCntGbl<<">"<<endl;
|
||||
//if (debug()) {
|
||||
// cout<<"-treeChange: V3Ast.cpp:"<<lineno<<" Tree Change for "<<prefix<<endl;
|
||||
// // Commenting out the section below may crash, as the tree state
|
||||
|
|
@ -788,8 +788,8 @@ void AstNode::iterateAndNext(AstNVisitor& v) {
|
|||
niterp->accept(v);
|
||||
// accept may do a replaceNode and change niterp on us...
|
||||
// niterp maybe NULL, so need cast if printing
|
||||
//if (niterp != nodep) UINFO(1,"iterateAndNext edited "<<(void*)nodep
|
||||
// <<" now into "<<(void*)niterp<<endl);
|
||||
//if (niterp != nodep) UINFO(1,"iterateAndNext edited "<<cvtToHex(nodep)
|
||||
// <<" now into "<<cvtToHex(niterp)<<endl);
|
||||
if (!niterp) return; // Perhaps node deleted inside accept
|
||||
niterp->m_iterpp = NULL;
|
||||
if (VL_UNLIKELY(niterp!=nodep)) { // Edited node inside accept
|
||||
|
|
@ -998,23 +998,23 @@ void AstNode::checkIter() const {
|
|||
}
|
||||
|
||||
void AstNode::dumpPtrs(std::ostream& os) const {
|
||||
os<<"This="<<typeName()<<" "<<(void*)this;
|
||||
os<<" back="<<(void*)backp();
|
||||
if (nextp()) os<<" next="<<(void*)nextp();
|
||||
os<<"This="<<typeName()<<" "<<cvtToHex(this);
|
||||
os<<" back="<<cvtToHex(backp());
|
||||
if (nextp()) os<<" next="<<cvtToHex(nextp());
|
||||
if (m_headtailp==this) os<<" headtail=this";
|
||||
else os<<" headtail="<<(void*)m_headtailp;
|
||||
if (op1p()) os<<" op1p="<<(void*)op1p();
|
||||
if (op2p()) os<<" op2p="<<(void*)op2p();
|
||||
if (op3p()) os<<" op3p="<<(void*)op3p();
|
||||
if (op4p()) os<<" op4p="<<(void*)op4p();
|
||||
if (user1p()) os<<" user1p="<<(void*)user1p();
|
||||
if (user2p()) os<<" user2p="<<(void*)user2p();
|
||||
if (user3p()) os<<" user3p="<<(void*)user3p();
|
||||
if (user4p()) os<<" user4p="<<(void*)user4p();
|
||||
if (user5p()) os<<" user5p="<<(void*)user5p();
|
||||
else os<<" headtail="<<cvtToHex(m_headtailp);
|
||||
if (op1p()) os<<" op1p="<<cvtToHex(op1p());
|
||||
if (op2p()) os<<" op2p="<<cvtToHex(op2p());
|
||||
if (op3p()) os<<" op3p="<<cvtToHex(op3p());
|
||||
if (op4p()) os<<" op4p="<<cvtToHex(op4p());
|
||||
if (user1p()) os<<" user1p="<<cvtToHex(user1p());
|
||||
if (user2p()) os<<" user2p="<<cvtToHex(user2p());
|
||||
if (user3p()) os<<" user3p="<<cvtToHex(user3p());
|
||||
if (user4p()) os<<" user4p="<<cvtToHex(user4p());
|
||||
if (user5p()) os<<" user5p="<<cvtToHex(user5p());
|
||||
if (m_iterpp) {
|
||||
os<<" iterpp="<<(void*)m_iterpp;
|
||||
os<<"*="<<(void*)*m_iterpp;
|
||||
os<<" iterpp="<<cvtToHex(m_iterpp);
|
||||
os<<"*="<<cvtToHex(*m_iterpp);
|
||||
}
|
||||
os<<endl;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -804,24 +804,25 @@ void AstWhile::addNextStmt(AstNode* newp, AstNode* belowp) {
|
|||
// Per-type Debugging
|
||||
|
||||
void AstNode::dump(std::ostream& str) {
|
||||
str<<typeName()<<" "<<(void*)this
|
||||
//<<" "<<(void*)this->m_backp
|
||||
str<<typeName()<<" "<<cvtToHex(this)
|
||||
//<<" "<<cvtToHex(this)->m_backp
|
||||
<<" <e"<<std::dec<<editCount()
|
||||
<<((editCount()>=editCountLast())?"#>":">")
|
||||
<<" {"<<fileline()->filenameLetters()<<std::dec<<fileline()->lineno()<<"}";
|
||||
if (user1p()) str<<" u1="<<(void*)user1p();
|
||||
if (user2p()) str<<" u2="<<(void*)user2p();
|
||||
if (user3p()) str<<" u3="<<(void*)user3p();
|
||||
if (user4p()) str<<" u4="<<(void*)user4p();
|
||||
if (user5p()) str<<" u5="<<(void*)user5p();
|
||||
if (user1p()) str<<" u1="<<cvtToHex(user1p());
|
||||
if (user2p()) str<<" u2="<<cvtToHex(user2p());
|
||||
if (user3p()) str<<" u3="<<cvtToHex(user3p());
|
||||
if (user4p()) str<<" u4="<<cvtToHex(user4p());
|
||||
if (user5p()) str<<" u5="<<cvtToHex(user5p());
|
||||
if (hasDType()) {
|
||||
// Final @ so less likely to by accident read it as a nodep
|
||||
if (dtypep()==this) str<<" @dt="<<"this@";
|
||||
else str<<" @dt="<<(void*)dtypep()<<"@"; // Final @ so less likely to by accident think it's nodep
|
||||
else str<<" @dt="<<cvtToHex(dtypep())<<"@";
|
||||
if (AstNodeDType* dtp = dtypep()) {
|
||||
dtp->dumpSmall(str);
|
||||
}
|
||||
} else { // V3Broken will throw an error
|
||||
if (dtypep()) str<<" %Error-dtype-exp=null,got="<<(void*)dtypep();
|
||||
if (dtypep()) str<<" %Error-dtype-exp=null,got="<<cvtToHex(dtypep());
|
||||
}
|
||||
if (name()!="") {
|
||||
if (VN_IS(this, Const)) str<<" "<<name(); // Already quoted
|
||||
|
|
@ -927,7 +928,7 @@ void AstNodeDType::dump(std::ostream& str) {
|
|||
this->AstNode::dump(str);
|
||||
if (generic()) str<<" [GENERIC]";
|
||||
if (AstNodeDType* dtp = virtRefDTypep()) {
|
||||
str<<" refdt="<<(void*)(dtp);
|
||||
str<<" refdt="<<cvtToHex(dtp);
|
||||
dtp->dumpSmall(str);
|
||||
}
|
||||
}
|
||||
|
|
@ -1037,7 +1038,7 @@ void AstVarScope::dump(std::ostream& str) {
|
|||
}
|
||||
void AstVarXRef::dump(std::ostream& str) {
|
||||
this->AstNode::dump(str);
|
||||
if (packagep()) { str<<" pkg="<<(void*)packagep(); }
|
||||
if (packagep()) { str<<" pkg="<<cvtToHex(packagep()); }
|
||||
if (lvalue()) str<<" [LV] => ";
|
||||
else str<<" [RV] <- ";
|
||||
str<<".="<<dotted()<<" ";
|
||||
|
|
@ -1048,7 +1049,7 @@ void AstVarXRef::dump(std::ostream& str) {
|
|||
}
|
||||
void AstVarRef::dump(std::ostream& str) {
|
||||
this->AstNode::dump(str);
|
||||
if (packagep()) { str<<" pkg="<<(void*)packagep(); }
|
||||
if (packagep()) { str<<" pkg="<<cvtToHex(packagep()); }
|
||||
if (lvalue()) str<<" [LV] => ";
|
||||
else str<<" [RV] <- ";
|
||||
if (varScopep()) { varScopep()->dump(str); }
|
||||
|
|
@ -1093,7 +1094,7 @@ void AstParseRef::dump(std::ostream& str) {
|
|||
}
|
||||
void AstPackageRef::dump(std::ostream& str) {
|
||||
this->AstNode::dump(str);
|
||||
if (packagep()) { str<<" pkg="<<(void*)packagep(); }
|
||||
if (packagep()) { str<<" pkg="<<cvtToHex(packagep()); }
|
||||
str<<" -> ";
|
||||
if (packagep()) { packagep()->dump(str); }
|
||||
else { str<<"UNLINKED"; }
|
||||
|
|
@ -1109,7 +1110,7 @@ void AstActive::dump(std::ostream& str) {
|
|||
}
|
||||
void AstNodeFTaskRef::dump(std::ostream& str) {
|
||||
this->AstNode::dump(str);
|
||||
if (packagep()) { str<<" pkg="<<(void*)packagep(); }
|
||||
if (packagep()) { str<<" pkg="<<cvtToHex(packagep()); }
|
||||
str<<" -> ";
|
||||
if (dotted()!="") { str<<".="<<dotted()<<" "; }
|
||||
if (taskp()) { taskp()->dump(str); }
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public:
|
|||
// METHODS
|
||||
static void deleted(const AstNode* nodep) {
|
||||
// Called by operator delete on any node - only if VL_LEAK_CHECKS
|
||||
if (debug()>=9) cout<<"-nodeDel: "<<(void*)(nodep)<<endl;
|
||||
if (debug()>=9) cout<<"-nodeDel: "<<cvtToHex(nodep)<<endl;
|
||||
NodeMap::iterator iter = s_nodes.find(nodep);
|
||||
if (iter==s_nodes.end() || !(iter->second & FLAG_ALLOCATED)) {
|
||||
((AstNode*)(nodep))->v3fatalSrc("Deleting AstNode object that was never tracked or already deleted");
|
||||
|
|
@ -71,7 +71,7 @@ public:
|
|||
#endif
|
||||
static void addNewed(const AstNode* nodep) {
|
||||
// Called by operator new on any node - only if VL_LEAK_CHECKS
|
||||
if (debug()>=9) cout<<"-nodeNew: "<<(void*)(nodep)<<endl;
|
||||
if (debug()>=9) cout<<"-nodeNew: "<<cvtToHex(nodep)<<endl;
|
||||
NodeMap::iterator iter = s_nodes.find(nodep);
|
||||
if (iter!=s_nodes.end() || (iter->second & FLAG_ALLOCATED)) {
|
||||
nodep->v3fatalSrc("Newing AstNode object that is already allocated");
|
||||
|
|
@ -224,9 +224,12 @@ private:
|
|||
}
|
||||
if (nodep->dtypep()) {
|
||||
if (!nodep->dtypep()->brokeExists()) {
|
||||
nodep->v3fatalSrc("Broken link in node->dtypep() to "<<(void*)nodep->dtypep()); }
|
||||
else if (!VN_IS(nodep->dtypep(), NodeDType)) {
|
||||
nodep->v3fatalSrc("Non-dtype link in node->dtypep() to "<<(void*)nodep->dtypep()); }
|
||||
nodep->v3fatalSrc("Broken link in node->dtypep() to "
|
||||
<<cvtToHex(nodep->dtypep()));
|
||||
} else if (!VN_IS(nodep->dtypep(), NodeDType)) {
|
||||
nodep->v3fatalSrc("Non-dtype link in node->dtypep() to "
|
||||
<<cvtToHex(nodep->dtypep()));
|
||||
}
|
||||
}
|
||||
if (v3Global.assertDTypesResolved()) {
|
||||
if (nodep->hasDType()) {
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ public:
|
|||
virtual ~CdcVarVertex() {}
|
||||
// ACCESSORS
|
||||
AstVarScope* varScp() const { return m_varScp; }
|
||||
virtual string name() const { return (cvtToStr((void*)m_varScp)+" "+varScp()->name()); }
|
||||
virtual string name() const { return (cvtToHex(m_varScp)+" "+varScp()->name()); }
|
||||
virtual string dotColor() const { return fromFlop() ? "green" : cntAsyncRst() ? "red" : "blue"; }
|
||||
int cntAsyncRst() const { return m_cntAsyncRst; }
|
||||
void cntAsyncRst(int flag) { m_cntAsyncRst=flag; }
|
||||
|
|
@ -115,7 +115,7 @@ public:
|
|||
{ srcDomainp(sensenodep); dstDomainp(sensenodep); }
|
||||
virtual ~CdcLogicVertex() {}
|
||||
// ACCESSORS
|
||||
virtual string name() const { return (cvtToStr((void*)nodep())+"@"+scopep()->prettyName()); }
|
||||
virtual string name() const { return (cvtToHex(nodep())+"@"+scopep()->prettyName()); }
|
||||
virtual string dotColor() const { return hazard() ? "black" : "yellow"; }
|
||||
bool hazard() const { return m_hazard; }
|
||||
void setHazard(AstNode* nodep) { m_hazard = true; nodep->user3(true); }
|
||||
|
|
|
|||
|
|
@ -100,7 +100,8 @@ public:
|
|||
: GaterVertex(graphp), m_nodep(nodep) { }
|
||||
virtual ~GaterIfVertex() {}
|
||||
virtual int typeNum() const { return __LINE__; } // C++ typeof() equivelent
|
||||
virtual string name() const { return cvtToStr((void*)m_nodep)+" {"+cvtToStr(m_nodep->fileline()->lineno())+"}"; }
|
||||
virtual string name() const {
|
||||
return cvtToHex(m_nodep)+" {"+cvtToStr(m_nodep->fileline()->lineno())+"}"; }
|
||||
};
|
||||
|
||||
class GaterVarVertex : public GaterVertex {
|
||||
|
|
@ -582,9 +583,9 @@ class GaterVisitor : public GaterBaseVisitor {
|
|||
}
|
||||
void nafgMarkRecurse(V3GraphVertex* vertexp, uint32_t generation) {
|
||||
// Backwards mark user() on the path we recurse
|
||||
//UINFO(9," nafgMark: v "<<(void*)(vertexp)<<" "<<vertexp->name()<<endl);
|
||||
//UINFO(9," nafgMark: v "<<cvtToHex(vertexp)<<" "<<vertexp->name()<<endl);
|
||||
for (V3GraphEdge* edgep = vertexp->inBeginp(); edgep; edgep = edgep->inNextp()) {
|
||||
//UINFO(9," nafgMark: "<<(void*)(edgep)<<" "<<edgep->name()<<endl);
|
||||
//UINFO(9," nafgMark: "<<cvtToHex(edgep)<<" "<<edgep->name()<<endl);
|
||||
edgep->user(generation);
|
||||
nafgMarkRecurse(edgep->fromp(), generation);
|
||||
}
|
||||
|
|
@ -593,18 +594,18 @@ class GaterVisitor : public GaterBaseVisitor {
|
|||
// Forewards follow user() marked previously and build tree
|
||||
AstNode* nodep = NULL;
|
||||
// OR across all edges found at this level
|
||||
//UINFO(9," nafgEnter: v "<<(void*)(vertexp)<<" "<<vertexp->name()<<endl);
|
||||
//UINFO(9," nafgEnter: v "<<cvtToHex(vertexp)<<" "<<vertexp->name()<<endl);
|
||||
for (V3GraphEdge* edgep = vertexp->outBeginp(); edgep; edgep = edgep->outNextp()) {
|
||||
if (edgep->user() == generation) {
|
||||
GaterEdge* cedgep = static_cast<GaterEdge*>(edgep);
|
||||
AstNode* eqnp = NULL;
|
||||
//UINFO(9," nafgFollow: "<<(void*)(edgep)<<" "<<edgep->name()<<endl);
|
||||
//UINFO(9," nafgFollow: "<<cvtToHex(edgep)<<" "<<edgep->name()<<endl);
|
||||
if (dynamic_cast<GaterHeadVertex*>(edgep->fromp())) {
|
||||
// Just OR in all lower terms
|
||||
eqnp = nafgCreateRecurse(edgep->top(), generation);
|
||||
} else if (GaterIfVertex* cVxp = dynamic_cast<GaterIfVertex*>(edgep->fromp())) {
|
||||
// Edges from IFs represent a real IF branch in the equation tree
|
||||
//UINFO(9," ifver "<<(void*)(edgep)<<" cc"<<edgep->dotColor()<<endl);
|
||||
//UINFO(9," ifver "<<cvtToHex(edgep)<<" cc"<<edgep->dotColor()<<endl);
|
||||
eqnp = cVxp->nodep()->condp()->cloneTree(true);
|
||||
if (!eqnp) cVxp->nodep()->v3fatalSrc("null condition");
|
||||
if (cedgep->ifelseFalse()) {
|
||||
|
|
@ -621,7 +622,7 @@ class GaterVisitor : public GaterBaseVisitor {
|
|||
//if (debug()>=9) nodep->dumpTree(cout," followExpr: ");
|
||||
}
|
||||
}
|
||||
//UINFO(9," nafgExit: "<<(void*)(vertexp)<<" "<<vertexp->name()<<endl);
|
||||
//UINFO(9," nafgExit: "<<cvtToHex(vertexp)<<" "<<vertexp->name()<<endl);
|
||||
return nodep;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1543,7 +1543,7 @@ private:
|
|||
|| nodep->varp()->isParam())) {
|
||||
if (operandConst(valuep)) {
|
||||
const V3Number& num = VN_CAST(valuep, Const)->num();
|
||||
//UINFO(2,"constVisit "<<(void*)valuep<<" "<<num<<endl);
|
||||
//UINFO(2,"constVisit "<<cvtToHex(valuep)<<" "<<num<<endl);
|
||||
replaceNum(nodep, num); VL_DANGLING(nodep);
|
||||
did=true;
|
||||
}
|
||||
|
|
@ -1565,7 +1565,7 @@ private:
|
|||
}
|
||||
if (VN_IS(itemp, Const)) {
|
||||
const V3Number& num = VN_CAST(itemp, Const)->num();
|
||||
//UINFO(2,"constVisit "<<(void*)valuep<<" "<<num<<endl);
|
||||
//UINFO(2,"constVisit "<<cvtToHex(valuep)<<" "<<num<<endl);
|
||||
replaceNum(nodep, num); VL_DANGLING(nodep);
|
||||
did=true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1562,7 +1562,7 @@ void EmitCStmts::displayNode(AstNode* nodep, AstScopeName* scopenamep,
|
|||
string::const_iterator pos = vformat.begin();
|
||||
bool inPct = false;
|
||||
for (; pos != vformat.end(); ++pos) {
|
||||
//UINFO(1,"Parse '"<<*pos<<"' IP"<<inPct<<" List "<<(void*)(elistp)<<endl);
|
||||
//UINFO(1,"Parse '"<<*pos<<"' IP"<<inPct<<" List "<<cvtToHex(elistp)<<endl);
|
||||
if (!inPct && pos[0]=='%') {
|
||||
inPct = true;
|
||||
vfmt = "";
|
||||
|
|
|
|||
|
|
@ -256,10 +256,10 @@ class EmitVBaseVisitor : public EmitCBaseVisitor {
|
|||
puts(");\n");
|
||||
}
|
||||
virtual void visit(AstJumpGo* nodep) {
|
||||
putbs("disable "+cvtToStr((void*)(nodep->labelp()))+";\n");
|
||||
putbs("disable "+cvtToHex(nodep->labelp())+";\n");
|
||||
}
|
||||
virtual void visit(AstJumpLabel* nodep) {
|
||||
putbs("begin : "+cvtToStr((void*)(nodep))+"\n");
|
||||
putbs("begin : "+cvtToHex(nodep)+"\n");
|
||||
if (nodep->stmtsp()) iterateAndNextNull(nodep->stmtsp());
|
||||
puts("end\n");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -320,9 +320,12 @@ inline void v3errorEndFatal(std::ostringstream& sstr) { V3Error::v3errorEnd(sstr
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
template< class T> std::string cvtToStr(const T& t) {
|
||||
template <class T> std::string cvtToStr(const T& t) {
|
||||
std::ostringstream os; os<<t; return os.str();
|
||||
}
|
||||
template <class T> std::string cvtToHex(const T* tp) {
|
||||
std::ostringstream os; os<<static_cast<const void*>(tp); return os.str();
|
||||
}
|
||||
|
||||
inline uint32_t cvtToHash(const void* vp) {
|
||||
// We can shove a 64 bit pointer into a 32 bit bucket
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ public:
|
|||
virtual ~GateVarVertex() {}
|
||||
// ACCESSORS
|
||||
AstVarScope* varScp() const { return m_varScp; }
|
||||
virtual string name() const { return (cvtToStr((void*)m_varScp)+" "+varScp()->name()); }
|
||||
virtual string name() const { return (cvtToHex(m_varScp)+" "+varScp()->name()); }
|
||||
virtual string dotColor() const { return "blue"; }
|
||||
bool isTop() const { return m_isTop; }
|
||||
void setIsTop() { m_isTop = true; }
|
||||
|
|
@ -169,7 +169,7 @@ public:
|
|||
: GateEitherVertex(graphp,scopep), m_nodep(nodep), m_activep(activep), m_slow(slow) {}
|
||||
virtual ~GateLogicVertex() {}
|
||||
// ACCESSORS
|
||||
virtual string name() const { return (cvtToStr((void*)m_nodep)+"@"+scopep()->prettyName()); }
|
||||
virtual string name() const { return (cvtToHex(m_nodep)+"@"+scopep()->prettyName()); }
|
||||
virtual string dotColor() const { return "yellow"; }
|
||||
virtual FileLine* fileline() const { return nodep()->fileline(); }
|
||||
AstNode* nodep() const { return m_nodep; }
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ void V3Graph::loopsMessageCb(V3GraphVertex* vertexp) {
|
|||
|
||||
void V3Graph::loopsVertexCb(V3GraphVertex* vertexp) {
|
||||
// Needed here as V3GraphVertex<< isn't defined until later in header
|
||||
std::cerr<<"-Info-Loop: "<<(void*)(vertexp)<<" "<<vertexp<<endl;
|
||||
std::cerr<<"-Info-Loop: "<<cvtToHex(vertexp)<<" "<<vertexp<<endl;
|
||||
}
|
||||
|
||||
void V3Graph::dump(std::ostream& os) {
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ private:
|
|||
for (std::set<int>::const_iterator inIt=inputs.begin(); inIt!=inputs.end(); ++inIt) {
|
||||
DfaInput input = *inIt;
|
||||
UINFO(9," ==="<<++i<<"=======================\n");
|
||||
UINFO(9," On input "<<(void*)(input.toNodep())<<endl);
|
||||
UINFO(9," On input "<<cvtToHex(input.toNodep())<<endl);
|
||||
|
||||
// Find all states reachable for given input
|
||||
DfaStates nfasWithInput;
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ public:
|
|||
void insertDUnit(AstNetlist* nodep) {
|
||||
// $unit on top scope
|
||||
VSymEnt* symp = new VSymEnt(&m_syms, nodep);
|
||||
UINFO(9," INSERTdunit se"<<(void*)symp<<endl);
|
||||
UINFO(9," INSERTdunit se"<<cvtToHex(symp)<<endl);
|
||||
symp->parentp(rootEntp()); // Needed so backward search can find name of top module
|
||||
symp->fallbackp(NULL);
|
||||
rootEntp()->insert("$unit ",symp); // Space so can never name conflict with user code
|
||||
|
|
@ -246,7 +246,7 @@ public:
|
|||
VSymEnt* insertTopCell(AstNodeModule* nodep, const string& scopename) {
|
||||
// Only called on the module at the very top of the hierarchy
|
||||
VSymEnt* symp = new VSymEnt(&m_syms, nodep);
|
||||
UINFO(9," INSERTtop se"<<(void*)symp<<" "<<scopename<<" "<<nodep<<endl);
|
||||
UINFO(9," INSERTtop se"<<cvtToHex(symp)<<" "<<scopename<<" "<<nodep<<endl);
|
||||
symp->parentp(rootEntp()); // Needed so backward search can find name of top module
|
||||
symp->fallbackp(dunitEntp()); // Needed so can find $unit stuff
|
||||
nodep->user1p(symp);
|
||||
|
|
@ -259,8 +259,8 @@ public:
|
|||
AstCell* nodep, const string& scopename) {
|
||||
if (!abovep) nodep->v3fatalSrc("Null symbol table inserting node");
|
||||
VSymEnt* symp = new VSymEnt(&m_syms, nodep);
|
||||
UINFO(9," INSERTcel se"<<(void*)symp<<" "<<scopename<<" above=se"<<(void*)abovep
|
||||
<<" mods=se"<<(void*)modSymp<<" node="<<nodep<<endl);
|
||||
UINFO(9," INSERTcel se"<<cvtToHex(symp)<<" "<<scopename<<" above=se"<<cvtToHex(abovep)
|
||||
<<" mods=se"<<cvtToHex(modSymp)<<" node="<<nodep<<endl);
|
||||
symp->parentp(abovep);
|
||||
symp->fallbackp(dunitEntp()); // Needed so can find $unit stuff
|
||||
nodep->user1p(symp);
|
||||
|
|
@ -281,8 +281,8 @@ public:
|
|||
// This refrences to another Sym, and eventually resolves to a module with a prefix
|
||||
if (!abovep) nodep->v3fatalSrc("Null symbol table inserting node");
|
||||
VSymEnt* symp = new VSymEnt(&m_syms, nodep);
|
||||
UINFO(9," INSERTinl se"<<(void*)symp<<" "<<basename<<" above=se"<<(void*)abovep
|
||||
<<" mods=se"<<(void*)modSymp<<" node="<<nodep<<endl);
|
||||
UINFO(9," INSERTinl se"<<cvtToHex(symp)<<" "<<basename<<" above=se"<<cvtToHex(abovep)
|
||||
<<" mods=se"<<cvtToHex(modSymp)<<" node="<<nodep<<endl);
|
||||
symp->parentp(abovep);
|
||||
symp->fallbackp(modSymp);
|
||||
symp->symPrefix(nodep->name()+"__DOT__");
|
||||
|
|
@ -302,7 +302,7 @@ public:
|
|||
// However, cells walk the graph, so cells will appear under the begin/ftask itself
|
||||
if (!abovep) nodep->v3fatalSrc("Null symbol table inserting node");
|
||||
VSymEnt* symp = new VSymEnt(&m_syms, nodep);
|
||||
UINFO(9," INSERTblk se"<<(void*)symp<<" above=se"<<(void*)abovep<<" node="<<nodep<<endl);
|
||||
UINFO(9," INSERTblk se"<<cvtToHex(symp)<<" above=se"<<cvtToHex(abovep)<<" node="<<nodep<<endl);
|
||||
symp->parentp(abovep);
|
||||
symp->packagep(packagep);
|
||||
symp->fallbackp(abovep);
|
||||
|
|
@ -317,7 +317,8 @@ public:
|
|||
VSymEnt* insertSym(VSymEnt* abovep, const string& name, AstNode* nodep, AstPackage* packagep) {
|
||||
if (!abovep) nodep->v3fatalSrc("Null symbol table inserting node");
|
||||
VSymEnt* symp = new VSymEnt(&m_syms, nodep);
|
||||
UINFO(9," INSERTsym se"<<(void*)symp<<" name='"<<name<<"' above=se"<<(void*)abovep<<" node="<<nodep<<endl);
|
||||
UINFO(9," INSERTsym se"<<cvtToHex(symp)<<" name='"<<name
|
||||
<<"' above=se"<<cvtToHex(abovep)<<" node="<<nodep<<endl);
|
||||
// We don't remember the ent associated with each node, because we need a unique scope entry for each instantiation
|
||||
symp->packagep(packagep);
|
||||
symp->parentp(abovep);
|
||||
|
|
@ -381,7 +382,7 @@ public:
|
|||
for (IfaceVarSyms::iterator it = m_ifaceVarSyms.begin(); it != m_ifaceVarSyms.end(); ++it) {
|
||||
VSymEnt* varSymp = *it;
|
||||
AstVar* varp = varSymp ? VN_CAST(varSymp->nodep(), Var) : NULL;
|
||||
UINFO(9, " insAllIface se"<<(void*)varSymp<<" "<<varp<<endl);
|
||||
UINFO(9, " insAllIface se"<<cvtToHex(varSymp)<<" "<<varp<<endl);
|
||||
AstIfaceRefDType* ifacerefp = ifaceRefFromArray(varp->subDTypep());
|
||||
if (!ifacerefp) varp->v3fatalSrc("Non-ifacerefs on list!");
|
||||
if (!ifacerefp->ifaceViaCellp()) {
|
||||
|
|
@ -422,7 +423,7 @@ public:
|
|||
void insertScopeAlias(SAMNum samn, VSymEnt* lhsp, VSymEnt* rhsp) {
|
||||
// Track and later insert scope aliases; an interface referenced by a child cell connecting to that interface
|
||||
// Typically lhsp=VAR w/dtype IFACEREF, rhsp=IFACE cell
|
||||
UINFO(9," insertScopeAlias se"<<(void*)lhsp<<" se"<<(void*)rhsp<<endl);
|
||||
UINFO(9," insertScopeAlias se"<<cvtToHex(lhsp)<<" se"<<cvtToHex(rhsp)<<endl);
|
||||
if (VN_IS(rhsp->nodep(), Cell)
|
||||
&& !VN_IS(VN_CAST(rhsp->nodep(), Cell)->modp(), Iface)) {
|
||||
rhsp->nodep()->v3fatalSrc("Got a non-IFACE alias RHS");
|
||||
|
|
@ -468,7 +469,7 @@ public:
|
|||
string& baddot, VSymEnt*& okSymp) {
|
||||
// Given a dotted hierarchy name, return where in scope it is
|
||||
// Note when dotname=="" we just fall through and return lookupSymp
|
||||
UINFO(8," dottedFind se"<<(void*)lookupSymp<<" '"<<dotname<<"'"<<endl);
|
||||
UINFO(8," dottedFind se"<<cvtToHex(lookupSymp)<<" '"<<dotname<<"'"<<endl);
|
||||
bool firstId = true;
|
||||
string leftname = dotname;
|
||||
okSymp = lookupSymp; // So can list bad scopes
|
||||
|
|
@ -562,7 +563,7 @@ public:
|
|||
// For simplicity lookupSymp may be passed NULL result from findDotted
|
||||
if (!lookupSymp) return NULL;
|
||||
UINFO(8,"\t\tfindSymPrefixed "<<dotname
|
||||
<<" under se"<<(void*)lookupSymp
|
||||
<<" under se"<<cvtToHex(lookupSymp)
|
||||
<<((lookupSymp->symPrefix()=="") ? "" : " as ")
|
||||
<<((lookupSymp->symPrefix()=="") ? "" : lookupSymp->symPrefix()+dotname)
|
||||
<<" at se"<<lookupSymp
|
||||
|
|
@ -902,7 +903,8 @@ class LinkDotFindVisitor : public AstNVisitor {
|
|||
<<LinkDotState::nodeTextType(foundp->nodep())<<": "<<nodep->prettyName());
|
||||
} else if (findvarp != nodep) {
|
||||
UINFO(4,"DupVar: "<<nodep<<" ;; "<<foundp->nodep()<<endl);
|
||||
UINFO(4," found cur=se"<<(void*)m_curSymp<<" ;; parent=se"<<(void*)foundp->parentp()<<endl);
|
||||
UINFO(4," found cur=se"<<cvtToHex(m_curSymp)
|
||||
<<" ;; parent=se"<<cvtToHex(foundp->parentp())<<endl);
|
||||
if (foundp && foundp->parentp() == m_curSymp // Only when on same level
|
||||
&& !foundp->imported()) { // and not from package
|
||||
if ((findvarp->isIO() && nodep->isSignal())
|
||||
|
|
@ -1259,12 +1261,12 @@ class LinkDotScopeVisitor : public AstNVisitor {
|
|||
string baddot; VSymEnt* okSymp;
|
||||
VSymEnt* cellSymp = m_statep->findDotted(m_modSymp, ifcellname, baddot, okSymp);
|
||||
if (!cellSymp) nodep->v3fatalSrc("No symbol for interface cell: " <<nodep->prettyName(ifcellname));
|
||||
UINFO(5, " Found interface cell: se"<<(void*)cellSymp<<" "<<cellSymp->nodep()<<endl);
|
||||
UINFO(5, " Found interface cell: se"<<cvtToHex(cellSymp)<<" "<<cellSymp->nodep()<<endl);
|
||||
if (dtypep->modportName()!="") {
|
||||
VSymEnt* mpSymp = m_statep->findDotted(m_modSymp, ifcellname, baddot, okSymp);
|
||||
if (!mpSymp) { nodep->v3fatalSrc("No symbol for interface modport: " <<nodep->prettyName(dtypep->modportName())); }
|
||||
else cellSymp = mpSymp;
|
||||
UINFO(5, " Found modport cell: se"<<(void*)cellSymp<<" "<<mpSymp->nodep()<<endl);
|
||||
UINFO(5, " Found modport cell: se"<<cvtToHex(cellSymp)<<" "<<mpSymp->nodep()<<endl);
|
||||
}
|
||||
// Interface reference; need to put whole thing into symtable, but can't clone it now
|
||||
// as we may have a later alias for it.
|
||||
|
|
@ -1308,7 +1310,7 @@ class LinkDotScopeVisitor : public AstNVisitor {
|
|||
}
|
||||
if (!symp) UINFO(9,"No symbol for interface alias rhs ("<<string(refp?"VARREF ":"VARXREF ")<<scopename<<")"<<endl);
|
||||
if (!symp) nodep->v3fatalSrc("No symbol for interface alias rhs");
|
||||
UINFO(5, " Found a linked scope RHS: "<<scopename<<" se"<<(void*)symp<<" "<<symp->nodep()<<endl);
|
||||
UINFO(5, " Found a linked scope RHS: "<<scopename<<" se"<<cvtToHex(symp)<<" "<<symp->nodep()<<endl);
|
||||
rhsSymp = symp;
|
||||
}
|
||||
VSymEnt* lhsSymp;
|
||||
|
|
@ -1321,7 +1323,7 @@ class LinkDotScopeVisitor : public AstNVisitor {
|
|||
string baddot; VSymEnt* okSymp;
|
||||
VSymEnt* symp = m_statep->findDotted(m_modSymp, scopename, baddot, okSymp);
|
||||
if (!symp) nodep->v3fatalSrc("No symbol for interface alias lhs");
|
||||
UINFO(5, " Found a linked scope LHS: "<<scopename<<" se"<<(void*)symp<<" "<<symp->nodep()<<endl);
|
||||
UINFO(5, " Found a linked scope LHS: "<<scopename<<" se"<<cvtToHex(symp)<<" "<<symp->nodep()<<endl);
|
||||
lhsSymp = symp;
|
||||
}
|
||||
// Remember the alias - can't do it yet because we may have additional symbols to be added,
|
||||
|
|
@ -1497,7 +1499,7 @@ private:
|
|||
static const char* const names[] = { "NONE","PACKAGE","SCOPE","FINAL","MEMBER" };
|
||||
std::ostringstream sstr;
|
||||
sstr<<"ds="<<names[m_dotPos];
|
||||
sstr<<" dse"<<(void*)m_dotSymp;
|
||||
sstr<<" dse"<<cvtToHex(m_dotSymp);
|
||||
sstr<<" txt="<<m_dotText;
|
||||
sstr<<" unr="<<m_unresolved;
|
||||
return sstr.str();
|
||||
|
|
@ -1794,7 +1796,7 @@ private:
|
|||
} else {
|
||||
foundp = m_ds.m_dotSymp->findIdFallback(nodep->name());
|
||||
}
|
||||
if (foundp) UINFO(9," found=se"<<(void*)foundp<<" exp="<<expectWhat
|
||||
if (foundp) UINFO(9," found=se"<<cvtToHex(foundp)<<" exp="<<expectWhat
|
||||
<<" n="<<foundp->nodep()<<endl);
|
||||
// What fell out?
|
||||
bool ok = false;
|
||||
|
|
@ -1920,7 +1922,7 @@ private:
|
|||
<<"'"<<" as a "<<foundp->nodep()->typeName()
|
||||
<<" but expected a "<<expectWhat);
|
||||
} else if (m_ds.m_dotText=="") {
|
||||
UINFO(7," ErrParseRef curSymp=se"<<(void*)m_curSymp<<" ds="<<m_ds.ascii()<<endl);
|
||||
UINFO(7," ErrParseRef curSymp=se"<<cvtToHex(m_curSymp)<<" ds="<<m_ds.ascii()<<endl);
|
||||
nodep->v3error("Can't find definition of "<<expectWhat
|
||||
<<": "<<nodep->prettyName());
|
||||
} else {
|
||||
|
|
@ -1950,7 +1952,7 @@ private:
|
|||
// No checkNoDot; created and iterated from a parseRef
|
||||
iterateChildren(nodep);
|
||||
if (!nodep->varp()) {
|
||||
UINFO(9," linkVarRef se"<<(void*)m_curSymp<<" n="<<nodep<<endl);
|
||||
UINFO(9," linkVarRef se"<<cvtToHex(m_curSymp)<<" n="<<nodep<<endl);
|
||||
if (!m_curSymp) nodep->v3fatalSrc("NULL lookup symbol table");
|
||||
VSymEnt* foundp = m_curSymp->findIdFallback(nodep->name());
|
||||
if (AstVar* varp = foundp ? foundToVarp(foundp, nodep, nodep->lvalue()) : NULL) {
|
||||
|
|
@ -2116,7 +2118,8 @@ private:
|
|||
UINFO(7," Resolved "<<nodep<<endl); // Also prints taskp
|
||||
} else {
|
||||
// Note ParseRef has similar error handling/message output
|
||||
UINFO(7," ErrFtask curSymp=se"<<(void*)m_curSymp<<" dotSymp=se"<<(void*)dotSymp<<endl);
|
||||
UINFO(7," ErrFtask curSymp=se"<<cvtToHex(m_curSymp)
|
||||
<<" dotSymp=se"<<cvtToHex(dotSymp)<<endl);
|
||||
if (foundp) {
|
||||
nodep->v3error("Found definition of '"<<m_ds.m_dotText<<(m_ds.m_dotText==""?"":".")<<nodep->prettyName()
|
||||
<<"'"<<" as a "<<foundp->nodep()->typeName()
|
||||
|
|
@ -2190,11 +2193,11 @@ private:
|
|||
VSymEnt* oldCurSymp = m_curSymp;
|
||||
{
|
||||
m_ds.m_dotSymp = m_curSymp = m_statep->getNodeSym(nodep);
|
||||
UINFO(5," cur=se"<<(void*)m_curSymp<<endl);
|
||||
UINFO(5," cur=se"<<cvtToHex(m_curSymp)<<endl);
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
m_ds.m_dotSymp = m_curSymp = oldCurSymp;
|
||||
UINFO(5," cur=se"<<(void*)m_curSymp<<endl);
|
||||
UINFO(5," cur=se"<<cvtToHex(m_curSymp)<<endl);
|
||||
}
|
||||
virtual void visit(AstNodeFTask* nodep) {
|
||||
UINFO(5," "<<nodep<<endl);
|
||||
|
|
|
|||
|
|
@ -170,8 +170,8 @@ public:
|
|||
}
|
||||
string name() const {
|
||||
return (string("MDS:")
|
||||
+" d="+cvtToStr((void*)domainp())
|
||||
+" s="+cvtToStr((void*)scopep()));
|
||||
+" d="+cvtToHex(domainp())
|
||||
+" s="+cvtToHex(scopep()));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -1510,7 +1510,8 @@ void OrderVisitor::processDomainsIterate(OrderEitherVertex* vertexp) {
|
|||
if (edgep->weight()
|
||||
&& fromVertexp->domainMatters()
|
||||
) {
|
||||
UINFO(9," from d="<<(void*)fromVertexp->domainp()<<" "<<fromVertexp<<endl);
|
||||
UINFO(9," from d="<<cvtToHex(fromVertexp->domainp())
|
||||
<<" "<<fromVertexp<<endl);
|
||||
if (!domainp // First input to this vertex
|
||||
|| domainp->hasSettle() // or, we can ignore being in the settle domain
|
||||
|| domainp->hasInitial()) {
|
||||
|
|
@ -1568,7 +1569,7 @@ void OrderVisitor::processDomainsIterate(OrderEitherVertex* vertexp) {
|
|||
//
|
||||
vertexp->domainp(domainp);
|
||||
if (vertexp->domainp()) {
|
||||
UINFO(5," done d="<<(void*)vertexp->domainp()
|
||||
UINFO(5," done d="<<cvtToHex(vertexp->domainp())
|
||||
<<(vertexp->domainp()->hasCombo()?" [COMB]":"")
|
||||
<<(vertexp->domainp()->isMulti()?" [MULT]":"")
|
||||
<<" "<<vertexp<<endl);
|
||||
|
|
@ -1596,7 +1597,7 @@ void OrderVisitor::processEdgeReport() {
|
|||
else if (dynamic_cast<OrderVarSettleVertex*>(itp)) name += " {STL}";
|
||||
std::ostringstream os;
|
||||
os.setf(std::ios::left);
|
||||
os<<" "<<(void*)(vvertexp->varScp())<<" "<<std::setw(50)<<name<<" ";
|
||||
os<<" "<<cvtToHex(vvertexp->varScp())<<" "<<std::setw(50)<<name<<" ";
|
||||
AstSenTree* sentreep = vvertexp->domainp();
|
||||
if (sentreep) V3EmitV::verilogForTree(sentreep, os);
|
||||
report.push_back(os.str());
|
||||
|
|
@ -1739,8 +1740,8 @@ void OrderVisitor::processMoveOne(OrderMoveVertex* vertexp, OrderMoveDomScope* d
|
|||
}
|
||||
const OrderLogicVertex* lvertexp = vertexp->logicp();
|
||||
const AstScope* scopep = lvertexp->scopep();
|
||||
UINFO(5," POSmove l"<<std::setw(3)<<level<<" d="<<(void*)(lvertexp->domainp())
|
||||
<<" s="<<(void*)(scopep)<<" "<<lvertexp<<endl);
|
||||
UINFO(5," POSmove l"<<std::setw(3)<<level<<" d="<<cvtToHex(lvertexp->domainp())
|
||||
<<" s="<<cvtToHex(scopep)<<" "<<lvertexp<<endl);
|
||||
AstActive* newActivep = processMoveOneLogic(lvertexp, m_pomNewFuncp/*ref*/,
|
||||
m_pomNewStmts/*ref*/);
|
||||
if (newActivep) m_scopetopp->addActivep(newActivep);
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ public:
|
|||
// Methods
|
||||
virtual OrderVEdgeType type() const = 0;
|
||||
virtual bool domainMatters() = 0; // Must be in same domain when cross edge to this vertex
|
||||
virtual string dotName() const { return cvtToStr((void*)m_scopep)+"_"; }
|
||||
virtual string dotName() const { return cvtToHex(m_scopep)+"_"; }
|
||||
// ACCESSORS
|
||||
void domainp(AstSenTree* domainp) { m_domainp = domainp; }
|
||||
AstScope* scopep() const { return m_scopep; }
|
||||
|
|
@ -205,7 +205,7 @@ public:
|
|||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_LOGIC; }
|
||||
virtual bool domainMatters() { return true; }
|
||||
// ACCESSORS
|
||||
virtual string name() const { return (cvtToStr((void*)m_nodep)+"\\n "+cvtToStr(nodep()->typeName())); }
|
||||
virtual string name() const { return (cvtToHex(m_nodep)+"\\n "+cvtToStr(nodep()->typeName())); }
|
||||
AstNode* nodep() const { return m_nodep; }
|
||||
virtual string dotColor() const { return "yellow"; }
|
||||
};
|
||||
|
|
@ -245,7 +245,7 @@ public:
|
|||
virtual OrderVarStdVertex* clone(V3Graph* graphp) const {
|
||||
return new OrderVarStdVertex(graphp, *this); }
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_VARSTD; }
|
||||
virtual string name() const { return (cvtToStr((void*)varScp())+"\\n "+varScp()->name());}
|
||||
virtual string name() const { return (cvtToHex(varScp())+"\\n "+varScp()->name());}
|
||||
virtual string dotColor() const { return "skyblue"; }
|
||||
virtual bool domainMatters() { return true; }
|
||||
};
|
||||
|
|
@ -259,7 +259,7 @@ public:
|
|||
virtual OrderVarPreVertex* clone(V3Graph* graphp) const {
|
||||
return new OrderVarPreVertex(graphp, *this); }
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_VARPRE; }
|
||||
virtual string name() const { return (cvtToStr((void*)varScp())+" PRE\\n "+varScp()->name());}
|
||||
virtual string name() const { return (cvtToHex(varScp())+" PRE\\n "+varScp()->name());}
|
||||
virtual string dotColor() const { return "lightblue"; }
|
||||
virtual bool domainMatters() { return false; }
|
||||
};
|
||||
|
|
@ -273,7 +273,7 @@ public:
|
|||
return new OrderVarPostVertex(graphp, *this); }
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_VARPOST; }
|
||||
virtual ~OrderVarPostVertex() {}
|
||||
virtual string name() const { return (cvtToStr((void*)varScp())+" POST\\n "+varScp()->name());}
|
||||
virtual string name() const { return (cvtToHex(varScp())+" POST\\n "+varScp()->name());}
|
||||
virtual string dotColor() const { return "CadetBlue"; }
|
||||
virtual bool domainMatters() { return false; }
|
||||
};
|
||||
|
|
@ -287,7 +287,7 @@ public:
|
|||
virtual OrderVarPordVertex* clone(V3Graph* graphp) const {
|
||||
return new OrderVarPordVertex(graphp, *this); }
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_VARPORD; }
|
||||
virtual string name() const { return (cvtToStr((void*)varScp())+" PORD\\n "+varScp()->name());}
|
||||
virtual string name() const { return (cvtToHex(varScp())+" PORD\\n "+varScp()->name());}
|
||||
virtual string dotColor() const { return "NavyBlue"; }
|
||||
virtual bool domainMatters() { return false; }
|
||||
};
|
||||
|
|
@ -301,7 +301,7 @@ public:
|
|||
virtual OrderVarSettleVertex* clone(V3Graph* graphp) const {
|
||||
return new OrderVarSettleVertex(graphp, *this); }
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_VARSETTLE; }
|
||||
virtual string name() const { return (cvtToStr((void*)varScp())+" STL\\n "+varScp()->name());}
|
||||
virtual string name() const { return (cvtToHex(varScp())+" STL\\n "+varScp()->name());}
|
||||
virtual string dotColor() const { return "PowderBlue"; }
|
||||
virtual bool domainMatters() { return false; }
|
||||
};
|
||||
|
|
@ -345,8 +345,8 @@ public:
|
|||
if (logicp()) {
|
||||
nm = logicp()->name();
|
||||
nm += (string("\\nMV:")
|
||||
+" d="+cvtToStr((void*)logicp()->domainp())
|
||||
+" s="+cvtToStr((void*)logicp()->scopep()));
|
||||
+" d="+cvtToHex(logicp()->domainp())
|
||||
+" s="+cvtToHex(logicp()->scopep()));
|
||||
} else {
|
||||
nm = "nul";
|
||||
}
|
||||
|
|
@ -402,8 +402,8 @@ public:
|
|||
if (logicp()) {
|
||||
nm = logicp()->name();
|
||||
nm += (string("\\nMV:")
|
||||
+" d="+cvtToStr((void*)logicp()->domainp())
|
||||
+" s="+cvtToStr((void*)logicp()->scopep())
|
||||
+" d="+cvtToHex(logicp()->domainp())
|
||||
+" s="+cvtToHex(logicp()->scopep())
|
||||
// "color()" represents the mtask ID.
|
||||
+"\\nt="+cvtToStr(color()));
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ public:
|
|||
}
|
||||
string name() const { return string("mt")+cvtToStr(id()); }
|
||||
void dump(std::ostream& str) const {
|
||||
str <<name()<<"."<<((void*)this);
|
||||
str <<name()<<"."<<cvtToHex(this);
|
||||
if (priority() || cost()) str <<" [pr="<<priority()<<" c="<<cvtToStr(cost())<<"]";
|
||||
if (thread() != 0xffffffff) str <<" th="<<thread();
|
||||
if (threadRoot()) str <<" [ROOT]";
|
||||
|
|
|
|||
|
|
@ -502,7 +502,7 @@ void V3PreLex::lineDirective(const char* textp) {
|
|||
}
|
||||
|
||||
void V3PreLex::dumpSummary() {
|
||||
cout<<"- pp::dumpSummary curBuf="<<(void*)(currentBuffer());
|
||||
cout<<"- pp::dumpSummary curBuf="<<cvtToHex(currentBuffer());
|
||||
#ifdef FLEX_DEBUG // Else peeking at internals may cause portability issues
|
||||
ssize_t left = (yy_n_chars
|
||||
- (yy_c_buf_p
|
||||
|
|
@ -518,7 +518,7 @@ void V3PreLex::dumpStack() {
|
|||
std::stack<VPreStream*> tmpstack = LEXP->m_streampStack;
|
||||
while (!tmpstack.empty()) {
|
||||
VPreStream* streamp = tmpstack.top();
|
||||
cout<<"- bufferStack["<<(void*)(streamp)<<"]: "
|
||||
cout<<"- bufferStack["<<cvtToHex(streamp)<<"]: "
|
||||
<<" at="<<streamp->m_curFilelinep
|
||||
<<" nBuf="<<streamp->m_buffers.size()
|
||||
<<" size0="<<(streamp->m_buffers.empty() ? 0 : streamp->m_buffers.front().length())
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ protected:
|
|||
// reordering a lower block, but we don't repair it
|
||||
virtual string name() const {
|
||||
if (m_nodep->name() == "") {
|
||||
return cvtToStr((void*)m_nodep);
|
||||
return cvtToHex(m_nodep);
|
||||
} else {
|
||||
return m_nodep->name();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,8 +68,8 @@ public:
|
|||
void dumpIterate(std::ostream& os, VSymConstMap& doneSymsr, const string& indent,
|
||||
int numLevels, const string& searchName) const {
|
||||
os<<indent<<"+ "<<std::left<<std::setw(30)<<(searchName==""?"\"\"":searchName)<<std::setw(0)<<std::right;
|
||||
os<<" se"<<(void*)(this)<<std::setw(0);
|
||||
os<<" fallb=se"<<(void*)(m_fallbackp);
|
||||
os<<" se"<<cvtToHex(this)<<std::setw(0);
|
||||
os<<" fallb=se"<<cvtToHex(m_fallbackp);
|
||||
if (m_symPrefix!="") os<<" symPrefix="<<m_symPrefix;
|
||||
os<<" n="<<nodep();
|
||||
os<<endl;
|
||||
|
|
@ -117,7 +117,8 @@ public:
|
|||
bool imported() const { return m_imported; }
|
||||
void imported(bool flag) { m_imported = flag; }
|
||||
void insert(const string& name, VSymEnt* entp) {
|
||||
UINFO(9, " SymInsert se"<<(void*)this<<" '"<<name<<"' se"<<(void*)entp<<" "<<entp->nodep()<<endl);
|
||||
UINFO(9, " SymInsert se"<<cvtToHex(this)
|
||||
<<" '"<<name<<"' se"<<cvtToHex(entp)<<" "<<entp->nodep()<<endl);
|
||||
if (name != "" && m_idNameMap.find(name) != m_idNameMap.end()) {
|
||||
if (!V3Error::errorCount()) { // Else may have just reported warning
|
||||
if (debug()>=9 || V3Error::debugDefault()) dump(cout,"- err-dump: ", 1);
|
||||
|
|
@ -130,7 +131,8 @@ public:
|
|||
void reinsert(const string& name, VSymEnt* entp) {
|
||||
IdNameMap::iterator it = m_idNameMap.find(name);
|
||||
if (name!="" && it != m_idNameMap.end()) {
|
||||
UINFO(9, " SymReinsert se"<<(void*)this<<" '"<<name<<"' se"<<(void*)entp<<" "<<entp->nodep()<<endl);
|
||||
UINFO(9, " SymReinsert se"<<cvtToHex(this)
|
||||
<<" '"<<name<<"' se"<<cvtToHex(entp)<<" "<<entp->nodep()<<endl);
|
||||
it->second = entp; // Replace
|
||||
} else {
|
||||
insert(name,entp);
|
||||
|
|
@ -140,9 +142,9 @@ public:
|
|||
// Find identifier without looking upward through symbol hierarchy
|
||||
// First, scan this begin/end block or module for the name
|
||||
IdNameMap::const_iterator it = m_idNameMap.find(name);
|
||||
UINFO(9, " SymFind se"<<(void*)this<<" '"<<name
|
||||
UINFO(9, " SymFind se"<<cvtToHex(this)<<" '"<<name
|
||||
<<"' -> "<<(it == m_idNameMap.end() ? "NONE"
|
||||
: "se"+cvtToStr((void*)(it->second))+" n="+cvtToStr((void*)(it->second->nodep())))<<endl);
|
||||
: "se"+cvtToHex(it->second)+" n="+cvtToHex(it->second->nodep()))<<endl);
|
||||
if (it != m_idNameMap.end()) return (it->second);
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -207,7 +209,7 @@ public:
|
|||
}
|
||||
void importFromIface(VSymGraph* graphp, const VSymEnt* srcp, bool onlyUnmodportable = false) {
|
||||
// Import interface tokens from source symbol table into this symbol table, recursively
|
||||
UINFO(9, " importIf se"<<(void*)this<<" from se"<<(void*)srcp<<endl);
|
||||
UINFO(9, " importIf se"<<cvtToHex(this)<<" from se"<<cvtToHex(srcp)<<endl);
|
||||
for (IdNameMap::const_iterator it=srcp->m_idNameMap.begin(); it!=srcp->m_idNameMap.end(); ++it) {
|
||||
const string& name = it->first;
|
||||
VSymEnt* subSrcp = it->second;
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ private:
|
|||
virtual void visit(AstVarRef* nodep) {
|
||||
// Similar code in V3Inline
|
||||
if (nodep->varp()->user2p()) { // It's being converted to a alias.
|
||||
UINFO(9, " relinkVar "<<(void*)nodep->varp()->user2p()<<" "<<nodep<<endl);
|
||||
UINFO(9, " relinkVar "<<cvtToHex(nodep->varp()->user2p())<<" "<<nodep<<endl);
|
||||
AstVarScope* newvscp = VN_CAST(nodep->varp()->user2p(), VarScope);
|
||||
if (!newvscp) nodep->v3fatalSrc("not linked");
|
||||
nodep->varScopep(newvscp);
|
||||
|
|
@ -1396,7 +1396,9 @@ V3TaskConnects V3Task::taskConnects(AstNodeFTaskRef* nodep, AstNode* taskStmtsp)
|
|||
|
||||
if (debug()>=9) {
|
||||
nodep->dumpTree(cout,"-ftref-out: ");
|
||||
for (int i=0; i<tpinnum; ++i) UINFO(0," pin "<<i<<" conn="<<(void*)tconnects[i].second<<endl);
|
||||
for (int i=0; i<tpinnum; ++i) {
|
||||
UINFO(0," pin "<<i<<" conn="<<cvtToHex(tconnects[i].second)<<endl);
|
||||
}
|
||||
}
|
||||
return tconnects;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -536,7 +536,7 @@ private:
|
|||
TraceTraceVertex* dupvertexp = vvertexp;
|
||||
if (dupvertexp->duplicatep()) {
|
||||
dupvertexp = dupvertexp->duplicatep();
|
||||
UINFO(9," dupOf "<<((void*)dupvertexp)<<" "<<((void*)dupvertexp->nodep())
|
||||
UINFO(9," dupOf "<<cvtToHex(dupvertexp)<<" "<<cvtToHex(dupvertexp->nodep())
|
||||
<<" "<<dupvertexp<<endl);
|
||||
if (dupvertexp->duplicatep()) dupvertexp->nodep()->v3fatalSrc("Original node was marked as a duplicate");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,8 +99,8 @@ public:
|
|||
AstVar* varp() const { return VN_CAST(nodep(), Var); }
|
||||
virtual string name() const {
|
||||
return ((isTristate() ? "tri\\n"
|
||||
:feedsTri() ? "feed\\n" : "-\\n")
|
||||
+(nodep()->prettyTypeName()+" "+cvtToStr((void*)nodep()))); }
|
||||
: feedsTri() ? "feed\\n" : "-\\n")
|
||||
+(nodep()->prettyTypeName()+" "+cvtToHex(nodep()))); }
|
||||
virtual string dotColor() const {
|
||||
return (varp()
|
||||
? (isTristate() ? "darkblue"
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ private:
|
|||
UndrivenVarEntry* getEntryp(AstVar* nodep, int which_user) {
|
||||
if (!(which_user==1 ? nodep->user1p() : nodep->user2p())) {
|
||||
UndrivenVarEntry* entryp = new UndrivenVarEntry(nodep);
|
||||
//UINFO(9," Associate u="<<which_user<<" "<<(void*)this<<" "<<nodep->name()<<endl);
|
||||
//UINFO(9," Associate u="<<which_user<<" "<<cvtToHex(this)<<" "<<nodep->name()<<endl);
|
||||
m_entryps[which_user].push_back(entryp);
|
||||
if (which_user==1) nodep->user1p(entryp);
|
||||
else if (which_user==2) nodep->user2p(entryp);
|
||||
|
|
@ -303,7 +303,7 @@ private:
|
|||
if (m_inBBox || varrefp->lvalue()) {
|
||||
// Don't warn if already driven earlier as "a=0; if(a) a=1;" is fine.
|
||||
if (usr==2 && m_alwaysp && entryp->isUsedNotDrivenBit(lsb, nodep->width())) {
|
||||
UINFO(9," Select. Entryp="<<(void*)entryp<<endl);
|
||||
UINFO(9," Select. Entryp="<<cvtToHex(entryp)<<endl);
|
||||
warnAlwCombOrder(varrefp);
|
||||
}
|
||||
entryp->drivenBit(lsb, nodep->width());
|
||||
|
|
@ -322,7 +322,7 @@ private:
|
|||
bool fdrv = nodep->lvalue() && nodep->varp()->attrFileDescr(); // FD's are also being read from
|
||||
if (m_inBBox || nodep->lvalue()) {
|
||||
if (usr==2 && m_alwaysp && entryp->isUsedNotDrivenAny()) {
|
||||
UINFO(9," Full bus. Entryp="<<(void*)entryp<<endl);
|
||||
UINFO(9," Full bus. Entryp="<<cvtToHex(entryp)<<endl);
|
||||
warnAlwCombOrder(nodep);
|
||||
}
|
||||
entryp->drivenWhole();
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ public:
|
|||
if (!m_dtypep) {
|
||||
str<<" VUP(s="<<m_stage<<",self)";
|
||||
} else {
|
||||
str<<" VUP(s="<<m_stage<<",dt="<<(void*)dtypep()<<")";
|
||||
str<<" VUP(s="<<m_stage<<",dt="<<cvtToHex(dtypep())<<")";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -3657,7 +3657,8 @@ private:
|
|||
break;
|
||||
}
|
||||
if (!valp) valp = new AstConst(nodep->fileline(), AstConst::Signed32(), val);
|
||||
UINFO(9," $dimension "<<attrType.ascii()<<"("<<((void*)dtypep)<<","<<dim<<")="<<valp<<endl);
|
||||
UINFO(9," $dimension "<<attrType.ascii()
|
||||
<<"("<<cvtToHex(dtypep)<<","<<dim<<")="<<valp<<endl);
|
||||
return valp;
|
||||
}
|
||||
AstVar* dimensionVarp(AstNodeDType* nodep, AstAttrType attrType, uint32_t msbdim) {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ private:
|
|||
vluint64_t oldsize = m_dataSize;
|
||||
if (m_dataSize<point) m_dataSize=(point+64) & ~63ULL; // Keep power of two
|
||||
m_dataSize *= 2;
|
||||
//UINFO(9, "Realloc "<<allocSize()<<" for "<<point<<" "<<(void*)(m_datap)<<endl);
|
||||
//UINFO(9, "Realloc "<<allocSize()<<" for "<<point<<" "<<cvtToHex(m_datap)<<endl);
|
||||
vluint64_t* newp = (vluint64_t*)realloc(m_datap, allocSize());
|
||||
if (!newp) { free(m_datap); v3fatal("Out of memory increasing buckets"); }
|
||||
m_datap = newp;
|
||||
|
|
|
|||
|
|
@ -575,7 +575,8 @@ sub tree_match {
|
|||
$self->print(" bool $typefunc->{match_func}(Ast${base}* nodep) {\n",
|
||||
"\t// $typefunc->{comment}\n",);
|
||||
$self->print( "\tif ($typefunc->{match_if}) {\n");
|
||||
$self->print( "\t UINFO($typefunc->{uinfo_level},(void*)(nodep)<<\" $typefunc->{uinfo}\\n\");\n");
|
||||
$self->print( "\t UINFO($typefunc->{uinfo_level},cvtToHex(nodep)"
|
||||
."<<\" $typefunc->{uinfo}\\n\");\n");
|
||||
$self->print( "\t $typefunc->{exec_func}\n");
|
||||
$self->print( "\t return true;\n");
|
||||
$self->print( "\t}\n");
|
||||
|
|
|
|||
Loading…
Reference in New Issue