Matched Filter in Vitis HLS
A matched filter for complex 16-bit I/Q samples and a linear FM (chirp) pulse, written in Vitis HLS and built two ways: a time-domain FIR made of DSP48E1 chains, and a frequency-domain core with the AMD FFT IP. Three labs compare the two on AMD FPGAs with numbers from C simulation, HLS synthesis, RTL co-simulation and Vivado place and route, so the choice between time and frequency domain for a given pulse length, precision and sample rate rests on measured cost, latency and output quality.
Every design is checked sample by sample against a Python golden model, in C simulation and in RTL co-simulation. Every lab runs with one command, on Linux or Windows, with the free AMD Vitis 2024.2 tools.
The labs cover streaming vs block processing, pulse lengths of 16 to 128 samples, Hamming and Taylor windows, 24-bit and 16-bit fixed point, block floating point and floating point, folded FIR filters and four FFT core architectures.
What You'll LearnHow a complex FIR maps onto chains of DSP blocks and why its cost grows with the pulse, while the FFT-based filter keeps its size. What streaming and block processing mean for throughput and latency, why the FFT core needs more bits inside, and where each architecture wins.
Time Domain or Frequency Domain
How folding maps several FIR taps onto one DSP block and how burst FFT cores share one butterfly across all stages. How DSP blocks trade against block RAM, logic and throughput, what limits the clock, and which architecture is the cheapest at a given sample rate.
Oversampling and Hardware Reuse
How a window trades sidelobes for mainlobe width and SNR at no hardware cost. How fixed point, block floating point and floating point differ in precision, dynamic range and DSP cost, how much matched-filter gain each keeps, and when a weak echo next to a strong one stays visible.
Windows and Arithmetic
Output quality from C simulation, throughput and latency from RTL co-simulation, resources and timing after place and route. Every design is checked sample by sample against a bit-true Python golden model, so the hardware does exactly what the model says.
Measured, Not Estimated
Course Structure
-
Everything runs with the free AMD Vitis 2024.2 tools and Python 3.12, on Linux, Windows or WSL2; the Artix-7 200T and Zynq-7020 devices need no paid licence. One command builds every project of a lab as a Vitis workspace and runs the selected stages: C simulation, HLS synthesis, RTL co-simulation, Vivado place and route, or the Vitis IDE. Every stage checks the design sample by sample against a bit-true Python golden model, with AMD's bit-accurate FFT model for the frequency domain. Each run prints a results table and opens its plots, so every number in the reports can be reproduced locally.
-
A streaming FIR against a block filter, FFT, multiply by H, inverse FFT, for pulses of 16, 32, 64 and 128 samples on intervals of 512 samples, at 100 MHz on an Artix-7 200T. Both give the same output, so the comparison is about architecture, not quality. The lab shows how the FIR's DSP blocks grow with the pulse while the FFT core stays the same, what the FFTs pay in logic and block RAM instead, and why both take one sample per clock but answer tens of cycles versus several intervals later.
-
The frequency-domain filter for a 128-sample pulse on a Zynq-7020, with no window, a Hamming and a Taylor window, in four kinds of arithmetic: 24-bit and 16-bit fixed point, block floating point and floating point. The comparison covers sidelobes, mainlobe width, SNR loss, a weak echo next to a strong one, quality against the input level, and what each arithmetic costs in DSP blocks, block RAM and latency. The lab ends with the core as an IP for a Vivado block design: AXI-Lite registers, AXI-Stream data.
-
The advanced lab: the clock runs at 150 MHz, the samples arrive at 150, 75 or 37.5 MSPS. The FIR is folded so that one DSP block computes 1, 2 or 4 taps; the frequency-domain filter uses the pipelined FFT core or one of three burst cores. Which designs keep up at each sample rate, and which is the cheapest: DSP blocks, logic and block RAM after place and route, latency and output quality.
Website Workshop
Extended Edition
Labs 1, 2 and 3: full Vitis HLS sources, Python golden model, one-command build flow, the three lab reports (PDF) and a guide for working with an AI coding assistant.
Udemy
Lite Edition
Labs 1 and 2: Vitis HLS sources, Python golden model, one-command build flow, the two lab reports (PDF) and a guide for working with an AI coding assistant, in a compact course format.