-
Notifications
You must be signed in to change notification settings - Fork 614
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 Property expressions, starting with addition. #3810
Conversation
Opening a draft to share an early cut of this. The first commit shows the one time effort to support Property expressions, and new kinds of Property expressions can be added pretty easily similar to the second commit. |
Is there any firrtl spec for it? Looks like an essential feature for property propagation |
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.
Exciting! Maybe add a sentence to the Property explanations doc?
Yes, FIRRTL spec and explanation docs are incoming. |
78b68a5
to
c3a35ed
Compare
Ok, I have updated the implementation slightly. The APIs for creating Property expressions now immediately create a temp wire and propassign the expression into it, returning the wire for use in other Property expressions. I think this is the output we are looking for, but I'm curious for feedback on the internal implementation. I still kept the new PropExprBinding and PropExpr as an internal data structures that we can use instead of creating Nodes internally. Does this make sense given our goals? I've looked at how DefPrim works and is converted, and I'm not sure if we want to treat property expressions like a "command", or not. |
Separately, I'll write some docs for this new feature. |
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.
I don't like putting information that traditionally goes in _ref
inside of the Binding, let's meet to chat about how we should do this.
I'm not sure if this is exactly what you meant, but I realized what you're saying about the binding being redundant. In fe3224b I removed the binding and changed I guess my broader question is still whether it makes sense to have a separate IR node for PropExpr, which is an Arg but doesn't ever get named. I think it makes sense if we don't want to treat Property expressions as a command that defines a Node. But I'm still kind of curious if this is the best way to factor this if we don't want to create Nodes in the textual FIRRTL for Property expressions. |
31016b4
to
1e04e27
Compare
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, please see comment about sealing PropertyArithmeticOps
and other suggestions.
This allows Properties to be used to build up expressions in terms of input Properties and literals. (cherry picked from commit 11844a4)
This allows Properties to be used to build up expressions in terms of input Properties and literals. (cherry picked from commit 11844a4) Co-authored-by: Mike Urbach <[email protected]>
This allows Properties to be used to build up expressions in terms of input Properties and literals.
Contributor Checklist
docs/src
?Type of Improvement
Desired Merge Strategy
Release Notes
This allows Properties to be used to build up expressions in terms of input Properties and literals.
Reviewer Checklist (only modified by reviewer)
3.6.x
,5.x
, or6.x
depending on impact, API modification or big change:7.0
)?Enable auto-merge (squash)
, clean up the commit message, and label withPlease Merge
.Create a merge commit
.