From: Luke Kenneth Casson Leighton Date: Sun, 14 Jul 2019 09:02:56 +0000 (+0100) Subject: document PipelineSpec X-Git-Tag: ls180-24jan2020~845 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c574ea5ba019f0df2d16368447918f4427bf1c69;p=ieee754fpu.git document PipelineSpec --- diff --git a/src/ieee754/pipeline.py b/src/ieee754/pipeline.py index c7446337..f914e978 100644 --- a/src/ieee754/pipeline.py +++ b/src/ieee754/pipeline.py @@ -5,14 +5,23 @@ class PipelineSpec: """ Pipeline Specification base class. - :attribute width: FIXME: document - :attribute id_wid: FIXME: document - :attribute op_wid: FIXME: document + :attribute width: the IEEE754 FP bitwidth + :attribute id_wid: the Reservation Station muxid bitwidth + :attribute op_wid: an "operand bitwidth" passed down all stages + :attribute opkls: an optional class that is instantiated as the "operand" + + See ieee754/fpcommon/getop FPPipeContext for how (where) PipelineSpec + is used. FPPipeContext is passed down *every* stage of a pipeline + and contains the Reservation Station multiplexer ID as well as + an optional "operand". This "operand" may be used to *change* + the behaviour of the pipeline. In RISC-V terminology it would + typically be set to e.g. funct7 or parts thereof. + """ - def __init__(self, width, id_width, opcode_width): + def __init__(self, width, id_width, op_wid=0, opkls=None): """ Create a PipelineSpec. """ self.width = width self.id_wid = id_width - self.op_wid = opcode_width - self.opkls = None + self.op_wid = op_wid + self.opkls = opkls