Difficulty: Medium · Puzzle 1 of 6 · Topic: CDC Basics Puzzles
Use MTBF = exp(tr/tau) / (T0 * fclk * fdata) with tau = 100 ps, T0 = 50 ps, destination clock 500 MHz (T = 2 ns), average data rate fdata = 50 MHz, and flop setup time 150 ps. Take the resolution time of a synchroniser as the time the first flop has before the next flop's setup: one period for two flops, two periods for three flops, each minus 150 ps. Compute the MTBF for two flops and for three flops, and what doubling fdata does.
tr is 1.85 ns for two flops; exp(18.5) is about 1.08e8.
1) Two flops: tr = 2 ns - 0.15 ns = 1.85 ns. exp(1.85 ns / 100 ps) = exp(18.5) = 1.08e8.
2) Denominator: T0 * fclk * fdata = 50e-12 * 500e6 * 50e6 = 1.25e6 per second.
3) MTBF(two flops) = 1.08e8 / 1.25e6 = 86.6 s, about a minute and a half.
4) Three flops: tr = 4 ns - 0.15 ns = 3.85 ns; exp(38.5) = 5.25e16; MTBF = 5.25e16 / 1.25e6 = 4.2e10 s, about 1,330 years.
5) Doubling fdata doubles the denominator, so the MTBF halves (86.6 s to 43.3 s): the dependence on data rate is linear, on resolution time it is exponential.Answer: Two flops: about 87 s (far too low for a product). Three flops: about 4.2e10 s, roughly 1,330 years. Doubling the data rate halves the MTBF. The model is an assumed formula: real tau, T0 and tr come from the library and the clock tree.
Checked by running a model of the rule in a Python model. A computational check of the stated formula. Metastability is not simulated; only its published model is evaluated.
Saying 'two flops are always enough'. With a fast clock the resolution time left after setup is short and the exponent small: at 500 MHz the two-flop figure is under two minutes in this example. The standard requirement (e.g. a 1,000-year MTBF) decides the number of stages, and dropping the clock rate or adding a stage is exponential, not linear.
What does a gate-level or RTL simulation tell you about this number? Model answer: nothing: zero-delay RTL has no metastability and gate-level sims only show the logic value, so MTBF comes from the formula and library characterisation (tau and T0), not from simulation.