switch to using Signal.width instead of Signal.shape()[0] since Shape isn't a tuple...
authorJacob Lifshay <programmerjake@gmail.com>
Fri, 10 Jul 2020 00:21:37 +0000 (17:21 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Fri, 10 Jul 2020 00:21:37 +0000 (17:21 -0700)
see https://github.com/nmigen/nmigen/pull/422

src/soc/decoder/power_fieldsn.py

index 6f1b0bae50fc269b67f4800792ca7b695f4e4d72..eefe929ea41290ea65aef4caaa85524780c41e40 100644 (file)
@@ -10,7 +10,7 @@ class SignalBitRange(BitRange):
         self.signal = signal
 
     def _rev(self, k):
-        width = self.signal.shape()[0]
+        width = self.signal.width
         return width-1-k
 
     def __getitem__(self, subs):