Skip to content

feat(cli)!: configure optimization and explicit signal access - #1579

Closed
tignear wants to merge 1 commit into
stack/tignear/fix/vpi-interface-hierarchy/preserve-systemverilog-interface-member-hierarchy--22a3f6f9from
stack/tignear/feat/explicit-signal-access/configure-optimization-explicit-signal-access--3121ddcc
Closed

tignear wants to merge 1 commit into
stack/tignear/fix/vpi-interface-hierarchy/preserve-systemverilog-interface-member-hierarchy--22a3f6f9from
stack/tignear/feat/explicit-signal-access/configure-optimization-explicit-signal-access--3121ddcc

Conversation

@tignear

@tignear tignear commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

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

@tignear
tignear marked this pull request as ready for review October 19, 2026 22:11
@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-19T22:11:34.984941Z 376107a 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.

@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 19, 2026
@mergify

mergify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

🛑 Queue command has been cancelled

`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
@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 force-pushed the stack/tignear/feat/explicit-signal-access/configure-optimization-explicit-signal-access--3121ddcc branch from 376107a to b291fe8 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 376107a 2026-10-20 10:42 UTC
2 content 376107a → b291fe8 2026-10-20 10:42 UTC

tignear added a commit that referenced this pull request Oct 20, 2026
Taxi's cocotb parameter set enables ID_EN and DEST_EN, but the CLI previously required editing a copy of its top module to select those values. Both `celox run` and `celox vpi build` now accept repeatable `-G NAME=VALUE` / `--parameter NAME=VALUE` (`--param` alias), plus `[parameters]` and `[targets.NAME.parameters]` in celox.toml, for SystemVerilog and Veryl tops.

Merge parameters by name in common -> target -> CLI order, with the last assignment winning. Values use the existing unsigned 64-bit builder interface, accepting decimal/0x/0o/0b forms and digit separators; TOML also accepts numeric strings for the full u64 range. HDL expressions, negative values, string values, and type parameters remain outside this interface. Declaration types determine conversion and truncation. Preserve the existing public driver helpers while adding a parameter-aware entry point.

Reject invalid assignments and unknown parameter names. Veryl's previous unknown-top behavior silently ignored typos, including names that exist only on a child module; update that regression to require rejection without retargeting the child.

Validation:
- Full celox-vpi suite with SystemVerilog, including 10 project CLI tests for precedence, duplicates, aliases, dependent parameters, native image width/value, unchanged source, and invalid input.
- 256 parameter/backend regressions (89 param_override, 4 param_override_width, 163 parameterized_ops).
- NAPI build and 6 JS parameter integration tests; affected-crate Clippy with warnings denied and formatting.
- Original fpganinja/taxi top at cc70b270b910d369ab1ad7b3855e76399fd461f1, with no RTL/Python edits: 9/9 cocotb tests at O1 and 9/9 at O2. The manifest supplies ID_EN=1 and CLI DEST_EN=1 overrides the manifest's DEST_EN=0. O2 lists observed interface signals in live_signals. After rebasing onto master, both runs pass without additional patches: master includes the #1441 event metadata and #1570 callback-order fixes. All 3 cocotb integration tests also pass. The updated CLI preserves the master O2 default for run and O1 for vpi build.

BREAKING CHANGE: Unknown Veryl top parameter overrides now fail compilation instead of being silently ignored. This also affects SimulatorBuilder::param callers and parameter overrides passed through NAPI.

Depends-On: #1579
Change-Id: I7a792c472bd9810fdca4f5034b9f6bb004332eeb
@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/feat/explicit-signal-access/configure-optimization-explicit-signal-access--3121ddcc 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