From: Jean THOMAS Date: Mon, 3 Aug 2020 15:51:43 +0000 (+0200) Subject: Fix native port we signal (fixes #44) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fb2577f1bb807b5c9388f5a2ad6cedb3e540ce84;p=gram.git Fix native port we signal (fixes #44) --- 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):