1 # IEEE Floating Point Adder (Single Precision)
2 # Copyright (C) Jonathan P Dawson 2013
5 #from nmigen.cli import main, verilog
7 from nmutil
.singlepipe
import StageChain
9 from ieee754
.fpcommon
.modbase
import FPModBaseChain
10 from ieee754
.fpcommon
.postcalc
import FPAddStage1Data
11 from ieee754
.fpcommon
.postnormalise
import FPNorm1ModSingle
12 from ieee754
.fpcommon
.roundz
import FPRoundMod
13 from ieee754
.fpcommon
.corrections
import FPCorrectionsMod
14 from ieee754
.fpcommon
.pack
import FPPackData
, FPPackMod
17 class FPNormToPack(FPModBaseChain
):
19 def __init__(self
, pspec
, e_extra
=False):
20 self
.e_extra
= e_extra
21 super().__init
__(pspec
)
24 """ gets chain of modules
26 # Normalisation, Rounding Corrections, Pack - in a chain
27 nmod
= FPNorm1ModSingle(self
.pspec
, e_extra
=self
.e_extra
)
28 rmod
= FPRoundMod(self
.pspec
)
29 cmod
= FPCorrectionsMod(self
.pspec
)
30 pmod
= FPPackMod(self
.pspec
)
32 return [nmod
, rmod
, cmod
, pmod
]