Skip to content

feat(cli): pass plusargs to SystemVerilog runs - #2077

Merged
mergify[bot] merged 1 commit into
masterfrom
feat/2068-run-plusargs
Oct 25, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
feat/2068-run-plusargs

Conversation

@tignear

@tignear tignear commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Closes #2068.

Summary

celox run now passes plusargs to a SystemVerilog testbench, on every backend:

  • A positional argument starting with + (such as +iterations=9) is a plusarg, not a source.
  • --plusarg +ARG (repeatable, also --plusarg=+ARG) does the same.

Both kinds reach $test$plusargs / $value$plusargs (SimulationBuilder::plusargs) in command-line order, merged by clap's argument indices, so "first match wins" follows the command line. The + arguments are taken out of the sources before their order relative to -f file lists is computed, so source and file-list order is unchanged. Veryl runs reject plusargs with a clear message.

celox run tb.v --top tb +iterations=9 --plusarg +trace

Tests

  • sv_plusargs_reach_the_testbench_in_order (run_cli.rs): $value$plusargs with %d and %s, plus $test$plusargs, on the tiered, interpreter and native backends. It mixes positional and --plusarg arguments, and a repeated +iterations checks that the first one on the command line wins.
  • The whole celox-vpi test suite with --features systemverilog passes. Clippy with systemverilog,cranelift,wasm-runtime is clean.

While writing the test I found #2071: a $display whose arguments include both a variable and $test$plusargs fails SIR verification. It is independent of the CLI, so the test assigns the plusargs result to a variable first.

Docs

cocotb.md (both languages) describes the plusargs, and the SystemVerilog reference's plusargs section points to it.

Closes #2068

Change-Id: Ie3bfbfb10deffb922ae0b68e02a87549b6f280a9
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

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 ✅ Completed 2026-10-25T20:22:16.275113Z ca8ebf8 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.

@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 25, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 25, 2026
@mergify

mergify Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 29 minutes 16 seconds in the queue, including 26 minutes 52 seconds running CI.

Required conditions to merge
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • 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-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)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Windows)
    • check-neutral = @github-actions/NAPI Build (Windows)
    • check-skipped = @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-success = @github-actions/JS Test (Windows)
    • check-neutral = @github-actions/JS Test (Windows)
    • check-skipped = @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

@mergify
mergify Bot merged commit eea7c9b into master Oct 25, 2026
23 checks passed
@mergify
mergify Bot deleted the feat/2068-run-plusargs branch October 25, 2026 21:05
@mergify mergify Bot removed the queued Mergify queue entry label Oct 25, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(cli): pass plusargs to SystemVerilog runs

1 participant