Skip to content

merge queue: checking #1814 on master (07999a2), stacked on #1764 - #1819

Closed
mergify[bot] wants to merge 6 commits into
masterfrom
mergify/merge-queue/f6dc72b7a4
Closed

mergify[bot] wants to merge 6 commits into
masterfrom
mergify/merge-queue/f6dc72b7a4

Conversation

@mergify

@mergify mergify Bot commented Oct 23, 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 living-tome-68hzgp of the dependencies queue, to test #1814 before it merges into master. Pushing to this branch or closing this pull request removes #1814 from the queue.

What this draft tests

Mergify checks that #1814 still passes CI once combined with everything queued ahead of it. CI runs on this draft's code, built in this order:

  1. master at 07999a2
  2. the pull request queued ahead of this batch, listed below, which brings the tip to f93b8c6
  3. #1814, the pull request of this batch

The 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 dependencies queue in the dashboard

What happens next

  • Once the pull requests ahead have merged, Mergify merges #1814 into master and closes this draft.
  • If a pull request ahead fails or leaves the queue without merging, this batch is requeued and checked again on a new draft: these checks assumed it would merge.

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 #1814. 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 ci
---
all_scopes: false
checking_base_sha: f93b8c62260e533393391974dcc8f8e69820294e
previous_check_retries: []
previous_failed_batches: []
pull_requests:
  - number: 1814
    scopes:
      - core
scopes:
  - core
...

1 scope
  • core
Required conditions of queue rule dependencies for merge
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • 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
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
    78913bb5fffa4848b716e2b30ed36764["living-tome-68hzgp<br/>#1814<br/>scopes: core"]
    225b5e0d88df4a198b932fd3e879e1ea["gentle-rosette-bf12gk<br/>#1773<br/>scopes: core"]
    78913bb5fffa4848b716e2b30ed36764 --> 225b5e0d88df4a198b932fd3e879e1ea
    style 78913bb5fffa4848b716e2b30ed36764 fill:#6366f1,color:#fff
Loading

tignear and others added 6 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
Change-Id: I6b69b80ad0a864ffc3a07bf10c20e6f64797d78c

# Conflicts:
#	crates/celox-frontend-core/src/symbolic/assembly.rs
#	crates/celox-frontend-core/src/watch.rs
@mergify mergify Bot closed this Oct 23, 2026
@mergify
mergify Bot deleted the mergify/merge-queue/f6dc72b7a4 branch October 23, 2026 10:37
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