switch to exact version of cython
[ieee754fpu.git] / src / ieee754 / fpcommon / normtopack.py
1 """IEEE754 Floating Point Pipeline
2
3 Copyright (C) 2019 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
4
5 """
6
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
12
13
14 class FPNormToPack(PipeModBaseChain):
15
16 def __init__(self, pspec, e_extra=False):
17 self.e_extra = e_extra
18 super().__init__(pspec)
19
20 def get_chain(self):
21 """ gets chain of modules
22 """
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)
28
29 return [nmod, rmod, cmod, pmod]