From: Luke Kenneth Casson Leighton Date: Sat, 4 Apr 2020 21:04:52 +0000 (+0100) Subject: print regfile on only 4 lines X-Git-Tag: div_pipeline~1507 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=63124af6a9356b6782daf6c032a9586f556ed464;p=soc.git print regfile on only 4 lines --- 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: