-
Notifications
You must be signed in to change notification settings - Fork 603
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
Mux1H: don't special-case (sel: UInt, in: UInt) #1320
Conversation
Bringing this Mux1H API in line with the others seems like a good thing to do, but it raises some subtle issues:
It is possible to get rid of the dependence on
where the first statement is a way to check whether |
@aswaterman, I think the idea for your example is that the If so, I imagine that implicitly depends on the idea that It also in turn depends on FIRRTL const-propping |
Yeah, we would obviously want some support from Firrtl. Synthesis will get
rid of this for sure, but the Verilog is still unreadable.
…On Thu, Feb 6, 2020 at 5:48 AM Albert Magyar ***@***.***> wrote:
@aswaterman <https://github.com/aswaterman>, I think the idea for your
example is that the Mux will be optimized away via const-prop after the
select case is coerced to a constant?
If so, I imagine that implicitly depends on the idea that (sel + 1.U) and (sel
- 1.U) will be strength-reduced to matching expressions for 1-bit sel.
This currently does not happen in FIRRTL but seems reasonable to add.
It also in turn depends on FIRRTL const-propping a == a, which I had
assumed might already be the case but is actually not currently done. I
just PRed those matching-argument degeneracies to const prop in
chipsalliance/firrtl#1361
<chipsalliance/firrtl#1361>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1320>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAH3XQVK5XA3R2664VYCOL3RBQILTANCNFSM4KQXMTGA>
.
|
will do |
Related issue: #1314
Type of change: bug report
Impact: API modification
Development Phase: proposal
Release Notes
if instantiating a
Mux1H(sel: UInt, in: UInt)
whenin.getWidth
==1, do the same behavior as instantiating aMux1H(sel.asBools, in.asBools)
: ignore the select and connect the input directly to the output