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
withConditionalUpdate() ascondition:
withcondition(...):
...
withcondition(...):
...
etc.
Since the keywords and structure are intuitive, a common error may be to forget that each with statement takes a ConditionalUpdate object as argument (and not just a condition). E.g.,
withConditionalUpdate() ascondition:
with (...):
...
with (...):
...
etc.
Right now this throws AttributeError: __exit__, which is not helpful if you don't know what you did wrong. If possible, a better error message would be useful.
Here's a complete example that throws the error message:
importsyssys.path.append("..")
importpyrtla=pyrtl.WireVector(1)
b=pyrtl.WireVector(1)
c=pyrtl.WireVector(1)
withpyrtl.ConditionalUpdate() ascondition:
withcondition(a&b):
c |= 1with (a|b):
c |= 0
The text was updated successfully, but these errors were encountered:
With blocks should have the form
Since the keywords and structure are intuitive, a common error may be to forget that each
with
statement takes a ConditionalUpdate object as argument (and not just a condition). E.g.,Right now this throws
AttributeError: __exit__
, which is not helpful if you don't know what you did wrong. If possible, a better error message would be useful.Here's a complete example that throws the error message:
The text was updated successfully, but these errors were encountered: