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 300717209fec80b1698de5a092c49d6e330f6290..dbb76155d264dee887df5dc2c9bda7cf03bb012c 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()