From b03590f58ad3267011ea9463cabba568e0e1c9ff Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 10 Sep 2020 16:50:43 +0100 Subject: [PATCH] add docstring for PowerOp class --- src/soc/decoder/power_decoder.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) 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() -- 2.30.2