Repository navigation
fix(vpi): expose interface parameters and lexical generate scopes - #2233
Merged
Conversation
This was referenced Oct 27, 2026
Contributor
Author
|
This pull request is part of a Mergify stack:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
tignear
force-pushed
the
stack/tignear/perf/taxi-memory-runtime/share-large-comb-kernels-bound-compilation-memory--4dad9216
branch
from
October 27, 2026 06:19
9282185 to
b7ebe76
Compare
tignear
force-pushed
the
stack/tignear/perf/taxi-memory-runtime/expose-interface-params-lexical-generate-scopes--3d0a6f88
branch
from
October 27, 2026 06:19
930f194 to
33a3359
Compare
Contributor
Author
Revision history
|
tignear
added a commit
that referenced
this pull request
Oct 27, 2026
Two-state lowering converted X/Z comparison operands to zero before ===, !== and ordinary case matching. As a result, a parity check against X could accept a known zero and clear an instruction-loader byte (#2136). Retain literal unknowns within exact-comparison operands and project their value and mask into ordinary two-state SLT expressions before backend lowering. Apply the same rules to combinational and procedural graphs and case matching, including width extension and conditional/arithmetic operands. Runtime storage remains two-state, calls keep their effects, and known-only comparisons reuse their original interned graph. Add five shared regressions covering both operand orders, signed and wide patterns, X versus Z, explicit conversion, FF and timed execution, byte loading, call effects and unknown intermediate expressions. IEEE 1800-2023 11.4.5 and 12.5 define the expected exact comparisons. Validation before rebasing: 4,684 shared SV backend executions passed, including 25 new regression executions, existing four-state cases and native images. Frontend: 9 unit tests and clippy; suite: 31 unit tests; Celox: 234 unit tests and 25 registered regression tests. Formatting and workspace checks also pass. Icarus passes all five unchanged cases. Verilator passes the timed effects case and rejects four cases with unsupported tristate constructs; retain those actual diagnostics without excluding the cases. After rebasing onto master 07ec9d9, all 330 operator backend tests pass, including the upstream logical-equivalence cases and all 25 X/Z regressions. The 9 frontend and 32 shared-suite unit tests, frontend clippy, formatting and the pre-push workspace check also pass. The five X/Z fixture definitions are unchanged, so their external verification evidence remains applicable. The additional no-default-features + systemverilog check encounters the existing CodegenError::message feature-gating error on master. That independent error is already fixed in #2233, and is not duplicated here. A separate pre-existing case-coverage false positive remains: an exhaustive case on {b, 1'bx} with only 2'b0x and 2'b1x labels is diagnosed as a latch. The unchanged baseline reproduces it; this patch does not change that coverage analysis to infer the selector's restricted value domain. Fixes #2136 Change-Id: I2b96b81844d9977a40668002b257c8bf845a249b
tignear
added a commit
that referenced
this pull request
Oct 27, 2026
Two-state lowering converted X/Z operands to zero before ===, !== and ordinary case matching. A parity check against X could therefore accept a known zero and clear an instruction-loader byte (#2136). Retain literal unknowns inside exact-comparison operands and project their value and mask into ordinary two-state SLT expressions before backend lowering. Apply the same rules to combinational/procedural expressions and case matching, including width extension and conditional/arithmetic operands. Storage stays two-state, calls keep their effects, and known-only comparisons reuse their interned graph (IEEE 1800-2023 11.4.5 and 12.5). Preserve actual startup unknowns too: encode default four-state function locals as X rather than Z (6.8, Table 6-7), and keep partially driven nets out of constant-variable inlining when any read touches undriven bits. Merge sparse driver intervals to check coverage without a full-width bit mask. Fully covered constant reads remain eligible for inlining. Test interior gaps, high undriven bits, contiguous fragments and dependency preservation. The existing startup API regressions now explicitly check both state modes and verify that comparison results have no unknown bits. Add five shared regressions for operand order, signed/wide patterns, X versus Z, conversion, FF/timed execution, loaded bytes, call effects and unknown intermediates. Icarus passes all five unchanged cases. Verilator passes the timed effects case and rejects four with unsupported tristate constructs; retain the actual diagnostics, check their named cases, status, phase and diagnostic, and keep them executable without exclusions. Validation: 5,868 SV integration tests passed (20 existing ignored tests), 4,619 Veryl shared executions across native, native-parallel, Cranelift, Cranelift-parallel, WASM and the interpreter passed, as did 186 SLT unit tests, 9 frontend unit tests and all 4 retained-report integration tests. Changed crates/test targets pass clippy, formatting and workspace checks. The native NAPI addon builds and all 116 JS boundary tests pass. The companion performance-stack PR #2233 maintains the correction for the base's CodegenError::message feature gating in host-runtime-disabled SV builds. A pre-existing case-coverage false positive remains: an exhaustive case on {b, 1'bx} with only 2'b0x and 2'b1x labels is diagnosed as a latch. Both reproduce on the unchanged base and are not duplicated or broadened into this patch. Fixes #2136 Change-Id: I2b96b81844d9977a40668002b257c8bf845a249b
Retain instance-local interface value parameters and localparams using declaration provenance, including indexed interface handles and authored dollar identifiers. Preserve package ownership. Build lexical generate scope prefixes for reflection separately from execution and VCD instance paths, inheriting timescales from the nearest real ancestor. The image container advances to version 49 for serialized lexical scope metadata. Validation covers specialized read-only parameters, escaped identifiers, interface arrays, generate iteration, timescales and native image roundtrips. Frontend, VPI and native library suites, owning-crate lint and formatting pass. This makes the unchanged original board tests discover all actual traffic models instead of passing with an empty MAC list. Keep the class-specialization depth guard reachable on the default stack: separate parameter binding, inherited-base resolution and body construction, with pending specialization metadata owned on the heap. Large temporary binding frames no longer accumulate across recursive inheritance. Preserve the existing depth-64 limit and diagnostics; test legitimate deep inheritance and a nonterminating specialization on an explicit 2 MiB thread stack. Validation after rebasing onto master 626dc7c: reproduce the CI SIGABRT with its full comparison-feature configuration, then pass the same test with the fix. All 842 analyzer unit tests (3 existing ignored), 372 class integration tests, 57 VPI tests, analyzer clippy and formatting pass. The host-runtime-disabled SystemVerilog build also passes. Change-Id: I3d0a6f889f3bc98503bbad44ab3bef8f52cab9c9
tignear
added a commit
that referenced
this pull request
Oct 27, 2026
Zero-argument functions that build constant masks with unpacked scratch arrays were lowered into runtime loops, including 8100-bit dynamic shifts in LFSR mask generation. Reuse the bounded constant interpreter and cache results after proving the function has no persistent state, global writes, simulation-state reads or effectful callees. Preserve runtime initialization in both state modes and leave unsupported or unknown-sensitive evaluations to ordinary lowering. Validation covers wide arrays and cache reuse, persistent/global state and direct/indirect effects, automatic initial values, unknown intermediates, aggregate slices and non-integral locals. A frontend regression bounds emitted runtime instructions in both state modes. Analyzer/frontend unit suites, clippy and formatting pass. Before rebasing onto current master, the complete stack passed 6169 shared backend variants plus 1814 owning/API tests. Unmodified original MAC_DATA_W=32 board tests passed at O1 with partitioned settle disabled: VCU108 compiled in 69s (1.46 GiB peak), ran in 92s; HTG9200 compiled in 155s (3.15 GiB peak), ran in 85s with all 36 MAC tests and 3456 frames. Final compiled circuit and metadata were byte-identical to the full cocotb passes. After rebasing onto master 5f752a4, all seven commits passed their own focused tests, lint and formatting independently. The final stack passed 6199 shared backend executions, including the six newly merged scalar-constraint and logical-implication cases on all five compiled backend variants, plus VPI tests, no-host checking, workspace check and Biome. No existing exclusions were removed. After the generated-callee arena review fix in the lower members, all 623 x86 unit tests, 239 native library tests and 41 API tests passed. The final updated stack also passed 3511 affected native/native-parallel/native-image shared executions and workspace check; unchanged Cranelift/WASM coverage remains covered by the earlier 6199-execution run. After syncing merged #2229/#2230 and rebasing onto master 626dc7c, #2233 fixes the default-stack class-specialization CI abort, also inherited by the upper members. The complete stack passes 848 analyzer unit tests (3 existing ignored), 10 frontend unit tests, the exact CI regression with all comparison features, formatting and host-runtime-disabled SV checking. At #2233, all 842 analyzer, 372 class integration and 57 VPI tests pass, with analyzer clippy and explicit 2 MiB stack coverage. Change-Id: I268b61b85e35aef99179cb8ca5e7139d787c1924
tignear
force-pushed
the
stack/tignear/perf/taxi-memory-runtime/share-large-comb-kernels-bound-compilation-memory--4dad9216
branch
from
October 27, 2026 09:52
b7ebe76 to
b2c02ac
Compare
tignear
force-pushed
the
stack/tignear/perf/taxi-memory-runtime/expose-interface-params-lexical-generate-scopes--3d0a6f88
branch
from
October 27, 2026 09:52
33a3359 to
b03076c
Compare
Contributor
|
Queued — the merge queue status continues in this comment ↓. |
Contributor
✅ Merged into
|
| Condition | |
|---|---|
| ✅ | depends-on = celox-sim/celox#2232 |
The batch, tested on draft #2268
| Condition | Required by | |
|---|---|---|
| ✅ | check-success = Conventional Commit title |
— |
| ✅ | check-success = Queue validation |
— |
| ✅ | any of: check-success = @github-actions/Lint & Format, check-neutral = @github-actions/Lint & Format, check-skipped = @github-actions/Lint & Format |
GitHub repository ruleset rule master |
| ✅ | any of: check-success = @github-actions/NAPI Build (Linux ARM64 GNU), check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU), check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU) |
GitHub repository ruleset rule master |
| ✅ | any of: check-success = @github-actions/NAPI Build (Windows), check-neutral = @github-actions/NAPI Build (Windows), check-skipped = @github-actions/NAPI Build (Windows) |
GitHub repository ruleset rule master |
| ✅ | any of: check-success = @github-actions/Rust Test & NAPI Build, check-neutral = @github-actions/Rust Test & NAPI Build, check-skipped = @github-actions/Rust Test & NAPI Build |
GitHub repository ruleset rule master |
| ✅ | any of: check-success = @github-actions/JS Test (Ubuntu), check-neutral = @github-actions/JS Test (Ubuntu), check-skipped = @github-actions/JS Test (Ubuntu) |
GitHub repository ruleset rule master |
| ✅ | any of: check-success = @github-actions/JS Test (Windows), check-neutral = @github-actions/JS Test (Windows), check-skipped = @github-actions/JS Test (Windows) |
GitHub repository ruleset rule master |
| ✅ | any of: check-success = @github-actions/Conventional Commit title, check-neutral = @github-actions/Conventional Commit title, check-skipped = @github-actions/Conventional Commit title |
GitHub repository ruleset rule master |
Times in UTC · dashboard · how the merge queue works
This was referenced Oct 27, 2026
tignear
added a commit
that referenced
this pull request
Oct 27, 2026
Two-state lowering converted X/Z operands to zero before ===, !== and ordinary case matching. A parity check against X could therefore accept a known zero and clear an instruction-loader byte (#2136). Retain literal unknowns inside exact-comparison operands and project their value and mask into ordinary two-state SLT expressions before backend lowering. Apply the same rules to combinational/procedural expressions and case matching, including width extension and conditional/arithmetic operands. Storage stays two-state, calls keep their effects, and known-only comparisons reuse their interned graph (IEEE 1800-2023 11.4.5 and 12.5). Preserve actual startup unknowns too: encode default four-state function locals as X rather than Z (6.8, Table 6-7), and keep partially driven nets out of constant-variable inlining when any read touches undriven bits. Merge sparse driver intervals to check coverage without a full-width bit mask. Fully covered constant reads remain eligible for inlining. Test interior gaps, high undriven bits, contiguous fragments and dependency preservation. The existing startup API regressions now explicitly check both state modes and verify that comparison results have no unknown bits. Add five shared regressions for operand order, signed/wide patterns, X versus Z, conversion, FF/timed execution, loaded bytes, call effects and unknown intermediates. Icarus passes all five unchanged cases. Verilator passes the timed effects case and rejects four with unsupported tristate constructs; retain the actual diagnostics, check their named cases, status, phase and diagnostic, and keep them executable without exclusions. Validation: 5,868 SV integration tests passed (20 existing ignored tests), 4,619 Veryl shared executions across native, native-parallel, Cranelift, Cranelift-parallel, WASM and the interpreter passed, as did 186 SLT unit tests, 9 frontend unit tests and all 4 retained-report integration tests. Changed crates/test targets pass clippy, formatting and workspace checks. The native NAPI addon builds and all 116 JS boundary tests pass. The companion performance-stack PR #2233 maintains the correction for the base's CodegenError::message feature gating in host-runtime-disabled SV builds. A pre-existing case-coverage false positive remains: an exhaustive case on {b, 1'bx} with only 2'b0x and 2'b1x labels is diagnosed as a latch. Both reproduce on the unchanged base and are not duplicated or broadened into this patch. The repository-script checks also enumerate the same four SV Verilator tristate compile failures. All 316 Node script tests, three benchmark-shell fixture suites and three updatecli unit tests pass on master 89b46b1. Fixes #2136 Change-Id: I2b96b81844d9977a40668002b257c8bf845a249b
This was referenced Oct 27, 2026
Base automatically changed from
stack/tignear/perf/taxi-memory-runtime/share-large-comb-kernels-bound-compilation-memory--4dad9216
to
master
October 27, 2026 12:00
mergify
Bot
deleted the
stack/tignear/perf/taxi-memory-runtime/expose-interface-params-lexical-generate-scopes--3d0a6f88
branch
October 27, 2026 12:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Retain instance-local interface value parameters and localparams using declaration provenance, including indexed interface handles and authored dollar identifiers. Preserve package ownership. Build lexical generate scope prefixes for reflection separately from execution and VCD instance paths, inheriting timescales from the nearest real ancestor.
The image container advances to version 49 for serialized lexical scope metadata. Validation covers specialized read-only parameters, escaped identifiers, interface arrays, generate iteration, timescales and native image roundtrips. Frontend, VPI and native library suites, owning-crate lint and formatting pass. This makes the unchanged original board tests discover all actual traffic models instead of passing with an empty MAC list.
Keep the class-specialization depth guard reachable on the default stack:
separate parameter binding, inherited-base resolution and body construction,
with pending specialization metadata owned on the heap. Large temporary
binding frames no longer accumulate across recursive inheritance. Preserve
the existing depth-64 limit and diagnostics; test legitimate deep inheritance
and a nonterminating specialization on an explicit 2 MiB thread stack.
Validation after rebasing onto master 626dc7c: reproduce the CI SIGABRT
with its full comparison-feature configuration, then pass the same test
with the fix. All 842 analyzer unit tests (3 existing ignored), 372 class
integration tests, 57 VPI tests, analyzer clippy and formatting pass.
The host-runtime-disabled SystemVerilog build also passes.
Depends-On: #2232