Skip to content

fix(vpi): preserve SystemVerilog interface member hierarchy - #1576

Closed
tignear wants to merge 1 commit into
stack/tignear/feat/diagnostic-policy/configure-compilation-diagnostic-levels--5c15ee49from
stack/tignear/fix/vpi-interface-hierarchy/preserve-systemverilog-interface-member-hierarchy--22a3f6f9
Closed

tignear wants to merge 1 commit into
stack/tignear/feat/diagnostic-policy/configure-compilation-diagnostic-levels--5c15ee49from
stack/tignear/fix/vpi-interface-hierarchy/preserve-systemverilog-interface-member-hierarchy--22a3f6f9

Conversation

@tignear

@tignear tignear commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Expose declared SystemVerilog interfaces as navigable scopes in native image reflection. Previously Taxi's s_axis.tdata was published as a flat s_axis$tdata signal, so cocotb could not resolve dut.s_axis and failed before driving the design.

Carry interface member paths from elaboration through standalone and mixed-language scheduling, then construct reflection scopes from structured variable paths. Use declaration provenance to preserve legal dollar characters in ordinary identifiers, interface names and member names. Add a native-image round-trip VPI regression covering scoped lookup, enumeration, parent relationships and read/write aliases through interface ports.

Validation:

  • 38 VPI regressions, including the new interface hierarchy regression.
  • 249 interface-related backend regressions passed; 20 existing cases remain ignored.
  • 44 analyzer interface tests and 24 native execution tests.
  • Native addon build and all 108 TypeScript E2E tests.
  • Clippy for the affected crates and tests, cargo fmt --all -- --check, and git diff --check.
  • All 9 upstream fpganinja/taxi AXI Stream register cocotb tests passed in an isolated validation worktree combining this change with feat(vpi): run SystemVerilog designs with cocotb #1441's SV event metadata and fix(vpi): notify clock edges before flip-flop updates #1570's clock callback ordering. The configuration matches upstream pytest's DATA_W=8, REG_TYPE=2 case; a local testbench copy selects ID_EN=1 and DEST_EN=1, while RTL and Python tests remain unchanged. This PR alone fixes hierarchy discovery; the full workload also needs those existing event-handling changes.

Depends-On: #1573

@tignear
tignear marked this pull request as ready for review October 19, 2026 19:50
@tignear

tignear commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-19T19:50:35.001002Z 5a120b0 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@mergify

mergify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

🛑 Queue command has been cancelled

@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 19, 2026
Expose declared SystemVerilog interfaces as navigable scopes in native image reflection. Previously Taxi's s_axis.tdata was published as a flat s_axis$tdata signal, so cocotb could not resolve dut.s_axis and failed before driving the design.

Carry interface member paths from elaboration through standalone and mixed-language scheduling, then construct reflection scopes from structured variable paths. Use declaration provenance to preserve legal dollar characters in ordinary identifiers, interface names and member names. Add a native-image round-trip VPI regression covering scoped lookup, enumeration, parent relationships and read/write aliases through interface ports.

Validation:
- 38 VPI regressions, including the new interface hierarchy regression.
- 249 interface-related backend regressions passed; 20 existing cases remain ignored.
- 44 analyzer interface tests and 24 native execution tests.
- Native addon build and all 108 TypeScript E2E tests.
- Clippy for the affected crates and tests, cargo fmt --all -- --check, and git diff --check.
- All 9 upstream fpganinja/taxi AXI Stream register cocotb tests passed in an isolated validation worktree combining this change with #1441's SV event metadata and #1570's clock callback ordering. The configuration matches upstream pytest's DATA_W=8, REG_TYPE=2 case; a local testbench copy selects ID_EN=1 and DEST_EN=1, while RTL and Python tests remain unchanged. This PR alone fixes hierarchy discovery; the full workload also needs those existing event-handling changes.

Depends-On: #1573
Change-Id: I22a3f6f9ca55b53dbf0dbcf3f2399f4655ed7af1
@tignear
tignear force-pushed the stack/tignear/feat/diagnostic-policy/configure-compilation-diagnostic-levels--5c15ee49 branch from 39dd239 to 2eee192 Compare October 20, 2026 10:42
@tignear
tignear force-pushed the stack/tignear/fix/vpi-interface-hierarchy/preserve-systemverilog-interface-member-hierarchy--22a3f6f9 branch from 5a120b0 to e16ef23 Compare October 20, 2026 10:42
@tignear

tignear commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 5a120b0 2026-10-20 10:42 UTC
2 content 5a120b0 → e16ef23 (raw) 2026-10-20 10:42 UTC

tignear added a commit that referenced this pull request Oct 20, 2026
`celox run` and `celox vpi build` now share optimization and hierarchical signal-access settings in celox.toml and CLI options. VPI builds default to O1 with no implicit force permission; users explicitly list observation roots and force targets. Common settings are overridden by the selected target and then the CLI, with complete-list replacement and explicit clearing options.

Force targets imply liveness and receive override controls before symbolic evaluation and SIR optimization. This preserves blocking-assignment reads, signed and four-state values, declaration initializers, and sequential release behavior without globally switching to O0. Force uses the ordinary optimized native kernel, including parallel kernels. Permissions and control addresses survive native-image serialization, and undeclared force requests are rejected.

Explicit force currently supports whole packed variables in pure SystemVerilog designs. Unpacked arrays, clock/reset event objects, structured port aliases, and Veryl/mixed-language force targets fail explicitly. Interface members must be selected at their owning declaration. Observation roots support both source languages. These manifest settings apply to the CLI; JavaScript project constructors do not consume them.

Validation:
- 14 signal-access regressions, including O0/O1/O2 loop force, O2 DSE retention, parallel execution, initial values, signed/wide/four-state values, and rejected targets.
- 2944 SystemVerilog backend regressions, 234 interface regressions, 24 native-image regressions, and the VPI/CLI suites.
- Two real cocotb end-to-end tests, including optimized force/release; the CI step now runs both.
- NAPI build and 201 JS integration tests; 44 CI workflow/classifier tests.
- Clippy with warnings denied, formatting, no-host SystemVerilog check, and doctests.

BREAKING CHANGE: VPI CLI builds now require explicit force_signals/--force-signal declarations and default to O1 instead of implicit unrestricted O0 force support. SimulatorOptions adds signal_access, and native image container version 16 requires rebuilding attached images and using a matching runtime.

Depends-On: #1576
Change-Id: I3121ddcc187baaec143bdd0fe64d832d87e90a3e
@mergify

mergify Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

queue

🛑 The queue request has been cancelled: new commits were pushed

Details

@tignear pushed to this pull request after queue was requested. Review the new commits and request it again.

@mergify

mergify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • 🟠 Waiting for queue conditions
  • ⏳ Enter queue
  • ⏳ Run checks
  • ⏳ Merge
Waiting for
All conditions
  • -closed [📌 queue requirement]
  • depends-on = celox-sim/celox#1573 [⛓️ feat(diagnostics)!: configure compilation diagnostic levels #1573]
  • any of [🔀 queue conditions]:
    • all of [📌 queue conditions of queue rule changes]:
      • -label = release:hold
      • -conflict
      • -draft
      • -head ~= ^(integration/|renovate/veryl-crates$|upgrade/veryl-|release-please--branches--master--components--celox$|master$)
      • -head ~= ^renovate/
      • any of:
        • all of:
          • base ~= ^stack/
          • body ~= (?m)^Depends-On:
        • base ~= ^(master|develop)$
      • any of:
        • head != release-please--branches--master--components--celox
        • label = merge-ready
    • all of [📌 queue conditions of queue rule dependencies]:
      • -label = release:hold
      • base ~= ^(master|develop)$
      • head ~= ^renovate/
      • -conflict
      • -draft
      • -head ~= ^(integration/|renovate/veryl-crates$|upgrade/veryl-|release-please--branches--master--components--celox$|master$)
      • any of:
        • head != release-please--branches--master--components--celox
        • label = merge-ready
    • all of [📌 queue conditions of queue rule integration]:
      • -label = release:hold
      • base ~= ^(master|develop)$
      • head ~= ^(integration/|renovate/veryl-crates$|upgrade/veryl-|release-please--branches--master--components--celox$|master$)
      • -conflict
      • -draft
      • any of:
        • head != release-please--branches--master--components--celox
        • label = merge-ready
  • -conflict [📌 queue requirement]
  • -draft [📌 queue requirement]
  • any of [📌 queue -> configuration change requirements]:
    • -mergify-configuration-changed
    • check-success = @mergify/Configuration changed
    • check-success = @mergify/Configuration has been deleted

@tignear tignear added the release:hold Prevent the release pull request from merging label Oct 20, 2026
@mergify mergify Bot closed this in b39651d Oct 20, 2026
@tignear
tignear deleted the stack/tignear/fix/vpi-interface-hierarchy/preserve-systemverilog-interface-member-hierarchy--22a3f6f9 branch November 8, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-ready Request merging through Mergify after required checks release:hold Prevent the release pull request from merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant