Direct Digital Synthesizer in Vitis HLS
A sin + cos direct digital synthesizer for an AMD Zynq-7020, written in Vitis HLS and measured: 20-bit phase accumulator, 16-bit outputs, 90 dB SFDR target. Three labs, each asking one design question and answering it with numbers from C simulation, HLS synthesis and Vivado place and route.
Every design is checked sample by sample against a Python golden model, in C simulation and in C/RTL co-simulation. You run every lab yourself with one command, on Linux or Windows, with the free AMD Vitis 2024.2 tools.
The labs cover the quarter-wave lookup table, CORDIC and polynomial architectures, phase truncation, LFSR dither, first-order Taylor correction, and 1, 2 and 4 samples per clock for wideband signals.
What You'll LearnHow a quarter-wave lookup table, a CORDIC and a polynomial turn phase into sine and cosine, and what each one spends for the same 90 dB SFDR: block RAM, logic or DSP blocks. How a faster clock is paid for in pipeline registers and latency, and how far the HLS estimates match place and route.
Choosing a DDS Architecture
How parallel lanes let a DDS compute several samples per clock and reach a sample rate above the clock rate. How a second accumulator turns it into a linear FM chirp generator, what each extra lane costs in block RAM, logic or DSP blocks, and which resource runs out first.
Throughput for Wideband Signals
How phase and amplitude bits set the size of a lookup table and what each bit buys in spectral purity. How LFSR dither turns spurs into noise, how first-order Taylor correction moves each sample back onto the sine for a few DSP blocks, and how to read from the spectrum which error limits the output.
Trading Memory for Spectral Purity
SFDR and SNR from full-period 2^20-point spectra at two test tones, latency in cycles, resources and timing slack 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 Zynq-7020 device needs no paid licence. One command builds every project of a lab as a Vitis workspace and runs the stages you ask for: C simulation, HLS synthesis, C/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. Each run prints a results table and saves spectrum plots and logs, so every number in the reports can be reproduced on your own computer.
-
Three ways to turn phase into sine and cosine: a quarter-wave lookup table in block RAM, a CORDIC built from shifts and adds, and an odd polynomial on DSP blocks, each sized to the same 90 dB SFDR and built at 100 MHz and 250 MHz on a Zynq-7020. The comparison covers which resource each one spends, how a faster clock is paid for in pipeline registers and latency, why equal SFDR does not mean equal SNR, and how far the HLS estimates match place and route. One pragma halves the table's block RAM and decides whether it meets 250 MHz. The lab ends with the three architectures in one IP core for a Vivado block design: the architecture selected over AXI-Lite, samples out over AXI-Stream.
-
A quarter-wave lookup table at 10 and 14 phase bits, with plain phase truncation as the baseline and two inexpensive improvements on the same table: LFSR phase dithering, which turns spurs into noise, and first-order Taylor correction, which uses the dropped phase bits and a few DSP blocks to move each sample back onto the sine. The comparison covers SFDR, SNR, memory, logic and DSP blocks, and shows how to read from the spectrum which error limits the output. The lab ends with an IP core for a Vivado block design: the correction mode selected over AXI-Lite, samples out over AXI-Stream.
-
The advanced lab: a second accumulator turns the DDS into a linear FM chirp generator, and parallel lanes compute 1, 2 or 4 samples per clock at 250 MHz, up to 1000 MSPS, a sample rate above the clock rate. All three architectures are built and measured: how resources grow with the number of lanes, which FPGA resource runs out first, and how much timing margin is left. The lanes are checked bit for bit against the one-lane output, and the chirp's purity is measured after dechirping.
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: architecture and precision trade-offs. Best for learners who want the core DDS workflow in a compact course format.