A DSP pipeline chains processing stages. Each stage has a defined interface: input buffer, output buffer, latency, and memory footprint. Designing the pipeline is an architectural problem before it's an implementation problem.
PulsarSync-Core pipeline:
ADC samples (1 MSPS)
│
▼
Anti-aliasing FIR filter (8-tap, Q15) [Removes aliasing before decimation]
│
▼
Decimation ÷8 (125 kSPS effective) [Reduces data rate for downstream stages]
│
▼
Channeliser (polyphase filter bank) [Splits into frequency sub-bands]
│
▼
Dispersion measure correction [Aligns pulsar signal across frequencies]
│
▼
Pulse period detector [Folds time series at trial periods]
│
▼
Detection output (GPIO / UART)Each stage communicates via heapless::spsc::Queue — lock-free single-producer single-consumer FIFO. The pipeline is pull-based: the detector asks for samples from the stage above, which asks the stage above that, back to the ADC interrupt.
Design principle: each stage should be independently testable. The FIR filter is tested with known input/output pairs. The decimator is tested for correct rate reduction. The dispersion corrector is tested against a simulated dispersed pulse. This modularity comes from the stage interface design, not from the final integration.