Compare commits

...
1590 Commits
Author SHA1 Message Date
Wilson Snyder 983a06a16f Merge from master for release. 2026-09-05 08:44:29 -04:00
Wilson Snyder ea338be98e Version bump 2026-09-05 08:28:17 -04:00
Wilson Snyder c8a8f02c09 Commentary: Changes update 2026-09-05 08:27:32 -04:00
Nick Brereton b1c06fdb09 Fix use-after-free of captured interface typedef in deleted generate branch (#8287) 2026-09-04 14:27:11 -04:00
Andrii 18095ac924 Fix incorrect reference to sync/async in SYNCASYNCNET warning (#8281)
Signed-off-by: Andrii Andrieiev <[email protected]>
2026-09-04 11:01:10 -04:00
Aditya Shevade efc390a37d Fix std::randomize() with-clause array index arguments (#8279) (#8280) 2026-09-04 11:00:10 -04:00
Aditya Shevade 228635918e Fix mis-randomizing an unpacked struct member when not rand/randc (#8277) (#8278) 2026-09-03 20:08:44 -04:00
Wilson Snyder c917f04c65 Internals: Fix many but not all missing member dumps. No functional change. 2026-09-02 22:27:19 -04:00
Wilson Snyder c4a4f35ec4 Commentary: Changes update 2026-09-02 22:15:13 -04:00
Wilson Snyder e012f7c79d Fix segmentation fault on context destruction (#8265).
Fixes #8265.
2026-09-02 08:00:32 -04:00
Wilson Snyder 80907b1e26 Internals: Fix many but not all missing bool member dumps. No functional change. 2026-09-01 22:20:20 -04:00
Wilson Snyder a5f4f7eade Internals: Fix covergroupRefMember overload (#8259).
Fixes #8259.
2026-09-01 21:31:19 -04:00
Wilson Snyder c7aa95439c Internals: Cleanup some member name vs accessor name mismatches. No functional change. 2026-09-01 20:10:04 -04:00
Wilson Snyder a3932e259b Internals: Cleanup duplicate superRef. No functional change. 2026-09-01 20:01:20 -04:00
Wilson Snyder e6cee9d54c Tests: Check for binary files 2026-09-01 18:30:29 -04:00
Wilson Snyder f694e9e1e8 Revert NFA assertion outcomes (#7946 revert) (#8258) 2026-09-01 11:15:05 -04:00
Wilson Snyder 667f64813f Commentary: Changes update 2026-09-01 08:46:25 -04:00
Wilson Snyder 67818a3430 Internals: Fix unknown node message in V3Simulate. No simulation change intended. 2026-09-01 08:43:43 -04:00
Wilson Snyder 1c2fa7234d Fix removing extra width warnings after another error 2026-08-31 18:04:58 -04:00
Szymon Gizler be83d1393d Fix continuing on wait(0) (#7372) (#8231) 2026-08-31 13:06:23 -04:00
Matthew Ballance 9474a01d54 Add definitions for odr-used constexpr, as required by C++14 (#8256) 2026-08-31 10:38:18 -04:00
Yilou Wang c81be029a6 Fix NFA assertion scheduling to fix outcome counts (#7946) 2026-08-29 15:53:08 -04:00
Wilson Snyder 3c121c0a2e Fix initial statements with gate optimizaion (#8250) (#8253) 2026-08-29 14:29:03 -04:00
Wilson Snyder 0f96460042 Commentary: Changes update 2026-08-29 11:46:16 -04:00
Wilson Snyder 648035df72 Tests: Cleanup some time formats 2026-08-29 11:13:47 -04:00
Geza Lore dcf45da1c0 Fix excessive SIMILARNAME warnings (#8233) 2026-08-28 15:55:41 -04:00
Kamil Danecki d2920a627d Support solve before with associative array (#8232) 2026-08-28 15:19:08 -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 c70439961f Optimize associative constant patterns to fixed point (#8147) (#8209)
Re-associating constants can enable further simplification e.g. when
those constant become all zero/all ones. Run these patterns to fixed
point to capture the simplification, by revisiting the node.
2026-08-28 20:46:33 +02:00
Geza Lore ab20edbbaf Internals: Use single source of truth VCMethod enumeration (#8249) 2026-08-28 14:32:08 -04:00
Geza Lore 297713df8b Fix folding of short circuiting operators guarding member access (#8238)
V3Const eagerly deletes nodes (we want that in V3Const instead of using
pushDeletep, as otherwise the transient peak memory use during
verilation can be very high)

The std::map used to cache the predicate checking if a subtree contains
a member access then stale if a new node is allocated in the same address.

Fix by using unique node IDs stored in user4 as cache keys.

This is the bug uncovered by #8147

Related to #6963
2026-08-28 20:16:03 +02:00
Geza Lore 6a05cc680b CI: Update RTLMeter case lists - also for PRs 2026-08-28 17:40:46 +02:00
Geza Lore 50e42bc197 CI: Update RTLMeter case lists
- Only run Servant:*:phil on multi-threaded clang build
- Run HummingbirdV2-E203
2026-08-28 16:51:14 +02: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
Igor Zaworski 1ad9acd22e Fix scheduling of variables written in non-inlined functions in suspendable processes (#7909) 2026-08-27 08:33:49 -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
Geza Lore 59f221986c Fix errors on stream connected to instance port (#8234) 2026-08-27 07:51:35 -04:00
Sumanth Kadiyala 99c6f9ced8 Internals: Add flag to replace VNUser union w/ std::variant for type validation (#8213) 2026-08-26 20:09:21 -04:00
Eddie Rydell 7bff0196b1 Fix procedural tristate assignment overrides (#6785) (#8130) 2026-08-26 19:23:46 -04:00
Kamil Danecki f055eeabe0 Support soft foreach in constraint (#8174) 2026-08-26 11:05:12 -04:00
Artur Bieniek 7f9333723f Fix sampled-value functions output on the first cycle (#8162) 2026-08-26 10:30:59 -04:00
Pawel Klopotek cce0277e1a Fix backslash behavior in string literals (#8211)
Signed-off-by: Pawel Klopotek <[email protected]>
2026-08-26 10:02:39 -04:00
Wilson Snyder 51a2dc3efb Commentary: Changes update 2026-08-26 06:09:57 -04:00
Wilson Snyder 0dcdea3325 Commentary: AGENTS tweaks 2026-08-26 06:09:50 -04:00
Wilson Snyder 1cd2588241 Tests: Print stats with --benchmark 2026-08-26 06:02:27 -04:00
Geza Lore 087b15bdb3 Remove source location from DIDNOTCONVERGE error (#8225 prep) (#8227) 2026-08-26 04:55:36 -04:00
Aliaksei Chapyzhenka 5e4151e3e0 Internals: Add WASI (wasm32-wasip1) build support (#8216) (#8217) 2026-08-25 19:13:07 -04:00
Aisha b23b53227d Fix SIMILARNAME warning on parameters and localparams (#8186) (#8226) 2026-08-25 16:19:41 -04:00
Yilou Wang 8cbaf505ee Fix solver session stability to avoid breaking randomize (#7991) 2026-08-25 13:13:59 -04:00
Matthew Ballance 0b85b80ece Fix method calls to be a reorder barrier (#8222)
Signed-off-by: Matthew Ballance <[email protected]>
2026-08-25 13:09:14 -04:00
Pawel Klopotek 821478070d Fix V3Task Inout pin resizing error (#8212) 2026-08-25 10:27:24 -04:00
Artur Bieniek 69f42ea480 Support s_until/s_until_with in property expression (#8220) 2026-08-25 10:26:43 -04:00
Artur Bieniek f6d56c6440 Optimize consecutive repetiton and goto repetition using ring-buffer (#8096) 2026-08-25 08:26:46 -04:00
Geza Lore 538c6a6b76 Fix unoptimized code generation for postponed region (#8218) 2026-08-25 10:31:36 +02:00
Wilson Snyder 1c9a9e0cce Tests: Rename some mis-grouped tests 2026-08-24 18:41:25 -04:00
Wilson Snyder 6fc18710bd Commentary: Changes update 2026-08-24 18:16:58 -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
dependabot[bot] 2cd0efbc0f CI: Bump docker/setup-buildx-action in the everything group (#8210) 2026-08-24 12:28:51 -04:00
Yilou Wang 3c027baa44 Fix $past in final blocks on a sampling-tick finish (#8153) 2026-08-24 11:09:02 -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
Jonathan Drolet d0321b8502 Fix VPI force data corruption (#8160) 2026-08-24 08:21:13 -04:00
Geza Lore ee8e2c0e12 Internals: Fix regression badge in README 2026-08-24 08:03:00 +02:00
Geza Lore 8fc78e31d7 CI: Name build-test.yml 'Regressions' 2026-08-24 08:03:00 +02:00
Wilson Snyder 477b48fb3d CI: Add pr-conflicting.yml 2026-08-23 18:48:57 -04:00
Wilson Snyder df0d801790 Internals: Duplicate code cleanup. No functional change intended. 2026-08-23 16:24:59 -04:00
Wilson Snyder d2760be0d4 Fix fork no-timing and constructor no-timing message 2026-08-23 16:24:59 -04:00
Wilson Snyder d18bcc2a69 Commentary: Changes update 2026-08-23 16:24:59 -04:00
Geza Lore 8a45a2d46e CI: Reduce verbosity of the Pages job 2026-08-23 19:56:26 +02:00
Marco Bartoli 63a59fce22 Fix typedef clocking input sampling (#7688 partial) (#8204) 2026-08-23 10:38:28 -04:00
Marco Bartoli c4b84b20f7 Support covergroup events with reference members or ref arguments (#8201) 2026-08-23 10:35:43 -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
github action 459711ba71 Apply 'make format' [ci skip] 2026-08-22 19:46:51 +00:00
Marco Bartoli 0820506d74 Support covergroup/function/task (ref/virtual/array) interface arguments (#8180) 2026-08-22 15:46:07 -04:00
Geza Lore 063b938f41 CI: Fold up old notification comments on PRs
Notifications posted on pull requests now carry a marker naming their
source, as an HTML comment on their first line, which is invisible when
rendered. When posting, 'ci-pages-notify.bash' finds its own earlier
notifications with the same marker on that pull request, and deletes them.
A pull request therefore holds a single comment per source, rather than
accumulating one per run.

The superseded comments are not lost entirely. Each notification carries a
one line summary linking its report, stashed in an HTML comment, and the
notification superseding it inherits that summary, together with the
history the superseded one held itself, into a collapsed 'Workflow history'
section. That section therefore lists all the earlier reports, stays flat
however many runs a pull request sees, and holds no entry for the report
shown right above it.

The 'pr-notification' artifact is now uploaded via the new reusable
'upload-pr-notification' action, which validates the content the reporting
scripts produced, and records the source key and the pull request number
alongside it.

Fixes #8037
2026-08-22 18:40:14 +02:00
Geza Lore cb618d6f9c CI: Factor out coverage report generation 2026-08-22 18:40:14 +02:00
Wilson Snyder 4aceba1106 Fix internal on backslash quoted strings (#8198).
Fixes #8198.
2026-08-22 10:51:45 -04:00
Wilson Snyder d359a9ce3c Commentary: Changes update 2026-08-22 10:47:46 -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 cda258cbed Fix crash on multiple missing type parameters (#8184) 2026-08-21 17:15:41 -04:00
Wilson Snyder cccf7ef1b3 Internals: Fix clang warning (earlier commits) 2026-08-21 17:03:10 -04:00
Wilson Snyder 8844593abb Internals: Cleanup code duplication. No functional change intended. 2026-08-21 16:51:19 -04:00
Wilson Snyder 9badc5485d Internals: Cleanup code duplication. No functional change intended. 2026-08-21 16:51:19 -04:00
Wilson Snyder fd319beb8a Internals: Cleanup code duplication. No functional change intended. 2026-08-21 16:51:19 -04:00
Ryszard Rozak c9e270a9fa Internals: V3Randomize cleanup. No functional change intended (#8187)
Signed-off-by: Ryszard Rozak <[email protected]>
2026-08-21 16:36:52 -04:00
Geza Lore d1067002da Fix crash on empty '#()' parameter list on class instance (#8182)
The following used to crash:

```systemverilog
    class base #(type T = int); endclass
    class derived extends base; endclass
    derived #() d; // <- crash due to '#()'
```
2026-08-21 18:16:09 +02:00
Geza Lore a7ecba4f4e Fix crash on forward-referencing parameters (#8175) 2026-08-21 17:47:10 +02:00
Wilson Snyder 99c26d3994 Update linfstwriter from upstream (#7193 prep) (#8181) 2026-08-21 16:35:15 +02:00
Todd Strader e656b11cd1 Internals: Dev coverage tweaks (#8161) 2026-08-21 12:27:52 +02:00
Artur Bieniek f7c087468d Support overlong within sequences as never-matching (#8177)
Signed-off-by: Artur Bieniek <[email protected]>
2026-08-20 15:20:54 -04:00
Andrii 227e432695 Fix invalid conversion of VlQueue (#8172)
Signed-off-by: Andrii Andrieiev <[email protected]>
2026-08-20 07:09:05 -04:00
Geza Lore 38ae4e617d CI: Cache archives downloaded by apt (#8159)
Belt-and-braces in case GitHub apt mirrors start acting up again: On any
successful apt install, cache the deb files downloaded/needed for the
step, so on next run the mirrors need not be consulted. (That is: trade
apt mirror access with GitHub cache access, which is more reliable)
2026-08-20 11:16:17 +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
Kornel Uriasz f6f6f84047 Fix array reference in reduction constraints (#8158)
Signed-off-by: Kornel Uriasz <[email protected]>
2026-08-19 15:52:04 +02:00
Geza Lore cacadd6c7d CI: Add timeout to apt install steps (#8154)
These tend to hang for hours on occasion. Install all apt dependencies
via ci-install.bash, and add a hard timeout and retry for each attempt.

Also removed unnecessary man-db config (GitHub has this off by default
now) and ineffective install path exclusions.
2026-08-19 15:34:57 +02:00
Geza Lore 65094514d6 Tests: Automatically disable ASLR under TSAN (#8156) (#8157)
Fixes #8156
2026-08-19 15:25:07 +02:00
Wilson Snyder f88b59f39f Revert fixed point (#8147 revert) (#8155) 86b7cfb05c 2026-08-19 07:54:42 -04:00
Wilson Snyder 700858c112 Commentary: Changes update 2026-08-19 07:50:32 -04:00
Geza Lore 2ba4bd9211 Internals: Add more statistics in V3Expand
- Per pattern stats, similar to DfgPeephole
- Impure rejection count
- Number of temporaries introduced

Tweak output for consistency
2026-08-19 13:28:01 +02:00
Geza Lore 7523a0cd8e Fix exponential expansion of nested selects (#8137) (#8151)
Fixes #8137
2026-08-19 11:00:47 +02:00
Artur Bieniek 8c2b7410f0 Optimize NFA delay-ring edge traversal, drop complexity to linear (#8145)
Signed-off-by: Artur Bieniek <[email protected]>
2026-08-19 04:02:11 -04:00
github action 70b5ce802b Apply 'make format' [ci skip] 2026-08-19 06:46:09 +00:00
Sumanth KadiyalaandSumanth Kadiyala 88e87b8abb Fix segmentation fault on parameters (#8102) (#8149)
Co-authored-by: Sumanth Kadiyala <[email protected]>
2026-08-19 02:45:35 -04:00
Pawel Klopotek 7628a540af Fix invalid C++ on cast (#8113)
Signed-off-by: Pawel Klopotek <[email protected]>
2026-08-19 08:29:29 +02:00
Artur Bieniek 06ee8b7261 Use unsigned in NFA, guard against overflow using V3Width. (#8152)
Signed-off-by: Artur Bieniek <[email protected]>
2026-08-19 08:05:05 +02:00
Pawel Klopotek f5ae58ddab Fix unpacked array passing to logic task arg error (#8148)
Signed-off-by: Pawel Klopotek <[email protected]>
2026-08-19 08:04:28 +02:00
Geza Lore 86b7cfb05c Optimize associative constant patterns to fixed point (#8147)
Re-associating constants can enable further simplification e.g. when
those constant become all zero/all ones. Run these patterns to fixed
point to capture the simplification, by revisiting the node.
2026-08-18 19:41:24 +02:00
Yilou Wang 8a29360ade Fix NFA assertion crash and mis-counted property if/case (#8074) 2026-08-18 18:30:38 +02:00
Marco Bartoli b032379de2 Support coverpoint and cross iff (#8125) 2026-08-18 09:46:31 -04: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
Geza Lore 94a63dd407 Fix streaming concatenation uninitialized RMW access (#8143) 2026-08-18 12:03:51 +02:00
Geza Lore d9fb606869 Internals: Move DPI export AstScopeName out of statement list (#6280) (#8139)
AstScopeName is an AstNodeExpr, but V3Task stashed the DPI export scoping
marker into the enclosing AstCFunc's statement list (addStmtsp), placing an
expression in a statement position.

Give AstCFunc a dedicated 'scopeNamep' operand to hold the marker instead.
Part of #6280
2026-08-18 11:25:12 +02:00
Geza Lore 8baff6ae33 Internals: Don't wrap elaboration severity task in an AstInitial (#6280) (#8142)
An elaboration severity system task ($info/$warning/$error/$fatal used
as a module/generate/program/checker item), which is a module item,was
parsed as an AstInitial wrapping an AstElabDisplay. That put
AstElabDisplay (a non-statement) into the procedural statement list of
an AstInitial.

AstElabDisplay is evaluated by V3Width, which then deletes it. The
AstInitial wrapper is historic and has no effect.

Part of #6280
2026-08-18 11:19:50 +02:00
Geza Lore 7c6b225b7e Internals: Make AstConstraintBefore an AstNodeStmt (#6280) (#8141)
AstConstraintBefore ('solve x before y') is a constraint item that appears
in constraint bodies alongside its siblings AstConstraintExpr,
AstConstraintUnique and AstConstraintIf, all of which are AstNodeStmt.
Part of #6280.
2026-08-18 11:19:40 +02:00
Geza Lore 2a9757bf38 Internals: Make AstCLocalScope an AstNodeStmt (#6280) (#8140)
AstCLocalScope wraps statements in an unnamed C++ scope ('{ ... }') and is
only ever placed in statement position. Part of #6280.
2026-08-18 11:19:27 +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
Geza Lore d4a18d4dfb Fix unordered data hazards in multi-threaded scheduling (#8133)
The OrderGraph used during V3Order step deliberately omits some variable
accesses from the dependency graph. E.g.: a read of a variable that is
in the reading block's own hybrid sensitivity list emits no edge, nor
does a read ignored due to a force/release, nor an access to a variable
marked 'ignoreSchedWrite' and friends. For serial mode that is fine, the
logic runs one block at a time. In parallel mode two such blocks can run
concurrently, and if one writes what the other reads, that is a data
race at runtime.

These accesses cannot be recovered from the graph edges. They are now
collected from the AST while the OrderGraph is built, and held by the
OrderLogicVertex performing them.

FixDataHazards is reworked around these access lists stored in
OrderLogicVertex, so it is now aware of all variable accesses the logic
makes, including those not encoded by the dependency graph edges. The
previous heuristic of fixing data hazards by merging same-rank MTasks is
removed. Additional edges are inserted instead to prescribe a fixed
ordering of conflicting MTasks. To insert edges without unduly
increasing the critical path, or introducing cycles, new edges are
added such that they preserve topological ordering, and they are
inserted between vertices sorted by critical path length. See algorithm
details in the code.

Also add a data hazard checker under '--debug-partition', reporting every
unordered accessor pair left in the final MTask graph.

This fixes the race demonstrated by t_sched_hybrid_hazard (#7913),
which is no longer expected to fail.

Under ThreadSanitizer over the vltmt tests: 17 failing before, 3 after,
with no regressions. The 3 remaining are different defects.
2026-08-18 08:50:50 +02:00
github action 96ea587df0 Apply 'make format' [ci skip] 2026-08-18 06:07:36 +00:00
Sunimali Rathnayake 2d8d8add42 Fix public table offsets larger than 32 bits (#8135) 2026-08-18 08:06:53 +02:00
Geza Lore 7dcd4e0b65 Improve MTask coarsening in multi-threaded scheduling (#8120)
This is a large refactor of the MTask graph and coarsening algorithm, in
prep for fixing the bug described in #7913, it can also improve the
resulting multi-threaded schedule.

Two major changes:

OrderMTaskGraph now maintains the critical paths of the MTasks through
mutation. There are 2 ways to mutate the graph, which are done via
methods on the graph itself: adding an edge (used during construction,
and will be used later during fixing data hazards), or merging an MTask
into another (used during contraction). All critical path measures are
automatically updated and propagated on any mutation, so no external
algorithm needs to maintain them explicitly.

The merge candidate scoreboard used during contraction is simplified to
remove deferral of updated scores. This simplifies the code and results
in a greedily more optimal schedule. (The previous tranched rescore was
an optimization to work around the previous std::set based scoreboard,
however since the algorithm now uses an efficient PairingHeap,
verilation time is not impacted by the more accurate scoring, while
yielding better results).

Combining these two into a single patch as the code is highly
interdependent and any one change without the other would be just a
noisy transit point with unclear performance implications. Together it
should be a clear improvement.

Also added a stronger validation step run with '--debug-partition',
which checks all invariants throughout the algorithms.
2026-08-17 23:14:52 +02:00
Yilou Wang ace84ef2b3 Fix simulation hang when the solver stops answering (Part2 of #7991) (#8129) 2026-08-17 13:01:41 +02:00
Matthew Ballance a3553e7bee Add runtime support for covergroup cross-points (#7847) 2026-08-16 15:33:38 -04:00
Wilson Snyder e2f7755611 Tests: Fix whitespace 2026-08-15 07:08:53 -04:00
em2machine d2f62fda93 Fix use-after-free of captured interface typedef reference during parameter cloning (#8076) 2026-08-15 06:07:01 -04:00
em2machine 93401038c0 Fix reading another parameter resolves to 0 in cloned modules (#8086) (#8069) 2026-08-15 06:06:25 -04:00
github action 3334576b1d Apply 'make format' [ci skip] 2026-08-15 01:00:00 +00:00
Wilson Snyder 6d6d15e003 Tests: Fix side-effects in checkd randomize 2026-08-14 20:59:19 -04:00
Wilson Snyder d6b206cc7d Internals: Cleanup some VPI messages and fix test coverage 2026-08-14 19:47:45 -04:00
Wilson Snyder edd4cd4faf Tests: Cleanup false suppressions in t_dist_warn_coverage.py 2026-08-14 18:55:41 -04:00
Wilson Snyder 91216bdac1 Tests: Add uvm-2020-3.2-vlt 2026-08-14 18:31:23 -04:00
Wilson Snyder 92300ab675 Commentary: Changes update 2026-08-14 18:28:19 -04:00
Artur Bieniek 0b50390359 Fix COVERIGN on SVA goto repetition (#8118)
Signed-off-by: Artur Bieniek <[email protected]>
2026-08-14 13:52:10 -04:00
Geza Lore 621a67e819 Fix R/W references to random builtin function seeds (#8112) 2026-08-14 12:29:12 -04:00
Adam Kostrzewski 75a776c516 Fix invalid typedef linkdot (#8106)
Signed-off-by: Adam Kostrzewski <[email protected]>
2026-08-14 12:28:35 -04: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
Adam Kostrzewski 649598c74c Fix unintended side-effect insertion on associative array read (#8077) 2026-08-14 15:23:44 +02:00
Geza Lore 0a3657517d Optimize temporary insertion for single bit replicates in DFG (#8110)
A '{N{bit}}' mask expands to a bit vector where every word is the same
value, obtained by negating the replicated bit. Recomputing that at each
use is no more expensive than loading it
2026-08-14 14:58:31 +02:00
Kornel Uriasz 2957939d4b Throw unsupported when reduction constraining dynamic subarray (#8111)
Signed-off-by: Kornel Uriasz <[email protected]>
2026-08-14 07:56:31 -04:00
Yilou Wang abf199cf0e Fix randc cycling in a class that also uses solve...before (Part1 of #7991) (#8055) 2026-08-14 07:16:44 -04:00
Marco Bartoli 7da43d8302 Support class handle covergroup arguments (#8071) 2026-08-13 20:41:39 -04:00
Wilson Snyder c8853d1507 Tests: Reformat some recent tests to mostly verilog-format standard. No test functional change. 2026-08-13 18:59:37 -04:00
Wilson Snyder edf43ae76f Tests: Rename inf to avoid VAMS errors 2026-08-13 18:59:37 -04:00
Wilson Snyder 63478f2946 Commentary: Changes update 2026-08-13 18:59:37 -04:00
Artur Bieniek 95721f5040 Optimize NFA ring buffer clear operation using lazy invalidation (#8101)
Signed-off-by: Artur Bieniek <[email protected]>
2026-08-13 18:54:57 -04:00
Geza Lore 1397d5d01e Optimize VL_WORDS_I/VL_BYTES_I (#8095) 2026-08-13 14:44:04 -04:00
github action 098f375e9d Apply 'make format' [ci skip] 2026-08-12 23:13:40 +00: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
Artur Bieniek 0ebb92da26 Fix hierarchical class scope resolution (#8094)
Signed-off-by: Artur Bieniek <[email protected]>
2026-08-12 15:29:04 -04:00
Artur Bieniek 73bcf5e0db Fix NFA range ring outgoing bit selection (#8061 repair) (#8092)
Signed-off-by: Artur Bieniek <[email protected]>
2026-08-12 12:28:32 -04:00
Artur Bieniek e962efca12 Fix untyped dtype error on sampling functions with property arguments (#8060)
Signed-off-by: Artur Bieniek <[email protected]>
2026-08-12 05:16:48 -04:00
Wilson Snyder 0b51926fff Commentary: Changes update 2026-08-11 20:05:01 -04:00
Wilson Snyder 08cd5fe30b Tests: Reformat some recent tests to mostly verilog-format standard. No test functional change. 2026-08-11 20:04:45 -04:00
Nikolai Kumar da0c31926e Fix forceable unpacked array element force with procedural assign (#8084) (#8085) 2026-08-11 17:09:33 -04:00
Todd Strader e96cfc5e56 Tests: More VPI simulator support (#8083) 2026-08-11 15:14:01 -04:00
Igor Zaworski 2ef131f7ac Fix scheduling of variables written in non-inlined functions in suspendable processes (#7924)
Repair of reverted #7836

Signed-off-by: Igor Zaworski <[email protected]>
2026-08-11 13:18:18 +01:00
Igor Zaworski 945ea27fec Fix undefined symbol solver error (#8080)
Signed-off-by: Igor Zaworski <[email protected]>
2026-08-11 07:33:37 -04:00
Artur Bieniek 490bd38962 Optimize bounded always properties using ring buffers (#8061)
Signed-off-by: Artur Bieniek <[email protected]>
2026-08-10 08:45:50 -04:00
Bartłomiej Chmiel 121fc62aff Fix VPI cbValueChange for 1-bit select (#8063) 2026-08-10 07:52:18 -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
Kornel Uriasz 38259d11b6 Fix skipping non-constrained enum constraining when inside object of other class (#8075)
Signed-off-by: Kornel Uriasz <[email protected]>
2026-08-10 06:52:14 -04:00
Tyrone Marhguy 86fa00416d Fix Linux peak memory stat to use VmHWM (#8022) (#8070) 2026-08-09 15:37:57 -04:00
Marco Bartoli 645b8cdf24 Support embedded covergroup clocking events (#8028) 2026-08-09 13:55:04 -04:00
Yogish Sekhar dde6aa34ce Fix FSM coverage on empty reset branches (#8005) (#8064) 2026-08-08 19:44:46 +01:00
Wilson Snyder 7601011bba Internals: Cleanup some user() comments. No functional change.
Fixes #8048.
2026-08-08 13:05:05 -04:00
Wilson Snyder 18844537bd Commentary: Changes update 2026-08-08 12:58:32 -04:00
Kamil Danecki 7e80ea6577 Support default clocking (#7984) 2026-08-07 13:21:18 +01:00
Nikolai Kumar 82dab79096 Fix wildcard equality against a 4-state constant in an assertion (#8056) (#8057) 2026-08-07 07:48:51 +01:00
Artur Bieniek 1a4bcac666 Support weak/strong keywords in property expressions (#8054)
Signed-off-by: Artur Bieniek <[email protected]>
2026-08-06 07:48:00 +01:00
Artur Bieniek e413e67ab3 Fix force helpers in multiply instantiated modules (#8047)
Signed-off-by: Artur Bieniek <[email protected]>
2026-08-05 16:47:45 -04:00
Artur Bieniek b1ec180a3b NFA simplification: do not pass arguments which values are derivable (#8053)
Signed-off-by: Artur Bieniek <[email protected]>
2026-08-05 12:40:12 -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
Kornel Uriasz 3fa88ae7f3 Fix array size references in constraints (#8040)
Signed-off-by: Kornel Uriasz <[email protected]>
2026-08-05 12:07:28 -04:00
Nikolai Kumar 351d67c81e Fix pin to non-existent port with PINNOTFOUND suppressed (#8051) (#8052) 2026-08-05 12:00:32 -04: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
Bartosz Skorowski e6c613f28d Fix write access to dynamic arrays (#8043)
Signed-off-by: Bartosz Skorowski <[email protected]>
2026-08-04 13:27:08 -04:00
Artur Bieniek e4b6bac50a Fix mid-range consecutive repetition rejects (#8041)
Signed-off-by: Artur Bieniek <[email protected]>
2026-08-04 17:50:33 +01:00
Pawel Klopotek 3c4ea47e02 Fix conditional expression with parameterized classes (#8039)
Signed-off-by: Pawel Klopotek <[email protected]>
2026-08-04 15:50:12 +01:00
github action 5bd8c49448 Apply 'make format' [ci skip] 2026-08-04 08:37:04 +00:00
JOTEGO ba8e4f9dec Fix gate deduplication with function arguments (#8038) 2026-08-04 04:36:25 -04:00
Kornel Uriasz 15b75c7c68 Fix skipping optimization for unpacked data types (#8031)
Signed-off-by: Kornel Uriasz <[email protected]>
2026-08-04 01:48:15 -04:00
Yilou Wang 925a6640d1 Fix queued $finish/$stop request thread ordering (#7946 prep) (#7952) 2026-08-04 01:46:54 -04:00
Geza Lore b42d7c2d9e Internals: Move critical path propagators to MTaskGraph from Contraction
Code movement only prep for further work. No functional change, output
should be identical.
2026-08-03 17:35:10 +01:00
Geza Lore d58f512a85 Internals: Remove stepCost use in MT scheduling (#8032)
MT scheduling used to round MTask costs to the nearest 5% to supposedly
reduce the amount of work required for propagating critical path change
updates. Profiling shows this doesn't actually save any verilation time,
as the floating point arithmetic itself is costly, and the propagation
savings only kick in when merging small tasks into large ones, which is
not the common case. (The float arithmetic also made this step
non-reproducible across host architectures and libm versions  due to
numerical variance.)

Remove and use precise costs instead.
2026-08-03 17:34:44 +01:00
Nick Brereton 1356c15e44 Fix use-after-free in V3LinkDotIfaceCapture (#7943) 2026-08-03 15:55:30 +01:00
dependabot[bot] 3c47e5735a CI: Bump docker/login-action from 4.5.1 to 4.6.0 in the everything group (#8033) 2026-08-03 15:55:00 +01:00
Geza Lore 0750e18ad0 Internals: Remove ordering before MTask contraction (#8019)
As the removed comment suggests, this is dubious and RTLMeter suggests
it makes no measurable difference on average (some designs improve, some
regress small amounts, on average ~1.0x)

Prep for further fixes that will remove the pre ranking.
2026-08-03 10:44:51 +01:00
David Garau a24dd8b2dc Fix generic interface param resolution in module/cell parameterization (#7970) (#7971) 2026-08-03 05:18:59 -04:00
Yilou Wang 2022bacd38 Fix timing controls in interface tasks called via virtual interface (#7959) 2026-08-03 05:15:07 -04:00
Aisha 29fd2cf90d Add MULTIDRIVEN checks for clocking block outputs (#7987) 2026-08-03 04:54:43 -04:00
Josep Sans daf5826610 Fix assignment pattern key constant expressions (#8029) (#8030) 2026-08-02 12:53:43 +01:00
Krzysztof Bieganski 66808eec27 CI: Make light debug opt-in in CI build script (#8013) (#8027) 2026-08-02 02:34:38 -04:00
BRDR LIFE a3e7f5103d Tests: Check dist bucket draw is per-element in foreach (#8023) 2026-08-01 22:37:55 +05:30
Marco Bartoli 7e116ca601 Support embedded covergroup member references (Fix #7749) (#8015) 2026-08-01 02:13:53 -04:00
github action 56accae45e Apply 'make format' [ci skip] 2026-08-01 03:38:21 +00:00
BRDR LIFE 967b1bae57 Fix unique constraint crash, guards, and size (#8018) (#8018) 2026-07-31 23:37:53 -04:00
BRDR LIFE 6b3aebfa32 Fix dist inside a foreach nested in a constraint if (#8016) 2026-07-31 23:35:01 -04:00
Yilou Wang 704c5a1c96 Fix gcov dump on warnings discarding later coverage counts (#8017) 2026-07-31 12:08:05 -04:00
Geza Lore 781f6d90bf Internals: Refactor MT scheduling (#8012)
Prep for fixing test added in #7913.

This is a large scale no functional change refactor, however, MT output
is perturbed as tied scores will be broken differently due to ordering
changes (still deterministic).

Split multi-threaded scheduling out of the monolithic
V3OrderParallel.cpp, into relatively independent parts, simplify the
data structures, and drop redundant or unused code.

New translation units:
- V3OrderMTaskGraph.h/.cpp: OrderMTaskGraph, the graph of LogicMTask
  vertices and MTaskEdge edges. LogicMTask and MTaskEdge no longer
  depend on the coarsening algorithm's merge candidate types;
  per-algorithm auxiliary data is attached externally via the vertex and
  edge user pointers.
- V3OrderMTaskFixHazards.cpp: data hazard fixup, was FixDataHazards.
- V3OrderMTaskContraction.cpp: graph coarsening, was Partitioner
  together with PropagateCp and the merge candidate types.
- V3OrderParallel.cpp: now just the partitioning driver and ExecMTask
  graph construction.

Data structure changes:
- Delete V3Scoreboard.h/.cpp. The generic template had a single user, now
  a file-local MergeCandidateScoreboard in V3OrderMTaskContraction.cpp.
- Merge candidates are now MergeCandidate/SiblingMC/EdgeMC, distinguished
  by a bit in the candidate id rather than by a vtable, and allocated by
  the scoreboard, which owns their lifetime. This removes the multiple
  inheritance previously used by MTaskEdge.

Move `hashGraphDebug` which prints the hash of a graph's shape for debugging
to generic `V3Graph::hashGraphDebug`.

Removed (can be added back later):
- Unnecesasry self tests that force special data stucture requirements.
- Per stage --stats output under --debug. (Final figures still reported.)
- Various debug dumps
2026-07-31 15:03:26 +01:00
BRDR LIFE 40323cc02c Fix dist weights ignored when an item is not a literal (#8003) 2026-07-31 10:54:38 +05:30
BRDR LIFE 9cddf46932 Fix internal error forcing an array element read at a run-time index (#8004) 2026-07-30 23:57:15 -04:00
24bit-xjkp 589c9b9433 Fix missing verilator_coverage in cmake install (#8008) (#8011)
Fixes #8008.
2026-07-30 23:13:07 -04:00
Yilou Wang 99b71a37b7 Internals: Refactor randomization next and nextPhased into shared helpers (#7991 prep) (#8009). No functional change intended. 2026-07-30 21:41:37 -04:00
Artur Bieniek b70696fc0a Fix $finish continuing event loop (#7267) (#7950)
Fixes #7267,
2026-07-30 21:39:21 -04:00
Marco Bartoli 4b770cffb4 Fix cross module disable (Part 5 of #7857) (#8006) 2026-07-30 14:56:07 +01:00
github action 42e043cb01 Apply 'make format' [ci skip] 2026-07-30 10:15:15 +00:00
24bit-xjkp c5c3c45102 Internals: Remove static inline functions in headers (#7988) (#8007) 2026-07-30 15:44:40 +05:30
Marco Bartoli c3be3c8050 Fix nested named fork disable propagation (Part 4 of #7857) (#8001) 2026-07-29 14:49:34 +01:00
Gilberto Abram cac2c3df13 Fix MULTIDRIVEN/PROC warning suppression via lint_off (#8000) 2026-07-28 21:50:19 -04:00
BRDR LIFE 2e4dbb846c Fix force not substituted into an unpacked array index (#8002) 2026-07-29 06:58:06 +05:30
Yilou Wang b5fa4212b0 Fix UNSATCONSTR reporting constraint indices above 9 (#7995) 2026-07-28 18:25:19 -04:00
github action c23b0ee972 Apply 'make format' [ci skip] 2026-07-28 21:32:05 +00:00
Marco Bartoli 48e575b885 Fix self-disable of named blocks with forks (Part 3 of #7857) (#7996) 2026-07-28 22:31:32 +01: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
Marco Bartoli 73b3ca7d2c Fix immediate disable of fork join branches (#7856) (#7931) 2026-07-28 10:34:02 +01:00
dependabot[bot] de4de1c3f8 CI: Bump the everything group with 2 updates (#7989) 2026-07-27 19:52:43 +05:30
Wilson Snyder f8fb1d6646 Fix SYNCASYNCNET false positive with changed non-edge logic (#7980).
Fixes #7980.
2026-07-24 09:53:36 -04:00
Wilson Snyder d2de6b42cf * Fix $fgets being mis-optimized away (#7976).
Fixes #7976.
2026-07-24 09:26:01 -04:00
Wilson Snyder 370a40348b Commentary: Changes update 2026-07-24 09:20:25 -04:00
Bartosz Skorowski ee152be17b Fix lost writes when select width exceeds variable width (#7975)
Signed-off-by: Bartosz Skorowski <[email protected]>
2026-07-24 08:58:28 -04:00
github action a799fedea6 Apply 'make format' [ci skip] 2026-07-24 12:56:19 +00:00
Aisha 8f8b5ade55 Add MULTIDRIVENPROC warning for signals driven by multiple plain always blocks (#7968) 2026-07-24 08:54:09 -04:00
Jakub Michalski bb0300f605 Fix table optimization causing not contextually convertible to bool error (#7983)
Signed-off-by: Jakub Michalski <[email protected]>
2026-07-24 08:50:03 -04:00
Kornel Uriasz 7d3021c34d Fix varRef scope in unique on dynamic array (#7981)
Signed-off-by: Kornel Uriasz <[email protected]>
2026-07-23 15:56:51 -04:00
Wilson Snyder e0e0fadacc Tests: Update gold files 2026-07-22 12:59:20 -04:00
Igor Zaworski f511f6c34d Add FSM arc coverage to verilator_coverage .info output
Signed-off-by: Igor Zaworski <[email protected]>
2026-07-22 12:26:14 -04:00
Igor Zaworski 0a855fce47 Add FSM state coverage to verilator_coverage .info output (#7973) 2026-07-22 12:24:02 -04:00
Pawel Klopotek f149dd304c Add error when scalar is passed to array task argument (#7948) 2026-07-22 07:54:58 -04:00
Philip Axer 8113f1df7a Fix randomization of unreferenced rand members of unpacked structs (#7910) (#7911)
Fixes #7910.
2026-07-21 07:42:04 -04:00
Yilou Wang b34f685f70 Fix dist constraint on a frozen variable failing randomization (#7878) 2026-07-21 06:39:09 -04:00
Yilou Wang f22676eea9 Fix solve-before dropping all soft constraints in randomize() (#7963) 2026-07-20 14:55:49 -04:00
Patrick Creighton cdfff86c2d Support delayed tristate gates (#7960) (#7961)
Fixes #7960.
2026-07-20 09:21:23 -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
Wilson Snyder 3924fe9c18 Fix uncaught type error leading to invalid C++ output (#7814).
Fixes #7814.
2026-07-19 13:32:53 -04:00
Wilson Snyder 3813249826 Commentary: Changes update 2026-07-19 13:31:48 -04:00
Mateusz Gancarz 185a49e628 Fix unlinked error with function call in derived class parameter (#7923)
Signed-off-by: Mateusz Gancarz <[email protected]>
2026-07-19 09:55:29 -04:00
Yilou Wang f7ce38dbc1 Tests: Pre-pull for #7946 (#7953) 2026-07-18 21:01:53 -04:00
Yilou Wang 22050b97a7 Internals: Refactor dist constraint lowering helpers from lowerDistConstraints (#7878 prepull) (#7954) 2026-07-17 11:42:58 -04:00
Adam Kostrzewski 7e1efe6d76 Support dynamic containers in unique constraints (#7947)
Signed-off-by: Adam Kostrzewski <[email protected]>
2026-07-17 10:55:14 -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
Pawel Klopotek cf27c63b2d Fix type resolution when a local name shadows a type name (#7915) 2026-07-17 08:10:23 -04:00
Artur Bieniek 796d5174f3 Fix sampled-value clocks in repeated assertions (#7944) 2026-07-16 13:07:53 -04:00
Patrick Creighton cc1b36bafd Fix FSM detection of coverage-only branches (#7941) (#7942)
Fixes #7941
2026-07-16 09:48:36 -07:00
Artur Bieniek 255bcff3ac Support [*N:$] consecutive repetition (#7940)
Signed-off-by: Artur Bieniek <[email protected]>
2026-07-16 09:29:30 -04:00
Philip Axer 877fc1e812 Fix dropping variable writes across opaque calls (#7921) (#7933)
Fixes #7921.
2026-07-15 11:03:04 -04:00
Andrii affe4cde57 Fix class parameter resolution (#7935) 2026-07-15 10:56:22 -04:00
Kornel Uriasz 232b2eb04c Fix dynamic array handling in solve...before (#7922) 2026-07-15 10:48:54 -04:00
Nick Brereton baf012cf6a Fix streaming concat as output-port lvalue into unpacked struct (#7918) 2026-07-15 10:46:25 -04:00
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
Wilson Snyder 34603ebd60 Commentary: Changes update 2026-07-14 19:55:50 -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
Jeffrey Song 4262aea87c Internals: Use snprintf for random unique indexes (#7925) 2026-07-13 11:35:22 -07: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
Wilson Snyder 3191d98391 Commentary: Changes update 2026-07-10 08:43:12 -04:00
Wilson Snyder 3bd04a70bd Commentary (#7916) 2026-07-10 08:38:01 -04:00
Artur Bieniek feb2fe0d94 Fix release of forced port nets (#7907) (#7901)
Fixes# 7901

Signed-off-by: Artur Bieniek <[email protected]>
2026-07-10 11:35:06 +01:00
Artur Bieniek b211af9d24 Fix independent force of multiply instantiated signals (#7905)
Signed-off-by: Artur Bieniek <[email protected]>
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 <[email protected]>
2026-07-09 08:40:24 -07:00
Adam Kostrzewski a21bd8a417 Fix VlQueue falling into wrong template spec (#7914) 2026-07-09 07:33:28 -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
Artur Bieniek 671ff628ff Tests: Fix t_force_release to reflect intent (#7906)
Signed-off-by: Artur Bieniek <[email protected]>
2026-07-08 19:29:49 +01: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
Jakub Michalski 93d0443998 Fix memory leak in VerilatedFst::close() (#7899)
Signed-off-by: Jakub Michalski <[email protected]>
2026-07-08 08:48:17 +01:00
Artur Bieniek 6c20fdb7bd Optimize assertion NFAs using bit-vector ring buffers (#7885)
Signed-off-by: Artur Bieniek <[email protected]>
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 <[email protected]>
2026-07-07 12:34:24 +01:00
Artur Bieniek a5f4d40901 Fix range delays with parameter bounds (#7882)
Signed-off-by: Artur Bieniek <[email protected]>
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 39b646349f Add --enable-light-debug configure option (#7886)
Change default debug build to use -O0 instead of -Og as the latter is
still not great debugging experience. Use -Og -gz, plus the new -ggdb1,
which together significantly cut down debug info size, to save CI cache
space, while still enabling -gdbbt tests to work.
2026-07-06 18:02:37 +01:00
Geza Lore 56b0b679c6 CI: Disable ccache on coverage jobs (#7887)
gcc --coverage is unsupported by ccache and results in a bypass. Don't
save unnecessary caches.
2026-07-06 17:05:14 +01:00
dependabot[bot] 6baea8d846 CI: Bump the everything group with 5 updates (#7884) 2026-07-06 09:50:16 -04:00
Geza Lore fcc7acbfc6 CI: Factor out artifact based caching as a reusable action (#7883) 2026-07-06 14:16:06 +01:00
Geza Lore bf4c72f93b CI: Squash macos brew warning (#7881) 2026-07-06 11:43:55 +01:00
Geza Lore c78a342bdc CI: Don't Python make venv on cache hit 2026-07-06 11:30:59 +01:00
Geza Lore c2ed0aab00 CI: Use ci-install.bash for lint-py dependencies (#7880) 2026-07-06 11:27:58 +01:00
Geza Lore 5563b3b6f8 CI: Cache Python venv (#7879)
This is smallish and mostly static, should cache well, avoid setup cost.
2026-07-06 11:03:35 +01:00
Geza Lore 5750c888a6 CI: Improve ccache handling in build and test jobs (#7874)
Cache key isolation: Include the build flavour (ccwarn/asan/gcov) in the
build ccache key, so the coverage (gcov), asan, and RTLMeter
(ccwarn-off) configurations no longer share and thrash the single
'<runs-on>-<cc>' bucket, nor warm-start from each other's (near-useless)
caches.

Prune stale entries instead of a fixed size cap: After building/testing,
evict ccache entries this run did not touch (--evict-older-than, based
on the run's own duration).  This bounds the saved cache to the current
working set, so CCACHE_MAXSIZE and CCACHE_LIMIT_MULTIPLE are no longer
needed and are removed (ccache falls back to its 5G default ceiling, but
is realistically much smaller).

ccache configuration:
- Drop CCACHE_COMPRESS (already the default in ccache 4.x).
- Add CCACHE_COMPILERCHECK=content, so a changed compiler mtime on a rebuilt
  ephemeral runner image does not invalidate the whole restored cache.
- Hoist all ccache-related variables (CACHE_BASE_KEY, CCACHE_*, CXX) to the
  workflow-level env.

Remove dead ccache scaffolding:
- reusable-lint-py: the job never compiles or caches; drop its ccache env.
- reusable-rtlmeter-run: remove the disabled persistent-cache step and its
  storage variables; keep CCACHE_DISABLE=1, since caching must stay off to
  keep RTLMeter timings representative.

Store test job ccache as artifacts for reuse
2026-07-06 01:44:32 +01:00
Geza Lore 8b564f509b CI: Remove macos-15 gcc job
On macOS, gcc is an alias for clang, so this job was effectively the
same as the clang job.
2026-07-05 21:18:36 +01:00
Geza Lore c7c778f109 CI: Improve Pages job
Code coverage and RTLMeter complete (concluding 'skipped') on branch
pushes where they do no work, and each completion fires the Pages
workflow_run trigger. Rebuilding and redeploying master's pages for
these no-op events is wasteful.

Gate the build job so a workflow_run whose upstream conclusion is
'skipped' does nothing; deploy and notify need build, so they
cascade-skip.

Route such no-op runs to their own throwaway concurrency group. In the
shared 'pages' group they would, as the newest queued run, cancel a
pending real run and then deploy nothing (concurrency keeps only the
in-progress and newest pending run). Real runs keep sharing 'pages' and
serialize as before.

Add retry to deploy step to reduce flakyness due to the Pages back end.

Fix trigger on workflow file changes.
2026-07-05 21:11:45 +01:00
Geza Lore cbd78e689c CI: Cleanup Windows build (#7873)
The Windows build never actually used ccache; the '.ccache' directory
only ever held the win_flex_bison install, and cmake/MSVC did no compiler
caching. Clean this up:

- Drop the CCACHE_* environment variables from the job (meaningless here).
- Store win_flex_bison in a dedicated 'win_flex_bison' directory instead of
  the misleadingly named '.ccache', and cache just that (static key, as it
  is a fixed third-party tool).
- Set WIN_FLEX_BISON inside ci-win-compile.ps1 as an absolute path, rather
  than in the workflow, making the script self-contained.
- Use the runner's processor count for build parallelism instead of a fixed
  '-j 3', in both ci-win-compile.ps1 and ci-win-test.ps1.
- Remove the verilator-win.zip archive and upload steps; nothing consumes
  that artifact.
- Build Verilator with the Ninja generator from an MSVC developer shell
  instead of MSBuild. MSBuild only parallelizes across projects, and
  Verilator is a single project, so it compiled serially; Ninja keeps all
  cores busy. Also compile with /Od: this job only checks that Verilator
  builds and can verilate an example, so an optimized binary is not needed
  and the otherwise-dominant optimizer time is wasted.
2026-07-05 19:15:09 +01:00
Geza Lore 8d0c75171c CI: Unify regression and RTLMeter build jobs to one (#7872)
- Merge reusable-rtlmeter-build.yml into reusable-build.yml, selected by
  an 'install' flag: archive the installed Verilator for RTLMeter, or
  the whole repository tree for the test jobs.
- Align reusable-test.yml input arguments with  reusable-build.yml
- Pass build/test options as booleans instead of 0/1.
- Inline the single-entry build matrices, and hoist matrix keys that are
  constant across a job.
2026-07-05 18:52:55 +01:00
Geza Lore 6e06cd18da CI: Decouple build and test into separate scripts, simplify workflows (#7871)
- Split the monolithic ci-script.bash into ci-build.bash and
  ci-test.bash, with shared setup in ci-common.bash.
- Pass job parameters as explicit command-line options rather than
  environment variables (--compiler, --prefix, --suite, --asan,
  --gcov, --reloc, --ccwarn).
- Detect the host OS and distribution at runtime (uname,
  /etc/os-release) instead of the legacy Travis-era CI_OS_NAME,
  CI_RUNS_ON and CI_BUILD_STAGE_NAME variables.
- Remove dead code: FreeBSD support, Windows wavediff install, the
  unused CI_COMMIT variable, and various redundant operations.
- Inline the single-entry build-job matrices.
- Rename osx to macOS
- Refuse to run these ci scripts outside GitHub Actions to protect
  developer checkouts.
2026-07-05 15:46:30 +01:00
Geza Lore 198cce29ba CI: Restore relocation testing (#7870)
PR #7776 removed Ubuntu 22.04 clang from the test matrix, which was the
only one testing the relocation of an installation. Add back under
Ubuntu 24.04 clang.
2026-07-05 14:26:30 +01: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 13236822d3 CI: Use faster zstd for repo archives (#7868) 2026-07-05 09:24:33 +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 1bab793c75 CI: Fix deleting pr notifications after multiple reruns 2026-07-04 22:46:19 +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 f82f59a024 Commentary: Changes update 2026-07-03 13:01:05 -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 <[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
Pawel Kojma b97df914dd Fix clang++ ambiguous overload of '==' operator (#7863) 2026-07-03 06:37:48 -04:00
Geza Lore 0e371d6e5c Fix cleaning purity cache after assertions 2026-07-02 17:47:09 +01:00
Geza Lore 1106e89c84 Optimize random initialization
Fetching a thread-local is relatively expensive. Random initializing
wides used to do it once or twice per word, and on short runs for
large designs can be noticeably expensive, so fetch once per variable
instead. Also remove unused VL_RAND_RESET_{Q,W} functions.
2026-07-02 16:38:14 +01:00
Jakub Michalski 506f703da5 Internals: Remove unused variables in verilated_funcs.h (#7862)
Signed-off-by: Jakub Michalski <[email protected]>
2026-07-02 07:16:42 -04:00
Jakub Michalski 853ee5df17 Fix DFG misoptimizing bound checks (#7755)
Signed-off-by: Jakub Michalski <[email protected]>
2026-07-02 11:33:38 +01:00
Wilson Snyder 964474837f Commentary 2026-07-01 19:37:12 -04:00
Wilson Snyder ce4be92a67 devel release 2026-07-01 18:31:23 -04:00
Wilson Snyder 3d2421f3bf Merge from master for release. 2026-07-01 18:30:39 -04:00
Wilson Snyder 848d926ebd Version bump 2026-07-01 18:27:54 -04:00
Wilson Snyder bb9cad507f Commentary: Changes update 2026-07-01 18:27:54 -04:00
Wilson Snyder 28c006ee8c Merge from master for release. 2026-07-01 18:26:56 -04:00
Wilson Snyder 193b1d2c9f Version bump 2026-07-01 18:17:03 -04:00
Wilson Snyder 147fe4ee9f Commentary: Changes update 2026-07-01 18:15:56 -04:00
github action 9c655d379a Apply 'make format' [ci skip] 2026-07-01 19:59:37 +00:00
Sergey Chusov 1ea10ba71c Fix class scope '::' reference through an inherited type parameter (#7844) 2026-07-01 15:58:35 -04:00
Wilson Snyder 6b3e2ce971 Commentary: Changes update 2026-06-29 22:00:10 -04:00
dependabot[bot] e80329a57b CI: Bump actions/cache from 5.0.5 to 6.1.0 in the everything group (#7854) 2026-06-29 11:03:22 -04:00
github action 514fa120f5 Apply 'make format' [ci skip] 2026-06-29 14:58:00 +00: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
Wilson Snyder 6006f91e2e Tests: Add t_queue_array (#6921 test) 2026-06-28 16:07:37 -04:00
Wilson Snyder c4f63583bc Tests: Fix t_cover_expr_fork data location 2026-06-28 15:40:10 -04:00
Wilson Snyder 657d5f6abf Tests: Add t_initial_dlyass2 (#5210).
Fixes #5210. (Confirms fixed in master earlier).
2026-06-28 15:34:50 -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
github action 0ebae43713 Apply 'make format' [ci skip] 2026-06-25 02:44:28 +00: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 <[email protected]>
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
Ryszard Rozak 995534d3ed Fix insertion of expression coverage statement (#7832)
Signed-off-by: Ryszard Rozak <[email protected]>
2026-06-24 07:44:49 -04:00
Artur Bieniek 350158c857 Fix scheduling of virtual interface method writes (#7641)
Fix scheduling of writes in virtual interfaces, there were missing triggers (see added test).

Make V3SchedVirtIface handle writes done inside methods called through a virtual interface. The pass first records direct vif.member writes, VIF method calls, and candidate interface member VarScopes. It then walks the methods reachable from those VIF calls, writes to persistent interface variables in those method bodies are treated as VIF writes, and nested calls are followed with the same interface context. Function locals, temps, and events are ignored because they are not persistent interface storage observable through a later VIF read. Triggers are still created only from the intersection of (interface type, member name) writes and matching VarScopes, so unrelated interface variables and interfaces with no virtual access do not get extra triggers.
2026-06-24 10:51:42 +01:00
github action 84cc08b756 Apply 'make format' [ci skip] 2026-06-24 09:44:11 +00:00
Thomas Santerre bd6b9161dc Optimize bit-scan loops into $mostsetbitp1 / $countones (#7822)
Recognize the common single-bit scan loop idioms in V3Unroll (before it
unrolls) and lower them to bit-reduction primitives, replacing a literal
W-iteration loop with one intrinsic-backed expression:

  target=0; for (i=0;i<W;i++) if (vec[i]) target = i + 1;      -> $mostsetbitp1(vec)
  target=0; for (i=0;i<W;i++) if (vec[i]) target = target + 1; -> $countones(vec)

The leading-one form lowers to a new AstMostSetBitP1 node, emitted as
VL_MOSTSETBITP1_{I,Q,W}; those runtime helpers now use __builtin_clz where
available (same pattern as VL_REDXOR's __builtin_parity), with the existing
bit scan as fallback.  The count-ones form reuses AstCountOnes ($countones,
popcount); as the DFG requires a 32-bit countones result it is built at 32
bits and narrowed to the accumulator width with a select.

Matching is structural to stay sound: the index must start at 0, increment
by exactly 1, and scan all W==width(vec) bits via a single 1-bit select of a
distinct vector, with the target pre-zeroed and no else branch.  The loop
bound is accepted as a strict ascending 'idx < W' written either way and
signed or unsigned (Gt/GtS/Lt/LtS).  Gated by -fbit-scan-loops (on at -O).

Adds t_bit_scan_loops (I/Q/W, count-ones and unsigned-index positives;
step-2, start-1, idx*2+1, vec[idx+1], target=idx and W!=width negatives, all
self-checked and asserted via --stats not to lower) plus t_bit_scan_loops_off
for the disable flag.

Motivated by a transformer inference design whose 80-bit leading-one detector
ran every cycle (~37% of runtime); the lowering is worth ~39% there.
2026-06-24 10:43:05 +01:00
Wilson Snyder 7752625f49 CI: Pin actions to hashes 2026-06-23 21:24:21 -04:00
Wilson Snyder 36d30d8fcb CI: Remove unused passed step 2026-06-23 21:21:07 -04:00
Tom Jackson 2baca68f86 Fix class/var named identically to an enclosing-scope type (#7827) (#7828)
Fixes #7827.
2026-06-23 20:43:31 -04:00
Igor Zaworski 0cd13f80c9 Fix nested class split crash (#7826)
Signed-off-by: Igor Zaworski <[email protected]>
2026-06-23 14:07:15 -04:00
Jakub Wasilewski d5c040d8e6 Fix skewed dist operator for arrays (#7802) 2026-06-23 09:47:55 -04:00
Nick Brereton 6fbc7042a5 Support VPI access to unpacked struct members (#7823) 2026-06-23 07:04:51 -04:00
Geza Lore c76c94ef16 Optimize additional expression patterns in V3Const (#7824)
- Masking that returns known zero
- More general Sel over Extend
2026-06-23 04:22:35 +01:00
Matthew Ballance 756bcf5742 Fix '$' as unsupported coverpoint-bin range bounds (#7750) (#7825) 2026-06-22 22:14:43 -04:00
Artur Bieniek 87bebbb732 Support global $assertcontrol (#7807)
Signed-off-by: Artur Bieniek <[email protected]>
2026-06-22 18:51:41 -04:00
Wilson Snyder c927f05f35 Update fst from upstream (#6771 partial) 2026-06-22 17:25:59 -04:00
dependabot[bot] bf50baefee CI: Bump actions/checkout from 6 to 7 in the everything group (#7821) 2026-06-22 12:48:29 -04:00
github action 515c4282f4 Apply 'make format' [ci skip] 2026-06-22 16:47:50 +00:00
Saksham 729794bc0e Fix CASEINCOMPLETE for all uncovered enum items (#7815) (#7817)
Fixes #7815.
2026-06-22 12:41:48 -04:00
Geza Lore 7765738e11 Internals: Do not generate redundant masking on word selects (#7819)
newAstWordSelClone returns a clean word and these And mask out exactly
the bits that are zero after the shift.
2026-06-22 16:42:22 +01:00
Geza Lore 9670dabcfe Internals: Keep separate stats for constant pool variables 2026-06-22 10:15:49 +01:00
Geza Lore b37c84109d Optimize staticly known oversize shifts (#7806)
The non *Ovr flavours of AstShift* have better downstream constant
folding, so keep using those if proven safe. Fold overshifts explicitly
instead of introducing *Ovr shifts.
2026-06-22 10:06:26 +01:00
Geza Lore fed922a538 Internals: Compact stage statistics table 2026-06-22 09:39:53 +01:00
Geza Lore eafe9636cf Internals: Dump Ast expression pattern statistics like Dfg (#7818)
Remove the expression combination counts from the default stats file,
and add a new `--dump-ast-patterns` option, which will dump new
`*_ast_patterns_*.txt` files. These contain the expression combinations
in a similar S-expression format as Dfg already produces with
`--dump-dfg-stats`. These dumps are not produced by just `--stats` as
they are fairly expensive to compute. Currently the new option will dump
at two points: just before we change to C types via widthMin usage, and
just before emit.
2026-06-21 22:17:36 +01:00
Geza Lore fbea10b427 Internals: Fix dumping of fast-only statistics after emit 2026-06-21 19:10:38 +01:00
Wilson Snyder 78a2dc0738 CI/Makefile: Auto format .rst files (#7816)
Maintainers: Note this requires a `make venv` to get docstrfmt==2.2.0
2026-06-21 13:53:00 -04:00
Geza Lore bcaa110f60 Optimize generated function inlining (#7811)
Previously V3InlineCFuncs inlined call sites but never deleted the now
dead callees. Also missed a lot of opportunities due to evaluation order.

Rewrite using a graph based algorithm, using only a single traversal of
the netlist. This is clearer, more accurate, and faster at compile time.

Also add a clean -fno-inline-cfuncs disable. Setting the limits to 0
still disables inlining, except of empty functions, which can be inlined
with 0 limits (they are no ops). It will also prune unused functions
without -fno-inline-cfuncs.

Pass now also respects `--output-split`
2026-06-21 18:31:56 +01:00
Wilson Snyder 5fc03ae913 Commentary: Make RST documents round-trip clean. No output change intended. 2026-06-21 10:15:47 -04:00
Wilson Snyder b92bf86016 Commentary: Changes update 2026-06-21 10:14:53 -04:00
Geza Lore e1f1a50327 Fix assertion when loop unrolling failed (#7810)
Partial fix for #7810
2026-06-21 10:28:23 +01:00
Igor Zaworski e269b914b2 Support NBAs in initial blocks (#7754) 2026-06-20 17:23:05 -04:00
Wilson Snyder 047d6e03d9 Tests: Add t_sys_file_scan_delay (#4811) 2026-06-20 07:47:44 -04:00
Wilson Snyder 78d96d23ee Commentary (#7809) 2026-06-20 06:45:51 -04:00
Wilson Snyder d66f96e246 Commentary: Changes update 2026-06-20 06:45:04 -04:00
Geza Lore 9a231d254d Optimize Dfg cycle breaking to do less work (#7210)
When a vertex is made acyclic, conservatively update the SCC map to
propagate and mark connected vertices as acyclic as much as possible.
This way we can stop early if the graph becomes acyclic after some
fixups. This can significantly reduce the number of fixups needing to be
applied, avoiding introducing redundancy.
2026-06-19 22:28:50 +01:00
Geza Lore a37e2ee94b Optimize wide decoder case statements into decoder expressions (#7804)
Extend the decoder-pattern case optimization to selectors that are too
wide for a full 2^width lookup table. A decoder-pattern case (where
every case item assigns constants to a fixed set of LHSs) is lowered to
a new AstMachMasked expression. AstMachMasked is emitted as a run-time
VL_MATCHMASKEd_* function call. It contains a packed constant pool table,
'matchp', which is a list of '(mask, bits)' pairs. At runtime, the index of the 
first matching entry is returned, and is used to index a value table. This single
(albeit complicated) expression can replace large if-else trees whole, resulting
in much more compact code with fewer static hard to predict branches. It
is worth about 10% speed and 30% code size in some designs.

Example:

```systemverilog
    logic [39:0] sel;
    always_comb
      casez (sel)
        40'b???????????????????????????????????????1: out = 8'h01;
        40'b??????????????????????????????????????1?: out = 8'h02;
        40'b?????????????????????????????????????1??: out = 8'h03;
        default:                                      out = 8'hff;
      endcase
```

is compiled to:

```c++
    out = TABLE_value[VL_MATCHMASKED_Q(sel, CONST_match)];
```

Where 'CONST_match' contains 4 entries, of a 40-bit mask and 40-bit bit
pattern each, and 'TABLE_value' contains 4 entries of the corresponding
8-bit results. (Entries are aligned to word boundaries to avoid runtime
bit swizzling)
2026-06-19 19:46:13 +01:00
Yilou Wang 59fba72cb6 Support method calls on a sub-interface via a virtual interface (#7800) 2026-06-19 08:41:48 -04:00
Wilson Snyder 749b93e405 Commentary: Use standard multiline rst comments, other cleanups 2026-06-18 21:58:01 -04:00
Wilson Snyder 50c15f3705 Commentary: Changes update 2026-06-18 21:56:02 -04:00
Yilou Wang 129cfc19c0 Fix cross-hierarchy tristate drivers of interface nets (#7339) (#7801)
Closes #7339.
2026-06-18 19:07:37 -04:00
Artur Bieniek 51022d6152 Tests: Fix unstable --vltmt test (#7803)
Fixes #7803.
2026-06-18 14:40:54 -04:00
Yilou Wang a5a16cfbfd Support unbounded always [m:$] and strong s_always liveness (#7798) 2026-06-18 11:17:09 -04:00
Yilou Wang 22b45f0fd7 Fix randomize() with skipping derived pre/post_randomize (#7799) 2026-06-18 11:04:57 -04:00
Geza Lore 5712f9b614 Optimize decoder case statements into lookup tables (#7795)
Recognize "decoder" case statements (where every case item only assigns
constants to a fixed set of left-hand sides) and replace them with a
single packed constant lookup table indexed by the case expression.
Small tables are materialized inline in the generated code, and are
always optimized. Larger ones are placed in the constant pool and only
optimized if deemed beneficial over branches.

While this slightly conflicts with V3Table, and is not worth that much
on it's own, there will be a follow up patch that converts more cases of
this form which will be much more valuable. This patch does the
necessary analysis and the simple table conversion when possible.

Split -fcase into -fcase-table (this new conversion) and -fcase-tree (the
existing bitwise branch-tree conversion); -fno-case is now an alias for
both.

Default branches, assignments preceding the case (used as default values),
casez wildcards, multiple and partial left-hand sides, and both blocking and
non-blocking assignments are handled. Cases that cannot be safely tabled (e.g.
non-exhaustive with no default, overlapping writes to one variable, or mixed
blocking/non-blocking assignments) fall back to the existing if/else lowering.

Consequently disabled re-inlining of constant pool variables in V3Const,
and rebuild the constant pool hash in V3Dead (previously we didn't
create constant pool entries early enough for this to matter)
2026-06-18 09:30:50 +01:00
Yilou Wang 3a4377d39e Support clocking event on a sequence declaration body (#7598) (#7793)
Fixes #7598.
2026-06-17 17:57:18 -04:00
Nick Brereton 26c85d4495 Fix $bits on unpacked structs (#4521) (#7796)
Fixes #4521.
2026-06-17 17:56:48 -04:00
Tracy Narine 4c5e104825 Internals: Remove bad cmake file reference (#7794) 2026-06-17 12:12:25 -04:00
Geza Lore f11c4084d1 Internals: Minor cleanup of case statement lowering
- Factor out match mask construction
- Rename V3Number method to reflect behaviour
2026-06-17 14:39:06 +01:00
Yilou Wang b581f73843 Support $assertcontrol control_type from lock to kill (#7788) 2026-06-17 07:17:39 -04:00
em2machine a534a1d1bc Fix parameter pollution when using class parameters (#7711) (#7763)
Fixes #7711.
2026-06-16 14:03:28 -04:00
Ryszard Rozak 792008514b Fix randomization of dynamic arrs of objects (#7790) 2026-06-16 12:19:00 -04:00
Yilou Wang bec45125bd Fix cover property of an implication counting vacuous matches (#7789) 2026-06-16 11:52:35 -04:00
Jakub Michalski 38fd99b37b Fix out-of-bounds read value for 2-state types (#7785)
Signed-off-by: Jakub Michalski <[email protected]>
2026-06-16 09:21:11 +01:00
Nikolai Kumar a5fad9882f Fix force unpacked bitselect (#7744) (#7745)
Fixes #7744.
2026-06-15 21:57:59 -04:00
Wilson Snyder 0e4a3a92b0 CI: Autoformat markdown files 2026-06-15 17:44:50 -04:00
Wilson Snyder c86816476c Commentary: Changes update 2026-06-15 17:37:49 -04:00
Artur Bieniek 7061c1f04d Fix not failing assertion when RHS of a range window rejects once (#7773) 2026-06-15 15:32:11 -04:00
Yilou Wang 0233e5044c Tests: Restore Antmicro copyright on test files accidentally overwritten (#7786) 2026-06-15 08:56:34 -04:00
Yilou Wang 709c444df3 Internals: Add AGENTS files to guide AI contributions (#7562) (#7765)
Fixes #7562.
2026-06-15 08:42:34 -04:00
Yilou Wang 077558a9b0 Support cover sequence statement (#7764) 2026-06-15 08:36:21 -04:00
Yilou Wang 969a775ae5 Support assertion control system tasks in classes and interfaces (#7761) 2026-06-15 07:33:55 -04:00
Geza Lore a07a980b73 Internals: Do not overload AstVar::isPrimaryIO() for sampled value vars 2026-06-15 09:17:41 +01:00
Geza Lore 5ab2bf1ec4 Optimize input combinational logic by change detection (#7784)
When a lot of combinational logic is driven from top level inputs,
work can be wasted evaluating that logic if the top level inputs don't
change.

This change adds an optimization by performing a change detect on the
top level inputs, and evaluate 'ico' logic only if the top level input
actually changed. This especially helps with --hierarchical/--lib-create
which runs the 'ico' of each sub-model in the eval settle loop.

This was observed to yield 40%+ run-time speedup on some partitioned
designs.

The added change detection is cheap, so it is emitted even if the 'ico'
region is small, and is on by default.

The optimization is only sound if the model itself does not write to the
top level inputs (otherwise the 'previous value' variables would be out
of sync, which are not updated by internal writes.). If we can detect a
top level input is written within the design, then for that input, we
fall back on always running the relevant logic. With --vpi we cannot
prove safety statically, so --vpi will disable this optimisation unless
explicitly enabled. (In which case it's the user's responsibility to not
write to top level inputs via the VPI.)
2026-06-15 05:42:00 +01:00
Wilson Snyder df78db0e73 Fix $fflush and autoflush with --threads (#7782).
Fixes #7782.
2026-06-14 13:36:49 -04:00
Wilson Snyder 12bcf85d33 Internals: Misc V3Life cleanups. No functional change intended. 2026-06-14 13:36:49 -04:00
Geza Lore 77e6a21224 Internals: Inline AstVar::isToggleCoverable()
Inline into the single call site, remove unnecessary isSc() and
isPrimaryIO() guards (these flags are set only in a later pass).

No functional change.
2026-06-14 16:41:13 +01:00
Geza Lore 9a0cd289e8 Fix memory leak in previous patch 2026-06-14 14:53:40 +01:00
Geza Lore b973b1df5a Fix hang in assertion optimization (#7707 repair) 2026-06-14 13:31:59 +01:00
Wilson Snyder c6a5255ea0 Tests: Disable unstable --vltmt tests (#7779) (#7780) (#7781) 2026-06-13 22:07:18 -04:00
Wilson Snyder 44bd8a0c14 Commentary: Changes update 2026-06-13 22:07:14 -04:00
Geza Lore df1b1577d9 Deprecate isolate_assignments attribute (#7774)
As per discussion. Remove the unsound V3SplitAs pass. The
isolate_assignments attribute/directive is now parsed and ignored in the
frontend for compatibility but otherwise have no effect.

Fixes #7144
2026-06-13 19:40:29 +01:00
Wilson Snyder 64d680c9ba CI: Ubuntu 26.04 (#7776) 2026-06-13 08:40:36 -04:00
Geza Lore 7af22422c7 Optimize table lookups in Dfg (#7772) 2026-06-13 08:45:46 +01:00
Geza Lore ba624d7ce1 Optimize away proven redundant case statement assertions (#7771)
This is still mostly refactoring of V3Case, but with functional changes.
Decouple the exhaustiveness/overlap analysis from the decision to
convert the case using the fast bitwise testing method. This enables
dropping the 'notParallel' assertions for those we can prove exhaustive
and unique, even if we decide to convert them using the generic if/else
ladder scheme.
2026-06-13 08:45:26 +01:00
Nick Brereton 87d2610674 Support unpacked struct stream (#7767) 2026-06-12 17:32:01 -04:00
Matthew Ballance e03fa6c783 Support covergroup runtime model Phase A1 (#7728) 2026-06-12 11:40:48 -04:00
Marco Bartoli 5831cc8d46 Fix timed nested fork block with disable (#6720) (#7743)
Fixes #6720.
2026-06-12 10:42:32 -04:00
Nick Brereton 748e48f881 Fix s_eventually in parameterized interfaces (#7741) 2026-06-12 10:41:56 -04:00
Artur Bieniek dab6889f1e Support assert property 'default disable iff` (#4848) (#7723) 2026-06-12 10:40:38 -04:00
Geza Lore e0c4c995b9 Fix crash on overlapping priority case 2026-06-12 14:37:05 +01:00
Geza Lore 279b425a57 Internals: Cleanup V3Case (#7769) 2026-06-12 14:15:41 +01:00
dependabot[bot] 384a63fade CI: Bump codecov/codecov-action from 6 to 7 in the everything group (#7738) 2026-06-12 07:13:57 -04:00
Ryszard Rozak e6ee6dd106 Fix bounds checks in expressions with read/write references (#7694) 2026-06-12 06:55:06 -04:00
Geza Lore 60f729639b Fix 'case (_) inside' with x wildcards (#7766)
Found by inspection, case inside used to threat 'x' as a value, not as a
wildcard. Per the standard it should behave as '==?' which treats both
'x' and 'z' as wildcards.
2026-06-12 07:48:36 +01:00
Geza Lore 4555c8b23c Internals: Cleanup case condition lifting (#7768)
V3Begin used to lift impure case expressions. With V3LiftExpr, this is
now redundant.
2026-06-12 06:38:21 +01:00
Geza Lore 0ee25038ac Optimize V3Gate inlining heuristic (#7716)
V3Gate used to inline too many expensive operations. One particularly
bad example is inlining `{<<{wide}}` (bit-reverse of a wide signal),
which is a single input node, but is quite expensive to compute, which
we always used to inline.

Change the heuristic to only inline single input nodes if they are not
wide, or a cheap wide operation, otherwise treat them the same as
multi-input ops and inline them only if they are used no more than once.
2026-06-11 20:59:18 +01:00
Geza Lore 0ee5cbf502 CI: replace deprecated app-id with client-id 2026-06-11 16:01:16 +01:00
Geza Lore c7a262b05d Optimize bit select removal earlier in Dfg (#7762)
Add a simple Dfg pass that removes redundant bit selects early. This
can significantly cut down on downstream work and remove some temporary
variables introduced during synthesis.
2026-06-11 16:00:30 +01:00
Kornel Uriasz 4c92c035e7 Support reduction XOR/AND operations in constraints (#7753) 2026-06-11 09:43:18 -04:00
Yilou Wang c6caa94fe0 Fix no-scope internal error on virtual interface method calls (#7759) 2026-06-11 09:04:06 -04:00
Adam Kostrzewski 394c9bc9b2 Fix FSM detect unchecked casts and variable redeclaration (#7758) 2026-06-11 08:37:23 -04:00
Geza Lore 901909d3c7 Optimize conditional patterns sharing common MBSs/LSBs in DfgPeephole (#7760)
Replace 3 DfgCond patterns with 2 more general ones that convert DfgCond
with common MSBs/LSBs in both branches into a DfgConcat with a narrower
DfgCond. This pattern arises frequently with Dfg synthesis.
2026-06-11 10:52:43 +01:00
Shashvat e2e1bfe8dd Internals: Remove unused V3TSP (#7194) (#7757) 2026-06-10 18:48:38 +01:00
github action 48008a2fc9 Apply 'make format' [ci skip] 2026-06-10 16:19:51 +00:00
Tracy Narine dc1e9a8ec6 Internals: Fix gcc bison warnings (#7719) (#7756)
Fixes #7719.
2026-06-10 09:18:48 -07:00
Geza Lore d84af81a11 Optimize Dfg with relaxed live variable analysis (#7739)
Relax the live variable analysis performed by Dfg to bail on fewer
cases. This analysis was already conservative (meaning it might think
variables are live when they are not), which is good enough for Dfg use.
This change in particular enables synthesizing more complex logic
involving arrays, e.g. those introduce by V3Table creating lookup
tables.
2026-06-10 15:59:44 +01:00
pawelktk 75993ca9ea Support assoc array methods with wide value types (#7680) 2026-06-10 09:39:43 -04:00
Yilin Li d1319cf81e Fix dpi export pointers (#7742) (#7751)
Fixes #7742.
2026-06-10 09:38:41 -04:00
Geza Lore de0236be2f Tests: Fix race condition in t_udp_nonsequential 2026-06-09 13:07:21 +01:00
Geza Lore 4f134c514b Testing: Rename UDP test to fix typo 2026-06-09 09:53:37 +01:00
Artur Bieniek 1d29f65eae Support property case (#7721) 2026-06-08 15:16:30 -07:00
Geza Lore 85348e3979 CI: Attempt to skip RTLMeter run jobs properly 2026-06-08 22:42:53 +01:00
Geza Lore c5945021c1 CI: Improve RTLMeter PR report (#7740)
- If any simulated cycle counts mismatch, report them and fail the job
- Keep "Elapsed" only in cppbuild
- Ignore "Elapsed" and "CPU" samples less than 30 seconds - too noisy
- Widen acceptable ranges on "Elapsed" and "Memory"
- Add badge legend
2026-06-08 22:22:52 +01:00
Artur Bieniek a3827182c0 Support s_until and s_until_with (IEEE1800-2023 16.12.12) (#7722)
Signed-off-by: Artur Bieniek <[email protected]>
2026-06-08 14:08:04 -04:00
Geza Lore 96336395d6 Internals: Simplify V3CfgLiveVariables to work only in scoped mode
No functional change
2026-06-08 17:06:45 +01:00
Geza Lore ece4d71e5b Optimize CReset in Dfg (#7737)
Teach DFG about CReset. This is not so much to optimize CReset itself, but to enable synthesizing logic involving CReset, which does appear with automatic variables used only in certain branches
2026-06-08 17:01:50 +01:00
Geza Lore e6a070b93b CI: Turn off bash tracing in pages.yml - missed 2026-06-08 16:47:37 +01:00
Geza Lore 487437f87d CI: Turn off bash tracing in pages.yml 2026-06-08 16:45:40 +01:00
Geza Lore e8489cd38b CI: Fix max-parallel factor for RTLMeter runs
The intention was to run scheduled with max 2 parallel jobs, however,
due to a bug they were run with 7 just like PR runs. This didn't seem to
cause problems, so change it all to 7, except for the hierarchical,
which runs on 6, for a total of a maximum 20 parallel RTLMeter run jobs
per workflow run.
2026-06-08 13:18:01 +01:00
Geza Lore 8fef7989d7 CI: Fail RTLMeter runs fast for PRs 2026-06-08 13:17:50 +01:00
Geza Lore 20e72ae0d0 Configure: Fall back on dynamic malloc libraries if static not available (#7736)
When configured with --enable-partial-static (default on), only the
availability of static libraries were checked. Some platform only
package dynamic libs. If the static library is not found, fall back on
trying the dynamic one.
2026-06-08 11:55:38 +01:00
Wilson Snyder 57c9f22e3c Tests: Enforce 2-space indents on Verilog 2026-06-07 22:00:24 -04:00
Wilson Snyder 96630cee5a Verilog format 2026-06-07 21:55:43 -04:00
Wilson Snyder 53cb913ab6 Internals: Fix lint-py warning 2026-06-07 21:37:16 -04:00
Marco Bartoli 2db34818b3 Fix parameter values in coverage bins widths (#7732) (#7734)
Fixes #7732.
2026-06-07 20:47:43 -04:00
Marco Bartoli 4d556dfcc7 Fix s_eventually on interface (#7731) (#7733)
Fixes #7731.
2026-06-07 20:46:00 -04:00
Wilson Snyder 4e49941b39 CI: Skip later CI on reformat
Small chance a bug gets through, but this will avoid multiple runs on the
common case of reformatting users' pull requests, and related run
cancellation problems.
2026-06-07 16:02:29 -04:00
Geza Lore 5cb8d8291a CI: Load RTLMeter cases to run from separate file (#7730)
Add a script that prints the job matrix of cases to run with RTLMeter.
This enables running different sets based on parameters. It will run
everything on scheduled nightly runs, but only a subset on PRs (to reduce
time and variance due to short cases).

Also prints the job matrix in descending duration order, which
effectively makes GitHub actions schedule longest jobs first to reduce
total workflow latency.
2026-06-07 20:50:31 +01:00
Geza Lore 220e46994c CI: Combine RTLMeter collate step to reduce job count (#7729) 2026-06-07 20:30:57 +01:00
Geza Lore 83ef69d866 CI: Run RTLMeter on the same machine with target commit (#7726) 2026-06-07 15:36:34 +01:00
Wilson Snyder d9cbc27902 Disable blank github issues 2026-06-07 08:47:00 -04:00
Wilson Snyder d62ebf9e6d Update github issue templates 2026-06-07 08:40:07 -04:00
Wilson Snyder f20076c4a3 Commentary: Changes update 2026-06-07 08:34:17 -04:00
Geza Lore 4e3be56415 CI: Improve RTLMeter reports (#7725) 2026-06-07 11:50:02 +01:00
Geza Lore 4ee19c4065 CI: Generate whole RTLMeter report in ci-rtlmeter-report.bash 2026-06-07 09:54:40 +01:00
Geza Lore 067cd6c9c6 CI: Show summary tables in 'pr: rtlmeter' results 2026-06-06 19:10:27 +01:00
em2machine 680ef8dda9 Fix for HIERPARAM - relax checking (#7570) (#7690) 2026-06-06 11:55:47 -04:00
Wilson Snyder 85d9c38ebf Commentary: Changes update 2026-06-06 10:46:18 -04:00
Wilson Snyder 629266a988 Fix whitespace 2026-06-06 10:46:02 -04:00
Geza Lore e35b2429ff Optimize $countones constant in Dfg 2026-06-06 06:11:13 +01:00
Geza Lore ca376d681a Optimize $onehot in Dfg 2026-06-06 06:11:13 +01:00
Geza Lore e53d6d9006 Improve procedural loop unrolling
- Enable unrolling of nested loops when the inner loop updates the
  outer loop condition
- Enable unrolling 'for' loops with break statements
2026-06-06 06:11:13 +01:00
github action e9274be247 Apply 'make format' 2026-06-06 00:44:02 +00:00
Nikolai Kumar bc86701bec Support forceable on unpacked array variables (#7677) (#7678)
Fixes #7677.
2026-06-05 20:43:06 -04:00
Wilson Snyder 816ab67826 Commentary: Changes update 2026-06-05 18:36:55 -04:00
Ryszard Rozak 0851d1fbe5 Fix optimizations of assignments with timing controls (#7718) 2026-06-05 12:21:21 -04:00
Matthew Ballance 2886291eba Support covergroups, coverpoints, and bins (#784) (#7117)
Fixes #784.
2026-06-05 09:35:01 -04:00
Mateusz Gancarz 7e2fe64ae2 Fix splitting functions containing fork logic (#7717) 2026-06-05 09:32:52 -04:00
Larry Doolittle 99f62fca62 Adjust installredirect Makefile action to not write to ${srcdir} (#7715) 2026-06-05 06:53:50 -04:00
Yogish Sekhar 947a08965e Add hierarchy-aware reporting to verilator_coverage (#7657) 2026-06-04 09:32:19 -04:00
Geza Lore 14cf611c72 Internals: Factor out inlining predicate in V3Gate
No functional change.
2026-06-04 09:33:24 +01:00
Nick Brereton 81282c3d57 Fix (const) ref default task argument handling (#7698) 2026-06-03 22:31:21 -04:00
Nick Brereton 4d5393c191 Fix tristate lowering for interface inout ports (#7134 repair) (#7708) (#7710)
Fixes #7708.
2026-06-03 19:51:49 -04:00
Todd Strader 7bd41bfbb9 Fix MULTIDRIVEN in generates (#7709) 2026-06-03 19:50:56 -04:00
Artur Bieniek 72db0b575e Support if/if-else in properties (#7692) 2026-06-03 15:54:15 -04:00
Nick Brereton bbd8d927ee Support printing enum names for %p and %s (#5523) (#7338 repair) (#7521) (#7527) 2026-06-03 14:55:00 -04:00
Geza Lore 41811d436f Optimize runtime assertOn() checks (#7707)
Combine consecutive assertOn() checks into one, and hoist past enclosing
'if' statements if possible. This enables combining a lot of them, which
can be worth 10% performance on some assertion heavy designs depending
on how the assertions are written.
2026-06-03 18:09:49 +01:00
Nick Brereton 1af9c39759 Fix ref-arg type check for packed arrays with differing range directions (#7700) 2026-06-03 12:49:14 -04:00
Igor Zaworski bbf8471c2a Fix of ignoring not found pruned modules with encoded names (#7706) 2026-06-03 12:19:33 -04:00
Geza Lore c878a7e735 Optimize VL_ONEHOT
Equivalent to `__builtin_popcount(_) == 1` and a few instructions
shorter.
2026-06-03 11:24:34 +01:00
Geza Lore 7b45b3ee8a Optimize string formatting runtime functions
Add an overload that takes `const char*` format string. This avoids
having to construct/destruct a temporary `std::string` at the call site
when calling these functions with a string literal, which is fairly
common. This is worth 25% code size on some assertion heavy design.

Also use `std::string::clear()` instead of assigning an empty string
which is more efficient.
2026-06-03 11:18:38 +01:00
Geza Lore 715f5f0c13 Optimize $sformatf into $sformat (#7701)
Turn `x = $sformatf(...)` into `$sformat(x, ...)`. The former requires
checking and running a destructor for `x` at the call site, the later
does it in the callee VL_SFORMAT. This reduces the size of the call
site, which can be significant e.g. in the presence of many assertions.

Also added a rewrite of `$sformat(x, "const-string")` back into `x =
"const-string"` for the cases where the `$sformatf` would have been
folded into a constant string.
2026-06-03 08:43:05 +01:00
Geza Lore efb83c55de Optimize VL_SFORMAT when result is string (#7702)
Omit unused bit width parameter. Emit rule is simple enough to change
and the unused parameter just bloats code size.
2026-06-03 08:42:48 +01:00
Geza Lore 970e7983d3 Optimize $sformat in V3Life (#7703)
Treat AstSFormat as a special form of assignment in V3Life. This allows
eliminating earlier redundant assignments to strings when an $sformat
later sets the string. UVM has lot of these.
2026-06-03 08:41:58 +01:00
Geza Lore 0026a73ca0 Optimize DPI import argument passing (#7704)
Pass inputs to DPI import wrappers by reference (unless fits in a
register). This eliminates a lot of temporary constructors/destructors.
2026-06-03 08:41:33 +01:00
Krzysztof Bieganski 7664bbb3ef Support generic interface arrays (#7604) 2026-06-02 22:28:50 -04:00
github action 0c9448dadd Apply 'make format' 2026-06-02 20:47:02 +00:00
Tracy Narine ee793669c5 Support MacOS lldb (#7697) 2026-06-02 16:42:42 -04:00
Igor Zaworski fe4adfe273 Support process::self().srand() (#7695) 2026-06-02 12:00:27 -04:00
Kamil Danecki 802efd579a Fix t_class_param type invalid array access (#7615 repair) (#7653) (#7693) 2026-06-02 09:01:05 -04:00
Geza Lore c079aa0b17 Optimize wide conditional expansion in V3Premit (#7691)
V3Premit extracts wide sub-expressions via temporaries, which is needed
for emitting wide operations to C++ (calls to `VL_*_W`). The previous
version used to extract both branches of an AstCond unconditionally,
meaning both branches were fully evaluated. Rewriting the AstCond into
an AstIf instead enables evaluating only the required branch. While
this does limit V3Subst, overall the resulting code is ~3% faster,
and contains ~25% fewer branches on a large design.
2026-06-01 20:25:41 +01:00
Yilou Wang 39b9901032 Support weak until / until_with property operators (#7290) (#7548) (#7685)
Fixes #7290. Fixes #7685.
2026-06-01 14:50:13 -04:00
Wilson Snyder e965fb92de Fix skipping nulls in $sscanf (#7689).
Fixes #7689.
2026-05-31 17:25:28 -04:00
Wilson Snyder 72ed55b180 Support strength on buf/not 2026-05-31 08:54:29 -04:00
Wilson Snyder 5def7c2b5d Commentary: Changes update 2026-05-31 07:16:30 -04:00
Paul Swirhun 1eb12685a7 Support streaming into 2-D unpacked arrays (#7686) (#7687)
Fixes #7686.
2026-05-30 22:08:32 -04:00
github action e2063e7ac0 Apply 'make format' 2026-05-30 19:36:22 +00:00
Muzaffer Kal 57fa98e52c Fix TSP variable ordering for mtasks (#5342) (#7610)
Fixes #5342
2026-05-30 15:35:12 -04:00
Wilson Snyder 2ccaae77ae Fix CONTASSINIT false positive on wire inside two different instantiations
Fixes #7640.
2026-05-30 15:23:02 -04:00
Wilson Snyder 99a24c7f39 Commentary: Changes update 2026-05-30 15:16:41 -04:00
Wilson Snyder 2d16ca375d Tests: Rename t_lint_contassinit 2026-05-30 14:48:01 -04:00
Yilou Wang fa0f814686 Fix biased bit distribution under value < (1 << N) constraints (#7563) (#7684)
Fixes #7563
2026-05-30 13:00:35 -04:00
Nick Brereton 125bdb45f5 Support pre/post increment/decrement inside && and || (#7683) 2026-05-29 19:51:27 -04:00
Geza Lore 9455dddab4 Optimize if branches with same trailing statements (#7674)
If the same statements appears in both branches of an 'if', put a single
copy after the 'if', apply recursively. This also has the effect of
getting rid of conditionals with identical branches, but is more widely
applicable.
2026-05-29 11:26:07 +01:00
Nick Brereton 5d344ab8ff Fix parameter read through locally-declared interface instance (#7679) 2026-05-28 21:20:49 -04:00
em2machine 3d126b77cd Fix for access to parameters via class::localparam (#7609) (#7671) 2026-05-28 17:40:18 -04:00
Zubin Jain 77f0883b06 Fix forceable signal with a procedural continuous assign (#7638) (#7639) 2026-05-28 16:03:27 -04:00
Geza Lore 557dda3396 Fix AstNodeFTaskRef equivalence check (#7673) 2026-05-28 20:33:41 +01:00
Artur Bieniek 45fae00064 Fix width of unsized literal in property expression (#7668) 2026-05-28 15:10:25 -04:00
Geza Lore 55d78b225d Fix signing off new MULTIDRIVEN warnigns on variable (#7672) 2026-05-28 13:34:36 -04:00
Artur Bieniek 3a91b333c3 Fix loss of events due to bit shift (#7670) 2026-05-28 12:45:18 -04:00
Tracy Narine f52fb1f1db Tests: Simplify t_runflag_logfile_open_bad.py (#7669)
Fixes #7667
2026-05-28 12:43:07 -04:00
Pawel Kojma 70045433c9 Fix reserved keywords reaching emitter (#7666) 2026-05-28 10:04:14 -04:00
github action 3bc7021211 Apply 'make format' 2026-05-28 11:21:07 +00:00
Cookie b5555a032e Internals: clean up for redundant m_alwCombFileLinep and m_nodeFileLinep variables (#7665) 2026-05-28 07:20:06 -04:00
Geza Lore cd83e40be5 Fix runtime speed summary report
Repost speed as 'simtime'/'walltime' instead of dividing by 'cputime'
('cputime' is ~ 'threads * walltime' in multi-threaded mode)
2026-05-28 07:20:54 +01:00
em2machine 29d2f522bf Fix internal error when handling typedefs containing parameterized class type members (#7635) (#7661)
Fixes #7635.
2026-05-27 12:17:49 -07:00
Tracy Narine a2fae5eb4b Add +verilator+log+file (#4505) (#7645)
Fixes #4505.
2026-05-27 14:33:19 -04:00
github action 62f475709f Apply 'make format' 2026-05-27 12:35:09 +00:00
Cookie 8ae0e48103 Fix false MULTIDRIVEN warning on always_ff variables (#7351) (#7621) 2026-05-27 08:34:11 -04:00
Bartłomiej Chmiel c9e012ba9a Internals: Suppress clang-tidy warnings in macros (#7656) 2026-05-27 05:16:49 -07:00
github action 291141777e Apply 'make format' 2026-05-27 07:26:42 +00:00
Nikolai Kumar cd532e0e79 Fix dropped iff guard on clocking inside task (#7658) (#7659)
Fixes #7658
2026-05-27 00:24:54 -07:00
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
Yogish Sekhar 8872908704 Tests: Update tests to include parameterized modules (#7655) 2026-05-25 17:46:54 -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
github action be783e5574 Apply 'make format' 2026-05-24 22:09:56 +00:00
Yogish Sekhar cf8713aebc Add --coverage-per-instance 2026-05-24 18:08:55 -04:00
github action 6b48b772d3 Apply 'make format' 2026-05-24 15:43:38 +00: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
Geza Lore bd4bd82d4b Optimize primitive runtime functions
These were a victim of recent refactor but are actually important
(#4733). It also helps in debug builds not to use -O0 memcpy/memset.
2026-05-24 11:39:39 +01:00
Wilson Snyder f0c569ab0d Fix CASEINCOMPLETE to not warn on unique0 case (#7647).
Fixes #7647.
2026-05-23 20:04:54 -04:00
Geza Lore adddec6547 Tests: Reduce peak memory use of UVM tests (#7648) 2026-05-23 19:36:25 -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
Geza Lore ef72b2fabb Tests: Disable t_fsm_register_wrapper_noinline --vltmt (#7644) 2026-05-22 14:27:40 +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
Wilson Snyder daa4a108de Commentary: Debugging non-determinism 2026-05-19 21:51:12 -04:00
Wilson Snyder f3a86bacdd Commentary: Changes update 2026-05-19 21:40:08 -04:00
Geza Lore afad8db672 Fix VlWide equality comparion in unpacked structs (#7618) 2026-05-20 00:57:33 +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
Pawel Klopotek efdc8d1cbf Fix unique_index method on assoc arrays with values differing from the keys (#7616)
Signed-off-by: Pawel Klopotek <[email protected]>
2026-05-19 09:51:23 -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
dependabot[bot] 2ebb99aaa2 CI: Bump actions/create-github-app-token in the everything group (#7611) 2026-05-18 20:48:53 -04:00
Krzysztof Bieganski eb258d7df7 IEEE-compliant, fair std::semaphore (#7435) (#7605)
Signed-off-by: Krzysztof Bieganski <[email protected]>
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
Geza Lore 4e853d8cb6 Fix cpu pinning when no 'core id' present in /proc/cpuinfo (#7599) 2026-05-15 14:45:39 -04:00
Geza Lore 8c8d9b4f4c Internals: Sign off pylint warnings 2026-05-15 17:39:48 +01:00
Yilou Wang f9427c6d5f Support property abort operators (accept_on, reject_on) (#7578) 2026-05-15 08:38:38 -04:00
github action 442dd91683 Apply 'make format' 2026-05-15 11:53:21 +00:00
Stuart MorrisandLeela Pakanati 67e74c5ce4 Fix interface instance name collision (#7591) (#7593)
Fixes #7591.

Co-authored-by: Leela Pakanati <[email protected]>
2026-05-15 07:52:26 -04:00
Krzysztof Bieganski a42c8587cb Optimize force read return values (#7596) 2026-05-14 20:26:02 -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
Wilson Snyder dff2606c0c Commentary: Changes update 2026-05-14 17:38:11 -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
Geza Lore de4f743d0e Internals: Use /bin/sh to test gdb (#7586) 2026-05-14 04:29:24 -04:00
Wilson Snyder a3da587fc3 Internals: Show operator in assert 2026-05-13 21:02:45 -04:00
Wilson Snyder 83b1dacce1 CI: Use windows-2025-vs2026 2026-05-13 21:02:05 -04:00
Wilson Snyder 1653b982b9 Verilog format 2026-05-13 21:00:34 -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 <[email protected]>
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 <[email protected]>
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
Wilson Snyder 831396f848 Commentary: Changes update 2026-05-12 09:52:18 -04:00
Jakub Michalski 05f6db7970 Optimize emitting to_string() for compiler speedup (#7468)
Signed-off-by: Jakub Michalski <[email protected]>
2026-05-12 09:49:21 -04:00
github action a5a1ed55d3 Apply 'make format' 2026-05-12 11:40:38 +00:00
Yu-Sheng Lin 0ebe01a778 Support new FST writer API (#6871) (#6992) 2026-05-12 07:39:43 -04:00
Wilson Snyder bdcdc10966 Fix floating point compile warning on min/max delays. 2026-05-11 19:50:48 -04:00
Wilson Snyder b27e7c02ee Tests: Prefer --binary over timing multipliers 2026-05-11 19:50:48 -04:00
Wilson Snyder d2047e5bad Commentary: Changes update 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 303615bb37 Support TERMUX (#7559). [Laurent CHARRIER]
Fixes #7559.
2026-05-10 08:20:32 -04:00
Wilson Snyder 2bc294ccad Commentary: Add AI policy (#7215) 2026-05-09 19:23:17 -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
Todd Strader f85641e40d Tests: Use top shell w/ xrun (#7556) 2026-05-08 16:03:45 -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
Todd Strader aa68ae953e Tests: Make xrun fail on stop (#7547) 2026-05-08 07:39:38 -04: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
Jakub Michalski 227812ecce Internals: Fix unused variables (#7539) 2026-05-06 06:51:05 -04:00
Michael Rogenmoser a2874b324a Tests: Add virtual interface scheduling convergence tests (#7323 test) (#7536) 2026-05-05 19:17:53 -04:00
Miguel 0e423a4b39 Fix +verilator+seed to default to 1, and 0 to randomly select (#7325) (#7516) 2026-05-05 12:10:51 -04:00
Wilson Snyder d2ae094d43 Commentary (#7532) (#7533) 2026-05-04 18:01:55 -04:00
Wilson Snyder 9a24b3d7ba Commentary: Changes update 2026-05-04 18:00:37 -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
Geza Lore ddcb04b921 CI: Run Servant in RTLMeter jobs 2026-05-03 20:19:15 -04:00
24bit-xjkp 082847a1a2 Fix std::unique_ptr with incomplete type for clang (#7501) (#7526)
Fixes #7501.
2026-05-02 12:14:54 -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 <[email protected]>
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
Wilson Snyder 30edb987d2 CI: Add automatic code coverage references 2026-04-29 07:52:43 -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
Wilson Snyder 6aebcd2b1c Commentary: Changes update 2026-04-28 17:56:24 -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
github action e4803f29b6 Apply 'make format' 2026-04-26 10:29:56 +00: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
Wilson Snyder 2875ec8655 Commentary: Version release process 2026-04-26 02:00:32 -04:00
Wilson Snyder 74ae91a6d0 devel release 2026-04-26 01:58:27 -04:00
Wilson Snyder c233a39052 Merge from master for release. 2026-04-26 01:57:12 -04:00
Wilson Snyder d0aa828c21 Version bump 2026-04-26 01:52:06 -04:00
Geza Lore 42ea9fda17 Commentary: Changes update 2026-04-25 17:56:03 +01:00
Wilson Snyder 00211c290c Commentary 2026-04-25 11:41:30 -04:00
Wilson Snyder 5c989025c7 Commentary: Changes update 2026-04-25 11:26:51 -04:00
github action d1c0184916 Apply 'make format' 2026-04-25 15:17:45 +00:00
M2kar 07d91fb253 Fix infinite recursion with VERILATOR_BIN (#7496) (#7497)
Fixes #7496.
2026-04-25 17:16:50 +02:00
Wilson Snyder 555d7cc043 Tests: Remove old .out files and related cleanups 2026-04-24 12:25:28 -04:00
Wilson Snyder b8d59ed7a8 Commentary: Changes update 2026-04-24 12:22:26 -04:00
em2machine b1d3d63e9f Fix for unction argument expects a class refetence (#7483) (#7489)
Fixes #7483.
2026-04-24 10:31:57 +02:00
Wilson Snyder 2cd9b8df66 Fix multiple inclusion of verilated_std.sv (#7478). 2026-04-23 15:32:02 -04:00
Wilson Snyder 64b91023b1 Commentary: Changes update 2026-04-23 12:47:22 -04: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
Yilou Wang ae642facf5 Fix function-in-constraint internal error on bare port VarRef return (#7473) (#7480)
Fixes #7473.
2026-04-23 10:47:39 -04:00
Geza Lore 3149f43372 Internals: Add special Dfg vertex for replication (#7471) 2026-04-23 10:14:27 +01:00
Yilou Wangandgithub action cfebe805c9 Support implication operator with constraint_set (#7300) (#7448)
* Support implication operator with constraint_set

* improve coverage, achieve 100 line cov

* Address review: simplify addNext; tighten disable soft grammar to constraint_primary

* Apply 'make format'

* re-run

---------

Co-authored-by: github action <[email protected]>
2026-04-23 10:50:23 +02:00
github action 46a6884df6 Apply 'make format' 2026-04-23 07:14:49 +00:00
Yogish Sekhar 72bbccb543 Add Fsm coverage to print summary (#7462) 2026-04-23 09:13:45 +02:00
Wilson Snyder c1d1b333ac With -Wpendantic allow circular assigns 2026-04-23 00:50:12 -04:00
Wilson Snyder 5064a5ee65 Commentary: Changes update 2026-04-23 00:44:50 -04:00
Wilson Snyder 6945f04531 Internals: Use addNext. No functional change intended 2026-04-23 00:34:47 -04:00
Yilou Wang 51eb5346c8 Support sequence within operator (#7461) 2026-04-23 05:47:24 +02:00
github action e4da16caf0 Apply 'make format' 2026-04-22 19:20:00 +00:00
Yogish Sekhar a680919edc Support native FSM state and arc coverage (#7412) 2026-04-22 15:18:59 -04:00
github action 41ddf4d9b6 Apply 'make format' 2026-04-22 16:13:36 +00:00
Nikolay Puzanov 5cddbd7fda Fix tracing virtual interface member written from classes (#5044) (#7465)
Track AstMemberSel writes through virtual interface refs and connect them to matching interface-member VarScopes, so class-driven interface clocks get proper VCD activity updates.

Fixes #5044.
2026-04-22 12:09:30 -04:00
Geza Lore 496665800d Internals: Annotate AstNode classes to generate matching DfgVertex (#7469)
Explicitly annotate those AstNodeExpr subclasses that should have a
corresponding DfgVertex subclass generated by astgen. This avoids having
to tweak things in Dfg when adding new AstNode subclasses, which can
then be handled separately.
2026-04-22 16:35:07 +01:00
em2machine 59fe8066ff Support multidimensional arrays of interfaces (#6230) (#7451)
Fixes #6230
2026-04-22 13:42:10 +02:00
Todd Strader 15163d1e39 Tests: Switch VCD/FST compare to wavediff (#7426) 2026-04-21 13:53:53 -04:00
Geza Lore 686594b4ab Optimize temporary insertion in Dfg (#7459)
Insert temporaries for highest fanout vertices first. Omit them for
cheap comparisons.
2026-04-21 18:34:26 +01:00
Artur Bieniek a1a8b9624c Support IEEE-compliant force/release handling (#7391) 2026-04-21 11:54:42 -04:00
Yilou Wang 280cff06f3 Fix std::randomize inside corrupting class-member queue operand (#7449) (#7456)
Fixes #7449
2026-04-21 17:37:58 +02:00
github action c60d8f002f Apply 'make format' 2026-04-21 12:22:33 +00:00
Yogish Sekhar bca5839d46 Add printed summary to verilator_coverage (#7438) 2026-04-21 14:21:38 +02:00
Geza Lore 2b9d006097 Change Dfg pattern dumps to use --dump-dfg-patterns (#7455)
Dumping Dfg patterns can take a non-trivial amount of time, so do it
only with --dump-dfg-patterns, instead of with --stats.
Also further improve dumping format.
2026-04-21 12:07:19 +01:00
Wilson Snyder 2ef979a39c Fix dead removing packages with only DPI. 2026-04-21 00:34:20 -04:00
Wilson Snyder 23ea3d7f11 Commentary: Changes update 2026-04-21 00:33:40 -04:00
Wilson Snyder 94e3f387a7 Internals: With debug, show cwd 2026-04-20 14:06:01 -04:00
Geza Lore cd30c22d1c Optimize more Dfg patterns (#7452) 2026-04-20 18:28:11 +01:00
dependabot[bot] 81f6cdc32c CI: Bump actions/upload-pages-artifact from 4 to 5 in the everything group (#7453) 2026-04-20 19:16:37 +02:00
em2machine 23ca23b7b5 Fix for ariane/CVA6 false member call on object error (#7445) (#7450)
Fixes #7445.
2026-04-20 18:21:59 +02:00
Geza Lore f3c63d017a Optimize Sel patterns in DfgPeephole 2026-04-20 09:01:31 +01:00
Geza Lore ffd2c5c69e Optimize temporary insertion in DfgPeephole 2026-04-20 09:01:31 +01:00
Geza Lore 93d7d9c417 Optimize DfgDataType::hash() 2026-04-20 09:01:31 +01:00
Yilou Wang 935b2564eb Use NFA in SVA pass (V3AssertNfa: NFA-based multi-lcycle SVA evaluation engine) (#7430) 2026-04-20 07:43:18 +02:00
Geza Lore e82bd52fa3 Optimize arithmetic right shift (>>>) in DfgBreakCycles (#7447) 2026-04-19 20:28:17 +01:00
Geza Lore 60b41c7822 Optimize DfgBreakCycles IndependentBits analysis ordering (#7446)
Perform the data flow analysis based on reverse post-order numbering of
vertices. This speeds up convergence by ~10x. Partial fix for #7201.
2026-04-19 19:48:02 +01:00
Geza Lore 97454a1bc5 Remove multi-threaded FST tracing (#7443)
Remove parallel (using the FST library writer thread) and offloaded
(separate Verilator internal thread) tracing (only used by FST). These
are not compatible with #6992, and #5806 should yield better performance
in all cases.

Consequently mark '--trace-threads' and '--trace-fst-thread' options as
deprecated
2026-04-19 16:02:12 +01:00
Christian Hecken f7a349c5a7 Fix uvm_hdl_release_and_read not reading release value or checking for success (#7425) 2026-04-19 08:24:07 -04:00
Yilou Wang 29a93fe5bc Fix internal error on dist under implication operator in constraints (#7440) (#7442)
Fixes #7440
2026-04-19 08:03:19 +02:00
Wilson Snyder 707dcea914 Commentary/Tests: Describe PARAMNODEFAULT as top.
Fixes #7441.
2026-04-18 11:34:19 -04:00
Wilson Snyder 0537999b1d Commentary: Changes update 2026-04-18 11:27:54 -04:00
Ryszard Rozak ba508c00d2 Support until_with property (#7290 partial) (#7436) 2026-04-17 06:33:36 -04:00
Yilou Wang 72952fd3fb Fix inline constraint on array-indexed randomize target (#7431) (#7434)
Fixes #7431.
2026-04-16 11:02:22 -04:00
Kamil Danecki 3587ac48a4 Fix modification of members of object with const handle (#7433)
Signed-off-by: Kamil Danecki <[email protected]>
2026-04-16 09:43:12 -04:00
Wilson Snyder 4fe121e5aa Commentary: Changes update 2026-04-15 17:46:08 -04:00
Wilson Snyder 1011ea86fa Commentary (#7428) (#7432) 2026-04-15 17:45:48 -04:00
github action 885fbaf075 Apply 'make format' 2026-04-15 12:11:06 +00:00
Rowan Goemans c143c2fdd2 Fix side-effect loss when slicing array expressions (#7427) (#7429)
Fixes #7427.
2026-04-15 08:10:11 -04:00
Todd Strader 7f571971ca Optimize trace code for faster compiles on repeated types (#6707) (#6832) 2026-04-14 19:16:21 -04:00
Yilou Wang 38b7734530 Fix subclass with rand_mode(0) getting randomized (#7376) (#7383)
Fixes #7376.
2026-04-14 16:47:24 -04:00
Geza Lore ab0264deca Optimize more Dfg peephole patterns (#7423) 2026-04-14 16:22:54 +01:00
Wilson Snyder 7e3400b37d Fix virtual interface implied comparison with null (#7421).
Fixes #7421.
2026-04-14 07:25:02 -04:00
Yilou Wang 9eb2ba4c54 Support 2**n expressions in constraint randomization (#7422) 2026-04-14 07:17:53 -04:00
Wilson Snyder 2770e649ba Commentary: Changes update 2026-04-13 21:09:24 -04:00
Wilson Snyder ec4f66120c Test: Remove old Makefile rules 2026-04-13 21:09:09 -04:00
Wilson Snyder 232e6b55fa CI: Fix log_changes including duplicate bug numbers 2026-04-13 21:07:53 -04:00
Wilson Snyder 023b2edd48 Add newline on alarm timeouts to help error parsers 2026-04-13 21:07:03 -04:00
Yilou Wang 6ba45d3383 Support per-process RNG for process::srandom() and object seeding (#7408) (#7415)
Fixes #7408.
2026-04-13 13:58:53 -04:00
em2machine fd7a3f4a16 Fix zero-size parameter (#7387 repair) (#7411) (#7418)
Fixes #7411.
2026-04-13 13:19:11 -04:00
dependabot[bot] 369a315c27 CI: Bump actions/create-github-app-token in the everything group (#7419) 2026-04-13 13:00:35 -04:00
Yilou Wang 83b2061a35 Fix std::randomize treated as this.randomize in parameterized-derived class (#7409) (#7416)
Fixes #7409.
2026-04-13 11:34:17 -04:00
Leela Pakanati 14e2f834e9 Fix parameterized class typedef as interface type parameter (#7000) (#7006)
Fixes #7000.
2026-04-12 20:38:27 -04:00
Wilson Snyder fac07970e6 Improve too-small cast warning to show size 2026-04-12 18:12:41 -04:00
Wilson Snyder be7d26c5be Fix delete inside foreach skipping elements (#7404) (#7410)
Fixes #7404
2026-04-11 22:42:50 -04:00
Wilson Snyder fed8275e42 Internals: Refactor createForeachAssoc. No functional change intended. 2026-04-11 18:10:05 -04:00
Wilson Snyder 0891d51c75 Commentary: Changes update 2026-04-11 17:47:39 -04:00
Wilson Snyder d2c3d134c9 Tests: Speed up t_vpi_force build. No coverage change. 2026-04-11 07:51:39 -04:00
em2machine dc33e8bb18 Fix for Returning an object of the wrong type from a static function of a parameterized class (#5479) (#7387) 2026-04-11 07:49:45 -04:00
github action 529a6b7f93 Apply 'make format' 2026-04-10 23:21:56 +00:00
Shogo Yamazaki b886367128 Fix CMake compiler coroutine flags (#7404) 2026-04-10 19:20:54 -04:00
github action 89c93980f3 Apply 'make format' 2026-04-10 16:18:06 +00:00
Nikolay Puzanov a8f62703ab Fix virtual class inheritance (#7403) (#7405)
Fixes #7403.
2026-04-10 12:17:06 -04:00
em2machine 081ecbd095 Fix for elaboration hang (#7385 repair) #7398 (#7406)
Fixes #7398.
2026-04-10 11:03:14 -04:00
Geza Lore 6595e5cf55 Remove Dfg extract pass (#7394)
This has no measurable benefit and algorithmically will be superseded by
some upcoming work.
2026-04-10 13:46:59 +01:00
Ryszard Rozak 4da31b0418 Support 'until' property (partial #7290) (#7399) 2026-04-10 08:17:54 -04:00
Christian Hecken cf9a52cb92 Fix vpi_put_value not updating forced read value (#7092) (#7395)
Fixes #7092.
2026-04-09 19:08:36 -04:00
Yilou Wang 854e80c3c2 Support nonconsecutive repetition [=N] in sequence expressions (#7397) 2026-04-09 18:28:28 -04:00
Wilson Snyder ecf6d9b674 Commentary: Changes update 2026-04-09 17:50:40 -04:00
Artur Bieniek f32a692ce3 Fix $finish to immediately stop executing code from non-final blocks (#7213 partial) (#7390). 2026-04-09 17:49:57 -04:00
github action bb84bb643b Apply 'make format' 2026-04-09 16:33:37 +00:00
Geza Lore 1b4f574b31 Internals: Improve Dfg pattern dumps 2026-04-09 17:32:26 +01:00
Yilou Wang d20d765dd0 Support first_match sequence operator (#7392) 2026-04-09 11:42:43 -04:00
Wilson Snyder 426cc29d7a Revert "Fix $finish to immediately stop executing code from non-final block…" (#7393)
This reverts commit afd75ed1b8.
2026-04-09 11:38:07 -04:00
Artur Bieniek afd75ed1b8 Fix $finish to immediately stop executing code from non-final blocks (#7213 partial) (#7390)
Signed-off-by: Artur Bieniek <[email protected]>
2026-04-09 11:34:27 -04:00
Geza Lore fb66174d80 Internals: Run Dfg passes on all components at once
This is just a reordering of pass applications to make --stats more
useful. No functional change.
2026-04-09 15:22:10 +01:00
Ryszard Rozak cf6a2aec19 Internals: Clean up sampling. No functional change intended (#7389) 2026-04-09 08:49:07 -04:00
Geza Lore 9f9532ff78 Optimize Dfg only once, after V3Scope (#7362) 2026-04-09 08:31:12 -04:00
Yilou Wang e63c4f563e Support consecutive repetition [*N:M], [+], and [*] in sequence expressions (#7379) 2026-04-08 10:26:03 -04:00
Ryszard Rozak 7dcf586807 Fix sampling of hierarchical references (#7386) 2026-04-08 07:09:25 -04:00
Yilou Wang 141fe8bdad Support sequence intersect operator (#7374) 2026-04-08 09:31:54 +02:00
em2machine 2736262b98 Fix resolving default/nondefault type-of-type parameters (#7380) (#7385) 2026-04-07 17:58:36 -04:00
Artur Bieniek 8c11d0d0bd Support rise/fall delays (#7368)
Signed-off-by: Artur Bieniek <[email protected]>
2026-04-07 06:44:52 -04:00
Yilou Wang dfb7b034a5 Support sequence 'throughout' operator (#7378) 2026-04-06 17:12:22 -04:00
Yilou Wang 72b2ca5585 Support ##[*], ##[+], ##[M:$] unbounded cycle delays in SVA properties (#7377) 2026-04-06 16:31:43 -04:00
Christian Hecken 0df0064d64 Fix VPI access to Verilog force-ed signals (#7381) 2026-04-06 10:51:01 -04:00
Wilson Snyder 9f4546fcb9 Fix constraint 'with' in parameter classes (#7375) 2026-04-04 21:03:44 -04:00
Wilson Snyder 5b9cd12530 Internals: Remove mutex, part of last commit 2026-04-04 18:10:47 -04:00
Wilson Snyder 33493cf5b4 Add +verilator+solver+file (#7242).
Fixes #7242.
2026-04-04 17:26:43 -04:00
Wilson Snyder 2796294396 Fix string inside queue (#7373).
Fixes #7373.
2026-04-04 14:43:06 -04:00
Wilson Snyder 94f3e16a6c Commentary: Changes update 2026-04-04 14:42:11 -04:00
github action 4b6bc1ff83 Apply 'make format' 2026-04-04 18:32:27 +00:00
Yilou Wang 3b454a6f60 Internals: Add isNonPackedArray(). No functional change. (#7334 prep) 2026-04-04 14:31:09 -04:00
Yilou Wang adb48046c2 Fix parameter default comparison when value contains type cast (#6281) (#7369)
Fixes #6281.
2026-04-04 11:02:20 -04:00
Wilson Snyder de8d3c9356 Commentary: Changes update 2026-04-03 20:16:23 -04:00
Wilson Snyder 00bf59ac92 Internals: Cleanup some V3Simulate branches. No functional change intended. 2026-04-03 20:16:10 -04:00
Wilson Snyder ed0506ea8d Internals: Use Var flag instead of magic names. No functional change intended. 2026-04-03 19:05:56 -04:00
Yilou Wang efd60df2be Fix virtual interface select from sub-interface instance (#7203) (#7370)
Fixes #7203.
2026-04-03 19:04:10 -04:00
em2machine e7a644a3fc Fix functions in generate block resulting in "Broken link in node" (#7236) (#7367)
Fixes #7236
2026-04-03 11:19:17 -04:00
Yilou Wangandgithub action 56ed47ee7c Fix false ASSIGNIN on interface input port connections (#7365)
* add oneline fix

* Apply 'make format'

* merge test and update 2 space indents

---------

Co-authored-by: github action <[email protected]>
2026-04-02 20:44:48 +02:00
Yilou Wang 1e5c93cc51 Fix virtual interface function calls binding to wrong instance (#7363) 2026-04-02 10:53:01 -04:00
em2machine 32672deb6f Fix resolving default/nondefault type parameters (#7171) (#7346)
Fixes #7171
2026-04-02 10:51:11 -04:00
Geza Lore d7c484ae85 Fix missing temporary for DfgSplicePacked (#7361) 2026-04-01 22:44:58 +01:00
Geza Lore 2e151c3b74 Do not unroll simple array assignments in V3Slice (#7359)
See also #5644
2026-04-01 22:35:29 +01:00
Yilou Wang 894f6c4c58 Fix virtual interface member trigger convergence (#5116) (#7323) 2026-04-01 21:42:42 +01:00
Geza Lore 6aa6c45c73 Internals: Add DfgGraph::neighborhood for debugging 2026-04-01 10:53:30 +01:00
Geza Lore b4a0ca8ba6 Optimize Ast read references in Dfg directly (#7354)
Introduce a new DfgAstRd vertex, which holds an AstNodeExpr that is a
reference to a variable. This enables tracking all read references in
Dfg, which both enables more optimization, and allows inlining of
expressions in place of the reference more intelligently (e.g, when the
expression is only used once, and is not in a loop). This can get rid of
20-30% of temporary variables introduced in Dfg in some designs. Note
V3Gate later got rid of a lot of those, this is a step towards making
V3Gate redundant. The more intelligent expression inlining is worth ~10%
runtime speed on some designs.
2026-04-01 10:52:56 +01:00
Wilson Snyder dbd4823323 Fix error on illegal nand/nor binary operators (#7353).
Fixes #7353.
2026-03-31 18:35:27 -04:00
github action 1096740113 Apply 'make format' 2026-03-30 23:12:27 +00:00
Wilson Snyder 62ffe43a82 Fix port assignment to large arrays (#6904).
Fixes #6904.
2026-03-30 19:09:23 -04:00
Wilson Snyder 6aa1690745 Tests: Add t_inst_port_reverse (#5877) 2026-03-30 19:09:22 -04:00
Wilson Snyder dc67dc6dc8 Internals: Remove very old VL_SIG* when under VL_NO_LEGACY 2026-03-30 19:09:22 -04:00
Wilson Snyder c8a596e43e CI: Fix ubuntu-24.04-riscv needing install --yes, no systemc 2026-03-30 19:09:22 -04:00
Wilson Snyder 2458819794 Commentary: Changes update 2026-03-30 19:09:13 -04:00
dependabot[bot] ff37860e0c CI: Bump the everything group with 2 updates (#7347) 2026-03-30 14:06:41 -04:00
Yilou Wang 04f410622b Fix wait() hang when interface with combinational logic using process calls and VIF function (#7342) 2026-03-30 15:34:32 +01:00
Yilou Wang bf453361f6 Support consecutive repetition [*N] in SVA properties (#7311) 2026-03-30 07:01:33 -04:00
Artur Bieniek 55958efbe1 Fix false sensitivity of signals to unrelated interface members 2026-03-30 09:42:51 +01:00
Wilson Snyder be6780e44b Tests: Add t_interface_twoports (#5676) 2026-03-29 21:02:12 -04:00
Wilson Snyder d55790c91b Tests: Add t_interface_update (#2765) 2026-03-29 20:52:29 -04:00
Wilson Snyder 86eb6f060f Tests: Update t_disable_inside (#6591) 2026-03-29 20:34:19 -04:00
Wilson Snyder 600eb7ec86 Internals: Favor std::swap. No functional change. 2026-03-29 20:33:06 -04:00
Wilson Snyder 5036af3d37 Commentary: Refer to latest standard where can 2026-03-29 18:06:12 -04:00
Wei-Lun Chiu 092d3d4de0 Support map() method for associative and wildcard arrays (#7344) 2026-03-29 04:00:52 -04:00
Wilson Snyder e0b4d5ad44 Fix lost $stop on implied assertion $error failures. 2026-03-28 10:57:59 -04:00
Wilson Snyder 31757df229 Internals: clangtidy cleanups. No functional change intended (#7343) 2026-03-27 23:14:18 -04:00
Wilson Snyder 82c817d425 Internals: Refactor VPI case statement. No functional change intended 2026-03-27 21:51:34 -04:00
Wilson Snyder 8d109e85d0 Fix missing quotes on VPI error signal names 2026-03-27 21:44:11 -04:00
Wilson Snyder e826a47ad6 Fix broken out-of-bounds scan check 2026-03-27 21:43:11 -04:00
Wilson Snyder 91e6e3aca8 CI: Add note about failure 2026-03-27 21:42:14 -04:00
Wilson Snyder 087dae2a5d Commentary: Changes update 2026-03-27 21:41:52 -04:00
Nick Brereton f66df9e70e Fix disable iff imply-delay statement linking (#7337) 2026-03-27 14:31:03 -04:00
Yilou Wang ba9a7aaa66 Fix static initialization order for packages with class hierarchies (#7324) 2026-03-27 12:53:45 -04:00
Yilou Wang 55e5f01758 Support SVA goto repetition [->N] in concurrent assertions (#7310) 2026-03-27 10:31:15 -04:00
Geza Lore 9ed7a9f98b Internals: Do not optimize variables with RW refs in Dfg 2026-03-27 07:50:05 +00:00
Geza Lore f12cdac8da Optimize muxes in DfgPeephole 2026-03-27 07:50:05 +00:00
Geza Lore 2759f2ab16 Optimize comparisons with identical operands in Dfg 2026-03-27 07:50:05 +00:00
Geza Lore e0fc69a2f0 Optimize CountOnes in Dfg 2026-03-27 07:50:05 +00:00
Geza Lore 382f5003ca Optimize more patterns in DfgPeephole (#7332) 2026-03-27 07:47:50 +00:00
github action 057039e81c Apply 'make format' 2026-03-27 05:33:21 +00:00
Eunseo Song c28ed348fd Tests: Add regression test for PCH with output-split (#7251) (#7328) 2026-03-27 01:32:19 -04:00
Wilson Snyder 7fc76dd9d3 Fix Ubuntu 26.04.beta issues 2026-03-26 22:33:20 -04:00
Wilson Snyder c5364254bb Commentary: Changes update 2026-03-26 21:43:16 -04:00
Jakub Michalski 5d2d05236e Support very wide $display arguments (#7280) 2026-03-26 13:55:14 -04:00
Geza Lore e5adb60461 Internals: Only add VAR_PORT_DTYPE prior to V3Width (#7331) 2026-03-26 13:44:11 -04:00
github action 37a316f0f8 Apply 'make format' 2026-03-26 17:28:43 +00:00
Eunseo Song f369a629c7 Improve E_UNSUPPORTED warning messages (#7329) 2026-03-26 13:25:30 -04:00
Yilou Wang e0963bd587 Fix false ASSIGNIN on interface input ports driven from outside (#7322) 2026-03-26 12:30:16 -04:00
Eunseo Song fbc3b3618d Fix Apple clang PCH compile error with -o flag (#7251) (#7327)
Apple clang rejects `-o` when a precompiled header (.gch) is involved,
reporting "cannot specify -o when generating multiple output files".
Remove the unnecessary `-o $@` from the two PCH build rules; the
`%.o: %.cpp` pattern already implies the correct output name.
2026-03-26 11:52:21 -04:00
Yilou Wang 3ddf7ad6ec Support ##[M:N] range cycle delay in SVA sequences (#7312) 2026-03-26 10:08:22 -04:00
Geza Lore afa071a822 Optimize DfgPeephole until fixed point (#7309) 2026-03-26 06:56:36 +00:00
Yilou Wang 728ddf3331 Fix modport selection of virtual interface handle (#7321) 2026-03-25 07:16:52 -04:00
Artur Bieniek 860ac67c04 Fix linking shared library with its dependencies (#7320)
Signed-off-by: Artur Bieniek <[email protected]>
2026-03-25 07:15:24 -04:00
Geza Lore d33a81d32a Optimize commutative vertex operands in Dfg for better combining 2026-03-25 08:09:37 +00:00
Geza Lore d00f23a2b2 Internals: Remove unused vertices immediately in DfgPeephole 2026-03-25 08:09:37 +00:00
Geza Lore e508d2a6d7 Internals: Use a custom worklist in DfgPeephole 2026-03-25 08:09:37 +00:00
Geza Lore 855884f748 Internals: Simplify DfgPeephole replacement scheme
Always only replace the currently iterated node. This ensures it is not
on the work list, which simplifies upcoming work.

No functional of performance change intended.
2026-03-25 08:09:37 +00:00
Nick Brereton 24918b83be Fix typedef scope resolution for parameterized class aliases (#5977) (#7319) 2026-03-24 17:25:40 -07:00
github action fd2dfd6982 Apply 'make format' 2026-03-24 18:33:07 +00:00
Tracy Narine c58df87c27 Fix MacOs lexer compile error (#7314) (#7315) 2026-03-24 11:30:15 -07:00
Geza Lore 5060f884b5 Internals: Do not format configure generated files
These are in .gitignore, but formatting them causes a change that breaks
some versions of ccache with clang/PCH
2026-03-24 16:56:09 +00:00
Geza Lore 464ef88193 CI: Run RTLMeter when pushing to a 'ci-rtlmeter/**' branch
This enables running the RTLMeter workflow on forks by just pushing to a
branch of this form, without having to go and manually trigger in the
web UI.
2026-03-24 16:56:09 +00:00
Artur Bieniek aff85cef19 Support more than one dot in defparam (#7262)
Signed-off-by: Artur Bieniek <[email protected]>
2026-03-24 09:20:46 -04:00
Yilou Wang 0b2bf991a6 Support boolean and/or in sequence expressions (#7285) 2026-03-24 08:56:14 -04:00
Wei-Lun Chiu 6873dc2f63 Support array map() method (#7307) (#7316) 2026-03-24 02:38:50 -07:00
Ryszard Rozak 9a01a4054a Improve error message when variable used as data type (#7318)
Signed-off-by: Ryszard Rozak <[email protected]>
2026-03-24 01:45:09 -07:00
Nick Brereton 3b328d2bb6 Support disable task by name (#6853) (#7136) 2026-03-23 19:56:31 -07:00
Wilson Snyder 716b404256 Optimize away empty ctor_var_reset.
Fixes #7154.
2026-03-23 18:10:34 -04:00
Geza Lore 06263ec724 Tests: Set MallocNanoZone=0 on macOS when using asan 2026-03-22 17:09:02 +00:00
Marco Bartoli ee7ec08cf5 Add macOS support for AddressSanitizer memory limit (#7308) 2026-03-22 10:05:23 -07:00
Geza Lore b9c8560d12 Internals: Simplify V3DfgCache 2026-03-22 16:01:22 +00:00
Yilou Wang 921607fd35 Support property-local variables and sequence match items (#7286) 2026-03-22 06:21:57 -07:00
Geza Lore 157fa9e4c5 Optimize duplicate vertices in DfgPeephole (#7305) 2026-03-21 22:45:02 +00:00
Geza Lore 13ceeb6add Tests: Add t_trace_lib* tests
Prep #7299
2026-03-21 22:21:00 +00:00
github action a3222bee94 Apply 'make format' 2026-03-21 15:00:48 +00:00
Wilson Snyder 947cbaf330 Deprecate --structs-packed (#7222). 2026-03-21 10:59:27 -04:00
Wilson Snyder 7e71bd1469 Commentary: Changes update 2026-03-21 10:56:13 -04:00
em2machine 05f640459e Fix interface data type consistency (#6965) (#7302) 2026-03-21 10:34:36 -04:00
Geza Lore 4dae9ed4e9 Optimize reuse of existing associative terms in DfgPeephole
Enable V3DfgCache to look up vertices without creating one. Reuse
existing terms in associative expression trees if they already exist
somewhere in the graph.
2026-03-21 11:09:32 +00:00
Geza Lore 92172e32c4 Internals: Add separate statistics for scoped Dfg stages 2026-03-21 10:49:39 +00:00
Geza Lore 13cf9ba075 Internals: Type check vertices made in DfgPeephole 2026-03-21 10:15:18 +00:00
Geza Lore fa30e0c9b5 Internals: Make Dfg type checking available on single vertex
No functional change
2026-03-21 10:13:49 +00:00
Geza Lore 416b30d884 Internals: Add utility to perform bisection search for debugging (#7294) 2026-03-21 10:13:27 +00:00
Christian Hecken 086bf351f2 Fix VPI force of bit-selected signals (#7211) (#7301) 2026-03-20 17:24:45 -07:00
Yilou Wang 9ea7abd1c7 Support ##0 cycle delays (#4263) (#7298) 2026-03-20 18:29:20 -04:00
Igor Zaworski c3fc0d9f0f Fix coroutine trace setters (#7078 repair) (#7296) 2026-03-20 09:23:32 -07:00
Igor Zaworski 331cac2054 Internals: Four-state pre-pull cleanup (#7281) 2026-03-20 12:11:22 -04:00
Yilou Wang b71abb0032 Fix local:: false error in randomize() with on parameterized class (#6680) (#7293)` 2026-03-20 10:25:46 -04:00
Yilou Wang a8bccab8e6 Support named sequence declarations and instances in assertions (#7283) 2026-03-20 10:24:46 -04:00
Yilou Wang 25c3bc814e Support ## delay on implication RHS in SVA properties (#7284) 2026-03-20 09:53:49 -04:00
Yilou Wang 998ec5b1d7 Fix streaming with descending unpacked arrays and unpacked-to-queue (#7287) 2026-03-20 09:51:35 -04:00
Wilson Snyder 9180eebdba Internals: MSVC cleanups 2026-03-19 22:48:12 -04:00
Wilson SnyderandMaksim Fonarev 94f8181cff Fix null assignment to virtual interfaces (#5974) (#5990). [Maxim Fonarev]
Fixes #5974.

Co-authored-by: Maksim Fonarev <[email protected]>
2026-03-19 20:29:02 -04:00
Christian Hecken 49716995fa Fix memory leaks in vpi_handle_by_name and vpi_handle_by_multi_index (#7187 repair) (#7289) 2026-03-19 20:19:36 -04:00
Wilson Snyder ef1f6d59b2 warning disable 2026-03-19 20:16:26 -04:00
Wilson Snyder adcbc86016 Tests: Update t_dpi_open (#7261 test) 2026-03-18 21:01:07 -04:00
Wilson Snyder 7b2277f584 Commentary: Changes update 2026-03-18 20:35:08 -04:00
Wilson Snyder 087cabcf35 Tests: Remove some vltmt-scenario runs. 2026-03-18 19:20:52 -04:00
Yilou Wang a0a684109f Support modport export/import task prototypes and out-of-block definitions (#7277) 2026-03-18 19:20:34 -04:00
Yilou Wang b8ca9292a4 Fix StreamR LHS assertion when source is narrower than destination (#7276) (#7282) 2026-03-18 15:15:27 -04:00
Igor Zaworski 907e775aa6 Internals: Add --fourstate flag and FUTURE warning (#7279) 2026-03-18 13:45:36 -04:00
em2machine a2154e9119 Fix interface derived types passed as parameters to generate loop module instantiation (#7273) 2026-03-18 09:26:55 -04:00
Yilou Wang 4b34bfffcb Fix soft constraint relaxation dropping compatible constraints (#7271)
* Fix soft constraint relaxation dropping compatible constraints

* patch changes the soft handle ordering so update the out files
2026-03-18 10:15:50 +01:00
Christian Hecken 612d1611b6 Fix VPI access to multidimensional packed arrays with ascending indices (#7275) 2026-03-17 23:30:05 -04:00
Yilou Wang 3bb0ea63ad Fix queue slice LHS assignment being silently discarded (#7270) 2026-03-17 15:10:49 -04:00
Yilou Wang 8925762077 Fix rand_mode(0) on sub-object members not preventing solver write-back (#7272) 2026-03-17 15:09:14 -04:00
Yilou Wangandgithub action 316fb02c60 Support assignment patterns as comparison operands (#7269)
* Support assignment patterns as EQ/NEQ comparison operands

* Apply 'make format'

* update the .out file

* add both-sides case

---------

Co-authored-by: github action <[email protected]>
2026-03-17 19:36:54 +01:00
Yilou Wang ef5281ab73 Fix false illegally-wrapped-around error for signed enums whose auto-incremented values cross zero. (#7268) 2026-03-17 19:36:24 +01:00
Wilson Snyder f4b09cffa7 Tests: Fix race in t_select_sideeffect. 2026-03-16 22:23:07 -04:00
Wilson Snyder de2c891ca5 Commentary: Changes update 2026-03-16 22:21:51 -04:00
Wilson Snyder e4bc792732 Tests: Limit test.build_jobs based on number of tests running 2026-03-16 18:50:41 -04:00
Yilou Wang d57324e5fb Support dynamic array .size in inline randomize() with constraints (#7258) (#7266) 2026-03-16 18:48:36 -04:00
Yilou Wang be0f4a507e Fix shift width mismatch in constraint solver SMT emission (#5420) (#7265) 2026-03-16 18:48:09 -04:00
Yilou Wang bf792f1809 Fix array reduction in constraints crashing with class inheritance (#7226) (#7263) 2026-03-16 16:36:48 -04:00
dependabot[bot] e5d0b89bfc CI: Bump actions/create-github-app-token (#7260) 2026-03-16 12:43:15 -04:00
Alex Zhou 651f223387 Fix false recursive definition error (#6769) (#7118) 2026-03-16 07:31:35 -04:00
Geza Lore 1e50fefb89 CI: Remove intermediate size 2x2 RTLMeter runs 2026-03-15 08:33:31 +00:00
Wilson Snyder 602ee384de Support $sformat with runtime format string (#7212). (#7257)
Fixes #7212.
2026-03-14 22:43:56 -04:00
Christian Hecken 42cf5d3be2 Fix vpi_put_value with vpiIntVal on VlWide data (#7256) 2026-03-14 20:08:59 -04:00
Geza Lore 9d38a63563 Support array and struct info metadata in FST traces (#7255)
- Emit arrays under the new FST scope type FST_ST_SV_ARRAY
- Emit packed/unpacked 'array' attributes before FST_ST_SV_ARRAY,
  including left and right indices of the array
- Emit packed/unpacked 'pack' attributes before FST_ST_VCD_STRUCT and
  FST_ST_VCD_UNION, including the number of members in the types

All attributes apply to the immediately following scope definition (just
like enum dtype attributes).
2026-03-14 12:31:33 +00:00
Yangyu Chen bb5a9dc247 Support jemalloc as the default allocator on Linux (#7250)
Add jemalloc as an alternative malloc implementation for the Verilator
binary. When both tcmalloc and jemalloc are available, jemalloc is
preferred due to its better performance on RTLMeter.

The new --enable-jemalloc flag (default=check) mirrors the existing
--enable-tcmalloc behavior: auto-detected at configure time, supports
both static and dynamic linking, and is disabled when --enable-dev-asan
is active.
2026-03-13 17:08:15 -04:00
Yilou Wang 7cd49a8028 Support dist and solve...before inside foreach constraints (#7245) (#7253) 2026-03-13 11:05:18 -04:00
Yilou Wang e0f1f316aa Fix randc solver hang with wide variables (#7068) (#7248) 2026-03-13 07:53:51 -04:00
Artur Bieniek c0d0180918 Fix final asserts and $stop (#7249) 2026-03-12 13:09:54 -04:00
Geza Lore 4b53f5f978 Tests: Consolidate format specific t_trace_* tests (#7216)
Factor out test execution into t/trace_*_common.py, which defines
a 'run' functions. All related t_trace_*py tests call this function.

Behaviour is partially encoded in the file name, which must be of the
form: t_trace_complex_<variant>_<mode>_<format>*.py, where '<variant>'
determines tracing options (default/params/structs), '<mode>' is the
compilation mode (--cc/--sc), and '<format>' determines the trace format
(vcd/fst/saif).

The part of the test name after '<format>' does not influence the test
directly and can be free form. If used, explicit 'verilator_flags2' is
passed to the 'run' function.
2026-03-12 15:21:02 +00:00
Yilou Wang c74eee5123 Fix rand variable used as array index in constraint evaluated as constant (#7238) (#7247) 2026-03-12 10:12:53 -04:00
Wilson Snyder 08c6d5bde5 Improve some display error handling (#7212 prep) 2026-03-12 07:49:21 -04:00
Wilson Snyder a787d631ce Internals: Add some missing const/UNLIKELY markers. No functional change 2026-03-12 07:46:21 -04:00
Wilson Snyder f2fdc57366 Fix --hierarchical dropping arguments in -f/-F files (#7240). 2026-03-12 07:25:32 -04:00
Wilson Snyder 1198ee919d Commentary: Changes update 2026-03-12 07:22:33 -04:00
Christian Hecken b3a1a15e2b Fix vpi_put_value release on non-continuous signal (#7231) (#7241) 2026-03-11 22:57:13 -04:00
Wilson Snyder cbf8d97a76 Tests: Misc string format test improvements 2026-03-11 19:58:52 -04:00
Wilson Snyder aca2c05ad9 Tests: Fix t_dump_json to not need sensitive golden file 2026-03-11 19:58:07 -04:00
Wilson Snyder d87035d187 Commentary: Fix non-grammar 2026-03-11 19:53:23 -04:00
Geza Lore be429ce956 Fix tracing of typedefed 1D packed arrays with --trace-structs (#7237)
Used to incorrectly unroll 1D packed arrays of 'bit' or 'logic' into
elements when using --trace-structs if the array element type was given
via a typedef. Keep them as a single signal instead.
2026-03-11 12:46:13 +00:00
Yilou Wang f351882cf0 Fix enum range constraints missing for rand variables in sub-objects (#7230) (#7235) 2026-03-11 07:21:40 -04:00
Wilson Snyder 985f45759c Update libfst from upstream 2026-03-11 07:17:02 -04:00
Wilson Snyder db9d782061 Commentary: Changes update 2026-03-11 07:10:41 -04:00
Rahul Behl cd8818ca23 Fix randomize size+element queue constraints (#5582) (#7225) 2026-03-11 06:51:32 -04:00
Pawel Kojma 4e6eafd994 Allow constant expressions without parentheses in PATHPULSE$ declaration (#7199) 2026-03-11 06:01:33 -04:00
Yilou Wang 5bf1d060c9 Fix internal error when derived class calls this.randomize() with inherited rand members (#7229) (#7234) 2026-03-10 19:03:18 -04:00
Yilou Wang 3ba9077726 Fix soft cross-object constraint priority inversion (#7228) (#7233)
Emit nested constraint setup tasks in depth-first order (deepest first)
so outer-scope soft constraints get higher priority per IEEE 18.5.13.
2026-03-10 19:02:15 -04:00
Christian Hecken 15c60c83aa Internals: Remove m_mask from VerilatedVpioVar (#7232)
Unused since #5573
2026-03-10 17:57:10 -04:00
Wilson Snyder a7a5c9f548 Improve not-found message to show cwd 2026-03-10 08:55:51 -04:00
Rahul Behl 2046879beb V3Randomize: Fix dist operator inside ConstraintIf blocks (#7221) (#7224)
The lowerDistConstraints() function was not recursing into ConstraintIf
nodes, causing dist operators inside if-else blocks to remain unlowered
and trigger an internal error when ConstraintExprVisitor encountered them.

Fix by adding recursive handling of ConstraintIf nodes in lowerDistConstraints:
- Check for AstConstraintIf nodes before AstConstraintExpr
- Recursively process thensp() and elsesp() branches
- This ensures all dist operators are lowered regardless of nesting

Test case: t_randomize_dist_conditional.v demonstrates conditional dist:
    constraint c {
      if (randd) {
        x dist { 8'd0 := 1, 8'd255 := 3 };  // 25% / 75%
      } else {
        x dist { 8'd0 := 3, 8'd255 := 1 };  // 75% / 25%
      }
    }

Fixes #7221
2026-03-10 07:06:00 +00:00
em2machine 1b2b8afdc1 Fix wrong $bits() for parameterized interface struct typedefs (#7218) (#7219) 2026-03-09 22:32:13 -04:00
Veripool API Bot 1f67080a1f Tests: Verilog format 2026-03-09 21:39:16 -04:00
dependabot[bot] b33537d7a7 CI: Bump docker actions with 5 updates (#7220) 2026-03-09 14:49:19 -04:00
Veripool API Bot 07ed6aef53 Tests: Verilog format 2026-03-08 18:26:40 -04:00
Christian Hecken 9c5f4e2483 Internals: Extend VerilatedVar to hold force control signal pointers (#7217) 2026-03-08 15:53:32 -04:00
Christian HeckenandChristian Hecken 0019c12242 Fix vpi_handle_by_name generated scope retrieval (#7187 repair) (#7214)
Co-authored-by: Christian Hecken <[email protected]>
2026-03-07 20:36:29 -05:00
Wilson Snyder 3097df46fa Change --converge-limit default to 10000 (#7209).
Fixes #7209.
2026-03-07 09:05:37 -05:00
Wilson Snyder 68d6dd7eee Internals: Add UASSERT to avoid error fault on sv-tests regress-sv_sv_import_hier_fail1_iv 2026-03-07 09:03:42 -05:00
Wilson Snyder 67ced4715d Tests: Fix t_json_only_debugcheck to not need sensitive golden file 2026-03-07 08:35:54 -05:00
Wilson Snyder 4d369e4262 Fix --debug-inputs for .vlt files 2026-03-07 08:01:27 -05:00
Veripool API Bot cf965464a2 Tests: Verilog format 2026-03-07 08:00:45 -05:00
Wilson Snyder b38c4bd7d6 Commentary: Changes update 2026-03-07 08:00:10 -05:00
em2machine bef5c1f475 Fix static function not found from parameterized extends class (#7204) (#7208) 2026-03-06 16:23:02 -05:00
Rahul Behl efa53189ea Support constraint with item.index array reduction (#7198) 2026-03-06 05:14:55 -05:00
Geza Lore cedec65c39 Change array tracing to always dump left index to right index (#7205)
Also add array bounds and struct/union member counts to trace pushPrefix
(not used by vcd/fst/saif). Together these improve consistency in some
waveform formats.
2026-03-06 09:32:08 +00:00
Wilson Snyder b89d29cab9 * Support procedural concurrent assertion simple cases (#6944).
Fixes #6944.
2026-03-05 20:03:48 -05:00
Wilson Snyder c2d65c2e13 * Fix class extend references between queues (#7195).
Fixes #7195.
2026-03-05 18:04:22 -05:00
Wilson Snyder caf624944f Commentary: Changes update 2026-03-05 18:04:22 -05:00
github action fb00eb3bc6 Apply 'make format' 2026-03-05 21:06:48 +00:00
Julian Carrier 45a5e72509 Fix recursive default assignment for subarrays (#4589) (#7202) 2026-03-05 16:05:54 -05:00
Geza Lore 4f4d48e9d7 Fix library/hier_block tracing when top name is empty (#7200) 2026-03-05 08:44:41 -05:00
Ryszard Rozak 258629634c Support force assignments to array elements of real type (#7048) 2026-03-05 08:37:20 -05:00
Nick Brereton e5ad9b3a4b Support Z non-blocking assignment (#7192) (#496) (#7197) 2026-03-04 22:39:05 -05:00
Wilson Snyder 572f50126b Improve function call argument error to show target function (rewording) 2026-03-04 20:22:25 -05:00
Wilson Snyder c93f5256d4 Fix string cast on array call 2026-03-04 20:12:10 -05:00
Veripool API Bot 4ff518de61 Verilog format 2026-03-04 20:12:10 -05:00
Wilson Snyder 9150e9b522 Commentary: Changes update 2026-03-04 20:07:05 -05:00
Christian Hecken 84f3cc4f48 Add VPI array indexing support in signal names (#7097) (#7187) 2026-03-04 19:37:06 -05:00
Wilson Snyder 1bf2ea7643 Improve function call argument error to show target function 2026-03-04 19:01:01 -05:00
Igor Zaworski 7acd73fede Fix super constructor calls with local variables, by using init functions (#6214) (#6933) 2026-03-04 17:55:55 -05:00
em2machine c34cd6ddf1 Fix missing scope when calling package function (#7128 repair) (#7188) (#7190) 2026-03-04 15:37:55 -05:00
Rahul Behl 9a5c1d27c8 Support array reduction methods with 'with' clause in constraints (#6455) (#6999) 2026-03-04 12:01:35 -05:00
Nick Brereton 44701201ac Support inout inside SV interface (#3466) (#7134) 2026-03-04 09:08:07 -05:00
jalcim 7cf539cf05 Add --func-recursion-depth CLI option (#7175) (#7179) 2026-03-04 06:46:07 -05:00
Yilou Wang 3bc73cc768 Support constraint imperfect distributions (#6811) (#7168) 2026-03-03 11:23:14 -05:00
em2machine 5f3d475736 Internals: Minor coverage improvement as followup to (#7128 followup) (#7184) 2026-03-03 11:13:32 -05:00
Wilson Snyder f232449252 Commentary: Changes update 2026-03-03 07:21:39 -05:00
Veripool API Bot ce4d35aa85 Verilog format 2026-03-03 07:21:24 -05:00
em2machine 5821d0697c Fix interface localparam dependencies and arbitrary nesting (#6936) (#7128) 2026-03-03 06:55:59 -05:00
Yilou Wang ed84f3adb2 Support constraints on fixed-size array of class object members (#7170) (#7183) 2026-03-03 06:27:31 -05:00
Wilson Snyder ee68d1c70c CI: Disallow pulls to stable 2026-03-02 17:48:32 -05:00
Wilson Snyder 1f2f4d9bba Commentary: Changes update 2026-03-02 17:47:54 -05:00
jalcim d406efdcf9 Fix recursive constant function in $unit scope (#7174) (#7178) 2026-03-02 15:15:34 -05:00
Wilson Snyder 1264184fbb Revert "Fix recursive constant function in $unit scope (V3Scope.cpp:359) (#7174)" (#7178)
This reverts commit 5d1992ef05.
2026-03-02 15:07:20 -05:00
jalcim 5d1992ef05 Fix recursive constant function in $unit scope (V3Scope.cpp:359) (#7174) 2026-03-02 15:04:28 -05:00
Wilson Snyder 251d1835cf Internals: Comment to explain stray emit semicolon 2026-03-02 11:26:48 -05:00
dependabot[bot] a3870c5e5e CI: depandabot: Bump actions with 2 updates (#7172) 2026-03-02 10:52:53 -05:00
Yilou Wang 8a413b3ec7 Fix std::randomize() in static function with static class members (#7167) (#7169) 2026-03-02 05:59:00 -05:00
Yilou Wang 108d209bd7 Support soft constraint solving with last-wins priority (#7124) (#7166) 2026-03-01 15:16:55 -05:00
Wilson Snyder 192445097a Internals: Fix non-determinism in V3Delayed, V3SplitVar, V3Task (#7120 partial) (#7165) 2026-03-01 11:59:29 -05:00
Geza Lore 6c48b3282e Enable V3LiftExpr with code coverage (#7164) 2026-03-01 15:04:49 +00:00
Geza Lore 3249fd8cc0 Internals: Mark Premit temporaries funcLocal, noReset (#7160) 2026-03-01 14:56:21 +00:00
Geza Lore 9d8baa1e44 Testing: Relax expected file count in t_flag_csplit_groups (#7163) 2026-03-01 13:27:46 +00:00
Geza Lore 97838325cd Fix scheduling non-determinism (#7120 partial) (#7162) 2026-03-01 07:44:59 -05:00
Geza Lore 77ce9cec1e Optimize conditional merging across some impure statements (#7159)
- Allow reordering pure statements with DPI import calls iff no public
  variables (including those read via a DPI export) are involved. This
  ensures the DPI import can't observe the reordering
- Allow reordering of pure statements with AstDisplay and AstStop. This
  requires an assumption that AstDisplay and AstStop will not read or
  write model state other than via a VarRef explicitly present int the
  Ast.
Overall this allows eliminating a lot of conditionals around assertions,
which were previously not possible.
2026-03-01 05:47:05 -05:00
Geza Lore 26eac21432 Internals: Use existing astgen type info for ASTGEN_MAX_NODE_SIZE (#7161) 2026-03-01 05:33:30 -05:00
Wilson Snyder e9dd6eaaf0 Internals: Fix VL_ALLOC_RANDOM_CHECKS with multiple threads 2026-02-28 20:24:09 -05:00
Wilson Snyder e23c7a510e Internals: Add VL_ALLOC_RANDOM_CHECKS 2026-02-28 18:21:51 -05:00
Wilson Snyder 230ce772c2 Tests: Verilog format; rename test 2026-02-28 18:19:34 -05:00
Wilson Snyder 2e351651cb Fix undefined weak 'vlog_startup_routines' on macOS 2026-02-28 18:17:00 -05:00
Wilson Snyder 17ad3970ee Commentary: Changes update 2026-02-28 18:15:07 -05:00
Geza Lore 098fe96643 Add V3LiftExpr pass to lower impure expressions and calls (#7141)
Introduce new pass that converts impure expressions, or those with
function and method calls into simple assignment statements. Please see
the blurb at the top of the file why this is useful and how it works.
In particular currently it enables more Dfg optimization as functions
will be inlined without AstExprStmt.

Ideally we should enforce this lowering is applied to every procedural
statement (there are still a handful of exceptions). With that, long
term with this pass + #6820, there should be no need to ever use an
AstExprStmt past this new lowering pass, which should enable more easier
optimization down the line.

Also ideally this should be run earlier. Currently it's after V3Tristate
as that calls pinReconnectSimple so we don't have to touch Cell ports.

Currently disabled when code coverage is enabled due to #7119.
2026-02-28 22:20:09 +00:00
Geza Lore 99238f67b8 Fix undefined weak 'vlog_startup_routines' on macOS 2026-02-28 16:10:59 +00:00
Geza Lore 2ceea267e5 Fix eliminating assignments to DPI-read vaiables (#7158) 2026-02-28 10:09:01 -05:00
Pawel Kojma face700f29 Improve assignment-compatibility type check (#2843) (#5666) (#7052) 2026-02-28 09:55:06 -05:00
Geza Lore 139bdc1ae3 Optimize function call return value temporaries (#7152) 2026-02-28 09:54:39 -05:00
Szymon Gizler 1af7fa92c2 Optimize size of trace declaration object code (#7150) 2026-02-28 09:54:08 -05:00
Ryszard Rozak 6f892d58ac Fix forcing unpacked variables (#7149) 2026-02-28 09:53:41 -05:00
Kamil Danecki df6b808c49 Fix parameters inside std::randomize with clause (#7140) 2026-02-28 09:53:05 -05:00
Todd Strader 8705bc56c8 Fix errant integer promotion (#7012) 2026-02-28 09:52:35 -05:00
Nick Brereton 02c1dbc5dc Fix lambda coroutines (#6106) (#7135) 2026-02-28 09:52:02 -05:00
Geza Lore 1716423d07 Internals: Fix invalid use of user1 in V3Const (#7157) 2026-02-28 09:51:07 -05:00
Wilson Snyder 1e6c1ab106 Add VPI callback support to --main (#7145).
Fixes #7145.
2026-02-28 09:42:28 -05:00
Wilson Snyder d40036239b Fix wide conditional short circuiting (#7155).
Fixes #7155.
2026-02-28 09:40:10 -05:00
Wilson Snyder 5ae285d268 devel release 2026-02-28 09:37:43 -05:00
Wilson Snyder f4369ed694 Merge from master for release. 2026-02-28 09:31:29 -05:00
Wilson Snyder 24b2ac24c7 Version bump 2026-02-28 09:21:59 -05:00
Wilson Snyder af65a85a1e Fix function locals in display %p 2026-02-26 18:12:12 -05:00
Wilson Snyder 2efcfa567c Commentary: Changes update 2026-02-25 20:28:14 -05:00
Veripool API Bot 3190442f86 Verilog format 2026-02-25 20:28:07 -05:00
Wilson Snyder 6f96ff8df6 Tests: Limit test.build_jobs based on number of tests running 2026-02-25 20:27:07 -05:00
Wilson Snyder 22290a74c2 Fix class initial-automatic insertion order (#7086 repair) 2026-02-25 19:01:19 -05:00
em2machine d658517715 Change type definition error to show type chain with source context (#7151) 2026-02-25 14:47:13 -05:00
AUDIY 8d34bc786a Commentary: Add coverage type to example (#7148) 2026-02-25 01:26:51 -05:00
Wilson Snyder 7dde11b4c6 Docs: Split control.rst from exe_verilator.rst. 2026-02-24 21:11:39 -05:00
Wilson Snyder ef498255f9 Commentary: Changes update 2026-02-24 21:03:35 -05:00
Veripool API Bot c28200c53a Verilog format 2026-02-24 21:03:32 -05:00
AUDIY 10eafb9b3f Add coverage type information to verilator_coverage annotation output (#7131) (#7133).
Fixes #7131.
2026-02-24 20:59:42 -05:00
Wilson Snyder 9bc88ff1bc Fix finding single DPI exports from other scopes 2026-02-24 19:06:05 -05:00
Wilson Snyder e976424efa Internals: Add nodist/verilog_format 2026-02-24 14:45:57 -05:00
Gilberto Abram 826b03c21f Fix segfault in EmitCSyms::getSymCtorStmts (#7142) (#7143) 2026-02-24 14:08:01 -05:00
Wilson Snyder 7607f0e7fa Support proper automatic/static initialization, and remove STATICVAR warning (#6405). (#7086) 2026-02-24 14:04:43 -05:00
Wilson Snyder 3992da6027 Tests: Add t_assign_func 2026-02-24 04:17:42 -05:00
Wilson Snyder 1c41f87d67 Verilog format 2026-02-24 04:15:26 -05:00
Wilson Snyder 387cc206b3 Tests: Rename t_always tests 2026-02-24 04:11:39 -05:00
Todd Strader 6a5d3b0b72 Add --max-replication option (#7139) 2026-02-23 16:51:37 -05:00
Geza Lore f7c5454d91 Internals: Strengthen AstNodeExpr operand types (#7138) 2026-02-23 20:55:08 +00:00
Geza Lore 8c7f08dfc3 Fix inlining of CFuncs with reloop locals (#7132)
The recent V3InlineCFuncs only checks AstCFunc::varsp for locals, but
V3Reloop used to insert them into AstCFunc::stmtsp resulting in multiple
locals with the same name being inlined into the caller if the stars
align. Fix Reloop. Such things will also go away with #6280.
2026-02-23 17:35:15 +00:00
Wilson Snyder 7c923bb330 Internals: Fix hasher message 2026-02-23 03:34:37 -05:00
Wilson Snyder 97fd6a5a13 Support vpiScalarVal 2026-02-22 20:04:06 -05:00
Geza Lore 1e5a6901c8 Internals: Make AstWith explicit in AstCMethodHard (#7129)
This makes it consistent with other usage in NodeFTaskRef. Also AstWith
is no longer a NodeExpr.
2026-02-22 15:38:28 -05:00
Wilson Snyder f74a581d97 Tests: Enforce SPDX-FileCopyrightText 2026-02-22 15:23:19 -05:00
Geza Lore da51021b0a Internals: Simplify AstForeach header handling (#7126)
Rename AstSelLoopVars to AstForeachHeader, and make it a non-NodeExpr.
Tweak parser to always create an AstForeachHeader, so no need to fix it
up later.
2026-02-22 18:57:12 +00:00
Wilson Snyder e238a2ca5e Verilog format 2026-02-22 13:50:01 -05:00
Wilson Snyder 7f0be8a072 Commentary: Changes update 2026-02-22 13:47:51 -05:00
Wilson Snyder 38d5da7a24 Tests: Fix t_fork_join_none_capture for other simulators 2026-02-22 11:36:22 -05:00
Yilou Wang 1717df0261 Support solve..before constraints (#5647) (#7123) 2026-02-22 11:33:18 -05:00
Geza Lore 350966de6b Internals: Remove all AstClassOrPackageRef in V3Width (#7125) 2026-02-22 11:26:44 -05:00
Geza Lore 579acced99 Internals: Make AstArg into an AstNode, not Expr (#7122) 2026-02-22 14:40:51 +00:00
Yilou Wang 443678d8c4 Support array reduction methods without 'with' clause in constraints for dynamic arrays (#7104) (#7108) 2026-02-22 09:23:02 -05:00
Yilou Wang 79e1f33173 Fix new <obj> shallow copy not preserving polymorphic runtime type (#7105) (#7109) 2026-02-22 09:22:37 -05:00
Geza Lore 78ee787bb1 Internals: Clean up AstArg usage in AstNodeFTaskRef (#7121)
- Strengthen type of AstNodeFTaskRef::pinsp to be List[AstArg]
- Rename 'pinsp' to 'argsp'
- Add default constructor arguments
2026-02-22 10:38:37 +00:00
Geza Lore e023113b79 Internals: Carry 'with' clause as op4 on AstNodeFTaskRef (#7114)
op4 is now available to carry the 'with' clause explicitly instead of
being part of the argument lit. Will strengthen 'pinsp' to be
List[AstArg] next.
2026-02-22 09:15:28 +00:00
github action 03ed6a5bd3 Apply 'make format' 2026-02-21 05:44:17 +00:00
Alex Zhou a4ad255438 Fix extending class by a typedef (#6679) (#6855) 2026-02-21 11:13:22 +05:30
Wilson Snyder 0051d91555 Fix too-short bit pack returning wrong value (#7111).
Fixes #7111.
2026-02-20 22:25:02 -05:00
github action 927b6fd3c1 Apply 'make format' 2026-02-21 00:40:13 +00:00
Wilson Snyder 67cc65e6f3 Fix randomize of real (#7115).
Fixes #7115.
2026-02-20 19:39:20 -05:00
Wilson Snyder a250183c72 Commentary: Changes update 2026-02-20 19:26:18 -05:00
Wilson Snyder c970743b07 Tests: Renames. No test change. 2026-02-20 18:54:36 -05:00
Yilou Wang f25a85ea57 Fix associative array size() constraint generating invalid resize() call (#7103) (#7112) 2026-02-20 10:54:02 -05:00
Yilou Wang e0edb49f7a Support 'this' keyword inside inline randomize() with {} constraint blocks (#7102) (#7113) 2026-02-20 10:53:34 -05:00
Geza Lore 52a6de29cb Internals: Remove unused AstNodeFTaskRef::namep() (#7110) 2026-02-20 10:52:54 -05:00
Wilson Snyder 2d86f1373e Support vpiBitVar (#7107).
Fixes #7107.
2026-02-20 05:39:38 -05:00
Wilson Snyder ace9a34c10 Internal: Fix clang override warning (#7106 repair). 2026-02-19 21:34:17 -05:00
Wilson Snyder 0d2fcfd49d Fix circular class reference %p-printing causing infinite recursion (#7106).
Fixes #7106.
2026-02-19 20:15:37 -05:00
Geza Lore 4a4f8c6698 Optimize continuous assignments with function on RHS in Dfg (#7096) 2026-02-19 18:21:55 +00:00
Igor Zaworski 69564078da Fix determinism of AwaitBeforeTrigVisitor (#6932 repair) (#7101) 2026-02-19 18:21:40 +00:00
Wilson Snyder d6f8425e16 Tests: Update t_uvm_dpi (#7097 test) 2026-02-19 07:11:36 -05:00
Wilson Snyder 2309d52fd6 Tests: Cleanup t_uvm_dpi. No test change. 2026-02-19 07:05:33 -05:00
Ryszard Rozak ff3028aca3 Support disable iff with sequences (#7090) 2026-02-19 11:33:30 +01:00
Yilou Wang 0e26b049ea Support function calls with random arguments in constraints (#7061) (#7083) 2026-02-19 15:37:55 +05:30
Ryszard Rozak f843780aad Add UNSUPPORTED on $sampled in sensitivity list (#7093) 2026-02-19 08:36:21 +01:00
Wilson Snyder 702d6ede09 Fix time to not advance after $finish (#7095).
Fixes #7095.
2026-02-18 19:36:36 -05:00
Wilson Snyder 3b7dfce6f5 Commentary: Changes update 2026-02-18 19:30:34 -05:00
Geza Lore 2cd8dc6cf7 Optimize functions inlined from packages in Dfg (#7091) 2026-02-18 19:11:33 +00:00
Todd Strader cf1de0b9a8 Fix interface internal type reference (#6920) (#6966) 2026-02-18 09:38:42 +05:30
Artur Bieniek da28c67e60 Fix #0 delays to control fork scheduling (#6730 repair) (#6891)
Signed-off-by: Artur Bieniek <[email protected]>
2026-02-17 21:51:11 -05:00
Geza Lore 7176bdcff6 Optimize always blocks using local temporary variables in Dfg (#7085)
Enable synthesis of blocks that use a variable only within certain
branches, if that variable is not externally observable.
2026-02-17 20:00:55 +00:00
Ryszard Rozak 5d0352ab46 Fix conditional expressions in constraints (#7087) 2026-02-17 11:40:15 -05:00
Wilson Snyder 81d1d79585 Tests: Cleanup t_cover_assert 2026-02-17 08:47:43 -05:00
Wilson Snyder 089672b200 Tests: Improve t_lint_unused_func_bad.v 2026-02-17 06:20:42 -05:00
Wilson Snyder 9049c93009 Internals: Call common V3NUmber function to zero data type. Cleanup chandle clearling. 2026-02-17 06:18:57 -05:00
Geza Lore a1a9147267 Optimize straight line code in Dfg always (#7084) 2026-02-17 11:17:52 +00:00
Geza Lore 5834f22944 Optimize logic and variable removal early in Dfg (#7081)
After conversion of Ast to Dfg, but before synthesizing AstAlways into
primitives, run a pass to remove variables that are not observable, and
all logic that only computes such variables. This can get rid of a lot
of content early so we don't build redundant Dfgs, and also enables
synthesizing always blocks that use temporaries only in some branches,
which will come in a follow up.
2026-02-17 08:28:06 +00:00
Wilson Snyder ed2f018729 Tests: Improve t_var_static_assign_decl_bad 2026-02-17 02:18:56 -05:00
Wilson Snyder 7182e8d937 Internals: Track what variables get user initial assignment. 2026-02-17 02:05:05 -05:00
Wilson Snyder 6c5dee5043 Change automatic variables to not be traced. 2026-02-17 01:38:39 -05:00
Veripool API Bot 300be3e388 Verilog format 2026-02-16 23:21:53 -05:00
Wilson Snyder 1f157b36f5 Commentary: Changes update 2026-02-16 23:19:19 -05:00
Yilou Wang ed3aa43657 Fix enum variables in constraint solver producing invalid enum values (#7058) (#7065) 2026-02-16 22:44:38 -05:00
Yilou Wang 4357aee09a Fix randomize() on null object handle crashing instead of returning 0 (#7059) (#7066) 2026-02-16 22:43:57 -05:00
Yilou Wang 5173f7e42f Fix inside operator crash with impure expression and unsized range literals (#7063) (#7067) 2026-02-17 08:33:31 +05:30
Yilou Wang 994ef82e76 Support unique constraint on explicit array element subsets (#7057) (#7064) 2026-02-16 19:46:46 -05:00
Artur Bieniek 7fc428f518 Fix randomize() null pointer dereference (#7026) 2026-02-16 19:43:59 -05:00
Ryszard Rozak 8491d6a80c Support force assignments to unpacked structs (#7060) 2026-02-17 05:35:07 +05:30
Wilson Snyder c21498293e Internals: Minor cleanups preparing for initialization fixes. 2026-02-16 08:10:29 -05:00
Wilson Snyder 14a94b6de9 Internals: Add addNextNull. No functional change intended. 2026-02-16 08:09:29 -05:00
Kamil Danecki 821eacebea Support power expressions with constant exponent in constraints (#7073) 2026-02-16 06:01:24 -05:00
Srinivasan Venkataramanan 7c1b348b41 Support $get_initial_random_seed (#7056) (#7069).
Fixes #7056.
2026-02-16 05:57:44 -05:00
Wilson Snyder 28d04c809f Commentary: Changes update 2026-02-16 05:38:03 -05:00
Geza Lore 505d33b35a Support #0 delays with IEEE-1800 compliant semantics (#7079)
This patch adds IEEE-1800 compliant scheduling support for the Inactive
scheduling region used for #0 delays.

Implementing this requires that **all** IEEE-1800 active region events
are placed in the internal 'act' section. This has simulation
performance implications. It prevents some optimizations (e.g.
V3LifePost), which reduces single threaded performance. It also reduces
the available work and parallelism in the internal 'nba' section, which
reduced the effectiveness of multi-threading severely.

Performance impact on RTLMeter when using scheduling adjusted to support
proper #0 delays is ~10-20% slowdown in single-threaded mode, and ~100%
(2x slower) with --threads 4.

To avoid paying this performance penalty unconditionally, the scheduling
is only adjusted if either:
1. The input contains a statically known #0 delay
2. The input contains a variable #x delay unknown at compile time

If no #0 is present, but #x variable delays are, a ZERODLY warning is
issued advising the use of '--no-sched-zero-delay' which is a promise
by the user that none of the variable delays will evaluate to a zero
delay at run-time. This warning is turned off if '--sched-zero-delay'
is explicitly given. This is similar to the '--timing' option.

If '--no-sched-zero-delay' was used at compile time, then executing
a zero delay will fail at runtime.

A ZERODLY warning is also issued if a static #0 if found, but the user
specified '--no-sched-zero-delay'. In this case the scheduling is not
adjusted to support #0, so executing it will fail at runtime. Presumably
the user knows it won't be executed.

The intended behaviour with all this is the following:

No #0, no #var in the design (#constant is OK)
-> Same as current behaviour, scheduling not adjusted,
   same code generated as before

Has static #0 and '--no-sched-zero-delay' is NOT given:
-> No warnings, scheduling adjusted so it just works, runs slow

Has static #0 and '--no-sched-zero-delay' is given:
-> ZERODLY on the #0, scheduling not adjusted, fails at runtime if hit

No static #0, but has #var and no option is given:
-> ZERODLY on the #var advising use of '--no-sched-zero-delay' or
   '--sched-zero-delay' (similar to '--timing'), scheduling adjusted
   assuming it can be a zero delay and it just works

No static #0, but has #var and '--no-sched-zero-delay' is given:
-> No warning, scheduling not adjusted, fails at runtime if zero delay

No static #0, but has #var and '--sched-zero-delay' is given:
-> No warning, scheduling adjusted so it just works
2026-02-16 03:55:55 +00:00
Geza Lore a0b89dde8e Internals: Make AstCAwait an AstNodeStmt (#6280) (#7078)
AstCAwait is only ever uses in statement position, so model it as a
statement. We should never ever have a coroutine that returns a value.
There is no need for it in SV, nor should we rely on it for internals.

Also reworks the fix for V3Life incorrectly constant propagating the
beforeTrig functions (#7072). The property that upsets V3Life is that
a function:
1. Is called from multiple static call sites (multiple AstCCall)
2. Reads model state directly (AstVarRef to non-locals/arguments)

Such function can only be created internally after scheduling (V3Task
throws an unsupported error on a non-inlined function that reads model
state), so added a flag to AstCFunc to mark the dangerous ones for
V3Life.
2026-02-14 20:15:32 +00:00
Geza Lore be27811a10 Optimize: Remove redundant variables during Dfg Peephole pass (#7076)
Many rules in the Dfg Peephole pass check if a node has more than one
sinks. Redundant variables that will ultimately be removed can prevent
these from matching. Remove such variables during the Peeophole pass
itself to enable more matches.
2026-02-14 12:33:20 +00:00
Geza Lore a45a058b09 Optimize additional DFG peephole Shift and Concat patterns (#7077) 2026-02-14 07:25:17 -05:00
Geza Lore e0c626e48a Fix constant propagating DPI-written variables (#7074) 2026-02-13 18:28:14 +00:00
Igor Zaworski 7d71c3bb76 Fix of event triggering with V3Life (#6932 effect) (#7068 partial) (#7072) 2026-02-13 11:01:19 -05:00
Geza Lore 0aaf17acfd Internals: Add referencing flags in Dfg dumps 2026-02-13 14:20:38 +00:00
Pawel Kojma 64511d30b6 Internals: Fix marking AstVars as class members (#7070) 2026-02-13 07:45:13 -05:00
Geza Lore 3dd2b762e7 Fix scope tree in traces in hierarchical mode (#7042) 2026-02-12 20:54:03 -05:00
Wilson Snyder b84466ec10 Commentary: Changes update 2026-02-12 18:24:05 -05:00
Veripool API Bot b0fdbff6eb Verilog format 2026-02-12 18:23:56 -05:00
Wilson Snyder 13b1321985 Tests: Fix uvm_pkg_packer comment 2026-02-12 17:46:53 -05:00
Todd Strader fed41aba91 Fix UNUSED / UNDRIVEN for unused functions (#6967) 2026-02-12 11:01:14 -05:00
Yilou Wang 9b1b9a5b3b Fix randc cyclic behavior broken with constraints (#7029) (#7035) 2026-02-12 10:58:04 -05:00
Igor Zaworski 446bec3d1a Fix event triggering (#6932) 2026-02-11 10:35:59 -08:00
Yilou Wang e41436bd4a Support inherited and nested pre/post_randomize callbacks (#7049) (#7053) 2026-02-11 09:33:57 -08:00
Yilou Wang 554fcef627 Fix rand_mode()/constraint_mode() when used as function arguments (#7051) (#7055) 2026-02-11 09:33:09 -08:00
Yilou Wang 996a4b6e1a Fix constraint_mode()/rand_mode() in constructor being overwritten by init code (#7054) 2026-02-11 09:32:08 -08:00
Yilou Wang 84350859e0 Support System Functions in Constraint Blocks (#7028) (#7036) 2026-02-11 05:19:25 -08:00
Pawel Kojma 5d12ae3a2f Fix non-member identifiers used inside constraints (#7033) 2026-02-11 05:18:24 -08:00
Yilou Wang 22dc437dbb Support std::randomize() for queue, dynamic array, and associative array variables (#7044) 2026-02-10 18:24:25 -08:00
Wilson Snyder 67bff893bf Fix whitespace 2026-02-10 20:17:22 -05:00
Yilou Wang 2bb807a931 Fix Inline foreach constraints on dynamic arrays of class objects (#7030) (#7037) 2026-02-10 15:22:31 -08:00
Geza Lore a031dd1a22 Fix tracing without module inlining to match with inlining (#7041)
This is an attempt to generate an identical trace file scope hierarchy
both with and without -fno-inline. Primarily because it's needed for
testing in upcoming patch, but also improves consitency prior to #7001
2026-02-10 21:05:41 +00:00
Geza Lore 021e0ba81b Testing: Bump vcddiff to latest (#7040) 2026-02-10 20:08:23 +00:00
Yilou Wang 925543676e Fix rand_mode() on nested object variables causes Z3 solver error (#7031) (#7034) 2026-02-10 13:59:09 -05:00
Yilou Wang 8791e6c5f2 Support constraint_mode() on static constraints (#7027) (#7038) 2026-02-10 13:58:35 -05:00
Ryszard Rozak 6303eb45ce Fix multidim dynamic array elements passed to ref argument (#7023) 2026-02-10 08:46:04 +01:00
Igor Zaworski a660fa54a7 Fix unique constraint in derived class (#7022) 2026-02-09 09:56:38 -05:00
github action a28bd5a085 Apply 'make format' 2026-02-09 03:48:11 +00:00
Leela Pakanati e36838ad8e Fix tristate enables for -fno-inline (#7016) (#7019) 2026-02-08 22:47:09 -05:00
Wilson Snyder 5a236dd35d Change INITIALSTATIC to also report on processes, per IEEE (#7020) 2026-02-08 20:47:12 -05:00
Wilson Snyder ba194f3790 Tests: Avoid implied static variables, to avoid future warning 2026-02-08 18:20:28 -05:00
Wilson Snyder 9ba625225d Internals: Minor cleanups preparing for initialization fixes. No functional change. 2026-02-08 17:54:04 -05:00
Wilson Snyder 8700617fae Internals: Cleanup CRESET verilog and other misc fixes 2026-02-08 17:53:56 -05:00
Geza Lore 3752102879 Internals: Clean up V3Reorder (#7015)
This is primarily cleanup, but there are 2 functional changes included:
- It used to accidentally reorder bodies of AstNodeIf that were outside
  an AstAlways. Now it will not touch anything outside an AstAlways.
- Removed one redundant edge from the graph which perturbs the result of
  V3Graph::acyclic. This should make no difference for the actual
  intended result of reordering NBAs to eliminate shadow variables.
2026-02-08 16:09:53 +00:00
Wilson Snyder e12c62c070 Change JSON dumps to not include booleans that are false (#6977).
Fixes #6977.
2026-02-08 07:59:55 -05:00
Wilson Snyder c1db30523f Commentary (#7014)
Fixes #7014.
2026-02-08 07:48:12 -05:00
Wilson Snyder 0c83594e1e Fix variable conflict when multiple cells with unused input defaults 2026-02-07 18:11:55 -05:00
Wilson Snyder bbb231dfe2 Internals: Minor cleanups preparing for initialization fixes. No functional change. 2026-02-07 14:16:12 -05:00
Wilson Snyder 9068e2e5b5 Commentary: Changes update 2026-02-07 14:15:43 -05:00
Geza Lore bb0e1c8c61 Optimize temporary insertion for concatenations in Dfg (#7013)
Add a new Dfg pass 'pushDownSel'. This will try to move selects through
a tree of concatenations in order to eliminate temporary nodes holding
intermediate concatenation results. This can get rid of a lot of
variables when packed arrays are assigned in parts (e.g. bit-wise).
2026-02-07 18:06:12 +00:00
github action abdac02b50 Apply 'make format' 2026-02-07 15:07:33 +00:00
Leela Pakanati 8922794088 Tests: Add test cases for interface array access with loop variable index (#1418 tests) (#7011) 2026-02-07 10:06:37 -05:00
Geza Lore 6100c39764 Internals: Assign trace codes starting from zero (#7007)
Use uint32_t max value instead of zero as sentinel value for a trace
code being unassigned. Prep for follow on patch.

Note the actual trace file will still start codes from one, the codes
in the model are just an offset from the base code.
2026-02-07 14:01:53 +00:00
Igor Zaworski dc26dd601d Fix internal error - virtual interface not found (#7010) 2026-02-06 22:20:10 +00:00
Pawel Kojma 9a8538fafa Support signed multiplication in constraints (#7008) 2026-02-06 10:14:54 -05:00
github action 60b52a4986 Apply 'make format' 2026-02-06 11:39:13 +00:00
Leela Pakanati b14d65a787 Support modport expression syntax + nested (#2601) (#5581) (#7005) 2026-02-06 06:38:16 -05:00
Leela Pakanati 2215d01d6b Fix hierarchical interface/modport issues (#5941) (#6997) 2026-02-05 22:15:30 -05:00
Veripool API Bot b82f6beffb Verilog format 2026-02-05 17:45:24 -05:00
Wilson Snyder c83ae4a3ca Commentary: Changes update 2026-02-05 17:43:33 -05:00
Wilson Snyder 9fab6bfcf0 Tests: Fix t_assert_elab_p.py reruns 2026-02-05 17:42:39 -05:00
Wilson Snyder bee456822e Internals: Fix missing newline on co_return output code 2026-02-05 12:57:26 -05:00
Wilson Snyder 1adedd0bfa Tests: Cover deassign 2026-02-05 12:57:26 -05:00
Geza Lore 4e9792c34c Fix C++ types of non-inlined module ports (#7002)
We use special C++ types for ports, e.g. SystemC types in --sc mode, and native C arrays for unpacked arrays in --cc mode. These types are not substitutable for internal types, e.g. VlUnpacked, however all the runtime primitives expect internal types.

I think the intention was to use these special IO types only for top level ports, but the current implementation also uses them for the ports of all non-inlined modules. This means the output C++ will not compile if such a port is passed to a runtime primitive (e.g. array 'sort' as in the new test) or DPI import.

Changed to use the special IO types only on the top level ports.

Note these are likely still broken if attempting to invoke on a top level port (we might be saved by wrapTop, but later optimizations might eliminate the intermediary)
2026-02-05 14:49:07 +00:00
Geza Lore 4aa0ea3f27 Commentary: Changes update 2026-02-05 07:05:59 +00:00
github action 55eaa64386 Apply 'make format' 2026-02-04 21:27:14 +00:00
Leela Pakanati 57c3b8e51b Support nested interface as port connection (#5066) (#6986) 2026-02-04 16:26:20 -05:00
Geza Lore 515841cf15 Commentary 2026-02-04 18:09:51 +00:00
Oleh Maksymenko 229a696ab8 Add decoded Verilog name in JSON output (#6919) (#6995) 2026-02-04 07:08:33 -05:00
Wilson Snyder 1dd80996cd Fix some error capitalization 2026-02-03 19:57:23 -05:00
Wilson Snyder aaa5c5e857 Tests: t_dist_warn_coverage.py: Understand wildcards (#6994 comment) 2026-02-03 19:51:23 -05:00
Christian Hecken 3c680ba5a4 Tests: Fix LCOV_EXCL matching in fully commented lines (#6994) 2026-02-03 19:03:43 -05:00
Christian Hecken a778870e69 Internals: Optimize VerilatedVpioVarBase::m_fullname (#6993) 2026-02-03 17:36:00 -05:00
Krzysztof Bieganski ad85d89817 Support foreach with nested dots (#6991)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2026-02-03 08:44:18 -05:00
Wilson Snyder f9c76e84a6 Fix purity of backtrace, from bb979a00 2026-02-02 22:47:24 -05:00
Wilson Snyder 0fcc68e4b8 Fix MSVC backtrace, from bb979a00 2026-02-02 21:00:56 -05:00
Wilson Snyder 76c4ae5683 Add back LICENSE file due to (f4pga/actions#49) 2026-02-02 19:34:10 -05:00
Wilson Snyder bb979a00c8 Fix $stacktrace to decode through internal-c++filt (#6985). 2026-02-02 19:01:24 -05:00
Wilson Snyder 9083b238e5 Tests: Fix execute file permissions. No test change. 2026-02-02 08:28:46 -05:00
github action 268f5c3367 Apply 'make format' 2026-02-02 03:38:19 +00:00
Leela Pakanati b2fa3fb54e Fix parameterized class typedef as interface type parameter (#6983) (#6984) 2026-02-01 22:37:29 -05:00
Wilson Snyder 407fc74195 Internals: Use Var::isConst to allow constant substitution 2026-02-01 21:06:26 -05:00
Rodrigo Batista de Moraes c1e343d9cf Fix variable randomization to better differ by seed (#6945) (#6956) 2026-02-01 14:53:33 -05:00
Wilson Snyder a05cbd8382 Support structure initial values (#6130).
Fixes #6130.
2026-02-01 13:44:20 -05:00
Geza Lore d3f608058f Optimize expanded constant pool words (#6979)
Re-inline ConstPool entries in V3Subst that have been expanded into
word-wise accessed by V3Expand. This enables downstream constant folding
on the word-wise expressions.

As V3Subst now understands ConstPool entries, we can also omit expanding
straight assignments with a ConstPool entry on the RHS. This allows the
C++ compiler to see the memcpy directly.
2026-02-01 17:08:49 +00:00
Wilson Snyder 7ca113a84f Fix non-inlined function return value clearing (#6982). 2026-02-01 11:57:09 -05:00
Wilson Snyder 1b2e13a0d8 Tests: Improve t_uvm_hello.v 2026-02-01 11:42:32 -05:00
Wilson Snyder b9b0bf2e19 Tests: Rename some long-named test, no test change 2026-02-01 11:39:33 -05:00
Wilson Snyder 9c05c4d622 Commentary: Changes update 2026-02-01 11:39:07 -05:00
Geza Lore 5e5dcdbdbd Optimize right shifts as clean (#6981) 2026-02-01 08:12:18 -05:00
Geza Lore ca17904a62 Internals: Improve readability of selects in output (#6980) 2026-02-01 07:29:56 -05:00
Geza Lore 197f11044e Internals: Split reorder transfrom from V3Split to V3Reorder (#6976) 2026-02-01 05:09:40 +00:00
Geza Lore f0afcede10 Internals: Use pure expressions in V3Randomize (#6974) 2026-02-01 05:09:19 +00:00
Geza Lore 122ceb2258 Internals: Fix use of Expr as Stmt in V3Assert (#6280) (#6973) 2026-02-01 05:08:41 +00:00
Geza Lore bef709a235 Optimize wide word shifts by multiple of word size (#6970)
V3Expand wide SHIFTL and SHIFTR if the shift amount is know and is a
multiple of VL_EDATA_SIZE. This case results in each word requiring a
simple copy from the original, or store of a constant zero, which
subsequent V3Subst can then eliminate.
2026-02-01 05:07:57 +00:00
Geza Lore cea4c88e12 Optimize more wide operation temporaries with substitution (#6972)
A temporary introduced by V3Premit could not be eliminated in V3Subst if
it was involved in an expression that did a write back to a
non-temporary. To enables removing these, we need to track all variables
in V3Subst, not just the ones we would consider for elimination. Note
the new implementation is marginally faster than the old one even though
it does more work. It can eliminate ~5% more of wide temporaries on some
designs. Algorithm is largely the same.
2026-02-01 05:07:13 +00:00
Wilson Snyder 07ce0ac2ea Internals: Move CReset under Assign (#6978) 2026-01-31 21:27:36 -05:00
Geza Lore d9234501e0 Optimize concatenations that produce unused bits in DFG (#6971)
Concatenations that are only used by Sel expressions that do not consume
some bits on the edges can be narrowed to not compute the unused bits.

E.g.: `{a[4:0], b[4:0]}[5:4]` -> `{a[0], b[4]}[1:0]`

This is a superset or the PUSH_SEL_THROUGH_CONCAT DFG pattern, which is
removed.
2026-01-31 17:28:14 +00:00
Geza Lore 0915ae6ba8 Optimize string temporaries - do not localize (#6969)
Minor performance improvement, especially for assertions heavy code.
Strings are often used as temporaries in unlikely branches. Do not
localize them to avoid an unnecessary initialization on function entry.
2026-01-31 16:05:35 +00:00
Geza Lore f472c2da6e Change metacomment extra underscore error to warning (#6968)
Used to throw a hard v3error on stray underscores in metacomments.
Issue a BADVLTPRAGMA that can be turned off instead.
2026-01-31 15:16:20 +00:00
Pawel Kojma b9ef4a6c48 Add parsing of coverpoint identifier in place of covergroup range list (#6961) 2026-01-30 07:05:57 -05:00
Wilson Snyder 996ae35a1b Fix associative array of events causes C++ compile error (#6962). 2026-01-29 20:38:50 -05:00
Wilson Snyder 7e56a2334a Commentary: Changes update 2026-01-29 20:36:27 -05:00
Wilson Snyder 5547833dde Add UNSUPPORTED error on IEEE complex ports (#2844 partial) 2026-01-28 19:14:10 -05:00
Wilson Snyder 913cf07491 Improve converge-limit error message 2026-01-28 18:32:50 -05:00
Pawel Kojma 30e6cd9092 Fix accessing non-rand struct member in constraints (#6960) 2026-01-28 07:33:16 -05:00
Geza Lore 76949f00d3 Internals: make test-diff macOS compatibility fix - again 2026-01-28 11:05:27 +00:00
Geza Lore 7875552354 Internals: Add stats/dump of circular logic in scheduling (#6953) 2026-01-28 10:45:23 +00:00
Yangyu Chen 5b84635bde Add VerilatedContext::useNumaAssign and set on threads() call (#6954) 2026-01-27 11:05:28 -05:00
Wilson Snyder 7c6c6a684b Add SPDX copyright identifiers, and get 'reuse' clean. No functional change. 2026-01-26 20:24:34 -05:00
Wilson Snyder bd127488f2 Remove xml.rst, missed when --xml-only removed earlier. 2026-01-26 17:34:33 -05:00
Wilson Snyder d3ecba7699 Internals: Cleanup some verilog.y dead since IEEE 2017 2026-01-26 15:51:19 -05:00
Todd Strader 67df517bec Fix type assignments for arrays of parameter types (#6955) 2026-01-26 15:50:52 -05:00
Wilson Snyder 1b9f38f78f Fix parameterized virtual interface references that have no model references (#4286).
Fixes #4286.
2026-01-25 14:25:42 -05:00
Wilson Snyder 41b131389e Internals: Some tristate and param cleanups. No functional change. 2026-01-25 14:19:27 -05:00
Geza Lore 2ddfcbed16 Internals: make test-diff macOS compatibility fix 2026-01-25 15:40:56 +00:00
Wilson Snyder 430015e234 CI: Add retry on apt/pip 2026-01-25 10:27:52 -05:00
Wilson Snyder 140b2f2b2e Internals: V3Tristate cleanups. No functional change. 2026-01-24 18:13:34 -05:00
Wilson Snyder ad5005f8f5 Internals: Add user#Or functions. No functional change. 2026-01-24 18:10:59 -05:00
Wilson Snyder 4ff57514c8 Commentary: Changes update 2026-01-24 11:08:11 -05:00
Wilson Snyder 56a089af94 Tests: Update t_attr 2026-01-24 11:08:07 -05:00
Wilson Snyder 1e7198eabb Tests: t_fork_join_none_stmt (#5902 test) 2026-01-24 10:56:27 -05:00
Wilson Snyder b456d903e2 Tests: Add t_inst_array_slice (#3433 test) 2026-01-24 10:15:08 -05:00
Wilson Snyder 07b61d3745 Fix internal error when fork under always expression (#6911). 2026-01-23 22:11:04 -05:00
github action 2737a22793 Apply 'make format' 2026-01-24 03:01:38 +00:00
Cameron Waite 567fba3695 Fix null pointer dereference in class member trigger expressions (#6946) 2026-01-23 22:00:43 -05:00
Todd Strader bc3c5b32dd Fix delayed initial assignment (#6929) 2026-01-23 12:53:40 -05:00
Artur Bieniek a7db9ee32f Add error when accessing a non-static class field from a static function (#6948) 2026-01-23 10:18:24 -05:00
Wilson Snyder ddbcd66722 Support extern module as a forward-declaration that is ignored. 2026-01-22 19:00:26 -05:00
Wilson Snyder 86cd249816 Add instance module location helper when pin not found 2026-01-21 07:50:46 -05:00
Wilson Snyder 488fe4208f Commentary: Changes update 2026-01-21 07:33:10 -05:00
Pawel Kojma c4dcdeab9a Add parsing of solve-before inside foreach (#6934) 2026-01-20 07:14:11 -05:00
Vikash Patel ea9752ab43 Fix typo in Verilator report output ("alloced" → "allocated") (#6937) 2026-01-19 08:31:22 -05:00
Wilson Snyder ac4f9f013e Fix static call after covergroup (#6916 repair) 2026-01-18 19:58:33 -05:00
Wilson Snyder db9bd3a792 Fix clocking unsupported tristate assign error (#6942).
Fixes #6942.
2026-01-18 16:28:48 -05:00
Jose Drowne 3a080ef543 Add IEEE 4-state type lint checks (#3645 partial) (#6895) 2026-01-18 11:00:25 -05:00
Wilson Snyder 50b6954cfc Internals: cppcheck cleanups 2026-01-17 23:18:09 -05:00
Wilson Snyder cedf000a66 CI: Group dependabot commits 2026-01-17 22:28:21 -05:00
Wilson Snyder b7382be0b6 Fix --top-module with underscores (#6940). 2026-01-17 20:33:02 -05:00
Wilson Snyder daba5ce27c Commentary: Changes update 2026-01-17 14:35:17 -05:00
Wilson Snyder b5fdcdf745 Tests: Style updates 2026-01-17 14:35:17 -05:00
Veripool API Bot 98114428cb Verilog format 2026-01-17 14:35:17 -05:00
Jose Drowne 12080dfcb1 Internals: Add AST nodes for tagged union parsing (#6867 partial) (#6881) 2026-01-17 14:15:52 -05:00
github action 26ebb14c98 Apply 'make format' 2026-01-17 17:03:54 +00:00
Wei-Lun Chiu 3b6674386c Support unbounded '$' in inside range expressions (#6935) (#6938) 2026-01-17 12:03:00 -05:00
github action f6532728f6 Apply 'make format' 2026-01-17 15:35:34 +00:00
emmettifelts e6be548f72 Fix segfault after assignment pattern XOR error (#6928) (#6931) 2026-01-17 10:34:36 -05:00
Wilson Snyder 913cf933e9 Fix segfault in missing extends (#6903).
Fixes #6903.
2026-01-16 19:57:23 -05:00
Wilson Snyder b87675c0ea Commentary: Changes update 2026-01-16 19:55:51 -05:00
Srinivasan Venkataramanan 6fc9089a77 Support unique constraints (on 1D static arrays) (#6810) (#6878) 2026-01-16 08:42:09 -05:00
Igor Zaworski 550cf4462d Fix of dynamic scheduler temporary varable locations (#6859) (#6926) 2026-01-15 06:53:00 -05:00
Christian Hecken 8b2144a9db Fix memory leak in vpi_put_value and vpi_get_value
PR #6704 introduced the getForceControlSignals function to
verilated_vpi.cpp. It returns a pair of vpiHandles. These handles were
not released, causing a memory leak. This commit fixes this, in addition
to other minor changes for speed and readability that did not make it
into #6704.

No functional change intended.
2026-01-15 01:08:27 +01:00
Pawel Kojma 3072907ea4 Fix unpacked array concatenation function arguments (#6900) 2026-01-14 16:23:55 -05:00
Artur Bieniek 4563501192 Fix error when calling non-static method (#6916) 2026-01-14 08:40:57 -05:00
Wilson Snyder 09ca7ea8d1 Fix emitting unbounded parameters (#6912).
Fixes #6912.
2026-01-12 22:56:23 -05:00
Wilson Snyder 8a24897c13 Fix foreach with mid-index empty commas (#6910).
Fixes #6910.
2026-01-12 19:17:17 -05:00
Wilson Snyder 823c53fb15 Fix assignment of queue from unpacked array (#6906).
Fixes #6906.
2026-01-12 18:32:24 -05:00
Wilson Snyder a3d0f16185 Fix syntax error on unsupported defparam array (#6915). 2026-01-12 17:34:10 -05:00
Wilson Snyder db8635a8ef Commentary: Changes update 2026-01-12 17:28:04 -05:00
31f8be0b85 Support detailed failure info for constraint violations (#6617) (#6883)
* logging for the unsatisfied constraints

* Apply 'make format'

* fix teh quote error in the array indexing

* Apply 'make format'

* Len change for the hash for randomity when named assertion is used

* seperate name assertion and satisfied case

* Apply 'make format'

* simply comments and display info

* refine code and fix protect case

* format

* update display in test and .out file

* add an enable flag and warning type, add a protect_id version test and update out files

* Apply 'make format'

* simplify some comments

* update out file, ready to be merged.

* update .py file to set the hash key solid

* rename and reformate the warning message to follow the verilator style

* add a nowarn test

* Apply 'make format'

* ordering

---------

Co-authored-by: Udaya Raj Subedi <[email protected]>
Co-authored-by: github action <[email protected]>
2026-01-12 15:53:49 +01:00
Wilson Snyder 703c82cb3d Tests: Check and fix ascending uvm_hdl_read/deposit 2026-01-11 05:08:57 -05:00
Wilson Snyder 54b130e43f Add check for automatic variable in continuous assignment LHS 2026-01-10 18:54:27 -05:00
Wilson Snyder 8f0e4be643 Tests: Pass force/release through UVM DPI tests 2026-01-10 04:32:23 -05:00
Veripool API Bot 6de8632c28 Verilog format 2026-01-10 04:11:45 -05:00
Wilson Snyder e608bd28af Commentary: Changes update 2026-01-10 04:10:35 -05:00
Wilson Snyder bc5b120156 Tests: Add include warnings to t_dist_warn_coverage 2026-01-10 04:08:08 -05:00
Christian Hecken 338afff23c Support vpi_put/vpi_get forcing of signals (#5933) (#6704). 2026-01-10 03:48:46 -05:00
Wilson Snyder a98eb4fa04 Internals: Add missing debug level setter. 2026-01-10 03:10:33 -05:00
Wilson Snyder e5b94046aa Tests: t_lint_width.v update 2026-01-09 19:31:35 -05:00
Yutetsu TAKATSUKASA b926fcb762 Improve signedness of packed array (#6901) (#6902)
* Tests: Add a test whether signedness of a packed array is properly implemented.

* Fix signedness of a packed array when named type is not used.

* Fix signedness of the entire packed array.
2026-01-10 09:06:37 +09:00
Pawel Kojma d664aec8b8 Fix segfault in V3Slice (#6899) 2026-01-10 06:15:01 +09:00
Wilson Snyder 3b1a7af74d Fix WIDTHEXTEND suppression on add/sub with single-bit signal. 2026-01-09 00:25:12 -05:00
Wilson Snyder b0fdea5535 Improve error message 2026-01-09 00:09:28 -05:00
Bartłomiej Chmiel 7e3cd8af65 Fix tracing signals with escaped dots in names (#6897) 2026-01-08 15:10:19 -05:00
Ryszard Rozak 97d5844f2e Support dynamic array elements in std::randomize (#6896) 2026-01-08 09:02:28 -05:00
Yilou Wang 6abfaf23a5 fix access flags in MemberSel randomization assignments (#6892) 2026-01-08 09:02:13 +01:00
Wilson Snyder c75fb4cdae Improve format of runtime errors, especially DIDNOTCONVERGE 2026-01-08 01:01:54 -05:00
Ryszard Rozak da14e7c4bb Fix disable iff in simple properties (#6890) 2026-01-07 07:02:52 -08:00
Bartłomiej Chmiel c7361f177b Fix large debug_str for emitted Syms headers (#6889) 2026-01-07 13:18:54 +00:00
Luca Colagrande 112e1e3752 Fix overlapping case item expressions (#6825) (#6886) 2026-01-06 15:07:25 -05:00
Geza Lore 45349990a1 Omit -v farg with --dump-inputs (#6885) 2026-01-06 19:07:33 +00:00
Yangyu Chen 2ba96536e6 Add VERILATOR_NUMA_STRATEGY environment variable (#6826) (#6880)
Signed-off-by: Yangyu Chen <[email protected]>
2026-01-06 10:20:57 -05:00
Luca Colagrande f9f7a7146d Comnentsry: Fix --trace flag description in docs (#6884) 2026-01-06 07:16:35 -05:00
Igor Zaworski d5784b8cf2 Trigger virtual interfaces in proper place (#6844) 2026-01-06 07:15:33 -05:00
Wilson Snyder c62ed27e0b Commentary: Changes update 2026-01-05 22:59:30 -05:00
Veripool API Bot ff73e117e6 Verilog format 2026-01-05 22:59:11 -05:00
Wilson Snyder 5efea48358 Tests: Apply t_dist_warn_coverage on include 2026-01-05 22:55:53 -05:00
Wilson Snyder b2bcce33e8 Internals: Rename visiting class. No functional change. 2026-01-05 22:53:49 -05:00
Matthew Ballance 8c977133c6 Fix use-after-free error (#6846) 2026-01-05 20:06:42 -05:00
Jakub Wasilewski 72a6da5ac8 Support complex expressions as std::randomize arguments (#6860) 2026-01-05 14:37:36 -05:00
Yilou Wang 7023f38d12 Fix VarRef lookup for module-level variables (#6741) (#6882) 2026-01-05 10:39:22 -05:00
Jose Drowne 883ff01d21 Tests: Add self-checking tests for tagged union features (#6867 partial) (#6869) 2026-01-04 11:22:52 -04:00
Iztok Jeras e01f0f5e67 Tests: Add interface_array_parameter_aggregate_access (#6873) 2026-01-01 11:16:47 -05:00
Wilson Snyder 32bc4d371f Commentary: Changes update 2026-01-01 11:05:21 -05:00
Veripool API Bot 9e466fe5c7 Verilog format 2026-01-01 11:04:57 -05:00
Ryszard Rozak cc11ff8c53 Fix dynamic array elements passed to ref argument (#6877) 2026-01-01 10:21:09 -05:00
em2machine c388e793e0 Fix MULTIDRIVEN with task and default driver (#4045) (#6858) 2026-01-01 10:20:21 -05:00
Wilson Snyder 28d2dc2b70 Commentary 2026-01-01 09:33:12 -05:00
Wilson Snyder 40cf3c4b16 Remove deprecated --make cmake. 2026-01-01 09:27:20 -05:00
Wilson Snyder a7b80966ec Remove --xml-only. 2026-01-01 09:23:05 -05:00
Wilson Snyder 66bd173c86 devel release 2026-01-01 07:35:14 -05:00
Wilson Snyder 7e7b6d7fb8 Merge from master for release. 2026-01-01 07:32:37 -05:00
Wilson Snyder 8df584ca1d Version bump 2026-01-01 07:24:47 -05:00
Wilson Snyder 13327fa9c0 Copyright year update. 2026-01-01 07:22:09 -05:00
Wilson Snyder 4080284e53 Fix warning lint directive ordering and consistency (#4185) (#5368) (#5610) (#6876). 2025-12-30 20:31:34 -05:00
Wilson Snyder e6114b6bbb Commentary 2025-12-30 08:24:41 -05:00
Wilson Snyder c76c31ae6c Commentary: Changes update 2025-12-30 07:34:09 -05:00
Wilson Snyder 2025b81614 Internals: Refactor V3Error, and handle UNDRIVEN/UNSUPPORTED/WIDTH consistently (#6874) 2025-12-30 07:08:25 -05:00
Kaleb Barrett aa94219531 Support vpiSigned (#6868) (#6870) 2025-12-29 20:12:19 -05:00
Wilson Snyder 2e394c3c04 Internals: Refactor some V3Error code handling and add tests. No functional change intended. 2025-12-29 18:17:24 -05:00
Wilson Snyder 4775399716 Commentary: spelling 2025-12-28 21:30:16 -05:00
Wilson Snyder a0798eb838 Tests: Add t_uvm_dpi not forceable check 2025-12-28 14:27:40 -05:00
apocelipes c35dde7c9c Fix missing include on FreeBSD (#6864) 2025-12-27 10:17:03 -05:00
Wilson Snyder 2318adabd3 Fix JSON output case statements (#6733). 2025-12-26 22:43:06 -05:00
Wilson Snyder 7a2b20cff3 Fix formatting of %p to be spaceless 2025-12-26 21:45:52 -05:00
Wilson Snyder b50e8bb9c1 Internals: Add '--debug-runtime-timeout' 2025-12-26 12:59:35 -05:00
Iztok Jeras 6a07595a44 Commentary: Text formatting fix (#6863) 2025-12-25 19:01:38 -05:00
Wilson Snyder 397e64903c Fix typedef :: class reference error (#6862). 2025-12-24 10:01:46 -05:00
Wilson Snyder a0f0edd594 Commentary: Update contributors. 2025-12-24 09:06:31 -05:00
Wilson Snyder 9eba7bcd91 Tests: Commentary 2025-12-23 20:50:18 -05:00
Wilson Snyder 1b93033690 Add --quiet-build to suppress make/compiler informationals. 2025-12-23 19:21:42 -05:00
Wilson Snyder 921ad64d22 Commentary: Changes update 2025-12-23 19:20:42 -05:00
Wilson Snyder 3f4fe73191 Tests: Indent fixes 2025-12-23 19:20:36 -05:00
Wilson Snyder 5dc05e1fa8 Internals: Update some JSON references. No functional change. 2025-12-23 10:13:23 -05:00
Krzysztof Bieganski a2fcd37c08 Fix unsupported if virtual interface warning (#6558) (#6861) 2025-12-23 10:12:34 -05:00
Wilson Snyder 742c0b134c Tests: Update t_disable_task_unsup (#6853 partial) 2025-12-21 21:26:16 -05:00
Wilson Snyder f6b966ed16 Fix randc on extended class (#6852). 2025-12-21 19:56:55 -05:00
Wilson Snyder 1d7f5ed33e Commentary 2025-12-21 18:55:51 -05:00
Wilson Snyder 4201450a8a Fix class reference throwing cannot detect changes error (#6851). 2025-12-21 18:44:55 -05:00
Wilson Snyder ef5ca74e94 Tests: Better handle multiline statements in t_dist_warn_coverage 2025-12-21 16:15:33 -05:00
Wilson Snyder a6f608c616 Tests: Add t_rand_stability_class 2025-12-21 15:28:10 -05:00
Jose Drowne c0a0f0dab9 Optimize inlining small C functions and add -inline-cfuncs (#6815) 2025-12-21 13:14:50 -05:00
github action e6877e83fd Apply 'make format' 2025-12-21 13:59:15 +00:00
Thomas Aldrian 361ab194ff Internals: Modport expression parsing and tests (#2601 partial) (#6848) 2025-12-21 08:58:21 -05:00
Wilson Snyder 32dafdcc61 Internals: Cleanup some docstrfmt issues. 2025-12-20 22:41:26 -05:00
Wilson Snyder fa99e7b697 Internals: Format CITATION.cff as proper YAML 2025-12-20 22:19:15 -05:00
Wilson Snyder a64b083b2a Fix JSON missing signed indication (#6845). 2025-12-20 22:11:09 -05:00
Wilson Snyder 605915f307 Commentary: Changes update 2025-12-20 22:04:29 -05:00
Wilson Snyder 2c156d6655 Tests: Reformat some recent tests to mostly verilog-format standard. No test functional change. 2025-12-20 21:46:43 -05:00
Wilson Snyder ffa87540cc Fix randcase under fork (#6843). 2025-12-20 21:25:01 -05:00
Geza Lore f990dd747e Change metacomments to not enable warnings disabled in control file (#6836) (#6842)
Track the location based message/feature enable bits separately for code
and control file directives. A message/feature is disabled if disabled
either in the control file, or in code directives/metacomments. That is,
enabled only if both agree should be enabled.
2025-12-20 06:33:46 -05:00
em2machine 3ceac0b37e Fix parameterized class module parameters (#6754) (#6834) 2025-12-19 12:57:15 -05:00
Pawel Kojma 5244766b7b Support reduction or in constraints (#6840) 2025-12-19 12:37:20 -05:00
Yangyu Chen 47d1a50aa4 Fix setting thread count in VerilatedContext (#6826 partial) (#6841) 2025-12-19 10:59:43 -05:00
Wilson Snyder 5cee225022 Add NUMA example commentary (#6839 partial) 2025-12-19 07:47:13 -05:00
Oleh Maksymenko a098e4894f Fix JSON dump missing output ports (#6751) (#6831) 2025-12-19 07:30:33 -05:00
Wilson Snyder be08862109 CI: Add format-yaml (#6838) 2025-12-18 21:45:43 -05:00
Wilson Snyder c2c00888d6 Fix firing array selects of events (#6829). 2025-12-18 20:45:22 -05:00
Wilson Snyder 24e43f4ddd Internals: Add assertion at expected expressions (#6829 partial) 2025-12-18 20:37:11 -05:00
Geza Lore 04a7b31b84 Fix false IMPLICITSTATIC on localparam (#6835) 2025-12-18 12:51:31 +00:00
Yilou Wang 41937ecbe4 Fix member select of variable without randmode (#6800) (#6833) 2025-12-18 06:49:04 -05:00
Wilson Snyder b90865a08a Change --lint-only and --json-only to imply --timing (#6790). 2025-12-17 19:24:43 -05:00
Wilson Snyder 12ff481689 REVERT 612237b7: Optimize trace code for faster compiles on repeated types (#6707) (#6832 partial). 2025-12-17 17:37:35 -05:00
Todd Strader d10e841b56 Skip properties for expression coverage (#6830) 2025-12-17 13:51:40 -05:00
Yangyu Chen bd38775ad2 V3DfgPasses: Optimize mux with UInt To OneHot (#6822)
Signed-off-by: Yangyu Chen <[email protected]>
2025-12-17 12:07:21 -05:00
em2machine 6f43ad8607 Fix type deduction for variable parameterized classes (#6281) (#6813) 2025-12-17 08:08:44 -05:00
github action fe5d6b213c Apply 'make format' 2025-12-17 02:18:36 +00:00
Wilson Snyder 7e5c5d677f Tests: Remove old benchmarksim, should use rtlmeter instead 2025-12-16 21:17:27 -05:00
Thomas Dybdahl Ahle 5115be6e6b Fix duplicate name error with interface initial blocks (#6804) (#6805). 2025-12-16 20:57:58 -05:00
Wilson Snyder 41c4f948fe Support assert under assert (#6146). 2025-12-16 20:45:31 -05:00
Wilson Snyder f1ee434dca Commentary: Changes update 2025-12-16 20:43:08 -05:00
Luca Colagrande a9ef4b3ff1 Fix nested struct within parameter port list (#6818) (#6824) 2025-12-16 18:08:49 -05:00
Todd Strader 35dcf70f48 Optimize trace code for faster compiles on repeated types (#6707) 2025-12-16 17:52:00 -05:00
Dan Ruelas-Petrisko 394d9cf168 Support -libmap (#5891 partial) (#6764) 2025-12-16 11:21:46 -05:00
Wilson Snyder 66b3790444 Commentary: Changes update 2025-12-16 08:14:37 -05:00
Wilson Snyder ef3fdbdcba Tests: Favor --binary. No test change. 2025-12-16 08:14:25 -05:00
Geza Lore 47a4f7fb9b Improve reusability of --dump-inputs output (#6812) 2025-12-16 11:08:19 +00:00
Ryszard Rozak 25f72e4305 Support force assignments to unpacked array elements of simple types (partial #4735) (#6787) 2025-12-16 08:35:59 +01:00
Krzysztof Bieganski 7e67f73844 Fix process reference giving no return statement error (#6767) (#6823) 2025-12-15 18:09:45 -05:00
dependabot[bot] 2f9e1fa454 Bump actions/cache from 4 to 5 (#6819) 2025-12-15 11:37:46 -05:00
dependabot[bot] 9bb3e9dd45 Bump actions/download-artifact from 6 to 7 (#6820) 2025-12-15 11:37:39 -05:00
dependabot[bot] bcc661c116 Bump actions/upload-artifact from 5 to 6 (#6821) 2025-12-15 11:37:29 -05:00
Alex Solomatnikov 8da8ca4203 Fix error on resized lvalues with warning suppressed (#6497) (#6816) 2025-12-15 06:49:32 -05:00
Geza Lore a1cd7d1f3a Add 'make venv' target (#6775)
Fixes #6775
2025-12-14 11:18:32 +00:00
Wilson Snyder dc00bf2484 Fix 'void(' mis-throwing assertion 2025-12-13 21:43:27 -05:00
Wilson Snyder 27558c9349 Internals: Reorganize system function/task parse rules. No functional change. 2025-12-13 21:34:28 -05:00
Wilson Snyder 5634795140 Improve message on cast assertion failure. 2025-12-13 20:51:13 -05:00
em2machine aff501f5c4 Fix resolution of specialized typedefs (#6754) (#6808) 2025-12-12 15:20:15 -05:00
em2machine 2995748d46 Fix parameterized class function (#6659) (#6802) 2025-12-12 04:17:08 -08:00
Geza Lore 0901c91b45 Tests: Fix t_dist_attributes_bad (#6801) 2025-12-12 02:59:01 -08:00
Wilson Snyder 86ad6f832a Commentary: Changes update 2025-12-11 21:07:24 -05:00
Wilson Snyder b7bc6c3c65 Tests: clang-format DPI and remove commented header 2025-12-11 21:07:00 -05:00
Yilou Wang f097e8a34e Fix write variable placement for global constraints (#6740) (#6750) (#6797) 2025-12-11 14:16:34 -05:00
Geza Lore cfd22a95e2 Tests: Fix malloc.h test includes on macOS (#6795 partial) (#6792)
Replace 'malloc.h' with the standard 'stdlib.h'.
2025-12-11 11:38:14 -05:00
Geza Lore 5bb98187fc Tests: Fix t_vpi_hierarchy_clear on macOS (#6793) 2025-12-11 15:23:03 +00:00
Geza Lore af1be26b96 Fix O(n*2) analysis in const-bit-op-tree (#6791)
Note this might miss some cases where a sub-tree within an And/Or/Xor
tree is optimizeable, but not the whole tree, but in practice this seems
to work better than the alternative of keeping a set of failed nodes and
bail early.
2025-12-11 14:32:25 +00:00
em2machine afc4bed0f8 Fix generate function(s) inside of generate blocks (#1011) (#6789) 2025-12-10 20:53:19 -05:00
Wilson Snyder f9f16b438f Tests: Imply --lint-only with test.lint() 2025-12-10 19:52:51 -05:00
Wilson Snyder 5d768a4a20 Internals: Fix rand dump text 2025-12-10 19:07:51 -05:00
Pawel Kojma 37318ab2bd Fix input sampling of clocking block signals (#6788) 2025-12-10 10:59:08 -05:00
Aliaksei Chapyzhenka 3b0db630c1 Support SystemC time resolution with step 10/100 (#6633) (#6715) 2025-12-09 19:34:29 -05:00
Wilson Snyder 075d624b29 Add SUPERNFIRST error on super.new on non-first statement (#6784). 2025-12-09 19:22:59 -05:00
dependabot[bot] d467fda7c6 Bump actions/create-github-app-token from 2.2.0 to 2.2.1 (#6778) 2025-12-09 19:17:54 -05:00
Ryszard Rozak 0f355c717e Fix disable iff in simple properties (#6783) 2025-12-09 07:18:32 -05:00
Wilson Snyder db2099a4dc Add -Wno-vla-cxx-extension CLang flag, and UVM DPI tests (#6782) 2025-12-09 07:15:28 -05:00
Geza Lore e6a3d61d25 Internals: Add Caliptra to RTLMeter runs (#6781) 2025-12-09 06:23:24 +00:00
Wilson Snyder ec38fb723d Internals: Remove added debug to avoid false leak warning 2025-12-08 21:33:21 -05:00
Wilson Snyder a3f913c5b1 Fix randomize call in parameterized class 2025-12-08 20:26:53 -05:00
Wilson Snyder 0f46f6eb40 Internals: Fix missing override 2025-12-08 20:17:40 -05:00
Wilson Snyder 29ae520e69 Fix class param static not found again error (#6768). 2025-12-08 20:11:28 -05:00
Wilson Snyder bd87dfc579 Internals: Add --debug-exit-elab; remove --debug-exit-uvm* 2025-12-08 18:02:46 -05:00
em2machine d0a5da2445 Fix typedef derived from type defined inside interface (#3441) (#6776) 2025-12-08 15:36:21 -05:00
Geza Lore 7e55c62cac Improve combinational cycle fixup in Dfg (#6744) (#6746)
Now that we have an efficient algorithm to analyse which bits in a
combinational cycle are not dependent on the cycle, can simplify the
cycle fixup algorithms. Remove FixUpSelDrivers: this was a heuristic
to save on the expensive independent bits analysis, but itself can
cause a performance problem on certain inputs that result in a large
number of attempted fixups. Doing this simplifies the driver tracing
algorithm, and because we now only attempt to trace drivers that are
known to be independent of the cycles, it should always succeed...
Unless of course there is a mismatch between the independent bit
analysis ant the driver tracing algorithm. In such case (when we managed
to prove independence, but then fail to trace a driver), we will crash,
which is still easier to sv-bugpoint than a performance bug.

Fixes #6744
2025-12-08 18:43:21 +00:00
Geza Lore 1baa832efc Fix reordering of function body inlined on RHS of <= NBA (#6780) 2025-12-08 18:42:52 +00:00
Christian Hecken 9a23711ff9 Fix stale pointers in VerilatedImpData::m_hierMap (#6726) 2025-12-07 15:42:29 -05:00
Wilson Snyder ae480c5f76 Fix enum item references in class extends with parameters. 2025-12-07 15:26:52 -05:00
Wilson Snyder 8130fed777 Fix pre/post_randomize on extended classes (#6467). 2025-12-07 14:14:48 -05:00
Wilson Snyder 0e3dffa5d1 Commentary: Changes update 2025-12-07 14:12:11 -05:00
Wilson Snyder ba9d6df20c Fix class-in-class extends with parameters (#6773). 2025-12-07 13:38:25 -05:00
Wilson Snyder 4b02e32314 Fix DPI under param class (#6733 partial) 2025-12-07 13:30:54 -05:00
Wilson Snyder 7946e9d197 Internals: Add some missing cfunc attribute dumps 2025-12-07 13:25:37 -05:00
Wilson Snyder 35a794687b Internals: Add some additional dangling checks. No functional change intended 2025-12-07 13:25:37 -05:00
Geza Lore 587f363e03 Build Verilator itself with -fno-exceptions (#6774) 2025-12-07 08:25:43 -05:00
Matthew Ballance 0e03ab2a57 Fix crash when super.new() called without a base class (#6772) 2025-12-06 18:08:51 -05:00
Wilson Snyder 040484cc3f Fix extern function that returns parametrized class (#4924). 2025-12-06 16:16:06 -05:00
Geza Lore 5278f42025 Fix Dfg assertion on out of bounds selects 2025-12-06 15:31:27 +00:00
em2machine c2cba8bfc6 Fix localparam type assignment from interface type parameters (#6637) (#6732) 2025-12-06 09:42:59 -05:00
github action ba3794a495 Apply 'make format' 2025-12-06 14:12:22 +00:00
Dan Ruelas-Petrisko 8c252952db Support config instance clauses (#5891 partial) (#6745) 2025-12-06 09:11:20 -05:00
Geza Lore 18dd44e970 Fix --lib-create with multi-bit clocks (#6759) 2025-12-05 15:21:35 +00:00
Geza Lore e2c05ae15e Fix select assignment expansion (#6757) 2025-12-05 10:07:53 -05:00
Geza Lore df7726c40d Fix Dfg reusing volatile variables
Forceable/externally written variables cannot be used as the canonical
result variable for a Dfg value as the variables value can be
inconsistent with its Dfg drivers (e.g. when forced).
2025-12-05 14:12:36 +00:00
Wilson Snyder cfada791e6 Internals: Fix leak in covergroup, last commit 2025-12-05 04:14:24 -05:00
Wilson Snyder 2f4b178957 Support parsing only of covergroup.option.option_name 2025-12-04 21:55:55 -05:00
Ryszard Rozak f2c2daa017 Throw UNSUPPORTED on force / release statements with complex select expressions (#6755) 2025-12-04 14:06:47 +01:00
Yilou WangandUdaya Raj Subedi 1fc86fd2f1 Fix randomize called within func/task (#6144) (#6753)
Co-authored-by: Udaya Raj Subedi <[email protected]>
2025-12-04 07:18:07 -05:00
Yilou Wang 22cd9bcadc Support rand_mode in global constraint gathering (#6740) (#6752) 2025-12-04 07:16:03 -05:00
Wilson Snyder 4426aff3d3 Internals: Fix coredump when dump with bad null enum itemp() 2025-12-03 21:35:59 -05:00
Wilson Snyder 7957701db8 Suppress unsupported for unused constant sequences 2025-12-03 21:23:48 -05:00
Wilson Snyder 4dedfbfe08 Commentary: Changes update 2025-12-03 21:21:42 -05:00
Matthew Ballance 3fc70b61d0 Fix internal fault when cross-class calling with DPI (#6735) (#6742)
Signed-off-by: Matthew Ballance <[email protected]>
2025-12-02 22:05:59 -05:00
Wilson Snyder 9a1dba357e Fix randsequence return inside function 2025-12-02 17:54:40 -05:00
Geza Lore 60fe2c873c Optimize trace initialization code size (#6749) 2025-12-02 07:19:45 -05:00
Yilou Wang e25c66de07 Support complex std::randomize patterns (#6736) (#6737) 2025-12-01 16:26:16 -05:00
Wilson Snyder b9b6eb61d9 Support randsequence (#6131) 2025-11-30 09:04:42 -05:00
Geza Lore 35615c268b Fix Dfg independent bits analysis performance (#6731) (#6743)
This removes a factor N from DfgBreakCycles, by doing the necessary data
flow analysis for the entire graph up front, and resulting the result for
all subsequent cycle fixups in the current iteration.

Fixes #6731
2025-11-29 19:01:22 +00:00
Wilson Snyder 287d8aef9e Fix duplicate member on interface always 2025-11-29 10:24:37 -05:00
Wilson Snyder 1583c79a8a Add assert (#6740 partial) 2025-11-28 09:55:19 -05:00
Jonathan Drolet f2e05bc0b7 Support unpacked struct in localparam (#6053 partial) (#6708) 2025-11-27 23:17:18 +04:00
Artur Bieniek 2c5ff3f63f Fix fork scheduling semantics (#6730)
Signed-off-by: Artur Bieniek <[email protected]>
2025-11-26 15:52:53 +03:00
Yilou Wang f4654a451b Support array reference arguments into 'std::randomize()' (#6384) (#6719) 2025-11-26 15:50:24 +03:00
Wilson Snyder 8293a8d035 Fix multitop cross references (#6699). 2025-11-26 06:09:29 -05:00
Wilson Snyder 9155e2529b Internals: Add AstLoop statement constructor. No functional change. 2025-11-25 09:05:42 -05:00
Wilson Snyder e65f052abf Commentary: Changes update 2025-11-25 09:05:33 -05:00
Geza Lore 7cfe9b5356 Fix --prof-exec using --lib-create 2025-11-25 10:08:03 +00:00
Geza Lore d2ce5e62e7 Internals: Factor out --prof-exec section handling, add debug code 2025-11-25 10:08:03 +00:00
dependabot[bot] 9e37a09765 Bump actions/create-github-app-token from 2.1.4 to 2.2.0 (#6729) 2025-11-24 10:10:39 -05:00
dependabot[bot] a3f388dd14 Bump actions/checkout from 5 to 6 (#6728) 2025-11-24 10:09:59 -05:00
Christian Hecken c267a67f68 Tests: Fix make_main traceEverOn after eval (#6727) 2025-11-24 07:37:49 -05:00
Wilson Snyder 201416a0c7 Tests: Misc cleanups 2025-11-23 17:14:44 -05:00
Wilson Snyder 840c8f5782 Internals: Auto-set useRandimizeMethods if new a AstRandCase. No functional change 2025-11-23 17:14:19 -05:00
Geza Lore 6ab8d56993 Optimize combinational loops through sign extension (#6724) 2025-11-23 19:26:51 +00:00
Wilson Snyder 07056b11f5 Tests: add driver.py test.priority settings (#6725) 2025-11-23 11:57:08 -05:00
Geza Lore 6a83112380 Internals: Fix minor macOS issues 2025-11-23 11:04:51 +00:00
github action 28c78d3f9a Apply 'make format' 2025-11-23 01:21:13 +00:00
Dan Ruelas-Petrisko 9346b98cb6 Support config cell clauses (#6717) 2025-11-22 20:17:17 -05:00
Geza Lore ea9cc0e4c1 Set runtime worker thread stack sizes on macOS (#6721)
The default stack size of secondary thread on macOS is 512k, which is
too small even to run some of the tests. Unfortunately changing the
thread size must happen via `pthred_create` attributes, which are not
available via the c++ threading APIs. Use pthreads directly on macOS,
and set the worker thread sizes to the same as the main thread stack.
2025-11-22 20:13:46 -05:00
Michael Bikovitsky 9632c614be Fix X handling in UDPs (#6723) 2025-11-22 20:09:49 -05:00
Wilson Snyder 087ca15138 Support clocking output delay 1step (#6681). 2025-11-22 17:40:40 -05:00
Wilson Snyder 24117bc599 Internals: Add format-bash make rule (not in automatic format) 2025-11-22 12:30:29 -05:00
Wilson Snyder 3ab21332c9 Internals: Add some missing Python files to lint 2025-11-22 12:22:39 -05:00
Wilson Snyder 44102de362 Tests: Rename control files to .vc. No test function change. 2025-11-22 12:09:22 -05:00
Wilson Snyder 91a59bbcc5 Documentation: Adapt format suggested by docstrfmt 2025-11-22 10:59:38 -05:00
Geza Lore 7c09985695 Tests: Fix t_dpi_arg_inout_unpack 2025-11-22 14:44:20 +00:00
Geza Lore 602e82a3b7 Internals: Avoid argparse.FileType deprecated in Python 3.14 2025-11-22 09:47:11 +00:00
Geza Lore 259365d408 Commentary: Changes update 2025-11-22 08:55:47 +00:00
Wilson Snyder 4cc4ff3e07 Commentary: Fix some .rst style issues 2025-11-21 22:25:03 -05:00
Wilson Snyder 0e8ec49cf6 Internals: format-yaml 2025-11-21 20:21:13 -05:00
Wilson Snyder dabfb7291b CI: Pin gsersemi version 2025-11-21 20:07:32 -05:00
Wilson Snyder 86004fb582 Internals: Group the format makefile rules. No rule change. 2025-11-21 20:02:46 -05:00
Wilson Snyder 6bba9f6c40 Internals: Defer interface typedefs, and add more tests (#3441 tests) 2025-11-21 19:42:22 -05:00
Wilson Snyder 7e3cab8e5d Commentary: Changes update 2025-11-21 19:39:51 -05:00
Igor Zaworski 98d0eac149 Fix of deleting linked node in V3Randomize (#6718)
Signed-off-by: Igor Zaworski <[email protected]>
2025-11-21 07:07:50 -05:00
Jakub Wasilewski 0b8c369740 Add sc_biguint pragma (#6712) 2025-11-20 17:08:59 -05:00
github action 0703159dbc Apply 'make format' 2025-11-20 11:39:49 +00:00
Dan Ruelas-Petrisko a4e901135b Support config default liblist (#6714) 2025-11-20 06:38:46 -05:00
Dan Ruelas-Petrisko 7edf6d4749 Support --top specifying config name (#6710) 2025-11-19 20:23:02 -05:00
Yilou Wang 00988aed70 Support General Global Constraints (#6709) (#6711) 2025-11-19 11:08:42 -05:00
Christian HeckenandChristian Hecken edb84f3776 Tests: Add --gdbsim to iverilog with use_libvpi (#6701)
Co-authored-by: Christian Hecken <[email protected]>
2025-11-17 07:29:45 -05:00
Christian Hecken 5ef235b5ef Tests: Add v_flags, XRUN define to xrun run flags (#6703) 2025-11-17 05:50:02 -05:00
Wilson Snyder e61012e30d Improve class extends error format 2025-11-16 21:00:13 -05:00
Wilson Snyder 84173048d2 Internals: Fix hasing node informational on AstCaseItem 2025-11-16 18:37:58 -05:00
Wilson Snyder eb6ce0799c Tests (#6698 testcase only) 2025-11-16 17:16:21 -05:00
Wilson Snyder 382d90e03e Makefile: Hide deplist echo 2025-11-16 17:16:14 -05:00
Wilson Snyder 19d5adcbdf Commentary: Changes update 2025-11-16 17:13:49 -05:00
Wilson Snyder 03e5c3b2ff Tests: Reindent some tests. No functional change. 2025-11-16 17:13:01 -05:00
github action 59bc4cf66b Apply 'make format' 2025-11-16 03:53:48 +00:00
Jean-Nicolas Strauss 6454a8802e Fix stream operator widening (#6693) (#6697) 2025-11-15 22:52:52 -05:00
Yilou Wang 048c97f0ae Support std::randomize(){...} (#4706) (#6573) 2025-11-14 14:32:01 -05:00
Ryszard Rozak f32095dd17 Support constexpr cycle delay in sequences (#6691) 2025-11-14 13:48:46 +01:00
Pawel Kojma 0dce8feead Support parsing of dotted bins_expression (#6683) 2025-11-14 06:41:46 -05:00
Geza Lore 43975bcbdd Optimize $past delayed variable reuse (#6689)
As the TODO in the original code suggested, we can re-use delayed values
of expressions if they appear in multiple $past calls.
2025-11-13 17:04:50 +00:00
Geza Lore a1056c6ae9 Add -param/-port options to public_flat* control directives (#6685) 2025-11-13 06:59:02 -05:00
Wilson Snyder 5c0ad5bd1f Internals: cppcheck fixes. No functional change. (#6687) 2025-11-12 18:54:22 -05:00
Wilson Snyder 67094f6a88 Tests: Disable t_udp_sequential until fix (#6056 workaround) 2025-11-12 18:52:17 -05:00
Wilson Snyder 7db8bc84aa Tests: Add more 'config' unsupported tests (#5891 partial) 2025-11-12 18:37:09 -05:00
Geza Lore 158f51fb54 Optimize functions reading external parameters as pure (#6684) 2025-11-12 08:27:42 -05:00
Geza Lore 0dc9f779f8 Add -fno-inline-funcs-eager option to disable excessive inlining (#6682) 2025-11-11 21:46:19 +00:00
Geza Lore c5f8656aa0 Fix bounds checking in non-inlined function (#6677) 2025-11-11 06:47:49 -05:00
Wilson Snyder eb40c24b78 Tests: Rename tests to proper categories 2025-11-10 20:56:38 -05:00
Todd Strader 34f63396cb Fix free collision (#6675) 2025-11-10 16:44:41 -05:00
Geza Lore 8e35c81399 Fix --expand-limit not respected for expressions (#6670) 2025-11-10 17:18:33 +00:00
Pawel Kojma 0062a422a4 Support #1step delay as statement (#6671) 2025-11-10 09:39:33 -05:00
Artur Bieniek 19bbeb24a6 Fix large array initialization (#6669) 2025-11-10 09:19:08 -05:00
Geza Lore 6e05361318 Tests: Add case for bind into parametrised hier_block
Using `bind` into a parametrized hier_block used to be broken due to name
mangling, but was 'unintentionally' fixed by
916a89761e. Adding test to avoid
regressions.
2025-11-10 12:32:10 +00:00
Wilson Snyder fbb195e054 Tests: Add UVM 2020-3.1 hello world 2025-11-09 15:02:22 -05:00
Wilson Snyder c87a3e92fc Commentary: Changes update 2025-11-09 14:50:31 -05:00
Geza Lore c7ff73a083 Add --unroll-limit option (#6654) (#6668) 2025-11-09 12:46:25 -05:00
Geza Lore f4086496cb Internals: Refactor file handling in EmitC* (#6667)
Combined the 3 various APIs used in EmitC* passes to handle file
opening/splitting into a single one. This removes a lot of copy paste
and makes everything consistent.

All C++ file handling goes through `EmitCBaseVisitor` using the
`openNewOutputHeaderFile`, `openNewOutputSourceFile` and
`closOutputFile` methods.

To emit a new kind of file, always derive a new class from
`EmitCBaseVisitor`, and use the above APIs, they will take care of
everything else in a consistent matter.

Subsequently also removed V3OutSCFile, and instead included
verilated_sc.h (which included the systemc header itself) in the two
files that need it (the primary model header, and the root module
header).

Functional changes:
- The PCH header did not use to have a corresponding AstCFile. Now it
  does, though this makes no difference in the output
- All 'slow' sources now have '__Slow' in the name automatically (the
  only one missing was for the ConstPool files)

Rest of the output is identical except for the header line now being
present in all generated C++ files.
2025-11-09 17:41:13 +00:00
Paul SwirhunandPaul Swirhun aaafa6e8df Fix local interface parameter hierarchical access (#6661) (#6666)
Co-authored-by: Paul Swirhun <[email protected]>
2025-11-09 10:48:55 -05:00
Geza Lore 107776f324 Optimize repeated function call during symbol table init (#6665) 2025-11-08 16:48:00 -05:00
Wilson Snyder c493982511 Spelling fixes 2025-11-08 16:09:45 -05:00
Wilson Snyder 234b15a3e6 Commentary: Changes update 2025-11-08 16:09:24 -05:00
Wilson Snyder 78d27842cf Internals: Recogize "fixes" strings in log-changes 2025-11-08 13:56:21 -05:00
github action c3cd379fd5 Apply 'make format' 2025-11-08 15:57:16 +00:00
Geza Lore 8ad8d4f807 Fix long C++ compilation due to VerilatedScope constructors (#6664)
The Syms class can contain a very large number of VeriltedScope
instances if `--vpi` is used, all of which need a call to the default
constructor in the constructor of the Syms class. This can lead to very
long compilation times, even without optimization on some compilers.

To avoid the constructor calls, hold VeriltedScope via pointers in the
Syms class, and explicitly new and delete them in the Syms
constructor/destructor. These explicit new/delte can then be
automatically split up into sub functions when the Syms
constructor/destructor become large.

Regarding run-time performance, this should have no significant effect,
most interactions are either during construction/destruction of the Syms
object, or are via pointers already. The one place where we used to
refer to VerilatedScope instances is when emitting an AstScopeName for
things like $display %m. For those there will be an extra load
instruction at run-time, which should not make a big difference.

Patch 3 of 3 to fix long compile times of the Syms module in some
scenarios.
2025-11-08 15:56:15 +00:00
Geza Lore ec3c9832de Fix crash on Dfg driver lookup
Fixes #6649
2025-11-08 13:55:56 +00:00
Geza Lore 3b7ddce207 Optimize run-time symbol table construction of public variables (#6663)
Follow up from #6662 `VerilatedScope::varInsert` can do its work in one
pass, no need to emit it twice.
2025-11-08 13:29:44 +00:00
Geza Lore 71dcf30c1f Do not include redundant headers in Syms implementation files
These are all available through the PCH
2025-11-08 10:36:41 +00:00
Geza Lore 0f96bd0f4d Fix splitting of Syms constructor/destructor bodies (#6662)
Splitting of the Syms constructor/destructor were a bit arbitrarily
enforced with some parts splitable, while others not. There was also an
issue that even if the constructor and destructor bodies were split, we
would still end up with both in the same file that was double the size of
the intended split limit.

To fix, first all statements required in the Syms constructor and
destructor are gathered into a vector, then if the total number of
statements required for both is bigger than the split limit, the
implementations are split into sub-functions, one per file, as before,
ensuring that none of the functions are bigger than the split limit.

Also add __Slow suffix to the names of the files.

Patch 2 of 3 to fix long compile times of the Syms module in some
scenarios.
2025-11-08 10:36:12 +00:00
Geza Lore 2fabf50801 Use explicit ctor/dtor functions for VerilatedModules (#6660)
In order to avoid long compile times of the Syms constructor due to
having a very large number of member constructor sto call, move to using
explicit ctor/dtor functions for all but the root VerilatedModule. The
root module needs a constructor as it has non-default-constructible
members. The other modules don't.

This is only part of the fix, as in order to avoid having a default
constructor call the VerilatedModule needs to be default constructible.
I think this is now true for modules that do not contain strings or
other non trivially constructible/destructible variables.

Patch 1 of 3 to fix long compile times of the Syms module in some
scenarios.
2025-11-07 19:57:10 +00:00
github action eafad9742a Apply 'make format' 2025-11-07 13:14:00 +00:00
Geza Lore 0b0e103fde Fix ccache-report with PCH files 2025-11-07 09:41:23 +00:00
Geza Lore 9d74984163 Fix non-deterministic output when splitting Syms file 2025-11-06 15:46:14 +00:00
Bartłomiej Chmiel 5adecb9fa3 Support multi-expression sequences (#6639) 2025-11-06 08:42:27 -05:00
Geza Lore f7e12e9219 Fix slow compilation of generated sampled value code (#6652)
For handling $past and similar functions, we used to collect sampled
values of variables at the beginning of the main _eval function. If we
have many of these, this can grow _eval very large which can make C++
compilation very slow. Apply usual fix of emitting the necessary code in
a separate function and then splitting it based on size.
2025-11-06 13:31:40 +00:00
Todd Strader 47b52800bf Fix expression coverage of system calls (#6592) 2025-11-06 08:23:35 -05:00
Christian Hecken 100c831474 Tests: Fix Icarus vvp execution with use_libvpi (#6648) 2025-11-05 13:41:53 -05:00
Geza Lore cb5f038060 Internals: Optimzie unlinking rest of list after head (tail) (#6643)
AstNode::unlinkFrBackWithNext is O(n) if the subject node is not the
head of the list. We sometimes want to unlink the rest of the list
starting at the node after the head (e.g.: in
V3Sched::util::splitCheck), this patch makes that O(1) as well.
2025-11-05 15:55:30 +00:00
Geza Lore a35d4a4b4b Add memory usage statistics on macOS (#6644)
Add memory usage statistics on macOS
2025-11-05 15:45:35 +00:00
Ryszard Rozak 96ece751fa Internals: Simplify release handling. No functional change intended (#6647) 2025-11-05 10:20:18 -05:00
Geza Lore 4404978765 Fix command line statistics with --stats (#6645) (#6646)
Fixes #6645
2025-11-05 14:59:25 +00:00
Yilou Wang 0853aa7515 Support basic global constraints (#6551) (#6552) 2025-11-05 07:14:03 -05:00
github action 574c69c092 Apply 'make format' 2025-11-05 10:50:31 +00:00
Jens Yuechao Liu e2f5854088 Fix slice memory overflow on large output arrays (#6636) (#6638) 2025-11-05 05:48:22 -05:00
Geza Lore fe1a9e9ea7 Internals: Cleanup V3EmitCSyms (#6635) 2025-11-04 18:00:26 -05:00
Todd Strader 94d0513bc7 Don't pick initial random values for verilator-created variables (#6611) 2025-11-04 16:11:53 -05:00
Todd Strader 2c01aff2b3 Fix expression short circuiting (#6483) 2025-11-04 10:34:58 -05:00
Pawel Kojma 5d5798b4af Fix parsing of with clause inside covergroups (#6618) 2025-11-04 09:12:30 -05:00
Artur Bieniek 8eed4e32ba Support this.randomize() with constraints (#6634) 2025-11-04 08:28:42 -05:00
Wilson Snyder ea75163567 Fix determining Verilator revision when within git submodules without tags. 2025-11-03 19:59:59 -05:00
Wilson Snyder 1d9c5c2c6b Fix determining Verilator revision when within git submodules without tags. 2025-11-03 18:36:20 -05:00
Wilson Snyder c299b71677 Commentary: Changes update 2025-11-03 18:27:18 -05:00
Krzysztof Bieganski 0eaa9ed144 Fix --timing with --x-initial-edge (#6603) (#6631)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2025-11-03 09:39:23 -05:00
Geza Lore faaa2db844 Fix merging of impure assignments in gate optimization (#6629) (#6630) 2025-11-03 07:29:39 -05:00
Geza Lore d3ca79368c Internals: Replace AstMTaskBody with AstCFunc(#6280) (#6628)
AstMTaskBody is somewhat redundant and is problematic for #6280. We used
to wrap all MTasks in a CFunc before emit anyway. Now we create that
CFunc when we create the ExecMTask in V3OrderParallel, and subsequently
use the CFunc to represent the contents of the MTask. Final output and
optimizations are the same, but internals are simplified to move
towards #6280.

No functional change.
2025-11-03 06:32:03 +00:00
Geza Lore d066504bb9 Optimize away calls to empty functions (#6626) 2025-11-02 16:11:02 -05:00
Wilson Snyder 611ffbe04e devel release 2025-11-02 11:18:20 -05:00
Wilson Snyder d915745073 Merge from master for release. 2025-11-02 11:17:12 -05:00
Wilson Snyder 0a9d9db5ae Merge from master for release. 2025-08-30 18:14:20 -04:00
Wilson Snyder 318b1c1a34 Merge from master for release. 2025-07-08 23:17:56 -04:00
Wilson Snyder 0dc93c1d5c Merge from master for release. 2025-04-27 13:04:49 -04:00
Wilson Snyder ac3f30ed6c Merge from master for release. 2025-02-24 18:32:52 -05:00
Wilson Snyder 447ab12cec Merge from master for release. 2025-01-01 09:07:59 -05:00
Wilson Snyder 2cb1a8de73 Merge from master for release. 2024-10-27 10:06:28 -04:00
Wilson Snyder 1d79f5c59b Merge from master for release. 2024-08-21 08:54:42 -04:00
Wilson Snyder 065f36ab56 Merge from master for release. 2024-06-15 08:48:03 -04:00
Wilson Snyder c561fe8baf Merge from master for release. 2024-04-05 06:05:57 -04:00
Wilson Snyder 2b4852048d Commentary - update version date 2024-02-25 07:20:30 -05:00
Wilson Snyder 0144e3ebec Merge from master for release. 2024-02-24 07:48:43 -05:00
Wilson Snyder d410e551f8 Merge from master for release. 2024-01-01 03:45:16 -05:00
Wilson Snyder 344f87abe3 Merge from master for release. 2023-10-31 19:51:59 -04:00
Wilson Snyder 57c816f906 Merge from master for release. (update) 2023-09-16 21:44:39 -04:00
Wilson Snyder 82e1dbe162 Merge from master for release. 2023-09-16 20:43:53 -04:00
Wilson Snyder e6b0bdd4df Merge from master for release. 2023-08-06 14:17:13 -04:00
Wilson Snyder 4f13c4d1bb Merge from master for release. 2023-06-13 19:37:22 -04:00
Wilson Snyder c37ec19751 Merge from master for release. 2023-04-30 07:09:22 -04:00
Wilson Snyder aaaf8e75af Merge from master for release. 2023-03-04 11:29:11 -05:00
Wilson Snyder 8cc31c6cf1 Merge from master for release. 2023-01-22 11:52:52 -05:00
Wilson Snyder 8468af1a20 Merge from master for release. 2022-12-14 22:07:37 -05:00
Wilson Snyder db39d70c75 Merge from master for release. 2022-10-29 17:52:23 -04:00
Wilson Snyder 04fff7ebd8 Merge from master for release. 2022-10-01 08:33:50 -04:00
Wilson Snyder b154af87a1 Merge from master for release. 2022-08-31 19:47:07 -04:00
Wilson Snyder 8b7480806a Merge from master for release. 2022-06-19 15:11:19 -04:00
Wilson Snyder e29f5ad559 Merge from master for release. 2022-06-19 15:08:17 -04:00
Wilson Snyder 4618fd5a43 Merge from master for release. 2022-05-02 22:22:20 -04:00
Wilson Snyder ed979c6aa1 Merge from master for release. 2022-03-12 13:14:48 -05:00
Wilson Snyder 141c5da3f9 Merge from master for release. 2021-12-05 11:15:32 -05:00
Wilson Snyder 0185ee5df3 Merge from master for release. 2021-10-17 14:46:03 -04:00
Wilson Snyder 27c08a65e1 Merge from master for release. 2021-09-01 21:02:51 -04:00
Wilson Snyder de408a5eb7 Merge from master for release. 2021-07-07 20:48:51 -04:00
Wilson Snyder fa3c072dd1 Merge from master for release. 2021-06-12 13:01:37 -04:00
Wilson Snyder aac4b7090a Merge from master for release. 2021-04-24 10:40:13 -04:00
Wilson Snyder f0d664530d Merge from master for release. 2021-03-12 15:48:45 -05:00
Wilson Snyder 702140bf93 Merge from master for release. 2021-02-25 21:49:42 -05:00
Wilson Snyder 2075db3db0 Merge from master for release. 2021-01-10 13:35:45 -05:00
Wilson Snyder b7fec513cf Merge from master for release. 2020-12-02 20:13:31 -05:00
Wilson Snyder 78e7758022 Merge from master for release. 2020-11-14 09:58:28 -05:00
Wilson Snyder 818318ddd5 Merge from master for release. 2020-10-15 08:25:44 -04:00
Wilson Snyder 39eea781bc Merge from master for release. 2020-09-07 09:38:50 -04:00
Wilson Snyder c4f7bd6a04 'Merge from master for release.' 2020-08-15 09:18:29 -04:00
Wilson Snyder dd03d0f3c9 'Merge from master for release.' 2020-07-11 09:16:56 -04:00
Wilson Snyder 369ce6af2c 'Merge from master for release.' 2020-06-06 07:49:57 -04:00
Wilson Snyder f83817510d 'Merge from master for release.' 2020-05-03 11:15:21 -04:00
Wilson Snyder bfcd779cfb 'Merge from master for release.' 2020-04-04 08:50:02 -04:00
Wilson Snyder e69c380205 'Merge from master for release.' 2020-03-08 08:39:29 -04:00
Wilson Snyder 61e14aa827 'Merge from master for release.' 2020-02-08 09:15:27 -05:00
Wilson Snyder 0c6c83e278 Merge from master for release. 2020-01-11 07:12:09 -05:00
Wilson Snyder 6f52208b68 Fix clang warning. 2019-12-09 18:28:56 -05:00
10283 changed files with 734416 additions and 275421 deletions
+3 -1
View File
@@ -1,4 +1,6 @@
# mbake configuration file
# DESCRIPTION: mbake configuration file
# SPDX-FileCopyrightText: 2025 Wilson Snyder
# SPDX-License-Identifier: CC0-1.0
[formatter]
# Indentation settings
+1 -1
View File
@@ -1,4 +1,4 @@
Checks: '*,-hicpp*,-android-cloexec-fopen,-cert-dcl50-cpp,-cert-env33-c,-cert-err34-c,-cert-err58-cpp,-clang-analyzer-core.UndefinedBinaryOperatorResult,-clang-analyzer-security*,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-no-malloc,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-union-access,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-special-member-functions,-fuchsia-*,-google-default-arguments,-google-readability-todo,-google-runtime-references,-llvm-header-guard,-llvm-include-order,-misc-string-integer-assignment,-misc-string-literal-with-embedded-nul,-modernize-use-auto,-modernize-use-trailing-return-type,-readability-braces-around-statements,-readability-container-size-empty,-readability-delete-null-pointer,-readability-else-after-return,-readability-implicit-bool-conversion,-readability-named-parameter,-readability-static-accessed-through-instance,-llvmlibc-*,-altera-*'
Checks: '*,-hicpp*,-android-cloexec-fopen,-cert-dcl50-cpp,-cert-env33-c,-cert-err34-c,-cert-err58-cpp,-clang-analyzer-core.UndefinedBinaryOperatorResult,-clang-analyzer-security*,-cppcoreguidelines-avoid-do-while,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-macro-usage,-cppcoreguidelines-no-malloc,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-union-access,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-special-member-functions,-fuchsia-*,-google-default-arguments,-google-readability-todo,-google-runtime-references,-llvm-header-guard,-llvm-include-order,-misc-string-integer-assignment,-misc-string-literal-with-embedded-nul,-modernize-use-auto,-modernize-use-trailing-return-type,-readability-braces-around-statements,-readability-container-size-empty,-readability-delete-null-pointer,-readability-else-after-return,-readability-implicit-bool-conversion,-readability-named-parameter,-readability-static-accessed-through-instance,-llvmlibc-*,-altera-*,-boost-use-ranges'
WarningsAsErrors: ''
HeaderFilterRegex: ''
FormatStyle: none
+4 -4
View File
@@ -1,10 +1,10 @@
---
# DESCRIPTION: codecov.io config
#
# Copyright 2020-2025 by Wilson Snyder. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2020-2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
####################
# Validate:
+2
View File
@@ -0,0 +1,2 @@
---
blank_issues_enabled: false
+18 -2
View File
@@ -7,18 +7,34 @@ assignees: ''
---
<!--
Thanks for taking the time to report this.
Can you please attach an example that shows the issue or missing feature? (Must be openly licensed, completely self-contained so can directly run what you provide. Ideally use test_regress format, see https://veripool.org/guide/latest/contributing.html?highlight=test_regress#reporting-bugs)
Please avoid attaching screenshots that show text - you can convert images to text using e.g. https://ocr.space
Please remove this block when composing, and all other blocks starting with < !--.
-->
Can you please attach an example that shows the issue or missing feature?
<!-- Please replace this with your answer. Examples must be openly licensed, completely self-contained so can directly run what you provide. Ideally use test_regress format, see https://veripool.org/guide/latest/contributing.html?highlight=test_regress#reporting-bugs -->
What output from that test indicates it is wrong, and what is the correct or expected output? (Or, please make test self-checking if possible.)
<!-- Please replace this with your answer -->
What 'verilator' command line do we use to run your example?
<!-- Please replace this with your answer -->
What 'verilator --version' are you using? Did you try it with the git master version? Did you try it with other simulators?
<!-- Please replace this with your answer -->
What OS and distribution are you using?
<!-- Please replace this with your answer -->
May we assist you in trying to fix this in Verilator yourself?
(Please avoid attaching screenshots that show text - you can convert images to text using e.g. https://ocr.space)
<!-- Please replace this with your answer - then hit "Preview" to see the formatted result before submitting. -->
+9 -1
View File
@@ -7,6 +7,14 @@ assignees: ''
---
<!--
Thanks for taking the time to report this.
If reporting a bug or requesting a feature please hit BACK on your browser and use a different issue templates.
Please remove this block when composing, and all other blocks starting with < !--.
-->
How may we help - what is your question?
(If reporting a bug or requesting a feature please hit BACK on your browser and use a different issue templates.)
<!-- Please replace this with your answer - then hit "Preview" to see the formatted result before submitting. -->
+165
View File
@@ -0,0 +1,165 @@
---
# DESCRIPTION: Github actions composite action
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
name: Artifact cache
description: >-
Cache a directory across workflow runs using a GitHub Actions artifact instead
of actions/cache (useful where artifacts are preferable, e.g. no 10 GB limit
on public repos). The base 'key' is scoped automatically: per pull request
(<key>-pr-<N>) or per branch (<key>-branch-<name>), and on a PR restore falls
back to the target branch's cache. Call once with mode=restore before the work
and once with mode=save after, passing the same 'key' and 'path'.
Branch-scoped restores are provenance-checked (the artifact must come from a
same-repo push to that branch) - artifact names are a global, unauthenticated
namespace, so otherwise a fork PR could forge one.
mode=restore calls the GitHub API via 'gh', so the caller's job must grant
'actions: read'.
inputs:
mode:
description: "'restore' or 'save'"
required: true
path:
description: "Directory to cache (archived on save, extracted into on restore)"
required: true
key:
description: "Base artifact name; scoped per PR/branch automatically"
required: true
retention-days:
description: "Artifact retention in days (mode=save)"
required: false
default: '3'
token:
description: "Token for the GitHub API (mode=restore); defaults to the job's GITHUB_TOKEN"
required: false
default: ''
outputs:
key:
description: "Echoes the input 'key', so a later save can reuse it without repeating the expression"
value: ${{ inputs.key }}
cache-hit:
description: "'true' if an artifact was restored (mode=restore)"
value: ${{ steps.restore.outputs.cache-hit }}
runs:
using: composite
steps:
- name: Check mode
shell: bash
env:
MODE: ${{ inputs.mode }}
run: |
case "$MODE" in
restore|save) ;;
*) echo "::error::artifact-cache: 'mode' must be 'restore' or 'save' (got '$MODE')"; exit 1 ;;
esac
# Scope the base key: <key>-pr-<N> for pull requests (with the target branch
# as fallback), else <key>-branch-<name>. Refs come via env, not ${{ }}
# interpolation, so a branch name with shell metacharacters can't inject.
- name: Compute artifact name
id: name
shell: bash
env:
BASE_KEY: ${{ inputs.key }}
EVENT_NAME: ${{ github.event_name }}
PR_NUMBER: ${{ github.event.pull_request.number }}
BASE_REF: ${{ github.event.pull_request.base.ref }}
REF_NAME: ${{ github.ref_name }}
run: |
set -euo pipefail
sanitize() { printf '%s' "$1" | tr '/' '-'; } # artifact names cannot contain '/'
if [ "$EVENT_NAME" = pull_request ]; then
{
echo "primary=${BASE_KEY}-pr-${PR_NUMBER}"
echo "primary-branch="
echo "fallback=${BASE_KEY}-branch-$(sanitize "$BASE_REF")"
echo "fallback-branch=$BASE_REF"
} >> "$GITHUB_OUTPUT"
else
{
echo "primary=${BASE_KEY}-branch-$(sanitize "$REF_NAME")"
echo "primary-branch=$REF_NAME"
echo "fallback="
echo "fallback-branch="
} >> "$GITHUB_OUTPUT"
fi
- name: Restore artifact cache
id: restore
if: ${{ inputs.mode == 'restore' }}
continue-on-error: true # a cold start is fine; a restore failure must not fail the caller
shell: bash
env:
GH_TOKEN: ${{ inputs.token || github.token }}
CACHE_PATH: ${{ inputs.path }}
PRIMARY: ${{ steps.name.outputs.primary }}
PRIMARY_BRANCH: ${{ steps.name.outputs.primary-branch }}
FALLBACK: ${{ steps.name.outputs.fallback }}
FALLBACK_BRANCH: ${{ steps.name.outputs.fallback-branch }}
run: |
set -euo pipefail
mkdir -p "$CACHE_PATH"
# Newest non-expired artifact named $1 (empty if none). With a non-empty
# $2 (branch), require provenance: a same-repo run (head_repository_id ==
# repository_id) whose head branch is $2, so a fork cannot forge it.
newest_run_id() {
want="$1" br="$2" gh api \
"/repos/$GITHUB_REPOSITORY/actions/artifacts?name=$1&per_page=100" \
--jq '.artifacts[]
| select(.expired == false and .name == env.want)
| select(env.br == ""
or (.workflow_run.head_branch == env.br
and .workflow_run.head_repository_id == .workflow_run.repository_id))
| [.created_at, (.workflow_run.id | tostring)] | @tsv' \
| sort | tail -n1 | cut -f2
}
restore() { # $1=name $2=branch(empty ok); returns 0 on a successful restore
local name="$1" br="$2" rid tarball
[ -n "$name" ] || return 1
rid="$(newest_run_id "$name" "$br")" || return 1
[ -n "$rid" ] || return 1
echo "Restoring '$CACHE_PATH' from artifact '$name' (run $rid)"
gh run download "$rid" -R "$GITHUB_REPOSITORY" --name "$name" --dir "$RUNNER_TEMP/artifact-cache-dl" || return 1
# Each artifact holds a single tarball; match by extension so the inner
# filename is not part of the contract.
tarball="$(find "$RUNNER_TEMP/artifact-cache-dl" -name '*.tar.zst' -print -quit)"
[ -n "$tarball" ] || return 1
tar -I zstd -x -f "$tarball" -C "$CACHE_PATH"
}
if restore "$PRIMARY" "$PRIMARY_BRANCH"; then
echo "Restored from primary key"
echo "cache-hit=true" >> "$GITHUB_OUTPUT"
elif restore "$FALLBACK" "$FALLBACK_BRANCH"; then
echo "Restored from fallback key"
echo "cache-hit=true" >> "$GITHUB_OUTPUT"
else
echo "No matching artifact found; starting cold"
echo "cache-hit=false" >> "$GITHUB_OUTPUT"
fi
- name: Pack artifact cache
id: pack
if: ${{ inputs.mode == 'save' }}
shell: bash
env:
CACHE_PATH: ${{ inputs.path }}
run: |
set -euo pipefail
packdir="$(mktemp -d)" # unique dir so concurrent saves cannot collide
tar -I 'zstd -T0' -cf "$packdir/cache.tar.zst" -C "$CACHE_PATH" .
echo "tarball=$packdir/cache.tar.zst" >> "$GITHUB_OUTPUT"
- name: Upload artifact cache
if: ${{ inputs.mode == 'save' }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: ${{ steps.name.outputs.primary }}
path: ${{ steps.pack.outputs.tarball }}
retention-days: ${{ inputs.retention-days }}
overwrite: true
compression-level: 0 # tarball is already zstd-compressed
+109
View File
@@ -0,0 +1,109 @@
---
# DESCRIPTION: Github actions composite action
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
name: Install dependencies
description: >-
Install the dependencies of a CI stage with 'ci/ci-install.bash', caching the
'.deb' files apt downloads for that stage, so a package is fetched from the
network at most once per runner image. On hosts that do not use apt this is
just the install, there is nothing to cache.
inputs:
repo:
description: "Verilator checkout holding the ci/ scripts"
required: false
default: repo
stage:
description: "CI stage to install the dependencies of, e.g. 'build'"
required: true
runs:
using: composite
steps:
- name: Compute apt cache key
id: cachekey
if: ${{ runner.os == 'Linux' }}
shell: bash
working-directory: ${{ inputs.repo }}
env:
STAGE: ${{ inputs.stage }}
run: |
source ci/ci-common.bash
host="${DISTRO_ID:-$HOST_OS}${DISTRO_VERSION:+-$DISTRO_VERSION}"
echo "key=apt-${host}-${STAGE}" >> "$GITHUB_OUTPUT"
- name: Restore apt downloads
if: ${{ runner.os == 'Linux' }}
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v5
with:
path: ${{ runner.temp }}/apt-cache
key: ${{ steps.cachekey.outputs.key }}
restore-keys: |
${{ steps.cachekey.outputs.key }}-
- name: Seed apt archive from cache
if: ${{ runner.os == 'Linux' }}
shell: bash
env:
APT_CACHE_DIR: ${{ runner.temp }}/apt-cache
run: |
set -euo pipefail
# Ask apt where it keeps its downloads, rather than assume
eval "$(apt-config shell ARCHIVES Dir::Cache::archives/d)"
ARCHIVES=${ARCHIVES%/} # '/d' yields a trailing slash
# Wipe the archive first, so that whatever the runner image left behind is not stored
sudo apt-get -o DPkg::Lock::Timeout=60 clean
# The directory is absent when nothing was restored, e.g. on a cold start
if [ -d "$APT_CACHE_DIR" ] &&
[ -n "$(find "$APT_CACHE_DIR" -maxdepth 1 -name '*.deb' -print -quit)" ]; then
sudo cp "$APT_CACHE_DIR"/*.deb "$ARCHIVES"
fi
- name: Install dependencies
shell: bash
working-directory: ${{ inputs.repo }}
env:
STAGE: ${{ inputs.stage }}
run: ./ci/ci-install.bash "$STAGE"
- name: Collect apt downloads
id: collect
if: ${{ runner.os == 'Linux' }}
shell: bash
env:
APT_CACHE_DIR: ${{ runner.temp }}/apt-cache
run: |
set -euo pipefail
# Ask apt where it keeps its downloads, rather than assume
eval "$(apt-config shell ARCHIVES Dir::Cache::archives/d)"
ARCHIVES=${ARCHIVES%/} # '/d' yields a trailing slash
# Sorted names of the '.deb' files in a directory, empty if it has none
list-debs() {
[ -d "$1" ] || return 0
find "$1" -maxdepth 1 -name '*.deb' -printf '%f\n' | sort
}
# Superseded downloads can no longer be fetched, so drop them
sudo apt-get -o DPkg::Lock::Timeout=60 autoclean
downloaded=$(list-debs "$ARCHIVES")
if [ -z "$downloaded" ]; then
echo "Apt kept no '.deb' files, nothing to cache"
exit 0
fi
if [ "$downloaded" = "$(list-debs "$APT_CACHE_DIR")" ]; then
echo "Downloads unchanged, keeping the restored cache entry"
exit 0
fi
# Mirror the archive, rather than add to it, so that the cache cannot
# grow without bound as package versions churn
mkdir -p "$APT_CACHE_DIR"
rm -f "$APT_CACHE_DIR"/*.deb
sudo cp "$ARCHIVES"/*.deb "$APT_CACHE_DIR"
echo "changed=true" >> "$GITHUB_OUTPUT"
- name: Save apt downloads
if: ${{ steps.collect.outputs.changed == 'true' }}
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v5
with:
path: ${{ runner.temp }}/apt-cache
key: ${{ steps.cachekey.outputs.key }}-${{ github.run_id }}
+56
View File
@@ -0,0 +1,56 @@
---
# DESCRIPTION: Github actions composite action
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
name: Set up Python venv
description: >-
Restore, create, and optionally save the make-managed Python venv in a GitHub
Actions cache. The cache key combines the venv path (venvs are not
relocatable), the host OS and version, the Python major.minor version, and
the python-dev-requirements.txt hash, so any of those changing invalidates
it. Requires the already-configured Verilator tree to be present in 'repo'.
inputs:
repo:
description: "Verilator checkout holding the Makefile and .venv"
required: false
default: repo
save:
description: "Save the cache on a miss (set true only on trusted branches)"
required: false
default: 'false'
runs:
using: composite
steps:
- name: Compute Python venv cache key
id: cachekey
shell: bash
working-directory: ${{ inputs.repo }}
run: |
source ci/ci-common.bash
host="${DISTRO_ID:-$HOST_OS}${DISTRO_VERSION:+-$DISTRO_VERSION}"
pyver="$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')"
reqs="$(sha256sum python-dev-requirements.txt | cut -d' ' -f1)"
venv="${PWD#/}/.venv" # absolute venv path (leading '/' trimmed)
echo "key=venv-${host}-py${pyver}-${reqs}-${venv//\//-}" >> "$GITHUB_OUTPUT"
- name: Restore Python venv
id: venv
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v5
with:
path: ${{ inputs.repo }}/.venv
key: ${{ steps.cachekey.outputs.key }}
- name: Create Python venv
if: ${{ steps.venv.outputs.cache-hit != 'true' }}
shell: bash
working-directory: ${{ inputs.repo }}
run: make venv
- name: Save Python venv
if: ${{ inputs.save == 'true' && steps.venv.outputs.cache-hit != 'true' }}
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v5
with:
path: ${{ inputs.repo }}/.venv
key: ${{ steps.venv.outputs.cache-primary-key }}
@@ -0,0 +1,74 @@
---
# DESCRIPTION: Github actions composite action
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
name: Upload PR notification
description: >-
Upload the 'pr-notification' artifact, holding a comment for 'pages.yml' to
post on a pull request. The given directory must hold the content of the
comment in 'body.txt', and its single line summary in 'hist.txt'.
inputs:
path:
description: "Directory holding the notification contents"
required: true
key:
description: "Unique key for combining comments"
required: true
runs:
using: composite
steps:
- name: Validate
shell: bash
env:
NOTIFICATION_DIR: ${{ inputs.path }}
EVENT_NAME: ${{ github.event_name }}
run: |
# The notification is posted on the pull request of the triggering event
if [ "${EVENT_NAME}" != "pull_request" ]; then
echo "This action can only be used on a 'pull_request' run, but event is '${EVENT_NAME}'" >&2
exit 1
fi
# The content of the comment, and its single line summary
for f in body.txt hist.txt; do
if [ ! -f "${NOTIFICATION_DIR}/${f}" ]; then
echo "No '${f}' in '${NOTIFICATION_DIR}'" >&2
exit 1
fi
done
# Nothing else, so the artifact holds only what this action puts in it
EXTRA=$(find "${NOTIFICATION_DIR}" -mindepth 1 -not -name body.txt -not -name hist.txt)
if [ -n "${EXTRA}" ]; then
echo "Unexpected content in '${NOTIFICATION_DIR}':" >&2
echo "${EXTRA}" >&2
exit 1
fi
# 'ci-pages-notify.bash' stashes 'hist.txt' in an HTML comment, and later
# shows it in the history of the notifications superseding this one, so
# it must be a single line, and must neither open nor close an HTML comment
if [ $(wc -l < "${NOTIFICATION_DIR}/hist.txt") -ne 1 ]; then
echo "'hist.txt' must hold exactly one line" >&2
exit 1
fi
if grep -q -e '<!--' -e '-->' "${NOTIFICATION_DIR}/hist.txt"; then
echo "'hist.txt' must not contain '<!--' or '-->'" >&2
exit 1
fi
- name: Add metadata
shell: bash
env:
NOTIFICATION_DIR: ${{ inputs.path }}
NOTIFICATION_KEY: ${{ inputs.key }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
echo "${NOTIFICATION_KEY}" > "${NOTIFICATION_DIR}/key.txt"
echo "${PR_NUMBER}" > "${NOTIFICATION_DIR}/pr-number.txt"
ls -lsha "${NOTIFICATION_DIR}"
- name: Upload notification
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
path: ${{ inputs.path }}
name: pr-notification
+3
View File
@@ -6,3 +6,6 @@ updates:
directory: "/"
schedule:
interval: "weekly"
groups:
everything:
patterns: ["*"]
+81 -197
View File
@@ -1,9 +1,8 @@
---
# DESCRIPTION: Github actions config
# This name is key to badges in README.rst, so we use the name build
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
name: build-test
name: Regressions
on:
push:
@@ -16,6 +15,7 @@ on:
permissions:
contents: read
actions: read
defaults:
run:
@@ -28,259 +28,143 @@ concurrency:
jobs:
build-2404-gcc:
name: Build | ${{ matrix.os }} | ${{ matrix.cc }}${{ matrix.asan && ' | asan' || '' }}
build-2604-gcc:
name: Build | 26.04 | gcc
uses: ./.github/workflows/reusable-build.yml
with:
cc: gcc
runs-on: ubuntu-26.04
sha: ${{ github.sha }}
build-2604-clang:
name: Build | 26.04 | clang
uses: ./.github/workflows/reusable-build.yml
with:
cc: clang
dev-asan: true # Build (and run) with address sanitizer
runs-on: ubuntu-26.04
sha: ${{ github.sha }}
build-2404-gcc:
name: Build | 24.04 | gcc
uses: ./.github/workflows/reusable-build.yml
with:
cc: gcc
runs-on: ubuntu-24.04
sha: ${{ github.sha }}
os: ${{ matrix.os }}
os-name: linux
cc: ${{ matrix.cc }}
dev-asan: ${{ matrix.asan }}
dev-gcov: 0
strategy:
fail-fast: false
matrix:
include:
- {os: ubuntu-24.04, cc: gcc, asan: 0}
build-2404-clang:
name: Build | ${{ matrix.os }} | ${{ matrix.cc }}${{ matrix.asan && ' | asan' || '' }}
name: Build | 24.04 | clang
uses: ./.github/workflows/reusable-build.yml
with:
cc: clang
runs-on: ubuntu-24.04
sha: ${{ github.sha }}
os: ${{ matrix.os }}
os-name: linux
cc: ${{ matrix.cc }}
dev-asan: ${{ matrix.asan }}
dev-gcov: 0
strategy:
fail-fast: false
matrix:
include:
- {os: ubuntu-24.04, cc: clang, asan: 1}
build-2204-gcc:
name: Build | ${{ matrix.os }} | ${{ matrix.cc }}${{ matrix.asan && ' | asan' || '' }}
name: Build | 22.04 | gcc
uses: ./.github/workflows/reusable-build.yml
with:
cc: gcc
runs-on: ubuntu-22.04
sha: ${{ github.sha }}
os: ${{ matrix.os }}
os-name: linux
cc: ${{ matrix.cc }}
dev-asan: ${{ matrix.asan }}
dev-gcov: 0
strategy:
fail-fast: false
matrix:
include:
- {os: ubuntu-22.04, cc: gcc, asan: 0}
build-2204-clang:
name: Build | ${{ matrix.os }} | ${{ matrix.cc }}${{ matrix.asan && ' | asan' || '' }}
build-macos-15-clang:
name: Build | macos-15 | clang
uses: ./.github/workflows/reusable-build.yml
with:
cc: clang
runs-on: macos-15
sha: ${{ github.sha }}
os: ${{ matrix.os }}
os-name: linux
cc: ${{ matrix.cc }}
dev-asan: ${{ matrix.asan }}
dev-gcov: 0
strategy:
fail-fast: false
matrix:
include:
- {os: ubuntu-22.04, cc: clang, asan: 0}
build-osx-gcc:
name: Build | ${{ matrix.os }} | ${{ matrix.cc }}${{ matrix.asan && ' | asan' || '' }}
uses: ./.github/workflows/reusable-build.yml
with:
sha: ${{ github.sha }}
os: ${{ matrix.os }}
os-name: osx
cc: ${{ matrix.cc }}
dev-asan: ${{ matrix.asan }}
dev-gcov: 0
strategy:
fail-fast: false
matrix:
include:
- {os: macos-15, cc: gcc, asan: 0}
build-osx-clang:
name: Build | ${{ matrix.os }} | ${{ matrix.cc }}${{ matrix.asan && ' | asan' || '' }}
uses: ./.github/workflows/reusable-build.yml
with:
sha: ${{ github.sha }}
os: ${{ matrix.os }}
os-name: osx
cc: ${{ matrix.cc }}
dev-asan: ${{ matrix.asan }}
dev-gcov: 0
strategy:
fail-fast: false
matrix:
include:
- {os: macos-15, cc: clang, asan: 0}
build-windows:
name: Build | ${{ matrix.os }} | ${{ matrix.cc }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- {os: windows-2025, cc: msvc}
env:
CI_OS_NAME: win
CCACHE_COMPRESS: 1
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_LIMIT_MULTIPLE: 0.95
name: Build | windows-2025-vs2026 | msvc
runs-on: windows-2025-vs2026
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
path: repo
- name: Cache $CCACHE_DIR
uses: actions/cache@v4
- name: Cache win_flex_bison
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v5
with:
path: ${{ env.CCACHE_DIR }}
key: msbuild-msvc-cmake
path: ${{ github.workspace }}/win_flex_bison
key: win_flex_bison
- name: compile
env:
WIN_FLEX_BISON: ${{ github.workspace }}/.ccache
run: ./ci/ci-win-compile.ps1
- name: test build
run: ./ci/ci-win-test.ps1
- name: Zip up repository
run: Compress-Archive -LiteralPath install -DestinationPath verilator.zip
- name: Upload zip archive
uses: actions/upload-artifact@v5
with:
path: ${{ github.workspace }}/repo/verilator.zip
name: verilator-win.zip
test-2604-gcc:
name: Test | 26.04 | gcc | ${{ matrix.suite }}
needs: build-2604-gcc
uses: ./.github/workflows/reusable-test.yml
with:
archive: ${{ needs.build-2604-gcc.outputs.archive }}
cc: gcc
runs-on: ubuntu-26.04
suite: ${{ matrix.suite }}
strategy:
fail-fast: false
matrix:
suite: [dist-vlt-0, dist-vlt-1, dist-vlt-2, dist-vlt-3, vltmt-0, vltmt-1, vltmt-2]
test-2604-clang:
name: Test | 26.04 | clang | ${{ matrix.suite }}
needs: build-2604-clang
uses: ./.github/workflows/reusable-test.yml
with:
archive: ${{ needs.build-2604-clang.outputs.archive }}
cc: clang
runs-on: ubuntu-26.04
suite: ${{ matrix.suite }}
strategy:
fail-fast: false
matrix:
suite: [dist-vlt-0, dist-vlt-1, dist-vlt-2, dist-vlt-3, vltmt-0, vltmt-1, vltmt-2]
test-2404-gcc:
name: Test | ${{ matrix.os }} | ${{ matrix.cc }} | ${{ matrix.reloc && 'reloc | ' || '' }} ${{ matrix.suite }}
name: Test | 24.04 | gcc | ${{ matrix.suite }}
needs: build-2404-gcc
uses: ./.github/workflows/reusable-test.yml
with:
archive: ${{ needs.build-2404-gcc.outputs.archive }}
os: ${{ matrix.os }}
cc: ${{ matrix.cc }}
reloc: ${{ matrix.reloc }}
cc: gcc
runs-on: ubuntu-24.04
suite: ${{ matrix.suite }}
dev-gcov: 0
strategy:
fail-fast: false
matrix:
include:
# Ubuntu 24.04 gcc
- {os: ubuntu-24.04, cc: gcc, reloc: 0, suite: dist-vlt-0}
- {os: ubuntu-24.04, cc: gcc, reloc: 0, suite: dist-vlt-1}
- {os: ubuntu-24.04, cc: gcc, reloc: 0, suite: dist-vlt-2}
- {os: ubuntu-24.04, cc: gcc, reloc: 0, suite: dist-vlt-3}
- {os: ubuntu-24.04, cc: gcc, reloc: 0, suite: vltmt-0}
- {os: ubuntu-24.04, cc: gcc, reloc: 0, suite: vltmt-1}
- {os: ubuntu-24.04, cc: gcc, reloc: 0, suite: vltmt-2}
suite: [dist-vlt-0, dist-vlt-1, dist-vlt-2, dist-vlt-3, vltmt-0, vltmt-1, vltmt-2]
test-2404-clang:
name: Test | ${{ matrix.os }} | ${{ matrix.cc }} | ${{ matrix.reloc && 'reloc | ' || '' }} ${{ matrix.suite }}
name: Test | 24.04 | clang | ${{ matrix.suite }}
needs: build-2404-clang
uses: ./.github/workflows/reusable-test.yml
with:
archive: ${{ needs.build-2404-clang.outputs.archive }}
os: ${{ matrix.os }}
cc: ${{ matrix.cc }}
reloc: ${{ matrix.reloc }}
cc: clang
reloc: true # Test with relocated installation
runs-on: ubuntu-24.04
suite: ${{ matrix.suite }}
dev-gcov: 0
strategy:
fail-fast: false
matrix:
include:
# Ubuntu 24.04 clang
- {os: ubuntu-24.04, cc: clang, reloc: 0, suite: dist-vlt-0}
- {os: ubuntu-24.04, cc: clang, reloc: 0, suite: dist-vlt-1}
- {os: ubuntu-24.04, cc: clang, reloc: 0, suite: dist-vlt-2}
- {os: ubuntu-24.04, cc: clang, reloc: 0, suite: dist-vlt-3}
- {os: ubuntu-24.04, cc: clang, reloc: 0, suite: vltmt-0}
- {os: ubuntu-24.04, cc: clang, reloc: 0, suite: vltmt-1}
- {os: ubuntu-24.04, cc: clang, reloc: 0, suite: vltmt-2}
suite: [dist-vlt-0, dist-vlt-1, dist-vlt-2, dist-vlt-3, vltmt-0, vltmt-1, vltmt-2]
test-2204-gcc:
name: Test | ${{ matrix.os }} | ${{ matrix.cc }} | ${{ matrix.reloc && 'reloc | ' || '' }} ${{ matrix.suite }}
name: Test | 22.04 | gcc | ${{ matrix.suite }}
needs: build-2204-gcc
uses: ./.github/workflows/reusable-test.yml
with:
archive: ${{ needs.build-2204-gcc.outputs.archive }}
os: ${{ matrix.os }}
cc: ${{ matrix.cc }}
reloc: ${{ matrix.reloc }}
cc: gcc
runs-on: ubuntu-22.04
suite: ${{ matrix.suite }}
dev-gcov: 0
strategy:
fail-fast: false
matrix:
include:
# Ubuntu 22.04 gcc
- {os: ubuntu-22.04, cc: gcc, reloc: 0, suite: dist-vlt-0}
- {os: ubuntu-22.04, cc: gcc, reloc: 0, suite: dist-vlt-1}
- {os: ubuntu-22.04, cc: gcc, reloc: 0, suite: dist-vlt-2}
- {os: ubuntu-22.04, cc: gcc, reloc: 0, suite: dist-vlt-3}
- {os: ubuntu-22.04, cc: gcc, reloc: 0, suite: vltmt-0}
- {os: ubuntu-22.04, cc: gcc, reloc: 0, suite: vltmt-1}
- {os: ubuntu-22.04, cc: gcc, reloc: 0, suite: vltmt-2}
test-2204-clang:
name: Test | ${{ matrix.os }} | ${{ matrix.cc }} | ${{ matrix.reloc && 'reloc | ' || '' }} ${{ matrix.suite }}
needs: build-2204-clang
uses: ./.github/workflows/reusable-test.yml
with:
archive: ${{ needs.build-2204-clang.outputs.archive }}
os: ${{ matrix.os }}
cc: ${{ matrix.cc }}
reloc: ${{ matrix.reloc }}
suite: ${{ matrix.suite }}
dev-gcov: 0
strategy:
fail-fast: false
matrix:
include:
# Ubuntu 22.04 clang, also test relocation
- {os: ubuntu-22.04, cc: clang, reloc: 1, suite: dist-vlt-0}
- {os: ubuntu-22.04, cc: clang, reloc: 1, suite: dist-vlt-1}
- {os: ubuntu-22.04, cc: clang, reloc: 1, suite: dist-vlt-2}
- {os: ubuntu-22.04, cc: clang, reloc: 1, suite: dist-vlt-3}
- {os: ubuntu-22.04, cc: clang, reloc: 1, suite: vltmt-0}
- {os: ubuntu-22.04, cc: clang, reloc: 1, suite: vltmt-1}
- {os: ubuntu-22.04, cc: clang, reloc: 1, suite: vltmt-2}
suite: [dist-vlt-0, dist-vlt-1, dist-vlt-2, dist-vlt-3, vltmt-0, vltmt-1, vltmt-2]
lint-py:
name: Lint Python
uses: ./.github/workflows/reusable-lint-py.yml
passed:
name: Test suite passed
if: always()
needs:
- build-2404-gcc
- build-2404-clang
- build-2204-gcc
- build-2204-clang
- build-osx-gcc
- build-osx-clang
- build-windows
- test-2404-gcc
- test-2404-clang
- test-2204-gcc
- test-2204-clang
- lint-py
runs-on: ubuntu-24.04
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
+1 -1
View File
@@ -16,5 +16,5 @@ jobs:
name: "'docs/CONTRIBUTORS' was signed"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- run: test_regress/t/t_dist_contributors.py
+33 -57
View File
@@ -13,6 +13,7 @@ on:
permissions:
contents: read
actions: read
defaults:
run:
@@ -38,15 +39,13 @@ jobs:
(github.event_name == 'workflow_dispatch')
uses: ./.github/workflows/reusable-build.yml
with:
cc: gcc
dev-gcov: true
runs-on: ubuntu-24.04
# For pull requests, build the head of the pull request branch, not the
# merge commit, otherwise patch coverage would include the changes
# between the root of the pull request and the target branch
sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
os: ubuntu-24.04
os-name: linux
cc: gcc
dev-asan: 0
dev-gcov: 1
test:
name: Test | ${{ matrix.test }}${{ matrix.num }}
@@ -54,11 +53,10 @@ jobs:
uses: ./.github/workflows/reusable-test.yml
with:
archive: ${{ needs.build.outputs.archive }}
os: ubuntu-24.04
cc: gcc
reloc: 0
dev-gcov: true
runs-on: ubuntu-24.04
suite: ${{ matrix.test }}${{ matrix.num }}
dev-gcov: 1
strategy:
fail-fast: false
matrix:
@@ -74,10 +72,10 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Download code coverage data
uses: actions/download-artifact@v6
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
pattern: code-coverage-*
path: obj_coverage
@@ -90,7 +88,7 @@ jobs:
find obj_coverage -type f | paste -sd, | sed "s/^/files=/" >> "$GITHUB_OUTPUT"
- name: Upload to codecov.io
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7
with:
disable_file_fixes: true
disable_search: true
@@ -106,25 +104,24 @@ jobs:
if: ${{ contains(needs.*.result, 'success') && !cancelled() }}
runs-on: ubuntu-24.04
steps:
- name: Install dependencies
run: |
echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null
sudo dpkg-reconfigure man-db
sudo apt install lcov
- name: Download repository archive
uses: actions/download-artifact@v6
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: ${{ needs.build.outputs.archive }}
path: ${{ github.workspace }}
- name: Unpack repository archive
run: |
tar -x -z -f ${{ needs.build.outputs.archive }}
tar --zstd -x -f ${{ needs.build.outputs.archive }}
ls -lsha
- name: Install dependencies
uses: ./repo/.github/actions/install-deps
with:
stage: coverage
- name: Download code coverage data
uses: actions/download-artifact@v6
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
pattern: code-coverage-*
path: repo/obj_coverage
@@ -135,51 +132,30 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: |
ls -lsha obj_coverage
# Combine reports from test jobs
nodist/fastcov.py -C obj_coverage/verilator-*.info --lcov -o obj_coverage/verilator.info
# For a PR, report patch coverage against the merge-base between the head of the PR and the target branch
ci/ci-coverage-report.bash \
${{ github.run_id }} \
"${{ github.event_name == 'pull_request' && github.event.number || '' }}" \
"${{ github.event.pull_request.base.sha }}" \
"${{ github.event.pull_request.head.sha }}"
# Create the report artifact. Note there is no report if the patch is empty.
mkdir ../report-artifact
[ ! -d obj_coverage/report ] || mv obj_coverage/report ../report-artifact/
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
COVERAGE_BASE=$(git rev-parse --short $(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}))
make coverage-report COVERAGE_BASE=${COVERAGE_BASE} |& tee ${{ github.workspace }}/make-coverage-report.log
else
make coverage-report
fi
# Remove data files
rm -f obj_coverage/verilator*.info
# Some extra work for PRs only
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
# Save PR number in report
echo ${{ github.event.number }} > obj_coverage/pr-number.txt
# Generate notification comment content
mkdir -p notification
echo ${{ github.event.number }} > notification/pr-number.txt
NUM=$(gh run view ${{ github.run_id }} --json number --jq ".number")
URL=$(gh run view ${{ github.run_id }} --json url --jq ".url")
echo "Patch coverage from PR workflow [#$NUM]($URL) (code coverage of lines changed relative to ${COVERAGE_BASE}):" > notification/body.txt
if [[ ! -f obj_coverage/empty-patch ]]; then
echo "<pre>" >> notification/body.txt
grep -E "(lines|branches)\.*:" ${{ github.workspace }}/make-coverage-report.log | sed "s/\.*:/:/" >> notification/body.txt || true
echo "</pre>" >> notification/body.txt
echo "Report: [${{ github.run_id }}](https://${{ github.repository_owner }}.github.io/verilator/coverage-reports/${{ github.run_id }}/index.html)" >> notification/body.txt
else
echo "Patch contains no code changes" >> notification/body.txt
fi
cat notification/body.txt
echo ${{ github.event.number }} > ../report-artifact/pr-number.txt
fi
- name: Upload report
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
path: repo/obj_coverage
path: report-artifact
name: coverage-report
- name: Upload notification
- name: Upload PR notification
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v5
uses: ./repo/.github/actions/upload-pr-notification
with:
path: repo/notification
name: coverage-pr-notification
key: coverage
# Create GitHub issue for failed scheduled jobs
# This should always be the last job (we want an issue if anything breaks)
@@ -192,9 +168,9 @@ jobs:
# Creating issues requires elevated privilege
- name: Generate access token
id: generate-token
uses: actions/create-github-app-token@v2.1.4
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
app-id: ${{ vars.VERILATOR_CI_ID }}
client-id: ${{ vars.VERILATOR_CI_ID }}
private-key: ${{ secrets.VERILATOR_CI_KEY }}
owner: verilator
repositories: verilator
+6 -6
View File
@@ -39,7 +39,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Extract context variables
run: |
@@ -54,7 +54,7 @@ jobs:
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6
with:
images: |
${{ vars.DOCKER_HUB_NAMESPACE }}/${{ env.image_name }}
@@ -64,21 +64,21 @@ jobs:
type=raw,value=latest,enable=${{ inputs.add_latest_tag == true }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4
with:
buildkitd-flags: --debug
- name: Login to Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and Push to Docker
uses: docker/build-push-action@v6
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
with:
context: ${{ env.build_context }}
+28 -15
View File
@@ -11,37 +11,50 @@ on:
permissions:
contents: write
defaults:
run:
working-directory: repo
jobs:
format:
runs-on: ubuntu-24.04
name: Ubuntu 24.04 | format
env:
CI_OS_NAME: linux
CI_RUNS_ON: ubuntu-24.04
CI_COMMIT: ${{ github.sha }}
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
path: repo
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install packages for build
env:
CI_BUILD_STAGE_NAME: build
uses: ./repo/.github/actions/install-deps
with:
stage: format
- name: Configure git identity
run: |
bash ci/ci-install.bash &&
sudo apt-get install clang-format-18 yapf3 &&
sudo pip3 install gersemi mbake &&
git config --global user.email "[email protected]" &&
git config --global user.email "[email protected]"
git config --global user.name "github action"
- name: Configure
run: |
autoconf
./configure
- name: Set up Python venv
uses: ./repo/.github/actions/setup-venv
with:
save: ${{ github.ref == 'refs/heads/master' }}
- name: Format code
run: |
autoconf &&
./configure &&
make -j 2 format CLANGFORMAT=clang-format-18 &&
source .venv/bin/activate
make -j 4 format CLANGFORMAT=clang-format-18
git status
- name: Push
run: |-
if [ -n "$(git status --porcelain)" ]; then
git commit . -m "Apply 'make format'" &&
git commit . -m "Apply 'make format' [ci skip]" &&
git push origin
fi
+15
View File
@@ -0,0 +1,15 @@
---
# Block PRs against stable branch
name: "Check PR not against 'stable'"
on:
pull_request:
branches: [stable]
jobs:
block-pr:
runs-on: ubuntu-latest
steps:
- name: Fail and block PR
run: |-
echo "Error: Pull requests directly to 'stable' are not allowed. Please PR against 'master'."
exit 1
+31 -20
View File
@@ -6,14 +6,11 @@ name: Pages
on:
push:
branches:
- master
paths:
- "ci/**"
- ".github/workflows"
branches: [master]
paths: ["ci/**", ".github/workflows/**"]
workflow_dispatch:
workflow_run:
workflows: ["Code coverage"]
workflows: ["Code coverage", "RTLMeter"]
types: [completed]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
@@ -25,8 +22,11 @@ permissions:
# Allow only one concurrent deployment, skipping runs queued between the run
# in-progress and latest queued. However, do NOT cancel in-progress runs as we
# want to allow these deployments to complete.
# A skipped-upstream run does no work (see the build job's if:), so put it in its
# own throwaway group: otherwise, as the newest queued run, it would cancel a
# pending real run and then deploy nothing.
concurrency:
group: "pages"
group: ${{ (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'skipped') && format('pages-skip-{0}', github.run_id) || 'pages' }}
cancel-in-progress: false
defaults:
@@ -37,21 +37,23 @@ jobs:
build:
name: Build content
runs-on: ubuntu-24.04
# A skipped upstream run (e.g. Code coverage / RTLMeter on a branch push)
# still fires workflow_run; don't rebuild and redeploy for it. deploy and
# notify need this job, so they cascade-skip too.
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion != 'skipped' }}
outputs:
coverage-pr-run-ids: ${{ steps.build.outputs.coverage-pr-run-ids }}
pr-run-ids: ${{ steps.build.outputs.pr-run-ids }}
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Build pages
id: build
env:
GH_TOKEN: ${{ github.token }}
run: |
bash -x ./ci/ci-pages.bash
ls -lsha
tree -L 3 pages
./ci/ci-pages.bash
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v4
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5
with:
path: pages
@@ -61,10 +63,17 @@ jobs:
runs-on: ubuntu-24.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
url: ${{ steps.deploy-2.outputs.page_url || steps.deploy-1.outputs.page_url }}
steps:
# GitHub's Pages backend intermittently fails a deployment mid-sync, retry
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
id: deploy-1
continue-on-error: true
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5
- name: Deploy to GitHub Pages (retry)
id: deploy-2
if: steps.deploy-1.outcome == 'failure'
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5
notify:
name: Notify
@@ -73,18 +82,20 @@ jobs:
if: ${{ github.repository == 'verilator/verilator' }}
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
# Use the Verilator CI app to post the comment
- name: Generate access token
id: generate-token
uses: actions/create-github-app-token@v2.1.4
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
app-id: ${{ vars.VERILATOR_CI_ID }}
client-id: ${{ vars.VERILATOR_CI_ID }}
private-key: ${{ secrets.VERILATOR_CI_KEY }}
permission-actions: write
permission-pull-requests: write
- name: Comment on PR
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
COVERAGE_PR_RUN_IDS: ${{ needs.build.outputs.coverage-pr-run-ids }}
run: bash -x ./ci/ci-pages-notify.bash
# Slug of the app the above token belongs to, see 'ci-pages-notify.bash'
GH_AUTHOR: ${{ steps.generate-token.outputs.app-slug }}
PR_RUN_IDS: ${{ needs.build.outputs.pr-run-ids }}
run: ./ci/ci-pages-notify.bash
+28
View File
@@ -0,0 +1,28 @@
---
# Build and push verilator docker image when tags are pushed to the repository.
# The following variable(s) must be configured in the github repository:
# DOCKER_HUB_NAMESPACE: docker hub namespace.
# The following secrets must be configured in the github repository:
# DOCKER_HUB_USER: user name for logging into docker hub
# DOCKER_HUB_ACCESS_TOKEN: docker hub access token.
name: Maintainance - PR conflict check
on:
workflow_dispatch:
push:
pull_request_target:
types: [synchronize]
permissions: {}
jobs:
main:
runs-on: ubuntu-26.04
permissions:
contents: read
pull-requests: write
steps:
- name: check if prs are dirty
uses: eps1lon/actions-label-merge-conflict@0273be72a0bbd58fcd71d0d6c02c209b50d1e5e1 # 3.1.0
with:
dirtyLabel: "pr-blocked: needs-rebase"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
+75 -42
View File
@@ -7,37 +7,47 @@ name: reusable-build
on:
workflow_call:
inputs:
cc:
description: "Compiler to use: 'gcc' or 'clang'"
required: true
type: string
ccwarn:
description: "Build Verilator with warnings treated as errors (--enable-ccwarn)"
required: false
default: true
type: boolean
dev-asan:
description: "Build Verilator with the address sanitizer (--enable-dev-asan)"
required: false
default: false
type: boolean
dev-gcov:
description: "Build Verilator with gcov instrumentation (--enable-dev-gcov)"
required: false
default: false
type: boolean
install:
description: "Archive the Verilator installation, not the repo tree"
required: false
default: false
type: boolean
runs-on:
description: "Runner to build on, e.g. ubuntu-24.04"
required: true
type: string
sha:
description: "Commit SHA to build"
required: true
type: string
os: # e.g. ubuntu-24.04
required: true
type: string
cc: # 'clang' or 'gcc'
required: true
type: string
os-name: # 'linux' or 'osx'
required: true
type: string
dev-asan:
required: true
type: number
dev-gcov:
required: true
type: number
outputs:
archive:
description: "Name of the built repository archive artifact"
description: "Name of the built archive artifact"
value: ${{ jobs.build.outputs.archive }}
env:
CI_OS_NAME: ${{ inputs.os-name }}
CCACHE_COMPRESS: 1
CACHE_BASE_KEY: build-${{ inputs.runs-on }}-${{ inputs.cc }}${{ inputs.ccwarn && '-ccwarn' || '' }}${{ inputs.dev-asan && '-asan' || '' }}${{ inputs.dev-gcov && '-gcov' || '' }}
CCACHE_COMPILERCHECK: content
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_LIMIT_MULTIPLE: 0.95
INSTALL_DIR: ${{ github.workspace }}/install
RELOC_DIR: ${{ github.workspace }}/relloc
defaults:
run:
@@ -48,52 +58,75 @@ jobs:
build:
name: Build
runs-on: ${{ inputs.os }}
runs-on: ${{ inputs.runs-on }}
outputs:
archive: ${{ steps.create-archive.outputs.archive }}
env:
CI_BUILD_STAGE_NAME: build
CI_DEV_ASAN: ${{ inputs.dev-asan }}
CI_DEV_GCOV: ${{ inputs.dev-gcov }}
CI_RUNS_ON: ${{ inputs.os }}
CXX: ${{ inputs.cc == 'clang' && 'clang++' || 'g++' }}
CACHE_BASE_KEY: build-${{ inputs.os }}-${{ inputs.cc }}
CCACHE_MAXSIZE: 1000M # Per build matrix entry (* 5 = 5000M in total)
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
path: repo
ref: ${{ inputs.sha }}
fetch-depth: ${{ inputs.dev-gcov && '0' || '1' }} # Coverage flow needs full history
# Coverage needs full history; install needs it for the 'git describe'
# behind 'verilator --version'
fetch-depth: ${{ (inputs.install || inputs.dev-gcov) && '0' || '1' }}
- name: Configure ccache
run: |
# ccache is unreliable on macOS, and does nothing with 'gcc --coverage'
if [ "${{ startsWith(inputs.runs-on, 'macos') }}" = true ] || [ "${{ inputs.dev-gcov }}" = true ]; then
echo "CCACHE_DISABLE=1" >> "$GITHUB_ENV"
fi
- name: Cache $CCACHE_DIR
uses: actions/cache@v4
if: ${{ env.CCACHE_DISABLE != '1' }}
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v5
env:
CACHE_KEY: ${{ env.CACHE_BASE_KEY }}-ccache
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ env.CACHE_KEY }}-${{ inputs.sha }}
restore-keys: |
${{ env.CACHE_KEY }}-
${{ env.CACHE_KEY }}
- name: Install packages for build
run: ./ci/ci-install.bash
uses: ./repo/.github/actions/install-deps
with:
stage: build
- name: Build
run: ./ci/ci-script.bash
run: |
./ci/ci-build.bash \
--prefix ${{ github.workspace }}/install \
--compiler ${{ inputs.cc }} \
--light-debug \
${{ inputs.ccwarn && '--ccwarn' || '' }} \
${{ inputs.dev-asan && '--asan' || '' }} \
${{ inputs.dev-gcov && '--gcov' || '' }}
- name: Create repository archive
- name: Install
if: ${{ inputs.install }}
run: make install
- name: Create archive
id: create-archive
working-directory: ${{ github.workspace }}
run: |
# Name of the archive must be unique based on the build parameters
ARCHIVE=verilator-${{ inputs.sha }}-${{ inputs.os }}-${{ inputs.cc }}-${{ inputs.dev-asan }}-${{ inputs.dev-gcov }}.tar.gz
tar --posix -c -z -f $ARCHIVE repo
# Archive name, unique per build; flavour tags mark non-default builds
ARCHIVE="verilator-${{ inputs.sha }}-${{ inputs.runs-on }}-${{ inputs.cc }}"
ARCHIVE="$ARCHIVE${{ inputs.ccwarn && '-ccwarn' || '' }}"
ARCHIVE="$ARCHIVE${{ inputs.dev-asan && '-asan' || '' }}"
ARCHIVE="$ARCHIVE${{ inputs.dev-gcov && '-gcov' || '' }}"
ARCHIVE="$ARCHIVE.tar.zst"
# zstd compresses faster than gzip and decompresses far faster in the many downstream jobs
ZSTD_NBTHREADS=0 tar --posix --zstd -c -f "$ARCHIVE" ${{ inputs.install && 'install' || 'repo' }}
echo "archive=$ARCHIVE" >> "$GITHUB_OUTPUT"
- name: Upload repository archive
uses: actions/upload-artifact@v5
- name: Upload archive
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
path: ${{ github.workspace }}/${{ steps.create-archive.outputs.archive }}
name: ${{ steps.create-archive.outputs.archive }}
overwrite: true
# Archive is already zstd-compressed; skip upload-artifact's zip pass
compression-level: 0
+16 -18
View File
@@ -7,14 +7,6 @@ name: reusable-lint-py
on:
workflow_call:
env:
CI_OS_NAME: linux
CI_BUILD_STAGE_NAME: build
CI_RUNS_ON: ubuntu-22.04
CCACHE_COMPRESS: 1
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_LIMIT_MULTIPLE: 0.95
defaults:
run:
shell: bash
@@ -27,20 +19,26 @@ jobs:
name: Sub-lint | Python
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
path: repo
- name: Install packages for build
run: ./ci/ci-install.bash
# We use specific version numbers, otherwise a Python package
# update may add a warning and break our build
- name: Install packages for lint
run: sudo pip3 install mypy==1.18.2 pylint==3.0.2 ruff==0.1.3 clang sphinx sphinx_rtd_theme sphinxcontrib-spelling breathe ruff
- name: Install dependencies
uses: ./repo/.github/actions/install-deps
with:
stage: lint-py
- name: Configure
run: autoconf && ./configure --enable-longtests --enable-ccwarn
run: |
autoconf
./configure --enable-longtests --enable-ccwarn
- name: Set up Python venv
uses: ./repo/.github/actions/setup-venv
with:
save: ${{ github.ref == 'refs/heads/master' }}
- name: Lint
run: make -k lint-py
run: |-
source .venv/bin/activate
make -k lint-py
@@ -1,75 +0,0 @@
---
# DESCRIPTION: Github actions config
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
name: reusable-rtlmeter-build
on:
workflow_call:
inputs:
runs-on:
description: "Runner to use, e.g.: ubuntu-24.04"
type: string
required: true
cc:
description: "Compiler to use: 'gcc' or 'clang'"
type: string
required: true
defaults:
run:
shell: bash
env:
CCACHE_DIR: ${{ github.workspace }}/ccache
CCACHE_MAXSIZE: 512M
jobs:
build:
runs-on: ${{ inputs.runs-on }}
name: Build
steps:
- name: Install dependencies
run: |
echo "path-exclude /usr/share/doc/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
echo "path-exclude /usr/share/man/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
echo "path-exclude /usr/share/info/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
sudo apt update
sudo apt install ccache mold help2man libfl-dev libgoogle-perftools-dev libsystemc-dev
- name: Use saved ccache
uses: actions/cache@v4
with:
path: ccache
key: rtlmeter-build-ccache-${{ inputs.runs-on }}-${{ inputs.cc }}-${{ github.run_id }}-${{ github.run_attempt }}
restore-keys: rtlmeter-build-ccache-${{ inputs.runs-on }}-${{ inputs.cc }}
- name: Checkout
uses: actions/checkout@v5
with:
path: repo
fetch-depth: 0 # Required for 'git describe' used for 'verilator --version'
- name: Configure
working-directory: repo
run: |
autoconf
./configure --prefix=${{ github.workspace }}/install CXX=${{ inputs.cc == 'clang' && 'clang++' || 'g++' }}
- name: Make
working-directory: repo
run: make -j $(nproc)
- name: Install
working-directory: repo
run: make install
- name: Tar up installation
run: tar --posix -c -z -f verilator-rtlmeter.tar.gz install
- name: Upload Verilator installation archive
uses: actions/upload-artifact@v5
with:
path: verilator-rtlmeter.tar.gz
name: verilator-rtlmeter-${{ inputs.runs-on }}-${{ inputs.cc }}
overwrite: true
+107 -34
View File
@@ -19,6 +19,15 @@ on:
description: "Compiler to use: 'gcc' or 'clang'"
type: string
required: true
verilator-archive-new:
description: "Name of the installation archive artifact from reusable-build, new version"
type: string
required: true
verilator-archive-old:
description: "Name of the installation archive artifact from reusable-build, old version"
type: string
required: false
default: ""
# Note: The combination of 'cases' and 'run-name' must be unique for all
# invocations of this workflow within a run of the parent workflow.
# These two are used together to generate a unique results file name.
@@ -44,8 +53,8 @@ defaults:
shell: bash
env:
CCACHE_DIR: ${{ github.workspace }}/ccache
CCACHE_MAXSIZE: 512M
# RTLMeter measures compile/execute times, so caching must stay off to keep
# timings representative; ccache is still on PATH but acts as a pass-through
CCACHE_DISABLE: 1
jobs:
@@ -53,34 +62,21 @@ jobs:
runs-on: ${{ inputs.runs-on }}
name: Run
steps:
- name: Checkout Verilator CI scripts
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
path: repo
sparse-checkout: |
.github/actions
ci
- name: Install dependencies
run: |
echo "path-exclude /usr/share/doc/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
echo "path-exclude /usr/share/man/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
echo "path-exclude /usr/share/info/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
sudo apt update
sudo apt install ccache mold libfl-dev libgoogle-perftools-dev libsystemc-dev
- name: Download Verilator installation archive
uses: actions/download-artifact@v6
uses: ./repo/.github/actions/install-deps
with:
name: verilator-rtlmeter-${{ inputs.runs-on }}-${{ inputs.cc }}
- name: Unpack Verilator installation archive
run: |
tar -x -z -f verilator-rtlmeter.tar.gz
echo "${{ github.workspace }}/install/bin" >> $GITHUB_PATH
- name: Use saved ccache
if: ${{ env.CCACHE_DISABLE == 0 }}
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: rtlmeter-run-ccache-${{ inputs.runs-on }}-${{ inputs.cc }}-${{ inputs.cases }}-${{ inputs.compileArgs }}-${{ github.run_id }}-${{ github.run_attempt }}
restore-keys: rtlmeter-run-ccache-${{ inputs.runs-on }}-${{ inputs.cc }}-${{ inputs.cases }}-${{ inputs.compileArgs }}
stage: rtlmeter-run
- name: Checkout RTLMeter
uses: actions/checkout@v5
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: "verilator/rtlmeter"
path: rtlmeter
@@ -89,40 +85,117 @@ jobs:
working-directory: rtlmeter
run: make venv
- name: Compile cases
########################################################################
# Run with new Verilator
########################################################################
- name: Download Verilator installation archive - new
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: ${{ inputs.verilator-archive-new }}
- name: Unpack Verilator installation archive - new
run: |
tar --zstd -x -f ${{ inputs.verilator-archive-new }}
mv install verilator-new
- name: Compile cases - new
working-directory: rtlmeter
run: |
export PATH="${{ github.workspace }}/verilator-new/bin:$PATH"
./rtlmeter run --timeout 60 --verbose --cases='${{inputs.cases}}' --compileArgs='${{inputs.compileArgs}}' --executeArgs='${{inputs.executeArgs}}' --nExecute=0
ccache -svv
- name: Execute cases
- name: Execute cases - new
working-directory: rtlmeter
continue-on-error: true # Do not fail on error, so we can at least save the successful results
run: |
export PATH="${{ github.workspace }}/verilator-new/bin:$PATH"
./rtlmeter run --timeout 60 --verbose --cases='${{inputs.cases}}' --compileArgs='${{inputs.compileArgs}}' --executeArgs='${{inputs.executeArgs}}'
- name: Collate results
- name: Collate results - new
id: results
working-directory: rtlmeter
run: |
export PATH="${{ github.workspace }}/verilator-new/bin:$PATH"
# Use 'inputs.cases' and 'inputs.run-name' to generate a unique file name
hash=$(md5sum <<< '${{ inputs.cases }} ${{ inputs.run-name }}' | awk '{print $1}')
echo "hash=${hash}" >> $GITHUB_OUTPUT
./rtlmeter collate --runName "${{ inputs.run-name }}" > ../results-${hash}.json
- name: Report results
- name: Report results - new
working-directory: rtlmeter
run: |
export PATH="${{ github.workspace }}/verilator-new/bin:$PATH"
./rtlmeter report --steps '*' --metrics '*' ../results-${{ steps.results.outputs.hash }}.json
- name: Upload results
uses: actions/upload-artifact@v5
- name: Upload results - new
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
path: results-${{ steps.results.outputs.hash }}.json
name: rtlmeter-${{ inputs.tag }}-results-${{ steps.results.outputs.hash }}
overwrite: true
retention-days: 2
- name: Report status
- name: Report status - new
working-directory: rtlmeter
run: | # This will fail the job if any of the runs failed
run: |- # This will fail the job if any of the runs failed
export PATH="${{ github.workspace }}/verilator-new/bin:$PATH"
./rtlmeter run --verbose --cases='${{inputs.cases}}' --compileArgs='${{inputs.compileArgs}}' --executeArgs='${{inputs.executeArgs}}'
# Clean up for run with old version
rm -rf work
rm -rf ${{ github.workspace }}/verilator-new
########################################################################
# Run with old Verilator **on same machine for consistency**
########################################################################
- name: Download Verilator installation archive - old
if: ${{ inputs.verilator-archive-old != '' }}
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: ${{ inputs.verilator-archive-old }}
- name: Unpack Verilator installation archive - old
if: ${{ inputs.verilator-archive-old != '' }}
run: |
tar --zstd -x -f ${{ inputs.verilator-archive-old }}
mv install verilator-old
- name: Compile cases - old
if: ${{ inputs.verilator-archive-old != '' }}
working-directory: rtlmeter
run: |
export PATH="${{ github.workspace }}/verilator-old/bin:$PATH"
./rtlmeter run --timeout 60 --verbose --cases='${{inputs.cases}}' --compileArgs='${{inputs.compileArgs}}' --executeArgs='${{inputs.executeArgs}}' --nExecute=0
ccache -svv
- name: Execute cases - old
if: ${{ inputs.verilator-archive-old != '' }}
working-directory: rtlmeter
run: |
export PATH="${{ github.workspace }}/verilator-old/bin:$PATH"
./rtlmeter run --timeout 60 --verbose --cases='${{inputs.cases}}' --compileArgs='${{inputs.compileArgs}}' --executeArgs='${{inputs.executeArgs}}'
- name: Collate results - old
if: ${{ inputs.verilator-archive-old != '' }}
working-directory: rtlmeter
run: |
export PATH="${{ github.workspace }}/verilator-old/bin:$PATH"
./rtlmeter collate --runName "${{ inputs.run-name }}" > ../reference-${{ steps.results.outputs.hash }}.json
- name: Report results - old
if: ${{ inputs.verilator-archive-old != '' }}
working-directory: rtlmeter
run: |
export PATH="${{ github.workspace }}/verilator-old/bin:$PATH"
./rtlmeter report --steps '*' --metrics '*' ../reference-${{ steps.results.outputs.hash }}.json
- name: Upload results - old
if: ${{ inputs.verilator-archive-old != '' }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
path: reference-${{ steps.results.outputs.hash }}.json
name: rtlmeter-${{ inputs.tag }}-reference-${{ steps.results.outputs.hash }}
overwrite: true
retention-days: 2
+68 -39
View File
@@ -11,29 +11,37 @@ on:
description: "Name of the repository archive artifact from reusable-build"
required: true
type: string
os: # e.g. ubuntu-24.04
required: true
type: string
cc: # gcc or clang
required: true
type: string
reloc: # 0 or 1
required: true
type: number
suite: # e.g. dist-vlt-0
cc:
description: "Compiler to use: 'gcc' or 'clang'"
required: true
type: string
dev-gcov:
description: "Collect gcov coverage data from the test run"
required: false
default: false
type: boolean
reloc:
description: "Relocate the installation before testing"
required: false
default: false
type: boolean
runs-on:
description: "Runner to test on, e.g. ubuntu-24.04"
required: true
type: number
type: string
suite:
description: "Test suite to run, e.g. dist-vlt-0"
required: true
type: string
permissions:
contents: read
actions: read
env:
CI_OS_NAME: linux
CCACHE_COMPRESS: 1
CCACHE_COMPILERCHECK: content
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_LIMIT_MULTIPLE: 0.95
INSTALL_DIR: ${{ github.workspace }}/install
RELOC_DIR: ${{ github.workspace }}/relloc
CXX: ${{ inputs.cc == 'clang' && 'clang++' || 'g++' }}
defaults:
run:
@@ -43,19 +51,12 @@ defaults:
jobs:
test:
runs-on: ${{ inputs.os }}
runs-on: ${{ inputs.runs-on }}
name: Test
env:
CI_BUILD_STAGE_NAME: test
CI_RUNS_ON: ${{ inputs.os }}
CI_RELOC: ${{inputs.reloc }}
CXX: ${{ inputs.cc == 'clang' && 'clang++' || 'g++' }}
CACHE_BASE_KEY: test-${{ inputs.os }}-${{ inputs.cc }}-${{inputs.reloc }}-${{ inputs.suite }}
CCACHE_MAXSIZE: 100M # Per build per suite (* 5 * 5 = 2500M in total)
steps:
- name: Download repository archive
uses: actions/download-artifact@v6
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: ${{ inputs.archive }}
path: ${{ github.workspace }}
@@ -63,28 +64,44 @@ jobs:
- name: Unpack repository archive
working-directory: ${{ github.workspace }}
run: |
tar -x -z -f ${{ inputs.archive }}
tar --zstd -x -f ${{ inputs.archive }}
ls -lsha
- name: Cache $CCACHE_DIR
uses: actions/cache@v4
env:
CACHE_KEY: ${{ env.CACHE_BASE_KEY }}-ccache2
- name: Configure ccache
run: |
# ccache is unreliable on macOS, and does nothing with 'gcc --coverage'
if [ "${{ startsWith(inputs.runs-on, 'macos') }}" = true ] || [ "${{ inputs.dev-gcov }}" = true ]; then
echo "CCACHE_DISABLE=1" >> "$GITHUB_ENV"
fi
# Test-job ccache is stored as an artifact, not actions/cache
- name: Restore ccache
id: ccache
if: ${{ env.CCACHE_DISABLE != '1' }}
uses: ./repo/.github/actions/artifact-cache
with:
mode: restore
path: ${{ env.CCACHE_DIR }}
key: ${{ env.CACHE_KEY }}-${{ github.sha }}
restore-keys: |
${{ env.CACHE_KEY }}-
key: ccache-${{ inputs.runs-on }}-${{ inputs.cc }}-${{ inputs.suite }}
- name: Install test dependencies
run: ./ci/ci-install.bash
uses: ./repo/.github/actions/install-deps
with:
stage: test
- name: Set up Python venv
uses: ./repo/.github/actions/setup-venv
with:
save: ${{ github.ref == 'refs/heads/master' }}
- name: Test
id: run-test
continue-on-error: true
env:
TESTS: ${{ inputs.suite }}
run: ./ci/ci-script.bash
run: |
source .venv/bin/activate
./ci/ci-test.bash \
--suite ${{ inputs.suite }} \
${{ inputs.reloc && format('--reloc {0}/reloc', github.workspace) || '' }}
- name: Combine code coverage data
if: ${{ inputs.dev-gcov }}
@@ -95,11 +112,23 @@ jobs:
- name: Upload code coverage data
if: ${{ inputs.dev-gcov }}
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
path: ${{ github.workspace }}/repo/obj_coverage/verilator-${{ inputs.suite }}.info
name: code-coverage-${{ inputs.suite }}
- name: Save ccache
if: ${{ env.CCACHE_DISABLE != '1' && !cancelled() }}
uses: ./repo/.github/actions/artifact-cache
with:
mode: save
path: ${{ env.CCACHE_DIR }}
key: ${{ steps.ccache.outputs.key }}
# Keep master's cache around longer; PR/branch caches churn faster
retention-days: ${{ github.ref == 'refs/heads/master' && 7 || 3 }}
- name: Fail job if a test failed
if: ${{ steps.run-test.outcome == 'failure' && !cancelled() }}
run: exit 1
run: |-
echo "Click on '> Tests' arrow above (or on other steps), to expand it, and see the failure reasons"
exit 1
-48
View File
@@ -1,48 +0,0 @@
---
# DESCRIPTION: Github actions config
# This name is key to badges in README.rst, so we use the name build
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
name: RTLMeter PR results
on:
workflow_run:
workflows: [RTLMeter]
types: [completed]
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }}
permissions:
actions: read
pull-requests: write
steps:
- name: Download report
uses: actions/download-artifact@v6
with:
name: rtlmeter-pr-results
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Download PR number
uses: actions/download-artifact@v6
with:
name: pr-number
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
# Use the Verilator CI app to post the comment
- name: Generate access token
id: generate-token
uses: actions/[email protected]
with:
app-id: ${{ vars.VERILATOR_CI_ID }}
private-key: ${{ secrets.VERILATOR_CI_KEY }}
permission-pull-requests: write
- name: Comment on PR
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |-
ls -la
cat report.txt
gh pr --repo ${{ github.repository }} comment $(cat pr-number.txt) --body-file report.txt
+206 -205
View File
@@ -11,6 +11,8 @@ on:
- cron: '0 2 * * *' # Daily, starting at 02:00 UTC
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
push:
branches: ['ci-rtlmeter/**']
permissions:
contents: read
@@ -35,181 +37,240 @@ jobs:
&& vars.ENABLE_SCHEDULED_JOBS == 'true') ||
(github.event_name == 'pull_request'
&& contains(github.event.pull_request.labels.*.name, 'pr: rtlmeter')) ||
(github.event_name == 'workflow_dispatch')
(github.event_name == 'workflow_dispatch') ||
(github.event_name == 'push')
runs-on: ubuntu-24.04
outputs:
old-sha: ${{ steps.start.outputs.old-sha }}
cases: ${{ steps.cases.outputs.cases }}
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Startup
run: echo
id: start
env:
GH_TOKEN: ${{ github.token }}
run: |
[[ "${{ github.event_name }}" == 'pull_request' ]] || exit 0
# For a pull request, 'github.sha' is the test merge commit. Its
# first parent is the target branch commit it was merged with for this run.
OLD_SHA="$(gh api "repos/${{ github.repository }}/commits/${{ github.sha }}" --jq '.parents[0].sha')"
echo "old-sha=$OLD_SHA" >> "$GITHUB_OUTPUT"
build-gcc:
name: Build GCC
- name: Load RTLMeter cases
id: cases
run: echo "cases=$(ci/ci-rtlmeter-cases.py --event-name ${{ github.event_name }})" >> "$GITHUB_OUTPUT"
build-gcc-new:
name: Build New Verilator - GCC
needs: start
uses: ./.github/workflows/reusable-rtlmeter-build.yml
uses: ./.github/workflows/reusable-build.yml
with:
runs-on: ubuntu-24.04
cc: gcc
build-clang:
name: Build Clang
needs: start
uses: ./.github/workflows/reusable-rtlmeter-build.yml
with:
ccwarn: false
install: true
runs-on: ubuntu-24.04
sha: ${{ github.sha }}
build-clang-new:
name: Build New Verilator - Clang
needs: start
uses: ./.github/workflows/reusable-build.yml
with:
cc: clang
ccwarn: false
install: true
runs-on: ubuntu-24.04
sha: ${{ github.sha }}
build-gcc-old:
name: Build Old Verilator - GCC
needs: start
if: ${{ needs.start.outputs.old-sha != '' }}
uses: ./.github/workflows/reusable-build.yml
with:
cc: gcc
ccwarn: false
install: true
runs-on: ubuntu-24.04
sha: ${{ needs.start.outputs.old-sha }}
build-clang-old:
name: Build Old Verilator - Clang
needs: start
if: ${{ needs.start.outputs.old-sha != '' }}
uses: ./.github/workflows/reusable-build.yml
with:
cc: clang
ccwarn: false
install: true
runs-on: ubuntu-24.04
sha: ${{ needs.start.outputs.old-sha }}
run-gcc:
name: Run GCC | ${{ matrix.cases }}
needs: build-gcc
needs:
- start
- build-gcc-new
- build-gcc-old
# Run even if 'build-*-old' was skipped (no old SHA), but not if any
# dependency failed, the workflow was cancelled, or 'start' was skipped
# (e.g. the workflow was not enabled, so there is nothing to run against).
if: ${{ !failure() && !cancelled() && needs.start.result == 'success' }}
uses: ./.github/workflows/reusable-rtlmeter-run.yml
with:
tag: gcc
runs-on: ubuntu-24.04
cc: gcc
verilator-archive-new: ${{ needs.build-gcc-new.outputs.archive }}
verilator-archive-old: ${{ needs.build-gcc-old.outputs.archive }}
cases: ${{ matrix.cases }}
run-name: "gcc"
compileArgs: ""
executeArgs: ""
strategy:
fail-fast: false
max-parallel: ${{ github.event == 'schedule' && 2 || 7 }}
fail-fast: ${{ github.event_name == 'pull_request' }}
max-parallel: 7
matrix:
cases:
- "BlackParrot:1x1:*"
- "BlackParrot:2x2:*"
- "BlackParrot:4x4:*"
- "NVDLA:*"
- "OpenPiton:1x1:*"
- "OpenPiton:2x2:*"
- "OpenPiton:4x4:*"
- "OpenTitan:*"
- "VeeR-EH1:asic*"
- "VeeR-EH1:default*"
- "VeeR-EH1:hiperf*"
- "VeeR-EH2:asic*"
- "VeeR-EH2:default*"
- "VeeR-EH2:hiperf*"
- "VeeR-EL2:asic*"
- "VeeR-EL2:default*"
- "VeeR-EL2:hiperf*"
- "Vortex:mini:*"
- "Vortex:sane:*"
- "XiangShan:default-chisel3:* !*:linux"
- "XiangShan:default-chisel6:* !*:linux"
- "XiangShan:mini-chisel3:* !*:linux"
- "XiangShan:mini-chisel6:* !*:linux"
- "XuanTie-E902:*"
- "XuanTie-E906:*"
- "XuanTie-C906:*"
- "XuanTie-C910:*"
cases: ${{ fromJSON(needs.start.outputs.cases)['gcc'] }}
run-clang:
name: Run Clang | ${{ matrix.cases }}
needs: build-clang
needs:
- start
- build-clang-new
- build-clang-old
# Run even if 'build-*-old' was skipped (no old SHA), but not if any
# dependency failed, the workflow was cancelled, or 'start' was skipped
# (e.g. the workflow was not enabled, so there is nothing to run against).
if: ${{ !failure() && !cancelled() && needs.start.result == 'success' }}
uses: ./.github/workflows/reusable-rtlmeter-run.yml
with:
tag: clang
runs-on: ubuntu-24.04
cc: clang
verilator-archive-new: ${{ needs.build-clang-new.outputs.archive }}
verilator-archive-old: ${{ needs.build-clang-old.outputs.archive }}
cases: ${{ matrix.cases }}
run-name: "clang --threads 4"
compileArgs: "--threads 4"
executeArgs: ""
strategy:
fail-fast: false
max-parallel: ${{ github.event == 'schedule' && 2 || 7 }}
fail-fast: ${{ github.event_name == 'pull_request' }}
max-parallel: 7
matrix:
cases:
- "BlackParrot:1x1:*"
- "BlackParrot:2x2:*"
- "BlackParrot:4x4:*"
- "NVDLA:*"
- "OpenPiton:1x1:*"
- "OpenPiton:2x2:*"
- "OpenPiton:4x4:*"
- "OpenTitan:*"
- "VeeR-EH1:asic*"
- "VeeR-EH1:default*"
- "VeeR-EH1:hiperf*"
- "VeeR-EH2:asic*"
- "VeeR-EH2:default*"
- "VeeR-EH2:hiperf*"
- "VeeR-EL2:asic*"
- "VeeR-EL2:default*"
- "VeeR-EL2:hiperf*"
- "Vortex:mini:*"
- "Vortex:sane:*"
- "XiangShan:default-chisel3:* !*:linux"
- "XiangShan:default-chisel6:* !*:linux"
- "XiangShan:mini-chisel3:* !*:linux"
- "XiangShan:mini-chisel6:* !*:linux"
- "XuanTie-E902:*"
- "XuanTie-E906:*"
- "XuanTie-C906:*"
- "XuanTie-C910:*"
cases: ${{ fromJSON(needs.start.outputs.cases)['clang'] }}
run-gcc-hier:
name: Run GCC hier | ${{ matrix.cases }}
needs: build-gcc
needs:
- start
- build-gcc-new
- build-gcc-old
# Run even if 'build-*-old' was skipped (no old SHA), but not if any
# dependency failed, the workflow was cancelled, or 'start' was skipped
# (e.g. the workflow was not enabled, so there is nothing to run against).
if: ${{ !failure() && !cancelled() && needs.start.result == 'success' }}
uses: ./.github/workflows/reusable-rtlmeter-run.yml
with:
tag: gcc-hier
runs-on: ubuntu-24.04
cc: gcc
verilator-archive-new: ${{ needs.build-gcc-new.outputs.archive }}
verilator-archive-old: ${{ needs.build-gcc-old.outputs.archive }}
cases: ${{ matrix.cases }}
run-name: "gcc --hierarchical"
compileArgs: "--hierarchical"
executeArgs: ""
strategy:
fail-fast: false
max-parallel: ${{ github.event == 'schedule' && 2 || 7 }}
fail-fast: ${{ github.event_name == 'pull_request' }}
max-parallel: 6
matrix:
cases:
- "BlackParrot:1x1:* !-hier"
- "BlackParrot:2x2:* !-hier"
- "BlackParrot:4x4:* !-hier"
- "NVDLA:* !-hier"
- "OpenPiton:1x1:* !-hier"
- "OpenPiton:2x2:* !-hier"
- "OpenPiton:4x4:* !-hier"
- "OpenPiton:8x8:* !-hier"
- "OpenPiton:16x16:dhry !-hier"
- "XuanTie-C910:* !-hier"
cases: ${{ fromJSON(needs.start.outputs.cases)['gcc-hier'] }}
combine-results:
name: Combine results
needs: [run-gcc, run-clang, run-gcc-hier]
# Run if any of the dependencies have run, even if failed.
# That is: do not run if all skipped, or the workflow was cancelled.
if: ${{ (contains(needs.*.result, 'success') || contains(needs.*.result, 'failure')) && !cancelled() }}
# Skip if cancelled.
# On PRs, run if something succeeded and nothing failed.
# On non-PRs, run if anything succeeded or failed (so partial results are still published).
if: >-
${{ !cancelled() && (
(github.event_name == 'pull_request' && (contains(needs.*.result, 'success') && !contains(needs.*.result, 'failure')))
|| (github.event_name != 'pull_request' && (contains(needs.*.result, 'success') || contains(needs.*.result, 'failure')))
)}}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
tag: [gcc, clang, gcc-hier]
outputs:
# The run tags, derived from the 'run-*' dependency job names
run-tags: ${{ steps.tags.outputs.tags }}
env:
GH_TOKEN: ${{ github.token }}
# 'gh' resolves the repo from git otherwise, but this job has no checkout
# of this repo at the workspace root
GH_REPO: ${{ github.repository }}
steps:
# Derive the run tags from the dependency job names ('run-<tag>')
- name: Determine run tags
id: tags
run: echo "tags=$(jq -r 'keys | map(sub("^run-"; "")) | join(" ")' <<< '${{ toJSON(needs) }}')" >> "$GITHUB_OUTPUT"
- name: Checkout RTLMeter
uses: actions/checkout@v5
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: "verilator/rtlmeter"
path: rtlmeter
- name: Setup RTLMeter venv
working-directory: rtlmeter
run: make venv
- name: Download all results
uses: actions/download-artifact@v6
with:
pattern: rtlmeter-${{ matrix.tag }}-results-*
path: all-results-${{ matrix.tag }}
merge-multiple: true
run: |
for tag in ${{ steps.tags.outputs.tags }}; do
mkdir artifacts all-results-$tag
gh run download ${{ github.run_id }} --pattern "rtlmeter-$tag-results-*" --dir artifacts
mv $(find artifacts -name "*.json") all-results-$tag/
rm -rf artifacts
done
- name: Combine results
working-directory: rtlmeter
run: |
./rtlmeter collate ../all-results-${{ matrix.tag }}/*.json > ../all-results-${{ matrix.tag }}.json
for tag in ${{ steps.tags.outputs.tags }}; do
./rtlmeter collate ../all-results-$tag/*.json > ../all-results-$tag.json
done
- name: Upload combined results
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
path: all-results-${{ matrix.tag }}.json
name: all-results-${{ matrix.tag }}
path: all-results-*.json
name: all-results
overwrite: true
retention-days: 30
# The reference (old) results only exist for pull requests, where the
# 'build-*-old' jobs run and the run jobs produce '*-reference-*' artifacts.
- name: Download reference results
if: ${{ github.event_name == 'pull_request' }}
run: |
for tag in ${{ steps.tags.outputs.tags }}; do
mkdir artifacts all-reference-$tag
gh run download ${{ github.run_id }} --pattern "rtlmeter-$tag-reference-*" --dir artifacts
mv $(find artifacts -name "*.json") all-reference-$tag/
rm -rf artifacts
done
- name: Combine reference results
if: ${{ github.event_name == 'pull_request' }}
working-directory: rtlmeter
run: |
for tag in ${{ steps.tags.outputs.tags }}; do
./rtlmeter collate ../all-reference-$tag/*.json > ../all-reference-$tag.json
done
- name: Upload reference results
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
path: all-reference-*.json
name: all-reference
overwrite: true
retention-days: 30
@@ -225,28 +286,27 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Download combined results
uses: actions/download-artifact@v6
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
pattern: all-results-*
name: all-results
path: results
merge-multiple: true
- name: Upload published results
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
path: results/*.json
name: published-results
# Pushing to verilator/verilator-rtlmeter-results requires elevated permissions
- name: Generate access token
id: generate-token
uses: actions/create-github-app-token@v2.1.4
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
app-id: ${{ vars.VERILATOR_CI_ID }}
client-id: ${{ vars.VERILATOR_CI_ID }}
private-key: ${{ secrets.VERILATOR_CI_KEY }}
owner: verilator
repositories: verilator-rtlmeter-results
permission-contents: write
- name: Checkout verilator-rtlmeter-results
uses: actions/checkout@v5
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: "verilator/verilator-rtlmeter-results"
token: ${{ steps.generate-token.outputs.token }}
@@ -273,116 +333,57 @@ jobs:
prepare-pr-results:
name: Prepare Pull Request results
needs: combine-results
if: ${{ github.event_name == 'pull_request' && github.repository == 'verilator/verilator' && contains(needs.*.result, 'success') && !cancelled() }}
if: ${{ github.event_name == 'pull_request' && github.repository == 'verilator/verilator' && needs.combine-results.result == 'success' }}
runs-on: ubuntu-24.04
permissions:
actions: read
steps:
- name: Checkout RTLMeter
uses: actions/checkout@v5
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: "verilator/rtlmeter"
path: rtlmeter
- name: Setup RTLMeter venv
working-directory: rtlmeter
run: make venv
- name: Download combined results
uses: actions/download-artifact@v6
- name: Checkout Verilator
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
pattern: all-results-*
path: all-results
merge-multiple: true
- name: Get scheduled run info
id: scheduled-info
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
ID=$(gh run --repo ${{ github.repository }} list --workflow RTLMeter --event schedule --status success --limit 1 --json databaseId --jq ".[0].databaseId")
echo "id=$ID" >> $GITHUB_OUTPUT
URL=$(gh run --repo ${{ github.repository }} view $ID --json url --jq ".url")
echo "url=$URL" >> $GITHUB_OUTPUT
NUM=$(gh run --repo ${{ github.repository }} view $ID --json number --jq ".number")
echo "num=$NUM" >> $GITHUB_OUTPUT
DATE=$(gh run --repo ${{ github.repository }} view $ID --json createdAt --jq ".createdAt")
echo "date=$DATE" >> $GITHUB_OUTPUT
- name: Download scheduled run results
uses: actions/download-artifact@v6
with:
name: published-results
path: nightly-results
run-id: ${{ steps.scheduled-info.outputs.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Compare results
working-directory: rtlmeter
run: |
for tag in gcc clang gcc-hier; do
ADATA=../nightly-results/all-results-${tag}.json
BDATA=../all-results/all-results-${tag}.json
touch ../verilate-${tag}.txt
touch ../execute-${tag}.txt
touch ../cppbuild-${tag}.txt
if [[ ! -e $ADATA ]]; then
continue
fi
./rtlmeter compare --cases '* !Example:* !*:hello' --steps "verilate" --metrics "elapsed memory" $ADATA $BDATA > ../verilate-${tag}.txt
cat ../verilate-${tag}.txt
./rtlmeter compare --cases '* !Example:* !*:hello' --steps "execute" --metrics "speed memory elapsed" $ADATA $BDATA > ../execute-${tag}.txt
cat ../execute-${tag}.txt
./rtlmeter compare --cases '* !Example:* !*:hello' --steps "cppbuild" --metrics "elapsed memory cpu codeSize" $ADATA $BDATA > ../cppbuild-${tag}.txt
cat ../cppbuild-${tag}.txt
done
path: verilator
- name: Create report
id: report
working-directory: verilator
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -x
NUM=$(gh run --repo ${{ github.repository }} view ${{ github.run_id }} --json number --jq ".number")
URL=$(gh run --repo ${{ github.repository }} view ${{ github.run_id }} --json url --jq ".url")
echo -n "Performance metrics for PR workflow [#$NUM]($URL) (B) compared to scheduled run" > report.txt
echo -n " [#${{ steps.scheduled-info.outputs.num }}](${{ steps.scheduled-info.outputs.url }}) (A)" >> report.txt
echo " from ${{ steps.scheduled-info.outputs.date }}" >> report.txt
for tag in gcc clang gcc-hier; do
echo "" >> report.txt
if [[ $tag == "gcc" ]]; then
echo "<details open>" >> report.txt
else
echo "<details>" >> report.txt
fi
echo -n "<summary><strong><em>" >> report.txt
jq -rj ".[0].runName" all-results/all-results-${tag}.json >> report.txt
echo "</em></strong></summary>" >> report.txt
awk -v RS= -v tag=${tag} '{print > sprintf("frag-%02d-verilate-%s.txt",NR,tag)}' verilate-${tag}.txt
awk -v RS= -v tag=${tag} '{print > sprintf("frag-%02d-execute-%s.txt" ,NR,tag)}' execute-${tag}.txt
awk -v RS= -v tag=${tag} '{print > sprintf("frag-$02d-cppbuild-%s.txt",NR,tag)}' cppbuild-${tag}.txt
for f in $(ls -1 frag-*-verilate-${tag}.txt | sort) $(ls -1 frag-*-execute-${tag}.txt | sort) $(ls -1 frag-*-cppbuild-${tag}.txt | sort); do
if [[ $f == frag-01-verilate-${tag}.txt || $f == frag-01-execute-${tag}.txt ]]; then
echo "<details open>" >> report.txt
else
echo "<details>" >> report.txt
fi
echo -n "<summary>" >> report.txt
head -n 1 $f | tr -d '\n' >> report.txt
echo "</summary>" >> report.txt
echo '<pre>' >> report.txt
tail -n +2 $f >> report.txt
echo '</pre>' >> report.txt
echo "</details>" >> report.txt
done
echo "</details>" >> report.txt
done
cat report.txt
ln -s ../rtlmeter rtlmeter
gh repo set-default ${{ github.repository }}
# Create run report - save status to fail job if the script did
STATUS=0
ci/ci-rtlmeter-report.bash ${{ github.run_id }} ${{ github.sha }} ${{ needs.combine-results.outputs.run-tags }} || STATUS=$?
echo "status=$STATUS" >> "$GITHUB_OUTPUT"
# Create the report artifact
mkdir ../report-artifact
mv rtlmeter-report/report ../report-artifact/
echo ${{ github.event.number }} > ../report-artifact/pr-number.txt
- name: Upload report
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
path: report.txt
name: rtlmeter-pr-results
- name: Save PR number
run: echo ${{ github.event.number }} > pr-number.txt
- name: Upload PR number
uses: actions/upload-artifact@v5
path: report-artifact
name: rtlmeter-report
- name: Upload PR notification
uses: ./verilator/.github/actions/upload-pr-notification
with:
path: pr-number.txt
name: pr-number
path: verilator/rtlmeter-report/notification
key: rtlmeter
- name: Report status
run: exit ${{ steps.report.outputs.status }}
# Create GitHub issue for failed scheduled jobs
# This should always be the last job (we want an issue if anything breaks)
@@ -395,9 +396,9 @@ jobs:
# Creating issues requires elevated privilege
- name: Generate access token
id: generate-token
uses: actions/create-github-app-token@v2.1.4
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
app-id: ${{ vars.VERILATOR_CI_ID }}
client-id: ${{ vars.VERILATOR_CI_ID }}
private-key: ${{ secrets.VERILATOR_CI_KEY }}
owner: verilator
repositories: verilator
+1
View File
@@ -17,6 +17,7 @@
*.pdf
/Makefile
/.ccache
/.venv/
/artifact/
README
TAGS
+148
View File
@@ -0,0 +1,148 @@
<!-- DESCRIPTION: Verilator: Repository-wide guidelines for AI coding agents
SPDX-FileCopyrightText: 2026-2026 Wilson Snyder
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 -->
# Verilator Guidelines for AI Coding Agents
These files are the general layer an agent loads first -- nearest file wins, so
you read this repository-root file plus the one for the directory you are
editing. They stay deliberately high-level: where to start, how the tree is laid
out, and the conventions reviewers otherwise enforce by hand. They are an index,
not the architecture reference -- for depth (how a pass works internally, the
algorithms, node lifetime) they point you to `docs/internals.rst`. When the
guidance here is not enough, that is where to look next.
This file has two parts. **Orientation** gets you productive in the codebase from
a cold start. **Before you open a PR** is the checklist of conventions reviewers
otherwise have to enforce by hand -- read it before submitting any change.
Then read the directory guide for the area you are editing:
- [src/AGENTS.md](src/AGENTS.md) -- compiler C++ sources: AST, visitors, passes, parser, style
- [include/AGENTS.md](include/AGENTS.md) -- runtime library (`verilated*`): C++14, MT-safety, fixed-width types
- [test_regress/AGENTS.md](test_regress/AGENTS.md) -- regression tests: harness, drivers, golden files
- [docs/AGENTS.md](docs/AGENTS.md) -- documentation (`*.rst`)
______________________________________________________________________
# Orientation
## What Verilator is
Verilator is a *compiler*, not an interpreter. It translates synthesizable (and
much behavioral) SystemVerilog into a cycle-accurate C++ model that you then
compile and run. Almost every decision is made at compile ("verilation") time;
the generated C++ just advances state each evaluation. Optimize for verilation-
time work over runtime work.
## The pipeline is the spine
A run is an ordered sequence of passes over one shared AST (abstract syntax
tree). In source order:
| Stage | What it does | Key files |
|---|---|---|
| Preprocess + parse | Lex and parse text into a raw AST -- builds nodes only, no semantic checks | `verilog.l`, `verilog.y` |
| Link / elaborate | Resolve names, scopes, parameters; instantiate the hierarchy | `V3LinkParse`, `V3LinkDot`, `V3Param` |
| Width / type | Assign and check data types and bit widths | `V3Width` |
| Transform / optimize / schedule | Constant fold, lower language features, schedule events | `V3Const`, `V3Randomize`, `V3Assert*`, `V3Sched`, `V3Timing`, `V3Dfg` |
| Emit | Lower the final AST to generated C++ | `V3EmitC*` |
| Runtime | Library the generated model links against | `include/verilated*` |
This table is the map; `docs/internals.rst` has the detail behind each stage.
## Where to make a change
Map the symptom to the pass that owns it, then start by reading that pass's
top-of-file comment.
| Symptom or feature area | Start in |
|---|---|
| Type/width error, "what type is this", implicit conversion | `V3Width` |
| Name/scope/parameter resolution ("Can't find...", hierarchy) | `V3LinkDot`, `V3Param` |
| `randomize` / `constraint` / `rand` / `randc` | `V3Randomize` |
| `assert` / `property` / `sequence` / `cover` | `V3Assert`, `V3AssertPre`, `V3AssertNfa` |
| `fork` / timing / `#delay` / NBA / event scheduling | `V3Sched`, `V3Timing`, `V3Fork` |
| Syntax wrongly accepted or rejected | `verilog.y`, `verilog.l` |
| Wrong generated C++ | `V3EmitC*` |
| Runtime model behavior | `include/verilated*` |
## Build and run a test
- Build in the source tree: `autoconf && ./configure && make -j8`. Configure with
`--enable-ccwarn` so a new compiler warning stops the build.
- Run one test from the repository root: `test_regress/t/t_<name>.py`.
- Run the full regression with `make test`. The complete suite requires
configuring with `--enable-longtests` (works on every OS, including macOS).
______________________________________________________________________
# Before you open a PR
## Scope and process
- [ ] Searched open PRs and issues -- duplicating in-flight work wastes review time.
- [ ] Fixed the general root cause, not just the reported case -- if it also
affects other modules/classes/interfaces, cover them or expect rejection.
- [ ] PR is single-purpose. Refactors, drive-by fixes found along the way, and new
features each go in separate PRs; land standalone cleanups first.
- [ ] Every bug fix has a test that fails *without* the fix; include the issue's
own reproducer when possible.
- [ ] New code aims for 100% line coverage; branch coverage far below line coverage
signals guards callers never violate -- justify or remove them.
- [ ] Ran `make format` (clang-format), `make cppcheck`, and `make lint-py`;
self-reviewed the diff for leftover debug code, stale comments, and
copy-paste errors.
- [ ] Ran the full regression on at least one OS before submitting. Partial runs
are fine during development, but the submitted PR is expected to pass every
test.
- [ ] Validated the code changes against recommendations in the AGENTS.md files.
- [ ] Did not edit `docs/CONTRIBUTORS` (humans only) or `Changes` (maintainer
updates it near release).
## Drafting a PR
- [ ] When creating a pull request message, omit itemized lists of changed
files and changes, since reviewers already have access to the diff.
## Pick the right diagnostic (and its required test)
The API you choose determines which test must accompany the change.
| API | Output | Meaning | Required test |
|---|---|---|---|
| `v3error("...")` | `%Error:` | User wrote invalid SystemVerilog | `t_*_bad*.v` + `.out` golden |
| `v3error("Unsupported: ...")` | `%Error-UNSUPPORTED:` | Legal SV that Verilator does not yet support | `t_*_unsup*.v` + `.out` golden |
| `v3warn(CODE, "...")` | `%Warning-CODE:` | Legal but suspicious code | warning test + `.out` golden |
| `v3fatalSrc("...")` | `%Error: Internal Error` | Should-never-happen internal assertion | none -- not user-triggerable |
- Every `v3error`/`v3warn` needs a test in `test_regress/t/` -- enforced by the
warn-coverage distribution test. `v3fatalSrc` is exempt.
- Reserve "Unsupported:" for not-yet-implemented features, never for user mistakes.
- When an error enforces a spec-defined restriction, cite the clause
(`IEEE 1800-2023 11.4.7`) so it is verifiable. Update `docs/guide/warnings.rst`
when adding or changing a warning.
- On error paths, clean up or replace invalid AST (e.g. `AstConst::BitFalse`) so
later passes do not crash after the error.
## Cross-cutting code rules
- [ ] No non-ASCII characters in C++ sources or headers: write `--` (two ASCII
hyphens) rather than a Unicode em-dash, and a plain `'` rather than a smart
quote. At write time, not when CI complains.
- [ ] Lists stay sorted: lexer/parser tokens, option declarations, enum values,
configure feature lists, documented option lists.
- [ ] `bin/` scripts are Python (distributed cross-platform); `nodist/` may use
bash and platform-specific code (developer-only, not packaged).
- [ ] Runtime code in `include/` targets C++14 (`--no-timing` builds must work);
C++20 only in timing code paths.
- [ ] In `include/` public headers, prefix public classes with `Verilated`/`Vl`
and document the API with `///` comments.
- [ ] A new code pattern is applied globally or not at all -- no one-off
convention in a single file.
## Commits
- Subject line is short and imperative and conventionally ends with the PR number:
`Support property case (#7721)`. A body is optional and common for non-trivial
changes.
-197
View File
@@ -1,197 +0,0 @@
Artistic License 2.0
Copyright (c) 2000-2006, The Perl Foundation.
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Preamble
********
This license establishes the terms under which a given free software
Package may be copied, modified, distributed, and/or redistributed. The
intent is that the Copyright Holder maintains some artistic control over
the development of that Package while still keeping the Package
available as open source and free software.
You are always permitted to make arrangements wholly outside of this
license directly with the Copyright Holder of a given Package. If the
terms of this license do not permit the full use that you propose to
make of the Package, you should contact the Copyright Holder and seek a
different licensing arrangement.
Definitions
***********
"Copyright Holder" means the individual(s) or organization(s) named in
the copyright notice for the entire Package.
"Contributor" means any party that has contributed code or other
material to the Package, in accordance with the Copyright Holder's
procedures.
"You" and "your" means any person who would like to copy, distribute, or
modify the Package.
"Package" means the collection of files distributed by the Copyright
Holder, and derivatives of that collection and/or of those files. A
given Package may consist of either the Standard Version, or a Modified
Version.
"Distribute" means providing a copy of the Package or making it
accessible to anyone else, or in the case of a company or organization,
to others outside of your company or organization.
"Distributor Fee" means any fee that you charge for Distributing this
Package or providing support for this Package to another party. It does
not mean licensing fees.
"Standard Version" refers to the Package if it has not been modified, or
has been modified only in ways explicitly requested by the Copyright
Holder.
"Modified Version" means the Package, if it has been changed, and such
changes were not explicitly requested by the Copyright Holder.
"Original License" means this Artistic License as Distributed with the
Standard Version of the Package, in its current version or as it may be
modified by The Perl Foundation in the future.
"Source" form means the source code, documentation source, and
configuration files for the Package.
"Compiled" form means the compiled bytecode, object code, binary, or any
other form resulting from mechanical transformation or translation of
the Source form.
Permission for Use and Modification Without Distribution
********************************************************
(1) You are permitted to use the Standard Version and create and use
Modified Versions for any purpose without restriction, provided that you
do not Distribute the Modified Version.
Permissions for Redistribution of the Standard Version
******************************************************
(2) You may Distribute verbatim copies of the Source form of the
Standard Version of this Package in any medium without restriction,
either gratis or for a Distributor Fee, provided that you duplicate all
of the original copyright notices and associated disclaimers. At your
discretion, such verbatim copies may or may not include a Compiled form
of the Package.
(3) You may apply any bug fixes, portability changes, and other
modifications made available from the Copyright Holder. The resulting
Package will still be considered the Standard Version, and as such will
be subject to the Original License.
Distribution of Modified Versions of the Package as Source
**********************************************************
(4) You may Distribute your Modified Version as Source (either gratis or
for a Distributor Fee, and with or without a Compiled form of the
Modified Version) provided that you clearly document how it differs from
the Standard Version, including, but not limited to, documenting any
non-standard features, executables, or modules, and provided that you do
at least ONE of the following:
(a) make the Modified Version available to the Copyright Holder of the
Standard Version, under the Original License, so that the Copyright
Holder may include your modifications in the Standard Version.
(b) ensure that installation of your Modified Version does not prevent
the user installing or running the Standard Version. In addition, the
Modified Version must bear a name that is different from the name of the
Standard Version.
(c) allow anyone who receives a copy of the Modified Version to make the
Source form of the Modified Version available to others under
(i) the Original License or
(ii) a license that permits the licensee to freely copy, modify and
redistribute the Modified Version using the same licensing terms that
apply to the copy that the licensee received, and requires that the
Source form of the Modified Version, and of any works derived from it,
be made freely available in that license fees are prohibited but
Distributor Fees are allowed.
Distribution of Compiled Forms of the Standard Version or Modified
******************************************************************
Versions without the Source
***************************
(5) You may Distribute Compiled forms of the Standard Version without
the Source, provided that you include complete instructions on how to
get the Source of the Standard Version. Such instructions must be valid
at the time of your distribution. If these instructions, at any time
while you are carrying out such distribution, become invalid, you must
provide new instructions on demand or cease further distribution. If
you provide valid instructions or cease distribution within thirty days
after you become aware that the instructions are invalid, then you do
not forfeit any of your rights under this license.
(6) You may Distribute a Modified Version in Compiled form without the
Source, provided that you comply with Section 4 with respect to the
Source of the Modified Version.
Aggregating or Linking the Package
**********************************
(7) You may aggregate the Package (either the Standard Version or
Modified Version) with other packages and Distribute the resulting
aggregation provided that you do not charge a licensing fee for the
Package. Distributor Fees are permitted, and licensing fees for other
components in the aggregation are permitted. The terms of this license
apply to the use and Distribution of the Standard or Modified Versions
as included in the aggregation.
(8) You are permitted to link Modified and Standard Versions with other
works, to embed the Package in a larger work of your own, or to build
stand-alone binary or bytecode versions of applications that include the
Package, and Distribute the result without restriction, provided the
result does not expose a direct interface to the Package.
Items That are Not Considered Part of a Modified Version
********************************************************
(9) Works (including, but not limited to, modules and scripts) that
merely extend or make use of the Package, do not, by themselves, cause
the Package to be a Modified Version. In addition, such works are not
considered parts of the Package itself, and are not subject to the terms
of this license.
General Provisions
******************
(10) Any use, modification, and distribution of the Standard or Modified
Versions is governed by this Artistic License. By using, modifying or
distributing the Package, you accept this license. Do not use, modify,
or distribute the Package, if you do not accept this license.
(11) If your Modified Version has been derived from a Modified Version
made by someone other than you, you are nevertheless required to ensure
that your Modified Version complies with the requirements of this
license.
(12) This license does not grant you the right to use any trademark,
service mark, tradename, or logo of the Copyright Holder.
(13) This license includes the non-exclusive, worldwide, free-of-charge
patent license to make, have made, use, offer to sell, sell, import and
otherwise transfer the Package with respect to any patent claims
licensable by the Copyright Holder that are necessarily infringed by the
Package. If you institute patent litigation (including a cross-claim or
counterclaim) against any party alleging that the Package constitutes
direct or contributory patent infringement, then this Artistic License
to you shall terminate on the date that such litigation is filed.
(14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT
HOLDER AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT
PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT
HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE
OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+5 -4
View File
@@ -1,3 +1,4 @@
---
# See https://citation-file-format.github.io/
cff-version: 1.2.0
title: Verilator
@@ -14,14 +15,14 @@ authors:
family-names: Wasson
- given-names: Duane
family-names: Galbi
- given-names: Geza
family-names: Lore
- name: 'et al'
repository-code: 'https://github.com/verilator/verilator'
url: 'https://verilator.org'
abstract: >-
The Verilator package converts Verilog and SystemVerilog hardware
description language (HDL) designs into a fast C++ or SystemC model
that, after compiling, can be executed. Verilator is not a
that, after compiling, can be executed. Verilator is not only a
traditional simulator but a compiler.
license:
- LGPL-3.0-only
- Artistic-2.0
license: [LGPL-3.0-only, Artistic-2.0]
+9 -8
View File
@@ -4,10 +4,10 @@
#
#*****************************************************************************
#
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2003-2025 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
#
#****************************************************************************/
@@ -16,7 +16,7 @@ cmake_minimum_required(VERSION 3.15)
cmake_policy(SET CMP0091 NEW) # Use MSVC_RUNTIME_LIBRARY to select the runtime
project(
Verilator
VERSION 5.042
VERSION 5.052
HOMEPAGE_URL https://verilator.org
LANGUAGES CXX
)
@@ -155,11 +155,12 @@ install(
foreach(
program
verilator
verilator_gantt
verilator_ccache_report
verilator_coverage
verilator_difftree
verilator_profcfunc
verilator_gantt
verilator_includer
verilator_profcfunc
)
install(PROGRAMS bin/${program} TYPE BIN)
endforeach()
@@ -182,6 +183,6 @@ install(
PATTERN "include/*.cpp"
PATTERN "include/*.vlt"
PATTERN "include/*.sv"
PATTERN "include/gtkwave/*.[chv]*"
PATTERN "include/fstcpp/*.[chv]*"
PATTERN "include/vltstd/*.[chv]*"
)
+812 -9
View File
@@ -1,5 +1,7 @@
.. for github, vim: syntax=reStructuredText
.. Maintainers and agents, do not edit this file, it will be updated for you post- PR-merge.
===============================
Revision History and Change Log
===============================
@@ -8,6 +10,806 @@ The changes in each Verilator version are described below. The
contributors that suggested or implemented a given issue are shown in []. Thanks!
Verilator 5.052 2026-09-05
==========================
**Important:**
* Verilator now supports UVM 2020-3.2; see (#1538) for limitations.
**Other:**
* Add comments as a branch description in coverage .info files (#7843). [Eryk Szpotanski]
* Add --enable-light-debug configure option (#7886). [Geza Lore, Testorrent USA, Inc.]
* Add user-provided DPI-C function declarations (#7626) (#7893). [Jakub Michalski]
* Add error on static virtual functions (#7932). [Igor Zaworski, Antmicro Ltd.]
* Add error when scalar is passed to array task argument (#7948). [Pawel Klopotek]
* Add MULTIDRIVENPROC warning for signals driven by multiple plain always blocks (#7968). [Aisha]
* Add FSM arc and state coverage to verilator_coverage .info output (#7972) (#7973). [Igor Zaworski, Antmicro Ltd.]
* Add SIMILARNAME warning when variables have names that differ in case (#7992) (#8020) (#8186) (#8226) (#8233). [Paul Campbell]
* Add Unigen2 constrained randomization algorithm (#8042). [Jakub Wasilewski, Antmicro Ltd.]
* Add `+verilator+assert+lock` to ignore RTL assert control statements (#8086). [Sumanth Kadiyala]
* Add NEVERMATCH warning when an SVA sequence can never match (#8176) (#8183). [Artur Bieniek, Antmicro Ltd.]
* Remove and deprecate `--assert-unroll-limit`. (#8096). [Artur Bieniek, Antmicro Ltd.]
* Support embedded covergroup member references (#7749) (#8015). [Marco Bartoli]
* Support a sequence used as an event control (#7797) (#7846). [Yilou Wang]
* Support `[\*N:$]` consecutive repetition (#7940). [Artur Bieniek, Antmicro Ltd.]
* Support dynamic containers in unique constraints (#7947). [Adam Kostrzewski, Antmicro Ltd.]
* Support delayed tristate gates (#7960) (#7961). [Patrick Creighton]
* Support `default clocking` (#7984). [Kamil Danecki, Antmicro Ltd.]
* Support embedded covergroup clocking events (#8028). [Marco Bartoli]
* Support `weak`/`strong` keywords in property expressions (#8054). [Artur Bieniek, Antmicro Ltd.]
* Support class handle covergroup arguments (#8071). [Marco Bartoli]
* Support `soft foreach` constraints (#8174). [Kamil Danecki, Antmicro Ltd.]
* Support overlong `within` sequences as never-matching (#8177). [Artur Bieniek, Antmicro Ltd.]
* Support covergroup/function/task (ref/virtual/array) interface arguments (#8180). [Marco Bartoli]
* Support covergroup events with reference members or ref arguments (#8201). [Marco Bartoli]
* Support s_until/s_until_with in property expression (#8220). [Artur Bieniek, Antmicro Ltd.]
* Support solve before with associative array (#8232). [Kamil Danecki, Antmicro Ltd.]
* Optimize random initialization. [Geza Lore, Testorrent USA, Inc.]
* Optimize more always blocks in DFG (#7775). [Geza Lore, Testorrent USA, Inc.]
* Optimize assertion NFAs using bit-vector ring buffers (#7885). [Artur Bieniek, Antmicro Ltd.]
* Optimize circular logic in DFG (#7902). [Geza Lore, Testorrent USA, Inc.]
* Optimize VPI symbol registration and scope construction (#7936). [Nick Brereton]
* Optimize bounded always properties using ring buffers (#8061) (#8092). [Artur Bieniek, Antmicro Ltd.]
* Optimize VL_WORDS_I/VL_BYTES_I (#8095). [Geza Lore, Testorrent USA, Inc.]
* Optimize consecutive and goto repetitions using ring buffers (#8096). [Artur Bieniek, Antmicro Ltd.]
* Optimize temporary insertion for single bit replicates in DFG (#8110). [Geza Lore, Testorrent USA, Inc.]
* Optimize mtask coarsening in multi-threaded scheduling (#8120). [Geza Lore, Testorrent USA, Inc.]
* Optimize NFA delay-ring edge traversal, drop complexity to linear (#8145). [Artur Bieniek, Antmicro Ltd.]
* Optimize associative constant patterns to fixed point (#8147) (#8209). [Geza Lore, Testorrent USA, Inc.]
* Fix procedural tristate assignment overrides (#6785) (#8130). [Eddie Rydell]
* Fix $finish continuing event loop (#7267) (#7950). [Artur Bieniek, Antmicro Ltd.]
* Fix continuing on wait(0) (#7372) (#8231). [Szymon Gizler, Antmicro Ltd.]
* Fix $display accepting streaming concat arguments (#7663) (#7890). [Jaeuk Lee]
* Fix typedef clocking input sampling (#7688 partial) (#8204). [Marco Bartoli]
* Fix DFG misoptimizing bound checks (#7755). [Jakub Michalski]
* Fix unique0 case side effects (#7787). [Pawel Klopotek]
* Fix mid-window disable iff (#7792) (#7869). [Yilou Wang]
* Fix cleaning purity cache after assertions. [Geza Lore, Testorrent USA, Inc.]
* Fix uncaught type error leading to invalid C++ output (#7814). [Geza Lore, Testorrent USA, Inc.]
* Fix internal error for coverpoints that reference a covergroup formal parameter (#7853 partial) (#7889). [Matthew Ballance]
* Fix immediate disable of fork join branches (#7856) (#7931). [Marco Bartoli]
* Fix self-disable of named blocks with forks (Part of #7857) (#7996) (#8006). [Marco Bartoli]
* Fix clang++ ambiguous overload of '==' operator (#7863). [Pawel Kojma, Antmicro Ltd.]
* Fix heap-use-after-free in `VlRNG::VlRNG()` (#7865). [Dragon-Git]
* Fix mixed-width inside and dist range bounds failing randomization (#7875). [Yilou Wang]
* Fix solve-before over array variables failing randomization (#7876). [Yilou Wang]
* Fix scoped randomize with array members under rand_mode (#7877). [Yilou Wang]
* Fix dist constraint on a frozen variable failing randomization (#7878). [Yilou Wang]
* Fix range delays with parameter bounds (#7882). [Artur Bieniek, Antmicro Ltd.]
* Fix --coverage on labeled inline assert/cover property (#7898) (#7904). [Patrick Creighton]
* Fix memory leak in VerilatedFst::close() (#7899). [Jakub Michalski]
* Fix spurious FSM COVERIGN on comparisons (#7900) (#7908). [Yogish Sekhar]
* Fix release of forced port nets (#7901) (#7907). [Artur Bieniek, Antmicro Ltd.]
* Fix independent force of multiply instantiated signals (#7905). [Artur Bieniek, Antmicro Ltd.]
* Fix scheduling of variables written in non-inlined functions in suspendable processes (#7909). [Igor Zaworski, Antmicro Ltd.]
* Fix randomization of unreferenced rand members of unpacked structs (#7910) (#7911). [Philip Axer]
* Fix VL_TO_STRING function for array of structs (#7912). [Kornel Uriasz, Antmicro Ltd.]
* Fix queues falling into wrong template spec (#7914). [Adam Kostrzewski, Antmicro Ltd.]
* Fix type resolution when a local name shadows a type name (#7915). [Pawel Klopotek]
* Fix crash streaming an unpacked array of unpacked structs (#7917). [Nick Brereton]
* Fix streaming concat as output-port lvalue into unpacked struct (#7918). [Nick Brereton]
* Fix dropping variable writes across opaque calls (#7921) (#7933). [Philip Axer]
* Fix dynamic array handling in solve...before (#7922). [Kornel Uriasz, Antmicro Ltd.]
* Fix unlinked error with function call in derived class parameter (#7923). [Mateusz Gancarz, Antmicro Ltd.]
* Fix scheduling of variables written in non-inlined functions in suspendable processes (#7924). [Igor Zaworski, Antmicro Ltd.]
* Fix class parameter resolution (#7935).
* Fix FSM detection of coverage-only branches (#7941) (#7942). [Patrick Creighton]
* Fix use-after-free in V3LinkDotIfaceCapture (#7943). [Nick Brereton]
* Fix sampled-value clocks in repeated assertions (#7944). [Artur Bieniek, Antmicro Ltd.]
* Fix queued $finish/$stop request thread ordering (#7946 prep) (#7952). [Yilou Wang]
* Fix NFA assertion scheduling to fix outcome counts (#7946). [Yilou Wang]
* Fix DFG nested shifts with overflowing shift amount (#7955) (#7977).
* Fix timing controls in interface tasks called via virtual interface (#7959). [Yilou Wang]
* Fix lambda parameter types in queue min and max (#7962). [Bartosz Skorowski]
* Fix solve-before dropping all soft constraints in randomize() (#7963). [Yilou Wang]
* Fix generic interface param resolution in module/cell parameterization (#7970) (#7971). [David Garau]
* Fix lost writes when select width exceeds variable width (#7975). [Bartosz Skorowski]
* Fix $fgets being mis-optimized away (#7976). [G-A. Kamendje]
* Fix SYNCASYNCNET false positive with changed non-edge logic (#7980). [Oron Port]
* Fix variable scope in unique on dynamic array (#7981). [Kornel Uriasz, Antmicro Ltd.]
* Fix table optimization causing not contextually convertible to bool error (#7983). [Jakub Michalski]
* Fix wait fork trigger temporary split across generated functions (#7985) (#7986). [Marco Brambilla]
* Fix randc cycling in a class that also uses solve...before (#7991 partial) (#8055). [Yilou Wang]
* Fix solver session stability to avoid breaking randomize (#7991 partial). [Yilou Wang]
* Fix simulation hang when the solver stops answering (#7991 partial) (#8129) (#8136). [Yilou Wang]
* Fix randomize() with a user variable named 'item' (#7993) (#7994).
* Fix UNSATCONSTR reporting constraint indices above 9 (#7995). [Yilou Wang]
* Fix MULTIDRIVEN/MULTIDRIVENPROC warning suppression via lint_off (#8000). [Gilberto Abram]
* Fix force not substituted into an unpacked array index (#8002).
* Fix dist weights ignored when an item is not a literal (#8003).
* Fix error when forcing an array element read at a run-time index (#8004).
* Fix FSM coverage on empty reset branches (#8005) (#8064). [Yogish Sekhar]
* Fix missing verilator_coverage in cmake install (#8008) (#8011).
* Fix dist inside a foreach nested in a constraint if (#8016).
* Fix gcov dump on warnings discarding later coverage counts (#8017). [Yilou Wang]
* Fix unique constraint crash, guards, and size (#8018).
* Fix Linux peak memory stat to use VmHWM (#8022) (#8070). [Tyrone Marhguy]
* Fix assignment pattern key constant expressions (#8029) (#8030). [Josep Sans]
* Fix skipping optimization for unpacked data types (#8031). [Kornel Uriasz, Antmicro Ltd.]
* Fix gate deduplication with function arguments (#8038). [JOTEGO]
* Fix conditional expression with parameterized classes (#8039). [Pawel Klopotek, Antmicro Ltd.]
* Fix array size references in constraints (#8040). [Kornel Uriasz, Antmicro Ltd.]
* Fix mid-range consecutive repetition rejects (#8041). [Artur Bieniek, Antmicro Ltd.]
* Fix write access to dynamic arrays (#8043). [Bartosz Skorowski, Antmicro Ltd.]
* Fix nondeterminism in trace stage (#8046). [Sumanth Kadiyala]
* Fix force helpers in multiply instantiated modules (#8047). [Artur Bieniek, Antmicro Ltd.]
* Fix pin to non-existent port with PINNOTFOUND suppressed (#8051) (#8052). [Nikolai Kumar]
* Fix wildcard equality against a 4-state constant in an assertion (#8056) (#8057). [Nikolai Kumar]
* Fix untyped datatype error on sampling functions with property arguments (#8060). [Artur Bieniek, Antmicro Ltd.]
* Fix VPI cbValueChange for 1-bit select (#8063). [Bartłomiej Chmiel, Antmicro Ltd.]
* Fix NFA assertion crash and mis-counted property if/case (#8074). [Yilou Wang]
* Fix skipping non-constrained enum constraining when inside object of other class (#8075). [Kornel Uriasz, Antmicro Ltd.]
* Fix use-after-free of captured interface typedef reference during parameter cloning (#8076). [em2machine]
* Fix unintended side-effect insertion on associative array read (#8077). [Adam Kostrzewski, Antmicro Ltd.]
* Fix undefined symbol solver error (#8080). [Igor Zaworski, Antmicro Ltd.]
* Fix unpacked array element force with procedural assign (#8084) (#8085). [Nikolai Kumar]
* Fix reading another parameter resolves to 0 in cloned modules (#8086) (#8069). [em2machine]
* Fix hierarchical class scope resolution (#8094). [Artur Bieniek, Antmicro Ltd.]
* Fix segmentation fault on parameters (#8102) (#8149). [Sumanth Kadiyala]
* Fix the clang compilation using precompiled headers (#8105). [Demin Han]
* Fix invalid typedef (#8106). [Adam Kostrzewski, Antmicro Ltd.]
* Fix R/W references to random builtin function seeds (#8112). [Geza Lore, Testorrent USA, Inc.]
* Fix invalid C++ on cast (#8113). [Pawel Klopotek, Antmicro Ltd.]
* Fix COVERIGN on SVA goto repetition (#8118). [Artur Bieniek, Antmicro Ltd.]
* Fix unordered data hazards in multi-threaded scheduling (#8133). [Geza Lore, Testorrent USA, Inc.]
* Fix public table offsets larger than 32 bits (#8135). [Sunimali Rathnayake]
* Fix 'get-value' for empty constrained arrays (#8138). [Kornel Uriasz, Antmicro Ltd.]
* Fix streaming concatenation uninitialized read-modify-write access (#8143). [Geza Lore, Testorrent USA, Inc.]
* Fix unpacked array passing to logic task argument error (#8148). [Pawel Klopotek, Antmicro Ltd.]
* Fix $past in final blocks on a sampling-tick finish (#8153). [Yilou Wang]
* Fix array reference in reduction constraints (#8158). [Kornel Uriasz, Antmicro Ltd.]
* Fix VPI force data corruption (#8160). [Jonathan Drolet]
* Fix sampled-value functions output on the first cycle (#8162). [Artur Bieniek, Antmicro Ltd.]
* Fix null pointer dereference in process destruction (#8171). [Andrii, Antmicro Ltd.]
* Fix invalid conversion of queue (#8172). [Andrii, Antmicro Ltd.]
* Fix crash on forward-referencing parameters (#8175). [Geza Lore, Testorrent USA, Inc.]
* Fix crash on empty `#()` parameter list on class instance (#8182). [Geza Lore, Testorrent USA, Inc.]
* Fix crash on multiple missing type parameters (#8184). [Geza Lore, Testorrent USA, Inc.]
* Fix SVA bound limit guard, leave headroom for alignment, respect --max-num-width (#8192). [Artur Bieniek, Antmicro Ltd.]
* Fix internal error on an enum literal inside a `with` lambda body (#8190) (#8193). [Aditya Shevade]
* Fix internal error on backslash-quoted strings (#8198). [Henry Hsieh]
* Fix backslash behavior in string literals (#8211). [Pawel Klopotek, Antmicro Ltd.]
* Fix task inout pin resizing error (#8212). [Pawel Klopotek, Antmicro Ltd.]
* Fix code generation for postponed region (#8218). [Geza Lore, Testorrent USA, Inc.]
* Fix method calls to be a reorder barrier (#8222). [Matthew Ballance]
* Fix errors on stream connected to instance port (#8234). [Geza Lore, Testorrent USA, Inc.]
* Fix folding of short circuiting operators guarding member access (#8238). [Geza Lore, Testorrent USA, Inc.]
* Fix MULTIDRIVENPROC on static loop induction variables (#8242). [Geza Lore, Testorrent USA, Inc.]
* Fix multiply undefined behavior on signed int overflow (#8247) (#8248). [Paul Rigge]
* Fix initial statements with gate optimization (#8250). [Prithayan Barua]
* Fix segmentation fault on context destruction (#8265).
* Fix mis-randomizing an unpacked struct member when not rand/randc (#8277) (#8278). [Aditya Shevade]
* Fix std::randomize() with-clause array index arguments (#8279) (#8280). [Aditya Shevade]
* Fix incorrect reference to sync/async in SYNCASYNCNET warning (#8281). [Andrii, Antmicro Ltd.]
* Fix use-after-free of captured interface typedef in deleted generate branch (#8287). [Nick Brereton]
Verilator 5.050 2026-07-01
==========================
**Important:**
* Support covergroups, coverpoints, and bins (#784) (#7117) (#7728). [Matthew Ballance]
* Support new FST writer API (#6871) (#6992). [Yu-Sheng Lin]
Use of FST may requiring installing liblz4 and/or liblz4-dev packages, see docs/install.rst.
**Other:**
* Add `+verilator+log+file` (#4505) (#7645). [Tracy Narine]
* Add peak memory usage to `--stats`. [Geza Lore, Testorrent USA, Inc.]
* Add error on mixed-initialization (#7352) (#7357).
* Add `--coverage-per-instance` (#7636). [Yogish Sekhar]
* Add NOTREDOP error on reduction and negation operators (#7417) (#7623) (#7624).
* Add hierarchy-aware reporting to `verilator_coverage` (#7657). [Yogish Sekhar]
* Add FINALDLY error (#7754). [Igor Zaworski, Antmicro Ltd.]
* Deprecate isolate_assignments attribute (#7774) (#7144). [Geza Lore, Testorrent USA, Inc.]
* Improve `--coverage-fsm` (#7490) (#7529) (#7561) (#7573) (#7619). [Yogish Sekhar]
* Change `+verilator+seed` to default to 1, and 0 to randomly select (#7325) (#7516). [Miguel]
* Change JSON to include parameter constant mnemonics for FSM Coverage (#7531). [Yogish Sekhar]
* Support assert property `default disable iff` (#4848) (#7723). [Artur Bieniek, Antmicro Ltd.]
* Support printing enum names for %p and %s (#5523) (#7338 repair) (#7521) (#7527). [Nick Brereton]
* Support weak `until` / `until_with` property operators (#7290) (#7548) (#7685). [Yilou Wang]
* Support `s_eventually` (#7291) (#7508). [Bartłomiej Chmiel, Antmicro Ltd.]
* Support writing to inout in fork after timing (#7345). [Kamil Danecki, Antmicro Ltd.]
* Support `always` / `always[m:n]` / `s_always[m:n]` property operators (#7482). [Yilou Wang]
* Support rand_mode() on static rand class members (#7484) (#7510). [Yilou Wang]
* Support `randomize() with (identifier_list) {constraint_block}` (#7486) (#7507). [Yilou Wang]
* Support `obj.randomize(null)` (#7487) (#7509). [Yilou Wang]
* Support functions on RHS of force (#7491). [Artur Bieniek, Antmicro Ltd.]
* Support procedural continuous assign/deassign (#7493). [Artur Bieniek, Antmicro Ltd.]
* Support randsequence production function ports (#7522). [Yilou Wang]
* Support followed-by operators `#-#` and `#=#` in properties (#7523). [Yilou Wang]
* Support expression coverage on assign statements (#7542) (#7543). [Thomas Brown]
* Support TERMUX (#7559). [Laurent CHARRIER]
* Support NBAs in initial blocks with delay/event controls (#7566) (#7600). [Muzaffer Kal]
* Support SVA goto repetition with range `[->M:N]` (#7569). [Yilou Wang]
* Support property abort operators (accept_on, reject_on) (#7578). [Yilou Wang]
* Support procedural concurrent assertions with inferred clock (#7581). [Yilou Wang]
* Support calling interface functions without parens (#7584). [Krzysztof Bieganski, Antmicro Ltd.]
* Support streaming on queues (#7597). [Benjamin Collier, Secturion Systems, Inc.]
* Support clocking event on a sequence declaration body (#7598) (#7793). [Yilou Wang]
* Support generic interface arrays (#7604). [Krzysztof Bieganski, Antmicro Ltd.]
* Support FSM detection in primitive wrappers (#7607). [Yogish Sekhar]
* Support busses with mix of pullup/pulldown (#7632). [Lucas Amaral]
* Support forceable on unpacked array variables (#7677) (#7678). [Nikolai Kumar]
* Support pre/post increment/decrement inside && and || (#7683). [Nick Brereton]
* Support streaming into 2-D unpacked arrays (#7686) (#7687). [Paul Swirhun]
* Support if/if-else in properties (#7692). [Artur Bieniek, Antmicro Ltd.]
* Support process::self().srand() (#7695). [Igor Zaworski, Antmicro Ltd.]
* Support MacOS lldb (#7697). [Tracy Narine]
* Support assoc array methods with wide value types (#7680). [pawelktk]
* Support property case (#7682) (#7721). [Artur Bieniek, Antmicro Ltd.]
* Support `s_until` and `s_until_with`(#7722). [Artur Bieniek, Antmicro Ltd.]
* Support covergroup runtime model Phase A1 (#7728). [Matthew Ballance]
* Support hierarchical reference cross members (#7749) (#7820). [Matthew Ballance]
* Support reduction XOR/AND operations in constraints (#7753). [Kornel Uriasz, Antmicro Ltd.]
* Support NBAs in initial blocks (#7754). [Igor Zaworski, Antmicro Ltd.]
* Support assertion control system tasks in classes and interfaces (#7761). [Yilou Wang]
* Support cover sequence statement (#7764). [Yilou Wang]
* Support unpacked struct stream (#7767). [Nick Brereton]
* Support $assertcontrol control_type from lock to kill (#7788). [Yilou Wang]
* Support unbounded always [m:$] and strong s_always liveness (#7798). [Yilou Wang]
* Support method calls on a sub-interface via a virtual interface (#7800). [Yilou Wang]
* Support global $assertcontrol (#7807). [Artur Bieniek, Antmicro Ltd.]
* Support VPI access to unpacked struct members (#7823). [Nick Brereton]
* Support variable-length intersect in SVA sequences (#7835). [Yilou Wang]
* Support dynamic loading of VPI extensions (#7727). [Matthew Ballance]
* Optimize DFG cycle breaking to do less work (#7210). [Geza Lore, Testorrent USA, Inc.]
* Optimize emitting to_string() for compiler speedup (#7468). [Jakub Michalski, Antmicro Ltd.]
* Optimize additional DFG peephole cases (#7553). [Varun Koyyalagunta, Testorrent USA, Inc.]
* Optimize forced signal handling (#7554 partial) (#7572) (#7594) (#7596). [Krzysztof Bieganski, Artur Bieniek, Antmicro Ltd.]
* Optimize primitive runtime functions. [Geza Lore, Testorrent USA, Inc.]
* Optimize if branches with same trailing statements (#7674). [Geza Lore, Testorrent USA, Inc.]
* Optimize wide conditional expansion in V3Premit (#7691). [Geza Lore, Testorrent USA, Inc.]
* Optimize VL_ONEHOT. [Geza Lore, Testorrent USA, Inc.]
* Optimize formatting functions (#7701) (#7702) (#7703). [Geza Lore, Testorrent USA, Inc.]
* Optimize DPI import argument passing (#7704). [Geza Lore, Testorrent USA, Inc.]
* Optimize runtime assertOn() checks (#7707). [Geza Lore, Testorrent USA, Inc.]
* Optimize $countones and $onehot in DFG. [Geza Lore, Testorrent USA, Inc.]
* Optimize procedural loop unrolling. [Geza Lore, Testorrent USA, Inc.]
* Optimize V3Gate inlining heuristic (#7716). [Geza Lore, Testorrent USA, Inc.]
* Optimize reset in DFG (#7737). [Geza Lore, Testorrent USA, Inc.]
* Optimize DFG with relaxed live variable analysis (#7739). [Geza Lore, Testorrent USA, Inc.]
* Optimize conditional patterns sharing common MBSs/LSBs in DfgPeephole (#7760). [Geza Lore, Testorrent USA, Inc.]
* Optimize bit select removal earlier in DFG (#7762). [Geza Lore, Testorrent USA, Inc.]
* Optimize away proven redundant case statement assertions (#7771). [Geza Lore, Testorrent USA, Inc.]
* Optimize table lookups in DFG (#7772). [Geza Lore, Testorrent USA, Inc.]
* Optimize input combinational logic by change detection (#7784). [Geza Lore, Testorrent USA, Inc.]
* Optimize decoder case statements into lookup tables (#7795). [Geza Lore, Testorrent USA, Inc.]
* Optimize wide decoder case statements into decoder expressions (#7804). [Geza Lore, Testorrent USA, Inc.]
* Optimize statically known oversize shifts (#7806). [Geza Lore, Testorrent USA, Inc.]
* Optimize generated function inlining (#7811). [Geza Lore, Testorrent USA, Inc.]
* Optimize bit-scan loops into most-set-bit or $countones (#7822). [Thomas Santerre]
* Optimize additional expression patterns (#7824). [Geza Lore, Testorrent USA, Inc.]
* Optimize module inlining heuristic (#7837). [Geza Lore, Testorrent USA, Inc.]
* Fix `$bits` on unpacked structs (#4521) (#7796). [Nick Brereton]
* Fix TSP variable ordering for mtasks (#5342) (#7610). [Muzaffer Kal]
* Fix inlining static initializer in V3Gate (#5381) (#7503). [Andrew Nolte] [Geza Lore, Testorrent USA, Inc.]
* Fix timed nested fork block with disable (#6720) (#7743). [Marco Bartoli]
* Fix segmentation fault when using --trace with --lib-create (#7299) (#7518). [anonkey]
* Fix cross-hierarchy tristate drivers of interface nets (#7339) (#7801). [Yilou Wang]
* Fix destructive event state before dynamic waits (#7340). [Nick Brereton]
* Fix ALWCOMBORDER on variable ordering (#7350) (#7608). [Cookie]
* Fix false MULTIDRIVEN warning on always_ff variables (#7351) (#7621) (#7672).
* Fix array pattern concatenation (#7401) (#7402). [Greg Davill]
* Fix fairness in `std::semaphore` (#7435) (#7605). [Krzysztof Bieganski, Antmicro Ltd.]
* Fix generic interface port forwarded to a nested instance (#7454) (#7457). [Yilou Wang]
* Fix internal error on multi-cycle SVA under default clocking (#7472) (#7506). [Yilou Wang]
* Fix internal error instead of missing prototype error (#7485). [Alex Solomatnikov]
* Fix mailbox#(packed_struct) type mismatch with parameterized class (#7494) (#7495). [Nikolai Kumar]
* Fix std::randomize internal error on static member of different class (#7498) (#7499). [Alex Solomatnikov]
* Fix assert under assert error (#7500) (#7513). [Nikolai Kumar]
* Fix std::unique_ptr with incomplete type for clang (#7501) (#7526).
* Fix virtual interface method call inlining and IMPURE suppression (#7505). [Nikolay Puzanov]
* Fix expression coverage in loops (#7511). [Todd Strader]
* Fix $bits on local struct with chained-interface (#7515) (#7517).
* Fix array indexing side effects in compound assignments (#7519) (#7540) (#7544). [Kamil Danecki, Antmicro Ltd.]
* Fix class::localparam during elaboration (#7524) (#7534).
* Fix dearray variable scope error (#7530) (#7602).
* Fix nested parameterized class typedef chain (#7538). [Michael Rogenmoser]
* Fix events in observed region (#7546). [Todd Strader]
* Fix regression rejecting boolean `!x` inside sequence expressions (#7549) (#7551). [Yilou Wang]
* Fix exponential expansion in V3Gate (#7550). [Geza Lore, Testorrent USA, Inc.]
* Fix internal error on consecutive repetition with N > 256 (#7552) (#7603). [Yilou Wang]
* Fix inherited rand array with .size + foreach constraint (#7558) (#7650). [Yilou Wang]
* Fix biased bit distribution under value < (1 << N) constraints (#7563) (#7684). [Yilou Wang]
* Fix HIERPARAM lint checking (#7570) (#7690). [em2machine]
* Fix display of %m in non-first argument (#7574).
* Fix floating point compile warning on min/max delays.
* Fix force of unpacked arrays (#7579) (#7580). [Zubin Jain]
* Fix property argument retaining type of the previous variable (#7582). [Jakub Michalski]
* Fix NBA to whole arrays (#7583) (#7575). [Geza Lore, Testorrent USA, Inc.]
* Fix wrong false assert for property local variables with cycle-delayed consequents (#7587) (#7651). [Yilou Wang]
* Fix interface instance name collision (#7591) (#7593). [Stuart Morris]
* Fix process comparison compile error with `--public-flat-rw` (#7592).
* Fix CPU pinning when no 'core id' present (#7599). [Geza Lore, Testorrent USA, Inc.]
* Fix access to parameters via class::localparam (#7609) (#7671). [em2machine]
* Fix clocking-block sample of unpacked array (#7612) (#7613). [Nikolai Kumar]
* Fix type parameters order (#7615) (#7653) (#7693). [Kamil Danecki, Antmicro Ltd.]
* Fix unique_index method on assoc arrays with values differing from the keys (#7616). [Pawel Klopotek]
* Fix wide equality comparison in unpacked structs (#7618). [Geza Lore, Testorrent USA, Inc.]
* Fix force determinism (#7620) (#7637). [Artur Bieniek, Antmicro Ltd.]
* Fix reference counting for modport task references (#7628). [Nick Brereton]
* Fix internal error when handling typedefs containing parameterized class type members (#7635) (#7661). [em2machine]
* Fix forceable signal with a procedural continuous assign (#7638) (#7639). [Zubin Jain]
* Fix scheduling of virtual interface method writes (#7641). [Artur Bieniek, Antmicro Ltd.]
* Fix implicit conversions of VlWide (#7642). [Geza Lore, Testorrent USA, Inc.]
* Fix CASEINCOMPLETE to not warn on `unique0 case` (#7647).
* Fix hierarchical coverage counts for duplicate no-inline module instances (#7649). [Yogish Sekhar]
* Fix dropped iff guard on clocking inside task (#7658) (#7659). [Nikolai Kumar]
* Fix runtime speed summary report. [Geza Lore, Testorrent USA, Inc.]
* Fix reserved keywords reaching emitter (#7666). [Pawel Kojma, Antmicro Ltd.]
* Fix width of unsized literal in property expression (#7668). [Artur Bieniek, Antmicro Ltd.]
* Fix loss of events due to bit shift (#7670). [Artur Bieniek, Antmicro Ltd.]
* Fix parameter read through locally-declared interface instance (#7679). [Nick Brereton]
* Fix skipping nulls in $sscanf (#7689).
* Fix bounds checks in expressions with read/write references (#7694). [Ryszard Rozak, Antmicro Ltd.]
* Fix (const) ref default task argument handling (#7698). [Nick Brereton]
* Fix `ref` argument type check for packed arrays with differing range directions (#7700). [Nick Brereton]
* Fix ignoring not-found modules with encoded names (#7706). [Igor Zaworski, Antmicro Ltd.]
* Fix MULTIDRIVEN in generates (#7709). [Todd Strader]
* Fix parameter pollution when using class parameters (#7711) (#7763). [em2machine]
* Fix Makefile action to not write to ${srcdir} (#7715). [Larry Doolittle]
* Fix splitting functions containing fork logic (#7717). [Mateusz Gancarz, Antmicro Ltd.]
* Fix optimizations of assignments with timing controls (#7718). [Ryszard Rozak, Antmicro Ltd.]
* Fix s_eventually on interface (#7731) (#7733). [Marco Bartoli]
* Fix parameter values in coverage bins widths (#7732) (#7734). [Marco Bartoli]
* Fix configure fall back on dynamic malloc libraries (#7736). [Geza Lore, Testorrent USA, Inc.]
* Fix crash on overlapping priority case. [Geza Lore, Testorrent USA, Inc.]
* Fix s_eventually in parameterized interfaces (#7741). [Nick Brereton]
* Fix dpi export pointers (#7742) (#7751). [Yilin Li]
* Fix force on unpacked bit select (#7744) (#7745). [Nikolai Kumar]
* Fix `$` as unsupported coverpoint-bin range bounds (#7750) (#7825). [Matthew Ballance]
* Fix FSM detect unchecked casts and variable redeclaration (#7758). [Adam Kostrzewski, Antmicro Ltd.]
* Fix no-scope internal error on virtual interface method calls (#7759). [Yilou Wang]
* Fix `case (_) inside` with x wildcards (#7766). [Geza Lore, Testorrent USA, Inc.]
* Fix not failing assertion when RHS of a range window rejects once (#7773). [Artur Bieniek, Antmicro Ltd.]
* Fix $fflush and autoflush with --threads (#7782).
* Fix out-of-bounds read value for 2-state types (#7785). [Jakub Michalski]
* Fix `cover property` of an implication counting vacuous matches (#7789). [Yilou Wang]
* Fix randomization of dynamic arrays of objects (#7790). [Ryszard Rozak, Antmicro Ltd.]
* Fix randomize() with skipping derived pre/post_randomize (#7799). [Yilou Wang]
* Fix skewed dist operator for arrays (#7802). [Jakub Wasilewski, Antmicro Ltd.]
* Fix assertion when loop unrolling failed (#7810). [Geza Lore, Testorrent USA, Inc.]
* Fix CASEINCOMPLETE for all uncovered enum items (#7815) (#7817). [Saksham]
* Fix split optimization nested-class crash (#7826). [Igor Zaworski, Antmicro Ltd.]
* Fix class/var named identically to an enclosing-scope type (#7827) (#7828). [Tom Jackson]
* Fix performance on large package-scoped structs (#7830). [Wolfgang Mayerwieser]
* Fix unclocked concurrent assertion misreported as unsupported (#7831). [Yilou Wang]
* Fix insertion of expression coverage statement (#7832). [Ryszard Rozak, Antmicro Ltd.]
* Fix lifetime of expression coverage variable (#7834). [Ryszard Rozak, Antmicro Ltd.]
* Fix disable iff ignored when its condition is held continuously true (#7841). [Yilou Wang]
* Fix constant pool cache after dead scope removal (#7845). [Nick Brereton]
* Fix covergroups without --coverage (#7848) (#7849). [Joshua Leahy]
* Fix class scope '::' reference through an inherited type parameter (#7844). [Sergey Chusov]
Verilator 5.048 2026-04-26
==========================
**Important:**
* Displaying Verilator generated FST files will require an updated version
of Surfer (built from 'main', or the future numbered release 0.7.0).
No GTKWave update is necessary (#7255).
* Support jemalloc as the default allocator on Linux (#7250). [Yangyu Chen]
For better performance, `apt install libjemalloc-dev` or equivalent before running ./configure.
**Other:**
* Add VPI callback support to `--main` (#7145).
* Add `--func-recursion-depth` option (#7175) (#7179).
* Add `+verilator+solver+file` for debugging constraint solver (#7242).
* Add `--coverage-fsm` for experimental FSM state and arc coverage (#7412). [Yogish Sekhar]
* Add printed summary to verilator_coverage (#7438) (#7462). [Yogish Sekhar]
* Deprecate `--structs-packed` (#7222).
* Remove DFG extract optimization pass (#7394). [Geza Lore, Testorrent USA, Inc.]
* Remove multi-threaded FST tracing (#7443). [Geza Lore, Testorrent USA, Inc.]
* Improve assignment-compatibility type check (#2843) (#5666) (#7052). [Pawel Kojma, Antmicro Ltd.]
* Improve error message when variable used as data type (#7318). [Ryszard Rozak, Antmicro Ltd.]
* Improve E_UNSUPPORTED warning messages (#7329). [Eunseo Song]
* Improve NFA-based multi-cycle SVA evaluation engine (#7430). [Yilou Wang]
* Change array tracing to dump left index to right index (#7205). [Geza Lore, Testorrent USA, Inc.]
* Change `--converge-limit` default to 10000 (#7209).
* Support inout inside SV interface (#3466) (#7134) (#7708) (#7710). [Nick Brereton]
* Support `##0` cycle delays (#4263) (#7298). [Yilou Wang]
* Support multidimensional arrays of interfaces (#6230) (#7451). [em2machine]
* Support array reduction methods with 'with' clause in constraints (#6455) (#6999). [Rahul Behl]
* Support constraint imperfect distributions (#6811) (#7168). [Yilou Wang]
* Support disable task by name (#6853) (#7136). [Nick Brereton]
* Support procedural concurrent assertion simple cases (#6944).
* Support force assignments to array elements of real type (#7048). [Ryszard Rozak, Antmicro Ltd.]
* Support VPI array indexing in signal names (#7097) (#7187) (#7214) (#7289). [Christian Hecken, Heidelberg University]
* Support soft constraint solving (#7124) (#7166). [Yilou Wang]
* Support constraints on fixed-size array of class object members (#7170) (#7183). [Yilou Wang]
* Support Z non-blocking assignment (#7192) (#496) (#7197). [Nick Brereton]
* Support constraint `with` item.index array reduction (#7198). [Rahul Behl]
* Support constant expressions without parentheses in `PATHPULSE$` (#7199). [Pawel Kojma, Antmicro Ltd.]
* Support $sformat with runtime format string (#7212).
* Support dist and solve...before inside foreach constraints (#7245) (#7253). [Yilou Wang]
* Support array and struct info metadata in FST traces (#7255). [Geza Lore, Testorrent USA, Inc.]
* Support dynamic array .size in inline randomize() with constraints (#7258) (#7266). [Yilou Wang]
* Support defparam with more than one dot (#7262). [Artur Bieniek, Antmicro Ltd.]
* Support modport export/import task prototypes and out-of-block definitions (#7277). [Yilou Wang]
* Support very wide $display arguments (#7280). [Jakub Michalski]
* Support named sequence declarations and instances in assertions (#7283). [Yilou Wang]
* Support `##`, `##[*]`, `##[+]`, `##[M:N]` cycle delays in assertions (#7284) (#7312) (#7377). [Yilou Wang]
* Support boolean and/or in sequence expressions (#7285). [Yilou Wang]
* Support property-local variables and sequence match items (#7286). [Yilou Wang]
* Support 'until' and `until_with` property (#7290 partial) (#7399) (#7436). [Ryszard Rozak, Antmicro Ltd.]
* Support implication operator with constraint_set (#7300) (#7448). [Yilou Wang]
* Support array map() method (#7307) (#7316) (#7344). [Wei-Lun Chiu]
* Support MacOS address sanitizer memory limit (#7308). [Marco Bartoli]
* Support SVA goto repetition `[->N]` in concurrent assertions (#7310). [Yilou Wang]
* Support consecutive repetition `[\*N]` in SVA properties (#7311). [Yilou Wang]
* Support rise/fall delays (#7368). [Artur Bieniek, Antmicro Ltd.]
* Support sequence intersect operator (#7374). [Yilou Wang]
* Support sequence 'throughout' operator (#7378). [Yilou Wang]
* Support sequence consecutive repetition `[*N:M]`, `[+]`, and `[*]` (#7379). [Yilou Wang]
* Support sequence `first_match` operator (#7392). [Yilou Wang]
* Support nonconsecutive repetition [=N] in sequence expressions (#7397). [Yilou Wang]
* Support per-process RNG for process::srandom() and object seeding (#7408) (#7415) (#7408). [Yilou Wang]
* Support 2**n expressions in constraint randomization (#7422). [Yilou Wang]
* Support IEEE-compliant force/release handling (#7391). [Artur Bieniek, Antmicro Ltd.]
* Support sequence 'within' operator (#7461). [Yilou Wang]
* Optimize trace code for faster compiles on repeated types (#6707) (#6832). [Todd Strader]
* Optimize impure expressions and calls with new V3LiftExpr pass (#7141) (#7164). [Geza Lore, Testorrent USA, Inc.]
* Optimize size of trace declaration object code (#7150). [Szymon Gizler, Antmicro Ltd.]
* Optimize function call return value temporaries (#7152). [Geza Lore, Testorrent USA, Inc.]
* Optimize conditional merging across some impure statements (#7159). [Geza Lore, Testorrent USA, Inc.]
* Optimize reuse of existing associative terms in DfgPeephole. [Geza Lore, Testorrent USA, Inc.]
* Optimize duplicate vertices and multiplexers in DfgPeephole (#7305). [Geza Lore, Testorrent USA, Inc.]
* Optimize commutative vertex operands in DFG for better combining. [Geza Lore, Testorrent USA, Inc.]
* Optimize DFG peephole until a fixed point (#7309). [Geza Lore, Testorrent USA, Inc.]
* Optimize comparisons with identical operands and $countones in DFG. [Geza Lore, Testorrent USA, Inc.]
* Optimize more patterns in DfgPeephole (#7332). [Geza Lore, Testorrent USA, Inc.]
* Optimize read references in DFG (#7354). [Geza Lore, Testorrent USA, Inc.]
* Optimize DFG only once, after scoping (#7362). [Geza Lore, Testorrent USA, Inc.]
* Optimize more DFG peephole patterns (#7423) (#7452). [Geza Lore, Testorrent USA, Inc.]
* Optimize DfgBreakCycles IndependentBits analysis ordering (#7446). [Geza Lore, Testorrent USA, Inc.]
* Optimize select patterns in DfgPeephole. [Geza Lore, Testorrent USA, Inc.]
* Optimize temporary insertion in DfgPeephole. [Geza Lore, Testorrent USA, Inc.]
* Optimize arithmetic right shift (>>>) in DfgBreakCycles (#7447). [Geza Lore, Testorrent USA, Inc.]
* Optimize temporary insertion in DFG (#7459). [Geza Lore, Testorrent USA, Inc.]
* Optimize mix of Concat/Extend assignments (#7479). [Geza Lore, Testorrent USA, Inc.]
* Fix recursive default assignment for sub-arrays (#4589) (#7202). [Julian Carrier]
* Fix tracing virtual interface member written from classes (#5044) (#7465). [Nikolay Puzanov]
* Fix virtual interface member trigger convergence (#5116) (#7323). [Yilou Wang]
* Fix shift width mismatch in constraint solver SMT emission (#5420) (#7265). [Yilou Wang]
* Fix returning wrong type from static function in parameterized class (#5479) (#7387) (#7411) (#7418) (#7445) (#7450). [em2machine]
* Fix randomize size+element queue constraints (#5582) (#7225). [Rahul Behl, Testorrent USA, Inc.]
* Fix null assignment to virtual interfaces (#5974) (#5990). [Maxim Fonarev]
* Fix typedef scope resolution for parameterized class aliases (#5977) (#7319). [Nick Brereton]
* Fix lambda coroutines (#6106) (#7135). [Nick Brereton]
* Fix super constructor calls with local variables (#6214) (#6933). [Igor Zaworski, Antmicro Ltd.]
* Fix parameter default comparison when value contains type cast (#6281) (#7369) (#6281). [Yilou Wang]
* Fix `local::` false error in randomize() with on parameterized class (#6680) (#7293). [Yilou Wang]
* Fix false recursive definition error (#6769) (#7118). [Alex Zhou]
* Fix port assignment to large arrays (#6904).
* Fix interface localparam dependencies and arbitrary nesting (#6936) (#7128) (#7188) (#7190). [em2machine]
* Fix parameterized class typedef as interface type parameter (#7000) (#7006). [Leela Pakanati]
* Fix errant integer promotion (#7012). [Todd Strader]
* Fix randc solver hang with wide variables (#7068) (#7248). [Yilou Wang]
* Fix coroutine trace setters (#7078 repair) (#7296). [Igor Zaworski, Antmicro Ltd.]
* Fix vpi_put_value not updating forced read value (#7092) (#7395) (#7092). [Christian Hecken, Heidelberg University]
* Fix scheduling non-determinism (#7120) (#7162) (#7165). [Geza Lore, Testorrent USA, Inc.]
* Fix parameters inside std::randomize `with` clause (#7140). [Kamil Danecki, Antmicro Ltd.]
* Fix forcing unpacked variables (#7149). [Ryszard Rozak, Antmicro Ltd.]
* Fix wide conditional short circuiting (#7155).
* Fix eliminating assignments to DPI-read variables (#7158). [Geza Lore, Testorrent USA, Inc.]
* Fix std::randomize() in static function with static class members (#7167) (#7169). [Yilou Wang]
* Fix resolving default/non-default type parameters (#7171) (#7346) (#7380) (#7385) (#7398) (#7406) (#7398). [em2machine]
* Fix recursive constant function in $unit scope (#7173) (#7174).
* Fix class extend references between queues (#7195).
* Fix library/hier_block tracing when top name is empty (#7200). [Geza Lore, Testorrent USA, Inc.]
* Fix virtual interface select from sub-interface instance (#7203) (#7370) (#7203). [Yilou Wang]
* Fix VPI force of bit-selected signals (#7211) (#7301). [Christian Hecken]
* Fix `$finish` to immediately stop executing code from non-final blocks (#7213 partial) (#7390).
* Fix wrong $bits() for parameterized interface struct typedefs (#7218) (#7219). [em2machine]
* Fix `dist` operator inside constraint if blocks (#7221) (#7224). [Rahul Behl, Testorrent USA, Inc.]
* Fix array reduction in constraints crashing with class inheritance (#7226) (#7263). [Yilou Wang]
* Fix soft cross-object constraint priority inversion (#7228) (#7233). [Yilou Wang]
* Fix internal error when derived class calls this.randomize() with inherited rand members (#7229) (#7234). [Yilou Wang]
* Fix enum range constraints missing for rand variables in sub-objects (#7230) (#7235). [Yilou Wang]
* Fix vpi_put_value release on non-continuous signal (#7231) (#7241). [Christian Hecken]
* Fix functions in generate block resulting in 'Broken link in node' (#7236) (#7367). [em2machine]
* Fix tracing of typedefed 1D packed arrays with --trace-structs (#7237). [Geza Lore, Testorrent USA, Inc.]
* Fix rand variable used as array index in constraint evaluated as constant (#7238) (#7247). [Yilou Wang]
* Fix --hierarchical dropping arguments in -f/-F files (#7240). [Clara Sparks]
* Fix `final` asserts and $stop (#7249). [Artur Bieniek, Antmicro Ltd.]
* Fix MacOS clang PCH compile error with -o flag (#7251) (#7327). [Eunseo Song]
* Fix vpi_put_value with vpiIntVal on VlWide data (#7256). [Christian Hecken]
* Fix streaming with descending unpacked arrays and unpacked-to-queue (#7287). [Yilou Wang]
* Fix MacOs lexer compile error (#7314) (#7315). [Tracy Narine]
* Fix linking shared library with its dependencies (#7320). [Artur Bieniek, Antmicro Ltd.]
* Fix modport selection of virtual interface handle (#7321). [Yilou Wang]
* Fix false ASSIGNIN on interface input ports driven from outside (#7322). [Yilou Wang]
* Fix static initialization order for packages with class hierarchies (#7324). [Yilou Wang]
* Fix sensitivity of signals to unrelated interface members (#7336). [Artur Bieniek, Antmicro Ltd.]
* Fix `disable iff` imply-delay statement linking (#7337). [Nick Brereton]
* Fix lost `$stop` on implied assertion `$error` failures.
* Fix wait() hang when interface uses process calls and VIF function (#7342). [Yilou Wang]
* Fix error on illegal nand/nor binary operators (#7353).
* Fix simple array assignment unrolling in slice optimization (#7359). [Geza Lore, Testorrent USA, Inc.]
* Fix missing temporary for DfgSplicePacked (#7361). [Geza Lore, Testorrent USA, Inc.]
* Fix virtual interface function calls binding to wrong instance (#7363). [Yilou Wang]
* Fix false ASSIGNIN on interface input port connections (#7365). [Yilou Wang]
* Fix string `inside` queue (#7373).
* Fix subclass with rand_mode(0) getting randomized (#7376) (#7383). [Yilou Wang]
* Fix VPI access to Verilog `force`-ed signals (#7381). [Christian Hecken, Heidelberg University]
* Fix sampling of hierarchical references (#7386). [Ryszard Rozak, Antmicro Ltd.]
* Fix virtual class inheritance false error (#7403) (#7405). [Nikolay Puzanov]
* Fix CMake compiler coroutine flags (#7404). [Shogo Yamazaki]
* Fix delete inside foreach skipping elements (#7407) (#7410)
* Fix std::randomize in parameterized-derived class (#7409) (#7416). [Yilou Wang]
* Fix virtual interface implied comparison with null (#7421). [Alex Solomatnikov]
* Fix uvm_hdl_release_and_read to release value and check success (#7425). [Christian Hecken, Heidelberg University]
* Fix inline constraint on array-indexed randomize target (#7431) (#7434). [Yilou Wang]
* Fix modification of members of object with const handle (#7433). [Kamil Danecki, Antmicro Ltd.]
* Fix `dist` under implication in constraints (#7440) (#7442). [Alex Solomatnikov] [Yilou Wang]
* Fix std::randomize `inside` corrupting class-member queue operand (#7449) (#7456). [Yilou Wang]
* Fix module parameters not re-evaluated upon instantiation (#7463) (#7477). [em2machine]
* Fix function-in-constraint internal error on bare port return (#7473) (#7480). [Yilou Wang]
* Fix access to static variable inside function (#7474) (#7475). [Alex Zhou]
* Fix multiple inclusion of verilated_std.sv (#7478). [Larry Doolittle]
* Fix std::randomize inside {typedef array} internal error (#7481). [Yilou Wang]
* Fix module parameters not re-evaluated upon instantiation (#7463) (#7477). [em2machine]
* Fix infinite recursion with VERILATOR_BIN (#7496) (#7497).
* Add error on mixed declaration initialization with continuous assignment (#7352). [Zhi QU]
Verilator 5.046 2026-02-28
==========================
**Important:**
* Support #0 delays with IEEE-1800 compliant semantics (#7079). [Geza Lore, Testorrent USA, Inc.]
This may require `-no-sched-zero-delay` to maintain performance vs. previous versions.
**Other:**
* Add IEEE 4-state type lint checks (#3645 partial) (#6895). [Jose Drowne]
* Add VERILATOR_NUMA_STRATEGY environment variable (#6826) (#6880). [Yangyu Chen]
* Add decoded Verilog name in JSON output (#6919) (#6995). [Oleh Maksymenko]
* Add parsing of solve-before inside foreach (#6934). [Pawel Kojma, Antmicro Ltd.]
* Add error when accessing a non-static class field from a static function (#6948). [Artur Bieniek, Antmicro Ltd.]
* Add VerilatedContext::useNumaAssign and set on threads() call (#6954). [Yangyu Chen]
* Add coverage type information to verilator_coverage annotation output (#7131) (#7133) (#7148).
* Add --max-replication option (#7139). [Todd Strader]
* Support modport expression syntax + nested (#2601) (#5581) (#7005). [Leela Pakanati]
* Support nested interface as port connection (#5066) (#6986). [Leela Pakanati]
* Support solve..before constraints (#5647) (#7123). [Yilou Wang]
* Support structure initial values (#6130).
* Support proper automatic/static initialization, and remove STATICVAR warning (#6405) (#7086).
* Support vpi_put/vpi_get forcing of signals (#5933) (#6704). [Christian Hecken, Heidelberg University]
* Support detailed failure info for constraint violations (#6617) (#6883). [Yilou Wang]
* Support `unique` constraints (on 1D static arrays) (#6810) (#6878). [Srinivasan Venkataramanan]
* Support complex expressions as std::randomize arguments (#6860). [Jakub Wasilewski, Antmicro Ltd.]
* Support dynamic array elements in std::randomize (#6896). [Ryszard Rozak, Antmicro Ltd.]
* Support unbounded '$' in inside range expressions (#6935) (#6938). [Wei-Lun Chiu]
* Support `extern module` as a forward-declaration that is ignored.
* Support `foreach` with nested dots (#6991). [Krzysztof Bieganski, Antmicro Ltd.]
* Support signed multiplication in constraints (#7008). [Pawel Kojma, Antmicro Ltd.]
* Support constraint_mode() on static constraints (#7027) (#7038). [Yilou Wang]
* Support some system functions in constraint blocks (#7028) (#7036). [Yilou Wang]
* Support std::randomize() for queue, dynamic array, and associative array variables (#7044). [Yilou Wang]
* Support inherited and nested pre/post_randomize callbacks (#7049) (#7053). [Yilou Wang]
* Support `$get_initial_random_seed` (#7056) (#7069). [Srinivasan Venkataramanan]
* Support unique constraint on explicit array element subsets (#7057) (#7064). [Yilou Wang]
* Support force assignments to unpacked structs (#7060). [Ryszard Rozak, Antmicro Ltd.]
* Support function calls with random arguments in constraints (#7061) (#7083). [Yilou Wang]
* Support power expressions with constant exponent in constraints (#7073). [Kamil Danecki]
* Support `disable iff` with sequences (#7090). [Ryszard Rozak, Antmicro Ltd.]
* Support `this` keyword inside inline randomize() with {} constraint blocks (#7102) (#7113). [Yilou Wang]
* Support constraint dynamic array reduction methods without 'with' clause (#7104) (#7108). [Yilou Wang]
* Remove deprecated `--xml-only`.
* Remove deprecated `--make cmake`.
* Change JSON dumps to not include booleans that are false (#6977).
* Change metacomment extra underscore error to BADVLTPRAGMA warning (#6968). [Geza Lore, Testorrent USA, Inc.]
* Change INITIALSTATIC to also report on processes, per IEEE (#7020).
* Change automatic variables to not be traced.
* Change type definition error to show type chain with source context (#7151).
* Optimize string temporaries to not be localized (#6969). [Geza Lore, Testorrent USA, Inc.]
* Optimize wide word shifts by multiple of word size (#6970). [Geza Lore, Testorrent USA, Inc.]
* Optimize concatenations that produce unused bits in DFG (#6971). [Geza Lore, Testorrent USA, Inc.]
* Optimize more wide operation temporaries with substitution (#6972). [Geza Lore, Testorrent USA, Inc.]
* Optimize right shifts as clean (#6981). [Geza Lore, Testorrent USA, Inc.]
* Optimize temporary insertion for concatenations in DFG (#7013). [Geza Lore, Testorrent USA, Inc.]
* Optimize removing redundant variables during DFG Peephole pass (#7076). [Geza Lore, Testorrent USA, Inc.]
* Optimize additional DFG peephole Shift and Concat patterns (#7077). [Geza Lore, Testorrent USA, Inc.]
* Optimize logic and variable removal early in DFG (#7081). [Geza Lore, Testorrent USA, Inc.]
* Optimize straight line code in DFG always (#7084). [Geza Lore, Testorrent USA, Inc.]
* Optimize always blocks using local temporary variables in DFG (#7085). [Geza Lore, Testorrent USA, Inc.]
* Optimize functions inlined from packages in DFG (#7091). [Geza Lore, Testorrent USA, Inc.]
* Optimize continuous assignments with function on RHS in DFG (#7096). [Geza Lore, Testorrent USA, Inc.]
* Fix MULTIDRIVEN with task and default driver (#4045) (#6858). [em2machine]
* Fix parameterized virtual interface references that have no model references (#4286).
* Fix hierarchical interface/modport issues (#5941) (#6997). [Leela Pakanati]
* Fix extending class by a typedef (#6679) (#6855). [Alex Zhou]
* Fix variable reference lookup for module-level variables (#6741) (#6882). [Yilou Wang]
* Fix false CASEOVERLAP case item expression lint (#6825) (#6886). [Luca Colagrande]
* Fix virtual interface triggers (#6844). [Igor Zaworski, Antmicro Ltd.]
* Fix use-after-free error (#6846). [Matthew Ballance]
* Fix dynamic scheduler temporary variable locations (#6859) (#6926). [Igor Zaworski, Antmicro Ltd.]
* Fix dynamic array elements passed to ref argument (#6877). [Ryszard Rozak, Antmicro Ltd.]
* Fix large debug_str for emitted Syms headers (#6889). [Bartłomiej Chmiel, Antmicro Ltd.]
* Fix `disable iff` in simple properties (#6890). [Ryszard Rozak, Antmicro Ltd.]
* Fix #0 delays to control fork scheduling (#6891). [Artur Bieniek, Antmicro Ltd.]
* Fix member-selected randomization assignments (#6892). [Yilou Wang]
* Fix WIDTHEXTEND suppression on add/sub with single-bit signal. [Dan Katz]
* Fix segfault in V3Slice (#6899). [Pawel Kojma, Antmicro Ltd.]
* Fix unpacked array concatenation function arguments (#6900). [Pawel Kojma, Antmicro Ltd.]
* Fix signedness of packed array (#6901) (#6902). [Yutetsu TAKATSUKASA]
* Fix assignment of queue from unpacked array (#6906).
* Fix `foreach` with mid-index empty commas (#6910).
* Fix internal error when fork under always expression (#6911).
* Fix error when calling non-static method (#6916). [Artur Bieniek, Antmicro Ltd.]
* Fix memory leak in vpi_put_value and vpi_get_value (#6917). [Christian Hecken, Heidelberg University]
* Fix interface internal type reference (#6920) (#6966). [Todd Strader]
* Fix segfault after assignment pattern XOR error (#6928) (#6931). [emmettifelts]
* Fix delayed initial assignment (#6929). [Todd Strader]
* Fix event triggering (#6932) (#7072) (#7101). [Igor Zaworski, Antmicro Ltd.]
* Fix `--top-module` with underscores (#6940). [Christopher Batten]
* Fix variable randomization to better differ by seed (#6945) (#6956). [Rodrigo Batista de Moraes]
* Fix null pointer dereference in class member trigger expressions (#6946). [Cameron Waite]
* Fix type assignments for arrays of parameter types (#6955). [Todd Strader]
* Fix accessing non-rand struct member in constraints (#6960). [Pawel Kojma, Antmicro Ltd.]
* Fix associative array of events causes C++ compile error (#6962).
* Fix UNUSED / UNDRIVEN for unused functions (#6967). [Todd Strader]
* Fix non-inlined function return value clearing (#6982).
* Fix parameterized class typedef as interface type parameter (#6983) (#6984). [Leela Pakanati]
* Fix virtual interface not found internal error (#7010). [Igor Zaworski, Antmicro Ltd.]
* Fix multidimensional dynamic array elements passed to ref argument (#7023). [Ryszard Rozak, Antmicro Ltd.]
* Fix randomize() null pointer dereference (#7026). [Artur Bieniek, Antmicro Ltd.]
* Fix randc cyclic behavior broken with constraints (#7029) (#7035). [Yilou Wang]
* Fix inline foreach constraints on dynamic arrays of class objects (#7030) (#7037). [Yilou Wang]
* Fix rand_mode() on nested object variables causing Z3 solver error (#7031) (#7034). [Yilou Wang]
* Fix non-member identifiers used inside constraints (#7033). [Pawel Kojma, Antmicro Ltd.]
* Fix tracing without module inlining to match with inlining (#7041). [Geza Lore, Testorrent USA, Inc.]
* Fix scope tree in traces in hierarchical mode (#7042). [Geza Lore, Testorrent USA, Inc.]
* Fix rand_mode()/constraint_mode() when used as function arguments (#7051) (#7055). [Yilou Wang]
* Fix constraint_mode()/rand_mode() in constructor being overwritten (#7054). [Yilou Wang]
* Fix enum variables in constraint solver producing invalid enum values (#7058) (#7065). [Yilou Wang]
* Fix randomize() on null object handle crashing instead of returning 0 (#7059) (#7066). [Yilou Wang]
* Fix inside operator crash with impure expression and unsized range literals (#7063) (#7067). [Yilou Wang]
* Fix constant propagating DPI-written variables (#7074). [Geza Lore, Testorrent USA, Inc.]
* Fix conditional expressions in constraints (#7087). [Ryszard Rozak, Antmicro Ltd.]
* Fix UNSUPPORTED on $sampled in sensitivity list (#7093). [Ryszard Rozak, Antmicro Ltd.]
* Fix time to not advance after `$finish` (#7095).
* Fix associative array size() constraint generating invalid resize() call (#7103) (#7112). [Yilou Wang]
* Fix `new` shallow copy to preserve polymorphic runtime type (#7105) (#7109). [Yilou Wang]
* Fix circular class reference %p-printing causing infinite recursion (#7106).
* Fix too-short bit pack returning wrong value (#7111).
* Fix randomize of real (#7115). [Srinivasan Venkataramanan]
* Fix inlining of C functions with reloop locals (#7132). [Geza Lore, Testorrent USA, Inc.]
* Fix segfault in EmitCSyms (#7142) (#7143). [Gilberto Abram]
Verilator 5.044 2026-01-01
==========================
**Important:**
* This is the last release supporting the deprecated `--xml-only` and
`--make cmake` options.
* Change `--lint-only` and `--json-only` to imply `--timing` (#6790).
**Other:**
* Add `--unroll-limit` option (#6654) (#6668). [Geza Lore, Fractile Ltd.]
* Add `-fno-inline-funcs-eager` option to disable excessive inlining (#6682). [Geza Lore, Fractile Ltd.]
* Add `-param`/`-port` options to `public_flat*` control directives (#6685). [Geza Lore, Fractile Ltd.]
* Add `--top` specifying `config` name (#6710). [Dan Ruelas-Petrisko]
* Add `sc_biguint` pragma (#6712). [Jakub Wasilewski, Antmicro Ltd.]
* Add `make venv` target (#6775). [Geza Lore]
* Add SUPERNFIRST error on super.new on non-first statement (#6784). [Artur Bieniek]
* Add fargs for reusability of `--dump-inputs` output (#6812). [Geza Lore]
* Add `--quiet-build` to suppress make/compiler informationals.
* Support `std::randomize(){...}` (#4706) (#6573). [Yilou Wang]
* Support force assignments to unpacked array elements (partial #4735) (#6787). [Ryszard Rozak, Antmicro Ltd.]
* Support `config' (#5891) (#6714) (#6717) (#6745) (#6764). [Dan Ruelas-Petrisko]
* Support unpacked struct in localparam (#6053 partial) (#6708). [Jonathan Drolet]
* Support `randsequence` (#6131).
* Support array reference arguments into 'std::randomize()' (#6384) (#6719). [Yilou Wang]
* Support basic global constraints (#6551) (#6552). [Yilou Wang]
* Support SystemC time resolution with step 10/100 (#6633) (#6715). [Aliaksei Chapyzhenka]
* Support `this.randomize()` with constraints (#6634). [Artur Bieniek, Antmicro Ltd.]
* Support multi-expression sequences (#6639). [Bartłomiej Chmiel, Antmicro Ltd.]
* Support `#1step` delay as statement (#6671). [Pawel Kojma, Antmicro Ltd.]
* Support clocking output delay `1step` (#6681). [Ondrej Ille]
* Support parsing of dotted `bins_expression` (#6683). [Pawel Kojma, Antmicro Ltd.]
* Support constant expression cycle delays in sequences (#6691). [Ryszard Rozak, Antmicro Ltd.]
* Support general global constraints (#6709) (#6711) (#7833) (#7838). [Yilou Wang]
* Support complex std::randomize patterns (#6736) (#6737). [Yilou Wang]
* Support `rand_mode` in global constraint gathering (#6740) (#6752). [Yilou Wang]
* Support reduction or in constraints (#6840). [Pawel Kojma, Antmicro Ltd.]
* Support vpiSigned (#6868) (#6870). [Kaleb Barrett]
* Optimize away calls to empty functions (#6626). [Geza Lore]
* Optimize redundant headers in Syms implementation files. [Geza Lore, Fractile Ltd.]
* Optimize constructor/destructor VerilatedModules (#6660). [Geza Lore, Fractile Ltd.]
* Optimize repeated function call during symbol table initialization (#6665). [Geza Lore, Fractile Ltd.]
* Optimize functions reading external parameters as pure (#6684). [Geza Lore, Fractile Ltd.]
* Optimize `$past` delayed variable reuse (#6689). [Geza Lore, Fractile Ltd.]
* Optimize combinational loops through sign extension (#6724). [Geza Lore]
* Optimize trace initialization code size (#6749). [Geza Lore]
* Optimize combinational cycles in DFG (#6744) (#6746) (#6744). [Geza Lore]
* Optimize inlining small C functions and add `-inline-cfuncs` (#6815). [Jose Drowne]
* Fix generate function(s) inside of generate blocks (#1011) (#6789). [em2machine]
* Fix typedef derived from type defined inside interface (#3441) (#6776). [em2machine]
* Fix warning lint directive ordering and consistency (#4185) (#5368) (#5610) (#6876).
* Fix extern function that returns parameterized class (#4924).
* Fix type deduction for variable parameterized classes (#6281) (#6813). [em2machine]
* Fix randomize called within func/task (#6144) (#6753). [Yilou Wang]
* Fix pre/post_randomize on extended classes (#6467). [Alex Solomatnikov]
* Fix expression short circuiting (#6483). [Todd Strader]
* Fix resized lvalues with warning suppressed (#6497) (#6816). [Alex Solomatnikov]
* Fix unsupported `if` virtual interface warning (#6558) (#6861). [Krzysztof Bieganski, Antmicro Ltd.]
* Fix expression coverage of system calls (#6592). [Todd Strader]
* Fix `--timing` with `--x-initial-edge` (#6603) (#6631). [Krzysztof Bieganski, Antmicro Ltd.]
* Fix merging of impure assignments in gate optimization (#6629) (#6630). [Geza Lore]
* Fix determining Verilator revision when within git submodules without tags.
* Fix initial random values for verilator-created variables (#6611). [Todd Strader]
* Fix parsing of `with` clause inside covergroups (#6618). [Pawel Kojma, Antmicro Ltd.]
* Fix slice memory overflow on large output arrays (#6636) (#6638). [Jens Yuechao Liu]
* Fix localparam type assignment from interface type parameters (#6637) (#6732). [em2machine]
* Fix memory usage statistics on MacOS (#6644). [Geza Lore, Fractile Ltd.]
* Fix command line statistics with --stats (#6645) (#6646). [Geza Lore, Fractile Ltd.]
* Fix slow compilation of generated sampled value code (#6652). [Geza Lore, Fractile Ltd.]
* Fix non-deterministic output when splitting Syms file. [Geza Lore, Fractile Ltd.]
* Fix crash on DFG driver lookup (#6649). [Geza Lore]
* Fix ccache-report with PCH files. [Geza Lore, Fractile Ltd.]
* Fix parameterized class function (#6659) (#6802). [em2machine]
* Fix local interface parameter hierarchical access (#6661) (#6666). [Paul Swirhun]
* Fix splitting of Syms constructor/destructor bodies (#6662). [Geza Lore, Fractile Ltd.]
* Fix long C++ compilation due to VerilatedScope constructors (#6664). [Geza Lore, Fractile Ltd.]
* Fix large array initialization (#6669). [Artur Bieniek, Antmicro Ltd.]
* Fix `--expand-limit` not respected for expressions (#6670). [Geza Lore, Fractile Ltd.]
* Fix `free` name collision (#6675). [Todd Strader]
* Fix bounds checking in non-inlined function (#6677). [Geza Lore, Fractile Ltd.]
* Fix stream operator widening (#6693) (#6697). [Jean-Nicolas Strauss]
* Fix multitop cross references (#6699).
* Fix DFG independent bits analysis performance (#6713) (#6743). [Geza Lore]
* Fix deleting linked node error in V3Randomize (#6718). [Igor Zaworski, Antmicro Ltd.]
* Fix runtime worker thread stack sizes on MacOS (#6721). [Geza Lore]
* Fix X handling in UDPs (#6722) (#6723). [Michael Bikovitsky]
* Fix `--prof-exec` using `--lib-create`. [Geza Lore]
* Fix fork scheduling semantics (#6730). [Artur Bieniek, Antmicro Ltd.]
* Fix JSON output case statements (#6733).
* Fix internal fault when cross-class calling with DPI (#6735) (#6742). [Matthew Ballance]
* Fix write variable placement for global constraints (#6740) (#6750) (#6797). [Yilou Wang]
* Fix JSON dump missing output ports (#6751) (#6831). [Oleh Maksymenko]
* Fix resolution of specialized typedefs (#6754) (#6808) (#6834). [em2machine]
* Fix UNSUPPORTED on force / release with complex selects (#6755). [Ryszard Rozak, Antmicro Ltd.]
* Fix select assignment expansion (#6757). [Geza Lore]
* Fix `--lib-create` with multi-bit clocks (#6759). [Geza Lore]
* Fix DFG reusing volatile variables. [Geza Lore]
* Fix DFG assertion on out-of-bounds selects. [Geza Lore]
* Fix process reference giving no return statement error (#6767) (#6823). [Krzysztof Bieganski, Antmicro Ltd.]
* Fix class param static not found again error (#6768).
* Fix crash when super.new() called without a base class (#6772). [Matthew Ballance]
* Fix class-in-class extends with parameters (#6773).
* Fix enum item references in class extends with parameters.
* Fix reordering of function body inlined on RHS of <= NBA (#6780). [Geza Lore]
* Fix clang `-Wno-vla-cxx-extension` warning for UVM DPI tests (#6782)
* Fix `disable iff` in simple properties (#6783). [Ryszard Rozak, Antmicro Ltd.]
* Fix input sampling of clocking block signals (#6788). [Pawel Kojma, Antmicro Ltd.]
* Fix O(n*2) analysis in const-bit-op-tree (#6791). [Geza Lore]
* Fix member select of variable without randmode (#6800) (#6833). [Yilou Wang]
* Fix duplicate name error with interface initial blocks (#6804) (#6805). [Thomas Dybdahl Ahle]
* Fix nested struct within parameter port list (#6818) (#6824). [Luca Colagrande]
* Fix setting thread count in VerilatedContext (#6826 partial) (#6841). [Yangyu Chen]
* Fix firing array selects of events (#6829). [Amal Araweelo Almis]
* Fix false IMPLICITSTATIC on localparam (#6835). [Geza Lore]
* Fix randcase under fork (#6843). [Amal Araweelo Almis]
* Fix JSON missing `signed` indication (#6845).
* Fix class reference throwing cannot detect changes error (#6851).
* Fix `randc` on extended class (#6852).
* Fix typedef `::` class reference error (#6862).
* Fix missing include on FreeBSD (#6864).
* Fix `--Wwarn-lint` to be inverse of `--Wno-lint`.
Verilator 5.042 2025-11-02
==========================
@@ -39,6 +841,7 @@ Verilator 5.042 2025-11-02
* Support modports referencing clocking blocks (#4555) (#6436). [Ryszard Rozak, Antmicro Ltd.]
* Support class package reference on pattern keys (#5653). [Todd Strader]
* Support digits in `$sscanf` field width formats (#6083). [Iztok Jeras]
* Support assert under assert (#6146). [Alex Solomatnikov]
* Support pure functions in sensitivity lists (#6393). [Krzysztof Bieganski, Antmicro Ltd.]
* Support simple alias statements (#6339) (#6501). [Ryszard Rozak, Antmicro Ltd.]
* Support simple cycle delay sequence expressions inside properties (#6508). [Bartłomiej Chmiel, Antmicro Ltd.]
@@ -236,6 +1039,8 @@ Verilator 5.040 2025-08-30
* Fix wide select expansion and substitution (#6341) (#6345). [Geza Lore]
* Fix upcasting class type parameters (#6344). [Krzysztof Bieganski, Antmicro Ltd.]
* Fix undefined weak link for Apple GCC etc (#6348). [Congcong Cai]
* Fix emitting unbounded parameters (#6912).
* Fix syntax error on unsupported defparam array (#6915).
Verilator 5.038 2025-07-08
@@ -259,7 +1064,7 @@ Verilator 5.038 2025-07-08
* Support non-overlapping blocking/non-blocking assignments (#6137). [Geza Lore]
* Support parameter forward types.
* Support constant functions with left-hand-side concatenates.
* Add PROCINITASSIGN on initial assignments to process variables (#2481). [Niraj Menon]
* Add PROCINITASSIGN on initial assignments to process variables (#2481) (#7640). [Niraj Menon]
* Add BADVLTPRAGMA on unknown Verilator pragmas (#5945). [Shou-Li Hsu]
* Add ternary operator into branch coverage (#5880). [Ryszard Rozak, Antmicro Ltd.]
* Add aggregate type error checks (#5570) (#5950). [Shou-Li Hsu]
@@ -445,6 +1250,7 @@ Verilator 5.034 2025-02-24
* Optimize labels as final `if` block statements (#5744).
* Optimize empty function definition bodies (#5750).
* Optimize splitting trigger computation and dump (#5798). [Geza Lore]
* Optimize some DFG multiplexers (#6822). [Yangyu Chen]
* Fix error message when call task as a function (#3089). [Matthew Ballance]
* Fix force VPI public signal visibility (#5225). [Frédéric Requin]
* Fix VPI iteration over hierarchy (#5314) (#5731). [Natan Kreimer]
@@ -1914,7 +2720,6 @@ Verilator 4.108 2021-01-10
* Fix to ignore coverage on real ports (#2741) (#2745). [Paul Wright]
Verilator 4.106 2020-12-02
==========================
@@ -2321,7 +3126,6 @@ Verilator 4.018 2019-08-29
* Fix internal error on gate optimization of assign. (#1475) [Oyvind Harboe]
Verilator 4.016 2019-06-16
==========================
@@ -4772,7 +5576,6 @@ Verilator 3.270 2004-10-15
* Fix numeric fault when dividing by zero.
Verilator 3.260 2004-10-07
==========================
@@ -5111,7 +5914,7 @@ Verilator 3.104 2003-04-30
**Major:**
* Indicate direction of ports with VL_IN and VL_OUT.
* Allow $c32, etc, to specify width of the $c statement for VCS.
* Allow $c32, etc, to specify width of the $c statement.
* Numerous performance improvements, worth about 25%
**Minor:**
@@ -5394,9 +6197,9 @@ Verilator 0.0 1994-07-08
Copyright
=========
Copyright 2001-2025 by Wilson Snyder. This program is free software; you
can redistribute it and/or modify it under the terms of either the GNU
Lesser General Public License Version 3 or the Perl Artistic License
Version 2.0.
This program is free software; you can redistribute it and/or modify it
under the terms of either the GNU Lesser General Public License Version 3
or the Perl Artistic License Version 2.0.
SPDX-FileCopyrightText: 2001-2025 Wilson Snyder
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
+267 -128
View File
@@ -1,165 +1,304 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.
0. Additional Definitions.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
"The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:
2. Conveying Modified Versions.
a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following:
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.
3. Object Code Incorporating Material from Library Header Files.
b) Accompany the object code with a copy of the GNU GPL and this license document.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
4. Combined Works.
You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
b) Accompany the Combined Work with a copy of the GNU GPL and this license document.
4. Combined Works.
c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
d) Do one of the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)
d) Do one of the following:
5. Combined Libraries.
You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
5. Combined Libraries.
Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
6. Revised Versions of the GNU Lesser General Public License.
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Preamble
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
The GNU General Public License is a free, copyleft license for software and other kinds of works.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS
0. Definitions.
“This License” refers to version 3 of the GNU General Public License.
“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
A “covered work” means either the unmodified Program or a work based on the Program.
To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
1. Source Code.
The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
7. Additional Terms.
“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
11. Patents.
A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”.
You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
+73
View File
@@ -0,0 +1,73 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+85
View File
@@ -0,0 +1,85 @@
The Artistic License 2.0
Copyright (c) 2000-2006, The Perl Foundation.
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Preamble
This license establishes the terms under which a given free software Package may be copied, modified, distributed, and/or redistributed. The intent is that the Copyright Holder maintains some artistic control over the development of that Package while still keeping the Package available as open source and free software.
You are always permitted to make arrangements wholly outside of this license directly with the Copyright Holder of a given Package. If the terms of this license do not permit the full use that you propose to make of the Package, you should contact the Copyright Holder and seek a different licensing arrangement.
Definitions
"Copyright Holder" means the individual(s) or organization(s) named in the copyright notice for the entire Package.
"Contributor" means any party that has contributed code or other material to the Package, in accordance with the Copyright Holder's procedures.
"You" and "your" means any person who would like to copy, distribute, or modify the Package.
"Package" means the collection of files distributed by the Copyright Holder, and derivatives of that collection and/or of those files. A given Package may consist of either the Standard Version, or a Modified Version.
"Distribute" means providing a copy of the Package or making it accessible to anyone else, or in the case of a company or organization, to others outside of your company or organization.
"Distributor Fee" means any fee that you charge for Distributing this Package or providing support for this Package to another party. It does not mean licensing fees.
"Standard Version" refers to the Package if it has not been modified, or has been modified only in ways explicitly requested by the Copyright Holder.
"Modified Version" means the Package, if it has been changed, and such changes were not explicitly requested by the Copyright Holder.
"Original License" means this Artistic License as Distributed with the Standard Version of the Package, in its current version or as it may be modified by The Perl Foundation in the future.
"Source" form means the source code, documentation source, and configuration files for the Package.
"Compiled" form means the compiled bytecode, object code, binary, or any other form resulting from mechanical transformation or translation of the Source form.
Permission for Use and Modification Without Distribution
(1) You are permitted to use the Standard Version and create and use Modified Versions for any purpose without restriction, provided that you do not Distribute the Modified Version.
Permissions for Redistribution of the Standard Version
(2) You may Distribute verbatim copies of the Source form of the Standard Version of this Package in any medium without restriction, either gratis or for a Distributor Fee, provided that you duplicate all of the original copyright notices and associated disclaimers. At your discretion, such verbatim copies may or may not include a Compiled form of the Package.
(3) You may apply any bug fixes, portability changes, and other modifications made available from the Copyright Holder. The resulting Package will still be considered the Standard Version, and as such will be subject to the Original License.
Distribution of Modified Versions of the Package as Source
(4) You may Distribute your Modified Version as Source (either gratis or for a Distributor Fee, and with or without a Compiled form of the Modified Version) provided that you clearly document how it differs from the Standard Version, including, but not limited to, documenting any non-standard features, executables, or modules, and provided that you do at least ONE of the following:
(a) make the Modified Version available to the Copyright Holder of the Standard Version, under the Original License, so that the Copyright Holder may include your modifications in the Standard Version.
(b) ensure that installation of your Modified Version does not prevent the user installing or running the Standard Version. In addition, the Modified Version must bear a name that is different from the name of the Standard Version.
(c) allow anyone who receives a copy of the Modified Version to make the Source form of the Modified Version available to others under
(i) the Original License or
(ii) a license that permits the licensee to freely copy, modify and redistribute the Modified Version using the same licensing terms that apply to the copy that the licensee received, and requires that the Source form of the Modified Version, and of any works derived from it, be made freely available in that license fees are prohibited but Distributor Fees are allowed.
Distribution of Compiled Forms of the Standard Version or Modified Versions without the Source
(5) You may Distribute Compiled forms of the Standard Version without the Source, provided that you include complete instructions on how to get the Source of the Standard Version. Such instructions must be valid at the time of your distribution. If these instructions, at any time while you are carrying out such distribution, become invalid, you must provide new instructions on demand or cease further distribution. If you provide valid instructions or cease distribution within thirty days after you become aware that the instructions are invalid, then you do not forfeit any of your rights under this license.
(6) You may Distribute a Modified Version in Compiled form without the Source, provided that you comply with Section 4 with respect to the Source of the Modified Version.
Aggregating or Linking the Package
(7) You may aggregate the Package (either the Standard Version or Modified Version) with other packages and Distribute the resulting aggregation provided that you do not charge a licensing fee for the Package. Distributor Fees are permitted, and licensing fees for other components in the aggregation are permitted. The terms of this license apply to the use and Distribution of the Standard or Modified Versions as included in the aggregation.
(8) You are permitted to link Modified and Standard Versions with other works, to embed the Package in a larger work of your own, or to build stand-alone binary or bytecode versions of applications that include the Package, and Distribute the result without restriction, provided the result does not expose a direct interface to the Package.
Items That are Not Considered Part of a Modified Version
(9) Works (including, but not limited to, modules and scripts) that merely extend or make use of the Package, do not, by themselves, cause the Package to be a Modified Version. In addition, such works are not considered parts of the Package itself, and are not subject to the terms of this license.
General Provisions
(10) Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license.
(11) If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license.
(12) This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder.
(13) This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed.
(14) Disclaimer of Warranty:
THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+11
View File
@@ -0,0 +1,11 @@
Copyright (c) <year> <owner>.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+121
View File
@@ -0,0 +1,121 @@
Creative Commons Legal Code
CC0 1.0 Universal
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
HEREUNDER.
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.
For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.
1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:
i. the right to reproduce, adapt, distribute, perform, display,
communicate, and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.
2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.
3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.
4. Limitations and Disclaimers.
a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.
+8
View File
@@ -0,0 +1,8 @@
ISC License:
Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
Copyright (c) 1995-2003 by Internet Software Consortium
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+304
View File
@@ -0,0 +1,304 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License.
"The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version".
The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:
a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:
a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license document.
c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.
e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for software and other kinds of works.
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS
0. Definitions.
“This License” refers to version 3 of the GNU General Public License.
“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
A “covered work” means either the unmodified Program or a work based on the Program.
To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
1. Source Code.
The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
7. Additional Terms.
“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
11. Patents.
A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”.
You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
@@ -0,0 +1,7 @@
This Verilog file was developed by Altera Corporation. It may be
freely copied and/or distributed at no cost. Any persons using this
file for any purpose do so at their own risk, and are responsible for
the results of such use. Altera Corporation does not guarantee that
this file is complete, correct, or fit for any particular purpose.
NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED. This notice must
accompany any copy of this file.
+22
View File
@@ -0,0 +1,22 @@
This license is used on IEEE files where there is a permitted use of
standards, including copying strictly necessary to implement normative
interfaces defined by the standard. Refer to IEEE SA Operations Manual
Clause 6.1 and IEEE Standards Permission policies.
--
Copyright 2024 by The Institute of Electrical and Electronics Engineers, Inc.
All rights reserved.
IEEE, 802, and POSIX are registered trademarks in the U.S. Patent &
Trademark Office, owned by The Institute of Electrical and Electronics
Engineers, Incorporated.
IEEE draft and approved standards are copyrighted by IEEE under US and
international copyright laws. They are made available by IEEE and are
adopted for a wide variety of both public and private uses. These include
both use, by reference, in laws and regulations, and use in private
self-regulation, standardization, and the promotion of engineering
practices and methods. By making these documents available for use and
adoption by public authorities and private users, neither IEEE nor its
licensors waive any rights in copyright to the documents.
+18
View File
@@ -0,0 +1,18 @@
MIT License
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
+10
View File
@@ -0,0 +1,10 @@
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org/>
+176 -66
View File
@@ -7,10 +7,10 @@
#
#*****************************************************************************
#
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2025-2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
#
#****************************************************************************/
@@ -94,6 +94,7 @@ CFG_WITH_DEFENV = @CFG_WITH_DEFENV@
CFG_WITH_DEV_GCOV = @CFG_WITH_DEV_GCOV@
CFG_WITH_LONGTESTS = @CFG_WITH_LONGTESTS@
CFG_WITH_SOLVER = @CFG_WITH_SOLVER@
GCOV = @GCOV@
PACKAGE_VERSION = @PACKAGE_VERSION@
#### End of system configuration section. ####
@@ -260,7 +261,7 @@ VL_INST_INC_SRCDIR_FILES = \
include/*.[chv]* \
include/*.vlt \
include/*.sv \
include/gtkwave/*.[chv]* \
include/fstcpp/*.[chv]* \
include/vltstd/*.[chv]* \
VL_INST_DATA_SRCDIR_FILES = \
@@ -292,15 +293,14 @@ installbin: | mkbindirs
done
installredirect: installbin | mkbindirs
cp ${srcdir}/bin/redirect ${srcdir}/bin/redirect.tmp
perl -p -i -e 'use File::Spec;' \
-e' $$path = File::Spec->abs2rel("$(realpath $(DESTDIR)$(bindir))", "$(realpath $(DESTDIR)$(pkgdatadir)/bin)");' \
-e 's/RELPATH.*/"$$path";/g' -- "${srcdir}/bin/redirect.tmp"
cd $(srcdir)/bin; \
REDIR_SCRATCH=$$(mktemp redir_XXXXXX); \
perl -p -e 'use File::Spec;' \
-e' $$path = File::Spec->abs2rel("$(realpath $(DESTDIR)$(bindir))", "$(realpath $(DESTDIR)$(pkgdatadir)/bin)");' \
-e 's/RELPATH.*/"$$path";/g' -- "${srcdir}/bin/redirect" > $$REDIR_SCRATCH; \
for p in $(VL_INST_PUBLIC_SCRIPT_FILES) $(VL_INST_PUBLIC_BIN_FILES) ; do \
$(INSTALL_PROGRAM) redirect.tmp $(DESTDIR)$(pkgdatadir)/bin/$$p; \
done
rm ${srcdir}/bin/redirect.tmp
$(INSTALL_PROGRAM) $$REDIR_SCRATCH $(DESTDIR)$(pkgdatadir)/bin/$$p; \
done; \
rm $$REDIR_SCRATCH
# Man files can either be part of the original kit, or built in current directory
# So important we use $^ so VPATH is searched
@@ -311,7 +311,7 @@ installman: $(VL_INST_MAN_FILES)
done
installdata:
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/include/gtkwave
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/include/fstcpp
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/include/vltstd
for p in $(VL_INST_INC_BLDDIR_FILES) ; do \
$(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p; \
@@ -356,7 +356,7 @@ uninstall:
-rm $(DESTDIR)$(pkgdatadir)/verilator-config.cmake
-rm $(DESTDIR)$(pkgdatadir)/verilator-config-version.cmake
-rmdir $(DESTDIR)$(pkgdatadir)/bin
-rmdir $(DESTDIR)$(pkgdatadir)/include/gtkwave
-rmdir $(DESTDIR)$(pkgdatadir)/include/fstcpp
-rmdir $(DESTDIR)$(pkgdatadir)/include/vltstd
-rmdir $(DESTDIR)$(pkgdatadir)/include
-rmdir $(DESTDIR)$(pkgdatadir)/examples/make_hello_binary
@@ -398,9 +398,12 @@ CPPCHECK_RUNTIME_CPP = $(wildcard $(srcdir)/include/*.cpp)
CPPCHECK_VLC_CPP = $(wildcard $(srcdir)/src/Vlc*.cpp)
CPPCHECK_EXAMPLES_CPP = $(wildcard $(srcdir)/examples/*/*.cpp)
CHECK_CPP = $(CPPCHECK_VERILATOR_CPP) $(CPPCHECK_RUNTIME_CPP) $(CPPCHECK_VLC_CPP) $(CPPCHECK_EXAMPLES_CPP)
CHECK_H = $(wildcard \
CHECK_H = $(filter-out \
$(srcdir)/src/config_package.h \
$(srcdir)/src/config_rev.h, \
$(wildcard \
$(srcdir)/include/*.h \
$(srcdir)/src/*.h )
$(srcdir)/src/*.h ))
CHECK_YL = $(wildcard \
$(srcdir)/src/*.y \
$(srcdir)/src/*.l )
@@ -414,7 +417,7 @@ CPPCHECK_FLAGS += --cppcheck-build-dir=$(CPPCHECK_CACHE)
CPPCHECK_FLAGS += -DVL_DEBUG=1 -DVL_CPPCHECK=1 -DINFILTER_PIPE=1 -D__GNUC__=1
CPPCHECK_FLAGS += -j$(CPPCHECK_JOBS)
CPPCHECK_INC = -I$(srcdir)/include
CPPCHECK_INC += -I$(srcdir)/include/gtkwave
CPPCHECK_INC += -I$(srcdir)/include/fstcpp
CPPCHECK_INC += -I$(srcdir)/include/vltstd
CPPCHECK_INC += -I$(srcdir)/src/obj_dbg
CPPCHECK_INC += -I$(srcdir)/src
@@ -441,7 +444,9 @@ cppcheck:
CLANGTIDY = clang-tidy
CLANGTIDY_FLAGS = -config='' \
-header-filter='.*' \
-checks='-fuchsia-*,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-init-variables,-cppcoreguidelines-avoid-goto,-modernize-avoid-c-arrays,-readability-magic-numbers,-readability-simplify-boolean-expr,-cppcoreguidelines-macro-usage' \
-checks='*,-abseil-*,-fuchsia-*,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-avoid-do-while,-cppcoreguidelines-init-variables,-cppcoreguidelines-avoid-goto,-modernize-avoid-c-arrays,-readability-magic-numbers,-readability-simplify-boolean-expr,-cppcoreguidelines-macro-usage' \
# Good checks: -checks='-*,bugprone-assignment-in-if-condition,google-build-using-namespace,google-readability-casting,modernize-use-default-member-init,modernize-use-emplace,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-nullptr,performance-faster-string-find,readability-isolate-declaration,readability-redundant-control-flow,readability-redundant-member-init,readability-redundant-string-cstr,readability-uppercase-literal-suffix
CLANGTIDY_DEP = $(subst .cpp,.cpp.tidy,$(CHECK_CPP))
CLANGTIDY_DEFS = -DVL_DEBUG=1 -DVL_CPPCHECK=1
@@ -460,23 +465,21 @@ analyzer-include:
-rm -rf examples/*/obj*
scan-build $(MAKE) -k examples
format:
$(MAKE) -j 5 format-c format-cmake format-exec format-py
CLANGFORMAT = clang-format-18
CLANGFORMAT_FLAGS = -i
CLANGFORMAT_FILES = $(CHECK_CPP) $(CHECK_H) $(CHECK_YL) test_regress/t/*.c* test_regress/t/*.h
format-c clang-format:
$(CLANGFORMAT) --version
@$(CLANGFORMAT) --version | fgrep 'version 18' > /dev/null \
|| echo "*** You are not using clang-format-18, indents may differ from master's ***"
$(CLANGFORMAT) $(CLANGFORMAT_FLAGS) $(CLANGFORMAT_FILES)
YAMLFIX = YAMLFIX_WHITELINES=1 YAMLFIX_LINE_LENGTH=200 YAMLFIX_preserve_quotes=true yamlfix
yamlfix:
$(YAMLFIX) .
# Bash/sh files
BASH_FILES = \
ci/ci-coverage-report.bash \
ci/ci-install.bash \
ci/ci-pages-notify.bash \
ci/ci-pages.bash \
ci/ci-rtlmeter-report.bash \
ci/ci-script.bash \
ci/docker/run/hooks/post_push \
ci/docker/run/verilator-docker \
ci/docker/run/verilator-wrap.sh \
nodist/fuzzer/all \
nodist/fuzzer/run \
nodist/fuzzer/setup_root \
nodist/fuzzer/setup_user \
# CMake files
CMAKE_FILES = \
@@ -495,6 +498,17 @@ MAKE_FILES = \
src/Makefile*.in \
test_regress/Makefile* \
# Markdown
MD_FILES = \
*.md \
*/*.md \
# Perl programs
PERL_PROGRAMS = \
bin/redirect \
bin/verilator \
bin/verilator_coverage \
# Python programs, subject to format and lint
PY_PROGRAMS = \
bin/verilator_ccache_report \
@@ -502,54 +516,126 @@ PY_PROGRAMS = \
bin/verilator_gantt \
bin/verilator_includer \
bin/verilator_profcfunc \
examples/json_py/vl_file_copy \
examples/json_py/vl_hier_graph \
docs/guide/conf.py \
docs/bin/vl_sphinx_extract \
docs/bin/vl_sphinx_fix \
src/astgen \
src/bisonpre \
src/config_rev \
src/flexfix \
src/vlcovgen \
src/.gdbinit.py \
test_regress/*.py \
test_regress/t/*.pf \
docs/guide/conf.py \
examples/json_py/vl_file_copy \
examples/json_py/vl_hier_graph \
nodist/clang_check_attributes \
nodist/dot_importer \
nodist/fuzzer/actual_fail \
nodist/fuzzer/generate_dictionary \
nodist/install_test \
nodist/lint_py_test_filter \
nodist/log_changes \
nodist/uvm_pkg_packer \
nodist/verilator_bisect \
nodist/verilator_saif_diff \
src/.gdbinit.py \
src/astgen \
src/bisonpre \
src/config_rev \
src/flexfix \
src/vlcovgen \
test_regress/*.py \
test_regress/t/*.pf \
test_regress/t/randomize_solver_tamper.py \
# Python files, subject to format but not lint
PY_FILES = \
$(PY_PROGRAMS) \
ci/*.py \
test_regress/t/*.py \
# Python files, test_regress tests
PY_TEST_FILES = test_regress/t/*.py
YAPF = yapf3
# reStructuredText Sphinx files
RST_FILES = \
*.rst \
*/*.rst \
ci/docker/*/*.rst \
docs/guide/*.rst \
# YAML files
YAML_FILES = \
.*.yaml \
.*.yml \
.github/*.yml \
.github/*/*.yml \
CITATION.cff \
######################################################################
# Format
format:
$(MAKE) -j 5 format-c format-cmake format-exec format-md format-py format-rst format-yaml
BEAUTYSH = beautysh
BEAUTYSH_FLAGS = --indent-size 2
format-bash:
$(BEAUTYSH) --version
$(BEAUTYSH) $(BEAUTYSH_FLAGS) $(BASH_FILES)
CLANGFORMAT = clang-format-18
CLANGFORMAT_FLAGS = -i
CLANGFORMAT_FILES = $(CHECK_CPP) $(CHECK_H) $(CHECK_YL) test_regress/t/*.c* test_regress/t/*.h
format-c clang-format:
$(CLANGFORMAT) --version
@$(CLANGFORMAT) --version | fgrep 'version 18' > /dev/null \
|| echo "*** You are not using clang-format-18, indents may differ from master's ***"
$(CLANGFORMAT) $(CLANGFORMAT_FLAGS) $(CLANGFORMAT_FILES)
GERSEMI = gersemi
GERSEMI_FLAGS = -i --no-warn-about-unknown-commands
format-cmake:
$(GERSEMI) --version
$(GERSEMI) $(GERSEMI_FLAGS) $(CMAKE_FILES)
MBAKE = mbake
MBAKE_FLAGS = format --config ./.bake.toml
format-exec:
-chmod a+x test_regress/t/t_*.py
-chmod a-x test_regress/t/*.v
format-make mbake:
$(MBAKE) --version
$(MBAKE) $(MBAKE_FLAGS) $(MAKE_FILES)
MDFORMAT = mdformat
MDFORMAT_FLAGS =
format-md:
$(MDFORMAT) --version
$(MDFORMAT) $(MDFORMAT_FLAGS) $(MD_FILES)
YAPF = yapf
YAPF_FLAGS = -i --parallel
format-py yapf:
$(YAPF) --version
$(YAPF) $(YAPF_FLAGS) $(PY_FILES)
GERSEMI = gersemi
GERSEMI_FLAGS = -i --no-warn-about-unknown-commands
DOCSTRFMT = docstrfmt
DOCSTRFMT_FLAGS = --line-length 75 --indent-width 3 --keep-blanks --ordered-marker "\#" --preserve-adornments --no-center-section-titles
format-cmake:
$(GERSEMI) $(GERSEMI_FLAGS) $(CMAKE_FILES)
format-rst:
$(DOCSTRFMT) --version
$(DOCSTRFMT) $(DOCSTRFMT_FLAGS) $(RST_FILES)
MBAKE = mbake
MBAKE_FLAGS = format --config ./.bake.toml
YAMLFIX = YAMLFIX_WHITELINES=1 YAMLFIX_LINE_LENGTH=200 YAMLFIX_preserve_quotes=true yamlfix
YAMLFIX_FLAGS =
format-make:
$(MBAKE) $(MBAKE_FLAGS) $(MAKE_FILES)
format-yaml yamlfix:
$(YAMLFIX) --version
$(YAMLFIX) $(YAMLFIX_FLAGS) $(YAML_FILES)
format-yaml: yamlfix
######################################################################
# Lint
MYPY = mypy
MYPY_FLAGS = --strict --no-error-summary
@@ -583,9 +669,6 @@ lint-py-pylint-tests:
lint-py-ruff:
$(RUFF) $(RUFF_FLAGS) $(PY_PROGRAMS)
format-exec:
-chmod a+x test_regress/t/*.py
######################################################################
# Configure
@@ -616,22 +699,30 @@ COVERAGE_DIR := obj_coverage
ifeq ($(CFG_WITH_DEV_GCOV),yes)
# Figure out base and head refs for coverage report
COVERAGE_REF_BASE := $(if $(COVERAGE_BASE),$(shell git rev-parse --short $(COVERAGE_BASE)))
COVERAGE_REF_BASE := $(if $(COVERAGE_BASE),$(shell git rev-parse --short $(COVERAGE_BASE) 2>/dev/null))
ifneq ($(COVERAGE_BASE),)
ifeq ($(COVERAGE_REF_BASE),)
$(error COVERAGE_BASE='$(COVERAGE_BASE)' is not a valid git revision)
endif
endif
COVERAGE_REF_HEAD := $(shell git rev-parse --short HEAD)
override undefine COVERAGE_BASE # Use the above variabels instead
# 'fastcov' setup
FASTCOV := nodist/fastcov.py
FASTCOV_OPT := -j $(shell nproc)
FASTCOV_OPT += --gcov $(GCOV)
FASTCOV_OPT += --lcov
FASTCOV_OPT += --process-gcno
FASTCOV_OPT += --branch-coverage
FASTCOV_OPT += --dump-statistic
# Files matching the following glob patterns will be excluded from coverage
FASTCOV_OPT += --exclude-glob
FASTCOV_OPT += '/usr/*'
FASTCOV_OPT += '/usr/include/*'
FASTCOV_OPT += '/usr/lib*/*'
FASTCOV_OPT += '/usr/share/*'
FASTCOV_OPT += '*examples/*'
FASTCOV_OPT += '*include/gtkwave/*'
FASTCOV_OPT += '*include/fstcpp/*'
FASTCOV_OPT += '*src/obj_dbg/*'
FASTCOV_OPT += '*src/obj_opt/*.yy.cpp'
FASTCOV_OPT += '*src/obj_opt/V3Ast*'
@@ -670,6 +761,7 @@ GENHTML_OPT += --missed
GENHTML_OPT += --rc branch_coverage=1
GENHTML_OPT += --rc genhtml_hi_limit=100
GENHTML_OPT += --ignore-errors negative
GENHTML_OPT += --ignore-errors inconsistent
ifeq ($(COVERAGE_REF_BASE),)
GENHTML_OPT += --header-title "Code coverage for Verilator $(shell git describe --dirty)"
else
@@ -701,7 +793,7 @@ $(COVERAGE_DIR)/verilator-patch.info: $(COVERAGE_DIR)/verilator.info
@echo "####################################################################"
rm -f $(COVERAGE_DIR)/empty-patch
git diff $(COVERAGE_REF_BASE) -- include src > $(COVERAGE_DIR)/filter.patch
[ -s $(COVERAGE_DIR)/filter.patch ]] || touch $(COVERAGE_DIR)/empty-patch
[ -s $(COVERAGE_DIR)/filter.patch ] || touch $(COVERAGE_DIR)/empty-patch
$(FASTCOV) -C $^ --lcov -o $@ --diff-filter $(COVERAGE_DIR)/filter.patch
# Build coverage report
@@ -710,7 +802,7 @@ $(COVERAGE_DIR)/report/index.html: $(COVERAGE_DIR)/verilator$(if $(COVERAGE_REF_
@echo "# genhtml: Generating coverage report"
@echo "####################################################################"
@rm -rf $(COVERAGE_DIR)/report
[ -f $(COVERAGE_DIR)/empty-patch ]] || /usr/bin/time -f "That took %E" \
[ -f $(COVERAGE_DIR)/empty-patch ] || /usr/bin/time -f "That took %E" \
$(GENHTML) $(GENHTML_OPT) --output-directory $(COVERAGE_DIR)/report $^ || true
@# Uncommitted changes not tracked, force rebuild on next run if patch coverage
@$(if $(COVERAGE_REF_BASE),mv $(COVERAGE_DIR)/verilator-patch.info $(COVERAGE_DIR)/verilator-patch-last.info)
@@ -781,7 +873,7 @@ clean mostlyclean distclean maintainer-clean::
distclean maintainer-clean::
rm -f *.info* *.1 $(INFOS) $(INFOS_OLD) $(VL_INST_MAN_FILES)
rm -f Makefile config.status config.cache config.log TAGS
rm -f Makefile config.status config.cache config.log configure~ TAGS
rm -f verilator_bin* verilator_coverage_bin*
rm -f bin/verilator_bin* bin/verilator_coverage_bin*
rm -f include/verilated.mk include/verilated_config.h
@@ -806,3 +898,21 @@ preexist:
maintainer-dist: preexist tag
svnorcvs release $(DISTTAGNAME)
######################################################################
# Python venv
VENV_PATH ?= .venv
.PHONY: venv
venv:
# Create virtual environment using the python3 picked up by configure
[ -e $(VENV_PATH) ] || @PYTHON3@ -m venv --system-site-packages $(VENV_PATH)
# Install python3 dependencies, with explicit retry
$(VENV_PATH)/bin/pip3 install -r python-dev-requirements.txt || \
$(VENV_PATH)/bin/pip3 install -r python-dev-requirements.txt
@echo
@echo "Installed Python virtual environment, in:"
@echo " $(VENV_PATH)"
@echo "To activate, run:"
@echo " source $(VENV_PATH)/bin/activate"
+84 -67
View File
@@ -1,89 +1,99 @@
.. Github doesn't render images unless absolute URL
.. Do not know of a conditional tag, "only: github" nor "github display" works
..
Github doesn't render images unless absolute URL
Do not know of a conditional tag, "only: github" nor "github display" works
SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|badge1| |badge2| |badge3| |badge4| |badge5| |badge7| |badge8|
|badge1| |badge2| |badge3| |badge4| |badge5|
|badge7| |badge8|
.. |badge1| image:: https://img.shields.io/badge/Website-Verilator.org-181717.svg
:target: https://verilator.org
.. |badge2| image:: https://img.shields.io/badge/License-LGPL%20v3-blue.svg
:target: https://www.gnu.org/licenses/lgpl-3.0
.. |badge3| image:: https://img.shields.io/badge/License-Artistic%202.0-0298c3.svg
:target: https://opensource.org/licenses/Artistic-2.0
.. |badge4| image:: https://repology.org/badge/tiny-repos/verilator.svg?header=distro%20packages
:target: https://repology.org/project/verilator/versions
.. |badge5| image:: https://img.shields.io/docker/pulls/verilator/verilator
:target: https://hub.docker.com/r/verilator/verilator
.. |badge7| image:: https://github.com/verilator/verilator/workflows/build/badge.svg
:target: https://github.com/verilator/verilator/actions?query=workflow%3Abuild
.. |badge8| image:: https://img.shields.io/github/actions/workflow/status/verilator/verilator/rtlmeter.yml?branch=master&event=schedule&label=benchmarks
:target: https://verilator.github.io/verilator-rtlmeter-results
:target: https://verilator.org
.. |badge2| image:: https://img.shields.io/badge/License-LGPL%20v3-blue.svg
:target: https://www.gnu.org/licenses/lgpl-3.0
.. |badge3| image:: https://img.shields.io/badge/License-Artistic%202.0-0298c3.svg
:target: https://opensource.org/licenses/Artistic-2.0
.. |badge4| image:: https://repology.org/badge/tiny-repos/verilator.svg?header=distro%20packages
:target: https://repology.org/project/verilator/versions
.. |badge5| image:: https://img.shields.io/docker/pulls/verilator/verilator
:target: https://hub.docker.com/r/verilator/verilator
.. |badge7| image:: https://img.shields.io/github/actions/workflow/status/verilator/verilator/build-test.yml?branch=master&label=regressions
:target: https://github.com/verilator/verilator/actions/workflows/build-test.yml
.. |badge8| image:: https://img.shields.io/github/actions/workflow/status/verilator/verilator/rtlmeter.yml?branch=master&event=schedule&label=benchmarks
:target: https://verilator.github.io/verilator-rtlmeter-results
Welcome to Verilator
====================
.. list-table::
* - **Welcome to Verilator, the fastest Verilog/SystemVerilog simulator.**
* Accepts Verilog or SystemVerilog
* Performs lint code-quality checks
* Compiles into multithreaded C++, or SystemC
* Creates XML to front-end your own tools
- - **Welcome to Verilator, the fastest Verilog/SystemVerilog simulator.**
- Accepts Verilog or SystemVerilog
- Performs lint code-quality checks
- Compiles into multithreaded C++, or SystemC
- Creates JSON to front-end your own tools
- |Logo|
* - |verilator multithreaded performance|
- - |verilator multithreaded performance|
- **Fast**
* Outperforms many closed-source commercial simulators
* Single- and multithreaded output models
* - **Widely Used**
* Wide industry and academic deployment
* Out-of-the-box support from Arm and RISC-V vendor IP
* Over 700 contributors
- Outperforms many closed-source commercial simulators
- Single- and multithreaded output models
- - **Widely Used**
- Wide industry and academic deployment
- Out-of-the-box support from Arm and RISC-V vendor IP
- Over 700 contributors
- |verilator usage|
* - |verilator community|
- - |verilator community|
- **Community Driven & Openly Licensed**
* Guided by the `CHIPS Alliance`_ and `Linux Foundation`_
* Open, and free as in both speech and beer
* More simulation for your verification budget
* - **Commercial Support Available**
* Commercial support contracts
* Design support contracts
* Enhancement contracts
- Guided by the `CHIPS Alliance`_ and `Linux Foundation`_
- Open, and free as in both speech and beer
- More simulation for your verification budget
- - **Commercial Support Available**
- Commercial support contracts
- Design support contracts
- Enhancement contracts
- |verilator support|
What Verilator Does
===================
Verilator is invoked with parameters similar to GCC or Synopsys's VCS. It
Verilator is invoked with parameters similar to GCC or Synopsys's VCS. It
"Verilates" the specified Verilog or SystemVerilog code by reading it,
performing lint checks, and optionally inserting assertion checks and
coverage-analysis points. It outputs single- or multithreaded .cpp and .h
files, the "Verilated" code.
These Verilated C++/SystemC files are then compiled by a C++ compiler
(gcc/clang/MSVC++), optionally along with a user's own C++/SystemC wrapper
file, to instantiate the Verilated model. Executing the resulting
executable performs the design simulation. Verilator also supports linking
Verilated generated libraries, optionally encrypted, into other simulators.
Verilator may not be the best choice if you are expecting a full-featured
replacement for a closed-source Verilog simulator, need SDF annotation,
mixed-signal simulation, or are doing a quick class project (we recommend
`Icarus Verilog`_ for classwork). However, if you are looking for a path
to migrate SystemVerilog to C++/SystemC, or want high-speed simulation of
designs, Verilator is the tool for you.
Verilator can automatically generate a simulator executable (using
``--binary``), or users can write their own C++/SystemC wrapper to
instantiate the model. The resulting Verilated executable performs the
design simulation. Verilator also supports linking Verilator-generated
libraries, optionally encrypted, into other simulators.
Verilator supports all design constructs, most verification constructs,
intra-assignment delays (e.g, `#10`), and events. Tristate-bus (`z`) and
unknowns (`x`) are handled in limited contexts, in a special manor for
performance. It currently may not be the best choice if you are expecting a
full-featured replacement for a closed-source Verilog simulator, performing
SDF annotation, or mixed-signal simulation. However, if you are looking for
a path to migrate SystemVerilog to C++/SystemC, or want high-speed
simulation, Verilator is the tool for you.
Performance
===========
Verilator does not directly translate Verilog HDL to C++ or SystemC. Rather,
Verilator compiles your code into a much faster optimized and optionally
thread-partitioned model, which is in turn wrapped inside a C++/SystemC
module. The results are a compiled Verilog model that executes even on a
single thread over 10x faster than standalone SystemC, and on a single
thread is about 100 times faster than interpreted Verilog simulators such
as `Icarus Verilog`_. Another 2-10x speedup might be gained from
Verilator does not directly translate Verilog HDL to C++ or SystemC.
Rather, Verilator compiles your code into a much faster optimized and
optionally thread-partitioned model, which is in turn wrapped inside a
C++/SystemC module. The results are a compiled Verilog model that executes
even on a single thread over 10x faster than standalone SystemC, and on a
single thread is about 100 times faster than interpreted Verilog simulators
such as `Icarus Verilog`_. Another 2-10x speedup might be gained from
multithreading (yielding 200-1000x total over interpreted simulators).
Verilator has typically similar or better performance versus closed-source
@@ -92,7 +102,6 @@ Mentor ModelSim/Questa, Synopsys VCS, VTOC, and Pragmatic CVer/CVC). But,
Verilator is open-sourced, so you can spend on computes rather than
licenses. Thus, Verilator gives you the best simulation cycles/dollar.
Installation & Documentation
============================
@@ -101,8 +110,8 @@ For more information:
- `Verilator installation and package directory structure
<https://verilator.org/install>`_
- `Verilator manual (HTML) <https://verilator.org/verilator_doc.html>`_,
or `Verilator manual (PDF) <https://verilator.org/verilator_doc.pdf>`_
- `Verilator manual (HTML) <https://verilator.org/verilator_doc.html>`_, or
`Verilator manual (PDF) <https://verilator.org/verilator_doc.pdf>`_
- `Subscribe to Verilator announcements
<https://github.com/verilator/verilator-announce>`_
@@ -111,7 +120,6 @@ For more information:
- `Verilator issues <https://verilator.org/issues>`_
Support
=======
@@ -128,10 +136,13 @@ Verilator also supports and encourages commercial support models and
organizations; please see `Verilator Commercial Support
<https://verilator.org/verilator_commercial_support>`_.
Related Projects
================
- `Cocotb <https://www.cocotb.org/>`_ - A coroutine-based cosimulation
library for writing testbenches in Python which officially supports
Verilator.
- `GTKwave <https://gtkwave.sourceforge.net/>`_ - Waveform viewer for
Verilator traces.
@@ -141,22 +152,28 @@ Related Projects
- `Surfer <https://surfer-project.org/>`_ - Web or offline waveform viewer
for Verilator traces.
Open License
============
Verilator is Copyright 2003-2025 by Wilson Snyder. (Report bugs to
Verilator is Copyright 2003-2026 by Wilson Snyder. (Report bugs to
`Verilator Issues <https://verilator.org/issues>`_.)
Verilator is free software; you can redistribute it and/or modify it under
the terms of either the GNU Lesser General Public License Version 3 or the
Perl Artistic License Version 2.0. See the documentation for more details.
.. _CHIPS Alliance: https://chipsalliance.org
.. _Icarus Verilog: https://steveicarus.github.io/iverilog
.. _Linux Foundation: https://www.linuxfoundation.org
.. _chips alliance: https://chipsalliance.org
.. _icarus verilog: https://steveicarus.github.io/iverilog
.. _linux foundation: https://www.linuxfoundation.org
.. |Logo| image:: https://www.veripool.org/img/verilator_256_200_min.png
.. |verilator multithreaded performance| image:: https://www.veripool.org/img/verilator_multithreaded_performance_bg-min.png
.. |verilator usage| image:: https://www.veripool.org/img/verilator_usage_400x200-min.png
.. |verilator community| image:: https://www.veripool.org/img/verilator_community_400x125-min.png
.. |verilator support| image:: https://www.veripool.org/img/verilator_support_400x125-min.png
+61
View File
@@ -0,0 +1,61 @@
# DESCRIPTION: Verilator default licensing for "reuse lint"
version = 1
[[annotations]]
path = [
"**/.clang-format",
"**/.gitattributes",
"**/.gitignore",
".clang-tidy",
".codacy.yml",
".devcontainer/devcontainer.json",
".github/**",
".pre-commit-hooks.yaml",
".style.yapf",
"CITATION.cff",
"CPPLINT.cfg",
"ci/docker/buildenv/wavetools.conf",
"docs/CONTRIBUTORS",
"docs/spelling.txt",
"docs/verilated.dox",
"examples/**/*.vc",
"install-sh",
"test_regress/.gdbinit",
"test_regress/input.vc",
"test_regress/input.xsim.vc",
"test_regress/t/*.dat",
"test_regress/t/*.gprof",
"test_regress/t/*.mem",
"test_regress/t/*.out",
"test_regress/t/*.tree",
"test_regress/t/*.vc",
"test_regress/t/t_lint_bsspace_bad.v",
"verilator.pc.in",
]
SPDX-FileCopyrightText = "2003-2026 Wilson Snyder"
SPDX-License-Identifier = "CC0-1.0"
[[annotations]]
path = [
"docs/_static/**",
"docs/gen/*.rst",
"docs/guide/figures/**",
]
SPDX-FileCopyrightText = "2003-2026 Wilson Snyder"
SPDX-License-Identifier = "LGPL-3.0-only OR Artistic-2.0"
[[annotations]]
path = "test_regress/t/uvm/**"
SPDX-FileCopyrightText = [
"2010-2017 Mentor Graphics Corporation",
"2010-2013 Synopsys, Inc.",
"2010-2018 Cadence Design Systems, Inc.",
"2013 NVIDIA Corporation",
]
SPDX-License-Identifier = "Apache-2.0"
[[annotations]]
path = "include/gtkwave/lz4.*"
SPDX-FileCopyrightText = "2011-2023 Yann Collet"
SPDX-License-Identifier = "BSD-2-Clause"
+4 -4
View File
@@ -1,10 +1,10 @@
#!/usr/bin/env perl
######################################################################
#
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2025-2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
#
######################################################################
+130 -46
View File
@@ -1,10 +1,10 @@
#!/usr/bin/env perl
######################################################################
#
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2025-2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
#
######################################################################
@@ -27,6 +27,21 @@ use vars qw($Debug @Opt_Verilator_Sw);
autoflush STDOUT 1;
autoflush STDERR 1;
# Guard against unbounded recursive re-entry. Hierarchical / --build flows
# legitimately re-enter the wrapper a few levels deep (wrapper -> verilator_bin
# -> make -> wrapper -> ...); a misconfigured VERILATOR_BIN, VERILATOR_GDB or
# VERILATOR_VALGRIND that points back at this wrapper, however, recurses
# without bound and exhausts the OS PID table. Use VERILATOR_RUNNING as a
# depth counter and cap it well above any real nesting.
my $verilator_running_max = 16;
my $verilator_running_depth = ($ENV{VERILATOR_RUNNING} || 0) + 1;
if ($verilator_running_depth > $verilator_running_max) {
die "%Error: verilator: re-entered $verilator_running_depth levels deep"
. " via \$VERILATOR_RUNNING; check that VERILATOR_BIN, VERILATOR_GDB"
. " and VERILATOR_VALGRIND do not resolve back to this wrapper script.\n";
}
$ENV{VERILATOR_RUNNING} = $verilator_running_depth;
$Debug = 0;
my $opt_aslr;
my $opt_gdb;
@@ -42,6 +57,7 @@ if ($#ARGV < 0) {
}
# Insert debugging options up front
# (VERILATOR_TEST_FLAGS is not a documented nor official supported feature)
push @ARGV, (split ' ', $ENV{VERILATOR_TEST_FLAGS} || "");
# We sneak a look at the flags so we can do some pre-environment checks
@@ -85,9 +101,15 @@ if (defined $ENV{VERILATOR_ROOT}) {
$ENV{VERILATOR_ROOT} = $verilator_root;
}
if ($opt_gdbbt && !gdb_works()) {
warn "-Info: --gdbbt ignored: gdb doesn't seem to be working\n" if $Debug;
$opt_gdbbt = 0;
my $lldb_selected = 0;
if (($opt_gdb || $opt_gdbbt) && !gdb_works()) {
if (lldb_works()) {
$lldb_selected = 1;
} else {
warn "-Info: --gdb or --gdbbt ignored: gdb doesn't seem to be working\n" if $Debug;
$opt_gdbbt = 0;
$opt_gdb = 0;
}
}
# Determine runtime flags and run
@@ -97,22 +119,35 @@ if ($opt_gdbbt && !gdb_works()) {
# then see exactly the contents of @Opt_Verilator_Sw.
my @quoted_sw = map { sh_escape($_) } @Opt_Verilator_Sw;
if ($opt_gdb) {
# Generic GDB interactive
run (ulimit_stack_unlimited()
. aslr(0)
. ($ENV{VERILATOR_GDB} || "gdb")
. " " . verilator_bin()
# Note, uncomment to set breakpoints before running:
# ." -ex 'break main'"
# Note, we must use double-quotes ("run <switches>")
# and not single ('run <switches>') below. Bash swallows
# escapes as you would expect in a double-quoted string.
# That's not true for a single-quoted string, where \'
# actually terminates the string -- not what we want!
. " -ex \"run " . join(' ', @quoted_sw) . "\""
. " -ex 'set width 0'"
. " -ex 'bt'");
# Note, we must use double-quotes ("run <switches>")
# and not single ('run <switches>') below. Bash swallows
# escapes as you would expect in a double-quoted string.
# That's not true for a single-quoted string, where \'
# actually terminates the string -- not what we want!
if ($lldb_selected) {
# Generic lldb interactive
run (ulimit_stack_unlimited()
. aslr(0)
. ($ENV{VERILATOR_GDB} || "lldb")
. " " . verilator_bin()
# Note, uncomment to set breakpoints before running:
# . " -o 'b main'"
. " -o 'b exit'" # Need break to keep process active for bt
. " -o \"run " . join(' ', @quoted_sw) . "\""
. " -o 'settings set term-width 1024'"
. " -o 'bt'");
} else {
# Generic GDB interactive
run (ulimit_stack_unlimited()
. aslr(0)
. ($ENV{VERILATOR_GDB} || "gdb")
. " " . verilator_bin()
# Note, uncomment to set breakpoints before running:
# . " -ex 'break main'"
. " -ex \"run " . join(' ', @quoted_sw) . "\""
. " -ex 'set width 0'"
. " -ex 'bt'");
}
} elsif ($opt_rr) {
# Record with rr
run (ulimit_stack_unlimited()
@@ -120,15 +155,27 @@ if ($opt_gdb) {
. "rr record " . verilator_bin()
. " " . join(' ', @quoted_sw));
} elsif ($opt_gdbbt && $Debug) {
# Run under GDB to get gdbbt
run (ulimit_stack_unlimited()
. aslr(0)
. "gdb"
. " " . verilator_bin()
. " --batch --quiet --return-child-result"
. " -ex \"run " . join(' ', @quoted_sw)."\""
. " -ex 'set width 0'"
. " -ex 'bt' -ex 'quit'");
# Run under debugger to get gdbbt
if ($lldb_selected) {
run (ulimit_stack_unlimited()
. aslr(0)
. ($ENV{VERILATOR_GDB} || "lldb")
. " " . verilator_bin()
. " -o 'b exit'" # Need break to keep process active for bt
. " --batch --source-quietly"
. " -o \"run " . join(' ', @quoted_sw)."\""
. " -o 'settings set term-width 1024'"
. " -o 'bt' -o 'quit'");
} else {
run (ulimit_stack_unlimited()
. aslr(0)
. ($ENV{VERILATOR_GDB} || "gdb")
. " " . verilator_bin()
. " --batch --quiet --return-child-result"
. " -ex \"run " . join(' ', @quoted_sw)."\""
. " -ex 'set width 0'"
. " -ex 'bt' -ex 'quit'");
}
} elsif ($opt_valgrind) {
# Run under valgrind
my $valgrind_bin = ($ENV{VERILATOR_VALGRIND} || "valgrind --error-exitcode=1 --max-stackframe=2815880"
@@ -148,7 +195,7 @@ if ($opt_gdb) {
. verilator_bin()
. " " . join(' ', @quoted_sw));
} else {
# Normal, non gdb
# Normal, non-gdb
run(ulimit_stack_unlimited() . aslr(1) . verilator_bin() . " " . join(' ', @quoted_sw));
}
@@ -184,9 +231,9 @@ sub verilator_bin {
sub gdb_works {
$! = undef; # Cleanup -x
system("gdb /bin/echo"
system("gdb /bin/sh"
. " --batch-silent --quiet --return-child-result"
. " -ex 'run -n'" # `echo -n`
. " -ex 'run -c exit'" # `/bin/sh -c exit
. " -ex 'set width 0'"
. " -ex 'bt'"
. " -ex 'quit'");
@@ -194,6 +241,18 @@ sub gdb_works {
return $status == 0;
}
sub lldb_works {
$! = undef; # Cleanup -x
# macOS system integrity stops attach to system binaries like /bin/sh
system("lldb --version"
. " --batch --source-quietly"
. " -o 'settings set term-width 1024'"
. " -o 'bt'"
. " -o 'quit'");
my $status = $?;
return $status == 0;
}
sub aslr {
my $want_on = shift;
$want_on = $opt_aslr if defined $opt_aslr;
@@ -212,14 +271,22 @@ sub ulimit_stack_unlimited {
# AddressSanitizer doesn't work with 'ulimit -s unlimted'
if (`${\(verilator_bin())} --get-supported DEV_ASAN` eq "1\n") {
# Use host 'physical memory / #cores / 8' instead
open(my $fh, "<", "/proc/meminfo") || die "Can't read host memory for asan";
while (<$fh>) {
if (m/MemTotal:\s+(\d+)\s+kB/) {
$limit = int(int($1)/`nproc`/8);
last;
if ($^O eq "darwin") {
my $membytes = `sysctl -n hw.memsize`;
chomp $membytes;
my $ncpu = `sysctl -n hw.ncpu`;
chomp $ncpu;
$limit = int(int($membytes / 1024) / $ncpu / 8);
} else {
open(my $fh, "<", "/proc/meminfo") || die "Can't read host memory for asan";
while (<$fh>) {
if (m/MemTotal:\s+(\d+)\s+kB/) {
$limit = int(int($1)/`nproc`/8);
last;
}
}
close($fh);
}
close($fh);
}
system("ulimit -s $limit 2>/dev/null");
my $status = $?;
@@ -333,6 +400,7 @@ detailed descriptions of these arguments.
--no-aslr Disable address space layout randomization
--no-assert Disable all assertions
--no-assert-case Disable unique/unique0/priority-case assertions
--assert-unroll-limit <iter> Max SVA assertion repetition before erroring
--autoflush Flush streams after all $displays
--bbox-sys Blackbox unknown $system calls
--bbox-unsup Blackbox unsupported language features
@@ -344,12 +412,15 @@ detailed descriptions of these arguments.
-CFLAGS <flags> C++ compiler arguments for makefile
--compiler <compiler-name> Tune for specified C++ compiler
--compiler-include Include additional header in the precompiled one
--constraint-array-limit <size> Maximum array size for constraint array reduction
--converge-limit <loops> Tune convergence settle time
--coverage Enable all coverage
--coverage-expr Enable expression coverage
--coverage-expr-max <value> Maximum permutations allowed for an expression
--coverage-fsm Enable FSM state/arc coverage
--coverage-line Enable line coverage
--coverage-max-width <width> Maximum array depth for coverage
--coverage-per-instance Enable per-instance coverage counters
--coverage-toggle Enable toggle coverage
--coverage-underscore Enable coverage of _signals
--coverage-user Enable SVL user coverage
@@ -367,8 +438,10 @@ detailed descriptions of these arguments.
--diagnostics-sarif-output <filename> Set SARIF diagnostics output file
--dpi-hdr-only Only produce the DPI header file
--dump-<srcfile> Enable dumping everything in source file
--dump-ast-patterns Enable dumping Ast pattern statistics
--dump-defines Show preprocessor defines with -E
--dump-dfg Enable dumping DfgGraphs to .dot files
--dump-dfg-patterns Enable dumping Dfg pattern statistics
--dump-graph Enable dumping V3Graphs to .dot files
--dump-inputs Enable dumping preprocessed input files
--dump-tree Enable dumping Ast .tree files
@@ -389,6 +462,9 @@ detailed descriptions of these arguments.
-f <file> Parse arguments from a file
-FI <file> Force include of a file
--flatten Force inlining of all modules, tasks and functions
--fourstate Enable fourstate logic
--no-fourstate Disable fourstate logic
--func-recursion-depth <value> Maximum recursive constant function depth
--future0 <option> Ignore an option for compatibility
--future1 <option> Ignore an option with argument for compatibility
-fno-<optimization> Disable internal optimization stage
@@ -408,6 +484,8 @@ detailed descriptions of these arguments.
-I<dir> Directory to search for includes
--if-depth <value> Tune IFDEPTH warning
+incdir+<dir> Directory to search for includes
--inline-cfuncs <value> Inline CFuncs with <=value nodes (0=off)
--inline-cfuncs-product <value> Inline CFuncs if size*calls <= value
--inline-mult <value> Tune module inlining
--instr-count-dpi <value> Assumed dynamic instruction count of DPI imports
-j <jobs> Parallelism for --build-jobs/--verilate-jobs
@@ -419,6 +497,7 @@ detailed descriptions of these arguments.
--l2-name <value> Verilog scope name of the top module
--language <lang> Default language standard to parse
-LDFLAGS <flags> Linker pre-object arguments for makefile
-libmap Specify library mapping file
--lib-create <name> Create a DPI library
+libext+<ext>+[ext]... Extensions for finding modules
+librescan Ignored for compatibility
@@ -473,15 +552,18 @@ detailed descriptions of these arguments.
--public-params Mark all parameters as public_flat
-pvalue+<name>=<value> Overwrite toplevel parameter
--quiet Minimize additional printing
--quiet-build Don't print build progress
--quiet-exit Don't print the command on failure
--quiet-stats Don't print statistics
--relative-includes Resolve includes relative to current file
--reloop-limit <value> Minimum iterations for forming loops
--replication-limit <value> Replication concatenation limit (default: 8k)
--report-unoptflat Extra diagnostics for UNOPTFLAT
--rr Run Verilator and record with rr
--runtime-debug Enable model runtime debugging
--savable Enable model save-restore
--sc Create SystemC output
--sched-zero-delay Specify #0 delay support
--no-skip-identical Disable skipping identical output
--stats Create statistics file
--stats-vars Provide statistics on variables
@@ -489,7 +571,6 @@ detailed descriptions of these arguments.
--no-std-package Prevent parsing standard package
--no-std-waiver Prevent parsing standard lint waivers
--no-stop-fail Do not call $stop when assertion fails
--structs-packed Convert all unpacked structures to packed structures
-sv Enable SystemVerilog parsing
+systemverilogext+<ext> Synonym for +1800-2023ext+<ext>
--threads <threads> Enable multithreading
@@ -510,13 +591,13 @@ detailed descriptions of these arguments.
--trace-params Enable tracing of parameters
--trace-saif Enable SAIF file creation
--trace-structs Enable tracing structure names
--trace-threads <threads> Enable FST waveform creation on separate threads
--no-trace-top Do not emit traces for signals in the top module generated by verilator
--trace-underscore Enable tracing of _signals
--trace-vcd Enable VCD waveform creation
-U<var> Undefine preprocessor define
--no-unlimited-stack Don't disable stack size limit
--unroll-count <loops> Tune maximum loop iterations
--unroll-limit <loops> Maximum loop iterations before assuming infinite loop
--unroll-stmts <stmts> Tune maximum loop body size
--unused-regexp <regexp> Tune UNUSED lint signals
-V Verbose version and config
@@ -546,8 +627,6 @@ detailed descriptions of these arguments.
--x-assign <mode> Assign non-initial Xs to this value
--x-initial <mode> Assign initial Xs to this value
--x-initial-edge Enable initial X->0 and X->1 edge triggers
--xml-only Create XML parser output
--xml-output XML output filename
-y <dir> Directory to search for modules
This is a short summary of the simulation runtime arguments, i.e. for the
@@ -557,11 +636,13 @@ description of these arguments.
=for VL_SPHINX_EXTRACT "_build/gen/args_verilated.rst"
+verilator+assert+lock Lock assertion status changes at startup
+verilator+coverage+file+<filename> Set coverage output filename
+verilator+debug Enable debugging
+verilator+debugi+<value> Enable debugging at a level
+verilator+error+limit+<value> Set error limit
+verilator+help Show help
+verilator+log+file+<filename> Log stdout and stderr output to filename
+verilator+noassert Disable assert checking
+verilator+prof+exec+file+<filename> Set execution profile filename
+verilator+prof+exec+start+<value> Set execution profile starting point
@@ -570,15 +651,18 @@ description of these arguments.
+verilator+quiet Minimize additional printing
+verilator+rand+reset+<value> Set random reset technique
+verilator+seed+<value> Set random seed
+verilator+solver+file+<filename> Set random solver log filename
+verilator+V Show verbose version and config
+verilator+version Show version and exit
+verilator+vpi+<library>[:<bootstrap>] Load VPI shared library
+verilator+wno+unsatconstr+<value> Disable constraint warnings
=head1 DISTRIBUTION
The latest version is available from L<https://verilator.org>.
Copyright 2003-2025 by Wilson Snyder. This program is free software; you can
Copyright 2003-2026 by Wilson Snyder. This program is free software; you can
redistribute it and/or modify the Verilator internals under the terms of
either the GNU Lesser General Public License Version 3 or the Perl Artistic
License Version 2.0.
+35 -37
View File
@@ -17,18 +17,15 @@ parser = argparse.ArgumentParser(
For documentation see
https://verilator.org/guide/latest/exe_verilator_ccache_report.html""",
epilog="""Copyright 2002-2025 by Wilson Snyder. This program is free software; you
can redistribute it and/or modify it under the terms of either the GNU
Lesser General Public License Version 3 or the Perl Artistic License
Version 2.0.
epilog="""This program is free software; you can redistribute it and/or modify it
under the terms of either the GNU Lesser General Public License Version 3
or the Perl Artistic License Version 2.0.
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0""")
SPDX-FileCopyrightText: 2002-2026 Wilson Snyder
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
""")
parser.add_argument('-o',
type=argparse.FileType('w'),
metavar="OUTFILE",
required=True,
help='output file')
parser.add_argument('-o', type=pathlib.Path, metavar="OUTFILE", required=True, help='output file')
parser.add_argument('logdir', type=pathlib.Path, help='log directory')
args = parser.parse_args()
@@ -58,34 +55,35 @@ for logfile in args.logdir.iterdir():
elapsed[obj] = toDateTime(match.group(1)) - start
results[obj] = match.group(2)
args.o.write("#" * 80 + "\n")
args.o.write("ccache report (from verilator_ccache_report) :\n")
with args.o.open("w") as ofd:
ofd.write("#" * 80 + "\n")
ofd.write("ccache report (from verilator_ccache_report) :\n")
if not results:
args.o.write("\nAll object files up to date\n")
else:
args.o.write("\nCompiled object files:\n")
wnames = max(len(_) for _ in results) + 1
wresults = max(len(_) for _ in results.values()) + 1
for k in sorted(results.keys()):
args.o.write("{:{wnames}} : {:{wresults}} : {}s\n".format(k,
results[k],
elapsed[k].total_seconds(),
wnames=wnames,
wresults=wresults))
if not results:
ofd.write("\nAll object files up to date\n")
else:
ofd.write("\nCompiled object files:\n")
wnames = max(len(_) for _ in results) + 1
wresults = max(len(_) for _ in results.values()) + 1
for k in sorted(results.keys()):
ofd.write("{:{wnames}} : {:{wresults}} : {}s\n".format(k,
results[k],
elapsed[k].total_seconds(),
wnames=wnames,
wresults=wresults))
args.o.write("\nSummary:\n")
counts = collections.Counter(_ for _ in results.values())
total = sum(counts.values())
for k in sorted(counts.keys()):
c = counts[k]
args.o.write("{:{width}}| {} ({:.2%})\n".format(k, c, c / total, width=wresults))
ofd.write("\nSummary:\n")
counts = collections.Counter(_ for _ in results.values())
total = sum(counts.values())
for k in sorted(counts.keys()):
c = counts[k]
ofd.write("{:{width}}| {} ({:.2%})\n".format(k, c, c / total, width=wresults))
args.o.write("\nLongest:\n")
longest = sorted(list(elapsed.items()), key=lambda kv: -kv[1].total_seconds())
for i, (k, v) in enumerate(longest):
args.o.write("{:{width}}| {}s\n".format(k, v.total_seconds(), width=wnames))
if i > 4:
break
ofd.write("\nLongest:\n")
longest = sorted(list(elapsed.items()), key=lambda kv: -kv[1].total_seconds())
for i, (k, v) in enumerate(longest):
ofd.write("{:{width}}| {}s\n".format(k, v.total_seconds(), width=wnames))
if i > 4:
break
args.o.write("#" * 80 + "\n")
ofd.write("#" * 80 + "\n")
+14 -6
View File
@@ -1,10 +1,10 @@
#!/usr/bin/env perl
######################################################################
#
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2025-2026 Wilson Snyder
#
######################################################################
@@ -52,7 +52,7 @@ if (! GetOptions (
pod2usage(-exitstatus => 2, -verbose => 0);
}
# Normal, non gdb
# Normal, non-gdb
run(verilator_coverage_bin()
. " " . join(' ', @Opt_Verilator_Sw));
@@ -157,6 +157,10 @@ verilator_coverage - Verilator coverage analyzer
verilator_coverage --annotate <obj>
verilator_coverage --report summary,hier <datafiles>...
verilator_coverage --report hier <datafiles>...
verilator_coverage -write merged.dat <datafiles>...
verilator_coverage -write-info merged.info <datafiles>...
@@ -175,7 +179,10 @@ L<https://verilator.org/guide/latest/exe_verilator_coverage.html>.
--annotate-points Annotates info from each coverage point.
--filter-type <regex> Keep only records of given coverage type.
--help Displays this message and version and exits.
--include-reset-arcs Include reset arcs in FSM arc summaries.
--levels <depth> Limit displayed hierarchy report depth.
--rank Compute relative importance of tests.
--report <kind>[,<kind>...] Generate reports: summary, hier, or hierarchy.
--unlink With --write, unlink all inputs
--version Displays program version and exits.
--write <filename> Write aggregate coverage results.
@@ -192,11 +199,12 @@ L<https://verilator.org/guide/latest/exe_verilator_coverage.html>.
The latest version is available from L<https://verilator.org>.
Copyright 2003-2025 by Wilson Snyder. This program is free software; you
Copyright 2003-2026 by Wilson Snyder. This program is free software; you
can redistribute it and/or modify the Verilator internals under the terms
of either the GNU Lesser General Public License Version 3 or the Perl
Artistic License Version 2.0.
SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
=head1 SEE ALSO
+6 -5
View File
@@ -110,12 +110,13 @@ It performs a diff between two files, or all files common between two
directories, ignoring irrelevant pointer differences.
Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.""",
epilog="""Copyright 2005-2025 by Wilson Snyder. This program is free software; you
can redistribute it and/or modify it under the terms of either the GNU
Lesser General Public License Version 3 or the Perl Artistic License
Version 2.0.
epilog="""This program is free software; you can redistribute it and/or modify it
under the terms of either the GNU Lesser General Public License Version 3
or the Perl Artistic License Version 2.0.
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0""")
SPDX-FileCopyrightText: 2005-2026 Wilson Snyder
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
""")
parser.add_argument('--debug', action='store_const', const=9, help='enable debug')
parser.add_argument('--no-lineno',
+6 -5
View File
@@ -613,12 +613,13 @@ Verilator_gantt creates a visual representation to help analyze Verilator
For documentation see
https://verilator.org/guide/latest/exe_verilator_gantt.html""",
epilog="""Copyright 2018-2025 by Wilson Snyder. This program is free software; you
can redistribute it and/or modify it under the terms of either the GNU
Lesser General Public License Version 3 or the Perl Artistic License
Version 2.0.
epilog="""This program is free software; you can redistribute it and/or modify it
under the terms of either the GNU Lesser General Public License Version 3
or the Perl Artistic License Version 2.0.
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0""")
SPDX-FileCopyrightText: 2018-2026 Wilson Snyder
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
""")
parser.add_argument('--debug', action='store_true', help='enable debug')
parser.add_argument('--no-vcd', help='disable creating vcd', action='store_true')
+4 -4
View File
@@ -2,11 +2,11 @@
# mypy: disallow-untyped-defs
# pylint: disable=C0114,C0209
#
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
# can redistribute it and/or modify the Verilator internals under the terms
# of either the GNU Lesser General Public License Version 3 or the Perl
# Artistic License Version 2.0.
# This program is free software; you can redistribute it and/or modify the
# Verilator internals under the terms of either the GNU Lesser General
# Public License Version 3 or the Perl Artistic License Version 2.0.
#
# SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
######################################################################
+13 -7
View File
@@ -51,12 +51,17 @@ def profcfunc(filename: str) -> None:
# Find modules
verilated_mods = {}
for func in funcs:
match = re.search(r'(.*)::eval(_step)?\(', func)
# Match only the model entry points: 'eval', 'eval_step', 'eval_end_step',
# and the 'evalXxx' region entry points, but not e.g. a user's '::evaluate'
match = re.match(r'([A-Za-z_][A-Za-z_0-9]*)::eval(_step|_end_step|[A-Z][A-Za-z_0-9]*)?\(',
func)
if match:
prefix = match.group(1)
if prefix.startswith('Verilated'): # Run-time library, not a model
continue
if Args.debug:
print("-got _eval %s prefix=%s" % (func, prefix))
verilated_mods[prefix] = re.compile(r'^' + prefix)
verilated_mods[prefix] = re.compile(r'^' + re.escape(prefix))
# pprint(verilated_mods)
# Sort by Verilog name
@@ -173,12 +178,13 @@ in each Verilog block.
For documentation see
https://verilator.org/guide/latest/exe_verilator_profcfunc.html""",
epilog="""Copyright 2002-2025 by Wilson Snyder. This program is free software; you
can redistribute it and/or modify it under the terms of either the GNU
Lesser General Public License Version 3 or the Perl Artistic License
Version 2.0.
epilog="""This program is free software; you can redistribute it and/or modify it
under the terms of either the GNU Lesser General Public License Version 3
or the Perl Artistic License Version 2.0.
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0""")
SPDX-FileCopyrightText: 2002-2026 Wilson Snyder
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
""")
parser.add_argument('--debug', action='store_const', const=9, help='enable debug')
parser.add_argument('filename', help='input gprof output to process')
+93
View File
@@ -0,0 +1,93 @@
#!/usr/bin/env bash
# DESCRIPTION: Verilator: CI build job script
#
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
################################################################################
# Executed in the 'build' stage.
################################################################################
# Destructive to the checkout (reconfigures and rebuilds); never run locally
if [ "$GITHUB_ACTIONS" != "true" ]; then
echo "ERROR: $(basename "$0") must only be run in GitHub Actions CI" >&2
exit 1
fi
set -e
set -x
source "$(dirname "$0")/ci-common.bash"
################################################################################
# Parse arguments
OPT_ASAN=0
OPT_CCWARN=0
OPT_GCOV=0
OPT_LIGHT_DEBUG=0
OPT_COMPILER=
OPT_PREFIX=
while [ $# -gt 0 ]; do
case "$1" in
--asan) OPT_ASAN=1 ;;
--ccwarn) OPT_CCWARN=1 ;;
--compiler)
[ $# -ge 2 ] || fatal "--compiler requires an argument"
OPT_COMPILER="$2"
shift
;;
--gcov) OPT_GCOV=1 ;;
--light-debug) OPT_LIGHT_DEBUG=1 ;;
--prefix)
[ $# -ge 2 ] || fatal "--prefix requires an argument"
OPT_PREFIX="$2"
shift
;;
*) fatal "Unknown option: '$1'" ;;
esac
shift
done
[ -n "$OPT_COMPILER" ] || fatal "--compiler is required"
[ -n "$OPT_PREFIX" ] || fatal "--prefix is required"
# Map the compiler name to the executable name configure CXX expects
case "$OPT_COMPILER" in
clang) CXX=clang++ ;;
gcc) CXX=g++ ;;
*) fatal "Unknown compiler: '$OPT_COMPILER'" ;;
esac
################################################################################
# Configure
CONFIGURE_ARGS="--prefix=$OPT_PREFIX --enable-longtests"
if [ "$OPT_CCWARN" = 1 ]; then
CONFIGURE_ARGS="$CONFIGURE_ARGS --enable-ccwarn"
fi
if [ "$OPT_ASAN" = 1 ]; then
CONFIGURE_ARGS="$CONFIGURE_ARGS --enable-dev-asan"
CXX="$CXX -DVL_LEAK_CHECKS"
# Replaces VNUser's union with a std::variant to validate type usage.
# Only takes effect when the build is C++17 or newer.
CXX="$CXX -DVL_USER_TYPE_CHECKS"
fi
if [ "$OPT_GCOV" = 1 ]; then
CONFIGURE_ARGS="$CONFIGURE_ARGS --enable-dev-gcov"
fi
if [ "$OPT_LIGHT_DEBUG" = 1 ]; then
CONFIGURE_ARGS="$CONFIGURE_ARGS --enable-light-debug"
fi
autoconf
./configure $CONFIGURE_ARGS CXX="$CXX"
################################################################################
# Build
ccache -z
BUILD_START=$SECONDS
"$MAKE" -j "$NPROC" -k
ccache -svv
ccache --evict-older-than "$((SECONDS - BUILD_START + 60))s"
ccache -svv
+35
View File
@@ -0,0 +1,35 @@
# DESCRIPTION: Verilator: CI common definitions, sourced by the stage scripts
#
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
################################################################################
# Common definitions sourced by the CI stage scripts; not executed directly.
################################################################################
fatal() {
echo "ERROR: $(basename "$0"): $1" >&2; exit 1;
}
case "$(uname -s)" in
Linux)
HOST_OS=linux
MAKE=make
NPROC=$(nproc)
# Distro id/version; subshell keeps os-release out of our namespace
if [ -r /etc/os-release ]; then
DISTRO_ID=$(. /etc/os-release; echo "$ID")
DISTRO_VERSION=$(. /etc/os-release; echo "$VERSION_ID")
fi
;;
Darwin)
HOST_OS=macOS
MAKE=make
NPROC=$(sysctl -n hw.logicalcpu)
;;
*)
fatal "Unknown host OS: '$(uname -s)'"
;;
esac
export MAKE
+100
View File
@@ -0,0 +1,100 @@
#!/usr/bin/env bash
# DESCRIPTION: Verilator: CI script for 'coverage.yml' results
#
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
# This script combines the code coverage data gathered by the test jobs into
# the HTML report published on GitHub Pages, and for a pull request, builds the
# content of the response comment posted on it.
# Developer note: You should be able to run this script in your local checkout
# if you have GitHub CLI (command 'gh') setup, authenticated ('gh auth login'),
# and have set a default repository ('gh repo set-default').
set -eo pipefail
# Trace when running in the CI
[ "$GITHUB_ACTIONS" != "true" ] || set -x
# Arguments:
# 1. run ID
# 2. number of the pull request, or empty for a non-pull-request run
# 3. base SHA of the pull request (pull requests only)
# 4. head SHA of the pull request (pull requests only)
RUN_ID=$1
PR_NUMBER=$2
PR_BASE_SHA=$3
PR_HEAD_SHA=$4
# Coverage data and report directory, uploaded as the 'coverage-report' artifact
COVERAGE_DIR=obj_coverage
ls -lsha ${COVERAGE_DIR}
# Combine the reports from the test jobs
nodist/fastcov.py -C ${COVERAGE_DIR}/verilator-*.info --lcov -o ${COVERAGE_DIR}/verilator.info
# Create the report. For a pull request, report patch coverage against the
# merge-base between the head of the pull request and the target branch. The
# summary quoted in the notification below is only in the log of 'make'.
MAKE_LOG=make-coverage-report.log
if [ -n "${PR_NUMBER}" ]; then
COVERAGE_BASE=$(git rev-parse --short $(git merge-base ${PR_BASE_SHA} ${PR_HEAD_SHA}))
make coverage-report COVERAGE_BASE=${COVERAGE_BASE} |& tee ${MAKE_LOG}
else
make coverage-report
fi
# Remove the data files, only the HTML report is published
rm -f ${COVERAGE_DIR}/verilator*.info
# The rest is for pull requests only
if [ -z "${PR_NUMBER}" ]; then
exit 0
fi
# Get some metadata about the run
RUN_NUM=$(gh run view ${RUN_ID} --json number --jq ".number")
RUN_URL=$(gh run view ${RUN_ID} --json url --jq ".url")
# Repository owner and name of the default repository, used to build the
# GitHub Pages URL of the report. The owner is lowercased, as required for the
# '<owner>.github.io' Pages domain.
PAGES_OWNER=$(gh repo view --json owner --jq '.owner.login' | tr '[:upper:]' '[:lower:]')
PAGES_NAME=$(gh repo view --json name --jq '.name')
REPORT_URL=https://${PAGES_OWNER}.github.io/${PAGES_NAME}/coverage-reports/${RUN_ID}/index.html
###############################################################################
# Create the PR notification
###############################################################################
NOTIFICATION_DIR=notification
mkdir -p ${NOTIFICATION_DIR}
cat > ${NOTIFICATION_DIR}/body.txt <<NOTIFICATION_TEMPLATE
Patch coverage from PR workflow [#${RUN_NUM}](${RUN_URL}) (code coverage of lines changed relative to ${COVERAGE_BASE}):
NOTIFICATION_TEMPLATE
if [ -f ${COVERAGE_DIR}/empty-patch ]; then
# Patch is empty
cat >> ${NOTIFICATION_DIR}/body.txt <<SUMMARY_TEMPLATE
Patch contains no code changes
SUMMARY_TEMPLATE
echo "Workflow [#${RUN_NUM}](${RUN_URL}): patch contains no code changes" > ${NOTIFICATION_DIR}/hist.txt
else
# Patch contains code changes
cat >> ${NOTIFICATION_DIR}/body.txt <<SUMMARY_TEMPLATE
<pre>
$(grep -E "(lines|branches)\.*:" ${MAKE_LOG} | sed "s/\.*:/:/" || true)
</pre>
Report: [${RUN_ID}](${REPORT_URL})
Please get to 100% line coverage, and understand all branches; see the [developer docs](https://github.com/verilator/verilator/blob/master/docs/internals.rst#code-coverage-results)
SUMMARY_TEMPLATE
echo "Workflow [#${RUN_NUM}](${RUN_URL}) report: [${RUN_ID}](${REPORT_URL})" > ${NOTIFICATION_DIR}/hist.txt
fi
+177 -85
View File
@@ -1,11 +1,7 @@
#!/usr/bin/env bash
# DESCRIPTION: Verilator: CI dependency install script
#
# Copyright 2020 by Geza Lore. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
#
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
################################################################################
@@ -14,115 +10,211 @@
# required by the particular build stage.
################################################################################
# Installs system packages with sudo; never run locally
if [ "$GITHUB_ACTIONS" != "true" ]; then
echo "ERROR: $(basename "$0") must only be run in GitHub Actions CI" >&2
exit 1
fi
set -e
set -x
cd $(dirname "$0")/..
# Avoid occasional cpan failures "Issued certificate has expired."
export PERL_LWP_SSL_VERIFY_HOSTNAME=0
echo "check_certificate = off" >> ~/.wgetrc
source "$(dirname "$0")/ci-common.bash"
fatal() {
echo "ERROR: $(basename "$0"): $1" >&2; exit 1;
}
################################################################################
# Parse arguments
if [ "$CI_OS_NAME" = "linux" ]; then
MAKE=make
elif [ "$CI_OS_NAME" = "osx" ]; then
MAKE=make
elif [ "$CI_OS_NAME" = "freebsd" ]; then
MAKE=gmake
else
fatal "Unknown os: '$CI_OS_NAME'"
# Which stage to install dependencies for
STAGE="$1"
################################################################################
# Install dependencies
if [ "$HOST_OS" = "macOS" ]; then
# The macos runner image ships an untrusted third-party tap we don't use;
# untap it so brew stops emitting a tap-trust warning. Force + '|| true' since
# untap fails if a formula was installed from it, which is harmless here.
brew untap --force aws/tap || true
fi
if [ "$CI_OS_NAME" = "linux" ]; then
# Avoid slow "processing triggers for man db"
echo "path-exclude /usr/share/doc/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
echo "path-exclude /usr/share/man/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
echo "path-exclude /usr/share/info/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
fi
install-vcddiff() {
TMP_DIR="$(mktemp -d)"
git clone https://github.com/veripool/vcddiff "$TMP_DIR"
git -C "${TMP_DIR}" checkout dca845020668887fd13498c772939814d9264fd5
"$MAKE" -C "${TMP_DIR}"
sudo cp "${TMP_DIR}/vcddiff" /usr/local/bin
# Run 'sudo apt-get', with timeout, retrying if failed
apt-get-retry() {
local _attempt
for _attempt in 1 2 3; do
[ "$_attempt" -eq 1 ] || sleep $((15 * _attempt))
sudo timeout --kill-after=30s 5m env DEBIAN_FRONTEND=noninteractive \
apt-get -o DPkg::Lock::Timeout=60 "$@" && return 0
done
fatal "'apt-get $*' failed on all attempts"
}
if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then
# Run 'brew', retrying if failed
brew-retry() {
local _attempt
for _attempt in 1 2 3; do
[ "$_attempt" -eq 1 ] || sleep $((15 * _attempt))
brew "$@" && return 0
done
fatal "'brew $*' failed on all attempts"
}
install-wavediff() {
source ci/docker/buildenv/wavetools.conf
local _base_url="https://github.com/hudson-trading/wavetools/releases/download/${WAVETOOLS_VERSION}"
local _platform
if [ "$HOST_OS" = "linux" ]; then
_platform="linux-x86_64"
elif [ "$HOST_OS" = "macOS" ]; then
_platform="macos-arm64"
else
echo "WARNING: No wavetools binary available for HOST_OS=$HOST_OS, skipping"
return 0
fi
local _tmpdir
_tmpdir=$(mktemp -d)
local _archive="wavetools-${WAVETOOLS_VERSION}-${_platform}"
wget -q -O "${_tmpdir}/${_archive}.tar.gz" "${_base_url}/${_archive}.tar.gz"
tar -xzf "${_tmpdir}/${_archive}.tar.gz" -C "${_tmpdir}"
sudo cp "${_tmpdir}/${_archive}/wavediff" /usr/local/bin/wavediff
rm -rf "${_tmpdir}"
}
if [ "$STAGE" = "build" ]; then
##############################################################################
# Dependencies of jobs in the 'build' stage, i.e.: packages required to
# build Verilator
if [ "$CI_OS_NAME" = "linux" ]; then
sudo apt-get update ||
sudo apt-get update
sudo apt-get install ccache help2man libfl-dev ||
sudo apt-get install ccache help2man libfl-dev
if [[ ! "$CI_RUNS_ON" =~ "ubuntu-22.04" ]]; then
# Some conflict of libunwind verison on 22.04, can live without it for now
sudo apt-get install libgoogle-perftools-dev ||
sudo apt-get install libgoogle-perftools-dev
if [ "$HOST_OS" = "linux" ]; then
if [ "$DISTRO_ID" = "ubuntu" ]; then
PACKAGES=(
bear
ccache
help2man
libfl-dev
libsystemc-dev
mold
)
# libunwind conflict on 22.04, can live without libjemalloc there
if [ "$DISTRO_VERSION" != "22.04" ]; then
PACKAGES+=(libjemalloc-dev)
fi
apt-get-retry update
apt-get-retry install --yes "${PACKAGES[@]}"
fi
if [[ "$CI_RUNS_ON" =~ "ubuntu-20.04" ]] || [[ "$CI_RUNS_ON" =~ "ubuntu-22.04" ]] || [[ "$CI_RUNS_ON" =~ "ubuntu-24.04" ]]; then
sudo apt-get install libsystemc libsystemc-dev ||
sudo apt-get install libsystemc libsystemc-dev
fi
if [[ "$CI_RUNS_ON" =~ "ubuntu-22.04" ]] || [[ "$CI_RUNS_ON" =~ "ubuntu-24.04" ]]; then
sudo apt-get install bear mold ||
sudo apt-get install bear mold
fi
elif [ "$CI_OS_NAME" = "osx" ]; then
brew update
brew install ccache perl gperftools autoconf bison flex help2man
elif [ "$CI_OS_NAME" = "freebsd" ]; then
sudo pkg install -y autoconf bison ccache gmake perl5
elif [ "$HOST_OS" = "macOS" ]; then
PACKAGES=(
autoconf
bison
ccache
flex
gperftools
help2man
perl
)
brew-retry update
brew-retry install "${PACKAGES[@]}"
else
fatal "Unknown os: '$CI_OS_NAME'"
fatal "Unknown HOST_OS: '$HOST_OS'"
fi
if [ -n "$CCACHE_DIR" ]; then
mkdir -p "$CCACHE_DIR"
fi
elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
elif [ "$STAGE" = "test" ]; then
##############################################################################
# Dependencies of jobs in the 'test' stage, i.e.: packages required to
# run the tests
if [ "$CI_OS_NAME" = "linux" ]; then
sudo apt-get update ||
sudo apt-get update
# libfl-dev needed for internal coverage's test runs
sudo apt-get install gdb gtkwave lcov libfl-dev ccache jq z3 ||
sudo apt-get install gdb gtkwave lcov libfl-dev ccache jq z3
# Required for test_regress/t/t_dist_attributes.py
if [[ "$CI_RUNS_ON" =~ "ubuntu-22.04" ]] || [[ "$CI_RUNS_ON" =~ "ubuntu-24.04" ]]; then
sudo apt-get install python3-clang mold ||
sudo apt-get install python3-clang mold
if [ "$HOST_OS" = "linux" ]; then
if [ "$DISTRO_ID" = "ubuntu" ]; then
PACKAGES=(
ccache
gdb
jq
lcov
libfl-dev
libsystemc-dev
mold
python3-clang
z3
)
apt-get-retry update
apt-get-retry install --yes "${PACKAGES[@]}"
fi
if [[ "$CI_RUNS_ON" =~ "ubuntu-20.04" ]] || [[ "$CI_RUNS_ON" =~ "ubuntu-22.04" ]] || [[ "$CI_RUNS_ON" =~ "ubuntu-24.04" ]]; then
sudo apt-get install libsystemc-dev ||
sudo apt-get install libsystemc-dev
fi
elif [ "$CI_OS_NAME" = "osx" ]; then
brew update
# brew cask install gtkwave # fst2vcd hangs at launch, so don't bother
brew install ccache perl jq z3
elif [ "$CI_OS_NAME" = "freebsd" ]; then
# fst2vcd fails with "Could not open '<input file>', exiting."
sudo pkg install -y ccache gmake perl5 python3 jq z3
elif [ "$HOST_OS" = "macOS" ]; then
PACKAGES=(
ccache
jq
perl
z3
)
brew-retry update
brew-retry install "${PACKAGES[@]}"
else
fatal "Unknown os: '$CI_OS_NAME'"
fatal "Unknown HOST_OS: '$HOST_OS'"
fi
# Common installs
install-vcddiff
install-wavediff
# Workaround -fsanitize=address crash
sudo sysctl -w vm.mmap_rnd_bits=28
elif [ "$STAGE" = "lint-py" ]; then
##############################################################################
# Dependencies for nodist/clang_check_attributes
if [ "$HOST_OS" = "linux" ] && [ "$DISTRO_ID" = "ubuntu" ]; then
PACKAGES=(
python3-clang # Not run, but importers are linted
)
apt-get-retry update
apt-get-retry install --yes "${PACKAGES[@]}"
fi
elif [ "$STAGE" = "format" ]; then
##############################################################################
# Dependencies of 'make format'
if [ "$HOST_OS" = "linux" ] && [ "$DISTRO_ID" = "ubuntu" ]; then
PACKAGES=(
clang-format-18 # Version pinned, so all of CI formats alike
)
apt-get-retry update
apt-get-retry install --yes "${PACKAGES[@]}"
fi
elif [ "$STAGE" = "coverage" ]; then
##############################################################################
# Dependencies of the coverage report job, which only collates what the
# 'test' stage jobs measured
if [ "$HOST_OS" = "linux" ] && [ "$DISTRO_ID" = "ubuntu" ]; then
PACKAGES=(
lcov
)
apt-get-retry update
apt-get-retry install --yes "${PACKAGES[@]}"
fi
elif [ "$STAGE" = "rtlmeter-run" ]; then
##############################################################################
# Dependencies of the RTLMeter jobs, which compile and run designs with an
# already built Verilator, so they need its runtime prerequisites only
if [ "$HOST_OS" = "linux" ] && [ "$DISTRO_ID" = "ubuntu" ]; then
PACKAGES=(
ccache
libfl-dev
libjemalloc-dev
libsystemc-dev
mold
)
apt-get-retry update
apt-get-retry install --yes "${PACKAGES[@]}"
fi
else
##############################################################################
# Unknown build stage
fatal "Unknown build stage: '$CI_BUILD_STAGE_NAME'"
fatal "Unknown stage '$STAGE'"
fi
# Report where the tools we may have installed live (ok if some are missing)
set +x
echo "Tools:"
for bin in autoconf bear bison ccache flex gdb help2man jq lcov mold perl wavediff z3; do
echo -n " $bin: "
which "$bin" || echo "Not found"
done
+142 -21
View File
@@ -1,46 +1,167 @@
#!/usr/bin/env bash
# DESCRIPTION: Verilator: CI script for 'pages.yml', notifies PRs
#
# Copyright 2025 by Geza Lore. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
#
# SPDX-FileCopyrightText: 2025 Geza Lore
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
# Notify PRs via comment that their coverage reports are available
# Notify PRs via comment that their workflow reports are available
# Get the current repo URL - might differ on a fork
readonly REPO_URL=$(gh repo view --json url --jq .url)
# Note this deliberately does not 'set -e'. A run that cannot be notified, say
# because its pull request was locked, must not hold up the notification of all
# the others, so each failure below moves on to the next run instead. Its
# artifact is then left in place, so it is retried on the next run of 'pages.yml'.
# The account we post as, which is how we tell our own earlier notifications
# from anybody else's comments. 'pages.yml' sets this to the slug of the app the
# token belongs to. Set it to your own login when running this by hand. The 'jq'
# filter below picks it up from the environment.
if [ -z "${GH_AUTHOR:-}" ]; then
echo "GH_AUTHOR must hold the account we post as" >&2
exit 1
fi
echo "Posting as '${GH_AUTHOR}'"
# Marker line separating the report from the history of the older reports
readonly HISTORY_MARKER='<!-- Verilator CI notification history -->'
# Opening line of the HTML comment stashing the history entry of the report
# itself. It is not shown in its own history, only inherited by the ones
# superseding it, hence it is kept out of sight until then.
readonly NEXTHIST_MARKER='<!-- Verilator CI notification entry'
# Create artifacts root directory
ARTIFACTS_ROOT=artifacts
mkdir -p ${ARTIFACTS_ROOT}
for RUN_ID in ${COVERAGE_PR_RUN_IDS//,/ }; do
echo "@@@ Processing run ${RUN_ID}"
for RUN_ID in ${PR_RUN_IDS//,/ }; do
# Create workflow artifacts directory
ARTIFACTS_DIR=${ARTIFACTS_ROOT}/${RUN_ID}
mkdir -p ${ARTIFACTS_DIR}
# Download artifact of this run, if exists
gh run download ${RUN_ID} --name coverage-pr-notification --dir ${ARTIFACTS_DIR} || true
ls -lsha ${ARTIFACTS_DIR}
gh run download ${RUN_ID} --name pr-notification --dir ${ARTIFACTS_DIR} &> /dev/null || true
# Move on if no notification is required
if [ ! -f ${ARTIFACTS_DIR}/pr-number.txt ]; then
echo "No notification found"
continue
fi
echo "Posting notification found"
cat ${ARTIFACTS_DIR}/body.txt
gh pr comment $(cat ${ARTIFACTS_DIR}/pr-number.txt) --body-file ${ARTIFACTS_DIR}/body.txt
PR_NUMBER=$(cat ${ARTIFACTS_DIR}/pr-number.txt)
echo "@@@ Run ${RUN_ID}: notifying PR #${PR_NUMBER}"
# Get the artifact ID
ARTIFACT_ID=$(gh api "repos/{owner}/{repo}/actions/runs/${RUN_ID}/artifacts" --jq '.artifacts[] | select(.name == "coverage-pr-notification") | .id')
# Everything below is created and validated by the 'upload-pr-notification'
# action. Move on if this artifact was not made by it, e.g. it is left over
# from an earlier version of the CI, so it does not hold up the other runs.
for f in body.txt key.txt hist.txt; do
if [ ! -f ${ARTIFACTS_DIR}/${f} ]; then
echo "Notification has no '${f}'" >&2
continue 2 # Note: continues the enclosing 'RUN_ID' loop
fi
done
# Delete it, so we only notify once
gh api --method DELETE "repos/{owner}/{repo}/actions/artifacts/${ARTIFACT_ID}"
# 'key.txt' holds the key naming the source of the notification. It goes on the
# first line of the comment as an HTML comment, so it is invisible when
# rendered, and is used below to find the stale notifications with the same
# key, which are then superseded by the new one and deleted.
COMMENT_MARKER="<!-- Verilator CI notification: $(cat ${ARTIFACTS_DIR}/key.txt) -->"
# Find the stale notifications from the same source on this PR. That is, our
# own comments with the same marker on their first line. Oldest first, as
# returned by the API. An app posts as '<slug>[bot]', so drop that suffix to
# compare against the slug. Move on if they cannot be listed, as without them
# we would post a duplicate instead of superseding them.
if ! COMMENT_MARKER="${COMMENT_MARKER}" \
gh api --paginate "repos/{owner}/{repo}/issues/${PR_NUMBER}/comments" \
--jq '.[]
| select((.user.login | rtrimstr("[bot]")) == env.GH_AUTHOR)
| select((.body | split("\n") | .[0] | rtrimstr("\r")) == env.COMMENT_MARKER)
| {id, body}' > ${ARTIFACTS_DIR}/stale.json; then
echo "Failed to list the comments of PR #${PR_NUMBER}" >&2
continue
fi
# Inherit the history of the newest stale notification. There should only ever
# be one, and it holds the whole history anyway, as each notification inherits
# the history of the one it superseded. Any older ones are only deleted below.
STALE_COUNT=$(wc -l < ${ARTIFACTS_DIR}/stale.json)
if [ ${STALE_COUNT} -gt 1 ]; then
echo "Found ${STALE_COUNT} stale notifications, only the newest is inherited from"
fi
HISTORY=${ARTIFACTS_DIR}/history.txt
touch ${HISTORY}
if [ ${STALE_COUNT} -gt 0 ]; then
tail -n 1 ${ARTIFACTS_DIR}/stale.json | jq -r '.body' | tr -d '\r' > ${ARTIFACTS_DIR}/stale-body.txt
# Its own entry, stashed in an HTML comment
awk -v marker="${NEXTHIST_MARKER}" '
$0 == marker { inside = 1; next }
!inside { next }
$0 == "-->" { exit }
NF { print }
' ${ARTIFACTS_DIR}/stale-body.txt >> ${HISTORY}
# Followed by its history, without the enclosing '<details>' markup
awk -v marker="${HISTORY_MARKER}" '
$0 == marker { inside = 1; next }
!inside { next }
$0 == "<details>" || /^<summary>/ { next }
$0 == "</details>" { exit }
NF { print }
' ${ARTIFACTS_DIR}/stale-body.txt >> ${HISTORY}
fi
# Assemble the comment. Starts with the marker and the report.
COMMENT=${ARTIFACTS_DIR}/comment.txt
cat > ${COMMENT} <<COMMENT_TEMPLATE
${COMMENT_MARKER}
$(cat ${ARTIFACTS_DIR}/body.txt)
COMMENT_TEMPLATE
# Then the history inherited from the notifications this one supersedes, so
# the older reports remain reachable from the only remaining comment.
if [ -s ${HISTORY} ]; then
echo "History holds $(wc -l < ${HISTORY}) entries"
cat >> ${COMMENT} <<HISTORY_TEMPLATE
${HISTORY_MARKER}
<details>
<summary>PR history</summary>
$(cat ${HISTORY})
</details>
HISTORY_TEMPLATE
fi
# Finally this report's own history entry, stashed out of sight until a later
# notification inherits it.
cat >> ${COMMENT} <<NEXTHIST_TEMPLATE
${NEXTHIST_MARKER}
$(cat ${ARTIFACTS_DIR}/hist.txt)
-->
NEXTHIST_TEMPLATE
# Post it. Move on if this failed, without deleting anything below, otherwise
# the history held by the stale notifications would be lost.
if ! jq -Rs '{body: .}' ${COMMENT} \
| gh api --method POST "repos/{owner}/{repo}/issues/${PR_NUMBER}/comments" \
--input - > ${ARTIFACTS_DIR}/posted.json; then
echo "Failed to post this notification on PR #${PR_NUMBER}:" >&2
cat ${COMMENT} >&2
continue
fi
echo "Posted $(jq -r '.html_url' ${ARTIFACTS_DIR}/posted.json)"
# Delete the stale notifications, so only the new one remains
for COMMENT_ID in $(jq -r '.id' ${ARTIFACTS_DIR}/stale.json); do
echo "Deleting stale comment ${COMMENT_ID}"
gh api --method DELETE "repos/{owner}/{repo}/issues/comments/${COMMENT_ID}"
done
# Get the artifact IDs. Note there can be more than one artifact named
# 'pr-notification' for a single run, as the artifacts endpoint lists
# artifacts across all run attempts, and a re-run uploads a new one while
# keeping the previous attempt's artifact.
ARTIFACT_IDS=$(gh api "repos/{owner}/{repo}/actions/runs/${RUN_ID}/artifacts" --jq '.artifacts[] | select(.name == "pr-notification") | .id')
# Delete them all, so we only notify once
for ARTIFACT_ID in ${ARTIFACT_IDS}; do
gh api --method DELETE "repos/{owner}/{repo}/actions/artifacts/${ARTIFACT_ID}"
done
done
+129 -32
View File
@@ -1,16 +1,11 @@
#!/usr/bin/env bash
# DESCRIPTION: Verilator: CI script for 'pages.yml', builds the GitHub Pages
#
# Copyright 2025 by Geza Lore. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
#
# SPDX-FileCopyrightText: 2025 Geza Lore
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
# This scipt build the content of the GitHub Pages for the repository.
# Currently this only hosts code coverage reports, but it would be possible to
# add any other contents to the page in parallel here.
# Currently this hosts code coverage reports, and PR RTLMeter detailed reports.
# Developer note: You should be able to run this script in your local checkout
# if you have GitHub CLI (command 'gh') setup, authenticated ('gh auth login'),
@@ -29,6 +24,9 @@ if [[ -z "$GITHUB_OUTPUT" ]]; then
GITHUB_OUTPUT=github-output.txt
fi
# Run IDs of PR jobs processed
PR_RUN_IDS=""
# Populates ${PAGES_ROOT}/coverage-reports
compile_coverage_reports() {
# We will process all runs up to and including this date. This is chosen to be
@@ -37,16 +35,13 @@ compile_coverage_reports() {
# Gather all coverage workflow runs within the time window
gh run list -w coverage.yml --limit 1000 --created ">=${OLDEST}" --json "databaseId,event,status,conclusion,createdAt,number" > recentRuns.json
echo @@@ Recent runs:
jq "." recentRuns.json
# Select completd runs that were not cancelled or skipped, sort by descending run number
jq 'sort_by(-.number) | map(select(.status == "completed" and (.conclusion == "success" or .conclusion == "failure")))' recentRuns.json > completedRuns.json
echo @@@ Completed with success or failure:
jq "." completedRuns.json
echo "@@@ $(jq length completedRuns.json) of $(jq length recentRuns.json) runs since ${OLDEST} completed with success or failure"
# Create artifacts root directory
local ARTIFACTS_ROOT=artifacts
local ARTIFACTS_ROOT=artifacts-coverage
mkdir -p ${ARTIFACTS_ROOT}
# Create coverage reports root directory
@@ -57,9 +52,6 @@ compile_coverage_reports() {
local CONTENTS=contents.tmp
echo > ${CONTENTS}
# Run IDs of PR jobs processed
local PR_RUN_IDS=""
# Iterate over all unique event types that triggered the workflows
for EVENT in $(jq -r 'map(.event) | sort | unique | .[]' completedRuns.json); do
echo "@@@ Processing '${EVENT}' runs"
@@ -69,35 +61,24 @@ compile_coverage_reports() {
# For each worfklow run that was triggered by this event type
for RUN_ID in $(jq ".[] | select(.event == \"${EVENT}\") |.databaseId" completedRuns.json); do
echo "@@@ Processing run ${RUN_ID}"
# Extract the info of this run
jq ".[] | select(.databaseId == $RUN_ID)" completedRuns.json > workflow.json
jq "." workflow.json
# Record run ID of PR job
if [[ $EVENT == "pull_request" ]]; then
if [[ -z "$PR_RUN_IDS" ]]; then
PR_RUN_IDS="$RUN_ID"
else
PR_RUN_IDS="$PR_RUN_IDS,$RUN_ID"
fi
fi
[[ $EVENT != "pull_request" ]] || PR_RUN_IDS="$PR_RUN_IDS $RUN_ID"
# Create workflow artifacts directory
local ARTIFACTS_DIR=${ARTIFACTS_ROOT}/${RUN_ID}
mkdir -p ${ARTIFACTS_DIR}
# Download artifacts of this run, if exists
gh run download ${RUN_ID} --name coverage-report --dir ${ARTIFACTS_DIR} || true
ls -lsha ${ARTIFACTS_DIR}
gh run download ${RUN_ID} --name coverage-report --dir ${ARTIFACTS_DIR} &> /dev/null || true
# Move on if no coverage report is available
if [ ! -d ${ARTIFACTS_DIR}/report ]; then
echo "No coverage report found"
continue
fi
echo "Coverage report found"
echo "@@@ Run ${RUN_ID}: coverage report found"
# Emit section header
if [[ -n $EMIT_SECTION_HEADER ]]; then
@@ -152,7 +133,7 @@ CONTENTS_TEMPLATE
<body>
$(cat ${CONTENTS})
<h4>Assembled $(date --iso-8601=minutes --utc)</h1>
<h4>Assembled $(date --iso-8601=minutes --utc)</h4>
<body>
</html>
@@ -160,12 +141,128 @@ INDEX_TEMPLATE
# Report size
du -shc ${COVERAGE_ROOT}/*
}
# Set output
echo "coverage-pr-run-ids=${PR_RUN_IDS}" >> $GITHUB_OUTPUT
# Populates ${PAGES_ROOT}/rtlmeter-reports
compile_rtlmeter_reports() {
# We will process all runs up to and including this date. This is chosen to be
# slightly less than the artifact retention period for simplicity.
local OLDEST=$(date --date="28 days ago" --iso-8601=date)
# Gather all RTLMeter workflow runs within the time window
gh run list -w rtlmeter.yml --limit 1000 --created ">=${OLDEST}" --json "databaseId,event,status,conclusion,createdAt,number" > recentRuns.json
# Select completd runs that were not cancelled or skipped, sort by descending run number
jq 'sort_by(-.number) | map(select(.status == "completed" and (.conclusion == "success" or .conclusion == "failure")))' recentRuns.json > completedRuns.json
echo "@@@ $(jq length completedRuns.json) of $(jq length recentRuns.json) runs since ${OLDEST} completed with success or failure"
# Create artifacts root directory
local ARTIFACTS_ROOT=artifacts-rtlmeter
mkdir -p ${ARTIFACTS_ROOT}
# Create rtlmeter reports root directory
local RTLMETER_ROOT=${PAGES_ROOT}/rtlmeter-reports
mkdir -p ${RTLMETER_ROOT}
# Create index page contents fragment
local CONTENTS=contents.tmp
echo > ${CONTENTS}
# Iterate over all unique event types that triggered the workflows
for EVENT in $(jq -r 'map(.event) | sort | unique | .[]' completedRuns.json); do
echo "@@@ Processing '${EVENT}' runs"
# Emit section header if a report exists with this event type
EMIT_SECTION_HEADER=1
# For each worfklow run that was triggered by this event type
for RUN_ID in $(jq ".[] | select(.event == \"${EVENT}\") |.databaseId" completedRuns.json); do
# Extract the info of this run
jq ".[] | select(.databaseId == $RUN_ID)" completedRuns.json > workflow.json
# Record run ID of PR job
[[ $EVENT != "pull_request" ]] || PR_RUN_IDS="$PR_RUN_IDS $RUN_ID"
# Create workflow artifacts directory
local ARTIFACTS_DIR=${ARTIFACTS_ROOT}/${RUN_ID}
mkdir -p ${ARTIFACTS_DIR}
# Download artifacts of this run, if exists
gh run download ${RUN_ID} --name rtlmeter-report --dir ${ARTIFACTS_DIR} &> /dev/null || true
# Move on if no RTLMeter report is available
if [ ! -d ${ARTIFACTS_DIR}/report ]; then
continue
fi
echo "@@@ Run ${RUN_ID}: RTLMeter report found"
# Emit section header
if [[ -n $EMIT_SECTION_HEADER ]]; then
unset EMIT_SECTION_HEADER
echo "<h4>RTLMeter reports for '${EVENT}' runs:</h4>" >> ${CONTENTS}
fi
# Create pages subdirectory
mv ${ARTIFACTS_DIR}/report ${RTLMETER_ROOT}/${RUN_ID}
# Add index page content
local WORKFLOW_CREATED=$(jq -r '.createdAt' workflow.json)
local WOFKRLOW_NUMBER=$(jq -r '.number' workflow.json)
cat >> ${CONTENTS} <<CONTENTS_TEMPLATE
Run <a href="${RUN_ID}/index.html">#${WOFKRLOW_NUMBER}</a>
| GitHub: <a href="${REPO_URL}/actions/runs/${RUN_ID}">${RUN_ID}</a>
| started at: ${WORKFLOW_CREATED}
CONTENTS_TEMPLATE
if [ -e ${ARTIFACTS_DIR}/pr-number.txt ]; then
local PRNUMBER=$(cat ${ARTIFACTS_DIR}/pr-number.txt)
echo " | Pull request: <a href=\"${REPO_URL}/pull/${PRNUMBER}\">#${PRNUMBER}</a>" >> ${CONTENTS}
fi
echo "<br>" >> ${CONTENTS}
done
# Section break
if [[ -z "$EMIT_SECTION_HEADER" ]]; then
echo "<hr>" >> ${CONTENTS}
fi
done
# Write rtlmeter report index.html
cat > ${RTLMETER_ROOT}/index.html <<INDEX_TEMPLATE
<html>
<head>
<title>Verilator CI RTLMeter reports</title>
<style>
body {
font-family: courier, serif;
background-color: #f3f3f3;
a {
color: #008fd7;
}
}
</style>
</head>
<body>
$(cat ${CONTENTS})
<h4>Assembled $(date --iso-8601=minutes --utc)</h4>
<body>
</html>
INDEX_TEMPLATE
# Report size
du -shc ${RTLMETER_ROOT}/*
}
# Compilie coverage reports
compile_coverage_reports;
# Compile RTLMeter reports
compile_rtlmeter_reports;
# You can build any other content here to be put under ${PAGES_ROOT}
# Set output to all affected unique PR run IDs (comma separated, no trailing comma)
IDS=$(echo ${PR_RUN_IDS} | xargs -n1 | sort -u | paste -sd,)
echo "pr-run-ids=${IDS}" >> $GITHUB_OUTPUT
+218
View File
@@ -0,0 +1,218 @@
#!/usr/bin/env python3
# DESCRIPTION: Verilator: RTLMeter cases to run in the rtlmeter.yml CI workflow
#
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
###############################################################################
# Defines the RTLMeter cases to run in CI. This is consumed by the 'start' job
# in rtlmeter.yml, which captures the printed JSON and feeds it to the run job
# matrices.
###############################################################################
import argparse
import json
# Cases to run for scheduled runs, keyyed by the 'run tag' used in rtlmeter.yml
# The associated priority is roughly the number of minutes it takes to run the
# job, the emitted job matrix will try to start longest jobs first.
# Cases to run for non-PR jobs (e.g.: nightly schedule)
# fmt: off
CASES = {
"gcc": [
("BlackParrot:1x1:*", 5),
("BlackParrot:2x2:*", 14),
("BlackParrot:4x4:*", 25),
("Caliptra:default:*", 19),
("HummingbirdV2-E203:default:*", 3),
("HummingbirdV2-E203:nodelay:*", 3),
("NVDLA:*", 29),
("OpenPiton:1x1:*", 4),
("OpenPiton:2x2:*", 7),
("OpenPiton:4x4:*", 10),
("OpenTitan:*", 16),
("Servant:qerv:*", 2),
("Servant:serv:*", 2),
("VeeR-EH1:asic:*", 4),
("VeeR-EH1:default:*", 6),
("VeeR-EH1:hiperf:*", 5),
("VeeR-EH2:asic:*", 13),
("VeeR-EH2:default:*", 6),
("VeeR-EH2:hiperf:*", 12),
("VeeR-EL2:asic:*", 4),
("VeeR-EL2:default:*", 4),
("VeeR-EL2:hiperf:*", 4),
("Vortex:mini:*", 3),
("Vortex:sane:*", 6),
("XiangShan:default-chisel3:* !*:linux", 31),
("XiangShan:default-chisel6:* !*:linux", 28),
("XiangShan:mini-chisel3:* !*:linux", 13),
("XiangShan:mini-chisel6:* !*:linux", 15),
("XuanTie-C906:*", 5),
("XuanTie-C910:*", 9),
("XuanTie-E902:*", 5),
("XuanTie-E906:*", 6),
],
"clang": [
("BlackParrot:1x1:*", 5),
("BlackParrot:2x2:*", 9),
("BlackParrot:4x4:*", 12),
("Caliptra:default:*", 16),
("HummingbirdV2-E203:default:*", 10),
("HummingbirdV2-E203:nodelay:*", 10),
("NVDLA:*", 28),
("OpenPiton:1x1:*", 5),
("OpenPiton:2x2:*", 6),
("OpenPiton:4x4:*", 8),
("OpenTitan:*", 10),
("Servant:qerv:phil", 17),
("Servant:serv:phil", 15),
("VeeR-EH1:asic:*", 6),
("VeeR-EH1:default:*", 8),
("VeeR-EH1:hiperf:*", 5),
("VeeR-EH2:asic:*", 9),
("VeeR-EH2:default:*", 8),
("VeeR-EH2:hiperf:*", 7),
("VeeR-EL2:asic:*", 4),
("VeeR-EL2:default:*", 5),
("VeeR-EL2:hiperf:*", 5),
("Vortex:mini:*", 3),
("Vortex:sane:*", 5),
("XiangShan:default-chisel3:* !*:linux", 21),
("XiangShan:default-chisel6:* !*:linux", 19),
("XiangShan:mini-chisel3:* !*:linux", 8),
("XiangShan:mini-chisel6:* !*:linux", 8),
("XuanTie-C906:*", 3),
("XuanTie-C910:*", 7),
("XuanTie-E902:*", 7),
("XuanTie-E906:*", 7),
],
"gcc-hier": [
("BlackParrot:1x1:*", 4),
("BlackParrot:2x2:*", 16),
("BlackParrot:4x4:*", 25),
("NVDLA:*", 25),
("OpenPiton:16x16:dhry", 16),
("OpenPiton:1x1:*", 4),
("OpenPiton:2x2:*", 4),
("OpenPiton:4x4:*", 4),
("OpenPiton:8x8:*", 6),
("XuanTie-C910:*", 7),
],
}
# fmt: on
# Cases to run for PR jobs
# fmt: off
CASES_PR = {
"gcc": [
("BlackParrot:1x1:*", 5),
("BlackParrot:4x4:*", 25),
("Caliptra:default:*", 19),
("NVDLA:*", 29),
("HummingbirdV2-E203:default:*", 3),
("HummingbirdV2-E203:nodelay:*", 3),
("OpenPiton:1x1:*", 4),
("OpenPiton:4x4:*", 10),
("OpenTitan:*", 16),
("Servant:qerv:*", 2),
("Servant:serv:*", 2),
("VeeR-EH1:asic:*", 4),
("VeeR-EH1:default:*", 6),
("VeeR-EH1:hiperf:*", 5),
("VeeR-EH2:asic:*", 13),
("VeeR-EH2:default:*", 6),
("VeeR-EH2:hiperf:*", 12),
("VeeR-EL2:asic:*", 4),
("VeeR-EL2:default:*", 4),
("VeeR-EL2:hiperf:*", 4),
("Vortex:mini:*", 3),
("Vortex:sane:*", 6),
("XiangShan:default-chisel3:* !*:linux", 31),
("XiangShan:default-chisel6:* !*:linux", 28),
("XiangShan:mini-chisel3:* !*:linux", 13),
("XiangShan:mini-chisel6:* !*:linux", 15),
("XuanTie-C906:*", 5),
("XuanTie-C910:*", 9),
("XuanTie-E902:*", 5),
("XuanTie-E906:*", 6),
],
"clang": [
("BlackParrot:1x1:*", 5),
("BlackParrot:4x4:*", 12),
("Caliptra:default:*", 16),
("NVDLA:*", 28),
("HummingbirdV2-E203:default:*", 10),
("HummingbirdV2-E203:nodelay:*", 10),
("OpenPiton:1x1:*", 5),
("OpenPiton:4x4:*", 8),
("OpenTitan:*", 10),
("Servant:qerv:phil", 17),
("Servant:serv:phil", 15),
("VeeR-EH1:asic:*", 6),
("VeeR-EH1:default:*", 8),
("VeeR-EH1:hiperf:*", 5),
("VeeR-EH2:asic:*", 9),
("VeeR-EH2:default:*", 8),
("VeeR-EH2:hiperf:*", 7),
("VeeR-EL2:asic:*", 4),
("VeeR-EL2:default:*", 5),
("VeeR-EL2:hiperf:*", 5),
("Vortex:mini:*", 3),
("Vortex:sane:*", 5),
("XiangShan:default-chisel3:* !*:linux", 21),
("XiangShan:default-chisel6:* !*:linux", 19),
("XiangShan:mini-chisel3:* !*:linux", 8),
("XiangShan:mini-chisel6:* !*:linux", 8),
("XuanTie-C906:*", 3),
("XuanTie-C910:*", 7),
("XuanTie-E902:*", 7),
("XuanTie-E906:*", 7),
],
"gcc-hier": [
("BlackParrot:1x1:*", 4),
("BlackParrot:4x4:*", 25),
("NVDLA:*", 25),
("OpenPiton:16x16:dhry", 16),
("OpenPiton:1x1:*", 4),
("OpenPiton:4x4:*", 4),
("OpenPiton:8x8:*", 6),
("XuanTie-C910:*", 7),
],
}
# fmt: on
parser = argparse.ArgumentParser(
description="Print the RTLMeter CI cases as JSON, keyed by run tag")
parser.add_argument("--event-name",
required=True,
help="GitHub event name that triggered the workflow")
parser.add_argument(
"--ci-testing",
action="store_true",
help="Print only the shortest (lowest priority) case per tag, to reduce CI testing time")
args = parser.parse_args()
# Pull requests use the reduced 'CASES_PR' set, other events (e.g.: the nightly
# schedule) use the full 'CASES' set.
is_pr = args.event_name == "pull_request"
selected = CASES_PR if is_pr else CASES
cases = {}
for tag, entries in selected.items():
# Highest priority (longest) first
ordered = sorted(entries, key=lambda cp: cp[1], reverse=True)
# While tweaking the CI, keep only the shortest (lowest priority) case to minimise churn time
if args.ci_testing:
ordered = ordered[-1:]
# Case filters appended to every case for this tag/event
suffix = ""
# Filters out the non-hierarchical case variants for the hierarchical job
if tag == "gcc-hier":
suffix += " !-hier"
# Filter out hello tests on pull requests, these just add measurement noise
if is_pr:
suffix += " !*:hello"
cases[tag] = [case + suffix for case, _ in ordered]
print(json.dumps(cases, separators=(",", ":")))
+175
View File
@@ -0,0 +1,175 @@
#!/usr/bin/env bash
# DESCRIPTION: Verilator: CI script for 'rtlmeter.yml' PR results
#
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
# This script builds the content of the response comment posted on PRs
# at the end of RTLMeter runs.
# Developer note: You should be able to run this script in your local checkout
# if you have GitHub CLI (command 'gh') setup, authenticated ('gh auth login'),
# and have set a default repository ('gh repo set-default').
# Trace when running in the CI
[ "$GITHUB_ACTIONS" != "true" ] || set -x
# Arguments:
# 1. run ID
# 2. SHA of the event that triggered the run (for a PR, the test merge commit)
# rest: run tags
RUN_ID=$1; shift
RUN_SHA=$1; shift
RUNS="$@"
# $VERILATOR_CHECKOUT/ci directory
SCRIPT_DIR=$(readlink -f $(dirname ${BASH_SOURCE[0]}))
# Move into a temporary directory
rm -rf rtlmeter-report
mkdir rtlmeter-report
pushd rtlmeter-report &> /dev/null
TMP_DIR=$(readlink -f .)
# Download the combined results. 'combine-results' uploads a single artifact
# for each version, holding the per-tag JSON files (e.g. all-results-gcc.json):
# - 'all-results' for the new version
# - 'all-reference' for the old reference version
mkdir new ref
NEW_DIR=$(readlink -f new)
REF_DIR=$(readlink -f ref)
gh run download ${RUN_ID} --name all-results --dir $NEW_DIR
gh run download ${RUN_ID} --name all-reference --dir $REF_DIR
# Get Some metadata about the runs
RUN_URL=$(gh run view $RUN_ID --json url --jq ".url")
RUN_NUM=$(gh run view $RUN_ID --json number --jq ".number")
# Repository owner and name of the default repository, used to build the
# GitHub Pages URL of the detailed report. The owner is lowercased, as required
# for the '<owner>.github.io' Pages domain. Resolved here, while still in the
# default repository's git context (before the 'cd rtlmeter' below).
PAGES_OWNER=$(gh repo view --json owner --jq '.owner.login' | tr '[:upper:]' '[:lower:]')
PAGES_NAME=$(gh repo view --json name --jq '.name')
# The 'old' reference was built from the target branch base commit, which is
# the first parent of the triggering merge commit (same as the 'start' job in
# rtlmeter.yml). Resolved here, while still in the default repository's git
# context (before the 'cd rtlmeter' below).
REF_SHA=$(gh api "repos/{owner}/{repo}/commits/$RUN_SHA" --jq '.parents[0].sha')
# Go back to root directory
popd &> /dev/null
# Go to RTLMeter directory
cd rtlmeter
# Compare results
SUMMARY_ARGS=()
for r in $RUNS; do
CMP_JSON=$TMP_DIR/cmp-$r.json
# Gather args for summary script
SUMMARY_ARGS+=($NEW_DIR/all-results-$r.json $CMP_JSON)
# Create JSON
./rtlmeter compare --format json --steps "*" --metrics "*" \
$REF_DIR/all-reference-$r.json $NEW_DIR/all-results-$r.json > $CMP_JSON
# Also create detailed tables
./rtlmeter compare --format ascii --steps 'verilate' --metrics '*' $REF_DIR/all-reference-$r.json $NEW_DIR/all-results-$r.json > $TMP_DIR/verilate-$r.txt
./rtlmeter compare --format ascii --steps 'cppbuild' --metrics '*' $REF_DIR/all-reference-$r.json $NEW_DIR/all-results-$r.json > $TMP_DIR/cppbuild-$r.txt
./rtlmeter compare --format ascii --steps 'execute' --metrics '*' $REF_DIR/all-reference-$r.json $NEW_DIR/all-results-$r.json > $TMP_DIR/execute-$r.txt
# Chop them at new lines, into one table per file
awk -v RS= -v prefix=$TMP_DIR/$r-frag '{print > sprintf("%s-verilate-%02d.txt",prefix,NR)}' $TMP_DIR/verilate-$r.txt
awk -v RS= -v prefix=$TMP_DIR/$r-frag '{print > sprintf("%s-cppbuild-%02d.txt",prefix,NR)}' $TMP_DIR/cppbuild-$r.txt
awk -v RS= -v prefix=$TMP_DIR/$r-frag '{print > sprintf("%s-execute-%02d.txt" ,prefix,NR)}' $TMP_DIR/execute-$r.txt
done
# Create summary, suppress failure, but save the status reported to pass back.
STATUS=0
venv/bin/python3 $SCRIPT_DIR/ci-rtlmeter-report.py ${SUMMARY_ARGS[@]} > $TMP_DIR/summary.txt || STATUS=$?
# Print it
cat $TMP_DIR/summary.txt
REPORT_URL=https://${PAGES_OWNER}.github.io/${PAGES_NAME}/rtlmeter-reports/${RUN_ID}/index.html
###############################################################################
# Create the PR notification
###############################################################################
NOTIFICATION_DIR=$TMP_DIR/notification
mkdir -p $NOTIFICATION_DIR
cat > ${NOTIFICATION_DIR}/body.txt <<NOTIFICATION_TEMPLATE
Performance metrics for PR workflow [#$RUN_NUM]($RUN_URL), comparing:
- target branch commit [${REF_SHA:0:9}](https://github.com/${PAGES_OWNER}/${PAGES_NAME}/commit/${REF_SHA}) (A)
- with PR merge commit [${RUN_SHA:0:9}](https://github.com/${PAGES_OWNER}/${PAGES_NAME}/commit/${RUN_SHA}) (B)
<details open>
<summary>Summary of all runs</summary>
<pre>
$(cat $TMP_DIR/summary.txt)
</pre>
</details>
The reported numbers are the geometric means of the ratios of the metrics over all cases,
less than 1 is a regression, greater than 1 is an improvement.
The jobs run on variable and noisy runners, so some variance is expected between runs.
Detailed report: [${RUN_ID}](${REPORT_URL})
NOTIFICATION_TEMPLATE
echo "Workflow [#$RUN_NUM]($RUN_URL) report: [${RUN_ID}](${REPORT_URL})" > ${NOTIFICATION_DIR}/hist.txt
###############################################################################
# Create detailed report
###############################################################################
REPORT=$TMP_DIR/body.html
cat > $REPORT <<SUMMARY_TEMPLATE
<h3>Summary of all runs</h3>
<pre>
$(cat $TMP_DIR/summary.txt)
</pre>
SUMMARY_TEMPLATE
echo "<h3>Detailed results</h3>" >> $REPORT
for r in $RUNS; do
RUN_NAME=$(jq -rj ".[0].runName" $NEW_DIR/all-results-$r.json)
echo "<h4>$RUN_NAME</h4>" >> $REPORT
for f in $(ls -1 $TMP_DIR/$r-frag-verilate-*.txt | sort) \
$(ls -1 $TMP_DIR/$r-frag-cppbuild-*.txt | sort) \
$(ls -1 $TMP_DIR/$r-frag-execute-*.txt | sort); do
cat >> $REPORT <<DETAIL_TAMPLATE
<details>
<summary>$(head -n 1 $f | tr -d '\n')</summary>
<pre>
$(tail -n +2 $f)
</pre>
</details>
DETAIL_TAMPLATE
done
done
# Turn the report into a proper HTML page
mkdir -p ${TMP_DIR}/report
cat > ${TMP_DIR}/report/index.html <<INDEX_TEMPLATE
<html>
<head>
<title>Verilator RTLMeter report #${RUN_NUM}</title>
<style>
body {
font-family: courier, serif;
background-color: #f3f3f3;
a {
color: #008fd7;
}
}
</style>
</head>
<body>
$(cat ${TMP_DIR}/body.html)
</body>
</html>
INDEX_TEMPLATE
exit $STATUS
+137
View File
@@ -0,0 +1,137 @@
# DESCRIPTION: Verilator: CI script for 'rtlmeter.yml' PR results
#
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
###############################################################################
# This script runs with the venv of **RTLMeter**
###############################################################################
import sys
import json
import tabulate
from typing import Final, List
tabulate.PRESERVE_WHITESPACE = True
tabulate.MIN_PADDING = 0
_ASCII_TABLE_FORMAT: Final = tabulate.TableFormat(
lineabove=tabulate.Line("╒═", "═", "═╤═", "═╕"),
linebelowheader=tabulate.Line("╞═", "═", "═╪═", "═╡"),
linebelow=tabulate.Line("╘═", "═", "═╧═", "═╛"),
headerrow=tabulate.DataRow("│ ", " │ ", " │"),
datarow=tabulate.DataRow("│ ", " │ ", " │"),
linebetweenrows=None,
padding=0,
with_header_hide=None,
)
def printTable(table: List[List[str]], **kwargs) -> None:
print(tabulate.tabulate(table, tablefmt=_ASCII_TABLE_FORMAT, **kwargs))
# fmt: off
stepMetric = (
# Step, Metric, Status Brackets
("execute", "speed", ("❌", 0.96, "⚠️", 0.98, "✅", 1.02, "💡", 1.04, "⭐")),
("execute", "memory", ("❌", 0.90, "⚠️", 0.95, "✅", 1.05, "💡", 1.10, "⭐")),
("verilate", "cpu", ("❌", 0.96, "⚠️", 0.98, "✅", 1.02, "💡", 1.04, "⭐")),
("verilate", "memory", ("❌", 0.90, "⚠️", 0.95, "✅", 1.05, "💡", 1.10, "⭐")),
("cppbuild", "cpu", ("❌", 0.96, "⚠️", 0.98, "✅", 1.02, "💡", 1.04, "⭐")),
("cppbuild", "memory", ("❌", 0.90, "⚠️", 0.95, "✅", 1.05, "💡", 1.10, "⭐")),
("cppbuild", "codeSize",("❌", 0.96, "⚠️", 0.98, "✅", 1.02, "💡", 1.04, "⭐")),
("cppbuild", "elapsed", ("❌", 0.70, "⚠️", 0.85, "✅", 1.15, "💡", 1.30, "⭐")),
)
badgeLegend = [
("❌", "Likely regression"),
("⚠️", "Possible regression"),
("✅", "Within acceptable range"),
("💡", "Possible improvement"),
("⭐", "Likely improvement"),
]
# fmt: on
changedCycles = []
table = []
badgesToExplain = set()
for ref, cmp in zip(sys.argv[1::2], sys.argv[2::2]):
with open(ref, "r", encoding="utf-8") as f:
ref_json = json.load(f)[0]
with open(cmp, "r", encoding="utf-8") as f:
cmp_json = json.load(f)
if table:
table.append(tabulate.SEPARATING_LINE)
runName = ref_json["runName"]
# Check simulated cycles match - it's ok to crash if this entry does not exist
for entry in cmp_json["execute"]["clocks"]["table"]:
case, _, _, (refCycles, _), (newCycles, _), _, _ = entry
refCycles = int(refCycles)
newCycles = int(newCycles)
if refCycles != newCycles:
changedCycles.append([runName, case, refCycles, newCycles])
# Check metrics
for step, metric, brackets in stepMetric:
if step not in cmp_json:
continue
data = cmp_json[step]
if metric not in data:
continue
data = data[metric]
minGain = float("inf")
maxGain = float("-inf")
meanGain = 1
count = 0
for _, _, _, (a, _), (b, _), g, _ in data["table"]:
# for wall clock and CPU time, ignore small values that just add noise
if metric == "elapsed" or metric == "cpu":
if a < 30 or b < 30:
continue
minGain = min(minGain, g)
maxGain = max(maxGain, g)
meanGain *= g
count += 1
if count == 0:
continue
meanGain = meanGain**(1 / count)
status = brackets[0]
for limit, badge in zip(brackets[1::2], brackets[2::2]):
if meanGain >= limit:
status = badge
badgesToExplain.add(status)
table.append([
runName, step, ref_json["metrics"][metric]["header"], f"{meanGain:.2f}x {status} ",
f"{minGain:.2f}x", f"{maxGain:.2f}x", f"{count}"
])
# Print changed cycles if any
if changedCycles:
print("❌ simulated cycles changed (must be fixed):")
printTable(changedCycles,
headers=("Run", "Case", "Old Cycles", "New Cycles"),
colalign=("left", "left", "right", "right"),
disable_numparse=True)
print()
# Print results
printTable(
table,
headers=("Run", "Step", "Metric", "Improvement", "Min", "Max", "Samples"),
colalign=("left", "left", "left", "right", "right", "right", "right"),
disable_numparse=True,
)
# Explain badges
print()
for badge, legend in badgeLegend:
if badge in badgesToExplain:
print(f" {badge} : {legend}")
# Fail job if status changed
sys.exit(0 if not changedCycles else 1)
-212
View File
@@ -1,212 +0,0 @@
#!/usr/bin/env bash
# DESCRIPTION: Verilator: CI main job script
#
# Copyright 2020 by Geza Lore. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
#
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
################################################################################
# This is the main script executed in the 'script' phase by all jobs. We use a
# single script to keep the CI setting simple. We pass job parameters via
# environment variables using 'env' keys.
################################################################################
set -e
set -x
fatal() {
echo "ERROR: $(basename "$0"): $1" >&2; exit 1;
}
if [ "$CI_OS_NAME" = "linux" ]; then
export MAKE=make
NPROC=$(nproc)
elif [ "$CI_OS_NAME" = "osx" ]; then
export MAKE=make
NPROC=$(sysctl -n hw.logicalcpu)
# Disable ccache, doesn't always work in GitHub Actions
export OBJCACHE=
elif [ "$CI_OS_NAME" = "freebsd" ]; then
export MAKE=gmake
NPROC=$(sysctl -n hw.ncpu)
else
fatal "Unknown os: '$CI_OS_NAME'"
fi
NPROC=$(expr $NPROC '+' 1)
if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then
##############################################################################
# Build verilator
autoconf
CONFIGURE_ARGS="--enable-longtests --enable-ccwarn"
if [ "$CI_DEV_ASAN" = 1 ]; then
CONFIGURE_ARGS="$CONFIGURE_ARGS --enable-dev-asan"
CXX="$CXX -DVL_LEAK_CHECKS"
fi
if [ "$CI_DEV_GCOV" = 1 ]; then
CONFIGURE_ARGS="$CONFIGURE_ARGS --enable-dev-gcov"
fi
./configure $CONFIGURE_ARGS --prefix="$INSTALL_DIR"
ccache -z
"$MAKE" -j "$NPROC" -k
# 22.04: ccache -s -v
ccache -s
if [ "$CI_OS_NAME" = "osx" ]; then
file bin/verilator_bin
file bin/verilator_bin_dbg
md5 bin/verilator_bin
md5 bin/verilator_bin_dbg
stat bin/verilator_bin
stat bin/verilator_bin_dbg
fi
elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
##############################################################################
# Run tests
export VERILATOR_TEST_NO_CONTRIBUTORS=1 # Separate workflow check
export VERILATOR_TEST_NO_LINT_PY=1 # Separate workflow check
if [ "$CI_OS_NAME" = "osx" ]; then
export VERILATOR_TEST_NO_GDB=1 # Pain to get GDB to work on OS X
# TODO below may no longer be required as configure checks for -pg
export VERILATOR_TEST_NO_GPROF=1 # Apple Clang has no -pg
# export PATH="/Applications/gtkwave.app/Contents/Resources/bin:$PATH" # fst2vcd
file bin/verilator_bin
file bin/verilator_bin_dbg
md5 bin/verilator_bin
md5 bin/verilator_bin_dbg
stat bin/verilator_bin
stat bin/verilator_bin_dbg
# For some reason, the dbg exe is corrupted by this point ('file' reports
# it as data rather than a Mach-O). Unclear if this is an OS X issue or
# CI's. Remove the file and re-link...
rm bin/verilator_bin_dbg
"$MAKE" -j "$NPROC" -k
elif [ "$CI_OS_NAME" = "freebsd" ]; then
export VERILATOR_TEST_NO_GDB=1 # Disable for now, ideally should run
# TODO below may no longer be required as configure checks for -pg
export VERILATOR_TEST_NO_GPROF=1 # gprof is a bit different on FreeBSD, disable
fi
TEST_REGRESS=test_regress
if [ "$CI_RELOC" == 1 ]; then
# Testing that the installation is relocatable.
"$MAKE" install
mkdir -p "$RELOC_DIR"
mv "$INSTALL_DIR" "$RELOC_DIR/relocated-install"
export VERILATOR_ROOT="$RELOC_DIR/relocated-install/share/verilator"
TEST_REGRESS="$RELOC_DIR/test_regress"
mv test_regress "$TEST_REGRESS"
NODIST="$RELOC_DIR/nodist"
mv nodist "$NODIST"
# Feeling brave?
find . -delete
ls -la .
fi
# Run the specified test
ccache -z
case $TESTS in
dist-vlt-0)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=0/4
;;
dist-vlt-1)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=1/4
;;
dist-vlt-2)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=2/4
;;
dist-vlt-3)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=3/4
;;
vltmt-0)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt --driver-clean" DRIVER_HASHSET=--hashset=0/3
;;
vltmt-1)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt --driver-clean" DRIVER_HASHSET=--hashset=1/3
;;
vltmt-2)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt --driver-clean" DRIVER_HASHSET=--hashset=2/3
;;
coverage-dist)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist"
;;
coverage-vlt-0)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=0/10
;;
coverage-vlt-1)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=1/10
;;
coverage-vlt-2)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=2/10
;;
coverage-vlt-3)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=3/10
;;
coverage-vlt-4)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=4/10
;;
coverage-vlt-5)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=5/10
;;
coverage-vlt-6)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=6/10
;;
coverage-vlt-7)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=7/10
;;
coverage-vlt-8)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=8/10
;;
coverage-vlt-9)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=9/10
;;
coverage-vltmt-0)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=0/10
;;
coverage-vltmt-1)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=1/10
;;
coverage-vltmt-2)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=2/10
;;
coverage-vltmt-3)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=3/10
;;
coverage-vltmt-4)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=4/10
;;
coverage-vltmt-5)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=5/10
;;
coverage-vltmt-6)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=6/10
;;
coverage-vltmt-7)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=7/10
;;
coverage-vltmt-8)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=8/10
;;
coverage-vltmt-9)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=9/10
;;
*)
fatal "Unknown test: $TESTS"
;;
esac
# To see load average (1 minute, 5 minute, 15 minute)
uptime
# 22.04: ccache -s -v
ccache -s
else
##############################################################################
# Unknown build stage
fatal "Unknown build stage: '$CI_BUILD_STAGE_NAME'"
fi
+169
View File
@@ -0,0 +1,169 @@
#!/usr/bin/env bash
# DESCRIPTION: Verilator: CI test job script
#
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
################################################################################
# Executed in the 'test' stage.
################################################################################
# Destructive to the checkout (wipes most of it); never run locally
if [ "$GITHUB_ACTIONS" != "true" ]; then
echo "ERROR: $(basename "$0") must only be run in GitHub Actions CI" >&2
exit 1
fi
set -e
set -x
source "$(dirname "$0")/ci-common.bash"
################################################################################
# Parse arguments
OPT_RELOC=
OPT_SUITE=
while [ $# -gt 0 ]; do
case "$1" in
--reloc)
[ $# -ge 2 ] || fatal "--reloc requires an argument"
OPT_RELOC="$2"
shift
;;
--suite)
[ $# -ge 2 ] || fatal "--suite requires an argument"
OPT_SUITE="$2"
shift
;;
*) fatal "Unknown option: '$1'" ;;
esac
shift
done
[ -n "$OPT_SUITE" ] || fatal "--suite is required"
################################################################################
# Run tests
export VERILATOR_TEST_NO_CONTRIBUTORS=1 # Separate workflow check
export VERILATOR_TEST_NO_LINT_PY=1 # Separate workflow check
if [ "$HOST_OS" = "macOS" ]; then
export VERILATOR_TEST_NO_GDB=1 # No working GDB on macOS
fi
TEST_REGRESS=test_regress
if [ -n "$OPT_RELOC" ]; then
# Testing that the installation is relocatable.
"$MAKE" install
# Install prefix, as configured into the Makefile at build time
INSTALL_DIR=$(sed -n 's/^prefix = //p' Makefile)
mkdir -p "$OPT_RELOC"
mv "$INSTALL_DIR" "$OPT_RELOC/relocated-install"
export VERILATOR_ROOT="$OPT_RELOC/relocated-install/share/verilator"
TEST_REGRESS="$OPT_RELOC/test_regress"
mv test_regress "$TEST_REGRESS"
NODIST="$OPT_RELOC/nodist"
mv nodist "$NODIST"
# Delete everything else, but keep the CI infrastructure
find . -mindepth 1 -maxdepth 1 ! -name .github ! -name ci -exec rm -rf {} +
ls -la .
fi
# Run the specified suite
ccache -z
TEST_START=$SECONDS
case $OPT_SUITE in
dist-vlt-0)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=0/4
;;
dist-vlt-1)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=1/4
;;
dist-vlt-2)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=2/4
;;
dist-vlt-3)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=3/4
;;
vltmt-0)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt --driver-clean" DRIVER_HASHSET=--hashset=0/3
;;
vltmt-1)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt --driver-clean" DRIVER_HASHSET=--hashset=1/3
;;
vltmt-2)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt --driver-clean" DRIVER_HASHSET=--hashset=2/3
;;
coverage-dist)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist"
;;
coverage-vlt-0)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=0/10
;;
coverage-vlt-1)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=1/10
;;
coverage-vlt-2)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=2/10
;;
coverage-vlt-3)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=3/10
;;
coverage-vlt-4)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=4/10
;;
coverage-vlt-5)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=5/10
;;
coverage-vlt-6)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=6/10
;;
coverage-vlt-7)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=7/10
;;
coverage-vlt-8)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=8/10
;;
coverage-vlt-9)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=9/10
;;
coverage-vltmt-0)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=0/10
;;
coverage-vltmt-1)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=1/10
;;
coverage-vltmt-2)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=2/10
;;
coverage-vltmt-3)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=3/10
;;
coverage-vltmt-4)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=4/10
;;
coverage-vltmt-5)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=5/10
;;
coverage-vltmt-6)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=6/10
;;
coverage-vltmt-7)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=7/10
;;
coverage-vltmt-8)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=8/10
;;
coverage-vltmt-9)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=9/10
;;
*)
fatal "Unknown suite: $OPT_SUITE"
;;
esac
ccache -svv
ccache --evict-older-than "$((SECONDS - TEST_START + 60))s"
ccache -svv
uptime # To see load average
+21 -11
View File
@@ -1,28 +1,38 @@
# DESCRIPTION: Verilator: CI Windows Power Shell - Compile Verilator
#
# Copyright 2024 by Wilson Snyder. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
#
# SPDX-FileCopyrightText: 2024 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
################################################################################
Set-PSDebug -Trace 1
if (-Not (Test-Path $PWD/../.ccache/win_bison.exe)) {
$NPROC = $env:NUMBER_OF_PROCESSORS
# Absolute path for the win_flex_bison install; CMake reads this from the environment
$env:WIN_FLEX_BISON = "$(Resolve-Path ..)/win_flex_bison"
if (-Not (Test-Path $env:WIN_FLEX_BISON/win_bison.exe)) {
git clone --depth 1 https://github.com/lexxmark/winflexbison
cd winflexbison
mkdir build
cd build
cmake .. --install-prefix $PWD/../../../.ccache
cmake --build . --config Release -j 3
cmake --install . --prefix $PWD/../../../.ccache
cmake .. --install-prefix $env:WIN_FLEX_BISON
cmake --build . --config Release -j $NPROC
cmake --install . --prefix $env:WIN_FLEX_BISON
cd ../..
}
# Enter the MSVC developer shell so cl/link are on PATH for the Ninja generator
$VsPath = & "${env:ProgramFiles(x86)}/Microsoft Visual Studio/Installer/vswhere.exe" -latest -products * -property installationPath
Import-Module "$VsPath/Common7/Tools/Microsoft.VisualStudio.DevShell.dll"
Enter-VsDevShell -VsInstallPath $VsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64"
mkdir build
cd build
cmake .. --install-prefix $PWD/../install
cmake --build . --config Release -j 3
# Ninja saturates all cores; the MSBuild generator only parallelizes across
# projects and Verilator is a single target, so it compiles serially. /Od skips
# optimization: this job only checks that Verilator builds and can verilate an
# example, so an optimized binary is not needed and the codegen time dominates.
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release --install-prefix $PWD/../install "-DCMAKE_CXX_FLAGS_RELEASE=/Od /DNDEBUG"
cmake --build .
cmake --install . --prefix $PWD/../install
+7 -7
View File
@@ -1,23 +1,23 @@
# DESCRIPTION: Verilator: CI Windows Power Shell - Verilate a test
#
# Copyright 2024 by Wilson Snyder. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
#
# SPDX-FileCopyrightText: 2024 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
################################################################################
Set-PSDebug -Trace 1
$NPROC = $env:NUMBER_OF_PROCESSORS
cd install
$Env:VERILATOR_ROOT=$PWD
cd examples/cmake_tracing_c
mkdir build
cd build
cmake ..
cmake --build . --config Release -j 3
# /Od skips optimization; this only checks the example verilates and builds, so
# an optimized binary is not needed (see ci-win-compile.ps1).
cmake .. "-DCMAKE_CXX_FLAGS_RELEASE=/Od /DNDEBUG"
cmake --build . --config Release -j $NPROC
# TODO put this back in, see issue# 5163
# Release/example.exe
+13 -9
View File
@@ -1,9 +1,9 @@
# DESCRIPTION: Dockerfile for env to build and fully test Verilator
#
# Copyright 2020 by Stefan Wallentowitz. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2020 Stefan Wallentowitz
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
FROM ubuntu:24.04
@@ -37,7 +37,7 @@ RUN apt-get update \
libfl2 \
libfl-dev \
libclang-rt-18-dev \
libgoogle-perftools-dev \
libjemalloc-dev \
libsystemc \
libsystemc-dev \
numactl \
@@ -53,10 +53,14 @@ RUN apt-get update \
WORKDIR /tmp
RUN git clone https://github.com/veripool/vcddiff.git && \
make -C vcddiff && \
cp -p vcddiff/vcddiff /usr/local/bin/vcddiff && \
rm -rf vcddiff
COPY wavetools.conf /tmp/wavetools.conf
ARG WGET_EXTRA_ARGS=
RUN . /tmp/wavetools.conf && \
wget -q ${WGET_EXTRA_ARGS} -O /tmp/wavetools.tar.gz \
"https://github.com/hudson-trading/wavetools/releases/download/${WAVETOOLS_VERSION}/wavetools-${WAVETOOLS_VERSION}-linux-x86_64.tar.gz" && \
tar -xzf /tmp/wavetools.tar.gz -C /tmp && \
cp -p /tmp/wavetools-${WAVETOOLS_VERSION}-linux-x86_64/wavediff /usr/local/bin/wavediff && \
rm -rf /tmp/wavetools.tar.gz /tmp/wavetools-* /tmp/wavetools.conf
COPY build.sh /tmp/build.sh
+10 -8
View File
@@ -1,7 +1,8 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
..
SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
.. _Verilator Build Docker Container:
.. _verilator build docker container:
Verilator Build Docker Container
================================
@@ -9,11 +10,11 @@ Verilator Build Docker Container
This Verilator Build Docker Container is set up to compile and test a
Verilator build. It uses the following parameters:
- Source repository (default: https://github.com/verilator/verilator)
- Source repository (default: https://github.com/verilator/verilator)
- Source revision (default: master)
- Source revision (default: master)
- Compiler (GCC 13.3.0, clang 18.1.3, default: 13.3.0)
- Compiler (GCC 13.3.0, clang 18.1.3, default: 13.3.0)
The container is published as ``verilator/verilator-buildenv`` on `docker
hub
@@ -37,8 +38,9 @@ To change the compiler use the `-e` switch to pass environment variables:
docker run -ti -e CXX=clang++-18 verilator/verilator-buildenv test
The tests, that involve numactl are not working due to security restrictions.
To run those too, add the CAP_SYS_NICE capability during the start of the container:
The tests, that involve numactl are not working due to security
restrictions. To run those too, add the CAP_SYS_NICE capability during the
start of the container:
::
+4 -4
View File
@@ -1,10 +1,10 @@
#!/bin/bash -e
# DESCRIPTION: Build Verilator (inside container)
#
# Copyright 2020 by Stefan Wallentowitz. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2020 Stefan Wallentowitz
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
: "${REPO:=https://github.com/verilator/verilator}"
+1
View File
@@ -0,0 +1 @@
WAVETOOLS_VERSION=v0.1.2
+5 -5
View File
@@ -1,9 +1,9 @@
# DESCRIPTION: Dockerfile for image to run Verilator inside
#
# Copyright 2020 by Stefan Wallentowitz. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2020 Stefan Wallentowitz
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
FROM ubuntu:24.04
@@ -22,7 +22,7 @@ RUN apt-get update \
help2man \
libfl2 \
libfl-dev \
libgoogle-perftools-dev \
libjemalloc-dev \
numactl \
perl \
perl-doc \
+13 -12
View File
@@ -1,5 +1,6 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
..
SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
Verilator Executable Docker Container
=====================================
@@ -11,12 +12,12 @@ easily as a docker image, e.g.:
docker run -ti verilator/verilator:latest --version
This will pull the container from `docker hub
<https://hub.docker.com/r/verilator/verilator>`_, run the latest Verilator and print
Verilator's version.
This will pull the container from `Docker Hub
<https://hub.docker.com/r/verilator/verilator>`_, run the latest Verilator
and print Verilator's version.
Containers are automatically built and pushed to docker hub for all released versions, so you may
easily compare results across versions, e.g.:
Containers are automatically built and pushed to docker hub for all
released versions, so you may easily compare results across versions, e.g.:
::
@@ -38,7 +39,7 @@ or
./verilator-docker 4.030 --cc test.v
If you prefer not to use ``verilator-docker`` you must give the container
access to your files as a volume with appropriate user rights. For example
access to your files as a volume with appropriate user rights. For example
to Verilate test.v:
::
@@ -68,9 +69,9 @@ Internals
The Dockerfile builds Verilator and removes the tree when completed to
reduce the image size. The entrypoint is a wrapper script
(``verilator-wrap.sh``). That script 1. calls Verilator, and 2. copies the
Verilated runtime files to the ``obj_dir`` or the ``-Mdir``
respectively. This allows the user to have the files to they may later
build the C++ output with the matching runtime files. The wrapper also
patches the Verilated Makefile accordingly.
Verilated runtime files to the ``obj_dir`` or the ``-Mdir`` respectively.
This allows the user to have the files to they may later build the C++
output with the matching runtime files. The wrapper also patches the
Verilated Makefile accordingly.
A hook is also defined and run by Docker Hub via automated builds.
+4 -4
View File
@@ -1,10 +1,10 @@
#!/bin/bash
# DESCRIPTION: Docker hub hook to pass SOURCE_COMMIT
#
# Copyright 2020 by Stefan Wallentowitz. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2020 Stefan Wallentowitz
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
docker build --build-arg SOURCE_COMMIT=${SOURCE_COMMIT} -f $DOCKERFILE_PATH -t $IMAGE_NAME .
+6 -6
View File
@@ -1,13 +1,13 @@
#!/bin/bash
# DESCRIPTION: Docker hub hook to tag the latest release (stable)
#
# Copyright 2020 by Stefan Wallentowitz. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2020 Stefan Wallentowitz
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
if [ "$SOURCE_BRANCH"="stable" ]; then
docker tag $IMAGE_NAME $DOCKER_REPO:latest
docker push $DOCKER_REPO:latest
docker tag $IMAGE_NAME $DOCKER_REPO:latest
docker push $DOCKER_REPO:latest
fi
+4 -4
View File
@@ -1,10 +1,10 @@
#!/bin/bash
# DESCRIPTION: Wrap a verilator call to run a docker container
#
# Copyright 2020 by Stefan Wallentowitz. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2020 Stefan Wallentowitz
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
docker pull verilator/verilator:$1 >/dev/null
+12 -12
View File
@@ -2,30 +2,30 @@
# DESCRIPTION: Wrap a Verilator call and copy vlt includes
# (inside docker container)
#
# Copyright 2020 by Stefan Wallentowitz. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2020 Stefan Wallentowitz
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
perl /usr/local/bin/verilator "$@"
status=$?
if [ $status -ne 0 ]; then
exit $status
exit $status
fi
# Check if user set an obj_dir
obj_dir=$(echo " $@" | grep -oP '\s--Mdir\s*\K\S+')
if [ "$obj_dir" == "" ]; then
obj_dir="obj_dir"
obj_dir="obj_dir"
fi
# If the run was successful: Copy required files to allow build without this container
if [ -e ${obj_dir} ]; then
# Copy files required for the build
mkdir -p ${obj_dir}/vlt
cp -r /usr/local/share/verilator/bin ${obj_dir}/vlt
cp -r /usr/local/share/verilator/include ${obj_dir}/vlt
# Point Makefile to that folder
sed -i 's/VERILATOR_ROOT = \/usr\/local\/share\/verilator/VERILATOR_ROOT = vlt/g' ${obj_dir}/*.mk
# Copy files required for the build
mkdir -p ${obj_dir}/vlt
cp -r /usr/local/share/verilator/bin ${obj_dir}/vlt
cp -r /usr/local/share/verilator/include ${obj_dir}/vlt
# Point Makefile to that folder
sed -i 's/VERILATOR_ROOT = \/usr\/local\/share\/verilator/VERILATOR_ROOT = vlt/g' ${obj_dir}/*.mk
fi
+181 -31
View File
@@ -1,8 +1,9 @@
# DESCRIPTION: Process this file with autoconf to produce a configure script.
#
# Copyright 2003-2025 by Wilson Snyder. Verilator is free software; you
# can redistribute it and/or modify it under the terms of either the GNU Lesser
# General Public License Version 3 or the Perl Artistic License Version 2.0.
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
# When releasing, also update header of Changes file, and CMakeLists.txt,
@@ -11,7 +12,7 @@
# Then 'make maintainer-dist'
#AC_INIT([Verilator],[#.### YYYY-MM-DD])
#AC_INIT([Verilator],[#.### devel])
AC_INIT([Verilator],[5.042 2025-11-02],
AC_INIT([Verilator],[5.052 2026-09-05],
[https://verilator.org],
[verilator],[https://verilator.org])
@@ -63,8 +64,8 @@ AC_ARG_ENABLE([dev-asan],
[AS_HELP_STRING([--enable-dev-asan],
[Enable compiling Verilator with ASAN
AddressSanitizer for memory error detection.
This disables tcmalloc. Does not affect
Verilated models using ASAN.])],
This disables tcmalloc and jemalloc. Does not
affect Verilated models using ASAN.])],
[case "${enableval}" in
yes) CFG_WITH_DEV_ASAN=yes ;;
no) CFG_WITH_DEV_ASAN=no ;;
@@ -92,6 +93,27 @@ else
AC_MSG_RESULT($CFG_WITH_TCMALLOC)
fi
# Flag to enable linking Verilator with jemalloc if available
AC_MSG_CHECKING(whether to use jemalloc)
AC_ARG_ENABLE([jemalloc],
[AS_HELP_STRING([--enable-jemalloc],
[Use libjemalloc for faster dynamic memory
management in Verilator binary. Preferred over
tcmalloc when both are available
@<:@default=check@:>@])],
[case "${enableval}" in
yes) CFG_WITH_JEMALLOC=yes ;;
no) CFG_WITH_JEMALLOC=no ;;
*) AC_MSG_ERROR([bad value '${enableval}' for --enable-jemalloc]) ;;
esac],
[CFG_WITH_JEMALLOC=check;])
if test "$CFG_WITH_DEV_ASAN" = "yes"; then
CFG_WITH_JEMALLOC=no
AC_MSG_RESULT("disabled by --enable-dev-asan")
else
AC_MSG_RESULT($CFG_WITH_JEMALLOC)
fi
# Flag to enable code coverage build with gcov
AC_MSG_CHECKING(whether to build for gcov code coverage collection)
AC_ARG_ENABLE([dev-gcov],
@@ -107,6 +129,21 @@ AC_ARG_ENABLE([dev-gcov],
AC_SUBST(CFG_WITH_DEV_GCOV)
AC_MSG_RESULT($CFG_WITH_DEV_GCOV)
# Flag to reduce the debug info in the debug executable to minimize its size
AC_MSG_CHECKING(whether to reduce debug info in the debug executable)
AC_ARG_ENABLE([light-debug],
[AS_HELP_STRING([--enable-light-debug],
[Reduce the amount of debug information in the debug
Verilator executable to minimize its size. Enable
slight optimization. Enough for backtraces only.])],
[case "${enableval}" in
yes) CFG_WITH_LIGHT_DEBUG=yes ;;
no) CFG_WITH_LIGHT_DEBUG=no ;;
*) AC_MSG_ERROR([bad value '${enableval}' for --enable-light-debug]) ;;
esac],
CFG_WITH_LIGHT_DEBUG=no)
AC_MSG_RESULT($CFG_WITH_LIGHT_DEBUG)
# Special Substitutions - CFG_WITH_DEFENV
AC_MSG_CHECKING(whether to use hardcoded paths)
AC_ARG_ENABLE([defenv],
@@ -399,8 +436,18 @@ AC_DEFUN([_MY_LDLIBS_CHECK_OPT],
_MY_LDLIBS_CHECK_IFELSE($2, $1="$$1 $2")
])
AC_DEFUN([_MY_LDLIBS_CHECK_SET],
[# _MY_LDLIBS_CHECK_SET(variable, flag) -- Check if linker supports specific
# options. If it does, set variable to flag, only if not previously set
# (so the first supported flag wins and the rest are not tested).
if test "$$1" = ""; then
_MY_LDLIBS_CHECK_IFELSE($2, $1="$2")
fi
])
# Add the coverage flags early as they influence later checks.
if test "$CFG_WITH_DEV_GCOV" = "yes"; then
CFG_GCOV_CXX="$CXX"
_MY_CXX_CHECK_OPT(CXX,--coverage)
# Otherwise inline may not show as uncovered
# If we use this then e.g. verilated.h functions properly show up
@@ -422,8 +469,32 @@ if test "$CFG_WITH_DEV_GCOV" = "yes"; then
_MY_CXX_CHECK_OPT(CXX,-fprofile-abs-path)
# Define so compiled code can know
_MY_CXX_CHECK_OPT(CXX,-DVL_GCOV)
AC_DEFINE([HAVE_DEV_GCOV],[1],[Defined if compiled with code coverage collection for gcov])]
AC_DEFINE([HAVE_DEV_GCOV],[1],[Defined if compiled with code coverage collection for gcov])
if test "x$GCOV" = "x"; then GCOV=gcov; fi
AC_MSG_CHECKING([whether $GCOV reads coverage data from $CFG_GCOV_CXX])
CFG_GCOV_DIR=conftest.gcov.dir
rm -rf $CFG_GCOV_DIR
AS_MKDIR_P([$CFG_GCOV_DIR])
echo 'int main() { return 0; }' > $CFG_GCOV_DIR/conftest_gcov.cpp
CFG_GCOV_RES=no
if (cd $CFG_GCOV_DIR \
&& $CFG_GCOV_CXX --coverage -o conftest_gcov conftest_gcov.cpp \
&& ./conftest_gcov) >/dev/null 2>&1; then
(cd $CFG_GCOV_DIR && $GCOV conftest_gcov.gcda) >/dev/null 2>&1
if test -s $CFG_GCOV_DIR/conftest_gcov.cpp.gcov; then CFG_GCOV_RES=yes; fi
else
CFG_GCOV_RES=untested
fi
rm -rf $CFG_GCOV_DIR
AC_MSG_RESULT($CFG_GCOV_RES)
if test "$CFG_GCOV_RES" = "no"; then
AC_MSG_ERROR(['$GCOV' cannot read coverage data written by '$CFG_GCOV_CXX'.
Coverage collection would silently produce no data.
Pass a matching tool, e.g. GCOV=gcov-<version>
or configure without --enable-dev-gcov.])
fi
fi
AC_SUBST(GCOV)
AC_SUBST(HAVE_DEV_GCOV)
# Compiler flags to enable profiling
@@ -461,6 +532,11 @@ _MY_CXX_CHECK_CORO_SET(CFG_CXXFLAGS_COROUTINES,-std=gnu++20)
AC_SUBST(CFG_CXXFLAGS_COROUTINES)
AC_SUBST(HAVE_COROUTINES)
# Check if the C++ compiler supports ThreadSanitizer
_MY_CXX_CHECK_IFELSE(-fsanitize=thread,
[AC_DEFINE([HAVE_TSAN],[1],[Defined if ThreadSanitizer is supported by $CXX])])
AC_SUBST(HAVE_TSAN)
# Flags for compiling Verilator internals including parser always
if test "$CFG_WITH_DEV_ASAN" = "yes"; then
_MY_CXX_CHECK_IFELSE(-fsanitize=address -DVL_ASAN,
@@ -472,9 +548,11 @@ fi
AC_SUBST(HAVE_DEV_ASAN)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Qunused-arguments)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Wno-shadow)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Wno-unnecessary-virtual-specifier)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Wno-unused-parameter)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Xclang -fno-pch-timestamp)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-faligned-new)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-fno-exceptions)
AC_SUBST(CFG_CXXFLAGS_SRC)
# Flags for compiling Verilator parser always (in addition to above CFG_CXXFLAGS_SRC)
@@ -485,15 +563,27 @@ _MY_CXX_CHECK_OPT(CFG_CXXFLAGS_PARSER,-Wno-unused)
AC_SUBST(CFG_CXXFLAGS_PARSER)
# Flags for compiling the debug version of Verilator (in addition to above CFG_CXXFLAGS_SRC)
if test "$CFG_WITH_DEV_GCOV" = "no"; then # Do not optimize for the coverage build
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DBG,-Og)
if test "$CFG_WITH_LIGHT_DEBUG" = "yes"; then
# Slight optimization and minimal compressed debug info. This is enough for
# --gdb/--gdbbt backtraces, but omits the bulk of the debug info, which
# significantly reduces object file sizes. For CI or release builds.
if test "$CFG_WITH_DEV_GCOV" = "no"; then # Do not optimize for the coverage build
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DBG,-Og)
fi
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DBG,-ggdb1)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DBG,-fdebug-info-for-profiling) # For fully-qualified names with clang
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DBG,-gz)
else
# Full debug: no optimization, full debug info, for development.
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DBG,-O0)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DBG,-ggdb)
fi
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DBG,-ggdb)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DBG,-gz)
AC_SUBST(CFG_CXXFLAGS_DBG)
# Flags for linking the debug version of Verilator (in addition to above CFG_LDFLAGS_SRC)
_MY_LDLIBS_CHECK_OPT(CFG_LDFLAGS_DBG,-gz)
if test "$CFG_WITH_LIGHT_DEBUG" = "yes"; then
_MY_LDLIBS_CHECK_OPT(CFG_LDFLAGS_DBG,-gz)
fi
AC_SUBST(CFG_LDFLAGS_DBG)
# Flags for compiling the optimized version of Verilator (in addition to above CFG_CXXFLAGS_SRC)
@@ -530,10 +620,12 @@ m4_foreach([cflag],[
[-Wno-tautological-bitwise-compare],
[-Wno-tautological-compare],
[-Wno-uninitialized],
[-Wno-unnecessary-virtual-specifier],
[-Wno-unused-but-set-parameter],
[-Wno-unused-but-set-variable],
[-Wno-unused-parameter],
[-Wno-unused-variable]],[
[-Wno-unused-variable],
[-Wno-vla-cxx-extension]],[
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_NO_UNUSED,cflag)
# CMake will test what flags work itself, so pass all flags through to it
CFG_CXX_FLAGS_CMAKE="$CFG_CXX_FLAGS_CMAKE cflag"
@@ -554,6 +646,34 @@ m4_foreach([ldflag], [
AC_SUBST(CFG_LDLIBS_THREADS)
AC_SUBST(CFG_LDFLAGS_THREADS_CMAKE)
# Find link flags for runtime VPI library loading (+verilator+vpi+<lib>).
# The model executable must export its VPI symbols so the dlopen'd library can
# resolve them: -rdynamic (GNU ld) or -Wl,-export_dynamic (Darwin); the first the
# linker accepts wins. -ldl provides dlopen/dlsym where it is a separate library.
_MY_LDLIBS_CHECK_SET(CFG_LDFLAGS_DYNAMIC, -rdynamic)
# -Wl,-export_dynamic contains a comma, so probe it directly rather than through
# the _MY_LDLIBS_CHECK_* macros (which re-expand their flag argument unquoted).
if test "$CFG_LDFLAGS_DYNAMIC" = ""; then
ACO_SAVE_LIBS="$LIBS"
LIBS="$LIBS -Wl,-export_dynamic"
AC_MSG_CHECKING([whether $CXX linker accepts -Wl,-export_dynamic])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[]])],
[_my_result=yes
if test -s conftest.err; then
if grep -e "-export_dynamic" conftest.err >/dev/null; then
_my_result=no
fi
fi],
[_my_result=no])
AC_MSG_RESULT($_my_result)
LIBS="$ACO_SAVE_LIBS"
if test "$_my_result" = "yes"; then CFG_LDFLAGS_DYNAMIC="-Wl,-export_dynamic"; fi
fi
AC_SUBST(CFG_LDFLAGS_DYNAMIC)
_MY_LDLIBS_CHECK_OPT(CFG_LDLIBS_DYNAMIC, -ldl)
AC_SUBST(CFG_LDLIBS_DYNAMIC)
# If 'mold' is installed, use it to link for faster buildtimes
_MY_LDLIBS_CHECK_OPT(CFG_LDFLAGS_SRC, -fuse-ld=mold)
_MY_LDLIBS_CHECK_OPT(CFG_LDFLAGS_VERILATED, -fuse-ld=mold)
@@ -563,9 +683,6 @@ if test "$CFG_ENABLE_PARTIAL_STATIC" = "yes"; then
_MY_LDLIBS_CHECK_OPT(CFG_LDFLAGS_SRC, -static-libgcc)
_MY_LDLIBS_CHECK_OPT(CFG_LDFLAGS_SRC, -static-libstdc++)
_MY_LDLIBS_CHECK_OPT(CFG_LDFLAGS_SRC, -Xlinker -gc-sections)
LTCMALLOC="-Wl,--whole-archive -l:libtcmalloc_minimal.a -Wl,--no-whole-archive"
else
LTCMALLOC=-ltcmalloc_minimal
fi
AC_SUBST(CFG_LDFLAGS_SRC)
AC_SUBST(CFG_LDFLAGS_VERILATED)
@@ -581,23 +698,56 @@ _MY_LDLIBS_CHECK_OPT(CFG_LIBS, -latomic)
_MY_LDLIBS_CHECK_OPT(CFG_LIBS, -lbcrypt)
_MY_LDLIBS_CHECK_OPT(CFG_LIBS, -lpsapi)
# Check if tcmalloc is available based on --enable-tcmalloc
_MY_LDLIBS_CHECK_IFELSE(
$LTCMALLOC,
[if test "$CFG_WITH_TCMALLOC" != "no"; then
CFG_LIBS="$LTCMALLOC $CFG_LIBS";
# If using tcmalloc, add some extra options to make the compiler not assume
# it is using its own versions of the standard library functions
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-fno-builtin-malloc)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-fno-builtin-calloc)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-fno-builtin-realloc)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-fno-builtin-free)
# Figure out which malloc library to use:
# - Prefer jemalloc over tcmalloc (it's faster)
# - If partial static link enabled, prefer static libraries,
# but fall back on dynamic if static is not available
# Test for jemalloc
CFG_HAVE_JEMALLOC=no
if test "$CFG_WITH_JEMALLOC" != "no"; then
if test "$CFG_ENABLE_PARTIAL_STATIC" = "yes"; then
_MY_LDLIBS_CHECK_SET(CFG_LIBS_MALLOC, -Xlinker --whole-archive -l:libjemalloc.a -Xlinker --no-whole-archive)
fi
_MY_LDLIBS_CHECK_SET(CFG_LIBS_MALLOC, -ljemalloc)
if test "$CFG_LIBS_MALLOC" != ""; then
CFG_HAVE_JEMALLOC=yes
AC_DEFINE([HAVE_JEMALLOC],[1],[Defined if have jemalloc])
elif test "$CFG_WITH_JEMALLOC" = "yes"; then
AC_MSG_ERROR([--enable-jemalloc was given but jemalloc is not available])
fi
fi
AC_SUBST(HAVE_JEMALLOC)
# Test for tcmalloc
CFG_HAVE_TCMALLOC=no
if test "$CFG_HAVE_JEMALLOC" = "yes"; then
AC_MSG_NOTICE([jemalloc found, skipping check for tcmalloc])
elif test "$CFG_WITH_TCMALLOC" != "no"; then
if test "$CFG_ENABLE_PARTIAL_STATIC" = "yes"; then
_MY_LDLIBS_CHECK_SET(CFG_LIBS_MALLOC, -Xlinker --whole-archive -l:libtcmalloc_minimal.a -Xlinker --no-whole-archive)
fi
_MY_LDLIBS_CHECK_SET(CFG_LIBS_MALLOC, -ltcmalloc_minimal)
if test "$CFG_LIBS_MALLOC" != ""; then
CFG_HAVE_TCMALLOC=yes
AC_DEFINE([HAVE_TCMALLOC],[1],[Defined if have tcmalloc])
fi],
[if test "$CFG_WITH_TCMALLOC" = "yes"; then
AC_MSG_ERROR([--enable-tcmalloc was given but test for ${LTCMALLOC} failed])
fi])
elif test "$CFG_WITH_TCMALLOC" = "yes"; then
AC_MSG_ERROR([--enable-tcmalloc was given but tcmalloc is not available])
fi
fi
AC_SUBST(HAVE_TCMALLOC)
if test "$CFG_HAVE_JEMALLOC" = "yes" || test "$CFG_HAVE_TCMALLOC" = "yes"; then
# If using custom malloc, add some extra options to make the compiler not assume
# it is using its own versions of the standard library functions
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-fno-builtin-malloc)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-fno-builtin-calloc)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-fno-builtin-realloc)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-fno-builtin-free)
fi
# Finished with libraries
CFG_LIBS="$CFG_LIBS_MALLOC $CFG_LIBS"
AC_SUBST(CFG_LIBS)
# Need C++14 at least
+38
View File
@@ -0,0 +1,38 @@
<!-- DESCRIPTION: Verilator: docs/ guidelines for AI coding agents
SPDX-FileCopyrightText: 2026-2026 Wilson Snyder
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 -->
# docs/ Guidelines -- Verilator documentation (\*.rst)
When to check: before editing anything under `docs/`.
Read the repository-root [AGENTS.md](../AGENTS.md) first for process and cross-cutting rules.
## Writing rules
- Rewrap paragraphs after editing -- keep consistent line length in `*.rst` files.
- Document only stable, implemented features -- never planned or in-development capabilities; prevents user confusion and support burden.
- Explain WHAT and WHEN, not HOW -- conceptual purpose and practical use cases over implementation mechanics; describe behavior ("optimized as pure", not "treated as pure") and clarify ambiguous referents ("in the internals of Verilator").
- Keep terminology consistent -- one term per concept; update docs when renaming code constructs; spell out full terms, avoiding abbreviations like "sim"/"sims".
- Use "how many" for countable nouns (threads, tasks, workers) and "how much" for uncountable quantities.
- Mark internal or experimental features "for internal use only" -- prevents user dependence and forced deprecation cycles later.
- Use specific IEEE references: `IEEE {number}-{year}` plus the section (e.g. `Annex I`) -- a vague "IEEE spec requires" is unverifiable.
- Document all flags with descriptions, not just syntax.
## reStructuredText mechanics
- Use the `:vlopt:` role for Verilator option references -- makes cross-references clickable and consistent.
- Escape angle brackets (`\<`, `\>`) in link targets -- prevents broken links to command-line options.
- Generate documentation examples with `test.extract` from `test_regress` test files -- examples stay synced with actually tested behavior.
## Hard constraint
- Never edit `docs/CONTRIBUTORS` -- only humans may, after reading and agreeing to its statement; remind the user instead.
+54 -18
View File
@@ -1,3 +1,7 @@
..
SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
Contributing to Verilator
=========================
@@ -23,8 +27,8 @@ Did you find a Verilator bug?
demonstrating the bug and expected behavior that is not occurring.
- The ideal example works against other simulators, and is in the
test_regress/t test format, as described in
`Verilator Internals Documentation
test_regress/t test format, as described in `Verilator Internals
Documentation
<https://github.com/verilator/verilator/blob/master/docs/internals.rst>`__.
@@ -38,18 +42,18 @@ Did you write a patch that fixes a Verilator bug?
<https://github.com/verilator/verilator/pulls>`__.
- See the coding conventions, and other developer information in
``docs/internals.rst`` in the distribution, or as rendered at
`Verilator Internals Documentation
``docs/internals.rst`` in the distribution, or as rendered at `Verilator
Internals Documentation
<https://github.com/verilator/verilator/blob/master/docs/internals.rst>`__.
- Verilator uses GitHub Actions to provide continuous integration. You
may want to enable Actions on your GitHub branch to ensure your changes
keep the tests passing.
- Verilator uses GitHub Actions to provide continuous integration. You may
want to enable Actions on your GitHub branch to ensure your changes keep
the tests passing.
- Your source-code contributions must be certified as open source,
under the `Developer Certificate of
Origin <https://developercertificate.org/>`__. On your first
contribution, you must either:
- Your source-code contributions must be certified as open source, under
the `Developer Certificate of Origin
<https://developercertificate.org/>`__. On your first contribution, you
must either:
- Have your patch include the addition of your name to `docs/CONTRIBUTORS
<CONTRIBUTORS>`__ (preferred).
@@ -75,20 +79,52 @@ Did you write a patch that fixes a Verilator bug?
Do you have questions on Verilator?
-----------------------------------
- Please see FAQ section and rest of the `Verilator
manual <https://verilator.org/verilator_doc.html>`__, or `Verilator
manual (PDF) <https://verilator.org/verilator_doc.pdf>`__.
- Please see FAQ section and rest of the `Verilator manual
<https://verilator.org/verilator_doc.html>`__, or `Verilator manual (PDF)
<https://verilator.org/verilator_doc.pdf>`__.
- Ask any question in the `Verilator forum
<https://verilator.org/forum>`__.
AI Policy
---------
Verilator follows the Linux Foundation recommendations regarding the usage
of Generative Large Language Model Artificial Intelligence (LLM-AI) tools
and agents for all contributions to the project, including source code,
test benches, and documentation.
AI assistants and automated agents are not permitted to sign off on
contributions. A human submitter is strictly responsible for reviewing,
verifying, and testing all AI-generated content. By submitting, the
contributor certifies that the generated content is effectively their work
product and adheres to project standards. This accountability is affirmed
when the human contributor signs the Developer Certificate of Origin (DCO)
as outlined in ``docs/CONTRIBUTORS``.
Contributors are encouraged to disclose the significant use of generative
AI tools in their commit messages or Pull Request descriptions to maintain
transparency.
Contributors must ensure that the terms and conditions of the generative AI
tool do not place any contractual restrictions on the tool's output that
are inconsistent with Verilator's open-source licenses, the project's
intellectual property policies, or the Open Source Definition.
If any pre-existing copyrighted materials (including third-party
open-source code or documentation) are included in the AI tool's output,
the contributor must confirm prior to submission that they have explicit
permission from the third-party owners to use, modify, and distribute those
materials under terms compliant with Verilator's licensing policies.
Code of Conduct
---------------
- Our contributors and participants pledge to make participation in our
project and our community a positive experience for everyone. We follow
the `Contributor Covenant version 1.4
<https://www.contributor-covenant.org/version/1/4/code-of-conduct/>`__.
Our contributors and participants pledge to make participation in our
project and our community a positive experience for everyone. We follow the
`Contributor Covenant version 1.4
<https://www.contributor-covenant.org/version/1/4/code-of-conduct/>`__.
Thanks!
+88 -5
View File
@@ -1,17 +1,26 @@
The contributors listed below have certified their Verilator contributions
under the Developer Certificate of Origin (https://developercertificate.org/).
under the Developer Certificate of Origin
(https://developercertificate.org/).
AI agents may not edit this file. As a human, you are agreeing to the
contribution terms including the AI policy in ``docs/CONTRIBUTING.rst``.
Please see the Verilator manual for 200+ additional contributors. Thanks to all.
24bit-xjkp
404allen404
Adam Bagley
Adam Kostrzewski
Aditya Shevade
Adrian Sampson
Adrien Le Masle
أحمد المحمودي (Ahmed El-Mahmoudy)
Aidan McNay
Aisha Salimgereyeva
Aleksander Kiryk
Alex Chadwick
Alex Solomatnikov
Alex Zhou
Aliaksei Chapyzhenka
Ameya Vikram Singh
Andrea Calabrese
@@ -20,15 +29,23 @@ Andrei Kostovski
Andrew Miloradovsky
Andrew Nolte
Andrew Voznytsa
Andrii Andrieiev
anonkey
Anthony Donlon
Anthony Moore
apocelipes
Arkadiusz Kozdra
Arthur Rosa
Artur Bieniek
AUDIY
Aylon Chaim Porat
Bartosz Skorowski
Bartłomiej Chmiel
Benjamin Collier
BRDR LIFE
Brian Li
Cameron Kirk
Cameron Waite
Chih-Mao Chen
Chris Bachhuber
Chris Randall
@@ -38,29 +55,41 @@ Chuxuan Wang
Chykon
Congcong Cai
Conor McCullough
Dan Petrisko
Cookie
Dan Ruelas-Petrisko
Daniel Bates
Danny Oler
Dave Sargeant
David Garau
David Horton
David Ledger
David Metz
David Stanford
David Turner
dependabot[bot]
Dercury
Demin Han
Diego Roux
Dominick Grochowina
Don Williamson
Dragon-Git
Drew Ranck
Drew Taussig
Driss Hafdi
Edgar E. Iglesias
Eddie Rydell
em2machine
emmettifelts
Eric Mejdrich
Eric Müller
Eric Rippey
Eryk Szpotański
Ethan Sifferman
Eunseo Song
Eyck Jentzsch
Fabian Keßler-Schulz
Fan Shupei
february cozzocrea
Felix Neumärker
Felix Yan
Frans Skarman
@@ -83,6 +112,7 @@ Gökçe Aydos
Han Qi
Harald Heckmann
Hennadii Chernyshchyk
hjsanjana
Howard Su
Huang Rui
Huanghuang Zhou
@@ -94,8 +124,12 @@ Ilya Barkov
Iru Cai
Ivan Vnučec
Iztok Jeras
JAEUK LEE
Jaeuk Lee (이재욱)
Jake Merdich
Jakub Michalski
Jakub Wasilewski
jalcim
James Bailey
James Hanlon
James Hutchinson
@@ -105,6 +139,10 @@ Jamey Hicks
Jamie Iles
Jan Van Winkel
Jean Berniolles
Jean-Nicolas Strauss
Jeffrey Song
jeffrey.song
Jens Yuechao Liu
Jeremy Bennett
Jesse Taube
Jevin Sweval
@@ -123,21 +161,27 @@ John Wehle
Jonathan Drolet
Jonathan Schröter
Jordan McConnon
Jose Drowne
Jose Loyola
Josep Sans
Joseph Nwabueze
Josh Redford
Joshua Leahy
JOTEGO (Jose Tejada)
Julian Carrier
Julian Daube
Julie Schwartz
Julien Margetts
Justin Thiel
Kaleb Barrett
Kamil Danecki
Kamil Rakoczy
Kanad Kanhere
Kefa Chen
Keith Colbert
Kevin Kiningham
Kevin Nygaard
Kornel Uriasz
Kritik Bhimani
Krzysztof Bieganski
Krzysztof Boronski
@@ -148,13 +192,19 @@ Krzysztof Sychla
Kuba Ober
Lan Zongwei
Larry Doolittle
Laurent CHARRIER
Leela Pakanati
Liam Braun
Luca Colagrande
Lucas Amaral
Ludwig Rogiers
Lukasz Dalek
M2kar
Maarten De Braekeleer
Maciej Sobkowski
Marcel Chang
Marco Bartoli
Marco Brambilla
Marco Widmer
Mariusz Glebocki
Markus Krause
@@ -166,30 +216,41 @@ Mateusz Gancarz
Matt Stroud
Matthew Ballance
Max Wipfli
Maxim Fonarev
Michael Bedford Taylor
Michael Bikovitsky
Michael Killough
Michael Rogenmoser
Michal Czyz
Michaël Lefebvre
Miguel Perez Andrade
Mike Popoloski
Miodrag Milanović
Mladen Slijepcevic
Morten Borup Petersen
Mostafa Gamal
Moubarak Jeje
Muzaffer Kal
Nandu Raj
Natan Kreimer
Nathan Graybeal
Nathan Kohagen
Nathan Myers
Nick Brereton
Nikolai Kumar
Nikolay Puzanov
Nolan Poe
Oleh Maksymenko
Patrick Creighton
Patrick Stewart
Paul Bowen-Huggett
Paul Campbell
Paul Rigge
Paul Swirhun
Paul Wright
Pawel Jewstafjew
Pawel Klopotek
Pawel Kojma
Pawel Sagan
Pengcheng Xu
Peter Birch
@@ -205,6 +266,7 @@ Piotr Binkowski
Qingyao Sun
Quentin Corradi
Rafal Kapuscik
Rahul Behl
Rasfunk
Raynard Qiao
Ricardo Barbedo
@@ -213,36 +275,53 @@ Risto Pejašinović
Robert Balas
Robin Heinemann
Rodrigo Batista de Moraes
Rowan Goemans
Rupert Swarbrick
Ryan Ziegler
Ryszard Rozak
Saksham Gupta
Samuel Riedel
Sean Cross
Sebastien Van Cauwenberghe
Secturion
Sergey Chusov
Sergey Fedorov
Sergi Granell
Seth Pellegrino
Shashvat Prabhu
Shogo Yamazaki
Shou-Li Hsu
spomatasmd
Srinivasan Venkataramanan
Stefan Wallentowitz
Stephen Henry
Steven Hugg
Stuart Morris
sumpster
Szymon Gizler
Sören Tempel
Sumanth Kadiyala
Teng Huang
Thomas Aldrian
Thomas Brown
Thomas Dybdahl Ahle
Thomas Santerre
Tim Hutt
Tim Snyder
Tobias Jensen
Tobias Rosenkranz
Tobias Wölfel
Todd Strader
Tom Jackson
Tom Manner
Tomasz Gorochowik
Topa Topino
Toru Niina
Tracy Narine
Trung Nguyen
Tudor Timi
Tymoteusz Blazejczyk
Tyrone Marhguy
Udaya Raj Subedi
Udi Finkelstein
Unai Martinez-Corral
@@ -251,15 +330,20 @@ Varun Koyyalagunta
Vassilis Papaefstathiou
Veripool API Bot
Victor Besyakov
Vikash Patel
Vito Gamberini
Wei-Lun Chiu
William D. Jones
Wilson Snyder
Wolfgang Mayerwieser
Xi Zhang
Yan Xu
Yangyu Chen
Yilin Li
Yilou Wang
Yinan Xu
Yoda Lee
Yogish Sekhar
Yossi Nivin
Yu-Sheng Lin
Yuri Victorovich
@@ -270,8 +354,7 @@ Zhen Yan
Zhou Shen
Zhouyi Shen
Zixi Li
dependabot[bot]
february cozzocrea
sumpster
Zubin Jain
Àlex Torregrosa
Ícaro Lima
Sunimali Rathnayake
+4 -4
View File
@@ -5,10 +5,10 @@
#
# Code available from: https://verilator.org
#
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2025-2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
#
######################################################################
+6 -2
View File
@@ -1,3 +1,7 @@
..
SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
Verilator Documentation
=======================
@@ -10,8 +14,8 @@ For formatted documentation see:
- `Verilator installation and package directory structure
<https://verilator.org/install>`_
- `Verilator manual (HTML) <https://verilator.org/verilator_doc.html>`_,
or `Verilator manual (PDF) <https://verilator.org/verilator_doc.pdf>`_
- `Verilator manual (HTML) <https://verilator.org/verilator_doc.html>`_, or
`Verilator manual (PDF) <https://verilator.org/verilator_doc.pdf>`_
- `Subscribe to Verilator announcements
<https://github.com/verilator/verilator-announce>`_
+6 -5
View File
@@ -37,12 +37,13 @@ parser = argparse.ArgumentParser(
allow_abbrev=False,
formatter_class=argparse.RawDescriptionHelpFormatter,
description="""Read a file and extract documentation data.""",
epilog=""" Copyright 2021-2025 by Wilson Snyder. This package is free software;
you can redistribute it and/or modify it under the terms of either the GNU
Lesser General Public License Version 3 or the Perl Artistic License
Version 2.0.
epilog="""This program is free software; you can redistribute it and/or modify it
under the terms of either the GNU Lesser General Public License Version 3
or the Perl Artistic License Version 2.0.
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0""")
SPDX-FileCopyrightText: 2021-2026 Wilson Snyder
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
""")
parser.add_argument('--debug', action='store_const', const=9, help='enable debug')
parser.add_argument('path', help='path to extract from')
+6 -5
View File
@@ -52,12 +52,13 @@ parser = argparse.ArgumentParser(
allow_abbrev=False,
formatter_class=argparse.RawDescriptionHelpFormatter,
description="""Post-process Sphinx HTML.""",
epilog=""" Copyright 2021-2025 by Wilson Snyder. This package is free software;
you can redistribute it and/or modify it under the terms of either the GNU
Lesser General Public License Version 3 or the Perl Artistic License
Version 2.0.
epilog="""This program is free software; you can redistribute it and/or modify it
under the terms of either the GNU Lesser General Public License Version 3
or the Perl Artistic License Version 2.0.
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0""")
SPDX-FileCopyrightText: 2021-2026 Wilson Snyder
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
""")
parser.add_argument('--debug', action='store_const', const=9, help='enable debug')
parser.add_argument('path', help='path to edit')
+4 -2
View File
@@ -1,9 +1,11 @@
.. comment: generated by t_lint_assigneqexpr_bad
.. code-block:: sv
:linenos:
:emphasize-lines: 3
:emphasize-lines: 3,5
assign d_o = // Note = not == below
(
c_o = 1 // <--- Warning: ASSIGNEQEXPR
e_o = 1 // <--- Warning: ASSIGNEQEXPR
) ? 1 : (
e_o = 0 // <--- Warning: ASSIGNEQEXPR
) ? b_i : 0;
+1 -1
View File
@@ -2,4 +2,4 @@
.. code-block::
-V{t#,#} 'stl' region trigger index 0 is active: @([hybrid] a)
%Error: t/t_lint_didnotconverge_bad.v:7: Settle region did not converge after 100 tries
%Error-DIDNOTCONVERGE: Settle region did not converge after '--converge-limit' of 10000 tries
+1 -1
View File
@@ -1,4 +1,4 @@
.. comment: generated by t_lint_didnotconverge_nodbg_bad
.. code-block::
%Error: t/t_lint_didnotconverge_bad.v:7: Settle region did not converge after 100 tries
%Error-DIDNOTCONVERGE: Settle region did not converge after '--converge-limit' of 10000 tries
+7
View File
@@ -0,0 +1,7 @@
.. comment: generated by t_finaldly_bad
.. code-block:: sv
:linenos:
:emphasize-lines: 2
bit foo;
final foo <= 1; // <--- Error
+6
View File
@@ -0,0 +1,6 @@
.. comment: generated by t_finaldly_bad
.. code-block::
%Error-FINALDLY: example.v:1:13 Non-blocking assignment '<=' in final block
9 | final foo <= 1;
| ^~
+1 -1
View File
@@ -4,4 +4,4 @@
:emphasize-lines: 2
function void calls_timing_ctl;
@e; // <--- Bad IEEE 1800-2023 13.4 time-controlling
@e; // <--- Bad IEEE 1800-2023 13.4 time-controlling
+6
View File
@@ -0,0 +1,6 @@
.. comment: generated by t_lint_multidriven_proc_bad
.. code-block:: sv
:linenos:
always @(posedge clk) q <= d;
always @(posedge clk) q <= ~d;
+13
View File
@@ -0,0 +1,13 @@
.. comment: generated by t_lint_multidriven_proc_bad
.. code-block:: sv
:linenos:
integer i;
always @(posedge clk) begin
for (i = 0; i < 4; i = i + 1) q1[i] <= d[i];
end
always @(posedge clk) begin
for (i = 0; i < 4; i = i + 1) q2[i] <= ~d[i];
end
+8
View File
@@ -0,0 +1,8 @@
.. comment: generated by t_lint_multidriven_proc_bad
.. code-block::
%Warning-MULTIDRIVENPROC: example.v:1:25 Variable written to in always block also written by another always block: 'q'
: ... note: In instance 't.u1'
example.v:1:25
54 | always @(posedge clk) q <= ~d;
| ^
@@ -0,0 +1,12 @@
.. code-block:: sv
:linenos:
:emphasize-lines: 3,6
module t(input logic clk, input logic d, output logic q);
initial q = 1'b0; // <--- Warning
always_ff @(posedge clk) begin
q <= d; // <--- Warning
end
endmodule
+7
View File
@@ -0,0 +1,7 @@
.. comment: generated by t_lint_notredop_bad
.. code-block::
%Error-NOTREDOP: example.v:1:17 Logical not directly before reduction operator is illegal
: ... Suggest use parentheses, e.g. '!(|expr)'
12 | assign y[0] = !|v;
| ^
+4 -4
View File
@@ -4,8 +4,8 @@
:emphasize-lines: 2
module t;
sub sub(); // <--- Warning
endmodule
module sub
(output port);
sub sub (); // <--- Warning
endmodule
module sub (
output port
);
+1 -1
View File
@@ -1,4 +1,4 @@
.. comment: generated by t_lint_pinmissing_bad
.. code-block::
%Warning-PINMISSING: example.v:1:8 Instance has missing pin: 'port'
%Warning-PINMISSING: example.v:1:7 Instance has missing pin: 'port'
+6
View File
@@ -0,0 +1,6 @@
.. comment: generated by t_lint_similarname_bad
.. code-block:: sv
:linenos:
reg i;
wire I;
+9
View File
@@ -0,0 +1,9 @@
.. comment: generated by t_lint_similarname_bad
.. code-block::
%Warning-SIMILARNAME: example.v:1:8 Declaration overlaps another with different case: 'I'
13 | wire I;
| ^
example.v:1:7 ... Location of original declaration
12 | reg i;
| ^

Some files were not shown because too many files have changed in this diff Show More