comment reverse-order of bit-fields
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 18 Mar 2020 16:06:30 +0000 (16:06 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 18 Mar 2020 16:06:30 +0000 (16:06 +0000)
src/soc/decoder/power_fieldsn.py

index a5e03a114ec54d915deb13f20c99e8ab59078dc5..8a12e40dab85122a2ac7be633d001e50e7565e94 100644 (file)
@@ -32,11 +32,11 @@ class SignalBitRange(BitRange):
             for t in range(start, stop, step):
                 k = OrderedDict.__getitem__(self, t)
                 print ("t", t, k)
-                res.append(self.signal[width-k-1])
+                res.append(self.signal[width-k-1]) # reverse-order here
             return Cat(*res)
         else:
             k = OrderedDict.__getitem__(self, subs)
-            return self.signal[width-k-1]
+            return self.signal[width-k-1] # reverse-order here
 
         print ("translated", subs, translated)