mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Fix packed selection using over 32-bit index (#5957).
This commit is contained in:
+6
-1
@@ -168,7 +168,12 @@ class WidthSelVisitor final : public VNVisitor {
|
||||
}
|
||||
}
|
||||
AstNodeExpr* newMulConst(FileLine* fl, uint32_t elwidth, AstNodeExpr* indexp) {
|
||||
AstNodeExpr* const extendp = new AstExtend{fl, indexp};
|
||||
AstNodeExpr* extendp;
|
||||
if (indexp->width() > 32) {
|
||||
extendp = new AstSel{fl, indexp, 0, 32};
|
||||
} else {
|
||||
extendp = new AstExtend{fl, indexp};
|
||||
}
|
||||
extendp->dtypeSetLogicUnsized(
|
||||
32, std::max(V3Number::log2b(elwidth) + 1, indexp->widthMin()), VSigning::UNSIGNED);
|
||||
AstNodeExpr* const mulp
|
||||
|
||||
Reference in New Issue
Block a user