IntermediateTopic 46 of 104Electronics & Embedded

Timing: setup and hold

Data must be stable around the clock edge to be captured correctly.

In depth

Setup time: input must be stable before the clock edge; hold time: stable after it. Violations cause metastability. Clock period T≥t_clk-to-q+t_logic+t_setup+skew. Static timing analysis checks all paths. Fix with pipelining or retiming.

Key points

  • Clock skew and jitter
  • Synchronisers for asynchronous inputs
  • Maximum frequency
Example

Crossing clock domains requires a two-flip-flop synchroniser.

Why it matters

Setup and hold times decide whether data is captured correctly, so timing violations are a common source of intermittent faults.

Where this is used

  • Checking that a data bus meets setup time at a faster clock speed.
  • Diagnosing random errors that appear only when a clock is raised.
  • Designing the clock tree of an FPGA with tight timing margins.

Frequently asked questions

What is Timing: setup and hold?

Data must be stable around the clock edge to be captured correctly.

Why is it important to understand timing: setup and hold?

Setup and hold times decide whether data is captured correctly, so timing violations are a common source of intermittent faults.

What is setup time?

The minimum time the data must be stable before the active clock edge so the flip-flop captures it correctly.

What is metastability?

When a flip-flop samples data that changes near the clock edge, its output can hover between states for a time, which is handled with synchronisers.

How is Timing: setup and hold used in practice?

Typical applications include checking that a data bus meets setup time at a faster clock speed, diagnosing random errors that appear only when a clock is raised and designing the clock tree of an FPGA with tight timing margins.

What should I learn before Timing: setup and hold?

Study "Finite state machines" first (topic 45 of 104 in Electronics & Embedded). It covers the groundwork this topic builds on.

What are the key points of Timing: setup and hold?

Clock skew and jitter. Synchronisers for asynchronous inputs. Maximum frequency.

Can you give an example of Timing: setup and hold?

Crossing clock domains requires a two-flip-flop synchroniser.

What comes after Timing: setup and hold?

The next topic is "Memory types", which builds directly on this one.

How difficult is Timing: setup and hold?

It is classed as Intermediate in Electronics & Embedded (topic 46 of 104). It is an intermediate topic. Work through the beginner topics in Electronics & Embedded first.

Learning path

Want to practise? Open the interactive course for quick checks, quizzes, simulations and progress tracking.

Related topics