Files
PLFM_RADAR/9_Firmware
Jason bf39941074 fix(fpga): RX-NEW-2 — replace impossible peak/mean assertions with flatness bounds
The Group 3 (tone autocorrelation), Group 10 (golden DC autocorr), and
Group 11 (golden tone autocorr) tests asserted cap_max_abs > mean_abs * 2,
which is mathematically impossible for those stimuli regardless of FFT
precision:

  - DC autocorrelation produces a constant-magnitude time-domain output
    (peak/mean ≡ 1.0 by definition).
  - Single-tone autocorrelation produces a constant-magnitude rotating
    phasor; |I|+|Q| envelope varies in [|X|^2, sqrt(2)*|X|^2], so
    peak/mean is bounded by ~1.41x.

Empirical RTL output ratios from this regression: DC=1.07x, Tone5=1.18x,
Chirp=3.14x, Impulse=2015x — confirming theory and confirming the FFT
engine is correct for narrow-spectrum inputs.

Replace each ">2x" check with mean>0 && peak<=mean*2 (flatness bound).
Still catches flat-zero output (mean=0) but admits the correct constant-
magnitude result.

Matched Filter Chain regression: 5 failures -> 2 failures.
2026-04-23 07:39:16 +05:45
..