xspe models

xspe is a kit for emulators: each machine is a behaviour description in Common Lisp, lowered to C99 at build time. Every instruction set is described once, from its specification, in its own folder of src/isa/; these are those models, each definition with its encoding and its Lisp.

ModelDefinitionsDiagramsWhat
gs4137The GS is driven by 64-bit writes to its general registers (through the GIF's packets) and by the EE's accesses to its privileged registers. Its instructions are those register writes, as the RSX's are method writes (src...
mips371371Package ISA.MIPS. One description of MIPS, instantiated per CPU model on one abstract machine (the mips state struct). Each model is an ISA of its own to the rest of the kit (R3000A, R5900): its own executor, decoder, st...
ppc254224Package ISA.PPC. One description of the PowerPC for every machine that has one: what Book I-III leave to the implementation belongs to a CPU model chosen at build time (XSPE_PPC_MODEL; the PS3 sets cell). The ISA and its...
psxgpu2626The PlayStation's GPU (CXD8514Q/CXD8561Q) takes 32-bit words on two ports: GP0 (1F801810h), rendering and VRAM transfer commands of 1 to 12 words, and GP1 (1F801814h), one-word display control commands ([PSXSPX] "Graphic...
rsx1710The RSX (the PS3's GPU, an NV47) is translated the way the CPUs are: as a match problem (docs/isel.md). Its instructions are methods: the command processor (the FIFO) writes 32-bit values to method addresses. Each method...
rv641010Package ISA.RV64. This is the worked example of docs/isa.md, "Adding an ISA". It is small and real. It is not a complete RISC-V.
spirv1130Package ISA.SPIRV. SPIR-V is the GPU host's shader ISA (XSPE_GPU=vk): SPU code becomes SPIR-V compute work. SPIR-V is never emulated here. Its description lets ctil find, for each SPU operation, the cheapest SPIR-V opera...
spu199199All 199 SPU ISA 1.2 instructions (every opcode the SPU decoder knows) have a definsn. tests/isa/spu/isa.lisp checks that each decodes to itself.
vk590The RSX is translated the way the guest CPUs are: as a match problem (docs/isel.md). Here the host side is Vulkan, treated as an instruction set. Each Vulkan command (vkCmdSetViewport, vkCmdBindPipeline, vkCreateGraphics...
vu122122Package ISA.VU (uses CL and CORE; its arithmetic is ISA.MIPS's, see below). VU0 and VU1 run micro programs from their micro memories: 64-bit instructions, an upper (FMAC) and a lower (integer, load/store, FDIV, EFU, bran...
x8617910Package ISA.X86. x86-64 is the CPU host of today's builds: the PS3's PowerPC code is translated to it (docs/isel.md). Like every ISA of src/isa, it is described from its specification so that it can play either role; as ...

Made from xspe at b2fac33349db by tools/gen-xspe.py. xspe is GPL-3.0-or-later.