From 63124af6a9356b6782daf6c032a9586f556ed464 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 4 Apr 2020 22:04:52 +0100 Subject: [PATCH] print regfile on only 4 lines --- src/soc/decoder/isa/caller.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/soc/decoder/isa/caller.py b/src/soc/decoder/isa/caller.py index d83d3354..de54143b 100644 --- a/src/soc/decoder/isa/caller.py +++ b/src/soc/decoder/isa/caller.py @@ -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: -- 2.30.2