Repository navigation
merge queue: checking #1876 + #1936 + #1926 together on master (3533980), stacked on #1959 - #1965
Closed
mergify[bot] wants to merge 11 commits into
Closed
mergify[bot] wants to merge 11 commits into
mergify[bot] wants to merge 11 commits into
Conversation
Simulation's builder gets compile_native, which returns a NativeCompilation<Simulation> whose image carries the process kernels and the compiled scheduler, and build_native_from_image, which starts a timed simulation of such an image without code generation. A differential simulation loads a second copy of the image for its reference-loop shadow. Simulation::advance_to runs the slots before a time and stops there, so a host can act at the start of that slot. NativeProgramInstance now fails to attach an image with process kernels, as every Simulator loader already does. Part of #1730 Change-Id: I94db5d6a6ee51fd7059303f78a0c7b8cadd9312c
build_native_from_image and NativeCompilation<Simulation>::initialize now make the packed-array check of the untimed native loader, through one shared validate_native_vcd_layout: an image compiled without VCD cannot record element-strided unpacked arrays. Change-Id: I4d968bb5136d9fe772ec0afedb8f648161900f3a
Implement unconstrained randc for 1–8-bit two-state integers and scalar enums with up to 256 declared values. Draw uniformly without replacement using per-object, per-property cycle state, then start a new cycle once all values have been consumed. Preserve cycles across disabled modes, explicit member selection, aliases, inheritance and checkpoint restore. Reseeding changes the RNG without reintroducing consumed values. Add shared cycle/domain/control regressions, heap and checkpoint tests, and diagnostics for larger domains. Verilator passes the integer/direct-enum case; its inherited srandom compilation failure and enum alias mismatch, and Icarus's unsupported randomization methods, are recorded with narrow exclusions and reproduction evidence. Validation: analyzer 804 tests (3 existing ignores), frontend 6, heap 18, class regressions 198; NAPI build and JS tests 432; retained reports 4; affected crate/test Clippy, formatting and diff checks. Shared cases were exercised with Verilator and Icarus, with the limitations above retained. Rebased onto master and revalidated the class suite and retained-report checks. The optional xezim adapter was not run because xezim is not installed in this shell. BREAKING CHANGE: The public celox-sv-analyzer ObjectOp enum gains RandomCyclic; downstream exhaustive matches must handle this variant. Change-Id: I48859189cd57d25bb8c0df4773968b8e1534bf60
A cross-compiling build, such as x86-64 code generation on AArch64, cannot execute an image: start_native_image is now a separate stub there instead of an early return, so no binding of the real loader is left unused. Change-Id: Ief37d80cf28c9ee09417a864934ff01b9e6617df
A TypeScript `Simulation` could not see what the design reported. `$display` output, `$error` and failed assertions stayed in the event buffer, and only `$fatal` reached TypeScript, as an error of the run. This adds both halves of #89's fail-fast on top of the structured reports of the previous change. **`Simulation::set_fail_on`.** - `run_until`, `run_until_bounded` and `step` stop after the time step of the first report of at least the given severity. - `Simulation::failure` returns that report, as `is_stopped` does for `$stop`. The next run clears it and continues. - While it is set, the events of each step are taken from the event buffer after the step, with the time of that step. Reports then carry an exact `time`, and the buffer cannot overwrite them before the host drains. `drain_runtime_events` returns them first. - A step watches one time slot. A slot that only settles host writes is watched on its own, so a report it causes stops the run before later slots run. - Combinational logic left dirty by host writes that wake no process settles at the current time and is watched before the run moves to a later time or ends (`watch_settle`). Otherwise the later slot, or the settle at the run's end, issued its reports unwatched and with a later time. - Events lost to a full event buffer (`Missed`) may have held a failure, so they are one: `failure()` is a report of the `fail_on` severity, `missed N runtime events`. - Runs with it set take a separate loop. Runs without it keep the loop they had, with one check per run. **NAPI.** `NativeSimulationHandle` has: - `drainRuntimeEvents()`: objects with `kind` (`display`, `write`, `report`, `finish`, `stop`, `missed`) and, for a report, `severity`, `message`, `time`, `scope`, `file`, `line` and `assertion`; - `setFailOn(severity | null)`. `runUntil`, `runUntilBounded` and `step` throw `failOn: <rendered report>` when they stop at a failure. The bare `Simulator` handle wraps only a backend, and the WASM addon has no timed simulation, so neither has these. **TypeScript.** - `Simulation.drainRuntimeEvents()` returns a `RuntimeEvent` union. A `Report` has absent fields omitted. - `Simulation.setFailOn()` sets the severity. - `Severity`, `Report`, `AssertionSite` and `RuntimeEvent` are exported. callgrind, whole native program at 200,000 cycles minus at 20,000 cycles, 64 `always_ff` counters on a clock, without `failOn`. Both binaries are built in the same worktree: | | previous change (base) | this change | |---|---|---| | instructions | 1,015,380,290 | 1,015,380,043 | Equal. The first version checked the setting in every step and drained through the lazy comb path. That cost +0.96%, all from codegen around the drain: - an extra caller of the comb evaluation made LLVM outline `eval_comb_capturing_events` from `eval_comb_checked` (+10.8M); - the step loop got longer. The watched loop is now separate, and it drains through `drain_settled_runtime_events_with_context`, which does not evaluate comb: a step leaves comb settled. - New Rust test `sv_reports::*::fail_on_stops_runs_at_the_time_of_a_report` on the interpreter, cranelift, native and wasm backends: - with `Error`, `$warning` at 1 and `$error` at 2 stop the run at 2; - `failure()` is the `$error`; - the drained reports have times 1 and 2; - the next run reaches the target and shows the later `$display`. - New `fail_on_stops_at_reports_of_host_writes`: a host write at 2 that wakes `always @(posedge a) $error`, with a `$display` at 5, stops `run_until(10)` and `step()` at 2 with the report at 2. Without the change both reach 5. - New `fail_on_stops_at_reports_of_settles_without_steps`: an `always_comb` `$error` that a host write at 2 enables, with nothing scheduled and with an `initial #5 $display`, stops `run_until(10)` and `step()` at 2 with the report at 2, and the next run reaches 10. Without the change the run went on to 5 or 10. - New `fail_on_stops_at_missed_events`: 2,000 `$display`s at 1 stop the run at 1 with a `missed` failure. Without the change it runs on. - New `packages/celox/src/runtime-events-addon.test.ts` (Veryl through the addon): - `drainRuntimeEvents` returns `$display` output and an `$assert_continue` report in order, then nothing; - `setFailOn("error")` makes `runUntil` throw at the time of the report, which the drained report carries, and the next `runUntil` continues; - an unknown severity is rejected. - `vitest run --testTimeout 60000` in `packages/celox` with a debug addon: 435 passed. With the default 5 s timeout, `e2e.test.ts > several threads simulate exactly like one` times out on the debug addon; CI builds it in release. - `tsc -p tsconfig.test.json` and `biome check`. - `cargo nextest run -p celox -p celox-napi -p celox-vpi --features celox/systemverilog`: 13,586 passed. - `cargo clippy` with CI's features and `-D warnings`, `cargo fmt --check`. Change-Id: I4b6716e776cfafba8386e0b35191299213b4897b
Program-rejection cases of the timing group are untimed designs: their native-image backend round-trips a Simulator image, with the same language-rejection classification as the other untimed backends. Change-Id: Ie295e8c565eba3dc382ba8b5624f7ebb75aa513f
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.
Note
This is a merge queue draft opened by Mergify. Nobody needs to act on it.
Mergify opened it for batch narrow-chataigne-fy0ynp of the
changesqueue, to test #1876, #1936 and #1926 before they merge intomaster. Pushing to this branch or closing this pull request removes them from the queue.What this draft tests
Mergify checks that #1876, #1936 and #1926 still pass CI once combined with everything queued ahead of them. CI runs on this draft's code, built in this order:
masterat3533980338c214The check is speculative: it assumes the pull requests ahead will merge, so it starts without waiting for them.
🎉 Where it stands: checks passed
CI passed on this draft.
Follow the
changesqueue in the dashboardWhat happens next
masterand closes this draft.Tip
A red check is not necessarily caused by this batch. These checks run on a tip that also carries the commits of the pull request ahead, so a failure here can come from it as much as from #1876 + #1936 + #1926. See only this batch's changes.
Queued ahead of this batch
This pull request entered the queue before this batch and is not part of it.
Metadata for CI tooling, read by
mergify ci1 scope
coreRequired conditions of queue rule
changesfor mergecheck-success = Conventional Commit titlecheck-success = Queue validationmaster]:check-success = @github-actions/Lint & Formatcheck-neutral = @github-actions/Lint & Formatcheck-skipped = @github-actions/Lint & Formatmaster]: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)master]:check-success = @github-actions/NAPI Build (Windows)check-neutral = @github-actions/NAPI Build (Windows)check-skipped = @github-actions/NAPI Build (Windows)master]:check-success = @github-actions/Rust Test & NAPI Buildcheck-neutral = @github-actions/Rust Test & NAPI Buildcheck-skipped = @github-actions/Rust Test & NAPI Buildmaster]:check-success = @github-actions/JS Test (Ubuntu)check-neutral = @github-actions/JS Test (Ubuntu)check-skipped = @github-actions/JS Test (Ubuntu)master]:check-success = @github-actions/JS Test (Windows)check-neutral = @github-actions/JS Test (Windows)check-skipped = @github-actions/JS Test (Windows)master]:check-success = @github-actions/Conventional Commit titlecheck-neutral = @github-actions/Conventional Commit titlecheck-skipped = @github-actions/Conventional Commit titleRequired conditions to stay in the queue
-conflict-draft-head ~= ^(integration/|renovate/veryl-crates$|upgrade/veryl-|release-please--branches--master--components--celox$|master$)-head ~= ^renovate/-label = release:holdbase ~= ^(master|develop)$base ~= ^stack/body ~= (?m)^Depends-On:head != release-please--branches--master--components--celoxlabel = merge-readymaster]:check-success = @github-actions/Lint & Formatcheck-neutral = @github-actions/Lint & Formatcheck-skipped = @github-actions/Lint & Formatmaster]: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)master]:check-skipped = @github-actions/NAPI Build (Windows)check-neutral = @github-actions/NAPI Build (Windows)check-success = @github-actions/NAPI Build (Windows)master]:check-success = @github-actions/Rust Test & NAPI Buildcheck-neutral = @github-actions/Rust Test & NAPI Buildcheck-skipped = @github-actions/Rust Test & NAPI Buildmaster]:check-neutral = @github-actions/JS Test (Ubuntu)check-skipped = @github-actions/JS Test (Ubuntu)check-success = @github-actions/JS Test (Ubuntu)master]:check-skipped = @github-actions/JS Test (Windows)check-neutral = @github-actions/JS Test (Windows)check-success = @github-actions/JS Test (Windows)master]:check-success = @github-actions/Conventional Commit titlecheck-neutral = @github-actions/Conventional Commit titlecheck-skipped = @github-actions/Conventional Commit title