# Timing: what can be known about an out-of-order 750 and what the specification models Sources: Gekko UM (IBM, v1.2, 2000; facts only) chapter 6 and section 1.2.2; the 740/750 manual's chapter 6 for the same pipeline. Evidence tags as in start-here.md. ## The pipeline as the manual describes it (DOC) - Fetch up to 4 instructions a clock from the I-cache into a 6-entry instruction queue; dispatch up to 2 a clock (plus a branch folded by the BPU); six execution units (IU1, IU2, FPU, LSU, SRU, BPU) with reservation stations; rename buffers; a 6-entry completion queue retiring up to 2 a clock in program order (UM 1.2.2, 6.1-6.4). - Branch prediction: a 512-entry branch history table with two bits per entry, and a 64-entry (16-set, 4-way) BTIC (UM 1.2.1, 1.2.2.2). - Latencies and throughputs per instruction (UM tables 6-3 to 6-8): e.g. integer ALU 1, `mullw` 2-5 and `mulhwu` 2-6 by operand size (early exit), `divw` 19, `lwz` 2:1, single-precision and paired arithmetic 1-1-1 (three stages, one per clock), double `fmul`/`fmadd` 2-1-1, `fdivs`/`ps_div` 17, `fdiv` 31, loads 2 cycles on an L1 hit, the store queue, `mtspr` to HID and cache SPRs serialising. - Memory: L1 hit 2 cycles (load-use), L2 hit about 3 + 4 cycles (UM 9.1.6), misses to the 60x bus at the bus/core ratio (3:1 here) plus Flipper's memory controller latency (the board's, unknown in cycles: gamecube-python U-list). ## What no source in hand can decide - **Cycle-exact pipeline behaviour.** Interactions between dispatch rules, reservation stations, rename-buffer exhaustion, completion stalls, BTIC hits and the store queue are described in prose and examples (UM 6.3-6.7), not as a complete algorithm. No hardware trace, no test ROM with timing verdicts, and no die-level model we may use is in hand (validation.md; the one IBM simulation model seen in public is set aside there for its provenance). **A stage-accurate model would be a fitted guess presented as precision.** - **Real IPC in games.** The performance monitor (MMCR0/1, PMC1-4; UM chapter 11) can count cycles and completed instructions, so a homebrew program on a real console could measure IPC per workload: the hardware test that would anchor every speed estimate here. The family has no GameCube (emulation only), so the figure stays HYPOTHESIS. - How emulators time it: pureikyubu retires about 35 M instructions per emulated second in the runs its wiki reports (280 M over 8.06 s; OBSERVED, `wiki/idleskip.md` at 69572aa), roughly 14 core cycles per instruction, far from the 1-2 a 750 can retire. That is an emulator's choice, evidence of how loosely this CPU is usually timed, not of the hardware. ## The modelling level proposed (decision 2 in the handoff brief) **Instruction-level semantics; transaction-level bus timing; a documented, table-driven core timing model, marked FITTED/HYPOTHESIS as a whole.** 1. **Semantics** are exact and per instruction (instruction level, axis B). This is where the evidence is (the manuals) and where software can tell the difference. 2. **Bus transactions** (misses, cast-outs, uncached accesses, DMA and write-gather bursts) are modelled one by one with the time the board gives them (transaction level). This is what other domains see: the GX FIFO's arrival times, when DMA data is in memory, when the DSP's mailbox is read. 3. **Core time between transactions** comes from a table: each instruction's issue cost and result latency from UM tables 6-3 to 6-8, a two-wide dispatch and completion rule, register dependencies by scoreboard, L1/L2 hit costs from chapter 9. Branch prediction and the BTIC are modelled only as far as their effect on fetch is in the tables (HYPOTHESIS). The whole model is one module, small, read as a statement of our estimate, and switchable to a constant-CPI model for comparison. 4. **What must be exact regardless:** the order of record. Whatever the timing model says, every tier computes the same time for every instruction, so the lockstep holds. The timing model's distance from the hardware is an axis-A uncertainty, recorded, and does not weaken the tier proofs. Why not stage level: no judge sees inside a stage; the cost would be several times the speed of an already slow core (the SH-2 lesson: sh2-rust-fast spends about 37 % of its time in a stage scheduler; JIT proposal and late-era method, section 6); and the GameCube's software observes CPU time mainly through the time base, the decrementer and interrupt arrival, at microsecond grain (HYPOTHESIS, to be checked by the board's timing tests). Why not untimed: the GX FIFO, the DSP mailbox, ARAM DMA and the VI all meet the CPU at channels whose order matters (gamecube-python domains-and-speed.md); a CPU that takes no time reorders them. Charging time from data costs a table lookup per instruction, which `-fast` can memoize per block (late-era method, section 6: "profile the time-keeping first"). ## Timing as data (JIT proposal, accepted) Every decode row carries its unit, issue cost, latency, serialisation class and the manual's table and page. The `-fast` and turbo tiers charge time from these rows; a cached interpreter can precompute a block's static cost per entry state.