Repository navigation
test(sv): timed scheduler boundary cases and scheduler bench - #1717
Merged
Merged
Conversation
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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Cover the points where a compiled scheduler may diverge from the reference loop: #0 pulses, edge waits by declaration order, NBA from delay-only processes, variable delays, asynchronous resets and common edges of generated clocks, host writes between runs and $finish between edges. Change-Id: Ie229a32418f7a7f7f9c2142043ad7d08f3760875
Change-Id: Ib9250ea1a74a4470b3f128750cf2cdbdc8439f03
tignear
force-pushed
the
feature/compiled-scheduler-3b1
branch
from
October 22, 2026 02:48
8c2fee8 to
a48aa06
Compare
Contributor
|
Queued — the merge queue status continues in this comment ↓. |
Contributor
Merge Queue Status
This pull request spent 1 hour 17 minutes 46 seconds in the queue, including 1 hour 6 minutes 51 seconds running CI. Required conditions to merge
|
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.
Part of #1123, step 3b-1 (compiled scheduler), PR 1 of 7. This adds test cases and a benchmark only; no runtime code changes.
Boundary cases (
timing.vtest)These are the places where a generated time-slot loop could diverge from the Rust reference loop. Each case's result is independent of the order IEEE 1800-2023 4.5 leaves open between processes of one region.
zero_delay_process_ends_a_pulse_after_its_edge_triggers:#0puts the falling write in the inactive region, after the domain the rising edge triggered.edge_waits_count_generated_clock_edges_in_any_declaration_order: an edge wait declared before or after the clock process, and a negedge wait that no flip-flop domain uses.delay_process_nonblocking_updates_reach_later_edges: NBA from a process that only delays.variable_delay_clock_changes_its_period: a non-constant delay.asynchronous_reset_driven_by_a_delay_processgenerated_clocks_with_a_common_edge_sample_each_other: two domains firing in one slot.script_writes_between_runs_reach_generated_clock_domains: a host write betweenrun_untilcalls must reach comb logic (this guards the later settle-skipping PR).edge_waits_on_script_inputs_next_to_a_generated_clockfinish_from_a_delay_process_between_clock_edgesBenchmark example
crates/celox/examples/sched_bench.rs(needssystemverilog) measures scheduler overhead per cycle with callgrind: whole-program Ir at 200,000 cycles minus Ir at 20,000, divided by 180,000, median of 5 runs. The design is 64 registersrK <= rK + (seed ^ K).Baseline at 144bbcc:
Simulator::tickSimulation+add_clockalways #5 clk = ~clk+initial forever @(posedge clk) stim = stim + 3stim <= stim + 3Perf effect: none (no runtime change).
Validation
cargo test --locked -p celox --features systemverilog --test systemverilog timing::(native, cranelift, native/cranelift parallel, wasm): 444 passed, 0 ignored (after rebasing onto feat(sv): lower expression events and @* in processes #1681).verify-sv-icarus --filter timing::: 78 passed, 1 ignored (existing).verify-sv-verilator --filter timing::: 75 passed, 1 ignored and 3 unsupported (existing four-state cases).cargo fmt --check, and clippy on the example: clean.