# The RSP, from the board's side The RSP is a CPU (a cut-down MIPS scalar core with a vector unit as COP2), so by the CPU rule it gets its own core: **rsp-python** (`../rsp-python`, Phase 0 documents only, written beside this board's). This page is the board's half of the boundary. ## What the board owns - The **SP interface registers** at 0x04040000 (SP_DMA_SPADDR, SP_DMA_RAMADDR, SP_DMA_RDLEN, SP_DMA_WRLEN, SP_STATUS, SP_DMA_FULL, SP_DMA_BUSY, SP_SEMAPHORE) and SP_PC at 0x04080000. The same registers appear to the RSP as its COP0 c0-c7, and the RDP's DPC registers as c8-c15 (n64brew: RSP Interface; RDP Interface). Which side owns the register file: **the board**, because the CPU, the RSP and the RDP all reach it; the core reaches c0-c15 through a callable the board gives it. - **IMEM and DMEM** (4 KB each), shared with the CPU through the board's map. The wiki: single-ported with no arbiter, the VR4300 usually wins a collision (the RSP's write is lost, or its read gets the CPU's data), and a CPU access during an SP DMA becomes the DMA's current address. A board that lets both sides access freely is wrong in exactly these cases; the order of record decides collisions as the wiki describes (OBSERVED, unattributed: U). - The **SP DMA engine**: RDRAM <-> IMEM/DMEM, 8-byte units, rows with COUNT and SKIP (RDRAM side only), wrapping inside one bank, double-buffered, about 3.7 bytes per PClock (wiki, uncited), DMA past installed RDRAM reads zeros (nemu64-test README: the libdragon IPL3 relies on this to clear IMEM). - **The SP interrupt** to the MI (BREAK with INTBREAK, or SET_INTR), the HALT and BROKE state, single-step (broken on hardware: wiki). - **The XBUS**: the RDP reading commands from DMEM. ## What the core owns The scalar unit (32 x 32-bit registers, 12-bit PC wrapping in IMEM, no exceptions, no multiply/divide, no 64-bit operations, no branch-likely, misaligned DMEM access allowed), the vector unit (32 x 128-bit registers, 8 x 48-bit accumulator lanes, VCO/VCC/VCE, the reciprocal tables), the pipeline (dual issue, latencies, the pairing bug), and the COP0/COP2 moves. See rsp-python's start-here.md. ## The channel, and its sync points RSP-side accesses that another domain can see: COP0 reads and writes (c0-c15), DMEM reads the RDP's XBUS could race, SP DMA starts, BREAK. CPU-side: any access to IMEM, DMEM or an SP register while the RSP runs. These are the sync points from `-fast` on (domains-and-speed.md).