diff --git a/src/V3Ast.h b/src/V3Ast.h index 3f73c762a..8f0aee3a7 100644 --- a/src/V3Ast.h +++ b/src/V3Ast.h @@ -1551,6 +1551,9 @@ public: MemberNameMap::const_iterator it = m_members.find(name); return (it==m_members.end()) ? NULL : it->second; } + int lsb() const { return 0; } + int msb() const { return dtypep()->width()-1; } // Packed classes look like arrays + int msbMaxSelect() const { return msb(); } }; struct AstNodeArrayDType : public AstNodeDType { @@ -1563,6 +1566,8 @@ private: public: AstNodeArrayDType(FileLine* fl) : AstNodeDType(fl) {} ASTNODE_BASE_FUNCS(NodeArrayDType) + virtual void dump(ostream& str); + virtual void dumpSmall(ostream& str); virtual bool broken() const { return !((m_refDTypep && !childDTypep() && m_refDTypep->brokeExists()) || (!m_refDTypep && childDTypep())); } virtual void cloneRelink() { if (m_refDTypep && m_refDTypep->clonep()) { diff --git a/src/V3AstNodes.cpp b/src/V3AstNodes.cpp index 145efe847..9ce88ef74 100644 --- a/src/V3AstNodes.cpp +++ b/src/V3AstNodes.cpp @@ -748,6 +748,14 @@ void AstNodeDType::dumpSmall(ostream& str) { if (!widthSized()) str<<"/"<AstNodeDType::dumpSmall(str); + str<<"["<AstNodeDType::dump(str); + str<<" ["<AstNode::dump(str); str<<" L"<