Draft preview. Lessons are being written and reviewed.

Digital Design / Module 9: Static timing

52. Constraints, false and multicycle paths

Tell the tool what's really required.

Lecture coming soon

See it move

The idea

Timing tools don't know your design's intent. Constraints tell the tool what clocks exist, how signals enter and leave the chip, and which paths are special. Wrong constraints are dangerous: an over-relaxed path produces a chip that fails, with no warning from the tools.

The basics

create_clock -name clk -period 2.0 [get_ports clk]
set_input_delay  0.5 -clock clk [get_ports din]
set_output_delay 0.4 -clock clk [get_ports dout]

Input and output delays describe the part of the cycle consumed outside your block.

False paths

A false path tells the tool not to time a path, because it can't matter. Paths between unrelated asynchronous clocks, handled by , are a classic example.

set_false_path -from [get_clocks clk_a] -to [get_clocks clk_b]

Be careful, because this stops all checking of those paths. A clock groups command is often clearer for unrelated clocks. Modern practice also adds max-delay limits on gray-coded crossings.

Multicycle paths

Some paths don't need to finish in one cycle. If data updates only every second cycle, due to an enable, it may legally take two.

set_multicycle_path 2 -setup -from [get_pins a_reg/CP] -to [get_pins b_reg/D]
set_multicycle_path 1 -hold  -from [get_pins a_reg/CP] -to [get_pins b_reg/D]

Why the hold line is needed

By default, the hold check is done one edge before the setup edge. So a multicycle setup of 2 moves the hold check from edge 0 to edge 1, which would demand that data stay unchanged for a whole extra cycle. That's wrong for nearly every design, so you add a multicycle hold of N-1 to move it back. Move both sliders in the animation above to see the checks shift. These edges are counted on one shared clock. When the two clocks have different frequencies, whether cycles count on the launch or capture clock matters, so check your tool's documentation for -start and -end.

Common mistake

Adding a multicycle path because a path is failing. That silently hides a real bug if the logic doesn't actually have an enable guaranteeing the extra cycle. Every exception needs a design reason you can state, and teams often verify these with formal tools.

Key ideas

  • create_clock defines the clock.
  • False paths are excluded from timing.
  • Multicycle paths allow more than one cycle, usually with the hold adjusted too.

Your exercise

Write constraints for a two-cycle path, including the hold adjustment.

Interview questions

coreMulticycle setup of 2: what about hold?

basicA block has a 2.0 ns clock. Its input port has set_input_delay 0.6 ns, and the first flop has a 0.2 ns setup time. How much time is left for the logic between the port and that flop?

basicWhat is the difference between a false path and a multicycle path?

coreLaunch and capture flops both have an enable that is high once every 4 cycles. The clock is 1.0 ns, clock-to-Q is 0.1 ns, setup is 0.1 ns, and the logic takes up to 3.5 ns. What is the slack as a single-cycle path, and as a multicycle path? Which two constraint lines do you write?

coreAn engineer adds set_multicycle_path 2 -setup on a path, and the next timing run shows a large hold violation on that same path, which passed before. What happened, and should you let the tool fix it?

coreThis path fails single-cycle timing, so someone proposes a two-cycle multicycle path from a_reg to b_reg. Is that safe?

reg [7:0] a_reg;
wire [15:0] slow_out = a_reg * a_reg;   // slow logic, takes ~2 cycles
always @(posedge clk) begin
  a_reg <= a_next;                // loads on every edge
  if (en) b_reg <= slow_out;      // en is high every second cycle
end

coreWhat happens if you set an input or output delay smaller than the real external delay?

advancedAll paths between two asynchronous clocks are made false paths. One of those paths is a Gray-coded FIFO pointer. What check have you lost, and how is it usually put back?

advancedA path has a 1.5 ns clock, a minimum arrival of 0.4 ns after the launch edge, and a 0.05 ns hold time. With set_multicycle_path 2 -setup alone, what is the hold slack? What is it after adding the hold line?

Practise these 9 questions with animations