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 LearnA quarter-wave lookup table, a CORDIC and a polynomial, each sized to the same 90 dB SFDR. At 100 MHz the table spends 15 block RAMs, the CORDIC 721 LUTs and no block RAM or DSP, the polynomial 10 DSP blocks. All three meet timing at 100 and 250 MHz.
Choosing a DDS Architecture
Several samples per clock is how a DDS reaches the sample rate a wideband signal needs. All three architectures generate a linear FM chirp at 1, 2 and 4 samples per clock: at 250 MHz, 4 samples per clock gives 1000 MSPS. See what each extra lane costs: block RAM for the table, LUTs for the CORDIC, DSP blocks for the polynomial.
Throughput for Wideband Signals
How phase bits, LFSR dither and first-order Taylor correction trade table size for SFDR. With a 10-bit phase, plain truncation reaches 60.2 dBc; Taylor correction lifts the same table to 113.7 dBc for 3 DSP blocks. Dither reaches 97.3 dBc, which turns spurs into noise: that number depends on the FFT length (2^20 points here).
Trading Memory for Spectral Purity
SFDR and SNR from full-period 2^20-point spectra at two test tones, resources and timing slack after place and route, latency in cycles. Bit-exact checks at every stage, so you know the hardware does 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 is sized to the same 90 dB SFDR, then built at 100 MHz and 250 MHz. Compare 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.
-
How phase bits and amplitude bits set the size of a lookup table, and what each bit buys in spectral purity. Plain phase truncation is the baseline; two inexpensive improvements are added to 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. Compare SFDR, SNR, memory, logic and DSP blocks at 10 and 14 phase bits, and read from the spectrum which error limits the output.
-
A wideband signal needs a sample rate above the clock rate. 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. 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
Light Edition
Labs 1 and 2: architecture and precision trade-offs. Best for learners who want the core DDS workflow in a compact course format.