
Written and maintained by the PhDino author · Last reviewed 21 September 2026 · Checked against 1 independent reference calculation · how PhDino checks its numbers
The two timing checks that determine whether a synchronous digital circuit will actually work at a given clock speed.
A flip-flop only reliably captures the data at its input if that data has been stable for a minimum time before the clock edge (setup time) and remains stable for a minimum time after the clock edge (hold time). If either requirement is violated, the flip-flop can enter an unpredictable, unstable state (metastability) instead of cleanly capturing a 0 or a 1 — a real failure mode in synchronous digital design, not just a theoretical concern.
Setup checking asks whether data arrives early enough: starting from one clock edge, data has to travel through a launching flip-flop's own clock-to-Q delay, then through any combinational logic between the two flip-flops, and still arrive with enough time left before the next clock edge to satisfy the receiving flip-flop's setup requirement. Hold checking is different in character: it asks whether data changes too soon after the clock edge that just captured the previous value, which is why hold checks depend on the fastest (not slowest) path delay and don't involve the clock period at all.
Setup margin = clock period − (clock-to-Q delay + combinational delay + setup time) Hold margin = (clock-to-Q delay + combinational delay) − hold time
PhDino earns a commission on qualifying purchases made through this link, at no extra cost to you.
Code: The Hidden Language of Computer Hardware and Software by Charles Petzold — Builds from switches and logic gates up to a working computer, one clear step at a time. (Bookshop.org UK, UK delivery only)
→ The full PhDino bookshelf on Bookshop.org (UK delivery only)
