What is Setup time?

The minimum time before the active clock edge during which a flip-flop's data input must be stable. Paths that cannot meet it limit the maximum operating frequency.

Field: Logic circuits

Japanese name: セットアップ時間

Setup time and hold time Clock edge Clock Data Old data Next data Setup time tsu Hold time th Data must not change in this window Setup violation: data arrives too late Hold violation: data changes too early
Setup time and hold time · Try the interactive version

Why flip-flops need setup time

An edge-triggered flip-flop is typically built from two latches. Before the clock edge, the input must pass through the first latch and its internal nodes must settle so the value is firmly held when that latch closes. If data changes too close to the edge, the flip-flop may capture the old value, the new one, or go metastable, taking unpredictable time to resolve. Setup time is the required stable interval before the edge and hold time the interval after it. Both are characterized per cell and vary with slew and operating conditions.

The setup check and slack

Data launched at one edge must arrive at least the setup time before the next capture edge. Arrival time is clock-to-output plus logic delay; required time is the period, adjusted for clock skew, minus setup time and clock uncertainty. Slack is required minus arrival, and negative slack is a violation. With a 2.0 ns period, 0.2 ns clock-to-output, 1.4 ns of logic and 0.1 ns setup, slack is 0.3 ns. The slowest path, the critical path, sets the maximum frequency: in this example the 1.7 ns total allows about 588 MHz.

Setup time vs. hold time

Setup is a maximum-delay check against the next edge, so a violation disappears if the clock is slowed, or the path is shortened by pipelining, reducing logic depth, upsizing cells or using low-threshold-voltage cells. Hold is a minimum-delay check against the same edge and does not depend on frequency, so it is repaired by adding delay. The two pull in opposite directions: capture-clock skew that helps setup hurts hold. Under on-chip variation (OCV) derating, setup assumes a slow launch side and an early capture clock; hold reverses this.

Constraints that reshape the check

A multicycle path of 2 moves the capture edge two periods away, valid only if logic such as an enable really captures every other cycle. A half-cycle path, launched on the rising edge and captured on the falling edge, gets only half a period. Latches allow time borrowing: data arriving after the latch opens still passes if it arrives before closing, taking time from the next stage. At chip boundaries, set_input_delay and set_output_delay describe time spent outside the chip. Useful skew deliberately delays a capture clock to rebalance adjacent stages.

Try it: questions about Setup time

Which correctly describes the setup time of a flip-flop?

  1. AThe minimum time data must be held after the clock edge
  2. BThe minimum time the data input must be stable before the clock edge
  3. CThe time from power-on until it starts operating
Show answer and explanation

Answer: B. The minimum time the data input must be stable before the clock edge

For a flip-flop to capture correctly, data must be stable for a certain time before the clock edge—the setup time. A violation occurs if the clock-to-output delay plus the data-path delay exceeds the clock period minus the setup time, and it can be fixed by slowing the clock. The time data must remain stable after the edge is the hold time. Violating either can capture wrong values or cause metastability.

In a synchronous circuit with a clock period of 2.0 ns, the launching flip-flop's clock-to-output delay is 0.2 ns, the combinational logic delay is 1.4 ns and the capturing flip-flop's setup time is 0.1 ns. With zero clock skew, what is the setup slack?

  1. A0.3 ns
  2. B0.4 ns
  3. C0.5 ns
Show answer and explanation

Answer: A. 0.3 ns

Setup slack is calculated as "required time − arrival time." The data arrival time is 0.2 + 1.4 = 1.6 ns and the required time is the next clock edge minus the setup time, 2.0 − 0.1 = 1.9 ns, so the slack is 1.9 − 1.6 = 0.3 ns. Being positive, it meets the constraint. 0.4 ns is the value obtained by forgetting to subtract the setup time, and 0.5 ns by adding the setup time instead. A negative slack means a violation.

FAQ

What is the difference between setup time and hold time?

Setup time is how long data must be stable before the clock edge, and hold time is how long it must stay stable after the edge. Setup limits maximum frequency, while hold violations are independent of clock frequency.

How do you calculate setup slack?

Slack = required time − arrival time, where arrival time is clock-to-output plus logic delay and required time is the clock period (adjusted for skew) minus setup time and clock uncertainty. Positive slack means the path meets timing.

Can a setup violation be fixed by lowering the clock frequency?

Yes, a longer period gives the data more time to arrive, so setup violations disappear at a low enough frequency. Hold violations do not, which makes them more dangerous once silicon is built.

Questions that mention Setup time (15)

Setup time appears in 17 practice questions across 5 topics, including Timing analysis and CDC, Logic circuits, How to read datasheets.

  1. On a flip-flop-to-flip-flop path, the clock-to-output delay is 0.15 ns, the maximum combinational logic delay is 2.2 ns and the setup time is 0.15 ns. Ignoring skew and clock uncertainty, what is the maximum clock frequency at which this path can operate?
  2. A path has a clock period of 1.0 ns, a clock-to-output delay of 0.1 ns, a combinational logic delay of 0.85 ns and a setup time of 0.08 ns. If the clock arrives at the capturing flip-flop 0.05 ns later than at the launching flip-flop, what is the setup slack?
  3. On a path with a clock period of 1.25 ns (800 MHz), the clock-to-output delay plus combinational logic delay totals 1.05 ns, the setup time is 0.05 ns, and the setup clock uncertainty is set to 0.05 ns. What is the setup slack?
  4. For OCV derating in setup analysis, the launch clock path and data path delays are multiplied by 1.1 and the capture clock path delay by 0.9. With a launch clock path of 1.0 ns, a data path (including clock-to-output) of 1.5 ns, a capture clock path of 1.0 ns (no common portion), a period of 3.0 ns and a setup time of 0.1 ns, what is the setup slack?
  5. In a circuit running on a 2.0 ns clock, a path has a data arrival time (clock-to-output plus combinational logic delay) of 3.3 ns and a setup time of 0.1 ns. Since this path only needs to capture once every two cycles, a setup multicycle path of 2 is set. What is the setup slack?
  6. With a 2.0 ns clock at 50% duty cycle, a path launches on the rising edge and captures on the falling edge. With a setup time of 0.1 ns and zero skew, what is the maximum allowed sum of the clock-to-output delay and combinational logic delay?
  7. With a 2.0 ns clock, set_input_delay 0.6 ns is set on an input port. If the internal flip-flop's setup time is 0.1 ns and clock latency and skew are ignored, what is the maximum delay allowed for the on-chip path from the input port to the flip-flop?
  8. With a 1.0 ns clock, flip-flops are connected A→B→C. A→B needs 1.2 ns including clock-to-output delay and setup time, while 0.8 ns is enough for B→C. To meet setup on both by intentionally using skew, what should be done to B's clock (assume the clocks of A and C arrive at the same time)?
  9. The transmitting IC has a clock-to-output delay of max 6 ns, the board trace delay is 1 ns, and the receiving IC has a setup time of 3 ns. Ignoring clock skew, what is the maximum usable clock frequency?
  10. In a synchronous circuit, what determines the maximum clock frequency at which it can operate?
  11. In timing constraints (SDC), which setting specifies margin subtracted from the clock period to allow for expected clock jitter, skew and the like?
  12. With a 2.0 ns clock, a path runs from a flip-flop that launches data on the rising edge at time 0 to a latch that opens (becomes transparent) at 1.0 ns and closes at 2.0 ns. If the data arrives at the latch at 1.4 ns, how much time has been borrowed at this latch (time borrowing)?
  13. What does the value specified with set_output_delay represent?
  14. How does the mean time between failures (MTBF) due to metastability change when a two-flip-flop synchronizer is extended to three stages?
  15. Which correctly explains the main reason a chip malfunctions under a voltage glitch that lowers the supply voltage for an instant?

Books on Logic circuits Ad

Learn hands-on: parts and kits

Building real circuits is a good way to check what you learned in the questions.

As an Amazon Associate I earn from qualifying purchases.

Comparisons that include this term

Semiconductor, Electronics and Computing Calculators

This page was drafted with AI and fact-checked by a separate AI review before publication. Our Editorial policy explains how we write and check content. If you spot an error, please tell us on our Contact page.

Back to the glossary