1 # SPDX-License-Identifier: LGPL-2.1-or-later
2 # See Notices.txt for copyright information
4 from nmutil
.singlepipe
import SimpleHandshake
5 from nmutil
.dynamicpipe
import DynamicPipe
, SimpleHandshakeRedir
9 """ Pipeline Specification base class.
11 :attribute width: the IEEE754 FP bitwidth
12 :attribute id_wid: the Reservation Station muxid bitwidth
13 :attribute op_wid: an "operand bitwidth" passed down all stages
14 :attribute opkls: an optional class that is instantiated as the "operand"
16 See ieee754/fpcommon/getop FPPipeContext for how (where) PipelineSpec
17 is used. FPPipeContext is passed down *every* stage of a pipeline
18 and contains the Reservation Station multiplexer ID as well as
19 an optional "operand". This "operand" may be used to *change*
20 the behaviour of the pipeline. In RISC-V terminology it would
21 typically be set to e.g. funct7 or parts thereof.
25 def __init__(self
, width
, id_width
, op_wid
=0, opkls
=None, pipekls
=None):
26 """ Create a PipelineSpec. """
28 self
.id_wid
= id_width
31 self
.pipekls
= pipekls
or SimpleHandshakeRedir
33 self
.core_config
= None
35 self
.n_comb_stages
= None