The SSR FFT

SsrFft (waveflow.dsp.ssr_fft.hw) is a fixed-point, forward, natural-order FFT of length L that takes R complex samples a cycle – and a new frame every L/R cycles, indefinitely. It computes the same bits as AMD’s Vitis L1 SSR FFT (VitisFft) and has the same ports; it is built as Waveflow modules, one free-running hls::task per piece of hardware.

  • L is the transform length, fixed at build time. It must be a power of R with at least two stages: 16, 64, 256, 1024, 4096, …
  • R is the super-sample rate: the number of parallel lanes in and out. It is also the butterfly radix, and the module supports R = 4.

Sample n of a frame travels on lane n % R at word n // R, so a frame enters in L/R cycles – and, back to back, the next one enters right behind it.

Measured in RTL (XSI, RFSoC 4x2 at 250 MHz, every frame bit-exact):

L SsrFft cycles a frame VitisFft cycles a frame DSP (both)
16 4 41 12
64 16 120 24
256 64 480 36
1024 256 2,556 48
4096 1,024 10,240 60

The pages

  • Architecture – the transposer, the stages, the commutators and what they are, the digit reversal, why nothing stops between frames, and the arithmetic.
  • Parameters – constructing an SsrFft, and every parameter.
  • Interfaces – the lane ports, the RadixWord streams inside, and wiring it.
  • Including it in your design – the build steps, and where every file goes.
  • Synthesis – the task bodies, the two reorders, and the traps found at RTL.
  • Timing – an interval by construction, a latency by addition, and the pysim against the RTL.

The worked example, with every measurement, is Waveflow’s FFT, at full rate.


Table of contents

  • SSR FFT architecture - How SsrFft is built: the input transposer, the radix-4 stages and their twiddle rotations, the commutators between them, the digit-reversal reorder, as one free-running hls::task each; what a commutator actually is (an R x R block transpose made of delay lines and a switch, with a worked example); why the digit reversal is a commutator plus a whole-word permutation; why nothing stops between frames; where the arithmetic loses precision and how the output grows; and what each layer of Waveflow contributes.
  • SSR FFT parameters - Constructing an SsrFft and every parameter it takes: the build-time HwParams (L and the input and twiddle widths), the boundary (one RadixWord port each way, or VitisFft's four lanes), the reorder implementation, the direction (inverse=True, with an exact 1/L, or direction='runtime', chosen per frame on s_dir, each frame bit-exact with the fixed build), the clock and whether the pysim is timed. What it derives through Geometry -- the stage count, the commutator block sizes, every edge's format, the task list and the ports -- and what it refuses.
  • SSR FFT interfaces - SsrFft's ports: one RadixWord stream each way -- R complex samples a beat, the unit every internal edge carries, an ap_uint whose width is the edge's own (128 bits in, 216 out at L = 1024) -- or, with lanes=True, VitisFft's R-lane port group. The packing (the generated array utils, never by hand), how frames are delimited, how wide words travel through the pysim and the XSI BFMs (64-bit chunks), how to wire either boundary, and what the generated top looks like.
  • Including the SSR FFT in your design - The build steps that put an SsrFft into a synthesized design, and where every file goes: the generic task bodies copied from waveflow/dsp/ssr_fft/src, the per-configuration header and task wrappers and every edge's array utils generated into include/ by hls.write_sources, the top and its tcl in gen/, the RTL file list in xsi/. No vendor headers and no include path. Covers the FFT as a design's top and inside your own composite, the one solution setting it needs (config_rtl -reset state), and the reference build in waveflow/dsp/ssr_fft/rtl.py.
  • Synthesizing the SSR FFT - How SsrFft becomes RTL: generic hand-written task bodies (a stage, a commutator, the reorder, an input register, two lane adaptors) and a generated configuration per FFT (edge adaptors over the generated array utils, per-stage formats, twiddle ROMs, one wrapper per task). The stage body is AMD's arithmetic with its quantization points spelled out; the commutator ticks in whole groups decided by a one-bit flag; the reorder's frame buffer is a stream_of_blocks pair or a single ping-pong task, measured at L/R + 5 and L/R. The traps found only at RTL -- a blocking read at a loop head strands a burst's tail, a sample count in the commutator's decision broke timing, and so did a commutator fed straight from a top-level port -- and what csynth reports.
  • SSR FFT timing - Why SsrFft needs no calibrated timing table: its interval is L/R back to back -- but after any idle cycle between frames, max(2L/R, L/R + gap), set by the transposer's last commutator (measured exact at L = 64, 256, 1024, 4096; at L = 16 an arrival-phase jitter instead) -- its latency is the sum of its tasks' -- (R-1)D per commutator, a frame for the reorder buffer, a few cycles of pipeline per task -- and an isolated frame's latency does not depend on when it arrives. How the composite pysim reproduces that with one process per task, timed cut-through from each frame's first word, the gap rule on the transposer's last commutator; and how close it lands: within 5 cycles of the RTL's first frame from L = 16 to 1024, the interval exact back to back and after a gap (L >= 64).