From f75a0163f9edceedb763bf18008f2e375f6dcdc8 Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 1 Jul 2019 01:53:56 +0000 Subject: [PATCH] back.rtlil: fix Array regression in 32446831. Fixes #117. --- nmigen/back/rtlil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.30.2