Files
retroDE_ps2/docs/ch368_audit_log.md
thejayman77 ba74bbd5aa Snapshot: fog implementation + fidelity tooling baseline (pre bilinear-clamp fix)
Per-vertex GS fog end-to-end (gs_stub emit incl. persp_emit5, gs_prim_list_feeder
XYZ2->XYZF2 on PRIM.FGE, gs_make_sh3_scheduler_fixture.py F/FGE packing), new fog
TBs, fidelity attribution tooling. Functional baseline before removing the dead
bilinear lerp8 clamps (Codex: 161-node comb loop -> -0.042ns setup fail).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 19:56:46 -04:00

66 lines
4.2 KiB
Markdown

# Ch368 Audit Log - Runtime CLUT Adjacent-Frame Motion
## Scope
Add the adjacent SH3 capture frame to the established 24-draw runtime-CLUT path, then prove A/B motion with the
same native-640x480 persistent-Z, board-versus-simulation, and replay-color gates used by Ch367.
## Frame-B Capacity Measurement
- Frame B is the 24-draw shared-texture cluster from capture `20260624224121`, emitted as `zsrtb24`: eight ordered
204-record epochs, one texture fill, seven CRC-verified reuses, and runtime palette staging before every epoch.
- At request depth 2048, epoch 3 saturated the request FIFO and dropped 151 fragments. This is a bounded-capacity
failure, not a board candidate.
- A complete depth-4096 integration run passed all eight epochs with exact Z and color scoreboards: Z `0/307200`,
color `0/108435`, zero drops, and 664,865 accepted fragments.
- Per-epoch request-FIFO high water: 1060, 1074, 1431, 2198, 68, 3610, 2993, and 3340. The measured maximum is
3610, leaving 486 entries of headroom at depth 4096.
## Production Change
- The DE25 top changes only `u_zc_emit` request depth from 2048 to 4096. No clock, SDC, or protocol change is
involved. The existing `zc_g_drops` counter remains the fail-closed board guard.
- Focused regressions pass after the source change: `tb_gs_lpddr_zc_emit`, `tb_clut_stage_cdc`, and
`tb_top_psmct32_runtime_clut`. The complete `zsrtb24` depth-4096 integration run is the capacity and exactness
proof for this value.
## First GUI Fit And Response-Ready Cut
- The first 4096-entry GUI fit failed setup only: WNS `-0.063 ns`, TNS `-0.126 ns`; hold and every other signoff
class remained clean. The six failing paths terminated at the EMIF write-response FIFO.
- The two launch families were the Z-RMW `bready` and write-arbiter `grant` controls, both feeding the arbiter's
live `m_bready` mux. The arbiter now registers response-ready from the final W handshake, removing that live
grant/client-ready cone while retaining the selected transaction through B acceptance.
- The response-path regression is clean: `tb_gs_lpddr_wr_arb` passes its priority/transaction checks and
`tb_gs_lpddr_zc_emit` passes three complete Z/color drains. The full `zsrtb24` depth-4096 integration gate also
passes after the cut: 664,865 accepted fragments, zero drops, Z `0/307200`, and color `0/108435`.
- At that point, the pending gate was one full Quartus 26.1 GUI compile; the board remained on the Ch367-proven RBF
until STA was clean.
## Corrective GUI Fit And Silicon Proof
- Quartus 26.1 STA completed at 15:53 with timing requirements met: setup `+0.076 ns`, hold `0.000 ns`, recovery
`+1.045 ns`, minimum pulse width `+0.200 ns`, and zero TNS. The fitted request FIFO is a 4096 x 74 dual-clock
M20K implementation using 16 M20Ks. Core SHA-256: `b146503317ba8268fee06a83b2650cdf57cb79e64da3b6b5aa6a22e9b356cf60`.
- The RBF was SHA-verified on the DE25 and loaded through `core_loader.sh`; `fpga0` reported `operating`.
- Frame B board gate passed all eight 204-record epochs: one texture fill plus seven resident CRC reuses, eight
runtime palette copies, fresh drains, and zero drops. Its board framebuffer is byte-identical to integration
simulation at SHA-256 `3191d75983e72a158f91f15cc1f57b6ff7c5e40d5bbb4a49957db06db4e2fded`; replay-color is exact
at `307200/307200` pixels.
## A/B Motion Closure
- The host ran `A -> B -> A -> B` with a fresh color/Z preclear, texture fill, runtime palette staging, and eight
ordered drains for every frame. All 32 epochs reported zero drops.
- The four board boundary dumps alternate exactly: A dumps 0 and 2 hash to
`6614d7211b9a668cfeda12e4fa2d6f469d3ee4d3a10bdf56c0119b35f93c7803`; B dumps 1 and 3 hash to
`3191d75983e72a158f91f15cc1f57b6ff7c5e40d5bbb4a49957db06db4e2fded`. Each equals its matching integration
framebuffer byte-for-byte.
- Independent replay-color checks are exact for both alternating frames: A is `307200/307200` over 346,425
fragments and B is `307200/307200` over 664,865 fragments.
## Result
Ch368 is closed on silicon: native-640x480 persistent-Z runtime-CLUT motion between two adjacent authentic SH3
captures, with deterministic A/B/A/B board outputs, exact integration framebuffers, and exact replay-color evidence.