1079 Commits
Author SHA1 Message Date
Wilson Snyder 667f64813f Commentary: Changes update 2026-09-01 08:46:25 -04:00
Wilson Snyder 0f96460042 Commentary: Changes update 2026-08-29 11:46:16 -04:00
Geza Lore dcf45da1c0 Fix excessive SIMILARNAME warnings (#8233) 2026-08-28 15:55:41 -04:00
Paul Rigge 2954756190 Fix VL_MULS_* UB on signed int overflow (#8247) (#8248) 2026-08-28 14:53:22 -04:00
Geza Lore c64afda7fc Fix MULTIDRIVENPROC on static loop induction variables (#8242)
Disable MULTIDRIVENPROC for static variables used as loop induction
variables. Same way as we disable similar warning in Dfg. While bad
style and bad for performance, it's common legacy code style.
2026-08-28 15:27:50 +02: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
Eddie Rydell 7bff0196b1 Fix procedural tristate assignment overrides (#6785) (#8130) 2026-08-26 19:23:46 -04:00
Geza Lore 087b15bdb3 Remove source location from DIDNOTCONVERGE error (#8225 prep) (#8227) 2026-08-26 04:55:36 -04:00
Aisha b23b53227d Fix SIMILARNAME warning on parameters and localparams (#8186) (#8226) 2026-08-25 16:19:41 -04:00
Artur Bieniek f6d56c6440 Optimize consecutive repetiton and goto repetition using ring-buffer (#8096) 2026-08-25 08:26:46 -04:00
Wilson Snyder 6fc18710bd Commentary: Changes update 2026-08-24 18:16:58 -04:00
Artur Bieniek 33ad9d530e Fix V3Width SVA bound limit guard, leave headroom for alignment, respect --max-num-width (#8192)
Signed-off-by: Artur Bieniek <[email protected]>
2026-08-24 08:57:18 -04:00
Wilson Snyder d18bcc2a69 Commentary: Changes update 2026-08-23 16:24:59 -04:00
Aditya Shevade d5f7878eb4 Fix internal error on an enum literal inside a with lambda body (#8190) (#8193) 2026-08-23 07:47:43 -04:00
Artur Bieniek 3dbfa7708f Add NEVERMATCH warning when an SVA sequence can never match (#8176) (#8183)
Signed-off-by: Artur Bieniek <[email protected]>
2026-08-22 08:31:23 +02:00
Geza Lore ba893abb2c Optimize circular logic in Dfg (#7902)
Introduce a new DfgPrev vertex, representing the value of a variable
before any in-graph assignments. This can be used to break all remaining
cycles in the graph, so all Dfgs become acyclic after V3DfgBreakCycles.
The circular dataflow is still represented, and is taken care of by the
scheduler, it is just the DfgGraph that represents the logic that
becomes acyclic.

This makes V3DfgBreakCycles a mandatory transform, so drop the disabling
-fno-dfg-break-cycles option (still parsed, but has no effect).

Note the effect of this is small, as most cycles can be fixed up by
driver tracing, which is unchanged, but this is required for some
upcoming work.
2026-08-18 14:54:12 +02:00
Sunimali Rathnayake 2d8d8add42 Fix public table offsets larger than 32 bits (#8135) 2026-08-18 08:06:53 +02:00
Demin Han 743e0f4a82 Fix the clang compilation using pch (#8105)
Signed-off-by: Demin Han <[email protected]>
2026-08-14 12:19:28 -04:00
Sumanth KadiyalaandSumanth Kadiyala 44fe96b2da Add +verilator+assert+lock to ignore RTL assert control statements (#8086)
Co-authored-by: Sumanth Kadiyala <[email protected]>
2026-08-12 19:13:02 -04:00
Wilson Snyder 0b51926fff Commentary: Changes update 2026-08-11 20:05:01 -04:00
Paul Campbell 5d888d2ac0 Add SIMILARNAME warning when variables have names that only differ in lexical case (#7992) (#8020) 2026-08-10 06:57:58 -04:00
Tyrone Marhguy 86fa00416d Fix Linux peak memory stat to use VmHWM (#8022) (#8070) 2026-08-09 15:37:57 -04:00
Wilson Snyder 18844537bd Commentary: Changes update 2026-08-08 12:58:32 -04:00
Marco Brambilla 1f164d7ee0 Fix wait fork trigger temporary split across generated functions (#7985) (#7986)
splitCheck() cuts a function's top level statement list on node count
alone, ignoring AstVar declarations in that list. localizeVars() puts the
dynamic trigger temporaries there, which a 'wait fork' reaches, so the
declaration could land in one sub-function and its references in another.
Sub-functions are emitted as separate C++ functions, so the output failed
to compile:

    error: '__Vtrigprevexpr_h5d9da2ce__0' was not declared in this scope

V3InlineCFuncs could also inline the sub-function holding the declaration
and free the AstVar while other sub-functions still referenced it, which
--debug reports as a broken link and which segfaults an -O3 build.

The existing "Can't split function with local variables" assertion only
checked AstCFunc::varsp(), not declarations among the statements.

Only allow a sub-function boundary where it does not separate a local
declaration from a reference to it. This keeps the temporaries function
local, as #6859 requires, while restoring the guarantee #5822 made that
splitting cannot orphan them.

Signed-off-by: Marco Brambilla <[email protected]>
2026-08-05 17:33:58 +01:00
Sumanth KadiyalaandSumanth Kadiyala 472a131df7 Fix nondeterminism in trace stage (#8046)
Co-authored-by: Sumanth Kadiyala <[email protected]>
2026-08-05 02:51:51 -04:00
JOTEGO ba8e4f9dec Fix gate deduplication with function arguments (#8038) 2026-08-04 04:36:25 -04:00
David Garau a24dd8b2dc Fix generic interface param resolution in module/cell parameterization (#7970) (#7971) 2026-08-03 05:18:59 -04:00
Aisha 29fd2cf90d Add MULTIDRIVEN checks for clocking block outputs (#7987) 2026-08-03 04:54:43 -04:00
BRDR LIFE 5fd1c93d43 Fix randomize() with shadowing a user variable named 'item' (#7993) (#7994)
Fixes #7993.
2026-07-28 12:29:45 -04:00
spomatasmd a6f4dd031f Fix DfgPeephole miscompile of nested shifts with overflowing shift amount (#7977)
The REPLACE_SHIFTL_SHIFTL and REPLACE_SHIFTR_SHIFTR peephole optimizations
fold '(a << b) << c' into 'a << (b + c)' (and likewise for '>>'), but computed
'b + c' in the width of the shift-amount operand. When 'b + c' overflows that
width it wraps around, producing a too-small shift amount and a wrong result.

Compute the sum one bit wider than the amounts so it cannot overflow.

Fixes #7955
2026-07-28 10:42:51 +01:00
Aisha 8f8b5ade55 Add MULTIDRIVENPROC warning for signals driven by multiple plain always blocks (#7968) 2026-07-24 08:54:09 -04:00
Bartosz Skorowski 176e333774 Fix lambda parameter types in queue min and max (#7962)
Signed-off-by: Bartosz Skorowski <[email protected]>
2026-07-20 06:53:40 -04:00
Eryk Szpotański f39c1799d2 Commentary: Fix the verilator_coverage -filter-type documentation (#7949)
Signed-off-by: Eryk Szpotanski <[email protected]>
2026-07-17 08:18:43 -04:00
Andrii affe4cde57 Fix class parameter resolution (#7935) 2026-07-15 10:56:22 -04:00
Wilson Snyder 34603ebd60 Commentary: Changes update 2026-07-14 19:55:50 -04:00
Jeffrey Song 4262aea87c Internals: Use snprintf for random unique indexes (#7925) 2026-07-13 11:35:22 -07: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
Wilson Snyder 3bd04a70bd Commentary (#7916) 2026-07-10 08:38:01 -04:00
Jaeuk Lee 38895f8f29 Fix $display accepting streaming concat arguments (#7663) (#7890)
Fixes #7663.
2026-07-09 08:41:40 -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
Wilson Snyder f82f59a024 Commentary: Changes update 2026-07-03 13:01:05 -04:00
Eryk Szpotański a64234e897 Add comments as a branch description in coverage .info files (#7843)
Signed-off-by: Eryk Szpotanski <[email protected]>
2026-07-03 11:18:29 -04:00
Dragon-Git 58bd13b623 Fix heap-use-after-free in VlRNG::VlRNG() (#7865) 2026-07-03 06:38:48 -04:00
Wilson Snyder 964474837f Commentary 2026-07-01 19:37:12 -04: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 276f2f344d Commentary: Changes update 2026-06-28 16:15:54 -04:00
Matthew Ballance d023b3b075 Support dynamic loading of VPI extensions (#7727) 2026-06-28 09:28:09 -04:00