diff --git a/litex/soc/interconnect/wishbone.py b/litex/soc/interconnect/wishbone.py index 93a312668..7e8b78d7b 100644 --- a/litex/soc/interconnect/wishbone.py +++ b/litex/soc/interconnect/wishbone.py @@ -651,7 +651,7 @@ class SRAM(Module): # generate write enable signal if not read_only: self.comb += [port.we[i].eq(self.bus.cyc & self.bus.stb & self.bus.we & self.bus.sel[i]) - for i in range(4)] + for i in range(bus_data_width//8)] # address and data self.comb += [ port.adr.eq(self.bus.adr[:len(port.adr)]),