Skip to content

feat(sv): initialize process static locals with run-time values - #2407

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-uvm-enum-methods/initialize-process-static-locals-run-time-values--99990f95
Oct 28, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-uvm-enum-methods/initialize-process-static-locals-run-time-values--99990f95

Conversation

@tignear

@tignear tignear commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

A static local of a process may now have a run-time initializer, such as
string s = v.name(); or C h = new;. IEEE 1800-2023 6.8 allows any
run-time expression and runs it once, before any initial or always
procedure starts; Celox runs it, in declaration order, in the existing
time-zero initializer process, and keeps the local (and every static local
it reads) as module storage. An initializer that reads an automatic
variable could only run on each entry and is still rejected, as are
non-constant initializers of function statics.

IEEE 1800-2023 6.21 says that "an explicit static keyword shall be
required when an initialization value is specified as part of a static
variable's declaration". Celox already accepts the keyword-less form with
a constant initializer, and existing sources (including the sv-tests case
6.19.5.6) omit it, so a keyword-less run-time initializer is accepted in a
procedure that runs once, such as initial, where running it at time zero
instead of on entry cannot repeat. In an always procedure it stays
rejected, because its author likely meant it to run on every entry; the
static keyword states the intent there.

sv-tests: 6.19.5.6 enum_name, 8.7 constructor and 8.7 constructor_param
now pass in both state modes.

Depends-On: #2390

@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 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:01:11.311992Z 11b5154 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 28, 2026
@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
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-enum-methods/initialize-process-static-locals-run-time-values--99990f95 branch from 3ac1198 to b693107 Compare October 28, 2026 08:35
@tignear

tignear commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 3ac1198 2026-10-28 08:30 UTC
2 rebase 3ac1198 → b693107 (rebase only) Initial version: run-time static initializers in process blocks (6.8/6.21). 2026-10-28 08:30 UTC
3 rebase b693107 → a390838 (rebase only) 2026-10-28 08:47 UTC
4 rebase a390838 → 8d162b4 (rebase only) 2026-10-28 09:00 UTC
5 content 8d162b4 → 001a36e 2026-10-28 09:09 UTC
6 rebase 001a36e → d1d90a5 (rebase only) 2026-10-28 09:20 UTC
7 content d1d90a5 → 4e3f43f 2026-10-28 11:04 UTC
8 rebase 4e3f43f → c40dd67 (rebase only) Rebased on master with #2322 and #2421; no changes. 2026-10-28 12:24 UTC
9 rebase c40dd67 → 05e6c97 (rebase only) 2026-10-28 13:23 UTC
10 rebase 05e6c97 → 11b5154 (rebase only) Rebased on master with #2411; no changes. 2026-10-28 15:58 UTC

@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
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-enum-methods/initialize-process-static-locals-run-time-values--99990f95 branch from b693107 to a390838 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: a390838c2d

ℹ️ 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".

Comment thread crates/celox-sv-analyzer/src/ast/lifetimes.rs
@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/initialize-process-static-locals-run-time-values--99990f95 branch 2 times, most recently from 8d162b4 to 001a36e Compare October 28, 2026 09:10
@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
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-enum-methods/initialize-process-static-locals-run-time-values--99990f95 branch from 001a36e to d1d90a5 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: d1d90a584e

ℹ️ 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".

Comment thread crates/celox-sv-analyzer/src/ast/lifetimes.rs
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-enum-methods/initialize-process-static-locals-run-time-values--99990f95 branch from d1d90a5 to 4e3f43f Compare October 28, 2026 11:05
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-enum-methods/impl-enumerated-type-methods--cf20fb1b branch 2 times, most recently from 4d39d87 to 0a02620 Compare October 28, 2026 12:25
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-enum-methods/initialize-process-static-locals-run-time-values--99990f95 branch from 4e3f43f to c40dd67 Compare October 28, 2026 12:25
@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 force-pushed the stack/tignear/feat/sv-uvm-enum-methods/initialize-process-static-locals-run-time-values--99990f95 branch from c40dd67 to 05e6c97 Compare October 28, 2026 13:26
@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

37 min in the queue, 21 min of it CI.

So far

Reason

Pull request #2407 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 ↓.

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
A static local of a process may now have a run-time initializer, such as
`string s = v.name();` or `C h = new;`. IEEE 1800-2023 6.8 allows any
run-time expression and runs it once, before any initial or always
procedure starts; Celox runs it, in declaration order, in the existing
time-zero initializer process, and keeps the local (and every static local
it reads) as module storage. An initializer that reads an automatic
variable could only run on each entry and is still rejected, as are
non-constant initializers of function statics.

IEEE 1800-2023 6.21 says that "an explicit static keyword shall be
required when an initialization value is specified as part of a static
variable's declaration". Celox already accepts the keyword-less form with
a constant initializer, and existing sources (including the sv-tests case
6.19.5.6) omit it, so a keyword-less run-time initializer is accepted in a
procedure that runs once, such as `initial`, where running it at time zero
instead of on entry cannot repeat. In an `always` procedure it stays
rejected, because its author likely meant it to run on every entry; the
`static` keyword states the intent there.

sv-tests: 6.19.5.6 enum_name, 8.7 constructor and 8.7 constructor_param
now pass in both state modes.

Change-Id: I99990f956dd5985eb2d1087631ae1f918f2bbd0a
@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
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-enum-methods/initialize-process-static-locals-run-time-values--99990f95 branch from 05e6c97 to 11b5154 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 2a0c5de at 17:25 UTC

Merged together with #2390. 38 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

Base automatically changed from stack/tignear/feat/sv-uvm-enum-methods/impl-enumerated-type-methods--cf20fb1b to master October 28, 2026 17:24
@mergify
mergify Bot merged commit 2a0c5de into master Oct 28, 2026
25 of 44 checks passed
@mergify
mergify Bot deleted the stack/tignear/feat/sv-uvm-enum-methods/initialize-process-static-locals-run-time-values--99990f95 branch October 28, 2026 17:25
@mergify mergify Bot removed the queued Mergify queue entry label Oct 28, 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