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

[Handshake] Remove handshake.select #5045

Merged
merged 2 commits into from
Apr 17, 2023

Conversation

mortbopet
Copy link
Contributor

@mortbopet mortbopet commented Apr 14, 2023

I introduced handshake.select back in the day to distinguish it from handshake.mux. What i somehow failed to realize is that handshake.select has always lowered to a unit-rate actor, which completely removes the need for the operation. The fix all along seems to just lower it to a comb/firrtl mux with unit rate semantics.

Furthermore, looks like there was a bug in the lowerings, wherein the operands of arith.select in standard to handshake was being swapped (hence the change in max.mlir, which was actually incorrect before).

Handshake to FIRRTL is... eghh... could have done a "nicer" implementation which factors out the join logic, but i can't be bothered - this pass is supposed to be deprecated, anyways, and i can't wait for the day when it is removed.

I introduced handshake.select back in the day to distinct it from handshake.mux. What i somehow failed to realize is that `handshake.select` has always lowered to a unit-rate actor, which completely removes the need for the operation. The fix all along seems to just lower it to a comb/firrtl mux with unit rate semantics.

Furthermore, looks like there was a bug in the lowerings, wherein the operands of `arith.select` in standard to handshake was being swapped (hence the change in max.mlir, which was previously incorrect).

Handshake to FIRRTL is... eghh... could have done a "nicer" implementation which factors out the join logic, but i can't be bothered - this pass is supposed to be deprecated, anyways.
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.

I think this makes sense once tests are passing.

Copy link
Contributor

@lucas-rami lucas-rami left a comment

Choose a reason for hiding this comment

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

Also LGTM once tests are passing

@mortbopet mortbopet merged commit 51ee265 into main Apr 17, 2023
@darthscsi darthscsi deleted the dev/mpetersen/remove_handshake_select branch June 4, 2024 14:50
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.

None yet

3 participants