-
Notifications
You must be signed in to change notification settings - Fork 592
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
Use firrtl elses in elsewhen/otherwise case emission #510
Conversation
* false. | ||
*/ | ||
final class WhenContext(sourceInfo: SourceInfo, cond: Bool, prevCond: => Bool, block: => Unit) { | ||
final class WhenContext(sourceInfo: SourceInfo, cond: Option[() => Bool], block: => Unit, depth: Int = 0) { |
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.
Add comment explaining new WhenContext behavior
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.
Maybe label depth
as firrtlDepth
case mod: DefModule => for (cmd <- mod.commands) { | ||
body ++= newline + emit(cmd, mod) | ||
case mod: DefModule => { | ||
val procMod = mod.copy(commands = processWhens(mod.commands)) |
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.
Add comment explaining the post-processing of the whens
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.
Did you follow through with the check that DC QoR is not negatively affected by this change?
6fcb327
to
214815d
Compare
081bedd
to
85881f3
Compare
85881f3
to
24017e0
Compare
Preprocess chisel3 IR before emission to determing whether whens have alternatives.
chipsalliance/firrtl#601 now transforms the code generated under this PR to have the same expanded mux tree structure as the prior when emission style. |
I have run DC with recent rocket-chip + FPU and as far as I can tell, this PR does not cause a QoR regression. Reason why results are different from past experiments is unclear, but I think we should move forward with this. Not only does it enable the invalidate API, it also improves coverage. |
With the added emission patch (#601) or just as is?
…On Thu, Aug 3, 2017 at 11:27 AM, Jack Koenig ***@***.***> wrote:
I have run DC with recent rocket-chip + FPU and as far as I can tell, this
PR does not cause a QoR regression. Reason why results are different from
past experiments is unclear, but I think we should move forward with this.
Not only does it enable the invalidate API, it also improves coverage.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#510 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABBsFOxuTvAVH7Ii0b0vCLZGGrZvvokSks5sUhESgaJpZM4MBPdI>
.
|
As is, I just merged this branch into the branch of chisel3 being used by rocket-chip, no changes to firrtl. |
There have been lots of changes to rocket-chip in the last few weeks, especially to critical paths. I suspect these changes may have removed the problematic path(s). |
This changes Chisel3's firrtl emission to use nested firrtl
when
andelse
statements for chiselwhen
,elsewhen
, andotherwise
blocks.There is something of a naming confusion with 132b80e, which adds a counter to keep track of the depth of the chisel
when
"level." This branch keeps track of the firrtlwhen
nesting with a similarly named depth, which does not hold the same value.The two features could potentially be combined, especially given that
Builder.whenDepth
is only ever checked for nonzero values.Tested with chipsalliance/rocket-chip@abe344a, chipsalliance/firrtl@8f3c7d3