Compare commits

...
812 Commits
Author SHA1 Message Date
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 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 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 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
8876 changed files with 511909 additions and 236960 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-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-*,-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:
+3
View File
@@ -6,3 +6,6 @@ updates:
directory: "/"
schedule:
interval: "weekly"
groups:
everything:
patterns: ["*"]
+3 -3
View File
@@ -138,11 +138,11 @@ jobs:
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_LIMIT_MULTIPLE: 0.95
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
path: repo
- name: Cache $CCACHE_DIR
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ${{ env.CCACHE_DIR }}
key: msbuild-msvc-cmake
@@ -155,7 +155,7 @@ jobs:
- name: Zip up repository
run: Compress-Archive -LiteralPath install -DestinationPath verilator.zip
- name: Upload zip archive
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v7
with:
path: ${{ github.workspace }}/repo/verilator.zip
name: verilator-win.zip
+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@v6
- run: test_regress/t/t_dist_contributors.py
+9 -8
View File
@@ -74,10 +74,10 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Download code coverage data
uses: actions/download-artifact@v6
uses: actions/download-artifact@v8
with:
pattern: code-coverage-*
path: obj_coverage
@@ -90,7 +90,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@v6
with:
disable_file_fixes: true
disable_search: true
@@ -110,10 +110,11 @@ jobs:
run: |
echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null
sudo dpkg-reconfigure man-db
sudo apt install lcov || \
sudo apt install lcov
- name: Download repository archive
uses: actions/download-artifact@v6
uses: actions/download-artifact@v8
with:
name: ${{ needs.build.outputs.archive }}
path: ${{ github.workspace }}
@@ -124,7 +125,7 @@ jobs:
ls -lsha
- name: Download code coverage data
uses: actions/download-artifact@v6
uses: actions/download-artifact@v8
with:
pattern: code-coverage-*
path: repo/obj_coverage
@@ -169,14 +170,14 @@ jobs:
fi
- name: Upload report
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v7
with:
path: repo/obj_coverage
name: coverage-report
- name: Upload notification
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v7
with:
path: repo/notification
name: coverage-pr-notification
@@ -192,7 +193,7 @@ 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@v3.1.1
with:
app-id: ${{ vars.VERILATOR_CI_ID }}
private-key: ${{ secrets.VERILATOR_CI_KEY }}
+6 -6
View File
@@ -39,7 +39,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
- 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@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@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
with:
buildkitd-flags: --debug
- name: Login to Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@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@v7
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
with:
context: ${{ env.build_context }}
+9 -8
View File
@@ -21,23 +21,24 @@ jobs:
CI_COMMIT: ${{ github.sha }}
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install packages for build
env:
CI_BUILD_STAGE_NAME: build
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]" &&
sudo apt install clang-format-18 || \
sudo apt install clang-format-18
git config --global user.email "[email protected]"
git config --global user.name "github action"
- name: Format code
run: |
autoconf &&
./configure &&
make -j 2 format CLANGFORMAT=clang-format-18 &&
autoconf
./configure
make venv
source .venv/bin/activate
make -j 2 format CLANGFORMAT=clang-format-18
git status
- name: Push
run: |-
+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
+6 -9
View File
@@ -6,11 +6,8 @@ name: Pages
on:
push:
branches:
- master
paths:
- "ci/**"
- ".github/workflows"
branches: [master]
paths: ["ci/**", ".github/workflows"]
workflow_dispatch:
workflow_run:
workflows: ["Code coverage"]
@@ -41,7 +38,7 @@ jobs:
coverage-pr-run-ids: ${{ steps.build.outputs.coverage-pr-run-ids }}
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Build pages
id: build
env:
@@ -64,7 +61,7 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v5
notify:
name: Notify
@@ -73,11 +70,11 @@ jobs:
if: ${{ github.repository == 'verilator/verilator' }}
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
# 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@v3.1.1
with:
app-id: ${{ vars.VERILATOR_CI_ID }}
private-key: ${{ secrets.VERILATOR_CI_KEY }}
+3 -3
View File
@@ -61,14 +61,14 @@ jobs:
CCACHE_MAXSIZE: 1000M # Per build matrix entry (* 5 = 5000M in total)
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
path: repo
ref: ${{ inputs.sha }}
fetch-depth: ${{ inputs.dev-gcov && '0' || '1' }} # Coverage flow needs full history
- name: Cache $CCACHE_DIR
uses: actions/cache@v4
uses: actions/cache@v5
env:
CACHE_KEY: ${{ env.CACHE_BASE_KEY }}-ccache
with:
@@ -93,7 +93,7 @@ jobs:
echo "archive=$ARCHIVE" >> "$GITHUB_OUTPUT"
- name: Upload repository archive
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v7
with:
path: ${{ github.workspace }}/${{ steps.create-archive.outputs.archive }}
name: ${{ steps.create-archive.outputs.archive }}
+13 -8
View File
@@ -27,20 +27,25 @@ jobs:
name: Sub-lint | Python
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
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: Configure
run: autoconf && ./configure --enable-longtests --enable-ccwarn
run: |
autoconf
./configure --enable-longtests --enable-ccwarn
- name: Install python dependencies
run: |
sudo apt install python3-clang || \
sudo apt install python3-clang
make venv
- name: Lint
run: make -k lint-py
run: |-
source .venv/bin/activate
make -k lint-py
@@ -34,18 +34,20 @@ jobs:
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 update
sudo apt install ccache mold help2man libfl-dev libgoogle-perftools-dev libsystemc-dev
sudo apt install ccache mold help2man libfl-dev libjemalloc-dev libsystemc-dev || \
sudo apt install ccache mold help2man libfl-dev libjemalloc-dev libsystemc-dev
- name: Use saved ccache
uses: actions/cache@v4
uses: actions/cache@v5
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
uses: actions/checkout@v6
with:
path: repo
fetch-depth: 0 # Required for 'git describe' used for 'verilator --version'
@@ -68,7 +70,7 @@ jobs:
run: tar --posix -c -z -f verilator-rtlmeter.tar.gz install
- name: Upload Verilator installation archive
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v7
with:
path: verilator-rtlmeter.tar.gz
name: verilator-rtlmeter-${{ inputs.runs-on }}-${{ inputs.cc }}
+8 -6
View File
@@ -58,11 +58,13 @@ jobs:
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 update
sudo apt install ccache mold libfl-dev libgoogle-perftools-dev libsystemc-dev
sudo apt install ccache mold libfl-dev libjemalloc-dev libsystemc-dev || \
sudo apt install ccache mold libfl-dev libjemalloc-dev libsystemc-dev
- name: Download Verilator installation archive
uses: actions/download-artifact@v6
uses: actions/download-artifact@v8
with:
name: verilator-rtlmeter-${{ inputs.runs-on }}-${{ inputs.cc }}
@@ -73,14 +75,14 @@ jobs:
- name: Use saved ccache
if: ${{ env.CCACHE_DISABLE == 0 }}
uses: actions/cache@v4
uses: actions/cache@v5
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 }}
- name: Checkout RTLMeter
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
repository: "verilator/rtlmeter"
path: rtlmeter
@@ -115,7 +117,7 @@ jobs:
./rtlmeter report --steps '*' --metrics '*' ../results-${{ steps.results.outputs.hash }}.json
- name: Upload results
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v7
with:
path: results-${{ steps.results.outputs.hash }}.json
name: rtlmeter-${{ inputs.tag }}-results-${{ steps.results.outputs.hash }}
@@ -124,5 +126,5 @@ jobs:
- name: Report status
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
./rtlmeter run --verbose --cases='${{inputs.cases}}' --compileArgs='${{inputs.compileArgs}}' --executeArgs='${{inputs.executeArgs}}'
+12 -6
View File
@@ -55,7 +55,7 @@ jobs:
steps:
- name: Download repository archive
uses: actions/download-artifact@v6
uses: actions/download-artifact@v8
with:
name: ${{ inputs.archive }}
path: ${{ github.workspace }}
@@ -67,7 +67,7 @@ jobs:
ls -lsha
- name: Cache $CCACHE_DIR
uses: actions/cache@v4
uses: actions/cache@v5
env:
CACHE_KEY: ${{ env.CACHE_BASE_KEY }}-ccache2
with:
@@ -77,14 +77,18 @@ jobs:
${{ env.CACHE_KEY }}-
- name: Install test dependencies
run: ./ci/ci-install.bash
run: |
./ci/ci-install.bash
make venv
- 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-script.bash
- name: Combine code coverage data
if: ${{ inputs.dev-gcov }}
@@ -95,11 +99,13 @@ jobs:
- name: Upload code coverage data
if: ${{ inputs.dev-gcov }}
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v7
with:
path: ${{ github.workspace }}/repo/obj_coverage/verilator-${{ inputs.suite }}.info
name: code-coverage-${{ inputs.suite }}
- 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
+3 -3
View File
@@ -20,13 +20,13 @@ jobs:
pull-requests: write
steps:
- name: Download report
uses: actions/download-artifact@v6
uses: actions/download-artifact@v8
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
uses: actions/download-artifact@v8
with:
name: pr-number
run-id: ${{ github.event.workflow_run.id }}
@@ -34,7 +34,7 @@ jobs:
# 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@v3.1.1
with:
app-id: ${{ vars.VERILATOR_CI_ID }}
private-key: ${{ secrets.VERILATOR_CI_KEY }}
+19 -20
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,7 +37,8 @@ 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
steps:
- name: Startup
@@ -75,11 +78,10 @@ jobs:
matrix:
cases:
- "BlackParrot:1x1:*"
- "BlackParrot:2x2:*"
- "BlackParrot:4x4:*"
- "Caliptra:default:*"
- "NVDLA:*"
- "OpenPiton:1x1:*"
- "OpenPiton:2x2:*"
- "OpenPiton:4x4:*"
- "OpenTitan:*"
- "VeeR-EH1:asic*"
@@ -120,11 +122,10 @@ jobs:
matrix:
cases:
- "BlackParrot:1x1:*"
- "BlackParrot:2x2:*"
- "BlackParrot:4x4:*"
- "Caliptra:default:*"
- "NVDLA:*"
- "OpenPiton:1x1:*"
- "OpenPiton:2x2:*"
- "OpenPiton:4x4:*"
- "OpenTitan:*"
- "VeeR-EH1:asic*"
@@ -165,11 +166,9 @@ jobs:
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"
@@ -188,7 +187,7 @@ jobs:
tag: [gcc, clang, gcc-hier]
steps:
- name: Checkout RTLMeter
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
repository: "verilator/rtlmeter"
path: rtlmeter
@@ -196,7 +195,7 @@ jobs:
working-directory: rtlmeter
run: make venv
- name: Download all results
uses: actions/download-artifact@v6
uses: actions/download-artifact@v8
with:
pattern: rtlmeter-${{ matrix.tag }}-results-*
path: all-results-${{ matrix.tag }}
@@ -206,7 +205,7 @@ jobs:
run: |
./rtlmeter collate ../all-results-${{ matrix.tag }}/*.json > ../all-results-${{ matrix.tag }}.json
- name: Upload combined results
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v7
with:
path: all-results-${{ matrix.tag }}.json
name: all-results-${{ matrix.tag }}
@@ -225,20 +224,20 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Download combined results
uses: actions/download-artifact@v6
uses: actions/download-artifact@v8
with:
pattern: all-results-*
path: results
merge-multiple: true
- name: Upload published results
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@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@v3.1.1
with:
app-id: ${{ vars.VERILATOR_CI_ID }}
private-key: ${{ secrets.VERILATOR_CI_KEY }}
@@ -246,7 +245,7 @@ jobs:
repositories: verilator-rtlmeter-results
permission-contents: write
- name: Checkout verilator-rtlmeter-results
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
repository: "verilator/verilator-rtlmeter-results"
token: ${{ steps.generate-token.outputs.token }}
@@ -279,7 +278,7 @@ jobs:
actions: read
steps:
- name: Checkout RTLMeter
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
repository: "verilator/rtlmeter"
path: rtlmeter
@@ -287,7 +286,7 @@ jobs:
working-directory: rtlmeter
run: make venv
- name: Download combined results
uses: actions/download-artifact@v6
uses: actions/download-artifact@v8
with:
pattern: all-results-*
path: all-results
@@ -306,7 +305,7 @@ jobs:
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
uses: actions/download-artifact@v8
with:
name: published-results
path: nightly-results
@@ -372,14 +371,14 @@ jobs:
done
cat report.txt
- name: Upload report
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@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
uses: actions/upload-artifact@v7
with:
path: pr-number.txt
name: pr-number
@@ -395,7 +394,7 @@ 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@v3.1.1
with:
app-id: ${{ vars.VERILATOR_CI_ID }}
private-key: ${{ secrets.VERILATOR_CI_KEY }}
+1
View File
@@ -17,6 +17,7 @@
*.pdf
/Makefile
/.ccache
/.venv/
/artifact/
README
TAGS
-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]
+5 -5
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.047
HOMEPAGE_URL https://verilator.org
LANGUAGES CXX
)
+406 -4
View File
@@ -8,6 +8,404 @@ The changes in each Verilator version are described below. The
contributors that suggested or implemented a given issue are shown in []. Thanks!
Verilator 5.047 devel
==========================
**Important:**
* Support jemalloc as the default allocator on Linux (#7250). [Yangyu Chen]
For better performance, `apt install libjemalloc-dev` or equivalent before running ./configure.
**Other:**
* Support inout inside SV interface (#3466) (#7134). [Nick Brereton]
* Support `##0` cycle delays (#4263) (#7298). [Yilou Wang]
* 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 `##` delay on implication RHS in SVA properties (#7284). [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' property (partial #7290) (#7399). [Ryszard Rozak, Antmicro Ltd.]
* Support array map() method (#7307) (#7316) (#7344). [Wei-Lun Chiu]
* Support SVA goto repetition `[->N]` in concurrent assertions (#7310). [Yilou Wang]
* Support consecutive repetition `[\*N]` in SVA properties (#7311). [Yilou Wang]
* Support `##[*]`, `##[+]`, `##[M:N]`, `##[M:$]` cycle delays in assertions (#7312) (#7377). [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 `until_with` property (#7290 partial) (#7436). [Ryszard Rozak, Antmicro Ltd.]
* Add VPI callback support to --main (#7145).
* Add V3LiftExpr pass to lower impure expressions and calls (#7141) (#7164). [Geza Lore, Testorrent USA, Inc.]
* Add --func-recursion-depth CLI option (#7175) (#7179).
* Add `+verilator+solver+file` (#7242).
* Add MacOS support for address sanitizer memory limit (#7308). [Marco Bartoli]
* Deprecate `--structs-packed` (#7222).
* 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]
* Change array tracing to dump left index to right index (#7205). [Geza Lore, Testorrent USA, Inc.]
* Change `--converge-limit` default to 10000 (#7209).
* Remove DFG extract optimization pass (#7394). [Geza Lore, Testorrent USA, Inc.]
* Optimize trace code for faster compiles on repeated types (#6707) (#6832). [Todd Strader]
* 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). [Geza Lore, Testorrent USA, Inc.]
* Fix recursive default assignment for sub-arrays (#4589) (#7202). [Julian Carrier]
* 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). [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 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.]
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). [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 +437,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 +635,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
@@ -445,6 +846,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]
@@ -5394,9 +5796,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.
+9
View File
@@ -0,0 +1,9 @@
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.
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.
+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/>
+122 -51
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
#
#****************************************************************************/
@@ -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 )
@@ -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-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,19 @@ 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-install.bash \
ci/ci-pages-notify.bash \
ci/ci-pages.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 +496,12 @@ MAKE_FILES = \
src/Makefile*.in \
test_regress/Makefile* \
# 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,25 +509,29 @@ 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 \
# Python files, subject to format but not lint
PY_FILES = \
@@ -530,26 +541,71 @@ PY_FILES = \
# Python files, test_regress tests
PY_TEST_FILES = test_regress/t/*.py
YAPF = yapf3
# YAML files
YAML_FILES = \
.*.yaml \
.*.yml \
.github/*.yml \
.github/*/*.yml \
CITATION.cff \
######################################################################
# Format
format:
$(MAKE) -j 5 format-c format-cmake format-exec format-py 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)
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
YAMLFIX = YAMLFIX_WHITELINES=1 YAMLFIX_LINE_LENGTH=200 YAMLFIX_preserve_quotes=true yamlfix
YAMLFIX_FLAGS =
format-cmake:
$(GERSEMI) $(GERSEMI_FLAGS) $(CMAKE_FILES)
format-yaml yamlfix:
$(YAMLFIX) --version
$(YAMLFIX) $(YAMLFIX_FLAGS) $(YAML_FILES)
MBAKE = mbake
MBAKE_FLAGS = format --config ./.bake.toml
format-make:
$(MBAKE) $(MBAKE_FLAGS) $(MAKE_FILES)
format-yaml: yamlfix
######################################################################
# Lint
MYPY = mypy
MYPY_FLAGS = --strict --no-error-summary
@@ -583,9 +639,6 @@ lint-py-pylint-tests:
lint-py-ruff:
$(RUFF) $(RUFF_FLAGS) $(PY_PROGRAMS)
format-exec:
-chmod a+x test_regress/t/*.py
######################################################################
# Configure
@@ -781,7 +834,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 +859,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"
+41 -33
View File
@@ -1,22 +1,24 @@
.. 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| image:: https://img.shields.io/badge/Website-Verilator.org-181717.svg
:target: https://verilator.org
: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
: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
: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
: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
: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
: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.github.io/verilator-rtlmeter-results
Welcome to Verilator
@@ -28,7 +30,7 @@ Welcome to Verilator
* Accepts Verilog or SystemVerilog
* Performs lint code-quality checks
* Compiles into multithreaded C++, or SystemC
* Creates XML to front-end your own tools
* Creates JSON to front-end your own tools
- |Logo|
* - |verilator multithreaded performance|
- **Fast**
@@ -54,36 +56,38 @@ Welcome to Verilator
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 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 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 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
@@ -101,8 +105,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>`_
@@ -132,6 +136,10 @@ organizations; please see `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.
@@ -145,16 +153,16 @@ Related Projects
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
+60
View File
@@ -0,0 +1,60 @@
# DESCRIPTION: Verilator default licensing for "reuse lint"
version = 1
[[annotations]]
path = [
"**/.gitattributes",
"**/.gitignore",
".clang-format",
".clang-tidy",
".codacy.yml",
".devcontainer/devcontainer.json",
".github/**",
".pre-commit-hooks.yaml",
".style.yapf",
"CITATION.cff",
"CPPLINT.cfg",
"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
#
######################################################################
+32 -15
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
#
######################################################################
@@ -42,6 +42,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
@@ -148,7 +149,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));
}
@@ -212,14 +213,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 = $?;
@@ -344,6 +353,7 @@ 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
@@ -389,6 +399,7 @@ 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
--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 +419,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 +432,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 +487,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 +506,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
@@ -517,6 +533,7 @@ detailed descriptions of these arguments.
-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 +563,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
@@ -570,15 +585,17 @@ 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+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")
+7 -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));
@@ -192,11 +192,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
######################################################################
+6 -5
View File
@@ -173,12 +173,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')
+30 -28
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: 2020 Geza Lore
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
################################################################################
@@ -34,7 +30,7 @@ elif [ "$CI_OS_NAME" = "osx" ]; then
elif [ "$CI_OS_NAME" = "freebsd" ]; then
MAKE=gmake
else
fatal "Unknown os: '$CI_OS_NAME'"
fatal "Unknown CI_OS_NAME: '$CI_OS_NAME'"
fi
if [ "$CI_OS_NAME" = "linux" ]; then
@@ -47,7 +43,7 @@ fi
install-vcddiff() {
TMP_DIR="$(mktemp -d)"
git clone https://github.com/veripool/vcddiff "$TMP_DIR"
git -C "${TMP_DIR}" checkout dca845020668887fd13498c772939814d9264fd5
git -C "${TMP_DIR}" checkout 4db0d84a27e8f148b127e916fc71d650837955c5
"$MAKE" -C "${TMP_DIR}"
sudo cp "${TMP_DIR}/vcddiff" /usr/local/bin
}
@@ -60,28 +56,32 @@ if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then
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
sudo apt-get install --yes ccache help2man libfl-dev ||
sudo apt-get install --yes 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
sudo apt-get install --yes libjemalloc-dev ||
sudo apt-get install --yes libjemalloc-dev
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
if [[ "$CI_RUNS_ON" =~ "ubuntu-22.04" ]] || [[ "$CI_RUNS_ON" =~ "ubuntu-24.04" ]] || [[ "$CI_RUNS_ON" =~ "ubuntu-26.04" ]]; then
if [[ ! "$CI_RUNS_ON" =~ "-riscv" ]]; then
sudo apt-get install --yes libsystemc libsystemc-dev ||
sudo apt-get install --yes libsystemc libsystemc-dev
fi
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
if [[ "$CI_RUNS_ON" =~ "ubuntu-22.04" ]] || [[ "$CI_RUNS_ON" =~ "ubuntu-24.04" ]] || [[ "$CI_RUNS_ON" =~ "ubuntu-26.04" ]]; then
sudo apt-get install --yes bear mold ||
sudo apt-get install --yes bear mold
fi
elif [ "$CI_OS_NAME" = "osx" ]; then
brew update ||
brew update
brew install ccache perl gperftools autoconf bison flex help2man ||
brew install ccache perl gperftools autoconf bison flex help2man
elif [ "$CI_OS_NAME" = "freebsd" ]; then
sudo pkg install -y autoconf bison ccache gmake perl5
else
fatal "Unknown os: '$CI_OS_NAME'"
fatal "Unknown CI_OS_NAME: '$CI_OS_NAME'"
fi
if [ -n "$CCACHE_DIR" ]; then
@@ -96,16 +96,18 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; 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
sudo apt-get install --yes gdb gtkwave lcov libfl-dev ccache jq z3 ||
sudo apt-get install --yes 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 [[ "$CI_RUNS_ON" =~ "ubuntu-22.04" ]] || [[ "$CI_RUNS_ON" =~ "ubuntu-24.04" ]] || [[ "$CI_RUNS_ON" =~ "ubuntu-26.04" ]]; then
sudo apt-get install --yes python3-clang mold ||
sudo apt-get install --yes python3-clang mold
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
if [[ "$CI_RUNS_ON" =~ "ubuntu-22.04" ]] || [[ "$CI_RUNS_ON" =~ "ubuntu-24.04" ]] || [[ "$CI_RUNS_ON" =~ "ubuntu-26.04" ]]; then
if [[ ! "$CI_RUNS_ON" =~ "-riscv" ]]; then
sudo apt-get install --yes libsystemc libsystemc-dev ||
sudo apt-get install --yes libsystemc libsystemc-dev
fi
fi
elif [ "$CI_OS_NAME" = "osx" ]; then
brew update
@@ -115,7 +117,7 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
# fst2vcd fails with "Could not open '<input file>', exiting."
sudo pkg install -y ccache gmake perl5 python3 jq z3
else
fatal "Unknown os: '$CI_OS_NAME'"
fatal "Unknown CI_OS_NAME: '$CI_OS_NAME'"
fi
# Common installs
install-vcddiff
@@ -124,5 +126,5 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
else
##############################################################################
# Unknown build stage
fatal "Unknown build stage: '$CI_BUILD_STAGE_NAME'"
fatal "Unknown CI_BUILD_STAGE_NAME: '$CI_BUILD_STAGE_NAME'"
fi
+1 -5
View File
@@ -1,11 +1,7 @@
#!/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
+1 -5
View File
@@ -1,11 +1,7 @@
#!/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.
+16 -20
View File
@@ -1,11 +1,7 @@
#!/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-FileCopyrightText: 2020 Geza Lore
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
################################################################################
@@ -33,7 +29,7 @@ elif [ "$CI_OS_NAME" = "freebsd" ]; then
export MAKE=gmake
NPROC=$(sysctl -n hw.ncpu)
else
fatal "Unknown os: '$CI_OS_NAME'"
fatal "Unknown CI_OS_NAME: '$CI_OS_NAME'"
fi
NPROC=$(expr $NPROC '+' 1)
@@ -94,18 +90,18 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
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 .
# 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
@@ -196,7 +192,7 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=9/10
;;
*)
fatal "Unknown test: $TESTS"
fatal "Unknown TESTS: $TESTS"
;;
esac
@@ -208,5 +204,5 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
else
##############################################################################
# Unknown build stage
fatal "Unknown build stage: '$CI_BUILD_STAGE_NAME'"
fatal "Unknown CI_BUILD_STAGE_NAME: '$CI_BUILD_STAGE_NAME'"
fi
+1 -5
View File
@@ -1,10 +1,6 @@
# 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
################################################################################
+1 -5
View File
@@ -1,10 +1,6 @@
# 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
################################################################################
+5 -5
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 \
+8 -7
View File
@@ -1,7 +1,7 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. 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 +9,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 +37,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}"
+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 \
+11 -11
View File
@@ -1,4 +1,4 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
Verilator Executable Docker Container
@@ -11,12 +11,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 +38,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 +68,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
+63 -7
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.047 devel],
[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],
@@ -472,9 +494,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)
@@ -530,10 +554,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"
@@ -564,8 +590,10 @@ if test "$CFG_ENABLE_PARTIAL_STATIC" = "yes"; then
_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"
LJEMALLOC="-Wl,--whole-archive -l:libjemalloc.a -Wl,--no-whole-archive"
else
LTCMALLOC=-ltcmalloc_minimal
LJEMALLOC=-ljemalloc
fi
AC_SUBST(CFG_LDFLAGS_SRC)
AC_SUBST(CFG_LDFLAGS_VERILATED)
@@ -581,11 +609,38 @@ _MY_LDLIBS_CHECK_OPT(CFG_LIBS, -latomic)
_MY_LDLIBS_CHECK_OPT(CFG_LIBS, -lbcrypt)
_MY_LDLIBS_CHECK_OPT(CFG_LIBS, -lpsapi)
# Check if jemalloc is available based on --enable-jemalloc
# jemalloc is preferred over tcmalloc when both are available
CFG_HAVE_JEMALLOC=no
_MY_LDLIBS_CHECK_IFELSE(
$LJEMALLOC,
[if test "$CFG_WITH_JEMALLOC" != "no"; then
CFG_LIBS="$LJEMALLOC $CFG_LIBS";
CFG_HAVE_JEMALLOC=yes;
# If using jemalloc, 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)
AC_DEFINE([HAVE_JEMALLOC],[1],[Defined if have jemalloc])
fi],
[if test "$CFG_WITH_JEMALLOC" = "yes"; then
AC_MSG_ERROR([--enable-jemalloc was given but test for ${LJEMALLOC} failed])
fi])
AC_SUBST(HAVE_JEMALLOC)
# Check if tcmalloc is available based on --enable-tcmalloc
# Only use tcmalloc if jemalloc was not found/enabled
if test "$CFG_HAVE_JEMALLOC" = "yes"; then
AC_MSG_NOTICE([jemalloc found, skipping tcmalloc check])
else
CFG_HAVE_TCMALLOC=no
_MY_LDLIBS_CHECK_IFELSE(
$LTCMALLOC,
[if test "$CFG_WITH_TCMALLOC" != "no"; then
CFG_LIBS="$LTCMALLOC $CFG_LIBS";
CFG_HAVE_TCMALLOC=yes;
# 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)
@@ -597,6 +652,7 @@ _MY_LDLIBS_CHECK_IFELSE(
[if test "$CFG_WITH_TCMALLOC" = "yes"; then
AC_MSG_ERROR([--enable-tcmalloc was given but test for ${LTCMALLOC} failed])
fi])
fi
AC_SUBST(HAVE_TCMALLOC)
AC_SUBST(CFG_LIBS)
+17 -14
View File
@@ -1,3 +1,6 @@
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
Contributing to Verilator
=========================
@@ -23,8 +26,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 +41,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,9 +78,9 @@ 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>`__.
+28 -1
View File
@@ -12,6 +12,7 @@ Aidan McNay
Aleksander Kiryk
Alex Chadwick
Alex Solomatnikov
Alex Zhou
Aliaksei Chapyzhenka
Ameya Vikram Singh
Andrea Calabrese
@@ -25,10 +26,12 @@ Anthony Moore
Arkadiusz Kozdra
Arthur Rosa
Artur Bieniek
AUDIY
Aylon Chaim Porat
Bartłomiej Chmiel
Brian Li
Cameron Kirk
Cameron Waite
Chih-Mao Chen
Chris Bachhuber
Chris Randall
@@ -38,7 +41,7 @@ Chuxuan Wang
Chykon
Congcong Cai
Conor McCullough
Dan Petrisko
Dan Ruelas-Petrisko
Daniel Bates
Danny Oler
Dave Sargeant
@@ -57,6 +60,7 @@ Driss Hafdi
Edgar E. Iglesias
Eric Müller
Eric Rippey
Eunseo Song
Ethan Sifferman
Eyck Jentzsch
Fabian Keßler-Schulz
@@ -95,7 +99,9 @@ Iru Cai
Ivan Vnučec
Iztok Jeras
Jake Merdich
Jakub Michalski
Jakub Wasilewski
jalcim
James Bailey
James Hanlon
James Hutchinson
@@ -105,6 +111,8 @@ Jamey Hicks
Jamie Iles
Jan Van Winkel
Jean Berniolles
Jean-Nicolas Strauss
Jens Yuechao Liu
Jeremy Bennett
Jesse Taube
Jevin Sweval
@@ -123,15 +131,18 @@ John Wehle
Jonathan Drolet
Jonathan Schröter
Jordan McConnon
Jose Drowne
Jose Loyola
Josep Sans
Joseph Nwabueze
Josh Redford
Julian Carrier
Julian Daube
Julie Schwartz
Julien Margetts
Justin Thiel
Kaleb Barrett
Kamil Danecki
Kamil Rakoczy
Kanad Kanhere
Kefa Chen
@@ -148,6 +159,7 @@ Krzysztof Sychla
Kuba Ober
Lan Zongwei
Larry Doolittle
Leela Pakanati
Liam Braun
Luca Colagrande
Ludwig Rogiers
@@ -155,6 +167,7 @@ Lukasz Dalek
Maarten De Braekeleer
Maciej Sobkowski
Marcel Chang
Marco Bartoli
Marco Widmer
Mariusz Glebocki
Markus Krause
@@ -166,6 +179,7 @@ Mateusz Gancarz
Matt Stroud
Matthew Ballance
Max Wipfli
Maxim Fonarev
Michael Bedford Taylor
Michael Bikovitsky
Michael Killough
@@ -183,6 +197,7 @@ Nathan Graybeal
Nathan Kohagen
Nathan Myers
Nick Brereton
Nikolay Puzanov
Nolan Poe
Oleh Maksymenko
Patrick Stewart
@@ -190,6 +205,7 @@ Paul Bowen-Huggett
Paul Swirhun
Paul Wright
Pawel Jewstafjew
Pawel Kojma
Pawel Sagan
Pengcheng Xu
Peter Birch
@@ -205,6 +221,7 @@ Piotr Binkowski
Qingyao Sun
Quentin Corradi
Rafal Kapuscik
Rahul Behl
Rasfunk
Raynard Qiao
Ricardo Barbedo
@@ -213,6 +230,7 @@ Risto Pejašinović
Robert Balas
Robin Heinemann
Rodrigo Batista de Moraes
Rowan Goemans
Rupert Swarbrick
Ryan Ziegler
Ryszard Rozak
@@ -222,6 +240,7 @@ Sebastien Van Cauwenberghe
Sergey Fedorov
Sergi Granell
Seth Pellegrino
Shogo Yamazaki
Shou-Li Hsu
Srinivasan Venkataramanan
Stefan Wallentowitz
@@ -230,6 +249,8 @@ Steven Hugg
Szymon Gizler
Sören Tempel
Teng Huang
Thomas Aldrian
Thomas Dybdahl Ahle
Tim Hutt
Tim Snyder
Tobias Jensen
@@ -240,6 +261,7 @@ Tom Manner
Tomasz Gorochowik
Topa Topino
Toru Niina
Tracy Narine
Trung Nguyen
Tudor Timi
Tymoteusz Blazejczyk
@@ -251,7 +273,9 @@ Varun Koyyalagunta
Vassilis Papaefstathiou
Veripool API Bot
Victor Besyakov
Vikash Patel
Vito Gamberini
Wei-Lun Chiu
William D. Jones
Wilson Snyder
Xi Zhang
@@ -270,8 +294,11 @@ Zhen Yan
Zhou Shen
Zhouyi Shen
Zixi Li
apocelipes
dependabot[bot]
february cozzocrea
sumpster
em2machine
emmettifelts
Àlex Torregrosa
Ícaro Lima
+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
#
######################################################################
+5 -2
View File
@@ -1,3 +1,6 @@
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
Verilator Documentation
=======================
@@ -10,8 +13,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: t/t_lint_didnotconverge_bad.v:7: 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: t/t_lint_didnotconverge_bad.v:7: Settle region did not converge after '--converge-limit' of 10000 tries
+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
+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'
+8
View File
@@ -0,0 +1,8 @@
.. comment: generated by t_class_new_supernfirst_bad
.. code-block:: sv
:linenos:
:emphasize-lines: 3
function new();
int x = $random();
super.new(build_coverage(x), x); // <--- BAD, must be first statement
+4
View File
@@ -0,0 +1,4 @@
.. comment: generated by t_class_new_supernfirst_bad
.. code-block::
%Error-SUPERNFIRST: example.v:1:11 'super.new' must be first statement in a 'function new' (IEEE 1800-2023 8.15)
+4 -3
View File
@@ -1,16 +1,17 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
****************
Revision History
****************
.. COMMENT above header must use ### so there is an extra level of headers
..
COMMENT above header must use *** so there is an extra level of headers
here so the index won't show the huge list of revisions when clicking on
"Revision History" in the sidebar.
Changes are contained in the :file:`Changes` file of the distribution, and
also summarized below. To subscribe to new versions, see `Verilator
also summarized below. To subscribe to new versions, see `Verilator
Announcements <https://github.com/verilator/verilator-announce>`_.
.. include:: ../_build/gen/Changes
+2 -2
View File
@@ -1,7 +1,7 @@
# pylint: disable=C0103,C0114,C0116,C0301,E0402,W0622
#
# Configuration file for Verilator's Sphinx documentation builder.
# Copyright 2003-2025 by Wilson Snyder.
# SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
#
# This file only contains overridden options. For a full list:
@@ -81,7 +81,7 @@ if 'VERILATOR_SPHINX_EXTENSIONS' in os.environ:
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = [
'_build', 'Thumbs.db', '.DS_Store', 'internals.rst', 'xml.rst', 'gen/ex_*', 'CONTRIBUTING.rst'
'_build', 'Thumbs.db', '.DS_Store', 'internals.rst', 'gen/ex_*', 'CONTRIBUTING.rst'
]
# Warn about refs
+220 -224
View File
@@ -1,7 +1,7 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
.. _Connecting:
.. _connecting:
******************************
Connecting to Verilated Models
@@ -11,13 +11,13 @@ Structure of the Verilated Model
================================
Verilator outputs a :file:`{prefix}.h` header file which defines a class
named :code:`{prefix}` which represents the generated model the user is
supposed to instantiate. This model class defines the interface of the
named ``{prefix}`` which represents the generated model the user is
supposed to instantiate. This model class defines the interface of the
Verilated model.
Verilator will additionally create a :file:`{prefix}.cpp` file, together
with additional .h and .cpp files for internals. See the :file:`examples`
directory in the kit for examples. See :ref:`Files Read/Written` for
with additional .h and .cpp files for internals. See the :file:`examples`
directory in the kit for examples. See :ref:`Files Read/Written` for
information on all the files Verilator might output.
The output of Verilator will contain a :file:`{prefix}.mk` file that may be
@@ -32,91 +32,89 @@ model:
equivalents.
* Public top level module instances are exposed as pointers to allow access
to :code:`/* verilator public */` items.
to ``/* verilator public */`` items.
* The root of the design hierarchy (as in SystemVerilog :code:`$root`) is
exposed via the :code:`rootp` member pointer to allow access to model
internals, including :code:`/* verilator public_flat */` items.
* The root of the design hierarchy (as in SystemVerilog ``$root``) is
exposed via the ``rootp`` member pointer to allow access to model
internals, including ``/* verilator public_flat */`` items.
.. _Porting from pre 4.210:
.. _porting from pre 4.210:
Model interface changes in version 4.210
------------------------------------------
----------------------------------------
Starting from version 4.210, the model class is an interface object.
Up until Verilator version 4.204 inclusive, the generated model class was
also the instance of the top level instance in the design hierarchy (what
you would refer to with :code:`$root` in SystemVerilog). This meant that
all internal variables that were implemented by Verilator in the root scope
were accessible as members of the model class itself. Note there were often
many such variable due to module inlining, including
:code:`/* verilator public_flat */` items.
you would refer to with ``$root`` in SystemVerilog). This meant that all
internal variables that were implemented by Verilator in the root scope
were accessible as members of the model class itself. Note there were often
many such variable due to module inlining, including ``/* verilator
public_flat */`` items.
This means that user code that accesses internal signals in the model
(likely including :code:`/* verilator public_flat */` signals, as they are
(likely including ``/* verilator public_flat */`` signals, as they are
often inlined into the root scope) will need to be updated as follows:
* No change required for accessing top level IO signals. These are directly
accessible in the model class via references.
* No change required for accessing :code:`/* verilator public */` items.
These are directly accessible via sub-module pointers in the model class.
* No change required for accessing ``/* verilator public */`` items. These
are directly accessible via sub-module pointers in the model class.
* Accessing any other internal members, including
:code:`/* verilator public_flat */` items requires the following changes:
``/* verilator public_flat */`` items requires the following changes:
* Additionally include :file:`{prefix}___024root.h`. This header defines
type of the :code:`rootp` pointer within the model class. Note the
:code:`__024` substring is the Verilator escape sequence for the
:code:`$` character, i.e.: :code:`rootp` points to the Verilated
SystemVerilog :code:`$root` scope.
type of the ``rootp`` pointer within the model class. Note the
``__024`` substring is the Verilator escape sequence for the ``$``
character, i.e.: ``rootp`` points to the Verilated SystemVerilog
``$root`` scope.
* Replace :code:`modelp->internal->member` references with
:code:`modelp->rootp->internal->member` references, which
contain one additional indirection via the :code:`rootp` pointer.
* Replace ``modelp->internal->member`` references with
``modelp->rootp->internal->member`` references, which contain one
additional indirection via the ``rootp`` pointer.
.. _Connecting to C++:
.. _connecting to c++:
Connecting to C++
=================
In C++ output mode (:vlopt:`--cc`), the Verilator generated model class is a
simple C++ class. The user must write a C++ wrapper and main loop for the
In C++ output mode (:vlopt:`--cc`), the Verilator generated model class is
a simple C++ class. The user must write a C++ wrapper and main loop for the
simulation, which instantiates the model class, and link with the Verilated
model.
Refer to ``examples/make_tracing_c`` in the distribution for a detailed
commented example.
Top level IO signals are read and written as members of the model. You
call the model's :code:`eval()` method to evaluate the model. When the
simulation is complete call the model's :code:`final()` method to execute
any SystemVerilog final blocks, and complete any assertions. If using
:vlopt:`--timing`, there are two additional functions for checking if
there are any events pending in the simulation due to delays, and for
retrieving the simulation time of the next delayed event. See
:ref:`Evaluation Loop`.
Top level IO signals are read and written as members of the model. You call
the model's ``eval()`` method to evaluate the model. When the simulation is
complete call the model's ``final()`` method to execute any SystemVerilog
final blocks, and complete any assertions. If using :vlopt:`--timing`,
there are two additional functions for checking if there are any events
pending in the simulation due to delays, and for retrieving the simulation
time of the next delayed event. See :ref:`Evaluation Loop`.
Connecting to SystemC
=====================
In SystemC output mode (:vlopt:`--sc`), the Verilator generated model class
is a SystemC SC_MODULE. This module will attach directly into a SystemC
is a SystemC SC_MODULE. This module will attach directly into a SystemC
netlist as an instantiation.
The SC_MODULE gets the same pinout as the Verilog module, with the
following type conversions: Pins of a single bit become bool. Pins 2-32
bits wide become uint32_t's. Pins 33-64 bits wide become sc_bv's or
uint64_t's depending on the :vlopt:`--no-pins64` option. Wider pins
become sc_bv's. (Uints simulate the fastest so are used where possible.)
following type conversions: Pins of a single bit become bool. Pins 2-32
bits wide become uint32_t's. Pins 33-64 bits wide become sc_bv's or
uint64_t's depending on the :vlopt:`--no-pins64` option. Wider pins become
sc_bv's. (Uints simulate the fastest so are used where possible.)
Model internals, including lower level sub-modules are not pure SystemC
code. This is a feature, as using the SystemC pin interconnect scheme
code. This is a feature, as using the SystemC pin interconnect scheme
everywhere would reduce performance by an order of magnitude.
@@ -124,41 +122,42 @@ Verilated API
=============
The API to a Verilated model is the C++ headers in the include/ directory
in the distribution. These headers use Doxygen comments, `///` and `//<`,
in the distribution. These headers use Doxygen comments, `///` and `//<`,
to indicate and document those functions that are part of the Verilated
public API.
Process-Level Clone APIs
--------------------------
------------------------
Modern operating systems support process-level clone (a.k.a copying, forking)
with system call interfaces in C/C++, e.g., :code:`fork()` in Linux.
Modern operating systems support process-level clone (a.k.a copying,
forking) with system call interfaces in C/C++, e.g., ``fork()`` in Linux.
However, after cloning a parent process, some resources cannot be inherited
in the child process. For example, in POSIX systems, when you fork a process,
the child process inherits all the memory of the parent process. However,
only the thread that called fork is replicated in the child process. Other
threads are not.
in the child process. For example, in POSIX systems, when you fork a
process, the child process inherits all the memory of the parent process.
However, only the thread that called fork is replicated in the child
process. Other threads are not.
Therefore, to support the process-level clone mechanisms, Verilator supports
:code:`prepareClone()` and :code:`atClone()` APIs to allow the user to manually
re-construct the model in the child process. The two APIs handle all necessary
resources required for releasing and re-initializing before and after cloning.
Therefore, to support the process-level clone mechanisms, Verilator
supports ``prepareClone()`` and ``atClone()`` APIs to allow the user to
manually re-construct the model in the child process. The two APIs handle
all necessary resources required for releasing and re-initializing before
and after cloning.
The two APIs are supported in the verilated models. Here is an example of usage
with Linux :code:`fork()` and :code:`pthread_atfork` APIs:
The two APIs are supported in the verilated models. Here is an example of
usage with Linux ``fork()`` and ``pthread_atfork`` APIs:
.. code-block:: C++
// static function pointers to fit pthread_atfork
static auto prepareClone = [](){ topp->prepareClone(); };
static auto atClone = [](){ topp->atClone(); };
// static function pointers to fit pthread_atfork
static auto prepareClone = [](){ topp->prepareClone(); };
static auto atClone = [](){ topp->atClone(); };
// in main function, register the handlers:
pthread_atfork(prepareClone, atClone, atClone);
// in main function, register the handlers:
pthread_atfork(prepareClone, atClone, atClone);
For better flexibility, you can also manually call the handlers before and
after :code:`fork()`.
after ``fork()``.
With the process-level clone APIs, users can create process-level snapshots
for the verilated models. While the Verilator save/restore option provides
@@ -170,7 +169,7 @@ Direct Programming Interface (DPI)
==================================
Verilator supports SystemVerilog Direct Programming Interface import and
export statements. Only the SystemVerilog form ("DPI-C") is supported, not
export statements. Only the SystemVerilog form ("DPI-C") is supported, not
the original Synopsys-only DPI.
DPI Example
@@ -181,76 +180,76 @@ Verilog, put in our.v:
.. code-block::
import "DPI-C" function int add (input int a, input int b);
import "DPI-C" function int add (input int a, input int b);
initial begin
$display("%x + %x = %x", 1, 2, add(1,2));
endtask
initial begin
$display("%x + %x = %x", 1, 2, add(1,2));
endtask
Then after Verilating, Verilator will create a file Vour__Dpi.h with the
prototype to call this function:
.. code-block:: C++
extern int add(int a, int b);
extern int add(int a, int b);
From the sc_main.cpp file (or another .cpp file passed to the Verilator
command line, or the link), you'd then:
.. code-block:: C++
#include "svdpi.h"
#include "Vour__Dpi.h"
int add(int a, int b) { return a+b; }
#include "svdpi.h"
#include "Vour__Dpi.h"
int add(int a, int b) { return a+b; }
DPI System Task/Functions
-------------------------
Verilator extends the DPI format to allow using the same scheme to
efficiently add system functions. Use a dollar-sign prefixed system
efficiently add system functions. Use a dollar-sign prefixed system
function name for the import, but note it must be escaped.
.. code-block:: sv
export "DPI-C" function integer \$myRand;
export "DPI-C" function integer \$myRand;
initial $display("myRand=%d", $myRand());
initial $display("myRand=%d", $myRand());
Going the other direction, you can export Verilog tasks so they can be
called from C++:
.. code-block:: sv
export "DPI-C" task publicSetBool;
export "DPI-C" task publicSetBool;
task publicSetBool;
input bit in_bool;
var_bool = in_bool;
endtask
task publicSetBool;
input bit in_bool;
var_bool = in_bool;
endtask
Then after Verilating, Verilator will create a file Vour__Dpi.h with the
prototype to call this function:
.. code-block:: C++
extern void publicSetBool(svBit in_bool);
extern void publicSetBool(svBit in_bool);
From the sc_main.cpp file, you'd then:
.. code-block:: C++
#include "Vour__Dpi.h"
publicSetBool(value);
#include "Vour__Dpi.h"
publicSetBool(value);
Or, alternatively, call the function under the design class. This isn't
DPI compatible but is easier to read and better supports multiple designs.
Or, alternatively, call the function under the design class. This isn't DPI
compatible but is easier to read and better supports multiple designs.
.. code-block:: C++
#include "Vour__Dpi.h"
Vour::publicSetBool(value);
// or top->publicSetBool(value);
#include "Vour__Dpi.h"
Vour::publicSetBool(value);
// or top->publicSetBool(value);
Note that if the DPI task or function accesses any register or net within
the RTL, it will require a scope to be set. This can be done using the
@@ -263,11 +262,11 @@ with respect to that top level module, then the scope could be set with
.. code-block:: C++
#include "svdpi.h"
...
const svScope scope = svGetScopeFromName("TOP.dut");
assert(scope); // Check for nullptr if scope not found
svSetScope(scope);
#include "svdpi.h"
...
const svScope scope = svGetScopeFromName("TOP.dut");
assert(scope); // Check for nullptr if scope not found
svSetScope(scope);
(Remember that Verilator adds a "TOP" to the top of the module hierarchy.)
@@ -282,24 +281,24 @@ DPI Imports that access signals
If a DPI import accesses a signal through the VPI Verilator will not be
able to know what variables are accessed and may schedule the code
inappropriately. Ideally pass the values as inputs/outputs so the VPI is
not required. Alternatively a workaround is to use a non-inlined task as a
inappropriately. Ideally pass the values as inputs/outputs so the VPI is
not required. Alternatively a workaround is to use a non-inlined task as a
wrapper:
.. code-block::
logic din;
logic din;
// This DPI function will read "din"
import "DPI-C" context function void dpi_that_accesses_din();
// This DPI function will read "din"
import "DPI-C" context function void dpi_that_accesses_din();
always @(...)
dpi_din_args(din);
always @(...)
dpi_din_args(din);
task dpi_din_args(input din);
// verilator no_inline_task
dpi_that_accesses_din();
endtask
task dpi_din_args(input din);
// verilator no_inline_task
dpi_that_accesses_din();
endtask
DPI Display Functions
@@ -309,8 +308,8 @@ Verilator allows writing $display like functions using this syntax:
.. code-block::
import "DPI-C" function void
\$my_display(input string formatted /*verilator sformat*/ );
import "DPI-C" function void
\$my_display(input string formatted /*verilator sformat*/ );
The :option:`/*verilator&32;sformat*/` metacomment indicates that this
function accepts a $display like format specifier followed by any number of
@@ -320,14 +319,14 @@ arguments to satisfy the format.
DPI Context Functions
---------------------
Verilator supports IEEE DPI Context Functions. Context imports pass the
Verilator supports IEEE DPI Context Functions. Context imports pass the
simulator context, including calling scope name, and filename and line
number to the C code. For example, in Verilog:
number to the C code. For example, in Verilog:
.. code-block::
import "DPI-C" context function int dpic_line();
initial $display("This is line %d, again, line %d\n", `line, dpic_line());
import "DPI-C" context function int dpic_line();
initial $display("This is line %d, again, line %d\n", `line, dpic_line());
This will call C++ code which may then use the svGet\* functions to read
information, in this case the line number of the Verilog statement that
@@ -335,22 +334,22 @@ invoked the dpic_line function:
.. code-block:: C++
int dpic_line() {
// Get a scope: svScope scope = svGetScope();
int dpic_line() {
// Get a scope: svScope scope = svGetScope();
const char* scopenamep = svGetNameFromScope(scope);
assert(scopenamep);
const char* scopenamep = svGetNameFromScope(scope);
assert(scopenamep);
const char* filenamep = "";
int lineno = 0;
if (svGetCallerInfo(&filenamep, &lineno)) {
printf("dpic_line called from scope %s on line %d\n",
scopenamep, lineno);
return lineno;
} else {
return 0;
}
}
const char* filenamep = "";
int lineno = 0;
if (svGetCallerInfo(&filenamep, &lineno)) {
printf("dpic_line called from scope %s on line %d\n",
scopenamep, lineno);
return lineno;
} else {
return 0;
}
}
See the IEEE Standard for more information.
@@ -359,13 +358,12 @@ DPI Header Isolation
--------------------
Verilator places the IEEE standard header files such as svdpi.h into a
separate include directory, vltstd (VeriLaTor STandarD). When compiling
separate include directory, vltstd (VeriLaTor STandarD). When compiling
most applications $VERILATOR_ROOT/include/vltstd would be in the include
path along with the normal $VERILATOR_ROOT/include. However, when
compiling Verilated models into other simulators which have their own
svdpi.h and similar standard files with different contents, the vltstd
directory should not be included to prevent picking up incompatible
definitions.
path along with the normal $VERILATOR_ROOT/include. However, when compiling
Verilated models into other simulators which have their own svdpi.h and
similar standard files with different contents, the vltstd directory should
not be included to prevent picking up incompatible definitions.
Public Functions
@@ -378,24 +376,23 @@ are slightly faster, but less compatible.
Verification Procedural Interface (VPI)
=======================================
Verilator supports a limited subset of the VPI. This subset allows
Verilator supports a limited subset of the VPI. This subset allows
inspection, examination, value change callbacks, and depositing of values
to public signals only.
VPI is enabled with the Verilator :vlopt:`--vpi` option.
To access signals via the VPI, Verilator must be told exactly which signals
are to be accessed. This is done using the Verilator public pragmas
are to be accessed. This is done using the Verilator public pragmas
documented below.
Verilator has an important difference from an event based simulator; signal
values that are changed by the VPI will not immediately propagate their
values, instead the top level header file's :code:`eval()` method must be
called. Normally this would be part of the normal evaluation (i.e. the
next clock edge), not as part of the value change. This makes the
performance of VPI routines extremely fast compared to event based
simulators, but can confuse some test-benches that expect immediate
propagation.
values, instead the top level header file's ``eval()`` method must be
called. Normally this would be part of the normal evaluation (i.e. the next
clock edge), not as part of the value change. This makes the performance of
VPI routines extremely fast compared to event based simulators, but can
confuse some test-benches that expect immediate propagation.
Note the VPI by its specified implementation will always be much slower
than accessing the Verilator values by direct reference
@@ -405,132 +402,131 @@ while the direct references are evaluated by the compiler and result in
only a couple of instructions.
For signal callbacks to work the main loop of the program must call
:code:`VerilatedVpi::callValueCbs()`.
``VerilatedVpi::callValueCbs()``.
Verilator also tracks when the model state has been modified via the VPI with
an :code:`evalNeeded` flag. This flag can be checked with :code:`VerilatedVpi::evalNeeded()`
and it can be cleared with :code:`VerilatedVpi::clearEvalNeeded()`. Used together
it is possible to skip :code:`eval()` calls if no model state has been changed
since the last :code:`eval()`.
Verilator also tracks when the model state has been modified via the VPI
with an ``evalNeeded`` flag. This flag can be checked with
``VerilatedVpi::evalNeeded()`` and it can be cleared with
``VerilatedVpi::clearEvalNeeded()``. Used together it is possible to skip
``eval()`` calls if no model state has been changed since the last
``eval()``.
Any data written via :code:`vpi_put_value` with :code:`vpiInertialDelay` will
be deferred for later. These delayed values can be flushed to the model with
:code:`VerilatedVpi::doInertialPuts()`.
Any data written via ``vpi_put_value`` with ``vpiInertialDelay`` will be
deferred for later. These delayed values can be flushed to the model with
``VerilatedVpi::doInertialPuts()``.
.. _VPI Example:
.. _vpi example:
VPI Example
-----------
In the below example, we have readme marked read-only, and writeme marked
read-write which if written from outside the model will have the same semantics
as if it was a top level input.
read-write which if written from outside the model will have the same
semantics as if it was a top level input.
.. code-block:: bash
cat >our.v <<'EOF'
module our #(
parameter WIDTH /*verilator public_flat_rd*/ = 32
) (input clk);
reg [WIDTH-1:0] readme /*verilator public_flat_rd*/;
reg [WIDTH-1:0] writeme /*verilator public_flat_rw*/;
initial $finish;
endmodule
EOF
cat >our.v <<'EOF'
module our #(
parameter WIDTH /*verilator public_flat_rd*/ = 32
) (input clk);
reg [WIDTH-1:0] readme /*verilator public_flat_rd*/;
reg [WIDTH-1:0] writeme /*verilator public_flat_rw*/;
initial $finish;
endmodule
EOF
There are many online tutorials and books on the VPI, but an example that
accesses the above signal "readme" would be:
.. code-block:: bash
cat >sim_main.cpp <<'EOF'
#include "Vour.h"
#include "verilated.h"
#include "verilated_vpi.h" // Required to get definitions
cat >sim_main.cpp <<'EOF'
#include "Vour.h"
#include "verilated.h"
#include "verilated_vpi.h" // Required to get definitions
uint64_t main_time = 0; // See comments in first example
double sc_time_stamp() { return main_time; }
uint64_t main_time = 0; // See comments in first example
double sc_time_stamp() { return main_time; }
void read_and_check() {
vpiHandle vh1 = vpi_handle_by_name((PLI_BYTE8*)"TOP.our.readme", NULL);
if (!vh1) vl_fatal(__FILE__, __LINE__, "sim_main", "No handle found");
const char* name = vpi_get_str(vpiName, vh1);
const char* type = vpi_get_str(vpiType, vh1);
const int size = vpi_get(vpiSize, vh1);
printf("register name: %s, type: %s, size: %d\n", name, type, size); // Prints "register name: readme, type: vpiReg, size: 32"
void read_and_check() {
vpiHandle vh1 = vpi_handle_by_name((PLI_BYTE8*)"TOP.our.readme", NULL);
if (!vh1) vl_fatal(__FILE__, __LINE__, "sim_main", "No handle found");
const char* name = vpi_get_str(vpiName, vh1);
const char* type = vpi_get_str(vpiType, vh1);
const int size = vpi_get(vpiSize, vh1);
printf("register name: %s, type: %s, size: %d\n", name, type, size); // Prints "register name: readme, type: vpiReg, size: 32"
s_vpi_value v;
v.format = vpiIntVal;
vpi_get_value(vh1, &v);
printf("Value of %s: %d\n", name, v.value.integer); // Prints "Value of readme: 0"
}
s_vpi_value v;
v.format = vpiIntVal;
vpi_get_value(vh1, &v);
printf("Value of %s: %d\n", name, v.value.integer); // Prints "Value of readme: 0"
}
int main(int argc, char** argv) {
Verilated::commandArgs(argc, argv);
const std::unique_ptr<VerilatedContext> contextp{new VerilatedContext};
const std::unique_ptr<Vour> top{new Vour{contextp.get()}};
int main(int argc, char** argv) {
Verilated::commandArgs(argc, argv);
const std::unique_ptr<VerilatedContext> contextp{new VerilatedContext};
const std::unique_ptr<Vour> top{new Vour{contextp.get()}};
contextp->internalsDump(); // See scopes to help debug
while (!contextp->gotFinish()) {
top->eval();
VerilatedVpi::callValueCbs(); // For signal callbacks
read_and_check();
}
return 0;
}
EOF
contextp->internalsDump(); // See scopes to help debug
while (!contextp->gotFinish()) {
top->eval();
VerilatedVpi::callValueCbs(); // For signal callbacks
read_and_check();
}
return 0;
}
EOF
.. _Evaluation Loop:
.. _evaluation loop:
Wrappers and Model Evaluation Loop
==================================
When using SystemC, evaluation of the Verilated model is managed by the
SystemC kernel, and for the most part can be ignored. When using C++, the
user must call :code:`eval()`, or :code:`eval_step()` and
:code:`eval_end_step()`.
SystemC kernel, and for the most part can be ignored. When using C++, the
user must call ``eval()``, or ``eval_step()`` and ``eval_end_step()``.
1. When there is a single design instantiated at the C++ level that needs
to evaluate within a given context, call :code:`designp->eval()`.
to evaluate within a given context, call ``designp->eval()``.
2. When there are multiple designs instantiated at the C++ level that need
to evaluate within a context, call :code:`first_designp->eval_step()` then
:code:`->eval_step()` on all other designs. Then call
:code:`->eval_end_step()` on the first design then all other designs. If
there is only a single design, you would call :code:`eval_step()` then
:code:`eval_end_step()`; in fact :code:`eval()` described above is just a
wrapper which calls these two functions.
to evaluate within a context, call ``first_designp->eval_step()`` then
``->eval_step()`` on all other designs. Then call ``->eval_end_step()`` on
the first design then all other designs. If there is only a single design,
you would call ``eval_step()`` then ``eval_end_step()``; in fact ``eval()``
described above is just a wrapper which calls these two functions.
3. If using delays and :vlopt:`--timing`, there are two additional methods
the user should call:
* :code:`designp->eventsPending()`, which returns :code:`true` if there are
any delayed events pending,
* :code:`designp->nextTimeSlot()`, which returns the simulation time of the
* ``designp->eventsPending()``, which returns ``true`` if there are any
delayed events pending,
* ``designp->nextTimeSlot()``, which returns the simulation time of the
next delayed event. This method can only be called if
:code:`designp->eventsPending()` returned :code:`true`.
``designp->eventsPending()`` returned ``true``.
Call :code:`eventsPending()` to check if you should continue with the
simulation, and then :code:`nextTimeSlot()` to move simulation time forward.
:vlopt:`--main` can be used with :vlopt:`--timing` to generate a basic example
of a timing-enabled eval loop.
Call ``eventsPending()`` to check if you should continue with the
simulation, and then ``nextTimeSlot()`` to move simulation time forward.
:vlopt:`--main` can be used with :vlopt:`--timing` to generate a basic
example of a timing-enabled eval loop.
When :code:`eval()` (or :code:`eval_step()`) is called Verilator looks for
changes in clock signals and evaluates related sequential always blocks,
such as computing always_ff @ (posedge...) outputs. With :vlopt:`--timing`, it
When ``eval()`` (or ``eval_step()``) is called Verilator looks for changes
in clock signals and evaluates related sequential always blocks, such as
computing always_ff @ (posedge...) outputs. With :vlopt:`--timing`, it
resumes any delayed processes awaiting the current simulation time. Then
Verilator evaluates combinational logic.
Note combinatorial logic is not computed before sequential always blocks
are computed (for speed reasons). Therefore it is best to set any non-clock
inputs up with a separate :code:`eval()` call before changing clocks.
inputs up with a separate ``eval()`` call before changing clocks.
Alternatively, if all always_ff statements use only the posedge of clocks,
or all inputs go directly to always_ff statements, as is typical, then you
can change non-clock inputs on the negative edge of the input clock, which
will be faster as there will be fewer :code:`eval()` calls.
will be faster as there will be fewer ``eval()`` calls.
For more information on evaluation, see :file:`docs/internals.rst` in the
distribution.
@@ -540,18 +536,18 @@ Verilated and VerilatedContext
==============================
Multiple C++ Verilated models may be part of the same simulation context,
that is share a VPI interface, sense of time, and common settings. This
that is share a VPI interface, sense of time, and common settings. This
common simulation context information is stored in a ``VerilatedContext``
structure. If a ``VerilatedContext`` is not created prior to creating a
model, a default global one is created automatically. SystemC requires
structure. If a ``VerilatedContext`` is not created prior to creating a
model, a default global one is created automatically. SystemC requires
using only the single, default VerilatedContext.
The ``Verilated::`` methods, including the ``Verilated::commandArgs`` call
shown above, call VerilatedContext methods using the default global
VerilatedContext. (Technically they operate on the last one used by a
given thread.) If you are using multiple simulation contexts you should
not use the Verilated:: methods, and instead always use VerilatedContext
methods called on the appropriate VerilatedContext object.
VerilatedContext. (Technically they operate on the last one used by a given
thread.) If you are using multiple simulation contexts you should not use
the Verilated:: methods, and instead always use VerilatedContext methods
called on the appropriate VerilatedContext object.
For methods available under Verilated and VerilatedContext see
:file:`include/verilated.h` in the distribution.
+24 -23
View File
@@ -1,4 +1,4 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
*******************************
@@ -19,50 +19,50 @@ Reporting Bugs
First, check the :ref:`Language Limitations` section.
Next, try the :vlopt:`--debug` option. This will enable additional
internal assertions, and may help identify the problem.
Next, try the :vlopt:`--debug` option. This will enable additional internal
assertions, and may help identify the problem.
Finally, reduce your code to the smallest possible routine that exhibits
the bug (see: :ref:`Minimizing bug-inducing code`). Even better, create
a test in the :file:`test_regress/t` directory, as follows:
the bug (see: :ref:`Minimizing bug-inducing code`). Even better, create a
test in the :file:`test_regress/t` directory, as follows:
.. code-block:: bash
cd test_regress
cp -p t/t_EXAMPLE.py t/t_BUG.py
cp -p t/t_EXAMPLE.v t/t_BUG.v
cd test_regress
cp -p t/t_EXAMPLE.py t/t_BUG.py
cp -p t/t_EXAMPLE.v t/t_BUG.v
There are many hints on how to write a good test in the
:file:`test_regress/driver.py` documentation which can be seen by running:
.. code-block:: bash
cd $VERILATOR_ROOT # Need the original distribution kit
test_regress/driver.py --help
cd $VERILATOR_ROOT # Need the original distribution kit
test_regress/driver.py --help
Edit :file:`t/t_BUG.py` to suit your example; you can do anything you want
in the Verilog code there; just make sure it retains the single clk input
and no outputs. Now, the following should fail:
and no outputs. Now, the following should fail:
.. code-block:: bash
cd $VERILATOR_ROOT # Need the original distribution kit
cd test_regress
t/t_BUG.py # Run on Verilator
t/t_BUG.py --debug # Run on Verilator, passing --debug to Verilator
t/t_BUG.py --vcs # Run on VCS simulator
t/t_BUG.py --nc|--iv|--ghdl # Likewise on other simulators
cd $VERILATOR_ROOT # Need the original distribution kit
cd test_regress
t/t_BUG.py # Run on Verilator
t/t_BUG.py --debug # Run on Verilator, passing --debug to Verilator
t/t_BUG.py --vcs # Run on VCS simulator
t/t_BUG.py --nc|--iv|--ghdl # Likewise on other simulators
The test driver accepts a number of options, many of which mirror the main
Verilator options. For example the previous test could have been run with
debugging enabled. The full set of test options can be seen by running
debugging enabled. The full set of test options can be seen by running
:command:`driver.py --help` as shown above.
Finally, report the bug at `Verilator Issues
<https://verilator.org/issues>`_. The bug will become publicly visible; if
<https://verilator.org/issues>`_. The bug will become publicly visible; if
this is unacceptable, mail the bug report to ``[email protected]``.
.. _Minimizing bug-inducing code:
.. _minimizing bug-inducing code:
Minimizing bug-inducing code
============================
@@ -73,12 +73,12 @@ caused by a complex interaction of many parts of the design, and it is not
clear which parts are necessary to reproduce the bug. In these cases, an
Open Source tool called `sv-bugpoint
<https://github.com/antmicro/sv-bugpoint>`_ can be used to automatically
reduce a SystemVerilog design to the smallest possible reproducer.
It can be used to automatically reduce a design with hundreds of thousands of
reduce a SystemVerilog design to the smallest possible reproducer. It can
be used to automatically reduce a design with hundreds of thousands of
lines to a minimal test case while preserving the bug-inducing behavior.
With :vlopt:`--debug` or :vlopt:`--dump-inputs`, Verilator will write a
*{prefix}*\ __inputs\ .vpp file which has all of the individual input files
*{prefix}*\ __inputs.vpp file which has all of the individual input files
combined and pre-processed, this is often useful as the input design into
`sv-bugpoint`.
@@ -88,4 +88,5 @@ information on how to use `sv-bugpoint`.
.. Contributing
.. ============
.. include:: ../CONTRIBUTING.rst
+164 -138
View File
@@ -1,4 +1,4 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
************************
@@ -28,10 +28,11 @@ Alliance <https://chipsalliance.org>`_, and `Antmicro Ltd
Previous major corporate sponsors of Verilator, by providing significant
contributions of time or funds include: Antmicro Ltd., Atmel Corporation,
Compaq Corporation, Digital Equipment Corporation, Embecosm Ltd., Hicamp
Systems, Intel Corporation, Marvell Inc., Mindspeed Technologies Inc.,
MicroTune Inc., picoChip Designs Ltd., Sun Microsystems Inc., Nauticus
Networks Inc., SiCortex Inc, Shunyao CAD, and Western Digital Inc.
Compaq Corporation, Digital Equipment Corporation, Embecosm Ltd., Fractile
Ltd., Hicamp Systems, Intel Corporation, Marvell Inc., Mindspeed Technologies
Inc., MicroTune Inc., picoChip Designs Ltd., Sun Microsystems Inc., Nauticus
Networks Inc., SiCortex Inc, Shunyao CAD, Tenstorrent USA, Inc. and Western
Digital Inc.
The contributors of major functionality are: Jeremy Bennett, Krzysztof
Bieganski, Byron Bradley, Lane Brooks, John Coiner, Duane Galbi, Arkadiusz
@@ -41,133 +42,158 @@ Paul Wasson, Jie Xu, and Wilson Snyder.
Some of the people who have provided ideas, and feedback for Verilator
include:
David Addison, Tariq B. Ahmad, Nikana Anastasiadis, John David Anglin,
Frederic Antonin, Hans Van Antwerpen, Vasu Arasanipalai, Jens Arm, Rohan
Arshid, Valentin Atepalikhin, Philip Axer, Gökçe Aydos, Chris Bachhuber,
Filip Badáň, Adam Bagley, Sharad Bagri, James Bailey, Robert Balas, Marco
Balboni, Matthew Ballance, Ricardo Barbedo, Andrew Bardsley, Ilya Barkov,
Matthew Barr, Geoff Barrett, Kaleb Barrett, Daniel Bates, Julius Baxter,
Michael Berman, Jean Berniolles, Victor Besyakov, Narayan Bhagavatula,
Moinak Bhattacharyya, Kritik Bhimani, David Biancolin, Krzysztof Bieganski,
Michael Bikovitsky, David Binderman, Piotr Binkowski, Johan Björk, David
Black, Tymoteusz Blazejczyk, Scott Bleiweiss, David van der Bokke, Daniel
Bone, Guy Bonneau, Krzysztof Boroński, Gregg Bouchard, Christopher
Boumenot, Paul Bowen-Huggett, Nick Bowler, Bryan Brady, Maarten De
Braekeleer, Liam Braun, Charlie Brej, J Briquet, John Brownlee, KC
Buckenmaier, Gijs Burghoorn, Jeff Bush, Lawrence Butcher, Tony Bybell, Iru
Cai, Ted Campbell, Anthony Campos, Chris Candler, Lauren Carlson, Gregory
Carver, Donal Casey, Sebastien Van Cauwenberghe, Alex Chadwick, Greg
Chadwick, Marcel Chang, Aliaksei Chapyzhenka, Chih-Mao Chen, Guokai Chen,
Kefa Chen, Terry Chen, Yangyu Chen, Yi-Chung Chen, Yurii Cherkasov,
Hennadii Chernyshchyk, Enzo Chi, Bartłomiej Chmiel, Robert A. Clark, Ryan
Clarke, Allan Cochrane, Keith Colbert, Quentin Corradi, Nassim Corteggiani,
Gianfranco Costamagna, February Cozzocrea, Sean Cross, George Cuan, Michal
Czyz, Joe DErrico, Jim Dai, Lukasz Dalek, Laurens van Dam, Gunter
Dannoritzer, Ashutosh Das, Julian Daube, Greg Davill, Bernard Deadman,
Peter Debacker, Josse Van Delm, John Demme, Mike Denio, John Deroo, Philip
Derrick, Aadi Desai, John Dickol, Ruben Diez, Danny Ding, Jacko Dirks, Ivan
Djordjevic, Brad Dobbie, Paul Donahue, Jonathon Donaldson, Anthony Donlon,
Caleb Donovick, Larry Doolittle, Leendert van Doorn, Sebastian Dressler,
Jonathan Drolet, Justin Yao Du, Maciej Dudek, Alex Duller, Jeff Dutton,
Tomas Dzetkulic, Usuario Eda, Charles Eddleston, Chandan Egbert, Joe Eiler,
Ahmed El-Mahmoudy, Trevor Elbourne, Mats Engstrom, Robert Farrell, Julien
Faucher, Olivier Faure, Eugene Feinberg, Eugen Fekete, Fabrizio Ferrandi,
Udi Finkelstein, Brian Flachs, Bill Flynn, Andrea Foletto, Alex Forencich,
Aurelien Francillon, Bob Fredieu, Manuel Freiberger, Mostafa Gamal, Vito
Gamberini, Mostafa Garnal, Benjamin Gartner, Christian Gelinek, Richard E
George, Peter Gerst, Glen Gibb, Michael Gielda, Barbara Gigerl, Nimrod
Gileadi, Shankar Giri, Dan Gisselquist, Szymon Gizler, Petr Gladkikh, Sam
Gladstone, Mariusz Glebocki, Embedded Go, Andrew Goessling, Amir Gonnen,
Chitlesh Goorah, Tomasz Gorochowik, Kai Gossner, Tarik Graba, Sergi
Granell, Al Grant, Nathan Graybeal, Alexander Grobman, Qian Gu, Xuan Guo,
Prabhat Gupta, Deniz Güzel, Driss Hafdi, Abdul Hameed, Neil Hamilton, James
Hanlon, Tang Haojin, Øyvind Harboe, Jannis Harder, David Harris, Junji
Hashimoto, Thomas Hawkins, Mitch Hayenga, Harald Heckmann, Robert Henry,
Stephen Henry, Sebastian Hesselbarth, David Hewson, Jamey Hicks, Joel
Holdsworth, Andrew Holme, Peter Holmes, Hiroki Honda, Alex Hornung,
Pierre-Henri Horrein, David Horton, Peter Horvath, Jae Hossell, Kuoping
Hsu, Shou-Li Hsu, Teng Huang, Steven Hugg, Alan Hunter, James Hutchinson,
Tim Hutt, Ehab Ibrahim, Edgar E. Iglesias, Shahid Ikram, Jamie Iles, Fuad
Ismail, Vighnesh Iyer, Ben Jackson, Daniel Jacques, Shareef Jalloq, Marlon
James, Krzysztof Jankowski, Eyck Jentzsch, HyungKi Jeong, Iztok Jeras,
Pawel Jewstafjew, Alexandre Joannou, James Johnson, Christophe Joly, Justin
Jones, William D. Jones, Abe Jordan, Larry Darryl Lee Jr., Franck Jullien,
James Jung, Mike Kagen, Arthur Kahlich, Kaalia Kahn, Guy-Armand Kamendje,
Vasu Kandadi, Yoshitomo Kaneda, Kanad Kanhere, Patricio Kaplan, Pieter
Kapsenberg, Rafal Kapuscik, Ralf Karge, Per Karlsson, Dan Katz, Sol
Katzman, Ian Kennedy, Ami Keren, Fabian Keßler, Michael Killough, Sun Kim,
Jonathan Kimmitt, Olof Kindgren, Kevin Kiningham, Cameron Kirk, Dan
Kirkham, Aleksander Kiryk, Sobhan Klnv, Gernot Koch, Jack Koenig, Soon Koh,
Nathan Kohagen, Steve Kolecki, Brett Koonce, Will Korteland, Andrei
Kostovski, Wojciech Koszek, Varun Koyyalagunta, Arkadiusz Kozdra, Markus
Krause, David Kravitz, Adam Krolnik, Roland Kruse, Mahesh Kumashikar,
Andreas Kuster, Sergey Kvachonok, Charles Eric LaForest, Kevin Laeufer, Ed
Lander, Steve Lang, Pierre Laroche, Stephane Laurent, Walter Lavino,
Christian Leber, David Ledger, Alex Lee, Larry Lee, Yoda Lee, Michaël
Lefebvre, Dag Lem, Igor Lesik, John Li, Kay Li, Zixi Li, Davide Libenzi,
Nandor Licker, Eivind Liland, Ícaro Lima, Kevin Lin, Yu-Sheng Lin, Charlie
Lind, Andrew Ling, Jiuyang Liu, Joey Liu, Paul Liu, Derek Lockhart, Jake
Longo, Geza Lore, Arthur Low, Jose Loyola, Stefan Ludwig, Dan Lussier,
Konstantin Lübeck, Fred Ma, Liwei Ma, Duraid Madina, Oleh Maksymenko, Affe
Mao, Julien Margetts, Chick Markley, Alexis Marquet, Mark Marshall, Alfonso
Martinez, Unai Martinez-Corral, Adrien Le Masle, Yves Mathieu, Vladimir
Matveyenko, Patrick Maupin, Stan Mayer, Jordan McConnon, Conor McCullough,
Jason McMullan, Elliot Mednick, Yuan Mei, Andy Meier, Luiza de Melo,
Rodrigo A. Melo, Benjamin Menküc, Jake Merdich, David Metz, Wim Michiels,
Gilberto Abram, David Addison, Joey Ah-kiow, Thomas Dybdahl Ahle, Tariq B.
Ahmad, Thomas Aldrian, Omar Alkhatib, Amal Araweelo Almis, Nikana
Anastasiadis, John David Anglin, Frederic Antonin, Hans Van Antwerpen, Vasu
Arasanipalai, Jens Arm, Rohan Arshid, Valentin Atepalikhin, Philip Axer,
Gökçe Aydos, Chris Bachhuber, Filip Badáň, Adam Bagley, Sharad Bagri, James
Bailey, Robert Balas, Marco Balboni, Matthew Ballance, Ricardo Barbedo,
Andrew Bardsley, Ilya Barkov, Matthew Barr, Geoff Barrett, Kaleb Barrett,
Daniel Bates, Julius Baxter, Jeremy Bennett, Michael Berman, Jean
Berniolles, Victor Besyakov, Narayan Bhagavatula, Moinak Bhattacharyya,
Kritik Bhimani, David Biancolin, Krzysztof Bieganski, Artur Bieniek,
Michael Bikovitsky, David Binderman, Piotr Binkowski, Peter Birch, Johan
Björk, David Black, Tymoteusz Blazejczyk, Scott Bleiweiss, Joel Bodenmann,
David van der Bokke, Daniel Bone, Guy Bonneau, Pierre-Yves Le Borgne,
Krzysztof Boroński, Gregg Bouchard, Christopher Boumenot, Paul
Bowen-Huggett, Nick Bowler, Byron Bradley, Bryan Brady, Maarten De
Braekeleer, Liam Braun, Charlie Brej, Nick Brereton, J Briquet, Lane
Brooks, John Brownlee, KC Buckenmaier, Gijs Burghoorn, Jeff Bush, Lawrence
Butcher, Tony Bybell, Congcong Cai, Iru Cai, Ted Campbell, Anthony Campos,
Chris Candler, Lauren Carlson, Gregory Carver, Donal Casey, Sebastien Van
Cauwenberghe, Alex Chadwick, Greg Chadwick, Marcel Chang, Aliaksei
Chapyzhenka, Chih-Mao Chen, Guokai Chen, Kefa Chen, Terry Chen, Yangyu
Chen, Yi-Chung Chen, Yurii Cherkasov, Hennadii Chernyshchyk, Enzo Chi,
Bartłomiej Chmiel, Sergey Chusov, Robert A. Clark, Ryan Clarke, Allan
Cochrane, John Coiner, Luca Colagrande, Keith Colbert, Quentin Corradi,
Nassim Corteggiani, Gianfranco Costamagna, February Cozzocrea, Sean Cross,
George Cuan, RJ Cunningham, Michal Czyz, Joe DErrico, Jim Dai, Lukasz
Dalek, Laurens van Dam, Gunter Dannoritzer, Ashutosh Das, Julian Daube,
Greg Davill, Bernard Deadman, Peter Debacker, Josse Van Delm, John Demme,
Mike Denio, John Deroo, Philip Derrick, Aadi Desai, John Dickol, Ruben
Diez, Danny Ding, Jacko Dirks, Ivan Djordjevic, Brad Dobbie, Paul Donahue,
Jonathon Donaldson, Anthony Donlon, Caleb Donovick, Larry Doolittle,
Leendert van Doorn, Sebastian Dressler, Connor Driscoll, Jonathan Drolet,
Jose Drowne, Justin Yao Du, Maciej Dudek, Alex Duller, Jeff Dutton, Tomas
Dzetkulic, Usuario Eda, Charles Eddleston, Chandan Egbert, Joe Eiler, Ahmed
El-Mahmoudy, Trevor Elbourne, Schuyler Eldridge, Ahmed Elzeftawi, Mats
Engstrom, Augustin Fabre, Robert Farrell, Julien Faucher, Olivier Faure,
Sergey Fedorov, Eugene Feinberg, Eugen Fekete, Fabrizio Ferrandi, Adrian
Fiergolski, Udi Finkelstein, Brian Flachs, Bill Flynn, Andrea Foletto,
Maxim Fonarev, Alex Forencich, Aurelien Francillon, Marco Frank, Bob
Fredieu, Manuel Freiberger, Stephane Gagnon, Duane Galbi, Mostafa Gamal,
Vito Gamberini, Mateusz Gancarz, Mostafa Garnal, Benjamin Gartner,
Christian Gelinek, Richard E George, Peter Gerst, Glen Gibb, Michael
Gielda, Barbara Gigerl, Nimrod Gileadi, Shankar Giri, Dan Gisselquist,
Szymon Gizler, Petr Gladkikh, Sam Gladstone, Mariusz Glebocki, Embedded Go,
Andrew Goessling, Emil Goh, Amir Gonnen, Chitlesh Goorah, Tomasz
Gorochowik, Kai Gossner, Toshiki Goto, Tarik Graba, Sergi Granell, Al
Grant, Nathan Graybeal, Alexander Grobman, Dominick Grochowina, Qian Gu,
Karol Gugala, Xuan Guo, Prabhat Gupta, Oscar Gustafsson, Deniz Güzel, Driss
Hafdi, Abdul Hameed, Neil Hamilton, Ali Hammoud, James Hanlon, Tang Haojin,
Øyvind Harboe, Jannis Harder, David Harris, Junji Hashimoto, Thomas
Hawkins, Mitch Hayenga, Christian Hecken, Harald Heckmann, Robin Heinemann,
Robert Henry, Stephen Henry, Sebastian Hesselbarth, David Hewson, Jamey
Hicks, Joel Holdsworth, Andrew Holme, Peter Holmes, Hiroki Honda, Steve
Hoover, Alex Hornung, Pierre-Henri Horrein, David Horton, Peter Horvath,
Jae Hossell, Kuoping Hsu, Shou-Li Hsu, Teng Huang, Steven Hugg, Alan
Hunter, James Hutchinson, Tim Hutt, Ehab Ibrahim, Edgar E. Iglesias, Shahid
Ikram, Jamie Iles, Ondrej Ille, Ron K. Irvine, Fuad Ismail, Vighnesh Iyer,
Ben Jackson, Daniel Jacques, Shareef Jalloq, Marlon James, Krzysztof
Jankowski, Moubarak Jeje, Tobias Jensen, Eyck Jentzsch, HyungKi Jeong,
Iztok Jeras, Pawel Jewstafjew, Aditya Ranjan Jha, Xie Jiacheng, Alexandre
Joannou, James Johnson, Christophe Joly, Justin Jones, William D. Jones,
Kees Jongenburger, Abe Jordan, Larry Darryl Lee Jr., Franck Jullien, James
Jung, Yoshitomo KANEDA, Mike Kagen, Arthur Kahlich, Kaalia Kahn, G-A.
Kamendje, Guy-Armand Kamendje, Vasu Kandadi, Kanad Kanhere, Patricio
Kaplan, Pieter Kapsenberg, Rafal Kapuscik, Ralf Karge, Per Karlsson, Dan
Katz, Sol Katzman, Amirreza Kazemi, Ian Kennedy, Ami Keren, Fabian
Keßler-Schulz, John Khoo, Michael Killough, Sun Kim, Jonathan Kimmitt, Olof
Kindgren, Kevin Kiningham, Cameron Kirk, Dan Kirkham, Aleksander Kiryk,
Sobhan Klnv, Gernot Koch, Jack Koenig, Soon Koh, Nathan Kohagen, Pawel
Kojma, Steve Kolecki, Brett Koonce, Will Korteland, Andrei Kostovski,
Wojciech Koszek, Varun Koyyalagunta, Arkadiusz Kozdra, Markus Krause, David
Kravitz, Natan Kreimer, Adam Krolnik, Roland Kruse, Jan Kubalek, Mahesh
Kumashikar, Andreas Kuster, Sergey Kvachonok, Charles Eric LaForest, Kevin
Laeufer, Ed Lander, Steve Lang, Pierre Laroche, Stephane Laurent, Walter
Lavino, Christian Leber, David Ledger, Alex Lee, Larry Lee, Yoda Lee,
Michaël Lefebvre, Dag Lem, Igor Lesik, Brian Li, John Li, Kay Li, Zixi Li,
Davide Libenzi, Matt Liberty, Nandor Licker, Eivind Liland, Ícaro Lima,
Jian Nan Lin, Kevin Lin, Yu-Sheng Lin, Charlie Lind, Andrew Ling, Jens
Yuechao Liu, Jiuyang Liu, Joey Liu, Paul Liu, Derek Lockhart, Jake Longo,
Geza Lore, Arthur Low, Jose Loyola, Stefan Ludwig, Martin Lueker-Boden, Dan
Lussier, Konstantin Lübeck, Fred Ma, Liwei Ma, Duraid Madina, Oleh
Maksymenko, Alexander Mann, Affe Mao, Rémi Marche, Julien Margetts, Chick
Markley, Alexis Marquet, Mark Marshall, Alfonso Martinez, Unai
Martinez-Corral, Adrien Le Masle, Yves Mathieu, Vladimir Matveyenko,
Patrick Maupin, Stan Mayer, Jordan McConnon, Conor McCullough, Jason
McMullan, Elliot Mednick, Yuan Mei, Andy Meier, Luiza de Melo, Rodrigo A.
Melo, Benjamin Menküc, Niraj Menon, Jake Merdich, David Metz, Wim Michiels,
Miodrag Milanović, Darryl Miles, Kevin Millis, Andrew Miloradovsky, David
Moberg, Wai Sum Mong, Peter Monsson, Anthony Moore, Sean Moore, Stuart
Morris, Dennis Muhlestein, John Murphy, Matt Myers, Nathan Myers, Richard
Myers, Alex Mykyta, Eric Müller, Dimitris Nalbantis, Peter Nelson, Felix
Neumärker, Bob Newgard, Cong Van Nguyen, Rachit Nigam, Toru Niina, Paul
Nitza, Yossi Nivin, Pete Nixon, Lisa Noack, Mark Nodine, Michael Nolan,
Andrew Nolte, Joseph Nwabueze, Kevin Nygaard, Kuba Ober, Krzysztof
Obłonczek, Andreas Olofsson, Baltazar Ortiz, Aleksander Osman, Don Owen,
Tim Paine, Deepa Palaniappan, James Pallister, Vassilis Papaefstathiou,
Sanggyu Park, Brad Parker, Risto Pejašinović, Seth Pellegrino, Morten Borup
Petersen, Dan Petrisko, Wesley Piard, Maciej Piechotka, David Pierce, Cody
Piersall, T. Platz, Michael Platzer, Dominic Plunkett, Nolan Poe, David
Poole, Michael Popoloski, Roman Popov, Aylon Chaim Porat, Oron Port, Rich
Porter, Rick Porter, Stefan Post, Niranjan Prabhu, Damien Pretet, Harald
Pretl, Bill Pringlemeir, Usha Priyadharshini, Mark Jackson Pulver, Prateek
Puri, Han Qi, Jiacheng Qian, Marshal Qiao, Raynard Qiao, Yujia Qiao, Jasen
Qin, Frank Qiu, Nandu Raj, Kamil Rakoczy, Danilo Ramos, Drew Ranck, Chris
Randall, Anton Rapp, Josh Redford, Odd Magne Reitan, Frédéric Requin,
Dustin Richmond, Samuel Riedel, Alberto Del Rio, Eric Rippey, Narcis Rodas,
Oleg Rodionov, Ludwig Rogiers, Paul Rolfe, Michail Rontionov, Arjen
Roodselaar, Arthur Rosa, Tobias Rosenkranz, Yernagula Roshit, Ryszard
Rozak, Huang Rui, Graham Rushton, Jan Egil Ruud, Denis Rystsov, Pawel
Sagan, Robert Sammelson, Adrian Sampson, John Sanguinetti, Josep Sans, Luca
Sasselli, Martin Scharrer, Martin Schmidt, Jonathan Schröter, Julie
Moberg, Wai Sum Mong, Peter Monsson, Anthony Moore, Sean Moore, Javier
Mora, Rodrigo Batista de Moraes, Stuart Morris, Dennis Muhlestein, John
Murphy, Matt Myers, Nathan Myers, Richard Myers, Alex Mykyta, Shivaram
Mysore, Eric Müller, Dimitris Nalbantis, Jitesh Nayak, Peter Nelson, Yuri
Nenakhov, Felix Neumärker, Bob Newgard, Cong Van Nguyen, Trung Nguyen,
Rachit Nigam, Toru Niina, Paul Nitza, Yossi Nivin, Pete Nixon, Lisa Noack,
Mark Nodine, Petr Nohavica, Michael Nolan, Andrew Nolte, Mateusz
Nurczyński, Joseph Nwabueze, Kevin Nygaard, Thomas O'Keeffe, Kuba Ober,
Krzysztof Obłonczek, Danny Oler, Andreas Olofsson, Baltazar Ortiz,
Aleksander Osman, Don Owen, Tim Paine, Deepa Palaniappan, James Pallister,
Vassilis Papaefstathiou, Sanggyu Park, Brad Parker, Risto Pejašinović, Seth
Pellegrino, Joel Peltonen, Morten Borup Petersen, Dan Petrisko, Thanh Tung
Pham, Wesley Piard, Maciej Piechotka, David Pierce, Cody Piersall,
T. Platz, Michael Platzer, Dominic Plunkett, Nolan Poe, Tuomas Poikela,
George Polack, David Poole, Michael Popoloski, Roman Popov, Aylon Chaim
Porat, Oron Port, Rich Porter, Rick Porter, Stefan Post, Niranjan Prabhu,
Damien Pretet, Harald Pretl, Bill Pringlemeir, Usha Priyadharshini, Mark
Jackson Pulver, Prateek Puri, Nikolay Puzanov, Han Qi, Jiacheng Qian,
Marshal Qiao, Raynard Qiao, Yujia Qiao, Jasen Qin, Frank Qiu, Nandu Raj,
Kamil Rakoczy, Danilo Ramos, Drew Ranck, Chris Randall, Anton Rapp, Josh
Redford, Odd Magne Reitan, Frédéric Requin, Wajahat Riaz, Dustin Richmond,
Samuel Riedel, Alberto Del Rio, Eric Rippey, Narcis Rodas, Oleg Rodionov,
Ludwig Rogiers, Paul Rolfe, Michail Rontionov, Arjen Roodselaar, Arthur
Rosa, Tobias Rosenkranz, Yernagula Roshit, Diego Roux, Ryszard Rozak, Dan
Ruelas-Petrisko, Luca Rufer, Huang Rui, Graham Rushton, Jan Egil Ruud,
Denis Rystsov, Pawel Sagan, Robert Sammelson, Adrian Sampson, John
Sanguinetti, Josep Sans, Dave Sargeant, Luca Sasselli, Philippe Sauter,
Martin Scharrer, Parker Schless, Martin Schmidt, Jonathan Schröter, Julie
Schwartz, Galen Seitz, Sam Shahrestani, Joseph Shaker, Mark Shaw, Salman
Sheikh, Zhou Shen, Hao Shi, James Shi, Michael Shinkarovsky, Rafael
Shirakawa, Jeffrey Short, S Shuba, Fan Shupei, Ethan Sifferman, Anderson
Ignacio da Silva, Rodney Sinclair, Ameya Vikram Singh, Sanjay Singh, Frans
Skarman, Nate Slager, Steven Slatter, Mladen Slijepcevic, Brian Small,
Garrett Smith, Gus Smith, Tim Snyder, Maciej Sobkowski, Stan Sokorac, Alex
Solomatnikov, Flavien Solt, Wei Song, Trefor Southwell, Martin Stadler, Art
Stamness, David Stanford, Krzysztof Starecki, Baruch Sterin, John
Stevenson, Pete Stevenson, Patrick Stewart, Rob Stoddard, Tood Strader,
John Stroebel, Ray Strouble, Sven Stucki, Howard Su, Udaya Raj Subedi,
Emerson Suguimoto, Gene Sullivan, Qingyao Sun, Renga Sundararajan, Kuba
Sheikh, Zhou Shen, Zhouyi Shen, Hao Shi, James Shi, Michael Shinkarovsky,
Rafael Shirakawa, Jeffrey Short, S Shuba, Fan Shupei, Ethan Sifferman,
Anderson Ignacio da Silva, Rodney Sinclair, Ameya Vikram Singh, Sanjay
Singh, Frans Skarman, Nate Slager, Steven Slatter, Mladen Slijepcevic,
Brian Small, Garrett Smith, Gus Smith, Rachel Smith, Tim Snyder, Maciej
Sobkowski, Stan Sokorac, Alex Solomatnikov, Flavien Solt, Wei Song, Trefor
Southwell, Martin Stadler, Art Stamness, David Stanford, Krzysztof
Starecki, Baruch Sterin, John Stevenson, Pete Stevenson, Patrick Stewart,
Rob Stoddard, Tood Strader, Jean-Nicolas Strauss, John Stroebel, Ray
Strouble, Matt Stroud, Sven Stucki, Howard Su, Udaya Raj Subedi, Emerson
Suguimoto, Gene Sullivan, Qingyao Sun, Renga Sundararajan, Kuba
Sunderland-Ober, Gustav Svensk, Rupert Swarbrick, Jevin Sweval, Paul
Swirhun, Shinya T-Y, Thierry Tambe, Jesse Taube, Drew Taussig, Christopher
Taylor, Greg Taylor, Jose Tejada, Sören Tempel, Peter Tengstrand, Wesley
Swirhun, Krzysztof Sychla, Shinya T-Y, Yutetsu Takatsukasa, Thierry Tambe,
Jesse Taube, Drew Taussig, Christopher Taylor, David Taylor, Greg Taylor,
Michael Bedford Taylor, Jose Tejada, Sören Tempel, Peter Tengstrand, Wesley
Terpstra, Rui Terra, Stefan Thiede, Justin Thiel, Gary Thomas, Ian
Thompson, Kevin Thompson, Mike Thyer, Hans Tichelaar, Tudor Timi, Viktor
Tomov, Steve Tong, Topa Topino, Àlex Torregrosa, Topa Tota, Michael
Tresidder, Lenny Truong, David Turner, Neil Turton, Hideto Ueno, Mike
Urbach, Joel Vandergriendt, Srini Vemuri, Srinivasan Venkataramanan, Yuri
Victorovich, Ivan Vnučec, Bogdan Vukobratovic, Holger Waechtler, Philipp
Wagner, Stefan Wallentowitz, Johannes Walter, CY Wang, Chuxuan Wang, Shawn
Wang, Yilou Wang, Zhanglei Wang, Greg Waters, Thomas Watts, Eugene Weber,
John Wehle, Tianrui Wei, David Welch, Thomas J Whatson, Martin Whitaker,
Marco Widmer, Leon Wildman, Daniel S. Wilkerson, Daniel Wilkerson, Gerald
Williams, Trevor Williams, Don Williamson, Jan Van Winkel, Jeff Winston,
Joshua Wise, Clifford Wolf, Johan Wouters, Paul Wright, Tobias Wölfel,
Junyi Xi, Ding Xiaoliang, Liu Xiaoyi, Jinyan Xu, Mandy Xu, Pengcheng Xu,
Shanshan Xu, Yan Xu, Yinan Xu, SU YANG, Felix Yan, Jiaxun Yang, Luke Yang,
Amir Yazdanbakhsh, Chentai (Seven) Yuan, Florian Zaruba, Mat Zeno, Keyi
Zhang, Xi Zhang, Huanghuang Zhou, Yike Zhou, Jiamin Zhu, Ryan Ziegler.
Thompson, Kevin Thompson, Mike Thyer, Jerry Tianchen, Hans Tichelaar, Tudor
Timi, Viktor Tomov, Steve Tong, Topa Topino, Àlex Torregrosa, Topa Tota,
Michael Tresidder, Lenny Truong, David Turner, Neil Turton, Hideto Ueno,
Ethan Uppal, Mike Urbach, Joel Vandergriendt, Srini Vemuri, Srinivasan
Venkataramanan, Yuri Victorovich, Ivan Vnučec, Andrew Voznytsa, Bogdan
Vukobratovic, Holger Waechtler, Justin Wagner, Philipp Wagner, Stefan
Wallentowitz, Johannes Walter, CY Wang, Chuxuan Wang, Shawn Wang, Yilou
Wang, Zhanglei Wang, Jakub Wasilewski, Paul Wasson, Greg Waters, Thomas
Watts, Eugene Weber, John Wehle, Tianrui Wei, Yin Weijie, David Welch,
Thomas J Whatson, Martin Whitaker, Marco Widmer, Leon Wildman, Daniel S.
Wilkerson, Daniel Wilkerson, Gerald Williams, Trevor Williams, Don
Williamson, Jan Van Winkel, Jeff Winston, Max Wipfli, Joshua Wise, Clifford
Wolf, Johan Wouters, Paul Wright, Tobias Wölfel, Domenic Wüthrich, Junyi
Xi, Ding Xiaoliang, Liu Xiaoyi, Jie Xu, Jinyan Xu, Mandy Xu, Pengcheng Xu,
Shanshan Xu, Yan Xu, Yinan Xu, Felix Yan, Zhen Yan, Jiaxun Yang, Luke Yang,
Su Yang, Amir Yazdanbakhsh, Law Heng Yi, Ibrahim Burak Yorulmaz, Chentai
(Seven) Yuan, Florian Zaruba, Igor Zaworski, Mat Zeno, Keyi Zhang, Xi
Zhang, Alex Zhou, Huanghuang Zhou, Yike Zhou, Jiamin Zhu, Ryan Ziegler, Lan
Zongwei.
Thanks to them, and all those we've missed mentioning above, and to those
whom have wished to remain anonymous.
@@ -177,24 +203,24 @@ Historical Origins
==================
Verilator was conceived in 1994 by Paul Wasson at the Core Logic Group at
Digital Equipment Corporation. The Verilog code that was converted to C
was then merged with a C-based CPU model of the Alpha processor and
simulated in a C-based environment called CCLI.
Digital Equipment Corporation. The Verilog code that was converted to C was
then merged with a C-based CPU model of the Alpha processor and simulated
in a C-based environment called CCLI.
In 1995 Verilator started being used for Multimedia and Network Processor
development inside Digital. Duane Galbi took over the active development
of Verilator, and added several performance enhancements, and CCLI was
still being used as the shell.
development inside Digital. Duane Galbi took over the active development of
Verilator, and added several performance enhancements, and CCLI was still
being used as the shell.
In 1998, through the efforts of existing DECies, mainly Duane Galbi,
Digital graciously agreed to release the source code. (Subject to the code
Digital graciously agreed to release the source code. (Subject to the code
not being resold, which is compatible with the GNU Public License.)
In 2001, Wilson Snyder took the kit, added a SystemC mode, and called
it Verilator2. This was the first packaged public release.
In 2001, Wilson Snyder took the kit, added a SystemC mode, and called it
Verilator2. This was the first packaged public release.
In 2002, Wilson Snyder created Verilator 3.000 by rewriting Verilator from
scratch in C++. This added many optimizations, yielding about a 2-5x
scratch in C++. This added many optimizations, yielding about a 2-5x
performance gain.
In 2009, major SystemVerilog and DPI language support was added.
+348
View File
@@ -0,0 +1,348 @@
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
.. _verilator control files:
=======================
Verilator Control Files
=======================
In addition to the command line, warnings and other features for the
:command:`verilator` command may be controlled with Verilator Control
Files, not to be confused with IEEE Configurations blocks
(`config...endconfig`). Typically named with the `.vlt` extension, what
makes it a Verilator Control File is the :option:`\`verilator_config`
directive. These files, when named `.vlt`, are read before source code
files; if this behavior is undesired, name the control file with a `.v` or
other suffix.
An example:
.. code-block:: sv
`verilator_config
lint_off -rule WIDTH
lint_off -rule CASEX -file "silly_vendor_code.v"
This disables WIDTH warnings globally, and CASEX for a specific file.
Verilator control files are fed through the normal Verilog preprocessor
prior to parsing, so "\`ifdef", "\`define", and comments may be used as if
the control file was standard Verilog code.
Note that file or line-specific control only applies to files read after
the control file. It is therefore recommended to pass the control file to
Verilator as the first file.
The grammar of control commands is as follows:
.. option:: `verilator_config
Take the remaining text and treat it as Verilator Control File commands.
See :ref:`Verilator Control Files`.
.. option:: clock_enable -module "<modulename>" -var "<signame>"
Deprecated and has no effect (ignored).
In versions before 5.000:
Indicates that the signal is used to gate a clock, and the user takes
responsibility for ensuring there are no races related to it.
Same as :option:`/*verilator&32;clock_enable*/` metacomment.
.. t_dist_docs_style ignore no_clocker
.. option:: clocker -module "<modulename>" [-function "<funcname>"] -var "<signame>"
.. option:: clocker -module "<modulename>" [-task "<taskname>"] -var "<signame>"
.. option:: no_clocker -module "<modulename>" [-function "<funcname>"] -var "<signame>"
.. option:: no_clocker -module "<modulename>" [-task "<taskname>"] -var "<signame>"
Deprecated and has no effect (ignored).
In versions before 5.042:
Indicates whether the signal is used as clock or not. Verilator uses
this information to mark the signal and any derived signals as clocker.
See :vlopt:`--clk`.
Same as :option:`/*verilator&32;clocker*/` metacomment.
.. option:: coverage_block_off -file "<filename>" -line <lineno>
.. option:: coverage_block_off -module "<modulename>" -block "<blockname>"
Specifies the entire begin/end block should be ignored for coverage
analysis purposes. It can either be specified as a named block or as a
filename and line number.
Same as :option:`/*verilator&32;coverage_block_off*/` metacomment.
.. option:: coverage_off [-file "<filename>" [-lines <line> [ - <line> ]]]
.. option:: coverage_on [-file "<filename>" [-lines <line> [ - <line> ]]]
Enable/disable coverage for the specified filename (or wildcard with
'\*' or '?', or all files if omitted) and range of line numbers (or all
lines if omitted). Often used to ignore an entire module for coverage
analysis purposes.
.. option:: forceable -module "<modulename>" -var "<signame>"
Generate public `<signame>__VforceEn` and `<signame>__VforceVal` signals
that can force/release a signal from C++ code. The force control
signals are created as :option:`public_flat` signals.
Same as :option:`/*verilator&32;forceable*/` metacomment.
.. option:: full_case -file "<filename>" -lines <lineno>
Same as ``//synthesis full_case``. When these synthesis directives
are discovered, Verilator will either formally prove the directive to be
true, or, failing that, will insert the appropriate code to detect
failing cases at simulation runtime and print an "Assertion failed"
error message.
.. option:: hier_block -module "<modulename>"
Specifies that the module is an unit of hierarchical Verilation. Note
that the setting is ignored unless the :vlopt:`--hierarchical` option is
specified. See :ref:`Hierarchical Verilation`.
.. option:: hier_params -module "<modulename>"
Specifies that the module contains parameters a :vlopt:`--hierarchical` block. This option
is used internally to specify parameters for deparametrized hier block instances.
This option should not be used directly.
See :ref:`Hierarchical Verilation`.
.. option:: hier_workers -hier-dpi "<function_name>" -workers <worker_count>
Specifies how many threads need to be used for scheduling hierarchical DPI
tasks. This data is inserted internally during :vlopt:`--hierarchical`,
based on value specified in `hier_workers -module`. This option
should not be used directly. See :ref:`Hierarchical Verilation`.
.. option:: hier_workers -module "<module_name>" -workers <worker_count>
Specifies how many threads need to be used for scheduling given module with
:option:`/*verilator&32;hier_block*/` metacomment. This number needs to be
smaller than :vlopt:`--threads` to fit in a thread schedule.
See :ref:`Hierarchical Verilation`.
.. option:: inline -module "<modulename>"
Specifies the module may be inlined into any modules that use this
module. Same as :option:`/*verilator&32;inline_module*/` metacomment.
.. t_dist_docs_style ignore no_inline
.. option:: no_inline -module "<modulename>"
Specifies the module should not be inlined into any modules that use
this module. Same as :option:`/*verilator&32;no_inline_module*/`
metacomment.
.. option:: no_inline [-module "<modulename>"] -function "<funcname>"
.. option:: no_inline [-module "<modulename>"] -task "<taskname>"
Specify the function or task should not be inlined into where it is
used. This may reduce the size of the final executable when a task is
used a very large number of times. For this flag to work, the task and
tasks below it must be pure; they cannot reference any variables outside
the task itself.
Same as :option:`/*verilator&32;no_inline_task*/` metacomment.
.. option:: isolate_assignments -module "<modulename>" -function "<fname>"
.. option:: isolate_assignments -module "<modulename>" [-function "<funcname>"] -var "<signame>"
.. option:: isolate_assignments -module "<modulename>" [-task "<taskname>"] -var "<signame>"
Used to indicate that the assignments to this signal in any blocks
should be isolated into new blocks. Same as
:option:`/*verilator&32;isolate_assignments*/` metacomment.
.. option:: lint_off [-rule <message>] [-file "<filename>" [-lines <line> [ - <line>]]]
.. option:: lint_off [-rule <message>] [-file "<filename>"] [-contents "<wildcard>"] [-match "<wildcard>"]
.. option:: lint_on [-rule <message>] [-file "<filename>" [-lines <line> [ - <line>]]]
Enable/disables the specified lint warning, in the specified filename
(or wildcard with '\*' or '?', or all files if omitted) and range of
line numbers (or all lines if omitted).
If the ``-rule`` is omitted, all lint warnings (see list in
:vlopt:`-Wno-lint`) are enabled/disabled.
If ``-contents`` is provided, the input files must contain the given
wildcard (with '\*' or '?'), and are waived in case they match, provided
the ``-rule``, ``-file``, and ``-contents`` also match. The wildcard
should be designed to match a single line; it is unspecified if the
wildcard is allowed to match across multiple lines. The input contents
does not include :vlopt:`--std <--no-std>` standard files, nor control
files (with ``verilator_config``). Typical use for this is to match a
version number present in the Verilog sources, so that the waiver will
only apply to that version of the sources.
If ``-match`` is provided, the linter warnings are matched against the
given wildcard (with '\*' or '?'), and are waived in case they match,
provided the ``-rule``, ``-file``, and ``-contents`` also match. The
wildcard is compared across the entire multi-line message; see
:vlopt:`--waiver-multiline`.
When there are overlapping conflicting lint_on/lint_off directives, they
are resolved in the following priority order:
* All lint_on/lint_off without a ``-file``, or with a ``-file "\*"``,
are processed in order of parsing.
* All lint_on/lint_off with ``-file "non-\*"`` are processed in order of
parsing.
* All lint_off with ``--match`` in order of parsing.
If a warning is disabled with lint_off, it will not be printed, even if
the source contains a lint_on metacomment. The control file directives
and metacomments are interpreted separately and do not interact. A
warning is emitted only if not disabled either in a control file or via
metacomments.
Before version 4.026, ``-rule`` was named ``-msg``, and
``-msg`` remained a deprecated alias until Version 5.000.
.. option:: parallel_case -file "<filename>" -lines <lineno>
Same as ``//synthesis parallel_case``. When these synthesis
directives are discovered, Verilator will either formally prove the
directive to be true, or, failing that, will insert the appropriate code
to detect failing cases at simulation runtime and print an "Assertion
failed" error message.
.. option:: profile_data -hier-dpi "<function_name>" -cost <cost_value>
Internal profiling data inserted during :vlopt:`--hierarchical`; specifies
execution cost of a hierarchical DPI wrappers for modules with
:option:`/*verilator&32;hier_block*/` metacomment. See
:ref:`Hierarchical Verilation`.
.. option:: profile_data -mtask "<mtask_hash>" -cost <cost_value>
Feeds profile-guided optimization data into the Verilator algorithms in
order to improve model runtime performance. This option is not expected
to be used by users directly. See :ref:`Thread PGO`.
.. option:: public [-module "<modulename>"] [-task/-function "<taskname>"] [-var "<signame>"]
.. option:: public_flat [-module "<modulename>"] [-task/-function "<taskname>"] [(-param | -port | -var) "<signame>"]
.. option:: public_flat_rd [-module "<modulename>"] [-task/-function "<taskname>"] [(-param | -port | -var) "<signame>"]
.. option:: public_flat_rw [-module "<modulename>"] [-task/-function "<taskname>"] [(-param | -port | -var) "<signame>"] ["@(edge)"]
Sets the specified signal to be public. Same as
:option:`/*verilator&32;public*/` or
:option:`/*verilator&32;public_flat*/`, etc., metacomments. See also
:ref:`VPI Example`.
Using ``-port`` only selects matching ports, ``-param`` matches
parameters and localparams, and ``-var`` matches any signal (including
ports, parameters, and regular variables or nets). In all three, the
following ``<signame>`` can contain ``*`` and ``?`` wildcard
characters that match any substring or any single character respectively.
.. option:: sc_biguint -module "<modulename>" -var "<signame>"
Sets the input/output signal to be of ``sc_biguint<{width}>`` type.
This metacomment works for signals of any width.
Same as :option:`/*verilator&32;sc_biguint*/` metacomment.
.. option:: sc_bv -module "<modulename>" -var "<signame>"
Sets the port to be of ``sc_bv<{width}>`` type, instead of bool,
uint32_t, or uint64_t. Same as :option:`/*verilator&32;sc_bv*/`
metacomment.
.. option:: sformat [-module "<modulename>"] [-function "<funcname>"] -var "<signame>"
.. option:: sformat [-module "<modulename>"] [-task "<taskname>"] -var "<signame>"
Must be applied to the final argument of type ``input string`` of a
function or task to indicate that the function or task should pass all
remaining arguments through $sformatf. This allows the creation of DPI
functions with $display-like behavior. See the
:file:`test_regress/t/t_dpi_display.v` file for an example.
Same as :option:`/*verilator&32;sformat*/` metacomment.
.. option:: split_var [-module "<modulename>"] [-function "<funcname>"] -var "<varname>"
.. option:: split_var [-module "<modulename>"] [-task "<taskname>"] -var "<varname>"
Break the variable into multiple pieces typically to resolve UNOPTFLAT
performance issues. Typically the variables to attach this to are
recommended by Verilator itself; see :option:`UNOPTFLAT`.
Same as :option:`/*verilator&32;split_var*/` metacomment.
.. option:: timing_off [-file "<filename>" [-lines <line> [ - <line>]]]
.. option:: timing_on [-file "<filename>" [-lines <line> [ - <line>]]]
Enables/disables timing constructs for the specified file and lines.
When disabled, all timing control constructs in the specified source
code locations are ignored the same way as with the
:option:`--no-timing`, and code:`fork`/``join*`` blocks are
converted into ``begin``/``end`` blocks.
Similar to :option:`/*verilator&32;timing_on*/`,
:option:`/*verilator&32;timing_off*/` meta-comments, but interpreted
independently. If either a control file, or meta-comments disable timing
constructs, they will be disabled.
.. t_dist_docs_style ignore tracing_on
.. option:: tracing_off [-file "<filename>" [-lines <line> [ - <line> ]]]
.. option:: tracing_on [-file "<filename>" [-lines <line> [ - <line> ]]]
.. option:: tracing_off [-scope "<scopename>" [-levels <levels> ]]
.. option:: tracing_on [-scope "<scopename>" [-levels <levels> ]]
Enable/disable waveform tracing for all future signals declared in
all files.
With ``-file``, enable/disable waveform tracing in the specified
filename (or wildcard with '\*' or '?'), and ``-line`` range of line
numbers (or all lines if omitted).
For tracing_off with ``-file``, instances below any module in the
files/ranges specified will also not be traced. To overcome this
feature, use tracing_on on the upper module declaration and on any
cells, or use the ``-scope`` flavor of the command.
With ``-scope`` enable/disable waveform tracing for the specified scope
(or wildcard with '\*' or '?'), and optional ``--levels`` number of
levels below. These controls only operate after other
file/line/module-based controls have indicated the signal should be
traced. Matching is performed on the shortest prefix first, such that
``tracing_on -scope "a.b" tracing_off -scope "a"`` will turn it on for
"a.b" and off for everything else "a.*".
With ``-levels`` (used with ``-scope``), the number of levels below that
scope which the rule is to match, where 0 means all levels below, 1 the
exact level as the provided scope, and 2 means an additional level of
children below the provided scope, etc.
.. option:: verilator_lib -module "<modulename>"
Internal use only. Marks the specified module as being a stub for a library
created by :vlopt:`--lib-create` (including when created with
:vlopt:`--hierarchical`). Required for special internal processing.
+3 -4
View File
@@ -1,14 +1,13 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
*********
Copyright
*********
The latest version of Verilator is available from `https://verilator.org
<https://verilator.org>`_.
The latest version of Verilator is available from https://verilator.org.
Copyright 2003-2025 by Wilson Snyder. This program is free software; you
Copyright 2003-2026 by Wilson Snyder. Verilator 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.
+20 -17
View File
@@ -1,4 +1,4 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
Deprecations
@@ -7,22 +7,25 @@ Deprecations
The following deprecated items are scheduled for future removal:
C++14 compiler support
Verilator currently requires a C++20 or newer compiler for timing, and a
C++14 or newer compiler for both compiling Verilator and compiling
Verilated models with --no-timing.
Verilator currently requires a C++20 or newer compiler for timing, and a
C++14 or newer compiler for both compiling Verilator and compiling
Verilated models with --no-timing.
Verilator will require C++20 or newer compilers for both compiling
Verilator and compiling all Verilated models no sooner than May 2025.
(Likely to be removed shortly after GitHub removes Ubuntu 20.04
continuous-integration action runners, which are used to test the older
C++ standard).
Verilator will require C++20 or newer compilers for both compiling
Verilator and compiling all Verilated models no sooner than May 2025.
(Although this date has expired, this change is currently on hold until
the Ubuntu LTS versions of GCC and clang use C++20 by default, estimated
May 2028.)
XML output
Verilator currently supports XML parser output (enabled with `--xml-only`).
Support for `--xml-*` options will be deprecated no sooner than January 2026.
`--structs-packed` option
The :vlopt:`--structs-packed` option was introduced when Verilator was
first implementing unpacked structs. That feature has been stable now
for multiple years, so :vlopt:`--structs-packed` should no longer be
used. Thus :vlopt:`--structs-packed` will change to a no-operation flag
and the related :option:`UNPACKED` warning will never be issued no
sooner than September 2026.
--make cmake
The `--make cmake` options is deprecated and will be removed no sooner than
January 2026. Use `--make json` instead. Note that the CMake integration
shipping with Verilator (verilator-config.mk) already uses `--make json` so
no changes are necessary if using that.
tcmalloc support
Verilator currently supports the default malloc, tcmalloc, or jemalloc.
As jemalloc has better performance, support for tcmalloc may be removed
no sooner than January 2027.
+50 -32
View File
@@ -1,6 +1,8 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
.. _Environment:
Environment
===========
@@ -10,14 +12,14 @@ associated programs.
.. option:: LD_LIBRARY_PATH
A generic Linux/OS variable specifying what directories have shared
object (.so) files. This path should include SystemC and other
shared objects needed at simulation runtime.
object (.so) files. This path should include SystemC and other shared
objects needed at simulation runtime.
.. option:: MAKE
Names the executable of the make command invoked when using the
:vlopt:`--build` option. Some operating systems may require "gmake" to
this variable to launch GNU make. If this variable is not specified,
:vlopt:`--build` option. Some operating systems may require "gmake" to
this variable to launch GNU make. If this variable is not specified,
"make" is used.
.. option:: MAKEFLAGS
@@ -29,33 +31,33 @@ associated programs.
.. option:: OBJCACHE
Optionally specifies a caching or distribution program to place in front
of all runs of the C++ compiler. For example, "ccache" or "sccache". If using
:command:`distcc` or :command:`icecc`/:command:`icecream`, they would
generally be run under :command:`ccache`; see the documentation for
those programs. If OBJCACHE is not set, and at configure time ccache
of all runs of the C++ compiler. For example, "ccache" or "sccache". If
using :command:`distcc` or :command:`icecc`/:command:`icecream`, they
would generally be run under :command:`ccache`; see the documentation
for those programs. If OBJCACHE is not set, and at configure time ccache
was present, ccache will be used as a default.
.. option:: SYSTEMC
Deprecated. Used only if :option:`SYSTEMC_INCLUDE` or
:option:`SYSTEMC_LIBDIR` is not set. If set, specifies the directory
containing the SystemC distribution. If not specified, it will come
from a default optionally specified at configure time (before Verilator
was compiled).
Deprecated. Used only if :option:`SYSTEMC_INCLUDE` or
:option:`SYSTEMC_LIBDIR` is not set. If set, specifies the directory
containing the SystemC distribution. If not specified, it will come from
a default optionally specified at configure time (before Verilator was
compiled).
.. option:: SYSTEMC_ARCH
Deprecated. Used only if :option:`SYSTEMC_LIBDIR` is not set.
Specifies the architecture name used by the SystemC kit. This is the
part after the dash in the "lib-{...}" directory name created by a
:command:`make` in the SystemC distribution. If not set, Verilator will
try to intuit the proper setting, or use the default optionally
specified at configure time (before Verilator was compiled).
Deprecated. Used only if :option:`SYSTEMC_LIBDIR` is not set. Specifies
the architecture name used by the SystemC kit. This is the part after
the dash in the "lib-{...}" directory name created by a :command:`make`
in the SystemC distribution. If not set, Verilator will try to intuit
the proper setting, or use the default optionally specified at configure
time (before Verilator was compiled).
.. option:: SYSTEMC_CXX_FLAGS
Specifies additional flags that are required to be passed to GCC when
building the SystemC model. System 2.3.0 may need this set to
building the SystemC model. System 2.3.0 may need this set to
"-pthread".
.. option:: SYSTEMC_INCLUDE
@@ -67,27 +69,41 @@ associated programs.
.. option:: SYSTEMC_LIBDIR
If set, specifies the directory containing the libsystemc.a library. If
If set, specifies the directory containing the libsystemc.a library. If
not specified, it will come from a default optionally specified at
configure time (before Verilator was compiled), or computed from
SYSTEMC/lib-SYSTEMC_ARCH.
.. option:: VERILATOR_BIN
If set, specifies an alternative name of the ``verilator`` binary. May
If set, specifies an alternative name of the ``verilator`` binary. May
be used for debugging and selecting between multiple operating system
builds.
.. option:: VERILATOR_COVERAGE_BIN
If set, specifies an alternative name of the ``verilator_coverage``
binary. May be used for debugging and selecting between multiple
binary. May be used for debugging and selecting between multiple
operating system builds.
.. option:: VERILATOR_GDB
If set, the command to run when using the :vlopt:`--gdb` option, such as
"ddd". If not specified, it will use "gdb".
"ddd". If not specified, it will use "gdb".
.. option:: VERILATOR_NUMA_STRATEGY
If set, controls NUMA assignment strategy for Verilator's thread pool
for Verilated simulations at runtime.
Possible values are:
* Empty(``""``) or ``"default"``: Enables NUMA assignment that prioritizes
assigning Verilator threads to physical cores.
* ``"none"``: Disables NUMA assignment. Let the operating system handle
thread scheduling.
Other values may be supported in future releases.
.. option:: VERILATOR_ROOT
@@ -110,7 +126,7 @@ associated programs.
If you are using a pre-compiled Verilator package, you should not need
to set ``VERILATOR_ROOT`` - the value embedded in the binary should be
correct. In fact this option *does not work* with Verilator packages
correct. In fact this option *does not work* with Verilator packages
that have been installed with ``make install``. If a Verilator package
has been installed using ``./configure --prefix=/some/path && make
install`` and then moved to another location, you cannot use
@@ -121,13 +137,15 @@ associated programs.
.. option:: VERILATOR_SOLVER
If set, the command to run as a constrained randomization backend, such
as :command:`cvc4 --lang=smt2 --incremental`. If not specified, it will use
the one supplied or found during configure, or :command:`z3 --in` if empty.
as :command:`cvc4 --lang=smt2 --incremental`. If not specified, it will
use the one supplied or found during configure, or :command:`z3 --in` if
empty.
.. option:: VERILATOR_VALGRIND
If set, the command to run when using the :vlopt:`--valgrind` option, such as
"valgrind --tool=callgrind". If not specified, it will use "valgrind".
If set, the command to run when using the :vlopt:`--valgrind` option,
such as "valgrind --tool=callgrind". If not specified, it will use
"valgrind".
Make Variables
@@ -146,7 +164,7 @@ set by passing them to make e.g. ``make CXX=my-gcc ...``.
Optionally overrides the default compiler binary used by the Verilated
makefiles. If CXX is not set, the version found at configure time is
used. Note the default flags passed to the compiler are determined at
used. Note the default flags passed to the compiler are determined at
configuration time, so changing the CXX compiler version using this
variable, as opposed to passing it at configuration time, may not give
desired results.
@@ -155,7 +173,7 @@ set by passing them to make e.g. ``make CXX=my-gcc ...``.
Optionally overrides the default linker binary used by the Verilated
makefiles. If LINK is not set, the version found at configure time is
used. Note the default flags passed to the linker are determined at
used. Note the default flags passed to the linker are determined at
configuration time, so changing the LINK version using this variable, as
opposed to passing it at configuration time, may not give desired
results.
+19 -20
View File
@@ -1,14 +1,14 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
.. _Example Create-Binary Execution:
.. _example create-binary execution:
Example Create-Binary Execution
===============================
We'll compile this SystemVerilog example into a Verilated simulation binary. For
an example that discusses the next level of detail see :ref:`Example C++
Execution`.
We'll compile this SystemVerilog example into a Verilated simulation
binary. For an example that discusses the next level of detail see
:ref:`Example C++ Execution`.
.. include:: example_common_install.rst
@@ -16,20 +16,20 @@ Now, let's create an example Verilog file:
.. code-block:: bash
mkdir test_our
cd test_our
mkdir test_our
cd test_our
cat >our.v <<'EOF'
module our;
initial begin $display("Hello World"); $finish; end
endmodule
EOF
cat >our.v <<'EOF'
module our;
initial begin $display("Hello World"); $finish; end
endmodule
EOF
Now we run Verilator on our little example.
.. code-block:: bash
verilator --binary -j 0 -Wall our.v
verilator --binary -j 0 -Wall our.v
Breaking this command down:
@@ -39,8 +39,7 @@ Breaking this command down:
#. :vlopt:`-j` `0` to Verilate using use as many CPU threads as the machine
has.
#. :vlopt:`-Wall` so Verilator has stronger lint warnings
enabled.
#. :vlopt:`-Wall` so Verilator has stronger lint warnings enabled.
#. An finally, :command:`our.v`, which is our SystemVerilog design file.
@@ -48,16 +47,16 @@ And now we run it:
.. code-block:: bash
obj_dir/Vour
obj_dir/Vour
And we get as output:
.. code-block:: bash
Hello World
- our.v:2: Verilog $finish
Hello World
- our.v:2: Verilog $finish
You're better off using a Makefile to run the steps for you, so when your
source changes, it will automatically run all of the appropriate steps. To
aid this, Verilator can create a makefile dependency file. For examples
source changes, it will automatically run all of the appropriate steps. To
aid this, Verilator can create a makefile dependency file. For examples
that do this, see the :file:`examples` directory in the distribution.
+31 -32
View File
@@ -1,12 +1,12 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
.. _Example C++ Execution:
.. _example c++ execution:
Example C++ Execution
=====================
We'll compile this example into C++. For an extended and commented version
We'll compile this example into C++. For an extended and commented version
of what this C++ code is doing, see
:file:`examples/make_tracing_c/sim_main.cpp` in the distribution.
@@ -16,34 +16,34 @@ Now, let's create an example Verilog and C++ wrapper file:
.. code-block:: bash
mkdir test_our
cd test_our
mkdir test_our
cd test_our
cat >our.v <<'EOF'
module our;
initial begin $display("Hello World"); $finish; end
endmodule
EOF
cat >our.v <<'EOF'
module our;
initial begin $display("Hello World"); $finish; end
endmodule
EOF
cat >sim_main.cpp <<'EOF'
#include "Vour.h"
#include "verilated.h"
int main(int argc, char** argv) {
VerilatedContext* contextp = new VerilatedContext;
contextp->commandArgs(argc, argv);
Vour* top = new Vour{contextp};
while (!contextp->gotFinish()) { top->eval(); }
delete top;
delete contextp;
return 0;
}
EOF
cat >sim_main.cpp <<'EOF'
#include "Vour.h"
#include "verilated.h"
int main(int argc, char** argv) {
VerilatedContext* contextp = new VerilatedContext;
contextp->commandArgs(argc, argv);
Vour* top = new Vour{contextp};
while (!contextp->gotFinish()) { top->eval(); }
delete top;
delete contextp;
return 0;
}
EOF
Now we run Verilator on our little example;
.. code-block:: bash
verilator --cc --exe --build -j 0 -Wall sim_main.cpp our.v
verilator --cc --exe --build -j 0 -Wall sim_main.cpp our.v
Breaking this command down:
@@ -60,8 +60,7 @@ Breaking this command down:
#. :vlopt:`-j 0 <-j>` to Verilate using use as many CPU threads as the
machine has.
#. :vlopt:`-Wall` so Verilator has stronger lint warnings
enabled.
#. :vlopt:`-Wall` so Verilator has stronger lint warnings enabled.
#. And finally, :command:`our.v` which is our SystemVerilog design file.
@@ -70,7 +69,7 @@ Once Verilator completes we can see the generated C++ code under the
.. code-block:: bash
ls -l obj_dir
ls -l obj_dir
(See :ref:`Files Read/Written` for descriptions of some of the files that
were created.)
@@ -79,16 +78,16 @@ And now we run it:
.. code-block:: bash
obj_dir/Vour
obj_dir/Vour
And we get as output:
.. code-block:: bash
Hello World
- our.v:2: Verilog $finish
Hello World
- our.v:2: Verilog $finish
You're better off using a Makefile to run the steps for you, so when your
source changes, it will automatically run all of the appropriate steps. To
aid this, Verilator can create a makefile dependency file. For examples
source changes, it will automatically run all of the appropriate steps. To
aid this, Verilator can create a makefile dependency file. For examples
that do this, see the :file:`examples` directory in the distribution.
+6 -6
View File
@@ -1,16 +1,16 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
First you need Verilator installed, see :ref:`Installation`. In brief, if
First you need Verilator installed, see :ref:`Installation`. In brief, if
you installed Verilator using the package manager of your operating system,
or did a :command:`make install` to place Verilator into your default path,
you do not need anything special in your environment, and should not have
VERILATOR_ROOT set. However, if you installed Verilator from sources and
VERILATOR_ROOT set. However, if you installed Verilator from sources and
want to run Verilator out of where you compiled Verilator, you need to
point to the kit:
.. code-block:: bash
# See above; don't do this if using an OS-distributed Verilator
export VERILATOR_ROOT=/path/to/where/verilator/was/installed
export PATH=$VERILATOR_ROOT/bin:$PATH
# See above; don't do this if using an OS-distributed Verilator
export VERILATOR_ROOT=/path/to/where/verilator/was/installed
export PATH=$VERILATOR_ROOT/bin:$PATH
+19 -9
View File
@@ -1,42 +1,52 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
.. _Examples in the Distribution:
.. _examples in the distribution:
Examples in the Distribution
============================
See the ``examples/`` directory that is part of the distribution, and
is installed (in an OS-specific place, often in e.g.
``/usr/local/share/verilator/examples``). These examples include:
See the ``examples/`` directory that is part of the distribution, and is
installed (in an OS-specific place, often in e.g.
``/usr/local/share/verilator/examples``). These examples include:
examples/make_hello_binary
Example GNU-make simple Verilog->binary conversion
examples/make_hello_c
Example GNU-make simple Verilog->C++ conversion
examples/make_hello_sc
Example GNU-make simple Verilog->SystemC conversion
examples/make_tracing_c
Example GNU-make Verilog->C++ with tracing
examples/make_tracing_sc
Example GNU-make Verilog->SystemC with tracing
examples/make_protect_lib
Example using --protect-lib
examples/cmake_hello_c
Example building make_hello_c with CMake
examples/cmake_hello_sc
Example building make_hello_sc with CMake
examples/cmake_tracing_c
Example building make_tracing_c with CMake
examples/cmake_tracing_sc
Example building make_tracing_sc with CMake
examples/cmake_protect_lib
Example building make_protect_lib with CMake
To run an example copy the example to a new directory and run it.
::
.. code-block:: bash
cp -rp {path_to}/examples/make_hello_c make_hello_c
cd make_hello_c
make
cp -rp {path_to}/examples/make_hello_c make_hello_c
cd make_hello_c
make
+30 -30
View File
@@ -1,7 +1,7 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
.. _Example SystemC Execution:
.. _example systemc execution:
Example SystemC Execution
=========================
@@ -15,58 +15,58 @@ Now, let's create an example Verilog, and SystemC wrapper file:
.. code-block:: bash
mkdir test_our_sc
cd test_our_sc
mkdir test_our_sc
cd test_our_sc
cat >our.v <<'EOF'
module our (clk);
input clk; // Clock is required to get initial activation
always @(posedge clk)
begin $display("Hello World"); $finish; end
endmodule
EOF
cat >our.v <<'EOF'
module our (clk);
input clk; // Clock is required to get initial activation
always @(posedge clk)
begin $display("Hello World"); $finish; end
endmodule
EOF
cat >sc_main.cpp <<'EOF'
#include "Vour.h"
using namespace sc_core;
int sc_main(int argc, char** argv) {
Verilated::commandArgs(argc, argv);
sc_clock clk{"clk", 10, SC_NS, 0.5, 3, SC_NS, true};
Vour* top = new Vour{"top"};
top->clk(clk);
while (!Verilated::gotFinish()) { sc_start(1, SC_NS); }
delete top;
return 0;
}
EOF
cat >sc_main.cpp <<'EOF'
#include "Vour.h"
using namespace sc_core;
int sc_main(int argc, char** argv) {
Verilated::commandArgs(argc, argv);
sc_clock clk{"clk", 10, SC_NS, 0.5, 3, SC_NS, true};
Vour* top = new Vour{"top"};
top->clk(clk);
while (!Verilated::gotFinish()) { sc_start(1, SC_NS); }
delete top;
return 0;
}
EOF
Now we run Verilator on our little example:
.. code-block:: bash
verilator --sc --exe -Wall sc_main.cpp our.v
verilator --sc --exe -Wall sc_main.cpp our.v
This example does not use --build, therefore we need to explicitly compile
it:
.. code-block:: bash
make -j -C obj_dir -f Vour.mk Vour
make -j -C obj_dir -f Vour.mk Vour
And now we run it:
.. code-block:: bash
obj_dir/Vour
obj_dir/Vour
And we get, after the SystemC banner, the same output as the C++ example:
.. code-block:: bash
SystemC 2.3.3-Accellera
SystemC 2.3.3-Accellera
Hello World
- our.v:4: Verilog $finish
Hello World
- our.v:4: Verilog $finish
Really, you're better off using a Makefile to run the steps for you so when
your source changes it will automatically run all of the appropriate steps.
+2 -2
View File
@@ -1,7 +1,7 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
.. _Examples:
.. _examples:
========
Examples
+31 -16
View File
@@ -1,14 +1,14 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
.. _Simulation Runtime Arguments:
.. _simulation runtime arguments:
Simulation Runtime Arguments
============================
The following are the arguments that may be passed to a Verilated
executable, provided that executable calls
:code:`VerilatedContext*->commandArgs(argc, argv)`.
``VerilatedContext*->commandArgs(argc, argv)``.
All simulation runtime arguments begin with "+verilator", so that the
user's executable may skip over all "+verilator" arguments when parsing its
@@ -18,15 +18,16 @@ Summary:
.. include:: ../_build/gen/args_verilated.rst
Options:
.. option:: +verilator+coverage+file+<filename>
When a model was Verilated using :vlopt:`--coverage`, sets the filename
to write coverage data into. Defaults to :file:`coverage.dat`.
to write coverage data into. Defaults to :file:`coverage.dat`.
.. option:: +verilator+debug
Enable simulation runtime debugging. Equivalent to
Enable simulation runtime debugging. Equivalent to
:vlopt:`+verilator+debugi+4 <+verilator+debugi+\<value\>>`.
To be useful, the model typically must first be compiled with debug
@@ -50,12 +51,12 @@ Summary:
.. option:: +verilator+noassert
Disable assert checking per runtime argument. This is the same as
calling :code:`VerilatedContext*->assertOn(false)` in the model.
calling ``VerilatedContext*->assertOn(false)`` in the model.
.. option:: +verilator+prof+exec+file+<filename>
When a model was Verilated using :vlopt:`--prof-exec`, sets the
simulation runtime filename to dump to. Defaults to
simulation runtime filename to dump to. Defaults to
:file:`profile_exec.dat`.
.. option:: +verilator+prof+exec+start+<value>
@@ -72,9 +73,9 @@ Summary:
When a model was Verilated using :vlopt:`--prof-exec`, after $time
reaches :vlopt:`+verilator+prof+exec+start+\<value\>`, Verilator will
warm up the profiling for this number of eval() calls, then will capture
the profiling of this number of eval() calls. Defaults to 2, which
makes sense for a single-clock-domain module where it's typical to want
to capture one posedge eval() and one negedge eval().
the profiling of this number of eval() calls. Defaults to 2, which makes
sense for a single-clock-domain module where it's typical to want to
capture one posedge eval() and one negedge eval().
.. option:: +verilator+prof+threads+file+<filename>
@@ -94,7 +95,7 @@ Summary:
.. option:: +verilator+prof+vlt+file+<filename>
When a model was Verilated using :vlopt:`--prof-pgo`, sets the
profile-guided optimization data runtime filename to dump to. Defaults
profile-guided optimization data runtime filename to dump to. Defaults
to :file:`profile.vlt`.
.. option:: +verilator+quiet
@@ -104,17 +105,23 @@ Summary:
.. option:: +verilator+rand+reset+<value>
When a model was Verilated using
:vlopt:`--x-initial unique <--x-initial>`, sets the simulation runtime
initialization technique. 0 = Reset to zeros. 1 = Reset to all-ones. 2
= Randomize. See :ref:`Unknown States`.
When a model was Verilated using :vlopt:`--x-initial unique
<--x-initial>`, sets the simulation runtime initialization technique. 0
= Reset to zeros. 1 = Reset to all-ones. 2 = Randomize. See
:ref:`Unknown States`.
.. option:: +verilator+seed+<value>
For $random and :vlopt:`--x-initial unique <--x-initial>`, set the
simulation runtime random seed value. If zero or not specified picks a
simulation runtime random seed value. If zero or not specified picks a
value from the system random number generator.
.. option:: +verilator+solver+file+<filename>
If specified, when the randomization solver is used, open the given
filename for writing, and log all random solver commands and responses
to it.
.. option:: +verilator+V
Shows the verbose version, including configuration information.
@@ -122,3 +129,11 @@ Summary:
.. option:: +verilator+version
Displays program version and exits.
.. option:: +verilator+wno+unsatconstr+<value>
Disable unsatisfied constraint warnings at simulation runtime. When set to
1, warnings about unsatisfied constraints during ``randomize()`` calls will
not be displayed. Defaults to 0 (warnings enabled). This can also be
controlled via the C++ API using
``Verilated::threadContextp()->warnUnsatConstr(false)``.
File diff suppressed because it is too large Load Diff
+38 -36
View File
@@ -1,4 +1,4 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
verilator_coverage
@@ -7,7 +7,7 @@ verilator_coverage
Verilator_coverage processes Verilated model-generated coverage reports.
With `--annotate`, it reads the specified coverage data file and generates
annotated source code with coverage metrics annotated. With
annotated source code with coverage metrics annotated. With
`--annotate-points` the coverage points corresponding to each line are also
shown.
@@ -21,25 +21,26 @@ those statistics of interest and save to a new .dat file.
For Verilog conditions that should never occur, either add a $stop
statement to the appropriate statement block, or see
:option:`/*verilator&32;coverage_off*/`. This will remove the coverage
:option:`/*verilator&32;coverage_off*/`. This will remove the coverage
points after the model is re-Verilated.
For an overview of the use of verilator_coverage, see :ref:`Coverage Analysis`.
For an overview of the use of verilator_coverage, see :ref:`Coverage
Analysis`.
verilator_coverage Example Usage
--------------------------------
..
.. code-block:: bash
verilator_coverage --help
verilator_coverage --version
verilator_coverage --help
verilator_coverage --version
verilator_coverage --annotate obj_dir coverage.dat
verilator_coverage --annotate obj_dir coverage.dat
verilator_coverage --write merged.dat coverage.dat ...
verilator_coverage --write merged.dat coverage.dat ...
verilator_coverage --write-info merged.info coverage.dat ...
verilator_coverage --write-info merged.info coverage.dat ...
verilator_coverage Arguments
@@ -49,8 +50,8 @@ verilator_coverage Arguments
.. option:: <filename>
Specifies the input coverage data file. Multiple filenames may be
provided to read multiple inputs. If no data file is specified, by
Specifies the input coverage data file. Multiple filenames may be
provided to read multiple inputs. If no data file is specified, by
default, "coverage.dat" will be read.
.. option:: --annotate <output_directory>
@@ -59,8 +60,8 @@ verilator_coverage Arguments
coverage data should be written.
Points are children of each line coverage- branches, expressions or
toggle points. When point counts are aggregated into a line, the
minimum and maximum counts are used to determine the status of the line
toggle points. When point counts are aggregated into a line, the minimum
and maximum counts are used to determine the status of the line
(complete, partial, failing) The count is equal to the maximum of the
points.
@@ -73,27 +74,28 @@ verilator_coverage Arguments
* "%" indicates that all points on the line are below the coverage min.
* "~" indicates that some points on the line are above the coverage min and some are below.
* "+" coverage point was at or above the min. Only used with :option:`--annotate-points`.
* "-" coverage point was below the min. Only used with :option:`--annotate-points`.
* "-" coverage point was below the min. Only used with
:option:`--annotate-points`.
.. code-block::
100000 input logic a; // Begins with whitespace, because
// number of hits (100000) is above the min.
+100000 point: comment=a // Begins with +, because
// number of hits (100000) is above the min.
%000000 input logic b; // Begins with %, because
// number of hits (0) is below the min.
-000000 point: comment=b // Begins with -, because
// number of hits (0) is below the min.
~000010 if (cyc!=0) begin // Begins with ~, because
// branches are below and above the min.
+000010 point: comment=if // The if branch is above the min.
-000000 point: comment=else // The else branch is below the min.
100000 input logic a; // Begins with whitespace, because
// number of hits (100000) is above the min.
+100000 point: type=line comment=a // Begins with +, because
// number of hits (100000) is above the min.
%000000 input logic b; // Begins with %, because
// number of hits (0) is below the min.
-000000 point: type=line comment=b // Begins with -, because
// number of hits (0) is below the min.
~000010 if (cyc!=0) begin // Begins with ~, because
// branches are below and above the min.
+000010 point: type=branch comment=if // The if branch is above the min.
-000000 point: type=branch comment=else // The else branch is below the min.
.. option:: --annotate-all
Specifies all files should be shown. By default, only those source
files with low coverage are written to the output directory.
Specifies all files should be shown. By default, only those source files
with low coverage are written to the output directory.
This option should be used together with :option:`--annotate`.
@@ -111,15 +113,15 @@ verilator_coverage Arguments
.. option:: --annotate-points
Specifies all coverage points should be shown after each line of text. By
default, only source lines are shown.
Specifies all coverage points should be shown after each line of text.
By default, only source lines are shown.
.. code-block::
100000 input logic a, b, c;
+100000 point: comment=a // These lines are only shown
+200000 point: comment=b // with option --annotate-points
+300000 point: comment=c // enabled.
+100000 point: type=line comment=a // These lines are only shown
+200000 point: type=line comment=b // with option --annotate-points
+300000 point: type=line comment=c // enabled.
This option should be used together with :option:`--annotate`.
@@ -137,7 +139,7 @@ verilator_coverage Arguments
.. option:: --rank
Prints an experimental report listing the relative importance of each
test in covering all of the coverage points. The report shows "Covered"
test in covering all of the coverage points. The report shows "Covered"
which indicates the number of points the test covers; a test is
considered to cover a point if it has a bucket count of at least 1. The
"rank" column has a higher number t indicate the test is more critical,
@@ -159,7 +161,7 @@ verilator_coverage Arguments
Specifies the aggregate coverage results, summed across all the files,
should be written to the given filename in verilator_coverage data
format. This is useful in scripts to combine many coverage data files
format. This is useful in scripts to combine many coverage data files
(likely generated from random test runs) into one master coverage file.
.. option:: --write-info <filename.info>
+22 -22
View File
@@ -1,4 +1,4 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
verilator_gantt
@@ -31,50 +31,50 @@ In waveforms, there are the following signals. In GTKWave, use "decimal"
data format to remove the leading zeros and make the traces easier to read.
trace/section
Shows the name of the current top of the execution section stack.
Set GTKWave data format to "ASCII".
Shows the name of the current top of the execution section stack. Set
GTKWave data format to "ASCII".
trace/depth
Shows the depth of the execution section stack.
Set GTKWave data format to "Analog".
Shows the depth of the execution section stack. Set GTKWave data format
to "Analog".
measured_parallelism
The number of mtasks active at this time, for best performance, this will
match the thread count. In GTKWave, use a data format of "analog step" to
view this signal.
The number of mtasks active at this time, for best performance, this
will match the thread count. In GTKWave, use a data format of "analog
step" to view this signal.
predicted_parallelism
The number of mtasks Verilator predicted would be active at this time,
for best performance this will match the thread count. In GTKWave, use a
data format of "analog step" to view this signal.
The number of mtasks Verilator predicted would be active at this time,
for best performance this will match the thread count. In GTKWave, use a
data format of "analog step" to view this signal.
cpu#_thread
For the given CPU number, the thread number measured to be executing.
For the given CPU number, the thread number measured to be executing.
cpu#_waiting
For the given CPU number, aggregated waiting time for mtask dependencies.
Visualized as `X` values.
For the given CPU number, aggregated waiting time for mtask
dependencies. Visualized as `X` values.
mtask#_cpu
For the given mtask id, the CPU it was measured to execute on.
For the given mtask id, the CPU it was measured to execute on.
thread#_mtask
For the given thread number, the mtask id it was executing.
For the given thread number, the mtask id it was executing.
predicted_thread#_mtask
For the given thread number, the mtask id Verilator predicted would be
executing.
For the given thread number, the mtask id Verilator predicted would be
executing.
verilator_gantt Example Usage
-----------------------------
..
.. code-block:: bash
verilator_gantt --help
verilator_gantt --version
verilator_gantt --help
verilator_gantt --version
verilator_gantt profile_exec.dat
verilator_gantt profile_exec.dat
verilator_gantt Arguments
+8 -8
View File
@@ -1,29 +1,29 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
verilator_profcfunc
===================
Verilator_profcfunc reads a profile report created by gprof. The names of
Verilator_profcfunc reads a profile report created by gprof. The names of
the functions are then transformed, assuming the user used Verilator's
--prof-cfuncs, and a report printed showing the percentage of the time,
etc., in each Verilog block.
Due to rounding errors in gprof reports, the input report's percentages may
not total 100%. In the verilator_profcfunc report this will get
reported as a rounding error.
not total 100%. In the verilator_profcfunc report this will get reported as
a rounding error.
For an overview of the use of verilator_profcfunc, see :ref:`Profiling`.
verilator_profcfunc Example Usage
---------------------------------
..
.. code-block:: bash
verilator_profcfunc --help
verilator_profcfunc --version
verilator_profcfunc --help
verilator_profcfunc --version
verilator_profcfunc gprof.out
verilator_profcfunc gprof.out
verilator_profcfunc Arguments
+1 -1
View File
@@ -1,4 +1,4 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
*********************************
+167 -145
View File
@@ -1,35 +1,35 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
=====================
Language Extensions
=====================
===================
Language Extensions
===================
The following additional constructs are the extensions Verilator supports
on top of standard Verilog code. Using these features outside of comments
on top of standard Verilog code. Using these features outside of comments
or "`ifdef`"'s may break other tools.
.. option:: """ [string] """
A triple-quoted block specifies a string that may include newlines and
single quotes. This extension was standardized in IEEE 1800-2023.
single quotes. This extension was standardized in IEEE 1800-2023.
.. option:: `__FILE__
The :option:`\`__FILE__` define expands to the current filename as a
string, like C++'s __FILE__. This Verilator feature, added in 2006, was
string, like C++'s __FILE__. This Verilator feature, added in 2006, was
incorporated into IEEE 1800-2009.
.. option:: `__LINE__
The :option:`\`__LINE__` define expands to the current line number like
C++'s __LINE__. This Verilator feature added in 2006 was incorporated
C++'s __LINE__. This Verilator feature added in 2006 was incorporated
into IEEE 1800-2009.
.. option:: `coverage_block_off
Specifies the entire begin/end block should be ignored for coverage
analysis. Must be inside a code block, e.g., within a begin/end pair.
analysis. Must be inside a code block, e.g., within a begin/end pair.
Same as :option:`coverage_block_off` in :ref:`Verilator Control Files`.
.. option:: `error [string]
@@ -50,14 +50,14 @@ or "`ifdef`"'s may break other tools.
blocks, replaced with the C++ class name generated for the given
containing SystemVerilog class or module. Currently this is replaced
blindly, ignoring quoting or other escapes; this behavior may change in
the future. This attribute is indented only to be used internally in
the future. This attribute is indented only to be used internally in
`verilated_std.sv`.
.. option:: `systemc_ctor
Take the remaining text up to the next :option:`\`verilog` or
:option:`\`systemc_... <\`systemc_header>` mode switch and place it
verbatim into the C++ class constructor. Must be placed as a module or
verbatim into the C++ class constructor. Must be placed as a module or
class item, e.g., directly inside a module/endmodule or class/endclass
pair. Despite the name of this macro, this also works in pure C++ code.
@@ -65,7 +65,7 @@ or "`ifdef`"'s may break other tools.
Take the remaining text up to the next :option:`\`verilog` or
:option:`\`systemc_... <\`systemc_header>` mode switch and place it
verbatim into the C++ class destructor. Must be placed as a module or
verbatim into the C++ class destructor. Must be placed as a module or
class item, e.g., directly inside a module/endmodule or class/endclass
pair. Despite the name of this macro, this also works in pure C++ code.
@@ -73,10 +73,9 @@ or "`ifdef`"'s may break other tools.
Take the remaining text up to the next :option:`\`verilog` or
:option:`\`systemc_... <\`systemc_header>` mode switch and place it
verbatim into the output .h file's header. Must be placed as a module
or class item, e.g., directly inside a module/endmodule or
class/endclass pair. Despite the name of this macro, this also works in
pure C++ code.
verbatim into the output .h file's header. Must be placed as a module or
class item, e.g., directly inside a module/endmodule or class/endclass
pair. Despite the name of this macro, this also works in pure C++ code.
.. option:: `systemc_header_post
@@ -100,21 +99,21 @@ or "`ifdef`"'s may break other tools.
Take the remaining text up to the next :option:`\`verilog` or
:option:`\`systemc_... <\`systemc_header>` mode switch and place it
verbatim into a single file of the C++ class implementation. Must be
verbatim into a single file of the C++ class implementation. Must be
placed as a module or class item, e.g., directly inside a
module/endmodule or class/endclass pair. Despite the name of this macro,
this also works in pure C++ code.
If you will be reading or writing any Verilog variables in the C++
functions, the Verilog signals must be declared with a
:option:`/*verilator&32;public*/` metacomment. See also the public task
:option:`/*verilator&32;public*/` metacomment. See also the public task
feature; writing an accessor may result in cleaner code.
.. option:: `systemc_interface
Take the remaining text up to the next :option:`\`verilog` or
:option:`\`systemc_... <\`systemc_header>` mode switch and place it
verbatim into the C++ class interface. Must be placed as a module or
verbatim into the C++ class interface. Must be placed as a module or
class item, e.g., directly inside a module/endmodule or class/endclass
pair. Despite the name of this macro, this also works in pure C++ code.
@@ -136,22 +135,22 @@ or "`ifdef`"'s may break other tools.
.. option:: `verilator_config
Take the remaining text up to the next :option:`\`verilog` mode switch
and treat it as Verilator Control File commands. See :ref:`Verilator
and treat it as Verilator Control File commands. See :ref:`Verilator
Control Files`.
.. option:: `VERILATOR_TIMING
The VERILATOR_TIMING define is set when :vlopt:`--timing` is used to
allow an "\`ifdef" of code dependent on this feature. Note that this define
is not affected by the :option:`timing_off` control file option
allow an "\`ifdef" of code dependent on this feature. Note that this
define is not affected by the :option:`timing_off` control file option
nor timing metacomments.
.. option:: `verilog
Switch back to processing Verilog code after a
:option:`\`systemc_... <\`systemc_header>` mode switch. The Verilog
code returns to the last language mode specified with
"\`begin_keywords", or SystemVerilog if none was specified.
Switch back to processing Verilog code after a :option:`\`systemc_...
<\`systemc_header>` mode switch. The Verilog code returns to the last
language mode specified with "\`begin_keywords", or SystemVerilog if
none was specified.
.. t_dist_docs_style restart_sort
@@ -159,7 +158,7 @@ or "`ifdef`"'s may break other tools.
.. option:: $c([string], ...);, $cpure([string], ...);
The string will be embedded directly in the output C++ code at the point
where the surrounding Verilog code is compiled. It may either be a
where the surrounding Verilog code is compiled. It may either be a
standalone statement (with a trailing ; in the string), or a function
that returns up to a 32-bit number (without a trailing ;). This can be
used to call C++ functions from your Verilog code.
@@ -171,28 +170,27 @@ or "`ifdef`"'s may break other tools.
via an explicit 'this->' pointer dereference.
Expression arguments will have the code to evaluate the expression
inserted. Thus to call a C++ function, :code:`$c("func(",a,")")` will
result in :code:`func(a)` in the output C++ code. For input arguments,
rather than hard-coding variable names in the string
:code:`$c("func(a)")`, instead pass the variable as an expression
::code:`$c("func(",a,")")`. This will allow the call to work inside
Verilog functions where the variable is flattened out and enable other
optimizations.
inserted. Thus to call a C++ function, ``$c("func(",a,")")`` will result
in ``func(a)`` in the output C++ code. For input arguments, rather than
hard-coding variable names in the string ``$c("func(a)")``, instead pass
the variable as an expression :``$c("func(",a,")")``. This will allow
the call to work inside Verilog functions where the variable is
flattened out and enable other optimizations.
Verilator does not use any text inside the quotes for
ordering/scheduling. If you need the $c to be called at a specific
time, e.g., when a variable changes, then the $c must be under an
appropriate sensitivity statement, e.g.,
:code:`always @(posedge clk) $c("func()")` to call it on every edge, or,
e.g., :code:`always @* c("func(",a,")")` to call it when :code:`a`
changes (the latter working because :code:`a` is outside the quotes).
ordering/scheduling. If you need the $c to be called at a specific time,
e.g., when a variable changes, then the $c must be under an appropriate
sensitivity statement, e.g., ``always @(posedge clk) $c("func()")`` to
call it on every edge, or, e.g., ``always @* c("func(",a,")")`` to call
it when ``a`` changes (the latter working because ``a`` is outside the
quotes).
If you will be reading or writing any Verilog variables inside the C++
functions, the Verilog signals must be declared with
:option:`/*verilator&32;public*/` metacomments.
You may also append a number to $c, which specifies the bit width of
the output, e.g., :code:`signal_32_bits = $c32("...");`. This allows for
You may also append a number to $c, which specifies the bit width of the
output, e.g., ``signal_32_bits = $c32("...");``. This allows for
compatibility with other simulators, which require a differently named
PLI function name for each different output width.
@@ -203,31 +201,39 @@ or "`ifdef`"'s may break other tools.
.. option:: $display, $write, $fdisplay, $fwrite, $sformat, $swrite
Format arguments may use C fprintf sizes after the % escape. Per the
Format arguments may use C fprintf sizes after the % escape. Per the
Verilog standard, %x prints a number with the natural width, and %0x
prints a number with minimum width. Verilator extends this so %5x
prints 5 digits per the C standard. This extension was standardized into
prints a number with minimum width. Verilator extends this so %5x prints
5 digits per the C standard. This extension was standardized into
1800-2009.
.. option:: $get_initial_random_seed()
Returns an integer with the initial random seed used for the simulation.
This is the value provided via the :vlopt:`+verilator+seed+\<value\>`
runtime option. If no seed is specified, it returns the default
initialization seed (typically 0). This is not defined by IEEE
1800-2023, but most simulators support it.
.. option:: $stacktrace
Called as a task, print a stack trace. Called as a function, return a
string with a stack trace. This relies on the C++ system trace, which
Called as a task, print a stack trace. Called as a function, return a
string with a stack trace. This relies on the C++ system trace, which
may give less meaningful results if the model is not compiled with debug
symbols. Also, the data represents the C++ stack; the SystemVerilog
symbols. Also, the data represents the C++ stack; the SystemVerilog
functions/tasks involved may be renamed and/or inlined before becoming
the C++ functions that may be visible in the stack trace. This
extension was standardized in IEEE 1800-2023.
the C++ functions that may be visible in the stack trace. This extension
was standardized in IEEE 1800-2023.
.. option:: $timeprecision
Returns the timeprecision of the model as an integer. This extension is
Returns the timeprecision of the model as an integer. This extension is
experimental and may be removed without deprecation.
.. option:: $timeunit
Returns the timeunit of the current module as an integer. This
extension is experimental and may be removed without deprecation.
Returns the timeunit of the current module as an integer. This extension
is experimental and may be removed without deprecation.
.. option:: /*verilator&32;clock_enable*/
@@ -242,10 +248,10 @@ or "`ifdef`"'s may break other tools.
.. code-block:: sv
reg enable_r /*verilator clock_enable*/;
wire gated_clk = clk & enable_r;
always_ff @(posedge clk)
enable_r <= enable_early;
reg enable_r /*verilator clock_enable*/;
wire gated_clk = clk & enable_r;
always_ff @(posedge clk)
enable_r <= enable_early;
The clock_enable attribute will cause the clock gate to be ignored in
the scheduling algorithm, sometimes required for correct clock behavior,
@@ -287,6 +293,15 @@ or "`ifdef`"'s may break other tools.
(if appropriate :vlopt:`--coverage` flags are passed) after being
disabled earlier with :option:`/*verilator&32;coverage_off*/`.
.. option:: /*verilator&32;fargs <arguments>*/
For Verilator developers only. When a source file containing these `fargs`
metacomments is passed to Verilator on the command line via the :vlopt:`-f`
or :vlopt:`-F` option, the provided arguments will be added as if specified
on the command line. The source file is not preprocessed before parsing for
arguments, and all `fargs` comments will take effect, even if placed
undef an inactive `\`ifdef`.
.. option:: /*verilator&32;forceable*/
Specifies that the signal (net or variable) should be made forceable from
@@ -306,10 +321,10 @@ or "`ifdef`"'s may break other tools.
.. option:: /*verilator&32;hier_block*/
Specifies that the module is a unit of hierarchical Verilation. This
metacomment must be between :code:`module module_name(...);` and
:code:`endmodule`. The module will not be inlined nor uniquified for
each instance in hierarchical Verilation. Note that the metacomment is
Specifies that the module is a unit of hierarchical Verilation. This
metacomment must be between ``module module_name(...);`` and
``endmodule``. The module will not be inlined nor uniquified for each
instance in hierarchical Verilation. Note that the metacomment is
ignored unless the :vlopt:`--hierarchical` option is specified.
See :ref:`Hierarchical Verilation`.
@@ -317,17 +332,17 @@ or "`ifdef`"'s may break other tools.
.. option:: /*verilator&32;inline_module*/
Specifies the module the comment appears in may be inlined into any
modules that use this module. This is useful to speed up simulation
runtime. Note if using :vlopt:`--public` that signals under inlined
submodules will be named :code:`{submodule}__DOT__{subsignal}` as C++
does not allow "." in signal names.
modules that use this module. This is useful to speed up simulation
runtime. Note if using :vlopt:`--public` that signals under inlined
submodules will be named ``{submodule}__DOT__{subsignal}`` as C++ does
not allow "." in signal names.
Same as :option:`inline` control file option.
.. option:: /*verilator&32;isolate_assignments*/
Used after a signal declaration to indicate the assignments to this
signal in any blocks should be isolated into new blocks. When large
signal in any blocks should be isolated into new blocks. When large
combinatorial block results in a :option:`UNOPTFLAT` warning, attaching
this to the signal that was causing a false loop may work around the
warning.
@@ -336,14 +351,14 @@ or "`ifdef`"'s may break other tools.
.. code-block:: sv
reg splitme /* verilator isolate_assignments*/;
// Note the placement of the semicolon above
always_comb begin
if (....) begin
splitme = ....;
other assignments
end
end
reg splitme /* verilator isolate_assignments*/;
// Note the placement of the semicolon above
always_comb begin
if (....) begin
splitme = ....;
other assignments
end
end
Verilator will internally split the block that assigns to "splitme" into
two blocks:
@@ -370,36 +385,36 @@ or "`ifdef`"'s may break other tools.
.. option:: /*verilator&32;lint_off <msgs>*/
Disable the specified warning message(s) for any warnings following the
comment. Multiple messages may be specified, separated with commas.
comment. Multiple messages may be specified, separated with commas.
If a one-line slash-slash-format comment is used, then the metacomment
ends at the newline or at an earlier next slash-slash. This allow
commenting the reason for the disable, e.g. :code:`// verilator lint_off
MSG // Because...`.
commenting the reason for the disable, e.g. ``// verilator lint_off
MSG // Because...``.
.. option:: /*verilator&32;lint_on <msgs>*/
Re-enable the specified warning message(s) for any warnings following
the comment. Multiple messages may be specified, separated with commas.
the comment. Multiple messages may be specified, separated with commas.
.. option:: /*verilator&32;lint_restore*/
After a :code:`/*verilator&32;lint_save*/`, pop the stack containing lint
message state. Often this is useful at the bottom of include files.
After a ``/*verilator&32;lint_save*/``, pop the stack containing lint
message state. Often this is useful at the bottom of include files.
.. option:: /*verilator&32;lint_save*/
Push the current state of what lint messages are turned on or off
to a stack. Later meta-comments may then lint_on or lint_off specific
Push the current state of what lint messages are turned on or off to a
stack. Later meta-comments may then lint_on or lint_off specific
messages, then return to the earlier message state by using
:code:`/*verilator&32;lint_restore*/`. For example:
``/*verilator&32;lint_restore*/``. For example:
.. code-block:: sv
// verilator lint_save
// verilator lint_off WIDTH
... // code needing WIDTH turned off
// verilator lint_restore
// verilator lint_save
// verilator lint_off WIDTH
... // code needing WIDTH turned off
// verilator lint_restore
If WIDTH was on before the lint_off, it would now be restored to on, and
if it was off before the lint_off it would remain off.
@@ -414,11 +429,10 @@ or "`ifdef`"'s may break other tools.
.. option:: /*verilator&32;no_inline_task*/
Used in a function or task variable definition section to specify the
function or task should not be inlined into where it is used. This may
function or task should not be inlined into where it is used. This may
reduce the size of the final executable when a task is used a very large
number of times. For this flag to work, the task and tasks below it
must be pure; they cannot reference any variables outside the task
itself.
number of times. For this flag to work, the task and tasks below it must
be pure; they cannot reference any variables outside the task itself.
Same as :option:`no_inline` control file option.
@@ -430,21 +444,21 @@ or "`ifdef`"'s may break other tools.
.. code-block:: sv
parameter [2:0] PARAM /*verilator public*/ = 2'b0;
parameter [2:0] PARAM /*verilator public*/ = 2'b0;
.. option:: /*verilator&32;public*/ (on task/function)
Used inside the declaration section of a function or task declaration to
indicate the function or task should be made into a C++ function, public
to outside callers. Public tasks will be declared as a void C++
to outside callers. Public tasks will be declared as a void C++
function, public functions will get the appropriate non-void (bool,
uint32_t, etc.) return type. Any input arguments will become C++
arguments to the function. Any output arguments will become C++
reference arguments. Any local registers/integers will become function
uint32_t, etc.) return type. Any input arguments will become C++
arguments to the function. Any output arguments will become C++
reference arguments. Any local registers/integers will become function
automatic variables on the stack.
Wide variables over 64 bits cannot be function returns, to avoid
exposing complexities. However, wide variables can be input/outputs;
exposing complexities. However, wide variables can be input/outputs;
they will be passed as references to an array of 32-bit numbers.
Generally, only the values of stored state (flops) should be written, as
@@ -464,17 +478,17 @@ or "`ifdef`"'s may break other tools.
.. code-block:: sv
typedef enum logic [2:0] { ZERO = 3'b0 } pub_t /*verilator public*/;
typedef enum logic [2:0] { ZERO = 3'b0 } pub_t /*verilator public*/;
.. option:: /*verilator&32;public*/ (on variable)
Used after an input, output, register, or wire declaration to indicate
the signal should be declared so that C code may read or write the value
of the signal. This will also declare this module public; otherwise, use
:code:`/*verilator&32;public_flat*/`.
of the signal. This will also declare this module public; otherwise, use
``/*verilator&32;public_flat*/``.
Instead of using public variables, consider making a DPI or public
function that accesses the variable. This is nicer as it provides an
function that accesses the variable. This is nicer as it provides an
obvious entry point compatible across simulators.
Same as :option:`public` control file option.
@@ -484,30 +498,30 @@ or "`ifdef`"'s may break other tools.
Used to wrap multiple signals and parameters with the respective public attribute.
See attribute above for their respective behavior. Cannot be nested. e.g:
.. code-block:: sv
.. code-block:: sv
/*verilator public_flat_rw_on*/
logic clk;
logic rst;
parameter width = 8;
/* verilator public_off*/
logic data;
/*verilator public_flat_rw_on*/
logic clk;
logic rst;
parameter width = 8;
/* verilator public_off*/
logic data;
Is equivalent to:
.. code-block:: sv
.. code-block:: sv
logic clk /*verilator public_flat_rw*/;
logic rst /*verilator public_flat_rw*/;
parameter width /*verilator public_flat_rw*/ = 8;
logic data;
logic clk /*verilator public_flat_rw*/;
logic rst /*verilator public_flat_rw*/;
parameter width /*verilator public_flat_rw*/ = 8;
logic data;
.. option:: /*verilator&32;public_flat*/ (on variable)
Used after an input, output, register, or wire declaration to indicate
the signal should be declared so that C code may read or write the value
of the signal. This will not declare this module public, which means
the name of the signal or path to it may change based upon the module
of the signal. This will not declare this module public, which means the
name of the signal or path to it may change based upon the module
inlining which takes place.
Same as :option:`public_flat` control file option.
@@ -536,9 +550,9 @@ or "`ifdef`"'s may break other tools.
Used after a module statement to indicate the module should not be
inlined (unless specifically requested) so that C code may access the
module. Verilator automatically sets this attribute when the module
contains public signals or \`systemc_ directives. Use of this is
implied when using the :vlopt:`--public` option.
module. Verilator automatically sets this attribute when the module
contains public signals or \`systemc_ directives. Use of this is implied
when using the :vlopt:`--public` option.
Same as :option:`public` control file option.
@@ -546,31 +560,40 @@ or "`ifdef`"'s may break other tools.
Terminates the previous `/*verilator public*_on*/` directive; see above.
.. option:: /*verilator&32;sc_biguint*/
Used after a port declaration. It sets the port to be of
``sc_biguint<{width}>`` type, for signals of any width. This may be
useful if the port width is parameterized and the instantiating C++ code
always wants to have a sc_biguint accept any width. In general, you
should avoid using this attribute when unnecessary, as the performance
decreases significantly with increasing usage of sc_biguint.
.. option:: /*verilator&32;sc_bv*/
Used after a port declaration. It sets the port to be of
:code:`sc_bv<{width}>` type, instead of bool, uint32_t, or uint64_t.
This may be useful if the port width is parameterized and the
instantiating C++ code always wants to have a sc_bv accept any width.
In general, you should avoid using this attribute when unnecessary, as
the performance decreases significantly with increasing usage of sc_bv.
Used after a port declaration. It sets the port to be of
``sc_bv<{width}>`` type, instead of bool, uint32_t, or uint64_t. This
may be useful if the port width is parameterized and the instantiating
C++ code always wants to have a sc_bv accept any width. In general, you
should avoid using this attribute when unnecessary, as the performance
decreases significantly with increasing usage of sc_bv.
Same as :option:`sc_bv` control file option.
.. option:: /*verilator&32;sc_clock*/
Deprecated and ignored. Previously used after an input declaration to
Deprecated and ignored. Previously used after an input declaration to
indicate the signal should be declared in SystemC as a sc_clock instead
of a bool. This was needed in SystemC 1.1 and 1.2 only; versions 2.0
and later do not require clock pins to be sc_clocks, and this is no
longer needed and is ignored.
of a bool. This was needed in SystemC 1.1 and 1.2 only; versions 2.0 and
later do not require clock pins to be sc_clocks, and this is no longer
needed and is ignored.
.. option:: /*verilator&32;sformat*/
Attached to the final argument of type "input string" of a function or
task to indicate that the function or task should pass all remaining
arguments through $sformatf. This allows creation of DPI functions with
$display-like behavior. See the :file:`test_regress/t/t_dpi_display.v`
arguments through $sformatf. This allows creation of DPI functions with
$display-like behavior. See the :file:`test_regress/t/t_dpi_display.v`
file for an example.
Same as :option:`sformat` control file option.
@@ -587,14 +610,14 @@ or "`ifdef`"'s may break other tools.
.. code-block:: sv
logic [7:0] x [0:1] /*verilator split_var*/;
logic [7:0] x [0:1] /*verilator split_var*/;
To:
.. code-block:: sv
logic [7:0] x__BRA__0__KET__ /*verilator split_var*/;
logic [7:0] x__BRA__1__KET__ /*verilator split_var*/;
logic [7:0] x__BRA__0__KET__ /*verilator split_var*/;
logic [7:0] x__BRA__1__KET__ /*verilator split_var*/;
Note that the generated packed variables retain the split_var
metacomment because they may be split into smaller pieces according to
@@ -602,7 +625,7 @@ or "`ifdef`"'s may break other tools.
This only supports unpacked arrays, packed arrays, and packed structs of
integer types (reg, logic, bit, byte, int...); otherwise, if a split was
requested but cannot occur, a SPLITVAR warning is issued. Splitting
requested but cannot occur, a SPLITVAR warning is issued. Splitting
large arrays may slow down the Verilation speed, so use this only on
variables that require it.
@@ -613,12 +636,11 @@ or "`ifdef`"'s may break other tools.
.. code-block:: sv
logic [1:0][31:0] tmp;
assign tmp[0] = foo + a;
assign tmp[1] = tmp[1] + b;
assign bar = tmp[1] + c;
logic [1:0][31:0] tmp;
assign tmp[0] = foo + a;
assign tmp[1] = tmp[1] + b;
assign bar = tmp[1] + c;
Same as :option:`split_var` control file option.
@@ -632,8 +654,8 @@ or "`ifdef`"'s may break other tools.
Ignore all timing constructs after this metacomment. All timing controls
behave as if they were not there (the same way as with
:option:`--no-timing`), and :code:`fork`/:code:`join*` blocks are
converted into :code:`begin`/:code:`end` blocks.
:option:`--no-timing`), and ``fork``/``join*`` blocks are
converted into ``begin``/``end`` blocks.
Same as :option:`timing_off` control file option.
@@ -658,7 +680,7 @@ or "`ifdef`"'s may break other tools.
.. option:: /*verilator&32;tracing_off*/
Disable waveform tracing for all future signals declared in this module,
or instances below this module. Often this is placed just after a
or instances below this module. Often this is placed just after a
primitive's module statement, so that the entire module and instances
below it are not traced.
@@ -671,7 +693,7 @@ or "`ifdef`"'s may break other tools.
Used in a statement position to indicate the immediately following loop
at the same statement level should not be unrolled by Verilator,
ignoring :vlopt:`--unroll-count`. This is similar to clang's ``#pragma
ignoring :vlopt:`--unroll-count`. This is similar to clang's ``#pragma
clang loop unroll(disable)``.
This option does not currently disable the C++ compiler's unrolling (or
@@ -681,5 +703,5 @@ or "`ifdef`"'s may break other tools.
Rarely needed. Used in a statement position to indicate the immediately
following loop at the same statement level should always be fully
unrolled by Verilator, ignoring :vlopt:`--unroll-count`. This is
similar to clang's ``#pragma clang loop unroll(full)``.
unrolled by Verilator, ignoring :vlopt:`--unroll-count`. This is similar
to clang's ``#pragma clang loop unroll(full)``.
+134 -140
View File
@@ -1,4 +1,4 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
******************************
@@ -13,9 +13,9 @@ Questions
Can I contribute?
"""""""""""""""""
Please contribute! Just submit a pull request, or raise an issue to
discuss if you are looking for something to help on. For more information
see our contributor agreement.
Please contribute! Just submit a pull request, or raise an issue to discuss
if you are looking for something to help on. For more information see our
contributor agreement.
How widely is Verilator used?
@@ -25,10 +25,10 @@ Verilator is used by many of the largest silicon design companies, large
organizations such as CERN, and even by college student projects.
Verilator is one of the "big 4" simulators, meaning one of the four leading
SystemVerilog simulators available, namely the closed-source products Synopsys
VCS (tm), Mentor Questa/ModelSim (tm), Cadence
Xcelium/Incisive/NC-Verilog/NC-Sim (tm), and the open-source Verilator.
The three closed-source offerings are often collectively called the "big 3"
SystemVerilog simulators available, namely the closed-source products
Synopsys VCS (tm), Mentor Questa/ModelSim (tm), Cadence
Xcelium/Incisive/NC-Verilog/NC-Sim (tm), and the open-source Verilator. The
three closed-source offerings are often collectively called the "big 3"
simulators.
@@ -37,7 +37,7 @@ Does Verilator run under Windows?
Yes, ideally, run Ubuntu under Windows Subsystem for Linux (WSL2).
Alternatively, use Cygwin, though this tends to be slower and is not
regularly tested. Verilated output also compiles under Microsoft Visual
regularly tested. Verilated output also compiles under Microsoft Visual
C++, but this is also not regularly tested.
@@ -46,8 +46,8 @@ Can you provide binaries?
You can install Verilator via the system package manager (apt, yum, etc.)
on many Linux distributions, including Debian, Ubuntu, SuSE, Red Hat, and
others. These packages are provided by the Linux distributions and
generally will lag the version of the mainline Verilator repository. If no
others. These packages are provided by the Linux distributions and
generally will lag the version of the mainline Verilator repository. If no
binary package is available for your distribution, how about you set one
up?
@@ -59,24 +59,25 @@ Generally, the implied part of the question is "... with all of the
manpower they can put into developing it."
Most simulators must comply with the complete IEEE 1364 (Verilog) and IEEE
1800 (SystemVerilog) standards, meaning they have to be event-driven. This
1800 (SystemVerilog) standards, meaning they have to be event-driven. This
prevents them from being able to reorder blocks and make netlist-style
optimizations, which are where most of the gains come from.
You should not be scared by non-compliance. Your synthesis tool isn't
You should not be scared by non-compliance. Your synthesis tool isn't
compliant with the whole standard to start with, so your simulator need not
be either. Verilator is closer to the synthesis interpretation, which is
a good thing for getting working silicon.
be either. Verilator is closer to the synthesis interpretation, which is a
good thing for getting working silicon.
Will Verilator output remain under my own license/copyright?
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Your SystemVerilog, VPI/DPI, or main() C++ code remains under your own license.
Your SystemVerilog, VPI/DPI, or main() C++ code remains under your own
license.
It's just like how using GCC on your programs does not change the copyright
of your program; this is why Verilator uses the "GNU **Lesser** Public
License Version 3" instead of the more typical "GNU Public License". See
License Version 3" instead of the more typical "GNU Public License". See
the licenses for details.
Some examples:
@@ -98,15 +99,15 @@ Some examples:
You also have the option of using the Perl Artistic License, which again
does not require you to release your Verilog, C++, or generated code. This
license also allows you to modify Verilator for internal use without
distributing the modified version. But please contribute back to the
distributing the modified version. But please contribute back to the
community!
Under both licenses, you can offer a commercial product based on
Verilator directly or embedded within. However, under both licenses,
any changes you make to Verilator for such a product must be open-sourced.
Under both licenses, you can offer a commercial product based on Verilator
directly or embedded within. However, under both licenses, any changes you
make to Verilator for such a product must be open-sourced.
As is standard with Open Source, contributions back to Verilator will be
placed under the Verilator copyright and LGPL/Artistic license. Small test
placed under the Verilator copyright and LGPL/Artistic license. Small test
cases will be released into the public domain so they can be used anywhere,
and large tests under the LGPL/Artistic, unless requested otherwise.
@@ -114,13 +115,13 @@ and large tests under the LGPL/Artistic, unless requested otherwise.
Why is running Verilator (to create a model) so slow?
"""""""""""""""""""""""""""""""""""""""""""""""""""""
Verilator may require more memory than the resulting simulation,
as Verilator internally creates all of the state of the resulting
generated simulator to optimize it. If it takes more than a few
minutes or so (and you're not using :vlopt:`--debug` since debug mode is
disk bound), see if your machine is paging; most likely, you need to run it
on a machine with more memory. Very large designs are known to have topped
64 GB resident set size. Alternatively, see :ref:`Hierarchical Verilation`.
Verilator may require more memory than the resulting simulation, as
Verilator internally creates all of the state of the resulting generated
simulator to optimize it. If it takes more than a few minutes or so (and
you're not using :vlopt:`--debug` since debug mode is disk bound), see if
your machine is paging; most likely, you need to run it on a machine with
more memory. Very large designs are known to have topped 64 GB resident set
size. Alternatively, see :ref:`Hierarchical Verilation`.
How do I generate waveforms (traces) in C++?
@@ -128,16 +129,16 @@ How do I generate waveforms (traces) in C++?
See also the next question for tracing in SystemC mode.
A. Pass the :vlopt:`--trace-vcd` option to Verilator. Then you may use ``$dumpfile`` and
``$dumpvars`` to enable traces, the same as with any Verilog simulator,
although Verilator ignores the arguments to ``$dumpvars``. See
``examples/make_tracing_c`` in the distribution.
A. Pass the :vlopt:`--trace-vcd` option to Verilator. Then you may use
``$dumpfile`` and ``$dumpvars`` to enable traces, the same as with any
Verilog simulator, although Verilator ignores the arguments to
``$dumpvars``. See ``examples/make_tracing_c`` in the distribution.
If writing the top-level C code, call ``Verilated::traceEverOn(true)``;
this is done for you if using :vlopt:`--binary`.
B. Or, for finer-grained control, or C++ files with multiple Verilated
modules, you may also create the trace purely from C++. Create a
modules, you may also create the trace purely from C++. Create a
VerilatedVcdC object, and in your main loop, right after ``eval()`` call
``trace_object->dump(contextp->time())`` every time step, and finally
call ``trace_object->close()``.
@@ -166,27 +167,26 @@ B. Or, for finer-grained control, or C++ files with multiple Verilated
You also need to compile :file:`verilated_vcd_c.cpp` and add it to your
link, preferably by adding the dependencies in your Makefile's
:code:`$(VK_GLOBAL_OBJS)` link rule. This is done for you if you are using
the Verilator :vlopt:`--binary` or :vlopt:`--exe` option.
``$(VK_GLOBAL_OBJS)`` link rule. This is done for you if you are using the
Verilator :vlopt:`--binary` or :vlopt:`--exe` option.
you can call :code:`trace_object->trace()` on multiple Verilated objects
with the same trace file if you want all data to land in the same output
file.
you can call ``trace_object->trace()`` on multiple Verilated objects with
the same trace file if you want all data to land in the same output file.
How do I generate waveforms (traces) in SystemC?
""""""""""""""""""""""""""""""""""""""""""""""""
A. Pass the :vlopt:`--trace-vcd` option to Verilator, and in your top-level
:code:`sc_main()`, call :code:`Verilated::traceEverOn(true)`. Then you
may use :code:`$dumpfile` and code:`$dumpvars` to enable traces, as
with any Verilog simulator; see the non-SystemC example in
``sc_main()``, call ``Verilated::traceEverOn(true)``. Then you may use
``$dumpfile`` and code:`$dumpvars` to enable traces, as with any Verilog
simulator; see the non-SystemC example in
:file:`examples/make_tracing_c`. This will trace only the module
containing the :code:`$dumpvar`.
containing the ``$dumpvar``.
B. Or, you may create a trace purely from SystemC, which may trace all
Verilated designs in the SystemC model. Create a VerilatedVcdSc object
as you would create a standard SystemC trace file. For an example, see
as you would create a standard SystemC trace file. For an example, see
the call to ``VerilatedVcdSc`` in the
:file:`examples/make_tracing_sc/sc_main.cpp` file of the distribution,
and below.
@@ -212,57 +212,53 @@ C. Alternatively, you may use the C++ trace mechanism described in the
tfp->close();
}
You also need to compile :file:`verilated_vcd_sc.cpp` and
:file:`verilated_vcd_c.cpp` and add them to your link, preferably by adding
the dependencies in your Makefile's :code:`$(VK_GLOBAL_OBJS)` link rule.
This is done for you if you are using the Verilator :vlopt:`--binary` or
the dependencies in your Makefile's ``$(VK_GLOBAL_OBJS)`` link rule. This
is done for you if you are using the Verilator :vlopt:`--binary` or
:vlopt:`--exe` option.
You can call :code:`->trace()` on multiple Verilated objects with the same
You can call ``->trace()`` on multiple Verilated objects with the same
trace file if you want all data to land in the same output file.
How do I generate FST waveforms (traces) in C++ or SystemC?
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
FST is a trace file format developed by GTKWave. Verilator provides basic
FST support. To dump traces in FST format, add the :vlopt:`--trace-fst`
FST is a trace file format developed by GTKWave. Verilator provides basic
FST support. To dump traces in FST format, add the :vlopt:`--trace-fst`
option to Verilator and either:
Use :code:`$dumpfile & $dumpvars` in Verilog as described in the VCD
example above,
Use ``$dumpfile & $dumpvars`` in Verilog as described in the VCD example
above,
Or, in C++ change the include described in the VCD example above:
.. code-block:: C++
#include "verilated_fst_c.h"
VerilatedFstC* tfp = new VerilatedFstC;
.. code-block:: C++
#include "verilated_fst_c.h"
VerilatedFstC* tfp = new VerilatedFstC;
Or, in SystemC, change the include described in the VCD example above:
.. code-block:: C++
#include "verilated_fst_sc.h"
VerilatedFstC* tfp = new VerilatedFstSc;
.. code-block:: C++
#include "verilated_fst_sc.h"
VerilatedFstC* tfp = new VerilatedFstSc;
Currently, supporting FST and VCD in a single simulation is not supported,
but such usage should be unlikely. You can however ifdef around the trace
but such usage should be unlikely. You can however ifdef around the trace
format in your C++ main loop, and select VCD or FST at compile time.
How do I view waveforms (aka dumps or traces)?
""""""""""""""""""""""""""""""""""""""""""""""
Verilator creates standard VCD (Value Change Dump) and FST files. VCD
files are viewable with the open-source
`GTKWave <https://gtkwave.sourceforge.net/>`_,
`Surfer <https://surfer-project.org/>`_, Dinotrace (legacy), or any of the
many closed-source viewer offerings; FST is supported only by GTKWave and
Verilator creates standard VCD (Value Change Dump) and FST files. VCD files
are viewable with the open-source `GTKWave
<https://gtkwave.sourceforge.net/>`_, `Surfer
<https://surfer-project.org/>`_, Dinotrace (legacy), or any of the many
closed-source viewer offerings; FST is supported only by GTKWave and
Surfer.
@@ -287,24 +283,24 @@ D. You can also consider using FST tracing instead of VCD. FST dumps are a
is prohibitively large.
E. Write your trace files to a machine-local solid-state drive instead of a
network drive. Network drives are generally far slower.
network drive. Network drives are generally far slower.
Where is the translate_off command? (How do I ignore a construct?)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Where is the translate_off command? (How do I ignore a construct?)
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Translate on/off pragmas are generally a bad idea, as it's easy to have
mismatched pairs, and you can't see what another tool sees by just
preprocessing the code. Instead, use the preprocessor; Verilator defines
preprocessing the code. Instead, use the preprocessor; Verilator defines
the ``\`VERILATOR`` define for you, so just wrap the code in an ifndef
region:
.. code-block:: sv
:emphasize-lines: 1
.. code-block:: sv
:emphasize-lines: 1
`ifndef VERILATOR
Something_Verilator_Dislikes;
`endif
`ifndef VERILATOR
Something_Verilator_Dislikes;
`endif
Most synthesis tools similarly define SYNTHESIS for you.
@@ -312,10 +308,10 @@ Most synthesis tools similarly define SYNTHESIS for you.
Why do I get "unexpected 'do'" or "unexpected 'bit'" errors?
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
The words \ ``do``\ , \ ``bit``\ , \ ``ref``\ , \ ``return``\ , and others
are reserved keywords in SystemVerilog. Older Verilog code might use these
as identifiers, and you should change your code to not use them to ensure it
works with newer tools. Alternatively, surround them by the Verilog
The words ``do``, ``bit``, ``ref``, ``return``, and others are reserved
keywords in SystemVerilog. Older Verilog code might use these as
identifiers, and you should change your code to not use them to ensure it
works with newer tools. Alternatively, surround them by the Verilog
2005/SystemVerilog begin_keywords pragma to indicate Verilog 2001 code.
.. code-block:: sv
@@ -325,7 +321,6 @@ works with newer tools. Alternatively, surround them by the Verilog
integer bit; initial bit = 1;
`end_keywords
If you want the whole design parsed as Verilog 2001, see the
:vlopt:`--default-language` option.
@@ -333,8 +328,8 @@ If you want the whole design parsed as Verilog 2001, see the
How do I prevent my assertions from firing during reset?
""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Call :code:`Verilated::assertOn(false)` before you first call the model,
then turn it back on after reset. It defaults to true. When false, all
Call ``Verilated::assertOn(false)`` before you first call the model, then
turn it back on after reset. It defaults to true. When false, all
assertions are disabled.
@@ -342,36 +337,36 @@ Why do I get "undefined reference to sc_time_stamp()?
"""""""""""""""""""""""""""""""""""""""""""""""""""""
In Verilator 4.200 and later, using the timeInc function is recommended
instead. See the :ref:`Connecting to C++` examples. Some linkers (MSVC++)
still require :code:`sc_time_stamp()` to be defined; either define this
with :code:`double sc_time_stamp() { return 0; }` or compile the Verilated
code with :code:`-CFLAGS -DVL_TIME_CONTEXT`.
instead. See the :ref:`Connecting to C++` examples. Some linkers (MSVC++)
still require ``sc_time_stamp()`` to be defined; either define this with
``double sc_time_stamp() { return 0; }`` or compile the Verilated code with
``-CFLAGS -DVL_TIME_CONTEXT``.
Before Verilator 4.200, the :code:`sc_time_stamp()` function needs to be
Before Verilator 4.200, the ``sc_time_stamp()`` function needs to be
defined in C++ (non SystemC) to return the current simulation time.
Why do I get "undefined reference to \`VL_RAND_RESET_I' or \`Verilated::...'"?
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
You need to link your compiled Verilated code against the
:code:`verilated.cpp` file found in the include directory of the Verilator
kit. This is one target in the ``$(VK_GLOBAL_OBJS)`` make variable, which
should be part of your Makefile's link rule. If you use :vlopt:`--exe` or
:vlopt:`--binary`, this is done for you.
You need to link your compiled Verilated code against the ``verilated.cpp``
file found in the include directory of the Verilator kit. This is one
target in the ``$(VK_GLOBAL_OBJS)`` make variable, which should be part of
your Makefile's link rule. If you use :vlopt:`--exe` or :vlopt:`--binary`,
this is done for you.
Is the PLI supported?
"""""""""""""""""""""
Only somewhat. More specifically, the common PLI-ish calls $display,
$finish, $stop, $time, $write are converted to C++ equivalents. You can
Only somewhat. More specifically, the common PLI-ish calls $display,
$finish, $stop, $time, $write are converted to C++ equivalents. You can
also use the "import DPI" SystemVerilog feature to call C code (see the
chapter above). There is also limited VPI access to public signals.
chapter above). There is also limited VPI access to public signals.
If you want something more complex, since Verilator emits standard C++
code, you can write C++ routines that can access and modify signal
values without needing any PLI interface code, and call it with
code, you can write C++ routines that can access and modify signal values
without needing any PLI interface code, and call it with
$c("{any_c++_statement}").
See the :ref:`Connecting` section.
@@ -380,8 +375,8 @@ See the :ref:`Connecting` section.
How do I make a Verilog module that contains a C++ object?
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
You need to add the object to the structure Verilator creates, then
use $c to call a method inside your object. The
You need to add the object to the structure Verilator creates, then use $c
to call a method inside your object. The
:file:`test_regress/t/t_extend_class` files in the distribution show an
example of how to do this.
@@ -399,17 +394,17 @@ How do I get faster build times?
disabled on these routines. See the OPT_FAST and OPT_SLOW make variables
and :ref:`Benchmarking & Optimization`.
* Use a recent compiler. Newer compilers tend to be faster.
* Use a recent compiler. Newer compilers tend to be faster.
* Compile in parallel on many machines and use caching; see the web for the
ccache, sccache, distcc, or icecream packages. ccache will skip GCC runs between
identical source builds, even across different users. If ccache was
installed when Verilator was built, it is used, or see OBJCACHE
ccache, sccache, distcc, or icecream packages. ccache will skip GCC runs
between identical source builds, even across different users. If ccache
was installed when Verilator was built, it is used, or see OBJCACHE
environment variable to override this. Also see the
:vlopt:`--output-split` option and :ref: `Profiling ccache efficiency`.
* To reduce the compile time of classes that use a Verilated module (e.g., a
top CPP file) you may wish to add a
* To reduce the compile time of classes that use a Verilated module (e.g.,
a top CPP file) you may wish to add a
:option:`/*verilator&32;no_inline_module*/` metacomment to your top-level
module. This will decrease the amount of code in the model's Verilated
class, improving compile times of any instantiating top-level C++ code,
@@ -421,27 +416,27 @@ How do I get faster build times?
Why do so many files need to recompile when I add a signal?
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Adding a new signal requires the symbol table to be recompiled. Verilator
uses one large symbol table, resulting in 2-3 fewer assembly
instructions for each signal access. This makes the execution time 10-15%
faster, but can result in more compilations when something changes.
Adding a new signal requires the symbol table to be recompiled. Verilator
uses one large symbol table, resulting in 2-3 fewer assembly instructions
for each signal access. This makes the execution time 10-15% faster, but
can result in more compilations when something changes.
How do I access Verilog functions/tasks in C?
"""""""""""""""""""""""""""""""""""""""""""""
Use the SystemVerilog Direct Programming Interface. You write a Verilog
Use the SystemVerilog Direct Programming Interface. You write a Verilog
function or task with input/outputs that match what you want to call in
with C. Then mark that function as a DPI export function. See the DPI
with C. Then mark that function as a DPI export function. See the DPI
chapter in the IEEE Standard.
How do I access C++ functions/tasks in Verilog?
"""""""""""""""""""""""""""""""""""""""""""""""
Use the SystemVerilog Direct Programming Interface. You write a Verilog
Use the SystemVerilog Direct Programming Interface. You write a Verilog
function or task with input/outputs that match what you want to call in
with C. Then mark that function as a DPI import function. See the DPI
with C. Then mark that function as a DPI import function. See the DPI
chapter in the IEEE Standard.
@@ -450,44 +445,43 @@ How do I access signals in C?
The best thing to do is to make a SystemVerilog "export DPI" task or
function that accesses that signal, as described in the DPI chapter in the
manual and DPI tutorials on the web. This will allow Verilator to
optimize the model better and should be portable across simulators.
manual and DPI tutorials on the web. This will allow Verilator to optimize
the model better and should be portable across simulators.
If you really want raw access to the signals, declare the signals you will
be accessing with a :option:`/*verilator&32;public*/` metacomment before
the closing semicolon. Then scope into the C++ class to read the value of
the closing semicolon. Then scope into the C++ class to read the value of
the signal, as you would any other member variable.
Signals are the smallest of 8-bit unsigned chars (equivalent to uint8_t),
16-bit unsigned shorts (uint16_t), 32-bit unsigned longs (uint32_t), or
64-bit unsigned long longs (uint64_t) that fit the width of the signal.
Generally, you can use just uint32_t's for 1 to 32 bits, or uint64_t for
1 to 64 bits, and the compiler will properly up-convert smaller entities.
Generally, you can use just uint32_t's for 1 to 32 bits, or uint64_t for 1
to 64 bits, and the compiler will properly up-convert smaller entities.
Note that even signed ports are declared as unsigned; you must sign extend
yourself to the appropriate signal width.
Signals wider than 64 bits are stored as an array of 32-bit uint32_t's.
Thus, to read bits 31:0, access signal[0], and for bits 63:32, access
signal[1]. Unused bits (for example, bit numbers 65-96 of a 65-bit vector)
will always be zero. If you change the value, you must pack
zeros in the unused bits, or core-dumps may result because Verilator strips
array bound checks where it believes them to be unnecessary to improve
performance.
signal[1]. Unused bits (for example, bit numbers 65-96 of a 65-bit vector)
will always be zero. If you change the value, you must pack zeros in the
unused bits, or core-dumps may result because Verilator strips array bound
checks where it believes them to be unnecessary to improve performance.
In the SYSTEMC example above, if you had in our.v:
.. code-block:: sv
.. code-block:: sv
input clk /*verilator public*/;
// Note the placement of the semicolon above
input clk /*verilator public*/;
// Note the placement of the semicolon above
From the sc_main.cpp file, you'd then:
.. code-block:: C++
.. code-block:: C++
#include "Vour.h"
#include "Vour_our.h"
std::cout << "clock is " << top->our->clk << std::endl;
#include "Vour.h"
#include "Vour_our.h"
std::cout << "clock is " << top->our->clk << std::endl;
In this example, clk is a bool you can read or set as any other variable.
@@ -498,11 +492,11 @@ clocks, or you'll get strange results.
Should a module be in Verilog or SystemC?
"""""""""""""""""""""""""""""""""""""""""
Sometimes there is a block that only interconnects instances, and you have a
choice if you write it in Verilog or SystemC. Everything else being
equal, the best performance is when Verilator sees all of the design. So, look
at the hierarchy of your design, labeling instances as to if they are
SystemC or Verilog. Then:
Sometimes there is a block that only interconnects instances, and you have
a choice if you write it in Verilog or SystemC. Everything else being
equal, the best performance is when Verilator sees all of the design. So,
look at the hierarchy of your design, labeling instances as to if they are
SystemC or Verilog. Then:
* A module with only SystemC instances below must be SystemC.
@@ -510,7 +504,7 @@ SystemC or Verilog. Then:
SystemC. (As Verilator cannot connect to lower-level SystemC instances.)
* A module with only Verilog instances below can be either, but for best
performance should be Verilog. (The exception is if you have a design
that is instantiated many times; in this case, Verilating one of the lower
modules and instantiating that Verilated instances multiple times into a
SystemC module *may* be faster.)
performance should be Verilog. (The exception is if you have a design
that is instantiated many times; in this case, Verilating one of the
lower modules and instantiating that Verilated instances multiple times
into a SystemC module *may* be faster.)
+29 -31
View File
@@ -1,11 +1,11 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
*****
Files
*****
.. _Files in the Distribution:
.. _files in the distribution:
Files in the Git Tree
=====================
@@ -28,7 +28,7 @@ Verilator:
test_regress => Internal tests
.. _Files Read/Written:
.. _files read/written:
Files Read/Written
==================
@@ -42,33 +42,33 @@ For --cc/--sc, it creates:
.. list-table::
* - *{prefix}*\ .json
* - *{prefix}*.json
- JSON build definition compiling (from --make json)
* - *{prefix}*\ .mk
* - *{prefix}*.mk
- Make include file for compiling (from --make gmake)
* - *{prefix}*\ _classes.mk
- Make include file with class names (from --make gmake)
* - *{prefix}*\ .h
* - *{prefix}*.h
- Model header
* - *{prefix}*\ .cpp
* - *{prefix}*.cpp
- Model C++ file
* - *{prefix}*\ ___024root.h
- Top-level internal header file (from SystemVerilog $root)
* - *{prefix}*\ ___024root.cpp
- Top-level internal C++ file (from SystemVerilog $root)
* - *{prefix}*\ ___024root\ *{__n}*\ .cpp
* - *{prefix}*\ ___024root\ *{__n}*.cpp
- Additional top-level internal C++ files
* - *{prefix}*\ ___024root__Slow\ *{__n}*\ .cpp
* - *{prefix}*\ ___024root__Slow\ *{__n}*.cpp
- Infrequent cold routines
* - *{prefix}*\ ___024root__Trace\ *{__n}*\ .cpp
* - *{prefix}*\ ___024root__Trace\ *{__n}*.cpp
- Wave file generation code (from --trace-\*)
* - *{prefix}*\ ___024root__Trace__Slow\ *{__n}*\ .cpp
* - *{prefix}*\ ___024root__Trace__Slow\ *{__n}*.cpp
- Wave file generation code (from --trace-\*)
* - *{prefix}*\ __Dpi.h
- DPI import and export declarations (from --dpi)
* - *{prefix}*\ __Dpi.cpp
- Global DPI export wrappers (from --dpi)
* - *{prefix}*\ __Dpi_Export\ *{__n}*\ .cpp
* - *{prefix}*\ __Dpi_Export\ *{__n}*.cpp
- DPI export wrappers scoped to this particular model (from --dpi)
* - *{prefix}*\ __Inlines.h
- Inline support functions
@@ -76,11 +76,11 @@ For --cc/--sc, it creates:
- Global symbol table header
* - *{prefix}*\ __Syms.cpp
- Global symbol table C++
* - *{prefix}{each_verilog_module}*\ .h
* - *{prefix}{each_verilog_module}*.h
- Lower level internal header files
* - *{prefix}{each_verilog_module}*\ .cpp
* - *{prefix}{each_verilog_module}*.cpp
- Lower level internal C++ files
* - *{prefix}{each_verilog_module}{__n}*\ .cpp
* - *{prefix}{each_verilog_module}{__n}*.cpp
- Additional lower C++ files
For --hierarchical mode, it creates:
@@ -106,14 +106,12 @@ In specific debug and other modes, it also creates:
.. list-table::
* - *{prefix}*\ .sarif
* - *{prefix}*.sarif
- SARIF diagnostics (from --diagnostics-sarif)
* - *{prefix}*\ .tree.json
* - *{prefix}*.tree.json
- JSON tree information (from --json-only)
* - *{prefix}*\ .tree.meta.json
* - *{prefix}*.tree.meta.json
- JSON tree metadata (from --json-only)
* - *{prefix}*\ .xml
- XML tree information (from --xml)
* - *{prefix}*\ __cdc.txt
- Clock Domain Crossing checks (from --cdc)
* - *{prefix}*\ __stats.txt
@@ -124,30 +122,30 @@ In specific debug and other modes, it also creates:
- Make dependencies (from -MMD)
* - *{prefix}*\ __verFiles.dat
- Timestamps (from --skip-identical)
* - *{prefix}{misc}*\ .dot
* - *{prefix}{misc}*.dot
- Debugging graph files (from --debug)
* - *{prefix}{misc}*\ .tree
* - *{prefix}{misc}*.tree
- Debugging files (from --debug)
* - *{prefix}*\ __inputs\ .vpp
* - *{prefix}*\ __inputs.vpp
- Pre-processed verilog for all files (from --debug)
* - *{prefix}*\ _ *{each_verilog_base_filename}*\ .vpp
* - *{prefix}*\ _ *{each_verilog_base_filename}*.vpp
- Pre-processed verilog for each file (from --debug)
After running Make, the C++ compiler may produce the following:
.. list-table::
* - verilated{misc}*\ .d
* - verilated{misc}*.d
- Intermediate dependencies
* - verilated{misc}*\ .o
* - verilated{misc}*.o
- Intermediate objects
* - {mod_prefix}{misc}*\ .d
* - {mod_prefix}{misc}*.d
- Intermediate dependencies
* - {mod_prefix}{misc}*\ .o
* - {mod_prefix}{misc}*.o
- Intermediate objects
* - *{prefix}*\
- Final executable (from --exe)
* - lib\ *{prefix}*\ .a
* - lib\ *{prefix}*.a
- Final archive (default lib mode)
* - libverilated.a
- Runtime for verilated model (default lib mode)
@@ -155,9 +153,9 @@ After running Make, the C++ compiler may produce the following:
- Library of all Verilated objects
* - *{prefix}*\ __ALL.cpp
- Include of all code for single compile
* - *{prefix}{misc}*\ .d
* - *{prefix}{misc}*.d
- Intermediate dependencies
* - *{prefix}{misc}*\ .o
* - *{prefix}{misc}*.o
- Intermediate objects
The Verilated executable may produce the following:

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