Use the MTBF formula with measured SKY130 constants to choose how many flip-flops a synchronizer needs for a century.
Hardware context: A signal from another clock domain crossing into a 1.25 GHz block that must not fail in a hundred years. Compute synchronizer MTBF and the number of flops needed for a hundred years.
An input from another clock domain must cross into a 1.25 GHz block. The product must not see a synchronizer failure in a hundred years of running. The question is how many flip-flops in a row are enough, and what a faster clock or busier data would change.
This is an Implement problem with no logic to write. Work out each answer and write it into the answer module as a constant. A calculator is fine. The first three constants are worked examples and are already correct.
The check compares every constant with the right value and names the first one that is wrong.
Signals in the Timeline
| Signal | Width | Role |
|---|---|---|
question | 8 | input of each check |
Full specification
MTBF = e^(t_r / tau) / (T0 * f_clk * f_data)
t_r = (n - 1) / f_clk - t_setup (n flops in a row: the first gets n - 1 periods to settle)
| Constant | Value |
|---|---|
| tau | 45 ps |
| T0 | 430 ps |
| t_setup of the next flop | 50 ps |
| One year | 365.25 days |
| Constant | What to write |
|---|---|
| TR_TWO_PS | The resolution time of a two-flop synchronizer at 1.25 GHz, in ps (800 - 50). |
| TR_THREE_PS | The resolution time of a three-flop synchronizer at 1.25 GHz, in ps (1600 - 50). |
| LOG10_MTBF_TWO | Log10 of the two-flop MTBF in seconds, 50 MHz data, rounded down (0.64 s gives -1). |
| LOG10_MTBF_THREE | Log10 of the MTBF in seconds for three flops, rounded down. |
| LOG10_MTBF_FOUR | Log10 of the MTBF in seconds for four flops, rounded down. |
| FLOPS_FOR_CENTURY | The fewest flops whose MTBF is at least 100 years at 1.25 GHz and 50 MHz data. |
| LOG10_THREE_FAST_DATA | Log10 of the MTBF in seconds for three flops when the data changes at 200 MHz, rounded down. |
| FLOPS_FOR_CENTURY_2GHZ | The fewest flops for 100 years when the clock is 2 GHz and the data 50 MHz. |
| LOG10_GAIN_PER_FLOP | Log10 of the factor by which each extra flop multiplies the MTBF at 1.25 GHz, rounded down. |
| LOOP_TRIPS | The fewest trips round a loop of gain 163 that grow a 1 µV offset past 0.9 V. |
tau and T0 are the values measured on a SKY130 flip-flop in lesson G5.11, rounded. They hold for that flop in that simulation, not for every flop.
Examples
Example 1
Worked Example: Two Flops- Input
the resolution time of a two-flop synchronizer at 1.25 GHz, in ps (800 - 50)
- Output
tr_two_ps = 750
A 1.25 GHz clock has an 800 ps period. The second flop needs 50 ps of setup, so the first flop has 750 ps to settle. This constant is already filled in.
Example 2
Worked Example: Three Flops- Input
the resolution time of a three-flop synchronizer at 1.25 GHz, in ps (1600 - 50)
- Output
tr_three_ps = 1550
A third flop adds a whole period: 1600 - 50 = 1550 ps. This constant is already filled in.
Example 3
Worked Example: The Two-Flop MTBF- Input
log10 of the two-flop MTBF in seconds, 50 MHz data, rounded down (0.64 s gives -1)
- Output
log10_mtbf_two = -1
e^(750 / 45) is about 1.7e7; T0 f_clk f_data is 430e-12 x 1.25e9 x 5e7, about 2.7e7. The MTBF is about 0.64 s, so log10 rounds down to -1. This constant is already filled in.
Constraints and Contract
- Keep the module name answer and the names of the constants.
- A log10 answer is a whole number, rounded down; it may be negative.
Hints
Hint 1
Work in seconds and hertz. e^(t_r / tau) is huge, so take logarithms: log10(MTBF) = t_r / tau / ln 10 - log10(T0 f_clk f_data).
Hint 2
A two-flop synchronizer gives the first flop one period. Each extra flop adds one more period to t_r, and so multiplies the MTBF by e^(T / tau).
Hint 3
A faster clock hurts twice: the period, which sits in the exponent, gets shorter, and f_clk in the denominator gets larger.
Hint 4
For the loop trips, multiply the offset by 163 until it passes 0.9 V. The loop gain was measured on SKY130 in lesson G5.4.
What the grader checks: The check reads ten constants. It compares each with a value computed in JavaScript from the formula and the constants in the brief. It cannot see how a value was found. The formula is the usual first-order model of synchronizer failure.
10 checks on Icarus · browser samples / server checks. Run the examples first, then check the full regression. Full checks use the server judge. Downloads contain public samples only. A passing result establishes the tested cases, not a proof for all possible inputs.
See all 1 steps and the final capstone