Repository navigation
fix(sv): distribute interface array port connections - #1622
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 78a7163389
ℹ️ 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".
| } else { | ||
| Design::collect(&files)? |
There was a problem hiding this comment.
Exclude port-bearing interfaces when contracts are also needed
When any module has an interface port, needs_plan is true and this falls back to Design::collect(&files), which calls InterfaceDecl::collect for every interface and rejects every interface with ordinary ports. Consequently, a design combining a traditional zero-port interface contract (for example, module Child(Bus b)) with the newly supported local interface Wire(input logic x) array still fails in plan_interfaces before connection distribution runs. Keep contract planning enabled for the module interface ports without collecting unrelated port-bearing local interfaces.
Useful? React with 👍 / 👎.
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. |
78a7163 to
c8bfe0f
Compare
Revision history
|
c8bfe0f to
5021b01
Compare
5021b01 to
43ef165
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Interface instance arrays connected every element to the same full actual, so scalar inputs could observe the same truncated bit and outputs could produce overlapping drivers. Distribute packed connections MSB-first in instance declaration order; match unpacked dimensions left-to-left, retain single-port broadcasts and reject incompatible shapes or widths. Keep the caller's selected port types available while binding connections. Convert slices back to the authored coordinates of single packed dimensions, including ascending and offset ranges, and preserve part-select origins. Local interfaces with ordinary ports use native scope binding independently of module interface contracts. Collect required contracts selectively so named and generic module interface ports can coexist with local scalar and array interface connections; existing contract validation remains active. Add shared cases for named/positional input and output connections, ascending and descending ranges, wider ports, broadcasts, output part-selects, generate scopes, unpacked actuals and array ports, and multidimensional instances. Diagnostic regressions reject incorrect connection widths and dimensions. A mixed-design regression covers typed and generic module interface ports alongside ordinary local interface connections. Fixes #1498. Validation on the current master base: - All five new shared cases pass five Celox execution variants (25 tests). - Full SV integration: 3,199 passed; 90 existing ignores. - Analyzer: 759 passed; 3 existing ignores; 2 doctests passed. - Shared-suite with external feature: 46 passed; 2 existing ignores. Formatting, analyzer/suite Clippy with warnings denied, retained-evidence links and diff checks pass. - The unchanged cases previously passed Verilator 5.052 for the three one-dimensional cases and the mixed case; it rejects the 2x2 packed connection after counting only the inner instance dimension. - Icarus 13.0 passes packed connections, but rejects unpacked actuals and multidimensional instances and aborts on interface array ports. Exact tool/case exclusions retain these pre-exclusion compile diagnostics under verification/repros/sv_interface_array_connections_*.json and are documented in LIMITATIONS.md. All original shared assertions remain active for Celox; historical simulation results remain unchanged. The mixed-case Icarus port-declaration failure is retained separately in verification/repros/sv_mixed_interface_connections_icarus.json and added to the existing exact-case interface-port limitation. The master rebase retains both sets of analyzer regressions and all existing external-tool limitation entries. Shared case sources and retained diagnostics are unchanged, so external simulation was not repeated for the rebase. Record all five reviewed tool/case exclusions in the retained interface-group reports, and synchronize the evidence link added to the existing Icarus interface issue. This fixes the CI retained-report coverage contract without refreshing unrelated results. The failed-before retained-report tests (3) and the full shared suite with the external feature pass locally. Place the added analyzer regression beside the interface-array tests and the new limitations beside the interface entries, avoiding shared tail insertion points when other pull requests add unrelated regressions. Change-Id: I51a5d79d2c5d47eb2e4abb94d39bf2ea276d3ea4
43ef165 to
9a199fd
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Merge Queue Status
This pull request spent 1 hour 36 minutes 15 seconds in the queue, including 1 hour 22 minutes 36 seconds running CI. Required conditions to merge
|
Interface instance arrays connected every element to the same full actual,
so scalar inputs could observe the same truncated bit and outputs could
produce overlapping drivers. Distribute packed connections MSB-first in
instance declaration order; match unpacked dimensions left-to-left, retain
single-port broadcasts and reject incompatible shapes or widths.
Keep the caller's selected port types available while binding connections.
Convert slices back to the authored coordinates of single packed dimensions,
including ascending and offset ranges, and preserve part-select origins.
Local interfaces with ordinary ports use native scope binding independently
of module interface contracts. Collect required contracts selectively so named
and generic module interface ports can coexist with local scalar and array
interface connections; existing contract validation remains active.
Add shared cases for named/positional input and output connections, ascending
and descending ranges, wider ports, broadcasts, output part-selects, generate
scopes, unpacked actuals and array ports, and multidimensional instances.
Diagnostic regressions reject incorrect connection widths and dimensions.
A mixed-design regression covers typed and generic module interface ports
alongside ordinary local interface connections.
Fixes #1498.
Validation on the current master base:
Formatting, analyzer/suite Clippy
with warnings denied, retained-evidence links and diff checks pass.
one-dimensional cases and the mixed case; it rejects the 2x2 packed
connection after counting only the inner instance dimension.
multidimensional instances and aborts on interface array ports.
Exact tool/case exclusions retain these pre-exclusion compile diagnostics
under verification/repros/sv_interface_array_connections_*.json and are
documented in LIMITATIONS.md. All original shared assertions remain active
for Celox; historical simulation results remain unchanged.
The mixed-case Icarus port-declaration failure is retained separately in
verification/repros/sv_mixed_interface_connections_icarus.json and added to
the existing exact-case interface-port limitation.
The master rebase retains both sets of analyzer regressions and all existing
external-tool limitation entries. Shared case sources and retained diagnostics
are unchanged, so external simulation was not repeated for the rebase.
Record all five reviewed tool/case exclusions in the retained interface-group
reports, and synchronize the evidence link added to the existing Icarus
interface issue. This fixes the CI retained-report coverage contract without
refreshing unrelated results. The failed-before retained-report tests (3)
and the full shared suite with the external feature pass locally.
Place the added analyzer regression beside the interface-array tests and
the new limitations beside the interface entries, avoiding shared tail
insertion points when other pull requests add unrelated regressions.