Near the peak the flip-flop behaves like a regenerative amplifier: a small voltage
imbalance v grows exponentially because the two cross-coupled inverters amplify each
other. Model:
dtdv=τv
Why this step? The loop gain is positive feedback with a characteristic time constant
τ (set by transistor gm and load C: τ≈C/gm). Solving:
v(t)=v0et/τ
The output is "resolved" once v(t) reaches a valid logic swing Vlogic. If we assume
the initial imbalance v0 is uniformly distributed over the metastability window, the
probability the ball is still on the peak after we wait a settling time ts is
P(unresolved after ts)∝e−ts/τ.
Caveat (be honest): real devices do not have a perfectly uniform v0 distribution,
so the exact constant in front of e−ts/τ differs from the naive uniform-model value.
In practice this constant is folded into the empirical fitting parameter T0, which is
measured on silicon — the exponential shape survives, only the prefactor is calibrated.
Combining with how often we enter metastability (rate ∝fclkfdataT0),
we get the master reliability formula.
Async signal enters FF1. FF1 might catch it mid-transition → metastable. Why? Setup/hold
violated because the source is unrelated.
We wait for FF1 to resolve. The available settling time is
ts=Tclk+tcq,FF1−tsu,FF2,Why this exactly? Start counting from the clkB edge that put FF1 into metastability.
FF1's resolved value only appears at its output after its clock-to-Q delay tcq,FF1,
which effectively extends the window; FF2 must see stable data one setup time
tsu,FF2before the next clkB edge (one full period Tclk later). Netting these
three gives the formula above. (A common simplification drops tcq,FF1, but strictly it
belongs there.)
FF2 samples FF1's (resolved) output. Why safe now? Plug this larger ts into MTBF → the
exponential makes failure vanishingly rare.
Sender puts data on a bus, raises req. req (1 bit) is synchronized into the receiver.
Receiver latches data (now stable), raises ack. ack (1 bit) is synchronized back. Only
control bits cross with synchronizers; the data bus is held stable and never sampled
during transition.
Dual-port RAM + Gray-coded read/write pointers each synchronized into the opposite domain.
The gold standard for high-throughput CDC.
Recall Feynman: explain to a 12-year-old (click to reveal)
Imagine passing a glass of water to a friend who's on a spinning merry-go-round. If you let
go at the wrong moment, the glass tips and spills — you can't read how full it is anymore.
A synchronizer is like waiting one full spin so the glass settles in your friend's hand
before you check the level. And if you're passing a whole tray of glasses (many bits), you
don't toss them one by one — you say "ready?" and only hand them over when your friend says
"got it!" That "ready/got-it" chat is the handshake.
Socho do alag-alag clocks hain — clock A aur clock B — jo bilkul unrelated speed pe chal
rahe hain. Jab A domain ka koi signal B domain ke flip-flop me jata hai, tab problem hoti
hai: har flip-flop ko chahiye ki uska input clock edge ke aas-paas kuch time (setup aur hold
time) stable rahe. Lekin async clocks me source signal kisi bhi random moment pe change kar
sakta hai, exactly capture window ke andar. Result: metastability — output na 0 hota hai
na 1, beech me atak jata hai aur random time me resolve hota hai. Ye "ball on the hill" jaisa
hai — girega zaroor, par kab, ye pata nahi.
Iska fix simple aur sasta hai: two-flop synchronizer. Pehla flop (FF1) metastable ho sakta
hai, par usko poora ek destination clock period milta hai settle hone ke liye. Exact available
settling time hoti hai t_s = T_clk + t_cq,FF1 - t_su,FF2 — yaani ek period, plus FF1 ka
clock-to-Q delay (jo window ko thoda badha deta hai), minus FF2 ka setup time. Fir doosra flop
(FF2) us settled value ko sample karta hai. MTBF formula, MTBF = e^(t_s/τ) / (T0·f_clk·f_data),
batata hai ki thoda sa extra settling time exponentially reliability badha deta hai — isliye ek
extra flop lagane se failure practically namumkin ho jata hai (universe ki age se bhi zyada MTBF).
Yaad rakho: T0 sirf ek measured fitting constant hai, jo real (non-uniform) v0 distribution ko
bhi absorb kar leta hai.
Bada point: single bit ke liye two-flop chalta hai, par multi-bit bus ke liye NAHI. Agar har
bit ko alag se sync karoge, to alag-alag bits alag cycle pe aayenge aur receiver aisa value padh
lega jo kabhi exist hi nahi karta (data incoherence). Isliye counters ke liye Gray code use
karo (ek time me sirf ek bit change), aur arbitrary data ke liye handshake ya async FIFO —
jahan sirf control bits (req/ack) sync hote hain aur data bus stable rehta hai. Ye discipline hi
real chips me har jagah lagti hai, isliye exam aur job dono me CDC bahut important topic hai.