from openpower.exceptions import LDSTException
from openpower.decoder.power_svp64_rm import sv_input_record_layout
+from openpower.util import log
class Data(Record):
self.write_cr = Data(7, name="cr_out")
# decode operand data
- print ("decode2execute init", name, opkls, do)
+ log ("decode2execute init", name, opkls, do)
#assert name is not None, str(opkls)
if do is not None:
self.do = do
from openpower.decoder.power_fieldsn import SigDecode, SignalBitRange
from openpower.decoder.power_svp64 import SVP64RM
+from openpower.util import log
+
# key data structure in which the POWER decoder is specified,
# in a hierarchical fashion
Subdecoder = namedtuple( # fix autoformatter
if row['CR in'] == '1':
import pdb
pdb.set_trace()
- print(row)
+ log(row)
if row['CR out'] == '0':
import pdb
pdb.set_trace()
- print(row)
- print(row)
+ log(row)
+ log(row)
ldst_mode = row['upd']
if ldst_mode.isdigit():
row['upd'] = int(ldst_mode)
val = ptype[val]
res.append(getattr(self, field).eq(val))
if False:
- print(row.keys())
+ log(row.keys())
asmcode = row['comment']
# process the comment field, strip out "equals" for FP
if "=" in asmcode:
asmcode = asmcode.split("=")[-1]
- print ("asmcode stripping =", asmcode,
+ log ("asmcode stripping =", asmcode,
asmcode in asmidx, hasattr(self, "asmcode"))
if hasattr(self, "asmcode") and asmcode in asmidx:
res.append(self.asmcode.eq(asmidx[asmcode]))
name=mname,
col_subset=self.col_subset,
row_subset=self.row_subsetfn)
- print ("subdecoder", mname, subdecoder)
+ log ("subdecoder", mname, subdecoder)
if not subdecoder.tree_analyse(): # doesn't do anything
- print ("analysed, DELETING", mname)
+ log ("analysed, DELETING", mname)
del subdecoder
continue # skip
submodules[mname] = subdecoder
subsetting of the PowerOp decoding is possible by setting col_subset
"""
- print ("create_pdecode", name, col_subset, row_subset, include_fp)
+ log ("create_pdecode", name, col_subset, row_subset, include_fp)
# some alteration to the CSV files is required for SV so we use
# a class to do it
# row subset
def rowsubsetfn(opcode, row):
- print("row_subset", opcode, row)
+ log("row_subset", opcode, row)
return row['unit'] == 'FPU'
pdecode = create_pdecode(name="rowsub",
FastRegsEnum, XERRegsEnum, TT)
from openpower.state import CoreState
-from openpower.util import spr_to_fast
+from openpower.util import (spr_to_fast, log)
def decode_spr_num(spr):
for k, v in record_names.items():
if hasattr(do, k):
subset.add(v)
- print ("get_col_subset", self.fn_name, do.fields, subset)
+ log ("get_col_subset", self.fn_name, do.fields, subset)
return subset
def rowsubsetfn(self, opcode, row):
regfile, regname, _ = cu.get_in_spec(idx)
rdflag, read = regspec_decode_read(e, regfile, regname)
rdl.append(rdflag)
- print("rdflags", rdl)
+ log("rdflags", rdl)
return Cat(*rdl)