Algorithm Search⌘K

Definitioncore

Synchronizer mean time between failures

Also called synchronizer MTBF, metastability MTBF.

MTBF = e^(t/tau) / (T_w f_c f_d), the mean time between metastability failures of a flip-flop synchronizer with resolution time t and clock and data rates f_c and f_d.

When a flip-flop samples a signal that is not synchronized to its clock, it sometimes samples the signal while it changes. The flip-flop then starts in a balanced state between 0 and 1 and needs extra time to fall to one side. A synchronizer gives it a fixed resolution time trt_r before the next stage reads its output. It fails when the flip-flop has not settled by then. The mean time between failures (MTBF) of the synchronizer is

MTBF=etr/τTW fc fd,\mathrm{MTBF} = \frac{e^{t_r / \tau}}{T_W \, f_c \, f_d},

where fcf_c is the clock rate, fdf_d is the rate of data transitions, and τ\tau and TWT_W are parameters of the flip-flop. The formula follows exactly from a simple model of how a latch leaves its balanced state, which this page derives. The model is an approximation of the circuit, and τ\tau and TWT_W are not computed from first principles but fitted to measurements. The structural rules that make a crossing between clock domains safe are on clock domain crossing verification.

Definition

A flip-flop is clocked with period Tc=1/fcT_c = 1 / f_c. Its data input changes at random times with a mean of fdf_d transitions per second. The flip-flop's output is read by the next stage trt_r seconds after the clock edge, where trt_r is the clock period minus the clock-to-output delay and the setup time of the next stage. A synchronization failure is a transition after which the output has not settled to a valid 0 or 1 within trt_r. If failures occur at a long-run rate of λ\lambda per second, the MTBF is 1/λ1 / \lambda, the mean time between failures.

Some authors write fdf_d as a data frequency with two transitions per period. Here it is the number of transitions per second. With the other convention the formula has an extra factor of 2.

The exponential resolution model. It makes four assumptions.

  • (M1) Linear start. A data transition at time offset Δt\Delta t from the balance point of the clock edge leaves the latch with an initial voltage imbalance v0=K Δtv_0 = K \, \Delta t, for a constant KK. The balance point is the offset at which the latch is exactly balanced.
  • (M2) Exponential growth. While ∣v∣<V1\lvert v \rvert < V_1, the imbalance obeys dv/dt=v/τdv / dt = v / \tau. This is the small-signal model of two cross-coupled inverters, with τ\tau about the node capacitance divided by the transconductance. So v(t)=v0 et/τv(t) = v_0 \, e^{t / \tau}.
  • (M3) Threshold. The output is valid when ∣v∣≥V1\lvert v \rvert \ge V_1.
  • (M4) Uniform phase. The offset of each data transition from the nearest clock edge is uniform over one clock period, because the data is not synchronized to the clock.

Derivation. By (M2) and (M3), a latch that starts at 0<∣v0∣<V10 < \lvert v_0 \rvert < V_1 settles after the time tst_s with ∣v0∣ets/τ=V1\lvert v_0 \rvert e^{t_s / \tau} = V_1, that is

ts=τln⁡V1∣v0∣,t_s = \tau \ln \frac{V_1}{\lvert v_0 \rvert},

and a latch with ∣v0∣≥V1\lvert v_0 \rvert \ge V_1 is valid at once. The function tst_s decreases in ∣v0∣\lvert v_0 \rvert, so ts>trt_s > t_r exactly when ∣v0∣<V1e−tr/τ\lvert v_0 \rvert < V_1 e^{-t_r / \tau}. By (M1) this is the condition

∣Δt∣<V1K e−tr/τ.\lvert \Delta t \rvert < \frac{V_1}{K} \, e^{-t_r / \tau}.

The set of offsets that fail is an interval of length TWe−tr/τT_W e^{-t_r / \tau}, where TW=2V1/KT_W = 2 V_1 / K is called the window. By (M4), as long as this length is at most TcT_c, a single transition fails with probability

p=TWe−tr/τTc=TW fc e−tr/τ.p = \frac{T_W e^{-t_r / \tau}}{T_c} = T_W \, f_c \, e^{-t_r / \tau}.

In a time LL there are on average fdLf_d L transitions. By linearity of expectation the mean number of failures is fdL pf_d L \, p, so the failure rate is

λ=TW fc fd e−tr/τ,\lambda = T_W \, f_c \, f_d \, e^{-t_r / \tau},

and the MTBF is 1/λ1 / \lambda, the formula of this page. Linearity needs no independence between transitions. If in addition the transitions form a Poisson process and their phases are independent, the failures are a thinned Poisson process of rate λ\lambda. Then the time between failures has the exponential distribution with mean 1/λ1 / \lambda, and the number of failures in time LL has the Poisson distribution with mean λL\lambda L. A Monte Carlo run of the model with 10610^6 uniform offsets, τ=TW=20\tau = T_W = 20 ps, Tc=1T_c = 1 ns and tr=0.1t_r = 0.1 ns gave a failure fraction of 1.48×10−41.48 \times 10^{-4}, against the predicted p=1.35×10−4p = 1.35 \times 10^{-4}, a difference of about 1.1 standard errors, the standard error being about 1.2×10−51.2 \times 10^{-5}.

What is proved and what is measured. Given (M1) to (M4), the formula is exact. The constants are not derived. τ\tau and TWT_W are found by measurement: run the synchronizer with asynchronous data, count the outputs that are still not valid at several delays tt after the clock, and fit a straight line to ln⁡λ(t)=ln⁡(TWfcfd)−t/τ\ln \lambda(t) = \ln(T_W f_c f_d) - t / \tau. The slope gives τ\tau and the intercept gives TWT_W. Veendrick (1980) did this analysis and compared it with measurements on real flip-flops, and Ginosar (2011) describes the procedure. The assumptions are approximations that this page does not prove. (M1) and (M2) hold only near the balance point and once the latch is in its small-signal region, so the exponential law fits large trt_r well and small trt_r poorly. Real flip-flops have a master and a slave latch, and the measured TWT_W depends on how the master hands an imbalance to the slave. τ\tau grows at low supply voltage and changes with temperature and process corner, so the worst corner sets the MTBF.

Examples and non-examples

  • A two-flip-flop synchronizer. Take τ=20\tau = 20 ps, TW=20T_W = 20 ps, fc=1f_c = 1 GHz and fd=108f_d = 10^8 transitions per second. The denominator is TWfcfd=2×106T_W f_c f_d = 2 \times 10^{6} per second. Each 20 ps of extra resolution time multiplies the MTBF by ee.
trt_r etr/τe^{t_r / \tau} MTBF
0.2 ns 2.2×1042.2 \times 10^{4} 0.011 s
0.5 ns 7.2×10107.2 \times 10^{10} 3.6×1043.6 \times 10^{4} s, about 10 hours
0.9 ns 3.5×10193.5 \times 10^{19} 1.7×10131.7 \times 10^{13} s, about 550,000 years
1.8 ns 1.2×10391.2 \times 10^{39} 6.1×10326.1 \times 10^{32} s

With tr=0.9t_r = 0.9 ns, nearly a full clock period for the first flip-flop to settle, one transition fails with probability p=5.7×10−22p = 5.7 \times 10^{-22}. The row for 1.8 ns is about what a third stage adds. That a chain of NN flip-flops gives tr≈(N−1)(Tc−tpd−tsu)t_r \approx (N - 1)(T_c - t_{pd} - t_{su}) is a common approximation, since a later stage that samples a slowly settling input can itself become balanced. It is not a consequence of the model.

  • Many synchronizers. A chip with nn independent synchronizers fails at the sum of their rates, by linearity of expectation. Its MTBF is 1/∑iλi1 / \sum_i \lambda_i, so 1,000 synchronizers of the 10-hour row give an MTBF of 36 s.

  • Non-example: a synchronous path. If the data comes from the same clock and static timing analysis shows that the setup and hold constraints are met, the offset never falls near the balance point. (M4) fails, and the model predicts no failures. The formula does not apply.

  • Non-example: a fixed bad phase. Two clocks with the same frequency and a fixed but unknown phase also break (M4). If the phase happens to put each data change near the balance point, every transition is at risk, and the MTBF can be far shorter than the formula says. Such clocks need a scheme that measures or adjusts the phase.

  • Non-example: wear-out. The mean time to failure of a wire under electromigration, given by Black's equation, is a lifetime of a part that wears out. A synchronizer does not wear out. Its failures are random events at a constant rate.

  • Setup and hold constraints define the window around the clock edge where the data must be stable. A metastable flip-flop is one whose data changed in this window. TWT_W is usually much smaller than the setup time plus the hold time, because most changes inside that window still resolve quickly.
  • Clock domain crossing verification checks that every crossing has a synchronizer and that the design is safe when the synchronizer adds one cycle of latency. The MTBF says how often the synchronizer itself breaks that assumption.
  • The Poisson distribution gives the number of failures in a fixed time when transitions are independent.
  • Chaney and Molnar (1973) showed that the time to leave the balanced state is not bounded. No synchronizer has an infinite MTBF. A design can only choose trt_r to make it long enough.

References

  1. H. J. M. Veendrick, The behavior of flip-flops used as synchronizers and prediction of their failure rate, IEEE Journal of Solid-State Circuits SC-15(2), 169 to 176, 1980, the small-signal analysis of the cross-coupled latch, in which the imbalance grows exponentially with a time constant set by the capacitance and the transconductance, and the resulting prediction of the failure rate of a synchronizer, compared with measurements
  2. T. J. Chaney and C. E. Molnar, Anomalous behavior of synchronizer and arbiter circuits, IEEE Transactions on Computers C-22(4), 421 to 422, 1973, the observation that a flip-flop driven by asynchronous inputs can stay in a metastable state for an unbounded time
  3. R. Ginosar, Metastability and synchronizers, a tutorial, IEEE Design and Test of Computers 28(5), 23 to 35, 2011, the derivation of the failure rate from the exponential resolution law, the parameters tau and T_W and their measurement, and the two-flip-flop synchronizer
  4. D. J. Kinniment, Synchronization and Arbitration in Digital Systems, Wiley, 2008, the chapters on metastability, its models and measurement, and synchronizer reliability

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/EVBTDW/text.yaml