---
name: fpga-reproducibility
description: Use when recording FPGA builds so a reported number can be traced to a bitstream. Covers tool versions, constraints, seeds, and board state. Does not handle badges.
---

# FPGA reproducibility

Use this before the first full compile.

Call: https://www.isfpga.org/call-for-papers/

## The build directory is the record

One directory per build, never overwritten, named by hash. Contents:

```bash
B=builds/$(date +%Y%m%d-%H%M%S)-$(git rev-parse --short HEAD); mkdir -p "$B"
git diff > "$B/dirty.patch"
cp -- *.xdc *.sdc *.tcl "$B/" 2>/dev/null || true
printf 'part=%s\nseed=%s\nstrategy=%s\nclock_ns=%s\n' "$PART" "$SEED" "$STRATEGY" "$CLK" > "$B/inputs.txt"
( vivado -version || quartus_sh --version || vpr --version ) > "$B/tool.txt" 2>&1 || true
hostname > "$B/host.txt"; nproc >> "$B/host.txt"
sha256sum -- *.bit *.sof *.xclbin > "$B/bitstream.sha256" 2>/dev/null || true
```

Save after the run: full log, utilization, timing summary with the worst paths, power estimate with the activity file used, and exit status. Failed builds stay. They are your timing closure rate.

Tool patches change results. Record the exact build number, installed patches, IP versions, and device files.

## Table from reports

Write one parser that reads reports and prints the paper's table. Humans copying numbers from a GUI make the errors that end careers. The table's columns: design, part, seed, target, achieved, worst slack, LUT, FF, DSP, BRAM, URAM, hours, build id.

Set rules before you look:

- negative slack counts as failure, or is reported at the achievable clock, decided once
- best seed, median, or mean: choose one, and use it for the baseline too
- resources with or without the shell, the same for all

## Board

Record board serial, shell version, driver, host, memory configuration, coolant or fan setting, ambient temperature, power probe and calibration date. Log clock and temperature through the run. A part that throttles gives two numbers.

## Functional truth

Every performance run also checks outputs. Keep the golden vectors with their generator. State how many inputs were checked.

## What others cannot have

Vendor tools, IP, and some device data are closed. Describe them by version. Your own closed pieces are another matter and limit badges, see `fpga-artifact`. Offer synthesis scripts and reports where source cannot be given.

## Output

```text
[FPGA record] builds <n>, complete <n>, failed kept <n>
[Tool] <name, build, patches> · IP versions <saved>
[Seed rule] best / median / mean, same for baselines: yes/no
[Table] generated by script: yes/no
[Board] serial, shell, probe: <saved>
[Outputs verified] <n vectors>
```

## Reverify each cycle

- The methods requirement for AI-generated code.
