Skip to content

fix(sv): return typed defaults for invalid unpacked array reads - #1977

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/sv-conditional-range/return-typed-defaults-invalid-unpacked-array-reads--b6ba45ac
Oct 25, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/sv-conditional-range/return-typed-defaults-invalid-unpacked-array-reads--b6ba45ac

Conversation

@tignear

@tignear tignear commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Generated pipelines such as r[n] <= n == 0 ? d : r[n-1] rejected r[-1]
in the unselected conditional operand. Route constant invalid integral
unpacked indices through the existing bounds guard and fold invalid reads
to the selected type's X or zero default. Invalid writes remain no-ops.

Exclude wholly invalid constant writes from FF target collection before
recording pending-state or latch-coverage targets. An empty constant range
must not become a dynamic whole-array write and trigger an inferred latch.
Update the large-index diagnostic regression to require successful builds
without warnings under both error and warn policies.

Preserve both conditional operands' width and signedness, as required by
IEEE 1800-2023 7.4.5 and 11.4.11. Cover nonzero ascending/descending bounds,
multidimensional indices, sequential writes, 129-bit defaults and two-state
elements in a four-state simulator. Replace obsolete rejection expectations.

Keep the invalid bit-array read regression in Celox's API tests because
Icarus 13.0 returns X instead of the required zero for that case.

Validation on master feba1a5 with the preceding Native fix:

  • Full SystemVerilog suite: 5,003 passed across five backends, with 20
    existing exclusions; all 29 added regression variants passed.
  • SV analyzer: 806 passed, three existing ignored, plus both doctests.
  • Clippy for celox-sv-analyzer and celox, including the SV tests, passed.

The unchanged shared cases passed Icarus during validation on master
644beac. Verilator passed the two-state pipeline; the four-state cases
remain unsupported by that adapter. The external adapters are unchanged.

Rebuilt NAPI: the threads E2E and all three runtime-event addon tests passed.
Workspace check (excluding lydite-celox), formatting, lint and submodule
checks passed.

After restacking on the typed Native merge dispatch, all 12 added Native
regression variants and rebuilt NAPI integration checks passed. The threads
E2E initially exceeded its 5s limit while builds ran concurrently; an
isolated rerun passed with the same 5s limit. All three addon event tests
also passed.

CI follow-up: the old diagnostic regression expected a range error. Its
replacement exposed and now covers the false latch diagnostic above.
Validation: all 5,003 SV cases, all 33 diagnostic-policy tests, six frontend
unit tests, and clippy for both affected crates/consumers passed.

Depends-On: #1976

@tignear

tignear commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 fix(native): retain FF publication from other lane tasks #1976
2 fix(sv): return typed defaults for invalid unpacked array reads #1977 👈

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 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-25T10:47:06.122369Z 13346c6 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 force-pushed the stack/tignear/fix/sv-conditional-range/retain-ff-publication-other-lane-tasks--14a726b2 branch from d12d7f2 to 58b7e66 Compare October 25, 2026 09:16
@tignear
tignear force-pushed the stack/tignear/fix/sv-conditional-range/return-typed-defaults-invalid-unpacked-array-reads--b6ba45ac branch from 4d14885 to 55b4c4f Compare October 25, 2026 09:16
@tignear

tignear commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 4d14885 2026-10-25 09:14 UTC
2 rebase 4d14885 → 55b4c4f (rebase only) Restack on the Native merge-kind correction in #1976; the SV read-default implementation is unchanged. 2026-10-25 09:14 UTC
3 content 55b4c4f → 13346c6 Update the diagnostic-mask regression that still expected constant invalid unpacked writes to be rejected; verify successful elaboration without inferred-latch diagnostics under error and warn polici… 2026-10-25 10:44 UTC

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

tignear commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

🛑 Queue command has been cancelled

Generated pipelines such as r[n] <= n == 0 ? d : r[n-1] rejected r[-1]
in the unselected conditional operand. Route constant invalid integral
unpacked indices through the existing bounds guard and fold invalid reads
to the selected type's X or zero default. Invalid writes remain no-ops.

Exclude wholly invalid constant writes from FF target collection before
recording pending-state or latch-coverage targets. An empty constant range
must not become a dynamic whole-array write and trigger an inferred latch.
Update the large-index diagnostic regression to require successful builds
without warnings under both error and warn policies.

Preserve both conditional operands' width and signedness, as required by
IEEE 1800-2023 7.4.5 and 11.4.11. Cover nonzero ascending/descending bounds,
multidimensional indices, sequential writes, 129-bit defaults and two-state
elements in a four-state simulator. Replace obsolete rejection expectations.

Keep the invalid bit-array read regression in Celox's API tests because
Icarus 13.0 returns X instead of the required zero for that case.

Validation on master feba1a5 with the preceding Native fix:
- Full SystemVerilog suite: 5,003 passed across five backends, with 20
  existing exclusions; all 29 added regression variants passed.
- SV analyzer: 806 passed, three existing ignored, plus both doctests.
- Clippy for celox-sv-analyzer and celox, including the SV tests, passed.

The unchanged shared cases passed Icarus during validation on master
644beac. Verilator passed the two-state pipeline; the four-state cases
remain unsupported by that adapter. The external adapters are unchanged.

Rebuilt NAPI: the threads E2E and all three runtime-event addon tests passed.
Workspace check (excluding lydite-celox), formatting, lint and submodule
checks passed.

After restacking on the typed Native merge dispatch, all 12 added Native
regression variants and rebuilt NAPI integration checks passed. The threads
E2E initially exceeded its 5s limit while builds ran concurrently; an
isolated rerun passed with the same 5s limit. All three addon event tests
also passed.

CI follow-up: the old diagnostic regression expected a range error. Its
replacement exposed and now covers the false latch diagnostic above.
Validation: all 5,003 SV cases, all 33 diagnostic-policy tests, six frontend
unit tests, and clippy for both affected crates/consumers passed.

Change-Id: Ib6ba45acc50166a08cbb7851d3efaa20c89de081
@tignear
tignear force-pushed the stack/tignear/fix/sv-conditional-range/return-typed-defaults-invalid-unpacked-array-reads--b6ba45ac branch from 55b4c4f to 13346c6 Compare October 25, 2026 10:45
@mergify

mergify Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

queue

🛑 The queue request has been cancelled: new commits were pushed

Details

@tignear pushed to this pull request after queue was requested. Review the new commits and request it again.

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

mergify Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 32 minutes 41 seconds in the queue, including 27 minutes 9 seconds running CI.

Required conditions to merge

Base automatically changed from stack/tignear/fix/sv-conditional-range/retain-ff-publication-other-lane-tasks--14a726b2 to master October 25, 2026 11:23
@mergify
mergify Bot merged commit 7d442ff into master Oct 25, 2026
25 checks passed
@mergify
mergify Bot deleted the stack/tignear/fix/sv-conditional-range/return-typed-defaults-invalid-unpacked-array-reads--b6ba45ac branch October 25, 2026 11:52
@mergify mergify Bot removed the queued Mergify queue entry label Oct 25, 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