Skip to content

feat(sv): support unconstrained scope randomization - #1640

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-popcount-testbench/support-unconstrained-scope-randomization--7bb166b0
Oct 21, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-popcount-testbench/support-unconstrained-scope-randomization--7bb166b0

Conversation

@tignear

@tignear tignear commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Implement randomize(a, b) and std::randomize(a, b) for whole writable packed variables, including signed vectors and packed structures. Fill arbitrary supported widths in 32-bit words and return the signed int success value 1. Empty calls succeed without changing variables or advancing the random stream.

Use the caller's persistent process RNG with a bijective output mix so even word strides cannot freeze low bits. Preserve procedural order, short-circuit evaluation, function locals, four-state mask clearing and checkpoint replay. Record written arguments for driver and sensitivity checks; recognize std::randomize as a built-in rather than a package dependency.

Reject constraints, class methods, enums, unpacked arrays, nets, constants, selects and concatenation arguments. Retain enum and mutability metadata through analysis to diagnose unsupported targets. Document these limits in English and Japanese.

Add shared regressions for widths 1, 5, 16, 32, 64, 981, 1024 and 2051, control flow and return width. Add owning diagnostics, port-kind checks, four-state/checkpoint coverage and O0/O1/O2 checks. Verilator passes both shared cases; retain Icarus 13.0's compile failures and narrowly exclude those cases in its catalogue, including retained-report rows.

Validation: full SV backend corpus, analyzer/frontend tests, full shared-suite package tests with Verilator and Icarus features, optimization-level checks, affected-crate and integration-test Clippy, and formatting. Native backend and wide/four-state/parameterized consumers also pass.

@chatgpt-codex-connector

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 ⚠️ Failed 2026-10-20T16:38:33.204678Z 020842b PR opened
ℹ️ 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 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 feat(sv): support unconstrained scope randomization #1640 👈
2 ci(sv): run upstream popcount testbench in daily checks #1641

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@tignear
tignear force-pushed the stack/tignear/feat/sv-popcount-testbench/support-unconstrained-scope-randomization--7bb166b0 branch from 020842b to e984458 Compare October 20, 2026 16:50
@tignear

tignear commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 020842b 2026-10-20 16:49 UTC
2 rebase 020842b → e984458 (rebase only) 2026-10-20 16:49 UTC
3 content e984458 → 2203fa4 Resolve scope-randomization overlaps with the SV host-request, file-output and plusargs changes now on master. 2026-10-20 21:56 UTC
4 content 2203fa4 → d087d56 Restack #1640 and #1641 after #1639 merged; reconcile new master changes and validate the affected SV behavior. 2026-10-20 23:18 UTC

@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 20, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 20, 2026
@mergify

mergify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-20 20:39 UTC · Rule: changes · triggered by rule Queue explicitly requested merges
  • 🚫 Left the queue — 2026-10-20 20:59 UTC · at e984458bd9ffb7eb71c74f86cde4eef3d4f29e55

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

Reason

Pull request #1640 has been dequeued

Queue conditions are not satisfied:

Hint

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.
If you do update this pull request, 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.

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 20, 2026
@tignear
tignear force-pushed the stack/tignear/feat/sv-popcount-testbench/support-time-literals-delay-controls--65c5a170 branch from 0a09948 to 908be17 Compare October 20, 2026 21:57
@tignear
tignear force-pushed the stack/tignear/feat/sv-popcount-testbench/support-unconstrained-scope-randomization--7bb166b0 branch from e984458 to 2203fa4 Compare October 20, 2026 21:57
@mergify mergify Bot added queued Mergify queue entry and removed dequeued Mergify stopped this queue entry; investigate before retrying labels Oct 20, 2026
@mergify

mergify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-20 22:37 UTC · Rule: changes · triggered by rule Queue explicitly requested merges
  • 🚫 Left the queue — 2026-10-20 23:06 UTC · at 2203fa4ac57d7289b195cdf9f16f41baa9b17c71

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

Reason

The pull request conflicts with the base branch

Automatic conflict resolution can merge a conflict like this one instead of stopping on it, but only in a queue using the merge-batch or fast-forward merge method.

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

Base automatically changed from stack/tignear/feat/sv-popcount-testbench/support-time-literals-delay-controls--65c5a170 to master October 20, 2026 23:06
@mergify mergify Bot added dequeued Mergify stopped this queue entry; investigate before retrying and removed queued Mergify queue entry labels Oct 20, 2026
Implement randomize(a, b) and std::randomize(a, b) for whole writable packed variables, including signed vectors and packed structures. Fill arbitrary supported widths in 32-bit words and return the signed int success value 1. Empty calls succeed without changing variables or advancing the random stream.

Use the caller's persistent process RNG with a bijective output mix so even word strides cannot freeze low bits. Preserve procedural order, short-circuit evaluation, function locals, four-state mask clearing and checkpoint replay. Record written arguments for driver and sensitivity checks; recognize std::randomize as a built-in rather than a package dependency.

Reject constraints, class methods, enums, unpacked arrays, nets, constants, selects and concatenation arguments. Retain enum and mutability metadata through analysis to diagnose unsupported targets. Document these limits in English and Japanese.

Add shared regressions for widths 1, 5, 16, 32, 64, 981, 1024 and 2051, control flow and return width. Add owning diagnostics, port-kind checks, four-state/checkpoint coverage and O0/O1/O2 checks. Verilator passes both shared cases; retain Icarus 13.0's compile failures and narrowly exclude those cases in its catalogue, including retained-report rows.

Validation: full SV backend corpus, analyzer/frontend tests, full shared-suite package tests with Verilator and Icarus features, optimization-level checks, affected-crate and integration-test Clippy, and formatting. Native backend and wide/four-state/parameterized consumers also pass.
Change-Id: I7bb166b01425b7890391c787293906fe051716ce
@tignear
tignear force-pushed the stack/tignear/feat/sv-popcount-testbench/support-unconstrained-scope-randomization--7bb166b0 branch from 2203fa4 to d087d56 Compare October 20, 2026 23:19
@mergify mergify Bot added queued Mergify queue entry and removed dequeued Mergify stopped this queue entry; investigate before retrying labels Oct 20, 2026
@mergify

mergify Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 1 hour 41 minutes 46 seconds in the queue, including 55 minutes 52 seconds running CI.

Required conditions to merge
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • depends-on=celox-sim/celox#1640 [⛓️ feat(sv): support unconstrained scope randomization #1640 [stack]]
  • 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 9907bba into master Oct 21, 2026
31 checks passed
@mergify
mergify Bot deleted the stack/tignear/feat/sv-popcount-testbench/support-unconstrained-scope-randomization--7bb166b0 branch October 21, 2026 01:42
@mergify mergify Bot removed the queued Mergify queue entry label Oct 21, 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