initialise unused PipelineSpec params to None
[ieee754fpu.git] / src / ieee754 / pipeline.py
1 # SPDX-License-Identifier: LGPL-2.1-or-later
2 # See Notices.txt for copyright information
3
4
5 class PipelineSpec:
6 """ Pipeline Specification base class.
7
8 :attribute width: the IEEE754 FP bitwidth
9 :attribute id_wid: the Reservation Station muxid bitwidth
10 :attribute op_wid: an "operand bitwidth" passed down all stages
11 :attribute opkls: an optional class that is instantiated as the "operand"
12
13 See ieee754/fpcommon/getop FPPipeContext for how (where) PipelineSpec
14 is used. FPPipeContext is passed down *every* stage of a pipeline
15 and contains the Reservation Station multiplexer ID as well as
16 an optional "operand". This "operand" may be used to *change*
17 the behaviour of the pipeline. In RISC-V terminology it would
18 typically be set to e.g. funct7 or parts thereof.
19
20 """
21
22 def __init__(self, width, id_width, op_wid=0, opkls=None):
23 """ Create a PipelineSpec. """
24 self.width = width
25 self.id_wid = id_width
26 self.op_wid = op_wid
27 self.opkls = opkls
28 self.core_config = None
29 self.fpformat = None
30 self.n_comb_stages = None