What actually happens when a flip-flop's setup or hold time is violated, and what's the standard fix?
From PDVerse PnR Interview Handbook · pdVerse Mentor Guide
Short Answer
Violating setup or hold can drive a flip-flop into a metastable state, where the output settles to an intermediate value and may never resolve to a clean 0 or 1 in time. The standard mitigation is double synchronization -- passing the signal through two or more flip-flops in series, giving the metastable state extra clock cycles to resolve before it's used by downstream logic.
Technical Explanation
- Violating setup or hold can drive a flip-flop into a metastable state -- the output settles to an intermediate value and may never resolve to a clean 0 or 1 within the expected time.
- The standard mitigation is double synchronization: passing the signal through two or more flip-flops in series.
- This gives a metastable state extra clock cycles to resolve before downstream logic actually uses the value -- it doesn't prevent metastability, it manages the risk of it propagating.
Common Mistake
The Trap: Assuming a single synchronizer flip-flop is enough to handle an asynchronous or CDC signal -- one flip-flop can still pass a metastable value downstream; double synchronization specifically buys extra resolution time.
Follow-up Question & Model Response
"Why would this matter specifically for clock-domain-crossing (CDC) signal placement decisions in physical design?"
Candidate Model Response: Because a synchronizer's effectiveness partly depends on its physical placement -- the flip-flops need to actually be close enough together that the signal path between them doesn't introduce its own timing risk, which is a PD placement decision, not just an RTL decision.
Practical Example
Debug Scenario: A signal crossing from a slow clock domain to a fast one uses only a single capture flip-flop -- adding a second flip-flop in series (double synchronization) gives any metastable state from the first flop time to resolve before the value is used.
Physical Design & Planning Handbook
Master ASIC Physical Design Planning & Floorplanning
Dive into 14 comprehensive chapters covering netlist sanity, FinFET grids, macro placement, power grids, CTS, and timing budgeting.
Continue practising