1 """IEEE754 Floating Point Multiplier Pipeline
3 Copyright (C) 2019 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
7 from nmigen
import Signal
9 from ieee754
.fpcommon
.fpbase
import FPNumBaseRecord
10 from ieee754
.fpcommon
.getop
import FPPipeContext
13 class FPMulStage0Data
:
15 def __init__(self
, pspec
):
17 self
.z
= FPNumBaseRecord(width
, False)
18 self
.out_do_z
= Signal(reset_less
=True)
19 self
.oz
= Signal(width
, reset_less
=True)
20 mw
= (self
.z
.m_width
)*2 - 1 + 3 # sticky/round/guard bits + (2*mant) - 1
21 self
.product
= Signal(mw
, reset_less
=True)
22 self
.ctx
= FPPipeContext(pspec
)
23 self
.muxid
= self
.ctx
.muxid
26 return [self
.z
.eq(i
.z
), self
.out_do_z
.eq(i
.out_do_z
), self
.oz
.eq(i
.oz
),
27 self
.product
.eq(i
.product
), self
.ctx
.eq(i
.ctx
)]