1 """IEEE754 Floating Point Adder Pipeline
3 Copyright (C) 2019 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
7 from nmigen
import Module
8 from nmigen
.cli
import main
, verilog
10 from nmutil
.singlepipe
import StageChain
11 from ieee754
.pipeline
import DynamicPipe
13 from ieee754
.fpcommon
.denorm
import FPSCData
14 from ieee754
.fpcommon
.postcalc
import FPAddStage1Data
15 from ieee754
.fpadd
.align
import FPAddAlignSingleMod
16 from ieee754
.fpadd
.add0
import FPAddStage0Mod
17 from ieee754
.fpadd
.add1
import FPAddStage1Mod
20 class FPAddAlignSingleAdd(DynamicPipe
):
22 def __init__(self
, pspec
):
24 super().__init
__(pspec
)
27 return FPSCData(self
.pspec
, True)
30 return FPAddStage1Data(self
.pspec
) # AddStage1 ospec
32 def setup(self
, m
, i
):
33 """ links module to inputs and outputs
36 # chain AddAlignSingle, AddStage0 and AddStage1
37 mod
= FPAddAlignSingleMod(self
.pspec
)
38 a0mod
= FPAddStage0Mod(self
.pspec
)
39 a1mod
= FPAddStage1Mod(self
.pspec
)
41 chain
= StageChain([mod
, a0mod
, a1mod
])