Commit Graph

8649 Commits

Author SHA1 Message Date
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