Skip to content

feat(cli): support celox.toml projects and SV file lists - #1566

Closed
tignear wants to merge 1 commit into
masterfrom
stack/tignear/feat/native-testbench-cli/support-celox-toml-projects-sv-file-lists--620aad85
Closed

tignear wants to merge 1 commit into
masterfrom
stack/tignear/feat/native-testbench-cli/support-celox-toml-projects-sv-file-lists--620aad85

Conversation

@tignear

@tignear tignear commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Let celox run and celox vpi build share project inputs from celox.toml, including common sources, named targets, include directories, macro definitions, top selection and run defaults. Resolve manifest paths from the manifest directory and discover a project from the current directory or its parents when appropriate. Explicit CLI settings override the selected target. Preserve the O2 production default when neither the CLI nor the project sets an optimization level, with precedence coverage for .sv, .v, and .veryl inputs.

Support standalone and nested -f file lists with quoted paths, comments, -I/-D and +incdir+/+define+ options. Expand CLI source and file-list arguments in their authored order. Reject unknown configuration fields, unsupported file-list options and recursive lists. Use the existing SV preprocessing API for includes and defines; compiler lowering, state-machine construction and optimizers are unchanged.

Add integration coverage for both commands, target selection, preprocessing, relative paths, CLI overrides, disabled SV builds and malformed configuration. Document the schema, path rules, ordering and supported file-list syntax in English and Japanese.

Validation:

  • cargo test --locked -p celox-vpi
  • cargo test --locked -p celox-vpi --features systemverilog
  • cargo clippy --locked -p celox-vpi --all-targets -- -D warnings
  • cargo clippy --locked -p celox-vpi --all-targets --features systemverilog -- -D warnings
  • cargo fmt --all -- --check
  • pnpm run lint
  • Parse the TOML examples from both guides with Python tomllib.

The two cocotb-dependent integration tests also pass when explicitly enabled with the configured Python interpreter.

@tignear

tignear commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 feat(cli): support celox.toml projects and SV file lists #1566 👈
2 ci: run pinned upstream SystemVerilog testbench daily #1571

@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-19T18:43:34.803460Z 66fb60e PR opened
ℹ️ 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 added the queued Mergify queue entry label Oct 19, 2026
@mergify

mergify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-19 19:10 UTC · Rule: changes · triggered by rule Queue explicitly requested merges
  • 🚫 Left the queue — 2026-10-19 19:55 UTC · at 66fb60ef7624b72d2ea4fbb0a673719c4a34ccc5

This pull request spent 44 minutes 18 seconds in the queue, with no time running CI.

Reason

The pull request conflicts with the base branch

The pull request was held in the queue, conflicting with at least one of 2 pull requests ahead of it. The conflict became a base branch one after #1441 merged.

Automatic conflict resolution can merge a conflict like this one instead of stopping on it, but only in a queue using the merge-batch or fast-forward merge method.

Hint

You should update or rebase your pull request.

If you want to requeue this pull request, you can post a @mergifyio queue comment.

Requeued — the merge queue status continues in this comment ↓.

tignear added a commit that referenced this pull request Oct 19, 2026
Allow projects to compile third-party SystemVerilog with mixed explicit and default timescales through a per-code severity policy. Add [diagnostics] and [targets.NAME.diagnostics] to celox.toml, and repeatable --diagnostic CODE=allow|warn|error overrides to both celox run and celox vpi build. Reuse the project discovery and target resolution from #1566, with common settings overridden by the selected target and then the CLI.

Keep strict defaults. Relaxed mixed_timescale diagnostics use 1ns/1ps for undeclared settings, retain explicit values, and include default scopes in global precision. Existing Veryl and SV warnings can be suppressed or promoted while unrelated errors remain fatal. NAPI project factories apply the policy and include it in compilation cache keys. Optimizer and runtime settings are unchanged.

Breaking Rust API: SimulatorOptions gains diagnostic_policy, SimulatorErrorKind gains DiagnosticPolicy, and the SV frontend/analyzer warning enums gain MixedTimescale. Update exhaustive struct constructions and enum matches accordingly. Existing builder calls and CLI defaults retain their behavior.

Validation:
- 10 diagnostic-policy regressions, including native, Cranelift, interpreter, WASM and mixed-language interface probes.
- 123 timescale and 19 warning regressions across the affected backend variants; 744 analyzer/frontend unit tests passed (3 existing ignored tests).
- cargo test --locked -p celox-vpi, with and without --features systemverilog.
- Focused NAPI project-policy/cache regression, native addon build, 6 celox.toml JS integration tests and TypeScript typecheck.
- WASI addon build using the CI WASI SDK and all 16 playground WASM tests.
- Clippy for affected crates and tests, including both VPI feature configurations; cargo fmt; JS lint; affected doctests; parse all TOML guide examples.
- Unmodified fpganinja/taxi AXI Stream RTL and testbench sources compile with mixed_timescale=warn. Full upstream cocotb execution still encounters the separate VPI interface-discovery limitation (s_axis is absent); this PR does not claim that workload passes.

Depends-On: #1566
Change-Id: I5c15ee49037bd37e3680f71364558aa886eb64f1
Base automatically changed from stack/tignear/feat/native-testbench-cli/run-systemverilog-veryl-native-testbenches--b0d36d52 to master October 19, 2026 19:38
@mergify mergify Bot added dequeued Mergify stopped this queue entry; investigate before retrying and removed queued Mergify queue entry labels Oct 19, 2026
@mergify

mergify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

🛑 Queue command has been cancelled

@tignear
tignear force-pushed the stack/tignear/feat/native-testbench-cli/support-celox-toml-projects-sv-file-lists--620aad85 branch from 66fb60e to e563070 Compare October 19, 2026 22:10
@tignear

tignear commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 66fb60e 2026-10-19 22:10 UTC
2 content 66fb60e → e563070 Preserve SystemVerilog-enabled VPI CLI defaults introduced by merged #1441 while resolving the project-input conflict. 2026-10-19 22:10 UTC
3 content e563070 → 187b05f Resolve conflicts after #1580 changed native testbench CLI defaults to O2; preserve the new default in project fallback and tests. 2026-10-20 09:31 UTC
4 rebase 187b05f → 451189e (rebase only) Rebase onto latest master at user request, retaining existing O2 precedence coverage and dependent PRs. 2026-10-20 10:41 UTC

@tignear tignear removed the dequeued Mergify stopped this queue entry; investigate before retrying label Oct 19, 2026
@mergify mergify Bot added queued Mergify queue entry dequeued Mergify stopped this queue entry; investigate before retrying and removed queued Mergify queue entry labels Oct 19, 2026
@tignear
tignear force-pushed the stack/tignear/feat/native-testbench-cli/support-celox-toml-projects-sv-file-lists--620aad85 branch from e563070 to 187b05f Compare October 20, 2026 09:31
@tignear tignear removed the dequeued Mergify stopped this queue entry; investigate before retrying label Oct 20, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 20, 2026
Let `celox run` and `celox vpi build` share project inputs from celox.toml, including common sources, named targets, include directories, macro definitions, top selection and run defaults. Resolve manifest paths from the manifest directory and discover a project from the current directory or its parents when appropriate. Explicit CLI settings override the selected target. Preserve the O2 production default when neither the CLI nor the project sets an optimization level, with precedence coverage for .sv, .v, and .veryl inputs.

Support standalone and nested -f file lists with quoted paths, comments, -I/-D and +incdir+/+define+ options. Expand CLI source and file-list arguments in their authored order. Reject unknown configuration fields, unsupported file-list options and recursive lists. Use the existing SV preprocessing API for includes and defines; compiler lowering, state-machine construction and optimizers are unchanged.

Add integration coverage for both commands, target selection, preprocessing, relative paths, CLI overrides, disabled SV builds and malformed configuration. Document the schema, path rules, ordering and supported file-list syntax in English and Japanese.

Validation:
- cargo test --locked -p celox-vpi
- cargo test --locked -p celox-vpi --features systemverilog
- cargo clippy --locked -p celox-vpi --all-targets -- -D warnings
- cargo clippy --locked -p celox-vpi --all-targets --features systemverilog -- -D warnings
- cargo fmt --all -- --check
- pnpm run lint
- Parse the TOML examples from both guides with Python tomllib.

The two cocotb-dependent integration tests also pass when explicitly enabled with the configured Python interpreter.

Change-Id: I620aad8541eb0f53364e4b32f571c56a9669f4f0
@tignear
tignear force-pushed the stack/tignear/feat/native-testbench-cli/support-celox-toml-projects-sv-file-lists--620aad85 branch from 187b05f to 451189e Compare October 20, 2026 10:41
tignear added a commit that referenced this pull request Oct 20, 2026
Allow projects to compile third-party SystemVerilog with mixed explicit and default timescales through a per-code severity policy. Add [diagnostics] and [targets.NAME.diagnostics] to celox.toml, and repeatable --diagnostic CODE=allow|warn|error overrides to both celox run and celox vpi build. Reuse the project discovery and target resolution from #1566, with common settings overridden by the selected target and then the CLI.

Keep strict defaults. Relaxed mixed_timescale diagnostics use 1ns/1ps for undeclared settings, retain explicit values, and include default scopes in global precision. Existing Veryl and SV warnings can be suppressed or promoted while unrelated errors remain fatal. NAPI project factories apply the policy and include it in compilation cache keys. Optimizer and runtime settings are unchanged.

Breaking Rust API: SimulatorOptions gains diagnostic_policy, SimulatorErrorKind gains DiagnosticPolicy, and the SV frontend/analyzer warning enums gain MixedTimescale. Update exhaustive struct constructions and enum matches accordingly. Existing builder calls and CLI defaults retain their behavior.

Validation:
- 10 diagnostic-policy regressions, including native, Cranelift, interpreter, WASM and mixed-language interface probes.
- 123 timescale and 19 warning regressions across the affected backend variants; 744 analyzer/frontend unit tests passed (3 existing ignored tests).
- cargo test --locked -p celox-vpi, with and without --features systemverilog.
- Focused NAPI project-policy/cache regression, native addon build, 6 celox.toml JS integration tests and TypeScript typecheck.
- WASI addon build using the CI WASI SDK and all 16 playground WASM tests.
- Clippy for affected crates and tests, including both VPI feature configurations; cargo fmt; JS lint; affected doctests; parse all TOML guide examples.
- Unmodified fpganinja/taxi AXI Stream RTL and testbench sources compile with mixed_timescale=warn. Full upstream cocotb execution still encounters the separate VPI interface-discovery limitation (s_axis is absent); this PR does not claim that workload passes.

Depends-On: #1566
Change-Id: I5c15ee49037bd37e3680f71364558aa886eb64f1
@mergify mergify Bot removed the queued Mergify queue entry label Oct 20, 2026
@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
  • -closed [📌 queue requirement]
  • -label = release:hold
All conditions
  • -closed [📌 queue requirement]
  • 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:
        • base ~= ^(master|develop)$
        • all of:
          • base ~= ^stack/
          • body ~= (?m)^Depends-On:
      • any of:
        • head != release-please--branches--master--components--celox
        • label = merge-ready
      • any of [🛡 GitHub repository ruleset rule master]:
        • check-success = @github-actions/Lint & Format
        • check-neutral = @github-actions/Lint & Format
        • check-skipped = @github-actions/Lint & Format
      • any of [🛡 GitHub repository ruleset rule master]:
        • check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU)
        • check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU)
        • check-success = @github-actions/NAPI Build (Linux ARM64 GNU)
      • any of [🛡 GitHub repository ruleset rule master]:
        • check-skipped = @github-actions/NAPI Build (Windows)
        • check-neutral = @github-actions/NAPI Build (Windows)
        • check-success = @github-actions/NAPI Build (Windows)
      • any of [🛡 GitHub repository ruleset rule master]:
        • check-success = @github-actions/Rust Test & NAPI Build
        • check-neutral = @github-actions/Rust Test & NAPI Build
        • check-skipped = @github-actions/Rust Test & NAPI Build
      • any of [🛡 GitHub repository ruleset rule master]:
        • check-success = @github-actions/JS Test (Ubuntu)
        • check-neutral = @github-actions/JS Test (Ubuntu)
        • check-skipped = @github-actions/JS Test (Ubuntu)
      • any of [🛡 GitHub repository ruleset rule master]:
        • check-skipped = @github-actions/JS Test (Windows)
        • check-neutral = @github-actions/JS Test (Windows)
        • check-success = @github-actions/JS Test (Windows)
      • any of [🛡 GitHub repository ruleset rule master]:
        • check-success = @github-actions/Conventional Commit title
        • check-neutral = @github-actions/Conventional Commit title
        • check-skipped = @github-actions/Conventional Commit title
    • all of [📌 queue conditions of queue rule dependencies]:
      • -label = release:hold
      • head ~= ^renovate/
      • -conflict
      • -draft
      • -head ~= ^(integration/|renovate/veryl-crates$|upgrade/veryl-|release-please--branches--master--components--celox$|master$)
      • base ~= ^(master|develop)$
      • any of:
        • head != release-please--branches--master--components--celox
        • label = merge-ready
      • any of [🛡 GitHub repository ruleset rule master]:
        • check-success = @github-actions/Lint & Format
        • check-neutral = @github-actions/Lint & Format
        • check-skipped = @github-actions/Lint & Format
      • any of [🛡 GitHub repository ruleset rule master]:
        • check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU)
        • check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU)
        • check-success = @github-actions/NAPI Build (Linux ARM64 GNU)
      • any of [🛡 GitHub repository ruleset rule master]:
        • check-skipped = @github-actions/NAPI Build (Windows)
        • check-neutral = @github-actions/NAPI Build (Windows)
        • check-success = @github-actions/NAPI Build (Windows)
      • any of [🛡 GitHub repository ruleset rule master]:
        • check-success = @github-actions/Rust Test & NAPI Build
        • check-neutral = @github-actions/Rust Test & NAPI Build
        • check-skipped = @github-actions/Rust Test & NAPI Build
      • any of [🛡 GitHub repository ruleset rule master]:
        • check-success = @github-actions/JS Test (Ubuntu)
        • check-neutral = @github-actions/JS Test (Ubuntu)
        • check-skipped = @github-actions/JS Test (Ubuntu)
      • any of [🛡 GitHub repository ruleset rule master]:
        • check-skipped = @github-actions/JS Test (Windows)
        • check-neutral = @github-actions/JS Test (Windows)
        • check-success = @github-actions/JS Test (Windows)
      • any of [🛡 GitHub repository ruleset rule master]:
        • check-success = @github-actions/Conventional Commit title
        • check-neutral = @github-actions/Conventional Commit title
        • check-skipped = @github-actions/Conventional Commit title
    • all of [📌 queue conditions of queue rule integration]:
      • -label = release:hold
      • head ~= ^(integration/|renovate/veryl-crates$|upgrade/veryl-|release-please--branches--master--components--celox$|master$)
      • -conflict
      • -draft
      • base ~= ^(master|develop)$
      • any of:
        • head != release-please--branches--master--components--celox
        • label = merge-ready
      • any of [🛡 GitHub repository ruleset rule master]:
        • check-success = @github-actions/Lint & Format
        • check-neutral = @github-actions/Lint & Format
        • check-skipped = @github-actions/Lint & Format
      • any of [🛡 GitHub repository ruleset rule master]:
        • check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU)
        • check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU)
        • check-success = @github-actions/NAPI Build (Linux ARM64 GNU)
      • any of [🛡 GitHub repository ruleset rule master]:
        • check-skipped = @github-actions/NAPI Build (Windows)
        • check-neutral = @github-actions/NAPI Build (Windows)
        • check-success = @github-actions/NAPI Build (Windows)
      • any of [🛡 GitHub repository ruleset rule master]:
        • check-success = @github-actions/Rust Test & NAPI Build
        • check-neutral = @github-actions/Rust Test & NAPI Build
        • check-skipped = @github-actions/Rust Test & NAPI Build
      • any of [🛡 GitHub repository ruleset rule master]:
        • check-success = @github-actions/JS Test (Ubuntu)
        • check-neutral = @github-actions/JS Test (Ubuntu)
        • check-skipped = @github-actions/JS Test (Ubuntu)
      • any of [🛡 GitHub repository ruleset rule master]:
        • check-skipped = @github-actions/JS Test (Windows)
        • check-neutral = @github-actions/JS Test (Windows)
        • check-success = @github-actions/JS Test (Windows)
      • any of [🛡 GitHub repository ruleset rule master]:
        • check-success = @github-actions/Conventional Commit title
        • check-neutral = @github-actions/Conventional Commit title
        • check-skipped = @github-actions/Conventional Commit title
  • -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
tignear added a commit that referenced this pull request Oct 20, 2026
Land the two stacks branching from #1566 together so the upstream testbench
workflow and simulator configuration share one validated queue entry.

Include celox.toml projects and SV file lists, configurable diagnostics,
VPI interface hierarchy, optimization and explicit signal access, numeric
top parameter overrides, and the pinned common_cells daily smoke test.
The compiler/runtime starts from #1591 at the SHA below. The CLI also
accepts the established exclude, [test], and [simulation] manifest fields
with their existing types, so explicit Veryl inputs can reuse celox.toml.
Additional changes come from #1571's CI, runner, and documentation.

The source PRs are held with release:hold while this rollup is active.
Their changes are squashed here; they close automatically when this PR
lands on master. If a source head changes, rebuild the rollup before
queueing it. Removing this rollup requires releasing those holds before
resuming individual stack merges.

Source PRs and pinned heads:
- #1566: 451189e — feat(cli): support celox.toml projects and SV file lists
- #1571: 7b3abcc — ci: run pinned upstream SystemVerilog testbench daily
- #1573: 2eee192 — feat(diagnostics)!: configure compilation diagnostic levels
- #1576: e16ef23 — fix(vpi): preserve SystemVerilog interface member hierarchy
- #1579: b291fe8 — feat(cli)!: configure optimization and explicit signal access
- #1591: 834663f — feat(cli)!: support numeric top parameter overrides

Validation:
- Manifest compatibility: 21 CLI tests passed, including run and vpi build with each established field and their combination; malformed field types and unknown CLI fields remain rejected. Affected-crate Clippy and formatting passed.
- 75 CLI/VPI tests passed; 3 opt-in cocotb tests retain the successful evidence from the identical #1591 Rust tree.
- 63 workflow, classifier, scope, and upstream-runner script tests passed.
- Real pinned common_cells Gray code TB passed; broken RTL failed with the required assertion diagnostic.
- cargo clippy --locked -p celox-vpi --all-targets --features systemverilog -- -D warnings, cargo fmt --all -- --check, pnpm lint, and git diff --check passed.
- Actionlint passed with only its outdated ubuntu-26.04-arm label catalogue diagnostic suppressed; the runner label predates these changes.
- Reused #1591's exact-source parameter (256 tests), Clippy, NAPI, and upstream Taxi O1/O2 (9/9 each) validation.

BREAKING CHANGE: SimulatorOptions gains diagnostic_policy and signal_access,
error and warning enums gain variants, and native image container version 16
requires rebuilding attached images with a matching runtime. VPI builds use
O1 with explicitly declared force targets. Unknown Veryl top parameter
overrides now fail compilation instead of being silently ignored.

Closes #1566
Closes #1571
Closes #1573
Closes #1576
Closes #1579
Closes #1591

Change-Id: I8a7eb9b0697f93da59eb8f5b8b13f70113604263
@mergify mergify Bot closed this in #1605 Oct 20, 2026
@tignear
tignear deleted the stack/tignear/feat/native-testbench-cli/support-celox-toml-projects-sv-file-lists--620aad85 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