Commit Graph

6421 Commits

Author SHA1 Message Date
github action 99a35fee83 Apply 'make format' 2026-05-26 16:21:12 +00:00
Cookie 9460501221
Add NOTREDOP error on reduction and negation operators (#7417) (#7623) (#7624) 2026-05-26 12:20:15 -04:00
Cookie 9e2fedee6f
Fix ALWCOMBORDER on variable ordering (#7350) (#7608) 2026-05-26 06:40:55 -04:00
em2machine a2d4b90b52
Fix dearray varref scope error (#7530) (#7602)
Fixes #7530.
2026-05-25 17:48:31 -04:00
Yilou Wang 86799ace5d
Fix wrong false assert for property local variables with cycle-delayed consequents (#7587) (#7651)
* Fix wrong false assert in property local variable with cycle-delayed consequent

* factor helper for 100 line cov

* add return, should be 100 line cov now
2026-05-25 20:13:27 +08:00
Yogish Sekhar cf8713aebc
Add `--coverage-per-instance` 2026-05-24 18:08:55 -04:00
Yogish Sekhar 4fbb8bf43b
Fix hierarchical coverage counts for duplicate no-inline module instances (#7649) 2026-05-24 11:42:42 -04:00
Yilou Wang 6c96ce4b40
Fix inherited rand array with .size + foreach constraint (#7650)
Fixes #7558.
2026-05-24 09:02:01 -04:00
Geza Lore f93b4bbd05
Internals: Remove 'VlWide::operator bool()' (#7652)
This was a fudge to work around using VlWide in `if` conditions without
a `_ != 0` check. That check is actually inserted by V3Width (or an
equivalent reduction), so the offending code was only generated
internally. Hopefully fixed the single instance where this really
happened. (If not, C++ will fail to compile with "cannot convert VlWide
to bool in 'if (__HERE__)'" errors, still better than the old version
which used to silently not do the right test due to incorrect implicit
conversions.)
2026-05-24 13:09:31 +01:00
Wilson Snyder f0c569ab0d Fix CASEINCOMPLETE to not warn on `unique0 case` (#7647).
Fixes #7647.
2026-05-23 20:04:54 -04:00
Yogish Sekhar 7935321b25
Fix FSM thread nondeterminism (#7644) (#7646) 2026-05-22 22:30:01 -04:00
Wilson Snyder c507dcf610 Internals: Enforce types on C++ enums. No functional change intended. 2026-05-22 17:59:57 -04:00
Wilson Snyder c0dc77c908 Commentary: Changes update 2026-05-22 17:57:11 -04:00
Geza Lore c99aa8ede5
Fix erroneous implicit conversions of VlWide (#7642)
Change WDataInP/WDataOutP to be opaque handles types instead of aliases
to raw pointers. This subsequently eliminates needing an implicit cast
operator in VlWide, which is replaced with implicit constructors of
WDataInP/WDataOutP that can create a handle from a VlWide. This
eliminates some unsafe conversions that the previous implicit cast
operator unintentionally enabled (e.g. #7618). It also eliminates
having to insert ".data()" in various places int he generated code, which
simplifies internals (the only place ".data()" should be needed is in
calls to variadic functions where the expected type of the argument is
not WDataInP/WDataOutP).

The handles otherwise behave like pointers, implementing the minimal
amount of operators required to code the runtime. The handle is still
only a single pointer, and will be passed in registers as before, so
this patch should be performance neutral.

As part of this removed WData, which used to be an alias for EData.
All uses are now either EData*, WDataInP, WDataOutP, or VlWide directly.
2026-05-22 20:05:08 +01:00
Lucas Amaral 20f4eca646
Support busses with mix of pullup/pulldown (#7632) 2026-05-21 14:45:40 -04:00
github action a208d17939 Apply 'make format' 2026-05-21 17:51:28 +00:00
Yogish Sekhar f282335600
Support FSM detection in primitive wrappers (#7607) 2026-05-21 13:50:31 -04:00
Artur Bieniek 6a74112f0b
Fix V3Force deterministism (#7620) (#7637)
Fixes #7620.
2026-05-21 11:04:17 -04:00
Benjamin Collier 69b3c5f6d1
Support streaming on queues (#7597) 2026-05-20 19:14:02 -04:00
Nick Brereton c5798f902b
Fix reference counting for modport task references (#7628) 2026-05-20 14:24:56 -04:00
github action d874d2fd06 Apply 'make format' 2026-05-20 11:11:52 +00:00
Yogish Sekhar 9e4863589e
Fix non-determinism in FSM detection (#7619)
Fixes #7619
2026-05-20 12:10:53 +01:00
Michael Rogenmoser cb3b9c7c43
Fix nested parameterized class typedef chain (#7538) 2026-05-19 14:12:24 -04:00
Kamil Danecki b06ea01afb
Fix type parameters order (#7615) 2026-05-19 09:52:09 -04:00
github action 662cd43348 Apply 'make format' 2026-05-19 01:41:54 +00:00
Nikolai Kumar a67c5f81f3
Fix clocking-block sample of unpacked array (#7612) (#7613)
Fixes #7612.
2026-05-18 21:40:54 -04:00
Krzysztof Bieganski eb258d7df7
IEEE-compliant, fair `std::semaphore` (#7435) (#7605)
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2026-05-18 11:11:42 +02:00
Yilou Wang 00c9e58006
Fix internal error on consecutive repetition with N > 256 (#7552) (#7603) 2026-05-17 21:54:10 -04:00
Greg Davill 57ce373e99
Fix array pattern concatenation (#7401) (#7402) 2026-05-17 09:49:32 -04:00
github action 7f520ff1a2 Apply 'make format' 2026-05-17 11:35:24 +00:00
Muzaffer Kal 9fe058677b
Support NBAs in initial blocks with delay/event controls (#7566) (#7600)
Fixes #7566.
2026-05-17 07:34:29 -04:00
Wilson Snyder c1ab369da2 Fix process comparison compile error with `--public-flat-rw` (#7592).
Fixes #7592.
2026-05-15 18:22:46 -04:00
Wilson Snyder 349dd546e7 Internals: Rename stdPackageProcessp etc. No functional change. 2026-05-15 17:33:19 -04:00
Yilou Wang f9427c6d5f
Support property abort operators (accept_on, reject_on) (#7578) 2026-05-15 08:38:38 -04:00
Stuart Morris 67e74c5ce4
Fix interface instance name collision (#7591) (#7593)
Fixes #7591.

Co-authored-by: Leela Pakanati <41307800+cachanova@users.noreply.github.com>
2026-05-15 07:52:26 -04:00
Wilson Snyder d66733aeb8 Fix process comparison compile error with `--public-flat-rw` (#7592).
Fixes #7592.
2026-05-14 17:52:28 -04:00
Artur Bieniek fb617e49dd
Optimize read selects with no overlapping forces with regular reads (#7594) 2026-05-14 16:46:57 -04:00
Zubin Jain 4a1f17e75f
Fix force of unpacked arrays (#7579) (#7580)
Fixes #7579.
2026-05-14 10:58:16 -04:00
Krzysztof Bieganski c518abd22a
Optimize reading selected words on forced wide (#7391 repair) (#7554 partial) (#7572) 2026-05-14 07:38:42 -04:00
Wilson Snyder a3da587fc3 Internals: Show operator in assert 2026-05-13 21:02:45 -04:00
Thomas Brown 1c3ee7ce4c
Support expression coverage on assign statements (#7543) 2026-05-13 13:59:29 -04:00
Geza Lore e485dfe48c
Fix NBA to whole arrays (#7583)
Fixes #7575
2026-05-13 13:20:22 +01:00
Krzysztof Bieganski 3381d656c7
Support calling interface functions without parens (#7584)
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2026-05-13 08:15:32 -04:00
Yilou Wang 05302080a9
Support procedural concurrent assertions with inferred clock (#7581) 2026-05-13 07:42:28 -04:00
Jakub Michalski 1ffa6b277d
Fix property argument retaining type of the previous variable (#7582)
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
2026-05-13 07:41:35 -04:00
Yogish Sekhar 8312e9d901
Extend FSM Detect to support 'Wide State Encodings' (#7573) 2026-05-13 06:59:22 -04:00
Nick Brereton 9588e67ca9
V3Timing: pre-clear destructive event state before dynamic waits (#7340)
When lowering dynamic event controls, destructive pre-clear updates were inserted with addHereThisAsNext() on the original node and then that node was replaced. This could leave leaked/orphaned nodes under leak-checking runs.

Build an explicit replacement stmt chain instead:
  [pre-clear stmts] -> trigger loop -> awaitResumption,
and replace the original control with the chain head. Keep the loop-only path unchanged when no destructive pre-clear is needed.
2026-05-12 19:01:37 +01:00
anonkey 67b21e4c62
Fix segmentation fault when using --trace with --lib-create (#7299) (#7518) 2026-05-12 10:16:47 -04:00
Jakub Michalski 05f6db7970
Optimize emitting to_string() for compiler speedup (#7468)
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
2026-05-12 09:49:21 -04:00
Wilson Snyder bdcdc10966 Fix floating point compile warning on min/max delays. 2026-05-11 19:50:48 -04:00
github action edab09333c Apply 'make format' 2026-05-11 22:33:56 +00:00
Cookie cf9334f2c1
Fix error on mixed-initialization (#7352) (#7357) 2026-05-11 18:32:55 -04:00
Wilson Snyder 18e06b1e7d Fix display of %m in non-first argument (#7574).
Fixes #7574.
2026-05-11 08:18:34 -04:00
Yilou Wang b0d58bbcef
Support SVA goto repetition with range `[->M:N]` (#7569) 2026-05-11 07:07:51 -04:00
github action 485c0e746c Apply 'make format' 2026-05-10 17:13:56 +00:00
Yogish Sekhar f67159de30
Extend FSM coverage detection to case-free FSMs - Use - if/else chains (#7561) 2026-05-10 13:12:58 -04:00
Wilson Snyder 1630a2724b Commentary: Changes update 2026-05-09 19:22:47 -04:00
Artur Bieniek c69c11b2db
Support procedural continuous assign/deassign (#7493) 2026-05-08 19:01:11 -04:00
Yilou Wang 8eca6b8fe7
Fix regression rejecting boolean `!x` inside sequence expressions (#7549) (#7551)
Fixes #7549.
2026-05-08 18:34:28 -04:00
Kamil Danecki 5820d2936c
Support writing to inout in fork after timing (#7345) 2026-05-08 16:35:34 -04:00
Varun Koyyalagunta a3003a2d0f
Add 15 new DFG peephole optimizations (#7553)
- FOLD_SELF_SUB: x - x -> 0
- REMOVE_DIV_ONE / REMOVE_DIVS_ONE: x / 1 -> x (unsigned and signed)
- REMOVE_MUL_ZERO / REMOVE_MUL_ONE / REMOVE_MULS_ZERO / REMOVE_MULS_ONE:
  0 * x -> 0 and 1 * x -> x (unsigned and signed)
- REPLACE_NOT_LT/GTE/GT/LTE and their signed counterparts: eliminate a
  Not vertex by flipping the comparison operator

Test signals for the NOT-of-comparison GT/GTE variants use unique shift
amounts to prevent intra-pass CSE from merging their DfgGt/DfgGte vertices
with those produced when the complementary LT/LTE patterns fire, which
would otherwise trigger the !hasMultipleSinks() guard.
2026-05-08 12:39:33 -05:00
Geza Lore 7c5069c7df
Fix exponential expansion in V3Gate (#7550)
Unfortunate constellation of combinational assignments could be inlined
by V3Gate yielding an exponential expansion (added test used to consume
4GB+ memory and generate 3GB+ code).
2026-05-07 22:01:08 -05:00
Geza Lore db8b6ce26d Add peak memory usage to --stats 2026-05-07 20:28:47 -05:00
Todd Strader 752b77ea77
Fix events in observed region (#7546) 2026-05-07 17:02:41 -04:00
Kamil Danecki 1a367a13fc
Fix side effect internal error (#7519) (#7540) (#7544) 2026-05-07 09:21:04 -04:00
Yogish Sekhar ce34f1a070
Improve FSM Detection when state variables are non-enums (#7529) 2026-05-07 06:53:19 -04:00
em2machine d5f9385e9c
Fix class::localparam during elaboration (#7524) (#7534) 2026-05-06 11:46:33 -04:00
github action 252afef499 Apply 'make format' 2026-05-06 11:26:07 +00:00
Yogish Sekhar 22db9d2c66
Add mnemonic to parameter constants in JSON for FSM Coverage (#7531) 2026-05-06 07:25:03 -04:00
Yilou Wang fc49811fd7
Support randsequence production function ports (#7522) 2026-05-04 11:28:17 -04:00
Bartłomiej Chmiel 4e349971d3
Support `s_eventually` (#7291) (#7508) 2026-05-04 09:57:03 -04:00
Yilou Wang bc1acc8aa3
Support followed-by operators `#-#` and `#=#` in properties (#7523) 2026-05-04 08:10:37 -04:00
Yilou Wang 8011f9a796
Internals: V3AssertNfa: hoist sampled(propp) into a per-property temp (#7502) (#7525)
Fixes #7502.
2026-05-02 12:13:58 -04:00
Kamil Danecki 659274e45d
Fix array indexing side effects in compound assignments (#7519) 2026-05-01 20:35:51 -04:00
Igor Zaworski 25d4827bd5
Internals: Four state pre-pull (types) (#7520) 2026-04-30 16:56:15 -04:00
Artur Bieniek ec03edcddd
Support functions on RHS of force (#7491)
Signed-off-by: Artur Bieniek <abieniek@antmicro.com>
2026-04-30 10:38:07 -04:00
Wilson Snyder dd75c4cd1b Revert: 21020ea2: Support printing enum names for %p and %s (#5523 revert) (#7338 revert) (#7521 test) 2026-04-30 10:29:47 -04:00
github action 021f5f7d02 Apply 'make format' 2026-04-30 11:23:36 +00:00
Yogish Sekhar 7f01806e15
Improve FSM coverage detection (#7490) 2026-04-30 07:22:34 -04:00
Nick Brereton 21020ea2d1
Support printing enum names for %p and %s (#5523) (#7338) 2026-04-30 07:15:38 -04:00
em2machine d15b1fba94
Fix $bits on local struct with chained-interface (#7515) (#7517) 2026-04-30 07:12:11 -04:00
Yilou Wang 4befec4463
Support rand_mode() on static rand class members (#7484) (#7510) 2026-04-29 17:07:27 -04:00
Nikolai Kumar 4ebc4f1eee
Fix V3Assert stale failsp after recursive iteration (#7500) (#7513)
Fixes #7500.
2026-04-29 05:18:12 -04:00
Wilson Snyder 8f18f0cf22 Fix internal error instead of missing prototype error (#7485). [Alex Solomatnikov]
Fixes #7485.
2026-04-28 17:59:18 -04:00
Todd Strader 0188679631
Fix expression coverage in loops (#7511) 2026-04-28 15:33:41 -04:00
Yilou Wang 76c1b26e3b
Support `obj.randomize(null)` (#7487) (#7509) 2026-04-28 15:31:08 -04:00
Nikolai Kumar 93c594e18a
Fix mailbox#(packed_struct) type mismatch with parameterized class (#7494) (#7495) 2026-04-28 15:25:37 -04:00
Yilou Wang bb1bfabab3
Fix internal error on multi-cycle SVA under default clocking (#7472) (#7506) 2026-04-28 06:50:16 -04:00
Yilou Wang 327fc4ffbe
Support randomize() with (identifier_list) {constraint_block} (#7486) (#7507)
Fixes #7486.
2026-04-28 06:10:53 -04:00
Yilou Wang 5d1b4fe8a8
Fix generic interface port forwarded to a nested instance (#7454) (#7457)
Fixes #7454.
2026-04-27 21:15:25 -04:00
github action c460f0e6a0 Apply 'make format' 2026-04-27 21:05:49 +00:00
Nikolay Puzanov 4437ae79e7
Fix virtual interface method call inlining and IMPURE suppression (#7505) 2026-04-27 16:58:30 -04:00
Geza Lore cee174c4b6
Fix inlining static initializer in V3Gate (#7503)
V3Gate could incorrectly inline a non-constant static initializer of
a variable into the use site if there are no other drivers. Disabling.

Fixes #5381
2026-04-27 16:58:38 +01:00
Yilou Wang c8893b64de
Support `always` / `always[m:n]` / `s_always[m:n]` property operators (#7482) 2026-04-27 08:20:34 -04:00
hjsanjana 982b9ee219
Fix std::randomize internal error on static member of different class (#7498) (#7499)
Fixes #7498.
2026-04-26 06:24:40 -04:00
em2machine b1d3d63e9f
Fix for unction argument expects a class refetence (#7483) (#7489)
Fixes #7483.
2026-04-24 10:31:57 +02:00
em2machine 121fd3f613
Fix module parameters not re-evaluated upon instantiation (#7463) (#7477) 2026-04-23 12:30:42 -04:00
Geza Lore ba3937734f
Optimize mix of Concat/Extend assignments (#7479)
Generalize concatenation splitting/balancing in V3FuncOpt to also handle
AstExtend (which is a Concat with a 0 LHS).
2026-04-23 16:57:43 +01:00
Alex Zhou 7e0f25b41b
Fix access to static variable inside function (#7474) (#7475)
Fixes #7474.
2026-04-23 11:17:14 -04:00
Yilou Wang 27e7fdc9eb
Fix std::randomize inside {typedef array} internal error (#7481)
Fixes #7481.
2026-04-23 11:16:24 -04:00