wishbone.SRAM: Support non-32bit wishbone widths.
authorTim 'mithro' Ansell <me@mith.ro>
Sun, 25 Nov 2018 20:56:37 +0000 (12:56 -0800)
committerTim 'mithro' Ansell <me@mith.ro>
Sun, 25 Nov 2018 20:56:37 +0000 (12:56 -0800)
litex/soc/interconnect/wishbone.py

index 93a3126683b428c59c289f28f5793d8c1d7f8d60..7e8b78d7b95f6a687bdb681ce97e1bfda2fd6dfe 100644 (file)
@@ -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)]),