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

[Feature Proposal] Add a pass on hw.module to remove certain modules from the hierarchy and recursively expose its IO #8060

Open
CircuitCoder opened this issue Jan 9, 2025 · 0 comments

Comments

@CircuitCoder
Copy link
Contributor

This is more of a "intend to contribute" than a feature request, however I'm posting this issue first in case I completely missed an easier existing way to do this in CIRCT.

The motivation is that we are trying to place the elaborated RTL onto multiple FPGAs connected by Tilelink running on top of Aurora. Right now we have made that the portion of logic running on each FPGA is an tile within the diplomacy framework, so now we only have to separate the logic for each FPGA. The hard part is removing the tiles from the hierarchy and convert the IOs of these tiles into ports in the top-level module.

We propose to add two passes expunge-module and shake-tree :

  • --expunge-module-pass --expunge-modules=ModA,ModB,ModC would process ModA, ModB and ModC one by one, removing all instances of them from all other modules, and have their IO recursively exposed up in the hierarchy
  • --shake-tree-pass --shake-keep=ModD,ModE would do a tree-shake pass in the entire mlir::module, only keeping ModD, ModE and their (transitive) included modules.
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

No branches or pull requests

1 participant