3.4.13 · D2Sequential Circuits

Visual walkthrough — Metastability and synchronizers

2,221 words10 min readBack to topic

Step 1 — WHAT is "the ball on a hill", drawn as a real graph?

WHAT. The parent note gave you a marble in a valley with two low points. Let us make that picture exact. A flip-flop's memory node holds a voltage. Draw a curve whose height = energy and whose horizontal axis = the node voltage . Two dips sit at the two legal answers — call them "logic 0" and "logic 1". Between them is a hump, and the very top of that hump is the metastable point.

WHY this picture. A ball always rolls downhill, toward lower energy. Two dips = two stable answers = the device is bistable (see D Flip-Flop). The hump-top is an equilibrium too — the slope is zero there — but it is unstable: the tiniest push sends the ball down one side. That single geometric fact is the whole story.

PICTURE. Look at the figure. The two purple valleys are the safe answers. The orange dot balanced on the peak is metastability. The horizontal axis is voltage ; the peak sits at the mid-voltage between the two logic thresholds.


Step 2 — WHY does the ball leave the peak exponentially?

WHAT. We claim the imbalance grows in time as . Let's see where that shape comes from, without assuming you've met the exponential.

WHY this shape and not a straight line. A flip-flop's output is two inverters wired in a loop, each feeding the other — this is positive feedback. Positive feedback has one defining property: the bigger the imbalance already is, the faster it grows. In symbols, the rate of change is proportional to the present value: The only function whose growth rate equals itself (scaled) is the exponential. Solve it and you get:

WHY the tool "" and not something else. We use the exponential because it is the unique answer to "what grows at a rate equal to its own size?" — exactly the sentence positive feedback writes. A straight line grows at a constant rate (ignores its own size); a parabola grows too slowly. Only fits.

PICTURE. Two curves: a straight line (constant push, wrong) and the real exponential (accelerating away). Notice how the exponential is nearly flat near — the ball dawdles on the peak — then whips away. That dawdling is the danger window.


Step 3 — WHY a small costs a long wait (the logarithm appears)

WHAT. The node is "resolved" once the lean reaches a valid logic level . From Step 2, set and solve for the time needed:

WHY the tool "". We just asked " equals what? Undo it to find ." The function that undoes is the natural logarithm — it answers "how many -fold growths get me from up to ?" That is the only reason it enters.

WHY this matters. Look at the fraction . If the ball starts almost perfectly balanced ( tiny), that ratio is huge, and is large — you wait a long time. If it starts already leaning ( moderate), you resolve almost instantly. So the resolution time is not fixed — it depends on how unlucky the landing was. This is why the parent note called resolution time "unbounded (probabilistic)".

PICTURE. Three different starting leans on the same exponential; the horizontal dashed line is the threshold . See how a tiny pushes the crossing far to the right.


Step 4 — WHY the failure chance is (flipping the survival question)

WHAT. We now ask the reverse of Step 3: given I only allow a fixed wait , what is the chance the ball is still stuck? A tighter start (smaller ) is the only way to still be stuck after . Because the near-centre landing spot is uniformly likely across the tiny danger window, "still leaning by less than after time " turns out to shrink as

WHY this exact shape. Run Step 2 backwards: to still be below threshold at time , your starting lean must have been below . The width of the "still-stuck" band of starting positions therefore scales as , and uniform landing turns width directly into probability. Note the minus sign: more wait ⇒ smaller number ⇒ less likely still stuck. That minus is the friend that saves us.

PICTURE. A decaying curve against wait time. At probability is 1 (definitely still on the peak the instant it lands); each later it drops by a factor .


Step 5 — WHY the two frequencies and multiply in

WHAT. Getting stuck needs two events to nearly collide: a clock edge and a data change, landing within a device window seconds wide. The chance of entering metastability per second is

WHY they multiply. Independent rates that must coincide multiply — that is how probability works. If clock edges come at rate and each edge has a window during which a data change is dangerous, then in one second the total dangerous time is ; multiply by how often data actually changes, , to get near-misses per second. This is exactly the Clock Domain Crossing (CDC) hazard: an asynchronous input changes on nobody's schedule.

WHY not add them. Adding would answer "how often does either event happen?" — the wrong question. We need both together, so we multiply.

PICTURE. A clock timeline with edges; each edge carries a shaded window; a data transition that lands inside one window is flagged in magenta. Count of overlaps ∝ .


Step 6 — Assemble the failure rate, then flip to MTBF

WHAT. Failure rate = (rate of entering) × (chance of surviving the allowed wait). Multiply Step 5 by Step 4, using the allowed wait :

WHY flip it. "Mean Time Between Failures" is just the reciprocal of "failures per second" — if you fail 100 times a second, you fail once every s. Take one over the rate: Flipping turned the decaying into a growing — so every extra bit of wait multiplies your safety exponentially.

PICTURE. MTBF (log scale) versus allowed wait : a straight line on the log axis = pure exponential explosion. A vertical marker shows one extra of wait jumping MTBF up by a factor .


Step 7 — Edge & degenerate cases (never leave a gap)

WHAT & WHY, case by case. Each case tests a symbol pushed to its extreme.

  • (no waiting time). Then , MTBF — the bare, tiny value with no exponential protection. This is why you must insert a synchronizer.
  • exactly (perfect balance). Step 3 gives . A truly perfect landing never resolves — but it is a single point in a continuum, so its probability is zero. The knife-edge is real but infinitely thin.
  • (infinitely fast flop). : MTBF explodes. A snappy flop is wonderful — but you still need some ; with even leaves you at the bare floor above.
  • doubles. appears twice: once dividing in front (small effect) and once inside , shrinking the exponent (huge effect). The exponential wins → MTBF collapses, not merely halves. Fast clocks are the real enemy.
  • (input never changes). No transitions ⇒ no near-collisions ⇒ MTBF . A truly static signal is safe. But "rare" is not zero — see the parent's mistake list.

PICTURE. Four mini-panels showing each extreme's effect on the MTBF curve.


The one-picture summary

Everything above, on one canvas: the hill (Step 1) feeds the exponential departure (Step 2), whose inverse is the log wait (Step 3); flip it to a decaying survival (Step 4); multiply by the coincidence rate (Step 5); reciprocate to the exploding MTBF (Step 6).

Recall Feynman retelling of the whole walkthrough

A flip-flop is a marble that likes to sit in one of two valleys — that's "0" and "1". Between them is a hilltop, and if the clock catches your data mid-flip, the marble gets balanced right on top. It doesn't stay balanced: because the circuit shoves harder the more the marble already leans, the marble rolls away faster and faster — that runaway is the exponential , and says how snappy the roll is. To ask "how long until it's clearly in a valley?" we undo the exponential with a logarithm. Flip the question to "is it still stuck after I wait a while?" and the answer shrinks like — waiting is your friend. But getting stuck at all needs a clock edge and a data change to almost collide, and near-collisions per second are just — two clocks running, multiplied. Put those together, flip to "time between failures", and the wait climbs into the exponent, so a little patience buys you years of safety. That is the entire reason a two-flop synchronizer works: it simply hands the marble a full clock tick to roll off the hill before anyone looks.


Connections