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
The following code snippet does not produce a syntax error and in fact generates without any complaints at all (not sure what the effect is):
s = Signal() with m.If(1): with m.Elif(2): m.d.comb += s.eq(3)
I would expect it to raise nmigen.hdl.dsl.SyntaxError: Elif without preceding If like the following snippet does:
nmigen.hdl.dsl.SyntaxError: Elif without preceding If
s = Signal() with m.Elif(4): m.d.comb += s.eq(5)
The text was updated successfully, but these errors were encountered:
The effect is this:
(switch (cat (sig b) (sig a)) (case -1 (eq (sig s) (const 1'd1))) (case 1- ))
so basically (converting back to the notation in your example):
with m.If(2): m.d.comb += s.eq(3)
which is pretty weird indeed, and most certainly not remotely what you intended. Great catch!
Sorry, something went wrong.
9d62cbe
No branches or pull requests
The following code snippet does not produce a syntax error and in fact generates without any complaints at all (not sure what the effect is):
I would expect it to raise
nmigen.hdl.dsl.SyntaxError: Elif without preceding If
like the following snippet does:The text was updated successfully, but these errors were encountered: