Skip to content

fix(sv): preserve parameter overrides with explicit analysis state - #1526

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/sv-conformance-gaps/preserve-wide-four-state-param-overrides--89b4e3dd
Oct 19, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/sv-conformance-gaps/preserve-wide-four-state-param-overrides--89b4e3dd

Conversation

@tignear

@tignear tignear commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Integral module overrides now retain wide and X/Z literals, including through
generate-scope recollection. Add shared regressions for a 256-bit high bit
controlling a generate branch and an X/Z payload/mask; update both references.

Remove every production thread-local from the SV analyzer. Carry parameter
overrides, scope imports, constant functions and their recursion depth, dimension
query caches, timescales, interface recursion, and call-site numbering through
explicit per-analysis contexts. Nested module and package analysis shares only
its owning session. Selected-root timescales are installed before package bodies
are analyzed, preserving queries despite unreachable instantiations.

Validation: 376 analyzer tests pass (4 existing ignores), interface 188,
parameter override 88, width 4, package 57, unit scope 12, lifetime 14 and array
7 tests pass. The SV suite passed 2,915 cases and found four selected-root
timescale failures; after fixing their shared cause, all 84 timescale consumer
tests pass. All-target Clippy and formatting pass. The official pinned sv-tests runner
reports the same results for all 2,054 state-mode cases (no expected TSV changes). Existing independent external
simulator evidence for the unchanged shared cases is retained.

Share one analysis session across packages and compilation units, preserving
distinct identities for effectful calls from different source scopes. Add an
AST regression that fails on the previous duplicate call-site IDs.
Validation: 377 analyzer tests pass (4 existing ignored), 46 package consumer
tests pass, and analyzer all-target Clippy and formatting pass.

Share source-call IDs with modules importing package bodies, including direct
and indexed analysis entry points. Preserve explicit compilation warnings
when integrating master.
Validation after integration: 385 analyzer tests and 2944 SystemVerilog tests
pass; interface, parameter, readmem and collector consumers pass; workspace
all-target Clippy passes. Existing backend exclusions remain.

Depends-On: #1525

@tignear

tignear commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 docs(sv): separate the getting-started guide from the language reference #1522
2 fix(sv): handle Veryl-emitted interface declarations and calls #1525
3 fix(sv): preserve parameter overrides with explicit analysis state #1526 👈
4 refactor(native): own emission state in the assembler #1530
5 refactor(veryl)!: pass lowering state and dependency collectors explicitly #1531
6 refactor(vpi)!: own runtime state in an explicit VPI session #1532
7 chore(lint): prohibit thread-local state outside unit tests #1533

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 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-19T08:38:48.937018Z 3dcbf35 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 merge-ready Request merging through Mergify after required checks and removed merge-ready Request merging through Mergify after required checks labels Oct 19, 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: 33f0c4ffbe

ℹ️ 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.rs Resolved
@tignear tignear changed the title fix(sv): preserve wide and four-state parameter overrides fix(sv): preserve parameter overrides with explicit analysis state Oct 19, 2026
@tignear
tignear force-pushed the stack/tignear/fix/sv-conformance-gaps/preserve-wide-four-state-param-overrides--89b4e3dd branch from 33f0c4f to c89b44c Compare October 19, 2026 06:15
@tignear

tignear commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 33f0c4f 2026-10-19 06:15 UTC
2 content 33f0c4f → c89b44c Remove the parameter override TLS and all remaining production analyzer TLS; preserve behavior with explicitly owned analysis contexts. 2026-10-19 06:15 UTC
3 rebase c89b44c → 061ed43 (rebase only) Replay unchanged descendant after the CI catalogue assertion fix in #1525. 2026-10-19 07:08 UTC
4 content 061ed43 → 95ad0a3 Fix review r4311237320: share call-site numbering across package and compilation-unit analyses. 2026-10-19 07:35 UTC
5 content 95ad0a3 → 3dcbf35 Fix review r4311401472 by sharing source-call identities with module analyses; preserve merged explicit diagnostics. 2026-10-19 08:34 UTC

@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 19, 2026
@tignear
tignear force-pushed the stack/tignear/fix/sv-conformance-gaps/handle-veryl-emitted-interface-declarations-calls--9a411d53 branch from 0e18bd6 to 9b287ac Compare October 19, 2026 07:08
@tignear
tignear force-pushed the stack/tignear/fix/sv-conformance-gaps/preserve-wide-four-state-param-overrides--89b4e3dd branch from c89b44c to 061ed43 Compare October 19, 2026 07:08

@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: 061ed430b7

ℹ️ 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 force-pushed the stack/tignear/fix/sv-conformance-gaps/preserve-wide-four-state-param-overrides--89b4e3dd branch from 061ed43 to 95ad0a3 Compare October 19, 2026 07:35

@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: 95ad0a3f98

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

Integral module overrides now retain wide and X/Z literals, including through
generate-scope recollection. Add shared regressions for a 256-bit high bit
controlling a generate branch and an X/Z payload/mask; update both references.

Remove every production thread-local from the SV analyzer. Carry parameter
overrides, scope imports, constant functions and their recursion depth, dimension
query caches, timescales, interface recursion, and call-site numbering through
explicit per-analysis contexts. Nested module and package analysis shares only
its owning session. Selected-root timescales are installed before package bodies
are analyzed, preserving queries despite unreachable instantiations.

Validation: 376 analyzer tests pass (4 existing ignores), interface 188,
parameter override 88, width 4, package 57, unit scope 12, lifetime 14 and array
7 tests pass. The SV suite passed 2,915 cases and found four selected-root
timescale failures; after fixing their shared cause, all 84 timescale consumer
tests pass. All-target Clippy and formatting pass. The official pinned sv-tests runner
reports the same results for all 2,054 state-mode cases (no expected TSV changes). Existing independent external
simulator evidence for the unchanged shared cases is retained.

Share one analysis session across packages and compilation units, preserving
distinct identities for effectful calls from different source scopes. Add an
AST regression that fails on the previous duplicate call-site IDs.
Validation: 377 analyzer tests pass (4 existing ignored), 46 package consumer
tests pass, and analyzer all-target Clippy and formatting pass.

Share source-call IDs with modules importing package bodies, including direct
and indexed analysis entry points. Preserve explicit compilation warnings
when integrating master.
Validation after integration: 385 analyzer tests and 2944 SystemVerilog tests
pass; interface, parameter, readmem and collector consumers pass; workspace
all-target Clippy passes. Existing backend exclusions remain.

Change-Id: I89b4e3dd4d9a18277794be5de7952c7d0c0ac921
@tignear
tignear force-pushed the stack/tignear/fix/sv-conformance-gaps/handle-veryl-emitted-interface-declarations-calls--9a411d53 branch from 9b287ac to 9288d2f Compare October 19, 2026 08:35
@tignear
tignear force-pushed the stack/tignear/fix/sv-conformance-gaps/preserve-wide-four-state-param-overrides--89b4e3dd branch from 95ad0a3 to 3dcbf35 Compare October 19, 2026 08:35
@mergify mergify Bot added the queued Mergify queue entry label Oct 19, 2026
@mergify

mergify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 2 hours 1 minute 2 seconds in the queue, including 2 hours 17 minutes 3 seconds running CI.

Required conditions to merge

Base automatically changed from stack/tignear/fix/sv-conformance-gaps/handle-veryl-emitted-interface-declarations-calls--9a411d53 to master October 19, 2026 12:13
@mergify
mergify Bot merged commit 139a69e into master Oct 19, 2026
36 of 57 checks passed
@mergify
mergify Bot deleted the stack/tignear/fix/sv-conformance-gaps/preserve-wide-four-state-param-overrides--89b4e3dd branch October 19, 2026 12:20
@mergify mergify Bot removed the queued Mergify queue entry label Oct 19, 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