Repository navigation
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e2e6802c4
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Queued — the merge queue status continues in this comment ↓. |
🚫 Left the queue20 min in the queue, with no time running CI. So far
Reason Pull request #1984 has been dequeued Queue conditions are not satisfied:
Hint You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Requeued — the merge queue status continues in this comment ↓. Times in UTC · dashboard · how the merge queue works |
6973dba to
e995f10
Compare
❌ Left the queue ·
|
e995f10 to
750f605
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 750f605d59
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… unit Periods of an event with derived clock domains that a host runs, as a Veryl testbench's `clk.next(n)` does where the generated testbench scheduler does not (`SchedulerMode::Reference`), ran every period as two host edges, each a call of a generated edge unit (#1888), while a plain clock's periods run in one call of its fused tick loop. Each event now has one generated unit that runs the edges its mode selects, the rising, the falling or both, a period, in that order. A single edge of `Simulator::edge` passes its edge with the host having moved the signal and judged whether logic reading it must settle, as before; a batch of periods lets the unit move the signal, and the native backends compile the unit in the tick loop, which runs up to n periods and returns after one that records a runtime event (`SimBackend::run_process_many`; other backends run one period per call). The unit keeps whether combinational logic has pending changes in the scheduler's dirty flag across its edges and periods, as the host does across edges. Hosts with per-slot work (deferred assertions, sampled values), comb observers or a host watch run edges instead. A single native process run sets the tick loop's count to one, so a count left by a batch that returned early cannot make a unit run several times. One unit per event replaces the rising and falling ones; deferred expansion and the outlined combinational settle apply to it as to them. BREAKING CHANGE: celox_design::DerivedEdgeUnits has one `unit` instead of `rising` and `falling`; SimBackend has a new method, run_process_many, with a default. Native images use container format 57. Change-Id: I3f9f794d224c59eae9b5036a5ca57c342ccba653
750f605 to
74104e4
Compare
Part of #1123, step 3b-2: #1786 PR C (batched
clk.next(n)on derived clock events), after #1844 and #1888. Rebased on master as of #2710.Periods of an event with derived clock domains that the host runs ran each period as two host edges, each a call of a generated edge unit (#1888), while a plain clock's periods run in one call of its fused tick loop. They now run in one call too: a period of a gated or divided clock costs about half of what it did on that path.
Where the batching applies now
Since #2484, a compiled Veryl testbench runs
clk.next(n)andrst.assertin the generated testbench scheduler, which runs derived domains itself (#1967) and reaches neitherclock_periodsnor the derived-edge units. The batches of this PR apply where the host still runs the periods:testbench::clock_periods, reached when the testbench has no generated scheduler entry, e.g.SchedulerMode::Reference. The single-edge part of the unit servesSimulator::edge/tick(Rust API, NAPI), as #1888's units did.BREAKING CHANGE
celox_design::DerivedEdgeUnits(public) has oneunitinstead ofrisingandfalling, andDERIVED_EDGE_RISING,DERIVED_EDGE_FALLINGandDERIVED_EDGE_MOVEDare new.SimBackend(public) has a new method,run_process_many, with a default that runs the unit once.What changes
SchedulerSlots::cont): the rising, the falling, or both, a period, in that order. Each edge is perf(runtime)!: run the derived clock edges of ticks in generated units #1888's edge code. Master's deferred expansion (DeferredEdge, now one per event, with size estimates for both edges) and the outlined combinational settle (outline_comb, four comb copies per unit replaced by calls) apply to it as they did to the rising and falling units.Simulator::edgemoves the signal through the host watch, judges whether logic reading it must settle (clock_move_needs_settle, which may evaluate the clock's aliases instead) and puts that in the flag, and passes its edge withDERIVED_EDGE_MOVED; comb observers and the host slot end (end_host_slot) as before.move_signaldoes; logic reading the signal then settles first. Only without a host watch, per-slot host work (deferred assertions, sampled values) or comb observers, since each edge is a time slot the host ends; otherwise the periods run as edges.dirtyacross edges: an edge settles first when it is set (or logic reads a signal the unit moved), an edge that ran domains leaves logic settled, one that ran nothing leaves the flag as it found it.eval_comb_apply_ffuses (celox_backend_common::loops_ticks, labelderived_edge), which runs up to n periods and returns after one that records a runtime event;SimBackend::run_process_manyreports how many ran. A single native process run sets the count to one, so a count left by a batch that returned early cannot make a unit run several times. The Cranelift, interpreter and wasm backends run one period per call.Validation
derived_edgetests:periods_run_in_generated_units_as_the_plan_walk(batches of 1–7 periods against the plan walk, with host writes of the enable and single rising edges in between, on the gated, inverted, divided, divided-with-a-host-enable, commit-raised-enable and independent designs; at least one batch must run several periods in one call),periods_return_after_a_runtime_event,deferred_assertions_of_derived_domains_mature(ticks, edges and periods, native and Cranelift, failing at the walk's period),single_edges_after_a_batch_returned_early_run_once, perf(runtime)!: run the derived clock edges of ticks in generated units #1888's tests and master'san_edge_reaching_60_gated_domains_runs_as_the_plan_walk: pass.deferred_edges_preserve_expanded_ir_and_reserve_only_small_entries(master) now also runs batches of 3 periods on the deferred and the outlined-comb images and compares them; the outlined image runs each batch in one call (checked locally).cargo nextest run -p celox -p celox-frontend-veryl --features celox/systemverilog,celox/cranelift,celox/wasm-runtime,celox/wasm-component,celox/veryl-reference: 17896 passed.celox-runtime,celox-design,celox-backend-common,-x86,-arm64: 811 passed.--all-targets -D warnings(celox, celox-frontend-veryl, celox-runtime, celox-design, the backends, celox-napi; CI features),cargo fmt --check: clean.Perf
A Veryl testbench running
clk.next(n)on 64 registers clocked byclk(plain: no derived clocks in the design),clk & en(gated) or a divider ofclk(divided); local probe, not committed. callgrind, Ir per period = (Ir at 20,000 periods − Ir at 2,000) / 18,000, median over 3×3 runs, release, native backend, on masteraac2423c73and this PR.Host-run periods (
SchedulerMode::Reference), where the batches apply:clk & enDefault (generated testbench scheduler), which does not run the units: