6720caee12
Read-only diagnostic to disambiguate the three causes folded into
LPDDR_STATUS[5]. bit5 (0x02C) semantics are UNCHANGED.
- gs_lpddr_scanout_lb: register a live (rd_errs!=0) flag in the emif
domain (the raw counter never crosses), and capture the FIRST raw
underflow of each video-source-enabled session as a bundled-data
snapshot (scan_y/nf_v/nf_s0 + base-vs-lookahead cause + line_valid +
vphase), held stable until !enable. The existing sticky underflow_v
latch, fetch FSM, pixel path and arbitration are untouched.
- ps2_hps_bridge: independently 2-FF sync the two split live flags;
latch the snapshot on the rising synced-valid edge (coherent bundled
data). New read-only regs 0x120 SCAN_DIAG_STATUS / 0x124
SCAN_DIAG_FIRST (window addr[37:5]==9); 0x118/0x11C reserved slots
untouched.
- top: drive 5 diag nets per scanout arm like scan_err_w; bit5 assign
unchanged.
- tb_gs_scanout_diag (new): provokes AXI RRESP error, cold-start row-0
starvation, first-failure capture + coherent bridge readback, and
clear-via-video-source-disable (17/17 checks).
- Tie off the new bridge inputs in the four .*-instantiating TBs.
Sim set all PASS: focused TB, tb_ps2_hps_bridge, scanout_lb
{binomial,hstretch,psm32_256}, and the complete f52 replay (FB
byte-identical: Z 0/307200, COLOR 0/245760; sum32=0xaad0b94d).
No fix / gray-code / persistence-filter / scanout checksum. No Quartus,
no board, no push.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
rtl/platform
retroDE-specific platform integration. Matches docs/contracts/platform.md.
Wave 1 contents
platform_video_stub.sv— free-running raster generator. Default VGA 640x480 timing (overridable per-testbench to tiny values for fast sim). Takesbg_{r,g,b}fromgs_stuband flood-fills the active region. Emits oneEV_MODEper completed frame so testbenches can count frames without sampling raw video.
Scope boundary
This directory owns:
- clock/reset sequencing entry points,
- retroDE-facing video and audio adaptation,
- HPS bridge plumbing (future),
- top-level wrappers not belonging inside PS2 subsystems.
It does not own GS/PCRTC semantics (that's rtl/gif_gs/), SPU2 audio
synthesis (rtl/spu2/), or any PS2 register behavior.
Replacement path
platform_video_stub stays as the platform adaptation layer. What changes
is the upstream pixel source: Wave 1 → flat BGCOLOR from gs_stub,
later waves → fuller GS/PCRTC output including framebuffer scan-out.