Skip to content

Interface struct - #672

Draft
desmonddak wants to merge 16 commits into
intel:mainfrom
desmonddak:interface_struct
Draft

desmonddak wants to merge 16 commits into
intel:mainfrom
desmonddak:interface_struct

Conversation

@desmonddak

Copy link
Copy Markdown
Contributor

Description & Motivation

When we add Interfaces to Modules, we loop through them to flatten LogicStructures (hierarchically) and add individual Ports for each signal.

A novel and compact way is instead to split the Interface into two LogicStructures, one for input and one for output, and then add those two as Ports for the Module. For connectivity Modules where an Interface or a subset of the Interface is consistently handed through to other subblocks, we see a dramatic decrease in complexity of wiring.

Related Issue(s)

None.

Testing

This was tested on large, complex designs. Missing, however, are directed tests at corner cases to make sure this capability works in all use cases.

Backwards-compatibility

Is this a breaking change that will not be backwards-compatible? If yes, how so?

No. This adds a new way of adding interfaces to modules, but the old way is retained.

Documentation

Does the change require any updates to documentation? If so, where? Are they included?

No. Likely we need to provide an example and a description. A proposal may be to create a matrix of methods to add Ports to Modules and include this method.

@desmonddak
desmonddak marked this pull request as draft July 15, 2026 23:15
Rebase Agent and others added 13 commits October 7, 2026 07:45
Exact cumulative tree from original branch 494c892f5a7ee843885188c794226ef20ec2de71 in the netlist-first merge order.
- Module: add portGroups map and registerPortGroup() API
- Interface.connectIO: detect group name from uniquify function,
  register each port with its interface group
- PairInterface: pass groupName through to super.connectIO and
  sub-interface connections

Enables downstream synthesis/tools to identify which ports belong to
the same logical interface without relying on naming heuristics.
…addInterfacePorts

When asStruct=true, interface ports are registered as LogicStructure
ports (prefix_in / prefix_out) instead of individual leaf ports.
Backward compatible: default asStruct=false preserves existing behavior.
Restore the unified interface APIs and their structured-port netlist connectivity.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Desmond A. Kirkpatrick <desmond.a.kirkpatrick@intel.com>
Signed-off-by: Desmond A. Kirkpatrick <desmond.a.kirkpatrick@intel.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant