Verilog: arrays of interface ports - #2079
Draft
kroening wants to merge 1 commit into
Draft
Conversation
Collaborator
|
This needs git conflict resolution. |
tautschnig
approved these changes
Aug 11, 2026
kroening
force-pushed
the
kroening/frontend-issue3
branch
2 times, most recently
from
August 11, 2026 20:30
2cec063 to
a1f05db
Compare
kroening
marked this pull request as draft
August 11, 2026 21:27
SystemVerilog allows an interface port to have unpacked dimensions, i.e.,
an array of interface ports (IEEE 1800-2017 section 25.4, and
ansi_port_declaration in A.1.3). The parser rejected the dimension:
interface ifc;
logic x;
modport mp (input x);
endinterface
module m(ifc.mp a[0:3]); // syntax error, unexpected '['
endmodule
Each element of the array yields an interface instance of its own, named
bus[0], bus[1], and so on, and each of those is bound to the interface
instance that the port connection gives for that element. Selecting an
element of such an array, e.g. bus[0].some_signal, resolves to the member
of the interface instance for that element. Any number of dimensions is
supported.
The array elements may be given as an assignment pattern, one interface
instance per element, or by the name of another array of interfaces, which
is how a module passes on an array of interface ports that it has itself
been given.
kroening
force-pushed
the
kroening/frontend-issue3
branch
from
August 12, 2026 15:24
a1f05db to
0376c43
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This implements SystemVerilog unpacked dimensions for interface ports (IEEE 1800-2017 section 25.4, and
ansi_port_declarationin A.1.3).Minimal example