Skip to content

test: add xezim as an external reference simulator - #1918

Merged
mergify[bot] merged 1 commit into
masterfrom
feature/test/1863-xezim-reference
Oct 24, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
feature/test/1863-xezim-reference

Conversation

@tignear

@tignear tignear commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1863.

What

Adds xezim as a third external reference simulator for the shared Veryl and SystemVerilog suites, next to Verilator and Icarus.

  • Adapter (src/xezim.rs, xezim feature, verify-xezim / verify-sv-xezim). It uses the command line only, with no VPI or C++ harness.
    • The design is first checked with xezim --compile -D CELOX_SUITE_XEZIM, which separates source rejections from a run that ends in $fatal, and then run, parsed again, as timeout -k 10s 60s xezim --error-exit --max-time <RUN_UNTIL_LIMIT + 1> -s <top> …. Follow-up test(xezim): run each case with one xezim process instead of --compile plus a run #1927 tracks running each case with one process.
    • A run passes only when xezim's last line reports that $finish ended it. --max-time is RUN_UNTIL_LIMIT + 1 ns, so every script time is reachable and the testbench's own deadline after run_to_finish fires first. xezim handles SIGTERM cooperatively and its output helper ignores it, so timeout -k 10s escalates to SIGKILL. A time limit, event exhaustion, a crash or a forged marker all fail.
    • Source rejections are fail-closed, as in icarus::is_source_rejection: exit code 1, every line is a recognised diagnostic, excerpt or header, and only reviewed messages count.
  • Settle in timed testbenches, under `ifdef CELOX_SUITE_XEZIM. A top-level program celox_suite_settler acknowledges a request counter. The testbench increments the counter, which is a design-side event caused by the stimulus, then waits with while (ack != request) @(ack).
    • Program code runs in the Reactive region set, which the scheduler reaches only once the Active set is empty, including NBA updates and the events they cause (IEEE 1800-2023 4.5, 24.3.1). A bare #0 would resume before the design reacts.
    • The Icarus and Verilator branches are unchanged. Celox has no program support (feat(sv): program blocks and the reactive region set #1862), so this exists only on the xezim branch.
    • Covered by live adapter tests in tests/oracles.rs: NBA → comb → derived-clock NBA cascades, #0 chains, settles at time 0 and later, early $finish, event exhaustion, and forged or partial markers.
  • Two-state cases. The suite starts all storage at zero. xezim gets XEZIM_INIT_REG=0 / XEZIM_INIT_MEM=0, and the generated testbench inputs start at '0 on the xezim branch. Other variables still start at X, so on the xezim branch every design read of a two-state case goes through suite_read, which fails the run on unknown bits; X can no longer slip through !==, conditions or &&/||. That is the rule Icarus::read applies. 7 cases are recorded as two-state init limitations and 1 as a two-state semantics limitation.
  • Nix. nix develop .#xezim adds xezim, pinned by git rev, to the development shell. Only the xezim external-suite jobs build it; the default shell and the devcontainer profile don't (flake.nix input, nix/xezim with a vendored Cargo.lock and update-lock.sh, because upstream does not commit one). update-lock.sh resolves it with the nixpkgs cargo and rustc that build the package. Renovate opens rev bumps without automerge, and their description says the retained reports must be re-reviewed.
  • CI. The external-suite matrix gains xezim for both suites. PR CI builds, lints and tests celox-test-suite/xezim with the other adapter features; tests that run xezim itself are #[ignore]d there. It runs the live adapter tests and the same fresh-report gate (check-external-suite-report.mjs).

Initial reviewed baseline

suite passed rejected ignored mismatch compile_error unexpected_accept runtime_error total
Veryl 595 0 68 96 14 8 4 785
SV 439 3 0 251 22 8 5 728
  • Ignored cases. The 68 ignored Veryl cases are the existing strict-emission limitation groups (veryl_ff_effects, veryl_negative_for_bounds, veryl_runtime_system_calls, veryl_native_clock_components). Their emitted diagnostics are not stable between runs, so they are excluded the same way as for Verilator and Icarus. The pre-exclusion evidence is in verification/limitations/xezim.json.
  • Retained failures. Every other failure stays executed evidence, not an exclusion. verification/xezim-review.json classifies each one against IEEE 1800-2023, not by majority vote between simulators:
    • 368 are xezim bugs, across 153 distinct bugs, each with a title and clause. Repros were run and reported to the coordinator, not filed upstream.
    • 14 are suite or emitter issues: for example, an unpacked-argument element-type mismatch (7.6), a %05d zero pad where 21.2.1.2 pads decimals with spaces, and a fixed wake order between processes woken by the same event (4.7).
    • 15 are LRM-ambiguous.
    • 7 are two-state init limitations of the adapter, and 1 is a two-state semantics limitation: a partly out-of-range part-select of a logic vector reads x (11.5.1) where the two-state contract gives 0.
    • 3 are LRM-permitted orders: two time-0 races where always_comb with zero inputs loops forever before the testbench's first write (9.2.2.2.1, 4.7), and one where processes woken by the first of two NBA updates run before the second (4.5, 4.6, 4.7).
  • Review test. retained_reports::xezim_retained_failures_match_their_review requires the review and the retained failures to match exactly, with the same names and statuses, and every cited bug to be catalogued.

Two fresh full runs gave identical retained failures. Apart from the emission cases, check-external-suite-report.mjs accepted the second run against the first run's report: Veryl 785 and SV 691 cases. After rebasing on master, both catalogues were rerun fresh (SV now has 728 cases) and the 25 new SV non-passes were triaged.

Validation

  • cargo fmt --all -- --check
  • cargo clippy --locked --workspace --all-targets --features celox/systemverilog,celox-test-suite/verilator,celox-test-suite/icarus,celox-test-suite/xezim --no-deps (no warnings)
  • nix flake check --no-build --all-systems --no-update-lock-file; nix build .#xezim
  • cargo nextest run -p celox-test-suite --profile ci --features verilator,icarus,xezim: 80 passed, 16 skipped (ignored live tests)
  • cargo test -p celox-test-suite --features {xezim,icarus,verilator} --test oracles -- --ignored: xezim 3, Icarus 5, Verilator 4 passed
  • node --test scripts/*.test.mjs: 271/272 pass. The failure is emnapi-compatibility, because the local node_modules lacks @emnapi/core's createAddonModule; that is unrelated and installed in CI.
  • verify-xezim --fresh / verify-sv-xezim --fresh over the full catalogues produced the retained reports, and a second fresh run passed the CI report check.
  • The testbench generator changed for every timed case, so verify-sv-icarus and verify-sv-verilator --fresh --filter timing:: were rerun: all 125 cases have their retained statuses (Icarus 120 passed / 5 ignored, Verilator 102 passed / 18 ignored / 5 unsupported).

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 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 ⚠️ Failed 2026-10-24T22:25:42.077040Z
We couldn’t complete this review. Comment @codex review to try again.
f261bcd New commits
ℹ️ 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 force-pushed the feature/test/1863-xezim-reference branch from b60b16d to e30afc4 Compare October 24, 2026 18:09
@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 24, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 24, 2026
@mergify

mergify Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-24 19:42 UTC · Rule: changes · triggered by rule Queue explicitly requested merges
  • 🚫 Left the queue — 2026-10-24 19:51 UTC · at e30afc4463f30ecf411ebdc3ffe35d98cc245858

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

Reason

Pull request #1918 has been dequeued by @tignear with a dequeue command

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

@tignear

tignear commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio dequeue

@mergify mergify Bot added dequeued Mergify stopped this queue entry; investigate before retrying and removed queued Mergify queue entry labels Oct 24, 2026
@tignear tignear removed merge-ready Request merging through Mergify after required checks dequeued Mergify stopped this queue entry; investigate before retrying labels Oct 24, 2026
@mergify mergify Bot added the dequeued Mergify stopped this queue entry; investigate before retrying label Oct 24, 2026
@tignear
tignear force-pushed the feature/test/1863-xezim-reference branch from e30afc4 to d3f6cb6 Compare October 24, 2026 20:50
@mergify mergify Bot removed the dequeued Mergify stopped this queue entry; investigate before retrying label Oct 24, 2026
@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 24, 2026
@tignear
tignear force-pushed the feature/test/1863-xezim-reference branch from d3f6cb6 to 0b13ece Compare October 24, 2026 21:35
Run the shared Veryl and SystemVerilog suites against xezim through its
command line. Timed testbenches settle through a top-level program that
acknowledges a design-side request event (IEEE 1800-2023 4.5, 24.3.1).
The dev shell pins xezim by git revision, CI compares it in the external
suite matrix, and the initial baseline retains each failure with its
review in verification/xezim-review.json.

Closes #1863.

Change-Id: I3c2abece39ec71f689b07a5d0d9f5e27f804e9dd
@tignear
tignear force-pushed the feature/test/1863-xezim-reference branch from 0b13ece to f261bcd Compare October 24, 2026 22:25
@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 added the queued Mergify queue entry label Oct 24, 2026
@mergify

mergify Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 46 minutes 40 seconds in the queue, including 24 minutes 14 seconds running CI.

Required conditions to merge
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • depends-on=celox-sim/celox#1896 [⛓️ feat(runtime)!: run program kernels in the reactive region set #1896 [stack]]
  • 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 e7ba682 into master Oct 24, 2026
26 checks passed
@mergify
mergify Bot deleted the feature/test/1863-xezim-reference branch October 24, 2026 23:40
@mergify mergify Bot removed the queued Mergify queue entry label Oct 24, 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.

test: add xezim as an external reference simulator (CLI, program-based settle)

1 participant