-
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
Add implicit CompileOptions to Record and Bundle. Fixes #495 #595
Conversation
Helps distinguish between Records/Bundles defined in Chisel._ vs. chisel3._. Also override compilationOptions when bulk connecting Records/Bundles defined in Chisel._. This allows Records/Bundles defined in Chisel._ code to be correctly bulk connected in chisel3._ code.
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.
lgtm
Which implicit compile option is used when a Record method that takes a
compile option is called?
…On Wed, Apr 26, 2017 at 6:01 PM Richard Lin ***@***.***> wrote:
***@***.**** approved this pull request.
lgtm
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#595 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIL84tjpw0z_SiT707mDgtRKd2QjYJhnks5rz-j1gaJpZM4NJgb4>
.
|
According to https://stackoverflow.com/questions/5598085/where-does-scala-look-for-implicits, first looks in current scope. I think if there are multiple options in any of those priorities, the compiler will error out with an ambiguous implicit. I guess it's helpful that Record methods don't have implicit arguments, though superclass methods do. |
It seems that this isn't exactly doing what I wanted, so I'm taking another look. |
As discussed last week, not going to let the perfect be the enemy of the good. I'm going to merge this when updating passes Jenkins. This currently issues a Firrtl bulk connect whenever a Chisel._ Record/Bundle is used in chisel3._ code. The better proposed solution is to still do the standard chisel3._ bulk connect walk through leaf elements, but be a bit more permissive for Chisel._ bundles (eg. no explicit direction is Output). |
There appears to be a compilation issue with rocket-chip, debugging. |
False alarm, we good |
Helps distinguish between Records/Bundles defined in Chisel._ vs.
chisel3.. Also override compilationOptions when bulk connecting
Records/Bundles defined in Chisel.. This allows Records/Bundles defined
in Chisel._ code to be correctly bulk connected in chisel3._ code.