Repository navigation
feat(cli): pass plusargs to SystemVerilog runs - #2077
Merged
Merged
Conversation
Closes #2068 Change-Id: Ie3bfbfb10deffb922ae0b68e02a87549b6f280a9
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. |
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
|
This was referenced Oct 25, 2026
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.
Closes #2068.
Summary
celox runnow passes plusargs to a SystemVerilog testbench, on every backend:+(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-ffile lists is computed, so source and file-list order is unchanged. Veryl runs reject plusargs with a clear message.Tests
sv_plusargs_reach_the_testbench_in_order(run_cli.rs):$value$plusargswith%dand%s, plus$test$plusargs, on the tiered, interpreter and native backends. It mixes positional and--plusargarguments, and a repeated+iterationschecks that the first one on the command line wins.celox-vpitest suite with--features systemverilogpasses. Clippy withsystemverilog,cranelift,wasm-runtimeis clean.While writing the test I found #2071: a
$displaywhose arguments include both a variable and$test$plusargsfails 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.