Skip to content

perf(native): specialize wiring-only clock updates - #2420

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/perf/veryl-testbench-execution/specialize-wiring-only-clock-updates--72879e7a
Oct 28, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/perf/veryl-testbench-execution/specialize-wiring-only-clock-updates--72879e7a

Conversation

@tignear

@tignear tignear commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Moving a clock through child-port aliases currently requests a full combinational evaluation even when the clock level only feeds wiring. Compile a small update function for such clocks and use it before edge execution, including coincident edges and tiered native execution. Preserve the original stores and trigger bookkeeping, and retain the full-settle fallback for data-dependent clocks, four-state execution, force support, observers, and persistent combinational state.

Prove that every clock consumer is an unconditional alias copy outside CFG cycles; unrelated procedural iteration does not disqualify the clock. Optional named native-image exports allow existing images to retain their original execution path without a container-format change.

Rica kernel-user native TB, 16 replays, O2/two-state/one thread, four alternating pairs on this machine: median execution CPU time 29.38s -> 17.40s (41% lower), wall time 31.76s -> 18.56s, and instructions 284.49B -> 158.75B (44% fewer). Both sides load the same generated code and layout; renaming the optional exports selects the full-settle baseline. Every replay retained 231,188 cycles and 66,472 retired instructions. These measurements compare this optimization, not Veryl simulator performance.

Validation: formatting and Clippy; 170 Celox unit tests; 81 runtime tests; 4,440 common native cases including four-state and parallel variants; five specialization regressions (image roundtrip, trigger bits, dirty inputs, coincident clocks, unrelated procedural loops); native TB comparisons (98 passed, one ignored), completion adapters and tiered promotion tests. Existing images without the optional exports also pass their load-and-execute regression.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T12:31:49.803629Z 4e121f0 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 28, 2026
@tignear

tignear commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial eae4020 2026-10-28 11:29 UTC
2 content eae4020 → 45fd807 Update the NAPI inactive-edge regression for wiring-only clock projection: copied aliases now remain settled, while non-wiring consumers and pre-existing dirty state still require settling. 2026-10-28 11:29 UTC
3 rebase 45fd807 → 4e121f0 (rebase only) 2026-10-28 12:25 UTC

@tignear
tignear force-pushed the stack/tignear/perf/veryl-testbench-execution/specialize-wiring-only-clock-updates--72879e7a branch from eae4020 to 45fd807 Compare October 28, 2026 11:30
@mergify mergify Bot added the queued Mergify queue entry label Oct 28, 2026
@mergify

mergify Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

🚫 Left the queue

7 min in the queue, with no time running CI.

So far

Reason

The pull request #2420 has been manually updated

Merge conditions: 0 of 7 met

The batch, tested on draft #2443

Condition Required by
❌ check-success = Conventional Commit title —
❌ check-success = Queue validation —
❌ any of: check-neutral = @github-actions/Lint & Format, check-skipped = @github-actions/Lint & Format, check-success = @github-actions/Lint & Format GitHub repository ruleset rule master
❌ any of: check-neutral = @github-actions/Rust Test & NAPI Build, check-skipped = @github-actions/Rust Test & NAPI Build, check-success = @github-actions/Rust Test & NAPI Build GitHub repository ruleset rule master
❌ any of: check-neutral = @github-actions/JS Test (Ubuntu), check-skipped = @github-actions/JS Test (Ubuntu), check-success = @github-actions/JS Test (Ubuntu) GitHub repository ruleset rule master
❌ any of: check-neutral = @github-actions/Conventional Commit title, check-skipped = @github-actions/Conventional Commit title, check-success = @github-actions/Conventional Commit title GitHub repository ruleset rule master
❌ any of: check-neutral = @github-actions/Queue validation, check-skipped = @github-actions/Queue validation, check-success = @github-actions/Queue validation GitHub repository ruleset rule master

Requeued — the merge queue status continues in this comment ↓.

Times in UTC · dashboard · how the merge queue works

@mergify mergify Bot mentioned this pull request Oct 28, 2026
20 of 55 tasks
Moving a clock through child-port aliases currently requests a full combinational evaluation even when the clock level only feeds wiring. Compile a small update function for such clocks and use it before edge execution, including coincident edges and tiered native execution. Preserve the original stores and trigger bookkeeping, and retain the full-settle fallback for data-dependent clocks, four-state execution, force support, observers, and persistent combinational state.

Prove that every clock consumer is an unconditional alias copy outside CFG cycles; unrelated procedural iteration does not disqualify the clock. Optional named native-image exports allow existing images to retain their original execution path without a container-format change.

Rica kernel-user native TB, 16 replays, O2/two-state/one thread, four alternating pairs on this machine: median execution CPU time 29.38s -> 17.40s (41% lower), wall time 31.76s -> 18.56s, and instructions 284.49B -> 158.75B (44% fewer). Both sides load the same generated code and layout; renaming the optional exports selects the full-settle baseline. Every replay retained 231,188 cycles and 66,472 retired instructions. These measurements compare this optimization, not Veryl simulator performance.

Validation: formatting and Clippy; 170 Celox unit tests; 81 runtime tests; 4,440 common native cases including four-state and parallel variants; five specialization regressions (image roundtrip, trigger bits, dirty inputs, coincident clocks, unrelated procedural loops); native TB comparisons (98 passed, one ignored), completion adapters and tiered promotion tests. Existing images without the optional exports also pass their load-and-execute regression.
Change-Id: I72879e7a9f0e8e644083c796eb009d0476dbdc8f
@tignear
tignear force-pushed the stack/tignear/perf/veryl-testbench-execution/specialize-wiring-only-clock-updates--72879e7a branch from 45fd807 to 4e121f0 Compare October 28, 2026 12:29
@tignear

tignear commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 perf(native): specialize wiring-only clock updates #2420 👈
2 perf(testbench): replace the expression VM with native code #2444
3 perf(testbench): compile resumable Veryl testbench processes #2445

@mergify mergify Bot added queued Mergify queue entry and removed queued Mergify queue entry labels Oct 28, 2026
@mergify

mergify Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

✅ Merged into master as 320e8bf at 14:52 UTC

1 h 14 min in the queue, 1 h 12 min of it CI.

So far

Merge conditions: 7 of 7 met

The batch, tested on draft #2451

Condition Required by
✅ check-success = Conventional Commit title —
✅ check-success = Queue validation —
✅ any of: check-success = @github-actions/Lint & Format, check-neutral = @github-actions/Lint & Format, check-skipped = @github-actions/Lint & Format GitHub repository ruleset rule master
✅ any of: check-success = @github-actions/Rust Test & NAPI Build, check-neutral = @github-actions/Rust Test & NAPI Build, check-skipped = @github-actions/Rust Test & NAPI Build GitHub repository ruleset rule master
✅ any of: check-success = @github-actions/JS Test (Ubuntu), check-neutral = @github-actions/JS Test (Ubuntu), check-skipped = @github-actions/JS Test (Ubuntu) GitHub repository ruleset rule master
✅ any of: check-success = @github-actions/Conventional Commit title, check-neutral = @github-actions/Conventional Commit title, check-skipped = @github-actions/Conventional Commit title GitHub repository ruleset rule master
✅ any of: check-success = @github-actions/Queue validation, check-neutral = @github-actions/Queue validation, check-skipped = @github-actions/Queue validation GitHub repository ruleset rule master

Times in UTC · dashboard · how the merge queue works

@mergify
mergify Bot merged commit 320e8bf into master Oct 28, 2026
23 checks passed
@mergify
mergify Bot deleted the stack/tignear/perf/veryl-testbench-execution/specialize-wiring-only-clock-updates--72879e7a branch October 28, 2026 14:52
@mergify mergify Bot removed the queued Mergify queue entry label Oct 28, 2026
@github-actions github-actions Bot mentioned this pull request Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-ready Request merging through Mergify after required checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant