We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
These should be identical, and indeed they are in Python:
class OK(Module): def __init__(self): self.a = Signal(8) self.b = Signal(8) self.c = Signal() self.comb += \ self.c.eq((self.a == 0) & (self.b == 0)) class NG(Module): def __init__(self): self.a = Signal(8) self.b = Signal(8) self.c = Signal() self.comb += \ self.c.eq(self.a == self.b == 0) print(verilog.convert(OK())) # assign c = ((a == 1'd0) & (b == 1'd0)); print(verilog.convert(NG())) # assign c = (a == b); a = b = 0 print(a == b == 0) # True a = b = 1 print(a == b == 0) # False
The text was updated successfully, but these errors were encountered:
Triage: fixed in nMigen, where a chained comparison is an error (throws TypeError: Attempted to convert nMigen value to boolean).
TypeError: Attempted to convert nMigen value to boolean
Sorry, something went wrong.
No branches or pull requests
These should be identical, and indeed they are in Python:
The text was updated successfully, but these errors were encountered: