Compare commits

...
3269 Commits
Author SHA1 Message Date
Wilson Snyder d0aa828c21 Version bump 2026-04-26 01:52:06 -04:00
Geza Lore 42ea9fda17 Commentary: Changes update 2026-04-25 17:56:03 +01:00
Wilson Snyder 00211c290c Commentary 2026-04-25 11:41:30 -04:00
Wilson Snyder 5c989025c7 Commentary: Changes update 2026-04-25 11:26:51 -04:00
github action d1c0184916 Apply 'make format' 2026-04-25 15:17:45 +00:00
M2kar 07d91fb253 Fix infinite recursion with VERILATOR_BIN (#7496) (#7497)
Fixes #7496.
2026-04-25 17:16:50 +02:00
Wilson Snyder 555d7cc043 Tests: Remove old .out files and related cleanups 2026-04-24 12:25:28 -04:00
Wilson Snyder b8d59ed7a8 Commentary: Changes update 2026-04-24 12:22:26 -04:00
em2machine b1d3d63e9f Fix for unction argument expects a class refetence (#7483) (#7489)
Fixes #7483.
2026-04-24 10:31:57 +02:00
Wilson Snyder 2cd9b8df66 Fix multiple inclusion of verilated_std.sv (#7478). 2026-04-23 15:32:02 -04:00
Wilson Snyder 64b91023b1 Commentary: Changes update 2026-04-23 12:47:22 -04:00
em2machine 121fd3f613 Fix module parameters not re-evaluated upon instantiation (#7463) (#7477) 2026-04-23 12:30:42 -04:00
Geza Lore ba3937734f Optimize mix of Concat/Extend assignments (#7479)
Generalize concatenation splitting/balancing in V3FuncOpt to also handle
AstExtend (which is a Concat with a 0 LHS).
2026-04-23 16:57:43 +01:00
Alex Zhou 7e0f25b41b Fix access to static variable inside function (#7474) (#7475)
Fixes #7474.
2026-04-23 11:17:14 -04:00
Yilou Wang 27e7fdc9eb Fix std::randomize inside {typedef array} internal error (#7481)
Fixes #7481.
2026-04-23 11:16:24 -04:00
Yilou Wang ae642facf5 Fix function-in-constraint internal error on bare port VarRef return (#7473) (#7480)
Fixes #7473.
2026-04-23 10:47:39 -04:00
Geza Lore 3149f43372 Internals: Add special Dfg vertex for replication (#7471) 2026-04-23 10:14:27 +01:00
Yilou Wangandgithub action cfebe805c9 Support implication operator with constraint_set (#7300) (#7448)
* Support implication operator with constraint_set

* improve coverage, achieve 100 line cov

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

* Apply 'make format'

* re-run

---------

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

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

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

* Apply 'make format'

* merge test and update 2 space indents

---------

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

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

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

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

* Apply 'make format'

* update the .out file

* add both-sides case

---------

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

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

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

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

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

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

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

Fixes #7221
2026-03-10 07:06:00 +00:00
em2machine 1b2b8afdc1 Fix wrong $bits() for parameterized interface struct typedefs (#7218) (#7219) 2026-03-09 22:32:13 -04:00
Veripool API Bot 1f67080a1f Tests: Verilog format 2026-03-09 21:39:16 -04:00
dependabot[bot] b33537d7a7 CI: Bump docker actions with 5 updates (#7220) 2026-03-09 14:49:19 -04:00
Veripool API Bot 07ed6aef53 Tests: Verilog format 2026-03-08 18:26:40 -04:00
Christian Hecken 9c5f4e2483 Internals: Extend VerilatedVar to hold force control signal pointers (#7217) 2026-03-08 15:53:32 -04:00
Christian HeckenandChristian Hecken 0019c12242 Fix vpi_handle_by_name generated scope retrieval (#7187 repair) (#7214)
Co-authored-by: Christian Hecken <[email protected]>
2026-03-07 20:36:29 -05:00
Wilson Snyder 3097df46fa Change --converge-limit default to 10000 (#7209).
Fixes #7209.
2026-03-07 09:05:37 -05:00
Wilson Snyder 68d6dd7eee Internals: Add UASSERT to avoid error fault on sv-tests regress-sv_sv_import_hier_fail1_iv 2026-03-07 09:03:42 -05:00
Wilson Snyder 67ced4715d Tests: Fix t_json_only_debugcheck to not need sensitive golden file 2026-03-07 08:35:54 -05:00
Wilson Snyder 4d369e4262 Fix --debug-inputs for .vlt files 2026-03-07 08:01:27 -05:00
Veripool API Bot cf965464a2 Tests: Verilog format 2026-03-07 08:00:45 -05:00
Wilson Snyder b38c4bd7d6 Commentary: Changes update 2026-03-07 08:00:10 -05:00
em2machine bef5c1f475 Fix static function not found from parameterized extends class (#7204) (#7208) 2026-03-06 16:23:02 -05:00
Rahul Behl efa53189ea Support constraint with item.index array reduction (#7198) 2026-03-06 05:14:55 -05:00
Geza Lore cedec65c39 Change array tracing to always dump left index to right index (#7205)
Also add array bounds and struct/union member counts to trace pushPrefix
(not used by vcd/fst/saif). Together these improve consistency in some
waveform formats.
2026-03-06 09:32:08 +00:00
Wilson Snyder b89d29cab9 * Support procedural concurrent assertion simple cases (#6944).
Fixes #6944.
2026-03-05 20:03:48 -05:00
Wilson Snyder c2d65c2e13 * Fix class extend references between queues (#7195).
Fixes #7195.
2026-03-05 18:04:22 -05:00
Wilson Snyder caf624944f Commentary: Changes update 2026-03-05 18:04:22 -05:00
github action fb00eb3bc6 Apply 'make format' 2026-03-05 21:06:48 +00:00
Julian Carrier 45a5e72509 Fix recursive default assignment for subarrays (#4589) (#7202) 2026-03-05 16:05:54 -05:00
Geza Lore 4f4d48e9d7 Fix library/hier_block tracing when top name is empty (#7200) 2026-03-05 08:44:41 -05:00
Ryszard Rozak 258629634c Support force assignments to array elements of real type (#7048) 2026-03-05 08:37:20 -05:00
Nick Brereton e5ad9b3a4b Support Z non-blocking assignment (#7192) (#496) (#7197) 2026-03-04 22:39:05 -05:00
Wilson Snyder 572f50126b Improve function call argument error to show target function (rewording) 2026-03-04 20:22:25 -05:00
Wilson Snyder c93f5256d4 Fix string cast on array call 2026-03-04 20:12:10 -05:00
Veripool API Bot 4ff518de61 Verilog format 2026-03-04 20:12:10 -05:00
Wilson Snyder 9150e9b522 Commentary: Changes update 2026-03-04 20:07:05 -05:00
Christian Hecken 84f3cc4f48 Add VPI array indexing support in signal names (#7097) (#7187) 2026-03-04 19:37:06 -05:00
Wilson Snyder 1bf2ea7643 Improve function call argument error to show target function 2026-03-04 19:01:01 -05:00
Igor Zaworski 7acd73fede Fix super constructor calls with local variables, by using init functions (#6214) (#6933) 2026-03-04 17:55:55 -05:00
em2machine c34cd6ddf1 Fix missing scope when calling package function (#7128 repair) (#7188) (#7190) 2026-03-04 15:37:55 -05:00
Rahul Behl 9a5c1d27c8 Support array reduction methods with 'with' clause in constraints (#6455) (#6999) 2026-03-04 12:01:35 -05:00
Nick Brereton 44701201ac Support inout inside SV interface (#3466) (#7134) 2026-03-04 09:08:07 -05:00
jalcim 7cf539cf05 Add --func-recursion-depth CLI option (#7175) (#7179) 2026-03-04 06:46:07 -05:00
Yilou Wang 3bc73cc768 Support constraint imperfect distributions (#6811) (#7168) 2026-03-03 11:23:14 -05:00
em2machine 5f3d475736 Internals: Minor coverage improvement as followup to (#7128 followup) (#7184) 2026-03-03 11:13:32 -05:00
Wilson Snyder f232449252 Commentary: Changes update 2026-03-03 07:21:39 -05:00
Veripool API Bot ce4d35aa85 Verilog format 2026-03-03 07:21:24 -05:00
em2machine 5821d0697c Fix interface localparam dependencies and arbitrary nesting (#6936) (#7128) 2026-03-03 06:55:59 -05:00
Yilou Wang ed84f3adb2 Support constraints on fixed-size array of class object members (#7170) (#7183) 2026-03-03 06:27:31 -05:00
Wilson Snyder ee68d1c70c CI: Disallow pulls to stable 2026-03-02 17:48:32 -05:00
Wilson Snyder 1f2f4d9bba Commentary: Changes update 2026-03-02 17:47:54 -05:00
jalcim d406efdcf9 Fix recursive constant function in $unit scope (#7174) (#7178) 2026-03-02 15:15:34 -05:00
Wilson Snyder 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
Wilson Snyder 184f8f7920 Version bump 2025-11-02 11:12:46 -05:00
Wilson Snyder 89f0e1def0 Commentary 2025-11-02 10:48:48 -05:00
Wilson Snyder d49697a85f Tests: Redo uvm test and package to be version based and use uvm_info 2025-11-02 10:46:16 -05:00
Wilson Snyder c801237ce8 Add --preproc-defines. 2025-11-01 23:27:43 -04:00
Wilson Snyder 1d69c18e33 Internals: Fix verilated.mk duplicate rule 2025-11-01 23:22:08 -04:00
Wilson Snyder e089817951 Tests: Reanme dump test 2025-11-01 22:05:52 -04:00
Wilson Snyder d4aa00dbeb Change --preproc-comments to be new name of --pp-comments option. 2025-11-01 21:59:16 -04:00
Wilson Snyder e6cdaf112c Internals: Add --dump-inputs to make __inputs without needing --debug 2025-11-01 20:34:06 -04:00
Wilson Snyder 8750cdac73 Update UVM 1800.2 2017-1.1 waivers 2025-11-01 16:34:31 -04:00
Wilson Snyder 2b8c9a1cff Internals: Remove mis-merged duplicate Makefile targets 2025-11-01 14:19:29 -04:00
Wilson Snyder cd8af21915 Add lint-py type checking using mypy 2025-11-01 14:15:39 -04:00
Wilson Snyder 782fe1daf2 Internals: Add more python strict typing. No functional change intended 2025-11-01 14:14:56 -04:00
Wilson Snyder 5847b105a5 Internals: Run format-make 2025-11-01 14:12:47 -04:00
Wilson Snyder 330b2589ed Internals: Run format-yaml 2025-11-01 14:11:47 -04:00
Wilson Snyder 76ec35a8f6 Internals: Move max_procs to VtOs package. No test change intended. 2025-11-01 12:17:22 -04:00
Wilson Snyder 00ac706f67 Commentary: Changes update 2025-11-01 11:46:00 -04:00
Geza Lore 2e502aead8 Internals: Make all scheduling region use a single trigger vector. (#6620)
The 'act' region used to have 2 trigger vectors ('act' and 'pre'), now
it uses a single "extended" trigger vector where the top bits are what
used to be the used bits in the 'pre' trigger vector. Please see the
description above `TriggerKit`. Also move the extra triggers from the
low end to the high end in the trigger vectors.
2025-11-01 15:43:20 +00:00
Paul SwirhunandPaul Swirhun e27613ed45 Fix interface parameter access in parameter map (#6587) (#6621) (#6623)
Co-authored-by: Paul Swirhun <[email protected]>
2025-10-31 23:06:26 -04:00
Paul SwirhunandPaul Swirhun 847de990de Tests: Fix sched_getaffinity fallback for MacOS (#6622) (#6624)
Co-authored-by: Paul Swirhun <[email protected]>
2025-10-31 21:55:45 -04:00
Paul SwirhunandPaul Swirhun 10935ee031 Fix HIERPARAM to be suppressed for interface ports (#6587) (#6609)
Co-authored-by: Paul Swirhun <[email protected]>
2025-10-31 15:49:30 -04:00
Geza Lore 922223a9c3 Internals: Replace VlTriggerVec with unpacked array (#6616)
Removed the VlTriggerVec type, and refactored to use an unpacked array
of 64-bit words instead. This means the trigger vector and its
operations are now the same as for any other unpacked array. The few
special functions required for operating on a trigger vector are now
generated in V3SchedTrigger as regular AstCFunc if needed.

No functional change intended, performance should be the same.
2025-10-31 18:29:11 +00:00
Wilson Snyder 08330f5fe2 Fix constant-arrayed instance parameters (#6614). 2025-10-30 19:18:47 -04:00
github action 884b48578d Apply 'make format' 2025-10-30 22:42:18 +00:00
Wilson Snyder 85119cb32e Fix waiving messages with empty contents (#6610). 2025-10-30 18:41:18 -04:00
Wilson Snyder d81da042cd Tests: Rename tests to match warning name 2025-10-30 18:32:25 -04:00
Wilson Snyder 1e08c912d7 Commentary: Changes update 2025-10-30 18:26:46 -04:00
Geza Lore da1bca5c9b CI: Add BlackParrot to RTLMeter runs (#6615) 2025-10-30 20:34:31 +00:00
Geza Lore da7dd1fa16 Internals: Move roundUpToMultipleOf into vlstd:: 2025-10-30 15:58:49 +00:00
Geza Lore cc910fa4c4 Internals: Clear 'isPure' cache in V3Depth 2025-10-30 15:18:47 +00:00
Geza Lore a4c5d2e29c Fix ENUMVALUE error when overriding enum param from CLI using -G/-pvalue 2025-10-30 12:04:12 +00:00
Geza Lore 2a0b331ee3 Fix -G and -pvalue with --hierarchical.
Properly strip these from the hier_block builds, but not from the top
level wrapper. Improve existing test to cover.
2025-10-30 12:04:12 +00:00
Todd Strader af2771e901 Fix function call expression coverage (#6589) 2025-10-29 19:26:46 -04:00
Geza Lore 287fdb7312 Fix mis-ignoring virtual interface member triggers (#5116 reopened) (#6613) 2025-10-29 17:27:15 -04:00
Todd Strader 50b89ac9b5 Tests: Add --top-filename to driver.py (#6612) 2025-10-29 16:45:10 -04:00
Igor Zaworski 28dd90e92d Fix side effects for improved function/task/process purity (#6559) 2025-10-29 14:27:31 -04:00
Geza Lore 1f04cd868c CI: Run some RTLMeter cases with --hierarchical (#6605) 2025-10-28 20:48:08 -04:00
Geza Lore 04e39168c4 CI: Disable ccache on macOS (#6607) 2025-10-28 18:11:04 +00:00
Geza Lore ffbb3229a8 Change default thread pool sizes to respect processor affinity (#6604)
Instead of using the number of processors in the host, use the number of
processors available to the process, respecting cpu affinity
assignments. Without pthreads, fall back and use the number of
processors in the host as before.

This is now applied everywhere so runing `nuamctl -C 0-3 verilator` or
`numactl -C 0-3 Vsim` should behave as if the host has 4 cores (e.g.
like in CI jobs)
2025-10-28 18:10:40 +00:00
Geza Lore 5642de432b Tests: Add tests for -fno-dfg-peephole* (#6606)
Fixes -fno-dfg-peeophole-right-leaning-assoc.

Fixes #6601
2025-10-28 17:59:11 +00:00
Geza Lore 766514bdcf Fix --hierarchical with --binary (#6602)
Used to fail with "can't use --exe with --lib-create", and we didn't
have any tests for it before. (The equivalent --main --exe --build
--timing works)
2025-10-28 17:02:21 +00:00
Wilson Snyder b652009235 Internals: Fix name of some static and thread variables. No functional change. 2025-10-27 20:49:41 -04:00
Wilson Snyder 9513edfdd6 Fix processor parsing static position (#6598) 2025-10-27 20:44:55 -04:00
Wilson Snyder f9adc3461d Tests: Fix coverage holes from t_dist_docs_options 2025-10-27 19:16:53 -04:00
Wilson Snyder 1a1862352a Commentary: Changes update 2025-10-27 19:14:57 -04:00
Geza Lore cddbb5e095 Internals: Split some code from V3Sched.cpp
Add V3SchedUtil.cpp that contains common small utility functions.

Add V3SchedTrigger.cpp that contains functionality building the trigger
mechanism code.

No functional change, just code movement. Prep for some further work.
2025-10-27 21:18:47 +00:00
dependabot[bot] 151b17ac82 CI: Bump actions/upload-artifact from 4 to 5 (#6600) 2025-10-27 13:46:11 -04:00
dependabot[bot] fafe3737a2 CI: Bump actions/download-artifact from 5 to 6 (#6599) 2025-10-27 13:04:36 -04:00
Geza Lore 60c532908e Internals: Create if statements for triggers during scheduling (#6280) (#6581)
The AstIf nodes conditional on events being triggered used to be created
in V3Clock. Now it is in V3Sched*, in order to avoid having to pass
AstActive in CFunc or MTask bodies. No functional change intended, some
improved optimization due to simplifying timing triggers that were
previously missed, also fixes what seems like a bug in the original
timing commit code.
2025-10-27 10:41:30 +00:00
Geza Lore 6ec5c85bea Fix incorrectly resuming process waiting on multiple events (#6597)
This fixes the bug discovered with #6581.
2025-10-26 15:41:49 +00:00
Geza Lore 1efec71437 Internals: Remove unused VCMethod::SCHED_TRIGGERED 2025-10-26 10:34:12 +00:00
Geza Lore f8ea1d3490 Testing: Ignore t_flag_debugi9 in make test-snap 2025-10-26 09:55:24 +00:00
Geza Lore e00a919269 Tests: Fix race condition in t_flag_csplit 2025-10-26 09:47:23 +00:00
Geza Lore d236e4c054 Internals: Cleanup scheduling
sched_forks.tree used to be dumped before sched.tree, while it's
basically after, so move transformForks in to a separate pass. Also
extract inlined visitors in V3SchedTiming.
2025-10-26 09:47:09 +00:00
Geza Lore 388fc863f4 Internals: Enable VL_DBG_AS in asan builds 2025-10-26 09:00:58 +00:00
Geza Lore bfb20397d9 Internals: Fix fallout from #6588 2025-10-26 08:48:26 +00:00
Geza Lore 7225c902ee Fix V3Life eliminating assignments across timing controls (#6593) (#6596)
For both JumpBlock and Loop, record if they contain a timing control and
do not eliminate assignments across them if so.

Fixes #6593
2025-10-25 21:59:21 +02:00
Geza Lore 0ead54b17e Support dotted access to ports of a direct hier_block instance. (#6595)
Accessing the ports of hier_block instances directly under the current
hier_block (or top level) work just fine (the heir stub .sv has them),
and this can simplify hooking up dotted references into hier blocks:
push part of the reference under the hier block into the hier block, and
wire it to a port, then resolve the rest of the reference to the port of
the instance.
2025-10-25 18:39:21 +01:00
Wilson Snyder 68b227065e Tests: Fix coverage holes from t_dist_docs_options 2025-10-25 11:00:25 -04:00
Wilson Snyder bd4743f420 Tests: Rename some optimization tests 2025-10-25 10:57:39 -04:00
Wilson Snyder dd76a5b8ba Add t_dist_docs_options checks, and fix related docs and coverage issues 2025-10-25 10:53:24 -04:00
Wilson Snyder e21dd04159 Tests: Rename test_regress/t/t_dist_docs_options.py 2025-10-25 10:53:24 -04:00
Geza Lore 92b490f2f7 Fix excessive logic replication in Dfg circular driver tracing (#6561) (#6594)
Cache already traced vertices and reuse them on subsequent traces. This
avoids a potential combinatorial explosion in the size of the resulting
circuit.
2025-10-25 15:07:22 +01:00
Wilson Snyder e732f656a9 Change verilator_difftree to return exit code 1 on mismatch, 2 on error. 2025-10-25 08:25:29 -04:00
Wilson Snyder 9f6719d28d Fix segfault on type casts (#6574). 2025-10-24 20:14:41 -04:00
Wilson Snyder c1ecddf26a Commentary: Changes update 2025-10-24 20:13:34 -04:00
Geza Lore d864057a60 Internals: Refactor AstNodeBlock representation (#6280) (#6588)
Internals: Refactor AstNodeBlock representation (#6280)

AstNodeBlock now has 2 child lists: 'declsp' to hold declarations within
the block, and 'stmtsp' to hold the procedural statements.

AstBegin is then just a simple subtype of AstNodeBlock.

AstFork is a proper superset of AstNodeBlock (and also AstBegin), and
adds 'forksp' which hold the parallel statements. Having the sequential
'stmtsp' in AstFork is required to properly implement variable
initializers in fork blocks (IEEE 1800-2023 9.3.2), this makes that
clear, while also separating the non AstNodeStmt declarations
(for #6280). The actual fork branches in 'AstFork::forkps()' are all
AstBegin nodes. This is required as lowering stages will introduce
additional statements in each parallel branch. (We used to wrap AstFork
statements into AstBegin in 3 different places, now they always are
AstBegin and this is enforced via the type checker/V3Broken).

Also fixes incorrect disabling of forked processes from within the `fork`.
2025-10-24 14:00:07 +01:00
Bartłomiej Chmiel 65c5071246 Internals: Cleanup V3FuncOpt (#6590) 2025-10-24 07:42:13 -04:00
Christian Hecken cc28b07dc1 Tests: Fix driver.py error for missing scenario (#6586) 2025-10-23 12:48:02 -04:00
Christian Hecken bf2422b55b Tests: Fix driver.py --xrun option raising error (#6585) 2025-10-23 12:47:05 -04:00
Geza Lore d33da1ebb6 Internals: Refactor ForkVisitor (#6280)
Simplify, but otherwise no functional change. Prep for #6280.
2025-10-23 16:37:31 +01:00
Geza Lore 21ef11099e Tests: Fix trace file name in t_wrapper_context_fst 2025-10-23 16:25:27 +01:00
Geza Lore f9c5db907a Internals: Strengthen statement node types in parser (#6280) 2025-10-22 18:58:32 +01:00
Geza Lore 5ac345e09c Internals: Add AstStmtPragma (#6280)
Trivial adaptor node to put AstPragma in AstNodeStmt position, which
will be required in various places. Also fix dumping of AstPragma.
2025-10-22 18:51:11 +01:00
Igor Zaworski 43373010dc Add $cpure (#6580) 2025-10-22 06:18:27 -07:00
Geza Lore cb3c2706a8 Internals: Remove funcLocal from 'fork' locals 2025-10-22 11:14:21 +01:00
Geza Lore d65ba037a8 Internals: Simplify parsing of 'fork' blocks 2025-10-22 08:48:28 +01:00
Ryszard Rozak e00403351c Fix references to interfaces containing generate blocks (#6579) 2025-10-22 08:37:43 +02:00
Matt Stroud 6f055f84ce Fix missing net type mappings in FST traces (#6582) (#6583) 2025-10-21 21:07:51 -04:00
Geza Lore cc77233902 Internals: AstExecGraph is an AstNodeStmt (#6280) 2025-10-21 17:35:22 +01:00
Geza Lore ec91158130 Internals: Refactor AstCFunc internals (#6280) (#6578)
- Delete 'finalsp'. It was used in one place, basically unnecessary and
  safe to remove.
- Make 'argsp' a 'List[AstVar]'. This held before. It holds the function
  argument and return variables.
- Replace 'intitsp' with 'varsp' and make it into 'List[AstVar]' to hold
  the function local variables. This was most of its use before. The few
  places we inserted statements here now moved into 'stmtsp' by
  inserting at the front of the list.
2025-10-21 16:37:32 +01:00
Geza Lore c471323601 Internals: Remove unused AstNode::swapWith 2025-10-21 12:41:50 +01:00
Geza Lore 8daae7336d Internals: Remove redundant AstNode::addNextStmt 2025-10-21 12:41:50 +01:00
Geza Lore cf275b6e58 Internals: Refactor text based Ast constructs (#6280) (#6571)
Remove the large variety of ways raw "text" is represented in the Ast.
Particularly, the only thing that represents a string to be emitted in
the output is AstText.

There are 5 AstNodes that can contain AstText, and V3Emit will throw an
error if an AstText is encountered anywhere else:
- AstCStmt: Internally generated procedural statements involving raw
  text.
- AstCStmtUser: This is the old AstUCStmt, renamed so it sorts next to
  AstCStmt, as it's largely equivalent. We should never create this
  internally unless used to represent user input. It is used for $c,
  statements in the input, and for some 'systemc_* blocks.
- AstCExpr: Internally generaged expression involving raw text.
- AstCExprUser: This is the old AstUCFunc, renamed so it sorts next to
  AstCExpr. It is largely equivalent, but also has more optimizations
  disabled. This should never be created internally, it is only used for
  $c expressions in the input.
- AstTextBlock: Use by V3ProtectLib only, to generate the hierarchical
  wrappers.

Text "tracking" for indentation is always on for AstCStmt, AstCExpr, and
AstTextBlock, as these are always generated by us, and should always be
well formed.

Tracking is always off for AstCStmtUser and AstCExprUser, as these
contain arbitrary user input that might not be safe to parse for
indentation.

Remove subsequently redundant AstNodeSimpleText and AstNodeText types.

This patch also fixes incorrect indentation in emitted waveform tracing
functions, and makes the output more readable for hier block SV stubs.

With that, all raw text nodes are handled as a proper AstNodeStmt or
AstNodeExpr as required for #6280.
2025-10-21 12:41:29 +01:00
Wilson Snyder 14e3448ba6 Fix with inside a with 2025-10-21 00:40:47 -04:00
Wilson Snyder 61de46cea2 Add --aslr and --no-aslr options. 2025-10-20 19:41:32 -04:00
Wilson Snyder 24e665f38f Commentary: Changes update 2025-10-20 19:32:19 -04:00
Geza Lore 8f13bc0477 Improve conditional merging to preserve branch prediction 2025-10-20 20:01:48 +01:00
Geza Lore f73dde6dd9 Fix hierarchical with parametrized instances under hier block (#6572) 2025-10-20 19:26:13 +01:00
Todd Strader ffd7ec1007 Fix DFG synthesis non-determinism (#6557) (#6568) 2025-10-20 16:16:36 +01:00
Bartłomiej Chmiel 9bd30baba4 Fix $finish inside fork blocks (#6555)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
2025-10-20 10:16:05 -04:00
Geza Lore 61c64e4a3b Internals: Make AstCExpr always cleanOut (#6280) (#6570)
There was exactly one place in V3Task, handling DPI arguments when we
relied on cleanOut of AstCExpr being false for masking. Made that code
do the relevant masking via a few new run-time functions, which also
eliminates some special cases in the relevant V3Task functions.
2025-10-19 09:44:33 +01:00
Geza Lore 4ef6f00423 Fix single element unpacked array DPI parameters 2025-10-18 17:21:21 +01:00
Igor Zaworski 5c412e5e81 Support impure expressions in inside (#6562) 2025-10-17 09:08:57 -04:00
Ryszard Rozak af2327aaf4 Fix hierarchical references with parameterized modules and interfaces (#5649) (#6566) 2025-10-17 09:06:46 -04:00
Igor Zaworski 96ed725278 Support case impure expressions (#6563) 2025-10-17 09:00:32 -04:00
Geza Lore 3d5d2db64b Tests: Remove unused JSON dumps
These seem to have been accidentally comitted
2025-10-17 09:03:12 +01:00
Aleksander Kiryk 94525cae5d Fix std::process::get_randstate to not affect random stability (#6550) (#6565) 2025-10-16 21:11:07 -04:00
Geza Lore 982c7fb058 Remove obsolete DepSet from output file names (#6564) 2025-10-16 20:34:09 -04:00
Geza Lore 794247450f Internals: Simplify AstScopeName (#6280)
Reduce reliance on AstText where not necessary.
2025-10-15 09:14:51 +01:00
Geza Lore 0c712d7c60 Internals: Refactor `systemc_* section handling (#6280) 2025-10-15 09:14:51 +01:00
Artur Bieniek cefcf836fd Fix signal code reporting (#6554)
Signed-off-by: Artur Bieniek <[email protected]>
2025-10-14 07:04:53 -04:00
Geza Lore eb53bca6fd Internals: Make AstAssignW a procedural statement (#6280) (#6556)
Initial idea was to remodel AssignW as Assign under Alway. Trying that
uncovered some issues, the most difficult of them was that a delay
attached to a continuous assignment behaves differently from a delay
attached to a blocking assignment statement, so we need to keep the
knowledge of which flavour an assignment was until V3Timing.

So instead of removing AstAssignW, we always wrap it in an AstAlways,
with a special `keyword()` type. This makes it into a proper procedural
statement, which is almost equivalent to AstAssign, except for the case
when they contain a delay. We still gain the benefits of #6280 and can
simplify some code. Every AstNodeStmt should now be under an
AstNodeProcedure - which we should rename to AstProcess, or an
AstNodeFTask). As a result, V3Table can now handle AssignW for free.
Also uncovered and fixed a bug in handling intra-assignment delays if
a function is present on the RHS of an AssignW.

There is more work to be done towards #6280, and potentially simplifying
AssignW handing, but this is the minimal change required to tick it off
the TODO list for #6280.
2025-10-14 09:05:19 +01:00
Wilson Snyder 958d096e7f Improve some error message formats 2025-10-13 20:30:47 -04:00
Wilson Snyder 9dfc050fb5 Fix '' with multiple format strings 2025-10-13 19:47:08 -04:00
Wilson Snyder b99b3d7b9c Tests: Reformat t_display 2025-10-13 19:44:57 -04:00
Artur Bieniek 16fdd0e93c Fiix fault on operations on uninitialized strings (#6520)
Signed-off-by: Artur Bieniek <[email protected]>
2025-10-13 07:29:23 -04:00
Wilson Snyder 01157d414b Optimize constant string arguments before Emit, and cleanup V3EmitV 2025-10-12 20:09:03 -04:00
Wilson Snyder eae1e5bdf2 Internals/Tests: Cleanup some missing dev coverage items 2025-10-11 20:58:03 -04:00
Wilson Snyder 71941cc673 Fix incorrect nested interface-class error (#6549). 2025-10-11 19:07:37 -04:00
Wilson Snyder fac4ed49af Commentary: Changes update 2025-10-11 19:05:44 -04:00
Wilson Snyder 8785086bc8 Internals/Tests: Add --debug-preproc-passthru to cleanup some missing dev coverage items 2025-10-11 14:15:04 -04:00
Wilson Snyder 6e8bd3da19 Internals/Tests: Cleanup some missing dev coverage items 2025-10-11 12:54:55 -04:00
Wilson Snyder 078275034d Internals: Parse randsequence but still unsupported (#6131 partial) 2025-10-11 10:47:46 -04:00
Bartłomiej ChmielandWilson Snyder 31e73f1645 Support simple cycle delay sequence expressions inside assertion properties (#6508)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
Co-authored-by: Wilson Snyder <[email protected]>
2025-10-10 16:16:15 +02:00
Igor Zaworski 2ac7cf51a9 Optimization of typedef params (#6543) (#6547) 2025-10-10 10:05:47 -04:00
Wilson Snyder 4f1d8a1b15 Tests: Revert bad expect test 2025-10-10 07:59:55 -04:00
Artur Bieniek a7f4ff7b06 Tests: Set higher timeout with ASAN (#6546)
Signed-off-by: Artur Bieniek <[email protected]>
2025-10-10 06:37:53 -04:00
Wilson Snyder 3027f67b6f Internals/Tests: Cleanup some missing dev coverage items 2025-10-09 22:33:04 -04:00
Wilson Snyder 802ba0c2bf Internals: Add assert to dev coverage exclusion 2025-10-09 22:33:04 -04:00
Wilson Snyder 41b05cb1f8 Fix intent error on quoted strings (#6544). 2025-10-09 21:24:27 -04:00
Wilson Snyder 3306ed146b Internals: Use multi-character puts. No functional change intended. 2025-10-09 21:23:11 -04:00
Wilson Snyder fb4951d2df Commentary: Changes update 2025-10-09 21:22:24 -04:00
Geza Lore 9dc0cf5a7c Internals: Use a V3Graph for the hierarchical plan (#6545)
I stared this because the emitted makefiles for hierarchical verilation
were non-deterministic (iterating unordered_map indexed by pointers).
Then I realized that the V3HierPlan is just a dependency graph encoded
in a slightly idiosyncratic way. We do have a data structure to use for
that instead.

With that the output should always be deterministic + have nicer dumps.
2025-10-09 21:41:23 +02:00
Geza Lore e63d486422 Internals: Fix coverage exclusion 2025-10-09 16:58:06 +01:00
Igor Zaworski 1a91ab02cf Fix passing typedef value as parameter (#6543) 2025-10-09 10:08:06 -04:00
Geza Lore 7b4ad29260 Testing: Ignore non-deterministic tests in make test-snap
Added tests with expectedly unstable output to ignore list for
`make test-snap` and `make test-diff`.
2025-10-09 10:34:31 +01:00
Geza Lore e33b24fad2 Fix Dfg circular driver tracing with partial assignments 2025-10-09 09:31:19 +01:00
Geza Lore 49c51af841 Deprecate '--make cmake' option (#6540) 2025-10-08 09:40:17 -04:00
Artur Bieniek 222a3655ba [#84482] Fix inconsistent force assignment (#6541)
Signed-off-by: Artur Bieniek <[email protected]>
2025-10-08 09:39:50 -04:00
Geza Lore c8c53f9a18 Tests: Remove sanitize option and parameter
Fixes #6536
2025-10-08 08:51:42 +01:00
Geza Lore 838b8a2bec Internals: Remove dead code, fix or sign off coverage
Remove/fix/signoff uncontroversial code coverage holes. Also added a
couple TODOs that should be investigated at some point
2025-10-08 08:24:06 +01:00
Wilson Snyder 1a8f9f0483 Improve lint_off to allow multiple messages and comments (#2755 partial). 2025-10-07 22:49:42 -04:00
Wilson Snyder 2631af977a Tests: Update t_lint_historical.v 2025-10-07 22:44:39 -04:00
Wilson Snyder 165622a9e9 Add NORETURN warning on functions without return values (#6534). 2025-10-07 21:06:11 -04:00
Wilson Snyder f979e459e8 Add error on ranges with tristate values (#6534). 2025-10-07 20:36:50 -04:00
Wilson Snyder 9d6f127a4e Internals: Fix extra spaces in emit. No functional change. 2025-10-07 19:22:16 -04:00
Wilson Snyder bfe39ce5bc Fix --trace-max-width and increase to 4096. (#2385). 2025-10-07 18:50:31 -04:00
Geza Lore 832f41f0fe Internals: Hide CC make rules (#6537)
All code is built as C++ via CXX, but we still have some references to
CC. Trying to make sure we don't add plain C later by hiding the C
compiler. (So it's always enough to override CXX=... in configure)
2025-10-07 17:37:42 +01:00
Geza Lore 97707bdc72 CI: Run coverage job on 'pr: dev-coverage' label in PRs (#6527) 2025-10-07 17:03:13 +01:00
Bartłomiej Chmiel 888169571b Fix memory leak for unsupported $past (#6535)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
2025-10-07 09:56:11 -04:00
Geza Lore d7fbea62f9 CI: Notify PRs when coverage report is available 2025-10-07 12:58:21 +01:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 728f56e581 Bump actions/checkout from 4 to 5 (#6533)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-07 09:12:28 +01:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 1268a28e7b Bump actions/upload-pages-artifact from 3 to 4 (#6532)
Bumps [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-pages-artifact/releases)
- [Commits](https://github.com/actions/upload-pages-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-pages-artifact
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-07 09:12:03 +01:00
Wilson Snyder 717667034b Fix loop exits on $finish 2025-10-06 19:19:15 -04:00
Wilson Snyder 5229ce8660 Fix error on circular structure typedef 2025-10-06 18:45:56 -04:00
Bartłomiej Chmiel 9f5d22b21f Fix parsing of eventually[] and pexpr memory leaks (#6530)
* Fix parsing of eventually[]
* Fix parser memory leaks for pexpr

Signed-off-by: Bartłomiej Chmiel <[email protected]>
2025-10-06 15:42:40 +02:00
Geza Lore 0280de11da CI: Adjust reusable-build workflow parameters
Add an explicit 'sha' parameter to reusable-build, to define which
commit to build. This will be needed for PR coverage jobs. Consequently
use the 'archive' output from reusable-build to simplify retrieving the
resulting artifact in dependent jobs. Also fetch full history in
coverage builds.
2025-10-05 09:30:49 +01:00
Geza Lore b4d064d166 CI: Deploy coverage reports to GitHub pages 2025-10-05 07:47:59 +01:00
Geza Lore 6dd52e1927 CI: Adjust codecov.io configuration
Disable statuses and PR comments, make precision and ranges match lcov
reports generated by 'make coverage-report', remove unnecessary
contents. Rename codecov.yml -> .codecov.yml
2025-10-05 07:10:04 +01:00
Geza Lore 29dacd3441 CI: Create and upload HTML coverage reports 2025-10-04 19:35:21 +01:00
Geza Lore 540e042221 CI: Add ability to generate patch coverage reports 2025-10-04 17:53:18 +01:00
Wilson Snyder f09c30df35 Internals: Refector to create single V3Number::emitC. Fix some double emit issues (#6528). 2025-10-04 07:23:13 -04:00
Geza Lore a03d327e96 CI: Fix error on test failures 2025-10-03 19:58:03 +01:00
Todd Strader defe282fe8 Fix always_ff on constant (#6519) 2025-10-03 13:16:12 -04:00
Geza Lore ce0a05691b Internals: Improve coverage flow (#6526)
See addes "Code coverage" section in docs/internals.rst
2025-10-03 17:18:24 +01:00
Geza Lore 62dbbbba85 Internals: Rename --enable-asan to --enable-dev-asan and related 2025-10-03 12:26:48 +01:00
Ryszard RozakandNikolai Kumar 2c74765246 Fix find_index methods of associative arrays (#6525)
Signed-off-by: Ryszard Rozak <[email protected]>
Co-authored-by: Nikolai Kumar <[email protected]>
2025-10-02 12:05:24 -04:00
Bartłomiej Chmiel cb5c56dac4 Internals: fix assertion type dumping (#6523) 2025-10-02 12:03:45 -04:00
github action 0b23787d6c Apply 'make format' 2025-10-01 20:26:28 +00:00
Geza Lore aaa49273cf Internals: Fix coverage exclusion markers 2025-10-01 21:22:16 +01:00
Geza Lore e9c48cd1ce Internals: Optimize temporary memory allocations (#6517)
This patch gets rid of over 80% of temporary dynamic memory allocations
(when a malloced node is immediately freed with no other malloc in
between). It also gets rid of over 20% of all calls to malloc.

It's worth ~3% average verilation speed up with tcmalloc, and more
without tcmalloc.
2025-10-01 15:01:30 +01:00
Geza Lore 435e1149d5 Internals: Remove dupliacte netSig parse rules 2025-10-01 10:46:55 +01:00
Geza Lore 4d518873d0 Fix stray net delay in parser
Fixes #6500
2025-10-01 10:19:39 +01:00
Wilson Snyder caca1fcef0 Internals: Change order of V3Number constructor args to follow V3Const. No functional change intended. 2025-09-30 22:04:24 -04:00
Wilson Snyder 8efc9d6219 Fix configure misdetecting C++14 (#6488) (#6515). 2025-09-30 16:57:33 -04:00
Szymon Gizler e21c4fbbb5 Fix .vlt public_flat* and others to support long identifier names (#6516) 2025-09-30 16:55:11 -04:00
Geza Lore b902e4bcf5 Reduce memory use of statistic collection (#6513) 2025-09-30 07:06:57 -04:00
Wilson Snyder c5f3192588 Change default --expand-limit to 256 (#3419). (#6489) 2025-09-30 06:53:10 -04:00
Geza Lore e04f51ebd2 Internals: Change AstAssignVarScope into AstAliasScope (#6280) (#6512)
Rename and make it derive from AstNode instead of AstNodeAssign.

Small step towards #6280. No functional change.
2025-09-30 06:40:17 +01:00
Geza Lore 283810cbf7 Internals: Make AstNodeBlock an AstNodeStmt (#6280) (#6511)
Small step towards #6280. No functional change.
2025-09-30 06:39:51 +01:00
Wilson Snyder 0640ddba80 Commentary: Changes update 2025-09-29 21:11:29 -04:00
Wilson Snyder 0865bee500 Commentary: Fix html build (#6502) 2025-09-29 21:11:22 -04:00
Geza Lore 202a53f4f6 Internals: Parse ++/-- in statement position as AstStmtExpr (#6280) (#6510)
Small step towards #6280. No functional change.
2025-09-29 21:01:40 +02:00
Ryszard Rozak 09518ee207 Support aliases with more operands (#6501) 2025-09-29 13:23:51 -04:00
Geza Lore 5cd8bd0356 Remove use of VL_INLINE_OPT macro (#6507) 2025-09-29 18:07:36 +01:00
Geza Lore 5247e40659 CI: Add 60 minute timeout to RTLMeter compile and run steps (#6506)
The default timeout for a job in GitHub Actions is 6 hours, which is
both too long, but more importantly, when reached the job is 'cancelled'
instead of 'failed'. Use the new `--timeout` option on `rtlmeter run`
instead to add a 60 minute timeout to compile and execute steps. (This
is ~3x longer than recent worst runs in the CI)
2025-09-29 17:37:06 +01:00
Geza Lore 603f4c615a Improve Loop unrolling (#6480) (#6493)
This patch implements #6480. All loop statements are represented using
AstLoop and AstLoopTest.

This necessitates rework of the loop unroller to handle loops of
arbitrary form. To enable this, I have split the old unroller used for
'generate for' statements and moved it into V3Param, and subsequently
rewrote V3Unroll to handle the new representation. V3Unroll can now
unroll more complex loops, including with loop conditions containing
multiple variable references or inlined functions.

Handling the more generic code also requires some restrictions. If a
loop contains any of the following, it cannot be unrolled:
- A timing control that might suspend the loop
- A non-inlined call to a non-pure function

These constructs can change the values of variables in the loop, so are
generally not safe to unroll if they are present. (We could still unroll
if all the variables needed for unrolling are automatic, however we
don't do that right now.)

These restrictions seem ok in the benchmark suite, where the new
unroller can generally unroll many more loops than before.
2025-09-29 15:25:25 +01:00
Geza Lore 5c72b45975 Internals: Clean up V3Branch (#6505)
No functional change
2025-09-29 14:51:37 +01:00
Igor Zaworski 83f4db956b Fix side effects when using select (#6460) 2025-09-29 08:20:54 -04:00
Wilson Snyder bdae48f6ae Optimize duplicate 'if' and '?:' conditions (#3807) (#6495) 2025-09-29 08:18:54 -04:00
Krzysztof Bieganski 7e854a9e63 Internals: Simplify SystemC-related timing code (#6503) 2025-09-29 07:12:35 -04:00
Geza Lore 98786e609a CI: Fix write permissions in format job
Fixes #6496
2025-09-29 07:49:54 +01:00
Wilson Snyder 5a5c38e478 Format 2025-09-28 21:26:21 -04:00
Wilson Snyder 3b049ab9ee Tests: Add t_lint_always_comb_automatic (#2862) 2025-09-28 21:23:15 -04:00
Wilson Snyder 21b42c4463 Fix LATCH warning with CASEINCOMPLETE (#3301). 2025-09-28 21:13:42 -04:00
Wilson Snyder ca0a679413 Format 2025-09-27 20:59:44 -04:00
Wilson Snyder a7e6efb4c0 Internals: Some prep from branch towards multitrace (#5813 prep) 2025-09-27 20:54:26 -04:00
Wilson Snyder 8c7c6c594a Internals: Rename VStringSet/VStringList. No functional change. 2025-09-27 20:51:37 -04:00
Wilson Snyder 7ef3b808ea Fix false BLKSEQ on non-edged sensitivity list (#6492). 2025-09-27 20:50:32 -04:00
Wilson Snyder 3b623dc12e Internals: Refactor to create VCMethod (#3715). No functional change intended. 2025-09-27 08:22:17 -04:00
Wilson Snyder 89cd5417ef Internals: Refactor to create V3AstAttr.h (#6491). No functional change intended. 2025-09-27 08:19:57 -04:00
Wilson Snyder b3350a4f3b Add error on virtual new (#6486). 2025-09-26 21:23:40 -04:00
Wilson Snyder 1761622e14 Fix unused parameterized class causing internal error (#4013). 2025-09-26 20:50:47 -04:00
Wilson Snyder ebee20c47d Commentary: Changes update 2025-09-26 20:49:27 -04:00
Ryszard Rozak 500312c050 Support for simple alias statements (#6339) 2025-09-26 15:19:48 +02:00
Wilson Snyder 4ad1dde723 Internals: Emit newlines for AstCStmt automatically. No functional change intended. 2025-09-26 08:25:47 -04:00
Wilson Snyder 62880c125e Fix configure misdetecting C++14 (#6488). 2025-09-26 08:24:34 -04:00
Wilson Snyder 21dbdbf69d Tests: Auto-skip when not in root repo 2025-09-25 21:08:24 -04:00
Wilson Snyder 269476df6e Add FUNCTIMCTL now as a named error, so can disable (#6385). 2025-09-25 19:19:31 -04:00
Wilson Snyder 87224db145 Test: Update t_interface_parent_scope (#1623) 2025-09-25 10:50:32 -04:00
Todd Strader aa6fbd35db Add HIERPARAM error code (#6456) (#6484) 2025-09-25 10:27:26 -04:00
Wilson Snyder c9e021924f Support class package reference on pattern keys (#5653). 2025-09-25 06:52:42 -04:00
Geza Lore 63f5f5c328 Internals: Remove redundant AstNode methods (#6481)
AstNode::isFirstInMyListOfStatements
AstNode::isStandaloneBodyStmt
2025-09-24 09:53:39 +02:00
Wilson Snyder 28ee2ebb30 Fix PROTOTYPEMIS error on implicit logic (#6482). 2025-09-23 22:28:21 -04:00
Wilson Snyder fd12ab3413 Fix interface exposure with --public-depth or --trace-depth (#5758). 2025-09-23 22:05:51 -04:00
Wilson Snyder d972b7465a Add error on function invoking time-controlling statements (#6385). 2025-09-23 20:16:23 -04:00
Wilson Snyder 734e7a9526 Add error on function invoking task. 2025-09-23 19:51:34 -04:00
Wilson Snyder 90bc1daa9d Commentary: Changes update 2025-09-23 19:50:43 -04:00
Wilson Snyder 4e00539308 Fix MISINDENT on SweRV verilator_ext_tests with GenBlock (#6470 repair) 2025-09-23 19:49:57 -04:00
Artur Bieniek f719d66129 Fix timeprecision backward assignment (#6469)
Signed-off-by: Artur Bieniek <[email protected]>
2025-09-23 17:17:07 -04:00
Geza Lore 800af37975 Internals: Refactor generate construct Ast handling (#6280) (#6470)
Internals: Refactor generate construct Ast handling (#6280)

We introduce AstNodeGen, the common base class of AstGenBlock,
AstGenCase, AstGenFor, and AstGenIf, which together represent all SV
generate constructs. Subsequently remove AstNodeFor, AstNodeCase
(AstCase is now directly derived from AstNodeStmt) and adjust internals
to work on the new representation.

Output is identical modulo hashes do to changed AstNode type ids, no
functional change intended.

Step towards #6280.
2025-09-23 19:49:01 +01:00
Fabian Keßler-Schulz df187c4406 Fix Windows compilation of Verilator with spaces in the path (#6477) 2025-09-23 14:25:25 -04:00
Geza Lore 6f250b3f8d Internals: Make AstNode::{is/as/cast} available to client code (#6478)
As opposed to VN_{IS/AS/CAST} these are usable in templated code.
2025-09-23 16:39:18 +01:00
Ryszard Rozak be0392a2b2 Fix splitting hierarchically referenced variables (#6475) 2025-09-23 10:16:49 -04:00
Wilson Snyder b794c7c8d4 Add error on parameter values from hierarchical paths (#1626) (#6456). 2025-09-22 22:24:45 -04:00
Wilson Snyder e74c8372ea Commentary: Python venv 2025-09-22 19:56:39 -04:00
Geza Lore 40ca0527db Internal: Refactor AstAssignAlias (#6280) (#6473)
Rename AstAssignAlias to AstAlias and make it derive from AstNode
instead of AstNodeStmt.

Replace AstAlias with AstAssignW in V3LinkDot::linkDotScope, which is
the last place we need to be aware of the alias construct. Using
AstAssignW dowstream enables further optimization while preserving the
same functionality.
2025-09-22 16:30:26 -04:00
Wilson Snyder a647747260 Add IMPLICITSTATIC also on procedure variables. 2025-09-21 19:52:19 -04:00
Wilson Snyder 9e664a3921 Internals: Cleanup some V3LinkParse code; ignore whitespace if diff. No functional change. 2025-09-21 15:30:49 -04:00
Wilson Snyder ad6379b762 Internals: Cleanup some V3LinkParse code. No functional change intended. 2025-09-21 15:28:36 -04:00
Wilson Snyder e0e0fb08a5 Fix missing BLKSEQ when connecting module port to array (#2973). 2025-09-21 13:02:50 -04:00
Wilson Snyder 006b45526b Tests: Rename t_lint_blkseq. No test change. 2025-09-21 12:56:01 -04:00
Wilson Snyder 3dc430085d Internals: Misc verilated_random style cleanups. No functional change. 2025-09-21 12:33:38 -04:00
Wilson Snyder 9697a5ce6d Add verilator_gantt profiling of DPI imports (#3084). 2025-09-21 11:37:44 -04:00
Wilson Snyder 53b8a5b027 Add error on zero/negative unpacked dimensions (#1642). 2025-09-21 09:41:58 -04:00
Wilson Snyder ed380f08fe Tests: Add t_forceable_public flat (#3955) 2025-09-20 23:06:41 -04:00
Wilson Snyder 9af8e76e87 Fix assertion on streaming from queues 2025-09-20 20:52:46 -04:00
Wilson Snyder af54a26b43 Fix parsing of with (...) {...} but still unsupported 2025-09-20 19:59:31 -04:00
Wilson Snyder a4db488b02 Internals: Fix some object-less asserts 2025-09-20 17:40:50 -04:00
Wilson Snyder 580a843474 Fix randomize inside module without any classes 2025-09-20 17:13:54 -04:00
Wilson Snyder b237eec801 Add error on string addition 2025-09-20 13:47:17 -04:00
Geza Lore e0e8503151 Internals: Make all AstBegin constructor arguments explicit (#6464) 2025-09-20 13:16:03 -04:00
Wilson Snyder 19ca140165 Improve adding model error message 2025-09-20 11:32:15 -04:00
Wilson Snyder bfc438c455 Tests: Add t_param_default_override (#4920) 2025-09-20 11:32:15 -04:00
Wilson Snyder d3b085ab8a Fix t_sarif (#6463 partial) 2025-09-20 11:32:15 -04:00
Geza Lore d1eda66668 Deprecate clocker attribute and --clk option (#6463)
The only use for the clocker attribute and the AstVar::isUsedClock that
is actually necessary today for correctness is to mark top level inputs
of --lib-create blocks as being (or driving) a clock signal. Correctness
of --lib-create (and hence hierarchical blocks) actually used to depend
on having the right optimizations eliminate intermediate clocks (e.g.:
V3Gate), when the top level port was not used directly in a sensitivity
list, or marking top level signals manually via --clk or the clocker
attribute. However V3Sched::partition already needs to trace through the
logic to figure out what signals might drive a sensitivity list, so it
can very easily mark all top level inputs as such.

In this patch we remove the AstVar::attrClocker and AstVar::isUsedClock
attributes, and replace them with AstVar::isPrimaryClock, automatically
set by V3Sched::partition. This eliminates all need for manual
annotation so we are deprecating the --clk/--no-clk options and the
clocker/no_clocker attributes.

This also eliminates the opportunity for any further mis-optimization
similar to #6453.

Regarding the other uses of the removed AstVar attributes:
- As of 5.000, initial edges are triggered via a separate mechanism
  applied in V3Sched, so the use in V3EmitCFunc.cpp is redundant
- Also as of 5.000, we can handle arbitrary sensitivity expressions, so
  the restriction on eliminating clock signals in V3Gate is unnecessary
- Since the recent change when Dfg is applied after V3Scope, it does
  perform the equivalent of GateClkDecomp, so we can delete that pass.
2025-09-20 15:50:22 +01:00
Wilson Snyder 50dfdcb6cc Support digits in $sscanf field width formats (#6083). 2025-09-20 10:26:36 -04:00
Wilson Snyder 7f85d7f453 Add error on localparam value from hierarchical path (#6456). 2025-09-20 09:59:48 -04:00
Wilson Snyder f970485e19 Fix some missing E_UNSUPPORTED errors 2025-09-20 08:19:42 -04:00
Wilson Snyder e5e7e844c4 Tests: Fix assignment type mismatch (#6461) 2025-09-19 22:59:13 -04:00
Wilson Snyder 4e866fd710 Add error on module automatic variables. 2025-09-19 22:05:03 -04:00
Wilson Snyder 2a498cb670 Commentary: Changes update 2025-09-19 22:02:54 -04:00
Bartłomiej Chmiel bbcb9315f3 Fix loss of clock attribute in Dfg variable removal (#6453) 2025-09-19 14:44:34 +01:00
Artur Bieniek 08be65a7dd Optimize dead functions in more cases (#6430)
Signed-off-by: Artur Bieniek <[email protected]>
2025-09-19 09:36:57 -04:00
Geza Lore e24f84f713 Fix false assertion failure on failed Dfg driver tracing (#6459) 2025-09-19 13:31:07 +01:00
Artur Bieniek c1ac2a79db Resolve data types of method calls without parenthesis (#6457)
Signed-off-by: Artur Bieniek <[email protected]>
2025-09-19 07:43:22 -04:00
Krzysztof Bieganski 0391f113b0 Fix segfault on unsupported PLI calls (#6458) 2025-09-19 06:59:48 -04:00
Bartłomiej Chmiel d26fccaa44 Use C++14 decay_t (#6454)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
2025-09-18 16:57:13 +02:00
Wilson Snyder 46e56ca6fc Fix elaboration displays with some %p (#6451). 2025-09-18 08:35:07 -04:00
Geza Lore 92f30dd28f CI: Exclude 'Example' and 'hello' cases from RTLMeter PR reports (#6452)
These are too small and noisy to be useful, remove to avoid false
conclusions.
2025-09-18 13:02:37 +01:00
Geza Lore b85a482db0 CI: fix typo 2025-09-18 11:34:59 +01:00
Wilson Snyder c15489b711 Fix associative array default type resolution 2025-09-17 23:39:47 -04:00
Wilson Snyder 7f871467bf Internals: Cleanup assertion 2025-09-17 23:38:00 -04:00
Wilson Snyder 3a039df351 Tests: Strictly test exit codes (no unexpected core dumps) 2025-09-17 21:01:11 -04:00
Wilson Snyder 542ffcca60 Prevent internal error on pattern mismatch 2025-09-17 21:01:11 -04:00
Geza Lore ed6687359b Fix memory leak in V3Const::ifMergeAdjacent (#6449) 2025-09-18 00:45:28 +02:00
Wilson Snyder 57c82b9c34 Fix false unique assertions on else ; (#6450). 2025-09-17 17:43:36 -04:00
Geza Lore 0e2f0381d0 CI: Improve and cleanup (#6448)
Chores:
- Remove ci-ccache-maint. This has never been useful and is just cruft.
- Remove then unused CI_COMMIT
- Change job names so they come out nicer in the web views
- Make os-name input to reusable-build always explicit

Improvements:
- Have at most build-test job in progress per branch
- Cancel in-progress build-test jobs on PRs
- In forks (that is, not on 'verilator/verilator'), cancel any
  in-progress build-test jobs on push to the branch
2025-09-17 20:41:29 +01:00
Geza Lore 1432bb8889 Revert "CI: Make formatting dispatch workflows on verilator/verilator"
This reverts commit 64dbd4abcc.
2025-09-17 13:53:20 +01:00
Artur Bieniek 3c8b8b65d0 Fix relinking super functions to parametrized class (#6431) (#6438)
Signed-off-by: Artur Bieniek <[email protected]>
2025-09-17 08:07:04 -04:00
Geza Lore 64dbd4abcc CI: Make formatting dispatch workflows on verilator/verilator
Use the CI GitHub APP for authentication in the format job. This should
correctly trigger workflows after the push of the formatting.
2025-09-17 12:57:26 +01:00
Artur Bieniek bee58510e7 Add cast in gdbinit.py (#6447)
Signed-off-by: Artur Bieniek <[email protected]>
2025-09-17 07:23:47 -04:00
Wilson Snyder b10c6293d9 Fix elaboration displays with %m (#6445). 2025-09-16 20:50:15 -04:00
Geza Lore 4ab0690428 CI: Add -DVL_LEAK_CHECKS in asan builds (#6444) 2025-09-17 00:18:58 +01:00
github action 841254e9e8 Apply 'make format' 2025-09-16 23:02:39 +00:00
Wilson Snyder d7f4dbfd13 Fix class.randomize without parens. 2025-09-16 18:56:04 -04:00
Wilson Snyder 2dbf587118 Commentary: Changes update 2025-09-16 18:54:40 -04:00
Wilson Snyder 4d1eea35e1 Internals: Show only first warning suppression for low debug levels. 2025-09-16 18:51:35 -04:00
Geza Lore f39d6e6108 Deprecate sensitivity list on public_flat_rw attributes (#6443)
These are no longer required for correct scheduling. They are still
accepted for backward compatibility, but have no effect on simulation
and are dropped in the front-end. Also removed the then redundant
AstAlwaysPublic class.

Fixes #6442
2025-09-16 22:38:53 +01:00
Geza Lore ad530c4b08 Internals: Make V3Broken AllocTable thread safe (#6441)
Added a lock around the table used to detect memory leaks. Note the only
part that is multi-threaded at the moment is V3Emit where we create
AstCFiles and the like, so the lock should be almost always uncontested.
2025-09-16 20:40:38 +01:00
Geza Lore b60ad953c4 Disable multi-threading in V3FuncOpt (#6440)
This code is not thread safe. Specifically AstNode constructors are not
thread safe, as they may create entries in the shared Dtype table via
which can be racy.
2025-09-16 19:23:05 +01:00
Geza Lore a44907b700 Fix memory leaks - batch 4 (#6439) 2025-09-16 19:22:36 +01:00
Ryszard Rozak c856380fac Support modports referencing clocking blocks (#4555) (#6436) 2025-09-16 13:25:40 -04:00
Geza Lore ef458be855 Fix memory leaks in assignment pattern processing (#6437). 2025-09-16 12:31:16 -04:00
Wilson Snyder 9187b4d552 Fix internal error on out-of-bounds real array access. 2025-09-16 08:18:51 -04:00
Wilson Snyder 2b3bf5f51d Fix false missing implementation warning. 2025-09-16 07:48:20 -04:00
dependabot[bot] a8d70c6edf Bump actions/create-github-app-token from 2.1.1 to 2.1.4 (#6435) 2025-09-16 07:20:46 -04:00
Bartłomiej Chmiel dca555b6d7 Fix pre/post increments in assertions (#6434) 2025-09-15 10:50:31 -04:00
Wilson Snyder b11ec23891 Add waiver 2025-09-14 23:59:42 -04:00
Wilson Snyder 39a9a00299 Fix external function declarations with class typedef references (#6433 expanded). 2025-09-14 23:52:48 -04:00
Wilson Snyder 3f7d13b2cf Internals: Less debug verbosity 2025-09-14 22:41:35 -04:00
Wilson Snyder 218af5500b Fix external function declarations with class typedef references (#6433). 2025-09-14 21:53:13 -04:00
Wilson Snyder 12c524ac06 Internals: Refactoring (#6433 prep). No functional change intended. 2025-09-14 21:50:19 -04:00
Wilson Snyder 5e4668c146 Support get/set_randstate as class method. 2025-09-14 10:33:50 -04:00
Wilson Snyder 4b5e602392 Tests: Skip for reloc t_lint_assigneqexpr_bad 2025-09-14 10:33:27 -04:00
Wilson Snyder a2b6aca288 Tests: Refactor to create test.root variable. No test change. 2025-09-14 08:43:52 -04:00
Wilson Snyder b455f9b591 Add ASSIGNEQEXPR when use = inside expressions (#5567). 2025-09-14 08:28:47 -04:00
Wilson Snyder 06c3c87f4e Internals: Refactoring V3Param. No functional change intended. 2025-09-13 22:47:51 -04:00
Wilson Snyder 121193e49b Internals: Refactoring V3Param. No functional change intended. 2025-09-13 22:39:45 -04:00
Wilson Snyder d7b8ede53f Internals: Refactoring V3Param. No functional change intended. 2025-09-13 22:07:13 -04:00
Wilson Snyder e348c9c344 Internals: Create common function for inlinedDots handling 2025-09-13 19:35:56 -04:00
Wilson Snyder f7ad54b324 Commentary: Changes update 2025-09-13 12:05:39 -04:00
Wilson Snyder ff0bf0a5e3 Tests: Add testcase (#4998) 2025-09-13 10:45:05 -04:00
Wilson Snyder 155cd9a8d0 Commentary 2025-09-13 10:23:37 -04:00
Wilson Snyder 663a9a3add Add waiver for foreach SIDEEFFECT in future UVM 2025-09-13 10:21:42 -04:00
Bartłomiej Chmiel be813e96dd Fix hierarchical --prof-pgo (#6213) 2025-09-13 10:19:00 -04:00
Wilson Snyder 907047d823 Tests: Remove unneeded AUTOARGS. No test change. 2025-09-13 09:28:43 -04:00
Wilson Snyder 62d403c060 Internals: Reformat verilated_std.sv. No functional change. 2025-09-13 09:10:51 -04:00
Wilson Snyder 419e775dfb Tests: Support ANSI input in driver 2025-09-13 08:53:23 -04:00
Artur Bieniek 1f61351e8f Fix resolving parameters (#6388) (#6418) (#6421) (#6438) (#6429)
Signed-off-by: Artur Bieniek <[email protected]>
2025-09-12 14:24:07 -04:00
أحمد المحمودي 39fd625f0c Add $(LDFLAGS) and $(LIBS) to when building shared libs (#6425) (#6426) 2025-09-12 12:40:13 -04:00
Wilson Snyder 8b7a841f09 Tests: Relax contributors for multi-language names 2025-09-12 08:43:45 -04:00
Wilson Snyder a4656b823d Commentary: Changes update 2025-09-12 08:37:26 -04:00
Wilson Snyder 1308be28fe Tests: Rename t_class_link* 2025-09-12 08:37:15 -04:00
Artur Bieniek 990ee994db Fix resolving parameters (#6388) (#6418) (#6421) 2025-09-12 07:18:12 -04:00
Bartłomiej Chmiel 9a6b24fca4 Fix parsing for sequence expressions (#6427)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
2025-09-12 07:17:26 -04:00
Wilson Snyder f53ca6ceee Commentary: Changes update 2025-09-11 21:13:47 -04:00
Wilson Snyder 04aa6ebb42 Tests: t_dynarray (#2618) 2025-09-11 20:05:49 -04:00
Geza Lore 4866cfa09f Fix deep shift pattern performance (#6379) (#6420) 2025-09-11 11:10:14 -04:00
Geza Lore 56927fb955 Fix memory leaks - batch 3 (#6419) 2025-09-11 12:01:36 +01:00
Geza Lore f1396fbced Fix memory leaks - batch 2 (#6417) 2025-09-10 22:42:45 +01:00
Geza Lore 57d8bb5d1f Internals: Always attempt to release resources on termination (#6416)
Replace std::exit with v3Global.exit, and make V3Error::vlAbort call
v3Global.shutdown. This gives us an opportunity to release resources to
facilitate leak checking even when exiting early on an error.

Note we still don't release most resources by default without
VL_LEAK_CHECKS, so there is no behaviour change there.
2025-09-10 13:20:19 -04:00
Geza Lore d3aab31bcf CI: Report RTLMeter performance numbers for all runs in PR comment (#6415) 2025-09-10 18:18:23 +01:00
Krzysztof Bieganski 5349b51e71 Allow pure functions in sensitivity lists (#6393)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2025-09-10 17:37:34 +02:00
Artur BieniekandKrzysztof Bieganski 1923d23cff Fix resolving default params upon instantiation or reference (#4497) (#6388)
Signed-off-by: Krzysztof Bieganski <[email protected]>
Signed-off-by: Artur Bieniek <[email protected]>
Co-authored-by: Krzysztof Bieganski <[email protected]>
2025-09-10 07:58:15 -04:00
Geza Lore c6b0918db5 Improve Dfg variable removal and temporary insertion (#6401)
Combined Dfg variable elimination into the regularization pass that runs
before converting back to Ast. This avoids introducing some unnecessary
temporaries.

Added replacing of variables with constants in the Ast if after the
Dfg passes they are known to be constants. This is only done in final
scoped Dfg application.

Avoid introducing temporaries for common sub-expressions that are
cheaper to re-compute than store in a temporary variable.

Enable removal of redundant unpacked array variables.

Also fixes #6394 as this patch involved changes to that code.
2025-09-10 12:38:49 +01:00
Krzysztof Bieganski 6c69210037 Fix multiple resolution of classes, broke recently (#6396) (#6410) (#6413)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2025-09-10 07:09:55 -04:00
Geza Lore 7f945bf89e Optimize constant folding in wide expression expansion (#6381)
Do not apply V3Const in V3Expand after a function if nothing was
expanded in it.

Also fix statistics counter while at it.

Inspired by #6379, follow up from #6111
2025-09-10 11:45:08 +01:00
Wilson Snyder 220a3faf7c Fix parameter implicit type from string (#6414). 2025-09-09 19:49:11 -04:00
Wilson Snyder a9f95f2f08 Fix false CONSTVAR error on initializers (#4992). 2025-09-09 19:27:43 -04:00
Wilson Snyder f8f5f8f84b Commentary: Fix warning documentation, add consistency test. 2025-09-09 19:14:48 -04:00
Wilson Snyder f57d1255e9 Fix import error format 2025-09-09 18:32:04 -04:00
Wilson Snyder 1fd9f3ce92 Commentary: Changes update 2025-09-09 17:47:26 -04:00
Wilson Snyder 90e20cba3d Commentary: Update GitHub issue templates 2025-09-09 17:46:58 -04:00
Geza Lore dd11d5a598 Fix memory leaks - batch 1 (#6411) 2025-09-09 22:39:44 +01:00
Geza Lore 83ff8e13ba Internals: Make bison output have correct debug info (#6409)
1. Move class V3ParseGrammar into V3ParseGrammar.h so editors understand
   it as c++ code
2. Fix #line directives in the bison output file

This together enables us to gdb through V3ParseGrammar, verilog.y, and
the bison generated C code step by step, with all source annotations in
the debug info pointing to the right place (e.g.: you will step to the
right place in verilog.y, then step back to the bison generated switch
statement/loop, and then step into calls in V3ParseGrammar as kind of
expected.
2025-09-09 15:47:45 +01:00
Geza Lore 77e5bb9ec9 CI: Run 24.04 clang build/test with --enable-asan (#6408) 2025-09-09 15:15:29 +01:00
Geza Lore 5ffa05fba0 Fix AddressSanitizer issues (#6406)
These are all genuine bugs, brief descriptions.

1. V3OrderCFuncEmitter.h used to delete a node early that was still
   reference in a graph dump later. Not a big deal, it can be deleted
   later at the end of V3Order.

2. V3Param.cpp: this one is tricky. The variable referenced by
   AstVarXRef was deleted at the end of `visit(AstGenCase*)`, but then
   `visit(AstVarXRef*)` checks `nodep->varp()` (already deleted) to see
   if it's in an interface.

3. V3String::wildMatch is sometimes called with an empty 's' (the string
   we are matching against tha pattern 'p'), in which case it used to go
   off into the woods. Added check on call. An arbitrary number of `*`
   will still match the empty string.

4. V3Task.cpp: There was an error reported for an unsupported construct,
   then a subsequent SEGV. Just signal the error upward so we bail on an
   error in a more graceful way.

5. verylog.y: Some unsupported constructs failed to set the parsed node,
   so some memory thrash made it into some code downstream. Just parse
   these into nullptr.

Also increased the timeout on one test, which sometimes tripped with
asan on GCC during heavy host load.
2025-09-09 13:55:00 +01:00
Krzysztof Bieganski 0743d84bcc Fix timing control under fork under function (#6407)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2025-09-09 14:12:24 +02:00
Wilson Snyder b45cf5960a Tests: Imporove t_covergroup_unsup (#6133) 2025-09-09 07:32:58 -04:00
Geza Lore 056c3ee331 Testing: Add --enable-asan configure option to compile with AddressSanitizer (#6404) 2025-09-09 08:55:49 +01:00
Wilson Snyder c6ffd22c45 Improve interface parent error wording (#5357) 2025-09-08 07:21:03 -04:00
Geza Lore a1167b3d55 Fix use after free in V3LinkDot (#6403) 2025-09-08 10:24:55 +01:00
Wilson Snyder e60f52ee0c Internals: Add CCall assertion 2025-09-07 17:18:23 -04:00
Wilson Snyder 72acb2edfd CI: rename workflow for consistency 2025-09-07 16:29:29 -04:00
Geza Lore 6bc48fcdb3 Improve Dfg type system (#6390)
Added a mini type system for Dfg using DfgDataType to replace Dfg's use
of AstNodeDType. This is much more restricted and represents only the
types Dfg can handle in a canonical form. This will be needed when
adding more support for unpacked arrays and maybe unpacked structs one
day.

Also added an internal type checker for DfgGraphs which encodes all the
assumptions the code makes about type relationships in the graph. Run
this in a few places with --debug-check. Fix resulting fallout.
2025-09-07 20:38:50 +01:00
Wilson Snyder f67534069c CI: Avoid man page builds (#6402) 2025-09-07 13:32:34 -04:00
Wilson Snyder 4d671dc5d7 De-debug, as on wrong branch ;) 2025-09-07 11:27:48 -04:00
Wilson Snyder f851671c41 debug 2025-09-07 11:19:48 -04:00
Wilson Snyder d186dcdc32 ci: avoid man page builds (#6398) 2025-09-06 18:48:39 -04:00
Krzysztof Bieganski 46f8003c4e Fix import of class with default params (#6396)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2025-09-06 21:21:50 +02:00
Wilson Snyder 3549fd1aa0 Add parsing of $assert*, $coverage* and $q_* as still unsupported. 2025-09-06 10:31:08 -04:00
Wilson Snyder 819625de61 Lint cleanup 2025-09-06 09:04:05 -04:00
Wilson Snyder aa28a8d1e1 Fix cell scoping performance (#6059). 2025-09-06 08:35:07 -04:00
Wilson Snyder 0d1f036f17 Add error on non-packed struct randc (#5999). 2025-09-06 08:24:19 -04:00
Wilson Snyder b4a9ff4ffe Commentary: Changes update 2025-09-06 08:23:18 -04:00
Wilson Snyder f41e36b99f Commentary: Convert docs examples to 2 space indents. 2025-09-06 07:51:49 -04:00
Wilson Snyder 85454f6083 Fix wire array with initial assignment (#6391). 2025-09-05 17:31:17 -04:00
Geza Lore 141de7b94a Tests: Do not redirect interactive debugger stdout (#6389) (#6392) 2025-09-05 17:06:23 -04:00
Artur Bieniek 905c0c4f6d Optimize dead functions without references (#6380) 2025-09-05 13:23:43 -04:00
Jakub Wasilewski a364704e3a Improve covergroup with function sample handling (#6387) 2025-09-05 13:16:30 -04:00
Ryszard Rozak 107f64e53b Fix segfault when modport variable is unresolved (#6386) 2025-09-05 14:27:46 +02:00
Geza Lore a966e6aa13 Improve automatic selection of logic for Dfg synthesis (#6370)
Reduce set of synthesized logic to be more in-line with what Dfg used to
handle before + drivers of circular variables. This was always the
intention but the previous algorithm was both a bit too eager, and also
missed some circular variables. We can add back more heuristics based on
performance measurements for non-circular logic later.
2025-09-05 08:14:48 +01:00
Wilson Snyder feea221f39 Fix COVERAGEIGN-ignored get_inst_coverage and other covergroup methods (#6383). 2025-09-04 22:18:56 -04:00
Geza Lore a12caa4799 Internals: Remove double Class::Class 2025-09-04 19:18:02 +01:00
Geza Lore 63993436c9 Fix driver tracing of partially assigned variable (#6364) (#6378)
Fixes #6364
2025-09-04 15:02:33 +01:00
Wilson Snyder 7d3c58d21c Docs: Notes about --x-initial-edge (#6377 comment) 2025-09-04 09:09:54 -04:00
dependabot[bot] 319ab84f90 Bump actions/checkout from 4 to 5 (#6374) 2025-09-04 08:21:26 -04:00
Wilson Snyder 4e091a1cf1 Tests: Ignore all bots in t_dist_contributors.py 2025-09-04 06:56:48 -04:00
dependabot[bot] e3acd528d8 Bump actions/create-github-app-token from 2.0.6 to 2.1.1 (#6375) 2025-09-04 06:21:48 -04:00
dependabot[bot] 43a03b1660 Bump docker/metadata-action from 4 to 5 (#6376) 2025-09-04 06:21:14 -04:00
Igor Zaworski 4070db9990 Fix rand variable inside constraint (#6315) 2025-09-04 06:19:08 -04:00
Geza Lore 5f0eb007b1 Internals: Squelch false GCC fallthrough warning (#6369) 2025-09-03 20:14:11 -04:00
Wilson Snyder bd7f6d3c19 Fix randomize local after parameters applied (#6371). 2025-09-03 20:04:41 -04:00
Wilson Snyder 929d2ad83a Fix package imports not found after parameters applied (#6373). 2025-09-03 19:45:43 -04:00
Wilson Snyder 7a4049b683 Fix docs HTML format from last commit 2025-09-03 19:28:17 -04:00
Wilson Snyder e2b9cadb1d Commentary: Changes update 2025-09-03 18:55:41 -04:00
Wilson Snyder 1ceda731e5 CI: Avoid duplicate action runs on dependabot 2025-09-03 18:54:27 -04:00
dependabot[bot] fcebac6b16 Bump docker/setup-buildx-action from 2 to 3 (#6372) 2025-09-03 18:50:58 -04:00
dependabot[bot] 1158842b7e Bump docker/login-action from 2 to 3 (#6368) 2025-09-03 18:50:33 -04:00
dependabot[bot] 2a09114dc7 Bump actions/download-artifact from 4 to 5 (#6367) 2025-09-03 18:50:12 -04:00
dependabot[bot] d95e4dc150 Bump docker/setup-qemu-action from 2 to 3 (#6366) 2025-09-03 18:49:54 -04:00
dependabot[bot] 17f29b41c2 Bump docker/build-push-action from 4 to 6 (#6365) 2025-09-03 18:49:34 -04:00
Wilson Snyder 98c7089f5b Commentary: CONTRIBUTORS for dependabot 2025-09-03 14:59:20 -04:00
Geza Lore a49334f3e4 Internals: Move Dfg CSE into separate source file (#6363)
Parts of this algorithm were distributed over many files some
masquerading as re-usable APIs, they were not. Move everything into one
file and avoid unnecessary virtual functions.
2025-09-03 17:34:55 +01:00
Geza Lore 5161cea8cd Internals: Improve astgen type enums to be switch statement friendly (#6362)
- Remove _ENUM_END, so -Wswitch does not demand it's covered. Use the
  new NUM_TYPES constexpr member instead.
- Remove 'at' prefix. This seems historical and is not particularly  useful.
- Fix some cppcheck warts while at it
2025-09-03 13:56:11 +01:00
Geza Lore 8bf2240d40 Internals: Add DfgWorklist commonly used in algorithms (#6361) 2025-09-03 13:55:33 +01:00
Wilson Snyder 1e4ede08b6 CI: Put all OS builds into build-deploy workflow, add passed job (#6358) 2025-09-03 06:32:10 -04:00
Geza Lore 041dad92cf Internals: Remove use of DfgVetex::equals from V3DfgPeephole
This is both unnecessary and slower than the existing `isSame`.
2025-09-03 10:27:42 +01:00
Wilson Snyder 4cda2c0a4e CI: Add dependabot 2025-09-02 19:27:08 -04:00
Geza Lore e63ed0a931 Internals: Manage DfgVertex user data via a typed map (#6356)
Add DfgUserMap as a handle around the one pointer worth of algorithm
specific 'user' storage in each DfgVertex. This reduces verbosity,
improves type safety and correctness. Also enables us to remove one
pointer from DfgVertex to reduce memory use. No functional change.
2025-09-02 22:21:24 +01:00
Geza Lore a6f26b85b3 Internals: Improve DFG implementation details (#6355)
Large scale refactoring to simplify some of the more obtuse internals of
DFG. Remove multiple redundant internal APIs, simplify representation of
variables, fix potential unsoundness in circular decomposition. No
functional change intended.
2025-09-02 16:50:40 +01:00
Wilson Snyder 67f26508ba Support $sscanf %t 2025-09-01 14:40:22 -04:00
Wilson Snyder 33b838f139 Support 'this.super' 2025-09-01 13:07:02 -04:00
Krzysztof Bieganski f58b323736 Wrap forked processes in begins early (#6343) (#6354)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2025-09-01 17:25:57 +02:00
Wilson Snyder 37c79532fe Add VERILATOR_SOLVER to verilator -V 2025-09-01 08:45:01 -04:00
Wilson Snyder 4bf2d0d755 Tests: More uvm_dpi testing (#4566) 2025-09-01 08:32:13 -04:00
Lan Zongwei b3e70efa30 Fix cmake variable APPLE (#6351) 2025-08-31 19:42:31 -04:00
Geza Lore 68ce45f203 Internals: Post RTLMeter metrics in PR comment (#6349)
Fixes #6301
2025-08-31 20:52:43 +01:00
Geza Lore 5bdc9abd2f Internals: Use Verilator CI App in 'RTLMeter PR results' 2025-08-31 18:17:40 +01:00
Lan Zongwei c03cb9d9c2 CI: introduce osx-build github workflow (#6352). 2025-08-31 12:58:05 -04:00
Geza Lore 34e3892367 Internals: Add 'RTLMeter PR results' workflow v3 2025-08-31 17:00:57 +01:00
Wilson Snyder 9953851287 Tests: Add t_math_synmul and t_math_wallace from verilator_ext_tests 2025-08-31 11:12:14 -04:00
Wilson Snyder c73259d2f0 Tests: Upgrade some failing tests without expected .out files. 2025-08-31 11:12:14 -04:00
Geza Lore 8ac8c64885 Internals: Add 'RTLMeter PR results' workflow v2 2025-08-31 16:01:58 +01:00
Geza Lore 7ac610a3cb Internals: Add 'RTLMeter PR results' workflow
Workflows triggered for a PR from a fork can never have write
permissions, so to post a comment on a PR, it must be done from a
separate workflow triggered by 'workflow_run' in the main repository.
2025-08-31 15:06:50 +01:00
Lan Zongwei 2aa260a03b Fix V3Hash MacOS ambiguity again (#6350) 2025-08-31 09:54:13 -04:00
Wilson Snyder 4eb030717a devel release 2025-08-30 18:15:10 -04:00
Wilson Snyder 51cdf52d0f Version bump 2025-08-30 18:11:51 -04:00
Wilson Snyder 6a14facf48 Tests: Fix version miscompare in t_uvm_dpi 2025-08-30 18:10:13 -04:00
Wilson Snyder 7bb38d21b9 Commentary: Changes update 2025-08-30 17:58:12 -04:00
Congcong Cai ca2c40347b Fix undefined weak link for Apple GCC etc (#6348) 2025-08-30 14:25:20 -04:00
Geza Lore b0044da8a7 Internals: Upload published nightly RTLMeter results artifact (#6346)
First half of #6301
2025-08-30 16:08:44 +01:00
Geza Lore 3770273637 Optimize logic in non-virtual interfaces with DFG (#6347) 2025-08-30 10:35:16 -04:00
Geza Lore c33f2b42aa Fix wide select expansion and substitution (#6341) (#6345) 2025-08-30 10:34:39 -04:00
Wilson Snyder 14ec6258d9 Internals: Fix compiler warning last commit 2025-08-30 08:22:22 -04:00
Wilson Snyder b6ecffeb60 Support recursive constant functions. 2025-08-30 07:45:35 -04:00
Wilson Snyder 712ff95a48 Internals: Remove unneeded return, cleanup param test. No functional change 2025-08-30 07:42:41 -04:00
Wilson Snyder fbfd1f12dd Tests: Fix sarif reruns 2025-08-29 21:36:54 -04:00
Krzysztof Bieganski 40dda323fe Fix upcasting class type parameters (#6344)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2025-08-29 21:20:09 -04:00
Wilson Snyder 91ae4c35b7 Add error on force/release non-constant selects. 2025-08-29 21:19:37 -04:00
Wilson Snyder a3d7b7d779 Commentary: Changes update 2025-08-29 21:13:43 -04:00
Wilson Snyder 91d138248d Tests: Favor all caps for tests' parameters. No test change. 2025-08-29 18:33:14 -04:00
8868d459a2 Fix broken support of unassigned virtual interfaces (#6253) (#6338)
* Fix broken support of unassigned virtual interfaces

Unassigned virtual interface support added by #6245 is broken - PR marks
dead module as alive - we can't do that as once a module is dead it
needs to remain dead because earlier steps (e.g. port resolution) have
already been skipped.

This commit handles unassigned virtual interfaces at the beginning of
first pass of LinkDot (so it is never marked as dead, and no linking
steps are getting skipped).

Fixes #6253.

* Apply suggestions from code review

Co-authored-by: Wilson Snyder <[email protected]>

* Apply 'make format'

* Revert add of redundant iterateChildren() call

* Add original test case

---------

Co-authored-by: Wilson Snyder <[email protected]>
Co-authored-by: github action <[email protected]>
2025-08-28 09:03:46 -04:00
Geza Lore 1043a6c6be Fix splitting of assignments to SC variables (#6329) (#6336)
SC variables can only be assigned whole, so do not split up
concatenation assignments in V3FuncOpt.

Fixes #6329
2025-08-28 08:48:51 +01:00
Wilson Snyder 409e036eca Add error on gate primitive connection width mismatch 2025-08-27 22:28:09 -04:00
Wilson Snyder e32108713d Fix randomize on function-local variable (#6234). 2025-08-27 21:25:40 -04:00
Wilson Snyder 54efa86a6c Fix error on too many UDP port inputs 2025-08-27 07:48:33 -04:00
Ryszard Rozak ac21d25d43 Support simple disable within task (#6334) 2025-08-26 10:39:24 -04:00
Geza Lore a841a962ce Optimize interfaces in Dfg (#6332)
Interfaces that have no corresponding virtual interface references can
be safely optimized by Dfg after V3Scope. Enabling it to do so.
2025-08-26 11:24:15 +01:00
Wilson Snyder 5f23bf95f6 Internals: Refactor V3EmitUtil to not be base class. No functional change. 2025-08-25 22:05:40 -04:00
Wilson Snyder ac2859bf24 Internals: Upgrade to clang-format-18 (#6333) 2025-08-25 20:47:48 -04:00
Wilson Snyder 703f0d8c5d Commentary: spelling 2025-08-25 18:47:08 -04:00
Wilson Snyder 3d76bb9944 Commentary: Changes update 2025-08-25 17:50:29 -04:00
Geza Lore 02e64f0795 Optimize multiplexers in Dfg synthesis (#6331)
The previous algorithm was designed to handle the general case where a
full control flow path predicate is required to select which value to
use when synthesizing control flow join point in an always block.

Here we add a better algorithm that tries to use the predicate of
the closest dominating branch if the branch paths dominate the joining
paths. This is almost universally true in synthesizable logic (RTLMeter
has no exceptions), however there are cases where this is not
applicable, for which we fall back on the previous generic algorithm.

Overall this significantly simplifies the synthesized Dfg graphs and
enables further optimization.
2025-08-25 13:47:45 +01:00
Igor Zaworski c2cac8a7fd Fix of localize for super constructors with function calls as arguments (#6330) 2025-08-25 06:55:11 -04:00
Wilson Snyder ac2a75fbb5 Support future sampled value functions. 2025-08-23 21:16:53 -04:00
Wilson Snyder 7affb3e580 Internals: Add $past variable statistic 2025-08-23 21:10:46 -04:00
Wilson Snyder b226be7f98 Fix to select UDPs when they are the only candidate for a top module. 2025-08-23 15:20:58 -04:00
Wilson Snyder f45b811c22 Commentary: Changes update 2025-08-23 15:20:36 -04:00
Aleksander Kiryk ee1ab074dc Internals: Fix missing variable initializations (#6327) 2025-08-23 10:59:12 -04:00
Aleksander Kiryk a9aa2f11b8 Improve testing on FreeBSD (#6328)
* Skip profiling tests on non-glibc platforms

* Enforce dumb terminal in tests

* Include POSIX headers whenever __unix__ macro is defined

* Treat no procfs as normal condition

* Respect MAKE variable when running make
2025-08-23 10:49:03 -04:00
Aleksander Kiryk 353a2e3d20 Fix gathering senaitivities from virtual interface members (#6325) 2025-08-23 10:45:13 -04:00
Aleksander Kiryk 34315a4f70 Fix FreeBSD missing headers (#6326)
* Include missing libgen.h

* Include missing cinttypes
2025-08-23 10:38:18 -04:00
Aleksander Kiryk d56d1a7719 Fix queue extend to check bounds (#6324) 2025-08-23 10:37:40 -04:00
Geza Lore 1c86ff0af2 Fix corner case bugs in module and variable inlining (#6322)
There were a couple corner case bugs in V3Inline, and one in Dfg when
dealing with inlining of modules/variables.

V3Inline:
- Invalid code generated when inlining an input that also had an
  assignment to it (Throws an ASSIGNIN, but this is sometimes reasonable
  to do, e.g. hiererchical reference to an unonnected input port)
- Inlining (aliasing) publicly writeable input port.
- Inlining forcable port connected to constant.

Dfg:
- Inining publicly writeable variables

The tests that cover these are the same and fixing one will trigger the
other bug, so fixing them all in one go. Also cleanup V3Inline to be less
out of order and rely less on unique APIs only used by V3Inine (will
remove those in follow up patch).

Small step towards #6280.
2025-08-22 21:43:49 +01:00
Igor Zaworski f506aa878b Fix of inline constraints with member selects (#6321) 2025-08-22 07:58:03 -04:00
Igor Zaworski b95a974ff1 Support generic interfaces (#6272) 2025-08-22 06:44:35 -04:00
Artur Bieniek b19215770b Fix direct NBA to dynamically-sized variable (#6310) 2025-08-22 06:21:13 -04:00
Wilson Snyder 457fcc267b Support elaboration-time printing of unpacked array with %p (#4732). 2025-08-21 21:44:31 -04:00
Wilson Snyder e202cb31d8 Change $display("%p") to remove space after }. 2025-08-21 21:33:05 -04:00
Wilson Snyder b96f35b8fe Internals: Add AstToStringN (#4732 prep) 2025-08-21 21:09:10 -04:00
Wilson Snyder 997d5ecdf1 Internals: Cleanup cppcheck c casts. No functional change intended. 2025-08-21 20:06:43 -04:00
Igor Zaworski 631714c50a Fix expression type comparison (#6316) 2025-08-21 06:26:30 -04:00
Geza Lore 327d55d13d Internals: Fix remaining cppcheck errors (#6319)
Fixed the non const-related issue and added suppressions for the const
ones. With that `make cppcheck` should be clean.
2025-08-21 09:43:37 +01:00
Wilson Snyder bd91b619ad Support $fread with missing start (#6125). 2025-08-20 21:19:42 -04:00
Wilson Snyder dc5a17fea0 Support unpacked array with methods (#6134). 2025-08-20 21:01:34 -04:00
Wilson Snyder 254eb407ff Commentary: Changes update 2025-08-20 21:00:40 -04:00
Geza Lore 92d47ca23a Internals: Add separate cppcheck targets for whole components (#6318)
cppcheck provides best results when analysing the whole program. It also
has a builtin `-j` option to run on multiple threads.

Replace existing cppcheck-* targets with cppcheck-verilator,
cppcheck-runtime, cppcheck-example and cppcheck-vlc that checks each of
those components as a whole. Each of these runs on the maximum available
logical processors on the host by default, as reported by `nproc`, but
can be manually overridden with `make CPPCHECK_JOBS=<number>` instead.

The `make cppcheck` target runs the 4 cppcheck-* targets listed above
sequentially (but each of them uses the specified CPPCHECK_JOBS threads)
2025-08-20 13:49:59 -04:00
Geza Lore 67da797816 Internals: Cleanup cppcheck warnings (#6317)
`make cppcheck-4` is now clean.
2025-08-20 18:21:24 +01:00
Ryszard Rozak 3d3462b209 Support disabling a fork from within that fork (#6314) 2025-08-20 12:21:07 -04:00
Igor Zaworski 11667160f2 Fix static vars under member select (#6313) 2025-08-20 11:23:16 -04:00
Ryszard Rozak 95c8b7bb00 Support separate coverage counters for toggles 0->1 and 1->0 (#6086) 2025-08-20 07:31:04 -04:00
Wilson Snyder 9b2f55ab39 Internals: Fix up include/ cppcheck issues (#6311) 2025-08-20 07:27:55 -04:00
Wilson Snyder f71b8e6195 Internals: Fix up include/ cppcheck issues (#6311) 2025-08-19 21:36:52 -04:00
Geza Lore d1f71f2342 Internals: Improve V3Rtti for cppcheck (#6312)
Rewrite with much less running around in the templates. Use private
methods only + friend functions that do the actual type check. This
avoids cppcheck warnings.
2025-08-19 23:05:34 +01:00
Geza Lore a0edd4e907 Internals: Improve cppcheck flow and fix up issues (#6311)
Added cppcheck-suppressions.txt in the repo root. You can add new
patterns in there instead of having to parse the XML output.

Also configure to add the -D__GNUC__ preprocessor macro, which makes it
understand UASSERT (it understands the 'noreturn' function attribute).

Added some case by case specific suppressions and fixed up other code,
especially in V3Ast*h and V3Dfg*.h, including code generated by astgen
that had some no-ops that irks cppcheck.

One thing it does not seem to like is `const` class members with default
initializers in the class. It will assume that's always the value, even
if overridden in the constructor. We had few so removed them.

With that a lot of files in `src/` are now clean or only have a handful
of issues. Therefore, I have also deleted cppcheck_filtered, and made it
produce human readable output straight to the terminal.

Regarding cleaning up the reported nits, I kind of got bored after
V3[A-E] so pausing here. Apologies for the merge conflicts.

Tested with cppcheck 2.13.0
2025-08-19 22:02:10 +01:00
Geza Lore 636a6b8cd2 Optimize complex combinational logic in DFG (#6298)
This patch adds DfgLogic, which is a vertex that represents a whole,
arbitrarily complex combinational AstAlways or AstAssignW in the
DfgGraph.

Implementing this requires computing the variables live at entry to the
AstAlways (variables read by the block), so there is a new
ControlFlowGraph data structure and a classical data-flow analysis based
live variable analysis to do that at the variable level (as opposed to
bit/element level).

The actual CFG construction and live variable analysis is best effort,
and might fail for currently unhandled constructs or data types. This
can be extended later.

V3DfgAstToDfg is changed to convert the Ast into an initial DfgGraph
containing only DfgLogic, DfgVertexSplice and DfgVertexVar vertices.

The DfgLogic are then subsequently synthesized into primitive operations
by the new V3DfgSynthesize pass, which is a combination of the old
V3DfgAstToDfg conversion and new code to handle AstAlways blocks with
complex flow control.

V3DfgSynthesize by default will synthesize roughly the same constructs
as V3DfgAstToDfg used to handle before, plus any logic that is part of a
combinational cycle within the DfgGraph. This enables breaking up these
cycles, for which there are extensions to V3DfgBreakCycles in this patch
as well. V3DfgSynthesize will then delete all non synthesized or non
synthesizable DfgLogic vertices and the rest of the Dfg pipeline is
identical, with minor changes to adjust for the changed representation.

Because with this change we can now eliminate many more UNOPTFLAT, DFG
has been disabled in all the tests that specifically target testing the
scheduling and reporting of circular combinational logic.
2025-08-19 15:06:38 +01:00
Geza Lore 6a67c0a0e5 Iternals: Fix AstSplitPlaceholder, it is a statement (#6280) (#6309) 2025-08-19 11:14:28 +01:00
Geza Lore 6b9cc8a36e Internals: Fix AstNodeCoverDecl, it is not a statement (#6280) (#6308) 2025-08-19 11:14:17 +01:00
Geza Lore 0bf9fc270f Iternals: Remove AstAssignPre/AstAssignPost (#6307)
Replace with AstAlwaysPre/AstAlwaysPost with AstAssign under them.

Step towards #6280
2025-08-19 09:27:59 +01:00
Geza Lore c9a6d06544 Improve V3LifePost to not require AstAssignPre/AssignPost (#6306)
Rewrote V3LifePost to not depend on having AstAssignPre and
AstAssignPost types, but work with generic AstNodeAssign. There is an
extra flag in AstVarScope to denote it's part of an NBA and should be
considered.

Step towards #6280.
2025-08-19 00:11:14 +01:00
Wilson Snyder c90f9e53b7 Add ALWNEVER warning, for always @* that never execute (#6291) (#6303) 2025-08-18 12:00:53 -04:00
Artur Bieniek 53c59e7ac7 Fix referencing module variables above classes (#6304)
Signed-off-by: Artur Bieniek <[email protected]>
2025-08-18 08:51:25 -04:00
Geza Lore 9dc31e4556 Fix unsound assertion in V3Delayed (#6305) 2025-08-18 13:46:35 +01:00
Geza Lore c172cc2ab0 Internals: Simplify port connect after instance dearray (#6302)
Pre pull for #6298
2025-08-18 09:55:54 +01:00
Wilson Snyder 25d71a43a5 For hier-generated Verilog, use always_comb 2025-08-17 20:14:19 -04:00
Wilson Snyder 88046c8063 Internals: Rename AstSenTree pointers to sentreep. No functional change intended except JSON. 2025-08-17 19:14:34 -04:00
Wilson Snyder dbdf235115 Commentary: Changes update 2025-08-17 14:53:59 -04:00
Wilson Snyder eaecdf7477 Tests: Improve check for member brace initialization. 2025-08-17 14:40:10 -04:00
Geza Lore f6edf26eb2 Fix hierarchical NBAs (#6286) (#6300)
NBAs targeting a variable in a different scope are now allocated
temporary variables for captured values in the scope of the NBA, not the
scope of the target variable.

Fixes #6286
2025-08-17 19:35:40 +01:00
Wilson Snyder b14539569f Internals: Check and enforce member brace initialization. No functional change intended 2025-08-17 13:20:52 -04:00
Wilson Snyder 7126293086 Support enum.next with a parameter 2025-08-16 21:06:35 -04:00
Wilson Snyder 36c4a24661 Internals: constifyParamsEdit return value was unused. No functional change. 2025-08-16 21:03:12 -04:00
Wilson Snyder 49ca1cfdd7 Commentary 2025-08-16 18:32:40 -04:00
Wilson Snyder 48a12fb0f4 Document and test +verilator+rand+reset+2 usage (#6285 partial) 2025-08-16 11:47:19 -04:00
Wilson Snyder 340d1aff4a Tests: Cleanup to favor '--binary'. No test change intended. 2025-08-16 09:26:42 -04:00
Wilson Snyder 000d697b51 Commentary: Changes update 2025-08-16 09:08:09 -04:00
Geza Lore a300bfc538 Internals: Add AstNodeStmt.h (#6295)
Move AstNodeStmt and all its subtypes into AstNodeStmt.h.

This is the first step for #6280.

No functional change
2025-08-16 09:46:18 +01:00
Geza Lore 6f69c990fd Internals: Remove AstCondBound and AstNodeCond (#6293) (#6294)
Fixes #6293
2025-08-15 15:49:06 -07:00
Geza Lore d273e2cbd0 Internals: Do not astgen useless Dfg vertex subtypes 2025-08-15 20:06:58 +01:00
Sergey Fedorov ece4469869 Fix PowerPC support (#6292) 2025-08-15 11:25:32 -07:00
Geza Lore 9c11f5e05d Fix DFG circular driver tracing 2025-08-15 10:20:20 +01:00
Mateusz Gancarz e753480b19 Fix no matching function calls for randomized VlWide in unpacked and dynamic arrays (#6290) 2025-08-14 05:19:33 -07:00
Wilson Snyder 047a12cc62 Fix variables hiding package imports (#6289). 2025-08-13 18:05:37 -04:00
Wilson Snyder 75c6745868 Test driver.py: Pass-through +verilator+ arguments to runtime 2025-08-12 19:32:56 -04:00
Wilson Snyder 60cbbf0ec1 Add error on mismatching prototypes (#6207). 2025-08-11 19:50:47 -04:00
Geza Lore 762c5f573c Improve DFG to enable breaking more combinational cycles 2025-08-11 09:44:31 +01:00
Geza Lore 7696b0651c Internals: Improve DFG dumping functions 2025-08-10 16:48:40 +01:00
Wilson Snyder e6e52dd60a Tests: Fix t_constraint_nosolver_bad.py (#6273) 2025-08-10 08:43:04 -04:00
Wilson Snyder eb80db9397 Clarify extern error message 2025-08-10 08:38:26 -04:00
Wilson Snyder 641dd756c0 Add check for mis-assignment of dynamic/automatics per IEEE 2025-08-10 07:23:28 -04:00
Wilson Snyder a74a3bb689 Internals: No need for 'if' before VL_FFLUSH_I 2025-08-10 06:13:18 -04:00
Geza Lore d28436dccc Fix stray ']' in Verilog code output for non-constant select (#6277) 2025-08-09 14:59:58 +01:00
Wilson Snyder 3ca1c9b6dd Internals: Fix and enforce brace new constructors. No functional change intended. 2025-08-08 18:21:12 -04:00
Wilson Snyder 1eccfa64b5 Commentary 2025-08-08 17:54:48 -04:00
Wilson Snyder 1d05028087 Add compiler warning disable '-Wno-int-in-bool-context' 2025-08-08 17:54:48 -04:00
Geza Lore 16d32cdd4a Internals: Refactor Ast to Dfg conversion for reusability. (#6276)
This is mainly code motion, with minimal algorithmic changes to
facilitate reusing parts in future code. No functional change intended.
2025-08-08 22:53:12 +01:00
Wilson Snyder d1f851e1e1 Internals: Optimize empty 'if' into StmtExpr 2025-08-08 05:10:40 -04:00
Wilson Snyder 6a225d5d00 Internals: Remove AstSysFuncAsTask 2025-08-08 05:09:54 -04:00
Wilson Snyder b12b1c9658 Commentary: Changes update 2025-08-08 05:09:16 -04:00
Geza Lore dbb8cbece2 CI: Improve RTLMeter failure issue body (#6275) 2025-08-08 09:13:29 +01:00
Geza Lore 9ddbf5f4b8 CI: Only raise RTLMeter failure issue on failure 2025-08-08 08:07:55 +01:00
Geza Lore b2388faa5e CI: Add running RTLMeter workflow on selective PRs (#6271)
Runs RTLMeter on PRs if the PR has the 'pr: rtlmeter' label applied to
it. This should make it easy to selectively require the RTLMeter
workflows to pass on a PR that is potentially invasive, per our own
judgement.
2025-08-07 19:30:43 +01:00
Geza Lore 188a12f609 CI: Add raising GitHub issue on failure of scheduled RTLMeter job (#6270) 2025-08-07 18:17:00 +01:00
Todd Strader 6bd6663dc9 Fix spurious VPI value change callbacks (#6274) 2025-08-07 16:37:33 +01:00
Artur Bieniek 5b7188fcaf Fix same variable on the RHS forced to two different LHSs. (#6269) 2025-08-06 17:37:00 -04:00
github action dc049fdd74 Apply 'make format' 2025-08-06 21:30:37 +00:00
Michael Bedford Taylor 218659f4e8 Support parameter resolution of 1D unpacked array slices (#6257) (#6268) 2025-08-06 17:29:40 -04:00
Igor Zaworski 6c1cfc68cf Fix dynamic cast purity (#6267)
Signed-off-by: Igor Zaworski <[email protected]>
2025-08-06 07:09:44 -04:00
Wilson Snyder fbaff52668 Change runtime to exit() instead of abort(), unless under +verilated+debug. 2025-08-05 18:43:29 -04:00
Wilson Snyder 06c570e159 Commentary 2025-08-05 17:56:12 -04:00
Wilson Snyder c005486acf Support by ignoring delay2 on UDPs 2025-08-05 17:34:42 -04:00
Wilson Snyder 6467351752 Add error on class 'function static'. 2025-08-05 17:12:00 -04:00
Wilson Snyder 4bd17f0a6f Commentary: Changes update 2025-08-05 17:08:09 -04:00
Wilson Snyder 870c398094 Fix incorrect Non-ANSI I/O declaration conflict error (#6258) broke with #bd1ac038 2025-08-05 16:33:28 -04:00
Geza Lore 86c56e8e14 Fix true cycle detection in DFG 2025-08-05 15:04:07 +01:00
Geza Lore 25d968b833 Fix infinite loop in VString::replaceSubstr
If the replaced string was a suffix of the replacement, we used to get
an infinite loop.
2025-08-05 14:41:38 +01:00
Geza Lore 2c41a7bbf6 Adjust make test-snap / make test-diff rules 2025-08-05 14:41:38 +01:00
Geza Lore 158a54a7ff Defer deletion of eliminated Ast variables until end of Dfg pass. (#6263)
This is currently unnecessary but future patch will depend on it.
2025-08-05 14:29:33 +01:00
Geza Lore 8c9a4fec83 Emit memory addresses of vertices in Dfg dumps 2025-08-05 13:03:57 +01:00
Geza Lore 53332ae03e Unify the two DFG cycle finding algorithms. (#6262)
Both V3DfgBreakCycles.cpp and V3DfgDecomposition.cpp used to contain an
implementation of the same algorithm to color strongly connected
components. Now there is only one, and it lives in V3DfgColorSCCs.cpp.
2025-08-05 13:03:30 +01:00
Geza Lore 4a5935d248 Merge DFG components made acyclic into the original acyclic sub-graph. (#6261)
After making a cyclic DFG component acyclic, merge that component back
into the acyclic sub-graph of the input graph. This enables optimizing
through the components that were made acyclic in their larger context.
2025-08-05 12:11:02 +01:00
Geza Lore 78c9e7773a Allow more variable removal in scoped DFG (#6260) 2025-08-05 11:18:33 +01:00
Geza Lore d2edab458e Refactor Dfg variable flags (#6259)
Store all flags in a DfgVertexVar relating to the underlying
AstVar/AstVarScope stored via AstNode::user1(). user2/user3/user4 are
then usable by DFG algorithms as needed.
2025-08-05 10:24:54 +01:00
Geza Lore d415757b0e Remove unhelpful DFG debug dumps 2025-08-05 05:06:44 +01:00
Ryszard Rozak 7d2b6bd921 Internals: Optimize updates of Vtogcov signals. No functional change intended. (#6110) 2025-08-04 13:29:56 +01:00
Wilson Snyder 52ac3b3a0d Add error on too many pattern members for structure 2025-08-03 17:26:51 -04:00
Wilson Snyder f106c1eaec Fix genvar check to be more strict about generate-for usage only 2025-08-03 16:57:12 -04:00
Wilson Snyder 309129ebcf Add PARAMNODEFAULT error, for parameters without defaults. 2025-08-03 15:27:37 -04:00
Geza Lore deed20fb78 Fix partial DFG conversion of concat assignments (#6255)
When we had a `{a, b} = ...`, and the DFG conversion of `a = ...`
succeeded, but `b = ...` failed, we still used to include `a = ...` in
the DFG, which then caused a spurious multi-driver error for `a` on
a subsequent DFG pass, as the original `{a, b} = ...` was still present
in the Ast, but we also had the extra `a = ...` from converting out of
DFG on the previous pass.

In this patch we only convert assignments with a concatenation on the
LHS, if all target LValues can be converted into DFG.

This is the proper fix for #4231
2025-08-03 14:52:20 +01:00
Wilson Snyder 36577bb549 Add check for missing 'parameter' on implicit types 2025-08-02 17:02:45 -04:00
Wilson Snyder de9671d4a3 Tests: uvm_regex.cc from upstream has clang warnings 2025-08-02 15:03:09 -04:00
Wilson Snyder 12355270b3 Tests: Add uvm_dpi 2025-08-02 13:50:16 -04:00
Wilson Snyder 473d54aa95 Internals: Fis emit spacing etc. No functional change 2025-08-02 13:47:07 -04:00
Wilson Snyder dca504c706 Internals: Use UINFOTREE istead of dumpTree 2025-08-02 13:44:40 -04:00
Wilson Snyder 7bb790f7e4 CI: Proactively use windows-2025 2025-08-01 12:05:53 -04:00
Ryszard Rozak f9bdab65f0 Fix coverage of variables of complex types (#6250) 2025-08-01 13:24:18 +02:00
Szymon Gizler 61f4c97f40 Support unassigned virtual interfaces (#5265) (#6245) 2025-08-01 12:39:13 +02:00
Rodrigo Batista de Moraes d0f0919830 Fix write of 0 in '%c' (#6248) (#6249) 2025-08-01 07:54:18 +02:00
Wilson Snyder bd1ac03828 Add I/O versus data declaration checking. 2025-07-31 18:38:50 -04:00
Wilson Snyder 00948a45a3 Commentary: Changes update 2025-07-31 18:09:51 -04:00
Wilson Snyder 5faaa7ec58 Commentary (#6246) 2025-07-31 18:09:43 -04:00
Ryszard Rozak d8f1e1113a Fix error when force assignment is used with ref function args (#6244) 2025-07-31 12:48:37 +02:00
Wilson Snyder 9d38e63269 Remove error on missing forward declarations of typedef in class (#6207). 2025-07-30 09:14:13 -04:00
Geza Lore 9d2adf3e49 Internals: Enable EmitV to output formatted code to std::ostream (#6239)
Introduce V3OutStream as a V3OutFormatter that writes to a stream
instead of a file. This can be used to emit formatted code fragments
e.g. in debug prints and graph dumps.
2025-07-30 13:41:21 +02:00
Igor Zaworski 2b62f5a625 Add error when trying to assign class object to variable of non-class types (#6237) 2025-07-30 09:48:02 +02:00
Wilson Snyder 0da9f6eb03 Fix queue typedef with unbounded slice (#6236). 2025-07-28 19:36:52 -04:00
Wilson Snyder 2ff6ee9613 Support vpi_handle_by_name with $root.. 2025-07-28 18:03:21 -04:00
Wilson Snyder 833c31b031 Add -DVERILATOR=1 definition to compiler flags when using verilated.mk. 2025-07-28 18:01:50 -04:00
Ryszard Rozak a5b0a0d9dd Add support for $countones in constraints (#6144) (#6235) 2025-07-28 16:14:03 +02:00
Wilson Snyder 0bd291e6cd Fix unused variable compile error (#6222 partial) 2025-07-28 02:27:55 -04:00
Wilson Snyder 5c1d7f3ce9 Fix negate of wide structure selections (#6186). 2025-07-28 02:20:57 -04:00
Wilson Snyder e69df457fd Fix MODDUP with duplicate packages to take first package (#6222). 2025-07-28 01:45:03 -04:00
Wilson Snyder 47c5b220b3 Support non-ansi ports with wire before input 2025-07-27 17:13:56 -04:00
Wilson Snyder 64a82508f2 Fix error on with to give UNSUPPORTED (#6134) 2025-07-27 16:12:16 -04:00
Wilson Snyder 7c71bdf2d6 Commentary 2025-07-27 15:55:59 -04:00
Paul Swirhun bd2cb989d1 Support bit queue streaming (#5830) (#6103). 2025-07-27 15:29:56 -04:00
github action 92a4bff047 Apply 'make format' 2025-07-27 14:31:15 +00:00
Wilson Snyder d359fffcdc Internals: Refactor V3Task and add loop assert (#6218) 2025-07-27 10:30:19 -04:00
Wilson Snyder 55b836e25a Commentary: Changes update 2025-07-27 09:44:51 -04:00
Wilson Snyder c4b3f1e99c Tests: Add test and assert for nested simulated loops (#6223) 2025-07-27 09:43:46 -04:00
Geza Lore 895b85a16e Fix Replicate with unsigned count but MSB set (#6231) (#6233)
Correctly compute witdh of AstReplicate in its constructor when the
count is unsigned but its MSB is set.
2025-07-27 12:30:19 +02:00
Wilson Snyder 1725ee9c52 Fix loop initialization visibility outside loop (#4237). 2025-07-27 03:42:41 -04:00
Wilson Snyder d93abd002f Internals: V3Unroll refactoring. No functional change intended 2025-07-27 03:36:41 -04:00
Wilson Snyder 470f99694e Revert d8dbb08a: Support bit queue streaming (#5830) (#6103) 2025-07-26 17:59:52 -04:00
Wilson Snyder f3560837ec Add error on missing forward declarations (#6207). 2025-07-26 17:11:35 -04:00
Paul Swirhun d8dbb08a95 Support bit queue streaming (#5830) (#6103) 2025-07-26 16:53:51 -04:00
Wilson Snyder c2e0f496bd Internals: Free up 32 bits in FileLine.
Limits columns to 16M columns, or may report wrong column on such long lines.
Limits single token to 64K lines, or may report wrong line for that token.
2025-07-26 15:55:33 -04:00
Wilson Snyder 39a5c731ac Tests: Fix missing forward decls (#6202 partial) 2025-07-26 15:48:19 -04:00
Wilson Snyder 42e1c83875 Internals: Add some FileLine stats 2025-07-26 15:46:25 -04:00
Geza Lore 504884b7d5 Refactor DFG context objects (#6232)
- Move All DFG context objects to V3DfgContext.h
- Add separate object for ast2dfg and dfg2ast passes
- Factor out commonalities

No functional change
2025-07-26 20:37:01 +01:00
github action 94ef630490 Apply 'make format' 2025-07-26 06:45:26 +00:00
Wilson Snyder d289934ca9 Improve --skip-identical to skip on identical input file contents (#6109). 2025-07-26 02:43:57 -04:00
github action 20bd80698d Apply 'make format' 2025-07-25 18:06:24 +00:00
George Polack f1826a7c20 Support Verilog real to SystemC double (#6136) (#6158) 2025-07-25 20:05:36 +02:00
Wilson Snyder fa62cd3486 Fix --stats overridden by skipping identical build (#6220). 2025-07-25 07:23:02 -04:00
Yilou Wang 10ac99ac05 Support randomization of scope variables with 'std::randomize()' (#5438) (#6185) 2025-07-25 12:13:46 +02:00
Wilson Snyder b408e097f6 Fix unsigned replicate (#6229) 2025-07-24 22:55:26 -04:00
Geza Lore 94bebb2bcb Fix dereferencing stale iterator in DfgVertex::scopep() (#6227)
Fix dereferencing stale iterator in DfgVertex::scopep()

Fixes part of #6225
2025-07-24 15:31:31 +01:00
Geza Lore 2be257369a Fix component numbers of new Vertices in V3DfgBreakCycles (#6228)
Fix component numbers of new Vertices in V3DfgBreakCycles

Fixes part of #6225
2025-07-24 15:31:09 +01:00
Artur Bieniek 04c38d5b3b Tests: Switch to measuring CPU time instead of real time in test timeouts (#6224)
Signed-off-by: Artur Bieniek <[email protected]>
2025-07-24 11:27:02 +02:00
Wilson Snyder 4882a3c827 Commentary: Changes update 2025-07-24 02:44:54 -04:00
Wilson Snyder e995646898 Internals: Favor std::array. No functional change intended. 2025-07-24 02:39:03 -04:00
Wilson Snyder 2287d420ee Optimize to return memory when using -build (#6192) (#6226). 2025-07-24 08:36:58 +02:00
Wilson Snyder db5b2669fc Add current memory usage statistic (#6192 partial) 2025-07-24 08:36:58 +02:00
Wilson Snyder 460bfbf181 Fix replicate of negative giving 'REPLICATE has no expected width' internal error (#6048). 2025-07-23 18:07:50 -04:00
Wilson Snyder 050e5ddb5b Fix internal error after bad method 2025-07-23 17:17:35 -04:00
Wilson Snyder 393f0e4acb Tests: Example format 2025-07-23 14:58:58 -04:00
Geza Lore 7c5d462564 Remove AstJumpLabel (#6221)
Remove AstJumpLabel

AstJumpGo now references one if its enclosing AstJumpBlocks, and
branches straight after the referenced block.

That is:

```
JumpBlock a {
   ...
   JumpGo(a);
   ...
}
// <--- the JumpGo(a) goes here
```

This is sufficient for all use cases and makes control flow much easier to
reason about. As a result, V3Const can optimize a bit more aggressively.

Second half of, and fixes #6216
2025-07-23 17:51:16 +01:00
Geza Lore 763183f067 Internals: Remove AstWhile::precondsp() (#6219). No functional change intended. 2025-07-23 08:50:39 -04:00
Geza Lore 2958a5aaae Internals: Do not emit temporaries for atomic assignments. (#6217)
Added test for a particularly convoluted case requiring fixup in
V3Premit. To help with statistics stability, also prevent V3Premit from
introducing temporaries for assignment where the RHS reads the LHS, but
the assignment is known to be atomic (by emitted C++ semantics).

Also rename `createWideTemp` to `createTemp`, as it is used for non-wide
expressions as well.
2025-07-23 11:48:55 +02:00
Geza Lore 344fabf56a Fix incorrect assumption in V3DfgDecomposition (#6215)
Due to SCC merging the deleted assumption/assertion can be violated.
Fixes #6211.
2025-07-22 14:03:35 +01:00
Geza Lore 9f04ee68c8 Optimize combinational cycles through arrays in DFG (#6210)
Extending V3DfgBreakCycles to handle common cases involving unpacked
arrays.
2025-07-22 08:23:45 +01:00
github action b5126a6abe Apply 'make format' 2025-07-21 23:29:42 +00:00
Danny Oler 74d4b0c0ea Fix automatic task variables in unrolled loops with forks (#6194) (#6201). 2025-07-21 19:28:50 -04:00
Geza Lore 7401a8a43a Refactor DFG IndependentBits analysis to work for any vertex. (#6209)
This used to be restricted to variable vertices, but now can handle
arbitrary circular vertices that represent packed values. It also
converges faster than the earlier version. Prep for resolving loops
through arrays.
2025-07-21 19:57:02 +01:00
Geza Lore 7646e7d89c Exclude SystemC variables from DFG (#6208)
SystemC variables are fairly special (they can only be assigned to/from,
but not otherwise participate in expressions), which complicates some
DFG code. These variables only ever appear as port on the top level
wrapper, so excluding them from DFG does not make us loose any
optimizations, but simplifies internals.
2025-07-21 18:32:08 +01:00
Geza Lore a8dca71ed0 Support more complex combinational assignments in DFG. (#6205)
Previously DFG was limited to having a Sel, or an ArraySel potentially
under a Concat on the LHS of combinational assignments. Other forms or
combinations were not representable in the graph.

This adds support for arbitrary combinations of the above by
combining DfgSplicePacked and DfgSpliceArray vertices introduced in
 #6176. In particular, Sel(ArraySel(VarRef,_),_) enables a lot more code
to be represented in DFG.
2025-07-21 12:33:12 -04:00
Igor Zaworski 98b8d43a4a Fix parameter-dependent type linking (#6170) 2025-07-21 07:30:10 -04:00
Bartłomiej Chmiel d419c49921 Internals: Fix unused variable, no functional change (#6204)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
2025-07-21 07:28:01 -04:00
Max Wipfli a50ea2a1a6 Optimize 2 ** X to 1 << X if base is signed (#6203) 2025-07-20 09:56:34 -04:00
Wilson Snyder 078bb21a89 Add wire data type checking per IEEE. 2025-07-20 07:21:30 -04:00
Wilson Snyder b8b9478938 Improve enum base type checking error message. 2025-07-19 22:37:07 -04:00
Wilson Snyder f535a73ea7 Commentary: Changes update 2025-07-19 21:12:23 -04:00
Wilson Snyder 641e0e5672 Internals: Fix assertion if bad display 2025-07-19 21:12:10 -04:00
Ibrahim Burak Yorulmaz 9d146eae16 Fix VPI signal range order (#6189) (#6200) 2025-07-19 20:22:02 -04:00
Wilson Snyder 7d43a935bd Add SPECIFYIGN warning for specify constructs that were previously silently ignored. 2025-07-18 19:32:34 -04:00
Yilou Wang 9b99d9697f Fix virtual interface member propagation (#6175) (#6184) 2025-07-18 09:07:31 -04:00
Ryszard Rozak a21ecb2ab9 Add support for randomize..with on objects of aliased types (#6195) 2025-07-18 13:04:47 +02:00
Ryszard Rozak 28808f38bb Dump function to which AstAddrOfCFunc points (#6188) 2025-07-18 08:37:00 +02:00
Wilson Snyder 7a6775ca84 Internals: Rename memPeakUsageBytes 2025-07-17 22:16:59 -04:00
Wilson Snyder e527ff49a3 Report --stats final results after build phase 2025-07-17 20:41:46 -04:00
Wilson Snyder c1506deef9 Add enum base type checking per IEEE. 2025-07-17 20:20:43 -04:00
Wilson Snyder 87050670b4 Fix structure select causing 'Wide Op' error (#6191). 2025-07-17 18:17:49 -04:00
Wilson Snyder fb1373b854 Tests: Reformat. Ignore whitespace if comparing. No test functional change. 2025-07-16 21:31:40 -04:00
Wilson Snyder 7f1011e5f7 Make some CVTREAL fatal where IEEE requires it. 2025-07-16 18:07:07 -04:00
Wilson Snyder 7a32771c7e Commentary: Changes update 2025-07-16 17:26:01 -04:00
Wilson Snyder 94b043d6c9 Internals: Print versions with make format 2025-07-16 17:25:22 -04:00
Igor Zaworski 8c5ba3a0d7 Fix conflicting function/class name linking error (#6182) 2025-07-16 17:25:01 -04:00
Igor Zaworski 826e5b0826 Fix --coverage-expr null pointer dereference (#6181) 2025-07-16 12:07:34 -04:00
Artur Bieniek abd509ce53 Support delays in emitted Verilog (#6177) 2025-07-16 11:52:56 -04:00
Ryszard Rozak 1bf24c7eb4 Add support for disabling begin just under fork from outside that begin (#5432 partial) (#6183) 2025-07-16 16:04:17 +02:00
Wilson Snyder 1f0357ba93 Add NOEFFECT warning, replacing previous foreach error. 2025-07-16 08:18:57 -04:00
Wilson Snyder db6b17fdb4 Fix error message 2025-07-15 17:41:08 -04:00
Artur Bieniek f3e109d8c5 Support covergroup extends, etc. (#6160) 2025-07-15 09:31:08 -04:00
Wilson Snyder 371ac07c6f Fix CVTREAL not being able to be disabled in e.g. primitive terminals. 2025-07-14 20:08:44 -04:00
Wilson Snyder caf3522364 Support implicit enum declarations with packed dimensions 2025-07-14 19:50:02 -04:00
Geza Lore 03e0d49d99 Optimize DFG partial assignments (#6176)
This is mostly a refactoring, but also enables handling some more
UNOPTFLAT, when the variable is only partially assigned in the cycle.

Previously the way partial assignments to variables were handled were
through the DfgVerexVar types themselves, which kept track of all
drivers. This has been replaced by DfgVertexSplice (which always drives
a DfgVeretexVar), and all DfgVertexVar now only have a single source,
either a DfgVertexSplice, if partially assigned, or an arbitrary
DfgVertex when updated as a whole.
2025-07-14 17:09:34 -04:00
Ryszard Rozak e2e5d9eaf1 Support disabling a fork from outside that fork (#6174) 2025-07-14 06:51:58 -04:00
Wilson Snyder 2f199f20cf Add ENUMITEMWIDTH error, and apply to X-extended and ranged values. 2025-07-12 14:14:17 -04:00
Wilson Snyder cefe1845df Commentary: Changes update 2025-07-11 21:53:29 -04:00
Yilou Wang 1044398f95 Support member-level triggers for virtual interfaces (#5166) (#6148) 2025-07-11 21:04:51 -04:00
Geza Lore 77180c4020 Optimize more cycles in DFG (#6173)
Added a second algorithm to break cycles in DFG by identifying which
bits of a circular variable are actually independent of the variable,
then reuse the existing (but extended) driver tracing algorithm to
eliminate them.

This can fix up things like: `assign gray = binary ^ (gray >> 1)`
2025-07-11 14:19:09 -04:00
github action 2fc12d951e Apply 'make format' 2025-07-11 17:11:31 +00:00
Petr Nohavica 0982260d3b Fix constructor parameters in inheritance hierarchies (#6036) (#6070) 2025-07-11 13:10:36 -04:00
Artur Bieniek 58b867c39c Support multiple variables on RHS of a force assignment (#6163) 2025-07-10 21:12:44 -04:00
Igor Zaworski 4e8a8a0398 Fix param-dependent class typedef linking (#6171) 2025-07-10 21:11:09 -04:00
Artur Bieniek 4dc6a31276 Fix omitting error when assigning to an input (#6169) 2025-07-10 20:37:55 -04:00
Geza Lore ce77bac99a Break some combinational cycles in DFG (#6168)
Added an algorithm that can break some combinational cycles in DFG, by
attempting to trace driver logic until we escape the cycle. This can
eliminate a decent portion of UNOPTFLAT warnings. E.g. due to this code:

```systemverilog
assign a[0] = .....;
assign a[1] = ~a[0];
```
2025-07-10 18:46:45 +01:00
Igor Zaworski 31c279a7b3 Support randomize() on class member selects (#6161) 2025-07-10 04:59:05 -04:00
Bartłomiej Chmiel 9ad0de1efd Fix uninitialized thread PGO counters (#6167) 2025-07-10 04:56:14 -04:00
Wilson Snyder d89df33fcd Change control file public_flat_* and other signal attributes to support __ in names (#6140). 2025-07-09 20:48:00 -04:00
Martin Stadler d1462f3120 Fix cmake -Wno compiler flag testing (#6145) 2025-07-09 19:31:42 -04:00
Wilson Snyder 9fc7143fce Fix genvar error with -O0 (#6165). 2025-07-09 19:11:48 -04:00
Wilson Snyder 597b973f7b Internals: Fix some style issues. No functional change. 2025-07-09 18:52:26 -04:00
Wilson Snyder a84c5d2010 Commentary: Changes update 2025-07-09 18:51:49 -04:00
Igor Zaworski dbfbc657e1 Fix class extends dotted error (#6162) 2025-07-09 17:12:11 -04:00
Ryszard Rozak 8b3a6ba542 Support disable dotted references (#6154) 2025-07-09 16:59:26 -04:00
Wilson Snyder 8ba7cec15b devel release 2025-07-08 23:22:58 -04:00
Wilson Snyder f037ac50b4 Version bump 2025-07-08 23:02:26 -04:00
Wilson Snyder 1f0e767b61 Commentary: Changes update 2025-07-08 17:37:21 -04:00
Igor Zaworski 5777ab75c7 Fix crash with --dumpi-V3LinkDot without --debug (#6159) 2025-07-08 10:28:17 -04:00
Geza Lore e494cf22a4 Add DfgPeephole patterns (#6149) 2025-07-07 16:25:29 +01:00
Wilson Snyder 5a6d5ed96b Support property iff and implies. 2025-07-03 21:13:04 -04:00
Wilson Snyder 26c7f1adb6 Tests: Change default indent to 2 spaces (match edaplayground). No functional change. 2025-07-03 20:43:13 -04:00
Wilson Snyder f77af4e6f6 Important: Change --assert to be the default; use --no-assert for legacy behavior and faster runtimes. 2025-07-03 19:36:28 -04:00
Wilson Snyder 1cd65e90bd Commentary: Changes update 2025-07-03 19:11:09 -04:00
Wilson Snyder e3c7dee6ef Internals: Add UINFOTREE method 2025-07-03 19:07:50 -04:00
Wilson Snyder 6c9cbaef62 Internals: Clean up some constructors. No functional change intended. 2025-07-03 18:59:32 -04:00
Todd Strader 08fef668cd Fix more wide ternary + coverage cases (#6155) 2025-07-03 18:00:39 -04:00
Tobias Rosenkranz 92970bd9a0 Update docker base image to Ubuntu 24.04 (#6147) 2025-07-03 15:29:03 -04:00
Paul Swirhun e0c3b42262 Fix developer build error on MacOS/Flex2.6.4 (https://github.com/verilator/verilator/pull/6153) 2025-07-02 19:56:10 -07:00
Wilson Snyder 4ddc649836 Add UNSUPPORTED rather than syntax error on pullup/pulldown strengths 2025-07-02 20:54:47 -04:00
Wilson Snyder 77908447e6 Support scoped new (#4199). 2025-07-02 19:54:57 -04:00
Wilson Snyder bb41c6b26b Internals: Fix wrong fileline on some parsing scan-aheads. 2025-07-02 18:47:27 -04:00
Todd Strader ae0f29ed37 Fix wide non-blocking assignment mis-optimization (#6150) (#6152) 2025-07-02 18:43:10 -04:00
Wilson Snyder 73ca2ab997 Support $past_gclk 2025-07-01 18:00:04 -04:00
Geza Lore 7a3f1f16ca Optimize DFG before V3Gate (#6141) 2025-07-01 17:55:08 -04:00
Wilson Snyder e015805194 Fix stripping on randomize (#6144 partial) 2025-07-01 08:57:08 -04:00
Wilson Snyder 73da5e51a6 Commentary: Changes update 2025-07-01 08:07:54 -04:00
Wilson Snyder 9598ef9315 Internals: Avoid - in enum name 2025-07-01 05:45:10 -04:00
Wilson Snyder cd0f35fe67 Fix recursive module assertion, broken recent lib commit (#5891 partial fix) 2025-06-30 20:30:27 -04:00
Wilson Snyder d455ec6229 Fix specparam PATHPULSE broken recent commit (#6142). 2025-06-30 18:33:50 -04:00
Tobias Rosenkranz db854fc3d2 Improve docker image size (#6139) 2025-06-30 08:04:18 -04:00
github action b27bd6526a Apply 'make format' 2025-06-30 01:00:56 +00:00
Wilson Snyder 916a89761e Add --work library-selection option (#5891 partial). 2025-06-29 20:17:27 -04:00
Geza Lore c3d86626ee Internals: Remove unused AstNodeModule 'activesp' child (#6138) 2025-06-29 09:56:44 -04:00
Wilson Snyder 5d32fc56ac Support 'config' parsing, but not functionally 2025-06-28 20:32:19 -04:00
Wilson Snyder 93f447dd4a Support constant functions with left-hand-side concatenates. 2025-06-28 17:12:03 -04:00
Geza Lore bc892deacc Safely support non-overlapping blocking/non-blocking assignments (#6137)
The manual for the BLKANDNBLK warning describes that it is safe to
disable that error if the updated ranges are non-overlapping. This
however was not true (see the added t_nba_mixed_update* tests).

In this patch we change V3Delayed to use a new ShadowVarMasked
scheme for variables that have mixed blocking and non-blocking 
updates (or the FlagUnique scheme for unpacked variables), which
is in fact safe to use when the updated parts are non-overlapping.

Furthermore, mixed assignments are safe as far as scheduling is
concerned if either:

- They are to independent parts (bits/members/etc) (with this patch)
- Or if the blocking assignment is in clocked (or suspendable) logic.

The risk in scheduling is a race between the Post scheduled NBA
commit, and blocking assignments in combinational logic, which might
order incorrectly.

The second point highlights that we can handle stuff like this safely,
which is sometimes used in testbenches:

```systemverilog
always @(posedge clk) begin
    if ($time == 0) a = 0;
end

always @(posedge clk) begin
    if ($time > 0) a <= 2;
end
````

The only dangerous case is:

```systemverilog
always @(posedge clk) foo[idx] <= val;
assign foo[0] = bar;
```

Whit this patch, this will still resolve fine at run-time if 'idx' is
never zero, but might resolve incorrectly if 'idx' is zero.

With the above in mind, the BLKANDNBLK warning is now only issued if:

- We can't prove that the assignments are to non-overlapping bits
- And the blocking assignment is in combinational logic

These are the cases that genuinely require user attention to resolve.

With this patch, there are no more BLKANDNBLK warnings in the RTLMeter
designs.

Fixes #6122.
2025-06-28 20:45:45 +01:00
Wilson Snyder b914cda1c7 Internals: cppcheck cleanups. No functional change. 2025-06-28 12:29:41 -04:00
Wilson Snyder 62e5e3aa0c Fix interface array connections with non-zero low declaration index. 2025-06-28 09:43:02 -04:00
Wilson Snyder f508dadc97 Support specparam (#5767). 2025-06-28 08:23:43 -04:00
Wilson Snyder 189d094202 Commentary 2025-06-27 22:31:51 -04:00
Wilson Snyder 3defaf8ffb Rename Verilator Config Files to Verilator Control Files.
Avoids conflict with IEEE `config`.  No functional change intended.
2025-06-27 20:38:01 -04:00
Todd Strader 73696f0a71 Tests: Add coverpoints test (#6118) 2025-06-27 15:47:13 -04:00
Wilson Snyder 17c2512d03 Fix pre_randomize/post_randomize when no randomize (#6128). 2025-06-26 18:35:49 -04:00
Wilson Snyder 75229cc03d Fix pre_randomize/post_randomize when no randomize (#6122). 2025-06-26 18:34:20 -04:00
Wilson Snyder e422c183ff Fix method calls without parenthesis (#6127). 2025-06-26 18:16:21 -04:00
Wilson Snyder 68e1ed55f6 Commentary: Changes update 2025-06-26 17:42:10 -04:00
Wilson Snyder 993f65f3b4 Internals/CI: Format cmakefiles using mbake 2025-06-26 17:36:56 -04:00
Wilson Snyder 2c5e9a785a Standardize indent of emitted makefile 2025-06-26 17:36:15 -04:00
Kamil Rakoczy d183b4edde Fix variables declared in fork after taskify (#6126) 2025-06-26 10:28:58 -04:00
Geza Lore 818e6d3ebf Disable Vortex:sane:sgem pending fix
This design has a BLKANDNBLK warning which might or might not cause
problems depending on how the ordering ended up. See #6122.
2025-06-26 10:57:51 +01:00
Wilson Snyder 2df0390c04 Commentary 2025-06-25 21:14:25 -04:00
Wilson Snyder 6cd0948c8c Internals: Standardize Makefile indents. No functional change intended. 2025-06-25 21:10:46 -04:00
Wilson Snyder 3209bee3b3 Fix colon-divide operator without space (#6121). 2025-06-25 04:56:52 -04:00
Wilson Snyder 88d0d85ca6 Internals: Apply format-yaml. No functional change. 2025-06-24 18:29:38 -04:00
Wilson Snyder 51545b36ca Internals: Add format-make rule and standardize Makefile indents. No functional change intended. 2025-06-24 17:58:55 -04:00
Wilson Snyder 6af694b04b Support $timeformat with missing arguments (#6113). 2025-06-24 17:30:05 -04:00
Wilson Snyder f9f70383fa Fix instability in non-data type internal error 2025-06-24 17:29:44 -04:00
Geza Lore 916d473eff Internals: Replace unnecessary AstSel::widthp() child node with const in node (#6117) 2025-06-24 11:59:09 -04:00
Wilson Snyder a9e9ab50bd Commentary: Changes update 2025-06-23 18:40:49 -04:00
Wilson Snyder 544cb4a90f Fix decoding octal string escapes with 1-2 digits (#6108). 2025-06-23 18:37:44 -04:00
Wilson Snyder 11998ccc58 Revert requiring C++20 until SystemC sorted (#6101) (#6107) 2025-06-23 18:35:26 -04:00
Geza Lore 2daa09a255 Optimize constify within Expand and Subst (#6111)
These passes blow up the Ast size on some designs, so delaying running V3Const
until after the whole pass can notably increase peak memory usage. In this
patch we apply V3Const per CFunc within these passes, which saves on memory.
Added -fno-const-eager to disable the intra-pass V3Const application, for
debugging.
2025-06-23 17:58:26 -04:00
Geza Lore d35e4a2b60 Improve memory usage for SenTrees in V3OrderProcessDomains (#6112) 2025-06-23 14:22:10 -04:00
Wilson Snyder c0b505849c Require C++20 for configure (#6101) (#6107) 2025-06-22 08:21:21 -04:00
Wilson Snyder 49fe129634 Fix --lib-create with double-underscore (#6099). 2025-06-18 08:56:32 -04:00
Peter Birch 75df36bc8f Add hint of the signed rhsval in oversized replication error (#6098) 2025-06-17 16:59:18 -07:00
Geza Lore 48600c77b5 Fix DFG binToOneHot table index missing driver (#6100) 2025-06-17 15:53:47 +01:00
Wilson Snyder 5b410e9331 CI: Add actor to help cancel-in-progress group (#6097) 2025-06-16 17:44:06 -07:00
Geza Lore 277611bcdd Add DFG binToOneHot pass to generate one-hot decoders (#6096)
Somewhat commonly, there is code out there that compares an expression (or
variable) against many different constants, e.g. a one-hot decoder:

```systemverilog
  assign oneHot = {x == 3, x == 2, x == 1, x == 0};
```

If the width of the expression is sufficiently large, this can blow up
a GCC pass and take an egregious amount of memory and time to compile.

Adding a new DFG pass that will generate a cheap one-hot decoder:
to compute:

```systemverilog
  wire [$bits(x)-1:0] idx = <the expression being compared many times>
  reg tab [1<<$bits(x)] = '{default: 0};
  reg [$bits(x)-1:0] pre = '0;

  always_comb begin
    tab[pre] = 0;
    tab[idx] = 1;
    pre = idx ; // This assignment marked to avoid a false UNOPFTLAT
  end
```

We then replace the comparisons `x == CONST` with `tab[CONST]`.

This is generally performance neutral, but avoids the compile time and memory
blowup with GCC (128GB+ -> 1GB in one example).

We do not apply this if the comparisons seem to be part of a `COMPARE ?
val : COND` conditional tree, which the C++ compilers can turn into jump
tables.

This enables all XiangShan configurations from RTLMeter to now build with GCC,
so in this patch we enabled those in the nightly runs.
2025-06-16 23:14:24 +01:00
Geza Lore de2818c733 Add RTLMeter badge and note in internals docs (#6095) 2025-06-16 16:35:31 +01:00
Geza Lore 832629c602 Internals: Refactor DFG getCanonicalVariable for reusability (#6094)
This changes hashed names in the generated code, but otherwise no
functional change.
2025-06-16 07:25:44 -04:00
Geza Lore 5e5b5ab69d Restrict Dfg PUSH_SEL_THROUGH_CONCAT pattern (#6092)
This pattern is bit dubious and can blow up the size of the logic.
Restrict it to only apply if it strictly does not increase DFG size.
2025-06-15 18:10:42 -04:00
Wilson Snyder 173e9d2a94 Commentary: Changes update 2025-06-15 14:52:28 -04:00
Wilson Snyder 4c2eb8c0b8 Commentary: Fix broken links 2025-06-15 14:51:56 -04:00
Geza Lore d059806dbd Fix Dfg eliminateVar pass to remove more variables (#6091)
Failing to reset the work list pointer in vertices leads to not removing
some redundant variables if they become redundant after having been
considered once already.
2025-06-15 18:12:37 +01:00
Geza Lore bca2e2c16e Optimize DFG De Morgan patterns (#6090)
It's ok if the replaced vertex has multiple sinks, this pattern cannot
increase the size of logic even then.
2025-06-15 11:00:11 -04:00
Todd Strader 47f5a6a52b Fix unpacked to packed parameter assignment (#6088) (#6081) 2025-06-12 12:47:58 -04:00
Todd Strader 206a0b4fd2 Fix casting reals to large integrals (#6085) 2025-06-12 11:53:10 -04:00
Bartłomiej Chmiel dc307270f7 Fix nested hier blocks workers error (#6087)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
2025-06-12 07:15:46 -04:00
Wilson Snyder 4990b44120 Fix trace hierarchicalName runtime errors (#5668) (#6076). 2025-06-10 20:17:32 -04:00
Paul Swirhun 4925f9ad73 Support 1-bit params with -G and -pvalue (#6051) (#6082) 2025-06-10 17:39:13 -04:00
Paul Swirhun ac06b6fc4f Fix streaming operator packing order (#5903) (#6077) 2025-06-10 17:23:16 -04:00
Kamil Rakoczy 58ea7ad361 Fix class typedef elaboration (#6080) 2025-06-10 12:03:26 -04:00
Wilson Snyder 75a36a6ef8 Commentary: Changes update 2025-06-10 08:22:43 -04:00
Wilson Snyder b553502d8a Fix number dumps to show 'null' 2025-06-10 08:17:45 -04:00
Wilson Snyder 1c357ba508 Commentary 2025-06-10 08:17:45 -04:00
Bartłomiej Chmiel 86d2ea8c70 Optimize DPI temporary 'for' loop performance (#6079)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
2025-06-10 08:17:26 -04:00
Geza Lore 07394fcafa Automatically publish scheduled RTLMeter results (#6074)
Update RTLMeter workflow to automatically push the performance numbers
from scheduled (nightly) runs to verilator/verilator-rtlmeter-results
2025-06-10 13:06:05 +01:00
Todd Strader d9534ec626 Fix x assign vs init randomization (#6075) 2025-06-09 17:59:01 -04:00
Geza Lore a6bae7f196 DFG peephole: Only push SEL through COND when SEL is the only sink. (#6071)
This avoids potential O(n) logic duplication where 'n' is the fanout of
the COND node.

Fixes #6064.
2025-06-08 11:12:39 +01:00
Wilson Snyder 5b2dc52681 Fix array bounds checking with class member selects (#5996) (#5997). 2025-06-07 17:20:48 -04:00
Todd Strader a044697990 Fix signed cast (#6912) (#6068) 2025-06-06 21:13:31 -04:00
Wilson Snyder 54e637c72b Fix --skip-identical skipping on some errors (#6066). 2025-06-06 17:18:02 -04:00
Wilson Snyder db03b95389 Commentary: Changes update 2025-06-06 17:17:25 -04:00
Todd Strader d49efa79df Fix type operator for interface signals (#6050) (#6049) 2025-06-06 11:29:33 -04:00
Todd Strader 9fc223d3ee Commentary: FPGA PROCASSINIT guidance (#6067) 2025-06-06 09:59:05 -04:00
Ryszard Rozak 1a3fd92063 Tests: Fix t_interface_array2 tests (#6065) 2025-06-06 06:28:29 -04:00
Wilson Snyder ed46878f7b Fix virtual interface array typedef expressions (#6057). 2025-06-04 21:43:46 -04:00
Wilson Snyder 593da4e38f Internals: Fix missing const. No functional change. 2025-06-04 21:43:30 -04:00
Todd Strader cfbcfd913c Fix packed array deduction (#6046) 2025-05-31 07:55:00 -04:00
Wilson Snyder 79de1ff507 Fix WIDTHCONCAT on packed pattern assignment (#6045). 2025-05-31 07:38:15 -04:00
Nick Brereton 8a8f04153a Fix method calls and new to access interface arrays (#5973) 2025-05-29 22:11:47 -04:00
Wilson Snyder 8031ca2616 Add MODMISSING error, in place of unnamed error (#6054). 2025-05-29 21:02:00 -04:00
Wilson Snyder 40881d7e79 Commentary: Changes update 2025-05-29 18:59:51 -04:00
Wilson Snyder b0d1f720e0 Tests: Rename t_dpi_instr_count_large 2025-05-29 18:58:22 -04:00
Bartłomiej Chmiel 7dbe4f1807 Fix V3OrderParallel scoring contraction hang (#6052) 2025-05-29 10:31:57 -04:00
Todd Strader 5fcd0e52e7 Fix casting to arrays of enums (#6044) 2025-05-27 21:14:09 -04:00
Todd Strader 76aced4d40 Fix parameter types of user defined arrays (#6042) 2025-05-27 18:35:21 -04:00
Todd Strader 66259d8909 Fix GCC 10 read-only linker error (#6040) 2025-05-27 10:11:56 -04:00
Todd Strader 4b041c636f Fix --x-initial and --x-assign random stability (#2662) (#5958) (#6018) (#6025) 2025-05-27 09:31:55 -04:00
Paul Swirhun e84fe36518 Tests: Add test coverage for stream to packed N-dim arrays (#6039) 2025-05-26 09:50:40 -04:00
Bartłomiej Chmiel 9cc4cc0efd Add --hierarchical-threads (#6037) 2025-05-26 09:37:35 -04:00
Paul Swirhun c9fa54536e Tests: Fix MacOS test driver when child process finishes (#6032) (#6038)
os.read(fd, 1) returns b'' on MacOS when the
child process exits, whereas it must be throwing an OSError
on other platforms.
2025-05-26 08:58:20 -04:00
Petr Nohavica 22d484d54d Fix associative arrays with enum keys (#6034) (#6035) 2025-05-24 17:59:23 -04:00
Ryszard Rozak 90d4cf1361 Internals: V3Coverage cleanup. No functional change. (#6033) 2025-05-23 17:38:34 -04:00
Wilson Snyder 7c427d4cc3 Sort compile options to force ccache miss 2025-05-22 21:32:34 -04:00
Wilson Snyder 46c7b69c64 Internals: UINFO now includes newline itself. No functional change. 2025-05-22 20:29:32 -04:00
Wilson Snyder 091be59f0d Tests: Use make -j when few tests. 2025-05-22 17:53:04 -04:00
Wilson Snyder af30436357 Internals: Rename VL_PACK/VL_UNPACK in prep for future fix. No functional change intended. 2025-05-22 06:54:16 -04:00
Wilson Snyder 7b2dc46399 Commentary: Changes update 2025-05-22 06:45:39 -04:00
Ryszard Rozak 2491f25da7 Add filtering type option in verilator_coverage (#6030) 2025-05-22 02:42:09 -07:00
Todd Strader d400584460 Fix concatenation and type casting (#6012) (#6013) 2025-05-21 08:41:29 -04:00
Wilson Snyder de08655c5b Internals: Fix some legacy casts. No functional change. 2025-05-20 22:51:54 -04:00
Wilson Snyder f8359adcc0 Commentary: Changes update 2025-05-20 22:51:07 -04:00
github action a227aad13d Apply 'make format' 2025-05-20 23:46:57 +00:00
Joel Bodenmann 80ea173390 Add missing FreeBSD include (#6027) (#6028)
Fixes #6027
2025-05-20 16:46:07 -07:00
Bartłomiej Chmiel 6d257ef52c Improve hierarchical scheduling visualization in V3ExecGraph (#6009) 2025-05-20 12:15:09 -04:00
Shou-Li Hsu 25cb31c38b Add aggregate type error checks (#5570) (#5950) 2025-05-20 09:10:22 -04:00
Ryszard Rozak bed0456eca Add ternary operator into branch coverage (#5880) 2025-05-19 09:35:35 -04:00
Wilson Snyder ad08302e5f Support parameter forward types. 2025-05-19 08:35:38 -04:00
Geza Lore f74c67da46 CI: Add variable to explicitly enable some GitHub workflows (#6021)
To run scheduled instances of the RTLMeter or coverage workflows, the
ENABLE_SCHEDULED_JOBS variable must explicitly be set to 'true' in the
repository settings. This enables each fork to decide whether to run the
scheduled instances or not.
2025-05-18 21:13:37 -04:00
Wilson Snyder 27eb8cfe8a Fix extraneous WIDTH warning on assoc.exists() 2025-05-18 11:25:25 -04:00
Yutetsu TAKATSUKASA b26658fd96 Fix wrong optimization result of shifted out variable (#6016) (#6019) 2025-05-18 07:18:37 -04:00
Wilson Snyder 0c8c7fb03c Remove symbol table from parser: Support redeclaring type as non-type; major parsing change (#2412). 2025-05-18 07:13:37 -04:00
Wilson Snyder 6bb16d6c52 Disable symbol from parser: Support redeclaring type as non-type; major parsing change (#2412). 2025-05-18 07:13:37 -04:00
Wilson Snyder 2c465d9741 Internals: Fix MSVC warning. 2025-05-17 22:56:59 -04:00
Wilson Snyder 19be36dbcb Tests: Cleanup some type tests 2025-05-17 21:09:05 -04:00
Wilson Snyder 3b632739a8 Internals: Add RequireDType and check for recursive data types, in prep for future parser. 2025-05-17 20:40:03 -04:00
Wilson Snyder 640339ec36 Revert 'Fix --x-initial and --x-assign random stability (#2662) (#5958).' See (#6018).
Reverts 4581023805 plus line in Changes file
2025-05-17 20:27:03 -04:00
Wilson Snyder 647404ec1e Tests: Improve warning coverage 2025-05-17 16:28:09 -04:00
Wilson Snyder 338a456f09 Commentary: Changes update 2025-05-17 15:48:01 -04:00
Wilson Snyder 66667b6172 Support SARIF JSON diagnostic output with --diagnostics-sarif. (#6017) 2025-05-17 15:46:15 -04:00
Wilson Snyder 7a5c223ccf Tests: Improve warning coverage 2025-05-16 22:32:25 -04:00
Wilson Snyder 2dbe897e1b Add security policy 2025-05-16 22:08:12 -04:00
Zhen Yan fc700538a5 Fix arithmetic left-shift by constants over 32 bits (#6007) (#6015) 2025-05-16 21:57:52 -04:00
github action 8d3b47a18a Apply 'make format' 2025-05-16 23:16:40 +00:00
Wilson Snyder 1bcd5ee0c1 Fix spelling 2025-05-16 19:02:19 -04:00
Wilson Snyder 9430960b18 Commentary: Changes update 2025-05-16 18:59:35 -04:00
Todd Strader 4581023805 Fix --x-initial and --x-assign random stability (#2662) (#5958) 2025-05-16 13:54:51 -04:00
Ryszard RozakandTomasz Gorochowik 73b3648262 Fix skipped genblocks in toggle coverage (#6010)
Signed-off-by: Ryszard Rozak <[email protected]>
Co-authored-by: Tomasz Gorochowik <[email protected]>
2025-05-16 08:24:57 -04:00
Zhen Yan 6b42d789af Fix checking for too-wide divide and modulus (#6003) (#6006) 2025-05-15 10:43:45 -04:00
Ryszard Rozak 6db599da45 Fix slicing of AstExprStmt nodes (#6005) 2025-05-14 11:55:02 -04:00
Geza Lore 2f6ecd1853 Fix folding of LteS in DfgPeephole (#6004)
Fixes #6000
2025-05-14 13:33:20 +01:00
Wilson Snyder 4c4fdb5dfe Internals: Refactor some JSON and error code 2025-05-13 22:26:15 -04:00
Wilson Snyder 3dfd53a549 CI: Move coverage + contributor actions to 24.04 2025-05-13 22:21:21 -04:00
Ryszard Rozak 91c52a4972 Support for assignments to concatenations with impure RHS (#6002) 2025-05-12 19:19:38 -04:00
Wilson Snyder ac2313ecb7 Fix some errors exceeding the --error-limit 2025-05-11 22:36:40 -04:00
Wilson Snyder 8100bc64a0 Commentary 2025-05-11 22:36:16 -04:00
Wilson Snyder aee5051526 CI: Reduce action permissions per best practices 2025-05-11 17:43:48 -04:00
Wilson Snyder 0162e15b6e Tests: Rename property tests 2025-05-11 08:24:11 -04:00
Dominick Grochowina 295fae0edc Fix nullptr segfault in VerilatedVcd::emitTimeChange() (#5980) 2025-05-11 08:01:13 -04:00
Wilson Snyder fe4ad7de64 Internals: Use magic string for warnMore so lock-free. 2025-05-10 18:06:33 -04:00
Wilson Snyder 680236b03e Internals: Redo post-error additional information to be part of error calls. 2025-05-10 16:20:12 -04:00
Wilson Snyder 0f528d136d Fix arithmetic right-shift by constants over 32 bits (#5994). 2025-05-10 13:59:56 -04:00
Wilson Snyder d9dcde60a6 Fix duplicate error first-lines, and some internal V3Error cleanups 2025-05-10 13:29:30 -04:00
Wilson Snyder d0424862f9 Commentary: Changes update 2025-05-10 13:22:26 -04:00
Yutetsu TAKATSUKASA 100e3d7702 Fix const-bit-op-tree with single-bit masks (#5993) (#5998) 2025-05-10 06:01:15 -04:00
Wilson Snyder d22608a49f Internals: Refactor common V3JsonFile. No functional change. 2025-05-09 22:00:29 -04:00
Wilson Snyder 5d0fd8b9a7 Commentary 2025-05-09 21:22:17 -04:00
Wilson Snyder 7191a0ba8b Internals: Favor preincrements. No functional change. 2025-05-09 21:20:35 -04:00
Ryszard Rozak c2d289dc71 Tests: Fix t_math_signed3 test (#5995) 2025-05-09 11:09:33 -04:00
Bartłomiej Chmiel 5f4646f617 Ignore dependencies from different hierarchical schedules (#5954)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
2025-05-08 11:45:10 +01:00
Yilou Wang a80aa07de6 Support constrained random for associative arrays (#5985) (#5986) 2025-05-07 07:07:16 -04:00
Ryszard Rozak 2358f5c2a2 Fix AstAssignW conversion (#5991) (#5992) 2025-05-07 05:54:18 -04:00
Wilson Snyder bc3bf6ab5e Tests: Add t_param_type_bad3 2025-05-06 21:11:34 -04:00
Wilson Snyder b099d6fe63 Fix implicit dtype numbering to be per-module.
Internals: Remove use of parser in implicit dtype numbering.
2025-05-06 20:39:17 -04:00
Wilson Snyder d5f773f385 Internals: Move hasParameterList away from symbol table. No functional change intended. 2025-05-06 08:03:30 -04:00
Wilson Snyder da5eb620bf Internals: Move timeunit to pragma, in prep for future parser. No user-functional change intended. 2025-05-06 06:34:49 -04:00
Yutetsu TAKATSUKASA 2ed754d5ea Fix Inconsistent assignment error by split-var (#5984) (#5988) 2025-05-06 05:00:17 -04:00
Wilson Snyder fe562d4715 Internals: Move Stream dtype conversion to V3Width, towards future parser 2025-05-05 19:54:52 -04:00
Wilson Snyder 49e5c305a4 Tests: Split and rename t_parse_sync_bad 2025-05-05 18:35:50 -04:00
Wilson Snyder 69eb76ad66 Fix constant propagation of post-expand stages (#5983). 2025-05-05 07:04:20 -04:00
Wilson Snyder a3662cc3f5 Internals: Refactor to create replaceWithKeepDType. No functional change. 2025-05-05 06:31:06 -04:00
Bartłomiej Chmiel 1e74451534 Internals: Change naming convention for Vthread funcs (#5982)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
2025-05-05 05:25:39 -04:00
Wilson Snyder 66e105b444 Fix constant propagation of post-expand stages (#5963) (#5972). 2025-05-04 21:41:14 -04:00
Wilson Snyder 413183bad8 Fix localize of coroutines (#5972 partial) 2025-05-04 21:25:44 -04:00
Wilson Snyder 11cfa61f80 Fix casting etc of typedef'ed doubles. 2025-05-04 16:34:37 -04:00
Wilson Snyder 27ad648c16 Commentary: Indicate V3Number width() criticality. 2025-05-04 16:24:36 -04:00
Wilson Snyder d47b88a30c Internals: Remove accidental debug message 2025-05-04 15:49:23 -04:00
Wilson Snyder 51616ecf2f Internals: Rename to instances, and other minor cleanups 2025-05-04 14:57:10 -04:00
Wilson Snyder 01e66ac349 Commentary: Changes update 2025-05-04 14:49:44 -04:00
Geza Lore 223bb9ba9a Fix streaming to/from packed arrays (#5976)
bug from 6bb57e4630

Fixes RTLMeter OpenTitan. Fixes #5955.
2025-05-04 19:28:51 +01:00
Geza Lore 70c84d3abd Preserve C++ widths in V3Expand (#5975)
During V3Expand, some w32/1 (width == 32, widthMin == 1), nodes (e.g.:
RedOr) are replaced with w1 nodes (width == widthMin == 1) (e.g.: Neq).
However, V3Expand runs after V3Clean, when we are in C++ width world,
so we need to preserve the width/widthMin distinction, otherwise a later
constant folding can eliminate e.g. a necessary AstAnd used clear an
intermediate result (isAllOnes is true for a Const 1 with w1, but false
for a Const 1 with w32/1).

Attempting to fix by preserving all width/widthMin during a replacement
in V3Expand.

DFG itself is fine, but the transformed code hits the above.

Fixes #5953
2025-05-04 16:31:27 +01:00
Wilson Snyder ea65bcd86b Add lib.map information to unsupported message, etc 2025-05-03 05:30:40 -04:00
Wilson Snyder e837f780a2 Commentary 2025-05-03 04:25:01 -04:00
Wilson Snyder 1a1c6e8797 Change cell messages to instance to match IEEE 2025-05-03 04:00:47 -04:00
Wilson Snyder 15ebbd309f Fix always processes ignoring $finish (#5971). 2025-05-02 07:36:42 -04:00
Wilson Snyder 3b8d10cae5 Commentary 2025-05-02 07:35:38 -04:00
Wilson Snyder 2c0372acdf Tests: Fix relocation of extract tests 2025-04-30 23:02:19 -04:00
Wilson Snyder 8b52bd817f Add PROCINITASSIGN on initial assignments to process variables (#2481). 2025-04-30 22:00:06 -04:00
Wilson Snyder 38dd9a344e Improve documentation for BADVLTPRAGMA 2025-04-30 20:32:30 -04:00
Wilson Snyder cbf46d0ded Tests: Add mis-include test. 2025-04-30 19:00:17 -04:00
Wilson Snyder b10b22d09f Change unsupported 'tagged' into parse-level message 2025-04-30 18:30:19 -04:00
Wilson Snyder 0664cf407c Fix constant propagation making upper bits Xs (#5969). 2025-04-30 08:22:05 -04:00
Wilson Snyder 4e667fabb7 Internals: Add V3Number width-and-opAssign. No functional change. 2025-04-30 08:08:44 -04:00
Wilson Snyder 5ca62de167 Fix filename backslash escapes in C code (#5947). 2025-04-29 19:27:38 -04:00
Wilson Snyder d3016b62f5 Internals: Constructor cleanup. No functional change. 2025-04-29 19:23:35 -04:00
Wilson Snyder 7d4d618d98 Test: display fix 2025-04-29 19:23:08 -04:00
Wilson Snyder 9b3fccdcb7 Add BADVLTPRAGMA on unknown Verilator pragmas (#5945). 2025-04-29 18:18:54 -04:00
Wilson Snyder 8da539ed8a Fix sign extension of signed compared with unsigned case items (#5968). 2025-04-28 22:22:50 -04:00
Wilson Snyder 3658e5f0f1 Internals: Rename widthToFit, no functional change. 2025-04-28 21:54:58 -04:00
Wilson Snyder 5083972536 Internals: Defer AstCast into V3LinkDot, in preparation for future parser 2025-04-28 19:34:40 -04:00
Wilson Snyder f983ce4875 Internals: Defer DTypeRef versus IfaceDTypeRef determination into V3LinkDot, in preparation for future parser 2025-04-27 22:11:28 -04:00
Wilson Snyder 4c4a39a115 Internals: Refactor V3LinkDot dump and comments. No functional change intended. 2025-04-27 16:52:26 -04:00
Wilson Snyder cb1661f9d0 Internals: Cleanups (from parse branch). No functional change intended. 2025-04-27 14:17:24 -04:00
Wilson Snyder eb5676366b devel release 2025-04-27 13:06:34 -04:00
Wilson Snyder eca2b4c960 Version bump 2025-04-27 12:58:57 -04:00
Wilson Snyder c9be36911f Cleanup documentated option sort order, and enforce with test 2025-04-26 17:14:49 -04:00
Wilson Snyder c3d1c3b952 Fix vlSelf error on fork repeats (#5927). 2025-04-26 09:52:44 -04:00
Wilson Snyder e7adae6f81 Internals: Cleanup some vlSelf code. No functional change intended. 2025-04-26 09:51:02 -04:00
Wilson Snyder abc46db3c0 Tests: Cleanup some .cpp paths. No test functional change indended. 2025-04-25 20:57:11 -04:00
Wilson Snyder dd6cd3decb Commentary: Changes update 2025-04-25 20:55:18 -04:00
Wilson Snyder ebe49552b0 Fix packed selection using over 32-bit index (#5957). 2025-04-24 18:25:55 -04:00
Bartłomiej Chmiel d6e52b9400 Support profiling nested hierarchical mtasks with verilator_gantt (#5956) 2025-04-24 07:50:07 -04:00
Geza Lore 6ac2aa2d99 Add RTLMeter GitHub workflows (#5948)
Add the GitHub Actions workflows for running RTLMeter.

Runs start daily, at 02:00 UTC, on ubuntu-24.04. There are 2 runs:
- Using GCC, with default verilator options
- Using Clang, with "--threads 4"

Each run uses a maximum of 2 runners in parallel (so max 4 in total),
and takes slightly over 2 hours to complete.

The jobs will fail if a benchmark is broken, so this already serves as a
regression test for the included designs.

For now, performance metrics are recorded as artefacts of the run but
not otherwise published.

Performance metrics are always recorded for all successful jobs, even if
some cases are failing.
2025-04-19 15:42:33 +01:00
github action 7aad136972 Apply 'make format' 2025-04-18 09:36:29 +00:00
John Khoo fee839a80e Update UNOPTFLAT warning to suggest isolate_assignments (#5942) 2025-04-18 18:35:36 +09:00
Ryszard Rozak cbabd8abe1 Internals: Fix redundant edges in V3Trace (#5939). No functional change intended..
Signed-off-by: Ryszard Rozak <[email protected]>
2025-04-17 06:23:18 -04:00
Wilson Snyder 3ecd58460f Internals: Apply make format-json format-yaml. No functional change. 2025-04-16 07:34:57 -04:00
Wilson Snyder 09d27fa8a7 Commentary: Changes update 2025-04-16 07:34:04 -04:00
Yilou Wang e0fdb933a0 Support constraint random for StructArray (#5805) (#5937) 2025-04-16 07:08:46 -04:00
d0c4cc3938 Support user-defined primitives (UDPs) (#468) (#5807) (#5936)
Co-authored-by: Bartłomiej Chmiel <[email protected]>
Co-authored-by: Zhou Shen <[email protected]>
2025-04-16 06:32:18 -04:00
Ryszard Rozak 6a6a7b7e9f Fix stream expressions (#5938) 2025-04-15 11:50:43 -04:00
github action e3e8f18a4e Apply 'make format' 2025-04-15 01:41:13 +00:00
Brian Li 50d7f2afc6 Support assigning unpacked arrays to queues (#5924) (#5928) 2025-04-14 21:40:17 -04:00
Wilson Snyder 0359bf38e6 Commentary: Changes update 2025-04-12 18:10:55 -04:00
Wilson Snyder 174eafd74c Update libfst from upstream 2025-04-12 18:10:40 -04:00
Zhouyi Shen 3694d153ae Fix backward compatibility for TRACE option & Fix missing C++ regeneration when Verilog files are updated (#5934) 2025-04-12 17:49:41 -04:00
Andrew Voznytsa 9367e85c88 Add ccache support for generated cmake files (#5926) (#5930) 2025-04-12 16:02:31 -04:00
Wilson Snyder 7a2732f211 Fix parsing (no support) of covergroup functions 2025-04-12 13:07:38 -04:00
github action 999f251b3d Apply 'make format' 2025-04-12 11:36:25 +00:00
Robin Heinemann 10c3320c6b Support soft unions (#5912) (#5932) 2025-04-12 07:35:37 -04:00
Todd Strader 7336b9ebfc Add V3EmitV support for sampled value functions (#5931) 2025-04-11 12:25:56 -04:00
Bartłomiej Chmiel 84f26ed3d7 Add visualization of multi-threaded waiting time with verilator_gantt (#5929) 2025-04-10 10:03:58 -04:00
Wilson Snyder fc8e1b5a2e Fix several cmake issues, including TRACE_VCD 2025-04-10 07:49:58 -04:00
Ryszard Rozak 6bb57e4630 Fix assignments with stream expressions and unpacked arrays (#5915) 2025-04-09 06:37:52 -04:00
Wilson Snyder 2eb9076381 Revert 1ea9018e59 2025-04-09 00:00:22 -04:00
Wilson Snyder 1ea9018e59 Change JSON make format to have trace_fst/trace_saif/trace_vcd 2025-04-08 22:42:02 -04:00
Wilson Snyder a094fd954b Internals: Remove duplication in verilated.cpp file lists. No functional change intended. 2025-04-08 22:30:44 -04:00
Wilson Snyder 7c2b1971a4 Support class extends with arguments. 2025-04-08 22:09:40 -04:00
Wilson Snyder 86f6ac2960 Fix port default values with --coverage-line creating 0=0 (#5920). 2025-04-08 20:48:57 -04:00
Wilson Snyder f5312b83b9 Fix %% on elaboration severity tasks (#5922). 2025-04-07 08:38:05 -04:00
Wilson Snyder 0a3de7c74a Commentary: Changes update 2025-04-07 08:32:31 -04:00
Wilson Snyder b26a19279a Support simple checker blocks (#4066). 2025-04-06 23:42:49 -04:00
Wilson Snyder fcefa96397 Tests: Disable warning in t_gantt_numa. 2025-04-06 23:16:51 -04:00
Wilson Snyder c8a945f363 Internals: Minor refactoring of checker parsing/tests. No functional change. 2025-04-06 23:13:24 -04:00
Wilson Snyder c7ff82f06b Tests: Fix driver.py not stopping on interrupts (#5752) (#5921) 2025-04-06 19:03:39 -04:00
Wilson Snyder 6997a7c516 Fix format mis-indendenting t_assert_ctl_arg 2025-04-06 12:44:30 -04:00
Wilson Snyder eefbd94966 Fix format mis-indendenting t_assert_ctl_arg 2025-04-06 10:39:07 -04:00
Wilson Snyder d1a0bad334 Tests: Add test for (#4040). 2025-04-06 10:24:49 -04:00
github action 5cca1b101c Apply 'make format' 2025-04-06 01:19:33 +00:00
Wilson Snyder 18aeb080ad Fix empty test, part of last commit. 2025-04-05 21:14:27 -04:00
Wilson Snyder e9fe8f65a8 Change error messages to more often suggest documentation 2025-04-05 17:10:44 -04:00
github action eccfd8c6f9 Apply 'make format' 2025-04-05 19:37:32 +00:00
Wilson Snyder af03d91714 Tests: Fix truncated file 2025-04-05 15:36:24 -04:00
Wilson Snyder c3fd34b489 Tests: Add t_virtual_interface_delayed (#4322) 2025-04-05 15:31:17 -04:00
Wilson Snyder e12b971ba6 Optimize SAIF writes (#5916) 2025-04-05 15:09:32 -04:00
github action 2bbb24eb38 Apply 'make format' 2025-04-05 18:20:51 +00:00
Wilson Snyder 34a760b75b Optimize duplicate timestamps out of traces (#4686) 2025-04-05 14:19:58 -04:00
Wilson Snyder 7cc40d277b Tests: Cleanup some .out filenames. No test coverage change. 2025-04-05 13:46:22 -04:00
Wilson Snyder 0984fd045f Change --trace to --trace-vcd. 2025-04-05 10:46:39 -04:00
Wilson Snyder d5077a9d35 Commentary (#5919) 2025-04-05 09:45:07 -04:00
Yutetsu TAKATSUKASA b9f0612db8 Fix LATCH warning for automatic variables (#5918) 2025-04-05 06:21:34 -04:00
Wilson Snyder 6ba06498db Fix segfault in fork synchronization (#5906). 2025-04-04 08:15:39 -04:00
Wilson Snyder 73d52c00bb Tests: Note other simulator results 2025-04-04 07:44:04 -04:00
Wilson Snyder 87ee6c8746 Tests: Only != is globally allowed to compare strings 2025-04-03 21:26:53 -04:00
Mateusz Gancarz e4771dac7f In SAIF dumps include signals with TC 0 (#5914) 2025-04-03 16:25:10 -04:00
Wilson Snyder 14e7b1076e Commentary: Changes update 2025-04-02 23:17:39 -04:00
Wilson Snyder f55fee1cf0 Internals: Fix missing semis; no functional change 2025-04-02 23:13:43 -04:00
Ryszard Rozak 353a4b7b4a Fix parameters referencing interface fields (#1593) (#5910) 2025-04-02 09:43:12 -04:00
Wilson Snyder 6d1e82b908 Add numactl-like automatic assignment of processor affinity (#5911) 2025-04-02 08:27:23 -04:00
Krzysztof Sychla cd5997a2e6 Support $setuphold (#5884) 2025-04-02 06:08:51 -04:00
Wilson Snyder 0b9c2163d5 Tests: Cleanup some gantt tests; no test functional change 2025-04-01 22:54:39 -04:00
Wilson Snyder 168f0ed9e5 Fix new this (#5909). 2025-04-01 08:12:34 -04:00
Wilson Snyder 538f39edf9 Fix grammar. 2025-04-01 07:54:56 -04:00
github action e3c1d36e6e Apply 'make format' 2025-04-01 11:34:45 +00:00
Brian Li 559d990e82 Support command-line overriding `define (#5900) (#5908) 2025-04-01 07:33:49 -04:00
Wilson Snyder f3684a85b9 Fix delayed assignment malformed LHS assertion (#5904). 2025-03-30 17:38:54 -04:00
Wilson Snyder b49351356e Fix delays inside interface functions, and classes inside interfaces (#5846). 2025-03-30 16:40:22 -04:00
Wilson Snyder 21229e0350 Update libfst from upstream (gtkwave/libfst#12) 2025-03-30 11:10:38 -04:00
Wilson Snyder 6f87443da5 Commentary 2025-03-30 11:02:21 -04:00
Wilson Snyder 0a860f151c Cleanup some missed make clean files 2025-03-30 11:02:05 -04:00
Wilson Snyder 2116b424b9 Tests: Cleanup as --binary implies --timing. No test functional change. 2025-03-29 15:50:07 -04:00
Wilson Snyder e6a997e316 CI: Use reusable workflow, so tests start after build (#5901) 2025-03-29 15:09:32 -04:00
Wilson Snyder f29eeecee7 Fix process comparisons (#5896). 2025-03-29 07:16:54 -04:00
Wilson Snyder 2b8b1c4281 Tests: Disable running some lint tests on vltmt 2025-03-29 07:14:45 -04:00
Wilson Snyder 610b2e75af CI: Add vltmt-2 to bring longpath test time down 2025-03-29 06:54:30 -04:00
Wilson Snyder fd960b5f77 Commentary: Changes update 2025-03-28 23:14:15 -04:00
Wilson Snyder 9b48cc33db Fix process comparisons (#5896). 2025-03-28 22:40:21 -04:00
Wilson Snyder 844448655e Add `systemc_header_post 2025-03-28 22:40:21 -04:00
Wilson Snyder b4ef6ce860 Support systemc_interface and related inside class`. 2025-03-28 22:40:21 -04:00
Wilson Snyder 6edf2f80a2 Tests: Rename t_extend_c_class 2025-03-28 22:40:21 -04:00
Wilson Snyder 8e7f29b07e Fix incorrect systemc block token names 2025-03-28 22:40:21 -04:00
Geza Lore 28824b7597 Fix ccache with clang (#5899)
Lately ccache was mostly missing when using clang. Add '-Xclang
-fno-pch-timestamp' as recommended in the ccache manual.  This indeed
fixes the caching.
2025-03-28 18:25:53 +00:00
Geza Lore 39c3e79a3c Fix V3Gate assertion on eliminated circular logic (#5889) (#5898)
Fixes #5889
2025-03-28 17:04:09 +00:00
Geza Lore b6bcbd5660 Internals: Fix clang-tidy warnings in DFG (#5893) (#5897) 2025-03-28 12:06:13 -04:00
Wilson Snyder ed1e3ec4a2 Internals: Fix some clang-tidy issues. No functional change. 2025-03-27 21:21:37 -04:00
Wilson Snyder 98b89d0f2c Fix some cppcheck warnings. No functional change intended. 2025-03-27 19:46:59 -04:00
Wilson Snyder 5e69faff46 Fix clang 20 warnings 2025-03-27 19:01:25 -04:00
Wilson Snyder 40acac1c57 Fix queue accessing past end (Clang 20 GLIBC warning) 2025-03-27 19:00:43 -04:00
Wilson Snyder d26d62a176 Tests: Add driver.py --driver-clean 2025-03-27 18:33:18 -04:00
Bartłomiej Chmiel 8965401d10 Fix PGO profiling for multi-threaded hierarchical scenarios (#5888) 2025-03-27 11:10:48 -04:00
Luca Colagrande b9a571916c ci: Enable manual Docker image build and push (#5885) 2025-03-26 09:46:36 -04:00
Bartłomiej Chmiel cdab9479b8 Commentary: Fix bugpoint link (#5883)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
2025-03-26 07:05:18 -04:00
Wilson Snyder ce058cc432 Fix $fscanf not returning -1 on EOF (#5881). 2025-03-25 08:28:36 -04:00
Wilson Snyder 4dd49e1244 Commentary: Changes update 2025-03-25 08:24:19 -04:00
Bartłomiej Chmiel fabded95df Support multi-thread hierarchical simulation (#2583) (#5871) 2025-03-24 18:39:29 -04:00
Wilson Snyder 7521c2c644 Standardize some error messages. 2025-03-23 19:51:54 -04:00
Wilson Snyder 464e19caaa Tests: Fix ubuntu24.04-arm issues 2025-03-22 16:55:53 -04:00
Wilson Snyder 0b6be2809e Tests: Fix bad ETA at startup 2025-03-22 08:49:40 -04:00
Wilson Snyder f9109eb61f Delay deletes in V3Fork (#5862 attempt) 2025-03-22 08:03:25 -04:00
Wilson Snyder 48effad448 Add DEPRECATED warning on --xml-only and --xml-output. 2025-03-21 21:32:05 -04:00
Wilson Snyder 29b439b93f Commentary 2025-03-21 17:43:07 -04:00
Nick Brereton 27e39d7821 Fix interface array assignments (#5270) (#5633) (#5869) 2025-03-21 17:00:49 -04:00
Todd Strader 8c287134d7 Add warning on expression coverage class references (#5870) 2025-03-21 08:55:38 -04:00
Wilson Snyder c508fd5d24 Internals: Remove single-statement braces. No functional change. 2025-03-19 22:55:11 -04:00
Wilson Snyder 62afbed3cd Commentary: Changes update 2025-03-19 19:06:44 -04:00
Todd Strader d2b7b567df Fix expression coverage on additional nodes (#5849 partial) (#5867) 2025-03-19 19:01:31 -04:00
Wilson Snyder 39bdd427d6 Fix unresolved typedefs as parameters (#5850). 2025-03-19 18:02:56 -04:00
Geza Lore 4a2212949e Fix change detection at time 0 (#5864)
Initialize "previous value" variables in the static initializer
function, instead of the 'initial' blocks function. Fixes #5499
2025-03-18 13:34:04 +00:00
Wilson Snyder 780163b91e Internals: Avoid extra op#() calls. No functional change intended. 2025-03-16 14:34:19 -04:00
Wilson Snyder 21eb43a554 Commentary: Changes update 2025-03-15 21:59:47 -04:00
Wilson Snyder 353ef5c436 Commentary 2025-03-15 21:57:31 -04:00
Wilson Snyder 77cc93c176 Fix detecting bad datatype on $countones (#5674). 2025-03-15 21:57:10 -04:00
Wilson Snyder 418fc2c246 Fix reduction-or on class pointers (prep #5674) 2025-03-15 21:46:37 -04:00
William D. Jones 13c22690c4 Fix algorithm header portability in V3Os.cpp (for std::replace). (#5861) 2025-03-15 21:43:06 -04:00
Tobias Jensen ae87df7a5d Fix Windows paths in perl (#5858) (#5860)
Add colon to no escape list, for windows paths
2025-03-15 14:22:10 -04:00
Geza Lore 59cb53cfbc Set trigger vector in whole words (#5857)
Having many triggers still hits a bottleneck in LLVM leading to long
compile times.

Instead of setting triggers bit-wise, set them as a whole 64-bit word
when possible. This improves C++ compile times by ~4x on some large
designs and has minor run-time performance benefit.
2025-03-14 14:06:51 +00:00
Geza Lore aca3b1636a Remove unused gtkwave/wavealloca.h 2025-03-13 14:43:35 +00:00
Ryszard Rozak 9a6598b36f Fix streaming of unpacked arrays concatenations (#5856) 2025-03-13 13:56:29 +01:00
Geza Lore 51a97ccb90 Update libfst from upstream (#5855)
Ignore whitespace if comparing this change.
2025-03-13 07:24:47 -04:00
Wilson Snyder 0aac3074b6 Fix recursive error on virtual interfaces (#5854). 2025-03-12 17:57:02 -04:00
Wilson Snyder 391d4e1c32 Fix segmentation fault on member compare (#5853). 2025-03-12 08:06:34 -04:00
Wilson Snyder 45add07205 Internals: Minor V3Param cleanups. No functional change. 2025-03-12 07:58:26 -04:00
Wilson Snyder 64caa700d3 Commentary: Changes update 2025-03-12 07:58:26 -04:00
github action a5eb9a5b9d Apply 'make format' 2025-03-11 23:58:06 +00:00
Andrew Voznytsa 6a48d3bb83 Add --make json to enable integration with non-make/cmake build systems (#5799) 2025-03-11 19:57:21 -04:00
Wilson Snyder 53151d7c5f Fix emitting this (#5849) 2025-03-11 17:53:35 -04:00
Wilson Snyder 78198d90e1 Commentary: Changes update 2025-03-11 17:49:19 -04:00
Wilson Snyder 9c044a9184 Commentary 2025-03-11 17:47:58 -04:00
github action f62b3faaf2 Apply 'make format' 2025-03-11 21:45:01 +00:00
Gilberto Abram 4dbb066b96 Fix removal of callbacks no longer in current list (#5851) (#5852) 2025-03-11 17:44:12 -04:00
Yilou Wang 7fe51583e5 Fix foreach of assocArr inside a constraint block (#5727) (#5841) 2025-03-11 13:32:34 -04:00
Geza Lore 6ecdd14fdb Fix NBA shared flag reuse (#5848)
Fixes #5847
2025-03-11 07:40:21 -04:00
Wilson Snyder 8157f21c3e Internals: Refactor hasGParam. No functional change intended. 2025-03-09 16:10:38 -04:00
Wilson Snyder 781bd3cc09 Commentary: Changes update 2025-03-09 13:15:53 -04:00
Wilson Snyder a2e91f3cf2 Internals: Add some const. No functional change. 2025-03-09 13:13:57 -04:00
Geza Lore d9701e6406 Automatically split some packed variables (#5843)
This patch adds a heuristic to V3SplitVar, and it attempts to split up
packed variables that are only referenced via constant index,
non-overlapping bit/range selects. This can eliminate some UNOPTFLAT cases.
2025-03-09 10:31:01 -04:00
Wilson Snyder 128231b077 Tests: Parameter pattern init (#3144) 2025-03-08 19:13:20 -05:00
Wilson Snyder ce2f335786 Internals: Set isParameterized near hasGParam. No functional change intended. 2025-03-08 17:53:24 -05:00
Wilson Snyder 9632dfdf93 Internals: Remove some unneeded this->. No functional change. 2025-03-08 17:48:20 -05:00
Wilson Snyder 8026b2a7f3 Fix checking built-in method arguments (#5839) 2025-03-08 14:11:12 -05:00
Wilson Snyder 24dbb0bc5c Internals: V3Width call refactoring. No functional change. 2025-03-08 12:44:30 -05:00
github action 5045bf53df Apply 'make format' 2025-03-08 16:09:07 +00:00
Wilson Snyder 51fcb881d5 Fix error on out-of-range lvalue part select (#5820). 2025-03-08 11:05:58 -05:00
Geza Lore 20b964a9a2 Fix splitting of packed ports with non-zero based ranges (#5842) 2025-03-08 09:37:30 -05:00
Wilson Snyder 10a77a17a9 Commentary (#5840) 2025-03-07 23:31:34 -05:00
Wilson Snyder a62f7fe4ae Commentary: Changes update 2025-03-07 18:03:01 -05:00
Mateusz Gancarz 9b4509f7d9 Add --trace-saif for SAIF power traces (#5812) 2025-03-07 10:41:29 -05:00
Geza Lore 96bffd49aa Fix invalidating variable caches in SenExprBulider (#5834) (#5835) 2025-03-07 07:18:34 -05:00
Krzysztof Bieganski b2093b513a Fix type_id package scope resolution (#5826) 2025-03-06 17:41:27 -05:00
Wilson Snyder 8e87a99628 Fix rand_mode method with cast (#5831). 2025-03-05 21:43:50 -05:00
Wilson Snyder 258becd179 Add empty veriuser.h for legacy compatibility. 2025-03-04 21:25:28 -05:00
Geza Lore 2cad858d32 Bump vcddiff (#5828)
For #5806 via veripool/vcddiff#5
2025-03-04 16:21:25 +00:00
Bartłomiej Chmiel a3b2c2af17 Support force/release with a variable reference (#5721) (#5810) 2025-03-04 10:12:02 -05:00
Wilson Snyder 27d3eb5b7b Fix UNOPTFLAT warnings with --coverage-trace and always_comb (#5821). 2025-03-02 20:02:55 -05:00
Wilson Snyder ce211ebceb Internals: Make some auto more explicit. No functional change. 2025-03-02 17:01:35 -05:00
Wilson Snyder 4bf8f47f59 Commentary: Changes update 2025-03-02 17:01:06 -05:00
Wilson Snyder b54f897090 Tests: Fix Ubuntu24.04 clang test issues, and enable action (#5824) 2025-03-02 16:53:59 -05:00
Wilson Snyder d31bce915c Actions: Turn off Ubuntu 20.04 (#5774) (#5823) 2025-03-02 12:33:36 -05:00
Geza Lore 0133bc6b09 Do not use function locals in SenExprBuilder (#5822)
Function locals are not safe here because we might need to split up
the generated function. V3Localize can fix them later if safe.
2025-03-02 16:13:59 +00:00
Geza Lore bab949a468 Use tcmalloc on non 22.04 CI builds (#5818) 2025-03-02 08:13:20 +00:00
Geza Lore 99064d3e39 Make mold static link tcmalloc (#5817) 2025-03-02 00:20:16 +00:00
Geza Lore fc302a5207 Fix sorting of wide SenItems (#5816)
This used to throw Error: Value too wide for 64-bits expected in this context
2025-03-01 22:11:43 +00:00
Geza Lore 14f618b0f6 Fix invalid code motion over branches (#5811) (#5814) 2025-02-28 13:32:03 -05:00
Wilson Snyder a9762e0c5c Fix coredump on fork inside disable named block by adding an UNSUPPORTED 2025-02-27 21:42:20 -05:00
Wilson Snyder 098ee6fa7a Internals: Cleanup some missing VL_RESTORERs. No functional change intended. 2025-02-27 21:18:27 -05:00
Wilson Snyder 7f94fa1da7 Add check for let misused in statement context (#5733). 2025-02-26 09:08:41 -05:00
Wilson Snyder 3b98db17cc Fix reset of automatic function variables (#5747).
Also required V3Life optimize CRESET(x) ... ASSIGN(rhs, x) to remove the
extraneous CRESET to avoid creating new UNOPTFLAT situations.
2025-02-25 22:48:53 -05:00
Wilson Snyder 233b6eafba Commentary: Changes update 2025-02-25 22:44:55 -05:00
Wilson Snyder 489349ffbd Internals: Reduce verbosity of SplitVar 2025-02-25 20:41:00 -05:00
Wilson Snyder b52e1d3ede Fix wrong fileline on 1step 2025-02-25 20:40:33 -05:00
Bartłomiej Chmiel 6a8f97e184 Internals: Fix typos (#5803)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
2025-02-25 12:44:14 -05:00
Kamil Rakoczy 3ab89d5be7 Add used language to --preproc-resolve output (#5795) 2025-02-25 07:03:25 -05:00
Wilson Snyder b35ab0b843 Tests: Fix last commit 2025-02-24 22:39:30 -05:00
Wilson Snyder 6c46c4f6f7 Tests: Add unsupported test for specparam (#5767). 2025-02-24 21:01:05 -05:00
Wilson Snyder 2455d15271 Change --output-groups to default to value of --build-jobs.
Those using build farms may need to now use `--output-groups 0` or otherwise.
2025-02-24 20:39:27 -05:00
Wilson Snyder d232923051 Change --output-groups to default to value of --build-jobs.
Those using build farms may need to now use `--output-groups 0` or otherwise.
2025-02-24 20:38:08 -05:00
Wilson Snyder e6678f6546 devel release 2025-02-24 18:33:43 -05:00
Wilson Snyder 436d3d76f0 Version bump 2025-02-24 18:19:40 -05:00
Wilson Snyder c1f0787669 Commentary: Changes update 2025-02-24 18:15:08 -05:00
Yilou Wang dae4c8ee22 Support constrained random for arrays in structs (#5765) (#5802) 2025-02-24 17:51:51 -05:00
Wilson Snyder 5daf7385f1 Commentary: Changes update 2025-02-24 04:04:23 -05:00
Wilson Snyder 4ce8164277 Fix parsing input wire with default and range (#5800). 2025-02-24 03:51:49 -05:00
Todd Strader 7ec32799b0 Fix expression coverage + VarXRefs (#5797) 2025-02-22 15:55:23 -05:00
Geza Lore 812861e7f2 Optimize splitting trigger computation and dump (#5798) 2025-02-23 05:57:36 +10:00
Wilson Snyder 1857f6399c Fix $monitor with dotted references (#5794). 2025-02-21 17:18:49 -05:00
Todd Strader f7ccc013e7 Improve V3EmitV for interfaces (#5796) 2025-02-21 16:49:14 -05:00
Kamil Rakoczy 2e1fa8f338 Add --preproc-resolve for modules in preprocessor output (#5789)
Signed-off-by: Kamil Rakoczy <[email protected]>
2025-02-22 04:47:54 +10:00
Todd Strader 70459b3208 Fix V3EmitV for non-zero based arrays (#5790) 2025-02-21 05:49:32 +11:00
Ryszard Rozak 2a23ec74e4 Fix dpi context functions (#5788) 2025-02-20 10:15:09 +01:00
Wilson Snyder be1ace423e Fix time import error on time parameters (#5786). 2025-02-19 17:03:59 -05:00
Wilson Snyder 2d0149b703 Commentary: Changes update 2025-02-19 17:00:29 -05:00
Todd Strader 34ced254c0 Support expression coverage (#5719) 2025-02-19 16:42:23 -05:00
Wilson Snyder fe15171649 Internals: cppcheck cleanups. No functional change. 2025-02-18 01:14:51 -05:00
Wilson Snyder 4092ac7e72 Commentary: Changes update 2025-02-18 01:05:10 -05:00
Yutetsu TAKATSUKASA 1a07af57a3 Fix unpacked split_var (#5782) (#5785) 2025-02-18 05:34:57 +11:00
Kamil Rakoczy c840ffb0ae Support nested classes (#4178) (#5778)
Signed-off-by: Kamil Rakoczy <[email protected]>
2025-02-17 23:47:41 +11:00
Wilson Snyder fbe8439eb8 Commentary: Changes update 2025-02-15 00:58:14 -05:00
Wilson Snyder 754c5c71f1 Fix force VPI public signal visibility (#5225). 2025-02-15 00:58:14 -05:00
Wilson Snyder 6940ee420d Commentary 2025-02-15 00:58:14 -05:00
Todd Strader b645fcf027 More V3EmitV support (#5779) 2025-02-14 14:58:11 -05:00
Krzysztof Bieganski ffb02cea15 Fix ignoring joins in stringify in preprocessor (#5777)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2025-02-13 18:33:12 -05:00
Krzysztof Bieganski f753ae2518 Support selects on arbitrary string expressions (#5773) 2025-02-11 12:06:34 -05:00
Dave Sargeant caa19c0cb3 Fix VFileContent reference count (#5769) (#5771) 2025-02-10 10:04:04 -05:00
Trung Nguyen aa3942ab24 Internals: constexpr for VlUnpacked data access (#5725) (#5770)
Add `constexpr` to data access functions of `VlUnpacked` whose `std::array` equivalent in C++14 is `constexpr`.
2025-02-09 22:45:50 -05:00
github action cc1133c0d9 Apply 'make format' 2025-02-08 00:07:38 +00:00
Moubarak Jeje ac659d525b Support VPI array accessors (#5612) 2025-02-07 19:06:46 -05:00
Krzysztof Bieganski 283f6c7433 Add --preproc-token-limit (#5768) 2025-02-07 10:32:12 -05:00
Moubarak Jeje 5b65c15eca Internals: Add datap cast functions (#5761) 2025-02-05 15:29:54 -05:00
Yilou Wang 6b4183632c Support Unpacked Structures' Constrained Randomization (#5657) (#5759) 2025-02-03 11:56:00 -05:00
Wilson Snyder e0e164cea2 Internals: Optimize clearFired (#5753) 2025-01-30 07:52:38 -05:00
Bartłomiej Chmiel a379382d32 Fix handling forced assigns in V3Life (#5757) 2025-01-28 07:30:40 -05:00
Wilson Snyder e2a6e19cac Cleanup V3EmitMk report style 2025-01-25 17:52:27 -05:00
Wilson Snyder 61bfb6c308 Remove list/map from keyword warnings.
Reduces warning verbosity from `map` in UVM.
Assumes user doesn't do a `using namespace std`.
2025-01-25 16:08:15 -05:00
Wilson Snyder bdcfc4e286 Reduce verbosity under --debug default level 2025-01-25 16:01:20 -05:00
Wilson Snyder 70c6651aac Fix -Wno-subobject-linkage on GCC (#5754) 2025-01-25 15:45:30 -05:00
Wilson Snyder 41bb54bc2c Add Makefile targets count to stats 2025-01-25 13:35:56 -05:00
Wilson Snyder 001c098e5a Optimize empty function definition bodies (#5750). 2025-01-25 12:13:25 -05:00
Wilson Snyder 98e40c847c Internals: Suppress vlSelf unused suppression when known used. No functional change intended. 2025-01-25 12:06:05 -05:00
Wilson Snyder 05c7a3b90b Optimize labels as final if block statements (#5744). 2025-01-25 10:29:35 -05:00
Wilson Snyder 694f2ff7c7 Tests: renames 2025-01-25 10:24:59 -05:00
Wilson Snyder 6281385ee8 Commentary/Internals: Sort option names. No functional change. 2025-01-24 21:31:57 -05:00
Wilson Snyder 7e6dd9473f Commentary: Changes update 2025-01-24 21:27:52 -05:00
Wilson Snyder 929e15fa4c Fix various round-trip Verilog output, including packed arrays 2025-01-24 21:00:45 -05:00
Wilson Snyder 432d5f851d Internals: Cleanup some misnamed nodep's. No functional change. 2025-01-24 20:52:31 -05:00
Wilson Snyder d4f4fefd1d Fix -j ignored after -f (#5749). 2025-01-24 17:30:59 -05:00
Wilson Snyder d8080008b4 Commentary 2025-01-24 07:47:32 -05:00
Wilson Snyder bed9aa9904 Internals: Cleanup std::string empty string constructors. 2025-01-24 07:47:32 -05:00
Bartłomiej Chmiel 35fa0d051d Support integer atom type ports in --hierarchical (#5748) 2025-01-24 07:47:11 -05:00
Bartłomiej Chmiel 0507fb4655 Improve hierarchical DPI wrapper scheduling performance (#2583) (#5734) 2025-01-20 14:24:09 -05:00
Geza Lore f4a01eb452 Fix inlined expression with assignment under LHS of NBA (#5736) (#5740) 2025-01-20 07:23:10 -05:00
Wilson Snyder 4954e76b28 Commentary: Changes update 2025-01-18 15:26:41 -05:00
Wilson Snyder fa1b11252e Fix duplicate-named class variable equivalence (#5737). 2025-01-18 15:25:49 -05:00
Andrew Nolte dddc1b5b4d Fix vpiDefName issues with non-inlined scopes and dpi conflicts (#5732) 2025-01-16 15:02:36 -05:00
Natan Kreimer 20faa99464 Fix VPI iteration over hierarchy (#5314) (#5731) 2025-01-13 07:40:34 -05:00
Ethan Sifferman dc43071f1c Improve `resetall support (#5728) (#5730) 2025-01-11 22:53:11 -05:00
Wilson Snyder fdf29b970f Fix VL_UNLIKELY with constructors 2025-01-11 15:27:11 -05:00
Wilson Snyder 70814fa11a Commentary: Add --public-ignore to ignore public metacomments (#5716). 2025-01-11 12:34:12 -05:00
Wilson Snyder 529b8337ec Commentary: Changes update 2025-01-11 12:30:07 -05:00
Andrew Nolte f8dd65c7cd Add --public-ignore to ignore public metacomments (#7819) 2025-01-11 12:29:39 -05:00
Wilson Snyder 28a59a2b21 Update gtkwave from upstream. 2025-01-11 12:16:46 -05:00
Yilou Wang d3e205f201 Support constraints on associative array user-defined keys (#5671) (#5729) 2025-01-11 12:07:52 -05:00
Wilson Snyder dfe28f7ed0 Fix misoptimizing away $urandom (#5703). 2025-01-11 08:48:40 -05:00
github action bb871728c9 Apply 'make format' 2025-01-10 00:05:16 +00:00
Krzysztof Starecki 69dce205d3 Support multidimensional array access via VPI (#2812) (#5573) 2025-01-09 19:04:26 -05:00
Krzysztof Bieganski 052812bb87 Fix BLKSEQ on suspendable processes (#5722)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2025-01-09 08:40:32 -05:00
Yilou Wang 0380a36c76 Fix constrained random for > 64-bit associative arrays (#5670) (#5682) 2025-01-09 08:33:38 -05:00
Wilson Snyder 44f49669a3 Support side effects of form variable[index_function()]++. 2025-01-08 19:37:20 -05:00
github action ff244c1d1f Apply 'make format' 2025-01-08 14:44:48 +00:00
Krzysztof Starecki 260ac342f4 Tests: Add support for Questa in TestSimulator class (#5718) 2025-01-08 09:43:57 -05:00
Nick Brereton 87d856339f Add lint error on importing package within a class (#5634) (#5679) 2025-01-07 16:52:44 -05:00
Wilson Snyder e171463fa2 Add COVERIGN warning, as a more specific UNSUPPORTED error. 2025-01-06 18:48:32 -05:00
Wilson Snyder 481adf8fe7 Commentary 2025-01-06 17:56:50 -05:00
Andrew Nolte b8288b97f7 Improve VPI write errors (#5712) 2025-01-06 17:56:18 -05:00
Andrew Nolte 0d34f56b74 Fix packages with --public-depth 1 (#5708) 2025-01-06 15:21:32 -05:00
Wilson Snyder dcaf6476e8 Fix matching language extension options including dots. 2025-01-05 22:52:29 -05:00
Wilson Snyder 76b2ac9cc1 Support +incdir with multiple directories. 2025-01-05 19:30:39 -05:00
Wilson Snyder b6a400ee9b Support generated classes (#5665). 2025-01-05 17:10:04 -05:00
Wilson Snyder 78d6ec8114 Fix error message when call task as a function (#3089). 2025-01-04 12:55:15 -05:00
Wilson Snyder 88dd95980a Internal cleanups, remove extra iterate, but no functional change intended 2025-01-04 12:50:55 -05:00
Wilson Snyder b531001f55 Fix segfault when only enum value referenced in package (#5714). 2025-01-04 10:36:34 -05:00
Wilson Snyder 1d0563212e Fix pattern assignment to real inside struct (#5713). 2025-01-03 19:39:48 -05:00
Wilson Snyder 8ca49d98c1 Fix %p format output for real inside struct (#5713). 2025-01-03 19:15:03 -05:00
Wilson Snyder 036c1fb0f9 Commentary: Changes update 2025-01-03 10:02:48 -05:00
Wilson Snyder 19258ee18a Commentary 2025-01-03 10:00:56 -05:00
أحمد المحمودي 578d8d8391 Fix man pages whatis section (#5710) 2025-01-03 09:58:33 -05:00
Geza Lore 010ae580b1 Fix V3Simulate constant reuse (#5709)
Use a generational allocator for reusing AstConst across
V3Simulate::clear(), instead of using user1 (which is also used
to store values of nodes).

Also fix invalid lookup on array initializer
2025-01-03 05:33:29 -05:00
Wilson Snyder 951f5eaa82 Commentary 2025-01-02 08:09:02 -05:00
Wilson Snyder 3a69dd4a43 Commentary 2025-01-02 08:07:57 -05:00
Wilson Snyder f52155a768 Copyright year update. 2025-01-02 06:21:30 -05:00
Wilson Snyder 16b3d9101c devel release 2025-01-01 09:11:15 -05:00
Wilson Snyder 8ff77e9d47 Version bump 2025-01-01 09:04:41 -05:00
Wilson Snyder 4361c516fd Commentary: Update contributors. 2025-01-01 09:04:21 -05:00
Wilson Snyder 7d5772c749 Commentary: Changes update 2025-01-01 08:45:29 -05:00
Wilson Snyder f5e2f60dcc Update include/gtkwave from upstream 2025-01-01 08:40:49 -05:00
Wilson Snyder 8fbb725f34 Copyright year update. 2025-01-01 08:30:25 -05:00
Bartłomiej Chmiel 72a47e16c1 Fix verilator_gantt for hierarchically Verilated models (#5700) 2024-12-23 09:10:46 -06:00
Wilson Snyder 530ebecfb7 Tests: Add module-in-module coverage 2024-12-19 21:42:52 -05:00
Wilson Snyder 9a3dcaa10b Fix spelling 2024-12-19 21:30:14 -05:00
Wilson Snyder 8a121803f5 Add configure CFG_CXX_VERSION 2024-12-19 20:56:47 -05:00
Wilson Snyder bb45fd6c6c Add error on --savable --timing (#5690). 2024-12-19 17:30:40 -05:00
Wilson Snyder 62945bb3bc Commentary: Changes update 2024-12-19 17:23:44 -05:00
Todd Strader 079a53e820 Commentary: SYMRSVDWORD + VPI documentation (#5696) 2024-12-19 17:14:15 -05:00
Todd Strader a23fad91a3 Tests: Reduce test_regress VPI copypasta (#5694) (#5693) 2024-12-19 16:29:16 -05:00
Anthony Moore 5f1df5b389 Add a default CMAKE_BUILD_TYPE (#5691) (#5692) 2024-12-19 15:17:44 -05:00
Todd Strader 74d5d008bb Fix VPI + SYMRSVDWORD intersection (#5686) 2024-12-19 15:15:28 -05:00
Todd Strader 8a9fc9237d Tests: Execute t_emit_accessors (#5689) (#5688) 2024-12-19 15:01:57 -05:00
Ryszard Rozak c093b24342 Fix width extension of operands of inside operator (#5685) 2024-12-19 15:51:51 +01:00
Wilson Snyder 29fb82d3b7 Commentary 2024-12-16 18:02:17 -05:00
Wilson Snyder c7355b4056 Commentary: Changes update 2024-12-15 09:19:30 -05:00
Wilson Snyder 4b4ca90c71 Internals: Create FuncRef/TaskRef directly from Func/Task pointer. No functional change intended 2024-12-15 09:15:49 -05:00
Wilson Snyder 6aa7123a8c Internals: Function/variable renames. No functional change. 2024-12-14 12:49:42 -05:00
Wilson Snyder 80b2fa3583 Add error on randc inside dist 2024-12-14 11:47:46 -05:00
Wilson Snyder 7886204690 Tests: Add t_class_new_scoped (unsupported) 2024-12-13 17:58:08 -05:00
Wilson Snyder c2dcca980e Improve to throw UNSUPPORTED instead of syntax error on extend class arguments 2024-12-13 17:15:04 -05:00
Wilson Snyder a23dfdc4ee Fix backward external constraint error, from recent new support.
(Thanks sv-tests!)
2024-12-13 16:54:14 -05:00
Todd Strader 41a038b79b Fix interface bracketed array parameter access (#5678) (#5677) 2024-12-13 12:00:49 -05:00
Ryszard Rozak a8e06874bd Fix randomize..with of parameterized classes (#5676)
Broke in 7a04a5b
2024-12-13 09:32:47 -05:00
Yilou Wang 54ef9ad31c Support associative array basic constrained randomization (#5658) (#5670) 2024-12-12 11:31:54 -05:00
Bartłomiej Chmiel 32f9cf072b Fix hierarchical verilation for projects with dot-f dependency lists (#5199) (#5669) 2024-12-12 11:25:19 -05:00
Ryszard Rozak 03e8ef0b0f Fix wildcard equality and inside operators for non-fourstate expressions (#5673) 2024-12-12 14:51:48 +01:00
Wilson Snyder a2f327f729 Support extern constraint 2024-12-12 08:16:19 -05:00
Wilson Snyder 6e204ed0dd Internals: Cleanup 'error error' on fatals 2024-12-11 08:52:41 -05:00
Bartłomiej Chmiel 58ddf997e3 Improve optimization of duplicate wide expressions (#5637)
Prevent inlining of expensive wide expressions in V3Gate (#5637)
2024-12-11 11:45:31 +00:00
Ryszard Rozak 9656311521 Fix error on duplicated declaration of gen block (#5663) 2024-12-06 07:20:31 -05:00
Wilson Snyder 676fd31635 Commentary: Changes update 2024-12-05 08:54:43 -05:00
Wilson Snyder a7f8c9cc74 Commentary 2024-12-05 08:54:00 -05:00
Wilson Snyder a247041cab Internals: Refactor 713dab27 to avoid IfaceRef being known in LinkCells 2024-12-03 12:00:56 -05:00
Wilson Snyder 59fd238a05 Tests: Add t_interface_hidden 2024-12-03 12:00:56 -05:00
Yilou Wang a64660a530 Fix foreach mixed array (#5655) (#5656) 2024-12-03 07:57:50 -05:00
Todd Strader e9a1c75b7f Tests: Demonstrate unsupported scoped pattern array init (#5652) 2024-12-02 18:33:34 -05:00
Todd Strader b6f292f556 Fix imported array assignment literals (#5642) (#5648) 2024-12-02 15:08:47 -05:00
Wilson Snyder 4781a6046a Update error as misnamed port dtype might be interface 2024-12-02 07:35:44 -05:00
Wilson Snyder b16b48f458 Internals: Misc ANSI port parsing cleanups; baseline for future commit. 2024-12-02 07:21:39 -05:00
Wilson Snyder b4e91c87a6 Tests: Add t_interface_find 2024-12-02 07:20:40 -05:00
Bartłomiej Chmiel a668b7c658 Fix missing VlProcess handle in coroutines with splits (#5623) (#5650)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
2024-12-02 05:43:26 -05:00
Wilson Snyder 94fd17e4f7 Internals: Port parsing cleanups 2024-12-01 23:03:19 -05:00
Wilson Snyder abd4c480cd Tests: Fix JSON file number, from earlier commit 2024-12-01 23:00:27 -05:00
Wilson Snyder aa2b653c71 Internals: With --dumpi-tree >= 9, create pre-sort cells.tree 2024-12-01 17:38:02 -05:00
Wilson Snyder d75f41b641 Tests: Add param type to t_typename test 2024-12-01 17:28:13 -05:00
Wilson Snyder b0f898cec8 Internals: Determine needing verilated_std without symbol table 2024-12-01 11:35:00 -05:00
Wilson Snyder 9ec5413d33 Tests: Cleaner error summaries 2024-12-01 10:27:05 -05:00
Wilson Snyder 611567c385 Internals: add make format-c/format-py. No functional change. 2024-12-01 10:26:01 -05:00
Wilson Snyder 7a04a5b9a8 Internals: Refactor symIterate functions. No functional change intended 2024-11-30 22:55:16 -05:00
Wilson Snyder 2d71d66cf5 Commentary 2024-11-30 22:35:36 -05:00
Wilson Snyder a51e26e62d Internals: Some V3LinkCells debug improvements. No functional change. 2024-11-30 20:09:05 -05:00
Wilson Snyder 5021989cb6 Tests: Rename interface-to-wire (#5649 test partial) 2024-11-30 19:05:26 -05:00
Wilson Snyder 2284ada723 Tests: Interface-to-wire (#5649 test partial) 2024-11-30 19:00:00 -05:00
Wilson Snyder e44f34dde3 Improve concat lint error & cleanups for future commit. 2024-11-30 18:56:00 -05:00
Wilson Snyder 0c820c3068 Internals: Standardize template argument names. No functional change. 2024-11-29 20:20:38 -05:00
Wilson Snyder 990ccd6763 Internals: Standardize on template<typename. No functional change. 2024-11-29 18:01:50 -05:00
Wilson Snyder f631587a20 Internals: Rename classOrPackageSkip as kept confusing with member accessor. No functional change. 2024-11-29 16:57:18 -05:00
Wilson Snyder 9f8fcaf827 Fix linking types of typedefs 2024-11-29 16:09:39 -05:00
Wilson Snyder d7893a60ca Internals: In V3LinkDot debug, show node name prefix. No functional change. 2024-11-29 16:09:04 -05:00
Wilson Snyder 93090c56ee Fix mis-aliasing of instances with mailbox parameter types (#5632 partial). 2024-11-29 09:20:02 -05:00
Wilson Snyder d750ffc129 Internals: Fix debug dump of deleted nodes. 2024-11-29 08:51:32 -05:00
Wilson Snyder 7efa0fc82a Internals: Rewrite skipRefp to avoid recursion and fix const-ness. No functional change intended. 2024-11-29 08:10:51 -05:00
Wilson Snyder 8db9db7e25 Internals: Rename same() function. No functional change. 2024-11-28 15:01:58 -05:00
Wilson Snyder d165671225 Improve error when no parameter type value (#5645 partial) 2024-11-28 14:09:06 -05:00
Wilson Snyder 7a8f71e7d8 Add --fno-slice to disable array assignment slicing (#5644). 2024-11-28 13:49:34 -05:00
Wilson Snyder e0ad430cd9 Internals: V3Slice style cleanup. No functional change; ignore whitespace 2024-11-28 13:33:59 -05:00
Wilson Snyder 7695687e87 Commentary: Changes update 2024-11-27 17:56:05 -05:00
Todd Strader 94e545bdca Fix interface and struct pattern collision (#5640) (#5639) 2024-11-27 17:20:21 -05:00
Wilson Snyder 99daa8d24b Support default disable iff and $inferred_disable (#4016). 2024-11-26 22:27:32 -05:00
Wilson Snyder e14903cfb2 Internals: Fix null skipRef for consistency. No functional change intended. 2024-11-26 22:10:54 -05:00
Wilson Snyder bee344d1ae Add error on illegal --prefix etc. values (#5507). 2024-11-26 21:06:43 -05:00
Wilson Snyder 713dab278c Fix mis-public interfaces, broke in f58aee2ff2 2024-11-26 19:16:05 -05:00
Wilson Snyder 29ad93c89d Tests: Add t_interface_colon_bad (#5281) 2024-11-25 21:50:24 -05:00
Wilson Snyder 7a9140821d Fix public_module requiring a wire to become public (#4916). 2024-11-25 21:21:11 -05:00
Wilson Snyder 2ba0749993 Tests: Verify function ref (#3385) 2024-11-25 20:38:41 -05:00
Wilson Snyder 25d75ee86f Add --fno-inline-funcs to disable function inlining. 2024-11-25 19:59:10 -05:00
Wilson Snyder a72009fb41 Fix UNDRIVEN on refs 2024-11-25 18:41:38 -05:00
Wilson Snyder a934d965be Internals: Rename isInoutish 2024-11-25 18:25:36 -05:00
Wilson Snyder 1277a40b31 Tests: Add driver --obj-suffix option 2024-11-24 21:12:08 -05:00
Wilson Snyder 6f35fec5ce Commentary 2024-11-24 20:47:57 -05:00
Wilson Snyder f58aee2ff2 Internals: Defer marking variables as IfaceRef until cells resolved. No functional change intended. 2024-11-24 18:33:10 -05:00
Wilson Snyder f5ee7aa0ab Internals: Decouple Bison class/package symbol table parsing from Link symbol table. (#5629)
Not intended to change non-error cases, but side-effects are likely.
2024-11-24 18:19:19 -05:00
Wilson Snyder 749b0345df Commentary: Changes update 2024-11-23 22:06:07 -05:00
Wilson Snyder 7e9535381a Tests: Use VM_PREFIX 2024-11-23 22:02:19 -05:00
github action 0d5fedce92 Apply 'make format' 2024-11-24 03:02:04 +00:00
sumpster 24b5c641f5 Fix array of struct member overwrites on member update (#5605) (#5618) (#5628) 2024-11-23 22:01:02 -05:00
sumpster ca31bcdbb6 Tests: Fix solver help output detection case insensitive (#5626) (#5627) 2024-11-23 18:10:37 -05:00
Ryszard Rozak ae990ebcda Add warning on global constraints (#5625) 2024-11-22 08:47:14 -05:00
Bartłomiej Chmiel 58dae8f931 Fix clang_check_attributes TypeError when accessing compilation database (#5622)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
2024-11-21 07:05:18 -05:00
Ryszard Rozak 5470cf9fa9 Support randomize size constraints with restrictions (#5582 partial) (#5611) 2024-11-15 10:45:06 -05:00
Wilson Snyder 9bde98e912 Commentary 2024-11-14 21:07:45 -05:00
Wilson Snyder 81ac386a4a Tests: Renames 2024-11-14 21:05:59 -05:00
Tom Manner c98744b914 Internals: Fix VerilatedContext::randSeed comments (#5609) 2024-11-14 11:07:23 -05:00
Greg Davill 904be103df Support parameter names in pattern initialization (#5593) (#5596) 2024-11-14 07:25:58 -05:00
Wilson Snyder 8e82440a55 Fix extranous local:: error 2024-11-13 19:15:10 -05:00
Wilson Snyder 32c789c355 Commentary 2024-11-13 19:14:38 -05:00
Wilson Snyder d4a8cbb1d6 Fix function fork...join_none regression with unknown type (#4449). 2024-11-13 08:00:43 -05:00
Wilson Snyder 192236a832 Fix module automatic 2024-11-13 07:10:48 -05:00
Wilson Snyder e223228ec0 Fix installation of waiver file (#5607) 2024-11-12 22:41:05 -05:00
github action c7dbdf876a Apply 'make format' 2024-11-13 03:12:11 +00:00
Wilson Snyder 3ffea76e11 Add --no-std-waiver and default reading of standard lint waivers file (#5607). 2024-11-12 22:11:19 -05:00
Wilson Snyder 09547f839f Tests: Remove file-number hardcoded dependencies. 2024-11-12 21:39:13 -05:00
Wilson Snyder 0bf413b260 Add lint_off --contents in configuration files. (#5606) 2024-11-12 20:21:16 -05:00
Wilson Snyder a5b2cb6ddf Commentary: Changes update 2024-11-12 17:19:42 -05:00
Wilson Snyder 779cf9248a Cleanup/standardize configuration file string handling 2024-11-12 11:29:27 -05:00
Krzysztof Starecki 1d06364284 Support vpiDefName (#5572) 2024-11-12 11:28:39 -05:00
Wilson Snyder 833c215c45 Tests: Move uvm to subdirectory and add context-sensitive waivers 2024-11-11 20:49:59 -05:00
Wilson Snyder 4d95f6f7b8 Add --waiver-multiline for context-sensitive --waiver-output. 2024-11-11 20:00:26 -05:00
Wilson Snyder 46a5f04840 Internals: Link 'std' in LinkFind 2024-11-11 09:44:08 -05:00
Wilson Snyder 3c686d0eb2 Commentary 2024-11-11 08:44:46 -05:00
Wilson Snyder 7c8ff1d19c Add --no-std-package as subset-alias of --no-std. 2024-11-11 08:30:07 -05:00
Wilson Snyder 151c5b6a1d Tests: Rename some tests 2024-11-10 20:00:16 -05:00
Wilson Snyder 15d1751b23 Internals: Defer class extends resolution until link 2024-11-10 19:34:00 -05:00
Wilson Snyder b71d49e55a Internals: Defer $unit package resolution until link 2024-11-10 18:36:12 -05:00
Wilson Snyder c3b2bfbc39 Internals: Fix missing cleanFileline 2024-11-10 18:26:23 -05:00
github action b74a8f133f Apply 'make format' 2024-11-10 21:54:54 +00:00
Wilson Snyder 873048c21c Fix 'local::' parsing in wrong scope 2024-11-10 16:51:34 -05:00
Wilson Snyder 75e9986d39 Fix local:: mis-allowed in class extends 2024-11-10 16:43:21 -05:00
Geza Lore 863abdb1f7 Fix NBAs to unpacked arrays of unpacked structs (#5603)
This happened to work before #5516, by creating a whole shadow copy of
the entire array. Revert back to that behaviour for now, it will be
slow, but works still.

Fixes #5590
2024-11-10 17:38:28 +00:00
Geza Lore 03bd1bfc63 Move Concat balancing from DFG to FuncOpt (#5602)
This means it applies more widely, e.g. inside sequential logic.
2024-11-10 17:23:11 +00:00
Wilson Snyder 4257fcf9d0 Change parsing of cells to be non-symbol table sensitive. 2024-11-10 12:08:37 -05:00
Wilson Snyder a68da7e220 Internals: Style cleanup. Ignore whitespace if diff. No functional change. 2024-11-10 10:59:18 -05:00
Geza Lore 77ef2cd487 Split up assignments to wides with Concat on the RHS (#5599)
Add a new pass to split up (recursively):

foo = {l, r};

into the following, with the right indices, iff the concatenation
straddles a wide word boundary.

foo[_:_] = r;
foo[_:_] = l;

This eliminates more wide temporaries.

Another 23% speedup on VeeR EH2 high_perf. Also brings the predicted
stack size from 8M to 40k.
2024-11-10 15:51:59 +00:00
Wilson Snyder 7f1aae640f Fix dotted reference in delay value (#2410). 2024-11-10 10:23:29 -05:00
Wilson Snyder 0ec025c40c Internals: Rename rule. No functional change. 2024-11-10 10:14:42 -05:00
Wilson Snyder bc87270ca9 Add UNSUPPORTED on property variable, instead of syntax error. 2024-11-09 22:26:59 -05:00
Wilson Snyder 0e11b0929c Internals: whitespace 2024-11-09 21:33:22 -05:00
Wilson Snyder b741105329 Tests: Fix t_dist_whitespace error message 2024-11-09 20:47:59 -05:00
Wilson Snyder 2f4d1647f0 Fix non-interface error message 2024-11-09 20:28:47 -05:00
Wilson Snyder 4a88ddc616 Tests: Fix interface syntax error 2024-11-09 17:22:16 -05:00
Wilson Snyder 99e7dbc82b Internals: Put unsupported nettypes into symbol table, so parse as idType 2024-11-09 17:15:41 -05:00
Wilson Snyder c7a7965c49 Rename identifer token 2024-11-09 16:49:34 -05:00
Geza Lore f073b278f9 Balance concatenations in DFG (#5598)
The DFG peephole pass converts all associative trees into right leaning,
which is good for simplifying pattern recognition, but can lead to an
excessive amount of wide intermediate results being constructed for
right leaning concatenations.

Add a new pass to balance concatenation trees by trying to:
- Create VL_EDATASIZE (32-bit) sub-terms, so words can then be packed
  easily afterwards
- Try to ensure the operands of a concat are roughly the same width
  within a concatenation tree. This does not yield the shortest tree,
  but it ensures it has many sub-nodes that are small enough to fit into
  machine registers.

This can eliminate a lot of wide intermediate results, which would need
temporaries, and also increases ILP within sub-expressions (assuming the
C compiler can't figure that out itself).

This is over 2x run-time speedup on the high_perf configuration of
VeeR EH2 (which you could arguably also get with -fno-dfg, but oh well).
2024-11-09 18:14:19 +00:00
Wilson Snyder 4969125e5a Add error on soft constraints of randc 2024-11-09 12:45:55 -05:00
Wilson Snyder d230ccd716 Add error on solve before of randc variable. 2024-11-09 12:26:48 -05:00
Wilson Snyder 3fae11595a Support pure constraint. 2024-11-09 12:05:26 -05:00
Wilson Snyder 1e546bb9d9 Add assertion on firing event inside class (#5597) 2024-11-09 09:28:40 -05:00
Wilson Snyder 138daaf565 Commentary: Changes update 2024-11-09 08:35:40 -05:00
Wilson Snyder 3438d8f2b0 Tests: Use illegal struct 2024-11-09 08:34:17 -05:00
Wilson Snyder e55ed8eb66 Commentary 2024-11-09 08:24:50 -05:00
Wilson Snyder a55daf5367 Commentary 2024-11-09 07:56:47 -05:00
Yilou Wang a173883b2d Support basic constrained random for multi-dimensional dynamic array and queue (#5591) 2024-11-08 14:04:58 -05:00
Wilson Snyder 61d2284eab Commentary 2024-11-08 07:47:46 -05:00
Ryszard Rozak 6083480abb Fix rand dynamic arrays with null handles (#5594)
l
2024-11-08 06:53:43 -05:00
Wilson Snyder 2e1128b417 Internals: Iterator cleanup. No functional change intended. 2024-11-06 19:21:03 -05:00
Yilou WangandUdaya Raj Subedi e47208d9b3 Support queue's assignment push_back/push_front('{}) (#5585) (#5586)
Co-authored-by: Udaya Raj Subedi <[email protected]>
2024-11-06 17:31:48 -05:00
Wilson Snyder 87bd8fefa0 Add error on wait with missing .triggered. (#4457) 2024-11-05 01:22:56 -05:00
Wilson Snyder 753ea29df8 Add error on illegal enum base type (#3010). 2024-11-05 00:58:46 -05:00
Wilson Snyder b1dfdef0a9 Add error when improperly storing to parameter (#5147). 2024-11-05 00:17:40 -05:00
Wilson Snyder 2e4676dc11 Internals: Add missing VL_RESTORERS to V3LinkLValue; probably fixes no real cases, bug better safe. 2024-11-05 00:03:23 -05:00
Wilson Snyder eaaf91c82b Internals: Cleanup VL_RESTORER format in V3LinkLValue. No functional change. 2024-11-04 23:55:39 -05:00
Bartłomiej ChmielandRyszard Rozak 4e71f359bf Fix duplicate scope identifiers decoding (#5584)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
Co-authored-by: Ryszard Rozak <[email protected]>
2024-11-04 06:06:15 -08:00
Ryszard Rozak b3348a38d0 Internals: Remove repeated clearing of constraints (#5583)
Signed-off-by: Ryszard Rozak <[email protected]>
2024-11-04 04:48:55 -08:00
Wilson Snyder 7854118883 Fix negative assignment pattern keys (#5580). 2024-11-02 10:06:01 -04:00
Wilson Snyder ed0e1af7aa Commentary: Changes update 2024-11-02 09:47:55 -04:00
github action e1a9734917 Apply 'make format' 2024-11-02 13:43:43 +00:00
Zhou Shen 589612f914 Fix can't locate scope error in interface task delayed assignment (#5462) (#5568) 2024-11-02 09:42:57 -04:00
Geza Lore 76b4c2f254 driver.py: Properly detect cfg with ccache (#5579) 2024-11-01 17:14:17 +00:00
Wilson Snyder b097cec72d Tests: Reduce false t_const_number_unsized_parse timeouts (#5577) 2024-11-01 12:39:29 -04:00
Wilson Snyder 9689a4f58a Internals: Support VL_UNREACHABLE in C++23/MSVC. No functional change intended. 2024-10-31 21:29:13 -04:00
Geza Lore aac0186871 Fix pylint 3.2.7 global-variable-not-assigned (#5578) 2024-11-01 15:27:08 +00:00
Geza Lore f458951b17 Fix slow unsized number parsing (#5577)
Try to avoid allocating and deallocating a full --max-num-width
buffer on parsing every single unsized number literal.
2024-11-01 14:10:44 +00:00
Andrew Nolte 4448778dbf Add coverage point hierarchy to coverage reports (#5575) (#5576) 2024-11-01 09:30:44 -04:00
Todd Strader dab826bef9 VPI error instead of fatal for vpi_get_value() on large signals (#5571) 2024-10-31 17:02:37 -04:00
Todd Strader 9fae951d9d Fix --output-groups leftover files issue (#5574) 2024-10-31 14:38:53 -04:00
Todd Strader 0f2a8c6c22 Fix BLKANDNBLK for for VARXREFs (#5569) 2024-10-29 07:27:40 -04:00
Wilson Snyder 68e0cf5523 devel release 2024-10-27 10:08:18 -04:00
Wilson Snyder d6ba65ba75 Version bump 2024-10-27 09:38:06 -04:00
Wilson Snyder f496138855 Commentary: Changes update 2024-10-27 09:33:54 -04:00
Wilson Snyder 2f272a4190 Fix $countbits in assert with non-tristates (#5566). 2024-10-27 09:30:54 -04:00
Wilson Snyder 469eca7de2 Commentary: Changes update 2024-10-25 18:54:39 -04:00
Todd Strader ec2eae607a Fix enum name method (#5563) 2024-10-25 18:49:45 -04:00
Ryszard Rozak 292c2e289e Support rand dynamic arrays of objects (#5557) (#5564) 2024-10-25 12:00:43 -04:00
Ryszard Rozak 87ac61140d Tests: Don't use indices in check_rand (#5561)
Signed-off-by: Ryszard Rozak <[email protected]>
2024-10-25 11:06:32 -04:00
Geza Lore 81ee89de15 Properly skip t_ccache_report when no ccache (#5562) 2024-10-25 14:33:26 +01:00
Todd Strader 83081aaefc Fix struct literal on pattern assignment (#5552) (#5559) 2024-10-24 18:50:57 -04:00
Tomasz Gorochowik fd2917c928 Commentary: Fix sv-bugpoint paragraph typo (#5558) 2024-10-24 09:41:27 -04:00
Ryszard Rozak 4cd69f9feb Fix queue element access (#5551) 2024-10-24 09:40:54 -04:00
Eric Müller 4e5c7f4568 Fix build on gcc when using the spack wrapper (#5555) 2024-10-24 07:53:11 -04:00
Tomasz Gorochowik 647af27274 Commentary: Mention sv-bugpoint in the contributing guidelines (#5553) 2024-10-24 07:42:57 -04:00
Todd Strader 8cc7e180ca Fix array trace splitting (#5549) 2024-10-23 11:51:48 -04:00
Todd Strader d3d45c0be5 Tests: Fix file_grep_count() error message (#5550) 2024-10-23 10:07:03 -04:00
Wilson Snyder 549dd31224 Commentary: Changes update 2024-10-22 09:34:09 -04:00
Wilson Snyder 36888fac5d Fix long module names crashing string handling (#5546). 2024-10-22 09:25:58 -04:00
Yilou WangandUdaya Raj Subedi 2409f32d87 Fix multi-range indices assignment (#5534) (#5547)
Co-authored-by: Udaya Raj Subedi <[email protected]>
2024-10-21 09:56:50 -04:00
Yilou Wang 8c3cc3af8f Fix struct array assignment (#5455) (#5537) 2024-10-21 09:54:33 -04:00
Todd Strader 76fe224e7c Fix complex user type problem with --x-assign (#5543) 2024-10-18 19:52:25 -04:00
Krzysztof Boroński 7ccc93d9df Fix reduction methods for verilated types (#5542) 2024-10-18 19:51:44 -04:00
Geza Lore 55661e7f71 Install public executables into bindir instead of pkgdatadir (#5140) (#5544)
Instead of installing redirect scripts in to bindir, and real
executables in to pkgdatadir/bin, we now put the real executables into
bindir, and add redirect scripts into pkgdatadir/bin. (That is, we
redirect in the opposite direction as before).

This enables the same relocatable and testable installations as before
without putting architecture specific binaries into pkgdatadir, so
hopefully we now conform to the Linux Filesystem Hierarchy Standard.

This requires a small fixup in the installed `verilator` script to
hardcode the relative path between bindir and pkgdatadir.

Fixes #5140
2024-10-18 10:06:28 +01:00
Aidan McNay ece0613e09 Commentary: Fix CMake comments (#5545) 2024-10-17 16:39:51 -04:00
Ryszard Rozak 0dce97b09d Fix assignments of concatenation to queues and dynamic arrays (#5540) 2024-10-15 07:35:59 -04:00
Ryszard Rozak a3d0cc6522 Fix static function wrappers (#5536)
Signed-off-by: Ryszard Rozak <[email protected]>
2024-10-14 07:41:17 -04:00
Wilson Snyder 1df20f7076 Remove driver.pl - deprecated earlier with driver.py 2024-10-13 21:55:31 -04:00
Wilson Snyder 2fc94557a0 Fix error on enums with x/z using .name(), and internal refactoring 2024-10-11 22:37:48 -04:00
Vito GamberiniandWilson Snyder 789698cb5c Fix coverage counts missing due to table optimization (#5473) (#5474).
Co-authored-by: Wilson Snyder <[email protected]>
2024-10-10 21:22:06 -04:00
Yilou Wang 3cced9baad Fix foreach on associative arr with the same logic and update the tests (#5530) 2024-10-10 12:50:43 -04:00
Yilou Wang f3cc32554c Fix foreach with 2-D queues and dynamic arrays (#5525) (#5529) 2024-10-10 10:50:37 -04:00
Ryszard Rozak 2a905c1d6e Fix copy constructor of classes that use std::process (#5528)
Signed-off-by: Ryszard Rozak <[email protected]>
2024-10-10 14:40:07 +02:00
Wilson Snyder 230b145c04 Commentary 2024-10-10 08:14:21 -04:00
Wilson Snyder 9f34764f4b Tests: Find filenames with fix me 2024-10-10 07:48:23 -04:00
Wilson Snyder 69ac3c14e8 Fix crash with internal assertion on short array initializer (partial #5511) 2024-10-10 07:20:44 -04:00
Wilson Snyder f98637e122 Internals: Cleanup style of coverage visitors. No functional change. Ignore whitespace if diff. 2024-10-09 18:13:23 -04:00
Wilson Snyder 6d936654ba Commentary: Changes update 2024-10-09 18:01:34 -04:00
Wilson Snyder 4dd4047c47 Internals: Less verbose docs build 2024-10-09 18:01:30 -04:00
Zhou Shen 1710b6bab4 Support for wired nets, wor/trior/wand/triand. (#5496) 2024-10-09 17:53:46 -04:00
Geza Lore 041f6603c3 Make incorrect soft ordering constraint into a hard constraint. (#5520)
An ordering constraint between NBA commit blocks ('Post' logic) and the
written variable were previously added as soft constraints (cutable
edges). However these are required for correctness, so if it ever is
cut we will have incorrect simulation results.

Change these into hard constraints instead. This necessitates adding a
flag on AstVar to ignore special variables constructed during V3Delayed
that might otherwise appear as degenerate logic loops. E.g.:

if (VdlySet) {
   VdlySet = 0;  // <- This write to VdlySet can and must be ignored
   LHS = VdlyVal;
}

No functional change, but you might get an error if this constraint was
ever violated. (Theoretically it should never be, as these variables
were inserted in a way that does not require violating these constraints
...)
2024-10-09 11:43:53 +01:00
Geza Lore 5acced1e33 Refactor V3Delay for extensibility (#5516)
* Refactor V3Delay for extensibility

Introduce the concept of an "NBA Scheme", which is the lowering pattern
we can use for various variables that are the targets of NBAs.
E.g.:
 - ShadowVariable (old default scheme)
 - FlagShared (old array set flag scheme)
 - ValueQueueWhole (recent dynamic commit queue)

We now analyse all AstAssignDly before making any decisions on which
scheme to apply. We then choose a specific scheme for each variable that
is the target of an NBA, and then all NBAs targeting that variable use
the same scheme. This enables easy mix and match of schemes as needed,
while remaining consistent by design after extensions.

Output is perturbed due to node insertion order, but no functional
or performance change is intended.
2024-10-09 10:39:40 +01:00
Yilou Wang 920c8012de Support unconstrained randomization for associative array and queue (#5515) 2024-10-08 10:54:20 -04:00
Geza Lore 8f1ea09558 Add lsb index to V3Number::setMask (#5522) 2024-10-08 13:15:36 +01:00
Wilson Snyder b873c23cf2 Internals: Refactor into V3Width enumSelect function 2024-10-07 21:44:07 -04:00
Wilson Snyder 13c7b6e827 Tests: Faster first retry 2024-10-07 21:44:07 -04:00
Wilson Snyder bbce7926b9 Tests: Remove unused clk input 2024-10-07 21:44:07 -04:00
Wilson Snyder 2c445e4bfd Commentary: Changes update 2024-10-07 21:44:07 -04:00
Furqan Nadir 338d54fd34 Commentary: Add name to CONTRIBUTORS (#5519) 2024-10-07 14:10:43 -04:00
Ryszard Rozak 009d1f2f5b Fix -j option without argument in hierarchical verilation (#5514)
Signed-off-by: Ryszard Rozak <[email protected]>
2024-10-07 07:31:59 -04:00
github action 08279645ca Apply 'make format' 2024-10-06 22:10:07 +00:00
Wilson Snyder 28ecd8e908 Support local and protected on typedef (#5460). 2024-10-06 18:08:40 -04:00
Wilson Snyder bc8a332ee8 Tests: Disable last test due to clang warning 2024-10-06 05:00:57 -04:00
Wilson Snyder d52822781c Tests: Fix driver for --iv etc 2024-10-06 04:49:53 -04:00
github action bdd37e40fe Apply 'make format' 2024-10-06 08:02:10 +00:00
Wilson Snyder 4b713e9882 Fix pattern initialization with typedef key (#5512). 2024-10-06 04:01:15 -04:00
Wilson Snyder fd9f5ab34e Fix not reporting class reference with extra parameters (#5467). 2024-10-04 05:38:36 -04:00
Wilson Snyder d06f986b51 Add elaboration dot-error message context, plus debug improvements 2024-10-04 05:38:05 -04:00
Wilson Snyder 8638e46cb7 Fix IEEE version number 2024-10-04 05:22:09 -04:00
Wilson Snyder 85909f02b3 Commentary 2024-10-04 05:21:18 -04:00
Nathan Graybeal 3572bd2f1a Fix configure inserting absolute paths for Python and Perl (#5504) (#5505)
* Migrate all tools to AC_CHECK_PROG
2024-10-04 10:08:44 +01:00
Wilson Snyder ff1d20d50c Tests: Add t_struct_initial_assign, still fails (#5380) (#5381). 2024-10-03 20:36:23 -04:00
Wilson Snyder c300075a20 Tests: Remove driver Python version package requirement (#5505) 2024-10-03 19:39:28 -04:00
Wilson Snyder 4bdfc653a3 Add error on misused genvar (#408). 2024-10-03 18:54:30 -04:00
Wilson Snyder 554653900a Commentary: Move C++20 deprec to after Ubuntu 20.04 EOL 2024-10-03 18:15:51 -04:00
Wilson Snyder b90b81e12c Tests: Fix string !== for other simulators. 2024-10-03 18:14:53 -04:00
Han Qi bf2b4e1b6a Fix equivalence checking when replacing type parameters (#5213) (#5255) 2024-10-03 21:19:07 +01:00
Yilou Wang c05c48aaf3 Support unpacked array Constrained Randomization (#5437) (#5489) 2024-10-02 10:29:47 -04:00
Fabian Keßler 39143cc15a Fix explicit CMAKE_INSTALL_PREFIX usages (#5500) 2024-10-01 13:38:16 -04:00
Wilson Snyder 03012da11c Internals: astgen: Detect bad node types after edits.
Also add checks for nodes that can be multiple types with syntax
`AstNode<AstNodeExpr|AstNodeDType>`
2024-09-30 22:25:28 -04:00
0547108e3f Add -output-groups to build with concatenated .cpp files (#5257)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
Signed-off-by: Ryszard Rozak <[email protected]>
Signed-off-by: Arkadiusz Kozdra <[email protected]>
Co-authored-by: Mariusz Glebocki <[email protected]>
Co-authored-by: Arkadiusz Kozdra <[email protected]>
Co-authored-by: Bartłomiej Chmiel <[email protected]>
Co-authored-by: Wilson Snyder <[email protected]>
Co-authored-by: Ryszard Rozak <[email protected]>
2024-09-30 21:42:36 -04:00
Bartłomiej Chmiel 1a31aa5d62 Internals: Fix annotation checker not considering base class virtual function annotations (#5459) 2024-09-30 21:34:34 -04:00
Wilson Snyder 13a1240359 Commentary: Changes update 2024-09-29 21:41:05 -04:00
Wilson Snyder b7e5486baa Internals: Fix astgen spacing 2024-09-29 16:56:50 -04:00
Wilson Snyder afeca21d73 Internals: For debug, quote symbol table to see spaces. 2024-09-29 16:56:32 -04:00
Wilson Snyder d0ec6092b3 Change package import/export to link post-parsing, prep for later commit. 2024-09-28 20:55:22 -04:00
Wilson Snyder 5c923d6629 Fix to avoid IMPLICIT creation if data type of same name. 2024-09-28 17:58:26 -04:00
Wilson Snyder 1dc6fd3d93 Internals: Move interface error to later phase, prep for later commit. No functional change intended. 2024-09-28 17:37:44 -04:00
Arkadiusz Kozdra 5b56c80830 Better error recovery (#5493)
Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-09-27 20:38:49 +02:00
Wilson Snyder 2291d3d4c6 Tests: Fix some non-IEEE issues in tests. 2024-09-27 09:00:20 -04:00
Arkadiusz Kozdra 02e7767886 Fix randomize with foreach constraints (#5492)
Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-09-26 19:31:06 +02:00
Geza Lore 2a01365f9b Fix V3Table trying to generate 'x' bits in the lookup table. (#5491)
Due to out of range selects, V3Table attempted to create a table in the
constant pool with an 'x' value in it, which caused an internal error.

Ensure V3Table behaves the same for out of range selects as the original
logic would.

There is a related bug #5490, about leaving partially out of range
selects in the logic after inserting bounds checks in V3Unknown.
2024-09-26 16:31:47 +01:00
Arkadiusz KozdraandSzymon Gizler 91c8866ac3 Fix exponential ConcatN (#5488)
Signed-off-by: Arkadiusz Kozdra <[email protected]>
Co-authored-by: Szymon Gizler <[email protected]>
2024-09-26 05:12:24 -04:00
Wilson Snyder 798bbe98e8 Add syntax error on empty case items, per IEEE grammar. 2024-09-25 22:40:28 -04:00
Wilson Snyder a3bbf13506 Internals: Minor parser reorgs in prep for future pull. No functional change intended. 2024-09-25 20:41:49 -04:00
Wilson Snyder 650da7beb2 Examples: Cleanup some spacing 2024-09-25 14:24:01 -04:00
Geza Lore 3bc09d49fb Generate one trigger per SenItem instead of per SenTree (#5483) 2024-09-25 10:35:50 +01:00
Wilson Snyder 6c61a9aff3 Support objcache when compiling Verilated files with cmake. 2024-09-24 20:55:11 -04:00
Wilson Snyder a4085f3a06 Internals: Standardize format of CMake files with gersemi. No functional change intended. 2024-09-24 20:43:19 -04:00
Wilson Snyder 3ae18af8dd Fix short-circuting on method calls (#5486). 2024-09-24 20:24:27 -04:00
Wilson Snyder 811eab8fa5 Fix short-circuting with associative array access (#5484). 2024-09-24 19:24:01 -04:00
Wilson Snyder 4ec75b2618 Fix over-permissive parsing of UDPs without identifiers 2024-09-24 18:53:32 -04:00
Wilson Snyder 5a65d27851 Internals: bisonpre: Support -Wcounterexamples 2024-09-23 21:42:02 -04:00
Chris Bachhuber 685ea0bc65 Add Docker pre-commit hook (#5238) (#5452) 2024-09-23 07:37:24 -04:00
Wilson Snyder c48d80592e Fix extra dot in coverage point hierarchy when using name()=''. 2024-09-23 07:34:12 -04:00
Wilson Snyder 0aa8356eca Change --main and --binary to use a TOP hierarchy name of "" (#5482). 2024-09-22 23:03:51 -04:00
Wilson Snyder 670b7c5243 Support DPI imports and exports with double underscores (#5481). 2024-09-22 22:11:01 -04:00
Wilson Snyder 706679e6b1 Support DPI imports and exports with double underscores. 2024-09-22 22:06:39 -04:00
Wilson Snyder d288488b7f Fix --binary with .cpp PLI filenames under relative directory paths. 2024-09-22 16:47:15 -04:00
Chris Bachhuber b17619296a Documentation: Highlight syntax in install.rst (#5478) 2024-09-22 15:55:12 -04:00
Wilson Snyder 88bd479bc7 Add error on instances without parenthesis. 2024-09-22 12:25:35 -04:00
Wilson Snyder 2584befa5a Internals: Show tree traversal in V3LinkDot Resolve debug. No functional change intended. 2024-09-22 10:46:04 -04:00
Wilson Snyder 90215878f8 Tests: Improve t_dist_warn_coverage.py 2024-09-22 09:10:03 -04:00
Wilson Snyder a1a74cb1d9 Fix mis-parsing of constraint = new. 2024-09-22 09:10:01 -04:00
Wilson Snyder 9f9770e722 Parse elaboration-time nettype declarations (as UNSUPPORTED) 2024-09-21 21:00:02 -04:00
Wilson Snyder 888af29a72 Delay struct type determination until elaboration 2024-09-21 20:27:55 -04:00
Wilson Snyder 5f39c69d19 Delay parameter type assignment determination until elaboration 2024-09-21 20:27:41 -04:00
Wilson Snyder e7de2c5a05 Remove warning on unsized numbers exceeding 32-bits. 2024-09-21 19:19:12 -04:00
Geza Lore 59b07529b1 driver.py: fix aslr_off (#5477) 2024-09-21 16:37:51 +01:00
Geza Lore a6e9bce0dd driver.py: consume all stdout from subprocess (#5476) 2024-09-21 16:24:45 +01:00
Wilson Snyder 2c52119d6c Tests: Rename some tests into proper groups. No functional change. 2024-09-21 10:04:58 -04:00
Wilson Snyder 48faf8d036 Fix tracing when name() is empty (#5470). 2024-09-21 08:25:14 -04:00
Wilson Snyder 0484143282 Tests: Update t_timing_finish (#5472) 2024-09-21 07:46:04 -04:00
Wilson Snyder 0ee214a157 Tests: Fix t_timing_fork_comb_bad committed earlier 2024-09-20 22:16:00 -04:00
Wilson Snyder 774ec42be4 Internals: Experimental cleanup; avoid :: on package symbol tables 2024-09-20 20:39:49 -04:00
Wilson Snyder 5a6f2b661d Tests: Avoid multiple lint/compile runs in one test; hard to debug 2024-09-20 20:34:35 -04:00
Wilson Snyder 80cba789f4 Internals: Remove V3LinkParse's need of class links. No functional change intended. 2024-09-20 18:26:23 -04:00
Wilson Snyder 92dd8ee8f5 Fix timing mode not exiting on empty events (#5472). 2024-09-20 17:46:27 -04:00
Todd Strader 1665d15d4d Fix user-type parameter overlap (#5469) 2024-09-20 14:29:31 -04:00
Wilson Snyder f0fb0b05ff Internals: Misc V3Param cleanups. 2024-09-20 08:59:10 -04:00
Wilson Snyder 02e88e3848 Fix suppression of WIDTH* warnings when immediately under a size cast (#3417). 2024-09-19 22:56:47 -04:00
Wilson Snyder 87eef36b1c Tests: Fix driver race sometimes missing final log data 2024-09-19 22:49:40 -04:00
Wilson Snyder 579257bc42 Tests: Fix driver not accepting debug pass-down flags to Verilator, broke earlier commit. 2024-09-19 22:08:40 -04:00
Wilson Snyder e2041f7450 Commentary: Changes update 2024-09-19 20:29:39 -04:00
Yilou Wang 70112438c3 Support packed/unpacked and dynamic array unconstrained randomization (#5414) (#5415) 2024-09-19 20:07:05 -04:00
Wilson Snyder 175e1dde73 Tests: Run t_hier_block_cmake.py first so finishes 2024-09-19 19:33:43 -04:00
Wilson Snyder e990415ee0 Tests: Improve driver performance with forkserver 2024-09-19 19:28:07 -04:00
Wilson Snyder 1543b202b2 Tests: Move per-command expect= to instead check logfiles 2024-09-19 18:53:22 -04:00
Wilson Snyder f63168a5b5 CI: More parallelism 2024-09-19 18:51:33 -04:00
Wilson Snyder 49bccb5f1b Commentary 2024-09-19 17:58:37 -04:00
Wilson Snyder c7e1358bb7 Tests: Fix --gdb with one test (#5466) 2024-09-19 17:06:32 -04:00
Geza Lore 62a58f420c Fix latest pylint issues (#5465) 2024-09-19 15:51:13 +01:00
Arkadiusz Kozdra dd95e033e7 Support inside array constraints (#5448)
Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-09-19 07:27:59 -04:00
Wilson Snyder 371a4055b0 Fix false LIFETIME warning on repeat in fork-join (#5456). 2024-09-18 21:20:17 -04:00
Wilson Snyder f251f7b774 Tests: CONSTRIAINTIGN, ZERODLY no longer need suppression on UVM 2024-09-17 21:21:08 -04:00
Wilson Snyder 0f3e0de891 Commentary 2024-09-17 20:58:14 -04:00
Wilson Snyder 7081ea0ede Support as a task call 2024-09-17 20:53:08 -04:00
Wilson Snyder fb04765c0e Fix class reference with pin that is a class reference (#5454). 2024-09-17 17:38:18 -04:00
Wilson Snyder b8bda729d4 Tests: Fix debug message 2024-09-16 20:29:23 -04:00
Wilson Snyder 195a665293 Internals: Fix V3LinkDot debug message print 2024-09-15 21:18:51 -04:00
Wilson Snyder c8de3630a5 Tests: Fix driver error report, and passing --dumpi-tree 2024-09-15 21:10:44 -04:00
Wilson Snyder 99a29acca0 CI: One-time yamlfix cleanups. No functional change intended. 2024-09-15 14:37:09 -04:00
Wilson Snyder 48a607cc78 Internals: Cleanup Makefile.in to commented sections. No functional change intended. 2024-09-15 13:55:43 -04:00
Wilson Snyder 19170badd3 Fix warning IEEE reference (#5453) 2024-09-15 11:05:48 -04:00
Wilson Snyder 77fc771ed0 Tests: Fix missing stdout on execute() 2024-09-14 18:01:49 -04:00
github action 9b9a554489 Apply 'make format' 2024-09-14 00:46:48 +00:00
Wilson Snyder 0fe8c73d19 Fix $fatal to not be affected by +verilator+error+limit (#5135). 2024-09-13 20:45:44 -04:00
Wilson Snyder eb66e137db Fix fault on defparam with UNSUPPORTED ignored (#5450). 2024-09-13 18:31:55 -04:00
Wilson Snyder c2b82c293f Tests: Fix driver creating .out with --gold 2024-09-13 18:31:35 -04:00
Arkadiusz Kozdra 0b7510befa Support basic dist constraints (#5431) 2024-09-12 05:20:36 -07:00
Arkadiusz Kozdra 140eb0a6e5 Re-sync parser on endclass
Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-09-11 15:57:45 +02:00
Arkadiusz Kozdra 6b8f253ecd Re-sync parser in constraints and cross coverpoints
Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-09-11 15:57:45 +02:00
Arkadiusz Kozdra ac29393ec9 Do not parse covergroup identifiers as types
Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-09-11 15:57:45 +02:00
Wilson Snyder 22d6bb8180 Fix display with multiple string formats (#5311). 2024-09-11 08:41:11 -04:00
Wilson Snyder f4e4602dcb Tests: Fix driver handling of interrupts 2024-09-10 20:29:26 -04:00
Wilson Snyder 521c5c2f75 Fix extra events in traces (#5405). 2024-09-10 19:14:52 -04:00
Wilson Snyder 3525484730 Commentary 2024-09-10 19:04:55 -04:00
Arkadiusz Kozdra 4a58997604 Support basic constrained queue randomization (#5413)
Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-09-10 09:33:14 -04:00
Arkadiusz Kozdra ef259f63ca Fix randomize treated as std::randomize in classes (#5436) 2024-09-10 09:10:36 -04:00
Arkadiusz Kozdra 2f690c0530 Fix foreach colliding index names (#5444)
Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-09-10 07:17:21 -04:00
Wilson Snyder 283a5edbdb Tests: Make GCOV_PREFIX path directories 2024-09-09 21:47:47 -04:00
Wilson Snyder e566b5a4f5 Change .vlt config files to be read before .v files (#5185). 2024-09-09 20:18:54 -04:00
Wilson Snyder 4e4fdd3b66 Fix multidimensional function return value selects (#5382). 2024-09-09 19:56:09 -04:00
Wilson Snyder 434896d50c Tests: test class IGNOREDRETURN. 2024-09-09 19:48:15 -04:00
Andrew Nolte 1e7611edea Change to use maximum for cover point aggregation (#5402) 2024-09-09 14:20:18 -04:00
Geza Lore 2890126110 Remove out of range Sel in V3Unknown (#5443)
Fixes #5393
2024-09-09 14:09:29 +01:00
Wilson Snyder 07bb8c701d Convert test driver to Python (#5427) 2024-09-08 13:00:03 -04:00
Wilson Snyder 55ae48ac13 Commentary 2024-09-08 11:11:20 -04:00
Wilson Snyder c83ee391bb Fix associative array next/prev/first/last mis-propagating constants (#5435). 2024-09-07 15:25:35 -04:00
Wilson Snyder d01b917062 Commentary: Changes update 2024-09-07 15:24:06 -04:00
Wilson Snyder b21117091b CI: Add Ubuntu 24.04 GCC; combine reloc with GCC-10 runs 2024-09-07 13:43:47 -04:00
Wilson Snyder 3a73d83741 Tests: Fix clang 18 warning 2024-09-07 10:20:59 -04:00
Wilson Snyder 9643232d36 CI: Add Ubuntu 24.04 script (not enabled yet) 2024-09-07 10:12:35 -04:00
Wilson Snyder 7b41d2046d Fix GTKWave clang 18 warning 2024-09-07 10:12:09 -04:00
Wilson Snyder 7eb1b6c32b Tests: Fix GCC 13.2.0 issues. No functional change. 2024-09-06 22:04:49 -04:00
Andrew Nolte 083fb7e9c2 Add partial coverage symbol and branch data in lcov info files (#5388) 2024-09-06 18:15:18 -04:00
Krzysztof Bieganski afb8428db4 Support IEEE-compliant intra-assign delays (#3711) (#5441) 2024-09-06 18:13:52 -04:00
Bartłomiej Chmiel d6923c8571 Improve performance of V3VariableOrder with parallelization (#5406) 2024-09-06 08:04:26 -04:00
Wilson Snyder 1c38744fd1 Tests: Fix requiring core dump 2024-09-04 20:10:05 -04:00
Krzysztof Bieganski 51691dfde5 Fix driving clocking block in Reactive
Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-09-04 07:57:51 -04:00
Arkadiusz Kozdra 409efa1249 Internals: Factor out creating clocking event. No functional change.
Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-09-04 07:57:51 -04:00
Wilson Snyder e4ff0909dc Tests: Misc test cleanups from Python branch. 2024-09-03 21:42:06 -04:00
Wilson Snyder d3670b6890 Test: Remove old test 2024-09-03 21:32:09 -04:00
Wilson Snyder 7a74ddc1af Internals: Fix some getter/setter ordering. No functional change intended. 2024-09-02 18:48:49 -04:00
Wilson Snyder 551862a55e Tests: Move some misplaced files. No functional change. 2024-09-02 15:50:40 -04:00
Arkadiusz Kozdra d3fcec3e84 Fix clearing trigger of events with no sentrees (#5426)
Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-09-02 18:19:49 +02:00
Krzysztof Bieganski 088862d449 Support appending to queue via [] (#5421) 2024-09-02 09:45:47 -04:00
github action e9f758ce67 Apply 'make format' 2024-09-02 01:13:41 +00:00
Wilson Snyder b698bfd850 Tests: Untabify some tests. 2024-09-01 21:12:37 -04:00
Wilson Snyder c9970ff822 Tests: Fix --verbose broken display 2024-09-01 21:01:07 -04:00
Wilson Snyder df594ee430 Tests: Fix ll scan test. 2024-09-01 20:59:42 -04:00
Todd Strader 201e343795 Fix sformatf internal error on initial automatics (#5423) 2024-08-30 19:35:47 -04:00
Wilson Snyder 9a307c4abd Tests: Cleanup trace_filename use. No test functionality change. 2024-08-30 18:34:42 -04:00
Krzysztof Bieganski 657d7f257b Support named event locals (#5422)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-08-30 17:10:47 +02:00
Wilson Snyder 0ec5e02ce1 Improve hex too many digits error (#5419). 2024-08-30 07:48:00 -04:00
Wilson Snyder cdfb2221bb Tests: Remove ancient GCC 4.4 skip. 2024-08-29 19:25:22 -04:00
Krzysztof Bieganski f133a2811f Fix capturing params in randomize() with (#5416) (#5418)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-08-29 23:02:21 +02:00
Krzysztof Bieganski aecf38e3ad Fix V3Randomize compile error on old GCC (#5403) (#5417).
No functional change intended.
2024-08-29 10:39:54 -04:00
Wilson Snyder fa32d10f39 Fix performance of V3Trace when many activity blocks (#5372). 2024-08-28 20:45:51 -04:00
Wilson Snyder f4fe89a8c4 Commentary: Changes update 2024-08-28 17:32:57 -04:00
Krzysztof Bieganski 675d9a641e Call pre/post_randomize on randomize() with (#5412)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-08-28 19:42:49 +02:00
Krzysztof Bieganski d896f1ff08 Fix queue [$-i] select as reference argument (#5411)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-08-28 17:29:12 +02:00
Arkadiusz Kozdra 5cb6f370e9 Internals: Emit rand constraint right away. No functional change intended. (#5409)
This change gets rid of most of the shared pointers and useless memory
allocations.  Also takes advantage of higher-arity bvxor/concat to
reduce amount of data sent to the solver.

Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-08-28 16:11:39 +02:00
Kaleb Barrett e04ef5d83a Add method to check if there are VPI callbacks of the given type (#5399) 2024-08-27 17:36:51 -04:00
Krzysztof Bieganski 155dcc5658 Fix empty foreach in if in constraints (#5408)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-08-27 15:39:36 +02:00
Wilson Snyder e927536099 Reduce --debugi 2 verbosity 2024-08-27 07:28:27 -04:00
Krzysztof Bieganski f623db7d68 Normalize types in constraints (#5407)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-08-27 12:53:44 +02:00
Wilson Snyder d40f7f5167 Tests: Fix lint-py (last commit) 2024-08-27 05:31:40 -04:00
Wilson Snyder 34bb013941 Tests: Fix broken t_proc.pl, and misc cleanups. 2024-08-26 21:53:36 -04:00
Wilson Snyder ae35be9102 Internals: Reformat with new settings (last commit). No functional change. 2024-08-26 21:53:36 -04:00
Wilson Snyder bde4097df2 Internals: Add .style.yapf 2024-08-26 21:53:36 -04:00
Wilson Snyder 17b70788df Internals: Run yapf3 in parallel 2024-08-26 21:53:36 -04:00
Krzysztof Bieganski b1927e4fb5 Fix infinite recursion due to recursive functions/tasks (#5398) 2024-08-26 12:18:52 -04:00
Yilou Wang c4cb26fa9a Support unconstrained randomization for unions (#5395) (#5396) 2024-08-26 11:04:45 -04:00
Wilson Snyder 4e86e60491 Tests: Use only case-sensitve non-extended regexps 2024-08-26 08:14:39 -04:00
Wilson Snyder d3e07b6ad9 Internals: Always use parallel for make -j 4 clang-format yapf format-pl-exec
make[1]: Entering directory '/svaha/wsnyder/SandBox/homecvs/v4/verilator'
yapf3 -i bin/verilator_ccache_report bin/verilator_difftree 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/cppcheck_filtered src/flexfix src/vlcovgen src/.gdbinit.py test_regress/t/*.pf nodist/clang_check_attributes nodist/code_coverage nodist/dot_importer nodist/fuzzer/actual_fail nodist/fuzzer/generate_dictionary nodist/install_test nodist/log_changes  nodist/code_coverage.dat
chmod a+x test_regress/t/*.pl
clang-format-14 -i ./include/verilated.cpp ./include/verilated_cov.cpp ./include/verilated_dpi.cpp ./include/verilated_fst_c.cpp ./include/verilated_fst_sc.cpp ./include/verilated_probdist.cpp ./include/verilated_profiler.cpp ./include/verilated_random.cpp ./include/verilated_save.cpp ./include/verilated_threads.cpp ./include/verilated_timing.cpp ./include/verilated_vcd_c.cpp ./include/verilated_vcd_sc.cpp ./include/verilated_vpi.cpp ./examples/make_hello_c/sim_main.cpp ./examples/make_hello_sc/sc_main.cpp ./examples/make_protect_lib/sim_main.cpp ./examples/make_tracing_c/sim_main.cpp ./examples/make_tracing_sc/sc_main.cpp ./src/VlcMain.cpp ./src/VlcTop.cpp ./src/V3Active.cpp ./src/V3ActiveTop.cpp ./src/V3Assert.cpp ./src/V3AssertPre.cpp ./src/V3Ast.cpp ./src/V3AstNodes.cpp ./src/V3Begin.cpp ./src/V3Branch.cpp ./src/V3Broken.cpp ./src/V3CCtors.cpp ./src/V3CUse.cpp ./src/V3Case.cpp ./src/V3Cast.cpp ./src/V3Class.cpp ./src/V3Clean.cpp ./src/V3Clock.cpp ./src/V3Combine.cpp ./src/V3Common.cpp ./src/V3Config.cpp ./src/V3Const.cpp ./src/V3Coverage.cpp ./src/V3CoverageJoin.cpp ./src/V3Dead.cpp ./src/V3Delayed.cpp ./src/V3Depth.cpp ./src/V3DepthBlock.cpp ./src/V3Descope.cpp ./src/V3Dfg.cpp ./src/V3DfgAstToDfg.cpp ./src/V3DfgCache.cpp ./src/V3DfgDecomposition.cpp ./src/V3DfgDfgToAst.cpp ./src/V3DfgOptimizer.cpp ./src/V3DfgPasses.cpp ./src/V3DfgPeephole.cpp ./src/V3DfgRegularize.cpp ./src/V3DupFinder.cpp ./src/Verilator.cpp ./src/V3EmitCBase.cpp ./src/V3EmitCConstPool.cpp ./src/V3EmitCFunc.cpp ./src/V3EmitCHeaders.cpp ./src/V3EmitCImp.cpp ./src/V3EmitCInlines.cpp ./src/V3EmitCMain.cpp ./src/V3EmitCMake.cpp ./src/V3EmitCModel.cpp ./src/V3EmitCPch.cpp ./src/V3EmitCSyms.cpp ./src/V3EmitMk.cpp ./src/V3EmitV.cpp ./src/V3EmitXml.cpp ./src/V3Error.cpp ./src/V3ExecGraph.cpp ./src/V3Expand.cpp ./src/V3File.cpp ./src/V3FileLine.cpp ./src/V3Force.cpp ./src/V3Fork.cpp ./src/V3Gate.cpp ./src/V3Global.cpp ./src/V3Graph.cpp ./src/V3GraphAcyc.cpp ./src/V3GraphAlg.cpp ./src/V3GraphPathChecker.cpp ./src/V3GraphTest.cpp ./src/V3Hash.cpp ./src/V3Hasher.cpp ./src/V3HierBlock.cpp ./src/V3Inline.cpp ./src/V3Inst.cpp ./src/V3InstrCount.cpp ./src/V3Interface.cpp ./src/V3Param.cpp ./src/V3ParseGrammar.cpp ./src/V3ParseImp.cpp ./src/V3ParseLex.cpp ./src/V3PreProc.cpp ./src/V3PreShell.cpp ./src/V3Premit.cpp ./src/V3ProtectLib.cpp ./src/V3Randomize.cpp ./src/V3Reloop.cpp ./src/V3Sampled.cpp ./src/V3Sched.cpp ./src/V3SchedAcyclic.cpp ./src/V3SchedPartition.cpp ./src/V3SchedReplicate.cpp ./src/V3SchedTiming.cpp ./src/V3SchedVirtIface.cpp ./src/V3Scope.cpp ./src/V3Scoreboard.cpp ./src/V3Slice.cpp ./src/V3Split.cpp ./src/V3SplitAs.cpp ./src/V3SplitVar.cpp ./src/V3StackCount.cpp ./src/V3Stats.cpp ./src/V3StatsReport.cpp ./src/V3String.cpp ./src/V3Subst.cpp ./src/V3TSP.cpp ./src/V3Table.cpp ./src/V3Task.cpp ./src/V3ThreadPool.cpp ./src/V3Timing.cpp ./src/V3Trace.cpp ./src/V3TraceDecl.cpp ./src/V3Tristate.cpp ./src/V3Undriven.cpp ./src/V3Unknown.cpp ./src/V3Unroll.cpp ./src/V3VariableOrder.cpp ./src/V3Waiver.cpp ./src/V3Width.cpp ./src/V3WidthCommit.cpp ./src/V3WidthSel.cpp ./src/V3Life.cpp ./src/V3LifePost.cpp ./src/V3LinkCells.cpp ./src/V3LinkDot.cpp ./src/V3LinkInc.cpp ./src/V3LinkJump.cpp ./src/V3LinkLValue.cpp ./src/V3LinkLevel.cpp ./src/V3LinkParse.cpp ./src/V3LinkResolve.cpp ./src/V3Localize.cpp ./src/V3MergeCond.cpp ./src/V3Name.cpp ./src/V3Number.cpp ./src/V3OptionParser.cpp ./src/V3Options.cpp ./src/V3Order.cpp ./src/V3OrderGraphBuilder.cpp ./src/V3OrderMoveGraph.cpp ./src/V3OrderParallel.cpp ./src/V3OrderProcessDomains.cpp ./src/V3OrderSerial.cpp ./src/V3Os.cpp ./src/V3Param.cpp ./src/V3ParseGrammar.cpp ./src/V3ParseImp.cpp ./src/V3ParseLex.cpp ./src/V3PreProc.cpp ./src/V3PreShell.cpp ./src/V3Premit.cpp ./src/V3ProtectLib.cpp ./src/V3Randomize.cpp ./src/V3Reloop.cpp ./src/V3Sampled.cpp ./src/V3Sched.cpp ./src/V3SchedAcyclic.cpp ./src/V3SchedPartition.cpp ./src/V3SchedReplicate.cpp ./src/V3SchedTiming.cpp ./src/V3SchedVirtIface.cpp ./src/V3Scope.cpp ./src/V3Scoreboard.cpp ./src/V3Slice.cpp ./src/V3Split.cpp ./src/V3SplitAs.cpp ./src/V3SplitVar.cpp ./src/V3StackCount.cpp ./src/V3Stats.cpp ./src/V3StatsReport.cpp ./src/V3String.cpp ./src/V3Subst.cpp ./src/V3TSP.cpp ./src/V3Table.cpp ./src/V3Task.cpp ./src/V3ThreadPool.cpp ./src/V3Timing.cpp ./src/V3Trace.cpp ./src/V3TraceDecl.cpp ./src/V3Tristate.cpp ./src/V3Undriven.cpp ./src/V3Unknown.cpp ./src/V3Unroll.cpp ./src/V3VariableOrder.cpp ./src/V3Waiver.cpp ./src/V3Width.cpp ./src/V3WidthCommit.cpp ./src/V3WidthSel.cpp ./include/verilated.h ./include/verilated_config.h ./include/verilated_cov.h ./include/verilated_cov_key.h ./include/verilated_dpi.h ./include/verilated_fst_c.h ./include/verilated_fst_sc.h ./include/verilated_funcs.h ./include/verilated_imp.h ./include/verilated_intrinsics.h ./include/verilated_profiler.h ./include/verilated_random.h ./include/verilated_save.h ./include/verilated_sc.h ./include/verilated_sc_trace.h ./include/verilated_sym_props.h ./include/verilated_syms.h ./include/verilated_threads.h ./include/verilated_timing.h ./include/verilated_trace.h ./include/verilated_trace_imp.h ./include/verilated_types.h ./include/verilated_vcd_c.h ./include/verilated_vcd_sc.h ./include/verilated_vpi.h ./include/verilatedos.h ./include/verilatedos_c.h ./src/V3Active.h ./src/V3ActiveTop.h ./src/V3Assert.h ./src/V3AssertPre.h ./src/V3Ast.h ./src/V3AstInlines.h ./src/V3AstNodeDType.h ./src/V3AstNodeExpr.h ./src/V3AstNodeOther.h ./src/V3AstUserAllocator.h ./src/V3Begin.h ./src/V3Branch.h ./src/V3Broken.h ./src/V3CCtors.h ./src/V3CUse.h ./src/V3Case.h ./src/V3Cast.h ./src/V3Class.h ./src/V3Clean.h ./src/V3Clock.h ./src/V3Combine.h ./src/V3Common.h ./src/V3Config.h ./src/V3Const.h ./src/V3Coverage.h ./src/V3CoverageJoin.h ./src/V3Dead.h ./src/V3Delayed.h ./src/V3Depth.h ./src/V3DepthBlock.h ./src/V3Descope.h ./src/V3Dfg.h ./src/V3DfgCache.h ./src/V3DfgOptimizer.h ./src/V3DfgPasses.h ./src/V3DfgPatternStats.h ./src/V3DfgPeephole.h ./src/V3DfgVertices.h ./src/V3DupFinder.h ./src/V3EmitC.h ./src/V3EmitCBase.h ./src/V3EmitCConstInit.h ./src/V3EmitCFunc.h ./src/V3EmitCMain.h ./src/V3EmitCMake.h ./src/V3EmitMk.h ./src/V3EmitV.h ./src/V3EmitXml.h ./src/V3Error.h ./src/V3ExecGraph.h ./src/V3Expand.h ./src/V3File.h ./src/V3FileLine.h ./src/V3Force.h ./src/V3Fork.h ./src/V3FunctionTraits.h ./src/V3Gate.h ./src/V3Global.h ./src/V3Graph.h ./src/V3GraphAlg.h ./src/V3GraphPathChecker.h ./src/V3GraphStream.h ./src/V3Hash.h ./src/V3Hasher.h ./src/V3HierBlock.h ./src/V3Inline.h ./src/V3Inst.h ./src/V3InstrCount.h ./src/V3Interface.h ./src/V3LangCode.h ./src/V3LanguageWords.h ./src/V3Life.h ./src/V3LifePost.h ./src/V3LinkCells.h ./src/V3LinkDot.h ./src/V3LinkInc.h ./src/V3LinkJump.h ./src/V3LinkLValue.h ./src/V3LinkLevel.h ./src/V3LinkParse.h ./src/V3LinkResolve.h ./src/V3List.h ./src/V3Localize.h ./src/V3MemberMap.h ./src/V3MergeCond.h ./src/V3Mutex.h ./src/V3Name.h ./src/V3Number.h ./src/V3OptionParser.h ./src/V3Options.h ./src/V3Order.h ./src/V3OrderCFuncEmitter.h ./src/V3OrderGraph.h ./src/V3OrderInternal.h ./src/V3OrderMoveGraph.h ./src/V3Os.h ./src/V3PairingHeap.h ./src/V3Param.h ./src/V3Parse.h ./src/V3ParseImp.h ./src/V3ParseSym.h ./src/V3PchAstMT.h ./src/V3PchAstNoMT.h ./src/V3PreExpr.h ./src/V3PreLex.h ./src/V3PreProc.h ./src/V3PreShell.h ./src/V3Premit.h ./src/V3ProtectLib.h ./src/V3Randomize.h ./src/V3Reloop.h ./src/V3Rtti.h ./src/V3Sampled.h ./src/V3Sched.h ./src/V3Scope.h ./src/V3Scoreboard.h ./src/V3SenExprBuilder.h ./src/V3SenTree.h ./src/V3Simulate.h ./src/V3Slice.h ./src/V3Split.h ./src/V3SplitAs.h ./src/V3SplitVar.h ./src/V3StackCount.h ./src/V3Stats.h ./src/V3StdFuture.h ./src/V3String.h ./src/V3Subst.h ./src/V3SymTable.h ./src/V3TSP.h ./src/V3Table.h ./src/V3Task.h ./src/V3ThreadPool.h ./src/V3Timing.h ./src/V3Trace.h ./src/V3TraceDecl.h ./src/V3Tristate.h ./src/V3Undriven.h ./src/V3UniqueNames.h ./src/V3Unknown.h ./src/V3Unroll.h ./src/V3VariableOrder.h ./src/V3Waiver.h ./src/V3Width.h ./src/V3WidthCommit.h ./src/V3WidthRemove.h ./src/VlcBucket.h ./src/VlcOptions.h ./src/VlcPoint.h ./src/VlcSource.h ./src/VlcTest.h ./src/VlcTop.h ./src/config_build.h ./src/config_package.h ./src/config_rev.h ./src/verilog.y ./src/V3PreLex.l ./src/verilog.l test_regress/t/*.c* test_regress/t/*.h
make[1]: Leaving directory '/svaha/wsnyder/SandBox/homecvs/v4/verilator'
2024-08-26 05:01:37 -04:00
Wilson Snyder fa4af38b0a configure: Print inbound CXX setting 2024-08-26 04:58:59 -04:00
Wilson Snyder a9635aaa2c Tests: Default to check_finished=>1 2024-08-24 19:27:59 -04:00
Wilson Snyder f0cd6dd95c Fix REALCVT warning on integral timescale conversions (#5378). 2024-08-24 08:01:28 -04:00
Wilson Snyder d8fdfa6be2 Internals: git ignore nohup.out 2024-08-24 07:56:48 -04:00
Wilson Snyder f9511e9755 Internals: Make V3Number::selfTest() 2024-08-24 05:41:22 -04:00
Wilson Snyder cfe1f23fff Commentary: Changes update 2024-08-23 18:45:54 -04:00
Wilson Snyder 8741fd17ad Internals: cppcheck cleanups. No functional change intended. 2024-08-23 18:24:34 -04:00
ffe76717c6 Thread pool rewrite (#5161)
Signed-off-by: Krzysztof Bieganski <[email protected]>
Signed-off-by: Bartłomiej Chmiel <[email protected]>
Signed-off-by: Arkadiusz Kozdra <[email protected]>
Co-authored-by: Krzysztof Bieganski <[email protected]>
Co-authored-by: Arkadiusz Kozdra <[email protected]>
Co-authored-by: Wilson Snyder <[email protected]>
2024-08-23 08:36:49 -04:00
Krzysztof Bieganski eb8bbcda05 Internals: Simplify CaptureVisitor in V3Randomize (#5397) 2024-08-23 07:57:57 -04:00
Arkadiusz Kozdra ed7040adc0 Fix dot fallback finding wrong symbols (#5394) 2024-08-22 15:49:08 -04:00
Wilson Snyder 48776277bd devel release 2024-08-21 08:55:53 -04:00
Wilson Snyder 8ca45df9c7 Version bump 2024-08-21 08:40:24 -04:00
Wilson Snyder 8db9c1d227 Commentary: Changes update 2024-08-21 08:40:14 -04:00
Krzysztof Bieganski 930f35acc9 Support constraint_mode (#5338) 2024-08-21 06:16:44 -04:00
Krzysztof Bieganski 13e0fc7c27 Fix virtual interface null checks (#5391) 2024-08-21 05:40:52 -04:00
Bartłomiej Chmiel a730daabef Support 'parameter type' in hierarchical blocks (#5309) (#5333) 2024-08-21 05:30:59 -04:00
Andrew Nolte 3c28b72897 Tests: Add info files to golden (#5390) 2024-08-21 06:44:02 +03:00
Wilson Snyder 05e5f1955e Update include/gtkwave from upstream 2024-08-20 15:23:53 -04:00
Wilson Snyder 378800ee4a Commentary: Changes update 2024-08-20 15:13:44 -04:00
Wilson Snyder 43a57da950 Add quotes to not-found filenames 2024-08-20 14:47:43 -04:00
James BaileyandJames Bailey 99a43b7695 Fix +: and -: unpacked array slicing when array has nonzero low index (#5345) (#5387)
Co-authored-by: James Bailey <[email protected]>
2024-08-20 14:20:48 -04:00
Krzysztof Bieganski 59d2eea302 Fix capturing fields from superclass in randomize() with (#5389)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-08-20 13:25:58 -04:00
Kaleb Barrett 6f3f64e63f Add --timing flag as Verilated cc define (#5383) 2024-08-18 20:02:54 +03:00
Drew Ranck 48c71ef76c Support default value on module input (#5358) (#5373) 2024-08-15 10:04:07 -04:00
Ryszard Rozak 563faeb33f Internals: Fix removing nodes in V3Life (#5365) 2024-08-14 09:23:24 +02:00
Wilson Snyder 9c5c77c69c Favor use of more general idAny in parser 2024-08-13 15:25:07 -04:00
Wilson Snyder 4573e04488 Fix segfault after unsupported member call (#5359). 2024-08-13 14:39:37 -04:00
Krzysztof Bieganski 6cb0a41857 Support inline random variable control (#5317)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-08-13 14:20:31 -04:00
Geza Lore 124e3463fc Fix cache config file resolution performance (#5369)
V3ConfigWildcardResolver::resolve used to only cache the result of a
name lookup if there were any directives applied to the queried name.

This can be a performance problem. E.g. the module resolver is invoked
for every variable to check for attributes. If you had 'n' variables in
the design, and you also had 'k' directives that apply to specific
modules not involving most of the 'n' variables, then checking the
attributes involved O(n*k) operations. This can be very expensive
for large 'n' and 'k'.

In this patch we resolve every name exactly once, so the same above is
now O(n) in the worst case, and often a lot smaller due to repeat
lookups.
2024-08-13 19:52:23 +02:00
Ethan Sifferman 1b15509a9c Fix lint_off on Errors (#5351) (#5363) 2024-08-11 21:04:46 +02:00
Wilson Snyder eb3f10399a Internal: Rename tokenPipeScanTypeEq. No functional change. 2024-08-11 12:15:20 -04:00
Wilson Snyder 4660806c8f Internals: Remove wrong = new grammar rule. 2024-08-11 11:03:28 -04:00
Wilson Snyder 6f5d1037b4 Commentary 2024-08-11 10:33:04 -04:00
Wilson Snyder 24b097b228 Improve new class error (#5359) 2024-08-11 10:09:05 -04:00
Wilson Snyder a0ea96b355 Favor use of more general idAny in parser 2024-08-09 18:00:36 -04:00
Wilson Snyder a663da7393 Internals: Split idType from simple_type. No functional change intended 2024-08-09 17:45:54 -04:00
Tim Hutt c812a9b18f Fix shortened module names when searching for files (#5196) (#5246) 2024-08-09 17:23:00 -04:00
Arkadiusz Kozdra 367249ec84 Add parsing but otherwise ignore std::randomize (#5354) 2024-08-09 17:21:32 -04:00
Wilson Snyder f4acc59b82 Tests: Check for wrong quotes in docs (#5355) 2024-08-09 17:18:59 -04:00
Luca Colagrande d1da1664f0 Docs: Fix typos in :vlopt: command usage in docs (#5355) (#5356) 2024-08-09 14:17:36 +01:00
Krzysztof Bieganski b100615726 Internals: Relax requirements for AstClass iteration methods (#5335)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-08-09 10:05:52 +01:00
Krzysztof Bieganski ec0815e9ac Fix NBAs in suspendables (#5348)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-08-08 22:12:00 +01:00
Krzysztof Bieganski 97e9996f0b Fix optimized-out sentrees with --timing (#5080) (#5349)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-08-08 21:57:12 +01:00
Krzysztof Bieganski b7af859ba3 Fix forks capturing non-input ports in tasks (#5237) (#5343)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-08-08 21:55:46 +01:00
Krzysztof Bieganski 701fa5438a Fix output clockvar overwriting signal (#5320) (#5347)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-08-08 21:48:25 +01:00
Geza Lore 004865a8b2 Fix tracing_{on,off} in the presence of non-inlined modules (#5346)
Previously "*.foo.*" failed to match non-inlined instances called 'foo'.
2024-08-08 17:16:54 +01:00
Arkadiusz Kozdra 3e5859e5da Support constraining AstSel (#5344)
Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-08-08 15:37:08 +01:00
Arkadiusz Kozdra 78555b683c Fix missing type coercion in 'inside {array}' (#5340) 2024-08-08 03:46:41 -04:00
Wilson Snyder c2e44dbd99 Fix $sformat with array arguments (#5330). 2024-08-08 03:32:07 -04:00
Wilson Snyder 18fc3e6089 Internals: Favor idAny in typedefs. 2024-08-07 18:45:53 -04:00
Wilson Snyder f4f8ea0dcf Internals: Change cast fileline to point to cast operator 2024-08-07 18:45:53 -04:00
Arkadiusz Kozdra f78c4e8490 Fix compilation error on unreachable disable fork / wait fork (#5339)
Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-08-07 18:44:02 -04:00
Arkadiusz Kozdra e6fe367bdb Support streams to/from arrays of wide data (#5334) 2024-08-06 16:18:16 +01:00
Ryszard Rozak 3426ee5170 Fix purity of functions with AstJumpBlock or AstStmtExpr (#5332) 2024-08-06 16:07:38 +01:00
Arkadiusz Kozdra a32b8d80f9 Support streaming operator on arrays and wide data (#5326)
Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-08-06 08:48:46 -04:00
Bartłomiej Chmiel 3b81654c72 Fix -Wunused-but-set-variable clang warning (#5331)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
2024-08-06 08:48:12 -04:00
Wilson Snyder 6abd556f5a Tests: Fix GCC 11.4.0 hang 2024-08-06 08:47:28 -04:00
Varun Koyyalagunta 31c1df638b Fix assert on wide expression (#5319) (#5324) 2024-08-06 01:45:57 -04:00
Krzysztof Bieganski f4cb2c8cf2 Add more rand_mode unsupported errors (#5329)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-08-05 17:56:03 -04:00
Bartłomiej Chmiel 7d5e19365e Support assertcontrol directive type (#5310)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
2024-08-05 17:54:13 -04:00
Wilson Snyder 6fa1ade4e0 Commentary: Changes update 2024-08-05 04:03:21 -04:00
Bartłomiej Chmiel 99c619a4c9 Error on static variable initializers using automatic variables in procedures (#5296) 2024-08-05 08:39:43 +01:00
Krzysztof Bieganski 37a4002098 Fix stringify in nested preprocessor macros (#5323) 2024-08-02 11:46:02 -04:00
Krzysztof Boroński 45ee949cc4 Internals: Disambiguate variable references under with clauses of randomize() methods (#5277) 2024-08-02 11:45:17 -04:00
Arkadiusz Kozdra 54f9f4b6a9 Support foreach constraints (#5302)
Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-08-02 10:03:55 -04:00
Arkadiusz Kozdra a61178bd89 Internals: Convert foreach loops in V3Begin as well as V3Width (#5283) 2024-08-02 08:29:05 -04:00
Krzysztof Bieganski 2f5c58b345 Support rand_mode (#5273)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-07-31 22:30:48 +01:00
Wilson Snyder 403a197e23 Python lint fix 2024-07-28 14:57:29 -04:00
Wilson Snyder 3a659d460d Fix ==? and !=? with X values. 2024-07-28 14:40:55 -04:00
Wilson Snyder 8707c88787 Tests: Close misc internal code coverage holes 2024-07-28 14:18:24 -04:00
github action 167cba723e Apply 'make format' 2024-07-28 17:59:13 +00:00
Wilson Snyder 7f40dd8b5b CI: Fix codecov upload 2024-07-28 13:58:26 -04:00
Wilson Snyder 1609c23fea Fix cputime being zero 2024-07-28 13:14:10 -04:00
Wilson Snyder 216fc8a212 CI: Fix codecov upload 2024-07-27 07:18:50 -04:00
Wilson Snyder 5136ea1082 CI: Fix codecov upload 2024-07-27 07:02:18 -04:00
Wilson Snyder 5b931faf2b CI: Fix codecov upload 2024-07-27 06:31:20 -04:00
Wilson Snyder a2496e041e CI: Change to action-based codecov upload 2024-07-26 14:07:53 -04:00
Wilson Snyder fab268f772 CI: Change to action-based codecov upload 2024-07-26 10:39:08 -04:00
Wilson Snyder 550d47b7f4 CI: Change to action-based codecov upload 2024-07-26 10:27:00 -04:00
Markus Krause a01a21db86 Fix make flows to pass PYTHON3 (like perl) (#5307) (#5308)
Fixes #5307
2024-07-26 09:35:37 -04:00
Wilson Snyder 2082f1aa9e Internals: Update fastcov.py from upstream 2024-07-26 08:48:12 -04:00
Wilson Snyder 50a5a1ff5b Tests: Fix some verilog.y parser coverage holes 2024-07-26 07:29:15 -04:00
Arkadiusz Kozdra 1600cc01a4 Internals: clean up begin blocks and lifetimes in foreach loops (#5306)
According to IEEE 1800-2023 12.7.3, the loop creates an implicit block
around it, containing declarations of the loop variables with automatic
lifetime.

No functional change intended.

Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-07-26 05:50:29 -04:00
Ryszard Rozak b9e1d55262 Fix handling of rand fields not referenced in constraints (#5305)
Signed-off-by: Ryszard Rozak <[email protected]>
2024-07-26 05:46:30 -04:00
Geza Lore 0d43c14b93 Internals: Remove redundant hash lookup (#5276 partial) (#5303)
Minor help for #5276
2024-07-25 16:07:58 -04:00
Ricardo Barbedo 87d1c10fa7 Fix compiler coroutine check (#5190) (#5300)
The necessary options to support C++ coroutines vary greatly between
compilers, its versions, and the standard library being used. This
patch makes the check for coroutine support more robust by adding a
declaration of a coroutine variable, instead of just including the
header. It also makes sure that the HAVE_COROUTINE and
CFG_CXXFLAGS_COROUTINES flags are always set together, and only when
coroutine support is detected.
2024-07-24 17:21:14 -04:00
Udaya Raj Subedi a2506a6f96 Fix monitor block sensitivity items (#4400) (#5294) 2024-07-24 07:18:57 -04:00
Bartłomiej Chmiel 20dba7464d Support--compiler-include headers in user-supplied cpp files (#5271)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
2024-07-24 06:40:39 -04:00
Wilson Snyder cb5d03ff0b Fix WIDTHEXPAND on left shift of intuitive amount (#5284). 2024-07-24 06:39:27 -04:00
github action 2727c33219 Apply 'make format' 2024-07-24 10:07:59 +00:00
Wilson Snyder 0419ed0430 Fix initializing static array in dynamic arrays and queues (#5287). 2024-07-24 06:06:57 -04:00
Wilson Snyder 1e3c7a5496 Fix inline function ref port persistence 2024-07-23 18:47:04 -04:00
Wilson Snyder d2dfcbca53 Internals: Add log_changes for updating Changes file 2024-07-23 18:36:57 -04:00
Wilson Snyder e779934443 Commentary: Changes update 2024-07-22 17:22:37 -04:00
Arkadiusz Kozdra a3b255b054 Internal: Suppress new clang-tidy messages (#5293)
The two most useless warning classes are llvmlibc-* on virtually every
identifier use that it does not resolve to __llvm_libc:: namespace, and
altera-* ones that warn on virtually every loop statement that it could
be unrolled with a pragma.  No functional change.

Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-07-22 13:11:50 -04:00
Krzysztof Bieganski f5caa4b7dc Fix randomizing current object with rand class instance member (#5292)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-07-22 14:41:12 +02:00
Wilson Snyder 8f4490628f Commentary: Clarify some warning messages. 2024-07-20 17:50:14 -04:00
Wilson Snyder df566bdf4d Improve PINMISSING to show related port 2024-07-20 17:37:33 -04:00
Wilson Snyder 981d3ce782 Add suggestions on misspelled PLI functions. 2024-07-20 07:20:10 -04:00
Wilson Snyder b7345eb5d5 Tests: Add checkp macro. No test functionality change. 2024-07-20 06:51:50 -04:00
Krzysztof Bieganski 2bd2b9324f Fix inline constraints creating class random generator (#5280) 2024-07-19 13:03:48 -04:00
Arkadiusz Kozdra 298faa84ee Fix elaborating foreach loops (#5285) 2024-07-19 14:56:30 +02:00
Arkadiusz Kozdra 43377ed8b0 Add support for this.randomize with (#5282)
Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-07-19 09:14:56 +02:00
Krzysztof Bieganski b18037b7e7 Internals: Move non-visit methods to the proper place (#5279) 2024-07-18 08:57:39 -04:00
Yutetsu TAKATSUKASA 095b1ccb67 Fix incorrect result of width mismatch (#5186) (#5189) 2024-07-17 11:54:58 +02:00
Krzysztof Bieganski 2a30a87580 Fix randomization when used with inheritance (#5268)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-07-17 08:21:45 +02:00
Krzysztof Bieganski e11bc6beeb Internals: Refactor function argument traits (#5269)
No functional change intended.

Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-07-16 20:55:04 +02:00
Arkadiusz Kozdra 0a9b31bb30 Add warning on dist in constraints (#5264) 2024-07-15 21:01:33 -04:00
Krzysztof Bieganski 34e37d7bd0 Keep one member map for randomize method creation (#5263)
No functional change intended.

Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-07-15 16:42:41 +02:00
Yangyu Chen 164a7a7c5d Improve emitted code to use a reference for VlSelf (#5254) 2024-07-15 09:44:01 -04:00
Krzysztof Obłonczek 67ea819d82 Fix toggle coverage aggregation on same line (#5248)
Documentation states that minimum of all reported coverage of all signals in a line should be taken.
Previous logic would break if there were any signals with zero coverage followed by signals with
nonzero coverage - a minimum from those nonzero toggle count would be taken, disregarding zero
coverage of previous signals.

Internal-tag: [#62193]

Signed-off-by: Krzysztof Obłonczek <[email protected]>
2024-07-14 17:05:58 -04:00
Andrew Nolte 60f9e21d8c Fix --x-assign to be independent from +verilator+rand+reset (#5214) 2024-07-14 17:04:00 -04:00
Wilson Snyder dc037db1cd Internals: Make upcase clean. No functional change. 2024-07-14 15:28:00 -04:00
Wilson Snyder 0658af90f5 Fix classes/modules of case-similar names (#5109). 2024-07-14 13:57:16 -04:00
Wilson Snyder 131623de34 Internals: Favor s string literals. No functional change. 2024-07-14 11:39:45 -04:00
Wilson Snyder 74ae879c2f Internals: Remove duplicate filenameNonExt. No functional change. 2024-07-14 11:31:32 -04:00
Wilson Snyder 8c3b754bac Internals: Rename some filename functions. No functional change. 2024-07-14 09:34:54 -04:00
Wilson Snyder e080f5c0cb Fix tracing with --main-top-name - (#5261). 2024-07-14 07:35:26 -04:00
Wilson Snyder 2284cf595d Commentary: Changes update 2024-07-14 07:34:36 -04:00
Wilson Snyder b1cc0c54c1 Tests: Fail with test.pl-file-needs-have_solver()-call if forget have_solver() 2024-07-13 08:55:06 -04:00
Geza Lore 4cf017d7fe Tests: Skip t_randomize_method_constraints when no solver is installed (#5260) 2024-07-13 08:31:16 -04:00
Geza Lore 25f5db4b5f DFG: Allow inlining of variabels driven from forced vars (#5259)
Not sure why this was disabled before, but it seems legal to me to
change

'forced A' -> 'B' -> 'C'

into

'forced A' -> 'B',
'forced A' -> 'C'

Fixes #5249
2024-07-13 12:35:09 +01:00
Krzysztof Boroński 3cf9606ea9 Support inline constraints for class randomization methods (#5234)
Signed-off-by: Krzysztof Boronski <[email protected]>
2024-07-12 16:18:18 +02:00
Wilson Snyder 6882f8c55e Commentary: Surfer (#5253) 2024-07-11 18:33:35 -04:00
Krzysztof Bieganski 2696a9a5bd Fix unconstrained randomization of unpacked structs (#5252)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-07-11 16:43:56 +02:00
Krzysztof Bieganski abb46c9cb2 Refactor AstMemberSel creation with AstVar (#5251)
No functional change intended.

Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-07-11 16:42:58 +02:00
Wilson Snyder bbb223f217 Fix error on empty generate with -O0 (#5250). 2024-07-11 06:59:15 -04:00
Arkadiusz Kozdra 570e1bc35a Support conditional constraints (#5245) 2024-07-10 11:30:18 -04:00
11da07d3b9 Support $assertcontrol assertion_type (#5236)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
Signed-off-by: Ryszard Rozak <[email protected]>
Co-authored-by: Ryszard Rozak <[email protected]>
Co-authored-by: Wilson Snyder <[email protected]>
2024-07-10 05:06:13 -04:00
Arkadiusz Kozdra 2cfec0ecc3 Support clocking blocks in virtual interfaces (#5235) 2024-07-09 18:31:58 -04:00
Wilson Snyder e3e7b3f2b5 Fix errors on using string in incorrect format (#5240). 2024-07-09 08:30:20 -04:00
Wilson Snyder fe0b210a0c Fix errors on using string in incorrect format (#5340). 2024-07-09 08:29:22 -04:00
Chris Bachhuber c383f4868f Commentary: Mention docker hub explicitly (#5241) 2024-07-09 06:59:43 -04:00
Wilson Snyder b66fdd7421 Fix unknown conversion on queues (#5220). 2024-07-08 10:19:51 -04:00
Wilson Snyder 83878325a7 Commentary: Update git issue templates. 2024-07-08 08:12:58 -04:00
github action 490bc63eb5 Apply 'make format' 2024-07-06 12:13:35 +00:00
Ryan Ziegler 947b6fd23f Add --emit-accessors (#5182) (#5227) 2024-07-06 13:12:53 +01:00
Wilson Snyder de44ca8df3 Fix top-level unpacked structure resets (#5221). 2024-07-05 17:22:26 -04:00
Wilson Snyder 3cee54dfdf Commentary: Changes update 2024-07-05 17:17:29 -04:00
Geza Lore dace2c0a9a Tests: Skip t_constraint_state when no solver is installed (#5224) 2024-07-04 11:42:53 +01:00
Liam Braun ca4858eb7f Fix concurrency for mailbox and semaphores (#5222) 2024-07-03 22:29:32 +01:00
Wilson SnyderandSeth Pellegrino a6d438d111 Fix mis-removing $value$plusargs calls (#5127) (#5137). [Seth Pellegrino]
Co-authored-by: Seth Pellegrino <[email protected]>
2024-07-02 18:46:58 -04:00
Bartłomiej Chmiel 955ed3f193 Fix splitting if statements with impure conditions (#5219) 2024-07-02 15:17:10 -04:00
Wilson Snyder 8bffb8c391 Fix table optimizing logic with side effect (#5137 prep) 2024-07-02 09:22:56 -04:00
Arkadiusz Kozdra 85356f464f State-dependent constraints (#5217)
Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-07-01 20:19:15 +02:00
Arkadiusz Kozdra 72993ec3dd Support cross-module clockvars access (#5184) 2024-06-30 15:19:02 -04:00
404allen404 d6a294b784 Commentary: Fix typo in for --trace-max-array and --trace-max-width options (#5205) 2024-06-27 21:25:21 -04:00
Bartłomiej Chmiel 864a852bca Add --compiler-include for additional C++ includes (#5139) (#5202) 2024-06-27 18:53:44 -04:00
Wilson Snyder b0992406aa Commentary: Changes update 2024-06-25 19:22:00 -04:00
Bartłomiej Chmiel 9e2c8aefc8 Add --pins-sc-uint-bool to force SystemC uint type (#5192) 2024-06-25 05:27:09 -04:00
Gus Smith 4c584c17e6 Add -std=gnu++20 (#5200) 2024-06-25 05:23:50 -04:00
Wilson Snyder 3315a6e431 Internals: Also cleanup gettes/setters in .cpp. No functional change intended. 2024-06-22 19:50:59 -04:00
github action ba0183131c Apply 'make format' 2024-06-22 22:58:42 +00:00
Ryan Ziegler e1580b9c3d Internals: Reorder class getters/setters (#5197). No functional change intended. 2024-06-22 18:57:54 -04:00
Tim Hutt aadd5ea509 Fix linking with pthreads on CMake (#5194) 2024-06-21 10:34:11 -04:00
Philip Axer 833df6d9ea Fix CMake installation missing verilated.mk (#5187) (#5188) 2024-06-19 08:07:17 -04:00
Wilson Snyder 607c19a67d Fix isPure to be superset of isOutputter.
This may cause some additional SIDEEFFECT warnings that previously were not shown.
2024-06-16 21:43:30 -04:00
Wilson Snyder d5cfe1a379 Fix fusing macro arguments to not ignore whitespace (#5061). 2024-06-15 09:21:21 -04:00
Wilson Snyder 6e557791c8 devel release 2024-06-15 08:49:57 -04:00
Wilson Snyder cd693ce02b Version bump 2024-06-15 08:43:45 -04:00
Wilson Snyder 2641bc98aa Update include/gtkwave from upstream 2024-06-15 08:14:43 -04:00
Wilson Snyder ad2862ce3f Fix DPI import of null C-string (#5179). 2024-06-14 22:50:54 -04:00
Bartłomiej Chmiel 4695967185 Fix signed types emitted in hierarchical Verilation (#5178)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
2024-06-14 08:07:32 -04:00
Wilson Snyder f96e99542c Internals: Fix cppcheck warnings. No functional change. 2024-06-13 21:29:03 -04:00
Wilson Snyder 7de193c2e9 Commentary: Changes update 2024-06-13 18:04:57 -04:00
Arkadiusz Kozdra 442c9bc316 Support parsing and otherwise ignoring inline constraints (#5126) 2024-06-13 08:38:20 -04:00
Arkadiusz Kozdra 3203019408 Fix coroutines without awaits to have a co_return (#4208) (#5175)
After the V3Timing refactoring the V3SchedTiming phase could apparently
move away all awaits from a coroutine without adding a co_return
statement.

Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-06-12 15:13:52 -04:00
Geza Lore bc853e260b Support StructSel in unpacked array assignments (#5176) 2024-06-12 17:07:33 +01:00
github action d6e5703298 Apply 'make format' 2024-06-12 11:44:29 +00:00
Alex Solomatnikov a9e50327fd Fix hierarchical compilation with nested -F (#5114) (#5124) 2024-06-12 07:42:52 -04:00
Wilson Snyder 6f0a36318e Tests: Fix test stability (#5167 update). 2024-06-11 20:55:01 -04:00
Wilson Snyder 221fecad0b Commentary 2024-06-11 19:47:53 -04:00
Wilson Snyder fd1e4d9e45 Add assertion on reusing VerilatedContext (#5167). 2024-06-11 19:38:58 -04:00
Wilson Snyder 920ed5ca3d Internals: Avoid unordered_map/set. No functional change intended. 2024-06-11 18:52:09 -04:00
Arthur Rosa 2537431273 Fix table optimization when applied on real data type (#5172) (#5173) 2024-06-11 13:26:11 -04:00
Bartłomiej Chmiel 13114f2efe Fix SystemC BITS_PER_DIGIT in VL_ASSIGN_SBW (#5170)
The BITS_PER_DIGIT macro value differs between SystemC versions,
thus referencing it directly is required.
2024-06-10 20:45:49 -04:00
Arkadiusz Kozdra e9f59e44a5 Fix non-constant replication in concats (#5171)
Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-06-10 11:21:43 -04:00
Arkadiusz Kozdra d4c3e35f97 Support $psprintf system function (#4314) (#5169)
`$psprintf` is a non-standard system function present in some other
simulators, and has been rejected for standardization by IEEE because
of being basically the same as `$sformatf`.

To encourage users to fix their codebase, a warning is emitted by
default, but it gets otherwise interpreted as `$sformatf` as early as
during lexing.

Signed-off-by: Arkadiusz Kozdra <[email protected]>

* wording/formatting

Signed-off-by: Arkadiusz Kozdra <[email protected]>

---------

Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-06-10 08:38:26 -04:00
Wilson Snyder 02dd33b60e Commentary: Changes update 2024-06-09 17:10:53 -04:00
Geza Lore 2bc883f3b3 Extend out-of-range select (#5159) (#5164) 2024-06-09 17:05:14 -04:00
Geza Lore 29db25b70e Reset radix in width warnings (#5166) 2024-06-09 14:39:17 +01:00
Geza Lore d6bc0c712a Disable ASLR for more tests. (#5165)
These show spurious errors with some toolchains due to an address sanitizer bug.
2024-06-09 14:32:31 +01:00
github action 962efa3691 Apply 'make format' 2024-06-09 02:45:26 +00:00
Valentin Atepalikhin 4babba16d6 Support 2D dynamic array initialization (#4700) (#5122)
* Support 2D dynamic array initialization (#4700)
- new[] on sub arrays (as per original issue)
- Built-in methods for sub-arrays
- Initialization and literals assignmensts
- Dynamic array as an element for other arrays and queues
2024-06-08 22:44:45 -04:00
Wilson Snyder 5363d89870 Tests: Disable msbuild executable running (#5163) 2024-06-08 19:37:31 -04:00
Wilson Snyder 44acb08ea9 Tests: Commentary - enable msbuild debug 2024-06-08 19:36:50 -04:00
Yutetsu TAKATSUKASA 6584b4d426 Fix assertion failure in V3Gate (#5101) 2024-06-08 08:37:01 -04:00
Paul Bowen-Huggett 9ff06c1664 Fix 'experimental/coroutine' file not found on macOS (#5030) (#5031) (#5151)
libcxx has removed the experimental/coroutine include file in favor of
the C++20-standard coroutine include. If the latter is available we
use it otherwise falling back to the existing experimental version (in
which case we also disable the deprecated-experimental-coroutine warning).

(See also https://reviews.llvm.org/D108697.)
2024-06-08 08:33:50 -04:00
github action 1537c9badc Apply 'make format' 2024-06-08 03:05:01 +00:00
Wilson Snyder 708f875b31 Fix MSVC warnings. No functional change intended. 2024-06-07 22:52:56 -04:00
Kaleb Barrett 0d3cb86a44 Fix VerilatedVpiPutHolder class (#5156) 2024-06-07 22:25:33 -04:00
Wilson Snyder 5c2b9d55b2 Fix MSVC C4805 == type mismatch warning 2024-06-07 22:14:32 -04:00
Arkadiusz Kozdra 1dbf1be3e6 Support inout clocking items (#5160) 2024-06-07 08:30:58 -04:00
Wilson SnyderandDercury 3f886f7c61 Fix select value too wide (#5148) (#5153).
Co-authored-by: Dercury <[email protected]>
2024-06-07 08:27:03 -04:00
Wilson Snyder 7c9fa8647c Fix string to be more standard (#5082) (#5083). 2024-05-31 21:51:12 -04:00
Wilson Snyder dbf68a99e8 Tests: SHow expected values in t_typenames 2024-05-30 22:54:40 -04:00
Andrew NolteandAndrew Nolte 53c2e416f4 Tests: Extend t_typenames (#5083)
Co-authored-by: Andrew Nolte <[email protected]>
2024-05-30 22:32:14 -04:00
github action e834b5be2d Apply 'make format' 2024-05-29 20:56:45 +00:00
Kaleb Barrett bd7689f59a Fix overflow of string on VPI reads (#5145) (#5146) 2024-05-29 16:55:46 -04:00
Kaleb Barrett 3496eb80a5 Improve VerilatedVpiPutHolder storage requirements (#5144) 2024-05-29 08:39:08 -04:00
Ryszard Rozak 839c3bf444 Commentary: Fix docs of verilator_coverage (#5149)
Signed-off-by: Ryszard Rozak <[email protected]>
2024-05-29 08:11:35 -04:00
Geza Lore d4b3583307 Apply DFG regularization to cyclic graphs (#5142)
The Dfg2Ast conversion assumes the 'regularize' pass was run, but we
failed to run it on cyclic sub-graphs. Do so now.

Fixes #5130.
2024-05-26 12:01:30 +01:00
Wilson Snyder ee130cb20d Tests: Skip if no constraint solver 2024-05-23 22:25:14 -04:00
github action 552a146f9c Apply 'make format' 2024-05-22 11:54:22 +00:00
Pawel Jewstafjew 913679f261 Fix output C++ type error on change detect of I/O arrays (#5125) (#5131)
operand order reversed for AstCMethodHard "neq"
interface between C-style arrays and VlUnpacked
overloads added to VlUnpacked::neq(), VlUnpacked::assign()
VlUnpacked::operator=() added

Fixes  #5125
2024-05-22 12:53:28 +01:00
Ethan Sifferman d9078df650 Fix 4-state value support for $readmem (#5070) (#5078) 2024-05-21 17:27:32 -04:00
Wilson Snyder f84592af49 Fix x-valued parameters with --x-assign unique (#5129). 2024-05-21 08:07:57 -04:00
Wilson Snyder 5f85c89425 Commentary: Changes update 2024-05-18 17:48:52 -04:00
Wilson Snyder 94f789b677 Update issue template 2024-05-18 17:41:36 -04:00
Arkadiusz Kozdra 739be2f782 Support constrained randomization with external solvers (#4947) 2024-05-17 10:38:34 -04:00
Krzysztof Bieganski 25b9a16bc7 Fix references to ports in forks (#5123)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-05-17 07:38:36 -04:00
Arkadiusz Kozdra 9a8e68928d Internals: Move getenvStr to verilatedos. (#5118)
* Internals: Move getenvStr to verilatedos. No functional change intended.
* Fix POS34-C. Do not call putenv() with a pointer to an automatic variable as the argument.

Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-05-13 10:23:51 -04:00
Todd Strader 19cccd170e Fix vpiInertialDelay for memories (#5113) 2024-05-10 18:49:43 -04:00
Wilson Snyder d99c8f5d44 Fix redundant AstExtend breaks DFG (#5112) 2024-05-10 18:48:09 -04:00
Geza Lore cf111d2e1f Do not create aliases for forced port signals (#5105)
+ don't remove forced signals in V3Const and Dfg

Fixes #5062
2024-05-10 18:19:51 +01:00
Arkadiusz Kozdra 45eb5b8a5c Fix method calls parsing in constraints (#5110) 2024-05-10 06:37:19 -04:00
Yinan Xu ce5cad17a8 Add increasing of stack size when possible (#5071) (#5104) 2024-05-08 22:40:42 -04:00
Wilson Snyder ed01befc25 Fix tracing interface functions (#5108). 2024-05-08 22:23:53 -04:00
Wilson Snyder 69a2bfee68 Commentary: Changes update 2024-05-08 08:41:56 -04:00
Wilson Snyder 1cc37ad6ce Internals: Add missing VL_DO_DANGLING. No functional change intended. 2024-05-08 08:36:24 -04:00
2a9f29912c Add parameterless assert control system tasks (#5010)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
Co-authored-by: Ryszard Rozak <[email protected]>
Co-authored-by: Wilson Snyder <[email protected]>
Co-authored-by: Arkadiusz Kozdra <[email protected]>
2024-05-08 08:31:34 -04:00
Wilson Snyder 298e0f24d1 Add traceCapable indication to model header (#5053). 2024-05-03 20:18:06 -04:00
Geza Lore 80b08b71aa Support NBAs to arrays inside loops (#5092)
For NBAs that might execute a dynamic number of times in a single
evaluation (specifically: those that assign to array elements inside
loops), we introduce a new run-time VlNBACommitQueue data-structure
(currently a vector), which stores all pending updates and the necessary
info to reconstruct the LHS reference of the AstAssignDly at run-time.

All variables needing a commit queue has their corresponding unique
commit queue.

All NBAs to a variable that requires a commit queue go through the
commit queue. This is necessary to preserve update order in sequential
code, e.g.:
 a[7] <= 10
 for (int i = 1 ; i < 10; ++i) a[i] <= i;
 a[2] <= 10
needs to end with array elements 1..9 being 1, 10, 3, 4, 5, 6, 7, 8, 9.

This enables supporting common forms of NBAs to arrays on the left hand
side of <= in non-suspendable/non-fork code. (Suspendable/fork
implementation is unclear to me so I left it unchanged, see #5084).

Any NBA that does not need a commit queue (i.e.: those that were
supported before), use the same scheme as before, and this patch should
have no effect on the generated code for those NBAs.
2024-05-03 07:45:49 -04:00
Vito Gamberini 64ba569f0d Fix MacOS missing <type_traits> header (#5096) (#5097) 2024-05-02 21:38:36 -04:00
Wilson Snyder 3cb4033c97 Fix width extension of unpacked array select (#5095). 2024-05-02 20:41:39 -04:00
github action 6509bac59e Apply 'make format' 2024-05-02 23:03:39 +00:00
Wilson Snyder ec45a77d93 Fix macro expansion in strings per 1800-2023 (#5094). 2024-05-02 19:02:28 -04:00
Wilson Snyder 8044833c74 Fix $typename on array.min and others (#5049). 2024-05-01 20:07:13 -04:00
Geza Lore 3f89bdcfac Defer conversion of set flag based AssignDlys (#5091)
No functional change. Postpone the conversion of all AstAssignDlys that
use the 'VdlySet' scheme for array LHSs until after the complete
traversal of the netlist. The next patch takes advantage of this by
using some extra information also gathered through the traversal to
change the conversion.

AstAssignDlys inside suspendable or fork are not deferred and are
processed identical to the previous version.

There are some TODOs in this patch that are fixed in the next patch.

Output code perturbed due to variable ordering.

MULTIDRIVEN message ordering perturbed due to processing order change.
2024-05-02 00:24:00 +01:00
Todd Strader c99364b81a Support vpiInertialDelay (#5087) 2024-05-01 18:56:50 -04:00
Geza Lore d841a791e6 Refactor V3Delayed to enable algorithmic extension (#5090)
No functional change.

This patch is just cleanup with some non-functional changes to enable
the next patch. Most importantly createDlyOnSet, which implements NBAs
for arrays, has a new streamlined implementation that does the same
thing. Some output code is perturbed due to statement/local variable
insertion order.

Also renamed Vdlyvfoo to VdlyFoo for easier readability of the generated
code.
2024-05-01 23:06:25 +01:00
Geza Lore b5b937e2f2 Fix missed optimization in V3Delayed (#5089)
Checking the wrong node meant we never actually pushed constant
bit-select indices into the delayed update, as was the intention, but
always generated a temporary instead.
2024-05-01 16:22:56 +01:00
Todd Strader 4a41f69293 Internals: Remove C-style cast in VPI_HANDLE (#5088) 2024-05-01 10:11:44 -04:00
Wilson Snyder 8fd038f88e Add --localize-max-size option and optimization (#5072). 2024-04-30 19:46:54 -04:00
Wilson Snyder 4982f63da2 Update coverage for last commit 2024-04-30 19:34:41 -04:00
Wilson Snyder 71bc60fb91 Add error on zero width select (#5028). 2024-04-30 18:38:37 -04:00
Wilson Snyder 0da7ecf753 Commentary: Changes update 2024-04-30 07:37:06 -04:00
Andrea Calabrese 25ca1af8b3 Internals: Fix missing const (#4899) 2024-04-29 22:57:56 -04:00
Wilson Snyder 5d54fa8e6f Fix missing parameters with comma to be errors (#4979) (#5012). 2024-04-29 22:41:16 -04:00
Christopher Taylor e8c5b9faad Fix missing flex include path variable (#4970) (#4971) 2024-04-29 22:01:09 -04:00
Aleksander Kiryk 8e0301c287 Fix bound queue printing (#5032) 2024-04-29 21:52:06 -04:00
Iztok Jeras 3f625fc359 Tests: Add unsupported streaming LHS tests (#4302) 2024-04-29 21:35:19 -04:00
Geza Lore 72b96d5069 tests: disable ASLR for t_trace_ub_misaligned_address (#5075)
This works around an address-sanitizer bug hit with some GCC versions
2024-04-29 15:38:00 +01:00
Bartłomiej Chmiel d1b45b8d32 Fix attempted to destroy locked thread pool error (#5040) 2024-04-29 07:59:24 -04:00
Wilson Snyder 5601056ed0 Tests: Check for bad event methods 2024-04-28 13:10:25 -04:00
Wilson Snyder 8ed269c77f Make 'disable isn't underneath a begin' into UNSUPPORTED error (#4699). 2024-04-27 21:30:40 -04:00
Geza Lore 27b7e70218 Fix DFG assertion with SystemC (#5076)
Fixes #5050
2024-04-27 13:41:10 +01:00
Geza Lore 97680656d3 Remove unknown '--' form cmake -E (#5073)
After #5063, with cmake 3.22.1, I get test failures, saying:
    cmake -E env: unknown option '--'
The '--' is necessary so removing.
2024-04-27 11:09:59 +01:00
Michael Bikovitsky 4202ec2ab2 Fix CMake builds to export VERILATOR_ROOT (#5063) 2024-04-26 19:29:10 -04:00
Wilson Snyder 4f3a816fb0 Fix false ASSIGNIN on functions with explicit port map (#5069). 2024-04-26 19:26:21 -04:00
Todd Strader 25fd8ef5c0 Add VPI eval needed tracking (#5065) 2024-04-25 09:07:31 -04:00
Gökçe Aydos a9664b8d16 Remove $(info) which cannot be silenced by -MAKEFLAGS '--quiet' (#5059) 2024-04-20 08:48:16 -05:00
Wilson Snyder 26a5729514 Add CITATION.cff (#5057) (#5058). 2024-04-19 20:33:11 -04:00
Arkadiusz Kozdra 5b839699ac Support empty queue as dynarray default value (#5055)
Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-04-18 11:53:23 -05:00
Wilson Snyder 1315aa31ed Commentary 2024-04-13 08:18:45 -04:00
Wilson Snyder 5d8da6b4ac Fix width extension on delays (#5045). 2024-04-13 08:16:59 -04:00
Wilson Snyder aac2563a07 Commentary: Changes update 2024-04-13 08:03:57 -04:00
Wilson Snyder 8e44487354 Tests: update style 2024-04-13 08:02:25 -04:00
Wilson Snyder 1012c054e6 Fix $system with string argument (#5042). 2024-04-11 17:31:14 -04:00
Paul Wright a8b5738b44 Support __en/__out signals on top level inout ports (#4812) (#4856) 2024-04-11 09:02:58 -04:00
Wilson Snyder 72845167e6 Commenary: Fix README badge paragraph 2024-04-10 17:02:07 -04:00
Krzysztof Bieganski 7ca2d6470a Fix consecutive zero-delays (#5038)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-04-05 16:48:47 -04:00
Wilson Snyder 33e999e01a devel release 2024-04-05 06:23:30 -04:00
Wilson Snyder 522bead374 Version bump 2024-04-05 05:52:00 -04:00
Wilson Snyder 030286142f Commentary: Changes update 2024-04-04 22:11:33 -04:00
Wilson Snyder 8a4ceb5717 Tests: Fix test failure, last commit. 2024-04-02 07:04:27 -04:00
Andrew Nolte 63fa6accc4 [Vpi] Fix missing scopes 2 (#4965) 2024-04-01 23:11:15 -04:00
Wilson Snyder 28718f964a Fix tracing replicated hierarchical models (#5027) (#5029) 2024-03-30 16:00:52 -04:00
Wilson Snyder 1d486e3a59 Rename statsPrintSummary() 2024-03-30 13:19:47 -04:00
Wilson Snyder 9b396f7125 Fix pylint warning 2024-03-30 13:13:51 -04:00
Wilson Snyder e16cbce52e Internals: Fix clang_check_attributes false error print 2024-03-30 11:58:34 -04:00
Wilson Snyder 840970e8f7 Internals: Add VL_MT_SAFE flags 2024-03-30 11:54:29 -04:00
Wilson Snyder e390d6779d Internals: Rename threadsInModel() 2024-03-30 11:13:14 -04:00
Wilson Snyder 39ee522f92 Commentary: Changes update 2024-03-28 08:22:15 -04:00
Wilson Snyder 9526efcf72 Fix V3Hash MacOS ambiguity (#5011) 2024-03-28 08:11:48 -04:00
github action d397e0d838 Apply 'make format' 2024-03-28 11:32:57 +00:00
Szymon Gizler 8301fdc6d3 Add JSON AST dumps (#5020) 2024-03-28 07:32:18 -04:00
Arkadiusz Kozdra f645382f11 Support inside range with implicit type conversion (#5026)
Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-03-28 07:31:45 -04:00
Wilson Snyder 1ed5557d2d Support 1800-2023 class and function :initial, :extends, :final virtual overrides (#5025). (#5025) 2024-03-27 23:57:58 -04:00
Wilson Snyder 28b9216f8a Fix tracing class parameters (#5014). 2024-03-27 20:07:46 -04:00
Wilson Snyder 0114cb67ca Fix $readmem with missing newline (#5019). 2024-03-27 18:42:20 -04:00
Wilson Snyder ea8f86dd30 Internals: Prefer '(void)' to avoid unused var. No functional change. 2024-03-27 18:07:14 -04:00
Wilson Snyder 0ff77fc352 Internals: Remove extra single-line {}. No functional change. 2024-03-27 17:57:49 -04:00
Wilson Snyder 341963e820 Internals: Avoid '%Error' so can grep logs for real errors 2024-03-27 09:00:34 -04:00
Wilson Snyder db60b92613 Fix internal error on missing pattern key (#5023) 2024-03-27 08:41:58 -04:00
Geza Lore 98206a4f04 Improve V3List user interface (#4996) 2024-03-25 23:06:25 +00:00
Wilson Snyder 4df9e2e0e5 Add printing summary reports (#4909) (#5018) 2024-03-25 07:03:17 -04:00
Wilson Snyder 34e4cffb62 Add stats on output size 2024-03-24 10:50:53 -04:00
Wilson Snyder 71d76c993c Fix MSVC++ warnings. No functional change. 2024-03-24 10:19:26 -04:00
Wilson Snyder e67bdb4c08 Commentary 2024-03-24 09:23:37 -04:00
Wilson Snyder 23f013f2d7 Add stats on input size etc (#5017) 2024-03-24 09:14:31 -04:00
Geza Lore 9b729b80e0 Plug memory leaks (#5016) 2024-03-23 22:12:43 +00:00
Wilson Snyder 38ad328956 Remove duplicate stop ignored messages 2024-03-22 19:35:42 -04:00
Wilson Snyder f767f0cfaa Commentary 2024-03-22 19:35:13 -04:00
Fuad Ismail 1c79df8630 Support stream operation on unpacked array (#4714) (#5006) 2024-03-21 18:26:42 -04:00
Wilson Snyder 248573205b Commentary: Changes update 2024-03-20 18:27:35 -04:00
Arkadiusz Kozdra 88831ca21b Fix preprocessor to respect strings in joins (#5007)
This adheres more to the wording used in IEEE 1800-2017 22.5.1,
specifying the join operator to be more of a delimiter than join:

> A `` delimits lexical tokens without introducing white space,
> allowing identifiers to be constructed from arguments.

Before, string RHS arguments to the join operator were silently dropped.

Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-03-20 08:54:23 -04:00
Arkadiusz Kozdra 26f15e11c4 Fix unique {} constraints missing semicolon (#5001)
Signed-off-by: Arkadiusz Kozdra <[email protected]>
2024-03-19 08:22:39 -04:00
Ryszard Rozak 5c0a7e06dc Fix inout ports of unpacked stuct type (#5000) 2024-03-19 06:43:06 -04:00
Andrew Nolte 290b313dc0 Fix missing VPI scopes (#4918) 2024-03-18 20:47:28 -04:00
Wilson Snyder 93e5ca3f6d Fix class type as an associative array parameter (#4997). 2024-03-18 20:44:18 -04:00
Geza Lore 6ffff8565f Use the same serial ordering within MTasks as we use in serial mode (#4994)
The goal here is to use as single ordering heuristic (which can be
improved later) within MTasks as we do for serial code ordering. The
heuristic itself is factored out into the new OrderMoveGraphSerializer.
This also yields slightly nicer ordering than the previously use
GraphStream, so we end up with fewer trigger (domain) conditionals in
the MTasks, this can be worth a few percent speedup.

This has the somewhat nice side-effect of reusing OrderMoveGraphVertex
for both serial and parallel mode, so MTaskMoveGraphVertex can be
removed.

Serial mode yields identical output.
2024-03-17 13:15:39 +00:00
Geza Lore 494e05b326 Fix install instructions for attribute checks, do the same in CI (#4995)
On Ubuntu 22.04, pip install clang picks up a mismatched version by
default. There are 'apt' packages with correct dependencies, so use
those instead.
2024-03-17 12:10:13 +00:00
Kevin Nygaard a24f61403a Support implicitly-typed variable definitions in for-loop initializers (#4945) (#4986)
- Adds support for C-style for-loop initializers
    - Current implementation supports: for (x a = 1, y b = 2, ...)
    - This patch extends support to:   for (x a = 1,   b = 2, ...)
- Adds unit test for new feature
2024-03-16 19:02:37 -04:00
Geza Lore 292cc54768 Compute MTask affinity in V3VariableOrder (#4991)
Instead of carrying around MTask affinity from scheduling, compute it in
V3VariableOrder (where it is used), by tracing through the code. This
simplifies some code and has the benefit of handling variables
introduced after scheduling. It's worth a few % speed at run-time, and
the new implementation of V3VariableOrder is slightly more efficient,
though the speed/space is still dominated by the TSP sort.
2024-03-16 16:32:12 +00:00
Geza Lore e8a9662eb5 Simplify LogicMTask/ExecMTask IDs (#4990)
There is no strong need to re-map LogicMTask IDs and it just adds extra
processing. Instead we just allocate a separate set of ExecMTask IDs as
they are created, which can also be used as the unique profiling ID as
well. The only effect on the output of this is the change in mtask IDs
emitted, which was fairly arbitrary to begin with.
2024-03-16 14:02:17 +00:00
Wilson Snyder 0262819c20 Fix object assignment from conditionals (#4968). 2024-03-16 09:12:18 -04:00
Wilson Snyder d3b93a1113 Fix object reference to conditional null : null 2024-03-16 09:12:18 -04:00
Wilson Snyder 5f8c06c805 Internals: Add AstNode::isNull(). No functional change. 2024-03-16 09:12:18 -04:00
Kevin Nygaard a5ad26cd28 Fix tests on macOS (#4984) (#4985) 2024-03-16 09:08:03 -04:00
Fuad Ismail 5802818b9a Add error when pass net to function argument (#4132) (#4966) 2024-03-16 08:25:42 -04:00
Geza Lore df519ff16e Fix --prof-exec predicted time values (#4988)
Wrapping the functions in #4933 broke --prof-exec report as the
predicted MTask times are computed during thread packing, but are
emitted in the wrapping functions.
2024-03-16 12:17:24 +00:00
Geza Lore bf8a88a0ad Do not create any empty ExecMTasks (#4987) 2024-03-16 12:00:32 +00:00
Geza Lore 878204db73 Do not feed any empty logic into scheduling (#4972) 2024-03-16 10:35:56 +00:00
Nolan Poe 08c76b1da6 Fix GCC14 warnings on template specialization syntax (#4974) (#4975) 2024-03-15 22:21:08 -04:00
Wilson Snyder e82c9db6da Fix unpacked structure upper bit cleaning (#4978). 2024-03-15 21:56:24 -04:00
Wilson Snyder 65c3cb4708 Tests: stop testing if --fail-max tests fail 2024-03-15 21:11:24 -04:00
Wilson Snyder 0cab076b86 CI: Reenable address sanitizer and fix core dumps (#4983) 2024-03-15 21:06:21 -04:00
Wilson Snyder 3a28ed24ea Revert last bin/verilator change. 2024-03-15 10:34:50 -04:00
Wilson Snyder 71775eae4c sanitize 2024-03-15 10:32:31 -04:00
Wilson Snyder 953249aa43 CI: Add dist-vlt-3 to avoid out of disk space 2024-03-12 07:49:01 -04:00
Wilson Snyder 229dbbb100 Tests: RUn same job count as CPU instead of +1 to reduce CI congestion 2024-03-11 20:13:23 -04:00
Wilson Snyder 4a439beae5 Add error on missing pure virtual functions (#4961). 2024-03-11 18:56:30 -04:00
Wilson Snyder 49022c3e73 Add error on calling static function without object (#4962). 2024-03-11 18:23:55 -04:00
Geza Lore c92ced4ac7 Do not defer deletion in const-bit-op-tree
Deferring deletion of unused terms is not necessary, but can cause huge
memory usage increases in some bad cases.
2024-03-11 17:33:40 +00:00
Wilson Snyder ba47da6587 Internals: Move vl_timescaled_double to verilated_funcs.h. No functional change intended 2024-03-10 22:34:32 -04:00
Wilson Snyder 2c27f22900 Remove unused vltstd::exchange, should be using C++14 std::exchange instead 2024-03-10 22:32:51 -04:00
Geza Lore c0391990ad Increase graph ParallelismReprot values to uint64_t 2024-03-10 18:56:31 +00:00
Geza Lore 2247e1e345 Cleanup/simplify V3OrderParallel (#4959)
No functional change.
2024-03-10 18:15:45 +00:00
Geza Lore e4847464d4 Split V3Partition into logically separate pieces (#4958)
V3Partition used to contain 2 conceptually separate set of algorithms

- The MTask partitioning/coarsening algorithm used by V3Order. This has
  been moved to V3OrderParallel.cpp

- The lowering of AstExecGraph into per thread functions by packing
  tasks into threads and creating additional code
  (V3Partition::finalize). This has been moved to the new
  V3ExecGraph.cpp

This patch is just code movement/rename with minimal fixes required to
do so.
2024-03-10 15:58:58 +00:00
Wilson Snyder 7694a7bf41 Fix suggestion of ulimit -s (#4956) 2024-03-10 11:20:25 -04:00
Geza Lore a686e547cf Factor out graph parallelism report into a generic algorithm (#4957)
This is a generic algorithm parametrised by a cost function, so
implement it as such for easy reuse.
2024-03-10 14:56:43 +00:00
Geza Lore 1481d34959 Add candidate item count to MergeCond stats 2024-03-09 22:11:04 +00:00
Nolan Poe 04512e5d04 Add custom version for verilator --version packaging (#4954) 2024-03-09 16:44:25 -05:00
Geza Lore 9a3aed57b1 Internals: Simplify/cleanup V3OrderSerial (#4955). No functional change.
Remove redundant data structures and simplify/cleanup implementation.

No functional change. Output is identical.
2024-03-09 16:19:35 -05:00
Geza Lore 5a69321be3 Split V3Order into further part and decouple various components (#4953)
Continuing the idea of decoupling the implementations of the various algorithms.

The main points:

-Move the former "processDomain" stuff, dealing with assigning combinational logic into the relevant sensitivity domains into V3OrderProcessDomains.cpp

-Move the parallel code construction in V3OrderParallel.cpp (Could combine this with some parts of V3Partition - those not called from V3Partition::finalize - but that's not for this patch).

-Move the serial code construction into V3OrderSerial.cpp

-Factored the very small common code between the parallel and serial code construction (processMoveOneLogic) into V3OrderCFuncEmitter.cpp
2024-03-09 12:43:09 +00:00
Wilson Snyder 5ee938fd1c Fix assignment of null into struct member (#4952). 2024-03-08 17:33:51 -05:00
Arkadiusz Kozdra f78783e187 Internals: Use LogOr/LogAnd on inside operator expansion (#4951)
This will help introducing constrained randomization, as SMT solvers
treat booleans and 1-bit vectors as incompatible types.
2024-03-08 08:17:41 -05:00
Wilson Snyder 11bfe7a7bb cppcheck fixes. No functional change. 2024-03-07 19:20:00 -05:00
Wilson Snyder 8ba494c71f Fix null characters in shortened identifiers (#4946). 2024-03-07 18:09:55 -05:00
Geza Lore acb63c929b Split V3Order.cpp into multiple smaller files (#4950). No functional change intended.
Move OrderBuildVisitor into V3OrderGraphBuilder.cpp (and rename to
V3OrderGraphBuilder). Move ProcessMoveBuildGraph to
V3OrderMoveGraphBuilder.cpp (and rename to V3OrderGraphBuilder).

This patch is pure code movement/rename, no refactoring at all.
2024-03-07 17:12:19 -05:00
Geza Lore 26dd5d4550 Add some missing VNUserInUse (#4949) 2024-03-07 20:26:58 +00:00
Bartłomiej Chmiel 32f288084a Add UNUSEDLOOP when unused loop is removed (#4926) 2024-03-07 08:33:49 -05:00
Andrew Nolte 6db149c588 Fix generate blocks in vpi_iterate (#3609) (#4913) 2024-03-06 18:33:30 -05:00
Geza Lore 0fed5f8b3e Avoid creating redundant vertices in V3DfgPeephole (#4944)
Add a new data-structure V3DfgCache, which can be used to retrieve
existing vertices with some given inputs vertices. Use this in
V3DfgPeephole to eliminate the creation of redundant vertices.

Overall this is performance neutral, but is in prep for some future
work.
2024-03-06 18:01:52 +00:00
Geza Lore a30930bdcc Fix unsound temporary name generation in V3DfgRegularize
Sadly used to produce some conflicting names.
2024-03-05 19:17:41 +00:00
Geza Lore 3a1355fb54 Fix bad assertion in DFG variable elimination
Fixes #4943
2024-03-05 18:51:46 +00:00
Andrew Nolte 97db128d66 Tests: Add VPI dump testcases (#4838) 2024-03-05 12:08:22 -05:00
Wilson Snyder 3d57256070 Commentary: Changes update 2024-03-04 08:22:36 -05:00
Wilson Snyder 5dc8fb5b4f Commentary (#4930) 2024-03-04 08:04:39 -05:00
Wilson Snyder 3f0d434f82 Gtkwave: Update from upstream for warning cleanup (#4941) 2024-03-03 19:24:03 -05:00
Wilson Snyder 2cdc5ea48b Fix unaligned access in --trace --runtime-debug (#4941). 2024-03-03 12:33:11 -05:00
Geza Lore 745605efe3 Fix DFG removing forceable signals (#4942)
DFG could remove forceable signals by replacing them with their
in-design driver. This is a bit of a pain to prevent, and ideally the
forcing transform should happen before DFG, but implementing it there is
a pain due to having to rewrite ports based on direction.  This is an
attempted fix in DFG. More cases might remain.
2024-03-03 16:22:41 +00:00
Wilson Snyder 0fbd4313b2 Fix __Vlip undefined error in --freloop (#4824). 2024-03-03 11:10:46 -05:00
Wilson Snyder 9f8f61ef2f Internals: Only show SimulateVisitor note once per type 2024-03-03 11:10:19 -05:00
github action 4b1f4938b8 Apply 'make format' 2024-03-03 15:23:47 +00:00
Kefa Chen 5f1dc73a1b Support public packed struct / union (#860) (#4878) 2024-03-03 10:23:04 -05:00
Geza Lore 5e1fc6e24d Add DFG 'regularize' pass, and improve variable removal (#4937)
This functionality used to be distributed in the removeVars pass and the
final dfgToAst conversion. Instead added a new 'regularize' pass to
convert DFGs into forms that can be trivially converted back to Ast, and
a new 'eliminateVars' pass to remove/repalce redundant variables. This
simplifies dfgToAst significantly and makes the code a bit easier to
follow.

The new 'regularize' pass will ensure that every sub-expression with
multiple uses is assigned to a temporary (unless it's a trivial memory
reference or constant), and will also eliminate or replace redundant
variables. Overall it is a performance neutral change but it does
enable some later improvements which required the graph to be in this
form, and this also happens to be the form required for the dfgToAst
conversion.
2024-03-02 19:49:29 +00:00
Wilson Snyder 0ec32ee404 Parse 1800-2023 map expressions and throw UNSUPPORTED 2024-03-02 10:15:19 -05:00
Wilson Snyder 97b21b3849 Parse 1800-2023 2024-03-02 10:15:19 -05:00
Wilson Snyder 214173c6b8 Support 1800-2023 preprocessor ifdef expressions; add PREPROC zero warning. 2024-03-02 10:15:19 -05:00
Wilson Snyder 3786f59e03 Change to IEEE 1800-2023 warning mentions 2024-03-02 10:15:19 -05:00
Wilson Snyder fa7234ff68 Support 1800-2023 DPI headers, svGetTime/svgGetTimeUnit/svGetTimePrecision methods. 2024-03-02 10:15:19 -05:00
Wilson Snyder 91dd3c5fac Support 1800-2023 keywords. 2024-03-02 10:15:19 -05:00
Wilson Snyder a378dbd9b2 Tests: Fix t_dist_whitespace 2024-03-02 10:14:54 -05:00
Yutetsu TAKATSUKASA da9521a351 Internals: Add --debug-width option for developers to check width consistency (#4923) 2024-03-02 08:57:26 -05:00
Wilson Snyder af51107587 Fix statistics missing some additions. 2024-03-01 20:27:57 -05:00
Wilson Snyder e60f652a64 Commentary (#4936) 2024-03-01 17:32:26 -05:00
Wilson Snyder a4813ec677 Add warning on TOP-named modules (#4935). 2024-03-01 17:28:12 -05:00
Kamil Rakoczy 01dadb0a8d Fix try-lock spuriously fails (#4931) (#4938) 2024-03-01 15:29:13 -05:00
Geza Lore 9dcb7ea6a9 Fix minor V3DfgPatternStats coding issues 2024-03-01 14:56:35 +00:00
github action adfe072b89 Apply 'make format' 2024-03-01 14:15:34 +00:00
Yan Xu b12f8b3d73 Fix V3Unknown unpacked struct x-assign (#4934) 2024-03-01 09:14:49 -05:00
Geza Lore f56f318217 Make installation relocatable, and the installation testable (#4927)
Fixes #4893
2024-03-01 00:08:28 +00:00
Geza Lore 3af0eb7fa0 Internals: Emit a separate CFunc for each MTask body (#4932) (#4933) 2024-02-29 16:53:53 -05:00
Wilson Snyder a69cb9b044 Tests: Avoid verilated.v include in most tests 2024-02-27 18:08:37 -05:00
Geza Lore b68a696859 Ignore all JSON tree dumps in test-snap/test-diff 2024-02-27 17:16:34 +00:00
Wilson Snyder e320b0b581 Internals: Favor const_iterators. No functional change intended. 2024-02-25 17:12:13 -05:00
Wilson Snyder 42041f2403 Fix invalid cast on string structure creation (#4921). 2024-02-25 08:19:53 -05:00
Wilson Snyder 881c6ee655 devel release 2024-02-24 07:52:19 -05:00
Wilson Snyder d8b2993974 Version bump 2024-02-24 07:39:16 -05:00
Wilson Snyder 30e711aa5c Commentary: Changes update 2024-02-23 11:49:42 -05:00
Yutetsu TAKATSUKASA 51ae8e13fb Add --assert-case option (#4919) 2024-02-23 23:05:53 +09:00
Geza Lore 0892b39ad2 Fix incorrect code generation for change expression on typedefed unpacked array (#4915) 2024-02-23 03:53:42 -05:00
Geza Lore 5964d5cf63 Fix inconsistent driver resolution with typedefs (#4917) 2024-02-22 18:33:23 +00:00
Wilson Snyder 2162a31d3a Commentary: Changes update 2024-02-22 03:57:56 -05:00
Paul Swirhun e00e4d4245 Fix whitespace in pragma protect version (#4914) 2024-02-22 03:29:57 -05:00
Yutetsu TAKATSUKASA 4b9532fe24 Improve message for priority case assertion failure (#4905) 2024-02-22 03:09:14 -05:00
Jiangjie Weng c3ff52208a Commentary: Fix typo in the call condition of designp->nextTimeSlot() (#4912) 2024-02-21 10:15:29 -05:00
Andrew NolteandAndrew Nolte cfb73923bd Test driver: Add -xrun Xcelium support (#4896)
Co-authored-by: Andrew Nolte <[email protected]>
2024-02-20 14:41:05 -05:00
Yutetsu TAKATSUKASAandWilson Snyder a951446f9b Add --[no]-stop-fail option (#4904)
Co-authored-by: Wilson Snyder <[email protected]>
2024-02-19 21:26:58 +09:00
Wilson Snyder a187a16e56 Commentary: Changes update 2024-02-13 21:47:09 -05:00
Wilson Snyder d1dec38f38 Fix integer compare warning (#4887). No functional change. 2024-02-13 18:37:41 -05:00
Yutetsu TAKATSUKASA 65b632a7dd Improve assertion for unique case (#4892)
- Use parallel_case, unique, and unique0 in error message
- Distinguish multiple match and no match
- Show the case value that triggers the assertion
2024-02-13 21:53:32 +09:00
Geza Lore ec0787015e Ignore JSON tree dumps and DFG stats in test-snap/test-diff 2024-02-11 20:38:16 +00:00
Geza Lore cbc76a7816 Dump DFG patterns with --stats (#4889)
With --stats, we will print DFG pattern combinations, one per line, as
S-expressions to new stat files, together with their frequency, to aid
discovery of new peephole patterns.
2024-02-11 15:41:10 +00:00
Szymon Gizler d667b73e8d Add --json-only and related JSON dumping (#4715) (#4831). 2024-02-09 17:50:09 -05:00
Wilson Snyder 248de2be2e Fix coverage with member 2024-02-08 21:51:36 -05:00
Wilson Snyder 365537d8e3 Fix coverage of delayed nets 2024-02-08 20:25:17 -05:00
Wilson Snyder a23cf1ceea Fix toggle coverage dataDeclp error on multi-edge driven signals. 2024-02-08 19:21:44 -05:00
Wilson Snyder be471e9ccc Internals: Minor coverage reformatting/renaming. No functional change. 2024-02-08 19:10:38 -05:00
Wilson Snyder d0e7eaafc9 Tests: Define stop uniformly. No functional change. 2024-02-08 18:39:13 -05:00
Wilson Snyder 13b7cce8be Fix compile error on structs with queues (and ignore toggle coverage on queues). 2024-02-08 08:44:27 -05:00
Wilson Snyder efff630763 Fix tautological-compare warnings. 2024-02-07 22:16:08 -05:00
Wilson Snyder e2e0795538 Fix toggle coverage of unpacked unions with reals. 2024-02-07 21:03:32 -05:00
Wilson Snyder c20634e4f8 Fix coverage of real arrays giving operator^ not defined 2024-02-07 20:11:27 -05:00
Wilson Snyder 715dce546f Fix debug infinite loop when bad coverage pointers 2024-02-07 19:57:02 -05:00
Wilson Snyder 07d86bf91d Allow loop unrolling with coverage 2024-02-07 19:56:32 -05:00
Krzysztof Bieganski fe8c7c5a94 Fix timing with expr on assign LHS (#4880)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2024-02-06 07:27:19 -05:00
Wilson Snyder 7ada5195d8 Fix this in member initialization (#4710). (#4876) 2024-02-04 19:44:10 -05:00
Wilson Snyder a6ad85244f Backout (#4710) due to leak 2024-02-04 18:13:22 -05:00
Wilson Snyder f13f2296de Fix this in member initialization (#4710). 2024-02-04 16:09:01 -05:00
Wilson Snyder b1d901f100 Tests: Hardcode copyright exceptions (#4874) 2024-02-04 15:43:01 -05:00
Wilson Snyder 8ab576f7e6 Internals: Use std::to_string. No functional change intended. 2024-02-04 14:38:25 -05:00
Wilson Snyder 6f92c9c974 CI: Update upload-artifacts/download-artifacts version (#4875) 2024-02-04 10:29:34 -05:00
Wilson Snyder 7425037db6 Fix Copyright 2024-02-04 09:35:19 -05:00
Geza Lore 6ca60429ce Fix incorrect temporary insertion in loop conditions with statements (#4873)
When the condition of an AstWhile loop contains a statement (e.g.
through an AstExprStmt), temporaries inserted in that statement need to
go before that statement, not in the AstWhile precondition.
2024-02-04 09:19:54 -05:00
Bartłomiej ChmielandBartłomiej Chmiel c702fc944e Fix SystemC biguint sign desynchronization (#4870)
* Fix writing to SystemC values with `VL_ASSIGN_SBW`

Signed-off-by: Krzysztof Bieganski <[email protected]>
Co-authored-by: Bartłomiej Chmiel <[email protected]>
2024-02-02 07:00:13 -05:00
Yutetsu TAKATSUKASA 999c9ae21c Fix #4864 of wrong runtime result (#4867)
* Fix #4864. Ignore if EQ/NE is under SHIFTR.
2024-01-30 00:00:00 +09:00
Szymon Gizler c715cfc254 Add --valgrind switch (#4828) 2024-01-29 07:50:05 -05:00
Wilson Snyder 22687a6901 Internals: Use C++14 quoted literal std::string 2024-01-28 21:00:20 -05:00
Wilson Snyder eecdf4b0f3 Internals: Use C++14 exchange 2024-01-28 21:00:20 -05:00
Wilson Snyder e3e5f30ba1 Check for C++14 without also accepting GNU C++11 (#4865) 2024-01-28 19:42:29 -05:00
Wilson Snyder ce174743bb Fix some MSVC warnings 2024-01-28 14:47:14 -05:00
Wilson Snyder a84be1844f MSVC fix, part of fix of null (#4862). 2024-01-28 11:05:38 -05:00
Wilson Snyder 9ccef4180f Fix $fwrite of null (#4862). 2024-01-28 09:05:50 -05:00
Wilson Snyder 3bf896f7db Commentary: Changes update 2024-01-28 09:04:29 -05:00
Yutetsu TAKATSUKASA e4a0e5aad6 Fix #4857 consider NOT when checking EQ/NEQ under AND/OR tree (#4863) 2024-01-28 22:36:09 +09:00
Wilson Snyder d6f8ccd20b Add unroll_disable and unroll_full loop control metacomments (#3260). 2024-01-26 07:49:07 -05:00
Wilson Snyder 94460867d3 Fix nondeterministic fork/tristate ordering (#4690). 2024-01-25 20:33:43 -05:00
Wilson Snyder 5b70325e52 Internals: Style/debug cleanups. No functional change. 2024-01-25 20:26:56 -05:00
Wilson Snyder 3aece189ac Fix tracing chandles (#4860). 2024-01-25 08:13:52 -05:00
Wilson Snyder 188f0eb4ad Tests: Add t_enum_enumvalue_struct_bad (#2855) 2024-01-25 07:57:45 -05:00
Wilson Snyder d4c8a15407 Add --runtime-debug for Verilated executable runtime debugging. 2024-01-25 07:34:30 -05:00
Wilson Snyder 354a534d68 Add '--decorations node' for inserting debug comments into emitted code. 2024-01-24 21:51:47 -05:00
Wilson Snyder c8a40e0b52 Commentary; Tests: Check summary options match guide options 2024-01-24 19:28:46 -05:00
Wilson Snyder 771cb5f60b Tests: Fix last commit when no coroutines. 2024-01-24 18:48:27 -05:00
Wilson Snyder 23836ee8d0 Document gprof steps better. Add t_prof_timing test to show GCC bug (#4858). 2024-01-24 17:55:23 -05:00
github action 8a7f36c34b Apply 'make format' 2024-01-24 12:46:22 +00:00
Jonathan Schröter 31262e81f9 Fix to not emit already waived warnings in waiver output (#4574) (#4818) 2024-01-24 07:45:38 -05:00
github action 3d006afacc Apply 'make format' 2024-01-24 03:08:39 +00:00
Wilson Snyder 74ec50f933 Support interface class diamond relationship. 2024-01-23 22:07:35 -05:00
Wilson Snyder 21e85f87bc Fix compilation error on multi-inherited interface class usage (#4819). 2024-01-23 19:36:11 -05:00
github action 0b8daf4ae4 Apply 'make format' 2024-01-23 18:06:10 +00:00
Paul Swirhun 6c0c88cfc4 Fix unsafe write in wide array insertion (#4850) (#4855) 2024-01-23 13:05:27 -05:00
Wilson Snyder f0d010d9c5 Github: Update actions (#4852) 2024-01-22 22:32:00 -05:00
Wilson Snyder 2989e54eaa Add unsupported warning on property iff (#4848) 2024-01-21 16:18:48 -05:00
Wilson Snyder 1a2c9ca813 Updat GTKwave libraries from upstream 2024-01-21 13:59:54 -05:00
Wilson Snyder e3f3e3399f Commentary: Changes update 2024-01-21 13:50:27 -05:00
Yutetsu TAKATSUKASA 6b8531f0a6 Fix widthMin in replaceShiftOp (#4837) (#4841) (#4849) 2024-01-21 10:30:01 -05:00
Yutetsu TAKATSUKASA 50df902b54 Fix incorrect bit-op-tree NOT optimization (#4832) (#4847)
* Fix #4832. Bit-op-tree opt. should not touch a subtree under NOT in AND/OR tree.
2024-01-21 07:25:24 -05:00
Wilson Snyder 3a5248a919 Internals: Mark structs final/VL_NOT_FINAL. No functional change intended. 2024-01-20 15:06:46 -05:00
Wilson Snyder 1a92502788 Add --main support for dumping coverage, and +verilator+coverage+file runtime option. 2024-01-20 12:28:49 -05:00
Wilson Snyder a38fea1f9e Tests: Use context coverage write 2024-01-20 11:19:42 -05:00
Wilson Snyder d595d4c7ac Tests: Use --binary with some --timing tests 2024-01-20 10:57:00 -05:00
Wilson Snyder a43fd06f85 Tests: Imply no driver.pl make when using --build. No functional change intended 2024-01-20 10:37:35 -05:00
Wilson Snyder 375a121377 Tests: Use lint() where able instead of compile(). No functional change intended. 2024-01-20 10:25:17 -05:00
Wilson Snyder fef0502d50 Tests: Imply make_main=>0 on --main tests 2024-01-20 10:17:35 -05:00
Wilson Snyder c30b9d04a8 Change unused vars to standard void syntax. No functional change intended. 2024-01-20 08:57:22 -05:00
Wilson Snyder 89cfa0737f Internals: Fix cppcheck warnings 2024-01-17 19:48:07 -05:00
Wilson Snyder 8b03f2d47b Commentary 2024-01-17 19:47:07 -05:00
Anthony Donlon f80c167d65 Fix warnings in verilated_sc_trace.h for Clang. No functional change. (#4807) (#4827) 2024-01-17 19:30:42 -05:00
Szymon Gizler db3ce29b36 Fix wrong utimes() param (#4829) 2024-01-17 08:32:44 -05:00
Wilson Snyder 6f96c6763d Commentary 2024-01-17 08:25:54 -05:00
Szymon Gizler 372cdf1fc8 Tests: Let debugger handle signals instead of test driver (#4817) 2024-01-16 11:18:20 -05:00
github action 54922c036a Apply 'make format' 2024-01-14 00:53:31 +00:00
Adrian Sampson 2e999a5441 Fix too null pointer dereference (#4810) (#4825) 2024-01-13 20:52:50 -04:00
Tim Hutt 5073f208af Internals: Use more standard syntax for avoiding unused variable warnings (#4826) 2024-01-13 15:34:59 -05:00
Larry Doolittle c9d7486d16 Fix maybe-uninitialized compiler warning (#4820) (#4822) 2024-01-12 13:09:34 -05:00
Wilson Snyder 27d906a6b3 Commentary: Changes update 2024-01-12 08:20:53 -05:00
Wilson Snyder 21bf2d62d2 Fix mis-splitting of dump control functions (#4821). 2024-01-12 08:19:30 -05:00
Wilson Snyder fcdd8e5da6 Fix missing includes with multiple inheritance (#3819 partial) 2024-01-11 20:19:48 -05:00
Andrew Nolte ab47fc6656 Fix localparam elaboration (#3858) (#4794) 2024-01-11 07:49:07 -05:00
Szymon Gizler 5f52c066e5 Internals: Add serializeOnly() and dumpTreeEitherLevel() (#4815) (#4715). No functional change intended. 2024-01-09 10:35:13 -05:00
Wilson Snyder 19cb366e5d Update ifdef (#4805) (#4807). No functional change. 2024-01-08 07:35:34 -05:00
Anthony Donlon 55d1b87b34 Support parsing anonymous primitive instantiations (#4809) 2024-01-07 10:59:56 -05:00
Wilson Snyder eec41fd039 Fix lint_off disables on preprocessor warnings (#4703). 2024-01-06 18:49:19 -05:00
Wilson Snyder 69043549d6 Fix const anon union (#4800) 2024-01-06 17:26:07 -05:00
Wilson Snyder 68e4eeb53e Add predicted stack overflow warning (#4799). 2024-01-06 16:16:14 -05:00
Wilson Snyder 0ca90257a5 Add predicted stack overflow warning (#4799). 2024-01-06 16:14:58 -05:00
Anthony Donlon 7507c5f56c Support SystemC 3.0.0 public review version (#4805) (#4807) 2024-01-06 06:01:35 -05:00
Wilson Snyder acbbb2594a Tests: Make some tests single-threaded only, for faster regressions 2024-01-05 18:25:39 -05:00
Wilson Snyder 5294140753 Fix delays using wrong timeunits when modules inlined (#4806). 2024-01-05 18:07:24 -05:00
Wilson Snyder a36a07c297 Internals: Favor UASSERT over v3fatalSrc. No functional change intended. 2024-01-05 18:00:06 -05:00
Wilson Snyder 47b129bf07 Commentary 2024-01-05 07:14:40 -05:00
Chykon 1a0c8f1573 Commentary: Add a link to Create-Binary Execution to the list of examples (#4802) 2024-01-04 10:47:22 -05:00
Wilson Snyder 2be6f03848 Commentary: runtime debugging 2024-01-03 21:03:17 -05:00
github action 4172c0f29e Apply 'make format' 2024-01-03 12:13:21 +00:00
Pengcheng Xu ec01008fe3 Change zero replication width error to ZEROREPL warning (#4753) (#4762) 2024-01-03 07:11:50 -05:00
Marlon James 8ea814e4b4 Fix VPI parameter iteration (#4798) 2024-01-02 18:57:34 -05:00
Marlon James 0195fe9dfd Add vpiConstType support to vpi_get_str() (#4797) 2024-01-02 18:52:57 -05:00
Marlon James e430ea13f4 Fix vpi_get() and vpi_get64() to return vpiUndefined on errors (#4795)
See IEEE 1800-2017 section 38.6 and 38.7.
2024-01-02 16:25:14 -05:00
Mariusz Glebocki 719954a24a Internals: Make V3Const.cpp parseable by non-compilers (#4796) 2024-01-02 14:51:40 -05:00
Paul Wright 3adb31f53b Fix $time not rounding up (#4790) (#4792) 2024-01-01 20:11:46 -05:00
Wilson Snyder 3eaed3b6f5 Remove deprecated 32-bit pointer mode (#4791). 2024-01-01 10:16:48 -05:00
Wilson Snyder 22de598456 devel release 2024-01-01 03:46:48 -05:00
Wilson Snyder 5c5314b39c Version bump 2024-01-01 03:42:12 -05:00
Wilson Snyder e76f29e5ba Copyright year update 2024-01-01 03:19:59 -05:00
Wilson Snyder 5a83209b9b Tests: Fix last commit on width (#4781). 2023-12-31 13:28:49 -05:00
Wilson Snyder 4655ee014b Fix max multiply width. (#4781) 2023-12-31 11:42:06 -05:00
Wilson Snyder 12f0017d4a Commentary: Changes update 2023-12-31 11:35:11 -05:00
Wilson Snyder ca3b5fbe99 Add verilated asserts that VL_MULS_MAX_WORDS does not overflow (#4781). No functional change intended. 2023-12-30 15:31:58 -05:00
Wilson Snyder 9de6612cde Avoid shift by 32 even if later masked, to avoid sanitizer warning (#4781). No functional change intended. 2023-12-30 14:46:57 -05:00
Rasfunk 2d7e8b58e4 Require C++14 or newer (#4784) (#4786) 2023-12-29 10:39:00 -05:00
Wilson Snyder f3a97841bd Commentary 2023-12-27 15:35:22 -05:00
Wilson Snyder 40f0378136 CI: Run --sanitize on Ubuntu 22.04 in prep for eventual 24.04. (#4782) 2023-12-27 15:01:17 -05:00
Wilson Snyder 17b6ce1379 Commentary: Changes update 2023-12-27 10:15:29 -05:00
Wilson Snyder 14ac24cacc Commentary: sccache 2023-12-26 15:15:15 -05:00
Wilson Snyder 6bf253deda Tests: Test for unsupported default disable (#4016) 2023-12-24 13:11:09 -05:00
Wilson Snyder aa4346a0e3 Tests: Add test for unfixed (#4237) 2023-12-24 12:19:15 -05:00
Wilson Snyder 8c541a6e4d Tests: Add test for unfixed (#4038) 2023-12-24 12:17:54 -05:00
Wilson Snyder 1a43afe6f7 Fix $finish twice to no longer exit (#4757). 2023-12-24 11:02:52 -05:00
Wilson Snyder 9882c4c761 Github: Commentary 2023-12-24 10:35:12 -05:00
Wilson Snyder 54ad04b6e9 Fix 'for' loop with outside variable reference (#4660). 2023-12-24 10:17:44 -05:00
Fan Shupei 540cd772e4 Add user C/C++ code to final achieve, and make a libmodel.a (#4749) (#4754) 2023-12-23 09:31:10 -05:00
Krzysztof Bieganski 621de301c7 Run the V3Fork stage only if --timing is set (#4778)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2023-12-22 22:57:45 +01:00
Wilson Snyder 8769c1a92b Internals: Add -fno-dead-cells, -fno-dead-assigns for debug use 2023-12-22 16:26:51 -05:00
github action 8e1c0b0852 Apply 'make format' 2023-12-21 12:49:55 +00:00
Jordan McConnon 56d6791205 Support invoking interface methods on virtual interface variables (#4774) (#4775) 2023-12-21 07:49:07 -05:00
Krzysztof Bieganski 016e630ecf Refine dynamic NBA condition (#4773)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2023-12-20 18:12:17 +01:00
Wilson Snyder 69b779b4a8 Internals: Cleanup cpp-check warnings. No functional change. 2023-12-20 07:49:03 -05:00
Wilson Snyder 7a537765bc Tests: Comment driver.pl with some argument meanings. No functional change. 2023-12-19 22:43:18 -05:00
Wilson Snyder 21b2e874ce Tests: Make some includes more generic to help copying tests. No test change. 2023-12-19 21:08:30 -05:00
Wilson Snyder 55ad950609 Fix power operator with wide numbers and constants (#4721) (#4763) 2023-12-19 19:22:54 -05:00
Todd Strader 654ab117f2 Fix tracing FST enums (#4661) (#4756) 2023-12-19 11:07:06 -05:00
Todd Strader 5ec9bfc47d Support packages in vpi_handle_by_name() (#4768) 2023-12-15 17:32:23 -05:00
Todd Strader 1066f06ec1 Support VPI parameter iteration (#4765) 2023-12-15 13:53:13 -05:00
Todd Strader 668dbb25ab Tests: Use test macros in t_vpi_package (#4726) (#4764). 2023-12-15 12:11:51 -05:00
Todd Strader fced4d6e57 Support vpiConstType in vpi_get() (#4761) 2023-12-14 20:37:47 -05:00
Geza Lore c5ba6e22fa Minor cleanup of trace internals 2023-12-12 20:27:16 +00:00
Geza Lore 6012ec8eb7 Put dynamic NBA commit in eval_phase__nba
Fixes #4634
2023-12-12 18:11:43 +00:00
Mariusz Glebocki 75a44e5aa9 Fix deadlocks in error handler (#4672) 2023-12-12 08:10:01 -05:00
Ryszard Rozak a811f2e17d Support inside operator on unpacked arrays and queues (#4751) 2023-12-12 09:20:22 +01:00
Stefan Wallentowitz b65f2509a2 Devcontainer support (#4748)
devcontainers are a convenient way to provide users a reproducible
build environment. It is currently supported by Visual Studio Code,
Visual Studio and IntelliJ.

When the user opens the verilator repo in VSCode with the standard
devcontainer extension installed, VSCode will ask the user if they
want to reopen in the devcontainer, then build the Docker image as per
our definition and then restart VSCode 'remotely' attached to the
Docker container.

More information:
https://code.visualstudio.com/docs/devcontainers/containers

Also:

- zlibc is missing on Debian-based systems now
- Add non-root user to Dockerfile and make default
2023-12-12 08:46:25 +01:00
Ryszard Rozak b60117c713 Fix typedefs pointing to parameterized classes (#4747)
* Skip handling of ClassOrPackageRef nodes that point to Typedefs
2023-12-08 07:13:38 -05:00
Ryszard Rozak d3142736c8 Tests: Add a test for type parameters in virtual interfaces (#4746) 2023-12-08 07:11:32 -05:00
Ryszard Rozak 1ececf1127 Support multiple parameters in virtual interfaces (#4745) 2023-12-07 13:56:16 +01:00
Geza Lore a09f7713ce Fix race in t_interface_virtual_sched_ico 2023-12-06 16:32:22 +00:00
Geza Lore f3bace10ae Improve V3Premit performance etc. (#4736)
- Enable creating constant pool entries for RHS of simple
  var = const assignments
- Never extract ArraySel (it's just pointer arithmetic)
- Remove unnecessary AstTraceInc precond child tree
- Always fully recurse expressions (fix transplanted from #4617)
- General cleanup

Overall the patch is performance neutral to slightly positive, but saves
~10% peak Verialtor memory usage due to not creating temporaries (which
are later expanded) for any ArraySels.
2023-12-06 09:42:46 -05:00
Wilson Snyder 39d9bd4d47 Internals: V3LinkDot fix missing restorer. 2023-12-06 08:29:33 -05:00
Ryszard Rozak eb2cfe1d19 Support parameterized virtual interaces (#4047) (#4743) 2023-12-06 08:02:04 -05:00
Ryszard Rozak ca5a7d7656 Add class name in the error msg about calling 'new' on virtual class (#4739) 2023-12-05 16:31:59 +01:00
Krzysztof Bieganski ea2084392f Support --timing triggers for virtual interfaces (#4673) 2023-12-04 22:11:07 -05:00
Geza Lore 5d99534d54 Improve W primitive operations with -Oz (#4733) 2023-12-02 22:59:30 +00:00
Geza Lore f048cff093 Add inline for VL_ATTR_ALWINLINE, even on non GNU-C platforms (#4734)
This is required to avoid multiple definition errors at link time for
functions defined in headers and marked VL_ATTR_ALWINLINE.
2023-12-02 21:51:59 +00:00
Wilson Snyder f571181d36 Commentary: Changes update 2023-12-02 16:48:33 -05:00
Wilson Snyder fc9b66b078 Tests: Fix t_assigndly_dynamic_notiming_bad to survive new dead code elimination 2023-12-02 15:57:38 -05:00
Wilson Snyder f039a94744 Tests: Add _bad to some negative tests. 2023-12-02 09:48:06 -05:00
Wilson Snyder b4baa7ce02 Internals: Avoid extranious base class calls in recent commit. 2023-12-01 19:05:21 -05:00
Krzysztof Boroński bd38c8fe3c Fix # 0 delays for process resumption, etc. (#4697) 2023-12-01 13:08:58 -05:00
Todd Strader 9a0748d8ed vpi_iterate packages with vpiInstance (#4726) 2023-12-01 07:34:09 -05:00
Wilson Snyder feae9ca4aa Internals: Use astgen for cross-node pointers. No functional change intended. (#4727) 2023-11-30 19:58:16 -05:00
Ryszard Rozak d1ee9827a0 Fix block names of nested do..while loops (#4728) 2023-11-30 14:32:12 +01:00
Todd Strader 1fe591ae20 fix --rrsim (#4725) 2023-11-30 07:15:12 -05:00
Krzysztof Bieganski b820e1b587 Support iff in sensitivity list (#1482) (#4626)
Adds a new field to `AstSenItem` that stores the `iff` condition which is then handled by `SenExprBuilder`.

Signed-off-by: Krzysztof Bieganski <[email protected]>
2023-11-29 19:10:32 +01:00
Ryszard Rozak ebfc2a4942 Fix parameter passing to ports (#4723)
Signed-off-by: Ryszard Rozak <[email protected]>
2023-11-29 17:07:23 +00:00
Wilson Snyder 7167d4bdc0 Fix shift of > 32-bit number (#4719). 2023-11-27 21:41:32 -05:00
Wilson Snyder a022b672a0 Fix 0**0 with wide numbers (#4721). 2023-11-26 17:11:22 -05:00
William D. Jones a7a48221d3 Fix Windows include gates in filesystemFlush implementation. (#4720) 2023-11-26 05:26:20 +01:00
Wilson Snyder e5118661a7 Commentary 2023-11-24 13:02:05 -05:00
Wilson Snyder 58d9a5ebac Use newline instead of endl, for fewer stream flushes 2023-11-24 11:45:52 -05:00
Wilson Snyder fae7f11222 Fix compilers seeing empty input due to file system races (#4708). Part 2. 2023-11-22 05:18:13 -05:00
Wilson Snyder 1986e62477 Internals: Remove unused append dumpTreeFile option 2023-11-21 22:32:13 -05:00
Wilson Snyder 0ee2a0e6d7 Don't remove DepSet as messes with skip-identical, part of last commit 2023-11-21 22:08:47 -05:00
Wilson Snyder 2b28ddd0c6 Fix MSWIN compile in last commit 2023-11-21 21:49:36 -05:00
Wilson Snyder b15ef49c57 Fix compilers seeing empty input due to file system races (#4708). 2023-11-21 21:22:35 -05:00
Wilson Snyder ed05caec93 Rename __hier*.f files to match other generated files 2023-11-21 20:31:54 -05:00
Wilson Snyder 25ca965938 Commentary 2023-11-21 19:17:39 -05:00
github action ead27db9f0 Apply 'make format' 2023-11-21 02:02:56 +00:00
Jinyan Xu 4650105d90 Fix conflicted namespace for coroutines (#4701) (#4707) 2023-11-20 21:02:10 -05:00
Krzysztof Bieganski b8417abee5 Fix dynamic NBAs with automatic vars (#4696)
This patch addresses two issues with NBAs in non-inlined functions/tasks:
- If the NBA writes to a local automatic var, the var could cease to exist before the NBA executes. This is normally addressed by fork dynscopes (#4356), but NBA-to-fork transformation happens way after `V3Fork` (in `V3Timing`). To solve this, we put NBAs that write to locals under forks in `V3Fork` already. This way, such locals will be put in dynscopes, and will still exist after the task containing the NBA exits.
- The above change means that any writes in forks other than `fork..join` should be handled by `V3Fork`. Thus, in `V3SchedTiming`, we only have to worry about read references, so we can simply copy all remaining locals. Because we copy, lifetimes are not an issue. This fixes a bug that allowed assignment intravals to be overwritten if they go out of scope in the containing function.
2023-11-16 11:21:23 +01:00
Krzysztof Boroński cc982ec7fe Fix range access to fields under classes that depend on parameter resolution (#4681)
Signed-off-by: Krzysztof Boronski <[email protected]>
2023-11-15 14:24:41 +01:00
Ryszard Rozak 2dba76a7c2 Fix access type of function arguments (#4692) (#4694) 2023-11-14 17:02:13 -05:00
Wilson Snyder 9fd5634778 Internals: Remove unneeded private's. No functional change 2023-11-13 21:37:45 -05:00
Wilson Snyder c8063e5732 Internals: Misc cleanups in V3Graph and V3Dead. No functional change. 2023-11-12 22:08:08 -05:00
Wilson Snyder ee3ba7c761 Internals: Use faster VNVisitorConst where able. No functional change intended. 2023-11-12 18:26:40 -05:00
Geza Lore 2882737bcd V3Const: Fix select into And/Or/Xor pattern (#4689) 2023-11-12 19:41:18 +00:00
Geza Lore 47588f343b astgen: Enforce the use of aliased operand accessors (#4688)
This patch enforces the use of the most specific accessors for operands
which have an '@astgen alias' declaration, by making the superclass
accessors of the same operands private. This ensures client code is
cleaner as you can't use multiple different methods to reference the
same operands (which we used to in some places). Also prep for some
refactoring.
2023-11-12 18:30:48 +00:00
Geza Lore 1c0af6c7bc Reduce peak memory use of V3Subst (#4687)
V3Subst is currently the pass responsible for peak memory usage. This
patch saves ~16% of peak memory on OpenTitan.

2 changes:
- It is actually safe to delete the substituted expressions immediately,
  but this is the lesser contribution
- More importantly, we only ever substitute STMTTEMP variables, which
  are always defined within the same CFunc, so we can limit the scope of
  the optimization to CFunc. This allows us to reclaim the SubstVarEntry
  structures at the end of every CFunc, rather than at the end of the
  whole pass, which gives us most of the memory savings.

Generated output is identical
2023-11-12 16:01:07 +00:00
Geza Lore b07ffb3c78 Cleanup V3Gate (#4667) (#4685)
Lot of redundant/dead/obsolete code here. NFCI, but contains some minor
bug fixes.
2023-11-12 15:29:25 +00:00
Geza Lore bea82def10 Add node memory usage info to V3Stats (#4684) 2023-11-12 14:19:53 +00:00
Wilson Snyder 671a857560 Fix compiler warning on 'wait' with non-zero constant. 2023-11-12 08:44:55 -05:00
Wilson Snyder eff2d977c1 Fix mis-elimination of variables across randomize() 2023-11-12 07:32:08 -05:00
Wilson Snyder 30a0d62436 Fix assignment of class reference to itself causing double free.
Test in next commit.
2023-11-12 07:30:56 -05:00
Wilson Snyder 91d0f25442 Internals: Fix style of iterator. No functional change. 2023-11-11 20:52:23 -05:00
Wilson Snyder 4a10c9ef6f Internals: Rename. No functional change. 2023-11-11 20:47:10 -05:00
Wilson Snyder 9d7f5bdc26 Internals: Dump CFunc entry points. 2023-11-11 20:34:51 -05:00
Wilson Snyder 99dbd23f1b Support passing constraints to --xml-only output (still otherwise unsupported) (#4683) 2023-11-11 20:20:37 -05:00
Wilson Snyder 673f086e87 Commentary: Update contributors. 2023-11-11 18:49:51 -05:00
Wilson Snyder 4103925835 Commentary: add docs/README.rst 2023-11-11 17:19:27 -05:00
Wilson Snyder cad2780219 Fix display with no % printing assoc array (#4376). 2023-11-11 15:28:44 -05:00
Wilson Snyder 4636a7f14b Internals: Fix uninitalized variables (#4636) 2023-11-11 14:58:54 -05:00
Wilson Snyder a64bdf50fb Commentary 2023-11-11 14:48:51 -05:00
Wilson Snyder 706534ffe1 Fix 'for' loop with outside variable reference (#4660). 2023-11-11 14:47:54 -05:00
Wilson Snyder 4286af3599 Commentary: Changes update 2023-11-11 10:38:37 -05:00
Wilson Snyder 9a0254a118 Optimize timing-delayed queue (#4584). (#4669) 2023-11-11 10:04:10 -05:00
Wilson Snyder f3ae4b8786 Fix spelling 2023-11-10 23:25:53 -05:00
Anthony Donlon 6566e853cd Support ccache when compiling Verilator with CMake (#4678) 2023-11-09 21:05:36 -05:00
Anthony Donlon ab06ace1f6 Fix trace when using SystemC with certain configurations (#4676) 2023-11-09 07:48:23 -05:00
David Ledger 9a65ed4ce2 Fix Mingw Compilation (#4675) 2023-11-08 06:27:56 -05:00
Marlon James 5ba7084815 Fix VPI TOP level variable iteration (#3919) (#4618) 2023-11-07 07:47:55 -05:00
Wilson Snyder dc10118d3b Fix C++20 compilation errors (#4670) 2023-11-06 07:13:31 -05:00
Wilson Snyder 27102ea0fb CI: Combine lint and build workflows (#4671) 2023-11-06 07:13:00 -05:00
Geza Lore c563175ff0 Fix scheduling of external force signals (#4668)
Used to set the wrong public flag on forceEn/forceVal, which means they
were not included in ICO as necessary, but V3Gate tended to inline them,
so this was hard to hit.

Fixes #4577
2023-11-05 16:58:22 +00:00
Krzysztof Boroński b110c55993 Fix a memory leak in V3Fork (#4628) 2023-11-05 11:39:06 -05:00
Geza Lore dc346b7ffa Remove deprecated options (#4663) 2023-11-04 17:28:36 +00:00
Anthony Donlon 88fcbf5f1d Fix interface parameters used in loop generate constructs (#4664) (#4665) 2023-11-04 13:19:35 -04:00
Wilson Snyder eace1d9c67 Internals: Use UINFO for preproc debug, to avoid stderr/cout output reordering confusion. 2023-11-04 10:51:14 -04:00
Anthony Donlon d0d39c13e7 Fix linking parameterized hierarchical blocks and recursive hierarchical blocks (#4654) 2023-11-03 07:55:53 -04:00
Anthony Donlon 2733d43ea7 Fix identifiers that end with '_' on Windows (#4655) 2023-11-02 17:53:52 -04:00
Geza Lore ae6ec411d0 Remove dead code from V3EmitV 2023-11-02 20:25:44 +00:00
Geza Lore 8a77af7a6d Remove redundant user*ClearTree calls 2023-11-02 19:16:48 +00:00
Wilson Snyder 2a57ead7e3 Commentary (#4517) 2023-11-01 17:43:11 -04:00
Wilson Snyder 839315b271 devel release 2023-10-31 19:53:03 -04:00
Wilson Snyder 67dfa37c56 Version bump 2023-10-31 19:50:01 -04:00
Wilson Snyder 590188820d Commentary: Changes update 2023-10-31 19:49:40 -04:00
Ryszard Rozak a764c70b4a Fix handling of static keyword in methods (#4649) 2023-10-31 08:15:54 -04:00
Wilson Snyder a27abab65f Fix PCH to recompile on version change 2023-10-31 08:10:41 -04:00
Wilson Snyder c241ec90ec Commentary: Changes update 2023-10-30 22:10:03 -04:00
Krzysztof Bieganski f789d28277 Fix signals read via virtual iface optimized out (#4645)
Signed-off-by: Krzysztof Bieganski <[email protected]>
2023-10-30 21:26:46 -04:00
Wilson Snyder c1c8b30a35 CI: Add lint-py action (#4640) 2023-10-30 08:02:54 -04:00
Wilson Snyder 15046c6c59 Commentary: Icarus URL (#4639) 2023-10-30 08:01:12 -04:00
Ícaro Lima 1da15181da Update CONTRIBUTORS (#4641) 2023-10-29 16:44:42 -04:00
Wilson Snyder 3c6b755352 Tests: Rename t_opt_dead 2023-10-29 09:42:52 -04:00
Geza Lore 3c144ada53 Delete AstNode user5 (#4638)
This saves about 5% memory. V3AstUserAllocator is appropriate for most use
cases, performance is marginally up as we are mostly D-cache bound on
large designs.
2023-10-29 01:12:27 +01:00
Wilson Snyder 7ba6647c4f Internals: Cleanup some V3Graph constructors/funcs and docs. No functional change. 2023-10-28 20:11:28 -04:00
Geza Lore e708670f9a Minor memory optimizatoin of AstUser*Allocator 2023-10-28 20:31:57 +01:00
Geza Lore de4c6065dc make: add test-snap/test-diff targets (#4635) 2023-10-28 15:58:29 +01:00
Geza Lore d60f180f43 Avoid double traversal of maps
The typical find/if-not-exists-insert pattern can be achieved with 1
lookup instead of 2 using emplace with a sentinel value. Also maps value
initialize their values when inserted with the [] operator, this is
defined and so there is no need to explicitly insert zeroes for integer
values.
2023-10-28 13:41:43 +01:00
Geza Lore 30318a6654 C++11 cleanup 2023-10-28 11:26:48 +01:00
Geza Lore d8420413b7 test: fix FST trace file names 2023-10-28 10:40:07 +01:00
Geza Lore a5951babfc test: make output deterministic 2023-10-28 10:36:30 +01:00
Geza Lore 2cba167634 Make eval loop construction more unified and the output more readable 2023-10-28 08:48:04 +01:00
Krzysztof Boroński 89743aae5d Fix stable name generation in V3Fork (#4615) (#4624) 2023-10-27 15:08:02 -04:00
Ryszard Rozak e6135981a5 Fix dynamic casts of null values (#4631) 2023-10-27 15:58:40 +02:00
Kamil Rakoczy 739521333c Tests: Fix clang_check_attributes missing dataclass decorator (#4604) (#4611) 2023-10-27 08:24:27 -04:00
Ryszard Rozak 64af83161a Fix rand fields of reference types (#4627) 2023-10-26 17:17:23 -04:00
Chih-Mao Chen 98252634fc Include systemc instead of systemc.h in model header files (#4622) (#4623)
This may require that SystemC programs add:
using namespace sc_core;
using namespace sc_dt;
2023-10-26 14:36:18 -04:00
Krzysztof Boroński a87fb57656 Allow assigning events (#4403)
Signed-off-by: Krzysztof Boronski <[email protected]>
2023-10-26 16:38:47 +02:00
Geza Lore 34708bbba1 Respect --dump-tree-addrids in tree dumps 2023-10-25 18:17:26 +01:00
Krzysztof BorońskiandWilson Snyder f91259f46d Fix insertion at queue's end (#4619)
Signed-off-by: Krzysztof Boronski <[email protected]>
Co-authored-by: Wilson Snyder <[email protected]>
2023-10-25 17:41:28 +02:00
Marlon James cf6e362972 Support VPI variables of real and string data types (#4594) 2023-10-24 20:46:20 -04:00
Geza Lore 95c4ade718 Unify code generation for trace declarations in both trace formats (#4612)
This patch adds some abstract enums to pass to the trace decl* APIs, so
the VCD/FST specific code can be kept in verilated_{vcd,fst}_*.cc, and
removed from V3Emit*. It also reworks the generation of the trace init
functions (those that call 'decl*' for the signals) such that the scope
hierarchy is traversed precisely once during initialization, which
simplifies the FST writer. This later change also has the side effect of
fixing tracing of nested interfaces when traced via an interface
reference - see the change in the expected t_interface_ref_trace - which
previously were missed.
2023-10-24 16:33:29 +01:00
Ryszard Rozak 84125d7c92 Fix virtual methods (#4616) 2023-10-24 15:51:46 +02:00
Geza Lore 17721aff55 Remove unused IMPLICITWIRE var type 2023-10-24 10:02:00 +01:00
Geza Lore d1b6224c2b Associate trace codes with function indices (#4610)
For each traced variable, also register the trace function index that
will write it.
2023-10-23 16:01:55 +01:00
github action 1bd31742b9 Apply 'make format' 2023-10-23 14:07:52 +01:00
Geza Lore 165a2ef1b8 Separate tracing of const values from non-const values
Some values emitted to the trace files are constant (e.g.: actual
parameter values), and never change. Previously we used to trace these
in the 'full' dumps, which also included all other truly variable
signals. This patch introduces a new generated trace function 'const',
to complement the 'full' and 'chg' flavour, and 'const' now only
contains the constant signals, while 'full' and 'chg' contain only the
truly variable signals. The generate 'full' and 'chg' trace functions
now have exactly the same shape. Note that 'const' signals are still
traced using the 'full*' dump methods of the trace buffers, so there is
no need for a third flavour of those.
2023-10-23 14:07:52 +01:00
Ryszard Rozak 774c10396c Fix try_put method of unbounded mailbox (#4608) 2023-10-23 14:33:22 +02:00
Marlon James 33c5b5feb8 Add sv_vpi_user.h from IEEE 1800-2017 Annex M (#4606) 2023-10-22 20:41:40 -04:00
Wilson Snyder b83b9974ee Fix gcc -O0 incompatible allocator warning 2023-10-22 09:51:02 -04:00
Wilson Snyder bcbe5059a9 Internal: V3Graph style cleanup. No functional change 2023-10-22 09:50:38 -04:00
Wilson Snyder 5bda901146 Internals: Fix stats report to include main AstCFile made 2023-10-21 20:56:24 -04:00
Geza Lore 82565690c7 test driver.pl: don't redirect to STDOUT of interactive GDB 2023-10-22 00:56:10 +01:00
Geza Lore 978d900e36 Simplify and fix code stats
V3Stats for "fast" code have bit-rotted a little and is causing some
problems with tests that rely on stats outputs. The problem is that not
all code is necessarily reachable from eval() any more (due to the
complexity of some the features added over the past few years), so it
might miss some things, as for measuring the "fast" code, it is trying
to trace the execution paths via calls, starting from eval(). It also
appears the fast code can also contain calls to slow code in some
circumstances.

To avoid all that, removed trying to trace dynamic execution, and simply
report the static node counts, which is enough for testing.

Similarly, the variable counts are somewhat dubious, as they don't
include all data types, or all instances of a module in some stages.
Removing these as they are not widely used nor dependable. More specific
stats can be added if required and can be well defined.
2023-10-22 00:25:07 +01:00
Geza Lore d330100542 Create implicit nets for inputs of gate primitives.
Prior to this we failed to create implicit nets for inputs of gate
primitives, which is required by the standard (IEEE 1800-2017 6.10).
Note: outputs were covered due to being modeled as the LHS of
assignments, which do create implicit nets.
2023-10-21 22:45:26 +01:00
Geza Lore 4c0edd2efb Improve --prof-exec infrastructure and report
Again --prof-exec have bit-rotted a little with all the recent changes
to the structure of the generated code. This patch contains a few
improvements:
- Repalce the eval/evl_loop begin/end events with generic
  section_push/section_pop events, that can be arbitrarily sprinkled
  into the generate code (so long as they are matched correctly) to
  measure various sections. The report then contains a nested profile
  of the sections, and the VCD trace shows the section names.
- Better handling of exec graphs
- Clearer overall statistics
2023-10-21 21:09:03 +01:00
Geza Lore 146cdc020d Remove V3AstConstOnly.h
This is now redundant with the introduction of VNVisitorConst
2023-10-21 20:41:46 +01:00
Geza Lore 52f2b9ef58 Remove pointless test
t_optm_if_cond was a test for a then non-existent optimization to merge
conditionals. V3MergeCond implements this and has its own tests.
2023-10-21 20:41:46 +01:00
Geza Lore a09506a0ad Trivial simplification of V3EmitCModel
Still some remains of the --threads 0 mode. Remove unnecessary complexity
from V3EmitCModel. (Also don't pretend there is an MTask in single
threaded mode, when there really isn't.)
2023-10-21 20:41:46 +01:00
Geza Lore 10d33238b9 Do not merge entry/exit MTasks during coarsening 2023-10-21 19:31:52 +01:00
Geza Lore b78ea06829 Make VL_LOCK_SPINS configurable
It's unlikely one value fits all use case, so making VL_LOCK_SPINS
configurable at model build time.

For testing, we reduce the value as we expect high contention.
2023-10-21 18:05:53 +01:00
Wilson Snyder eae942b91c Internals: Fix some lint-py warnings 2023-10-21 12:48:36 -04:00
Geza Lore 1075b006b5 Consider children of AstConcat in V3InstrCount
Previously V3InstrCount used to completely ignore an AstConcat,
including its children (see the rational in the comment). The problem is
the operands can be huge and expensive compound expressions (especially
since DFG), and not just a simple variable reference. This fix gains
some MT speed improvement.
2023-10-21 17:15:40 +01:00
Wilson Snyder afaa02709c CI: Increase CCACHE_MAXSIZE (#4595) 2023-10-21 10:38:46 -04:00
Wilson Snyder 332a687aef Commentary 2023-10-21 10:35:07 -04:00
Geza Lore d1c7875406 Fix conditionals on obsolete --threads 0
Since we removed --threads 0 support, the 'threads()' option always
returns a value >= 1. Remove corresponding dead code.

Some of the coverage counters appear to use atomics even if the model is
single threaded. I'm under the impression this was a bug originally so
those ones I changed to use threads() > 1 instead.
2023-10-21 15:14:27 +01:00
Geza Lore cbc2f9eb32 Do not overwrite LD_LIBRARY_PATH in t_flag_ldflags 2023-10-21 11:34:36 +01:00
Quentin Corradi 26e3785963 Fix PLI/DPI user defined system task/function grammar (#4587) (#4588)
According to 1800-2017 36.3, 1800-2017 A.9.3, 1364-2005 20.2 and 1364-2005 A.9.3, user defined system task and function identifiers can use the same character set for the second character as all the following characters.
2023-10-21 02:43:49 -04:00
Wilson Snyder f8b7fb72b8 Fix fault on empty clocking block (#4593). 2023-10-21 02:40:08 -04:00
Krzysztof Bieganski 7b12f6a1dd Support NBAs in non-inlined functions/tasks (#4496) (#4572) 2023-10-20 20:01:45 -04:00
Mariusz Glebocki c7a0613c57 Support Clang 16 (#4592) 2023-10-20 15:47:09 -04:00
Aleksander Kiryk 83a0085c4d Support wait fork (#4586) 2023-10-20 07:13:57 -04:00
Wilson Snyder 05bb7fa821 Tests: Use UVM with UVM_NO_DPI defined 2023-10-20 02:37:11 -04:00
Wilson Snyder 4cc42133b5 Internals: Rename some parser rules. No functional change. 2023-10-19 20:13:27 -04:00
Wilson Snyder a773a52559 Cleanup some IEEE references 2023-10-19 19:26:36 -04:00
Wilson Snyder 5af271cf3a Fix display optimization ignoring side effects (#4585). 2023-10-19 18:33:58 -04:00
Wilson Snyder 0c2bab1f69 Fix method narrowing conversion compiler error (#4568). 2023-10-18 17:51:25 -04:00
Wilson Snyder b7233d063f Internals: Fix same() called outside of sameTree (#4561). 2023-10-18 17:36:21 -04:00
Krzysztof Bieganski 8720841c48 Fix to not remap local assign intravals in forks (#4583) 2023-10-18 16:49:20 -04:00
Wilson Snyder 263697e491 Commentary (#4580) 2023-10-18 08:15:55 -04:00
Wilson Snyder 493f1da266 Fix compile warning on unused member function variable (#4567). 2023-10-18 08:09:54 -04:00
Wilson Snyder 8b44a54bb2 Support Verilated precompiled header compilations (#4580) 2023-10-18 08:08:15 -04:00
Wilson Snyder b5828a7ce9 Fix header order botched by clang-format in recent commit. 2023-10-18 06:37:46 -04:00
Wilson Snyder 51a18225ad cmake: Fix missing headers 2023-10-18 06:37:38 -04:00
Wilson Snyder 28625451dd Fix MSVC makefile list (part of previous commit) 2023-10-18 06:07:05 -04:00
Wilson Snyder 3914176bc4 Internals: Remove unused IGNORED to fix MSVC warning. No functional change intended. 2023-10-18 06:06:00 -04:00
Wilson Snyder 13989b965d Tests: Add --binary with split, to check parallel builds 2023-10-17 23:13:04 -04:00
github action 770cd24f27 Apply 'make format' 2023-10-18 02:50:27 +00:00
Wilson Snyder 431bb1ed16 Support compiling Verilator with gcc/clang precompiled headers (#4579) 2023-10-17 22:49:28 -04:00
Ryszard Rozak 3bb9c7ee92 Fix dictionaries with keys of class types (#4576) 2023-10-17 17:15:24 +02:00
Ryszard Rozak 45edcbb03e Fix logical expressions with class objects - caching in v3Const (#4552) 2023-10-17 07:38:45 -04:00
Ryszard Rozak e99fd2892b Make VNDeleter a member of VNVisitor. No function change. (#4573) 2023-10-17 09:26:53 +02:00
Krzysztof Bieganski 99ea16d7fd Fix dynamic triggers for named events (#4571) 2023-10-16 11:06:41 -04:00
Krzysztof Bieganski bc9ff6d1bf Fix interface comparison (#4570) 2023-10-16 11:05:39 -04:00
Aleksander Kiryk ad3bcbb1bb Support disable fork (#4125) (#4569) 2023-10-16 14:02:29 +02:00
Yutetsu TAKATSUKASA 25dde58297 Internals: Use VN_AS instead of static_cast. Fix some wrong types. (#4561) 2023-10-16 05:17:52 -04:00
Anthony Donlon bba3487dc4 Internals: Fix hash and comparison function for AstBasicDType (#4564) 2023-10-15 15:15:46 -04:00
Anthony Donlon 4fdaa46328 Fix using functions/tasks following class definition inside module (#4553) 2023-10-15 13:01:32 -04:00
Anthony Donlon 4427f03b08 Fix error message for invalid parameter overrides (#4559) 2023-10-15 12:59:36 -04:00
Yutetsu TAKATSUKASA 4e2c63c8cb Support concatenation of unpacked arrays (#4558) 2023-10-15 12:53:35 -04:00
github action afecde87d8 Apply 'make format' 2023-10-15 11:00:14 +00:00
Wilson Snyder c14eae6d56 Add SIDEEFFECT warning on mishandled side effect cases (#487 partial) 2023-10-15 06:44:35 -04:00
Wilson Snyder 684aba0e90 Fix purity calculation during V3Const simplifying Ast 2023-10-15 06:25:42 -04:00
Wilson Snyder 46f8a659b3 Fix shift to remove operation side effects (#4563). 2023-10-14 22:34:37 -04:00
Wilson Snyder 3940a214d0 Internals: Reorder some shift functions for next commit. No functional change. 2023-10-14 22:23:58 -04:00
Wilson Snyder 411f563cbe Internals: Remove unneeded pure checks. No functional change. 2023-10-14 22:23:58 -04:00
Wilson Snyder b5a6b34968 Tests: Remove old hack from before unpacked structs 2023-10-14 22:23:58 -04:00
github action fa8eaf7355 Apply 'make format' 2023-10-14 19:20:22 +00:00
Wilson Snyder 7eb09c3445 Fix instance arrays connecting to array of structs (#4557). 2023-10-14 15:19:19 -04:00
Varun Koyyalagunta edfd3d7206 Fix large constant buffer overflow (#4556) 2023-10-13 07:08:58 +09:00
Wilson Snyder d699caf255 Revert fix Verilated Makefile to get CXX etc. from environment (#4549) (#4554). 2023-10-12 04:22:58 -04:00
Wilson Snyder bd4eede6b4 Commentary: Changes update 2023-10-10 20:43:32 -04:00
Wilson Snyder 1fd8e772b0 Fix loss of warning source content with `line enter (due to earlier commit 472ad90d83). 2023-10-10 20:40:21 -04:00
Anthony Donlon 7ce0bd1181 Fix broken link error for enum references (#4551) 2023-10-10 17:55:40 -04:00
Gus Smith a4b7c39a9a Fix Verilated Makefile to get CXX etc. from enviorment (#4549) (#4554) 2023-10-10 17:53:02 -04:00
Mariusz Glebocki a5ee8b39ef Internals: Remove use of V3Width code from V3AstNodes (#4537). No functional change intended.
`getCommonClassTypep` and its helper code has been moved to AstNode
class. This is a lot better place for this functionality. Moreover, it
allowed to get rid of the dependency on V3Width from generic AST-related
code.
2023-10-09 17:43:27 -04:00
Ryszard Rozak 5b06c60318 Internals: Change deleteTree to pushDeletep (#4548). No functional change intended. 2023-10-09 09:45:09 -04:00
Wilson Snyder b306715b4a Optimize empty expression statements (#4544). 2023-10-09 05:50:31 -04:00
Wilson Snyder 8d99bdac25 Internals: Move afterCommentp to AstNode. No functional change. 2023-10-09 05:03:57 -04:00
github action e114dfda6d Apply 'make format' 2023-10-09 08:14:14 +00:00
Wilson Snyder 472ad90d83 Change lint_off to not propagate upwards to files including where the lint_off is. 2023-10-09 04:12:01 -04:00
Wilson Snyder 622f0c047c Fix reporting `line at wrong spot. Rework some internal fileline parsing functions. 2023-10-08 20:38:45 -04:00
Wilson Snyder 7f38414276 Internals: Rename addIgnoreMatch. No functional change. 2023-10-08 01:02:23 -04:00
Wilson Snyder 1d3d59243c Fix preprocessor to show `line 2 on resumed file per IEEE. 2023-10-07 14:29:46 -04:00
Wilson Snyder e2343c03e0 Internals: Create V3WidthCommit from overly fat header. No functional change intended. 2023-10-06 23:18:26 -04:00
Wilson Snyder 0e0df1fb3b Fix enum functions in localparams (#3999). 2023-10-06 22:38:46 -04:00
Wilson Snyder 800a789f50 Fix inlining of real functions miscasting (#4543). 2023-10-06 21:33:31 -04:00
Wilson Snyder 106664b942 Internals: Fix long lines. No functional change. 2023-10-05 20:07:53 -04:00
Ryszard Rozak 1c738c6b83 Fix object destruction after a copy constructor (#4540) (#4541) 2023-10-05 07:21:33 -04:00
Wilson Snyder 25fa1d7c6a Commentary: Changes update 2023-10-04 20:17:14 -04:00
Wilson Snyder 45162652de Commentary 2023-10-04 20:13:59 -04:00
Wilson Snyder 537650a2cd Fix stream of 32 bit (#4536). 2023-10-03 22:10:50 -04:00
Todd Strader f849073137 Fix non-inlined interface tracing (#3984) (#4530) 2023-10-03 19:55:25 -04:00
Ryszard Rozak a3c154dcd3 Fix this in a constructor (#4533) 2023-10-03 14:32:18 +02:00
Ryszard Rozak 1b8228b642 Fix stream operations with operands of struct type (#4531) (#4532) 2023-10-03 07:23:20 -04:00
Wilson Snyder 732d03f4e5 Fix conversion of integers in $display %e (#4528). 2023-10-01 13:00:16 -04:00
Wilson Snyder 33787c6add Internals: Fix number nodep cloning, and assert stays consistent (#4528 partial) 2023-10-01 12:46:35 -04:00
Ryszard Rozak 44e7d2ebe6 Internals: rename VPurity class and related functions. No functional change (#4523) 2023-09-29 12:23:51 +02:00
Wilson Snyder e49ae663a6 Fix constification of $realtobits, $bitstoreal (#4522). 2023-09-28 22:45:00 -04:00
Wilson Snyder 2385ab8294 Tests: randc now supported 2023-09-26 22:53:25 -04:00
Wilson Snyder 84ccb23098 Fix C++11 compiler constexpr return error 2023-09-26 22:43:17 -04:00
Wilson Snyder ad343f8260 Add warning on interface instantiation without parens (#4094). 2023-09-26 22:15:48 -04:00
Wilson Snyder 018d766179 Fix clang error (#4462) 2023-09-26 21:07:43 -04:00
Justin Thiel a948be184c Tests: Add t_interface_localparam_unsup (#3857 partial) (#3858) 2023-09-26 20:35:23 -04:00
Wilson Snyder 72b4a74245 Fix clang error on last commit 2023-09-26 19:58:09 -04:00
Wilson Snyder 36c824d973 Add trace() API even when Verilated without --trace (#4462). 2023-09-26 18:37:50 -04:00
Anthony Donlon 229ce1aecf Fix handling input file path separator (#4515) (#4516) 2023-09-26 15:42:15 -04:00
Anthony Donlon be45a9b7d5 Style: Update clang-format config to make formatted code consistent between versions. No functional change (#4520) 2023-09-26 15:05:57 -04:00
Wilson Snyder d2c72a7f21 CI: Disable m32 runs 2023-09-25 12:30:25 -04:00
Anthony Donlon 60e9827ffe Support converting parameters inside modules to localparams (#4511) 2023-09-25 11:39:04 -04:00
Wilson Snyder a9256d4758 CI: Disable m32 runs 2023-09-25 11:28:44 -04:00
Anthony Donlon 750b5be5d3 Remove support for parameterized UDPs (#4518) 2023-09-25 10:40:44 -04:00
Mariusz Glebocki 28bd7e5b19 Rework multithreading handling to separate by code units that use/never use it. (#4228) 2023-09-24 22:12:23 -04:00
Anthony Donlon d64c023099 CI: Cancel previous runs for pull requests automatically (#4512) 2023-09-23 11:50:05 -04:00
Wilson Snyder 429cb1f7f7 Commentary (#4517) 2023-09-23 09:04:35 -04:00
Wilson Snyder 9f75068059 Cleanup some error messages to properly quote 2023-09-23 08:52:50 -04:00
Ryszard Rozak 4636e9cffb Fix passing arguments by reference (#3385 partial) (#4489) 2023-09-20 07:33:11 -04:00
Wilson Snyder 4b2bf556d8 Tests: Revert UVM upstream (chipsalliance/uvm-verilator#7) 2023-09-20 07:32:21 -04:00
Kamil Rakoczy a16ea94836 Fix detecting local vars in nested forks (#4493) (#4506) 2023-09-19 17:32:42 -04:00
Michal Czyz b9ea249f81 Rewrite usage of annotation options (#4486) (#4504) 2023-09-19 09:08:17 -04:00
Wilson Snyder 470f480bc1 Fix -m32 compile issue 2023-09-19 07:23:35 -04:00
Wilson Snyder 24ff3155ae Support randc (#4349). 2023-09-18 21:17:21 -04:00
Ryszard Rozak 47b3f464a9 Disable conversion of impure logical expressions to bitwise expressions (#487 partial) (#4437) 2023-09-18 09:21:30 -04:00
github action cd201f8eb8 Apply 'make format' 2023-09-18 01:44:43 +00:00
Wilson Snyder 016278a759 Commentary 2023-09-17 21:43:00 -04:00
Wilson Snyder b68f101e81 Support preprocessing __LINE__ 2023-09-17 19:49:38 -04:00
Wilson Snyder ab13548018 Support resizing function call inout arguments (#4467). 2023-09-17 18:23:44 -04:00
Wilson Snyder f507ee56b0 Fix warning in configure sc_main compile. (#4499) 2023-09-17 08:01:54 -04:00
Wilson Snyder 761adf1cf0 Internals: Add cloneTreePure to prepare for side effect check.
Use cloneTreePure when what is being cloned must be side-effect free.
Use cloneTree when safe to contain side effects (e.g. cloning module).
2023-09-16 22:50:54 -04:00
Wilson Snyder cd1fe64e6c devel release 2023-09-16 21:46:01 -04:00
Wilson Snyder 8f43e74288 Update CMakeList version 2023-09-16 20:54:54 -04:00
Wilson Snyder cef3960a4e Version bump 2023-09-16 18:36:39 -04:00
Wilson Snyder 783b7ecdab Fix clang override warning (last commit) 2023-09-16 17:52:02 -04:00
Wilson Snyder 8bd1c63b32 Support function non-constant default arguments (#4470). 2023-09-16 17:37:25 -04:00
Wilson Snyder e6fb7e970d Fix recursive display causing segfault (#4480). 2023-09-16 10:10:21 -04:00
Wilson Snyder 891cc0f9b6 Fix t_dist_cppstyle Perl performance issue (#4085). 2023-09-16 09:22:12 -04:00
Wilson Snyder 10fbe74cef Commentary: Changes update 2023-09-15 23:25:28 -04:00
Wilson Snyder 05d04a3959 Internals: Fix misnamed member. No functional change. 2023-09-15 23:02:34 -04:00
Wilson Snyder 19f7279542 Fix false INFINITELOOP on forever..mailbox.get() (#4323). 2023-09-15 22:05:55 -04:00
Wilson Snyder aa608472ae Support recursive function calls (#3267). 2023-09-15 20:46:31 -04:00
Wilson Snyder 26ed2a06a0 Tests: Add UVM test that generates ok with known issues commented out. (#1538) (#3267) (#4125) (#4323) (#4349) (#4465) (#4467) (#4468) (#4470) (#4493) (#4494) (#4495) (#4496) (#4497) 2023-09-15 20:26:46 -04:00
Wilson Snyder 07013da13d Tests: Disabled test (#4493) 2023-09-15 19:56:05 -04:00
Wilson Snyder d840c612d4 Fix IGNOREDRETURN to not warn on void-cast static function calls. 2023-09-15 19:01:11 -04:00
Wilson Snyder 188cf85b3f Suppress some debug unknown hash/simulate warnings in UVM. 2023-09-15 18:33:02 -04:00
Wilson Snyder c52ba28dd0 Tests: Fix commentary to unify issue references. 2023-09-15 18:12:11 -04:00
Wilson Snyder 10c1653e72 Fix ZERODLY to not warn on 'wait(0)'. 2023-09-15 08:53:29 -04:00
Wilson Snyder 2fbd41e13b Tests: Add t_queue_persistence.pl as broken test (#3385) (#4489) 2023-09-15 07:59:06 -04:00
Ryszard Rozak 96857c5f95 Fix the error message when the type of ref argument is wrong (#4490) 2023-09-15 07:17:24 -04:00
Wilson Snyder 131eb319e0 Tests: Advance UVM through V3LinkDot Param (#1538 partial) 2023-09-14 20:09:43 -04:00
Wilson Snyder 6e589377f4 Fix reference to extended class in parameterized class (#4466). 2023-09-14 20:07:49 -04:00
Wilson Snyder 2c84b37bf7 Internals: Rename some V3LinkDot variables. No functional change. 2023-09-14 20:06:20 -04:00
Kamil Rakoczy 0d67caff77 Internals: V3Task: refactor common code to connectPort. No functional change intended (#4488)
Signed-off-by: Kamil Rakoczy <[email protected]>
2023-09-14 07:24:49 -04:00
Anthony Donlon 3dde57d539 Fix lint of case statements with enum and wildcard bits (#4464) (#4487) 2023-09-14 07:22:49 -04:00
Kamil Rakoczy ec2e3ec0e4 Update clang_check_attributes to take into account MT_DISABLED (#4479) 2023-09-13 16:32:18 -04:00
Kamil Rakoczy 9fe459c820 Internals: V3LockGuard: Add constructor for adopting already locked mutex. (#4476) 2023-09-13 13:52:59 -04:00
Wilson Snyder 823e0723fb Internals: Remove legacy define. No functional change. 2023-09-13 08:46:51 -04:00
Kamil Rakoczy 8bd6d7c5b1 Internals: Add V3ThreadSafety (#4477) 2023-09-13 07:57:48 -04:00
Wilson Snyder 839a8fa4d9 Fix error on enum with VARHIDDEN of cell (#4482). 2023-09-12 17:47:57 -04:00
Krzysztof Boroński 24917a187a Fix V3CUse, do not consider implementations (.cpp) at all (#4386) 2023-09-12 17:59:57 +02:00
Ryszard Rozak 6c6f03cf7c Fix static cast from a stream type (#4469) (#4485) 2023-09-12 11:06:12 -04:00
Kamil RakoczyandMariusz Glebocki 5676443139 Internals: Rename and slightly change other threads stopping/resuming methods. (#4478)
Co-authored-by: Mariusz Glebocki <[email protected]>
2023-09-11 13:43:26 -04:00
Kamil RakoczyandMariusz Glebocki e77d847671 Check whether V3ERROR_NO_GLOBAL_ is not already defined. (#4475)
Co-authored-by: Mariusz Glebocki <[email protected]>
2023-09-11 09:01:34 -04:00
Kamil RakoczyandMariusz Glebocki 0baee84e96 Move dpiTemporaryVarSuffix() to header. (#4474)
Co-authored-by: Mariusz Glebocki <[email protected]>
2023-09-11 09:01:09 -04:00
Ryszard Rozak c446cc2596 Internals: Remove unused constructor. No functional change. (#4473)
Signed-off-by: Ryszard Rozak <[email protected]>
2023-09-11 07:10:33 -04:00
Ryszard Rozak b66c4153b1 Compute purity of AstCMethodHard (#4460) 2023-09-11 13:06:15 +02:00
Wilson Snyder d72f1b89fc Internals: Minor internal code coverage cleanups 2023-09-10 18:53:51 -04:00
Wilson Snyder b5b278d072 Fix fork crash with no init, test for (#4471) 2023-09-10 08:53:21 -04:00
Wilson Snyder cb5466a90b Tests: UVM passes V3Param stage 2023-09-09 11:54:55 -04:00
Wilson Snyder 4de25369da Tests: Add t_uvm_all 2023-09-08 22:29:23 -04:00
Wilson Snyder cdd8953085 Disable Subst when not pure 2023-09-08 21:52:33 -04:00
Wilson Snyder 2f2f0164ff Internals: Use specific types on some cloneTrees. No functional change. 2023-09-08 21:51:59 -04:00
Kamil Rakoczy 6e977e1024 Generate compile_commands.json using bear (#4463) 2023-09-08 17:26:11 -04:00
Krzysztof Boroński 70b11f91b4 Support block_item_declaration in forks (#4455) 2023-09-08 16:40:14 +02:00
Wilson Snyder 014301587f Unsupported instead of syntax error on parameter var initial values 2023-09-08 08:37:17 -04:00
Krzysztof Bieganski 139e93d371 Internals: Reduce the number of typechecks in graphs (#4398). No functional change intended. 2023-09-08 07:35:52 -04:00
Krzysztof Bieganski fb1fc46b06 Internals: Rework self pointers (#4396) 2023-09-08 07:34:35 -04:00
Wilson Snyder 9882ab6c67 Tests: Remove unstable new test 2023-09-08 07:22:52 -04:00
Ryszard Rozak 1a1f919882 Check the output in t_class_method_str_literal.v (#4459) 2023-09-08 08:51:54 +02:00
Ryszard Rozak 91227d26bb Internals: Rename pure to dpiPure. No functional change. (#4461) 2023-09-08 08:51:19 +02:00
Wilson Snyder 11b5dae88d Support let 2023-09-07 21:45:51 -04:00
Wilson Snyder 0c7d485417 Fix error printing internal name() 2023-09-06 21:07:06 -04:00
Ryszard Rozak c40e34b134 Support assignments of stream expressions on queues to packed values (#4458) 2023-09-06 15:25:48 +02:00
Wilson Snyder 6cdf8da3f7 Fix documentation line wrap (#4456) 2023-09-05 07:25:33 -04:00
Wilson Snyder c65265477f Tests: Enable cover named property 2023-09-03 21:02:42 -04:00
Wilson Snyder de77f1ee5c Improve error that assert-under-assert is unsupported 2023-09-03 09:08:43 -04:00
Wilson Snyder c8c980c49d Fix mis-warning on #() in classes' own functions. 2023-09-02 08:33:56 -04:00
Wilson Snyder ad329612fd Internals: Remove unnecessary cloneTree. 2023-09-01 20:13:20 -04:00
Wilson Snyder c324895cbc Internals: Remove unnecessary cloneTree. 2023-09-01 19:49:57 -04:00
Wilson Snyder 679a4314dc Tests: Avoid side effect on array index 2023-09-01 19:26:50 -04:00
Wilson Snyder 36932d31c4 Fix C++11 missing C++14's std::make_unique. 2023-09-01 18:07:15 -04:00
Wilson Snyder ed25aaaad9 Internals: Fix g++ std11 warning. No functional change. 2023-09-01 17:59:30 -04:00
Wilson Snyder 147aa41ba5 Internals: Fix virt call in constructor warning. No functional change. 2023-09-01 17:58:17 -04:00
Ryszard Rozak 5b7e32581b Internals: Cleanup V3Task. No function change intended. (#4454) 2023-09-01 08:03:16 -04:00
Wilson Snyder 2f90fb2bec Set lifetime for repeat variable (#4451 partial) 2023-08-31 18:34:37 -04:00
Wilson Snyder 8c480fd39e Internals: Fix cppcheck warnings 2023-08-31 18:29:58 -04:00
Krzysztof Bieganski ffbbd438ae Internals: Use runtime type info instead of dynamic_cast for faster graph type checks (#4397) 2023-08-31 18:00:53 -04:00
Anthony Donlon 96ee81fa3f Fix unstable output of VHashSha256 (#4453) 2023-08-31 13:42:37 -04:00
Wilson Snyder 3d2399ea0f Tests: Enable fixed-earlier (#2314) 2023-08-30 18:10:30 -04:00
Wilson Snyder 6d5dde8645 Fix duplicate Vfork functions (#4418) 2023-08-30 17:59:25 -04:00
Wilson Snyder 048c9f3fe2 Support extra commas before $display 2023-08-30 17:31:11 -04:00
Wilson Snyder 373265752f Fix display %x formatting of real. 2023-08-30 17:21:33 -04:00
Wilson Snyder 5e6519c1b0 Commentary 2023-08-30 07:46:39 -04:00
Wilson Snyder ccdb52c1d9 Fix lifetime unknown error on enum.name (#4448). 2023-08-30 07:20:25 -04:00
Yinan Xu b4b74d72f0 Add prepareClone and atClone APIs for Verilated models (#3503) (#4444)
This API is used if the user copies the process using `fork`
and similar OS-level mechanisms. The `at_clone` member function
ensures that all model-allocated resources are re-allocated, such
that the copied child process/model can simulate correctly.

A typical allocated resource is the thread pool, which every model
has its own pool.
2023-08-30 07:02:55 -04:00
Wilson Snyder ca6ab584d0 Internals: Remove cloneTreeNull. No functional change intended. 2023-08-29 20:29:11 -04:00
github action 799a502cac Apply 'make format' 2023-08-29 23:56:25 +00:00
Ethan Sifferman 8d1570db28 Add check for conflicting options e.g. binary+lintonly (#4409) 2023-08-29 19:55:37 -04:00
Wilson Snyder 2a30bbe493 Fix internal error on real conversion (#4447). 2023-08-29 18:07:23 -04:00
Anthony Donlon cf6566b9bc Internal: Optimize program size by refactoring error reporting routines (#4446) 2023-08-29 16:54:32 -04:00
Krzysztof Boroński c3e19f2821 Move variables mutated under fork..join_none/join_any blocks into anonymous objects (#4356) 2023-08-29 20:01:00 +02:00
Ryszard Rozak e24197fd16 Don't move function calls before the expression (#4413) 2023-08-28 15:44:41 +02:00
Anthony Donlon 63db60f646 Fix using type in parameterized classes without #() (#4281) (#4440)
* Check whether a class is parameterized or not with AstClass::isParameterized method

* Fix usage conflict of user2 pointer in V3Param.cpp
2023-08-26 12:06:26 -01:00
Wilson Snyder e66b28823d Internals: Cleanup some spacing. No functional change. 2023-08-26 05:59:56 -04:00
Wilson Snyder 77bd565ef6 Commentary: Changes update 2023-08-25 08:28:26 -04:00
Wilson Snyder 00d63883f8 Fix false MULTITOP on bound interfaces (#4438). 2023-08-25 08:21:15 -04:00
Wilson Snyder 10dd675371 Fix false UNUSEDPARAM on generate localparam (#4427). 2023-08-25 07:59:29 -04:00
Ryszard Rozak 2daa32b98b Support assignments of packed values to stream expressions on queues (#4401) 2023-08-25 11:24:12 +02:00
Ryszard Rozak e8e7912871 Tests: Fix t_net_delay test (#4436) 2023-08-23 13:27:17 -01:00
Ryszard Rozak 90079c2974 Fix nested assignments on the LHS (#4435) 2023-08-23 12:08:22 +02:00
Wilson Snyder 967a8530dd Fix errors on some $past cases (#4425) 2023-08-22 01:49:06 -04:00
Krzysztof Boroński ef4794e36d Support parenthesesless calls to static methods (#4432) 2023-08-22 06:06:34 +01:00
Aleksander Kiryk 7c7c92d2dd Fix coroutine handle movement during queue manipulation (#4431) 2023-08-21 10:22:09 -04:00
Wilson Snyder 95f3dd0535 Commentary (#4429) 2023-08-21 06:23:35 -04:00
Anthony Donlon 768b78e7d0 Fix checking for parameter and port connections in the wrong place (#4428) 2023-08-20 08:55:16 -04:00
Aleksander Kiryk 4370254e73 Fix ++/-- under statements (#4399) 2023-08-19 07:03:21 -04:00
Wilson Snyder 436f72582b Update GTKWave from upstream. 2023-08-19 06:57:43 -04:00
Wilson Snyder af3aba7821 Commentary: Changes update 2023-08-19 04:56:49 -04:00
github action 7479db6ffc Apply 'make format' 2023-08-19 08:52:38 +00:00
Frans Skarman e9cc2786b7 Add --no-trace-top option (#4422) 2023-08-19 04:51:29 -04:00
Anthony Donlon cbdee5a804 Fix Windows filename format, etc. (#3873) (#4421)
* Ignore CLion project files and CMake outputs
* Supporting stripping file path that contains backslash
* Set /bigobj flag and increase stack size for windows platform
* Fix MSVC warnings
2023-08-16 07:34:57 -04:00
Anthony Donlon 0f66262fa1 Internals: Refactor AstNode::checkTreeIter for better stack size (#4420) 2023-08-16 07:32:39 -04:00
Jose Loyola 6c80457262 CI: Refactor docker build action to define DOCKER_HUB_NAMESPACE as repo variable (#4419) 2023-08-15 06:45:07 +02:00
Wilson Snyder 16008acdf1 Internals: Add disabled duplicate function check (#4418) 2023-08-12 10:51:35 -04:00
Wilson Snyder 5447ed2629 Fix multple function definitions in V3Sched (#4416). 2023-08-12 10:41:44 -04:00
Wilson Snyder 9eba61018a Tests: Ignore debug message in error line 2023-08-12 09:39:02 -04:00
Wilson Snyder bc97319402 Internals: State commentary. No functional change. 2023-08-12 08:55:08 -04:00
Wilson Snyder 709db5c648 Internals: Avoid unordered_set 2023-08-12 08:46:25 -04:00
Krzysztof Boroński b752faa107 Fix jumping over object initialization (#4411) 2023-08-11 18:28:37 +02:00
Krzysztof Boroński 8d512c3187 Fix variable lifetimes in extern methods (#4414) 2023-08-11 16:52:59 +02:00
Ryszard Rozak 2d9bc73709 Fix dtype of condition operation on class objects (#4345) (#4352) 2023-08-07 05:54:30 -04:00
Ryszard Rozak b0942ed8c7 Fix detection of mixed blocking and nonblocking assignment in nested assignments (#4404) 2023-08-07 11:35:44 +02:00
Wilson Snyder b1c1aa53a9 devel release 2023-08-06 10:53:16 -04:00
11557 changed files with 905234 additions and 269282 deletions
+32
View File
@@ -0,0 +1,32 @@
# DESCRIPTION: mbake configuration file
# SPDX-FileCopyrightText: 2025 Wilson Snyder
# SPDX-License-Identifier: CC0-1.0
[formatter]
# Indentation settings
use_tabs = true
tab_width = 2
# Spacing settings
space_around_assignment = true
space_before_colon = false
space_after_colon = true
# Line continuation settings
normalize_line_continuations = true
max_line_length = 100
# PHONY settings
group_phony_declarations = false
phony_at_top = false
auto_insert_phony_declarations = false
# General settings
remove_trailing_whitespace = true
ensure_final_newline = true
normalize_empty_lines = true
max_consecutive_empty_lines = 2
# Global settings
debug = false
verbose = false
+5
View File
@@ -63,6 +63,8 @@ ForEachMacros:
SortIncludes: true
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '"V3Pch.*\.h"'
Priority: -2 # Precompiled headers
- Regex: '"(config_build|verilated_config|verilatedos)\.h"'
Priority: -1 # Sepecials before main header
- Regex: '(<|")verilated.*'
@@ -112,6 +114,9 @@ SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 0
Maximum: -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
+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'
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,6 +1,6 @@
---
exclude_paths:
- '.github/**'
- 'ci/build_verilator.sh'
- 'include/vltstd/**'
- 'nodist/fastcov.py'
- ".github/**" #
- "ci/build_verilator.sh" #
- "include/vltstd/**" #
- "nodist/fastcov.py" #
+20
View File
@@ -0,0 +1,20 @@
---
# DESCRIPTION: codecov.io config
#
# 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:
# curl --data-binary @.codecov.yml https://codecov.io/validate
#
coverage:
precision: 2
range: 75...100
round: down
status:
project: false
patch: false
comment: false
+8
View File
@@ -0,0 +1,8 @@
{
"name": "Verilator Build Environment",
"build": {
"dockerfile": "../ci/docker/buildenv/Dockerfile"
}
}
-18
View File
@@ -1,18 +0,0 @@
---
name: Bug report
about: Use this to report that something isn't working as expected, and it isn't "Unsupported." (Note our contributor agreement at https://github.com/verilator/verilator/blob/master/docs/CONTRIBUTING.rst)
title: ''
labels: new
assignees: ''
---
Thanks for taking the time to report this.
Can you attach an example that shows the issue? (Must be openly licensed, ideally in test_regress format.)
What 'verilator --version' are you using? Did you try it with the git master version?
What OS and distribution are you using?
May we assist you in trying to fix this in Verilator yourself?
-16
View File
@@ -1,16 +0,0 @@
---
name: Feature Request
about: Use this to request something should be supported, or a new feature added. (Note our contributor agreement at https://github.com/verilator/verilator/blob/master/docs/CONTRIBUTING.rst)
title: ''
labels: new
assignees: ''
---
Thanks for taking the time to report this.
What would you like added/supported?
Can you attach an example that runs on other simulators? (Must be openly licensed, ideally in test_regress format.)
May we assist you in trying to fix this in Verilator yourself?
+24
View File
@@ -0,0 +1,24 @@
---
name: Bug or feature
about: Use this to report that something isn't working as expected, or is a desired feature. (Note our contributor agreement at https://github.com/verilator/verilator/blob/master/docs/CONTRIBUTING.rst)
title: ''
labels: new
assignees: ''
---
Thanks for taking the time to report this.
Can you please attach an example that shows the issue or missing feature? (Must be openly licensed, completely self-contained so can directly run what you provide. Ideally use test_regress format, see https://veripool.org/guide/latest/contributing.html?highlight=test_regress#reporting-bugs)
What output from that test indicates it is wrong, and what is the correct or expected output? (Or, please make test self-checking if possible.)
What 'verilator' command line do we use to run your example?
What 'verilator --version' are you using? Did you try it with the git master version? Did you try it with other simulators?
What OS and distribution are you using?
May we assist you in trying to fix this in Verilator yourself?
(Please avoid attaching screenshots that show text - you can convert images to text using e.g. https://ocr.space)
+2
View File
@@ -8,3 +8,5 @@ assignees: ''
---
How may we help - what is your question?
(If reporting a bug or requesting a feature please hit BACK on your browser and use a different issue templates.)
+11
View File
@@ -0,0 +1,11 @@
---
# See https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
everything:
patterns: ["*"]
+286
View File
@@ -0,0 +1,286 @@
---
# DESCRIPTION: Github actions config
# This name is key to badges in README.rst, so we use the name build
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
name: build-test
on:
push:
branches-ignore:
- 'dependabot/**' # Avoid duplicates: only run the PR, not the push
pull_request:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0' # weekly
permissions:
contents: read
defaults:
run:
working-directory: repo
concurrency:
# At most 1 job per branch. Auto cancel on pull requests and on all forks
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'verilator/verilator' }}
jobs:
build-2404-gcc:
name: Build | ${{ matrix.os }} | ${{ matrix.cc }}${{ matrix.asan && ' | asan' || '' }}
uses: ./.github/workflows/reusable-build.yml
with:
sha: ${{ github.sha }}
os: ${{ matrix.os }}
os-name: linux
cc: ${{ matrix.cc }}
dev-asan: ${{ matrix.asan }}
dev-gcov: 0
strategy:
fail-fast: false
matrix:
include:
- {os: ubuntu-24.04, cc: gcc, asan: 0}
build-2404-clang:
name: Build | ${{ matrix.os }} | ${{ matrix.cc }}${{ matrix.asan && ' | asan' || '' }}
uses: ./.github/workflows/reusable-build.yml
with:
sha: ${{ github.sha }}
os: ${{ matrix.os }}
os-name: linux
cc: ${{ matrix.cc }}
dev-asan: ${{ matrix.asan }}
dev-gcov: 0
strategy:
fail-fast: false
matrix:
include:
- {os: ubuntu-24.04, cc: clang, asan: 1}
build-2204-gcc:
name: Build | ${{ matrix.os }} | ${{ matrix.cc }}${{ matrix.asan && ' | asan' || '' }}
uses: ./.github/workflows/reusable-build.yml
with:
sha: ${{ github.sha }}
os: ${{ matrix.os }}
os-name: linux
cc: ${{ matrix.cc }}
dev-asan: ${{ matrix.asan }}
dev-gcov: 0
strategy:
fail-fast: false
matrix:
include:
- {os: ubuntu-22.04, cc: gcc, asan: 0}
build-2204-clang:
name: Build | ${{ matrix.os }} | ${{ matrix.cc }}${{ matrix.asan && ' | asan' || '' }}
uses: ./.github/workflows/reusable-build.yml
with:
sha: ${{ github.sha }}
os: ${{ matrix.os }}
os-name: linux
cc: ${{ matrix.cc }}
dev-asan: ${{ matrix.asan }}
dev-gcov: 0
strategy:
fail-fast: false
matrix:
include:
- {os: ubuntu-22.04, cc: clang, asan: 0}
build-osx-gcc:
name: Build | ${{ matrix.os }} | ${{ matrix.cc }}${{ matrix.asan && ' | asan' || '' }}
uses: ./.github/workflows/reusable-build.yml
with:
sha: ${{ github.sha }}
os: ${{ matrix.os }}
os-name: osx
cc: ${{ matrix.cc }}
dev-asan: ${{ matrix.asan }}
dev-gcov: 0
strategy:
fail-fast: false
matrix:
include:
- {os: macos-15, cc: gcc, asan: 0}
build-osx-clang:
name: Build | ${{ matrix.os }} | ${{ matrix.cc }}${{ matrix.asan && ' | asan' || '' }}
uses: ./.github/workflows/reusable-build.yml
with:
sha: ${{ github.sha }}
os: ${{ matrix.os }}
os-name: osx
cc: ${{ matrix.cc }}
dev-asan: ${{ matrix.asan }}
dev-gcov: 0
strategy:
fail-fast: false
matrix:
include:
- {os: macos-15, cc: clang, asan: 0}
build-windows:
name: Build | ${{ matrix.os }} | ${{ matrix.cc }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- {os: windows-2025, cc: msvc}
env:
CI_OS_NAME: win
CCACHE_COMPRESS: 1
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_LIMIT_MULTIPLE: 0.95
steps:
- uses: actions/checkout@v6
with:
path: repo
- name: Cache $CCACHE_DIR
uses: actions/cache@v5
with:
path: ${{ env.CCACHE_DIR }}
key: msbuild-msvc-cmake
- name: compile
env:
WIN_FLEX_BISON: ${{ github.workspace }}/.ccache
run: ./ci/ci-win-compile.ps1
- name: test build
run: ./ci/ci-win-test.ps1
- name: Zip up repository
run: Compress-Archive -LiteralPath install -DestinationPath verilator.zip
- name: Upload zip archive
uses: actions/upload-artifact@v7
with:
path: ${{ github.workspace }}/repo/verilator.zip
name: verilator-win.zip
test-2404-gcc:
name: Test | ${{ matrix.os }} | ${{ matrix.cc }} | ${{ matrix.reloc && 'reloc | ' || '' }} ${{ matrix.suite }}
needs: build-2404-gcc
uses: ./.github/workflows/reusable-test.yml
with:
archive: ${{ needs.build-2404-gcc.outputs.archive }}
os: ${{ matrix.os }}
cc: ${{ matrix.cc }}
reloc: ${{ matrix.reloc }}
suite: ${{ matrix.suite }}
dev-gcov: 0
strategy:
fail-fast: false
matrix:
include:
# Ubuntu 24.04 gcc
- {os: ubuntu-24.04, cc: gcc, reloc: 0, suite: dist-vlt-0}
- {os: ubuntu-24.04, cc: gcc, reloc: 0, suite: dist-vlt-1}
- {os: ubuntu-24.04, cc: gcc, reloc: 0, suite: dist-vlt-2}
- {os: ubuntu-24.04, cc: gcc, reloc: 0, suite: dist-vlt-3}
- {os: ubuntu-24.04, cc: gcc, reloc: 0, suite: vltmt-0}
- {os: ubuntu-24.04, cc: gcc, reloc: 0, suite: vltmt-1}
- {os: ubuntu-24.04, cc: gcc, reloc: 0, suite: vltmt-2}
test-2404-clang:
name: Test | ${{ matrix.os }} | ${{ matrix.cc }} | ${{ matrix.reloc && 'reloc | ' || '' }} ${{ matrix.suite }}
needs: build-2404-clang
uses: ./.github/workflows/reusable-test.yml
with:
archive: ${{ needs.build-2404-clang.outputs.archive }}
os: ${{ matrix.os }}
cc: ${{ matrix.cc }}
reloc: ${{ matrix.reloc }}
suite: ${{ matrix.suite }}
dev-gcov: 0
strategy:
fail-fast: false
matrix:
include:
# Ubuntu 24.04 clang
- {os: ubuntu-24.04, cc: clang, reloc: 0, suite: dist-vlt-0}
- {os: ubuntu-24.04, cc: clang, reloc: 0, suite: dist-vlt-1}
- {os: ubuntu-24.04, cc: clang, reloc: 0, suite: dist-vlt-2}
- {os: ubuntu-24.04, cc: clang, reloc: 0, suite: dist-vlt-3}
- {os: ubuntu-24.04, cc: clang, reloc: 0, suite: vltmt-0}
- {os: ubuntu-24.04, cc: clang, reloc: 0, suite: vltmt-1}
- {os: ubuntu-24.04, cc: clang, reloc: 0, suite: vltmt-2}
test-2204-gcc:
name: Test | ${{ matrix.os }} | ${{ matrix.cc }} | ${{ matrix.reloc && 'reloc | ' || '' }} ${{ matrix.suite }}
needs: build-2204-gcc
uses: ./.github/workflows/reusable-test.yml
with:
archive: ${{ needs.build-2204-gcc.outputs.archive }}
os: ${{ matrix.os }}
cc: ${{ matrix.cc }}
reloc: ${{ matrix.reloc }}
suite: ${{ matrix.suite }}
dev-gcov: 0
strategy:
fail-fast: false
matrix:
include:
# Ubuntu 22.04 gcc
- {os: ubuntu-22.04, cc: gcc, reloc: 0, suite: dist-vlt-0}
- {os: ubuntu-22.04, cc: gcc, reloc: 0, suite: dist-vlt-1}
- {os: ubuntu-22.04, cc: gcc, reloc: 0, suite: dist-vlt-2}
- {os: ubuntu-22.04, cc: gcc, reloc: 0, suite: dist-vlt-3}
- {os: ubuntu-22.04, cc: gcc, reloc: 0, suite: vltmt-0}
- {os: ubuntu-22.04, cc: gcc, reloc: 0, suite: vltmt-1}
- {os: ubuntu-22.04, cc: gcc, reloc: 0, suite: vltmt-2}
test-2204-clang:
name: Test | ${{ matrix.os }} | ${{ matrix.cc }} | ${{ matrix.reloc && 'reloc | ' || '' }} ${{ matrix.suite }}
needs: build-2204-clang
uses: ./.github/workflows/reusable-test.yml
with:
archive: ${{ needs.build-2204-clang.outputs.archive }}
os: ${{ matrix.os }}
cc: ${{ matrix.cc }}
reloc: ${{ matrix.reloc }}
suite: ${{ matrix.suite }}
dev-gcov: 0
strategy:
fail-fast: false
matrix:
include:
# Ubuntu 22.04 clang, also test relocation
- {os: ubuntu-22.04, cc: clang, reloc: 1, suite: dist-vlt-0}
- {os: ubuntu-22.04, cc: clang, reloc: 1, suite: dist-vlt-1}
- {os: ubuntu-22.04, cc: clang, reloc: 1, suite: dist-vlt-2}
- {os: ubuntu-22.04, cc: clang, reloc: 1, suite: dist-vlt-3}
- {os: ubuntu-22.04, cc: clang, reloc: 1, suite: vltmt-0}
- {os: ubuntu-22.04, cc: clang, reloc: 1, suite: vltmt-1}
- {os: ubuntu-22.04, cc: clang, reloc: 1, suite: vltmt-2}
lint-py:
name: Lint Python
uses: ./.github/workflows/reusable-lint-py.yml
passed:
name: Test suite passed
if: always()
needs:
- build-2404-gcc
- build-2404-clang
- build-2204-gcc
- build-2204-clang
- build-osx-gcc
- build-osx-clang
- build-windows
- test-2404-gcc
- test-2404-clang
- test-2204-gcc
- test-2204-clang
- lint-py
runs-on: ubuntu-24.04
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
-164
View File
@@ -1,164 +0,0 @@
# DESCRIPTION: Github actions config
# This name is key to badges in README.rst, so we use the name build
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
name: build
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0' # weekly
env:
CI_OS_NAME: linux
CI_COMMIT: ${{ github.sha }}
CCACHE_COMPRESS: 1
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_LIMIT_MULTIPLE: 0.95
defaults:
run:
shell: bash
working-directory: repo
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-20.04]
compiler:
- { cc: clang, cxx: clang++ }
- { cc: gcc, cxx: g++ }
m32: [0, 1]
exclude:
# Build pull requests only with ubuntu-22.04 and without m32
# - os: ${{ github.event_name == 'pull_request' && 'ubuntu-18.04' || 'do-not-exclude' }}
# - os: ${{ github.event_name == 'pull_request' && 'ubuntu-20.04' || 'do-not-exclude' }}
# - m32: ${{ github.event_name == 'pull_request' && 1 || 'do-not-exclude' }}
# Build -m32 only on ubuntu-22.04 clang++
- {os: ubuntu-18.04, m32: 1}
- {os: ubuntu-20.04, m32: 1}
- compiler: { cc: gcc, cxx: g++ }
m32: 1
include:
# Build GCC 10 on ubuntu-20.04
- os: ubuntu-20.04
compiler: { cc: gcc-10, cxx: g++-10 }
m32: 0
runs-on: ${{ matrix.os }}
name: Build | ${{ matrix.os }} | ${{ matrix.compiler.cc }} ${{ matrix.m32 && '| -m32' || '' }}
env:
CI_BUILD_STAGE_NAME: build
CI_RUNS_ON: ${{ matrix.os }}
CI_M32: ${{ matrix.m32 }}
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
CACHE_BASE_KEY: build-${{ matrix.os }}-${{ matrix.compiler.cc }}-m32=${{ matrix.m32 }}
CCACHE_MAXSIZE: 250M # Per build matrix entry (2000M in total)
VERILATOR_ARCHIVE: verilator-${{ github.sha }}-${{ matrix.os }}-${{ matrix.compiler.cc }}${{ matrix.m32 && '-m32' || '' }}.tar.gz
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: repo
- name: Cache $CCACHE_DIR
uses: actions/cache@v3
env:
CACHE_KEY: ${{ env.CACHE_BASE_KEY }}-ccache
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ env.CACHE_KEY }}-${{ github.sha }}
restore-keys: |
${{ env.CACHE_KEY }}-
- name: Install packages for build
run: ./ci/ci-install.bash
- name: Build
run: ./ci/ci-script.bash
- name: Tar up repository
working-directory: ${{ github.workspace }}
run: tar --posix -c -z -f ${{ env.VERILATOR_ARCHIVE }} repo
- name: Upload tar archive
uses: actions/upload-artifact@v3
with:
path: ${{ github.workspace }}/${{ env.VERILATOR_ARCHIVE }}
name: ${{ env.VERILATOR_ARCHIVE }}
test:
needs: build
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-20.04]
compiler:
- { cc: clang, cxx: clang++ }
- { cc: gcc, cxx: g++ }
m32: [0, 1]
suite: [dist-vlt-0, dist-vlt-1, dist-vlt-2, vltmt-0, vltmt-1]
exclude:
# Build pull requests only with ubuntu-22.04 and without m32
# - os: ${{ github.event_name == 'pull_request' && 'ubuntu-18.04' || 'do-not-exclude' }}
# - os: ${{ github.event_name == 'pull_request' && 'ubuntu-20.04' || 'do-not-exclude' }}
# - m32: ${{ github.event_name == 'pull_request' && 1 || 'do-not-exclude' }}
# Build -m32 only on ubuntu-22.04
- {os: ubuntu-18.04, m32: 1}
- {os: ubuntu-20.04, m32: 1}
- compiler: { cc: gcc, cxx: g++ }
m32: 1
include:
# Test with GCC 10 on ubuntu-20.04 without m32
- {os: ubuntu-20.04, compiler: { cc: gcc-10, cxx: g++-10 }, m32: 0, suite: dist-vlt-0}
- {os: ubuntu-20.04, compiler: { cc: gcc-10, cxx: g++-10 }, m32: 0, suite: dist-vlt-1}
- {os: ubuntu-20.04, compiler: { cc: gcc-10, cxx: g++-10 }, m32: 0, suite: dist-vlt-2}
- {os: ubuntu-20.04, compiler: { cc: gcc-10, cxx: g++-10 }, m32: 0, suite: vltmt-0}
- {os: ubuntu-20.04, compiler: { cc: gcc-10, cxx: g++-10 }, m32: 0, suite: vltmt-1}
runs-on: ${{ matrix.os }}
name: Test | ${{ matrix.os }} | ${{ matrix.compiler.cc }} | ${{ matrix.suite }} ${{ matrix.m32 && '| -m32' || '' }}
env:
CI_BUILD_STAGE_NAME: test
CI_RUNS_ON: ${{ matrix.os }}
CI_M32: ${{ matrix.m32 }}
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
CACHE_BASE_KEY: test-${{ matrix.os }}-${{ matrix.compiler.cc }}-m32=${{ matrix.m32 }}-${{ matrix.suite }}
CCACHE_MAXSIZE: 64M # Per build matrix entry (2160M in total)
VERILATOR_ARCHIVE: verilator-${{ github.sha }}-${{ matrix.os }}-${{ matrix.compiler.cc }}${{ matrix.m32 && '-m32' || '' }}.tar.gz
steps:
- name: Download tar archive
uses: actions/download-artifact@v3
with:
name: ${{ env.VERILATOR_ARCHIVE }}
path: ${{ github.workspace }}
- name: Unpack tar archive
working-directory: ${{ github.workspace }}
run: tar -x -z -f ${{ env.VERILATOR_ARCHIVE }}
- name: Cache $CCACHE_DIR
uses: actions/cache@v3
env:
CACHE_KEY: ${{ env.CACHE_BASE_KEY }}-ccache
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ env.CACHE_KEY }}-${{ github.sha }}
restore-keys: |
${{ env.CACHE_KEY }}-
- name: Install test dependencies
run: ./ci/ci-install.bash
- name: Test
env:
TESTS: ${{ matrix.suite }}
run: ./ci/ci-script.bash
+9 -6
View File
@@ -1,17 +1,20 @@
---
# DESCRIPTION: Github actions config
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
#
name: Contributor Agreement
on:
push:
branches-ignore:
- 'dependabot/**' # Avoid duplicates: only run the PR, not the push
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
Test:
name: "'docs/CONTRIBUTORS' was signed"
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- run: test_regress/t/t_dist_contributors.pl
- uses: actions/checkout@v6
- run: test_regress/t/t_dist_contributors.py
+189 -74
View File
@@ -1,99 +1,214 @@
---
# DESCRIPTION: Github actions config
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
name: coverage
name: Code coverage
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0' # weekly
- cron: '0 0 * * 0' # weekly
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
env:
CI_OS_NAME: linux
CI_COMMIT: ${{ github.sha }}
CI_M32: 0
COVERAGE: 1
VERILATOR_ARCHIVE: verilator-coverage-${{ github.sha }}.tar.gz
permissions:
contents: read
defaults:
run:
shell: bash
working-directory: repo
concurrency:
# At most 1 job per branch. Auto cancel all but scheduled jobs
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name != 'schedule' }}
jobs:
build:
name: Build
# Only run scheduled jobs if explicitly enabled for that repo (e.g.: not on forks)
# Only run pull request jobs if labelled as needing an coverage run
# Always run workflow dispatch jobs
if: |
(github.event_name == 'schedule'
&& vars.ENABLE_SCHEDULED_JOBS == 'true') ||
(github.event_name == 'pull_request'
&& contains(github.event.pull_request.labels.*.name, 'pr: dev-coverage')) ||
(github.event_name == 'workflow_dispatch')
uses: ./.github/workflows/reusable-build.yml
with:
# For pull requests, build the head of the pull request branch, not the
# merge commit, otherwise patch coverage would include the changes
# between the root of the pull request and the target branch
sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
os: ubuntu-24.04
os-name: linux
cc: gcc
dev-asan: 0
dev-gcov: 1
Build:
runs-on: ubuntu-22.04
env:
CI_BUILD_STAGE_NAME: build
CI_RUNS_ON: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: repo
- name: Install packages for build
run: ./ci/ci-install.bash
- name: Build
run: ./ci/ci-script.bash
- name: Tar up repository
working-directory: ${{ github.workspace }}
run: tar --posix -c -z -f ${{ env.VERILATOR_ARCHIVE }} repo
- name: Upload tar archive
uses: actions/upload-artifact@v3
with:
path: ${{ github.workspace }}/${{ env.VERILATOR_ARCHIVE }}
name: ${{ env.VERILATOR_ARCHIVE }}
Test:
needs: Build
test:
name: Test | ${{ matrix.test }}${{ matrix.num }}
needs: build
uses: ./.github/workflows/reusable-test.yml
with:
archive: ${{ needs.build.outputs.archive }}
os: ubuntu-24.04
cc: gcc
reloc: 0
suite: ${{ matrix.test }}${{ matrix.num }}
dev-gcov: 1
strategy:
fail-fast: false
matrix:
test:
- vlt-
- vltmt-
num:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
test: [coverage-vlt-, coverage-vltmt-]
num: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
include:
- { test: dist, num: '' }
runs-on: ubuntu-22.04
name: test-${{ matrix.test }}${{ matrix.num }}
env:
CI_BUILD_STAGE_NAME: test
CI_RUNS_ON: ubuntu-22.04
- {test: coverage-dist, num: ''}
publish-codecov:
name: Publish results to codecov.io
needs: test
if: ${{ contains(needs.*.result, 'success') && !cancelled() }}
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Download tar archive
uses: actions/download-artifact@v3
with:
name: ${{ env.VERILATOR_ARCHIVE }}
path: ${{ github.workspace }}
- name: Download code coverage data
uses: actions/download-artifact@v8
with:
pattern: code-coverage-*
path: obj_coverage
merge-multiple: true
- name: Unpack tar archive
working-directory: ${{ github.workspace }}
run: tar -x -z -f ${{ env.VERILATOR_ARCHIVE }}
- name: List files
id: list-files
run: |
ls -lsha obj_coverage
find obj_coverage -type f | paste -sd, | sed "s/^/files=/" >> "$GITHUB_OUTPUT"
- name: Install test dependencies
run: ./ci/ci-install.bash
- name: Upload to codecov.io
uses: codecov/codecov-action@v6
with:
disable_file_fixes: true
disable_search: true
fail_ci_if_error: true
files: ${{ steps.list-files.outputs.files }}
plugins: noop
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
- name: Test
env:
TESTS: coverage-${{ matrix.test }}${{ matrix.num }}
run: ./ci/ci-script.bash
prepare-report:
name: Prepare HTML report
needs: [build, test]
if: ${{ contains(needs.*.result, 'success') && !cancelled() }}
runs-on: ubuntu-24.04
steps:
- name: Install dependencies
run: |
echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null
sudo dpkg-reconfigure man-db
sudo apt install lcov || \
sudo apt install lcov
- name: Download repository archive
uses: actions/download-artifact@v8
with:
name: ${{ needs.build.outputs.archive }}
path: ${{ github.workspace }}
- name: Unpack repository archive
run: |
tar -x -z -f ${{ needs.build.outputs.archive }}
ls -lsha
- name: Download code coverage data
uses: actions/download-artifact@v8
with:
pattern: code-coverage-*
path: repo/obj_coverage
merge-multiple: true
- name: Create report
working-directory: repo
env:
GH_TOKEN: ${{ github.token }}
run: |
ls -lsha obj_coverage
# Combine reports from test jobs
nodist/fastcov.py -C obj_coverage/verilator-*.info --lcov -o obj_coverage/verilator.info
# For a PR, report patch coverage against the merge-base between the head of the PR and the target branch
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
COVERAGE_BASE=$(git rev-parse --short $(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}))
make coverage-report COVERAGE_BASE=${COVERAGE_BASE} |& tee ${{ github.workspace }}/make-coverage-report.log
else
make coverage-report
fi
# Remove data files
rm -f obj_coverage/verilator*.info
# Some extra work for PRs only
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
# Save PR number in report
echo ${{ github.event.number }} > obj_coverage/pr-number.txt
# Generate notification comment content
mkdir -p notification
echo ${{ github.event.number }} > notification/pr-number.txt
NUM=$(gh run view ${{ github.run_id }} --json number --jq ".number")
URL=$(gh run view ${{ github.run_id }} --json url --jq ".url")
echo "Patch coverage from PR workflow [#$NUM]($URL) (code coverage of lines changed relative to ${COVERAGE_BASE}):" > notification/body.txt
if [[ ! -f obj_coverage/empty-patch ]]; then
echo "<pre>" >> notification/body.txt
grep -E "(lines|branches)\.*:" ${{ github.workspace }}/make-coverage-report.log | sed "s/\.*:/:/" >> notification/body.txt || true
echo "</pre>" >> notification/body.txt
echo "Report: [${{ github.run_id }}](https://${{ github.repository_owner }}.github.io/verilator/coverage-reports/${{ github.run_id }}/index.html)" >> notification/body.txt
else
echo "Patch contains no code changes" >> notification/body.txt
fi
cat notification/body.txt
fi
- name: Upload report
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@v7
with:
path: repo/notification
name: coverage-pr-notification
# Create GitHub issue for failed scheduled jobs
# This should always be the last job (we want an issue if anything breaks)
create-issue:
name: Create issue on failure
needs: [publish-codecov, prepare-report]
if: ${{ github.event_name == 'schedule' && github.repository == 'verilator/verilator' && github.run_attempt == 1 && failure() && !cancelled() }}
runs-on: ubuntu-24.04
steps:
# Creating issues requires elevated privilege
- name: Generate access token
id: generate-token
uses: actions/[email protected]
with:
app-id: ${{ vars.VERILATOR_CI_ID }}
private-key: ${{ secrets.VERILATOR_CI_KEY }}
owner: verilator
repositories: verilator
permission-issues: write
- name: Create issue
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |-
echo "This issue was created automatically by the GitHub Actions CI due to the failure of a scheduled Code coverage run." >> body.txt
echo "" >> body.txt
echo "Workflow status: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> body.txt
gh issue --repo ${{ github.repository }} create \
--title "Code coverage run #${{ github.run_number }} Failed" \
--body-file body.txt \
--label new \
--assignee gezalore,wsnyder
+49 -44
View File
@@ -1,13 +1,15 @@
---
# Build and push verilator docker image when tags are pushed to the repository.
# The following secrets must be configured in the github repository:
# The following variable(s) must be configured in the github repository:
# DOCKER_HUB_NAMESPACE: docker hub namespace.
# The following secrets must be configured in the github repository:
# DOCKER_HUB_USER: user name for logging into docker hub
# DOCKER_HUB_ACCESS_TOKEN: docker hub access token.
name: Build Verilator Container
on:
push:
tags: [ 'v*' ]
tags: ['v*']
workflow_dispatch:
inputs:
manual_tag:
@@ -20,11 +22,14 @@ on:
type: boolean
default: false
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
@@ -33,52 +38,52 @@ jobs:
# - "ci/docker/buildenv:verilator-buildenv"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v6
- name: Extract context variables
run: |
echo "${{ matrix.contexts }}" | sed -r 's/(.*):.*/build_context=\1/' >> "$GITHUB_ENV"
echo "${{ matrix.contexts }}" | sed -r 's/.*:(.*)/image_name=\1/' >> "$GITHUB_ENV"
echo "git_tag=${GITHUB_REF#refs/*/}" >> "$GITHUB_ENV"
- name: Extract context variables
run: |
echo "${{ matrix.contexts }}" | sed -r 's/(.*):.*/build_context=\1/' >> "$GITHUB_ENV"
echo "${{ matrix.contexts }}" | sed -r 's/.*:(.*)/image_name=\1/' >> "$GITHUB_ENV"
echo "git_tag=${GITHUB_REF#refs/*/}" >> "$GITHUB_ENV"
- name: Use manual tag
if: ${{ inputs.manual_tag }}
run: |
echo "git_tag=${{ inputs.manual_tag }}" >> "$GITHUB_ENV"
- name: Use manual tag
if: ${{ inputs.manual_tag }}
run: |
echo "git_tag=${{ inputs.manual_tag }}" >> "$GITHUB_ENV"
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v4
with:
images: |
${{ secrets.DOCKER_HUB_NAMESPACE }}/${{ env.image_name }}
tags: |
type=match,pattern=(v.*),group=1,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
type=raw,value=${{ inputs.manual_tag }},enable=${{ inputs.manual_tag != '' }}
type=raw,value=latest,enable=${{ inputs.add_latest_tag == true }}
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v6
with:
images: |
${{ vars.DOCKER_HUB_NAMESPACE }}/${{ env.image_name }}
tags: |
type=match,pattern=(v.*),group=1,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
type=raw,value=${{ inputs.manual_tag }},enable=${{ inputs.manual_tag != '' }}
type=raw,value=latest,enable=${{ inputs.add_latest_tag == true }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
with:
buildkitd-flags: --debug
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Login to Docker Hub
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@v4
if: startsWith(github.ref, 'refs/tags/v')
with:
context: ${{ env.build_context }}
build-args: SOURCE_COMMIT=${{ env.git_tag }}
platforms: linux/arm64,linux/amd64
push: ${{ !env.ACT && startsWith(github.ref, 'refs/tags/v') }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
- name: Build and Push to Docker
uses: docker/build-push-action@v7
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
with:
context: ${{ env.build_context }}
build-args: SOURCE_COMMIT=${{ env.git_tag }}
platforms: linux/arm64,linux/amd64
push: ${{ !env.ACT && (startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch') }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
+20 -16
View File
@@ -1,43 +1,47 @@
---
# DESCRIPTION: Github actions config
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
#
name: format
on:
push:
pull_request_target:
workflow_dispatch:
branches-ignore:
- 'dependabot/**' # Avoid duplicates: only run the PR, not the push
permissions:
contents: write
jobs:
format:
runs-on: ubuntu-22.04
name: Ubuntu 22.04 | format
runs-on: ubuntu-24.04
name: Ubuntu 24.04 | format
env:
CI_OS_NAME: linux
CI_RUNS_ON: ubuntu-22.04
CI_RUNS_ON: ubuntu-24.04
CI_COMMIT: ${{ github.sha }}
CI_M32: 0
steps:
- name: Checkout
uses: actions/checkout@v3
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-14 yapf3 &&
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-14 &&
autoconf
./configure
make venv
source .venv/bin/activate
make -j 2 format CLANGFORMAT=clang-format-18
git status
- name: Push
run: |
run: |-
if [ -n "$(git status --porcelain)" ]; then
git commit . -m "Apply 'make format'" &&
git push origin
-51
View File
@@ -1,51 +0,0 @@
# DESCRIPTION: Github actions config
# This name is key to badges in README.rst, so we use the name build
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
name: msbuild
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0' # weekly
env:
CI_OS_NAME: win
CI_COMMIT: ${{ github.sha }}
CCACHE_COMPRESS: 1
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_LIMIT_MULTIPLE: 0.95
defaults:
run:
working-directory: repo
jobs:
windows:
name: run on windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
path: repo
- name: Cache $CCACHE_DIR
uses: actions/cache@v3
with:
path: ${{ env.CCACHE_DIR }}
key: msbuild-msvc-cmake
- name: compile
env:
WIN_FLEX_BISON: ${{ github.workspace }}/.ccache
run: ./ci/ci-win-compile.ps1
- name: test build
run: ./ci/ci-win-test.ps1
- name: Zip up repository
run: Compress-Archive -LiteralPath install -DestinationPath verilator.zip
- name: Upload zip archive
uses: actions/upload-artifact@v3
with:
path: ${{ github.workspace }}/repo/verilator.zip
name: verilator-win.zip
+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
+87
View File
@@ -0,0 +1,87 @@
---
# DESCRIPTION: Github actions config
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
name: Pages
on:
push:
branches: [master]
paths: ["ci/**", ".github/workflows"]
workflow_dispatch:
workflow_run:
workflows: ["Code coverage"]
types: [completed]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run
# in-progress and latest queued. However, do NOT cancel in-progress runs as we
# want to allow these deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
defaults:
run:
shell: bash
jobs:
build:
name: Build content
runs-on: ubuntu-24.04
outputs:
coverage-pr-run-ids: ${{ steps.build.outputs.coverage-pr-run-ids }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Build pages
id: build
env:
GH_TOKEN: ${{ github.token }}
run: |
bash -x ./ci/ci-pages.bash
ls -lsha
tree -L 3 pages
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v5
with:
path: pages
deploy:
name: Deploy
needs: build
runs-on: ubuntu-24.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v5
notify:
name: Notify
needs: [build, deploy]
runs-on: ubuntu-24.04
if: ${{ github.repository == 'verilator/verilator' }}
steps:
- name: Checkout
uses: actions/checkout@v6
# Use the Verilator CI app to post the comment
- name: Generate access token
id: generate-token
uses: actions/[email protected]
with:
app-id: ${{ vars.VERILATOR_CI_ID }}
private-key: ${{ secrets.VERILATOR_CI_KEY }}
permission-actions: write
permission-pull-requests: write
- name: Comment on PR
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
COVERAGE_PR_RUN_IDS: ${{ needs.build.outputs.coverage-pr-run-ids }}
run: bash -x ./ci/ci-pages-notify.bash
+99
View File
@@ -0,0 +1,99 @@
---
# DESCRIPTION: Github actions config
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
name: reusable-build
on:
workflow_call:
inputs:
sha:
description: "Commit SHA to build"
required: true
type: string
os: # e.g. ubuntu-24.04
required: true
type: string
cc: # 'clang' or 'gcc'
required: true
type: string
os-name: # 'linux' or 'osx'
required: true
type: string
dev-asan:
required: true
type: number
dev-gcov:
required: true
type: number
outputs:
archive:
description: "Name of the built repository archive artifact"
value: ${{ jobs.build.outputs.archive }}
env:
CI_OS_NAME: ${{ inputs.os-name }}
CCACHE_COMPRESS: 1
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_LIMIT_MULTIPLE: 0.95
INSTALL_DIR: ${{ github.workspace }}/install
RELOC_DIR: ${{ github.workspace }}/relloc
defaults:
run:
shell: bash
working-directory: repo
jobs:
build:
name: Build
runs-on: ${{ inputs.os }}
outputs:
archive: ${{ steps.create-archive.outputs.archive }}
env:
CI_BUILD_STAGE_NAME: build
CI_DEV_ASAN: ${{ inputs.dev-asan }}
CI_DEV_GCOV: ${{ inputs.dev-gcov }}
CI_RUNS_ON: ${{ inputs.os }}
CXX: ${{ inputs.cc == 'clang' && 'clang++' || 'g++' }}
CACHE_BASE_KEY: build-${{ inputs.os }}-${{ inputs.cc }}
CCACHE_MAXSIZE: 1000M # Per build matrix entry (* 5 = 5000M in total)
steps:
- name: Checkout
uses: actions/checkout@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@v5
env:
CACHE_KEY: ${{ env.CACHE_BASE_KEY }}-ccache
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ env.CACHE_KEY }}-${{ inputs.sha }}
restore-keys: |
${{ env.CACHE_KEY }}-
- name: Install packages for build
run: ./ci/ci-install.bash
- name: Build
run: ./ci/ci-script.bash
- name: Create repository archive
id: create-archive
working-directory: ${{ github.workspace }}
run: |
# Name of the archive must be unique based on the build parameters
ARCHIVE=verilator-${{ inputs.sha }}-${{ inputs.os }}-${{ inputs.cc }}-${{ inputs.dev-asan }}-${{ inputs.dev-gcov }}.tar.gz
tar --posix -c -z -f $ARCHIVE repo
echo "archive=$ARCHIVE" >> "$GITHUB_OUTPUT"
- name: Upload repository archive
uses: actions/upload-artifact@v7
with:
path: ${{ github.workspace }}/${{ steps.create-archive.outputs.archive }}
name: ${{ steps.create-archive.outputs.archive }}
+51
View File
@@ -0,0 +1,51 @@
---
# DESCRIPTION: Github actions config
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
name: reusable-lint-py
on:
workflow_call:
env:
CI_OS_NAME: linux
CI_BUILD_STAGE_NAME: build
CI_RUNS_ON: ubuntu-22.04
CCACHE_COMPRESS: 1
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_LIMIT_MULTIPLE: 0.95
defaults:
run:
shell: bash
working-directory: repo
jobs:
lint-py:
runs-on: ubuntu-22.04
name: Sub-lint | Python
steps:
- name: Checkout
uses: actions/checkout@v6
with:
path: repo
- name: Install packages for build
run: ./ci/ci-install.bash
- name: Configure
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: |-
source .venv/bin/activate
make -k lint-py
@@ -0,0 +1,77 @@
---
# DESCRIPTION: Github actions config
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
name: reusable-rtlmeter-build
on:
workflow_call:
inputs:
runs-on:
description: "Runner to use, e.g.: ubuntu-24.04"
type: string
required: true
cc:
description: "Compiler to use: 'gcc' or 'clang'"
type: string
required: true
defaults:
run:
shell: bash
env:
CCACHE_DIR: ${{ github.workspace }}/ccache
CCACHE_MAXSIZE: 512M
jobs:
build:
runs-on: ${{ inputs.runs-on }}
name: Build
steps:
- name: Install dependencies
run: |
echo "path-exclude /usr/share/doc/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
echo "path-exclude /usr/share/man/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
echo "path-exclude /usr/share/info/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
sudo apt update || \
sudo apt update
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@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@v6
with:
path: repo
fetch-depth: 0 # Required for 'git describe' used for 'verilator --version'
- name: Configure
working-directory: repo
run: |
autoconf
./configure --prefix=${{ github.workspace }}/install CXX=${{ inputs.cc == 'clang' && 'clang++' || 'g++' }}
- name: Make
working-directory: repo
run: make -j $(nproc)
- name: Install
working-directory: repo
run: make install
- name: Tar up installation
run: tar --posix -c -z -f verilator-rtlmeter.tar.gz install
- name: Upload Verilator installation archive
uses: actions/upload-artifact@v7
with:
path: verilator-rtlmeter.tar.gz
name: verilator-rtlmeter-${{ inputs.runs-on }}-${{ inputs.cc }}
overwrite: true
+130
View File
@@ -0,0 +1,130 @@
---
# DESCRIPTION: Github actions config
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
name: reusable-rtlmeter-run
on:
workflow_call:
inputs:
tag:
description: "Unique identifier for storing results"
type: string
required: true
runs-on:
description: "Runner to use, e.g.: ubuntu-24.04"
type: string
required: true
cc:
description: "Compiler to use: 'gcc' or 'clang'"
type: string
required: true
# Note: The combination of 'cases' and 'run-name' must be unique for all
# invocations of this workflow within a run of the parent workflow.
# These two are used together to generate a unique results file name.
cases:
description: "RTLMeter cases to run"
type: string
required: true
run-name:
description: "Run name (identifier) to add to collated results"
type: string
required: true
compileArgs:
description: "Additional Verilator command line arguments"
type: string
default: ""
executeArgs:
description: "Additional simulator command line arguments"
type: string
default: ""
defaults:
run:
shell: bash
env:
CCACHE_DIR: ${{ github.workspace }}/ccache
CCACHE_MAXSIZE: 512M
CCACHE_DISABLE: 1
jobs:
run:
runs-on: ${{ inputs.runs-on }}
name: Run
steps:
- name: Install dependencies
run: |
echo "path-exclude /usr/share/doc/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
echo "path-exclude /usr/share/man/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
echo "path-exclude /usr/share/info/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
sudo apt update || \
sudo apt update
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@v8
with:
name: verilator-rtlmeter-${{ inputs.runs-on }}-${{ inputs.cc }}
- name: Unpack Verilator installation archive
run: |
tar -x -z -f verilator-rtlmeter.tar.gz
echo "${{ github.workspace }}/install/bin" >> $GITHUB_PATH
- name: Use saved ccache
if: ${{ env.CCACHE_DISABLE == 0 }}
uses: actions/cache@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@v6
with:
repository: "verilator/rtlmeter"
path: rtlmeter
- name: Setup RTLMeter venv
working-directory: rtlmeter
run: make venv
- name: Compile cases
working-directory: rtlmeter
run: |
./rtlmeter run --timeout 60 --verbose --cases='${{inputs.cases}}' --compileArgs='${{inputs.compileArgs}}' --executeArgs='${{inputs.executeArgs}}' --nExecute=0
- name: Execute cases
working-directory: rtlmeter
continue-on-error: true # Do not fail on error, so we can at least save the successful results
run: |
./rtlmeter run --timeout 60 --verbose --cases='${{inputs.cases}}' --compileArgs='${{inputs.compileArgs}}' --executeArgs='${{inputs.executeArgs}}'
- name: Collate results
id: results
working-directory: rtlmeter
run: |
# Use 'inputs.cases' and 'inputs.run-name' to generate a unique file name
hash=$(md5sum <<< '${{ inputs.cases }} ${{ inputs.run-name }}' | awk '{print $1}')
echo "hash=${hash}" >> $GITHUB_OUTPUT
./rtlmeter collate --runName "${{ inputs.run-name }}" > ../results-${hash}.json
- name: Report results
working-directory: rtlmeter
run: |
./rtlmeter report --steps '*' --metrics '*' ../results-${{ steps.results.outputs.hash }}.json
- name: Upload results
uses: actions/upload-artifact@v7
with:
path: results-${{ steps.results.outputs.hash }}.json
name: rtlmeter-${{ inputs.tag }}-results-${{ steps.results.outputs.hash }}
overwrite: true
retention-days: 2
- name: Report status
working-directory: rtlmeter
run: |- # This will fail the job if any of the runs failed
./rtlmeter run --verbose --cases='${{inputs.cases}}' --compileArgs='${{inputs.compileArgs}}' --executeArgs='${{inputs.executeArgs}}'
+111
View File
@@ -0,0 +1,111 @@
---
# DESCRIPTION: Github actions config
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
name: reusable-test
on:
workflow_call:
inputs:
archive:
description: "Name of the repository archive artifact from reusable-build"
required: true
type: string
os: # e.g. ubuntu-24.04
required: true
type: string
cc: # gcc or clang
required: true
type: string
reloc: # 0 or 1
required: true
type: number
suite: # e.g. dist-vlt-0
required: true
type: string
dev-gcov:
required: true
type: number
env:
CI_OS_NAME: linux
CCACHE_COMPRESS: 1
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_LIMIT_MULTIPLE: 0.95
INSTALL_DIR: ${{ github.workspace }}/install
RELOC_DIR: ${{ github.workspace }}/relloc
defaults:
run:
shell: bash
working-directory: repo
jobs:
test:
runs-on: ${{ inputs.os }}
name: Test
env:
CI_BUILD_STAGE_NAME: test
CI_RUNS_ON: ${{ inputs.os }}
CI_RELOC: ${{inputs.reloc }}
CXX: ${{ inputs.cc == 'clang' && 'clang++' || 'g++' }}
CACHE_BASE_KEY: test-${{ inputs.os }}-${{ inputs.cc }}-${{inputs.reloc }}-${{ inputs.suite }}
CCACHE_MAXSIZE: 100M # Per build per suite (* 5 * 5 = 2500M in total)
steps:
- name: Download repository archive
uses: actions/download-artifact@v8
with:
name: ${{ inputs.archive }}
path: ${{ github.workspace }}
- name: Unpack repository archive
working-directory: ${{ github.workspace }}
run: |
tar -x -z -f ${{ inputs.archive }}
ls -lsha
- name: Cache $CCACHE_DIR
uses: actions/cache@v5
env:
CACHE_KEY: ${{ env.CACHE_BASE_KEY }}-ccache2
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ env.CACHE_KEY }}-${{ github.sha }}
restore-keys: |
${{ env.CACHE_KEY }}-
- name: Install test dependencies
run: |
./ci/ci-install.bash
make venv
- name: Test
id: run-test
continue-on-error: true
env:
TESTS: ${{ inputs.suite }}
run: |
source .venv/bin/activate
./ci/ci-script.bash
- name: Combine code coverage data
if: ${{ inputs.dev-gcov }}
run: |
make coverage-combine
mv obj_coverage/verilator.info obj_coverage/verilator-${{ inputs.suite }}.info
ls -lsha obj_coverage
- name: Upload code coverage data
if: ${{ inputs.dev-gcov }}
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: |-
echo "Click on '> Tests' arrow above (or on other steps), to expand it, and see the failure reasons"
exit 1
+48
View File
@@ -0,0 +1,48 @@
---
# DESCRIPTION: Github actions config
# This name is key to badges in README.rst, so we use the name build
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
name: RTLMeter PR results
on:
workflow_run:
workflows: [RTLMeter]
types: [completed]
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }}
permissions:
actions: read
pull-requests: write
steps:
- name: Download report
uses: actions/download-artifact@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@v8
with:
name: pr-number
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
# Use the Verilator CI app to post the comment
- name: Generate access token
id: generate-token
uses: actions/[email protected]
with:
app-id: ${{ vars.VERILATOR_CI_ID }}
private-key: ${{ secrets.VERILATOR_CI_KEY }}
permission-pull-requests: write
- name: Comment on PR
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |-
ls -la
cat report.txt
gh pr --repo ${{ github.repository }} comment $(cat pr-number.txt) --body-file report.txt
+415
View File
@@ -0,0 +1,415 @@
---
# DESCRIPTION: Github actions config
# This name is key to badges in README.rst, so we use the name build
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
name: RTLMeter
on:
workflow_dispatch:
schedule:
- cron: '0 2 * * *' # Daily, starting at 02:00 UTC
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
push:
branches: ['ci-rtlmeter/**']
permissions:
contents: read
defaults:
run:
shell: bash
concurrency:
# At most 1 job per branch. Auto cancel all but scheduled jobs
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name != 'schedule' }}
jobs:
start:
name: Start
# Only run scheduled jobs if explicitly enabled for that repo (e.g.: not on forks)
# Only run pull request jobs if labelled as needing an RTLMeter run
# Always run workflow dispatch jobs
if: |
(github.event_name == 'schedule'
&& 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 == 'push')
runs-on: ubuntu-24.04
steps:
- name: Startup
run: echo
build-gcc:
name: Build GCC
needs: start
uses: ./.github/workflows/reusable-rtlmeter-build.yml
with:
runs-on: ubuntu-24.04
cc: gcc
build-clang:
name: Build Clang
needs: start
uses: ./.github/workflows/reusable-rtlmeter-build.yml
with:
runs-on: ubuntu-24.04
cc: clang
run-gcc:
name: Run GCC | ${{ matrix.cases }}
needs: build-gcc
uses: ./.github/workflows/reusable-rtlmeter-run.yml
with:
tag: gcc
runs-on: ubuntu-24.04
cc: gcc
cases: ${{ matrix.cases }}
run-name: "gcc"
compileArgs: ""
executeArgs: ""
strategy:
fail-fast: false
max-parallel: ${{ github.event == 'schedule' && 2 || 7 }}
matrix:
cases:
- "BlackParrot:1x1:*"
- "BlackParrot:4x4:*"
- "Caliptra:default:*"
- "NVDLA:*"
- "OpenPiton:1x1:*"
- "OpenPiton:4x4:*"
- "OpenTitan:*"
- "VeeR-EH1:asic*"
- "VeeR-EH1:default*"
- "VeeR-EH1:hiperf*"
- "VeeR-EH2:asic*"
- "VeeR-EH2:default*"
- "VeeR-EH2:hiperf*"
- "VeeR-EL2:asic*"
- "VeeR-EL2:default*"
- "VeeR-EL2:hiperf*"
- "Vortex:mini:*"
- "Vortex:sane:*"
- "XiangShan:default-chisel3:* !*:linux"
- "XiangShan:default-chisel6:* !*:linux"
- "XiangShan:mini-chisel3:* !*:linux"
- "XiangShan:mini-chisel6:* !*:linux"
- "XuanTie-E902:*"
- "XuanTie-E906:*"
- "XuanTie-C906:*"
- "XuanTie-C910:*"
run-clang:
name: Run Clang | ${{ matrix.cases }}
needs: build-clang
uses: ./.github/workflows/reusable-rtlmeter-run.yml
with:
tag: clang
runs-on: ubuntu-24.04
cc: clang
cases: ${{ matrix.cases }}
run-name: "clang --threads 4"
compileArgs: "--threads 4"
executeArgs: ""
strategy:
fail-fast: false
max-parallel: ${{ github.event == 'schedule' && 2 || 7 }}
matrix:
cases:
- "BlackParrot:1x1:*"
- "BlackParrot:4x4:*"
- "Caliptra:default:*"
- "NVDLA:*"
- "OpenPiton:1x1:*"
- "OpenPiton:4x4:*"
- "OpenTitan:*"
- "VeeR-EH1:asic*"
- "VeeR-EH1:default*"
- "VeeR-EH1:hiperf*"
- "VeeR-EH2:asic*"
- "VeeR-EH2:default*"
- "VeeR-EH2:hiperf*"
- "VeeR-EL2:asic*"
- "VeeR-EL2:default*"
- "VeeR-EL2:hiperf*"
- "Vortex:mini:*"
- "Vortex:sane:*"
- "XiangShan:default-chisel3:* !*:linux"
- "XiangShan:default-chisel6:* !*:linux"
- "XiangShan:mini-chisel3:* !*:linux"
- "XiangShan:mini-chisel6:* !*:linux"
- "XuanTie-E902:*"
- "XuanTie-E906:*"
- "XuanTie-C906:*"
- "XuanTie-C910:*"
run-gcc-hier:
name: Run GCC hier | ${{ matrix.cases }}
needs: build-gcc
uses: ./.github/workflows/reusable-rtlmeter-run.yml
with:
tag: gcc-hier
runs-on: ubuntu-24.04
cc: gcc
cases: ${{ matrix.cases }}
run-name: "gcc --hierarchical"
compileArgs: "--hierarchical"
executeArgs: ""
strategy:
fail-fast: false
max-parallel: ${{ github.event == 'schedule' && 2 || 7 }}
matrix:
cases:
- "BlackParrot:1x1:* !-hier"
- "BlackParrot:4x4:* !-hier"
- "NVDLA:* !-hier"
- "OpenPiton:1x1:* !-hier"
- "OpenPiton:4x4:* !-hier"
- "OpenPiton:8x8:* !-hier"
- "OpenPiton:16x16:dhry !-hier"
- "XuanTie-C910:* !-hier"
combine-results:
name: Combine results
needs: [run-gcc, run-clang, run-gcc-hier]
# Run if any of the dependencies have run, even if failed.
# That is: do not run if all skipped, or the workflow was cancelled.
if: ${{ (contains(needs.*.result, 'success') || contains(needs.*.result, 'failure')) && !cancelled() }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
tag: [gcc, clang, gcc-hier]
steps:
- name: Checkout RTLMeter
uses: actions/checkout@v6
with:
repository: "verilator/rtlmeter"
path: rtlmeter
- name: Setup RTLMeter venv
working-directory: rtlmeter
run: make venv
- name: Download all results
uses: actions/download-artifact@v8
with:
pattern: rtlmeter-${{ matrix.tag }}-results-*
path: all-results-${{ matrix.tag }}
merge-multiple: true
- name: Combine results
working-directory: rtlmeter
run: |
./rtlmeter collate ../all-results-${{ matrix.tag }}/*.json > ../all-results-${{ matrix.tag }}.json
- name: Upload combined results
uses: actions/upload-artifact@v7
with:
path: all-results-${{ matrix.tag }}.json
name: all-results-${{ matrix.tag }}
overwrite: true
retention-days: 30
publish-scheduled-results:
name: Publish results to verilator/verilator-rtlmeter-results
needs: combine-results
# Only run on scheduled builds on the main repository. We also restrict
# the publishing to run only on the first run_attempt. This is required
# to prevent multiple uploads the same day (if rerunning), as the
# dashboard UI currently assumes there is only one data point per
# calendar day. Results from reruns can be imported manually if needed.
if: ${{ github.event_name == 'schedule' && github.repository == 'verilator/verilator' && github.run_attempt == 1 && contains(needs.*.result, 'success') && !cancelled() }}
runs-on: ubuntu-24.04
steps:
- name: Download combined results
uses: actions/download-artifact@v8
with:
pattern: all-results-*
path: results
merge-multiple: true
- name: Upload published results
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/[email protected]
with:
app-id: ${{ vars.VERILATOR_CI_ID }}
private-key: ${{ secrets.VERILATOR_CI_KEY }}
owner: verilator
repositories: verilator-rtlmeter-results
permission-contents: write
- name: Checkout verilator-rtlmeter-results
uses: actions/checkout@v6
with:
repository: "verilator/verilator-rtlmeter-results"
token: ${{ steps.generate-token.outputs.token }}
path: verilator-rtlmeter-results
- name: Import results
id: import-results
working-directory: verilator-rtlmeter-results
run: |
for f in $(find ../results -name "*.json"); do \
echo "Importing $f"; \
./bin/add-rtlmeter-result $f; \
done
test -z "$(git status --porcelain)" || echo "valid=1" >> "$GITHUB_OUTPUT"
- name: Push to verilator-rtlmeter-results
if: ${{ steps.import-results.outputs.valid }}
working-directory: verilator-rtlmeter-results
run: |
git config --global user.email "[email protected]"
git config --global user.name "github action"
git add .
git commit -m "Verilator CI: Results of 'RTLMeter' workflow run #${{ github.run_number }}"
git push origin
prepare-pr-results:
name: Prepare Pull Request results
needs: combine-results
if: ${{ github.event_name == 'pull_request' && github.repository == 'verilator/verilator' && contains(needs.*.result, 'success') && !cancelled() }}
runs-on: ubuntu-24.04
permissions:
actions: read
steps:
- name: Checkout RTLMeter
uses: actions/checkout@v6
with:
repository: "verilator/rtlmeter"
path: rtlmeter
- name: Setup RTLMeter venv
working-directory: rtlmeter
run: make venv
- name: Download combined results
uses: actions/download-artifact@v8
with:
pattern: all-results-*
path: all-results
merge-multiple: true
- name: Get scheduled run info
id: scheduled-info
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
ID=$(gh run --repo ${{ github.repository }} list --workflow RTLMeter --event schedule --status success --limit 1 --json databaseId --jq ".[0].databaseId")
echo "id=$ID" >> $GITHUB_OUTPUT
URL=$(gh run --repo ${{ github.repository }} view $ID --json url --jq ".url")
echo "url=$URL" >> $GITHUB_OUTPUT
NUM=$(gh run --repo ${{ github.repository }} view $ID --json number --jq ".number")
echo "num=$NUM" >> $GITHUB_OUTPUT
DATE=$(gh run --repo ${{ github.repository }} view $ID --json createdAt --jq ".createdAt")
echo "date=$DATE" >> $GITHUB_OUTPUT
- name: Download scheduled run results
uses: actions/download-artifact@v8
with:
name: published-results
path: nightly-results
run-id: ${{ steps.scheduled-info.outputs.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Compare results
working-directory: rtlmeter
run: |
for tag in gcc clang gcc-hier; do
ADATA=../nightly-results/all-results-${tag}.json
BDATA=../all-results/all-results-${tag}.json
touch ../verilate-${tag}.txt
touch ../execute-${tag}.txt
touch ../cppbuild-${tag}.txt
if [[ ! -e $ADATA ]]; then
continue
fi
./rtlmeter compare --cases '* !Example:* !*:hello' --steps "verilate" --metrics "elapsed memory" $ADATA $BDATA > ../verilate-${tag}.txt
cat ../verilate-${tag}.txt
./rtlmeter compare --cases '* !Example:* !*:hello' --steps "execute" --metrics "speed memory elapsed" $ADATA $BDATA > ../execute-${tag}.txt
cat ../execute-${tag}.txt
./rtlmeter compare --cases '* !Example:* !*:hello' --steps "cppbuild" --metrics "elapsed memory cpu codeSize" $ADATA $BDATA > ../cppbuild-${tag}.txt
cat ../cppbuild-${tag}.txt
done
- name: Create report
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -x
NUM=$(gh run --repo ${{ github.repository }} view ${{ github.run_id }} --json number --jq ".number")
URL=$(gh run --repo ${{ github.repository }} view ${{ github.run_id }} --json url --jq ".url")
echo -n "Performance metrics for PR workflow [#$NUM]($URL) (B) compared to scheduled run" > report.txt
echo -n " [#${{ steps.scheduled-info.outputs.num }}](${{ steps.scheduled-info.outputs.url }}) (A)" >> report.txt
echo " from ${{ steps.scheduled-info.outputs.date }}" >> report.txt
for tag in gcc clang gcc-hier; do
echo "" >> report.txt
if [[ $tag == "gcc" ]]; then
echo "<details open>" >> report.txt
else
echo "<details>" >> report.txt
fi
echo -n "<summary><strong><em>" >> report.txt
jq -rj ".[0].runName" all-results/all-results-${tag}.json >> report.txt
echo "</em></strong></summary>" >> report.txt
awk -v RS= -v tag=${tag} '{print > sprintf("frag-%02d-verilate-%s.txt",NR,tag)}' verilate-${tag}.txt
awk -v RS= -v tag=${tag} '{print > sprintf("frag-%02d-execute-%s.txt" ,NR,tag)}' execute-${tag}.txt
awk -v RS= -v tag=${tag} '{print > sprintf("frag-$02d-cppbuild-%s.txt",NR,tag)}' cppbuild-${tag}.txt
for f in $(ls -1 frag-*-verilate-${tag}.txt | sort) $(ls -1 frag-*-execute-${tag}.txt | sort) $(ls -1 frag-*-cppbuild-${tag}.txt | sort); do
if [[ $f == frag-01-verilate-${tag}.txt || $f == frag-01-execute-${tag}.txt ]]; then
echo "<details open>" >> report.txt
else
echo "<details>" >> report.txt
fi
echo -n "<summary>" >> report.txt
head -n 1 $f | tr -d '\n' >> report.txt
echo "</summary>" >> report.txt
echo '<pre>' >> report.txt
tail -n +2 $f >> report.txt
echo '</pre>' >> report.txt
echo "</details>" >> report.txt
done
echo "</details>" >> report.txt
done
cat report.txt
- name: Upload report
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@v7
with:
path: pr-number.txt
name: pr-number
# Create GitHub issue for failed scheduled jobs
# This should always be the last job (we want an issue if anything breaks)
create-issue:
name: Create issue on failure
needs: publish-scheduled-results
if: ${{ github.event_name == 'schedule' && github.repository == 'verilator/verilator' && github.run_attempt == 1 && failure() && !cancelled() }}
runs-on: ubuntu-24.04
steps:
# Creating issues requires elevated privilege
- name: Generate access token
id: generate-token
uses: actions/[email protected]
with:
app-id: ${{ vars.VERILATOR_CI_ID }}
private-key: ${{ secrets.VERILATOR_CI_KEY }}
owner: verilator
repositories: verilator
permission-issues: write
- name: Create issue
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |-
echo "This issue was created automatically by the GitHub Actions CI due to the failure of a scheduled RTLMeter run." >> body.txt
echo "" >> body.txt
echo "Workflow status: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> body.txt
gh issue --repo ${{ github.repository }} create \
--title "RTLMeter run #${{ github.run_number }} Failed" \
--body-file body.txt \
--label new \
--assignee gezalore,wsnyder
+15 -4
View File
@@ -17,6 +17,7 @@
*.pdf
/Makefile
/.ccache
/.venv/
/artifact/
README
TAGS
@@ -29,15 +30,25 @@ dddrun*
doxygen-doc
gdbrun*
gmon.out
ncverilog.history
internals.txt
ncverilog.history
nohup.out
verilator-config-version.cmake
verilator-config.cmake
verilator.pc
verilator.txt
verilator_bin*
verilator_coverage_bin*
verilator.pc
verilator-config.cmake
verilator-config-version.cmake
**/__pycache__/*
**/_build/*
**/obj_dir/*
/.vscode/
/.idea/
/cmake-build-*/
/obj_coverage/
/test_regress/snapshot/
xmverilog.*
xrun.history
# Normal CMake build directory
/build
+8
View File
@@ -0,0 +1,8 @@
---
- id: verilator
name: verilator-lint
description: Runs verilator Docker image to lint (System) Verilog designs
args: [--lint-only]
language: docker_image
entry: verilator/verilator:latest
types_or: [verilog, system-verilog]
+4
View File
@@ -0,0 +1,4 @@
[style]
based_on_style = pep8
column_limit = 99
#split_before_arithmetic_operator=True
-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.
+28
View File
@@ -0,0 +1,28 @@
---
# See https://citation-file-format.github.io/
cff-version: 1.2.0
title: Verilator
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Wilson
family-names: Snyder
email: [email protected]
affiliation: Veripool
- given-names: Paul
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 only a
traditional simulator but a compiler.
license: [LGPL-3.0-only, Artistic-2.0]
+100 -31
View File
@@ -4,58 +4,102 @@
#
#*****************************************************************************
#
# Copyright 2003-2023 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
#
#****************************************************************************/
cmake_minimum_required(VERSION 3.15)
cmake_policy(SET CMP0091 NEW) # Use MSVC_RUNTIME_LIBRARY to select the runtime
project(Verilator
VERSION 5.014
project(
Verilator
VERSION 5.048
HOMEPAGE_URL https://verilator.org
LANGUAGES CXX
)
option(DEBUG_AND_RELEASE_AND_COVERAGE
"Builds both the debug and release binaries, overriding CMAKE_BUILD_TYPE. Not supported under MSBuild.")
# Set default build type to Release if not specified
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type" FORCE)
endif()
option(
DEBUG_AND_RELEASE_AND_COVERAGE
"Builds both the debug and release binaries, overriding CMAKE_BUILD_TYPE. Not supported under MSBuild."
)
find_package(Python3 COMPONENTS Interpreter)
set(PYTHON3 Python3::Interpreter)
set(CMAKE_INSTALL_DATADIR ${CMAKE_INSTALL_PREFIX})
set(PYTHON3 ${Python3_EXECUTABLE})
# See also CMake built-in; CMAKE_INSTALL_PREFIX is applied by the install command.
set(CMAKE_INSTALL_DATADIR .)
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
include(CheckStructHasMember)
include(ExternalProject)
include(FindThreads)
if (NOT WIN32)
if(NOT WIN32)
message(WARNING "CMake support on Linux/OSX is experimental.")
endif()
if (MSVC)
if (DEFINED ENV{WIN_FLEX_BISON})
if(WIN32)
if(DEFINED ENV{WIN_FLEX_BISON})
set(WIN_FLEX_BISON "$ENV{WIN_FLEX_BISON}")
endif()
if (EXISTS ${WIN_FLEX_BISON})
if(IS_DIRECTORY ${WIN_FLEX_BISON})
list(APPEND CMAKE_PREFIX_PATH ${WIN_FLEX_BISON})
else()
message(
FATAL_ERROR
"The path specified by WIN_FLEX_BISON environment variable is not an existing folder: ${WIN_FLEX_BISON}"
)
endif()
if (NOT WIN_FLEX_BISON)
message(FATAL_ERROR "Please install https://github.com/lexxmark/winflexbison and set WIN_FLEX_BISON environment variable. Please use install cmake target after a successful build.")
if(NOT WIN_FLEX_BISON)
message(
FATAL_ERROR
"Please install https://github.com/lexxmark/winflexbison and set WIN_FLEX_BISON environment variable. Please use install cmake target after a successful build."
)
endif()
set(CMAKE_CXX_STANDARD 20)
endif()
set(OBJCACHE "" CACHE STRING "Path for ccache, auto-detected if empty")
option(OBJCACHE_ENABLED "Compile Verilator with ccache" ON)
if(OBJCACHE_ENABLED)
if(OBJCACHE STREQUAL "")
find_program(OBJCACHE_PATH ccache)
if(OBJCACHE_PATH STREQUAL "OBJCACHE_PATH-NOTFOUND")
set(OBJCACHE_PATH "")
endif()
else()
set(OBJCACHE_PATH "${OBJCACHE}")
endif()
if(NOT OBJCACHE_PATH STREQUAL "")
execute_process(
COMMAND "${OBJCACHE_PATH}" --version
OUTPUT_VARIABLE objcache_version
)
string(REGEX MATCH "[^\n\r]+" objcache_version "${objcache_version}")
message(
STATUS
"Found ccache: ${OBJCACHE_PATH} (\"${objcache_version}\")"
)
set(CMAKE_CXX_COMPILER_LAUNCHER "${OBJCACHE_PATH}")
endif()
endif()
find_package(BISON)
find_package(FLEX)
# Build
#set_property(GLOBAL PROPERTY JOB_POOLS one_job=1)
if (DEBUG_AND_RELEASE_AND_COVERAGE)
if (CMAKE_GENERATOR MATCHES "^Visual Studio ")
if(DEBUG_AND_RELEASE_AND_COVERAGE)
if(CMAKE_GENERATOR MATCHES "^Visual Studio ")
error("%Error: The DEBUG_AND_RELEASE_AND_COVERAGE option is not supported in MSBuild-based builds.")
endif()
set(saved_build_type ${CMAKE_BUILD_TYPE})
@@ -74,44 +118,69 @@ endif()
set(PACKAGE_NAME ${PROJECT_NAME})
set(PACKAGE_VERSION ${PROJECT_VERSION})
set(CXX ${CMAKE_CXX_COMPILER})
set(AR ${CMAKE_AR})
configure_file(include/verilated_config.h.in include/verilated_config.h @ONLY)
configure_file(include/verilated.mk.in include/verilated.mk @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/include/verilated_config.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
configure_package_config_file(verilator-config.cmake.in verilator-config.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX}
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/include/verilated_config.h
DESTINATION include
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/include/verilated.mk
DESTINATION include
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/verilator-config.cmake DESTINATION ${CMAKE_INSTALL_PREFIX})
configure_package_config_file(verilator-config-version.cmake.in verilator-config-version.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX}
configure_package_config_file(
verilator-config.cmake.in
verilator-config.cmake
INSTALL_DESTINATION .
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/verilator-config-version.cmake DESTINATION ${CMAKE_INSTALL_PREFIX})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/verilator-config.cmake DESTINATION .)
foreach (program
configure_package_config_file(
verilator-config-version.cmake.in
verilator-config-version.cmake
INSTALL_DESTINATION .
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/verilator-config-version.cmake
DESTINATION .
)
foreach(
program
verilator
verilator_gantt
verilator_ccache_report
verilator_difftree
verilator_profcfunc
verilator_includer
)
install(PROGRAMS bin/${program} TYPE BIN)
endforeach()
install(DIRECTORY examples TYPE DATA FILES_MATCHING
install(
DIRECTORY examples
TYPE DATA
FILES_MATCHING
PATTERN "examples/*/*.[chv]*"
PATTERN "examples/*/Makefile*"
PATTERN "examples/*/CMakeLists.txt"
)
install(DIRECTORY include TYPE DATA FILES_MATCHING
install(
DIRECTORY include
TYPE DATA
FILES_MATCHING
PATTERN "include/verilated_config.h"
PATTERN "include/verilated.mk"
PATTERN "include/*.[chv]"
PATTERN "include/*.cpp"
PATTERN "include/*.vlt"
PATTERN "include/*.sv"
PATTERN "include/gtkwave/*.[chv]*"
PATTERN "include/vltstd/*.[chv]*"
+1547 -44
View File
File diff suppressed because it is too large Load Diff
+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/>
+527 -177
View File
@@ -7,10 +7,10 @@
#
#*****************************************************************************
#
# Copyright 2003-2023 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
#
#****************************************************************************/
@@ -52,6 +52,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
MAKEINFO = makeinfo
POD2TEXT = pod2text
PYTHON3 = @PYTHON3@
MKINSTALLDIRS = $(SHELL) $(srcdir)/src/mkinstalldirs
# Version (for docs/guide/conf.py)
@@ -76,7 +77,7 @@ datadir = @datadir@
# Directory in which to install documentation info files.
infodir = @infodir@
# Directory in which to install package specific files
# Directory in which to install package-specific files
# Generally ${prefix}/share/verilator
pkgdatadir = @pkgdatadir@
@@ -90,62 +91,68 @@ datarootdir = @datarootdir@
# Compile options
CFG_WITH_CCWARN = @CFG_WITH_CCWARN@
CFG_WITH_DEFENV = @CFG_WITH_DEFENV@
CFG_WITH_DEV_GCOV = @CFG_WITH_DEV_GCOV@
CFG_WITH_LONGTESTS = @CFG_WITH_LONGTESTS@
CFG_WITH_SOLVER = @CFG_WITH_SOLVER@
PACKAGE_VERSION = @PACKAGE_VERSION@
#### End of system configuration section. ####
######################################################################
# Main build targets
.SUFFIXES:
SHELL = /bin/sh
SUBDIRS = docs src test_regress \
examples/cmake_hello_c \
examples/cmake_hello_sc \
examples/cmake_tracing_c \
examples/cmake_tracing_sc \
examples/cmake_protect_lib \
examples/make_hello_binary \
examples/make_hello_c \
examples/make_hello_sc \
examples/make_tracing_c \
examples/make_tracing_sc \
examples/make_protect_lib \
examples/xml_py \
examples/cmake_hello_c \
examples/cmake_hello_sc \
examples/cmake_tracing_c \
examples/cmake_tracing_sc \
examples/cmake_protect_lib \
examples/make_hello_binary \
examples/make_hello_c \
examples/make_hello_sc \
examples/make_tracing_c \
examples/make_tracing_sc \
examples/make_protect_lib \
examples/json_py \
INFOS = verilator.html verilator.pdf
INFOS_OLD = README README.html README.pdf
EXAMPLES_FIRST = \
examples/make_hello_c \
examples/make_hello_sc \
examples/make_hello_c \
examples/make_hello_sc \
EXAMPLES = $(EXAMPLES_FIRST) $(filter-out $(EXAMPLES_FIRST), $(sort $(wildcard examples/*)))
# See uninstall also - don't put wildcards in this variable, it might uninstall other stuff
# No verilator_ccache_report.1, verilator_difftree.1 as those are not bin/ installed
VL_INST_MAN_FILES = \
verilator.1 \
verilator_coverage.1 \
verilator_gantt.1 \
verilator_profcfunc.1 \
verilator.1 \
verilator_coverage.1 \
verilator_gantt.1 \
verilator_profcfunc.1 \
default: all
all: all_nomsg msg_test
all_nomsg: verilator_exe $(VL_INST_MAN_FILES)
.PHONY:verilator_exe
.PHONY:verilator_bin$(EXEEXT)
.PHONY:verilator_bin_dbg$(EXEEXT)
.PHONY:verilator_coverage_bin_dbg$(EXEEXT)
.PHONY: verilator_exe
.PHONY: verilator_bin$(EXEEXT)
.PHONY: verilator_bin_dbg$(EXEEXT)
.PHONY: verilator_coverage_bin_dbg$(EXEEXT)
verilator_exe verilator_bin$(EXEEXT) verilator_bin_dbg$(EXEEXT) verilator_coverage_bin_dbg$(EXEEXT):
@echo ------------------------------------------------------------
@echo "making verilator in src"
$(MAKE) -C src $(OBJCACHE_JOBS)
.PHONY:msg_test
######################################################################
# Tests
.PHONY: msg_test
msg_test: all_nomsg
@echo "Build complete!"
@echo
@@ -155,7 +162,7 @@ msg_test: all_nomsg
.PHONY: test
ifeq ($(CFG_WITH_LONGTESTS),yes) # Local... Else don't burden users
test: smoke-test test_regress
# examples is part of test_regress's test_regress/t/t_a2_examples.pl
# examples is part of test_regress's test_regress/t/t_a2_examples.py
# (because that allows it to run in parallel with other test_regress's)
else
test: smoke-test examples
@@ -167,19 +174,26 @@ endif
@echo
smoke-test: all_nomsg
test_regress/t/t_a1_first_cc.pl
test_regress/t/t_a2_first_sc.pl
test_regress/t/t_a1_first_cc.py
test_regress/t/t_a2_first_sc.py
test_regress: all_nomsg
$(MAKE) -C test_regress
.PHONY: test-snap test-diff
test-snap test-diff:
$(MAKE) -C test_regress $@
examples: all_nomsg
for p in $(EXAMPLES) ; do \
$(MAKE) -C $$p VERILATOR_ROOT=`pwd` || exit 10; \
$(MAKE) -C $$p VERILATOR_ROOT=`pwd` || exit 10; \
done
######################################################################
# Docs
.PHONY: docs
docs: info
docs: info $(VL_INST_MAN_FILES)
info: $(INFOS)
@@ -188,7 +202,8 @@ verilator.1: ${srcdir}/bin/verilator
verilator_coverage.1: ${srcdir}/bin/verilator_coverage
pod2man $< $@
%.1: ${srcdir}/bin/%
help2man --no-info --no-discard-stderr --version-string=- $< -o $@
help2man --no-info --no-discard-stderr --version-string=- \
-n "$(shell $< --help | head -n 3 | tail -n 1)" $< -o $@
.PHONY: verilator.html
verilator.html:
@@ -199,56 +214,107 @@ verilator.html:
verilator.pdf: Makefile
$(MAKE) -C docs verilator.pdf
# See uninstall also - don't put wildcards in this variable, it might uninstall other stuff
VL_INST_BIN_FILES = verilator verilator_bin$(EXEEXT) verilator_bin_dbg$(EXEEXT) verilator_coverage_bin_dbg$(EXEEXT) \
verilator_ccache_report verilator_coverage verilator_difftree verilator_gantt verilator_includer verilator_profcfunc
# Some scripts go into both the search path and pkgdatadir,
# so they can be found by the user, and under $VERILATOR_ROOT.
TAGFILES = ${srcdir}/*/*.cpp ${srcdir}/*/*.h ${srcdir}/*/*.in \
${srcdir}/*.in ${srcdir}/*.pod
TAGS: $(TAGFILES)
etags $(TAGFILES)
.PHONY: doxygen
doxygen:
$(MAKE) -C docs doxygen
.PHONY: spelling
spelling:
$(MAKE) -C docs spelling
######################################################################
# Install
# Public executables intended to be invoked directly by the user
# Don't put wildcards in these variables, it might cause an uninstall of other stuff
VL_INST_PUBLIC_SCRIPT_FILES = \
verilator \
verilator_coverage \
verilator_gantt \
verilator_profcfunc \
VL_INST_PUBLIC_BIN_FILES = \
verilator_bin$(EXEEXT) \
verilator_bin_dbg$(EXEEXT) \
verilator_coverage_bin_dbg$(EXEEXT) \
# Private executabels intended to be invoked by internals
# Don't put wildcards in these variables, it might cause an uninstall of other stuff
VL_INST_PRIVATE_SCRIPT_FILES = \
verilator_ccache_report \
verilator_includer \
VL_INST_INC_BLDDIR_FILES = \
include/verilated_config.h \
include/verilated.mk \
include/verilated_config.h \
include/verilated.mk \
# Files under srcdir, instead of build time
VL_INST_INC_SRCDIR_FILES = \
include/*.[chv]* \
include/*.sv \
include/gtkwave/*.[chv]* \
include/vltstd/*.[chv]* \
include/*.[chv]* \
include/*.vlt \
include/*.sv \
include/gtkwave/*.[chv]* \
include/vltstd/*.[chv]* \
VL_INST_DATA_SRCDIR_FILES = \
examples/*/*.[chv]* \
examples/*/CMakeLists.txt \
examples/*/Makefile* \
examples/*/vl_* \
examples/*/*.[chv]* \
examples/*/CMakeLists.txt \
examples/*/Makefile* \
examples/*/vl_* \
installbin:
$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator $(DESTDIR)$(bindir)/verilator )
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_coverage $(DESTDIR)$(bindir)/verilator_coverage )
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_gantt $(DESTDIR)$(bindir)/verilator_gantt )
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_profcfunc $(DESTDIR)$(bindir)/verilator_profcfunc )
( cd bin ; $(INSTALL_PROGRAM) verilator_bin$(EXEEXT) $(DESTDIR)$(bindir)/verilator_bin$(EXEEXT) )
( cd bin ; $(INSTALL_PROGRAM) verilator_bin_dbg$(EXEEXT) $(DESTDIR)$(bindir)/verilator_bin_dbg$(EXEEXT) )
( cd bin ; $(INSTALL_PROGRAM) verilator_coverage_bin_dbg$(EXEEXT) $(DESTDIR)$(bindir)/verilator_coverage_bin_dbg$(EXEEXT) )
mkbindirs:
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/bin
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_includer $(DESTDIR)$(pkgdatadir)/bin/verilator_includer )
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_ccache_report $(DESTDIR)$(pkgdatadir)/bin/verilator_ccache_report )
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_difftree $(DESTDIR)$(pkgdatadir)/bin/verilator_difftree )
$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
installbin: | mkbindirs
cd $(srcdir)/bin; \
for p in $(VL_INST_PUBLIC_SCRIPT_FILES) ; do \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
done
perl -p -i -e 'use File::Spec;' \
-e' $$path = File::Spec->abs2rel("$(realpath $(DESTDIR)$(pkgdatadir))", "$(realpath $(DESTDIR)$(bindir))");' \
-e 's/my \$$verilator_pkgdatadir_relpath = .*/my \$$verilator_pkgdatadir_relpath = "$$path";/g' \
-- "$(DESTDIR)/$(bindir)/verilator"
cd bin; \
for p in $(VL_INST_PUBLIC_BIN_FILES) ; do \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
done
cd $(srcdir)/bin; \
for p in $(VL_INST_PRIVATE_SCRIPT_FILES) ; do \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkgdatadir)/bin/$$p; \
done
installredirect: installbin | mkbindirs
cp ${srcdir}/bin/redirect ${srcdir}/bin/redirect.tmp
perl -p -i -e 'use File::Spec;' \
-e' $$path = File::Spec->abs2rel("$(realpath $(DESTDIR)$(bindir))", "$(realpath $(DESTDIR)$(pkgdatadir)/bin)");' \
-e 's/RELPATH.*/"$$path";/g' -- "${srcdir}/bin/redirect.tmp"
cd $(srcdir)/bin; \
for p in $(VL_INST_PUBLIC_SCRIPT_FILES) $(VL_INST_PUBLIC_BIN_FILES) ; do \
$(INSTALL_PROGRAM) redirect.tmp $(DESTDIR)$(pkgdatadir)/bin/$$p; \
done
rm ${srcdir}/bin/redirect.tmp
# Man files can either be part of the original kit, or built in current directory
# So important we use $^ so VPATH is searched
installman: $(VL_INST_MAN_FILES)
$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
for p in $^ ; do \
$(INSTALL_DATA) $$p $(DESTDIR)$(mandir)/man1/$$p; \
$(INSTALL_DATA) $$p $(DESTDIR)$(mandir)/man1/$$p; \
done
installdata:
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/include/gtkwave
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/include/vltstd
for p in $(VL_INST_INC_BLDDIR_FILES) ; do \
$(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p; \
$(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p; \
done
cd $(srcdir) \
; for p in $(VL_INST_INC_SRCDIR_FILES) ; do \
@@ -265,7 +331,7 @@ installdata:
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/examples/cmake_tracing_c
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/examples/cmake_tracing_sc
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/examples/cmake_protect_lib
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/examples/xml_py
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/examples/json_py
cd $(srcdir) \
; for p in $(VL_INST_DATA_SRCDIR_FILES) ; do \
$(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p; \
@@ -277,8 +343,11 @@ installdata:
# We don't trust rm -rf, so rmdir instead as it will fail if user put in other files
uninstall:
-cd $(DESTDIR)$(bindir) && rm -f $(VL_INST_BIN_FILES)
-cd $(DESTDIR)$(pkgdatadir)/bin && rm -f $(VL_INST_BIN_FILES)
-cd $(DESTDIR)$(bindir) && rm -f $(VL_INST_PUBLIC_SCRIPT_FILES)
-cd $(DESTDIR)$(bindir) && rm -f $(VL_INST_PUBLIC_BIN_FILES)
-cd $(DESTDIR)$(pkgdatadir)/bin && rm -f $(VL_INST_PUBLIC_SCRIPT_FILES)
-cd $(DESTDIR)$(pkgdatadir)/bin && rm -f $(VL_INST_PUBLIC_BIN_FILES)
-cd $(DESTDIR)$(pkgdatadir)/bin && rm -f $(VL_INST_PRIVATE_SCRIPT_FILES)
-cd $(DESTDIR)$(mandir)/man1 && rm -f $(VL_INST_MAN_FILES)
-cd $(DESTDIR)$(pkgdatadir) && rm -f $(VL_INST_INC_BLDDIR_FILES)
-cd $(DESTDIR)$(pkgdatadir) && rm -f $(VL_INST_INC_SRCDIR_FILES)
@@ -301,65 +370,83 @@ uninstall:
-rmdir $(DESTDIR)$(pkgdatadir)/examples/cmake_tracing_c
-rmdir $(DESTDIR)$(pkgdatadir)/examples/cmake_tracing_sc
-rmdir $(DESTDIR)$(pkgdatadir)/examples/cmake_protect_lib
-rmdir $(DESTDIR)$(pkgdatadir)/examples/xml_py
-rmdir $(DESTDIR)$(pkgdatadir)/examples/json_py
-rmdir $(DESTDIR)$(pkgdatadir)/examples
-rmdir $(DESTDIR)$(pkgdatadir)
-rmdir $(DESTDIR)$(pkgconfigdir)
install: all_nomsg install-all
install-all: installbin installman installdata install-msg
install-all: installbin installredirect installman installdata install-msg
install-here: installman info
# Use --xml flag to see the cppcheck code to use for suppression
CPPCHECK1_CPP = $(wildcard $(srcdir)/include/*.cpp)
CPPCHECK2_CPP = $(wildcard $(srcdir)/examples/*/*.cpp)
CPPCHECK3_CPP = $(wildcard $(srcdir)/src/Vlc*.cpp)
CPPCHECK4_CPP = $(wildcard $(srcdir)/src/V3[A-D]*.cpp $(srcdir)/src/Verilator*.cpp)
CPPCHECK5_CPP = $(wildcard $(srcdir)/src/V3[E-I]*.cpp)
CPPCHECK6_CPP = $(wildcard $(srcdir)/src/V3[P-Z]*.cpp)
CPPCHECK7_CPP = $(wildcard $(srcdir)/src/V3[L-R]*.cpp)
CPPCHECK8_CPP = $(wildcard $(srcdir)/src/V3[S-Z]*.cpp)
CHECK_CPP = $(CPPCHECK1_CPP) $(CPPCHECK2_CPP) $(CPPCHECK3_CPP) $(CPPCHECK4_CPP) \
$(CPPCHECK5_CPP) $(CPPCHECK6_CPP) $(CPPCHECK7_CPP) $(CPPCHECK8_CPP)
CHECK_H = $(wildcard \
$(srcdir)/include/*.h \
$(srcdir)/src/*.h )
CHECK_YL = $(wildcard \
$(srcdir)/src/*.y \
$(srcdir)/src/*.l )
CPPCHECK = src/cppcheck_filtered cppcheck
CPPCHECK_FLAGS = --enable=all --inline-suppr \
--suppress=cstyleCast --suppress=useInitializationList \
--suppress=nullPointer --suppress=nullPointerRedundantCheck --suppress=ctunullpointer \
--suppress=unusedFunction --suppress=unusedScopedObject \
--suppress=useStlAlgorithm
CPPCHECK_FLAGS += --xml
CPPCHECK_DEP = $(subst .cpp,.cppcheck,$(CHECK_CPP))
CPPCHECK_INC = -I$(srcdir)/include -I$(srcdir)/src/obj_dbg -I$(srcdir)/src
install-msg:
@echo
@echo "Installed binaries to $(DESTDIR)$(bindir)/verilator"
@echo "Installed man to $(DESTDIR)$(mandir)/man1"
@echo "Installed examples to $(DESTDIR)$(pkgdatadir)/examples"
@echo
@echo "For documentation see 'man verilator' or 'verilator --help'"
@echo "For forums and to report bugs see https://verilator.org"
@echo
cppcheck: cppcheck-1 cppcheck-2 cppcheck-3 cppcheck-4 cppcheck-5 cppcheck-6 cppcheck-7 cppcheck-8
cppcheck-1:
$(CPPCHECK) $(CPPCHECK_FLAGS) -DVL_DEBUG=1 -DVL_CPPCHECK=1 $(CPPCHECK_INC) $(CPPCHECK1_CPP)
cppcheck-2:
$(CPPCHECK) $(CPPCHECK_FLAGS) -DVL_DEBUG=1 -DVL_CPPCHECK=1 $(CPPCHECK_INC) $(CPPCHECK2_CPP)
cppcheck-3:
$(CPPCHECK) $(CPPCHECK_FLAGS) -DVL_DEBUG=1 -DVL_CPPCHECK=1 $(CPPCHECK_INC) $(CPPCHECK3_CPP)
cppcheck-4:
$(CPPCHECK) $(CPPCHECK_FLAGS) -DVL_DEBUG=1 -DVL_CPPCHECK=1 $(CPPCHECK_INC) $(CPPCHECK4_CPP)
cppcheck-5:
$(CPPCHECK) $(CPPCHECK_FLAGS) -DVL_DEBUG=1 -DVL_CPPCHECK=1 $(CPPCHECK_INC) $(CPPCHECK5_CPP)
cppcheck-6:
$(CPPCHECK) $(CPPCHECK_FLAGS) -DVL_DEBUG=1 -DVL_CPPCHECK=1 $(CPPCHECK_INC) $(CPPCHECK6_CPP)
cppcheck-7:
$(CPPCHECK) $(CPPCHECK_FLAGS) -DVL_DEBUG=1 -DVL_CPPCHECK=1 $(CPPCHECK_INC) $(CPPCHECK7_CPP)
cppcheck-8:
$(CPPCHECK) $(CPPCHECK_FLAGS) -DVL_DEBUG=1 -DVL_CPPCHECK=1 $(CPPCHECK_INC) $(CPPCHECK8_CPP)
######################################################################
# Format/Lint
CPPCHECK_VERILATOR_CPP = $(wildcard $(srcdir)/src/V3*.cpp $(srcdir)/src/Verilator*.cpp)
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 = $(filter-out \
$(srcdir)/src/config_package.h \
$(srcdir)/src/config_rev.h, \
$(wildcard \
$(srcdir)/include/*.h \
$(srcdir)/src/*.h ))
CHECK_YL = $(wildcard \
$(srcdir)/src/*.y \
$(srcdir)/src/*.l )
CPPCHECK = cppcheck
CPPCHECK_JOBS = $(shell nproc)
CPPCHECK_CACHE = $(srcdir)/src/obj_dbg/cppcheck-cache
CPPCHECK_FLAGS = --enable=all
CPPCHECK_FLAGS += --inline-suppr
CPPCHECK_FLAGS += --suppressions-list=$(srcdir)/src/cppcheck-suppressions.txt
CPPCHECK_FLAGS += --cppcheck-build-dir=$(CPPCHECK_CACHE)
CPPCHECK_FLAGS += -DVL_DEBUG=1 -DVL_CPPCHECK=1 -DINFILTER_PIPE=1 -D__GNUC__=1
CPPCHECK_FLAGS += -j$(CPPCHECK_JOBS)
CPPCHECK_INC = -I$(srcdir)/include
CPPCHECK_INC += -I$(srcdir)/include/gtkwave
CPPCHECK_INC += -I$(srcdir)/include/vltstd
CPPCHECK_INC += -I$(srcdir)/src/obj_dbg
CPPCHECK_INC += -I$(srcdir)/src
$(CPPCHECK_CACHE): $(CHECK_CPP) $(CHECK_H) $(CHECK_YL)
/bin/rm -rf $@
/bin/mkdir -p $@
cppcheck-verilator: | $(CPPCHECK_CACHE)
$(CPPCHECK) $(CPPCHECK_FLAGS) $(CPPCHECK_INC) $(CPPCHECK_VERILATOR_CPP)
cppcheck-runtime: | $(CPPCHECK_CACHE)
$(CPPCHECK) $(CPPCHECK_FLAGS) $(CPPCHECK_INC) $(CPPCHECK_RUNTIME_CPP)
cppcheck-vlc: | $(CPPCHECK_CACHE)
$(CPPCHECK) $(CPPCHECK_FLAGS) $(CPPCHECK_INC) $(CPPCHECK_VLC_CPP)
cppcheck-examples: | $(CPPCHECK_CACHE)
$(CPPCHECK) $(CPPCHECK_FLAGS) $(CPPCHECK_INC) $(CPPCHECK_EXAMPLES_CPP)
cppcheck:
$(MAKE) cppcheck-vlc
$(MAKE) cppcheck-examples
$(MAKE) cppcheck-runtime
$(MAKE) cppcheck-verilator
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' \
-header-filter='.*' \
-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
@@ -378,74 +465,182 @@ analyzer-include:
-rm -rf examples/*/obj*
scan-build $(MAKE) -k examples
format: clang-format yapf format-pl-exec
# 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 \
CLANGFORMAT = clang-format-14
# CMake files
CMAKE_FILES = \
CMakeLists.txt \
examples/*/CMakeLists.txt \
src/CMakeLists.txt \
test_regress/CMakeLists.txt \
*.cmake.in \
# Makefiles
MAKE_FILES = \
Makefile*.in \
docs/Makefile* \
include/verilated.mk.in \
examples/*/Makefile* \
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 \
bin/verilator_difftree \
bin/verilator_gantt \
bin/verilator_includer \
bin/verilator_profcfunc \
docs/bin/vl_sphinx_extract \
docs/bin/vl_sphinx_fix \
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 = \
$(PY_PROGRAMS) \
test_regress/t/*.py \
# Python files, test_regress tests
PY_TEST_FILES = test_regress/t/*.py
# 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
clang-format:
@$(CLANGFORMAT) --version | egrep 14.0 > /dev/null \
|| echo "*** You are not using clang-format-14, indents may differ from master's ***"
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)
PY_PROGRAMS = \
bin/verilator_ccache_report \
bin/verilator_difftree \
bin/verilator_gantt \
bin/verilator_includer \
bin/verilator_profcfunc \
examples/xml_py/vl_file_copy \
examples/xml_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/cppcheck_filtered \
src/flexfix \
src/vlcovgen \
test_regress/t/*.pf \
nodist/clang_check_attributes \
nodist/code_coverage \
nodist/dot_importer \
nodist/fuzzer/actual_fail \
nodist/fuzzer/generate_dictionary \
nodist/install_test \
GERSEMI = gersemi
GERSEMI_FLAGS = -i --no-warn-about-unknown-commands
PY_FILES = \
$(PY_PROGRAMS) \
nodist/code_coverage.dat \
format-cmake:
$(GERSEMI) --version
$(GERSEMI) $(GERSEMI_FLAGS) $(CMAKE_FILES)
YAPF = yapf3
YAPF_FLAGS = -i
MBAKE = mbake
MBAKE_FLAGS = format --config ./.bake.toml
yapf:
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)
YAMLFIX = YAMLFIX_WHITELINES=1 YAMLFIX_LINE_LENGTH=200 YAMLFIX_preserve_quotes=true yamlfix
YAMLFIX_FLAGS =
format-yaml yamlfix:
$(YAMLFIX) --version
$(YAMLFIX) $(YAMLFIX_FLAGS) $(YAML_FILES)
######################################################################
# Lint
MYPY = mypy
MYPY_FLAGS = --strict --no-error-summary
PYLINT = pylint
PYLINT_FLAGS = --score=n --disable=R0801
PYLINT_FLAGS = --recursive=n --score=n --disable=R0801
PYLINT_TEST_FLAGS = $(PYLINT_FLAGS) --disable=C0103,C0114,C0116,C0209,C0411,C0413,C0301,R0801,R0912,R0915,R0916,R1702,W0511,W0621
RUFF = ruff
RUFF_FLAGS = check --ignore=E402,E501,E701
# "make -k" so can see all tool result errors
lint-py:
-$(PYLINT) $(PYLINT_FLAGS) $(PY_PROGRAMS)
-$(RUFF) $(RUFF_FLAGS) $(PY_PROGRAMS)
$(MAKE) -k lint-py-mypy lint-py-mypy-none lint-py-pylint lint-py-pylint-tests lint-py-ruff
format-pl-exec:
-chmod a+x test_regress/t/*.pl
lint-py-mypy:
for filename in `fgrep -l '# mypy' $(PY_PROGRAMS)`; do \
echo "$(MYPY) $(MYPY_FLAGS) $$filename" ; \
$(MYPY) $(MYPY_FLAGS) $$filename ; \
done
install-msg:
@echo
@echo "Installed binaries to $(DESTDIR)$(bindir)/verilator"
@echo "Installed man to $(DESTDIR)$(mandir)/man1"
@echo "Installed examples to $(DESTDIR)$(pkgdatadir)/examples"
@echo
@echo "For documentation see 'man verilator' or 'verilator --help'"
@echo "For forums and to report bugs see https://verilator.org"
@echo
lint-py-mypy-none:
@echo "mypy not checking: " `fgrep -L '# mypy' $(PY_PROGRAMS)`
lint-py-pylint:
$(PYLINT) $(PYLINT_FLAGS) $(PY_PROGRAMS)
lint-py-pylint-tests:
$(PYLINT) $(PYLINT_TEST_FLAGS) $(PY_TEST_FILES) | $(PYTHON3) nodist/lint_py_test_filter
lint-py-ruff:
$(RUFF) $(RUFF_FLAGS) $(PY_PROGRAMS)
######################################################################
# Configure
IN_WILD := ${srcdir}/*.in ${srcdir}/*/*.in
@@ -466,6 +661,152 @@ else
autoconf
endif
######################################################################
# Coverage collection and reporting
COVERAGE_DIR := obj_coverage
ifeq ($(CFG_WITH_DEV_GCOV),yes)
# Figure out base and head refs for coverage report
COVERAGE_REF_BASE := $(if $(COVERAGE_BASE),$(shell git rev-parse --short $(COVERAGE_BASE)))
COVERAGE_REF_HEAD := $(shell git rev-parse --short HEAD)
override undefine COVERAGE_BASE # Use the above variabels instead
# 'fastcov' setup
FASTCOV := nodist/fastcov.py
FASTCOV_OPT := -j $(shell nproc)
FASTCOV_OPT += --lcov
FASTCOV_OPT += --process-gcno
FASTCOV_OPT += --branch-coverage
FASTCOV_OPT += --dump-statistic
# Files matching the following glob patterns will be excluded from coverage
FASTCOV_OPT += --exclude-glob
FASTCOV_OPT += '/usr/*'
FASTCOV_OPT += '*examples/*'
FASTCOV_OPT += '*include/gtkwave/*'
FASTCOV_OPT += '*src/obj_dbg/*'
FASTCOV_OPT += '*src/obj_opt/*.yy.cpp'
FASTCOV_OPT += '*src/obj_opt/V3Ast*'
FASTCOV_OPT += '*src/obj_opt/V3Dfg*'
FASTCOV_OPT += '*src/obj_opt/V3ParseBison.c'
FASTCOV_OPT += '*test_regress/*'
# Lines *containing* these substrings will be excluded from *all* coverage
FASTCOV_OPT += --custom-exclusion-marker
FASTCOV_OPT += ASTGEN_MEMBERS
FASTCOV_OPT += ERROR_RSVD_WORD
FASTCOV_OPT += LCOV_EXCL_LINE
FASTCOV_OPT += V3ERROR_NA
FASTCOV_OPT += VL_DEFINE_DEBUG_FUNCTIONS
FASTCOV_OPT += VL_FATAL
FASTCOV_OPT += VL_RTTI_IMPL
FASTCOV_OPT += VL_UNREACHABLE
FASTCOV_OPT += v3fatalSrc
# Lines *starting* with these substrings will be ecluded from *branch* coverage
FASTCOV_OPT += --exclude-br-lines-starting-with
FASTCOV_OPT += BROKEN_BASE_RTN
FASTCOV_OPT += BROKEN_RTN
FASTCOV_OPT += NUM_ASSERT
FASTCOV_OPT += SELF_CHECK
FASTCOV_OPT += UASSERT
FASTCOV_OPT += UINFO
FASTCOV_OPT += assert
FASTCOV_OPT += 'if (VL_UNCOVERABLE'
FASTCOV_OPT += '} else if (VL_UNCOVERABLE'
# 'genhtml' setup
GENHTML := genhtml
GENHTML_OPT := -j $(shell nproc)
GENHTML_OPT += --branch-coverage
GENHTML_OPT += --demangle-cpp
GENHTML_OPT += --missed
GENHTML_OPT += --rc branch_coverage=1
GENHTML_OPT += --rc genhtml_hi_limit=100
GENHTML_OPT += --ignore-errors negative
ifeq ($(COVERAGE_REF_BASE),)
GENHTML_OPT += --header-title "Code coverage for Verilator $(shell git describe --dirty)"
else
GENHTML_OPT += --header-title "Patch coverage for Verilator $(COVERAGE_REF_BASE)..$(COVERAGE_REF_HEAD)$(if $(shell git status --porcelain),-dirty)"
endif
GENHTML_OPT += --flat
GENHTML_OPT += --precision 2
GENHTML_OPT += --legend
GENHTML_OPT += --show-proportion
GENHTML_OPT += --filter brace,blank,range
# There are loads (~20k combined), but using this seems fine on modern hardware
GCNO_FILES = $(shell find . -name '*.gcno')
GCDA_FILES = $(shell find . -name '*.gcda')
# Combine all .gcda coverage date files into lcov .info file
$(COVERAGE_DIR)/verilator.info: $(GCNO_FILES) $(GCDA_FILES)
@echo "####################################################################"
@echo "# fastcov: combining all .gcda files into lcov .info"
@echo "####################################################################"
@mkdir -p $(COVERAGE_DIR)
/usr/bin/time -f "That took %E" \
$(FASTCOV) $(FASTCOV_OPT) --output $@
# Filter combined .info file for patch coverage
$(COVERAGE_DIR)/verilator-patch.info: $(COVERAGE_DIR)/verilator.info
@echo "####################################################################"
@echo "# fastcov: Filtering for patch coverage"
@echo "####################################################################"
rm -f $(COVERAGE_DIR)/empty-patch
git diff $(COVERAGE_REF_BASE) -- include src > $(COVERAGE_DIR)/filter.patch
[ -s $(COVERAGE_DIR)/filter.patch ]] || touch $(COVERAGE_DIR)/empty-patch
$(FASTCOV) -C $^ --lcov -o $@ --diff-filter $(COVERAGE_DIR)/filter.patch
# Build coverage report
$(COVERAGE_DIR)/report/index.html: $(COVERAGE_DIR)/verilator$(if $(COVERAGE_REF_BASE),-patch).info
@echo "####################################################################"
@echo "# genhtml: Generating coverage report"
@echo "####################################################################"
@rm -rf $(COVERAGE_DIR)/report
[ -f $(COVERAGE_DIR)/empty-patch ]] || /usr/bin/time -f "That took %E" \
$(GENHTML) $(GENHTML_OPT) --output-directory $(COVERAGE_DIR)/report $^ || true
@# Uncommitted changes not tracked, force rebuild on next run if patch coverage
@$(if $(COVERAGE_REF_BASE),mv $(COVERAGE_DIR)/verilator-patch.info $(COVERAGE_DIR)/verilator-patch-last.info)
# Convenience targets
.PHONY: coverage-combine
coverage-combine: $(COVERAGE_DIR)/verilator.info
# Via recursive make, so the message is always printed
.PHONY: coverage-report
coverage-report:
@$(MAKE) --no-print-directory $(COVERAGE_DIR)/report/index.html || true
@if [ -f $(COVERAGE_DIR)/report/index.html ]; then \
echo "####################################################################"; \
echo "# Coverage report is at: $(COVERAGE_DIR)/report/index.html"; \
echo "# Use 'make coverage-view' to open it in your default browser"; \
echo "####################################################################"; \
elif [ -f $(COVERAGE_DIR)/empty-patch ]; then \
echo "####################################################################"; \
echo "# Patch is empty"; \
echo "####################################################################"; \
else \
echo "####################################################################"; \
echo "# Failed to create coverage report. Maybe no data, or error?"; \
echo "####################################################################"; \
false; \
fi
# Open covarage report in default web browser
.PHONY: coverage-view
coverage-view: coverage-report
@test -f $(COVERAGE_DIR)/report/index.html && open $(COVERAGE_DIR)/report/index.html || true
# Deletes all coverage data files (.gcda)
.PHONY: coverage-zero
coverage-zero: # 'rm $(GCDA_FILES)' might fail with too many args
$(FASTCOV) --zerocounters
endif
######################################################################
# Clean
maintainer-clean::
@echo "This command is intended for maintainers to use;"
@echo "rebuilding the deleted files requires autoconf."
@@ -473,8 +814,8 @@ maintainer-clean::
clean mostlyclean distclean maintainer-clean maintainer-copy::
for dir in $(SUBDIRS); do \
echo making $@ in $$dir ; \
$(MAKE) -C $$dir $@ ; \
echo making $@ in $$dir ; \
$(MAKE) -C $$dir $@ ; \
done
clean mostlyclean distclean maintainer-clean::
@@ -485,28 +826,19 @@ clean mostlyclean distclean maintainer-clean::
rm -f *.tex
rm -rf examples/*/obj_dir* examples/*/logs
rm -rf test_*/obj_dir
rm -rf src/*.tidy include/*.tidy examples/*/*.tidy
rm -rf .ruff_cache
rm -rf nodist/fuzzer/dictionary
rm -rf nodist/obj_dir
rm -rf $(COVERAGE_DIR)
rm -rf verilator.txt
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
TAGFILES=${srcdir}/*/*.cpp ${srcdir}/*/*.h ${srcdir}/*/*.in \
${srcdir}/*.in ${srcdir}/*.pod
TAGS: $(TAGFILES)
etags $(TAGFILES)
.PHONY: doxygen
doxygen:
$(MAKE) -C docs doxygen
######################################################################
# Distributions
@@ -527,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"
+61 -50
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
.. image:: https://img.shields.io/badge/Website-Verilator.org-181717.svg
:target: https://verilator.org
.. image:: https://img.shields.io/badge/License-LGPL%20v3-blue.svg
:target: https://www.gnu.org/licenses/lgpl-3.0
.. image:: https://img.shields.io/badge/License-Artistic%202.0-0298c3.svg
:target: https://opensource.org/licenses/Artistic-2.0
.. image:: https://repology.org/badge/tiny-repos/verilator.svg?header=distro%20packages
:target: https://repology.org/project/verilator/versions
.. image:: https://img.shields.io/docker/pulls/verilator/verilator
:target: https://hub.docker.com/r/verilator/verilator
.. image:: https://api.codacy.com/project/badge/Grade/fa78caa433c84a4ab9049c43e9debc6f
:target: https://www.codacy.com/gh/verilator/verilator
.. image:: https://codecov.io/gh/verilator/verilator/branch/master/graph/badge.svg
:target: https://codecov.io/gh/verilator/verilator
.. image:: https://github.com/verilator/verilator/workflows/build/badge.svg
:target: https://github.com/verilator/verilator/actions?query=workflow%3Abuild
|badge1| |badge2| |badge3| |badge4| |badge5| |badge7| |badge8|
.. |badge1| image:: https://img.shields.io/badge/Website-Verilator.org-181717.svg
:target: https://verilator.org
.. |badge2| image:: https://img.shields.io/badge/License-LGPL%20v3-blue.svg
:target: https://www.gnu.org/licenses/lgpl-3.0
.. |badge3| image:: https://img.shields.io/badge/License-Artistic%202.0-0298c3.svg
:target: https://opensource.org/licenses/Artistic-2.0
.. |badge4| image:: https://repology.org/badge/tiny-repos/verilator.svg?header=distro%20packages
:target: https://repology.org/project/verilator/versions
.. |badge5| image:: https://img.shields.io/docker/pulls/verilator/verilator
:target: https://hub.docker.com/r/verilator/verilator
.. |badge7| image:: https://github.com/verilator/verilator/workflows/build/badge.svg
:target: https://github.com/verilator/verilator/actions?query=workflow%3Abuild
.. |badge8| image:: https://img.shields.io/github/actions/workflow/status/verilator/verilator/rtlmeter.yml?branch=master&event=schedule&label=benchmarks
:target: https://verilator.github.io/verilator-rtlmeter-results
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**
@@ -37,6 +39,7 @@ Welcome to Verilator
* - **Widely Used**
* Wide industry and academic deployment
* Out-of-the-box support from Arm and RISC-V vendor IP
* Over 700 contributors
- |verilator usage|
* - |verilator community|
- **Community Driven & Openly Licensed**
@@ -53,44 +56,45 @@ 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, needs 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 the
closed-source Verilog simulators (e.g., Carbon Design Systems Carbonator,
Modelsim/Questa, Cadence Incisive/NC-Verilog, Synopsys VCS, VTOC, and
Pragmatic CVer/CVC). But, Verilator is open-sourced, so you can spend on
computes rather than licenses. Thus, Verilator gives you the best
simulation cycles/dollar.
Verilator has typically similar or better performance versus closed-source
Verilog simulators (e.g., Aldec Riviera-Pro, Cadence Incisive/NC-Verilog,
Mentor ModelSim/Questa, Synopsys VCS, VTOC, and Pragmatic CVer/CVC). But,
Verilator is open-sourced, so you can spend on computes rather than
licenses. Thus, Verilator gives you the best simulation cycles/dollar.
Installation & Documentation
@@ -101,8 +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,26 +136,33 @@ organizations; please see `Verilator Commercial Support
Related Projects
================
- `GTKwave <http://gtkwave.sourceforge.net/>`_ - Waveform viewer for
- `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.
- `Icarus Verilog`_ - Icarus is a full-featured interpreted Verilog
- `Icarus Verilog`_ - Icarus is a highly-featured interpreted Verilog
simulator. If Verilator does not support your needs, perhaps Icarus may.
- `Surfer <https://surfer-project.org/>`_ - Web or offline waveform viewer
for Verilator traces.
Open License
============
Verilator is Copyright 2003-2023 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: http://iverilog.icarus.com
.. _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
+61
View File
@@ -0,0 +1,61 @@
# 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",
"ci/docker/buildenv/wavetools.conf",
"docs/CONTRIBUTORS",
"docs/spelling.txt",
"docs/verilated.dox",
"examples/**/*.vc",
"install-sh",
"test_regress/.gdbinit",
"test_regress/input.vc",
"test_regress/input.xsim.vc",
"test_regress/t/*.dat",
"test_regress/t/*.gprof",
"test_regress/t/*.mem",
"test_regress/t/*.out",
"test_regress/t/*.tree",
"test_regress/t/*.vc",
"test_regress/t/t_lint_bsspace_bad.v",
"verilator.pc.in",
]
SPDX-FileCopyrightText = "2003-2026 Wilson Snyder"
SPDX-License-Identifier = "CC0-1.0"
[[annotations]]
path = [
"docs/_static/**",
"docs/gen/*.rst",
"docs/guide/figures/**",
]
SPDX-FileCopyrightText = "2003-2026 Wilson Snyder"
SPDX-License-Identifier = "LGPL-3.0-only OR Artistic-2.0"
[[annotations]]
path = "test_regress/t/uvm/**"
SPDX-FileCopyrightText = [
"2010-2017 Mentor Graphics Corporation",
"2010-2013 Synopsys, Inc.",
"2010-2018 Cadence Design Systems, Inc.",
"2013 NVIDIA Corporation",
]
SPDX-License-Identifier = "Apache-2.0"
[[annotations]]
path = "include/gtkwave/lz4.*"
SPDX-FileCopyrightText = "2011-2023 Yann Collet"
SPDX-License-Identifier = "BSD-2-Clause"
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env perl
######################################################################
#
# 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
#
######################################################################
require 5.006_001;
use warnings;
use FindBin qw($RealBin $RealScript);
use strict;
my $relpath = RELPATH; # Substituted during Verilator 'make install'
unshift @ARGV, $RealScript;
exec { "$RealBin/$relpath/$RealScript" } @ARGV;
die "%Error: Exec failed,";
+201 -90
View File
@@ -1,10 +1,10 @@
#!/usr/bin/env perl
######################################################################
#
# Copyright 2003-2023 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
#
######################################################################
@@ -15,6 +15,7 @@ use Getopt::Long;
use FindBin qw($RealBin $RealScript);
use IO::File;
use Pod::Usage;
use Cwd qw(realpath);
use strict;
use vars qw($Debug @Opt_Verilator_Sw);
@@ -26,12 +27,29 @@ use vars qw($Debug @Opt_Verilator_Sw);
autoflush STDOUT 1;
autoflush STDERR 1;
# Guard against unbounded recursive re-entry. Hierarchical / --build flows
# legitimately re-enter the wrapper a few levels deep (wrapper -> verilator_bin
# -> make -> wrapper -> ...); a misconfigured VERILATOR_BIN, VERILATOR_GDB or
# VERILATOR_VALGRIND that points back at this wrapper, however, recurses
# without bound and exhausts the OS PID table. Use VERILATOR_RUNNING as a
# depth counter and cap it well above any real nesting.
my $verilator_running_max = 16;
my $verilator_running_depth = ($ENV{VERILATOR_RUNNING} || 0) + 1;
if ($verilator_running_depth > $verilator_running_max) {
die "%Error: verilator: re-entered $verilator_running_depth levels deep"
. " via \$VERILATOR_RUNNING; check that VERILATOR_BIN, VERILATOR_GDB"
. " and VERILATOR_VALGRIND do not resolve back to this wrapper script.\n";
}
$ENV{VERILATOR_RUNNING} = $verilator_running_depth;
$Debug = 0;
my $opt_aslr;
my $opt_gdb;
my $opt_rr;
my $opt_gdbbt;
my $opt_quiet_exit;
my $opt_unlimited_stack = 1;
my $opt_valgrind;
# No arguments can't do anything useful. Give help
if ($#ARGV < 0) {
@@ -39,6 +57,7 @@ if ($#ARGV < 0) {
}
# Insert debugging options up front
# (VERILATOR_TEST_FLAGS is not a documented nor official supported feature)
push @ARGV, (split ' ', $ENV{VERILATOR_TEST_FLAGS} || "");
# We sneak a look at the flags so we can do some pre-environment checks
@@ -54,17 +73,34 @@ if (! GetOptions(
"debug" => \&debug,
# "version!" => \&version, # Also passthru'ed
# Switches
"aslr!" => \$opt_aslr,
"gdb!" => \$opt_gdb,
"gdbbt!" => \$opt_gdbbt,
"quiet!" => \$opt_quiet_exit, # As -quiet implies -quiet-exit
"quiet-exit!" => \$opt_quiet_exit,
"rr!" => \$opt_rr,
"unlimited-stack!" => \$opt_unlimited_stack,
"valgrind!" => \$opt_valgrind,
# Additional parameters
"<>" => sub {}, # Ignored
)) {
pod2usage(-exitstatus => 2, -verbose => 0);
}
# WARNING: $verilator_pkgdatadir_relpath is substituted during Verilator 'make install'
my $verilator_pkgdatadir_relpath = "..";
my $verilator_root = realpath("$RealBin/$verilator_pkgdatadir_relpath");
if (defined $ENV{VERILATOR_ROOT}) {
if ((!-d $ENV{VERILATOR_ROOT}) || $verilator_root ne realpath($ENV{VERILATOR_ROOT})) {
warn "%Error: verilator: VERILATOR_ROOT is set to inconsistent path. Suggest leaving it unset.\n";
warn "%Error: VERILATOR_ROOT=$ENV{VERILATOR_ROOT}\n";
exit 1;
}
} else {
print "export VERILATOR_ROOT='$verilator_root'\n" if $Debug;
$ENV{VERILATOR_ROOT} = $verilator_root;
}
if ($opt_gdbbt && !gdb_works()) {
warn "-Info: --gdbbt ignored: gdb doesn't seem to be working\n" if $Debug;
$opt_gdbbt = 0;
@@ -79,7 +115,7 @@ my @quoted_sw = map { sh_escape($_) } @Opt_Verilator_Sw;
if ($opt_gdb) {
# Generic GDB interactive
run (ulimit_stack_unlimited()
. aslr_off()
. aslr(0)
. ($ENV{VERILATOR_GDB} || "gdb")
. " " . verilator_bin()
# Note, uncomment to set breakpoints before running:
@@ -96,28 +132,40 @@ if ($opt_gdb) {
} elsif ($opt_rr) {
# Record with rr
run (ulimit_stack_unlimited()
. aslr_off()
. aslr(0)
. "rr record " . verilator_bin()
. " " . join(' ', @quoted_sw));
} elsif ($opt_gdbbt && $Debug) {
# Run under GDB to get gdbbt
run (ulimit_stack_unlimited()
. aslr_off()
. aslr(0)
. "gdb"
. " " . verilator_bin()
. " --batch --quiet --return-child-result"
. " -ex \"run " . join(' ', @quoted_sw)."\""
. " -ex 'set width 0'"
. " -ex 'bt' -ex 'quit'");
} elsif ($opt_valgrind) {
# Run under valgrind
my $valgrind_bin = ($ENV{VERILATOR_VALGRIND} || "valgrind --error-exitcode=1 --max-stackframe=2815880"
# Magic number suggested by Valgrind, may need to be increased in future
# if you get warnings. See: https://valgrind.org/docs/manual/manual-core.html#opt.max-stackframe
);
run (ulimit_stack_unlimited()
. aslr(0)
. $valgrind_bin
. " " . verilator_bin()
. " " . join(' ', @quoted_sw));
} elsif ($Debug) {
# Debug
run(ulimit_stack_unlimited()
. aslr_off()
. aslr(0)
. verilator_bin()
. " " . join(' ', @quoted_sw));
} else {
# Normal, non gdb
run(ulimit_stack_unlimited() . verilator_bin() . " " . join(' ', @quoted_sw));
# Normal, non-gdb
run(ulimit_stack_unlimited() . aslr(1) . verilator_bin() . " " . join(' ', @quoted_sw));
}
#----------------------------------------------------------------------
@@ -137,30 +185,13 @@ sub debug {
# Builds
sub verilator_bin {
my $bin = "";
# Use VERILATOR_ROOT if defined, else assume verilator_bin is in the search path
my $basename = ($ENV{VERILATOR_BIN}
|| ($Debug ? "verilator_bin_dbg" : "verilator_bin"));
if (defined($ENV{VERILATOR_ROOT})) {
my $dir = $ENV{VERILATOR_ROOT};
if (-x "$dir/bin/$basename"
|| -x "$dir/bin/$basename.exe") { # From a "make install" into VERILATOR_ROOT
$bin = "$dir/bin/$basename";
} else {
$bin = "$dir/$basename"; # From pointing to kit directory
}
if (-x "$RealBin/$basename" || -x "$RealBin/$basename.exe") {
return "$RealBin/$basename";
} else {
if (-x "$RealBin/$basename"
|| -x "$RealBin/$basename.exe") {
$bin = "$RealBin/$basename"; # From path/to/verilator with verilator_bin installed
} else {
$bin = $basename; # Find in PATH
}
# Note we don't look under bin/$basename which would be right if running
# in the kit dir. Running that would likely break, since
# VERILATOR_ROOT wouldn't be set and Verilator won't find internal files.
return $basename; # Find in PATH
}
return $bin;
}
#######################################################################
@@ -179,21 +210,45 @@ sub gdb_works {
return $status == 0;
}
sub aslr_off {
my $ok = `setarch --addr-no-randomize echo ok 2>/dev/null` || "";
if ($ok =~ /ok/) {
return "setarch --addr-no-randomize ";
} else {
return "";
sub aslr {
my $want_on = shift;
$want_on = $opt_aslr if defined $opt_aslr;
if (!$want_on) {
my $ok = `setarch --addr-no-randomize echo ok 2>/dev/null` || "";
if ($ok =~ /ok/) {
return "setarch --addr-no-randomize ";
}
}
return "";
}
sub ulimit_stack_unlimited {
return "" if !$opt_unlimited_stack;
system("ulimit -s unlimited 2>/dev/null");
my $limit = "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
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);
}
}
system("ulimit -s $limit 2>/dev/null");
my $status = $?;
if ($status == 0) {
return "ulimit -s unlimited 2>/dev/null; exec ";
return "ulimit -s $limit 2>/dev/null; exec ";
} else {
return "";
}
@@ -214,17 +269,18 @@ sub run {
warn "%Error: export VERILATOR_ROOT=" . ($ENV{VERILATOR_ROOT} || "") . "\n";
warn "%Error: $command\n";
}
if ($status & 127) {
if (($status & 127) == 4 # SIGILL
|| ($status & 127) == 8 # SIGFPA
|| ($status & 127) == 11) { # SIGSEGV
my $signal = ($status & 127);
if ($signal) {
if ($signal == 4 # SIGILL
|| $signal == 8 # SIGFPA
|| $signal == 11) { # SIGSEGV
warn "%Error: Verilator internal fault, sorry. "
. "Suggest trying --debug --gdbbt\n" if !$Debug;
} elsif (($status & 127) == 6) { # SIGABRT
} elsif ($signal == 6) { # SIGABRT
warn "%Error: Verilator aborted. "
. "Suggest trying --debug --gdbbt\n" if !$Debug;
} else {
warn "%Error: Verilator threw signal $status. "
warn "%Error: Verilator threw signal $signal. "
. "Suggest trying --debug --gdbbt\n" if !$Debug;
}
}
@@ -232,8 +288,8 @@ sub run {
warn "%Error: Command Failed $command\n";
}
exit $! if $!; # errno
exit $? >> 8 if $? >> 8; # child exit status
exit 255; # last resort
exit $? >> 8 if $? >> 8; # pass along child exit code
exit 128 + $signal; # last resort
}
}
@@ -243,7 +299,7 @@ sub sh_escape {
# This is similar to quotemeta() but less aggressive.
# There's no need to escape hyphens, periods, or forward slashes
# for the shell as these have no special meaning to the shell.
$arg =~ s/([^0-9a-zA-Z_\-\+\=\.\/])/\\$1/g;
$arg =~ s/([^0-9a-zA-Z_\-\+\=\.\/:])/\\$1/g;
return $arg;
}
@@ -256,8 +312,7 @@ __END__
=head1 NAME
Verilator - Translate and simulate SystemVerilog code using C++/SystemC
Verilator - Lint, compile and simulate SystemVerilog code using C++/SystemC
=head1 SYNOPSIS
@@ -298,7 +353,10 @@ detailed descriptions of these arguments.
+1800-2009ext+<ext> Use SystemVerilog 2009 with file extension <ext>
+1800-2012ext+<ext> Use SystemVerilog 2012 with file extension <ext>
+1800-2017ext+<ext> Use SystemVerilog 2017 with file extension <ext>
--assert Enable all assertions
+1800-2023ext+<ext> Use SystemVerilog 2023 with file extension <ext>
--no-aslr Disable address space layout randomization
--no-assert Disable all assertions
--no-assert-case Disable unique/unique0/priority-case assertions
--autoflush Flush streams after all $displays
--bbox-sys Blackbox unknown $system calls
--bbox-unsup Blackbox unsupported language features
@@ -307,13 +365,15 @@ detailed descriptions of these arguments.
--build-dep-bin <filename> Override build dependency Verilator binary
--build-jobs <jobs> Parallelism for --build
--cc Create C++ output
--cdc Clock domain crossing analysis
-CFLAGS <flags> C++ compiler arguments for makefile
--clk <signal-name> Mark specified signal as clock
--no-clk <signal-name> Prevent marking specified signal as clock
--compiler <compiler-name> Tune for specified C++ compiler
--compiler-include Include additional header in the precompiled one
--constraint-array-limit <size> Maximum array size for constraint array reduction
--converge-limit <loops> Tune convergence settle time
--coverage Enable all coverage
--coverage-expr Enable expression coverage
--coverage-expr-max <value> Maximum permutations allowed for an expression
--coverage-fsm Enable FSM state/arc coverage
--coverage-line Enable line coverage
--coverage-max-width <width> Maximum array depth for coverage
--coverage-toggle Enable toggle coverage
@@ -325,21 +385,30 @@ detailed descriptions of these arguments.
--no-debug-leak Disable leaking memory in --debug mode
--debugi <level> Enable debugging at a specified level
--debugi-<srcfile> <level> Enable debugging a source file at a level
--no-decoration Disable comments and symbol decorations
--no-decoration Disable comments and lower spacing level
--decorations <level> Set output comment and spacing level
--default-language <lang> Default language to parse
+define+<var>=<value> Set preprocessor define
--diagnostics-sarif Enable SARIF diagnostics output
--diagnostics-sarif-output <filename> Set SARIF diagnostics output file
--dpi-hdr-only Only produce the DPI header file
--dump-<srcfile> Enable dumping everything in source file
--dump-defines Show preprocessor defines with -E
--dump-dfg Enable dumping DfgGraphs to .dot files
--dump-dfg-patterns Enable dumping Dfg pattern statistics
--dump-graph Enable dumping V3Graphs to .dot files
--dump-inputs Enable dumping preprocessed input files
--dump-tree Enable dumping Ast .tree files
--dump-tree-addrids Use short identifiers instead of addresses
--dump-<srcfile> Enable dumping everything in source file
--dump-tree-dot Enable dumping Ast .tree.dot debug files
--dump-tree-json Enable dumping Ast .tree.json files and .tree.meta.json file
--dumpi-<srcfile> <level> Enable dumping everything in source file at level
--dumpi-dfg <level> Enable dumping DfgGraphs to .dot files at level
--dumpi-graph <level> Enable dumping V3Graphs to .dot files at level
--dumpi-tree <level> Enable dumping Ast .tree files at level
--dumpi-<srcfile> <level> Enable dumping everything in source file at level
--dumpi-tree-json <level> Enable dumping Ast .tree.json files at level
-E Preprocess, but do not compile
--emit-accessors Emit getter and setter methods for model top class
--error-limit <value> Abort after this number of errors
--exe Link to create executable
--expand-limit <value> Set expand optimization limit
@@ -347,55 +416,79 @@ 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
-G<name>=<value> Overwrite top-level parameter
--gate-stmts <value> Tune gate optimizer depth
--gdb Run Verilator under GDB interactively
--gdbbt Run Verilator under GDB for backtrace
--generate-key Create random key for --protect-key
--getenv <var> Get environment variable with defaults
--get-supported <feature> Get if feature is supported
--help Display this help
--getenv <var> Get environment variable with defaults
--help Show this help
--hierarchical Enable hierarchical Verilation
--hierarchical-block <block> Internal use only for --hierarchical
--hierarchical-child <block> Internal use only for --hierarchical
--hierarchical-params-file <name> Internal option that specifies parameters file for hier blocks
--hierarchical-threads <threads> Number of threads for hierarchical scheduling
-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
--no-json-edit-nums Don't dump editNum in .tree.json files
--no-json-ids Don't use short identifiers instead of addresses/paths in .tree.json
--json-only Create JSON parser output (.tree.json and .meta.json)
--json-only-meta-output <filename> Set .tree.meta.json output filename
--json-only-output <filename> Set .tree.json output filename
--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
--lint-only Lint, but do not make output
--make <build-tool> Generate scripts for specified build tool
-MAKEFLAGS <flags> Arguments to pass to make during --build
--localize-max-size <value> Tune localize optimization variable size
--main Generate C++ main() file
--main-top-name Specify top name passed to Verilated model in generated C++ main
--make <build-tool> Generate scripts for specified build tool
-MAKEFLAGS <flags> Arguments to pass to make during --build
--max-num-width <value> Maximum number width (default: 64K)
--Mdir <directory> Name of output object directory
--MMD Create .d dependency files
--mod-prefix <topname> Name to prepend to lower classes
--MP Create phony dependency targets
+notimingchecks Ignored
-o <executable> Name of final executable
-O0 Disable optimizations
-O1 Default optimizations
-O2 Stronger optimizations
-O3 High-performance optimizations
-O<optimization-letter> Selectable optimizations
-o <executable> Name of final executable
--no-order-clock-delay Disable ordering clock enable assignments
--output-groups <numfiles> Group .cpp files into larger ones
--output-split <statements> Split .cpp files into pieces
--output-split-cfuncs <statements> Split model functions
--output-split-ctrace <statements> Split tracing functions
-P Disable line numbers and blanks with -E
--pins-bv <bits> Specify types for top-level ports
--pins-inout-enables Specify that __en and __out signals be created for inouts
--pins-sc-biguint Specify types for top-level ports
--pins-sc-uint Specify types for top-level ports
--pins-sc-uint-bool Specify types for top-level ports
--pins-uint8 Specify types for top-level ports
--no-pins64 Don't use uint64_t's for 33-64 bit sigs
--pipe-filter <command> Filter all input through a script
--pp-comments Show preprocessor comments with -E
--prefix <topname> Name of top-level class
--preproc-comments Include preprocessor comments in the output with -E
--preproc-defines Include preprocessor defines in the output with -E
--preproc-resolve Include all found modules in the output with -E
--preproc-token-limit Maximum tokens on a line allowed by preprocessor
--private Debugging; see docs
--prof-c Compile C++ code with profiling
--prof-cfuncs Name functions for profiling
@@ -404,57 +497,72 @@ detailed descriptions of these arguments.
--protect-ids Hash identifier names for obscurity
--protect-key <key> Key for symbol protection
--protect-lib <name> Create a DPI protected library
--public Debugging; see docs
--public-params Mark all parameters as public_flat
--public Mark signals as public; see docs
--public-depth <level> Mark public to specified module depth
--public-flat-rw Mark all variables, etc as public_flat_rw
--public-ignore Ignore all public comment markings
--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 Minimum iterations for forming loops
--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
--no-std Prevent parsing standard library
--structs-packed Convert all unpacked structures to packed structures
--no-std Prevent loading standard files
--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
-sv Enable SystemVerilog parsing
+systemverilogext+<ext> Synonym for +1800-2017ext+<ext>
+systemverilogext+<ext> Synonym for +1800-2023ext+<ext>
--threads <threads> Enable multithreading
--threads-dpi <mode> Enable multithreaded DPI
--threads-max-mtasks <mtasks> Tune maximum mtask partitioning
--timing Enable timing support
--no-timing Disable timing support
--timescale <timescale> Sets default timescale
--timescale-override <timescale> Overrides all timescales
--timing Enable timing support
--no-timing Disable timing support
--top <topname> Alias of --top-module
--top-module <topname> Name of top-level input module
--trace Enable waveform creation
--trace Enable VCD waveform creation
--trace-coverage Enable tracing of coverage
--trace-depth <levels> Depth of tracing
--trace-fst Enable FST waveform creation
--trace-max-array <depth> Maximum bit width for tracing
--trace-max-width <width> Maximum array depth for tracing
--trace-max-array <depth> Maximum array depth for tracing
--trace-max-width <width> Maximum bit width for tracing
--trace-params Enable tracing of parameters
--trace-saif Enable SAIF file creation
--trace-structs Enable tracing structure names
--trace-threads <threads> Enable FST waveform creation on separate threads
--no-trace-top Do not emit traces for signals in the top module generated by verilator
--trace-underscore Enable tracing of _signals
--trace-vcd Enable VCD waveform creation
-U<var> Undefine preprocessor define
--no-unlimited-stack Don't disable stack size limit
--unroll-count <loops> Tune maximum loop iterations
--unroll-limit <loops> Maximum loop iterations before assuming infinite loop
--unroll-stmts <stmts> Tune maximum loop body size
--unused-regexp <regexp> Tune UNUSED lint signals
-V Verbose version and config
-v <filename> Verilog library
--verilate-jobs Job threads for Verilation stage
--valgrind Run Verilator under valgrind
--no-verilate Skip Verilation and just compile previously Verilated code
--verilate-jobs Job threads for Verilation stage
+verilog1995ext+<ext> Synonym for +1364-1995ext+<ext>
+verilog2001ext+<ext> Synonym for +1364-2001ext+<ext>
--version Displays program version and exits
--version Show program version and exits
--vpi Enable VPI compiles
--waiver-output <filename> Create a waiver file based on the linter warnings
--waiver-multiline Create multiline --match for waivers
--waiver-output <filename> Create a waiver file based on linter warnings
-Wall Enable all style warnings
-Werror-<message> Convert warnings to errors
-Wfuture-<message> Disable unknown message warnings
@@ -463,6 +571,7 @@ detailed descriptions of these arguments.
-Wno-fatal Disable fatal exit on warnings
-Wno-lint Disable all lint warnings
-Wno-style Disable all style warnings
-work <libname> Set config library for following files
-Wpedantic Warn on compliance-test issues
-Wwarn-<message> Enable specified warning message
-Wwarn-lint Enable lint warning message
@@ -470,8 +579,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
@@ -481,26 +588,30 @@ description of these arguments.
=for VL_SPHINX_EXTRACT "_build/gen/args_verilated.rst"
+verilator+debug Enable debugging
+verilator+debugi+<value> Enable debugging at a level
+verilator+error+limit+<value> Set error limit
+verilator+help Display help
+verilator+noassert Disable assert checking
+verilator+coverage+file+<filename> Set coverage output filename
+verilator+debug Enable debugging
+verilator+debugi+<value> Enable debugging at a level
+verilator+error+limit+<value> Set error limit
+verilator+help Show help
+verilator+noassert Disable assert checking
+verilator+prof+exec+file+<filename> Set execution profile filename
+verilator+prof+exec+start+<value> Set execution profile starting point
+verilator+prof+exec+window+<value> Set execution profile duration
+verilator+prof+vlt+file+<filename> Set PGO profile filename
+verilator+rand+reset+<value> Set random reset technique
+verilator+seed+<value> Set random seed
+verilator+V Verbose version and config
+verilator+version Show version and exit
+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-2023 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.
+38 -46
View File
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# mypy: disallow-untyped-defs
# pylint: disable=C0103,C0114,C0115,C0116,C0123,C0209,C0301,R0902,R0913,R0914,R0912,R0915,W0621
######################################################################
@@ -16,19 +17,15 @@ parser = argparse.ArgumentParser(
For documentation see
https://verilator.org/guide/latest/exe_verilator_ccache_report.html""",
epilog=
"""Copyright 2002-2023 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()
@@ -37,7 +34,7 @@ results = {}
elapsed = {}
def toDateTime(s):
def toDateTime(s: str) -> datetime:
return datetime.strptime(s, "%Y-%m-%dT%H:%M:%S.%f")
@@ -54,44 +51,39 @@ for logfile in args.logdir.iterdir():
match = re.match(r'\[(\S+)\s.*Result: (.*)$', line)
if match:
assert obj is not None
assert start is not None
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")
+26 -20
View File
@@ -1,10 +1,10 @@
#!/usr/bin/env perl
######################################################################
#
# Copyright 2003-2023 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));
@@ -118,21 +118,24 @@ sub run {
warn "%Error: export VERILATOR_ROOT=" . ($ENV{VERILATOR_ROOT} || "") . "\n";
warn "%Error: $command\n";
}
if ($status & 127) {
if (($status & 127) == 8 || ($status & 127) == 11) { # SIGFPA or SIGSEGV
my $signal = ($status & 127);
if ($signal) {
if ($signal == 4 # SIGILL
|| $signal == 8 # SIGFPA
|| $signal == 11) { # SIGSEGV
warn "%Error: Verilator_coverage internal fault, sorry.\n" if !$Debug;
} elsif (($status & 127) == 6) { # SIGABRT
} elsif ($signal == 6) { # SIGABRT
warn "%Error: Verilator_coverage aborted.\n" if !$Debug;
} else {
warn "%Error: Verilator_coverage threw signal $status.\n" if !$Debug;
warn "%Error: Verilator_coverage threw signal $signal.\n" if !$Debug;
}
}
if ($status != 256 || $Debug) { # i.e. not normal exit(1)
warn "%Error: Command Failed $command\n";
}
exit $! if $!; # errno
exit $? >> 8 if $? >> 8; # child exit status
exit 255; # last resort
exit $? >> 8 if $? >> 8; # pass along child exit code
exit 128 + $signal; # last resort
}
}
@@ -154,9 +157,9 @@ verilator_coverage - Verilator coverage analyzer
verilator_coverage --annotate <obj>
verilator_coverage -write merged.dat -read <datafiles>...
verilator_coverage -write merged.dat <datafiles>...
verilator_coverage -write-info merged.info -read <datafiles>...
verilator_coverage -write-info merged.info <datafiles>...
Verilator_coverage processes Verilated model-generated coverage reports.
@@ -170,29 +173,32 @@ L<https://verilator.org/guide/latest/exe_verilator_coverage.html>.
--annotate-all All files should be shown.
--annotate-min <count> Minimum occurrence count for uncovered.
--annotate-points Annotates info from each coverage point.
--filter-type <regex> Keep only records of given coverage type.
--help Displays this message and version and exits.
--include-reset-arcs Include reset arcs in FSM arc summaries.
--rank Compute relative importance of tests.
--unlink With --write, unlink all inputs
--version Displays program version and exits.
--write <filename> Write aggregate coverage results.
--write-info <filename.info> Write lcov .info.
+libext+I<ext>+I<ext>... Extensions for Verilog files.
+define+I<var>+I<value> Defines the given variable.
-DI<var>=I<value> Defines the given variable.
+incdir+I<dir> Add directory for finding include files.
-II<dir> Add directory for finding include files.
-y I<dir> Specifies module search directory.
+libext+<ext>+<ext>... Extensions for Verilog files.
+define+<var>+<value> Defines the given variable.
-D<var>=<value> Defines the given variable.
+incdir+<dir> Add directory for finding include files.
-I<dir> Add directory for finding include files.
-y <dir> Specifies module search directory.
=head1 DISTRIBUTION
The latest version is available from L<https://verilator.org>.
Copyright 2003-2023 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
+34 -35
View File
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
# pylint: disable=C0103,C0114,C0116,C0209
# mypy: disallow-untyped-defs
# pylint: disable=C0103,C0114,C0116,C0209,W0603
######################################################################
import argparse
@@ -9,25 +10,29 @@ import os.path
import re
import sys
exit_code = 0
def diff(a, b):
def diff(a: str, b: str) -> None:
if not os.path.exists(a):
sys.exit("%Error: No old diff filename found: " + a)
sys.stderr.write("%Error: No old diff filename found: " + a + "\n")
sys.exit(2)
if not os.path.exists(b):
sys.exit("%Error: No new diff filename found: " + b)
sys.stderr.write("%Error: No new diff filename found: " + b + "\n")
sys.exit(2)
if os.path.isdir(a) and os.path.isdir(b):
diff_dir(a, b)
elif os.path.isfile(a) and os.path.isfile(b):
diff_file(a, b)
else:
sys.exit("%Error: Mix of files and dirs")
sys.stderr.write("%Error: Mix of files and dirs")
sys.exit(2)
def diff_dir(a, b):
def diff_dir(a: str, b: str) -> None:
# Diff all files under two directories
files = collections.defaultdict(lambda: {})
files: dict[str, dict[str, str]] = collections.defaultdict(lambda: {})
for fn in glob.glob(a + "/*.tree"):
base = re.sub(r'.*/', '', fn)
@@ -47,11 +52,12 @@ def diff_dir(a, b):
diff_file(a, b)
anyfile = True
if not anyfile:
sys.stderr.write(
"%Warning: No .tree files found that have similar base names\n")
sys.stderr.write("%Warning: No .tree files found that have similar base names\n")
def diff_file(a, b):
def diff_file(a: str, b: str) -> None:
global exit_code
# Compare the two tree files
short_a = re.sub(r'[^a-zA-Z0-9.]+', '_', a)
short_b = re.sub(r'[^a-zA-Z0-9.]+', '_', b)
@@ -66,25 +72,18 @@ def diff_file(a, b):
filterf(a, tmp_a)
filterf(b, tmp_b)
os.system("diff -u " + tmp_a + " " + tmp_b)
status = os.system("diff -u " + tmp_a + " " + tmp_b)
os.unlink(tmp_a)
os.unlink(tmp_b)
def version_from(filename):
# Return dump format
with open(filename, "r", encoding="utf8") as fh:
lineno = 0
for line in fh:
if lineno > 10:
break
match = re.search(r'format (0x[0-9.]+)', line)
if match:
return hex(match.group(1))
return 1.0
status_exit_code = status >> 8
if status_exit_code == 1:
exit_code = 1
elif status_exit_code:
exit_code = 2
def filterf(fn1, fn2):
def filterf(fn1: str, fn2: str) -> None:
# Remove hex numbers before diffing
with open(fn1, "r", encoding="utf8") as fh1:
with open(fn2, "w", encoding="utf8") as fh2:
@@ -108,19 +107,18 @@ parser = argparse.ArgumentParser(
Verilator_difftree is used for debugging Verilator tree output files.
It performs a diff between two files, or all files common between two
directories, ignoring irrelevant pointer differences.""",
epilog=
"""Copyright 2005-2023 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.
directories, ignoring irrelevant pointer differences.
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0""")
Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.""",
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.
parser.add_argument('--debug',
action='store_const',
const=9,
help='enable debug')
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',
action='store_false',
help='do not show differences in line numbering')
@@ -129,6 +127,7 @@ parser.add_argument('fileb', help='input file b to diff')
Args = parser.parse_args()
diff(Args.filea, Args.fileb)
sys.exit(exit_code)
######################################################################
# Local Variables:
+435 -308
View File
@@ -1,52 +1,66 @@
#!/usr/bin/env python3
# pylint: disable=C0103,C0114,C0116,C0209,C0301,R0914,R0912,R0915,W0511,eval-used
# pylint: disable=C0103,C0114,C0116,C0209,C0301,R0914,R0912,R0915,W0511,W0603,eval-used
######################################################################
import argparse
import bisect
import collections
import math
import re
import statistics
from collections import OrderedDict
# from pprint import pprint
Threads = collections.defaultdict(lambda: collections.defaultdict(lambda: {}))
Mtasks = collections.defaultdict(lambda: {})
Evals = collections.defaultdict(lambda: {})
EvalLoops = collections.defaultdict(lambda: {})
Sections = OrderedDict()
LongestVcdStrValueLength = 0
Threads = collections.defaultdict(lambda: []) # List of records per thread id
Mtasks = collections.defaultdict(lambda: {'elapsed': 0, 'end': 0})
Cpus = collections.defaultdict(lambda: {'mtask_time': 0})
Global = {
'args': {},
'cpuinfo': collections.defaultdict(lambda: {}),
'rdtsc_cycle_time': 0,
'info': {
'numa': 'no data'
},
'stats': {}
}
ElapsedTime = None # total elapsed time
ExecGraphTime = 0 # total elapsed time executing an exec graph
WaitingTime = 0 # total elapsed time waiting for mtasks
ExecGraphIntervals = [] # list of (start, end) pairs
ThreadScheduleWaitIntervals = [] # list of (start, tick, ecpu) pairs
######################################################################
def process(filename):
read_data(filename)
report()
def read_data(filename):
def read_data(filename: str) -> None:
with open(filename, "r", encoding="utf8") as fh:
re_thread = re.compile(r'^VLPROFTHREAD (\d+)$')
re_record = re.compile(r'^VLPROFEXEC (\S+) (\d+)(.*)$')
# The hierBlock argument is optional
re_payload_mtaskBegin = re.compile(
r'id (\d+) predictStart (\d+) cpu (\d+)')
re_payload_mtaskEnd = re.compile(r'id (\d+) predictCost (\d+)')
r'id (\d+) predictStart (\d+) cpu (\d+)(?: hierBlock)?\s*(\w+)?')
re_payload_mtaskEnd = re.compile(r'predictCost (\d+)')
re_payload_wait = re.compile(r'cpu (\d+)')
re_arg1 = re.compile(r'VLPROF arg\s+(\S+)\+([0-9.]*)\s*')
re_arg2 = re.compile(r'VLPROF arg\s+(\S+)\s+([0-9.]*)\s*$')
re_stat = re.compile(r'VLPROF stat\s+(\S+)\s+([0-9.]+)')
re_time = re.compile(r'rdtsc time = (\d+) ticks')
re_info = re.compile(r'VLPROF info\s+(\S+)\s+(.*)$')
re_stat = re.compile(r'VLPROF stat\s+(\S+)\s+(\S+)')
re_proc_cpu = re.compile(r'VLPROFPROC processor\s*:\s*(\d+)\s*$')
re_proc_dat = re.compile(r'VLPROFPROC ([a-z_ ]+)\s*:\s*(.*)$')
cpu = None
thread = None
thread = 0
thread_last_ecpu = None
lastEvalBeginTick = None
lastEvalLoopBeginTick = None
global LongestVcdStrValueLength
global ExecGraphTime
global WaitingTime
ExecGraphStack = []
SectionStack = []
MtasksStack = []
ThreadScheduleWait = collections.defaultdict(list)
for line in fh:
recordMatch = re_record.match(line)
@@ -54,47 +68,70 @@ def read_data(filename):
kind, tick, payload = recordMatch.groups()
tick = int(tick)
payload = payload.strip()
if kind == "EVAL_BEGIN":
Evals[tick]['start'] = tick
lastEvalBeginTick = tick
elif kind == "EVAL_END":
Evals[lastEvalBeginTick]['end'] = tick
lastEvalBeginTick = None
elif kind == "EVAL_LOOP_BEGIN":
EvalLoops[tick]['start'] = tick
lastEvalLoopBeginTick = tick
elif kind == "EVAL_LOOP_END":
EvalLoops[lastEvalLoopBeginTick]['end'] = tick
lastEvalLoopBeginTick = None
if kind == "SECTION_PUSH":
LongestVcdStrValueLength = max(LongestVcdStrValueLength, len(payload))
SectionStack.append(payload)
Sections[thread].append((tick, tuple(SectionStack)))
elif kind == "SECTION_POP":
assert SectionStack, "SECTION_POP without SECTION_PUSH"
SectionStack.pop()
Sections[thread].append((tick, tuple(SectionStack)))
elif kind == "MTASK_BEGIN":
mtask, predict_start, ecpu = re_payload_mtaskBegin.match(
mtask, predict_start, ecpu, hier_block = re_payload_mtaskBegin.match(
payload).groups()
hier_block = "" if hier_block is None else hier_block
mtask = int(mtask)
predict_start = int(predict_start)
ecpu = int(ecpu)
Threads[thread][tick]['mtask'] = mtask
Threads[thread][tick]['predict_start'] = predict_start
Threads[thread][tick]['cpu'] = ecpu
if 'elapsed' not in Mtasks[mtask]:
Mtasks[mtask] = {'end': 0, 'elapsed': 0}
Mtasks[mtask]['begin'] = tick
Mtasks[mtask]['thread'] = thread
Mtasks[mtask]['predict_start'] = predict_start
records = Threads[thread]
records.append({
'start': tick,
'mtask': mtask,
'predict_start': predict_start,
'hier_block': hier_block,
'cpu': ecpu
})
Mtasks[(hier_block, mtask)]['begin'] = tick
Mtasks[(hier_block, mtask)]['predict_start'] = predict_start
Mtasks[(hier_block, mtask)]['thread'] = thread
MtasksStack.append((hier_block, mtask, records[-1]))
elif kind == "MTASK_END":
mtask, predict_cost = re_payload_mtaskEnd.match(
payload).groups()
predict_cost, = re_payload_mtaskEnd.match(payload).groups()
mtask = int(mtask)
hier_block, mtask, record = MtasksStack.pop()
predict_cost = int(predict_cost)
begin = Mtasks[mtask]['begin']
Threads[thread][begin]['end'] = tick
Threads[thread][begin]['predict_cost'] = predict_cost
Mtasks[mtask]['elapsed'] += tick - begin
Mtasks[mtask]['predict_cost'] = predict_cost
Mtasks[mtask]['end'] = max(Mtasks[mtask]['end'], tick)
begin = Mtasks[(hier_block, mtask)]['begin']
record['end'] = tick
assert record and records[-1]['start'] <= records[-1]['end'] <= tick
record['predict_cost'] = predict_cost
Mtasks[(hier_block, mtask)]['elapsed'] += tick - begin
Mtasks[(hier_block, mtask)]['predict_cost'] = predict_cost
Mtasks[(hier_block, mtask)]['end'] = max(Mtasks[(hier_block, mtask)]['end'],
tick)
elif kind == "THREAD_SCHEDULE_WAIT_BEGIN":
ecpu = int(re_payload_wait.match(payload).groups()[0])
thread_last_ecpu = ecpu
ThreadScheduleWait[ecpu].append(tick)
elif kind == "THREAD_SCHEDULE_WAIT_END":
# Might have ended on different CPU then we got THREAD_SCHEDULE_WAIT_BEGIN
assert thread_last_ecpu is not None, "THREAD_SCHEDULE_WAIT_END without BEGIN"
ecpu = thread_last_ecpu
thread_last_ecpu = None
start = ThreadScheduleWait[ecpu].pop()
WaitingTime += tick - start
ThreadScheduleWaitIntervals.append((start, tick, ecpu))
elif kind == "EXEC_GRAPH_BEGIN":
ExecGraphStack.append(tick)
elif kind == "EXEC_GRAPH_END":
assert ExecGraphStack, "EXEC_GRAPH_END without EXEC_GRAPH_BEGIN"
execGraphStart = ExecGraphStack.pop()
ExecGraphTime += tick - execGraphStart
ExecGraphIntervals.append((execGraphStart, tick))
elif Args.debug:
print("-Unknown execution trace record: %s" % line)
elif re_thread.match(line):
thread = int(re_thread.match(line).group(1))
Sections[thread] = []
elif re.match(r'^VLPROF(THREAD|VERSION)', line):
pass
elif re_arg1.match(line):
@@ -103,13 +140,16 @@ def read_data(filename):
elif re_arg2.match(line):
match = re_arg2.match(line)
Global['args'][match.group(1)] = match.group(2)
elif re_info.match(line):
match = re_info.match(line)
Global['info'][match.group(1)] = match.group(2)
elif re_stat.match(line):
match = re_stat.match(line)
Global['stats'][match.group(1)] = match.group(2)
elif re_proc_cpu.match(line):
match = re_proc_cpu.match(line)
cpu = int(match.group(1))
elif cpu and re_proc_dat.match(line):
elif cpu is not None and re_proc_dat.match(line):
match = re_proc_dat.match(line)
term = match.group(1)
value = match.group(2)
@@ -121,11 +161,6 @@ def read_data(filename):
pass
elif Args.debug:
print("-Unk: %s" % line)
# TODO -- this is parsing text printed by a client.
# Really, verilator proper should generate this
# if it's useful...
if re_time.match(line):
Global['rdtsc_cycle_time'] = re_time.group(1)
def re_match_result(regexp, line, result_to):
@@ -136,7 +171,7 @@ def re_match_result(regexp, line, result_to):
######################################################################
def report():
def report() -> None:
print("Verilator Gantt report")
print("\nArgument settings:")
@@ -144,34 +179,57 @@ def report():
plus = "+" if re.match(r'^\+', arg) else " "
print(" %s%s%s" % (arg, plus, Global['args'][arg]))
nthreads = int(Global['stats']['threads'])
Global['cpus'] = {}
for thread in Threads:
# Make potentially multiple characters per column
for start in Threads[thread]:
if not Threads[thread][start]:
continue
cpu = Threads[thread][start]['cpu']
elapsed = Threads[thread][start]['end'] - start
if cpu not in Global['cpus']:
Global['cpus'][cpu] = {'cpu_time': 0}
Global['cpus'][cpu]['cpu_time'] += elapsed
for records in Threads.values():
for record in records:
cpu = record['cpu']
elapsed = record['end'] - record['start']
Cpus[cpu]['mtask_time'] += elapsed
measured_mt_mtask_time = 0
predict_mt_mtask_time = 0
long_mtask_time = 0
measured_last_end = 0
predict_last_end = 0
for mtask in Mtasks:
measured_mt_mtask_time += Mtasks[mtask]['elapsed']
predict_mt_mtask_time += Mtasks[mtask]['predict_cost']
measured_last_end = max(measured_last_end, Mtasks[mtask]['end'])
predict_last_end = max(
predict_last_end,
Mtasks[mtask]['predict_start'] + Mtasks[mtask]['predict_cost'])
long_mtask_time = max(long_mtask_time, Mtasks[mtask]['elapsed'])
Global['measured_last_end'] = measured_last_end
Global['predict_last_end'] = predict_last_end
global ElapsedTime
ElapsedTime = int(Global['stats']['ticks'])
nthreads = int(Global['stats']['threads'])
ncpus = max(len(Cpus), 1)
print("\nSummary:")
print(" Total elapsed time = {} rdtsc ticks".format(ElapsedTime))
print(" Parallelized code = {:.2%} of elapsed time".format(ExecGraphTime / ElapsedTime))
print(" Waiting time = {:.2%} of elapsed time".format(WaitingTime / ElapsedTime))
print(" Total threads = %d" % nthreads)
print(" Total CPUs used = %d" % ncpus)
print(" Total mtasks = %d" % len(Mtasks))
print(" Total yields = %d" % int(Global['stats'].get('yields', 0)))
report_numa()
report_mtasks()
report_cpus()
report_sections()
if nthreads > ncpus:
print()
print("%%Warning: There were fewer CPUs (%d) than threads (%d)." % (ncpus, nthreads))
print(" : See docs on use of numactl.")
else:
if 'cpu_socket_cores_warning' in Global:
print()
print("%Warning: Multiple threads scheduled on same hyperthreaded core.")
print(" : See docs on use of numactl.")
if 'cpu_sockets_warning' in Global:
print()
print("%Warning: Threads scheduled on multiple sockets.")
print(" : See docs on use of numactl.")
print()
def report_numa() -> None:
print("\nNUMA assignment:")
print(" NUMA status = %s" % Global['info']['numa'])
def report_mtasks() -> None:
if not Mtasks:
return
nthreads = int(Global['stats']['threads'])
# If we know cycle time in the same (rdtsc) units,
# this will give us an actual utilization number,
@@ -181,130 +239,136 @@ def report():
# serial mode, to estimate the overhead of data sharing,
# which will show up in the total elapsed time. (Overhead
# of synchronization and scheduling should not.)
print("\nAnalysis:")
print(" Total threads = %d" % nthreads)
print(" Total mtasks = %d" % len(Mtasks))
ncpus = max(len(Global['cpus']), 1)
print(" Total cpus used = %d" % ncpus)
print(" Total yields = %d" %
int(Global['stats'].get('yields', 0)))
print(" Total evals = %d" % len(Evals))
print(" Total eval loops = %d" % len(EvalLoops))
if Mtasks:
print(" Total eval time = %d rdtsc ticks" %
Global['measured_last_end'])
print(" Longest mtask time = %d rdtsc ticks" % long_mtask_time)
print(" All-thread mtask time = %d rdtsc ticks" %
measured_mt_mtask_time)
long_efficiency = long_mtask_time / (Global.get(
'measured_last_end', 1) or 1)
print(" Longest-thread efficiency = %0.1f%%" %
(long_efficiency * 100.0))
mt_efficiency = measured_mt_mtask_time / (
Global.get('measured_last_end', 1) * nthreads or 1)
print(" All-thread efficiency = %0.1f%%" %
(mt_efficiency * 100.0))
print(" All-thread speedup = %0.1f" %
(mt_efficiency * nthreads))
if Global['rdtsc_cycle_time'] > 0:
ut = measured_mt_mtask_time / Global['rdtsc_cycle_time']
print("tot_mtask_cpu=" + measured_mt_mtask_time + " cyc=" +
Global['rdtsc_cycle_time'] + " ut=" + ut)
total_mtask_time = 0
thread_mtask_time = collections.defaultdict(lambda: 0)
long_mtask_time = 0
long_mtask = None
long_mtask_hier_block = None
predict_mtask_time = 0
predict_elapsed = 0
for (hier_block, mtask_id) in Mtasks:
record = Mtasks[(hier_block, mtask_id)]
predict_mtask_time += record['predict_cost']
total_mtask_time += record['elapsed']
thread_mtask_time[record['thread']] += record['elapsed']
predict_end = record['predict_start'] + record['predict_cost']
predict_elapsed = max(predict_elapsed, predict_end)
if record['elapsed'] > long_mtask_time:
long_mtask_time = record['elapsed']
long_mtask = mtask_id
long_mtask_hier_block = hier_block
Global['predict_last_end'] = predict_elapsed
predict_mt_efficiency = predict_mt_mtask_time / (
Global.get('predict_last_end', 1) * nthreads or 1)
print("\nPrediction (what Verilator used for scheduling):")
print(" All-thread efficiency = %0.1f%%" %
(predict_mt_efficiency * 100.0))
print(" All-thread speedup = %0.1f" %
(predict_mt_efficiency * nthreads))
serialTime = ElapsedTime - ExecGraphTime
p2e_ratios = []
min_p2e = 1000000
min_mtask = None
max_p2e = -1000000
max_mtask = None
def subReport(elapsed, work):
print(" Thread utilization = {:7.2%}".format(work / (elapsed * nthreads)))
print(" Speedup = {:6.3}x".format(work / elapsed))
for mtask in sorted(Mtasks.keys()):
if Mtasks[mtask]['elapsed'] > 0:
if Mtasks[mtask]['predict_cost'] == 0:
Mtasks[mtask]['predict_cost'] = 1 # don't log(0) below
p2e_ratio = math.log(Mtasks[mtask]['predict_cost'] /
Mtasks[mtask]['elapsed'])
p2e_ratios.append(p2e_ratio)
print("\nParallelized code, measured:")
subReport(ExecGraphTime, total_mtask_time)
if p2e_ratio > max_p2e:
max_p2e = p2e_ratio
max_mtask = mtask
if p2e_ratio < min_p2e:
min_p2e = p2e_ratio
min_mtask = mtask
print("\nParallelized code, predicted during static scheduling:")
subReport(predict_elapsed, predict_mtask_time)
print("\nMTask statistics:")
print(" min log(p2e) = %0.3f" % min_p2e, end="")
print(" from mtask %d (predict %d," %
(min_mtask, Mtasks[min_mtask]['predict_cost']),
end="")
print(" elapsed %d)" % Mtasks[min_mtask]['elapsed'])
print(" max log(p2e) = %0.3f" % max_p2e, end="")
print(" from mtask %d (predict %d," %
(max_mtask, Mtasks[max_mtask]['predict_cost']),
end="")
print(" elapsed %d)" % Mtasks[max_mtask]['elapsed'])
print("\nAll code, measured:")
subReport(ElapsedTime, serialTime + total_mtask_time)
stddev = statistics.pstdev(p2e_ratios)
mean = statistics.mean(p2e_ratios)
print(" mean = %0.3f" % mean)
print(" stddev = %0.3f" % stddev)
print(" e ^ stddev = %0.3f" % math.exp(stddev))
print("\nAll code, measured, scaled by predicted speedup:")
expectedParallelSpeedup = predict_mtask_time / predict_elapsed
scaledElapsed = serialTime + total_mtask_time / expectedParallelSpeedup
subReport(scaledElapsed, serialTime + total_mtask_time)
report_cpus()
p2e_ratios = []
min_p2e = 1000000
min_mtask = None
max_p2e = -1000000
max_mtask = None
if nthreads > ncpus:
print()
print("%%Warning: There were fewer CPUs (%d) then threads (%d)." %
(ncpus, nthreads))
print(" : See docs on use of numactl.")
min_hier_block = None
max_hier_block = None
for (hier_block, mtask_id) in sorted(Mtasks.keys()):
mtask = Mtasks[(hier_block, mtask_id)]
if mtask['elapsed'] > 0:
if mtask['predict_cost'] == 0:
mtask['predict_cost'] = 1 # don't log(0) below
p2e_ratio = math.log(mtask['predict_cost'] / mtask['elapsed'])
p2e_ratios.append(p2e_ratio)
if p2e_ratio > max_p2e:
max_p2e = p2e_ratio
max_mtask = mtask_id
max_hier_block = hier_block
if p2e_ratio < min_p2e:
min_p2e = p2e_ratio
min_mtask = mtask_id
min_hier_block = hier_block
print("\nMTask statistics:")
if long_mtask_hier_block:
print(" Longest mtask id = {} from hier_block '{}'".format(long_mtask,
long_mtask_hier_block))
else:
if 'cpu_socket_cores_warning' in Global:
print()
print(
"%Warning: Multiple threads scheduled on same hyperthreaded core."
)
print(" : See docs on use of numactl.")
if 'cpu_sockets_warning' in Global:
print()
print("%Warning: Threads scheduled on multiple sockets.")
print(" : See docs on use of numactl.")
print()
print(" Longest mtask id = {}".format(long_mtask))
print(" Longest mtask time = {:.2%} of time elapsed in parallelized code".format(
long_mtask_time / ExecGraphTime))
print(" min log(p2e) = %0.3f" % min_p2e, end="")
if min_hier_block:
print(" from hier_block '%s' mtask %d (predict %d," %
(min_hier_block, min_mtask, Mtasks[(min_hier_block, min_mtask)]['predict_cost']),
end="")
else:
print(" from mtask %d (predict %d," %
(min_mtask, Mtasks[(min_hier_block, min_mtask)]['predict_cost']),
end="")
print(" elapsed %d)" % Mtasks[(min_hier_block, min_mtask)]['elapsed'])
print(" max log(p2e) = %0.3f" % max_p2e, end="")
if max_hier_block:
print(" from hier_block '%s' mtask %d (predict %d," %
(max_hier_block, max_mtask, Mtasks[(max_hier_block, max_mtask)]['predict_cost']),
end="")
else:
print(" from mtask %d (predict %d," %
(max_mtask, Mtasks[(max_hier_block, max_mtask)]['predict_cost']),
end="")
print(" elapsed %d)" % Mtasks[(max_hier_block, max_mtask)]['elapsed'])
stddev = statistics.pstdev(p2e_ratios)
mean = statistics.mean(p2e_ratios)
print(" mean = %0.3f" % mean)
print(" stddev = %0.3f" % stddev)
print(" e ^ stddev = %0.3f" % math.exp(stddev))
def report_cpus():
print("\nCPUs:")
def report_cpus() -> None:
print("\nCPU info:")
Global['cpu_sockets'] = collections.defaultdict(lambda: 0)
Global['cpu_socket_cores'] = collections.defaultdict(lambda: 0)
for cpu in sorted(Global['cpus'].keys()):
print(" cpu %d: " % cpu, end='')
print("cpu_time=%d" % Global['cpus'][cpu]['cpu_time'], end='')
socket = None
print(" Id | Time spent executing MTask | Socket | Core | Model")
print(" | % of elapsed ticks / ticks | | |")
print(" ====|============================|========|======|======")
for cpu in sorted(Cpus):
socket = ""
core = ""
model = ""
if cpu in Global['cpuinfo']:
cpuinfo = Global['cpuinfo'][cpu]
if 'physical_id' in cpuinfo and 'core_id' in cpuinfo:
socket = int(cpuinfo['physical_id'])
socket = cpuinfo['physical_id']
Global['cpu_sockets'][socket] += 1
print(" socket=%d" % socket, end='')
core = int(cpuinfo['core_id'])
Global['cpu_socket_cores'][str(socket) + "__" + str(core)] += 1
print(" core=%d" % core, end='')
core = cpuinfo['core_id']
Global['cpu_socket_cores'][socket + "__" + core] += 1
if 'model_name' in cpuinfo:
model = cpuinfo['model_name']
print(" %s" % model, end='')
print()
print(" {:3d} | {:7.2%} / {:16d} | {:>6s} | {:>4s} | {}".format(
cpu, Cpus[cpu]['mtask_time'] / ElapsedTime, Cpus[cpu]['mtask_time'], socket, core,
model))
if len(Global['cpu_sockets']) > 1:
Global['cpu_sockets_warning'] = True
@@ -313,25 +377,72 @@ def report_cpus():
Global['cpu_socket_cores_warning'] = True
def report_sections() -> None:
for thread, section in Sections.items():
if section:
print(f"\nSection profile for thread {thread}:")
report_section(section)
def report_section(section) -> None:
totalTime = collections.defaultdict(lambda: 0)
selfTime = collections.defaultdict(lambda: 0)
sectionTree = [0, {}, 1] # [selfTime, childTrees, numberOfTimesEntered]
prevTime = 0
prevStack = ()
for time, stack in section:
if len(stack) > len(prevStack):
scope = sectionTree
for item in stack:
scope = scope[1].setdefault(item, [0, {}, 0])
scope[2] += 1
dt = time - prevTime
assert dt >= 0
scope = sectionTree
for item in prevStack:
scope = scope[1].setdefault(item, [0, {}, 0])
scope[0] += dt
if prevStack:
for name in prevStack:
totalTime[name] += dt
selfTime[prevStack[-1]] += dt
prevTime = time
prevStack = stack
def treeSum(tree):
n = tree[0]
for subTree in tree[1].values():
n += treeSum(subTree)
return n
# Make sure the tree sums to the elapsed time
sectionTree[0] += ElapsedTime - treeSum(sectionTree)
def printTree(prefix, name, entries, tree):
print(" {:7.2%} | {:7.2%} | {:8} | {:10.2f} | {}".format(
treeSum(tree) / ElapsedTime, tree[0] / ElapsedTime, tree[2], tree[2] / entries,
prefix + name))
for k in sorted(tree[1], key=lambda _: -treeSum(tree[1][_])):
printTree(prefix + " ", k, tree[2], tree[1][k])
print(" Total | Self | Total | Relative | Section")
print(" time | time | entries | entries | name ")
print("==========|=========|==========|============|========")
printTree("", "*TOTAL*", 1, sectionTree)
######################################################################
def write_vcd(filename):
def write_vcd(filename: str) -> None:
print("Writing %s" % filename)
with open(filename, "w", encoding="utf8") as fh:
vcd = {
'values':
collections.defaultdict(lambda: {}), # {<time>}{<code>} = value
'sigs': {
'predicted_threads': {},
'measured_threads': {},
'cpus': {},
'evals': {},
'mtasks': {},
'Stats': {}
} # {<module>}{<sig}} = code
}
code = 0
# dict of dicts of hierarchy elements/signal name -> (code, width)
scopeSigs = {}
# map from time -> code -> value
values = collections.defaultdict(lambda: {})
parallelism = {
'measured': collections.defaultdict(lambda: 0),
@@ -340,132 +451,151 @@ def write_vcd(filename):
parallelism['measured'][0] = 0
parallelism['predicted'][0] = 0
# Measured graph
for thread in sorted(Threads.keys()):
sig = "thread%d_mtask" % thread
if sig not in vcd['sigs']['measured_threads']:
vcd['sigs']['measured_threads'][sig] = code
code += 1
mcode = vcd['sigs']['measured_threads'][sig]
nextFreeCode = 0
for start in sorted(Threads[thread]):
mtask = Threads[thread][start]['mtask']
end = Threads[thread][start]['end']
cpu = Threads[thread][start]['cpu']
vcd['values'][start][mcode] = mtask
vcd['values'][end][mcode] = None
def getCode(width, *names):
nonlocal nextFreeCode
scope = scopeSigs
*path, name = names
for item in path:
scope = scope.setdefault(item, {})
code, oldWidth = scope.setdefault(name, (nextFreeCode, width))
assert oldWidth == width
if code == nextFreeCode:
nextFreeCode += 1
return code
def addValue(code, time, val):
if isinstance(val, str):
buf = ""
for c in val:
buf += bin(ord(c))[2:].rjust(8, "0")
val = buf.ljust(LongestVcdStrValueLength * 8, "0")
values[time][code] = val
def addXValue(code, time):
values[time][code] = 'x'
# Measured graph
for thread in sorted(Threads):
mcode = getCode(32, 'measured', 't%d_mtask' % thread)
for record in Threads[thread]:
start = record['start']
mtask = record['mtask']
end = record['end']
cpu = record['cpu']
addValue(mcode, start, mtask)
addValue(mcode, end, None)
parallelism['measured'][start] += 1
parallelism['measured'][end] -= 1
sig = "cpu%d_thread" % cpu
if sig not in vcd['sigs']['cpus']:
vcd['sigs']['cpus'][sig] = code
code += 1
ccode = vcd['sigs']['cpus'][sig]
vcd['values'][start][ccode] = thread
vcd['values'][end][ccode] = None
code = getCode(32, 'measured', 'cpu%d_thread' % cpu)
addValue(code, start, thread)
addValue(code, end, None)
sig = "mtask%d_cpu" % mtask
if sig not in vcd['sigs']['mtasks']:
vcd['sigs']['mtasks'][sig] = code
code += 1
ccode = vcd['sigs']['mtasks'][sig]
vcd['values'][start][ccode] = cpu
vcd['values'][end][ccode] = None
code = getCode(32, 'measured', 'cpu%d_mtask' % cpu)
addValue(code, start, mtask)
addValue(code, end, None)
# Eval graph
vcd['sigs']['evals']["eval"] = code
elcode = code
code += 1
n = 0
for eval_start in Evals:
eval_end = Evals[eval_start]['end']
n += 1
vcd['values'][eval_start][elcode] = n
vcd['values'][eval_end][elcode] = None
tStart = sorted(_['start'] for records in Threads.values() for _ in records)
tEnd = sorted(_['end'] for records in Threads.values() for _ in records)
# Eval_loop graph
vcd['sigs']['evals']["eval_loop"] = code
elcode = code
code += 1
n = 0
for eval_start in EvalLoops:
eval_end = EvalLoops[eval_start]['end']
n += 1
vcd['values'][eval_start][elcode] = n
vcd['values'][eval_end][elcode] = None
# Measured waiting time
for (start, end, cpu) in ThreadScheduleWaitIntervals:
mcode = getCode(32, 'measured', 'cpu%d_waiting' % cpu)
addXValue(mcode, start)
addValue(mcode, end, None)
if Mtasks:
# Predicted graph
for eval_start in EvalLoops:
eval_end = EvalLoops[eval_start]['end']
# Compute scale so predicted graph is of same width as eval
measured_scaling = (eval_end -
eval_start) / Global['predict_last_end']
# Predict mtasks that fill the time the eval occupied
for mtask in Mtasks:
thread = Mtasks[mtask]['thread']
pred_scaled_start = eval_start + int(
Mtasks[mtask]['predict_start'] * measured_scaling)
pred_scaled_end = eval_start + int(
(Mtasks[mtask]['predict_start'] +
Mtasks[mtask]['predict_cost']) * measured_scaling)
if pred_scaled_start == pred_scaled_end:
continue
# Predicted graph
for start, end in ExecGraphIntervals:
# Find the earliest MTask start after the start point, and the
# latest MTask end before the end point, so we can scale to the
# same range
tStartIdx = bisect.bisect_left(tStart, start)
if tStartIdx >= len(tStart):
continue
start = tStart[tStartIdx]
end = tEnd[bisect.bisect_right(tEnd, end) - 1]
# Compute scale so predicted graph is of same width as interval
measured_scaling = (end - start) / Global['predict_last_end']
# Predict mtasks that fill the time the execution occupied
for (hier_block, mtask_id) in Mtasks:
mtask = Mtasks[(hier_block, mtask_id)]
thread = mtask['thread']
pred_scaled_start = start + int(mtask['predict_start'] * measured_scaling)
pred_scaled_end = start + int(
(mtask['predict_start'] + mtask['predict_cost']) * measured_scaling)
if pred_scaled_start == pred_scaled_end:
continue
sig = "predicted_thread%d_mtask" % thread
if sig not in vcd['sigs']['predicted_threads']:
vcd['sigs']['predicted_threads'][sig] = code
code += 1
mcode = vcd['sigs']['predicted_threads'][sig]
mcode = getCode(32, 'predicted', 't%d_mtask' % thread)
addValue(mcode, pred_scaled_start, mtask_id)
addValue(mcode, pred_scaled_end, None)
vcd['values'][pred_scaled_start][mcode] = mtask
vcd['values'][pred_scaled_end][mcode] = None
parallelism['predicted'][pred_scaled_start] += 1
parallelism['predicted'][pred_scaled_end] -= 1
parallelism['predicted'][pred_scaled_start] += 1
parallelism['predicted'][pred_scaled_end] -= 1
# Parallelism graph
for measpred in ('measured', 'predicted'):
pcode = getCode(32, 'stats', '%s_parallelism' % measpred)
value = 0
for time in sorted(parallelism[measpred].keys()):
value += parallelism[measpred][time]
addValue(pcode, time, value)
# Parallelism graph
for measpred in ('measured', 'predicted'):
vcd['sigs']['Stats']["%s_parallelism" % measpred] = code
pcode = code
code += 1
value = 0
for time in sorted(parallelism[measpred].keys()):
value += parallelism[measpred][time]
vcd['values'][time][pcode] = value
# Section graph
for thread, section in Sections.items():
if section:
scode = getCode(LongestVcdStrValueLength * 8, "section", f"t{thread}_trace")
dcode = getCode(32, "section", f"t{thread}_depth")
for time, stack in section:
addValue(scode, time, stack[-1] if stack else None)
addValue(dcode, time, len(stack))
# Create output file
fh.write("$version Generated by verilator_gantt $end\n")
fh.write("$timescale 1ns $end\n")
fh.write("\n")
all_codes = {}
all_codes = set()
def writeScope(scope):
assert isinstance(scope, dict)
for key in sorted(scope):
val = scope[key]
if isinstance(val, dict):
fh.write(" $scope module %s $end\n" % key)
writeScope(val)
fh.write(" $upscope $end\n")
else:
(code, width) = val
all_codes.add(code)
fh.write(" $var wire %d v%x %s [%d:0] $end\n" %
(width, code, key, width - 1))
fh.write(" $scope module gantt $end\n")
for module in sorted(vcd['sigs'].keys()):
fh.write(" $scope module %s $end\n" % module)
for sig in sorted(vcd['sigs'][module].keys()):
code = vcd['sigs'][module][sig]
fh.write(" $var wire 32 v%x %s [31:0] $end\n" % (code, sig))
all_codes[code] = 1
fh.write(" $upscope $end\n")
writeScope(scopeSigs)
fh.write(" $upscope $end\n")
fh.write("$enddefinitions $end\n")
fh.write("\n")
first = True
for time in sorted(vcd['values']):
for time in sorted(values):
if first:
first = False
# Start with Z for any signals without time zero data
for code in sorted(all_codes.keys()):
if code not in vcd['values'][time]:
vcd['values'][time][code] = None
for code in sorted(all_codes):
if code not in values[time]:
addValue(code, time, None)
fh.write("#%d\n" % time)
for code in sorted(vcd['values'][time].keys()):
value = vcd['values'][time][code]
for code in sorted(values[time]):
value = values[time][code]
if value is None:
fh.write("bz v%x\n" % code)
elif value == 'x':
fh.write("bx v%x\n" % code)
elif isinstance(value, str):
fh.write("b%s v%x\n" % (value, code))
else:
fh.write("b%s v%x\n" % (format(value, 'b'), code))
@@ -475,7 +605,7 @@ def write_vcd(filename):
parser = argparse.ArgumentParser(
allow_abbrev=False,
formatter_class=argparse.RawDescriptionHelpFormatter,
description="""Create Gantt chart of multi-threaded execution.
description="""Create Gantt chart of Verilator multi-threaded execution
Verilator_gantt creates a visual representation to help analyze Verilator
#xmultithreaded simulation performance, by showing when each macro-task
@@ -483,28 +613,25 @@ 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-2023 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')
parser.add_argument('--vcd',
help='filename for vcd outpue',
default='profile_exec.vcd')
parser.add_argument('--no-vcd', help='disable creating vcd', action='store_true')
parser.add_argument('--vcd', help='filename for vcd output', default='profile_exec.vcd')
parser.add_argument('filename',
help='input profile_exec.dat filename to process',
default='profile_exec.dat')
Args = parser.parse_args()
process(Args.filename)
read_data(Args.filename)
report()
if not Args.no_vcd:
write_vcd(Args.vcd)
+5 -4
View File
@@ -1,11 +1,12 @@
#!/usr/bin/env python3
# mypy: disallow-untyped-defs
# pylint: disable=C0114,C0209
#
# Copyright 2003-2023 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
######################################################################
+20 -30
View File
@@ -10,7 +10,7 @@ import re
######################################################################
def profcfunc(filename):
def profcfunc(filename: str) -> None:
funcs = {}
with open(filename, "r", encoding="utf8") as fh:
@@ -26,7 +26,7 @@ def profcfunc(filename):
calls = float(match.group(3))
func = match.group(4)
if func not in funcs:
funcs[func] = {'pct': 0, 'sec': 0, 'calls': 0}
funcs[func] = {'pct': 0.0, 'sec': 0.0, 'calls': 0}
funcs[func]['pct'] += pct
funcs[func]['sec'] += sec
funcs[func]['calls'] += calls
@@ -34,9 +34,8 @@ def profcfunc(filename):
# Older gprofs have no call column for single-call functions
# %time cumesec selfsec {stuff} name
match = re.match(
r'^\s*([0-9.]+)\s+[0-9.]+\s+([0-9.]+)\s+[^a-zA-Z_]*([a-zA-Z_].*)$',
line)
match = re.match(r'^\s*([0-9.]+)\s+[0-9.]+\s+([0-9.]+)\s+[^a-zA-Z_]*([a-zA-Z_].*)$',
line)
if match:
pct = float(match.group(1))
sec = float(match.group(2))
@@ -136,33 +135,27 @@ def profcfunc(filename):
design_width = 1
for func, func_item in vfuncs.items():
if design_width < len(func_item['design']):
design_width = len(func_item['design'])
design_width = max(design_width, len(func_item['design']))
print("Verilog code profile:")
print(" These are split into three categories:")
print(" C++: Time in non-Verilated C++ code")
print(" Prof: Time in profile overhead")
print(" VBlock: Time attributable to a block in a" +
" Verilog file and line")
print(" VCommon: Time in a Verilated module," +
" due to all parts of the design")
print(" VLib: Time in Verilated common libraries," +
" called by the Verilated code")
print(" VBlock: Time attributable to a block in a" + " Verilog file and line")
print(" VCommon: Time in a Verilated module," + " due to all parts of the design")
print(" VLib: Time in Verilated common libraries," + " called by the Verilated code")
print()
print(" % cumulative self ")
print((" time seconds seconds calls %-" + str(design_width) +
"s type filename and line number") % "design")
cume = 0
for func in sorted(vfuncs.keys(),
key=lambda f: vfuncs[f]['sec'],
reverse=True):
cume = 0.0
for func in sorted(vfuncs.keys(), key=lambda f: vfuncs[f]['sec'], reverse=True):
cume += vfuncs[func]['sec']
print(("%6.2f %9.2f %8.2f %10d %-" + str(design_width) + "s %s") %
(vfuncs[func]['pct'], cume, vfuncs[func]['sec'],
vfuncs[func]['calls'], vfuncs[func]['design'], func))
(vfuncs[func]['pct'], cume, vfuncs[func]['sec'], vfuncs[func]['calls'],
vfuncs[func]['design'], func))
######################################################################
@@ -171,7 +164,7 @@ def profcfunc(filename):
parser = argparse.ArgumentParser(
allow_abbrev=False,
formatter_class=argparse.RawDescriptionHelpFormatter,
description="""Read gprof report created with --prof-cfuncs.
description="""Read gprof report created with Verilator --prof-cfuncs
Verilator_profcfunc reads a profile report created by gprof. The names of
the functions are then transformed, assuming the user used Verilator's
@@ -180,18 +173,15 @@ in each Verilog block.
For documentation see
https://verilator.org/guide/latest/exe_verilator_profcfunc.html""",
epilog=
"""Copyright 2002-2023 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('--debug', action='store_const', const=9, help='enable debug')
parser.add_argument('filename', help='input gprof output to process')
Args = parser.parse_args()
-29
View File
@@ -1,29 +0,0 @@
#!/usr/bin/env bash
# DESCRIPTION: Verilator: CI ccache maintenance
#
# Copyright 2020 by Geza Lore. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
#
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
################################################################################
# This script is run in 'before_script', once ccache has been set up.
################################################################################
set -e
set -x
# Show version
ccache --version
# Flush ccache if requested in commit message
COMMIT="${CI_PULL_REQUEST_SHA:-$CI_COMMIT}"
if git log --format=%B -n 1 "$COMMIT" | grep -q -i '\[CI\s\+ccache\s\+clear\]'; then
echo "Flushing ccache due to commit message"
ccache -C
fi
# Dump stats, then zero stats
ccache -s -z
+71 -62
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
################################################################################
@@ -27,12 +23,6 @@ fatal() {
echo "ERROR: $(basename "$0"): $1" >&2; exit 1;
}
if [ "$CI_M32" = "0" ]; then
unset CI_M32
elif [ "$CI_M32" != "1" ]; then
fatal "\$CI_M32 must be '0' or '1'";
fi
if [ "$CI_OS_NAME" = "linux" ]; then
MAKE=make
elif [ "$CI_OS_NAME" = "osx" ]; then
@@ -40,15 +30,42 @@ 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
install-vcddiff() {
TMP_DIR="$(mktemp -d)"
git clone https://github.com/veripool/vcddiff "$TMP_DIR"
git -C "${TMP_DIR}" checkout e5664be5fe39d353bf3fcb50aa05214ab7ed4ac4
"$MAKE" -C "${TMP_DIR}"
sudo cp "${TMP_DIR}/vcddiff" /usr/local/bin
if [ "$CI_OS_NAME" = "linux" ]; then
# Avoid slow "processing triggers for man db"
echo "path-exclude /usr/share/doc/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
echo "path-exclude /usr/share/man/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
echo "path-exclude /usr/share/info/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
fi
install-wavediff() {
source ci/docker/buildenv/wavetools.conf
local _base_url="https://github.com/hudson-trading/wavetools/releases/download/${WAVETOOLS_VERSION}"
local _platform
if [ "$CI_OS_NAME" = "linux" ]; then
_platform="linux-x86_64"
elif [ "$CI_OS_NAME" = "osx" ]; then
_platform="macos-arm64"
elif [ "$CI_OS_NAME" = "windows" ]; then
_platform="windows-x86_64"
else
echo "WARNING: No wavetools binary available for CI_OS_NAME=$CI_OS_NAME, skipping"
return 0
fi
local _tmpdir
_tmpdir=$(mktemp -d)
local _archive="wavetools-${WAVETOOLS_VERSION}-${_platform}"
if [ "$CI_OS_NAME" = "windows" ]; then
wget -q -O "${_tmpdir}/${_archive}.zip" "${_base_url}/${_archive}.zip"
unzip -o "${_tmpdir}/${_archive}.zip" -d "${_tmpdir}"
else
wget -q -O "${_tmpdir}/${_archive}.tar.gz" "${_base_url}/${_archive}.tar.gz"
tar -xzf "${_tmpdir}/${_archive}.tar.gz" -C "${_tmpdir}"
fi
sudo cp "${_tmpdir}/${_archive}/wavediff" /usr/local/bin/wavediff
rm -rf "${_tmpdir}"
}
if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then
@@ -59,39 +76,36 @@ 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
if [ "$CI_RUNS_ON" = "ubuntu-20.04" ]; then
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" ]; 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" ]; then
sudo apt-get install mold ||
sudo apt-get install mold
fi
if [ "$COVERAGE" = 1 ]; then
yes yes | sudo cpan -fi Parallel::Forker
fi
if [ "$CI_M32" = 1 ]; then
sudo apt-get install gcc-multilib g++-multilib ||
sudo apt-get install gcc-multilib g++-multilib
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
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
mkdir -p "$CCACHE_DIR" && ./ci/ci-ccache-maint.bash
mkdir -p "$CCACHE_DIR"
fi
elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
##############################################################################
@@ -102,40 +116,35 @@ 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 ||
sudo apt-get install gdb gtkwave lcov libfl-dev ccache
# Required for test_regress/t/t_dist_attributes.pl
if [ "$CI_RUNS_ON" = "ubuntu-22.04" ]; then
sudo apt-get install libclang-dev mold ||
sudo apt-get install libclang-dev mold
pip3 install clang==14.0
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" ]] || [[ "$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" ]; then
sudo apt-get install libsystemc-dev ||
sudo apt-get install libsystemc-dev
fi
if [ "$CI_M32" = 1 ]; then
sudo apt-get install lib32z1-dev gcc-multilib g++-multilib ||
sudo apt-get install lib32z1-dev gcc-multilib g++-multilib
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
# brew cask install gtkwave # fst2vcd hangs at launch, so don't bother
brew install ccache perl
brew install ccache perl jq z3
elif [ "$CI_OS_NAME" = "freebsd" ]; then
# fst2vcd fails with "Could not open '<input file>', exiting."
sudo pkg install -y ccache gmake perl5 python3
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
if [ "$CI_RUNS_ON" != "ubuntu-14.04" ]; then
CI_CPAN_REPO=https://cpan.org
fi
yes yes | sudo cpan -M $CI_CPAN_REPO -fi Parallel::Forker
install-vcddiff
install-wavediff
# Workaround -fsanitize=address crash
sudo sysctl -w vm.mmap_rnd_bits=28
else
##############################################################################
# Unknown build stage
fatal "Unknown build stage: '$CI_BUILD_STAGE_NAME'"
fatal "Unknown CI_BUILD_STAGE_NAME: '$CI_BUILD_STAGE_NAME'"
fi
+42
View File
@@ -0,0 +1,42 @@
#!/usr/bin/env bash
# DESCRIPTION: Verilator: CI script for 'pages.yml', notifies PRs
#
# 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
# Get the current repo URL - might differ on a fork
readonly REPO_URL=$(gh repo view --json url --jq .url)
# Create artifacts root directory
ARTIFACTS_ROOT=artifacts
mkdir -p ${ARTIFACTS_ROOT}
for RUN_ID in ${COVERAGE_PR_RUN_IDS//,/ }; do
echo "@@@ Processing run ${RUN_ID}"
# Create workflow artifacts directory
ARTIFACTS_DIR=${ARTIFACTS_ROOT}/${RUN_ID}
mkdir -p ${ARTIFACTS_DIR}
# Download artifact of this run, if exists
gh run download ${RUN_ID} --name coverage-pr-notification --dir ${ARTIFACTS_DIR} || true
ls -lsha ${ARTIFACTS_DIR}
# Move on if no notification is required
if [ ! -f ${ARTIFACTS_DIR}/pr-number.txt ]; then
echo "No notification found"
continue
fi
echo "Posting notification found"
cat ${ARTIFACTS_DIR}/body.txt
gh pr comment $(cat ${ARTIFACTS_DIR}/pr-number.txt) --body-file ${ARTIFACTS_DIR}/body.txt
# Get the artifact ID
ARTIFACT_ID=$(gh api "repos/{owner}/{repo}/actions/runs/${RUN_ID}/artifacts" --jq '.artifacts[] | select(.name == "coverage-pr-notification") | .id')
# Delete it, so we only notify once
gh api --method DELETE "repos/{owner}/{repo}/actions/artifacts/${ARTIFACT_ID}"
done
+167
View File
@@ -0,0 +1,167 @@
#!/usr/bin/env bash
# DESCRIPTION: Verilator: CI script for 'pages.yml', builds the GitHub Pages
#
# SPDX-FileCopyrightText: 2025 Geza Lore
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
# This scipt build the content of the GitHub Pages for the repository.
# Currently this only hosts code coverage reports, but it would be possible to
# add any other contents to the page in parallel here.
# Developer note: You should be able to run this script in your local checkout
# if you have GitHub CLI (command 'gh') setup, authenticated ('gh auth login'),
# and have set a default repository ('gh repo set-default').
# Create pages root directory. The contents of this directory will be deployed
# and served via GitHubPages
readonly PAGES_ROOT=pages
mkdir -p ${PAGES_ROOT}
# Get the current repo URL - might differ on a fork
readonly REPO_URL=$(gh repo view --json url --jq .url)
# Set GITHUB_OUTPUT when run locally for testing
if [[ -z "$GITHUB_OUTPUT" ]]; then
GITHUB_OUTPUT=github-output.txt
fi
# Populates ${PAGES_ROOT}/coverage-reports
compile_coverage_reports() {
# We will process all runs up to and including this date. This is chosen to be
# slightly less than the artifact retention period for simplicity.
local OLDEST=$(date --date="28 days ago" --iso-8601=date)
# Gather all coverage workflow runs within the time window
gh run list -w coverage.yml --limit 1000 --created ">=${OLDEST}" --json "databaseId,event,status,conclusion,createdAt,number" > recentRuns.json
echo @@@ Recent runs:
jq "." recentRuns.json
# Select completd runs that were not cancelled or skipped, sort by descending run number
jq 'sort_by(-.number) | map(select(.status == "completed" and (.conclusion == "success" or .conclusion == "failure")))' recentRuns.json > completedRuns.json
echo @@@ Completed with success or failure:
jq "." completedRuns.json
# Create artifacts root directory
local ARTIFACTS_ROOT=artifacts
mkdir -p ${ARTIFACTS_ROOT}
# Create coverage reports root directory
local COVERAGE_ROOT=${PAGES_ROOT}/coverage-reports
mkdir -p ${COVERAGE_ROOT}
# Create index page contents fragment
local CONTENTS=contents.tmp
echo > ${CONTENTS}
# Run IDs of PR jobs processed
local PR_RUN_IDS=""
# Iterate over all unique event types that triggered the workflows
for EVENT in $(jq -r 'map(.event) | sort | unique | .[]' completedRuns.json); do
echo "@@@ Processing '${EVENT}' runs"
# Emit section header if a report exists with this event type
EMIT_SECTION_HEADER=1
# For each worfklow run that was triggered by this event type
for RUN_ID in $(jq ".[] | select(.event == \"${EVENT}\") |.databaseId" completedRuns.json); do
echo "@@@ Processing run ${RUN_ID}"
# Extract the info of this run
jq ".[] | select(.databaseId == $RUN_ID)" completedRuns.json > workflow.json
jq "." workflow.json
# Record run ID of PR job
if [[ $EVENT == "pull_request" ]]; then
if [[ -z "$PR_RUN_IDS" ]]; then
PR_RUN_IDS="$RUN_ID"
else
PR_RUN_IDS="$PR_RUN_IDS,$RUN_ID"
fi
fi
# Create workflow artifacts directory
local ARTIFACTS_DIR=${ARTIFACTS_ROOT}/${RUN_ID}
mkdir -p ${ARTIFACTS_DIR}
# Download artifacts of this run, if exists
gh run download ${RUN_ID} --name coverage-report --dir ${ARTIFACTS_DIR} || true
ls -lsha ${ARTIFACTS_DIR}
# Move on if no coverage report is available
if [ ! -d ${ARTIFACTS_DIR}/report ]; then
echo "No coverage report found"
continue
fi
echo "Coverage report found"
# Emit section header
if [[ -n $EMIT_SECTION_HEADER ]]; then
unset EMIT_SECTION_HEADER
if [[ $EVENT == "pull_request" ]]; then
echo "<h4>Patch coverage reports for '${EVENT}' runs:</h4>" >> ${CONTENTS}
else
echo "<h4>Code coverage reports for '${EVENT}' runs:</h4>" >> ${CONTENTS}
fi
fi
# Create pages subdirectory
mv ${ARTIFACTS_DIR}/report ${COVERAGE_ROOT}/${RUN_ID}
# Add index page content
local WORKFLOW_CREATED=$(jq -r '.createdAt' workflow.json)
local WOFKRLOW_NUMBER=$(jq -r '.number' workflow.json)
cat >> ${CONTENTS} <<CONTENTS_TEMPLATE
Run <a href="${RUN_ID}/index.html">#${WOFKRLOW_NUMBER}</a>
| GitHub: <a href="${REPO_URL}/actions/runs/${RUN_ID}">${RUN_ID}</a>
| started at: ${WORKFLOW_CREATED}
CONTENTS_TEMPLATE
if [ -e ${ARTIFACTS_DIR}/pr-number.txt ]; then
local PRNUMBER=$(cat ${ARTIFACTS_DIR}/pr-number.txt)
echo " | Pull request: <a href=\"${REPO_URL}/pull/${PRNUMBER}\">#${PRNUMBER}</a>" >> ${CONTENTS}
fi
echo "<br>" >> ${CONTENTS}
done
# Section break
if [[ -z "$EMIT_SECTION_HEADER" ]]; then
echo "<hr>" >> ${CONTENTS}
fi
done
# Write coverage report index.html
cat > ${COVERAGE_ROOT}/index.html <<INDEX_TEMPLATE
<html>
<head>
<title>Verilator CI coverage reports</title>
<style>
body {
font-family: courier, serif;
background-color: #f3f3f3;
a {
color: #008fd7;
}
}
</style>
</head>
<body>
$(cat ${CONTENTS})
<h4>Assembled $(date --iso-8601=minutes --utc)</h1>
<body>
</html>
INDEX_TEMPLATE
# Report size
du -shc ${COVERAGE_ROOT}/*
# Set output
echo "coverage-pr-run-ids=${PR_RUN_IDS}" >> $GITHUB_OUTPUT
}
# Compilie coverage reports
compile_coverage_reports;
# You can build any other content here to be put under ${PAGES_ROOT}
+79 -64
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
################################################################################
@@ -21,51 +17,54 @@ fatal() {
echo "ERROR: $(basename "$0"): $1" >&2; exit 1;
}
if [ "$CI_M32" = "0" ]; then
unset CI_M32
elif [ "$CI_M32" != "1" ]; then
fatal "\$CI_M32 must be '0' or '1'";
fi
if [ "$CI_OS_NAME" = "linux" ]; then
export MAKE=make
NPROC=$(nproc)
elif [ "$CI_OS_NAME" = "osx" ]; then
export MAKE=make
NPROC=$(sysctl -n hw.logicalcpu)
# Disable ccache, doesn't always work in GitHub Actions
export OBJCACHE=
elif [ "$CI_OS_NAME" = "freebsd" ]; then
export MAKE=gmake
NPROC=$(sysctl -n hw.ncpu)
else
fatal "Unknown os: '$CI_OS_NAME'"
fatal "Unknown CI_OS_NAME: '$CI_OS_NAME'"
fi
NPROC=$(expr $NPROC '+' 1)
if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then
##############################################################################
# Build verilator
if [ "$COVERAGE" != 1 ]; then
autoconf
./configure --enable-longtests --enable-ccwarn ${CI_M32:+--enable-m32}
ccache -z
"$MAKE" -j "$NPROC" -k
ccache -s
if [ "$CI_OS_NAME" = "osx" ]; then
file bin/verilator_bin
file bin/verilator_bin_dbg
md5 bin/verilator_bin
md5 bin/verilator_bin_dbg
stat bin/verilator_bin
stat bin/verilator_bin_dbg
fi
else
nodist/code_coverage --stages 0-2
autoconf
CONFIGURE_ARGS="--enable-longtests --enable-ccwarn"
if [ "$CI_DEV_ASAN" = 1 ]; then
CONFIGURE_ARGS="$CONFIGURE_ARGS --enable-dev-asan"
CXX="$CXX -DVL_LEAK_CHECKS"
fi
if [ "$CI_DEV_GCOV" = 1 ]; then
CONFIGURE_ARGS="$CONFIGURE_ARGS --enable-dev-gcov"
fi
./configure $CONFIGURE_ARGS --prefix="$INSTALL_DIR"
ccache -z
"$MAKE" -j "$NPROC" -k
# 22.04: ccache -s -v
ccache -s
if [ "$CI_OS_NAME" = "osx" ]; then
file bin/verilator_bin
file bin/verilator_bin_dbg
md5 bin/verilator_bin
md5 bin/verilator_bin_dbg
stat bin/verilator_bin
stat bin/verilator_bin_dbg
fi
elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
##############################################################################
# Run tests
export VERILATOR_TEST_NO_CONTRIBUTORS=1 # Separate workflow check
export VERILATOR_TEST_NO_LINT_PY=1 # Separate workflow check
if [ "$CI_OS_NAME" = "osx" ]; then
export VERILATOR_TEST_NO_GDB=1 # Pain to get GDB to work on OS X
@@ -89,105 +88,121 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
export VERILATOR_TEST_NO_GPROF=1 # gprof is a bit different on FreeBSD, disable
fi
# Run sanitize on Ubuntu 20.04 only
[ "$CI_RUNS_ON" = 'ubuntu-20.04' ] && [ "$CI_M32" = "" ] && sanitize='--sanitize' || sanitize=''
TEST_REGRESS=test_regress
if [ "$CI_RELOC" == 1 ]; then
# Testing that the installation is relocatable.
"$MAKE" install
mkdir -p "$RELOC_DIR"
mv "$INSTALL_DIR" "$RELOC_DIR/relocated-install"
export VERILATOR_ROOT="$RELOC_DIR/relocated-install/share/verilator"
TEST_REGRESS="$RELOC_DIR/test_regress"
mv test_regress "$TEST_REGRESS"
NODIST="$RELOC_DIR/nodist"
mv nodist "$NODIST"
# Feeling brave?
find . -delete
ls -la .
fi
# Run the specified test
ccache -z
case $TESTS in
dist-vlt-0)
"$MAKE" -C test_regress SCENARIOS="--dist --vlt $sanitize" DRIVER_HASHSET=--hashset=0/3
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=0/4
;;
dist-vlt-1)
"$MAKE" -C test_regress SCENARIOS="--dist --vlt $sanitize" DRIVER_HASHSET=--hashset=1/3
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=1/4
;;
dist-vlt-2)
"$MAKE" -C test_regress SCENARIOS="--dist --vlt $sanitize" DRIVER_HASHSET=--hashset=2/3
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=2/4
;;
dist-vlt-3)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=3/4
;;
vltmt-0)
"$MAKE" -C test_regress SCENARIOS=--vltmt DRIVER_HASHSET=--hashset=0/2
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt --driver-clean" DRIVER_HASHSET=--hashset=0/3
;;
vltmt-1)
"$MAKE" -C test_regress SCENARIOS=--vltmt DRIVER_HASHSET=--hashset=1/2
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt --driver-clean" DRIVER_HASHSET=--hashset=1/3
;;
coverage-all)
nodist/code_coverage --stages 1-
vltmt-2)
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt --driver-clean" DRIVER_HASHSET=--hashset=2/3
;;
coverage-dist)
nodist/code_coverage --stages 1- --scenarios=--dist
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist"
;;
coverage-vlt-0)
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=0/10
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=0/10
;;
coverage-vlt-1)
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=1/10
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=1/10
;;
coverage-vlt-2)
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=2/10
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=2/10
;;
coverage-vlt-3)
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=3/10
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=3/10
;;
coverage-vlt-4)
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=4/10
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=4/10
;;
coverage-vlt-5)
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=5/10
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=5/10
;;
coverage-vlt-6)
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=6/10
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=6/10
;;
coverage-vlt-7)
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=7/10
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=7/10
;;
coverage-vlt-8)
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=8/10
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=8/10
;;
coverage-vlt-9)
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=9/10
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vlt" DRIVER_HASHSET=--hashset=9/10
;;
coverage-vltmt-0)
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=0/10
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=0/10
;;
coverage-vltmt-1)
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=1/10
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=1/10
;;
coverage-vltmt-2)
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=2/10
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=2/10
;;
coverage-vltmt-3)
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=3/10
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=3/10
;;
coverage-vltmt-4)
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=4/10
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=4/10
;;
coverage-vltmt-5)
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=5/10
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=5/10
;;
coverage-vltmt-6)
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=6/10
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=6/10
;;
coverage-vltmt-7)
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=7/10
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=7/10
;;
coverage-vltmt-8)
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=8/10
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=8/10
;;
coverage-vltmt-9)
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=9/10
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt" DRIVER_HASHSET=--hashset=9/10
;;
*)
fatal "Unknown test: $TESTS"
fatal "Unknown TESTS: $TESTS"
;;
esac
# To see load average (1 minute, 5 minute, 15 minute)
uptime
# 22.04: ccache -s -v
ccache -s
# Upload coverage data
if [[ $TESTS == coverage-* ]]; then
bash <(cat ci/coverage-upload.sh) -f nodist/obj_dir/coverage/app_total.info
fi
else
##############################################################################
# Unknown build stage
fatal "Unknown build stage: '$CI_BUILD_STAGE_NAME'"
fatal "Unknown CI_BUILD_STAGE_NAME: '$CI_BUILD_STAGE_NAME'"
fi
+17 -8
View File
@@ -1,13 +1,22 @@
# DESCRIPTION: Verilator: CI Windows Power Shell - Compile Verilator
#
# SPDX-FileCopyrightText: 2024 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
################################################################################
Set-PSDebug -Trace 1
if (-Not (Test-Path $PWD/../.ccache/win_bison.exe)) {
git clone --depth 1 https://github.com/lexxmark/winflexbison
cd winflexbison
mkdir build
cd build
cmake .. --install-prefix $PWD/../../../.ccache
cmake --build . --config Release -j 3
cmake --install . --prefix $PWD/../../../.ccache
cd ../..
git clone --depth 1 https://github.com/lexxmark/winflexbison
cd winflexbison
mkdir build
cd build
cmake .. --install-prefix $PWD/../../../.ccache
cmake --build . --config Release -j 3
cmake --install . --prefix $PWD/../../../.ccache
cd ../..
}
mkdir build
cd build
cmake .. --install-prefix $PWD/../install
+13 -1
View File
@@ -1,3 +1,12 @@
# DESCRIPTION: Verilator: CI Windows Power Shell - Verilate a test
#
# SPDX-FileCopyrightText: 2024 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
################################################################################
Set-PSDebug -Trace 1
cd install
$Env:VERILATOR_ROOT=$PWD
cd examples/cmake_tracing_c
@@ -5,6 +14,9 @@ mkdir build
cd build
cmake ..
cmake --build . --config Release -j 3
Release/example.exe
# TODO put this back in, see issue# 5163
# Release/example.exe
cd ..
Remove-Item -path build -recurse
File diff suppressed because it is too large Load Diff
+29 -13
View File
@@ -1,12 +1,22 @@
# 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:22.04
FROM ubuntu:24.04
# Create the user
RUN groupadd verilator \
&& useradd -g verilator -m verilator -s /bin/bash \
&& apt-get update \
&& apt-get install --no-install-recommends -y sudo \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& echo verilator ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/verilator \
&& chmod 0440 /etc/sudoers.d/verilator
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive \
@@ -26,14 +36,16 @@ RUN apt-get update \
help2man \
libfl2 \
libfl-dev \
libgoogle-perftools-dev \
libclang-rt-18-dev \
libjemalloc-dev \
libsystemc \
libsystemc-dev \
numactl \
perl \
python3 \
python3-distro \
wget \
zlibc \
z3 \
zlib1g \
zlib1g-dev \
&& apt-get clean \
@@ -41,17 +53,21 @@ RUN apt-get update \
WORKDIR /tmp
RUN cpan install -fi Parallel::Forker
RUN git clone https://github.com/veripool/vcddiff.git && \
make -C vcddiff && \
cp -p vcddiff/vcddiff /usr/local/bin/vcddiff && \
rm -rf vcddiff
COPY wavetools.conf /tmp/wavetools.conf
ARG WGET_EXTRA_ARGS=
RUN . /tmp/wavetools.conf && \
wget -q ${WGET_EXTRA_ARGS} -O /tmp/wavetools.tar.gz \
"https://github.com/hudson-trading/wavetools/releases/download/${WAVETOOLS_VERSION}/wavetools-${WAVETOOLS_VERSION}-linux-x86_64.tar.gz" && \
tar -xzf /tmp/wavetools.tar.gz -C /tmp && \
cp -p /tmp/wavetools-${WAVETOOLS_VERSION}-linux-x86_64/wavediff /usr/local/bin/wavediff && \
rm -rf /tmp/wavetools.tar.gz /tmp/wavetools-* /tmp/wavetools.conf
COPY build.sh /tmp/build.sh
ENV VERILATOR_AUTHOR_SITE=1
USER verilator
WORKDIR /work
ENTRYPOINT [ "/tmp/build.sh" ]
+13 -10
View File
@@ -1,17 +1,19 @@
.. Copyright 2003-2023 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
================================
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 10.3.0, clang 10.0.0, default: 10.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
@@ -29,18 +31,19 @@ To also run tests:
docker run -ti verilator/verilator-buildenv test
To change the compiler:
To change the compiler use the `-e` switch to pass environment variables:
::
docker run -ti -e CC=clang-10 -e CXX=clang++-10 verilator/verilator-buildenv test
docker run -ti -e CXX=clang++-18 verilator/verilator-buildenv test
The tests that involve gdb are not working due to security restrictions.
To run those too:
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:
::
docker run -ti -e CC=clang-10 -e CXX=clang++-10 --cap-add=SYS_PTRACE --security-opt seccomp=unconfined verilator/verilator-buildenv test
docker run -ti --cap-add=CAP_SYS_NICE verilator/verilator-buildenv test
Rather then building using a remote git repository you may prefer to use a
working copy on the local filesystem. Mount the local working copy path as
@@ -50,7 +53,7 @@ top of a repository:
::
docker run -ti -v ${PWD}:/tmp/repo -e REPO=/tmp/repo -e REV=`git rev-parse --short HEAD` --cap-add=SYS_PTRACE --security-opt seccomp=unconfined verilator/verilator-buildenv test
docker run -ti -v ${PWD}:/tmp/repo -e REPO=/tmp/repo -e REV=`git rev-parse --short HEAD` verilator/verilator-buildenv test
Rebuilding
+4 -5
View File
@@ -1,15 +1,14 @@
#!/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}"
: "${REV:=master}"
: "${CC:=gcc}"
: "${CXX:=g++}"
SRCS=$PWD/verilator
+1
View File
@@ -0,0 +1 @@
WAVETOOLS_VERSION=v0.1.2
+8 -7
View File
@@ -1,12 +1,12 @@
# 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:22.04
FROM ubuntu:24.04
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive \
@@ -22,7 +22,7 @@ RUN apt-get update \
help2man \
libfl2 \
libfl-dev \
libgoogle-perftools-dev \
libjemalloc-dev \
numactl \
perl \
perl-doc \
@@ -48,7 +48,8 @@ RUN git clone "${REPO}" verilator && \
make && \
make install && \
cd .. && \
rm -r verilator
rm -r verilator && \
ccache -C
COPY verilator-wrap.sh /usr/local/bin/verilator-wrap.sh
+11 -10
View File
@@ -1,4 +1,4 @@
.. Copyright 2003-2023 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,11 +11,12 @@ easily as a docker image, e.g.:
docker run -ti verilator/verilator:latest --version
This will install the container, 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 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.:
::
@@ -37,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:
::
@@ -67,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
-38
View File
@@ -1,38 +0,0 @@
# DESCRIPTION: codecov.io config
#
# Copyright 2020-2023 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-License-Identifier: LGPL-3.0-only OR Artistic-2.0
####################
# Validate:
# curl --data-binary @codecov.yml https://codecov.io/validate
codecov:
require_ci_to_pass: no
coverage:
precision: 2
round: down
range: "50...100"
ignore:
- "ci"
- "docs"
- "examples"
- "include/gtkwave"
- "include/vltstd"
- "test_regress"
parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no
comment:
layout: "reach,diff,flags,tree"
behavior: default
require_changes: yes
+268 -110
View File
@@ -1,16 +1,18 @@
# DESCRIPTION: Process this file with autoconf to produce a configure script.
#
# Copyright 2003-2023 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,
# When releasing, also update header of Changes file, and CMakeLists.txt,
# and commit using "devel release" or "Version bump" message
# Then 'make distclean' 'autoconf' './configure' 'make' 'make test'
# Then 'make maintainer-dist'
#AC_INIT([Verilator],[#.### YYYY-MM-DD])
#AC_INIT([Verilator],[#.### devel])
AC_INIT([Verilator],[5.014 2023-08-06],
AC_INIT([Verilator],[5.048 2026-04-26],
[https://verilator.org],
[verilator],[https://verilator.org])
@@ -24,6 +26,13 @@ AC_SUBST(PACKAGE_VERSION_NUMBER)
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_NUMBER_STRING],["$PACKAGE_VERSION_NUMBER"],[Package version as a number])
VERILATOR_VERSION_INTEGER=`AS_ECHO("$PACKAGE_VERSION") | [sed 's/\([0-9]\)\.\([0-9][0-9][0-9]\) .*/\1\2000/g']`
AC_SUBST(VERILATOR_VERSION_INTEGER)
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_STRING_CHAR],
[static const char* const PACKAGE_STRING_UNUSED = "$PACKAGE_STRING";],
[Package version as a number])
AC_SUBST(PACKAGE_VERSION_STRING_CHAR)
######################################################################
## Arguments/flag checking
# Ignore automake flags passed by Ubuntu builds
AC_ARG_ENABLE([dependency-tracking],
@@ -49,6 +58,22 @@ AC_ARG_ENABLE([partial-static],
CFG_ENABLE_PARTIAL_STATIC=yes)
AC_MSG_RESULT($CFG_ENABLE_PARTIAL_STATIC)
# Flag to enable compiling with AddressSanitizer
AC_MSG_CHECKING(whether to use AddressSanitizer)
AC_ARG_ENABLE([dev-asan],
[AS_HELP_STRING([--enable-dev-asan],
[Enable compiling Verilator with ASAN
AddressSanitizer for memory error detection.
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 ;;
*) AC_MSG_ERROR([bad value '${enableval}' for --enable-dev-asan]) ;;
esac],
CFG_WITH_DEV_ASAN=no)
AC_MSG_RESULT($CFG_WITH_DEV_ASAN)
# Flag to enable linking Verilator with tcmalloc if available
AC_MSG_CHECKING(whether to use tcmalloc)
AC_ARG_ENABLE([tcmalloc],
@@ -61,35 +86,48 @@ AC_ARG_ENABLE([tcmalloc],
*) AC_MSG_ERROR([bad value '${enableval}' for --enable-tcmalloc]) ;;
esac],
[CFG_WITH_TCMALLOC=check;])
AC_MSG_RESULT($CFG_WITH_TCMALLOC)
if test "$CFG_WITH_DEV_ASAN" = "yes"; then
CFG_WITH_TCMALLOC=no
AC_MSG_RESULT("disabled by --enable-dev-asan")
else
AC_MSG_RESULT($CFG_WITH_TCMALLOC)
fi
# Flag to enable -m32 build
AC_MSG_CHECKING(whether to use -m32)
AC_ARG_ENABLE([m32],
[AS_HELP_STRING([--enable-m32],
[Use -m32 for all compilation and link,
including Verilator and generated models.])],
# 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_ENABLE_M32=yes ;;
no) CFG_ENABLE_M32=no ;;
*) AC_MSG_ERROR([bad value '${enableval}' for --enable-m32]) ;;
yes) CFG_WITH_JEMALLOC=yes ;;
no) CFG_WITH_JEMALLOC=no ;;
*) AC_MSG_ERROR([bad value '${enableval}' for --enable-jemalloc]) ;;
esac],
CFG_ENABLE_M32=no)
AC_MSG_RESULT($CFG_ENABLE_M32)
[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 coverage build
AC_MSG_CHECKING(whether to build for coverage collection)
AC_ARG_ENABLE([coverage],
[AS_HELP_STRING([--enable-coverage],
[Build Verilator for code coverage collection.
# Flag to enable code coverage build with gcov
AC_MSG_CHECKING(whether to build for gcov code coverage collection)
AC_ARG_ENABLE([dev-gcov],
[AS_HELP_STRING([--enable-dev-gcov],
[Build Verilator for code coverage collection with gcov.
For developers only.])],
[case "${enableval}" in
yes) CFG_ENABLE_COVERAGE=yes ;;
no) CFG_ENABLE_COVERAGE=no ;;
*) AC_MSG_ERROR([bad value '${enableval}' for --enable-coverage]) ;;
yes) CFG_WITH_DEV_GCOV=yes ;;
no) CFG_WITH_DEV_GCOV=no ;;
*) AC_MSG_ERROR([bad value '${enableval}' for --enable-dev-gcov]) ;;
esac],
CFG_ENABLE_COVERAGE=no)
AC_MSG_RESULT($CFG_ENABLE_COVERAGE)
CFG_WITH_DEV_GCOV=no)
AC_SUBST(CFG_WITH_DEV_GCOV)
AC_MSG_RESULT($CFG_WITH_DEV_GCOV)
# Special Substitutions - CFG_WITH_DEFENV
AC_MSG_CHECKING(whether to use hardcoded paths)
@@ -144,6 +182,33 @@ AC_ARG_ENABLE([longtests],
AC_SUBST(CFG_WITH_LONGTESTS)
AC_MSG_RESULT($CFG_WITH_LONGTESTS)
AC_CHECK_PROG(HAVE_Z3,z3,yes)
AC_CHECK_PROG(HAVE_CVC5,cvc5,yes)
AC_CHECK_PROG(HAVE_CVC4,cvc4,yes)
# Special Substitutions - CFG_WITH_SOLVER
AC_MSG_CHECKING(for SMT solver)
AC_ARG_WITH([solver],
[AS_HELP_STRING([--with-solver='z3 --in'],
[set default SMT solver for constrained randomization])],
[CFG_WITH_SOLVER="${withval}"],
[CFG_WITH_SOLVER=no
if test "x$HAVE_Z3" = "xyes"; then
CFG_WITH_SOLVER="z3 --in"
elif test "x$HAVE_CVC5" = "xyes"; then
CFG_WITH_SOLVER="cvc5 --incremental"
elif test "x$HAVE_CVC4" = "xyes"; then
CFG_WITH_SOLVER="cvc4 --lang=smt2 --incremental"
fi]
)
AC_SUBST(CFG_WITH_SOLVER)
AC_MSG_RESULT($CFG_WITH_SOLVER)
######################################################################
## Compiler checks
AC_MSG_RESULT([compiler CXX inbound is set to... $CXX])
# Compiler flags (ensure they are not empty to avoid configure defaults)
CFLAGS="$CFLAGS "
CPPFLAGS="$CPPFLAGS "
@@ -156,8 +221,10 @@ AC_PROG_CXX
AC_PROG_INSTALL
AC_LANG_PUSH(C++)
cxx_version=$($CXX --version | head -1)
AC_MSG_RESULT([compiler is $CXX --version = $cxx_version])
CFG_CXX_VERSION=`$CXX --version | head -1`
AC_MSG_RESULT([compiler version... $CXX --version = $CFG_CXX_VERSION])
AC_SUBST(CFG_CXX_VERSION)
AC_MSG_CHECKING([that C++ compiler can compile simple program])
AC_RUN_IFELSE(
[AC_LANG_SOURCE([int main() { return 0; }])],
@@ -170,24 +237,26 @@ if test "x$AR" = "x" ; then
AC_MSG_ERROR([Cannot find "ar" in your PATH, please install it])
fi
AC_PATH_PROG(PERL,perl)
AC_CHECK_PROG(PERL,perl,perl)
if test "x$PERL" = "x" ; then
AC_MSG_ERROR([Cannot find "perl" in your PATH, please install it])
fi
AC_PATH_PROG(PYTHON3,python3)
AC_CHECK_PROG(PYTHON3,python3,python3)
if test "x$PYTHON3" = "x" ; then
AC_MSG_ERROR([Cannot find "python3" in your PATH, please install it])
fi
python3_version=$($PYTHON3 --version | head -1)
AC_MSG_RESULT([$PYTHON3 --version = $python3_version])
AC_PATH_PROG(LEX,flex)
AC_CHECK_PROG(LEX,flex,flex)
if test "x$LEX" = "x" ; then
AC_MSG_ERROR([Cannot find "flex" in your PATH, please install it])
fi
flex_version=$($LEX --version | head -1)
AC_MSG_RESULT([$LEX --version = $flex_version])
AC_PATH_PROG(YACC,bison)
AC_CHECK_PROG(YACC,bison,bison)
if test "x$YACC" = "x" ; then
AC_MSG_ERROR([Cannot find "bison" in your PATH, please install it])
fi
@@ -276,6 +345,43 @@ AC_DEFUN([_MY_CXX_CHECK_OPT],
_MY_CXX_CHECK_IFELSE($2, $1="$$1 $2")
])
AC_DEFUN([_MY_CXX_CHECK_CORO_SET],
[# _MY_CXX_CHECK_CORO_SET(variable,option)
# Check if compiler supports coroutines with specific option. If it does,
# set variable to option, only if not previously set.
# Define HAVE_COROUTINES if supported.
if test "$$1" = ""; then
if test "$2" != ""; then
_my_msg_opt=" with $2"
else
_my_msg_opt=""
fi
AC_MSG_CHECKING([whether coroutines are supported by $CXX$_my_msg_opt])
ACO_SAVE_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $2"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([
#if defined(__clang__) && !defined(__cpp_impl_coroutine)
#define __cpp_impl_coroutine 1
#endif
#include <coroutine>
],[[std::coroutine_handle<> h;]])],
[_my_result=yes],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[#include <experimental/coroutine>],
[[std::experimental::coroutine_handle<> h;]])],
[_my_result=yes],
[_my_result=no])])
AC_MSG_RESULT($_my_result)
CXXFLAGS="$ACO_SAVE_CXXFLAGS"
if test "$_my_result" = "yes" ; then
$1="$2"
AC_DEFINE([HAVE_COROUTINES],[1],[Defined if coroutines are supported by $CXX])
fi
fi
])
AC_DEFUN([_MY_LDLIBS_CHECK_FLAG],
[# _MY_LDLIBS_CHECK_FLAG(flag) -- Check if linker supports specific options
# Set $_my_result appropriately
@@ -315,16 +421,8 @@ AC_DEFUN([_MY_LDLIBS_CHECK_OPT],
_MY_LDLIBS_CHECK_IFELSE($2, $1="$$1 $2")
])
# When using -m32. Check this first as later checks may fail with the -m32 flag.
if test "$CFG_ENABLE_M32" = "yes"; then
_MY_CXX_CHECK_IFELSE(
-m32,
[CXX="$CXX -m32"],
[AC_MSG_ERROR([--enable-m32 was given but compiler does not support -m32])])
fi
# Similarly, add the coverage flags early as they influence later checks.
if test "$CFG_ENABLE_COVERAGE" = "yes"; then
# Add the coverage flags early as they influence later checks.
if test "$CFG_WITH_DEV_GCOV" = "yes"; then
_MY_CXX_CHECK_OPT(CXX,--coverage)
# Otherwise inline may not show as uncovered
# If we use this then e.g. verilated.h functions properly show up
@@ -336,11 +434,19 @@ if test "$CFG_ENABLE_COVERAGE" = "yes"; then
# _MY_CXX_CHECK_OPT(CXX,-fkeep-inline-functions)
# Otherwise static may not show as uncovered
_MY_CXX_CHECK_OPT(CXX,-fkeep-static-functions)
# Exceptions can pollute the branch coverage data
_MY_CXX_CHECK_OPT(CXX,-fno-exceptions)
# Define-out some impossible stuff
# Similarly for inline functions. - This is too slow. See Makefile_obj instead.
#_MY_CXX_CHECK_OPT(CXX,-fkeep-inline-functions)
# Make sure profiling is thread-safe
_MY_CXX_CHECK_OPT(CXX,-fprofile-update=atomic)
# Ensure data files can be written from parallel runs
_MY_CXX_CHECK_OPT(CXX,-fprofile-reproducible=parallel-runs)
# Save source files as absolute paths in gcno files
_MY_CXX_CHECK_OPT(CXX,-fprofile-abs-path)
# Define so compiled code can know
_MY_CXX_CHECK_OPT(CXX,-DVL_GCOV)
AC_DEFINE([HAVE_DEV_GCOV],[1],[Defined if compiled with code coverage collection for gcov])]
fi
AC_SUBST(HAVE_DEV_GCOV)
# Compiler flags to enable profiling
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_PROFILE,-pg)
@@ -350,7 +456,7 @@ AC_SUBST(CFG_CXXFLAGS_PROFILE)
# Macros work such that first option that passes is the one we take
# Currently enable c++17/c++14 due to packaged SystemC dependency
# c++17 is the newest that Verilator is regularly tested to support
# c++11 is the oldest that Verilator supports
# c++14 is the oldest that Verilator supports
# gnu is required for Cygwin to compile verilated.h successfully
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++20)
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++20)
@@ -358,8 +464,6 @@ _MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++17)
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++17)
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++14)
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++14)
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++11)
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++11)
AC_SUBST(CFG_CXXFLAGS_STD_NEWEST)
# Flags for compiling Verilator internals including parser, and Verilated files
@@ -371,40 +475,30 @@ _MY_CXX_CHECK_OPT(CFG_CXXFLAGS_WEXTRA,-Wthread-safety)
AC_SUBST(CFG_CXXFLAGS_WEXTRA)
# Flags for coroutine support for dynamic scheduling
_MY_CXX_CHECK_IFELSE(
-fcoroutines-ts,
[CFG_CXXFLAGS_COROUTINES="-fcoroutines-ts"],
[CFG_CXXFLAGS_COROUTINES="-fcoroutines"])
_MY_CXX_CHECK_CORO_SET(CFG_CXXFLAGS_COROUTINES, "")
_MY_CXX_CHECK_CORO_SET(CFG_CXXFLAGS_COROUTINES,-fcoroutines-ts)
_MY_CXX_CHECK_CORO_SET(CFG_CXXFLAGS_COROUTINES,-fcoroutines)
_MY_CXX_CHECK_CORO_SET(CFG_CXXFLAGS_COROUTINES,-fcoroutines-ts -Wno-deprecated-experimental-coroutine)
_MY_CXX_CHECK_CORO_SET(CFG_CXXFLAGS_COROUTINES,-std=gnu++20)
AC_SUBST(CFG_CXXFLAGS_COROUTINES)
# HAVE_COROUTINES
# Check if coroutines are supported at all
AC_MSG_CHECKING([whether coroutines are supported by $CXX])
ACO_SAVE_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $CFG_CXXFLAGS_COROUTINES"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([
#ifdef __clang__
#define __cpp_impl_coroutine 1
#endif
#include <coroutine>
],[[]])],
[_my_result=yes
AC_DEFINE([HAVE_COROUTINES],[1],[Defined if coroutines are supported by $CXX])],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include <experimental/coroutine>],[[]])],
[_my_result=yes
AC_DEFINE([HAVE_COROUTINES],[1],[Defined if coroutines are supported by $CXX])],
[_my_result=no])])
AC_MSG_RESULT($_my_result)
CXXFLAGS="$ACO_SAVE_CXXFLAGS"
AC_SUBST(HAVE_COROUTINES)
# Flags for compiling Verilator internals including parser always
if test "$CFG_WITH_DEV_ASAN" = "yes"; then
_MY_CXX_CHECK_IFELSE(-fsanitize=address -DVL_ASAN,
[CFG_CXXFLAGS_SRC="$CFG_CXXFLAGS_SRC -fsanitize=address -DVL_ASAN"
CFG_LDFLAGS_SRC="$CFG_LDFLAGS_SRC -fsanitize=address"
AC_DEFINE([HAVE_DEV_ASAN],[1],[Defined if built with AddresSanitizer])]
)
fi
AC_SUBST(HAVE_DEV_ASAN)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Qunused-arguments)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-faligned-new)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Wno-unused-parameter)
_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)
@@ -415,16 +509,22 @@ _MY_CXX_CHECK_OPT(CFG_CXXFLAGS_PARSER,-Wno-unused)
AC_SUBST(CFG_CXXFLAGS_PARSER)
# Flags for compiling the debug version of Verilator (in addition to above CFG_CXXFLAGS_SRC)
if test "$CFG_ENABLE_COVERAGE" = "no"; then # Do not optimize for the coverage build
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DEBUG,-Og)
if test "$CFG_WITH_DEV_GCOV" = "no"; then # Do not optimize for the coverage build
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DBG,-Og)
fi
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DEBUG,-ggdb)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DEBUG,-gz)
AC_SUBST(CFG_CXXFLAGS_DEBUG)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DBG,-ggdb)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DBG,-gz)
AC_SUBST(CFG_CXXFLAGS_DBG)
# Flags for linking the debug version of Verilator (in addition to above CFG_LDFLAGS_SRC)
_MY_LDLIBS_CHECK_OPT(CFG_LDFLAGS_DEBUG,-gz)
AC_SUBST(CFG_LDFLAGS_DEBUG)
_MY_LDLIBS_CHECK_OPT(CFG_LDFLAGS_DBG,-gz)
AC_SUBST(CFG_LDFLAGS_DBG)
# Flags for compiling the optimized version of Verilator (in addition to above CFG_CXXFLAGS_SRC)
if test "$CFG_WITH_DEV_GCOV" = "no"; then # Do not optimize for the coverage build
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_OPT,-O3)
fi
AC_SUBST(CFG_CXXFLAGS_OPT)
# Flags for Verilated makefile
# For example, -Wno-div-by-zero isn't in 4.1.2
@@ -439,17 +539,27 @@ CFG_CXX_FLAGS_CMAKE="-faligned-new"
m4_foreach([cflag],[
[-fbracket-depth=4096],
[-fcf-protection=none],
[-Xclang -fno-pch-timestamp],
[-mno-cet],
[-Qunused-arguments],
[-Wno-bool-operation],
[-Wno-tautological-bitwise-compare],
[-Wno-c++11-narrowing],
[-Wno-constant-logical-operand],
[-Wno-int-in-bool-context],
[-Wno-non-pod-varargs],
[-Wno-parentheses-equality],
[-Wno-shadow],
[-Wno-sign-compare],
[-Wno-subobject-linkage],
[-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-shadow]],[
[-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"
@@ -479,9 +589,11 @@ if test "$CFG_ENABLE_PARTIAL_STATIC" = "yes"; then
_MY_LDLIBS_CHECK_OPT(CFG_LDFLAGS_SRC, -static-libgcc)
_MY_LDLIBS_CHECK_OPT(CFG_LDFLAGS_SRC, -static-libstdc++)
_MY_LDLIBS_CHECK_OPT(CFG_LDFLAGS_SRC, -Xlinker -gc-sections)
LTCMALLOC=-l:libtcmalloc_minimal.a
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)
@@ -491,58 +603,86 @@ AC_SUBST(CFG_LDFLAGS_VERILATED)
# pthreads is harmless otherwise.
CFG_LIBS="$LIBS $CFG_LIBS"
_MY_LDLIBS_CHECK_OPT(CFG_LIBS, -lpthread)
_MY_LDLIBS_CHECK_OPT(CFG_LIBS, -latomic)
# Check libraries for MingW
_MY_LDLIBS_CHECK_OPT(CFG_LIBS, -lbcrypt)
_MY_LDLIBS_CHECK_OPT(CFG_LIBS, -lpsapi)
# Check if tcmalloc is available based on --enable-tcmalloc
# 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(
$LTCMALLOC,
[if test "$CFG_WITH_TCMALLOC" != "no"; then
CFG_LIBS="$LTCMALLOC $CFG_LIBS";
# If using tcmalloc, add some extra options to make the compiler not assume
# it is using it's own versions of the standard library functions
$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)
_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_TCMALLOC],[1],[Defined if have tcmalloc])
fi],
[if test "$CFG_WITH_TCMALLOC" = "yes"; then
AC_MSG_ERROR([--enable-tcmalloc was given but test for ${LTCMALLOC} failed])
fi])
fi
AC_SUBST(HAVE_TCMALLOC)
AC_SUBST(CFG_LIBS)
# Need C++11 at least
#Alternative: AX_CXX_COMPILE_STDCXX([11])
# Need C++14 at least
#Alternative: AX_CXX_COMPILE_STDCXX([14])
AC_DEFUN([_MY_CXX_CHECK_CXX_VER],
[# _MY_CXX_CHECK_CXX_VER(flag) -- Check if compiler runs C++11
[# _MY_CXX_CHECK_CXX_VER(flag) -- Check if compiler runs C++14
# Set $_my_result
AC_LINK_IFELSE(
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([#include <thread>
#if (__cplusplus < 201103L)
#if (__cplusplus < 201402L)
# error "Too old"
#endif
], [[ ]])],
[_my_result=yes
if test -s conftest.err; then
if grep -e "$1" conftest.err >/dev/null; then
_my_result=no
fi
fi],
], [[
]])],
[_my_result=yes],
[_my_result=no],
[_my_result=no])
])
# Add $CFG_CXXFLAGS_STD only if can't compile correctly otherwise,
# as adding std= when not needed can cause errors with the C++ std library.
CFG_CXXFLAGS_STD=$CFG_CXXFLAGS_STD_NEWEST
AC_MSG_CHECKING(whether $CXX supports C++11)
AC_MSG_CHECKING(whether $CXX supports C++14)
_MY_CXX_CHECK_CXX_VER()
AC_MSG_RESULT($_my_result)
if test "$_my_result" = "no" ; then
CXXFLAGS="$CXXFLAGS $CFG_CXXFLAGS_STD"
CFG_CXX_FLAGS_CMAKE="$CFG_CXX_FLAGS_CMAKE $CFG_CXXFLAGS_STD"
AC_MSG_CHECKING(whether $CXX supports C++11 with $CFG_CXXFLAGS_STD)
AC_MSG_CHECKING(whether $CXX supports C++14 with $CFG_CXXFLAGS_STD)
_MY_CXX_CHECK_CXX_VER()
AC_MSG_RESULT($_my_result)
else
@@ -552,13 +692,28 @@ else
fi
if test "$_my_result" = "no" ; then
AC_MSG_NOTICE([[]])
AC_MSG_ERROR([[the $CXX compiler appears to not support C++11.
AC_MSG_ERROR([[the $CXX compiler appears to not support C++14.
Verilator requires a C++11 or newer compiler.]])
Verilator requires a C++14 or newer compiler.]])
fi
AC_SUBST(CFG_CXXFLAGS_STD)
# Compiler precompiled header options (assumes either gcc or clang++)
AC_MSG_CHECKING([for $CXX precompile header include option])
if $CXX --help | grep include-pch >/dev/null 2>/dev/null ; then
# clang
CFG_CXXFLAGS_PCH_I=-include-pch
CFG_GCH_IF_CLANG=.gch
else
# GCC
CFG_CXXFLAGS_PCH_I=-include
CFG_GCH_IF_CLANG=
fi
AC_MSG_RESULT($CFG_CXXFLAGS_PCH_I)
AC_SUBST(CFG_CXXFLAGS_PCH_I)
AC_SUBST(CFG_GCH_IF_CLANG)
# Checks for library functions.
AC_CHECK_MEMBER([struct stat.st_mtim.tv_nsec],
[AC_DEFINE([HAVE_STAT_NSEC],[1],[Defined if struct stat has st_mtim.tv_nsec])],
@@ -573,7 +728,7 @@ ACO_SAVE_LIBS="$LIBS"
LIBS="$LIBS -lsystemc"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include <systemc.h>
extern "C" int sc_main(int argc, char* argv[]) {}
extern "C" int sc_main(int argc, char* argv[]) { return 0; }
]],[[sc_version()]])],
[_my_result=yes
AC_DEFINE([HAVE_SYSTEMC],[1],[Defined if have SystemC library])],
@@ -584,6 +739,9 @@ AC_SUBST(HAVE_SYSTEMC)
# Checks for system services
######################################################################
## Output
# Other install directories
pkgdatadir=${datadir}/verilator
AC_SUBST(pkgdatadir)
+23 -20
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
=========================
@@ -7,8 +10,8 @@ This contributing document contains some suggestions that may make
contributions flow more efficiently.
Did you find a bug?
-------------------
Did you find a Verilator bug?
-----------------------------
- Please **ensure the bug was not already reported** by searching
`Verilator Issues <https://verilator.org/issues>`__.
@@ -23,13 +26,13 @@ Did you find a 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>`__.
Did you write a patch that fixes a bug?
---------------------------------------
Did you write a patch that fixes a Verilator bug?
-------------------------------------------------
- Please `Open a new Verilator issue <https://verilator.org/issues/new>`__
if there is not one already describing the bug.
@@ -38,18 +41,18 @@ Did you write a patch that fixes a 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).
@@ -72,12 +75,12 @@ Did you write a patch that fixes a bug?
- Most important is we get your patch.
Do you have questions?
----------------------
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>`__.
+131 -6
View File
@@ -3,52 +3,89 @@ under the Developer Certificate of Origin (https://developercertificate.org/).
Please see the Verilator manual for 200+ additional contributors. Thanks to all.
404allen404
Adam Bagley
Adrian Sampson
Adrien Le Masle
Ahmed El-Mahmoudy
أحمد المحمودي (Ahmed El-Mahmoudy)
Aidan McNay
Aleksander Kiryk
Alex Chadwick
Àlex Torregrosa
Alex Solomatnikov
Alex Zhou
Aliaksei Chapyzhenka
Ameya Vikram Singh
Andrea Calabrese
Andreas Kuster
Andrei Kostovski
Andrew Miloradovsky
Andrew Nolte
Andrew Voznytsa
Anthony Donlon
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
Christian Hecken
Christopher Taylor
Chuxuan Wang
Chykon
Congcong Cai
Conor McCullough
Dan Petrisko
Dan Ruelas-Petrisko
Daniel Bates
Danny Oler
Dave Sargeant
David Horton
David Ledger
David Metz
David Stanford
David Turner
Dercury
Diego Roux
Dominick Grochowina
Don Williamson
Drew Ranck
Drew Taussig
Driss Hafdi
Edgar E. Iglesias
Eric Mejdrich
Eric Müller
Eric Rippey
Eunseo Song
Ethan Sifferman
Eyck Jentzsch
Fabian Keßler-Schulz
Fan Shupei
february cozzocrea
Felix Neumärker
Felix Yan
Frans Skarman
Fuad Ismail
Furqan Nadir
G-A. Kamendje
Garrett Smith
George Polack
Geza Lore
Gianfranco Costamagna
Gijs Burghoorn
Gilberto Abram
Glen Gibb
Gökçe Aydos
Graham Rushton
Greg Davill
Guokai Chen
Gus Smith
Gustav Svensk
Gökçe Aydos
Han Qi
Harald Heckmann
Hennadii Chernyshchyk
Howard Su
@@ -56,11 +93,17 @@ Huang Rui
Huanghuang Zhou
HungMingWu
HyungKi Jeong
Ibrahim Burak Yorulmaz
Igor Zaworski
Ilya Barkov
Iru Cai
Ivan Vnučec
Iztok Jeras
Jake Merdich
Jakub Michalski
Jakub Wasilewski
jalcim
James Bailey
James Hanlon
James Hutchinson
James Pallister
@@ -69,40 +112,64 @@ Jamey Hicks
Jamie Iles
Jan Van Winkel
Jean Berniolles
Jean-Nicolas Strauss
Jens Yuechao Liu
Jeremy Bennett
Jesse Taube
Jevin Sweval
Jiacheng Qian
Jiamin Zhu
Jiangjie Weng
Jinyan Xu
Jitesh Nayak
Jiuyang Liu
Joel Bodenmann
Joey Liu
John Coiner
John Demme
John Khoo
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
Keith Colbert
Kevin Kiningham
Kevin Nygaard
Kritik Bhimani
Krzysztof Bieganski
Krzysztof Boronski
Krzysztof Boroński
Krzysztof Obłonczek
Krzysztof Starecki
Krzysztof Sychla
Kuba Ober
Lan Zongwei
Larry Doolittle
Leela Pakanati
Liam Braun
Luca Colagrande
Ludwig Rogiers
Lukasz Dalek
M2kar
Maarten De Braekeleer
Maciej Sobkowski
Marcel Chang
Marco Bartoli
Marco Widmer
Mariusz Glebocki
Markus Krause
@@ -110,66 +177,113 @@ Marlon James
Marshal Qiao
Martin Schmidt
Martin Stadler
Mateusz Gancarz
Matt Stroud
Matthew Ballance
Max Wipfli
Maxim Fonarev
Michael Bedford Taylor
Michael Bikovitsky
Michael Killough
Michal Czyz
Michaël Lefebvre
Mike Popoloski
Miodrag Milanović
Mladen Slijepcevic
Morten Borup Petersen
Mostafa Gamal
Moubarak Jeje
Nandu Raj
Natan Kreimer
Nathan Graybeal
Nathan Kohagen
Nathan Myers
Nick Brereton
Nikolay Puzanov
Nolan Poe
Oleh Maksymenko
Patrick Stewart
Paul Bowen-Huggett
Paul Swirhun
Paul Wright
Pawel Jewstafjew
Pawel Kojma
Pawel Sagan
Pengcheng Xu
Peter Birch
Peter Debacker
Peter Horvath
Peter Monsson
Petr Nohavica
Philip Axer
Philipp Wagner
Pierre-Henri Horrein
Pieter Kapsenberg
Piotr Binkowski
Qingyao Sun
Quentin Corradi
Rafal Kapuscik
Rahul Behl
Rasfunk
Raynard Qiao
Ricardo Barbedo
Richard Myers
Risto Pejašinović
Robert Balas
Robin Heinemann
Rodrigo Batista de Moraes
Rowan Goemans
Rupert Swarbrick
Ryan Ziegler
Ryszard Rozak
Samuel Riedel
Sean Cross
Sebastien Van Cauwenberghe
Sergey Fedorov
Sergi Granell
Seth Pellegrino
Shogo Yamazaki
Shou-Li Hsu
Srinivasan Venkataramanan
Stefan Wallentowitz
Stephen Henry
Steven Hugg
Szymon Gizler
Sören Tempel
Teng Huang
Thomas Aldrian
Thomas Dybdahl Ahle
Tim Hutt
Tim Snyder
Tobias Jensen
Tobias Rosenkranz
Tobias Wölfel
Todd Strader
Tom Manner
Tomasz Gorochowik
Topa Topino
Toru Niina
Tracy Narine
Trung Nguyen
Tudor Timi
Tymoteusz Blazejczyk
Udaya Raj Subedi
Udi Finkelstein
Unai Martinez-Corral
Valentin Atepalikhin
Varun Koyyalagunta
Vassilis Papaefstathiou
Veripool API Bot
Victor Besyakov
Vikash Patel
Vito Gamberini
Wei-Lun Chiu
William D. Jones
Wilson Snyder
Xi Zhang
Yan Xu
Yangyu Chen
Yilou Wang
Yinan Xu
Yoda Lee
Yossi Nivin
@@ -178,5 +292,16 @@ Yuri Victorovich
Yutetsu TAKATSUKASA
Yves Mathieu
Zhanglei Wang
Zhen Yan
Zhou Shen
Zhouyi Shen
Zixi Li
أحمد المحمودي
apocelipes
dependabot[bot]
february cozzocrea
sumpster
em2machine
emmettifelts
Àlex Torregrosa
Ícaro Lima
Yogish Sekhar
+13 -7
View File
@@ -5,10 +5,10 @@
#
# Code available from: https://verilator.org
#
# Copyright 2003-2023 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
#
######################################################################
@@ -23,9 +23,9 @@ SPHINXBUILD ?= sphinx-build
SOURCEDIR = guide
BUILDDIR = _build
SPHINXOPTS ?= -c guide
SPHINXOPTS ?= -c guide -j 4
ifneq ($(VERILATOR_ANALYTICS_ID),)
SPHINXOPTS += -D html_theme_options.analytics_id=$(VERILATOR_ANALYTICS_ID)
SPHINXOPTS += -D html_theme_options.analytics_id=$(VERILATOR_ANALYTICS_ID)
endif
######################################################################
@@ -68,15 +68,21 @@ pdf:
######################################################################
html latex linkcheck spelling::
html latex linkcheck::
$(MAKE) vl-extract
$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
$(PYTHON3) bin/vl_sphinx_fix _build
spelling::
$(MAKE) vl-extract
$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
sort -o guide/spelling.txt guide/spelling.txt
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
clean mostlyclean distclean maintainer-clean::
rm -rf _build
rm -f $(SCRIPTS) *.tmp
rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs *.idx
+24
View File
@@ -0,0 +1,24 @@
.. SPDX-FileCopyrightText: 2003-2026 Wilson Snyder
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
Verilator Documentation
=======================
This folder contains sources for Verilator documentation.
For formatted documentation see:
- `Verilator README <https://github.com/verilator/verilator>`_
- `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>`_
- `Subscribe to Verilator announcements
<https://github.com/verilator/verilator-announce>`_
- `Verilator forum <https://verilator.org/forum>`_
- `Verilator issues <https://verilator.org/issues>`_
+11 -16
View File
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
# pylint: disable=C0112,C0114,C0115,C0116,C0209,C0301,R0201,R0903
# mypy: disallow-untyped-defs
# pylint: disable=C0112,C0114,C0115,C0116,C0209,C0301,R0903
# -*- Python -*- See copyright, etc below
######################################################################
@@ -11,9 +12,8 @@ import re
class VlSphinxExtract:
debug = 0
SkipBasenames = {}
def process(self, filename):
def process(self, filename: str) -> None:
with open(filename, "r", encoding="utf8") as fhr:
fhw = None
for line in fhr:
@@ -23,9 +23,7 @@ class VlSphinxExtract:
outname = match.group(1)
print("Writing %s" % outname)
fhw = open(outname, "w", encoding="utf8") # pylint: disable=consider-using-with
fhw.write(
".. comment: generated by vl_sphinx_extract from " +
filename + "\n")
fhw.write(".. comment: generated by vl_sphinx_extract from " + filename + "\n")
fhw.write(".. code-block::\n")
elif re.match(r'^[=a-zA-Z0-9_]', line):
fhw = None
@@ -39,18 +37,15 @@ parser = argparse.ArgumentParser(
allow_abbrev=False,
formatter_class=argparse.RawDescriptionHelpFormatter,
description="""Read a file and extract documentation data.""",
epilog=
""" Copyright 2021-2023 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('--debug', action='store_const', const=9, help='enable debug')
parser.add_argument('path', help='path to extract from')
Args = parser.parse_args()
+11 -16
View File
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# mypy: disallow-untyped-defs
# pylint: disable=C0112,C0114,C0115,C0116,C0209,C0301,R0903
# -*- Python -*- See copyright, etc below
######################################################################
@@ -12,20 +13,17 @@ import re
class VlSphinxFix:
debug = 0
SkipBasenames = {}
def process(self, path):
def process(self, path: str) -> None:
if os.path.isdir(path):
for basefile in os.listdir(path):
file = os.path.join(path, basefile)
if ((basefile != ".") and (basefile != "..")
and basefile not in self.SkipBasenames
and not os.path.islink(file)):
if ((basefile != ".") and (basefile != "..") and not os.path.islink(file)):
self.process(file)
elif re.search(r'\.(html|tex)$', path):
self._edit(path)
def _edit(self, filename):
def _edit(self, filename: str) -> None:
is_html = re.search(r'\.(html)$', filename)
with open(filename, "r", encoding="utf8") as fhr:
origfile = fhr.read()
@@ -54,18 +52,15 @@ parser = argparse.ArgumentParser(
allow_abbrev=False,
formatter_class=argparse.RawDescriptionHelpFormatter,
description="""Post-process Sphinx HTML.""",
epilog=
""" Copyright 2021-2023 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('--debug', action='store_const', const=9, help='enable debug')
parser.add_argument('path', help='path to edit')
Args = parser.parse_args()
+4
View File
@@ -0,0 +1,4 @@
.. comment: generated by t_event_control_star_never_bad
.. code-block:: sv
always @* a = 100;
+4
View File
@@ -0,0 +1,4 @@
.. comment: generated by t_event_control_star_never_bad
.. code-block::
%Warning-ALWNEVER: example.v:1:3 'always @*' will never execute as expression list is empty (no variables read)
+11
View File
@@ -0,0 +1,11 @@
.. comment: generated by t_lint_assigneqexpr_bad
.. code-block:: sv
:linenos:
:emphasize-lines: 3,5
assign d_o = // Note = not == below
(
e_o = 1 // <--- Warning: ASSIGNEQEXPR
) ? 1 : (
e_o = 0 // <--- Warning: ASSIGNEQEXPR
) ? b_i : 0;
+5
View File
@@ -0,0 +1,5 @@
.. comment: generated by t_lint_assigneqexpr_bad
.. code-block::
%Warning-ASSIGNEQEXPR: example.v:1:11 Assignment '=' inside expression
: ... Was a '==' intended, or suggest use a separate statement
+5
View File
@@ -0,0 +1,5 @@
.. comment: generated by t_lint_badvltpragma_bad
.. code-block:: sv
:emphasize-lines: 1
// verilator lintt_off WIDTH //<--- Warning (lint_off misspelled)
+7
View File
@@ -0,0 +1,7 @@
.. comment: generated by t_lint_badvltpragma_bad
.. code-block::
:emphasize-lines: 1,2
%Error-BADVLTPRAGMA: example.v:1:3 Unknown verilator comment: '/*verilator lintt_off WIDTH <--- Warning (lint_off misspelled)*/'
7 | /*verilator lintt_off WIDTH <--- Warning (lint_off misspelled)*/
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+2 -2
View File
@@ -2,5 +2,5 @@
.. code-block:: sv
:linenos:
always_comb b = ~a;
always_comb a = b;
always_comb b = ~a;
always_comb a = b;
+2 -2
View File
@@ -1,5 +1,5 @@
.. comment: generated by t_lint_didnotconverge_bad
.. code-block::
-V{t#,#} 'stl' region trigger index 1 is active: @([hybrid] a)
%Error: t/t_lint_didnotconverge_bad.v:7: Settle region did not converge.
-V{t#,#} 'stl' region trigger index 0 is active: @([hybrid] a)
%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.
%Error-DIDNOTCONVERGE: t/t_lint_didnotconverge_bad.v:7: Settle region did not converge after '--converge-limit' of 10000 tries
+7
View File
@@ -0,0 +1,7 @@
.. comment: generated by t_lint_functimectl_bad
.. code-block:: sv
:linenos:
:emphasize-lines: 2
function void calls_timing_ctl;
@e; // <--- Bad IEEE 1800-2023 13.4 time-controlling
+4
View File
@@ -0,0 +1,4 @@
.. comment: generated by t_lint_functimectl_bad
.. code-block::
%Error-FUNCTIMECTL: example.v:1:5 Functions cannot contain time-controlling statements (IEEE 1800-2023 13.4)
+8
View File
@@ -0,0 +1,8 @@
.. comment: generated by t_param_hier_bad
.. code-block:: sv
:linenos:
:emphasize-lines: 3
sub #(.X(MY_X)) u_sub ();
localparam int SUB_Y = u_sub.Y; // <--- BAD: IEEE 1800-2023 6.20.2 no hierarchical
+7
View File
@@ -0,0 +1,7 @@
.. comment: generated by t_param_hier_bad
.. code-block::
%Error-HIERPARAM: example.v:1:32 Parameter values cannot use hierarchical values (IEEE 1800-2023 6.20.2)
: ... note: In instance 't'
36 | localparam int SUB_Y = u_sub.Y;
| ^
+6 -6
View File
@@ -3,9 +3,9 @@
:linenos:
:emphasize-lines: 2,5
always @(posedge clk) begin
out2[7:0] <= d0; // <--- Warning
end
always @(negedge clk) begin
out2[15:8] <= d0; // <--- Warning
end
always @(posedge clk) begin
out2[7:0] <= d0; // <--- Warning
end
always @(negedge clk) begin
out2[15:8] <= d0; // <--- Warning
end
+3 -3
View File
@@ -1,6 +1,6 @@
.. comment: generated by t_lint_multidriven_bad
.. code-block::
%Warning-MULTIDRIVEN: example.v:1:22 Signal has multiple driving blocks with different clocking: 'out2'
example.v:1:7 ... Location of first driving block
example.v:1:7 ... Location of other driving block
%Warning-MULTIDRIVEN: example.v:1:21 Signal has multiple driving blocks with different clocking: 'out2'
example.v:1:5 ... Location of first driving block
example.v:1:5 ... Location of other driving block
+7
View File
@@ -0,0 +1,7 @@
.. comment: generated by t_lint_noreturn_bad
.. code-block:: sv
:linenos:
:emphasize-lines: 1
function int no_rtn(); // <--- Warning: No return
endfunction
+4
View File
@@ -0,0 +1,4 @@
.. comment: generated by t_lint_noreturn_bad
.. code-block::
%Warning-NORETURN: example.v:1:16 Non-void function 'no_rtn' has no return value

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