Skip to content

feat(sv)!: support opt-in interface-array size queries - #1791

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/sv-interface-array-queries/support-opt-interface-array-size-queries--e71c6750
Oct 23, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/sv-interface-array-queries/support-opt-interface-array-size-queries--e71c6750

Conversation

@tignear

@tignear tignear commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Taxi uses $size(interface_array) in parameters and generate bounds. Resolve
these queries from bound interface-array shapes, including formal ports,
generated scopes, multiple dimensions and indexed subarrays. Preserve ordinary
data-object shadowing and return a signed integer unknown for invalid numeric
dimensions. Other interface data queries remain unsupported.

Treat this as a compatibility extension: interface_array_query defaults to
error and can be enabled with warn or allow through the existing CLI diagnostic
option or celox.toml diagnostics table. Preserve located, deduplicated warnings,
including when later analysis fails. Document the policy in both guides.

Validation:

  • SystemVerilog suite: 4096 passed, 20 existing ignored.
  • Analyzer: 791 passed, 3 existing ignored; frontend: 4 passed.
  • Diagnostic policy: 33 passed; CLI integration: 5 policy combinations passed.
  • Formatting and affected library/test Clippy checks with -D warnings passed.
  • Verilator 5.052 passed the reference with assertions enabled. Slang 12 rejects
    the same interface query, supporting its classification as an extension.

A paired frontend-only Taxi audit of 83 configurations on the master base
finds that 32 of the 34 affected configurations reach their next blocker; two
hit the 120-second limit. The 17 existing frontend passes remain unchanged.
No additional configuration completes, and no new cocotb execution is claimed.
All 299 resolved upstream source files are unchanged. This PR is independent
of the assignment-pattern changes in #1772.

BREAKING CHANGE: AnalyzerWarning and FrontendWarningKind gain an
InterfaceArrayQuery variant; downstream exhaustive matches must handle it.

Taxi uses $size(interface_array) in parameters and generate bounds. Resolve
these queries from bound interface-array shapes, including formal ports,
generated scopes, multiple dimensions and indexed subarrays. Preserve ordinary
data-object shadowing and return a signed integer unknown for invalid numeric
dimensions. Other interface data queries remain unsupported.

Treat this as a compatibility extension: interface_array_query defaults to
error and can be enabled with warn or allow through the existing CLI diagnostic
option or celox.toml diagnostics table. Preserve located, deduplicated warnings,
including when later analysis fails. Document the policy in both guides.

Validation:
- SystemVerilog suite: 4096 passed, 20 existing ignored.
- Analyzer: 791 passed, 3 existing ignored; frontend: 4 passed.
- Diagnostic policy: 33 passed; CLI integration: 5 policy combinations passed.
- Formatting and affected library/test Clippy checks with -D warnings passed.
- Verilator 5.052 passed the reference with assertions enabled. Slang 12 rejects
  the same interface query, supporting its classification as an extension.

A paired frontend-only Taxi audit of 83 configurations on the master base
finds that 32 of the 34 affected configurations reach their next blocker; two
hit the 120-second limit. The 17 existing frontend passes remain unchanged.
No additional configuration completes, and no new cocotb execution is claimed.
All 299 resolved upstream source files are unchanged. This PR is independent
of the assignment-pattern changes in #1772.

BREAKING CHANGE: AnalyzerWarning and FrontendWarningKind gain an
InterfaceArrayQuery variant; downstream exhaustive matches must handle it.

Change-Id: Ie71c67508b89ab93b4b967e02d5734c7330be136
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 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-23T02:27:49.068715Z 5469981 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.

@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: 5469981e2c

ℹ️ 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 on lines +265 to +266
let receiver = handle.split(['.', '[']).next().unwrap_or(&handle);
if context.get(receiver).is_some()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve escaped identifiers when checking shadowing

When an interface array has an escaped name containing . or [, such as \lanes.bank, splitting the normalized handle treats part of the identifier as a hierarchy separator. If a function then declares an ordinary data array with the same escaped name, context.get(receiver) misses that local declaration and the lookup incorrectly resolves the outer interface array, returning its size and emitting the extension warning instead of preserving normal data-object shadowing. Derive the receiver from the expression structure, where escaped identifier boundaries are still known, rather than splitting its serialized handle.

Useful? React with 👍 / 👎.

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

mergify Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 1 hour 16 minutes 14 seconds in the queue, including 1 hour 13 minutes 50 seconds running CI.

Required conditions to merge
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • 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 0f6042d into master Oct 23, 2026
30 checks passed
@mergify
mergify Bot deleted the stack/tignear/fix/sv-interface-array-queries/support-opt-interface-array-size-queries--e71c6750 branch October 23, 2026 04:27
@mergify mergify Bot removed the queued Mergify queue entry label Oct 23, 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