Commit Graph

6550 Commits

Author SHA1 Message Date
Nick Brereton 25377b20af
Optimize VPI symbol registration and scope construction (#7936) 2026-07-15 10:31:42 -04:00
Kornel Uriasz d9fdc20492
Internals: V3Randomize.cpp cleanup (#7937). No functional change. 2026-07-15 05:32:56 -07:00
Wilson Snyder 5ead758f28 Internals: Use addNextNull. No functional change intended. 2026-07-14 19:58:25 -04:00
Igor Zaworski 3b43b304a3
Add error on static virtual functions (#7932) 2026-07-14 05:12:26 -07:00
Marco Bartoli 3afb7e1a21
Internals: Refactor disable process queue plumbing (#7919) 2026-07-13 21:25:35 -04:00
Jeffrey Song e24efae5a0
Fix stream concatenation in init array patterns (#7890 repair) (#7928) 2026-07-13 20:29:19 -04:00
Nick Brereton dde8de0a0d
Fix crash streaming an unpacked array of unpacked structs (#7917) 2026-07-11 20:31:01 -07:00
Yilou Wang 7ca78a75e7
Fix scoped randomize with array members under rand_mode (#7877) 2026-07-11 20:28:49 -07:00
Yilou Wang ec124a0905
Fix mid-window disable iff (#7792) (#7869)
Fixes #7792
2026-07-11 20:44:56 -04:00
Yilou Wang ca83bc50bf
Fix solve-before over array variables failing randomization (#7876) 2026-07-11 20:44:37 -04:00
Geza Lore 52287c025f
Tests: Add TSan and failing multi-threaded data race test (#7913)
PR #7902 uncovered a pre-existing bug in multi-threaded scheduling,
where we can end up with an un-ordered R-W hazard in the MTask graph,
resulting in non-deterministic runtime behaviour.

This is extremely hard to actually trigger on a small example, so using
ThreadSanitizer to flag it, which can identify the race reliably.

In this patch:
- Add configure and `verilator --get-supported TSAN` to check if the
  configured compiler supports ThreadSanitizer
- Add a --tsan option to the test driver.py which builds the test with
  thread sanitizer (similar idea to --gdbsim).
- Add a tests.enable_tsan() method to allow turning on TSan in the test
  Python file.
- Add a suppressions file that waives TSan errors in the runtime library
- Finally add `t_sched_hybrid_hazard` that demonstrates the data race
  triggered after #7902. This is currently expected failing, fix later.

With the suppression, there are 17 vltmt tests failing due races in the
generated code. (Using `driver.py --vltmt --tsan --quiet -j0`)
2026-07-10 14:34:51 +01:00
Yogish Sekhar 3c7727a8f4
Fix spurious FSM COVERIGN on datapath comparisons (#7900) (#7908)
Fixes #7900.
2026-07-10 09:00:17 -04:00
Artur Bieniek feb2fe0d94
Fix release of forced port nets (#7907) (#7901)
Fixes# 7901

Signed-off-by: Artur Bieniek <abieniek@antmicro.com>
2026-07-10 11:35:06 +01:00
Artur Bieniek b211af9d24
Fix independent force of multiply instantiated signals (#7905)
Signed-off-by: Artur Bieniek <abieniek@antmicro.com>
2026-07-10 11:31:08 +01:00
Kornel Uriasz 9740203485
Fix VL_TO_STRING function for array of structs (#7912)
Signed-off-by: Kornel Uriasz <kuriasz@antmicro.com>
2026-07-09 08:40:24 -07:00
github action 1d42c45a34 Apply 'make format' [ci skip] 2026-07-09 12:46:08 +00:00
Jaeuk Lee 38895f8f29
Fix $display accepting streaming concat arguments (#7663) (#7890)
Fixes #7663.
2026-07-09 08:41:40 -04:00
Wilson Snyder f316ec0d66 Revert #7836: Fix scheduling of variables written in non-inlined functions in suspendable processes (#7836) 2026-07-08 14:45:05 -04:00
Patrick Creighton c7e8075972
Fix --coverage on labelled inline assert/cover property (#7898) (#7904)
Fixes #7898
2026-07-08 09:18:33 -07:00
Jakub Michalski 646dcd3838
Support user-provided DPI-C function declarations (#7626) (#7893)
Fixes #7626.
2026-07-08 05:22:24 -07:00
Artur Bieniek 6c20fdb7bd
Optimize assertion NFAs using bit-vector ring buffers (#7885)
Signed-off-by: Artur Bieniek <abieniek@antmicro.com>
2026-07-07 19:26:50 -04:00
Geza Lore e743838d09
Internals: Remove DfgGraph::clone (#7896)
Only used by V3DfgBreakCycles, which today either improves the graph, or
leaves it unchanged. Remove unnecessary complexity.
2026-07-07 20:51:40 +01:00
Yilou Wang f1a8192a36
Fix mixed-width inside and dist range bounds failing randomization (#7875) 2026-07-07 11:26:19 -07:00
Matthew Ballance 87d77f0133
Fix internal error for coverpoints that reference a covergroup formal parameter (#7853 partial) (#7889) 2026-07-07 11:42:39 -04:00
Igor Zaworski aca58ca90f
Fix scheduling of variables written in non-inlined functions in suspendable processes (#7836)
Signed-off-by: Igor Zaworski <izaworski@antmicro.com>
2026-07-07 12:34:24 +01:00
Artur Bieniek a5f4d40901
Fix range delays with parameter bounds (#7882)
Signed-off-by: Artur Bieniek <abieniek@antmicro.com>
2026-07-06 13:13:11 -04:00
Yilou Wang 8ed0acf1ec
Support a sequence used as an event control (#7797) (#7846) 2026-07-06 13:12:01 -04:00
Geza Lore a518efbedb
Internals: Prepare V3DfgBreakCycles to support multi-dimensional arrays (#7867)
This is prep for more array support later. Minor functional improvement
for tracing arrays, but no meaningful change.
2026-07-05 11:40:08 +01:00
Geza Lore 2285e5b6da
Optimize more always blocks in Dfg (#7775)
Optimize always blocks that:
- drive an unused variable (so logic can be pruned)
- write only a single variable (regardless of CFG size)
2026-07-05 09:24:01 +01:00
Geza Lore 566f4e6efc
Internals: Add new VL_RESTORER flavours (#7866)
Restrict VL_RESTORER to be usable only with trivially copyable types.
Introduce VL_RESTORER_COPY and VL_RESTORER_CLEAR, which are more
efficient versions usable for non trivially copyable types.

VL_RESTORER_COPY semantically behaves the same as VL_RESTORER, but only
does one copy at initialization, and on scope exit restores via a move.

VL_RESTORER_CLEAR swaps the variable with an new one constructed via
the no-args constructor (e.g. empty collection), which does not require
any copying at any point.

Static assertions enforce picking one of the new flavours when copying
might be expensive.
2026-07-04 17:27:07 +01:00
Wilson Snyder 83eb54ec7e Fix wild compare operators on strings 2026-07-04 11:05:34 -04:00
Wilson Snyder 12fab5d5d7 Tests: Cleanup some cross-simulator test differences 2026-07-03 13:00:23 -04:00
Pawel Klopotek 7ece66d06e
Fix unique0 case side effects (#7787) 2026-07-03 12:49:21 -04:00
Eryk Szpotański a64234e897
Add comments as a branch description in coverage .info files (#7843)
Signed-off-by: Eryk Szpotanski <eszpotanski@antmicro.com>
2026-07-03 11:18:29 -04:00
Geza Lore 0e371d6e5c Fix cleaning purity cache after assertions 2026-07-02 17:47:09 +01:00
Jakub Michalski 853ee5df17
Fix DFG misoptimizing bound checks (#7755)
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
2026-07-02 11:33:38 +01:00
Sergey Chusov 1ea10ba71c
Fix class scope '::' reference through an inherited type parameter (#7844) 2026-07-01 15:58:35 -04:00
Joshua Leahy cf7e3f791a
Fix covergroups without --coverage (#7848) (#7849)
Fixes #7848.
2026-06-29 10:56:59 -04:00
Wilson Snyder 9448e4366c Fix MSVC warning. No functional change. 2026-06-28 09:47:53 -04:00
Nick Brereton 59b85f670b
Fix constant pool recache after dead scope removal (#7845) 2026-06-28 09:30:48 -04:00
Matthew Ballance d023b3b075
Support dynamic loading of VPI extensions (#7727) 2026-06-28 09:28:09 -04:00
Yilou Wang 3853301367
Fix disable iff ignored when its condition is held continuously true (#7841) 2026-06-26 06:00:44 -04:00
Geza Lore 2d157b29b0 Optimize assetOn checks furter 2026-06-25 20:12:49 +01:00
Yilou Wang f0f1c44dd6
Fix object randomization skipped by an unrelated global constraint (#7833) (#7838)
Fixes #7833.
2026-06-25 09:30:05 -04:00
Geza Lore b73a897db3
Optimize module inlining heuristic (#7837)
Rewrite module inlining decision to be based on a bipartite Module/Cell
graph, similar to V3InlineCFuncs. Preserved all old heuristics, but
added 2 new ones:

- If a module, and all the sub-hierarchy below it, is less than 10% the
  total flattened size of the design, then flatten the contents of that
  module (but the module itself is not necessarily inlined).

- If the flattened size of all instances of a module is less than 20% of
  the total flattened size of the design, then inline all instances of
  that module.

These are both relative to the total size of the design, so they
auto-scale with complexity. The net effect is that large shared
instances are preserved, but their contents are flattened out. E.g. in a
multi-core CPU this would keep the cores non-inlined but flatten out
most everything else. This still enables V3Combining and sharing those
later, but avoids potentially big overheads e.g. with small widely used
library modules.

Empirically this yields less generated C++ than the previous version
(due to removing lots of small functions), and can improve performance
10-20% while still having meaningful combining relative to the size of
the design.
2026-06-25 14:14:15 +01:00
Yilou Wang 000afcf52d
Support variable-length intersect in SVA sequences (#7835) 2026-06-25 04:41:53 -07:00
Wolfgang Mayerwieser 249608a42f
Fix performance on large package-scoped structs (#7830) 2026-06-24 19:43:24 -07:00
Ryszard Rozak def1e2ccbc
Fix lifetime of expression coverage variable (#7834)
Signed-off-by: Ryszard Rozak <rrozak@antmicro.com>
2026-06-24 09:59:32 -04:00
Yilou Wang 9462c2a910
Fix unclocked concurrent assertion misreported as unsupported (#7831) 2026-06-24 09:44:47 -04:00
Matthew Ballance d456384d39
Support hierarchical reference cross members (#7749) (#7820) 2026-06-24 07:47:36 -04:00