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

[HandshakeToFIRRTL] Add top module inference and instance cycle detection #2056

Merged
merged 4 commits into from
Nov 1, 2021

Conversation

mortbopet
Copy link
Contributor

In preparation for supporting handshake.instance lowering, this commit introduces top module inference and instance cycle detection. The IR is topologically sorted based on handshake.instance usage. During this, we check for instance cycles (and report them to the user) as well as top-module detection. For now, if multiple top modules are available, an error is thrown.

Furthermore, the firrtl.circuit op is now created outside of the handshake.func operation lowering, based on the inferred top-level name.

…tion

In preparation for supporting `handshake.instance` lowering, this commit introduces top module inference and instance cycle detection. The IR is topologically sorted based on `handshake.instance` usage. During this, we check for instance cycles (and report them to the user) as well as top-module detection. For now, if multiple top modules are available, an error is thrown.

Furthermore, the `firrtl.circuit` op is now created outside of the `handshake.func` operation lowering, based on the inferred top-level name.
Copy link
Contributor

@mikeurbach mikeurbach left a comment

Choose a reason for hiding this comment

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

Nice, looks good to me.

@mortbopet mortbopet merged commit 558dc90 into llvm:main Nov 1, 2021
@mortbopet mortbopet deleted the handshake/instace_graph branch November 1, 2021 13:48
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

Successfully merging this pull request may close these issues.

2 participants