mirror of
https://github.com/verilator/verilator.git
synced 2026-09-08 02:28:43 +02:00
SC variables can only be assigned whole, so do not split up concatenation assignments in V3FuncOpt. Fixes #6329
This commit is contained in:
@@ -228,6 +228,8 @@ class FuncOptVisitor final : public VNVisitor {
|
||||
UASSERT_OBJ(lhsp->width() == rhsp->width(), nodep, "Inconsistent assignment");
|
||||
// Only consider pure assignments. Nodes inserted below are safe.
|
||||
if (!nodep->user1() && (!lhsp->isPure() || !rhsp->isPure())) return false;
|
||||
// Do not split assignments to SC variables, they cannot be assigned in parts
|
||||
if (lhsp->exists([](AstVarRef* refp) { return refp->varp()->isSc(); })) return false;
|
||||
// Check for a Sel on the LHS if present, and skip over it
|
||||
uint32_t lsb = 0;
|
||||
if (AstSel* const selp = VN_CAST(lhsp, Sel)) {
|
||||
|
||||
Reference in New Issue
Block a user