Draft preview. Lessons are being written and reviewed.

Digital Design / Module 9: Static timing

51. Fixing violations

Know what to try, and in what order.

Lecture coming soon

Lab: Timing path lab

The idea

When a timing report shows violations, the fix depends on the type. Setup violations are about being slow, and hold violations are about being fast, so their fixes are opposites.

Fixing setup violations

Try these roughly in this order:

  • Check the constraint. Is this a , or a path, that was not declared? Don't fix what isn't real.
  • Restructure the logic. Put late-arriving signals closer to the output. Replace long priority chains with flatter logic.
  • Add a stage. Very effective, but it changes , so you must alter the design.
  • Upsize cells. Let the tool use larger drive strengths and low-threshold cells, at some area and leakage cost.
  • Reduce load. Duplicate high-fanout logic, and buffer long wires.
  • Lower the frequency. The last resort, usually a product decision.

Fixing hold violations

Hold is simple in principle: add delay on the data path, typically with buffers. The tool does this late in the flow, once the clock tree exists and real is known. Fixing hold too early wastes effort, because the numbers will change. Be careful, though: that delay must not break setup on the same path.

Why hold is more dangerous

Setup failureHold failure
After fabricationRun the clock more slowlyNo frequency helps
SeverityChip works, more slowlyChip may be scrap

Reading a report

A timing report lists a path's start point, end point, each cell's delay, and the final . Look first for what's unusual: a cell driving a huge load, a long wire, or a path crossing many hierarchy levels. Fix the worst path, then rerun. Often a single fix helps many paths that share logic.

Common mistake

Attempting to close timing purely with tool options when the logic depth is simply too great. If a path has 40 levels of logic at a clock that allows 15, no optimisation can save it. Change the RTL.

Key ideas

  • Setup: pipeline, restructure, or upsize.
  • Hold: add buffers on the data path.
  • Setup depends on frequency; hold doesn't.

Your exercise

Choose a fix for three supplied reports.

Interview questions

coreWhy are hold violations serious?

basicWhy do setup and hold violations need opposite fixes?

basicA timing report shows a large setup violation on a path. What should you check before changing any logic?

coreA three-gate AND chain has one input that arrives late, at 1.0 ns. The others arrive at 0.3 ns, and each gate takes 0.2 ns. Which ordering is faster, and by how much?

`timescale 1ns/1ps
module chain(input a, b, c, late, output y_first, y_last);
  wire n1, n2, m1, m2;
  and #0.2 g1(n1, late, a), g2(n2, n1, b), g3(y_first, n2, c);
  and #0.2 h1(m1, a, b), h2(m2, m1, c), h3(y_last, m2, late);
endmodule

coreA path has -0.08 ns hold slack and +0.5 ns setup slack. Each delay buffer adds 0.03 ns. How many buffers do you add, and what are the final slacks?

coreA single flop drives an enable to 400 flops spread across the block, and that net fails setup. What can you do in RTL or synthesis?

coreWhy is hold fixing usually left until after clock tree synthesis?

advancedA path has 36 levels of logic at 0.12 ns per level, and the logic budget per cycle is 1.6 ns. How many pipeline stages do you need?

advancedAfter hold buffers were added at a flop's input, a different path into the same flop started failing setup. What happened, and what is the better fix?

Practise these 9 questions with animations