Skip to content
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

[ChiselSim][svsim] Switch to shouldIncludeFile #4557

Merged
merged 3 commits into from
Dec 11, 2024

Conversation

seldridge
Copy link
Member

Provide initial work that better handles the problem of needing to filter
files in order to enable specific layers. This adds a new member
function, shouldIncludeFile which returns a PartialFunction that is
defined only if the file being examined is a layer file (as defined in the
FIRRTL ABI for extract layers) and returns true if that layer file should
be included in order to enable the requested layers.

Change both ChiselSim and svsim to no longer use the filter function of
LayerControl. Migrate both to use shouldIncludeFile partial function.
The latter is a much better API as it reserves the handling of files that
are outside the domain of the filter to ChiselSim and svsim.

Remove LayerControl's filter as this is no longer load-bearing.

Provide initial work that better handles the problem of needing to filter
files in order to enable specific layers.  This adds a new member
function, `shouldIncludeFile` which returns a `PartialFunction` that is
defined only if the file being examined is a layer file (as defined in the
FIRRTL ABI for extract layers) and returns true if that layer file should
be included in order to enable the requested layers.

In subsequent commits, this will be made load bearing.

Signed-off-by: Schuyler Eldridge <[email protected]>
Change both ChiselSim and svsim to no longer use the `filter` function of
`LayerControl`.  Migrate both to use `shouldIncludeFile` partial function.
The latter is a much better API as it reserves the handling of files that
are outside the domain of the filter to ChiselSim and svsim.

Signed-off-by: Schuyler Eldridge <[email protected]>
Remove `LayerControl`'s filter as this is no longer load-bearing.

Signed-off-by: Schuyler Eldridge <[email protected]>
@seldridge seldridge added the No Release Notes Exclude from release notes, consider using Internal instead label Dec 11, 2024
@seldridge seldridge merged commit d116f79 into main Dec 11, 2024
18 checks passed
@seldridge seldridge deleted the dev/seldridge/refactor-chiselsim-extract-layers branch December 11, 2024 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No Release Notes Exclude from release notes, consider using Internal instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant