Commit Graph
10454 Commits
Author SHA1 Message Date
Saqib Khan 9d9d367302 Support waiting on clocking block event through modport (#8403) (#8530) 2026-09-29 08:50:57 -04:00
Wilson Snyder 647b2056ed Fix verilator_coverage reports rounding incomplete coverage to 100.0% (#8523).
Fixes #8523.
2026-09-29 08:50:20 -04:00
Wilson Snyder 2c32da73c3 Commentary: Changes update 2026-09-29 08:37:08 -04:00
Geza Lore b3139df707 Fix emitting public parameters (#8520)
Fixes #8520, #8512 repair.
2026-09-29 12:23:40 +01:00
Geza Lore da4903f721 Fix bear version detection if uninstalled
Fallout from b8068fad46 The CI 'test' jobs
has no 'bear' installed but attempted to run due to caching the result
of the version check on disk. Check every time instead of caching.
2026-09-29 11:20:45 +01:00
Kristof Marien 640607a0d0 Fix rand_mode(0) not preserving dynamic array of struct values used in a dist constraint (#8508) (#8509) 2026-09-28 22:23:01 -04:00
Wilson Snyder f83ed971e2 Use reversable base64 for -generate-key 2026-09-28 20:11:31 -04:00
Wilson Snyder b8068fad46 CI: Make twice to see errors easier 2026-09-28 19:59:13 -04:00
Wilson Snyder bafdae1847 Internals: Favor constexpr for constants. No functional change intended. (#8521) 2026-09-28 19:58:56 -04:00
Marco Bartoli bde1b98ee0 Support coverpoint bin 'with' filters (#8518) 2026-09-28 18:29:54 -04:00
Kamil Danecki a949674a6b Support nested array and associative array element member access in constraint 3/4 - associative arrays (#8244)
Signed-off-by: Kamil Danecki <[email protected]>
2026-09-28 08:08:57 -04:00
Ethan Sifferman 510ae7b38b Fix duplicate struct declaration when inlining (#8515) 2026-09-28 09:41:56 +01:00
verilator-bot[bot] f5f9ddef9c Apply 'make format' 2026-09-28 01:06:50 +00:00
Marco Bartoli 4ab229e659 Support wildcard bins (#8516) 2026-09-27 21:06:09 -04:00
Michael Bedford Taylor 2c441d853c Optimize DFG temporary sharing across module instances (#8456) 2026-09-28 00:46:27 +01:00
Wilson Snyder c30604222f Tests: Fix stale file reference 2026-09-27 14:31:42 -04:00
Marco Bartoli a933e723c2 Support covergroup fixed-size bin arrays (#8514) 2026-09-27 13:57:38 -04:00
Wilson Snyder 6956befd29 Tests: Reformat some tests to mostly verilog-format standard. No test functional change. 2026-09-27 13:41:11 -04:00
Wilson Snyder f691cd1936 Change --protect to use SHA512 per IEEE 1735. 2026-09-27 13:34:11 -04:00
Wilson Snyder 626333df02 Commentary: Changes update 2026-09-27 13:28:00 -04:00
Geza Lore 43c3c88c38 Internals: AstCoverToggle is not an AstNodeStmt (#6280)
It is more akin to an AstAlways, being a module item.
2026-09-27 13:46:58 +01:00
Geza Lore 9e2c30faab CI: Move Code coverage to 26.04 2026-09-27 13:35:03 +01:00
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
Geza Lore d234caafc1 Optimize through package variables in Dfg 2026-09-26 15:01:32 +01:00
Francesco Urbani eec929e40e Support empty queue literals as function and task arguments (#8501) (#8502) 2026-09-26 08:11:49 -04:00
verilator-bot[bot] d1eb78f4e8 Apply 'make format' 2026-09-26 11:03:09 +00:00
Geza Lore 4c4d9cc7d2 CI: Fix previous commit 2026-09-26 12:01:57 +01:00
Geza Lore 98250f6cd2 CI: Format as the Verilator bot when running on main repo 2026-09-26 11:56:58 +01:00
Geza Lore f2114d3dc3 Internals: Make node type hashes stable with Ast changes
Instead of hashing node types by type id (which can change when
adding/removing Ast node types), astgen a stable hash based on node
name. This makes output more stable through Ast node
additions/deletions. Largely to help with 'make test-diff', should have
no user noticeable impact.
2026-09-26 10:37:56 +01:00
Geza Lore 33d63ac0b0 Internals: Identify $unit package by netlist pointer 2026-09-26 07:48:56 +01:00
em2machine 435af6afe6 Internals: Coverage cleanups before UAF fix (#8494) 2026-09-25 18:54:53 -04:00
Ethan Sifferman f6ff5b4cfb Fix elaboration of classes reached through deferred references (#8440) (#8510) 2026-09-25 17:34:47 -04:00
Marco Bartoli 4e29ecbf44 Fix disable fork and wait fork affecting pending NBA updates (#8483) 2026-09-25 16:35:51 -04:00
Deanyone Su 8b663f9c84 Optimize modport resolution with many interface instances (#8496) (#8497) 2026-09-25 14:38:18 -04: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
Geza Lore 2e5e34d426 Internals: Set fabricated variable lifetimes
Set implicit net and traced coverage var lifetimes. No functional change.
2026-09-25 16:33:53 +01: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
Ryszard Rozak ba8e0a1437 Set status of finished process immediately (#8503)
Signed-off-by: Ryszard Rozak <[email protected]>
2026-09-25 09:26:22 -04:00
Geza Lore 84dec259c8 Fix constant oversized shifts in V3Premit
- Arithmetic right shift used the MSB of the C++ type as the sign bit,
  instead of the MSB at the Verilog width.
- Constant shift amounts with their top bit set were treated as
  negative, so the oversized shift was emitted as undefined behavior.
- Shifts of an impure operand were replaced by zero, discarding the
  side effects of the operand.
2026-09-25 14:12:00 +01:00
Geza Lore f2dbf210a8 Fix masking of right shifted values with dirty upper bits (#8500)
Fixes #8500
2026-09-25 11:12:30 +01:00
Geza Lore 1c94fbb5d6 Internals: Remove code dead after recent refactoring (#8498) 2026-09-25 08:30:34 +02:00
Kristof Marien 4202862472 Fix disabled random dynamic array of structs referenced in a constraint (#8454) (#8455) 2026-09-24 20:44:09 -04:00
Geza Lore 02546791da Internals: Remove V3LinkDot::linkDotArrayed (#8495)
Follow up to #8476 and #8493, now that elaboration fully expands
instance arrays, linkDotArrayed's only remaining purpose was to name
AstBegin blocks created after V3Width.

Fix up earlier passes to name all Begin blocks they create, or avoid
creating AstBegin in the first place if possible.

One warning about assigning to a modport input of a generic interface
port had to move into LinkLValue (previously this only used to be
reported by linkDotArrayed, as the type/modportness only resolved in
V3Param, and the lvalueness is subsequently only known in LinkLValue).

Then remove linkDotArrayed and simplify V3LinkDot.cpp
2026-09-24 22:41:24 +01:00
Geza Lore 9e03fed56b Support multi-dim interface instance arrays and interface array ports (#8493)
Companion to #8476, and this now moves all instance array and interface
array/modport array port expansion into elaboration. Fixes #2675.

Arrays of interface instances and interface array ports are now split
into their elements during elaboration, instead of after V3Width in
V3Inst::dearrayAll, which is removed.

Background: next to every interface instance 'intf ifs()', V3LinkCells
creates a companion variable 'ifs__Viftop' of type IfaceRefDType
referring to the instance, so the instantiating module can use the
interface as a value (in pin connections, virtual interface assignments,
arguments, ...) just like a module referring to it through an interface
port. For an array of instances 'intf ifs[N]()', this variable is an
unpacked array of IfaceRefDType, but an IfaceRefDType can only refer to
a single instance, so it must be split into a variable for each element,
and every use of the whole array replaced.

V3Param expands interface instance arrays like module instance arrays,
also splitting the __Viftop variable referencing the whole array into a
variable for each element cell ('ifs__BRA__i__KET____Viftop', the
companion of element cell 'ifs__BRA__i__KET__'), and splits each
interface array port into a variable for each element. The whole array
variables remain until all references to them are replaced, so V3LinkDot
can link hierarchical references to the correct specialization.

In V3Width, every reference to a whole interface array, including
hierarchical ones, is replaced by an AstInitArray of references to its
element variables, typed as the whole array, e.g. 'ifs' becomes
'{ifs[0], ifs[1], ...}. The AstInitArray keeps its own type, so its uses
are checked as those of the whole array. The whole array variables are
removed at the end of V3Width.

V3Width then treats a whole interface array replaced by an AstInitArray
as an ordinary unpacked array value:
- A constant select yields the element, a slice the selected elements.
- A pin of an element of a module instance array selects its part of an
  interface array connection like any other connection.
- A pin of an interface array port is split into a pin for each element
  port, connected left index to left index.
- A member of an element is referenced through the interface, as for
  any other interface.

This supports slices of interface arrays, and interface ports of
multi-dimensional module instance arrays connected to interface arrays.
2026-09-24 19:10:33 +01:00
Marco Bartoli 1aa5ab2e3a Support weight in coverage (#8472) 2026-09-24 14:01:45 -04:00
David Harris 88082a4e96 Support automatic bins for enum coverpoints (#8462) (#8464) 2026-09-24 09:58:22 -04:00
Geza Lore 976ec63531 Support multi dimensional module instance arrays (#2675) (#8476)
Arrays of module instances are now expanded into their element cells
during elaboration in V3Param, instead of after V3Width in
V3Inst::dearrayAll. Element cells are named as before
(name__BRA__i__KET__...), are ordered from the left index to the right
index, and hierarchical references to them resolve in linkDotParamed.

Arrays of interface instances are still expanded by V3Inst. They will
move in a follow up patch.

Algorithmically:
- V3Praram replaces an arrayed AstCell, with a scalar Cell for each
  element. linkDotParamed can resolve against these as normal.
- V3Width then fixes up the AstPins of each expanded Cell according to
  the LRM rules. Either leaving the alone to connect to all instances,
  or inserting ArraySel/Sel to connect the relevant part to the relevant
  instance.

Partial #2675
2026-09-24 10:59:41 +01:00
Marco Bartoli 26dd04c020 Fix ##0 synchronous drive overriding later drives (#8482) 2026-09-23 21:32:14 -04:00
Wilson Snyder 3d386f8fa5 Internals: Add VL_DO_DANGLING in some missing places. No functional change intended. 2026-09-23 18:27:40 -04:00