Skip to content

Allow Bound-in layers under inline layers #8642

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rwy7
Copy link
Contributor

@rwy7 rwy7 commented Jul 2, 2025

No description provided.

rwy7 added 2 commits June 30, 2025 11:58
In a circuit, we only know about the layers which have been declared. If we
have an extmodule, it may have been defined under a different set of layers
than what is in the current circuit. In particular, if there is a layer which
we know about, but the extmodule does not, then the extmodule will not have a
bind file for us to include.

This commit adds a "knownlayer" declaration to extmodules, which is an explicit
specification of the layers which an extmodule was defined with.  For each
bound-in layer that an extmodule knows about, we can assume that there will be
a bindfile to include.

Changes:

FExtModule: Add a knownLayers property. Update the verifier so that, if a layer
is mentioned by an enablelayer specification or port type, then that layer must
be known by the exmodule. Bonus: implement verifySymbolUses for extmodules.

FIRParser: add parsing for knownlayer declarations on extmodules.

LowerLayersPass: Use the known-layers of extmodules while building the
bindfiles for modules in the current circuit. If a module in the current
circuit instantiates an extmodule, then that module's bindfiles will include
the bindfiles for the known-layers of the extmodule.

SpecializeLayers: Clean up known-layers when a layer is specialized away.

FirEmitter: Emit knownlayer declarations.
@rwy7 rwy7 added the FIRRTL Involving the `firrtl` dialect label Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FIRRTL Involving the `firrtl` dialect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant