1 from nmigen
import Signal
, Const
2 from ieee754
.fpcommon
.getop
import FPPipeContext
3 from soc
.fu
.pipe_data
import IntegerData
, CommonPipeSpec
4 from soc
.fu
.alu
.alu_input_record
import CompALUOpSubset
# TODO: replace
7 class CRInputData(IntegerData
):
8 regspec
= [('INT', 'a', '0:63'),
10 def __init__(self
, pspec
):
11 super().__init
__(pspec
)
12 self
.a
= Signal(64, reset_less
=True) # RA
13 self
.cr
= Signal(32, reset_less
=True) # CR in
16 yield from super().__iter
__()
22 return lst
+ [self
.a
.eq(i
.a
),
25 class CROutputData(IntegerData
):
26 regspec
= [('INT', 'o', '0:63'),
28 def __init__(self
, pspec
):
29 super().__init
__(pspec
)
30 self
.o
= Signal(64, reset_less
=True) # RA
31 self
.cr
= Signal(32, reset_less
=True, name
="cr_out") # CR in
34 yield from super().__iter
__()
40 return lst
+ [self
.o
.eq(i
.o
),
43 # TODO: replace CompALUOpSubset with CompCROpSubset
44 class CRPipeSpec(CommonPipeSpec
):
45 regspec
= (CRInputData
.regspec
, CROutputData
.regspec
)
46 opsubsetkls
= CompALUOpSubset