Hardware Loop Latency Calibration
Measures exact DM-to-WFS hardware and software loop latency in WFS frames.
Overview & Role
Drives repeated spatial Fourier poke bursts onto the DM while cross-correlating WFS response timing to measure fractional hardware latency (frames) and effective software+hardware lag.
Provides the timing baseline required for synchronous Hadamard response matrix acquisition, 2-tap PSOL fallback alignment, and predictive filter lookahead.
Compute Units / Entry Points: cacao-fpsexec-cacaoac-mlat
Verified Highlights:
- Sub-0.05 frame hardware delay accuracy across 500 Hz, 1 kHz, and 2 kHz loops
Option Variants (CODE/OPT)
| Option Code | Behavior & Usage | Main Flags |
|---|---|---|
MLAT/FAST | Lockstep-paced latency probe under fused cacaosim htsim. | --calib-rate |
MLAT/RT | Wall-clock paced latency calibration for modular bench or hardware. | --wall-rate --calib-rate |
Dependencies & Calibration Chain
Upstream Calibrations & Inputs
Selected Algorithm
★ Current Entry
MLATOffline Calib
Hardware Loop Latency Calibration
Feeds & Enables Downstream
CLI Flags, Environment Variables & FPS Parameters
| Layer | Option (Links to Reference) | Default | Description |
|---|---|---|---|
| CLI Flag | --calib-rate | matches --wall-rate | Override wall-clock rate for mlat/takeref calibration steps [Hz] |
| CLI Flag | --wall-rate | lockstep fused (1000 calib), 160 mod | Optional wall-clock rate cap [Hz] on top of 1:1 lockstep pacing |
| CACAO_* Env | CACAO_MLAT_NBITER | 30 | Number of poke-sequence iterations for mlat hardware latency measurement |
| CACAO_* Env | CACAO_MLAT_CPA | 4.0 (Stg1/2), 1.0 (Stg3) | Spatial frequency [cpa] of Fourier poke pattern used by mlat |
| CACAO_* Env | CACAO_LATENCYHARDWFR | 1.5 | Measured hardware loop latency [WFS frames] |
| CACAO_* Env | CACAO_LATENCYSOFTWFR | 1.65 | Effective software + hardware loop latency [WFS frames] |
Implementation, Tests & Related Reports
Source Files
- cacao:
AOloopControl_acquireCalib/measure_linear_resp.c - cacao-work:
benches/ao3k_scexao/cacaoloop-ao3k-scexao.milk
Verification Tests
test_00_stack_sanity.pyao3k_scexao bench calibration