-
Notifications
You must be signed in to change notification settings - Fork 586
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
BoringUtils + when/layer/region produces invalid FIRRTL #4108
Comments
cc #3523 . FWIW FIRRTL also doesn't make it possible to wire some things together at least not without basically "lowering" when's on-the-fly to get something we can wire. Example: when cond:
inst f of Foo
else:
inst b of Bar Wiring from something within "Foo" to something within "Bar" can't easily be done as we lack a mechanism to send a signal out from under a This is somewhat separate from the issue I reported above, that's more about BoringUtils and Chisel IR not being well-suited to putting the new For a bit of completeness, we could actually -- for passive and at least hardware-y (not probes or properties) -- with a bit of tricker accomplish this -- we probe a value, use wire bounce : Probe<UInt<5>>
when cond:
inst f of Foo
define bounce = probe(f.bored_signal)
else:
inst b of Bar
connect b.bored_signal, read(bounce) Anyway. |
While this was hugely problematic previously, this is much easier now with the addition of I think this can be made to work by:
This doesn't solve everything, specifically boring out of a This can go further and create the commands directly in the appropriate region. This is cleaner, IMO, but drew the ire of reviewers last time. |
Type of issue: Bug Report
Please provide the steps to reproduce the problem:
Consider these tests: dtzSiFive@d8a3f12 .
Steps to reproduce are to checkout that branch / apply that commit and run the tests.
What is the current behavior?
The tests fail due to generating invalid FIRRTL because BoringUtils appends connect statements to the end where not all declarations are visible.
Example FIRRTL for the layer test example:
connect bar.out_bore, out_bore
is invalid,bar
is only visible within the layer.What is the expected behavior?
Boring produces diagnostic instead of illegal FIRRTL (as reasonable), and for probes this should work.
Other Information
Encountered this migrating to boring probes, specifically involving a layer.
What is the use case for changing the behavior?
The text was updated successfully, but these errors were encountered: