-
Notifications
You must be signed in to change notification settings - Fork 597
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 Bug (HELP!) OneHotMux broken when used with FixedPoint #558
Comments
Could you provide the Firrtl for the two cases? |
Correct case:
Incorrect case:
|
I guess, for the Mux, a strict asUInt on the inputs isn't sufficient and you need to width/sign match first... Or rather -- why does this use UInt instead of SInt? |
I'm concerned about the type of A5 differing in the two cases. |
Oh crap. I didn't even notice that. Fundamentally, in one case, I'm forcing the input widths to all be the same and in the other case, I'm not, although that's theoretically not necessary, since the tools should know to auto pad properly... |
One more thing: The wrong output was: PEEK Borked.io_out_real -> 0.6591270565986633, Q3.24 Hard to see in bits, but it was definitely positive when it should've been negative... |
I believe something like this might fix it: https://gist.github.com/aswaterman/5c0aee3ef33179c4e821eaafc27c7e1d But this isn't quite complete, because it creates a crap ton of extra wires. @ducky64 @jackkoenig you might consider incorporating a patch like this, which only adds the wires for type conversions for inputs whose type differs from the output type. |
@shunshou This seems to fixed the BorkedSpec tests. I'll push it and let @ducky64 and/or @jackkoenig review |
Thx I'll give it a shot in a bit.
…On Fri, Mar 24, 2017 at 2:36 PM, Chick Markley ***@***.***> wrote:
@shunshou <https://github.com/shunshou> Andrew's fix is PR'd as #560
<#560>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#558 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGTTFoza-_qfH62VFlGwwwV4qI0U7sArks5rpDdrgaJpZM4Motpd>
.
|
Appears fixed by #573. |
Please fix ASAP! I reallyreallyreally would like this to work.
I spent a really long time figuring out why my circuit was working with DspReal but not with FixedPoint (and running into annoying issues like Mux not supporting different BP's, etc.), and I just can't afford to be spending this time debugging stuff on the Chisel side.
This works:
Only difference is I assign the constant to a Wire before feeding into the Mux1H (who would've thought that was necessary?)
The previous thing sometimes works (don't know what's the right/wrong condition).
Note that I've separately checked the internal C## constant values to make sure they're right. -- Separately @chick The day before yesterday, I ran into a serious Verilator-did-the-wrong-thing bug (which I have no idea how to get fixed..., since who do you even contact about Verilator bugs???), so I sanity checked against Firrtl-interpreter to make sure this was a Chisel bug. Firrtl-interpreter didn't seem to let me peek non-port signals. I could printf, but printf returned the LongBits version instead of some easy to understand Double. Punching signals out was a huge pain.
The text was updated successfully, but these errors were encountered: