digital signal processing

**Digital signal processing** is the numerical manipulation of sampled signals to filter, transform, detect, compress, modulate, or reconstruct information. Every layer of an AI chip's surrounding system — audio front-ends, radar, image sensors, SerDes PHYs, wireless modems — relies on DSP algorithms implemented in hardware MAC arrays, dedicated DSP cores, or programmable vector engines. ```svg Sampling & Anti-Aliasing Continuous signal x(t) Sample at fs = 8 kHz (Nyquist: fs > 2·fmax) ↑ discrete samples x[n] Nyquist: fs > 2 × fmax fs=8kHz → max signal freq = 4 kHz (voice) ADC anti-alias filter before sampling Aliasing: fs < 2·fmax → fold-back true alias indistinguishable after sampling Quantization: N bits → SNR ≈ 6N + 1.76 dB 16-bit audio: ~98 dB SNR · 12-bit ADC: ~74 dB FIR Filter — Tapped Delay Line x[n] z⁻¹ z⁻¹ z⁻¹ z⁻¹ h₀ h₁ h₂ h₃ h₄ Σ y[n] y[n] = ∑ h[k] · x[n−k] (k=0..N−1) N taps → N multiplications + N−1 additions per output Frequency response H(e^jω) = DFT of h[k] passband stopband fc LPF shown · HPF/BPF/BSF by coefficient choice FFT — Cooley-Tukey Butterfly x[n] Stage 1 Stage 2 X[k] x[0] x[4] x[2] x[6] x[1] x[5] x[3] x[7] X[0] X[1] X[2] X[3] X[4] X[5] X[6] X[7] N=8: 3 stages × 4 butterflies · O(N log N) vs O(N²) DFT DSP Pipeline Analog → Anti-alias LPF → ADC → DSP core → DAC Key ops: filter, FFT, convolution, correlation FIR: linear phase, always stable, N MAC/sample IIR: fewer taps, possible instability, feedback SIMD/VLIW: MAC arrays for parallel filter taps Fixed-point Q-format: 16-bit saves area vs float MAC: Multiply-ACcumulate — the core DSP op CORDIC: trigonometric ops without multipliers Overlap-add: efficient block convolution via FFT FFT Applications Spectrum analysis: find frequency content of signal OFDM (5G/WiFi): parallel subcarrier modulation N=4096 OFDM → 4096-pt FFT per symbol period Radar: range-doppler map via 2D FFT SONAR, MRI reconstruction, audio compression AI: attention = Q·K^T ≈ convolution (FFT speedup) Monarch Mixer: sub-quadratic attention via FFT Cooley-Tukey: radix-2 DIT/DIF, in-place N log N NVIDIA cuFFT: GPU-accelerated FFT library DSP in AI Chip Context Inference edge: dedicated DSP + NPU cores Audio wake-word: always-on DSP at µW power Beamforming: FIR filter array across mic elements Image ISP: Bayer demosaic, noise filter, sharpening Radar: CFAR detection, range-doppler 2D-FFT Mixed-signal: ADC/DAC for SerDes, HBM PHY OFDM modem in 5G SoC: FFT/IFFT hardware block MAC array throughput: GOps vs TFLOP/s GPU Qualcomm Hexagon: VLIW DSP + HVX vector ext. ``` | Operation | Complexity | Hardware | Application | |---|---|---|---| | FIR filter (N taps) | O(N) MAC/sample | MAC array, SIMD | Anti-aliasing, channel EQ | | IIR filter (N poles) | O(N) MAC/sample | Feedback MAC | Audio, control loops | | DFT (N-point) | O(N²) | Rare directly | Baseline reference | | FFT (N-point) | O(N log N) | cuFFT, HW FFT | OFDM, radar, spectrum | | Convolution | O(N·M) or O(N log N) via FFT | Tensor core, DSP | FIR filtering, image | **Sampling theorem (Nyquist-Shannon)** — a continuous signal must be sampled at a rate fs > 2·fmax to be reconstructed without aliasing. An anti-aliasing low-pass filter must remove all energy above fs/2 before the ADC. Violating this causes high-frequency content to fold back into the baseband as aliasing distortion, which is indistinguishable from legitimate signal. For voice (4 kHz bandwidth), fs = 8 kHz is exactly Nyquist; CD audio uses 44.1 kHz for 20 kHz bandwidth plus guard band. **FIR filters** implement the convolution y[n] = Σ h[k]·x[n−k] using a tapped delay line: the input signal passes through N delay elements (z⁻¹), each tap is multiplied by a coefficient h[k], and the products are summed. FIR filters are unconditionally stable, have linear phase (constant group delay), and are fully specified by their coefficient vector — which is the sampled impulse response. The price is computational load: an N-tap FIR requires N multiplications and N−1 additions per output sample, which is why SIMD MAC arrays are universal in DSP hardware. **FFT and frequency-domain processing** — the Discrete Fourier Transform (DFT) converts N time-domain samples to N complex frequency-domain coefficients. Direct computation costs O(N²); the Cooley-Tukey FFT exploits the DFT's periodicity and symmetry to reduce this to O(N log₂N) using a butterfly network of complex additions and twiddle-factor multiplications. An 8-point FFT requires 3 stages of 4 butterflies; a 4096-point FFT requires 12 stages of 2048 butterflies. OFDM modems (5G, Wi-Fi 6E, DOCSIS) implement 4096-point FFTs as hard IP blocks, processing one symbol per FFT latency. **AI connections** — long-range attention in transformer models can be viewed as a form of learned convolution in the sequence domain. Monarch Mixer and other sub-quadratic attention proposals leverage FFT-based convolution (O(N log N)) to replace O(N²) attention. In a more direct sense, every GPU runs cuFFT for spectral analysis workloads, and AI inference chips for edge devices typically include a DSP subsystem for pre-processing sensor data — beamforming, voice activity detection, image ISP — before the neural-network accelerator core. **Fixed-point and quantization** — embedded DSP systems represent samples in Q-format fixed-point (e.g., Q1.15 for 16-bit signed) to save area and power versus floating-point. The SNR of a uniform quantizer is approximately 6N + 1.76 dB for N bits, setting ADC resolution requirements: 12-bit gives ~74 dB, 16-bit gives ~98 dB. The same principle applies to AI inference: INT8 quantization trades 24 dB of numeric headroom for 4× throughput and 4× memory bandwidth reduction. Read DSP through a **frequency-domain decomposition lens rather than a time-domain operations lens**: almost every DSP algorithm is most clearly understood in terms of which frequency components it preserves, attenuates, or shifts — the filter, the FFT, and the sampling theorem are all fundamentally statements about the frequency axis.

Go deeper with CFSGPT

Get AI-powered deep-dives, save terms, and run advanced simulations — free account.

Create Free Account