We derive the probability of still being metastable after a time t from first principles.
Step 1 — Model the resolving loop.
A flip-flop's output stage is a cross-coupled pair of inverters: a loop with gain A>1 and a node capacitance C / resistance R, giving time constant τ=RC/(A−1).
Why this step? The regenerative loop amplifies any tiny imbalance v away from the metastable point exponentially — this is what eventually resolves the state.
Step 2 — Exponential departure.
Near the balance point the voltage deviation grows as
v(t)=v0et/τ.Why this step? Positive feedback ⇒ growth is exponential, and τ sets the speed. To reach a valid logic level VL we need v(t)≥VL, i.e. resolution time t=τln(VL/v0).
Step 3 — How likely is a small v0?
The initial imbalance v0 depends on how close the data edge landed to the sampling instant. Landing within a tiny window Δt is uniformly likely, and v0∝Δt. The chance of the flip-flop entering the metastable window per clock is
Penter=T0⋅fclk⋅fdata,
where T0 is a device "susceptibility window" constant.
Why this step? Both a clock edge (rate fclk) and a data change (rate fdata) must nearly coincide; probability of near-coincidence scales with both rates and the window width T0.
Step 4 — Combine: probability still metastable after slack t.P(fail)=T0fclkfdatae−t/τWhy this step? Enter with probability ∝T0fclkfdata; survive to time t with probability e−t/τ (from Step 2, more resolving time ⇒ exponentially less likely to still be stuck).
Why it works: If FF1 goes metastable, it has almost a full clock period to settle before FF2 looks. Plugging a larger tr into the exponential etr/τ blows MTBF up to years/centuries. Adding a third FF adds another whole period → another exponential factor.
Imagine a light switch that can be flicked to ON or OFF. If you tap it super gently at the exact middle, it can get stuck halfway — the light flickers weirdly and you can't tell if it's on or off. That "stuck in the middle" is metastability. We can't stop the halfway-tap from happening when someone flips it at a random time. So instead we wait: put a second switch right after that only copies the first one a moment later. By then the first switch has almost always fallen fully ON or OFF, so the second switch copies a clean answer. Wait longer (more switches) = almost never wrong.
A temporary knife-edge state where a flip-flop output sits between valid logic levels with an unbounded (probabilistic) resolution time, caused by setup/hold violation.
What causes a flip-flop to enter metastability?
A data change inside the setup/hold window around the clock edge, typically from an asynchronous / cross-clock-domain signal.
Write the MTBF formula.
MTBF=T0fclkfdataetr/τ
Why does MTBF grow exponentially with resolution time tr?
The regenerative loop drives imbalance as et/τ, so probability of still being metastable falls as e−tr/τ; the reciprocal (MTBF) rises as etr/τ.
What is τ physically?
The flip-flop's regeneration time constant τ=RC/(A−1) from the cross-coupled inverter loop; smaller τ resolves faster.
How does a two-FF synchronizer help?
It gives FF1 nearly a full clock period (tr=Tclk−tsu−tpd) to resolve before FF2 samples, making propagated failures astronomically rare.
Does a synchronizer eliminate metastability?
No — FF1 can still go metastable; it only makes the probability of it reaching downstream logic negligibly small (huge MTBF).
Why do faster clocks worsen metastability?
Higher fclk raises the failure prefactor AND shrinks tr, and MTBF ∝etr/τ collapses rapidly.
Why synchronize a signal only once before fan-out?
Two separate synchronizers on the same async edge may resolve to different values, creating inconsistent state.
Give the resolution-time expression for a 2-FF synchronizer.
Dekho, ek flip-flop hamesha do stable states chahta hai: 0 ya 1. Bilkul waise jaise pahaadi ke do valleys mein rakha marble. Lekin agar aap data ko exactly clock edge ke time change karo (setup/hold window ke andar), to flip-flop ko pahaadi ke bilkul upar balance mila do — na 0, na 1. Isi ko metastability kehte hain. Yeh tab hota hai jab signal asynchronous ho, jaise button press ya do alag clock domains ke beech ka data.
Ab important baat: metastability ko hum rok nahi sakte — physics hai. Par hum time de sakte hain taaki marble apne aap kisi ek valley mein gir jaaye. Regeneration loop ki wajah se imbalance et/τ ke hisaab se exponentially badhta hai, isliye jitna zyada time do, utni chance kam ki wo abhi bhi atka ho. Yahi se MTBF formula aata hai: MTBF=etr/τ/(T0fclkfdata). Note karo — tr exponent mein hai, matlab thoda sa extra time bhi MTBF ko years se centuries bana deta hai.
Practical solution: two-flip-flop synchronizer. FF1 async signal ko sample karta hai (yeh metastable ho sakta hai), aur FF2 poora ek clock period baad usse copy karta hai. Us time tak FF1 lagbhag hamesha settle ho chuka hota hai, to FF2 ko clean value milti hai. Fast clock = kam tr = MTBF exponentially girta hai, isliye high-speed designs mein 3-FF synchronizer use karte hain. Yaad rakho — synchronize ek hi baar karo, phir fan-out; warna do FFs alag-alag answer de sakte hain.