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

[firtool] Add option to treat EICG_wrapper as intrinsic #6499

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

fabianschuiki
Copy link
Contributor

Add the --fixup-eicg-wrapper option to firtool and the LowerIntrinsics pass. Setting the option will treat EICG_wrapper modules like an intrinsic and replace them with the firrtl.int.clock_gate operation.

In the long run, Chisel/FIRRTL designs will directly emit the clock gate intrinsic, and EICG_wrapper extmodules will be gone. However until we get there, this option provides an incremental path towards deprecating the EICG_wrapper pattern. It allows us to switch the CIRCT side of the flow over to the intrinsic without having to make changes to Chisel in lockstep. Once all relevant existing designs work with this switch enabled, Chisel projects can opt into emitting clock gates directly, and can gradually upgrade. At that point we can make firtool emit deprecation warnings for uses of EICG_wrapper extmodules, and at some point we can entirely drop special handling of these modules altogether.

This switch is disabled by default and does not affect existing flows.

@fabianschuiki fabianschuiki added the FIRRTL Involving the `firrtl` dialect label Dec 7, 2023
Add the `--fixup-eicg-wrapper` option to firtool and the LowerIntrinsics
pass. Setting the option will treat `EICG_wrapper` modules like an
intrinsic and replace them with the `firrtl.int.clock_gate` operation.

In the long run, Chisel/FIRRTL designs will directly emit the clock gate
intrinsic, and `EICG_wrapper` extmodules will be gone. However until we
get there, this option provides an incremental path towards deprecating
the `EICG_wrapper` pattern. It allows us to switch the CIRCT side of the
flow over to the intrinsic without having to make changes to Chisel in
lockstep. Once all relevant existing designs work with this switch
enabled, Chisel projects can opt into emitting clock gates directly, and
can gradually upgrade. At that point we can make firtool emit
deprecation warnings for uses of `EICG_wrapper` extmodules, and at some
point we can entirely drop special handling of these modules altogether.

This switch is disabled by default and does not affect existing flows.
@fabianschuiki fabianschuiki force-pushed the fschuiki/eicg-wrapper-deprecation-switch branch from 7f552ef to 030b357 Compare December 7, 2023 19:28
Copy link
Contributor

@prithayan prithayan left a comment

Choose a reason for hiding this comment

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

Looks good.

@fabianschuiki fabianschuiki merged commit e658bba into main Dec 7, 2023
4 checks passed
@fabianschuiki fabianschuiki deleted the fschuiki/eicg-wrapper-deprecation-switch branch December 7, 2023 22:48
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.

2 participants