From: Jean THOMAS Date: Mon, 15 Jun 2020 13:34:37 +0000 (+0200) Subject: nMigen workaround: put default case at the end of the Switch X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=16807ecfa664ed92e892c9a00d52569ed014494d;p=gram.git nMigen workaround: put default case at the end of the Switch --- diff --git a/gram/core/crossbar.py b/gram/core/crossbar.py index 2b8d116..70d2afb 100644 --- a/gram/core/crossbar.py +++ b/gram/core/crossbar.py @@ -211,17 +211,17 @@ class gramCrossbar(Elaboratable): # Route data writes ------------------------------------------------------------------------ with m.Switch(Cat(*master_wdata_readys)): - with m.Case(): - m.d.comb += [ - controller.wdata.eq(0), - controller.wdata_we.eq(0), - ] for nm, master in enumerate(self.masters): with m.Case(2**nm): m.d.comb += [ controller.wdata.eq(master.wdata.data), controller.wdata_we.eq(master.wdata.we), ] + with m.Case(): + m.d.comb += [ + controller.wdata.eq(0), + controller.wdata_we.eq(0), + ] # Route data reads ------------------------------------------------------------------------- for master in self.masters: