cannot use shape()[0] - must use width property
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 19 Jul 2020 19:38:18 +0000 (20:38 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 19 Jul 2020 19:38:18 +0000 (20:38 +0100)
nmigen_soc/wishbone/sram.py

index 3007172..dbb7615 100644 (file)
@@ -86,8 +86,8 @@ class SRAM(Elaboratable):
                 wrport.addr.eq(self.bus.adr[:len(rdport.addr)]),
                 wrport.data.eq(self.bus.dat_w)
             ]
-            n_wrport = wrport.en.shape()[0]
-            n_bussel = self.bus.sel.shape()[0]
+            n_wrport = wrport.en.width
+            n_bussel = self.bus.sel.width
             assert n_wrport == n_bussel, "bus enable count %d " \
                     "must match memory wen count %d" % (n_wrport, n_bussel)
             wen = Signal()