-
Notifications
You must be signed in to change notification settings - Fork 277
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
[LowerComb] Truth table to mux tree lowering #5405
Conversation
FYI TruthTable already has an PLA-based implementation: https://github.com/chipsalliance/chisel/blob/435d5cc43a0b49038ab4615383fc58be224d9845/src/main/scala/chisel3/util/pla.scala#L7 Do you think the truth table should conclude dont care as well? |
@darthscsi @mikeurbach @seldridge Do you agree with adding a pass to lower this? I'll add the 'casez' lowering later. |
We specifically discussed this at a recent ODM and decided against it, at least to start. |
Using mux-based to implement a LUT might be inefficient for ASIC designs, it that possible to be configured to add other implementations which may be designed for ASIC specifically in the future? |
Yes. We'd add a pass option to specify a lowering style -- mux vs casez vs primitive vs .... Casez is planned. |
Sounds great, but if not having dont care bits, would casez version be efficient? Or the dc will get implemented in the future? |
|
Thanks for information! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having a lowering with the Comb dialect in general makes sense to me. Just left a few comments. I'm not exactly sure what you need to lower to in order to achieve what you want, but the general implementation looks good.
#5433 <- pass boilerplate PR |
A tree of trinary operations works as does a |
Since I've already gotten a bunch of feedback, I'll be relying on post-review comments for further revisions. |
Add a
truth_table
to mux tree lowering to the LowerComb pass.