From 16807ecfa664ed92e892c9a00d52569ed014494d Mon Sep 17 00:00:00 2001 From: Jean THOMAS Date: Mon, 15 Jun 2020 15:34:37 +0200 Subject: [PATCH] nMigen workaround: put default case at the end of the Switch --- gram/core/crossbar.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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: -- 2.30.2