Fix select operation on assoc array with wide keys (#4360)

This commit is contained in:
Ryszard Rozak 2023-07-12 18:48:24 +02:00 committed by GitHub
parent 0774f825cf
commit ced1dfeffd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -386,11 +386,7 @@ public:
AstAssocArrayDType* const adtypep
= VN_AS(nodep->fromp()->dtypep()->skipRefp(), AssocArrayDType);
UASSERT_OBJ(adtypep, nodep, "Associative select on non-associative type");
if (adtypep->keyDTypep()->isWide()) {
emitCvtWideArray(nodep->bitp(), nodep->fromp());
} else {
iterateAndNextConstNull(nodep->bitp());
}
iterateAndNextConstNull(nodep->bitp());
puts(")");
}
void visit(AstWildcardSel* nodep) override {

View File

@ -102,8 +102,11 @@ module t (/*AUTOARG*/
begin
// Wide-wides - need special array container classes, ick.
logic [91:2] a [ logic [65:1] ];
int b [ bit [99:0] ];
a[~65'hfe] = ~ 90'hfee;
`checkh(a[~65'hfe], ~ 90'hfee);
b[100'b1] = 1;
`checkh(b[100'b1], 1);
end
begin