verilator/test_regress
Rahul Behl 2046879beb
V3Randomize: Fix dist operator inside ConstraintIf blocks (#7221) (#7224)
The lowerDistConstraints() function was not recursing into ConstraintIf
nodes, causing dist operators inside if-else blocks to remain unlowered
and trigger an internal error when ConstraintExprVisitor encountered them.

Fix by adding recursive handling of ConstraintIf nodes in lowerDistConstraints:
- Check for AstConstraintIf nodes before AstConstraintExpr
- Recursively process thensp() and elsesp() branches
- This ensures all dist operators are lowered regardless of nesting

Test case: t_randomize_dist_conditional.v demonstrates conditional dist:
    constraint c {
      if (randd) {
        x dist { 8'd0 := 1, 8'd255 := 3 };  // 25% / 75%
      } else {
        x dist { 8'd0 := 3, 8'd255 := 1 };  // 75% / 25%
      }
    }

Fixes #7221
2026-03-10 07:06:00 +00:00
..
t V3Randomize: Fix dist operator inside ConstraintIf blocks (#7221) (#7224) 2026-03-10 07:06:00 +00:00
.gdbinit
.gitignore
CMakeLists.txt Add SPDX copyright identifiers, and get 'reuse' clean. No functional change. 2026-01-26 20:24:34 -05:00
Makefile Internals: make test-diff macOS compatibility fix - again 2026-01-28 11:05:27 +00:00
Makefile_obj Add SPDX copyright identifiers, and get 'reuse' clean. No functional change. 2026-01-26 20:24:34 -05:00
driver.py Change array tracing to always dump left index to right index (#7205) 2026-03-06 09:32:08 +00:00
input.vc
input.xsim.vc