Delete log messages in power_fields and power_fieldsn
authorMichael Nolan <mtnolan2640@gmail.com>
Fri, 20 Mar 2020 14:41:18 +0000 (10:41 -0400)
committerMichael Nolan <mtnolan2640@gmail.com>
Fri, 20 Mar 2020 14:41:18 +0000 (10:41 -0400)
src/soc/decoder/power_fields.py
src/soc/decoder/power_fieldsn.py

index aabf591af34a0eee7a6aa697fd89b6ffe998dcb5..36ad6d68905db9cb854221ca036f8cf930fed3b9 100644 (file)
@@ -33,7 +33,6 @@ def decode_form_header(hdr):
     res = {}
     count = 0
     hdr = hdr.strip()
-    print (hdr.split('|'))
     for f in hdr.split("|"):
         if not f:
             continue
@@ -56,7 +55,6 @@ def decode_line(header, line):
     line = line.strip()
     res = {}
     count = 0
-    print ("line", line)
     prev_fieldname = None
     for f in line.split("|"):
         if not f:
@@ -82,7 +80,6 @@ def decode_line(header, line):
 def decode_form(form):
     header = decode_form_header(form[0])
     res = []
-    print ("header", header)
     for line in form[1:]:
         dec = decode_line(header, line)
         if dec:
@@ -165,7 +162,6 @@ class DecodeFields:
         forms = {}
         reading_data = False
         for l in txt:
-            print ("line", l)
             l = l.strip()
             if len(l) == 0:
                 continue
@@ -180,7 +176,6 @@ class DecodeFields:
                 #if heading.startswith('1.6.28'): # skip instr fields for now
                     #break
                 heading = heading.split(' ')[-1]
-                print ("heading", heading)
                 reading_data = True
                 forms[heading] = []
 
@@ -188,7 +183,6 @@ class DecodeFields:
         inst = {}
 
         for hdr, form in forms.items():
-            print ("heading", hdr)
             if heading == 'Fields':
                 i = decode_instructions(form)
                 for form, field in i.items():
@@ -225,19 +219,3 @@ if __name__ == '__main__':
     dec = DecodeFields()
     dec.create_specs()
     forms, instrs = dec.forms, dec.instrs
-    for hdr, form in forms.items():
-        print ()
-        print (hdr)
-        for k, v in form.items():
-            #print ("line", l)
-            #for k, v in l.items():
-            print ("%s: %d-%d" % (k, v[0], v[1]))
-    for form, field in instrs.items():
-        print ()
-        print (form)
-        for f, vals in field.items():
-            print ("    ", f, vals)
-    print (dec.FormX)
-    print (dec.FormX.A)
-    print (dir(dec.FormX))
-    print (dec.FormX._fields)
index 819c40deac9c9b4f00dc2cdd859bc0e8ff3df4a3..1a639a3d6969f565ff86ab2cccdf027b6d5a5919 100644 (file)
@@ -15,10 +15,8 @@ class SignalBitRange(BitRange):
 
     def __getitem__(self, subs):
         # *sigh* field numberings are bit-inverted.  PowerISA 3.0B section 1.3.2
-        print ("SignalBitRange", subs, len(self), self.items())
         if isinstance(subs, slice):
             res = []
-            print (subs)
             start, stop, step = subs.start, subs.stop, subs.step
             if step is None:
                 step = 1
@@ -30,11 +28,9 @@ class SignalBitRange(BitRange):
                 start = len(self) + start + 1
             if stop < 0:
                 stop = len(self) + stop + 1
-            print ("range", start, stop, step)
             for t in range(start, stop, step):
                 t = len(self) - 1 - t # invert field back
                 k = OrderedDict.__getitem__(self, t)
-                print ("t", t, k)
                 res.append(self.signal[self._rev(k)]) # reverse-order here
             return Cat(*res)
         else:
@@ -44,7 +40,6 @@ class SignalBitRange(BitRange):
             k = OrderedDict.__getitem__(self, subs)
             return self.signal[self._rev(k)] # reverse-order here
 
-        print ("translated", subs, translated)
 
 
 class SigDecode(Elaboratable):