A flip-flop needs its data input stable for a setup time before the clock edge and a hold time after it. A signal from another clock domain can change at any moment, so sooner or later it changes inside that window. That event is the root of every clock-domain bug.
A typical flop is two latches in series with regenerative feedback: once the latches start deciding, positive feedback pushes the internal nodes apart toward a clean 0 or 1. If the input changes inside the window, the latches start from a nearly balanced state with almost no push in either direction.
The output then hovers between 0 and 1 instead of switching crisply. Stronger imbalance resolves faster; a near-perfect balance resolves slowly. The flop always resolves eventually in a real circuit, but the delay is unbounded in theory and the final value can be the old one or the new one.
Input timing | Flop behaviour |
|---|---|
Stable through the window | Normal capture of the settled value. |
Changes well outside the window | Normal capture; the change belongs to the next or previous cycle. |
Changes inside the window | The output may hover, resolve late, and settle to either the old or the new value. |
The designer controls neither the phase between the two clocks nor the exact picosecond the source changes, so each crossing samples a random point of the window. Whether a given edge lands inside it, how deep inside, and which way the flop resolves are all effectively random.
This is why simulation cannot prove a crossing safe: a simulator evaluates the flop model deterministically, while silicon rolls the dice on every edge. Signoff handles metastability structurally, with synchronisers, not by simulating harder.
No. The input was stable through the whole window, so the flop captures normally. The risk is only a change inside the setup/hold window.
Each gate has its own switching threshold and timing, so one can interpret the hovering level as 0 while the other sees 1. That disagreement is the failure, and it is why only the second flop's output is ever used.