Internals: Rename NodeClassDType. No functional change.
This commit is contained in:
parent
f514049c04
commit
53c6b7df63
|
|
@ -1949,7 +1949,8 @@ public:
|
||||||
const char* charIQWN() const { return (isString() ? "N" : isWide() ? "W" : isQuad() ? "Q" : "I"); }
|
const char* charIQWN() const { return (isString() ? "N" : isWide() ? "W" : isQuad() ? "Q" : "I"); }
|
||||||
};
|
};
|
||||||
|
|
||||||
class AstNodeClassDType : public AstNodeDType {
|
class AstNodeUOrStructDType : public AstNodeDType {
|
||||||
|
// A struct or union; common handling
|
||||||
private:
|
private:
|
||||||
// TYPES
|
// TYPES
|
||||||
typedef std::map<string,AstMemberDType*> MemberNameMap;
|
typedef std::map<string,AstMemberDType*> MemberNameMap;
|
||||||
|
|
@ -1959,14 +1960,14 @@ private:
|
||||||
bool m_isFourstate;
|
bool m_isFourstate;
|
||||||
MemberNameMap m_members;
|
MemberNameMap m_members;
|
||||||
public:
|
public:
|
||||||
AstNodeClassDType(FileLine* fl, AstNumeric numericUnpack)
|
AstNodeUOrStructDType(FileLine* fl, AstNumeric numericUnpack)
|
||||||
: AstNodeDType(fl) {
|
: AstNodeDType(fl) {
|
||||||
// AstNumeric::NOSIGN overloaded to indicate not packed
|
// AstNumeric::NOSIGN overloaded to indicate not packed
|
||||||
m_packed = (numericUnpack != AstNumeric::NOSIGN);
|
m_packed = (numericUnpack != AstNumeric::NOSIGN);
|
||||||
m_isFourstate = false; // V3Width computes
|
m_isFourstate = false; // V3Width computes
|
||||||
numeric(AstNumeric::fromBool(numericUnpack.isSigned()));
|
numeric(AstNumeric::fromBool(numericUnpack.isSigned()));
|
||||||
}
|
}
|
||||||
ASTNODE_BASE_FUNCS(NodeClassDType)
|
ASTNODE_BASE_FUNCS(NodeUOrStructDType)
|
||||||
virtual const char* broken() const;
|
virtual const char* broken() const;
|
||||||
virtual void dump(std::ostream& str) const;
|
virtual void dump(std::ostream& str) const;
|
||||||
// For basicp() we reuse the size to indicate a "fake" basic type of same size
|
// For basicp() we reuse the size to indicate a "fake" basic type of same size
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ int AstNodeSel::bitConst() const {
|
||||||
return (constp ? constp->toSInt() : 0);
|
return (constp ? constp->toSInt() : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AstNodeClassDType::repairMemberCache() {
|
void AstNodeUOrStructDType::repairMemberCache() {
|
||||||
clearCache();
|
clearCache();
|
||||||
for (AstMemberDType* itemp = membersp(); itemp; itemp=VN_CAST(itemp->nextp(), MemberDType)) {
|
for (AstMemberDType* itemp = membersp(); itemp; itemp=VN_CAST(itemp->nextp(), MemberDType)) {
|
||||||
if (m_members.find(itemp->name())!=m_members.end()) {
|
if (m_members.find(itemp->name())!=m_members.end()) {
|
||||||
|
|
@ -74,7 +74,7 @@ void AstNodeClassDType::repairMemberCache() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* AstNodeClassDType::broken() const {
|
const char* AstNodeUOrStructDType::broken() const {
|
||||||
vl_unordered_set<AstMemberDType*> exists;
|
vl_unordered_set<AstMemberDType*> exists;
|
||||||
for (AstMemberDType* itemp = membersp(); itemp; itemp=VN_CAST(itemp->nextp(), MemberDType)) {
|
for (AstMemberDType* itemp = membersp(); itemp; itemp=VN_CAST(itemp->nextp(), MemberDType)) {
|
||||||
exists.insert(itemp);
|
exists.insert(itemp);
|
||||||
|
|
@ -107,14 +107,14 @@ int AstBasicDType::widthTotalBytes() const {
|
||||||
else return widthWords() * (VL_EDATASIZE / 8);
|
else return widthWords() * (VL_EDATASIZE / 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
int AstNodeClassDType::widthTotalBytes() const {
|
int AstNodeUOrStructDType::widthTotalBytes() const {
|
||||||
if (width()<=8) return 1;
|
if (width()<=8) return 1;
|
||||||
else if (width()<=16) return 2;
|
else if (width()<=16) return 2;
|
||||||
else if (isQuad()) return 8;
|
else if (isQuad()) return 8;
|
||||||
else return widthWords() * (VL_EDATASIZE / 8);
|
else return widthWords() * (VL_EDATASIZE / 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
int AstNodeClassDType::widthAlignBytes() const {
|
int AstNodeUOrStructDType::widthAlignBytes() const {
|
||||||
// Could do max across members but that would be slow,
|
// Could do max across members but that would be slow,
|
||||||
// instead intuit based on total structure size
|
// instead intuit based on total structure size
|
||||||
if (width()<=8) return 1;
|
if (width()<=8) return 1;
|
||||||
|
|
@ -580,7 +580,7 @@ AstNodeDType* AstNodeDType::dtypeDimensionp(int dimension) {
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
else if (AstNodeClassDType* adtypep = VN_CAST(dtypep, NodeClassDType)) {
|
else if (AstNodeUOrStructDType* adtypep = VN_CAST(dtypep, NodeUOrStructDType)) {
|
||||||
if (adtypep->packed()) {
|
if (adtypep->packed()) {
|
||||||
if ((dim++) == dimension) {
|
if ((dim++) == dimension) {
|
||||||
return adtypep;
|
return adtypep;
|
||||||
|
|
@ -1030,7 +1030,7 @@ void AstRefDType::dump(std::ostream& str) const {
|
||||||
}
|
}
|
||||||
else { str<<" -> UNLINKED"; }
|
else { str<<" -> UNLINKED"; }
|
||||||
}
|
}
|
||||||
void AstNodeClassDType::dump(std::ostream& str) const {
|
void AstNodeUOrStructDType::dump(std::ostream& str) const {
|
||||||
this->AstNode::dump(str);
|
this->AstNode::dump(str);
|
||||||
if (packed()) str<<" [PACKED]";
|
if (packed()) str<<" [PACKED]";
|
||||||
if (isFourstate()) str<<" [4STATE]";
|
if (isFourstate()) str<<" [4STATE]";
|
||||||
|
|
|
||||||
|
|
@ -842,26 +842,26 @@ public:
|
||||||
void packagep(AstPackage* nodep) { m_packagep = nodep; }
|
void packagep(AstPackage* nodep) { m_packagep = nodep; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class AstStructDType : public AstNodeClassDType {
|
class AstStructDType : public AstNodeUOrStructDType {
|
||||||
public:
|
public:
|
||||||
AstStructDType(FileLine* fl, AstNumeric numericUnpack)
|
AstStructDType(FileLine* fl, AstNumeric numericUnpack)
|
||||||
: AstNodeClassDType(fl, numericUnpack) {}
|
: AstNodeUOrStructDType(fl, numericUnpack) {}
|
||||||
ASTNODE_NODE_FUNCS(StructDType)
|
ASTNODE_NODE_FUNCS(StructDType)
|
||||||
virtual string verilogKwd() const { return "struct"; }
|
virtual string verilogKwd() const { return "struct"; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class AstUnionDType : public AstNodeClassDType {
|
class AstUnionDType : public AstNodeUOrStructDType {
|
||||||
public:
|
public:
|
||||||
//UNSUP: bool isTagged;
|
//UNSUP: bool isTagged;
|
||||||
AstUnionDType(FileLine* fl, AstNumeric numericUnpack)
|
AstUnionDType(FileLine* fl, AstNumeric numericUnpack)
|
||||||
: AstNodeClassDType(fl, numericUnpack) {}
|
: AstNodeUOrStructDType(fl, numericUnpack) {}
|
||||||
ASTNODE_NODE_FUNCS(UnionDType)
|
ASTNODE_NODE_FUNCS(UnionDType)
|
||||||
virtual string verilogKwd() const { return "union"; }
|
virtual string verilogKwd() const { return "union"; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class AstMemberDType : public AstNodeDType {
|
class AstMemberDType : public AstNodeDType {
|
||||||
// A member of a struct/union
|
// A member of a struct/union
|
||||||
// PARENT: AstNodeClassDType
|
// PARENT: AstNodeUOrStructDType
|
||||||
private:
|
private:
|
||||||
AstNodeDType* m_refDTypep; // Elements of this type (after widthing)
|
AstNodeDType* m_refDTypep; // Elements of this type (after widthing)
|
||||||
string m_name; // Name of variable
|
string m_name; // Name of variable
|
||||||
|
|
|
||||||
|
|
@ -175,7 +175,7 @@ private:
|
||||||
m_newRvEqnp = origNREp;
|
m_newRvEqnp = origNREp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
virtual void visit(AstNodeClassDType* nodep) {
|
virtual void visit(AstNodeUOrStructDType* nodep) {
|
||||||
if (nodep->packedUnsup()) {
|
if (nodep->packedUnsup()) {
|
||||||
newChangeDet();
|
newChangeDet();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -373,11 +373,11 @@ private:
|
||||||
}
|
}
|
||||||
for (std::vector<AstNode*>::iterator it = m_dtypesp.begin(); it != m_dtypesp.end();++it) {
|
for (std::vector<AstNode*>::iterator it = m_dtypesp.begin(); it != m_dtypesp.end();++it) {
|
||||||
if ((*it)->user1() == 0) {
|
if ((*it)->user1() == 0) {
|
||||||
AstNodeClassDType *classp;
|
AstNodeUOrStructDType *classp;
|
||||||
// It's possible that there if a reference to each individual member, but
|
// It's possible that there if a reference to each individual member, but
|
||||||
// not to the dtype itself. Check and don't remove the parent dtype if
|
// not to the dtype itself. Check and don't remove the parent dtype if
|
||||||
// members are still alive.
|
// members are still alive.
|
||||||
if ((classp = VN_CAST((*it), NodeClassDType))) {
|
if ((classp = VN_CAST((*it), NodeUOrStructDType))) {
|
||||||
bool cont = true;
|
bool cont = true;
|
||||||
for (AstMemberDType *memberp = classp->membersp();
|
for (AstMemberDType *memberp = classp->membersp();
|
||||||
memberp; memberp = VN_CAST(memberp->nextp(), MemberDType)) {
|
memberp; memberp = VN_CAST(memberp->nextp(), MemberDType)) {
|
||||||
|
|
|
||||||
|
|
@ -542,7 +542,7 @@ class EmitVBaseVisitor : public EmitCBaseVisitor {
|
||||||
iterate(nodep->subDTypep());
|
iterate(nodep->subDTypep());
|
||||||
iterateAndNextNull(nodep->rangep());
|
iterateAndNextNull(nodep->rangep());
|
||||||
}
|
}
|
||||||
virtual void visit(AstNodeClassDType* nodep) {
|
virtual void visit(AstNodeUOrStructDType* nodep) {
|
||||||
puts(nodep->verilogKwd()+" ");
|
puts(nodep->verilogKwd()+" ");
|
||||||
if (nodep->packed()) puts("packed ");
|
if (nodep->packed()) puts("packed ");
|
||||||
puts("\n");
|
puts("\n");
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ private:
|
||||||
}
|
}
|
||||||
visitIterateNodeDType(nodep);
|
visitIterateNodeDType(nodep);
|
||||||
}
|
}
|
||||||
virtual void visit(AstNodeClassDType* nodep) {
|
virtual void visit(AstNodeUOrStructDType* nodep) {
|
||||||
if (nodep->name() == "") {
|
if (nodep->name() == "") {
|
||||||
nodep->name(nameFromTypedef(nodep)); // Might still remain ""
|
nodep->name(nameFromTypedef(nodep)); // Might still remain ""
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ struct V3ParseBisonYYSType {
|
||||||
AstConst* constp;
|
AstConst* constp;
|
||||||
AstMemberDType* memberp;
|
AstMemberDType* memberp;
|
||||||
AstNodeModule* modulep;
|
AstNodeModule* modulep;
|
||||||
AstNodeClassDType* classp;
|
AstNodeUOrStructDType* uorstructp;
|
||||||
AstNodeDType* dtypep;
|
AstNodeDType* dtypep;
|
||||||
AstNodeFTask* ftaskp;
|
AstNodeFTask* ftaskp;
|
||||||
AstNodeFTaskRef* ftaskrefp;
|
AstNodeFTaskRef* ftaskrefp;
|
||||||
|
|
|
||||||
|
|
@ -306,7 +306,7 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
virtual void visit(AstNodeClassDType* nodep) {
|
virtual void visit(AstNodeUOrStructDType* nodep) {
|
||||||
if (m_traVscp) {
|
if (m_traVscp) {
|
||||||
if (nodep->packed() && !v3Global.opt.traceStructs()) {
|
if (nodep->packed() && !v3Global.opt.traceStructs()) {
|
||||||
// Everything downstream is packed, so deal with as one trace unit
|
// Everything downstream is packed, so deal with as one trace unit
|
||||||
|
|
|
||||||
|
|
@ -1374,7 +1374,7 @@ private:
|
||||||
}
|
}
|
||||||
else if (nodep->isIO() && !(VN_IS(nodep->dtypeSkipRefp(), BasicDType)
|
else if (nodep->isIO() && !(VN_IS(nodep->dtypeSkipRefp(), BasicDType)
|
||||||
|| VN_IS(nodep->dtypeSkipRefp(), NodeArrayDType)
|
|| VN_IS(nodep->dtypeSkipRefp(), NodeArrayDType)
|
||||||
|| VN_IS(nodep->dtypeSkipRefp(), NodeClassDType))) {
|
|| VN_IS(nodep->dtypeSkipRefp(), NodeUOrStructDType))) {
|
||||||
nodep->v3error("Unsupported: Inputs and outputs must be simple data types");
|
nodep->v3error("Unsupported: Inputs and outputs must be simple data types");
|
||||||
}
|
}
|
||||||
if (VN_IS(nodep->dtypep()->skipRefToConstp(), ConstDType)) {
|
if (VN_IS(nodep->dtypep()->skipRefToConstp(), ConstDType)) {
|
||||||
|
|
@ -1647,7 +1647,7 @@ private:
|
||||||
nodep->widthForce(1, 1); // Not really relevant
|
nodep->widthForce(1, 1); // Not really relevant
|
||||||
UINFO(4,"dtWidthed "<<nodep<<endl);
|
UINFO(4,"dtWidthed "<<nodep<<endl);
|
||||||
}
|
}
|
||||||
virtual void visit(AstNodeClassDType* nodep) {
|
virtual void visit(AstNodeUOrStructDType* nodep) {
|
||||||
if (nodep->didWidthAndSet()) return; // This node is a dtype & not both PRELIMed+FINALed
|
if (nodep->didWidthAndSet()) return; // This node is a dtype & not both PRELIMed+FINALed
|
||||||
UINFO(5," NODECLASS "<<nodep<<endl);
|
UINFO(5," NODECLASS "<<nodep<<endl);
|
||||||
//if (debug()>=9) nodep->dumpTree("-class-in--");
|
//if (debug()>=9) nodep->dumpTree("-class-in--");
|
||||||
|
|
@ -1697,7 +1697,7 @@ private:
|
||||||
AstNodeDType* fromDtp = nodep->fromp()->dtypep()->skipRefToEnump();
|
AstNodeDType* fromDtp = nodep->fromp()->dtypep()->skipRefToEnump();
|
||||||
UINFO(9," from dt "<<fromDtp<<endl);
|
UINFO(9," from dt "<<fromDtp<<endl);
|
||||||
AstMemberDType* memberp = NULL; // NULL=error below
|
AstMemberDType* memberp = NULL; // NULL=error below
|
||||||
if (AstNodeClassDType* adtypep = VN_CAST(fromDtp, NodeClassDType)) {
|
if (AstNodeUOrStructDType* adtypep = VN_CAST(fromDtp, NodeUOrStructDType)) {
|
||||||
// No need to width-resolve the class, as it was done when we did the child
|
// No need to width-resolve the class, as it was done when we did the child
|
||||||
memberp = adtypep->findMember(nodep->name());
|
memberp = adtypep->findMember(nodep->name());
|
||||||
if (!memberp) {
|
if (!memberp) {
|
||||||
|
|
@ -2255,8 +2255,8 @@ private:
|
||||||
while (const AstConstDType* vdtypep = VN_CAST(dtypep, ConstDType)) {
|
while (const AstConstDType* vdtypep = VN_CAST(dtypep, ConstDType)) {
|
||||||
dtypep = vdtypep->subDTypep()->skipRefp();
|
dtypep = vdtypep->subDTypep()->skipRefp();
|
||||||
}
|
}
|
||||||
if (AstNodeClassDType* vdtypep = VN_CAST(dtypep, NodeClassDType)) {
|
if (AstNodeUOrStructDType* vdtypep = VN_CAST(dtypep, NodeUOrStructDType)) {
|
||||||
patternClass(nodep, vdtypep, defaultp); VL_DANGLING(nodep);
|
patternUOrStruct(nodep, vdtypep, defaultp); VL_DANGLING(nodep);
|
||||||
}
|
}
|
||||||
else if (AstNodeArrayDType* vdtypep = VN_CAST(dtypep, NodeArrayDType)) {
|
else if (AstNodeArrayDType* vdtypep = VN_CAST(dtypep, NodeArrayDType)) {
|
||||||
patternArray(nodep, vdtypep, defaultp); VL_DANGLING(nodep);
|
patternArray(nodep, vdtypep, defaultp); VL_DANGLING(nodep);
|
||||||
|
|
@ -2270,7 +2270,8 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void patternClass(AstPattern* nodep, AstNodeClassDType* vdtypep, AstPatMember* defaultp) {
|
void patternUOrStruct(AstPattern* nodep, AstNodeUOrStructDType* vdtypep,
|
||||||
|
AstPatMember* defaultp) {
|
||||||
// Due to "default" and tagged patterns, we need to determine
|
// Due to "default" and tagged patterns, we need to determine
|
||||||
// which member each AstPatMember corresponds to before we can
|
// which member each AstPatMember corresponds to before we can
|
||||||
// determine the dtypep for that PatMember's value, and then
|
// determine the dtypep for that PatMember's value, and then
|
||||||
|
|
@ -4336,7 +4337,7 @@ private:
|
||||||
declRange = adtypep->declRange();
|
declRange = adtypep->declRange();
|
||||||
if (i<dim) dtypep = adtypep->subDTypep()->skipRefp();
|
if (i<dim) dtypep = adtypep->subDTypep()->skipRefp();
|
||||||
continue;
|
continue;
|
||||||
} else if (AstNodeClassDType* adtypep = VN_CAST(dtypep, NodeClassDType)) {
|
} else if (AstNodeUOrStructDType* adtypep = VN_CAST(dtypep, NodeUOrStructDType)) {
|
||||||
declRange = adtypep->declRange();
|
declRange = adtypep->declRange();
|
||||||
if (adtypep) {} // UNUSED
|
if (adtypep) {} // UNUSED
|
||||||
break; // Sub elements don't look like arrays and can't iterate into
|
break; // Sub elements don't look like arrays and can't iterate into
|
||||||
|
|
@ -4357,7 +4358,7 @@ private:
|
||||||
bits *= adtypep->declRange().elements();
|
bits *= adtypep->declRange().elements();
|
||||||
dtypep = adtypep->subDTypep()->skipRefp();
|
dtypep = adtypep->subDTypep()->skipRefp();
|
||||||
continue;
|
continue;
|
||||||
} else if (AstNodeClassDType* adtypep = VN_CAST(dtypep, NodeClassDType)) {
|
} else if (AstNodeUOrStructDType* adtypep = VN_CAST(dtypep, NodeUOrStructDType)) {
|
||||||
bits *= adtypep->width();
|
bits *= adtypep->width();
|
||||||
break;
|
break;
|
||||||
} else if (AstBasicDType* adtypep = VN_CAST(dtypep, BasicDType)) {
|
} else if (AstBasicDType* adtypep = VN_CAST(dtypep, BasicDType)) {
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,7 @@ private:
|
||||||
virtual void visit(AstNodeDType* nodep) {
|
virtual void visit(AstNodeDType* nodep) {
|
||||||
visitIterateNodeDType(nodep);
|
visitIterateNodeDType(nodep);
|
||||||
}
|
}
|
||||||
virtual void visit(AstNodeClassDType* nodep) {
|
virtual void visit(AstNodeUOrStructDType* nodep) {
|
||||||
if (nodep->user1SetOnce()) return; // Process once
|
if (nodep->user1SetOnce()) return; // Process once
|
||||||
visitIterateNodeDType(nodep);
|
visitIterateNodeDType(nodep);
|
||||||
nodep->clearCache();
|
nodep->clearCache();
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ private:
|
||||||
}
|
}
|
||||||
else if (const AstQueueDType* adtypep = VN_CAST(ddtypep, QueueDType)) {
|
else if (const AstQueueDType* adtypep = VN_CAST(ddtypep, QueueDType)) {
|
||||||
}
|
}
|
||||||
else if (const AstNodeClassDType* adtypep = VN_CAST(ddtypep, NodeClassDType)) {
|
else if (const AstNodeUOrStructDType* adtypep = VN_CAST(ddtypep, NodeUOrStructDType)) {
|
||||||
fromRange = adtypep->declRange();
|
fromRange = adtypep->declRange();
|
||||||
}
|
}
|
||||||
else if (AstBasicDType* adtypep = VN_CAST(ddtypep, BasicDType)) {
|
else if (AstBasicDType* adtypep = VN_CAST(ddtypep, BasicDType)) {
|
||||||
|
|
@ -280,7 +280,7 @@ private:
|
||||||
if (debug()>=9) newp->dumpTree(cout, "--SELBTn: ");
|
if (debug()>=9) newp->dumpTree(cout, "--SELBTn: ");
|
||||||
nodep->replaceWith(newp); pushDeletep(nodep); VL_DANGLING(nodep);
|
nodep->replaceWith(newp); pushDeletep(nodep); VL_DANGLING(nodep);
|
||||||
}
|
}
|
||||||
else if (VN_IS(ddtypep, NodeClassDType)) { // It's packed, so a bit from the packed struct
|
else if (VN_IS(ddtypep, NodeUOrStructDType)) { // A bit from the packed struct
|
||||||
// SELBIT(range, index) -> SEL(array, index, 1)
|
// SELBIT(range, index) -> SEL(array, index, 1)
|
||||||
AstSel* newp = new AstSel(nodep->fileline(),
|
AstSel* newp = new AstSel(nodep->fileline(),
|
||||||
fromp,
|
fromp,
|
||||||
|
|
@ -389,7 +389,7 @@ private:
|
||||||
//if (debug()>=9) newp->dumpTree(cout, "--SELEXnew: ");
|
//if (debug()>=9) newp->dumpTree(cout, "--SELEXnew: ");
|
||||||
nodep->replaceWith(newp); pushDeletep(nodep); VL_DANGLING(nodep);
|
nodep->replaceWith(newp); pushDeletep(nodep); VL_DANGLING(nodep);
|
||||||
}
|
}
|
||||||
else if (VN_IS(ddtypep, NodeClassDType)) {
|
else if (VN_IS(ddtypep, NodeUOrStructDType)) {
|
||||||
// Classes aren't little endian
|
// Classes aren't little endian
|
||||||
if (lsb > msb) {
|
if (lsb > msb) {
|
||||||
nodep->v3error("["<<msb<<":"<<lsb<<"] Range extract has backward bit ordering, perhaps you wanted ["
|
nodep->v3error("["<<msb<<":"<<lsb<<"] Range extract has backward bit ordering, perhaps you wanted ["
|
||||||
|
|
@ -443,8 +443,8 @@ private:
|
||||||
VNumRange fromRange = fromdata.m_fromRange;
|
VNumRange fromRange = fromdata.m_fromRange;
|
||||||
if (VN_IS(ddtypep, BasicDType)
|
if (VN_IS(ddtypep, BasicDType)
|
||||||
|| VN_IS(ddtypep, PackArrayDType)
|
|| VN_IS(ddtypep, PackArrayDType)
|
||||||
|| (VN_IS(ddtypep, NodeClassDType)
|
|| (VN_IS(ddtypep, NodeUOrStructDType)
|
||||||
&& VN_CAST(ddtypep, NodeClassDType)->packedUnsup())) {
|
&& VN_CAST(ddtypep, NodeUOrStructDType)->packedUnsup())) {
|
||||||
int elwidth = 1;
|
int elwidth = 1;
|
||||||
AstNode* newwidthp = widthp;
|
AstNode* newwidthp = widthp;
|
||||||
if (const AstPackArrayDType* adtypep = VN_CAST(ddtypep, PackArrayDType)) {
|
if (const AstPackArrayDType* adtypep = VN_CAST(ddtypep, PackArrayDType)) {
|
||||||
|
|
|
||||||
|
|
@ -1521,14 +1521,14 @@ var_data_type<dtypep>: // ==IEEE: var_data_type
|
||||||
| yVAR implicit_typeE { $$ = $2; }
|
| yVAR implicit_typeE { $$ = $2; }
|
||||||
;
|
;
|
||||||
|
|
||||||
struct_unionDecl<classp>: // IEEE: part of data_type
|
struct_unionDecl<uorstructp>: // IEEE: part of data_type
|
||||||
// // packedSigningE is NOP for unpacked
|
// // packedSigningE is NOP for unpacked
|
||||||
ySTRUCT packedSigningE '{' { $<classp>$ = new AstStructDType($1, $2); SYMP->pushNew($<classp>$); }
|
ySTRUCT packedSigningE '{' { $<uorstructp>$ = new AstStructDType($1, $2); SYMP->pushNew($<uorstructp>$); }
|
||||||
/*cont*/ struct_union_memberList '}'
|
/*cont*/ struct_union_memberList '}'
|
||||||
{ $$=$<classp>4; $$->addMembersp($5); SYMP->popScope($$); }
|
{ $$=$<uorstructp>4; $$->addMembersp($5); SYMP->popScope($$); }
|
||||||
| yUNION taggedE packedSigningE '{' { $<classp>$ = new AstUnionDType($1, $3); SYMP->pushNew($<classp>$); }
|
| yUNION taggedE packedSigningE '{' { $<uorstructp>$ = new AstUnionDType($1, $3); SYMP->pushNew($<uorstructp>$); }
|
||||||
/*cont*/ struct_union_memberList '}'
|
/*cont*/ struct_union_memberList '}'
|
||||||
{ $$=$<classp>5; $$->addMembersp($6); SYMP->popScope($$); }
|
{ $$=$<uorstructp>5; $$->addMembersp($6); SYMP->popScope($$); }
|
||||||
;
|
;
|
||||||
|
|
||||||
struct_union_memberList<nodep>: // IEEE: { struct_union_member }
|
struct_union_memberList<nodep>: // IEEE: { struct_union_member }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue