From fb2577f1bb807b5c9388f5a2ad6cedb3e540ce84 Mon Sep 17 00:00:00 2001 From: Jean THOMAS Date: Mon, 3 Aug 2020 17:51:43 +0200 Subject: [PATCH] Fix native port we signal (fixes #44) --- gram/frontend/wishbone.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gram/frontend/wishbone.py b/gram/frontend/wishbone.py index 19bfb8f..44856bd 100644 --- a/gram/frontend/wishbone.py +++ b/gram/frontend/wishbone.py @@ -40,7 +40,7 @@ class gramWishbone(Peripheral, Elaboratable): with m.Switch(self.bus.adr & ratio_bitmask): for i in range(self.ratio): with m.Case(i): - m.d.comb += self.native_port.wdata.we.eq(Repl(self.bus.sel, self.bus.data_width//self.bus.granularity) << (self.ratio*i)) + m.d.comb += self.native_port.wdata.we.eq(Repl(self.bus.sel, self.bus.granularity//8) << (self.ratio*i)) with m.Switch(self.bus.adr & ratio_bitmask): for i in range(self.ratio): -- 2.30.2