big convert g/s/r mid --> muxid
[ieee754fpu.git] / src / ieee754 / fpcommon / postcalc.py
1 # IEEE Floating Point Adder (Single Precision)
2 # Copyright (C) Jonathan P Dawson 2013
3 # 2013-12-12
4
5 from nmigen import Signal
6 from ieee754.fpcommon.fpbase import Overflow, FPNumBaseRecord
7 from ieee754.fpcommon.getop import FPBaseData
8
9 class FPAddStage1Data:
10
11 def __init__(self, width, pspec):
12 self.z = FPNumBaseRecord(width, False)
13 self.out_do_z = Signal(reset_less=True)
14 self.oz = Signal(width, reset_less=True)
15 self.of = Overflow()
16 self.ctx = FPBaseData(width, pspec)
17 self.muxid = self.ctx.muxid
18
19 def __iter__(self):
20 yield from self.z
21 yield self.out_do_z
22 yield self.oz
23 yield from self.of
24 yield from self.ctx
25
26 def eq(self, i):
27 return [self.z.eq(i.z), self.out_do_z.eq(i.out_do_z), self.oz.eq(i.oz),
28 self.of.eq(i.of), self.ctx.eq(i.ctx)]