Commit Graph
1585 Commits
Author SHA1 Message Date
Geza Lore 348b9b6209 Internals: Make the constant pool a regular package (#8512)
The constant pool is now an ordinary package, created with the netlist
and instantiated under $root like any other package, and most special
handling has been removed, including AstConstPool. Lookups go through
V3ConstPool, which has a singleton instance owned by V3Global. Static
methods on V3Common form the public interfce to add/find constant pool
entries.

With that, the constant pool is usable at any stage during compilation,
so enum and dimension tables created by V3Width, and enum value tables
created by V3Randomize now also live in the constant pool instead of
$unit, so identical tables are shared.

Associative array constants are handled separately from unpacked
tables, which used to be broken but unused.

Emitted constant pool variables use direct initialization, and
`constinit` with C++20 where the type allows it. This ensures we don't
change a run-time in a way that would result in unintended code size
increase.

-fno-merge-const-pool, which was introduced years ago but never prompted
a bug report is deprecated and has no effect.

This is also prep for future work.
2026-09-27 13:25:41 +01:00
Marco Bartoli 3a76b29cb3 Add --coverage-max-bins and --coverage-max-real-bins and optimize covergroup bin generation (#8499) 2026-09-25 13:23:46 -04:00
Ryszard Rozak 0e0ce2be52 Fix mis-setting of process state from FINISHED to KILLED (#8506)
Signed-off-by: Ryszard Rozak <[email protected]>
2026-09-25 09:43:55 -04:00
Ryszard Rozak 765d05acf8 Fix semaphore waiting on killed process (#8505)
Signed-off-by: Ryszard Rozak <[email protected]>
2026-09-25 09:27:36 -04:00
Marco Bartoli 1aa5ab2e3a Support weight in coverage (#8472) 2026-09-24 14:01:45 -04:00
Artur Bieniek e9f60f3282 Fix model failing when host has fewer cores than --threads (#8475)
Signed-off-by: Artur Bieniek <[email protected]>
2026-09-23 13:52:47 -04:00
David Harris fe4b3bdec4 Fix $sscanf/$fscanf returning -1 after a partial match (#8457) (#8459) 2026-09-23 05:35:17 -04:00
Marco Bartoli 39e2d8e853 Support dynamic cross layouts and fix covergroup bin exclusions priority (#8424) 2026-09-22 20:44:25 -04:00
Wilson Snyder 5dab8ab576 Commentary 2026-09-22 09:13:31 -04:00
Wilson Snyder f883b1c858 Commentary. No functional change 2026-09-22 07:20:46 -04:00
Kristof Marien a50aea7709 Fix streaming dynamic arrays with different element types failing to compile (#8434) (#8435) 2026-09-21 20:57:03 -04:00
Kornel Uriasz ba1961c70b Fix unique constraint with multiple arrays (#8378)
Signed-off-by: Kornel Uriasz <[email protected]>
2026-09-21 17:47:18 -04:00
Wilson Snyder d321a5fa5d Update IEEE references 2026-09-21 08:46:58 -04:00
Marco Bartoli dc946aee2b Support enclosing cross identifiers in bin selections (#8416) 2026-09-20 08:57:14 -04:00
Nick Brereton a93317b6cc tests: Add VM_PREFIX_INCLUDE_DPI (#8386) 2026-09-18 17:29:53 -04:00
Marco Bartoli 830cb633e5 Optimize covergroup bin metadata lookup (#8404) 2026-09-18 14:25:37 -04:00
Ryszard Rozak c25f287779 Fix copy constructor of classes with constraints (#8381) 2026-09-18 07:47:25 -04:00
Nick Brereton 3fd16ed498 Internals: Hoist vpi_put_value_array argument validation to entry point. (#8384) 2026-09-17 18:08:16 -04:00
Geza Lore 2d0eaab5df Add -fno-slp-vectorize if C++ compiler is clang 18 (#8383)
Partial #8379
2026-09-17 18:38:39 +01:00
Nick Brereton bc7fd47908 Internals: Prepare VPI runtime for lazy public signals. No functional change. (#8382) 2026-09-17 13:00:19 -04:00
Marco Bartoli 1aa87913c8 Support illegal_bins and ignore_bins for cross bins (#8372) 2026-09-16 17:53:15 -04:00
Marco Bartoli 08cadc034d Reland and fix "Fix wide enum names" (#8344) (#8362) (#8365) (#8366) 2026-09-16 17:47:51 -04:00
Wilson Snyder a9ddb4fab3 Revert "Fix wide enum names" (#8344) (#8362) 2026-09-15 13:42:35 -04:00
Marco Bartoli c65f312d6e Fix wide enum names (#8344) 2026-09-14 16:29:42 -04:00
Marco Bartoli fb8bcdc0df Fix format of signed enums (#8338) 2026-09-13 13:34:10 -04:00
Marco Bartoli 47ead4e89d Support logic and set operations on binsof (#8306) 2026-09-13 12:59:10 -04:00
Todd Strader 0c574618d0 Support VPI interface references (#8081) 2026-09-12 05:38:20 -04:00
Nick Brereton dada720bca Internals: Inline VerilatedContext::assertCtlGet (#8320) 2026-09-10 15:48:58 -04:00
Geza Lore e4f210eb38 Optimize Dfg algorithms with an open addressing hash table (#8307)
This patch introduces V3HashTable.h, which defines an open addressing,
linear probing hash table. The table implement the public V3HashSet and
V3HashMap templates, which are generic containers. The benefit of this
over std::unordered_map and std::unordered_set is far better memory
locality during lookup. (The STL containers use chaining and require a
new heap allocation for every insertion, similarly probing involves
pointer chasing on collisions).

The new data structure is use in V3DfgCache, and V3DfgCse and yields a
significant speed improvement of those passes on large designs.
2026-09-08 23:21:13 +01:00
Matthew Ballance 048d18a84f Add covergroup runtime registry (#8134) 2026-09-07 14:02:03 -04:00
Marco Frank 63bcfff80a Fix array slice crash when used as a bare value (#5132) (#8262) 2026-09-06 20:57:44 -04:00
Marco Bartoli 9da900a5e2 Add initial support for solo binsof (#8298) 2026-09-06 19:51:31 -04:00
Marco Bartoli 0b824f160f Fix escape strings in pattern formatting (#8297) 2026-09-06 13:22:03 -04:00
Kamil Danecki 73708c55c3 Support nested array and associative array element member access in constraint 1/4 - pre-cleanup (#8237)
Signed-off-by: Kamil Danecki <[email protected]>
2026-09-05 15:33:24 -04:00
Sumanth KadiyalaandSumanth Kadiyala 3990376c57 Internals: resolved incorrect array bounds guarding (#8224)
Co-authored-by: Sumanth Kadiyala <[email protected]>
2026-09-05 15:33:06 -04:00
Geza Lore d04647f459 Fix library method argument references (#8252)
Each VCMethod now carries a signature describing the access required of
the references passed as arguments to the call. 'r' if the argument is
read, 'w' if it is fully assigned so the old value does not matter, 'm'
if it is modified (or only conditionally assigned), with a trailing '+'
repeating the preceding entry for all remaining arguments.  Signatures
are validated at compile time, and V3Broken checks the arguments of
every AstCMethodHard against them.

The incorrect references this found and that are easy to fix are
repaired in this patch. "TODO" marks method that are currently broken or
not yet fit the scheme, these will be fixed in follow up patches.

Also renames SCHED_COMMIT and SCHED_ENQUEUE to NBA_COMMIT and
NBA_ENQUEUE, and remove unused methods.
2026-09-05 19:48:07 +01:00
Aditya Shevade a6e21e0eb7 Fix phased solve...before diversity (#8189) (#8194) 2026-09-05 14:06:57 -04:00
Wilson Snyder e012f7c79d Fix segmentation fault on context destruction (#8265).
Fixes #8265.
2026-09-02 08:00:32 -04:00
Szymon Gizler be83d1393d Fix continuing on wait(0) (#7372) (#8231) 2026-08-31 13:06:23 -04:00
Paul Rigge 2954756190 Fix VL_MULS_* UB on signed int overflow (#8247) (#8248) 2026-08-28 14:53:22 -04:00
Jakub Wasilewski 2f856971ed Add Unigen2 constrained randomization algorithm (#8042)
Signed-off-by: Jakub Wasilewski <[email protected]>
2026-08-27 08:33:14 -04:00
Geza Lore 8546d5db06 Internals: Move the eval loop into the runtime library (#8225)
The loops modelling the SystemVerilog scheduling regions are no longer
generated. They now live in 'VerilatedEvalLoop' in the runtime library.
The generated model holds one as a member, passing itself to it, and
exposes each evaluation entry point to it as a pure virtual method on
VerilatedModel. The model's 'eval' and 'eval_step' remain the top level
entry points, and are backward compatible.

V3Sched no longer emits '_eval' or '_eval_settle', etc.. Instead every
evaluation entry point called from the runtime is enumerated by 'VEval',

Scheduling creates all entry points, for all scheduling regions, even if
they are empty, and the runtime eval loop calls everything
unconditionally. If regions are empty, this is simply a call to an empty
function. This will hurt performance on very small models, but should
not be noticeable on anything meaningful, so it is likely best to keep
to reduce complexity.

A scheduling entry points evaluate a single iteration and returns
whether it did any work, they are effectively the previous
`_eval_phase_*` functions.
2026-08-27 07:53:02 -04:00
Aliaksei Chapyzhenka 5e4151e3e0 Internals: Add WASI (wasm32-wasip1) build support (#8216) (#8217) 2026-08-25 19:13:07 -04:00
Yilou Wang 8cbaf505ee Fix solver session stability to avoid breaking randomize (#7991) 2026-08-25 13:13:59 -04:00
Yilou Wang 67cbc36ef0 Fix randomize misreading solver replies and applying partial models (Part3a of #7991) (#8136) 2026-08-24 18:14:06 -04:00
Wilson Snyder fd319beb8a Internals: Cleanup code duplication. No functional change intended. 2026-08-21 16:51:19 -04:00
Wilson Snyder 99c26d3994 Update linfstwriter from upstream (#7193 prep) (#8181) 2026-08-21 16:35:15 +02:00
Andrii e717c513e9 Fix null pointer dereference in killQueue (#8171)
Signed-off-by: Andrii Andrieiev <[email protected]>
2026-08-20 10:55:45 +02:00
Geza Lore 94a63dd407 Fix streaming concatenation uninitialized RMW access (#8143) 2026-08-18 12:03:51 +02:00
Kornel Uriasz 74d12c5b5e Fix 'get-value' for empty constrained arrays (#8138)
Signed-off-by: Kornel Uriasz <[email protected]>
2026-08-18 10:05:00 +02:00