From: whitequark Date: Mon, 1 Jul 2019 01:53:56 +0000 (+0000) Subject: back.rtlil: fix Array regression in 32446831. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1679432892388728c88563e4bd28fd080a7ef3b8;p=nmigen.git back.rtlil: fix Array regression in 32446831. Fixes #117. --- diff --git a/nmigen/back/rtlil.py b/nmigen/back/rtlil.py index 1fce29e..602d1c3 100644 --- a/nmigen/back/rtlil.py +++ b/nmigen/back/rtlil.py @@ -658,7 +658,7 @@ class _StatementCompiler(xfrm.StatementVisitor): tests = ["{:0{}b}".format(v, bits) for v in legalize.branches] tests[-1] = "-" * bits for branch, test in zip(legalize.branches, tests): - with self.case(switch, test): + with self.case(switch, (test,)): branch_value = ast.Const(branch, (bits, sign)) with self.state.expand_to(legalize.value, branch_value): super().on_statement(stmt)