Skip to content

feat(sv)!: support per-object constraint modes - #2271

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-constraint-modes/support-per-object-constraint-modes--becc00dc
Oct 27, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-constraint-modes/support-per-object-constraint-modes--becc00dc

Conversation

@tignear

@tignear tignear commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Implement IEEE 1800-2023 18.9 constraint_mode getters and void setters for
named blocks, plus the object-wide setter. All modes start enabled; aliases
share them and different objects do not. Preserve inherited block indices
when a derived constraint overrides the same name, so base-handle mode calls
control the effective block. Object-wide changes include dynamic subclasses.

Store constraint modes separately from temporary rand_mode selections. Apply
named-block modes after pre_randomize, leave inline predicates unconditional,
and preserve hook updates on failed solves. Include modes in object copies,
heap comparison and checkpoint restoration. Diagnose unknown blocks, invalid
getter/setter calls, builtin overrides and unsupported static/external blocks.

Add shared cases for modes, aliases, hooks, inheritance, dynamic dispatch and
inline/check-only solves, plus a checkpoint regression. Retain the observed
Icarus constraint-declaration limitation and Verilator bit-argument/override
mode discrepancies with IEEE clause references and exact failure evidence.
Package-base randomize dispatch remains the separate existing #1892 limitation;
mode calls across that boundary are covered without claiming that fix.

Validation: 400 class/backend tests; 847 analyzer tests (3 existing ignores)
and analyzer doctests; 27 heap tests; 4 retained-report tests; affected-crate
Clippy and formatting. Verilator passes the hook case and exposes three
reviewed disagreements; Icarus rejects the four constraint cases. The pinned
xezim executable is not installed locally, so that adapter was not run.
The upstream constraint_mode positive case uses UVM; expectations stay unchanged.

BREAKING CHANGE: serialized heap/checkpoint images contain persistent constraint
mode state; regenerate images produced by earlier builds.

Ordinary struct fields named constraint_mode retain normal member lookup, including nested fields and class-local structs. The shared regression passes all five backends, Verilator and Icarus; analyzer tests and clippy also pass.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 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-27T13:32:33.573771Z 904511f 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 added the merge-ready Request merging through Mergify after required checks label Oct 27, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 27, 2026
@mergify

mergify Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🚫 Left the queue

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

So far

  • ✅ Entered the queue Tue 27 Oct, 12:45 · rule changes · triggered by rule Queue explicitly requested merges
  • 🚫 Left the queue 12:47 · fcbf440

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

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 27, 2026
@tignear
tignear force-pushed the stack/tignear/feat/sv-constraint-modes/support-per-object-constraint-modes--becc00dc branch from fcbf440 to fb19450 Compare October 27, 2026 13:18
@tignear

tignear commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial fcbf440 2026-10-27 13:18 UTC
2 content fcbf440 → fb19450 Rebase onto master after container ordering merged; preserve constraint modes and container heap operations. 2026-10-27 13:18 UTC
3 content fb19450 → 904511f Address P2 review: leave ordinary constraint_mode struct fields to member binding, with nested and class-local regressions. 2026-10-27 13:29 UTC

@tignear tignear removed the dequeued Mergify stopped this queue entry; investigate before retrying label Oct 27, 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: fb19450a50

ℹ️ 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 removed the merge-ready Request merging through Mergify after required checks label Oct 27, 2026
Implement IEEE 1800-2023 18.9 constraint_mode getters and void setters for
named blocks, plus the object-wide setter. All modes start enabled; aliases
share them and different objects do not. Preserve inherited block indices
when a derived constraint overrides the same name, so base-handle mode calls
control the effective block. Object-wide changes include dynamic subclasses.

Store constraint modes separately from temporary rand_mode selections. Apply
named-block modes after pre_randomize, leave inline predicates unconditional,
and preserve hook updates on failed solves. Include modes in object copies,
heap comparison and checkpoint restoration. Diagnose unknown blocks, invalid
getter/setter calls, builtin overrides and unsupported static/external blocks.

Add shared cases for modes, aliases, hooks, inheritance, dynamic dispatch and
inline/check-only solves, plus a checkpoint regression. Retain the observed
Icarus constraint-declaration limitation and Verilator bit-argument/override
mode discrepancies with IEEE clause references and exact failure evidence.
Package-base randomize dispatch remains the separate existing #1892 limitation;
mode calls across that boundary are covered without claiming that fix.

Validation: 400 class/backend tests; 847 analyzer tests (3 existing ignores)
and analyzer doctests; 27 heap tests; 4 retained-report tests; affected-crate
Clippy and formatting. Verilator passes the hook case and exposes three
reviewed disagreements; Icarus rejects the four constraint cases. The pinned
xezim executable is not installed locally, so that adapter was not run.
The upstream constraint_mode positive case uses UVM; expectations stay unchanged.

BREAKING CHANGE: serialized heap/checkpoint images contain persistent constraint
mode state; regenerate images produced by earlier builds.

Ordinary struct fields named constraint_mode retain normal member lookup, including nested fields and class-local structs. The shared regression passes all five backends, Verilator and Icarus; analyzer tests and clippy also pass.

Change-Id: Ibecc00dc19b68d9340e4cbf511410478a9b57345
@tignear
tignear force-pushed the stack/tignear/feat/sv-constraint-modes/support-per-object-constraint-modes--becc00dc branch from fb19450 to 904511f Compare October 27, 2026 13:29
@mergify

mergify Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

✅ Merged into master as b10833a at 14:21 UTC

Merged together with #2276. 13 min in the queue, 11 min of it CI.

So far

Merge conditions: 7 of 7 met

The batch, tested on draft #2284

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

@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 27, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 27, 2026
@mergify
mergify Bot merged commit b10833a into master Oct 27, 2026
25 checks passed
@mergify
mergify Bot deleted the stack/tignear/feat/sv-constraint-modes/support-per-object-constraint-modes--becc00dc branch October 27, 2026 14:21
@mergify mergify Bot removed the queued Mergify queue entry label Oct 27, 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