Commit Graph

6242 Commits

Author SHA1 Message Date
Yilou Wang 56ed47ee7c
Fix false ASSIGNIN on interface input port connections (#7365)
* add oneline fix

* Apply 'make format'

* merge test and update 2 space indents

---------

Co-authored-by: github action <action@example.com>
2026-04-02 20:44:48 +02:00
Yilou Wang 1e5c93cc51
Fix virtual interface function calls binding to wrong instance (#7363) 2026-04-02 10:53:01 -04:00
em2machine 32672deb6f
Fix resolving default/nondefault type parameters (#7171) (#7346)
Fixes #7171
2026-04-02 10:51:11 -04:00
Geza Lore d7c484ae85
Fix missing temporary for DfgSplicePacked (#7361) 2026-04-01 22:44:58 +01:00
Geza Lore 2e151c3b74
Do not unroll simple array assignments in V3Slice (#7359)
See also #5644
2026-04-01 22:35:29 +01:00
Yilou Wang 894f6c4c58
Fix virtual interface member trigger convergence (#5116) (#7323) 2026-04-01 21:42:42 +01:00
Geza Lore 6aa6c45c73 Internals: Add DfgGraph::neighborhood for debugging 2026-04-01 10:53:30 +01:00
Geza Lore b4a0ca8ba6
Optimize Ast read references in Dfg directly (#7354)
Introduce a new DfgAstRd vertex, which holds an AstNodeExpr that is a
reference to a variable. This enables tracking all read references in
Dfg, which both enables more optimization, and allows inlining of
expressions in place of the reference more intelligently (e.g, when the
expression is only used once, and is not in a loop). This can get rid of
20-30% of temporary variables introduced in Dfg in some designs. Note
V3Gate later got rid of a lot of those, this is a step towards making
V3Gate redundant. The more intelligent expression inlining is worth ~10%
runtime speed on some designs.
2026-04-01 10:52:56 +01:00
Wilson Snyder dbd4823323 Fix error on illegal nand/nor binary operators (#7353).
Fixes #7353.
2026-03-31 18:35:27 -04:00
github action 1096740113 Apply 'make format' 2026-03-30 23:12:27 +00:00
Wilson Snyder 62ffe43a82 Fix port assignment to large arrays (#6904).
Fixes #6904.
2026-03-30 19:09:23 -04:00
Yilou Wang 04f410622b
Fix wait() hang when interface with combinational logic using process calls and VIF function (#7342) 2026-03-30 15:34:32 +01:00
Yilou Wang bf453361f6
Support consecutive repetition [*N] in SVA properties (#7311) 2026-03-30 07:01:33 -04:00
Artur Bieniek 55958efbe1
Fix false sensitivity of signals to unrelated interface members 2026-03-30 09:42:51 +01:00
Wilson Snyder 600eb7ec86 Internals: Favor std::swap. No functional change. 2026-03-29 20:33:06 -04:00
Wilson Snyder 5036af3d37 Commentary: Refer to latest standard where can 2026-03-29 18:06:12 -04:00
Wei-Lun Chiu 092d3d4de0
Support map() method for associative and wildcard arrays (#7344) 2026-03-29 04:00:52 -04:00
Wilson Snyder e0b4d5ad44 Fix lost `$stop` on implied assertion `$error` failures. 2026-03-28 10:57:59 -04:00
Wilson Snyder 31757df229
Internals: clangtidy cleanups. No functional change intended (#7343) 2026-03-27 23:14:18 -04:00
Wilson Snyder 8d109e85d0 Fix missing quotes on VPI error signal names 2026-03-27 21:44:11 -04:00
Nick Brereton f66df9e70e
Fix `disable iff` imply-delay statement linking (#7337) 2026-03-27 14:31:03 -04:00
Yilou Wang ba9a7aaa66
Fix static initialization order for packages with class hierarchies (#7324) 2026-03-27 12:53:45 -04:00
Yilou Wang 55e5f01758
Support SVA goto repetition [->N] in concurrent assertions (#7310) 2026-03-27 10:31:15 -04:00
Geza Lore 9ed7a9f98b Internals: Do not optimize variables with RW refs in Dfg 2026-03-27 07:50:05 +00:00
Geza Lore f12cdac8da Optimize muxes in DfgPeephole 2026-03-27 07:50:05 +00:00
Geza Lore 2759f2ab16 Optimize comparisons with identical operands in Dfg 2026-03-27 07:50:05 +00:00
Geza Lore e0fc69a2f0 Optimize CountOnes in Dfg 2026-03-27 07:50:05 +00:00
Geza Lore 382f5003ca
Optimize more patterns in DfgPeephole (#7332) 2026-03-27 07:47:50 +00:00
Jakub Michalski 5d2d05236e
Support very wide $display arguments (#7280) 2026-03-26 13:55:14 -04:00
Geza Lore e5adb60461
Internals: Only add VAR_PORT_DTYPE prior to V3Width (#7331) 2026-03-26 13:44:11 -04:00
github action 37a316f0f8 Apply 'make format' 2026-03-26 17:28:43 +00:00
Eunseo Song f369a629c7
Improve E_UNSUPPORTED warning messages (#7329) 2026-03-26 13:25:30 -04:00
Yilou Wang e0963bd587
Fix false ASSIGNIN on interface input ports driven from outside (#7322) 2026-03-26 12:30:16 -04:00
Yilou Wang 3ddf7ad6ec
Support ##[M:N] range cycle delay in SVA sequences (#7312) 2026-03-26 10:08:22 -04:00
Geza Lore afa071a822
Optimize DfgPeephole until fixed point (#7309) 2026-03-26 06:56:36 +00:00
Yilou Wang 728ddf3331
Fix modport selection of virtual interface handle (#7321) 2026-03-25 07:16:52 -04:00
Artur Bieniek 860ac67c04
Fix linking shared library with its dependencies (#7320)
Signed-off-by: Artur Bieniek <abieniek@antmicro.com>
2026-03-25 07:15:24 -04:00
Geza Lore d33a81d32a Optimize commutative vertex operands in Dfg for better combining 2026-03-25 08:09:37 +00:00
Geza Lore d00f23a2b2 Internals: Remove unused vertices immediately in DfgPeephole 2026-03-25 08:09:37 +00:00
Geza Lore e508d2a6d7 Internals: Use a custom worklist in DfgPeephole 2026-03-25 08:09:37 +00:00
Geza Lore 855884f748 Internals: Simplify DfgPeephole replacement scheme
Always only replace the currently iterated node. This ensures it is not
on the work list, which simplifies upcoming work.

No functional of performance change intended.
2026-03-25 08:09:37 +00:00
Nick Brereton 24918b83be
Fix typedef scope resolution for parameterized class aliases (#5977) (#7319) 2026-03-24 17:25:40 -07:00
github action fd2dfd6982 Apply 'make format' 2026-03-24 18:33:07 +00:00
Tracy Narine c58df87c27
Fix MacOs lexer compile error (#7314) (#7315) 2026-03-24 11:30:15 -07:00
Artur Bieniek aff85cef19
Support more than one dot in defparam (#7262)
Signed-off-by: Artur Bieniek <abieniek@antmicro.com>
2026-03-24 09:20:46 -04:00
Yilou Wang 0b2bf991a6
Support boolean and/or in sequence expressions (#7285) 2026-03-24 08:56:14 -04:00
Wei-Lun Chiu 6873dc2f63
Support array map() method (#7307) (#7316) 2026-03-24 02:38:50 -07:00
Ryszard Rozak 9a01a4054a
Improve error message when variable used as data type (#7318)
Signed-off-by: Ryszard Rozak <rrozak@antmicro.com>
2026-03-24 01:45:09 -07:00
Nick Brereton 3b328d2bb6
Support disable task by name (#6853) (#7136) 2026-03-23 19:56:31 -07:00
Wilson Snyder 716b404256 Optimize away empty ctor_var_reset.
Fixes #7154.
2026-03-23 18:10:34 -04:00
Geza Lore b9c8560d12 Internals: Simplify V3DfgCache 2026-03-22 16:01:22 +00:00
Yilou Wang 921607fd35
Support property-local variables and sequence match items (#7286) 2026-03-22 06:21:57 -07:00
Geza Lore 157fa9e4c5
Optimize duplicate vertices in DfgPeephole (#7305) 2026-03-21 22:45:02 +00:00
Wilson Snyder 947cbaf330 Deprecate `--structs-packed` (#7222). 2026-03-21 10:59:27 -04:00
em2machine 05f640459e
Fix interface data type consistency (#6965) (#7302) 2026-03-21 10:34:36 -04:00
Geza Lore 4dae9ed4e9 Optimize reuse of existing associative terms in DfgPeephole
Enable V3DfgCache to look up vertices without creating one. Reuse
existing terms in associative expression trees if they already exist
somewhere in the graph.
2026-03-21 11:09:32 +00:00
Geza Lore 92172e32c4 Internals: Add separate statistics for scoped Dfg stages 2026-03-21 10:49:39 +00:00
Geza Lore 13cf9ba075 Internals: Type check vertices made in DfgPeephole 2026-03-21 10:15:18 +00:00
Geza Lore fa30e0c9b5 Internals: Make Dfg type checking available on single vertex
No functional change
2026-03-21 10:13:49 +00:00
Geza Lore 416b30d884
Internals: Add utility to perform bisection search for debugging (#7294) 2026-03-21 10:13:27 +00:00
Yilou Wang 9ea7abd1c7
Support `##0` cycle delays (#4263) (#7298) 2026-03-20 18:29:20 -04:00
Igor Zaworski c3fc0d9f0f
Fix coroutine trace setters (#7078 repair) (#7296) 2026-03-20 09:23:32 -07:00
Igor Zaworski 331cac2054
Internals: Four-state pre-pull cleanup (#7281) 2026-03-20 12:11:22 -04:00
Yilou Wang b71abb0032
Fix `local::` false error in randomize() with on parameterized class (#6680) (#7293)` 2026-03-20 10:25:46 -04:00
Yilou Wang a8bccab8e6
Support named sequence declarations and instances in assertions (#7283) 2026-03-20 10:24:46 -04:00
Yilou Wang 25c3bc814e
Support ## delay on implication RHS in SVA properties (#7284) 2026-03-20 09:53:49 -04:00
Yilou Wang 998ec5b1d7
Fix streaming with descending unpacked arrays and unpacked-to-queue (#7287) 2026-03-20 09:51:35 -04:00
Wilson Snyder 9180eebdba Internals: MSVC cleanups 2026-03-19 22:48:12 -04:00
Wilson Snyder 94f8181cff Fix null assignment to virtual interfaces (#5974) (#5990). [Maxim Fonarev]
Fixes #5974.

Co-authored-by: Maksim Fonarev <fonarickm@yandex.ru>
2026-03-19 20:29:02 -04:00
Yilou Wang a0a684109f
Support modport export/import task prototypes and out-of-block definitions (#7277) 2026-03-18 19:20:34 -04:00
Yilou Wang b8ca9292a4
Fix StreamR LHS assertion when source is narrower than destination (#7276) (#7282) 2026-03-18 15:15:27 -04:00
Igor Zaworski 907e775aa6
Internals: Add `--fourstate` flag and FUTURE warning (#7279) 2026-03-18 13:45:36 -04:00
em2machine a2154e9119
Fix interface derived types passed as parameters to generate loop module instantiation (#7273) 2026-03-18 09:26:55 -04:00
Yilou Wang 3bb0ea63ad
Fix queue slice LHS assignment being silently discarded (#7270) 2026-03-17 15:10:49 -04:00
Yilou Wang 8925762077
Fix rand_mode(0) on sub-object members not preventing solver write-back (#7272) 2026-03-17 15:09:14 -04:00
Yilou Wang 316fb02c60
Support assignment patterns as comparison operands (#7269)
* Support assignment patterns as EQ/NEQ comparison operands

* Apply 'make format'

* update the .out file

* add both-sides case

---------

Co-authored-by: github action <action@example.com>
2026-03-17 19:36:54 +01:00
Yilou Wang ef5281ab73
Fix false illegally-wrapped-around error for signed enums whose auto-incremented values cross zero. (#7268) 2026-03-17 19:36:24 +01:00
Yilou Wang d57324e5fb
Support dynamic array .size in inline randomize() with constraints (#7258) (#7266) 2026-03-16 18:48:36 -04:00
Yilou Wang be0f4a507e
Fix shift width mismatch in constraint solver SMT emission (#5420) (#7265) 2026-03-16 18:48:09 -04:00
Yilou Wang bf792f1809
Fix array reduction in constraints crashing with class inheritance (#7226) (#7263) 2026-03-16 16:36:48 -04:00
Alex Zhou 651f223387
Fix false recursive definition error (#6769) (#7118) 2026-03-16 07:31:35 -04:00
Wilson Snyder 602ee384de
Support $sformat with runtime format string (#7212). (#7257)
Fixes #7212.
2026-03-14 22:43:56 -04:00
Yangyu Chen bb5a9dc247
Support jemalloc as the default allocator on Linux (#7250)
Add jemalloc as an alternative malloc implementation for the Verilator
binary. When both tcmalloc and jemalloc are available, jemalloc is
preferred due to its better performance on RTLMeter.

The new --enable-jemalloc flag (default=check) mirrors the existing
--enable-tcmalloc behavior: auto-detected at configure time, supports
both static and dynamic linking, and is disabled when --enable-dev-asan
is active.
2026-03-13 17:08:15 -04:00
Yilou Wang 7cd49a8028
Support dist and solve...before inside foreach constraints (#7245) (#7253) 2026-03-13 11:05:18 -04:00
Artur Bieniek c0d0180918
Fix `final` asserts and $stop (#7249) 2026-03-12 13:09:54 -04:00
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