From: Luke Kenneth Casson Leighton Date: Thu, 10 Sep 2020 15:50:43 +0000 (+0100) Subject: add docstring for PowerOp class X-Git-Tag: semi_working_ecp5~117 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b03590f58ad3267011ea9463cabba568e0e1c9ff;p=soc.git add docstring for PowerOp class --- 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()