Igor Zaworski
7d71c3bb76
Fix of event triggering with V3Life ( #6932 effect) ( #7068 partial) ( #7072 )
2026-02-13 11:01:19 -05:00
Wilson Snyder
bbb231dfe2
Internals: Minor cleanups preparing for initialization fixes. No functional change.
2026-02-07 14:16:12 -05:00
Pawel Kojma
9a8538fafa
Support signed multiplication in constraints ( #7008 )
2026-02-06 10:14:54 -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
Wilson Snyder
07ce0ac2ea
Internals: Move CReset under Assign ( #6978 )
2026-01-31 21:27:36 -05:00
Wilson Snyder
7c6c6a684b
Add SPDX copyright identifiers, and get 'reuse' clean. No functional change.
2026-01-26 20:24:34 -05:00
Jose Drowne
12080dfcb1
Internals: Add AST nodes for tagged union parsing ( #6867 partial) ( #6881 )
2026-01-17 14:15:52 -05:00
Wilson Snyder
13327fa9c0
Copyright year update.
2026-01-01 07:22:09 -05:00
em2machine
3ceac0b37e
Fix parameterized class module parameters ( #6754 ) ( #6834 )
2025-12-19 12:57:15 -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
35dcf70f48
Optimize trace code for faster compiles on repeated types ( #6707 )
2025-12-16 17:52:00 -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
ae480c5f76
Fix enum item references in class extends with parameters.
2025-12-07 15:26:52 -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
b9b6eb61d9
Support randsequence ( #6131 )
2025-11-30 09:04:42 -05:00
Wilson Snyder
5c0ad5bd1f
Internals: cppcheck fixes. No functional change. ( #6687 )
2025-11-12 18:54:22 -05: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
Bartłomiej Chmiel
5adecb9fa3
Support multi-expression sequences ( #6639 )
2025-11-06 08:42:27 -05:00
Todd Strader
47b52800bf
Fix expression coverage of system calls ( #6592 )
2025-11-06 08:23:35 -05:00
Igor Zaworski
43373010dc
Add `$cpure` ( #6580 )
2025-10-22 06:18:27 -07: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
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
794247450f
Internals: Simplify AstScopeName ( #6280 )
...
Reduce reliance on AstText where not necessary.
2025-10-15 09:14:51 +01:00
Artur Bieniek
16fdd0e93c
Fiix fault on operations on uninitialized strings ( #6520 )
...
Signed-off-by: Artur Bieniek <abieniek@internships.antmicro.com>
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
Bartłomiej Chmiel
31e73f1645
Support simple cycle delay sequence expressions inside assertion properties ( #6508 )
...
Signed-off-by: Bartłomiej Chmiel <bchmiel@antmicro.com>
Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
2025-10-10 16:16:15 +02: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
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
3b623dc12e
Internals: Refactor to create VCMethod ( #3715 ). No functional change intended.
2025-09-27 08:22:17 -04:00
Wilson Snyder
af54a26b43
Fix parsing of `with (...) {...}` but still unsupported
2025-09-20 19:59:31 -04:00
Wilson Snyder
5e4668c146
Support get/set_randstate as class method.
2025-09-14 10:33:50 -04:00
Wilson Snyder
e60f52ee0c
Internals: Add CCall assertion
2025-09-07 17:18:23 -04:00
Wilson Snyder
67f26508ba
Support `$sscanf %t`
2025-09-01 14:40:22 -04:00
Wilson Snyder
703f0d8c5d
Commentary: spelling
2025-08-25 18:47:08 -04:00
Wilson Snyder
ac2a75fbb5
Support future sampled value functions.
2025-08-23 21:16:53 -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
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
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
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
b14539569f
Internals: Check and enforce member brace initialization. No functional change intended
2025-08-17 13:20:52 -04:00
Geza Lore
6f69c990fd
Internals: Remove AstCondBound and AstNodeCond ( #6293 ) ( #6294 )
...
Fixes #6293
2025-08-15 15:49:06 -07:00
Wilson Snyder
60cbbf0ec1
Add error on mismatching prototypes ( #6207 ).
2025-08-11 19:50:47 -04:00
Wilson Snyder
d1f851e1e1
Internals: Optimize empty 'if' into StmtExpr
2025-08-08 05:10:40 -04:00
Igor Zaworski
6c1cfc68cf
Fix dynamic cast purity ( #6267 )
...
Signed-off-by: Igor Zaworski <izaworski@internships.antmicro.com>
2025-08-06 07:09:44 -04:00
Ryszard Rozak
f9bdab65f0
Fix coverage of variables of complex types ( #6250 )
2025-08-01 13:24:18 +02:00
Ryszard Rozak
a5b0a0d9dd
Add support for `$countones` in constraints ( #6144 ) ( #6235 )
2025-07-28 16:14:03 +02:00
Paul Swirhun
bd2cb989d1
Support bit queue streaming ( #5830 ) ( #6103 ).
2025-07-27 15:29:56 -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
470f99694e
Revert d8dbb08a: Support bit queue streaming ( #5830 ) ( #6103 )
2025-07-26 17:59:52 -04:00
Paul Swirhun
d8dbb08a95
Support bit queue streaming ( #5830 ) ( #6103 )
2025-07-26 16:53:51 -04: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
Ryszard Rozak
28808f38bb
Dump function to which AstAddrOfCFunc points ( #6188 )
2025-07-18 08:37:00 +02:00
Wilson Snyder
6c9cbaef62
Internals: Clean up some constructors. No functional change intended.
2025-07-03 18:59:32 -04:00
Wilson Snyder
77908447e6
Support scoped `new` ( #4199 ).
2025-07-02 19:54:57 -04:00
Wilson Snyder
73ca2ab997
Support `$past_gclk`
2025-07-01 18:00:04 -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
Todd Strader
4b041c636f
Fix --x-initial and --x-assign random stability ( #2662 ) ( #5958 ) ( #6018 ) ( #6025 )
2025-05-27 09:31:55 -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
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
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
Todd Strader
4581023805
Fix --x-initial and --x-assign random stability ( #2662 ) ( #5958 )
2025-05-16 13:54:51 -04:00
Zhen Yan
6b42d789af
Fix checking for too-wide divide and modulus ( #6003 ) ( #6006 )
2025-05-15 10:43:45 -04:00
Wilson Snyder
d3016b62f5
Internals: Constructor cleanup. No functional change.
2025-04-29 19:23:35 -04:00
Wilson Snyder
3658e5f0f1
Internals: Rename widthToFit, no functional change.
2025-04-28 21:54:58 -04:00
Yilou Wang
e0fdb933a0
Support constraint random for StructArray ( #5805 ) ( #5937 )
2025-04-16 07:08:46 -04:00
Brian Li
50d7f2afc6
Support assigning unpacked arrays to queues ( #5924 ) ( #5928 )
2025-04-14 21:40:17 -04:00
Wilson Snyder
7c2b1971a4
Support class extends with arguments.
2025-04-08 22:09:40 -04:00
Ryszard Rozak
353a4b7b4a
Fix parameters referencing interface fields ( #1593 ) ( #5910 )
2025-04-02 09:43:12 -04:00
Todd Strader
d2b7b567df
Fix expression coverage on additional nodes ( #5849 partial) ( #5867 )
2025-03-19 19:01:31 -04:00
Wilson Snyder
9632dfdf93
Internals: Remove some unneeded this->. No functional change.
2025-03-08 17:48:20 -05:00
Wilson Snyder
51fcb881d5
Fix error on out-of-range lvalue part select ( #5820 ).
2025-03-08 11:05:58 -05:00
Wilson Snyder
fe15171649
Internals: cppcheck cleanups. No functional change.
2025-02-18 01:14:51 -05:00
Wilson Snyder
d8080008b4
Commentary
2025-01-24 07:47:32 -05:00
Wilson Snyder
dfe28f7ed0
Fix misoptimizing away `$urandom` ( #5703 ).
2025-01-11 08:48:40 -05:00
Wilson Snyder
8fbb725f34
Copyright year update.
2025-01-01 08:30:25 -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
Yilou Wang
54ef9ad31c
Support associative array basic constrained randomization ( #5658 ) ( #5670 )
2024-12-12 11:31:54 -05:00
Wilson Snyder
e44f34dde3
Improve concat lint error & cleanups for future commit.
2024-11-30 18:56:00 -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
8db9db7e25
Internals: Rename same() function. No functional change.
2024-11-28 15:01:58 -05:00
Wilson Snyder
99daa8d24b
Support `default disable iff` and `$inferred_disable` ( #4016 ).
2024-11-26 22:27:32 -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
Greg Davill
904be103df
Support parameter names in pattern initialization ( #5593 ) ( #5596 )
2024-11-14 07:25:58 -05:00
Ryszard Rozak
4cd69f9feb
Fix queue element access ( #5551 )
2024-10-24 09:40:54 -04:00
Yilou Wang
c05c48aaf3
Support unpacked array Constrained Randomization ( #5437 ) ( #5489 )
2024-10-02 10:29:47 -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
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
811eab8fa5
Fix short-circuting with associative array access ( #5484 ).
2024-09-24 19:24:01 -04:00
Wilson Snyder
4e4fdd3b66
Fix multidimensional function return value selects ( #5382 ).
2024-09-09 19:56:09 -04:00
Krzysztof Bieganski
f623db7d68
Normalize types in constraints ( #5407 )
...
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2024-08-27 12:53:44 +02:00
Krzysztof Bieganski
930f35acc9
Support `constraint_mode` ( #5338 )
2024-08-21 06:16:44 -04:00
Arkadiusz Kozdra
3e5859e5da
Support constraining AstSel ( #5344 )
...
Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
2024-08-08 15:37:08 +01:00
Arkadiusz Kozdra
a32b8d80f9
Support streaming operator on arrays and wide data ( #5326 )
...
Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
2024-08-06 08:48:46 -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
Wilson Snyder
0419ed0430
Fix initializing static array in dynamic arrays and queues ( #5287 ).
2024-07-24 06:06:57 -04:00
Krzysztof Bieganski
2a30a87580
Fix randomization when used with inheritance ( #5268 )
...
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2024-07-17 08:21:45 +02:00
Arkadiusz Kozdra
0a9b31bb30
Add warning on dist in constraints ( #5264 )
2024-07-15 21:01:33 -04:00