Repository navigation
feat(sv)!: support opt-in interface-array size queries - #1791
Conversation
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
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: 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".
| let receiver = handle.split(['.', '[']).next().unwrap_or(&handle); | ||
| if context.get(receiver).is_some() |
There was a problem hiding this comment.
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 👍 / 👎.
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
|
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:
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.