mirror of
https://github.com/verilator/verilator.git
synced 2026-09-05 08:42:46 +02:00
Support generic interface arrays (#7604)
This commit is contained in:
@@ -1050,6 +1050,25 @@ const AstNodeDType* AstNodeDType::skipRefIterp(bool skipConst, bool skipEnum,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const AstNodeDType* AstNodeDType::elemDTypep(bool skipRef) const {
|
||||
const AstNodeDType* dtypep = this;
|
||||
while (true) {
|
||||
if (skipRef) dtypep = dtypep->skipRefp();
|
||||
if (const AstBracketArrayDType* const adtypep = VN_CAST(dtypep, BracketArrayDType)) {
|
||||
dtypep = adtypep->subDTypep();
|
||||
} else if (const AstDynArrayDType* const adtypep = VN_CAST(dtypep, DynArrayDType)) {
|
||||
dtypep = adtypep->subDTypep();
|
||||
} else if (const AstQueueDType* const adtypep = VN_CAST(dtypep, QueueDType)) {
|
||||
dtypep = adtypep->subDTypep();
|
||||
} else if (const AstUnpackArrayDType* const adtypep = VN_CAST(dtypep, UnpackArrayDType)) {
|
||||
dtypep = adtypep->subDTypep();
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return dtypep;
|
||||
}
|
||||
|
||||
bool AstNodeDType::similarDType(const AstNodeDType* samep) const {
|
||||
const AstNodeDType* nodep = this;
|
||||
nodep = nodep->skipRefToNonRefp();
|
||||
|
||||
Reference in New Issue
Block a user