Skip to content

feat(sv): implement enumerated type methods - #2390

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-uvm-enum-methods/impl-enumerated-type-methods--cf20fb1b
Oct 28, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-uvm-enum-methods/impl-enumerated-type-methods--cf20fb1b

Conversation

@tignear

@tignear tignear commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Enum-typed expressions accept first, last, next(N), prev(N), num
and name (IEEE 1800-2023 6.19.5), with or without parentheses (6.19.5.7),
on variables, array and container elements, class properties, static
properties, function and method results, casts, enum constants and the
results of other enum methods.

Types now carry the members of an enumeration with their names, base
width, signedness and state count. The methods bind to a new
Callee::Lookup IR call that evaluates its selector once and returns the
value of the first key it matches by case equality, else a default; the
frontend lowers it to multiplexers whose selector copies share one node.
A receiver with side effects therefore runs once, and only designs that
call these methods pay for them.

next/prev wrap around and take the count modulo the number of
members; a value that is no member, including one with unknown bits,
gives the base type's default initial value ('x for a 4-state base,
Table 6-7). name returns the empty string for such a value (6.19.5.6).

@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-28T16:02:02.537617Z 936bdda 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: ed2b9d6f9d

ℹ️ 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-enum-methods/impl-enumerated-type-methods--cf20fb1b branch from ed2b9d6 to cd1394e Compare October 28, 2026 06:59
@tignear

tignear commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial ed2b9d6 2026-10-28 06:53 UTC
2 content ed2b9d6 → cd1394e Address Codex review: first/last/num evaluate the receiver once; package-qualified enum constants resolve their enumeration; name() results take string methods; runtime next/prev counts convert to in… 2026-10-28 06:53 UTC
3 rebase cd1394e → 0401272 (rebase only) 2026-10-28 07:36 UTC
4 content 0401272 → 5ffe2da 2026-10-28 08:30 UTC
5 content 5ffe2da → da515c5 2026-10-28 08:47 UTC
6 content da515c5 → 6cd2716 2026-10-28 09:00 UTC
7 content 6cd2716 → 5ebeb58 2026-10-28 09:20 UTC
8 content 5ebeb58 → 4d39d87 2026-10-28 11:04 UTC
9 content 4d39d87 → 0a02620 Rebased on #2322 and #2421: the built-in process::state type carries an enum_domain (FINISHED, RUNNING, WAITING, SUSPENDED, KILLED; 9.7) in place of enum_values; direct.rs keeps both the enum method … 2026-10-28 12:24 UTC
10 content 0a02620 → 9ee3c10 Enum methods apply to process::state values: status() of a process handle and the process::/std::process:: state constants (Codex r4400550547). 2026-10-28 13:23 UTC
11 content 9ee3c10 → 936bdda Rebased on #2411 (ref arguments): the ref equivalence check compares enum_domain (members, base shape) in place of enum_values, so only the same enumeration matches (6.22.2), with a regression; Calle… 2026-10-28 15:58 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: cd1394eb72

ℹ️ 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-enum-methods/impl-enumerated-type-methods--cf20fb1b branch from cd1394e to 0401272 Compare October 28, 2026 07:39
@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): implement enumerated type methods #2390 👈
2 feat(sv): initialize process static locals with run-time values #2407

@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: 0401272a9e

ℹ️ 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 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-enum-methods/impl-enumerated-type-methods--cf20fb1b branch from 0401272 to 5ffe2da Compare October 28, 2026 08:35

@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: 5ffe2dac00

ℹ️ 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-enum-methods/impl-enumerated-type-methods--cf20fb1b branch from 5ffe2da to da515c5 Compare October 28, 2026 08:51

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

ℹ️ 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-enum-methods/impl-enumerated-type-methods--cf20fb1b branch from da515c5 to 6cd2716 Compare October 28, 2026 09:02
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-enum-methods/impl-enumerated-type-methods--cf20fb1b branch from 6cd2716 to 5ebeb58 Compare October 28, 2026 09:20

@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: 5ebeb580ef

ℹ️ 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-enum-methods/impl-enumerated-type-methods--cf20fb1b branch from 5ebeb58 to 4d39d87 Compare October 28, 2026 11:05
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-enum-methods/impl-enumerated-type-methods--cf20fb1b branch from 4d39d87 to 0a02620 Compare October 28, 2026 12:25

@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: 0a02620edf

ℹ️ 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-enum-methods/impl-enumerated-type-methods--cf20fb1b branch from 0a02620 to 9ee3c10 Compare October 28, 2026 13:26
@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 · Lint & Format fails with this pull request

36 min in the queue, 25 min of it CI.

So far

The failure is in this pull request. When Mergify split its batch, it failed alone on top of master.

Reason

The merge conditions cannot be satisfied due to failing checks

  • Lint & Format

Failing checks:

To get back in the queue

  • Push a fix: the pull request is queued again once its queue conditions match.
  • If the failure is a flake, comment @mergifyio queue to queue it again as it is.
Merge conditions: 0 of 7 met

The batch, tested on draft #2457

Condition Required by
❌ check-success = Conventional Commit title —
❌ check-success = Queue validation —
❌ any of: check-neutral = @github-actions/Lint & Format, check-skipped = @github-actions/Lint & Format, check-success = @github-actions/Lint & Format GitHub repository ruleset rule master
❌ any of: check-neutral = @github-actions/Rust Test & NAPI Build, check-skipped = @github-actions/Rust Test & NAPI Build, check-success = @github-actions/Rust Test & NAPI Build GitHub repository ruleset rule master
❌ any of: check-neutral = @github-actions/JS Test (Ubuntu), check-skipped = @github-actions/JS Test (Ubuntu), check-success = @github-actions/JS Test (Ubuntu) GitHub repository ruleset rule master
❌ any of: check-neutral = @github-actions/Conventional Commit title, check-skipped = @github-actions/Conventional Commit title, check-success = @github-actions/Conventional Commit title GitHub repository ruleset rule master
❌ any of: check-neutral = @github-actions/Queue validation, check-skipped = @github-actions/Queue validation, check-success = @github-actions/Queue validation GitHub repository ruleset rule master

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
Enum-typed expressions accept `first`, `last`, `next(N)`, `prev(N)`, `num`
and `name` (IEEE 1800-2023 6.19.5), with or without parentheses (6.19.5.7),
on variables, array and container elements, class properties, static
properties, function and method results, casts, enum constants and the
results of other enum methods.

Types now carry the members of an enumeration with their names, base
width, signedness and state count. The methods bind to a new
`Callee::Lookup` IR call that evaluates its selector once and returns the
value of the first key it matches by case equality, else a default; the
frontend lowers it to multiplexers whose selector copies share one node.
A receiver with side effects therefore runs once, and only designs that
call these methods pay for them.

`next`/`prev` wrap around and take the count modulo the number of
members; a value that is no member, including one with unknown bits,
gives the base type's default initial value ('x for a 4-state base,
Table 6-7). `name` returns the empty string for such a value (6.19.5.6).

Change-Id: Icf20fb1bef13ec48958bd50e14f82790e72f516a
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-enum-methods/impl-enumerated-type-methods--cf20fb1b branch from 9ee3c10 to 936bdda Compare October 28, 2026 15:58
@mergify mergify Bot added queued Mergify queue entry and removed dequeued Mergify stopped this queue entry; investigate before retrying labels Oct 28, 2026
@mergify

mergify Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

✅ Merged into master as 29103c7 at 17:24 UTC

Merged together with #2407. 36 min in the queue, 10 min of it CI.

So far

Merge conditions: 8 of 8 met

This pull request

Condition
✅ depends-on=celox-sim/celox#2390

The batch, tested on draft #2468

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 29103c7 into master Oct 28, 2026
23 checks passed
@mergify
mergify Bot deleted the stack/tignear/feat/sv-uvm-enum-methods/impl-enumerated-type-methods--cf20fb1b branch October 28, 2026 17:24
@mergify mergify Bot removed the queued Mergify queue entry label Oct 28, 2026
@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