fix bit inversion on CSV/PY exports
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Sat, 21 Jun 2014 17:06:47 +0000 (19:06 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Sat, 21 Jun 2014 17:06:47 +0000 (19:06 +0200)
miscope/host/dump.py

index 8d9366e911b1b52214b85f590a94df1e142b4840..eef6e0572abf81f848bf99cad6c726277ca4d8ae 100644 (file)
@@ -21,7 +21,7 @@ def get_bits(values, width, low, high=None):
                        t = t[low]
                else:
                        t = t[low:high]
-               t = t[::1]
+               t = t[::-1]
                t = int(t,2)
                r.append(t)
        return r
@@ -89,7 +89,7 @@ class Var:
                try : 
                        if self.values[cnt+1] != self.val:
                                r += "b"
-                               r += dec2bin(self.values[cnt+1], self.width)[::-1]
+                               r += dec2bin(self.values[cnt+1], self.width)
                                r += " "
                                r += self.vcd_id
                                r += "\n"