Commit Graph

6107 Commits

Author SHA1 Message Date
Yilou Wang c74eee5123
Fix rand variable used as array index in constraint evaluated as constant (#7238) (#7247) 2026-03-12 10:12:53 -04:00
Wilson Snyder 08c6d5bde5 Improve some display error handling (#7212 prep) 2026-03-12 07:49:21 -04:00
Wilson Snyder f2fdc57366 Fix --hierarchical dropping arguments in -f/-F files (#7240). 2026-03-12 07:25:32 -04:00
Wilson Snyder d87035d187 Commentary: Fix non-grammar 2026-03-11 19:53:23 -04:00
Geza Lore be429ce956
Fix tracing of typedefed 1D packed arrays with --trace-structs (#7237)
Used to incorrectly unroll 1D packed arrays of 'bit' or 'logic' into
elements when using --trace-structs if the array element type was given
via a typedef. Keep them as a single signal instead.
2026-03-11 12:46:13 +00:00
Yilou Wang f351882cf0
Fix enum range constraints missing for rand variables in sub-objects (#7230) (#7235) 2026-03-11 07:21:40 -04:00
Rahul Behl cd8818ca23
Fix randomize size+element queue constraints (#5582) (#7225) 2026-03-11 06:51:32 -04:00
Pawel Kojma 4e6eafd994
Allow constant expressions without parentheses in PATHPULSE$ declaration (#7199) 2026-03-11 06:01:33 -04:00
Yilou Wang 5bf1d060c9
Fix internal error when derived class calls this.randomize() with inherited rand members (#7229) (#7234) 2026-03-10 19:03:18 -04:00
Yilou Wang 3ba9077726
Fix soft cross-object constraint priority inversion (#7228) (#7233)
Emit nested constraint setup tasks in depth-first order (deepest first)
so outer-scope soft constraints get higher priority per IEEE 18.5.13.
2026-03-10 19:02:15 -04:00
Wilson Snyder a7a5c9f548 Improve not-found message to show cwd 2026-03-10 08:55:51 -04:00
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
em2machine 1b2b8afdc1
Fix wrong $bits() for parameterized interface struct typedefs (#7218) (#7219) 2026-03-09 22:32:13 -04:00
Christian Hecken 9c5f4e2483
Internals: Extend VerilatedVar to hold force control signal pointers (#7217) 2026-03-08 15:53:32 -04:00
Wilson Snyder 3097df46fa Change `--converge-limit` default to 10000 (#7209).
Fixes #7209.
2026-03-07 09:05:37 -05:00
Wilson Snyder 68d6dd7eee Internals: Add UASSERT to avoid error fault on sv-tests regress-sv_sv_import_hier_fail1_iv 2026-03-07 09:03:42 -05:00
Wilson Snyder 4d369e4262 Fix --debug-inputs for .vlt files 2026-03-07 08:01:27 -05:00
em2machine bef5c1f475
Fix static function not found from parameterized extends class (#7204) (#7208) 2026-03-06 16:23:02 -05:00
Rahul Behl efa53189ea
Support constraint `with` item.index array reduction (#7198) 2026-03-06 05:14:55 -05:00
Geza Lore cedec65c39
Change array tracing to always dump left index to right index (#7205)
Also add array bounds and struct/union member counts to trace pushPrefix
(not used by vcd/fst/saif). Together these improve consistency in some
waveform formats.
2026-03-06 09:32:08 +00:00
Wilson Snyder b89d29cab9 * Support procedural concurrent assertion simple cases (#6944).
Fixes #6944.
2026-03-05 20:03:48 -05:00
github action fb00eb3bc6 Apply 'make format' 2026-03-05 21:06:48 +00:00
Julian Carrier 45a5e72509
Fix recursive default assignment for subarrays (#4589) (#7202) 2026-03-05 16:05:54 -05:00
Geza Lore 4f4d48e9d7
Fix library/hier_block tracing when top name is empty (#7200) 2026-03-05 08:44:41 -05:00
Ryszard Rozak 258629634c
Support force assignments to array elements of real type (#7048) 2026-03-05 08:37:20 -05:00
Nick Brereton e5ad9b3a4b
Support Z non-blocking assignment (#7192) (#496) (#7197) 2026-03-04 22:39:05 -05:00
Wilson Snyder 572f50126b Improve function call argument error to show target function (rewording) 2026-03-04 20:22:25 -05:00
Wilson Snyder c93f5256d4 Fix string cast on array call 2026-03-04 20:12:10 -05:00
Wilson Snyder 1bf2ea7643 Improve function call argument error to show target function 2026-03-04 19:01:01 -05:00
Igor Zaworski 7acd73fede
Fix super constructor calls with local variables, by using init functions (#6214) (#6933) 2026-03-04 17:55:55 -05:00
em2machine c34cd6ddf1
Fix missing scope when calling package function (#7128 repair) (#7188) (#7190) 2026-03-04 15:37:55 -05:00
Rahul Behl 9a5c1d27c8
Support array reduction methods with 'with' clause in constraints (#6455) (#6999) 2026-03-04 12:01:35 -05:00
Nick Brereton 44701201ac
Support inout inside SV interface (#3466) (#7134) 2026-03-04 09:08:07 -05:00
jalcim 7cf539cf05
Add --func-recursion-depth CLI option (#7175) (#7179) 2026-03-04 06:46:07 -05:00
Yilou Wang 3bc73cc768
Support constraint imperfect distributions (#6811) (#7168) 2026-03-03 11:23:14 -05:00
em2machine 5f3d475736
Internals: Minor coverage improvement as followup to (#7128 followup) (#7184) 2026-03-03 11:13:32 -05:00
em2machine 5821d0697c
Fix interface localparam dependencies and arbitrary nesting (#6936) (#7128) 2026-03-03 06:55:59 -05:00
Yilou Wang ed84f3adb2
Support constraints on fixed-size array of class object members (#7170) (#7183) 2026-03-03 06:27:31 -05:00
jalcim d406efdcf9 Fix recursive constant function in $unit scope (#7174) (#7178) 2026-03-02 15:15:34 -05:00
Wilson Snyder 251d1835cf Internals: Comment to explain stray emit semicolon 2026-03-02 11:26:48 -05:00
Yilou Wang 8a413b3ec7
Fix std::randomize() in static function with static class members (#7167) (#7169) 2026-03-02 05:59:00 -05:00
Yilou Wang 108d209bd7
Support soft constraint solving with last-wins priority (#7124) (#7166) 2026-03-01 15:16:55 -05:00
Wilson Snyder 192445097a
Internals: Fix non-determinism in V3Delayed, V3SplitVar, V3Task (#7120 partial) (#7165) 2026-03-01 11:59:29 -05:00
Geza Lore 6c48b3282e
Enable V3LiftExpr with code coverage (#7164) 2026-03-01 15:04:49 +00:00
Geza Lore 3249fd8cc0
Internals: Mark Premit temporaries funcLocal, noReset (#7160) 2026-03-01 14:56:21 +00:00
Geza Lore 97838325cd
Fix scheduling non-determinism (#7120 partial) (#7162) 2026-03-01 07:44:59 -05:00
Geza Lore 77ce9cec1e
Optimize conditional merging across some impure statements (#7159)
- Allow reordering pure statements with DPI import calls iff no public
  variables (including those read via a DPI export) are involved. This
  ensures the DPI import can't observe the reordering
- Allow reordering of pure statements with AstDisplay and AstStop. This
  requires an assumption that AstDisplay and AstStop will not read or
  write model state other than via a VarRef explicitly present int the
  Ast.
Overall this allows eliminating a lot of conditionals around assertions,
which were previously not possible.
2026-03-01 05:47:05 -05:00
Geza Lore 26eac21432
Internals: Use existing astgen type info for ASTGEN_MAX_NODE_SIZE (#7161) 2026-03-01 05:33:30 -05:00
Wilson Snyder e9dd6eaaf0 Internals: Fix VL_ALLOC_RANDOM_CHECKS with multiple threads 2026-02-28 20:24:09 -05:00
Wilson Snyder e23c7a510e Internals: Add VL_ALLOC_RANDOM_CHECKS 2026-02-28 18:21:51 -05:00