print regfile on only 4 lines
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 4 Apr 2020 21:04:52 +0000 (22:04 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 4 Apr 2020 21:04:52 +0000 (22:04 +0100)
src/soc/decoder/isa/caller.py

index d83d3354d8575821d20f50a67fafa10a28e026f7..de54143b5ee2833cfa997cb34acbeaa75f354482 100644 (file)
@@ -63,9 +63,12 @@ class GPR(dict):
         return self.regfile[rnum]
 
     def dump(self):
-        for i in range(len(self)):
-            print("reg", i, hex(self[i].value))
-
+        for i in range(0, len(self), 8):
+            s = []
+            for j in range(8):
+                s.append("%08x" % self[i+j].value)
+            s = ' '.join(s)
+            print("reg", "%2d" % i, s)
 
 
 class ISACaller: