1 # POWER9 Register Files
4 Defines the following register files:
14 * https://bugs.libre-soc.org/show_bug.cgi?id=345
15 * https://libre-soc.org/3d_gpu/architecture/regfile/
16 * https://libre-soc.org/openpower/isatables/sprs.csv
21 from soc
.regfile
import RegFile
, RegFileArray
22 from soc
.decoder
.power_enums
import SPR
26 class IntRegs(RegFileArray
):
29 * QTY 32of 64-bit registers
31 * Array-based unary-indexed (not binary-indexed)
32 * write-through capability (read on same cycle as write)
35 super().__init
__(64, 32)
36 self
.w_ports
= [self
.write_port("dest")]
37 self
.r_ports
= [self
.write_port("src1"),
38 self
.write_port("src2"),
39 self
.write_port("src3")]
43 class CRRegs(RegFileArray
):
44 """Condition Code Registers (CR0-7)
46 * QTY 8of 8-bit registers
47 * 8R8W (!) with additional 1R1W for the "full" width
48 * Array-based unary-indexed (not binary-indexed)
49 * write-through capability (read on same cycle as write)
52 super().__init
__(4, 8)
53 self
.w_ports
= [self
.write_port("dest")]
54 self
.r_ports
= [self
.write_port("src1"),
55 self
.write_port("src2"),
56 self
.write_port("src3")]
60 class SPRRegs(RegFile
):
63 * QTY len(SPRs) 64-bit registers
65 * binary-indexed but REQUIRES MAPPING
66 * write-through capability (read on same cycle as write)
70 super().__init
__(64, n_sprs
)
71 self
.w_ports
= [self
.write_port("dest")]
72 self
.r_ports
= [self
.write_port("src")]