Skip to content
Lukas edited this page Jul 20, 2026 · 5 revisions

spd-matchtable wiki

This wiki explains, in technical depth, what every value spd_matchtable.py reads or computes actually means physically — not just the abbreviation, but why the parameter exists in DDR4's protocol, what happens if you get it wrong, and why this tool handles it the way it does. The tool's own --selftest and source comments establish correctness; this wiki is where the why lives.

Written to be read start to finish by someone who's never tuned RAM timings before, but precise enough to be useful to someone who has.

Pages

Timings — what each one physically gates

The data model

Methodology

  • Worst Case Methodology — why "take the max per parameter" is almost right, and the one place it isn't
  • Voltage — what VDD actually trades off, physically
  • FAQ and Design Decisions — why not bash, why read-only, why offline files, why 80 columns, "why not just trust XMP"

Where the numbers come from

Every byte offset and formula referenced across these pages was independently verified against this project's own reference kit — a live 4-module mixed DDR4 set (2× Kingston KF3200C16D4/16GX dual-rank, plus KF432C16BB3/16 and KF432C16BB/8 single-rank) — cross-checked against decode-dimms output and, for the XMP region decode-dimms doesn't parse at all, against integralfx/DDR4XMPEditor. See the main repo's RELEASE_NOTES.md for the specific verification history, including one case where an external review's own claimed byte offset was wrong and had to be re-derived from the struct layout before being trusted.

Built with AI assistance

This tool, this wiki, and the surrounding repo were built in collaboration with two AI models, and neither was error-free — worth recording honestly rather than smoothing over.

Claude (Anthropic) did most of the implementation and this wiki, and made real mistakes along the way, each caught before shipping: an early manual count of SPD byte 0x11 was momentarily wrong before a re-check caught it; a hand-rewrapped hex string for the --selftest fixture silently dropped bytes (478 instead of the required 512), caught only because the selftest itself then failed; and an earlier summary stated CL=22 at 3200 MT/s where the correct value is 23 — a plain rounding slip, corrected during a later verification pass.

Kimi (Moonshot AI) performed the independent review of v1.0.0 referenced above — it caught a real bug (the tRC understatement) and correctly flagged the 2401-vs-2400 MT/s rounding artifact, but one of its own suggested fixes cited the wrong byte offset (0x10 instead of the correct 0x11), which had to be independently re-derived before being applied.

Same mechanism caught every mistake above regardless of which model made it: check against real reference hardware and a second independent source before trusting a number. That's the actual subject of this wiki — not a scoreboard of whose output was cleaner.

Clone this wiki locally