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

[firrtl] Add 4.0.0 public modules #6448

Merged
merged 2 commits into from
Nov 28, 2023

Conversation

seldridge
Copy link
Member

@seldridge seldridge commented Nov 27, 2023

Add support for FIRRTL 4.0.0 feature, "public modules". This does not provide complete FIRRTL 4.0.0 support as this requires removing circuit names. This will be done in a later commit.

This should get unified with: #6176
Fixes #6176.

@seldridge seldridge force-pushed the dev/seldridge/firrtl-4.0.0-public-modules-parse branch from 7b5be71 to 53ef63f Compare November 27, 2023 20:49
@seldridge
Copy link
Member Author

I integrated the changes from #6179 related to top module scalarization. I replaced this with public module scalarization. All this should be removed with changes on the FIRRTL spec side to include the ABI in the public module definition.

Copy link
Contributor

@dtzSiFive dtzSiFive left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM, but please fix the behavior re:public on non-modules (see review comment).

As an aside, thoughts on when to advance the FIRVersion constants for this future release?
(related TODO is to add Emitter support)

lib/Dialect/FIRRTL/Import/FIRParser.cpp Outdated Show resolved Hide resolved
lib/Dialect/FIRRTL/Import/FIRParser.cpp Show resolved Hide resolved
auto intModuleOp =
builder.create<FIntModuleOp>(info.getLoc(), name, portList, intName,
annotations, parameters, internalPaths);
SymbolTable::setSymbolVisibility(intModuleOp,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should have these private by default? Not for this PR.

lib/Dialect/FIRRTL/Import/FIRParser.cpp Show resolved Hide resolved
test/firtool/convention.fir Outdated Show resolved Hide resolved
@seldridge seldridge force-pushed the dev/seldridge/firrtl-4.0.0-public-modules-parse branch 2 times, most recently from 3a28066 to dfb047f Compare November 28, 2023 19:56
Copy link
Contributor

@fabianschuiki fabianschuiki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Does this fully cover #6176?

@fabianschuiki fabianschuiki added the FIRRTL Involving the `firrtl` dialect label Nov 28, 2023
@seldridge
Copy link
Member Author

Does this fully cover #6176?

It does, yes. Proper attribution via Co-authored-by lines added as Will already did most of the work. 🙃

seldridge and others added 2 commits November 28, 2023 15:10
Add support for FIRRTL 4.0.0 feature, "public modules".  This does not
provide complete FIRRTL 4.0.0 support as this requires removing circuit
names.  This will be done in a later commit.

Co-authored-by: Will Dietz <will.dietz@sifive.com>
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Remove the -scalarize-top-module option to firtool (and the parser).
Replace this with -scalarize-public-modules.  This is done in preparation
for FIRRTL 4.0.0.  This is also largely unnecessary once FIRRTL 4.0.0
figures out how to attach the ABI to each public module.

Co-authored-by: Will Dietz <will.dietz@sifive.com>
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
@seldridge seldridge force-pushed the dev/seldridge/firrtl-4.0.0-public-modules-parse branch from dfb047f to 80b3edb Compare November 28, 2023 20:11
@seldridge seldridge merged commit 80b3edb into main Nov 28, 2023
2 checks passed
@seldridge seldridge deleted the dev/seldridge/firrtl-4.0.0-public-modules-parse branch November 28, 2023 20:11
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.

3 participants