FPGA Signal Processing
These are the projects of CSE 237C (Validation and Testing of Embedded Systems), which I'm taking in fall 2026. Three are done and one is still to come. Each of the three done so far takes a signal-processing kernel written in C++ and turns it into hardware with Vitis HLS, the AMD tool that synthesizes C++ into a circuit for an FPGA. The board is a PYNQ-Z2, and synthesis targets its Zynq-7020 with a 10 ns clock. Every version is checked by a C testbench against golden outputs, and the cycle counts and resource numbers below are Vitis HLS's estimates from synthesis.
Each project starts from the course's starter code and asks a series of questions: change one thing, synthesize, and explain what happened to the latency and to the chip's resources (DSP slices, flip-flops, LUTs and block RAM).
An FIR filter
The first project is a 128-tap FIR filter, a matched filter for a chirp. It takes one sample per call, shifts it into a register of the last 128 samples, and multiplies and adds them against the coefficients. Our group's repository is one commit, mine.
The starting version takes a new sample every 136 cycles, at a latency of 135, one pass of a loop that both shifts and accumulates. The versions after it tried one change each: narrower ap_int types for the coefficients and the sum, pipelining turned off (257 to 641 cycles), and the first tap moved out of the loop so the loop body has no branch. Splitting the shift and the accumulate into two loops, unrolling both fully and partitioning both arrays into registers took its latency to 30 cycles. Pipelining the whole function on top of that, with the narrow types, lets it take a new sample every clock cycle, at a latency of 27.
That costs area: 8,703 flip-flops and 4,248 LUTs, against the starting version's 610 and 305. Every version's testbench passes.
A CORDIC
The second project, with a partner, converts Cartesian coordinates to polar with CORDIC, which turns a vector toward the x-axis by a fixed set of angles and adds up how far it turned. I wrote the floating-point version and three fixed-point ones, and my partner synthesized the lookup-table version, which is the course's starter code, built the demo on the PYNQ-Z2 board and turned in our report.
- Floating point. 110 cycles at 10 rotations and 210 at 20, on 10 DSPs. By 12 rotations the radius is as accurate as a float allows (RMSE 6.5e-8, and 1.3e-7 from 14 on), and our report settled on 14.
- Fixed point. One
ap_fixedtype for every variable. At 16 bits the angle's RMSE is 5.29e-4, in 51 cycles on 3 DSPs. Our report works out how many integer bits each variable needs from the range it takes, though the code gives every variable 3. - Shift and add. Multiplying by the rotation's constant becomes a shift, and only the final gain is multiplied. At 16 bits it takes 49 cycles on 1 DSP.
The diagram below is the block design of the demo overlay committed to the repo, built for a Zynq UltraScale+ board, drawn from my partner's Vivado hardware handoff file. In it the CORDIC is one accelerator behind a register port: the processor writes a point's x and y and reads back its radius and angle.
A DFT
The third project, with the same partner, is the discrete Fourier transform, first on 32 points and then on 1,024. I wrote the 32-point versions and the 1,024-point ones up to the loop interchange, and my partner wrote the best 1,024-point design, the streaming version and the board demo.

The 32-point version starts at 54,660 cycles, computing every cosine and sine. Reading them from lookup tables brings it to 16,484. Then the arrays are split into banks so several can be read at once, and the outer loop is pipelined. Split 4 ways, it takes 302 cycles on 160 of the chip's 220 DSPs. Splitting 8 ways and more is faster still, down to 203 cycles, but needs more DSPs than the chip has, so 4 is the fastest of these that fits. The unrolling experiments after it build on the 16-way split instead, the smallest that feeds a fully unrolled inner loop all 32 reads a cycle.
The 1,024-point version shows a different problem. With a lookup table it takes 6.29 million cycles, because each step of the inner loop adds to the same sum and has to wait for the step before it. Interchanging the two loops makes consecutive steps add to different sums, and it drops to 1.05 million, about six times faster.
The diagram below is the block design of the demo overlay committed to the repo, built for a Zynq UltraScale+ board, drawn from the Vivado hardware handoff file of my partner's streaming design. In it the processor starts the DFT through a control port, and two DMAs stream the real and imaginary samples in from memory and the results back out.
Next: a binary neural network
The last project of the quarter hasn't started yet, so there's nothing of mine in it to show. It asks for a binary neural network that classifies handwritten digits from MNIST. Its weights and activations are only -1 or 1, stored as single bits, so each multiply and sum becomes an XNOR and a count of the bits that are set. The course gives a Python model, and the project asks for:
- a C++ testbench that checks every layer's output against values exported from the Python model;
- the network in Vitis HLS, built on XNOR and bit counts;
- optimizing it for latency and throughput, with the trade-offs written up;
- a demo on the board from a Jupyter notebook, and a report.
Where it stands
The FIR, CORDIC and DFT projects are done. The DFT project's report isn't written yet, and the binary neural network is next.