Skip to content

feat(simulator): support scalar floating-point arithmetic and formatting - #1666

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/scalar-floating-point/support-scalar-floating-point-arithmetic--e4380b73
Oct 21, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/scalar-floating-point/support-scalar-floating-point-arithmetic--e4380b73

Conversation

@tignear

@tignear tignear commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Add Veryl f32/f64 and SystemVerilog shortreal/real/realtime scalar execution across the interpreter, native, Cranelift, and Wasm backends. Preserve IEEE storage while applying numeric arithmetic, comparisons, precision changes, integer conversions through 64 bits, and SV conversion functions at assignments, ports, and subroutine boundaries.

Carry floating-point type metadata through runtime events and testbench arguments so display/write, assertion messages, and file output format numeric values with f/e/g, width, and precision. Include NAPI and browser helper integration and invalidate older native images with container version 22. The stale-load optimization exposed by combinational display capture was fixed in #1665, now included in master.

Validation:

  • Pinned official sv-tests, full release-driver runs before/after: 20 fail-to-pass rows across 10 cases, no regressions (2state 462 -> 472 passes; 4state 464 -> 474). Update only those reviewed expectations.
  • Full Celox common suite before the master update: 12,458 passed, no failures; known exclusions retained.
  • After integrating current master: 776 SV analyzer tests and 3,450 integration tests passed, covering SystemVerilog, FP display/assertions, native image roundtrip in a fresh process, shared JIT cache.
  • Affected Rust unit tests and clippy, formatting, Wasm target checks, NAPI rebuild, JS tests and TypeScript checks. Two JS tests timed out under concurrent build load and passed on focused reruns.
  • New portable cases exercised through Icarus and Verilator. Known external shortreal/port/format differences are documented in crates/celox-test-suite/LIMITATIONS.md; expected results and retained verification baselines are unchanged.

Veryl analyzer 0.22 mis-evaluates some FP constant expressions before lowering. Those reproductions retain their assertions with targeted ignores; default analyzer folding is preserved to avoid integer generate regressions. Runtime FP display/assertion tests remain enabled. Follow-up: #1657.

Reject real-valued select indices, including parameters and expressions, while preserving integral indices and explicit real-to-integer conversions. A driven-input regression covers the legality check masked by an unrelated undriven-net error in the pinned upstream negative case.

The symbolic bitvector bridge explicitly rejects FP operations rather than treating their payloads as integer arithmetic. The Python proof bridge also reports a typed unsupported result before proof execution. Six FP cases receive explicit reviewed proof-model exceptions, with zero reads and no proof artifacts; malformed IR and transport failures remain hard errors. The integer-folded FP case retains its assertions and receives a targeted known-failure entry for the existing Veryl bug #1657. Existing 771 coverage records were checked against the successful CI proof artifacts and preserved exactly; only the nine newly catalogued cases are added (including two aggregate cases from master). Targeted protocol and gate regressions are run locally; the full proof suite is not rerun locally.

Deferred: wide integer and aggregate numeric conversions (#1653), and direct native FP instruction emission in place of helper calls (#1654).

Refs #1401

@tignear

tignear commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 fix(sir-opt): preserve memory and type semantics when hoisting loads #1665
2 feat(simulator): support scalar floating-point arithmetic and formatting #1666 👈

@chatgpt-codex-connector

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 ⚠️ Failed 2026-10-20T23:42:53.854757Z
We couldn’t complete this review. Comment @codex review to try again.
b77550a PR opened
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 20, 2026
@tignear
tignear force-pushed the stack/tignear/feat/scalar-floating-point/support-scalar-floating-point-arithmetic--e4380b73 branch from b77550a to 770a753 Compare October 21, 2026 00:14
@tignear

tignear commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial b77550a 2026-10-21 00:13 UTC
2 content b77550a → 770a753 Measure the pinned official sv-tests suite, record the 20 reviewed fail-to-pass rows, and reject real-valued select indices exposed by checking negative-case coverage. 2026-10-21 00:13 UTC
3 content 770a753 → 1b4b94a Fix the Lydite CI bridge failure by explicitly classifying unsupported FP proof operations and recording the existing Veryl constant-folding limitation; preserve existing proof evidence and validate … 2026-10-21 02:58 UTC

@mergify mergify Bot added the queued Mergify queue entry label Oct 21, 2026
@mergify

mergify Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-21 01:20 UTC · Rule: changes · triggered by rule Queue explicitly requested merges
  • 🚫 Left the queue — 2026-10-21 02:35 UTC · at 770a75320eeb111f8a152a46b85568e8f4d957f4

This pull request spent 1 hour 14 minutes 45 seconds in the queue, with no time running CI.

Reason

The pull request conflicts with the base branch

Automatic conflict resolution can merge a conflict like this one instead of stopping on it, but only in a queue using the merge-batch or fast-forward merge method.

Hint

You should update or rebase your pull request.

If you want to requeue this pull request, you can post a @mergifyio queue comment.

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

Base automatically changed from stack/tignear/feat/scalar-floating-point/preserve-memory-type-semantics-hoisting-loads--c942e759 to master October 21, 2026 02:34
@mergify mergify Bot added dequeued Mergify stopped this queue entry; investigate before retrying and removed queued Mergify queue entry labels Oct 21, 2026
Add Veryl f32/f64 and SystemVerilog shortreal/real/realtime scalar execution across the interpreter, native, Cranelift, and Wasm backends. Preserve IEEE storage while applying numeric arithmetic, comparisons, precision changes, integer conversions through 64 bits, and SV conversion functions at assignments, ports, and subroutine boundaries.

Carry floating-point type metadata through runtime events and testbench arguments so display/write, assertion messages, and file output format numeric values with f/e/g, width, and precision. Include NAPI and browser helper integration and invalidate older native images with container version 22. The stale-load optimization exposed by combinational display capture was fixed in #1665, now included in master.

Validation:
- Pinned official sv-tests, full release-driver runs before/after: 20 fail-to-pass rows across 10 cases, no regressions (2state 462 -> 472 passes; 4state 464 -> 474). Update only those reviewed expectations.
- Full Celox common suite before the master update: 12,458 passed, no failures; known exclusions retained.
- After integrating current master: 776 SV analyzer tests and 3,450 integration tests passed, covering SystemVerilog, FP display/assertions, native image roundtrip in a fresh process, shared JIT cache.
- Affected Rust unit tests and clippy, formatting, Wasm target checks, NAPI rebuild, JS tests and TypeScript checks. Two JS tests timed out under concurrent build load and passed on focused reruns.
- New portable cases exercised through Icarus and Verilator. Known external shortreal/port/format differences are documented in crates/celox-test-suite/LIMITATIONS.md; expected results and retained verification baselines are unchanged.

Veryl analyzer 0.22 mis-evaluates some FP constant expressions before lowering. Those reproductions retain their assertions with targeted ignores; default analyzer folding is preserved to avoid integer generate regressions. Runtime FP display/assertion tests remain enabled. Follow-up: #1657.

Reject real-valued select indices, including parameters and expressions, while preserving integral indices and explicit real-to-integer conversions. A driven-input regression covers the legality check masked by an unrelated undriven-net error in the pinned upstream negative case.

The symbolic bitvector bridge explicitly rejects FP operations rather than treating their payloads as integer arithmetic. The Python proof bridge also reports a typed unsupported result before proof execution. Six FP cases receive explicit reviewed proof-model exceptions, with zero reads and no proof artifacts; malformed IR and transport failures remain hard errors. The integer-folded FP case retains its assertions and receives a targeted known-failure entry for the existing Veryl bug #1657. Existing 771 coverage records were checked against the successful CI proof artifacts and preserved exactly; only the nine newly catalogued cases are added (including two aggregate cases from master). Targeted protocol and gate regressions are run locally; the full proof suite is not rerun locally.

Deferred: wide integer and aggregate numeric conversions (#1653), and direct native FP instruction emission in place of helper calls (#1654).

Refs #1401

Change-Id: Ie4380b73114505db30ac122288d528b078d28a62
@tignear
tignear force-pushed the stack/tignear/feat/scalar-floating-point/support-scalar-floating-point-arithmetic--e4380b73 branch from 770a753 to 1b4b94a Compare October 21, 2026 02:58
@mergify mergify Bot added queued Mergify queue entry and removed dequeued Mergify stopped this queue entry; investigate before retrying labels Oct 21, 2026
@mergify

mergify Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-21 03:45 UTC · Rule: changes · triggered by rule Queue explicitly requested merges
  • ✅ Checks passed · on draft merge queue: checking #1666 on master (3078a32) #1680
  • ✅ Merged — 2026-10-21 04:53 UTC · at b5b491e3df7e6779156a43eb9262112d585a3c5d · merge

This pull request spent 1 hour 7 minutes 40 seconds in the queue, including 1 hour 5 minutes 53 seconds running CI.

Required conditions to 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

@mergify
mergify Bot merged commit b5b491e into master Oct 21, 2026
31 checks passed
@mergify
mergify Bot deleted the stack/tignear/feat/scalar-floating-point/support-scalar-floating-point-arithmetic--e4380b73 branch October 21, 2026 04:53
@mergify mergify Bot removed the queued Mergify queue entry label Oct 21, 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