Skip to content

feat(sv): support soft packed unions - #1837

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-unions/support-soft-packed-unions--cba1d4eb
Oct 24, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-unions/support-soft-packed-unions--cba1d4eb

Conversation

@tignear

@tignear tignear commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Support union soft and union soft packed with differently sized integral members. Members share their least significant bits, storage uses the largest member width, and narrow writes preserve the upper bits. Retain hard packed unions' equal-width requirement.

Add shared regressions for nested overlays, partial blocking/nonblocking writes, signed package-qualified ports, mixed bit/logic members, and 130-bit four-state values. Document the supported subset and external simulator limitations; tagged and unpacked unions remain unsupported.

Validation: syntax tests (121 passed), analyzer tests (795 passed, 3 existing ignores), union integration tests across native/Cranelift/Wasm and parallel modes (26 passed), packed-struct regressions (54 passed), formatting and affected-crate/integration Clippy passed.

Verilator 5.052: 3 passing cases, 2 unsupported four-state cases. Icarus 13.0: 1 passing case, 3 soft-union syntax rejections, and 1 mixed-state read mismatch independently reproduced outside the harness. IEEE 1800-2023 7.3.1 requires conversion when reading a two-state union member; Icarus retains X. Assertions remain enabled with no exclusions. Retain the reviewed Icarus union evidence, including exact diagnostics, so full-suite/release validation accepts those known failures while rejecting changed diagnostics or new failures. The focused fresh report reproduces all four failures and passes the external-report gate with the retained evidence. The baseline regression asserts the exact four reviewed SV Icarus case IDs; all 273 repository script tests pass after adding the evidence.

Follow-up CI validation: update the Rust retained-report contract to validate the four executable Icarus failures by case, status, phase, diagnostic and absence of exclusions. All celox-test-suite tests with verilator/icarus features pass (78 passed, 12 existing ignores), including retained reports and doctests; focused Clippy and the nine JavaScript report tests pass.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 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-24T05:04:57.341614Z 84e50ef 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 45431e299a

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +10 to +13
Group {
file: "src/sv/cases/unions.vtest",
text: include_str!("unions.vtest"),
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Record the new Icarus failures in the reviewed verification baseline

Registering this group adds four known Icarus failures to every full external-suite run: three soft-union compilation errors and the mixed-state mismatch documented in LIMITATIONS.md. A repository-wide search of crates/celox-test-suite/verification finds no unions entries. In the inspected .github/workflows/ci.yml, the external-suite job invokes scripts/check-external-suite-report.mjs, which rejects failures without matching retained evidence; the release aggregate requires that job to succeed. Consequently, this change makes full validation fail and blocks release validation even though the Celox tests pass. Retain reviewed failure evidence for these new cases without weakening their assertions; this is a changed coverage contract, not a routine baseline refresh.

AGENTS.md reference: AGENTS.md:L28-L30

Useful? React with 👍 / 👎.

@mergify

mergify Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

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

@tignear
tignear force-pushed the stack/tignear/feat/sv-unions/support-soft-packed-unions--cba1d4eb branch from 45431e2 to c71bba5 Compare October 24, 2026 02:46
@tignear

tignear commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 45431e2 2026-10-24 02:46 UTC
2 content 45431e2 → c71bba5 Address P1: retain reviewed Icarus union failures so full-suite and release gates recognize exact known diagnostics. 2026-10-24 02:46 UTC
3 content c71bba5 → c65b0e3 Address P2: update the retained-baseline regression test to assert the four reviewed SV Icarus case IDs; rerun all repository script tests after the evidence change. 2026-10-24 03:14 UTC
4 content c65b0e3 → 84e50ef Fix CI retained_reports failure: explicitly validate the four executed Icarus union discrepancies instead of assuming every SV failure is excluded; validate the entire external-enabled test-suite cra… 2026-10-24 05:02 UTC

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c71bba52ee

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"icarus/timing.json",
"icarus/types.json"
"icarus/types.json",
"icarus/unions.json"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update the retained-baseline test for the new Icarus failures

Adding this shard introduces four retained SystemVerilog Icarus failures, but scripts/check-external-suite-report.test.mjs:274–276 still asserts that every SystemVerilog baseline has zero accepted failures. Running node --test scripts/check-external-suite-report.test.mjs now fails with 4 !== 0. Update that expectation alongside the retained evidence so the repository-script tests pass; .github/workflows/ci.yml runs this test through node --test scripts/*.test.mjs in its “Test repository scripts” step.

Useful? React with 👍 / 👎.

@tignear
tignear force-pushed the stack/tignear/feat/sv-unions/support-soft-packed-unions--cba1d4eb branch from c71bba5 to c65b0e3 Compare October 24, 2026 03:14
@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 24, 2026
Support `union soft` and `union soft packed` with differently sized integral members. Members share their least significant bits, storage uses the largest member width, and narrow writes preserve the upper bits. Retain hard packed unions' equal-width requirement.

Add shared regressions for nested overlays, partial blocking/nonblocking writes, signed package-qualified ports, mixed bit/logic members, and 130-bit four-state values. Document the supported subset and external simulator limitations; tagged and unpacked unions remain unsupported.

Validation: syntax tests (121 passed), analyzer tests (795 passed, 3 existing ignores), union integration tests across native/Cranelift/Wasm and parallel modes (26 passed), packed-struct regressions (54 passed), formatting and affected-crate/integration Clippy passed.

Verilator 5.052: 3 passing cases, 2 unsupported four-state cases. Icarus 13.0: 1 passing case, 3 soft-union syntax rejections, and 1 mixed-state read mismatch independently reproduced outside the harness. IEEE 1800-2023 7.3.1 requires conversion when reading a two-state union member; Icarus retains X. Assertions remain enabled with no exclusions. Retain the reviewed Icarus union evidence, including exact diagnostics, so full-suite/release validation accepts those known failures while rejecting changed diagnostics or new failures. The focused fresh report reproduces all four failures and passes the external-report gate with the retained evidence. The baseline regression asserts the exact four reviewed SV Icarus case IDs; all 273 repository script tests pass after adding the evidence.

Follow-up CI validation: update the Rust retained-report contract to validate the four executable Icarus failures by case, status, phase, diagnostic and absence of exclusions. All celox-test-suite tests with verilator/icarus features pass (78 passed, 12 existing ignores), including retained reports and doctests; focused Clippy and the nine JavaScript report tests pass.

Change-Id: Icba1d4eb64ecba665a391b04033473259f921029
@tignear
tignear force-pushed the stack/tignear/feat/sv-unions/support-soft-packed-unions--cba1d4eb branch from c65b0e3 to 84e50ef Compare October 24, 2026 05:03
@mergify mergify Bot added the queued Mergify queue entry label Oct 24, 2026
@mergify

mergify Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 1 hour 31 minutes 54 seconds in the queue, including 1 hour 30 minutes 13 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 4140441 into master Oct 24, 2026
31 checks passed
@mergify
mergify Bot deleted the stack/tignear/feat/sv-unions/support-soft-packed-unions--cba1d4eb branch October 24, 2026 07:31
@mergify mergify Bot removed the queued Mergify queue entry label Oct 24, 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