Skip to content

feat(sv): support unpacked structures - #2415

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-uvm-unpacked-structs/support-unpacked-structures--9a94c0cc
Oct 28, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-uvm-unpacked-structs/support-unpacked-structures--9a94c0cc

Conversation

@tignear

@tignear tignear commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Unpacked structures (IEEE 1800-2023 7.2) were rejected. A variable of
an unpacked structure type is now a set of leaf variables, one per
member that is not itself an unpacked structure, named by the member
path (s.a.b). Each leaf keeps its member's type, so string, class
handle, enumeration and 2-state or 4-state integral members behave like
variables of those types, and the heap collector finds handle members
through their own slots. A whole structure value is the concatenation
of its leaves; it only lives within one evaluation.

Supported:

  • module variables, procedural locals, and subroutine arguments of any
    direction and results (a structure argument is passed flat and copied
    into and out of its members' variables);
  • member reads and writes, whole assignment (also continuous, in
    always_comb and nonblocking), ==, !=, ===, !==, ?:;
  • assignment patterns: positional, by member name, default (applied
    recursively to nested structures, 10.9.2) and typed T'{...}.

Only patterns and values of the same structure type may be assigned
(6.22.3); other operators, selects and casts of a whole structure are
rejected. Ports, nets, parameters, class properties, arrays and
container elements of an unpacked structure type, and members with
unpacked dimensions or default values, are rejected with dedicated
diagnostics; unpacked unions stay unsupported (#440).

The concatenation parts of an assignment target now take the raw bits
of the value, so a string member receives its handle instead of the
bytes of an integral value. sv-tests chapter-7/structures/unpacked/basic
now passes in both state modes. Icarus 13.0 does not support unpacked
structures, Verilator 5.052 misapplies a nested default, and xezim
0.11.3 shows four defects on the new cases; these are retained as
reviewed limitations and xezim review entries.

@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-28T22:37:55.094124Z 5760816 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: 4167642da2

ℹ️ 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 thread crates/celox-sv-analyzer/src/analyze.rs Resolved
@mergify

mergify Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

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

@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-unpacked-structs/support-unpacked-structures--9a94c0cc branch from 4167642 to a9fdc69 Compare October 28, 2026 09:24
@tignear

tignear commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 4167642 2026-10-28 09:24 UTC
2 content 4167642 → a9fdc69 Address review: module declaration initializers, results assigned through the function name, return values before inout copy-back, struct defaults of formals, one-time static initializers 2026-10-28 09:24 UTC
3 content a9fdc69 → 9f1d0a1 2026-10-28 10:10 UTC
4 content 9f1d0a1 → cf97c42 2026-10-28 12:46 UTC
5 content cf97c42 → 24785f2 2026-10-28 13:51 UTC
6 content 24785f2 → 31dd1c3 Rebased onto master after #2411 (ref arguments): output copy-out keeps the structure concat flag beside forwarded properties; ref formals of unpacked structure type are rejected. Review fixes: nested… 2026-10-28 16:16 UTC
7 content 31dd1c3 → 764af58 Rebased onto master after #2390, #2407, #2429 and #2444. Review fix: members of structure formals and results share the subroutine's lifetime (static tasks). The obsolete rejection of a static nested… 2026-10-28 18:14 UTC
8 content 764af58 → 5618438 2026-10-28 19:23 UTC
9 content 5618438 → 5760816 2026-10-28 22:32 UTC

@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 feat(sv): support unpacked structures #2415 👈
2 feat(sv): support class properties of unpacked structure type #2419
3 feat(sv): support unpacked structures as dynamic container elements #2422
4 feat(sv): support nested dynamic containers and class handle keys #2424
5 feat(sv): pass unpacked structures by reference #2473

@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: a9fdc69a44

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

@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-unpacked-structs/support-unpacked-structures--9a94c0cc branch from a9fdc69 to 9f1d0a1 Compare October 28, 2026 10:11

@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: 9f1d0a1a20

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

@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-unpacked-structs/support-unpacked-structures--9a94c0cc branch from 9f1d0a1 to cf97c42 Compare October 28, 2026 12:49

@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: cf97c42f40

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

@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-unpacked-structs/support-unpacked-structures--9a94c0cc branch from cf97c42 to 24785f2 Compare October 28, 2026 13:52

@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: 24785f259b

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

@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-unpacked-structs/support-unpacked-structures--9a94c0cc branch from 24785f2 to 31dd1c3 Compare October 28, 2026 16:17

@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: 31dd1c3940

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

@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-unpacked-structs/support-unpacked-structures--9a94c0cc branch from 31dd1c3 to 764af58 Compare October 28, 2026 18:15

@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.

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

@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-unpacked-structs/support-unpacked-structures--9a94c0cc branch from 764af58 to 5618438 Compare October 28, 2026 19:23
@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 28, 2026
@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

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

So far

  • ✅ Entered the queue Wed 28 Oct, 20:13 · rule changes · triggered by rule Queue explicitly requested merges
  • 🚫 Left the queue 20:56 · 5618438

Reason

The pull request conflicts with master

The pull request was held in the queue, conflicting with at least one of 2 pull requests ahead of it. The conflict became a base branch one after #2402 merged.

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 ↓.

Times in UTC · dashboard · how the merge queue works

@mergify mergify Bot added dequeued Mergify stopped this queue entry; investigate before retrying and removed queued Mergify queue entry labels Oct 28, 2026
Unpacked structures (IEEE 1800-2023 7.2) were rejected. A variable of
an unpacked structure type is now a set of leaf variables, one per
member that is not itself an unpacked structure, named by the member
path (`s.a.b`). Each leaf keeps its member's type, so `string`, class
handle, enumeration and 2-state or 4-state integral members behave like
variables of those types, and the heap collector finds handle members
through their own slots. A whole structure value is the concatenation
of its leaves; it only lives within one evaluation.

Supported:
- module variables, procedural locals, and subroutine arguments of any
  direction and results (a structure argument is passed flat and copied
  into and out of its members' variables);
- member reads and writes, whole assignment (also continuous, in
  `always_comb` and nonblocking), `==`, `!=`, `===`, `!==`, `?:`;
- assignment patterns: positional, by member name, `default` (applied
  recursively to nested structures, 10.9.2) and typed `T'{...}`.

Only patterns and values of the same structure type may be assigned
(6.22.3); other operators, selects and casts of a whole structure are
rejected. Ports, nets, parameters, class properties, arrays and
container elements of an unpacked structure type, and members with
unpacked dimensions or default values, are rejected with dedicated
diagnostics; unpacked unions stay unsupported (#440).

The concatenation parts of an assignment target now take the raw bits
of the value, so a string member receives its handle instead of the
bytes of an integral value. sv-tests chapter-7/structures/unpacked/basic
now passes in both state modes. Icarus 13.0 does not support unpacked
structures, Verilator 5.052 misapplies a nested `default`, and xezim
0.11.3 shows four defects on the new cases; these are retained as
reviewed limitations and xezim review entries.

Change-Id: I9a94c0cc4394766e17f949f72af405c2a3442b0f
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-unpacked-structs/support-unpacked-structures--9a94c0cc branch from 5618438 to 5760816 Compare October 28, 2026 22:32
@mergify mergify Bot removed the dequeued Mergify stopped this queue entry; investigate before retrying label Oct 28, 2026

@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: 5760816159

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

@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

✅ Merged into master as 86efe0a at 23:16 UTC

Merged together with #2419, #2422. 11 min in the queue, 9 min of it CI.

So far

Merge conditions: 9 of 9 met

This pull request

Condition
✅ depends-on=celox-sim/celox#2415
✅ depends-on=celox-sim/celox#2419

The batch, tested on draft #2495

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 86efe0a into master Oct 28, 2026
23 checks passed
@mergify
mergify Bot deleted the stack/tignear/feat/sv-uvm-unpacked-structs/support-unpacked-structures--9a94c0cc branch October 28, 2026 23:16
@mergify mergify Bot removed the queued Mergify queue entry label Oct 28, 2026
tignear added a commit that referenced this pull request Oct 29, 2026
… reads

Review findings on the unpacked structure stack (#2415, #2422, #2424)
that arrived after it merged:

- A `default` pattern item descends into a structure member unless the
  value is a structure of that member's type (IEEE 1800-2023 10.9.2), so
  `c = '{default: a}` initializes the nested members of `a`'s type
  instead of rejecting it.
- 4-state object fields store their complemented value and mask planes
  masked to the field width. Padding bits stay zero, so a default record
  of a field that is not byte-aligned (`logic flag`) is all zero bytes,
  and `finish_record` keeps it `null`: `d = new[1]; d[0] = d[0];` no
  longer wakes `@(d)`.
- `q.pop_front` and `q.pop_back` without parentheses are whole elements
  of a queue of structures.
- A `$` index of a queue read through a receiver with a side effect, such
  as `m[f()][$]`, is rejected: the size behind `$` reads the receiver
  again, which could name another queue.

Change-Id: Ibd97e9c73adb7703a0734ca9fcdedeb66c0a2189
@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