Skip to content

1. Structural changes are cycle-identical and gated

Context. Restructuring the pipeline code while also changing its timing makes it impossible to tell a refactoring mistake from an intended timing change.

Decision. A structural commit must not change timing. Every such commit is gated on:

  • tools/diag/cycle_baseline.py --compare <baseline>: every program and configuration pair, every preset among the configurations, must match in cycles, retired instructions and exit code;
  • tools/diag/linux_baseline.py --hart-count 1 --limit 20000000: the retired-instruction count at a fixed cycle budget must match;
  • cargo test, cargo clippy --workspace --all-targets, riscv-tests, the vector suite, the multi-core suite and the Python tests.

A commit that is meant to change timing says so, explains the change in cycles, and records a new baseline for the commits after it.

Consequences. Timing changes are isolated in their own commits with their own regression tests, and the baseline file names the point the comparison starts from. Baselines live in tests/builds/results/, which is not version-controlled.