Skip to content

fix(sv): preserve fixed selector bits in case coverage - #2275

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/sv-case-selector-coverage/preserve-fixed-selector-bits-case-coverage--9a163ef5
Oct 27, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/sv-case-selector-coverage/preserve-fixed-selector-bits-case-coverage--9a163ef5

Conversation

@tignear

@tignear tignear commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

An exhaustive ordinary case on {b, 1'bx}, with b declared bit and labels
2'b0x and 2'b1x, was rejected as an inferred latch. Coverage enumerated the
selector's full four-state domain and included values that its fixed X bit
could never produce.

Track possible bit values through constants, concatenations, slices, captures
and identity operations, preserving the distinction between two-state inputs
and four-state logic. Filter the existing bounded enumeration with these
constraints. Leave opaque expressions conservative and bound each bit query;
real incomplete cases and X/Z mismatches still produce latch diagnostics.
No diagnostic policy or optimization settings are relaxed.

Validation: all 5935 SV tests, 10 frontend unit tests, 54 suite tests,
affected-crate clippy and formatting pass. After updating to master 4616658,
all 12 focused regressions, frontend unit tests, clippy and formatting pass.
Shared regressions exercise all five compiled backend variants; the original
example also runs in both state modes, including logic storage in two-state
mode. Icarus passes both shared four-state cases. Verilator reports its existing
four-state capability limit. Existing ignored tests, exclusions and retained
verification baselines remain unchanged.

An exhaustive ordinary case on {b, 1'bx}, with b declared bit and labels
2'b0x and 2'b1x, was rejected as an inferred latch. Coverage enumerated the
selector's full four-state domain and included values that its fixed X bit
could never produce.

Track possible bit values through constants, concatenations, slices, captures
and identity operations, preserving the distinction between two-state inputs
and four-state logic. Filter the existing bounded enumeration with these
constraints. Leave opaque expressions conservative and bound each bit query;
real incomplete cases and X/Z mismatches still produce latch diagnostics.
No diagnostic policy or optimization settings are relaxed.

Validation: all 5935 SV tests, 10 frontend unit tests, 54 suite tests,
affected-crate clippy and formatting pass. After updating to master 4616658,
all 12 focused regressions, frontend unit tests, clippy and formatting pass.
Shared regressions exercise all five compiled backend variants; the original
example also runs in both state modes, including logic storage in two-state
mode. Icarus passes both shared four-state cases. Verilator reports its existing
four-state capability limit. Existing ignored tests, exclusions and retained
verification baselines remain unchanged.

Change-Id: I9a163ef5eb4a6a28a033e9bd955bb351ba3abf15
@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 🔄 Running since 2026-10-27T13:06:12.862479Z 477a173 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.

@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 27, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 27, 2026
@mergify

mergify Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

✅ Merged into master as 4ec425d at 13:38 UTC

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

So far

Merge conditions: 7 of 7 met

The batch, tested on draft #2279

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 4ec425d into master Oct 27, 2026
24 checks passed
@mergify
mergify Bot deleted the stack/tignear/fix/sv-case-selector-coverage/preserve-fixed-selector-bits-case-coverage--9a163ef5 branch October 27, 2026 13:38
@mergify mergify Bot removed the queued Mergify queue entry label Oct 27, 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