572ec9a6bcd18c22202f4a100531e6f843975889
1 from soc
.fu
.alu
.alu_input_record
import CompALUOpSubset
2 from soc
.fu
.pipe_data
import FUBaseData
, CommonPipeSpec
5 class ALUInputData(FUBaseData
):
6 def __init__(self
, pspec
):
7 super().__init
__(pspec
, False)
9 self
.a
, self
.b
= self
.ra
, self
.rb
13 return [('INT', 'ra', self
.intrange
), # RA
14 ('INT', 'rb', self
.intrange
), # RB/immediate
15 ('XER', 'xer_so', '32'), # XER bit 32: SO
16 ('XER', 'xer_ca', '34,45')] # XER bit 34/45: CA/CA32
20 class ALUOutputData(FUBaseData
):
21 def __init__(self
, pspec
):
22 super().__init
__(pspec
, True)
28 return [('INT', 'o', self
.intrange
),
29 ('CR', 'cr_a', '0:3'),
30 ('XER', 'xer_ca', '34,45'), # bit0: ca, bit1: ca32
31 ('XER', 'xer_ov', '33,44'), # bit0: ov, bit1: ov32
32 ('XER', 'xer_so', '32')]
36 class ALUPipeSpec(CommonPipeSpec
):
37 opsubsetkls
= CompALUOpSubset
38 regspecklses
= (ALUInputData
, ALUOutputData
)