Skip to content

feat(sv): support class enum randomization - #1838

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-enum-randomization/support-class-enum-randomization--076dfe02
Oct 24, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-enum-randomization/support-class-enum-randomization--076dfe02

Conversation

@tignear

@tignear tignear commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Allow rand enum properties and randomize(member) selection of enum properties
in unconstrained classes. Preserve declared enum domains through type aliases
and select only their declared values with rejection sampling, including sparse,
negative, implicit, singleton, and 64-bit values. Normalize unbased fill
initializers to the enum base width and signedness before evaluation. Keep rand_mode, inherited
properties, dynamic dispatch, and per-object seeding behavior intact.

Keep unsupported or unresolved enum domains explicit rather than randomizing
the underlying integer. Reject duplicate values, overflowing implicit values,
and X/Z domains. Scope randomization of enums, arrays, and class properties
wider than 64 bits remain outside this change.

Add four shared regression cases and an analyzer rejection test; update the
English and Japanese references. Retain narrow external-tool failure evidence:
Verilator 5.052 passes the direct enum, inheritance, and unbased fill cases but randomizes an
enum typedef alias as raw integer bits. Icarus 13.0 cannot elaborate class
randomization methods in these four cases. Shared assertions are unchanged.

Validation:

  • Analyzer unit tests: 796 passed, 3 existing ignores.
  • Differential SystemVerilog class suite across backends: 179 passed.
  • Retained external evidence checks: 3 passed.
  • NAPI build and JavaScript integration: 432 passed.
  • Analyzer Clippy, formatting, and diff checks pass.
  • Unbased fill regression: all five backend variants fail before the fix and
    pass afterward; Verilator also passes the unchanged assertions.
  • All four new shared cases exercised with Verilator and Icarus; the limitations
    above are documented with original diagnostics in verification/repros.

@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 🔄 Running since 2026-10-24T08:42:58.785397Z b9d5870 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: 0fe51fe6a4

ℹ️ 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 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-enum-randomization/support-class-enum-randomization--076dfe02 branch from 0fe51fe to c2abf1b Compare October 24, 2026 02:38
@tignear

tignear commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 0fe51fe 2026-10-24 02:37 UTC
2 content 0fe51fe → c2abf1b Fix P2: normalize enum unbased fill initializers to the base width and signedness before collecting randomization values. Add a shared regression for 4-bit, 64-bit, signed '1 and '0; reproduce five f… 2026-10-24 02:37 UTC
3 rebase c2abf1b → 11faea3 (rebase only) 2026-10-24 03:52 UTC
4 content 11faea3 → 37ec478 Resolve limitations.json append conflict after #1816 merged, preserving both timing and enum limitation records; implementation patch unchanged. 2026-10-24 05:41 UTC
5 content 37ec478 → b9d5870 Resolve renewed master conflict that dequeued #1838 and its dependent #1847 2026-10-24 08:41 UTC

@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 24, 2026
@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 24 minutes 8 seconds in the queue, with no time running CI.

Reason

The pull request #1838 has been manually updated

Waiting for
  • check-success = Queue validation
  • any of: [🛡 GitHub repository ruleset rule master]
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
    • check-success = @github-actions/Rust Test & NAPI Build
  • any of: [🛡 GitHub repository ruleset rule master]
    • check-neutral = @github-actions/JS Test (Windows)
    • check-skipped = @github-actions/JS Test (Windows)
    • check-success = @github-actions/JS Test (Windows)
All conditions
  • check-success = Queue validation
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
    • check-success = @github-actions/Rust Test & NAPI Build
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-neutral = @github-actions/JS Test (Windows)
    • check-skipped = @github-actions/JS Test (Windows)
    • check-success = @github-actions/JS Test (Windows)
  • check-success = Conventional Commit title
  • 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/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/Conventional Commit title
    • check-neutral = @github-actions/Conventional Commit title
    • check-skipped = @github-actions/Conventional Commit title

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

@tignear
tignear force-pushed the stack/tignear/feat/sv-enum-randomization/support-class-enum-randomization--076dfe02 branch from c2abf1b to 11faea3 Compare October 24, 2026 03:54
@tignear

tignear commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 feat(sv): support class enum randomization #1838 👈
2 feat(sv)!: support scope enum randomization #1847

@mergify

mergify Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-24 04:59 UTC · Rule: changes · triggered by rule Queue explicitly requested merges
  • 🚫 Left the queue — 2026-10-24 05:21 UTC · at 11faea31c94bb0fa471e6d84dc9e90c293fc7db2

This pull request spent 22 minutes 11 seconds in the queue, with no time running CI.

Reason

The pull request conflicts with the base branch

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

@mergify mergify Bot added dequeued Mergify stopped this queue entry; investigate before retrying and removed queued Mergify queue entry labels Oct 24, 2026
@tignear
tignear force-pushed the stack/tignear/feat/sv-enum-randomization/support-class-enum-randomization--076dfe02 branch from 11faea3 to 37ec478 Compare October 24, 2026 05:44
@tignear tignear removed the dequeued Mergify stopped this queue entry; investigate before retrying label Oct 24, 2026
@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

  • ✅ Entered queue — 2026-10-24 06:57 UTC · Rule: changes · triggered by rule Queue explicitly requested merges
  • 🚫 Left the queue — 2026-10-24 07:31 UTC · at 37ec478030f2c7921687cbae4b5e6aef4427f7c8

This pull request spent 34 minutes 27 seconds in the queue, with no time running CI.

Reason

The pull request conflicts with the base branch

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

@mergify mergify Bot added dequeued Mergify stopped this queue entry; investigate before retrying and removed queued Mergify queue entry labels Oct 24, 2026
Allow rand enum properties and randomize(member) selection of enum properties
in unconstrained classes. Preserve declared enum domains through type aliases
and select only their declared values with rejection sampling, including sparse,
negative, implicit, singleton, and 64-bit values. Normalize unbased fill
initializers to the enum base width and signedness before evaluation. Keep rand_mode, inherited
properties, dynamic dispatch, and per-object seeding behavior intact.

Keep unsupported or unresolved enum domains explicit rather than randomizing
the underlying integer. Reject duplicate values, overflowing implicit values,
and X/Z domains. Scope randomization of enums, arrays, and class properties
wider than 64 bits remain outside this change.

Add four shared regression cases and an analyzer rejection test; update the
English and Japanese references. Retain narrow external-tool failure evidence:
Verilator 5.052 passes the direct enum, inheritance, and unbased fill cases but randomizes an
enum typedef alias as raw integer bits. Icarus 13.0 cannot elaborate class
randomization methods in these four cases. Shared assertions are unchanged.

Validation:
- Analyzer unit tests: 796 passed, 3 existing ignores.
- Differential SystemVerilog class suite across backends: 179 passed.
- Retained external evidence checks: 3 passed.
- NAPI build and JavaScript integration: 432 passed.
- Analyzer Clippy, formatting, and diff checks pass.
- Unbased fill regression: all five backend variants fail before the fix and
  pass afterward; Verilator also passes the unchanged assertions.
- All four new shared cases exercised with Verilator and Icarus; the limitations
  above are documented with original diagnostics in verification/repros.

Change-Id: I076dfe023e39722af4f294144ffae2c202085d52
@tignear
tignear force-pushed the stack/tignear/feat/sv-enum-randomization/support-class-enum-randomization--076dfe02 branch from 37ec478 to b9d5870 Compare October 24, 2026 08:42
@tignear tignear removed the dequeued Mergify stopped this queue entry; investigate before retrying label Oct 24, 2026
@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 3 hours 1 minute 47 seconds in the queue, including 3 hours 13 seconds running CI.

Reason

The merge conditions cannot be satisfied: the checks did not pass within the checks timeout of 3 hours

These checks were still running:

  • Conventional Commit title
  • @github-actions/Conventional Commit title

Failing checks:

Hint

You may have to fix your CI before adding the pull request to the queue again.

If you update this pull request, to fix the CI, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Waiting for
  • check-success = Conventional Commit title
  • any of: [🛡 GitHub repository ruleset rule master]
    • check-neutral = @github-actions/Conventional Commit title
    • check-skipped = @github-actions/Conventional Commit title
    • check-success = @github-actions/Conventional Commit title
All conditions
  • check-success = Conventional Commit title
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-neutral = @github-actions/Conventional Commit title
    • check-skipped = @github-actions/Conventional Commit title
    • check-success = @github-actions/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)

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

@mergify mergify Bot added dequeued Mergify stopped this queue entry; investigate before retrying and removed queued Mergify queue entry labels Oct 24, 2026
@tignear tignear removed the dequeued Mergify stopped this queue entry; investigate before retrying label Oct 24, 2026
@mergify mergify Bot added the dequeued Mergify stopped this queue entry; investigate before retrying 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 20 minutes 42 seconds in the queue, including 1 hour 52 seconds running CI.

Required conditions to merge

@tignear tignear removed the dequeued Mergify stopped this queue entry; investigate before retrying label Oct 24, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 24, 2026
@mergify
mergify Bot merged commit f11d460 into master Oct 24, 2026
30 checks passed
@mergify
mergify Bot deleted the stack/tignear/feat/sv-enum-randomization/support-class-enum-randomization--076dfe02 branch October 24, 2026 16:19
@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