X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fsoc%2Fdecoder%2Fpower_decoder.py;fp=src%2Fsoc%2Fdecoder%2Fpower_decoder.py;h=39030cbcffe475bd0a37e7dbe587099db09150ae;hb=b03590f58ad3267011ea9463cabba568e0e1c9ff;hp=d01d42b80680d2ef5957ea52344f22a30fdbb838;hpb=cecedc22c465c78f32b6a801a262b190f7109059;p=soc.git diff --git a/src/soc/decoder/power_decoder.py b/src/soc/decoder/power_decoder.py index d01d42b8..39030cbc 100644 --- a/src/soc/decoder/power_decoder.py +++ b/src/soc/decoder/power_decoder.py @@ -144,6 +144,7 @@ power_op_csvmap = {'function_unit': 'unit', 'cry_in' : 'cry in', } + def get_pname(field, pname): if pname is None: return field @@ -151,17 +152,10 @@ def get_pname(field, pname): class PowerOp: - """PowerOp: spec for execution. op type (ADD etc.) reg specs etc. - - this is an internal data structure, set up by reading CSV files - (which uses _eq to initialise each instance, not eq) - - the "public" API (as far as actual usage as a useful decoder is concerned) - is Decode2ToExecute1Type - - the "subset" allows for only certain columns to be decoded + """PowerOp - a dynamic class that stores (subsets of) CSV rows of data + about a PowerISA instruction. this is a "micro-code" expanded format + which generates an awful lot of wires, hence the subsetting """ - def __init__(self, incl_asm=True, name=None, subset=None): self.subset = subset debug_report = set()