Skip to content

merge queue: checking #1764 on master (d5a1eff) - #1768

Closed
mergify[bot] wants to merge 3 commits into
masterfrom
mergify/merge-queue/8b9bd31966
Closed

mergify[bot] wants to merge 3 commits into
masterfrom
mergify/merge-queue/8b9bd31966

Conversation

@mergify

@mergify mergify Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Note

This is a merge queue draft opened by Mergify. Nobody needs to act on it.
Mergify opened it for batch hungry-flan-iyeypw of the changes queue, to test #1764 before it merges into master. Pushing to this branch or closing this pull request removes #1764 from the queue.

What this draft tests

Mergify checks that #1764 still passes CI on top of master. CI runs on this draft's code, built in this order:

  1. master at d5a1eff
  2. #1764, the pull request of this batch

⏳ Where it stands: being checked

CI is running on this draft.

Waiting for

  • check-success = Queue validation
  • any of: [🛡 GitHub repository ruleset rule master]
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
    • check-success = @github-actions/Rust Test & NAPI Build

Follow the changes queue in the dashboard

What happens next

  • Once the checks pass and every merge condition is met, Mergify merges #1764 into master and closes this draft.
  • If a check fails, Mergify removes #1764 from the queue and closes this draft.
  • If the checks have not finished after 3 hours (checks_timeout), Mergify removes #1764 from the queue and closes this draft.
Metadata for CI tooling, read by mergify ci
---
all_scopes: false
checking_base_sha: d5a1eff3df89735f600399d924b2f015aef9a3c2
previous_check_retries: []
previous_failed_batches: []
pull_requests:
  - number: 1764
    scopes:
      - core
scopes:
  - core
...
1 scope
  • core
Required conditions of queue rule changes for merge
  • check-success = Queue validation
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
    • check-success = @github-actions/Rust Test & NAPI Build
  • check-success = Conventional Commit title
  • 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/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
Required conditions to stay in the queue
Queue graph

The diagram is not laid out in queue order, so a node's position says nothing about when it merges.

graph LR
    301f13721fc446f7aef6162f5b79dc8f["hungry-flan-iyeypw<br/>#1764<br/>scopes: core"]
    59c8df66c4f04c67ac3e252d4afe2105["waggish-poire-gl828a<br/>#1766<br/>scopes: core"]
    301f13721fc446f7aef6162f5b79dc8f --> 59c8df66c4f04c67ac3e252d4afe2105
    style 301f13721fc446f7aef6162f5b79dc8f fill:#6366f1,color:#fff
Loading

tignear and others added 3 commits October 23, 2026 01:59
…e time slot

## Summary

IEEE 1800-2023 4.3, 4.5 and 10.4.2 make every change of a variable's value an update event, which schedules the processes sensitive to it, even when a later write in the same time slot restores the old value. Celox compared values only at the end of an evaluation, so it missed these changes in four cases:

| Writer | Reader | Before | Now |
|---|---|---|---|
| process: `a = 1; a = 0;` | `always_comb` (immediate assertion, `$display`) | not run again | runs again |
| process: `a <= 1; a <= 0;` | `always_comb` | not run again | runs again |
| `always_ff`: `a <= 1; a <= 0;` (or blocking) | `@(a)`, `@(posedge a)`, `always_comb` | no event | event |
| the same `always_ff` pulse, in a design without processes | another FF domain clocked by `a` | domain does not fire | fires |

Icarus 13.0 gives the same results on an equivalent design. A glitch between two combinational processes is still allowed, since that ordering is legal.

**Occurrence counters.**
- The SV frontend gives each sensitivity atom of an `always_comb` activation group a counter (`CombObserver::sensitivity_counters`).
- Assembly turns these, and the existing counted signals, into probes (`RuntimeSchema::occurrence_probes`).
- An FF evaluation unit that stores to a probed or counted signal more than once bumps its counter at each store that changes the value.
- Kernel blocking writes and published nonblocking updates bump the counters through `ProbeRefs`, once per counter per write.
- An observer is active when its values or its counters differ from the last snapshot (`RuntimeCombObserver::occurrence_counters`).

**Batch path.** A design with counted signals but no processes now stays on the batch step (`ScheduleModel::timed` is `!processes.is_empty()`). `batch_round` checks the counters after each evaluation and adds their domains to the approved edges. The first version moved such designs to the timed path, which cost 17.8% on the divided-clock design below; this costs 7.0%.

**Observer snapshots.** `comb_activation::ObserverReads` resolves the reads once. A range of a signal of at most 64 bits is read as a `u64` (with its mask plane in four-state), and only wider signals use `BigUint`. Groups are numbered densely, so the activation check is O(observers). The old check read every range as `BigUint`.

## Perf

callgrind instructions inside `SimulationState::step_until`, native backend (cranelift matches). Each design has 64 `always_ff` registers, each writing a default and then overriding it.

| design | base | this PR | change |
|---|---|---|---|
| plain | 115.60M | 115.82M | +0.19% |
| divider: an FF writes a derived clock twice per edge, a second FF counts on it | 155.24M | 166.06M | +7.0% |
| assert: plus 64 `always_comb` immediate assertions | 319.35M | 51.24M | −84% |

- **plain:** the JIT code's cost is identical (9,100,455 in both). The difference comes from inlining in the Rust runtime. A const-generic split and an out-of-line counter check both measured worse (+0.67%, +0.33%).
- **divider:** the counter check that correctness requires. Setting trigger bits from the JIT would remove most of it, but that is a larger change.
- **assert:** the word reads replace `BigUint` snapshots. With `BigUint` counter reads this design was +50%.

## Validation

- New `crates/celox/tests/sv_update_events.rs`: 9 cases on the interpreter, cranelift, native and wasm backends (36 tests). They cover:
  - blocking, process-NBA and FF-NBA restores running `always_comb` again;
  - assertions reporting again;
  - FF NBA and blocking pulses waking `@(a)` and `@(posedge a)`;
  - no event when the value is kept;
  - exclusive branches as one event;
  - an FF pulse firing a domain in a design without processes.
- Cross-checked the expected values against Icarus 13.0.
- `cargo nextest run` on celox, celox-frontend-{core,sv,veryl}, celox-runtime, celox-design, celox-slt, celox-test-suite, celox-vpi and celox-napi with CI's features (`celox/systemverilog,celox-test-suite/verilator,celox-test-suite/icarus`): 14,020 passed, 330 skipped.
- sv-tests conformance (`conformance/sv-tests/run.py`): unchanged from `expected.tsv`.
- `cargo clippy --workspace --all-targets` with CI's features and `-D warnings`, `cargo fmt --check`.

Not covered:
- Veryl observers get no sensitivity counters.
- Targets with both blocking and nonblocking writers (`NbaStage`) are not instrumented.
- Host writes do not bump counters.

## BREAKING CHANGE

New public fields:
- `celox_slt::CombObserver::sensitivity_counters`
- `celox_design::RuntimeCombObserver::occurrence_counters` (serde default: empty)
- `celox_design::RuntimeSchema::occurrence_probes`
- `celox_design::schedule::ScheduleModel::probes`

`ScheduleModel::timed` no longer counts counted signals.

Change-Id: I3c9de5c5bc7e26c31765c9a6d45a9e04287eabaf
Change-Id: Ieb4eecbfe1dd50186a513da2a12cd3147ad7d428
@mergify mergify Bot closed this Oct 22, 2026
@mergify
mergify Bot deleted the mergify/merge-queue/8b9bd31966 branch October 22, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant