Fix arrayed interfaces, broke in 4.038 (#2468).

This commit is contained in:
Wilson Snyder 2020-07-15 17:58:26 -04:00
parent 84b8307938
commit bfea4b7f99
2 changed files with 5 additions and 1 deletions

View File

@ -4,6 +4,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
* Verilator 4.039 devel
*** Fix arrayed interfaces, broke in 4.038 (#2468). [Josh Redford]
* Verilator 4.038 2020-07-11

View File

@ -429,7 +429,9 @@ public:
static AstIfaceRefDType* ifaceRefFromArray(AstNodeDType* nodep) {
AstIfaceRefDType* ifacerefp = VN_CAST(nodep, IfaceRefDType);
if (!ifacerefp) {
if (AstUnpackArrayDType* arrp = VN_CAST(nodep, UnpackArrayDType)) {
if (AstBracketArrayDType* arrp = VN_CAST(nodep, BracketArrayDType)) {
ifacerefp = VN_CAST(arrp->subDTypep(), IfaceRefDType);
} else if (AstUnpackArrayDType* arrp = VN_CAST(nodep, UnpackArrayDType)) {
ifacerefp = VN_CAST(arrp->subDTypep(), IfaceRefDType);
}
}