Repository navigation
feat(sv): implement $urandom - #1294
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ba5ef4be17
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d762d7f98c
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 193524d68c
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 89317ff36d
ℹ️ 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".
|
Queued — the merge queue status continues in this comment ↓. |
Allocate process seeds to declaration initializers while excluding synthetic array-parameter storage initialization. Preserve the origin through AST scope copies and IR conversion, and retain initializer execution ordering. Verify default-stream stability and independent sibling state. IEEE 1800-2023 18.14.1 initializes each scope's initialization RNG with the default seed, so matching default values across sibling scopes remain intentional.
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Merge Queue Status
This pull request spent 1 hour 25 minutes 44 seconds in the queue, including 1 hour 24 minutes 19 seconds running CI. Required conditions to merge
|
Implements
$urandom,$urandom()and$urandom(seed)in clocked processes,initial,always_comb,always @*, and their subroutines (IEEE 1800-2023 18.13.1 and 18.14). Results are unsigned 32-bit values. Integral seed expressions, including zero, reproduce the sequence without modifying the argument. Narrow signed seeds retain their sign extension when converted to the 32-bit seed formal; subroutines share the caller’s stream.Each process owns a persistent RNG and receives its default seed in elaborated static-process creation order. Variable declaration initializers participate in seed allocation and execute before ordinary initial blocks; synthetic parameter-storage initialization consumes no process seed. Calls execute in statement order, short circuits skip draws, and separate calls in a select remain distinct. Checkpoints and state files restore both the sequence and combinational activation state. Combinational procedures advance their stream only on activation:
always_combalso runs at time zero after initial procedures start;always @*waits for a sensitivity change. UntimedSimulatormarks its omitted initial kernels completed so they cannot block combinational activation; timedSimulationretains the initial-start ordering gate. Repeated evaluation with unchanged inputs consumes no draws. Four-state sensitivity includes mask-only changes, static selections and reads in pruned branches. Process output scheduling preserves activation atomicity in parallel backends and precise downstream observer notifications.Each module instance owns an initialization RNG starting from the implementation-defined default seed (IEEE 1800-2023 18.14.1). Equivalent processes in sibling instances may therefore start with equal values. Their relocated RNG states advance independently, including when sibling clocks run in a different order.
The compiler lowers the generator to ordinary arithmetic and state stores using a full-period 32-bit LCG. The sequence and default seeds are implementation-defined. Constant-value contexts reject random calls; unevaluated return-type queries remain valid. Both language guides describe supported behavior.
Validation:
verification/repros/sv_urandom.json; passing and unrelated historical evidence is unchanged.Earlier standalone Veryl jobs reported a nested Cargo.lock update under --locked and a retained proof coverage/identity mismatch; the restored focused CI policy is now included in this branch. No Veryl cases, lockfiles or proof manifests are changed by the SV implementation.