1 from soc
.fu
.alu
.alu_input_record
import CompLDSTOpSubset
2 from soc
.fu
.pipe_data
import IntegerData
5 class LDSTInputData(IntegerData
):
6 regspec
= [('INT', 'ra', '0:63'), # RA
7 ('INT', 'rb', '0:63'), # RB/immediate
8 ('INT', 'rc', '0:63'), # RC
9 ('XER', 'xer_so', '32')] # XER bit 32: SO
11 def __init__(self
, pspec
):
12 super().__init
__(pspec
, False)
17 class LDSTOutputData(IntegerData
):
18 regspec
= [('INT', 'o', '0:63'), # RT
19 ('INT', 'o1', '0:63'), # RA (effective address, update mode)
20 ('CR', 'cr_a', '0:3'),
21 ('XER', 'xer_so', '32')]
22 def __init__(self
, pspec
):
23 super().__init
__(pspec
, True)
25 self
.cr0
, self
.ea
= self
.cr_a
, self
.o1
28 class LDSTPipeSpec(CommonPipeSpec
):
29 regspec
= (LDSTInputData
.regspec
, LDSTOutputData
.regspec
)
30 opsubsetkls
= CompLDSTOpSubset