# Design This file fixes the circuits, the timings and the dumps a build must match. The toolchain can vary, as long as the numbers here hold. ## Budget The bound and the count script are `fixtures/donut-budget.json`. The default 64 by 64, 24-frame design must fit. ## Goldens `fixtures/donut-frames/` holds frame 0, quarter, and half. Loop-closure is a numeric compare of the last-plus-one dump to frame 0. ## Timing Clock and reset cycles are in `fixtures/donut-timing.json`. ## Inputs | Key | Label | Default | Notes | | --- | --- | --- | --- | | `width` | Framebuffer width | 64 | 64, 96 or 128. | | `height` | Framebuffer height | 64 | 64, 96 or 128. | | `frames` | Frames in the loop | 24 | From 12 to 48, a full turn. | | `shading` | A simple shade | on | A documented lighting term in the dump. | | `letterbox` | A letterbox | off | Blank rows, as in the file. | | `sim` | Simulator | verilator | Either must pass the same dumps, within a documented reset-cycle slack. | ## Acceptance at the defaults A tiny donut renderer in HDL. The testbench dumps a grayscale or RGB frame of an original torus, not a pasted scene from another project. | Quantity | Value | Tolerance | Source | | --- | --- | --- | --- | | Frame size | 160 × 120 | exact | Default dump | | Torus major, minor radius | 1.00, 0.35 | 0.01 | In the documented scene units | | Rotation, frame i of 32 | 360 * i / 32 deg | exact | About the vertical axis | | Background | 0 | exact | Black, unless letterbox is on | | Shading | Lambertian, one light | — | When `shading` is on | Frames 0, 8, 16 and 24 are goldens. A CPU reference in Python may be used in CI; the HDL dump must match it within a documented pixel tolerance (for example at most 2 levels, 98% of pixels). No ASIC tape-out is required. ## Screenshots These pictures are dumps of a working reference model of the core, in `reference/preview.py`, at the default inputs. They are not drawings of a product that has not been built or simulated. The first picture is the one Spekkr shows on the spec's card. A build may ship its own goldens; those goldens are of that build and do not have to match these frames pixel-for-pixel. | File | What it shows | | --- | --- | | `shots/frame-0.png` | Torus frame 0 of 32, 160 × 120, Lambertian shade | | `shots/frame-8.png` | Torus frame 8 of 32 (90°), 160 × 120 | ## How to verify 1. Run the simulation or the HDL testbench at the defaults, with no physical board. 2. Compare periods, trip points, register dumps or frames to the acceptance table in this file. 3. Corrupt one documented value on purpose and confirm the check fails. 4. A testbench dumps a deterministic rotating torus; frame 0, a quarter, and a half match goldens, and the loop closes. A documented size cap is checked. No tapeout, no FPGA, and no board are required.