You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It was originally added to aid in the development of formal testbenches, but is obviously usable in any code:
m.d.comb+=Assert((self.depth>0).implies(~empty))
The problem with this operator is that it's bitwise and sign-extending, without warning (simply because the underlying logical operators are). This is extremely weird and it's difficult to see where this behavior would be desirable. In short, if premise and conclusion are both multi-bit, then the result is a logical OR of the arrow operator applied pairwise to each bit of the premise and conclusion.
What should we do with it? Options:
Deprecate and remove
Deprecate use with signed operands (even though x | y or x ^ y all accept signed operands)
Deprecate use with unequal length operands but allow signed operands
Cast both operands with .bool() like return ~premise.bool() | conclusion.bool()
This is a hard compatibility break, though we can probably do a deprecation cycle?
Something else
The text was updated successfully, but these errors were encountered:
We have discussed this issue on the 2024-04-15 core subsystem meeting. Only options (1) and (4) were considered by anyone present, and there weren't compelling reasons to pick option (4). As such Value.implies will be deprecated and removed.
Value.implies
is a rarely used and not well-known counterpart to__or__
,__xor__
, etc operators. It is defined as:It was originally added to aid in the development of formal testbenches, but is obviously usable in any code:
The problem with this operator is that it's bitwise and sign-extending, without warning (simply because the underlying logical operators are). This is extremely weird and it's difficult to see where this behavior would be desirable. In short, if
premise
andconclusion
are both multi-bit, then the result is a logical OR of the arrow operator applied pairwise to each bit of thepremise
andconclusion
.What should we do with it? Options:
x | y
orx ^ y
all accept signed operands).bool()
likereturn ~premise.bool() | conclusion.bool()
The text was updated successfully, but these errors were encountered: