a6677750e8f7403d54b3cd4f073e1e81f9d0e3cd
1 """SPR Pipeline Data structures
3 Covers MFSPR and MTSPR. however given that the SPRs are split across
4 XER (which is 3 separate registers), Fast-SPR and Slow-SPR regfiles,
5 the data structures are slightly more involved than just "INT, SPR".
8 * https://bugs.libre-soc.org/show_bug.cgi?id=348
9 * https://libre-soc.org/openpower/isa/sprset/
10 * https://libre-soc.org/3d_gpu/architecture/regfile/
13 from soc
.fu
.pipe_data
import FUBaseData
14 from soc
.fu
.spr
.spr_input_record
import CompSPROpSubset
15 from soc
.fu
.alu
.pipe_data
import CommonPipeSpec
18 class SPRInputData(FUBaseData
):
19 regspec
= [('INT', 'ra', '0:63'), # RA
20 ('SPR', 'spr1', '0:63'), # SPR (slow)
21 ('FAST', 'fast1', '0:63'), # SPR (fast: LR, CTR etc)
22 ('STATE', 'state1', '0:63'), # SPR (DEC/TB)
23 ('XER', 'xer_so', '32'), # XER bit 32: SO
24 ('XER', 'xer_ov', '33,44'), # XER bit 34/45: CA/CA32
25 ('XER', 'xer_ca', '34,45')] # bit0: ov, bit1: ov32
26 def __init__(self
, pspec
):
27 super().__init
__(pspec
, False)
32 class SPROutputData(FUBaseData
):
33 regspec
= [('INT', 'o', '0:63'), # RT
34 ('SPR', 'spr1', '0:63'), # SPR (slow)
35 ('FAST', 'fast1', '0:63'), # SPR (fast: LR, CTR etc)
36 ('STATE', 'state1', '0:63'), # SPR (DEC/TB)
37 ('XER', 'xer_so', '32'), # XER bit 32: SO
38 ('XER', 'xer_ov', '33,44'), # XER bit 34/45: CA/CA32
39 ('XER', 'xer_ca', '34,45')] # bit0: ov, bit1: ov32
40 def __init__(self
, pspec
):
41 super().__init
__(pspec
, True)
44 class SPRPipeSpec(CommonPipeSpec
):
45 regspec
= (SPRInputData
.regspec
, SPROutputData
.regspec
)
46 opsubsetkls
= CompSPROpSubset