-
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
Support Analog DontCare bulk-connect #1056
Conversation
Generally looks good. Thanks Richard for looking into this. A few comments/questions:
|
I'm not sure why It looks like But definitely worth a discussion on whether we can unify behavior. |
Semantics currently (ignoring
What should semantics be?
|
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.
this PR by itself seems OK to me, can always clarify semantics in future work
Resolutions from today's dev meeting:
|
MonoConnect rules
BiConnect rules
Other notes
|
Resolution: add test cases (@ucbjrl) of current connect semantics, then we can discuss what Analog DontCare should do. Fun fact: you can UInt <> Clock in Chisel, though that gets caught in FIRRTL |
While we're talking about connect semantics, another edge case to consider: should |
0d701d4
to
982a22a
Compare
* Provide explicit type to ChiselPropSpec.generatorDrivenConfig * Add exceptions for attempts to mono connect Analog to anything other than DontCare. * Add VerifyConnectionProperties tests to verify connection properties and build spreadsheets of same.
I believe this is good to go. API refinement and internal refactoring can wait fora future release. |
Should VerifyConnectionProperties be in a separate PR? |
Resolution from today's meeting: merge Analog changes as an immediate-term patch, the test should be its own separate PR |
Move VerifyConnectionProperties.scala from #1056 to its own PR.
Move VerifyConnectionProperties.scala from #1056 to its own PR.
…ion (#1056) * Add serialization support for LoadMemoryFileType in LoadMemoryAnnotation Add custom LoadMemoryFileTypeSerializer. Add test to verify LoadMemoryAnnotation can be correctly serialized/deserialized. * Simplify and focus LoadMemoryAnnotation serialization/deserialization. Respond to comments on earlier implementations. * Add type FileType definition for current chisel3 code.
Exactly what it says on the tin.
Root cause is that Analog and DontCare are both subtypes of Element, so it takes the Element <> Element path in BiConnect.connect, it makes stronger assumptions about Element than Analog and DontCare provides (particularly, assumes Element is unidirectional). Improving the type system so that these guarantees can be made more explicit (eg UnidirectionalElement or something, or matching on Bits subtypes) might allow the type checker to categorically detect these kinds of bugs, but that's something for discussion and/or a future PR.
Actual behavior (in Chisel; FIRRTL may do more checks) with regards to DontCare (and also Analog in general) seems to be an inconsistent mess, and this PR only slightly patches up things. Here are the cases:
Analog <> Analog
: each Analog is checked to make sure it isn't part of multiple BiConnects. Implementation looks like a bit of a hack, Analog stores biConnectLocs. Perhaps this should be delegated to FIRRTL?Analog <> DontCare
: this PR adds the no-multiple-BiConnect check to be consistent with BiConnect.Analog := DontCare
: currently legal, but does not contribute to the no-multiple-BiConnect check (so it's inconsistent - this this appears to be an edge case that also got lumped on the Element := Element path)). Should we even allow Analog as part of MonoConnect?attach(Analog*)
: there is no check against an Analog being part of multiple attach operations. I think you can BiConnect an Analog and also have it be part of one or more attach statements.Perhaps not completely unexpected that another bugfix went deep into the rabbit hole...
Related issue: Fixes #882
Type of change: bug fix
Impact: API addition (no impact on existing code)
Development Phase: implementation
Release Notes
Allow Analog <> DontCare, DontCare <> Analog