Commit Graph

8630 Commits

Author SHA1 Message Date
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 <bchmiel@antmicro.com>
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