Course: FPGA timing closure in Vivado
$69
Learn to read the Vivado timing report and find the root cause of failing paths. See how to fix a VHDL design that fails timing at 150 MHz with lookup tables, pipelining, and a clock domain crossing (CDC) FIFO.
Description
This course teaches how to fix a VHDL design that fails timing in Vivado. You will learn to read the timing report and trace a failing path back to the lines of VHDL code that caused it.
Every FPGA engineer runs into timing problems sooner or later. The timing summary turns red, and you get a long list of failing paths with names that are taken from your VHDL code but don’t exactly match it. It’s not obvious what to do next, but the real fix is almost always in the code or in the constraints.
The example project is the audio spectrum analyzer from my FFT course. It meets timing without any problems, but only because it runs at a slow 22 MHz clock. When we move it to a new 150 MHz clock, the timing report comes back with 235 failing endpoints. You don’t need to take the FFT course first, as everything you need is available for download in this course.
First, we’ll go through the Vivado timing report section by section. I’ve made an interactive demo that shows how setup and hold violations happen, and you can download it and play with the sliders yourself.
Then, we’ll tackle the failing paths one group at a time. In each lesson, we follow the worst path from the timing report through the schematic to the VHDL code and fix one module, sometimes with a lookup table and sometimes with pipeline registers. You will see that hundreds of failing endpoints are really just a handful of problems.
Finally, we’ll deal with the paths that cross between the two clocks. We add a clock domain crossing (CDC) FIFO and create the timing constraints for it in the Vivado GUI. When the timing report is clean, we test the design on the board.
The CDC FIFO is a module from the VHDLwhiz Membership. When you buy this course, you also get the 39-minute video that explains how it works as a bonus lesson.
Most of the VHDL code was generated by AI in the FFT course, so we treat it as a third-party design that someone else wrote. For every fix, the new files are available for download, and we compare the old and the new code side by side to understand what changed and why it works.
This course is also available in the VHDLwhiz Membership.
The difference is that when you purchase this product, you get permanent access to the course, while the membership charges a monthly fee to access the content.
No FPGA board is required. All of the work happens in Vivado, and I only show the design on the board at the beginning and at the end of the course.
Hardware used in the course
- Arty S7-25: Xilinx Spartan-7 FPGA (SKU: 410-352-25)
Resellers: Digilent, Mouser, DigiKey
(Optional. You can build the project and read the timing reports in Vivado without the board.) - Pmod I2S2: Stereo Audio Input and Output (SKU: 410-379)
Resellers: Digilent, Mouser, DigiKey, RS Electronics
(Optional) - Pmod OLED: 128 x 32 Pixel Monochromatic OLED Display (SKU: 410-222)
Resellers: Digilent, Farnell, Newark, DigiKey, Mouser, RS Electronics
(Optional) - A mini-jack male-to-male audio cable
(Optional, from the computer to the Pmod I2S2 line in. I play test tones from a tone generator in the browser, which is included in the course.)
Software used in the course
I use Windows 11 in the course. All the other software is available for free for Windows and Linux:
- AMD Vivado
(The free edition is enough) - Microsoft Visual Studio Code
(Any editor will do) - Beyond Compare
(Optional and not free. Any file comparison tool will do, including the one in VS Code.)
Course outline
The overview below shows the lessons in this course.
1 - Introduction
Welcome to the course! Let's talk about what timing closure is and why a failing timing report is hard to act on. Then I'll show you the example project and the three parts of the course.
2 - Setting up the example project
We'll use the FFT audio spectrum analyzer as our example project. After porting it to a newer Vivado version and fixing the Incremental Compile license warning, we test it on the Arty S7 board.
3 - Understanding the timing report in Vivado
Let's open the implemented design in Vivado and go through the timing report section by section, from the setup and hold slack in the timing summary to the slowest path in the design.
4 - Setup and hold analysis of a timing path
In this lesson, we use an interactive demo to see how clock skew and logic delay cause setup and hold violations. Then we read the Vivado path report for the slowest path line by line.
5 - Failing timing with a new 150 MHz clock
We'll add a 150 MHz clock in the Clocking Wizard and move the spectrum analyzer and display driver to it. The design builds, but the Vivado timing summary shows 235 failing endpoints.
6 - From the path report to the VHDL code
In this lesson, we find the root cause of the worst failing path. We follow it from the Vivado path report and the schematic to the VHDL code, where 31 logic levels sit between two flip-flops.
7 - Replacing slow arithmetic with a lookup table
Let's fix the slowest path in the 150 MHz clock domain. We replace the subtract, multiply, and divide in the bar mapper with a lookup table that the VHDL code calculates at synthesis time.
8 - From variables to pipeline registers
We'll trace the next ten failing paths to the magnitude calculation after the FFT. Then we compare the old and new VHDL code to see how replacing variables with signals adds a pipeline stage.
9 - Splitting the FFT butterfly over two clock cycles
See how a single DSP multiplier can use most of the clock period. We pipeline the FFT butterfly over two clock cycles and add wait states to the FFT state machine to handle the extra latency.
10 - Fixing a high-fanout path in the gain control
In this lesson, the routing causes most of the delay. A net with a fanout of 36 leads us to the automatic gain control, where we split the multiply and the peak tracking over more clock cycles.
11 - Splitting a ROM lookup and multiplier path
Let's fix the last 16 failing paths inside the 150 MHz clock domain. They go from a ROM lookup in the Hann window through a DSP multiplier, so we split the path with a coefficient register.
12 - Meeting timing with a CDC FIFO and max delay constraints
We'll fix the paths between the two clocks with a clock domain crossing (CDC) FIFO. Then we create the max delay constraints in the Vivado GUI, meet timing, and test the design on the board.
BONUS: Clock domain crossing (CDC) AXI-style FIFO
This CDC FIFO implemented in VHDL uses block RAM and Gray code to synchronize read and write pointers.
This course is also available in the VHDLwhiz Membership.
The difference is that when you purchase this product, you get permanent access to the course, while the membership charges a monthly fee to access the content.




Reviews
There are no reviews yet.