This free timing slack calculator checks a register-to-register path in an FPGA or ASIC design. Enter the clock frequency, flip-flop clock-to-Q, setup and hold times, data path delay, clock skew and uncertainty to get the setup slack, hold slack, maximum clock frequency (Fmax) and the logic delay budget — the same quantities static timing analysis tools like Vivado, Quartus and PrimeTime report.
Setup and hold slack formulas
Setup slack = (Tclk + skew − uncertainty) − (Tcq + Dmax + Tsu)
Hold slack = (Tcq + Dmin) − (Th + skew + uncertainty)
Fmax = 1 ÷ (Tcq + Dmax + Tsu − skew + uncertainty)
Worked example
At 200 MHz the period is 5 ns. With Tcq = 0.3 ns, a 3.5 ns data path, Tsu = 0.1 ns and 0.1 ns of uncertainty, the data needs 3.9 ns and has 4.9 ns available: setup slack = +1.0 ns. The path could run at up to 1 ÷ 4.0 ns = 250 MHz. With a 0.5 ns shortest path and 0.05 ns hold time, hold slack = +0.65 ns.
Clock period and logic budget by frequency
Time left for logic and routing between two registers, assuming Tcq = 0.3 ns, Tsu = 0.1 ns, 0.1 ns uncertainty and no skew. Real figures depend on the device and speed grade.
| Clock | Period | Logic + routing budget |
|---|---|---|
| 50 MHz | 20 ns | 19.5 ns |
| 100 MHz | 10 ns | 9.5 ns |
| 125 MHz | 8 ns | 7.5 ns |
| 150 MHz | 6.667 ns | 6.17 ns |
| 200 MHz | 5 ns | 4.5 ns |
| 250 MHz | 4 ns | 3.5 ns |
| 300 MHz | 3.333 ns | 2.83 ns |
| 400 MHz | 2.5 ns | 2 ns |
| 500 MHz | 2 ns | 1.5 ns |
Related calculations
- Generate the clock with the FPGA clock divider and PLL calculator.
- Size the buffer between two clock domains with the FIFO depth calculator.