mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
This commit is contained in:
+3
-1
@@ -4073,7 +4073,9 @@ class RandomizeVisitor final : public VNVisitor {
|
||||
if (structDtp->packed()) {
|
||||
randp = newRandStmtsp(fl, stmtsp ? exprp->cloneTree(false) : exprp, nullptr,
|
||||
outputVarp, offset, smemberp);
|
||||
} else {
|
||||
} else if (smemberp->rand().isRandomizable()) {
|
||||
// IEEE 1800-2023 18.4: an unpacked struct member is only
|
||||
// randomized if its own declaration carries rand/randc.
|
||||
AstStructSel* structSelp
|
||||
= new AstStructSel{fl, exprp->cloneTree(false), smemberp->name()};
|
||||
structSelp->dtypep(smemberp->childDTypep());
|
||||
|
||||
Reference in New Issue
Block a user