# 65816-python's P65C816 testbench From the emulator family's 65816-python repository: `tests/p65c816/tb_p65c816.vhd`, moved out on 2026-11-22 (wave G) as it stood at 65816-python `e864b51` (old history; `7f1d308` after the rewrite, without it). ## What it measures The bus cycles of a hand-written FPGA 65C816 on SingleStepTests initial states: a third opinion beside the corpus and the datasheet. OBSERVED (P65C816 at 2302683). ## Who uses it 65816-python, which finds this folder through `W65C816_GPL_TOOLS`. `scripts/build_referees.py p65c816-tb` analyses it with srg320's P65C816 units under GHDL into the git-ignored `reference/build/p65c816-tb/`; `tests/p65c816.py`, `tests/test_p65c816.py` and `scripts/run_p65c816.py` (rung 5) run the executable. ## Contents - `tb_p65c816.vhd`: Loads each SingleStepTests case into the core by running a loader program after a reset, then logs every bus cycle of the case's instruction (address, data, write, VDA, VPA, VPB, MLB) between case markers, from a stimulus file. Upstream: srg320's P65C816 in MiSTer-devel/SNES_MiSTer, GPL (the repository's LICENSE is GPL-3.0; its top-level sources grant GPL-2.0-or-later), `2302683`. ## Licence and notices Our code (alewman), first published under MIT in 65816-python (`../../notices/MIT-emulator-family.txt`); no SPDX line. Elaborated with P65C816, the testbench is GPL as built. 65816-python's provenance audit (finding 12) noted that its header describes the core's insides. Upstream code is not committed here, except where a file above says it carries upstream lines; each tool fetches and builds its upstream at the pin from the consuming repository. This repository is GPL-3.0-or-later (`../../LICENSE`). ## Outputs Every value these tools give is a closed-box measurement: tag it OBSERVED with the upstream and its pin, and let any document or hardware measurement overrule it (`emu-tools/docs/wall.md`). Nothing here has been refactored onto the shared contract yet (`emu-tools/docs/contract.md`); that is the next job.