1 """IEEE754 Floating Point Pipeline
3 Copyright (C) 2019 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
7 from nmutil
.pipemodbase
import PipeModBaseChain
8 from ieee754
.fpcommon
.postnormalise
import FPNorm1ModSingle
9 from ieee754
.fpcommon
.roundz
import FPRoundMod
10 from ieee754
.fpcommon
.corrections
import FPCorrectionsMod
11 from ieee754
.fpcommon
.pack
import FPPackMod
14 class FPNormToPack(PipeModBaseChain
):
16 def __init__(self
, pspec
, e_extra
=False):
17 self
.e_extra
= e_extra
18 super().__init
__(pspec
)
21 """ gets chain of modules
23 # Normalisation, Rounding Corrections, Pack - in a chain
24 nmod
= FPNorm1ModSingle(self
.pspec
, e_extra
=self
.e_extra
)
25 rmod
= FPRoundMod(self
.pspec
)
26 cmod
= FPCorrectionsMod(self
.pspec
)
27 pmod
= FPPackMod(self
.pspec
)
29 return [nmod
, rmod
, cmod
, pmod
]