S2 · Lesson 40 · Comparators and sample-and-hold circuits
Regenerative latches, metastability, aperture jitter and the track-and-hold
Every analog-to-digital converter ends in a decision: is the input above or below a threshold? A comparator makes it with a latch, two cross-coupled inverters released from balance with a tiny difference between them. Positive feedback grows that difference exponentially until it's a full logic level. Bigger inputs resolve faster; a small enough input takes arbitrarily long, and that's metastability, the reason a fast converter occasionally outputs nonsense. In front of the comparator, a sample-and-hold freezes the input at an exact instant, and any uncertainty in that instant, the clock's jitter, turns directly into noise on fast signals.
- A regenerative latch's differential output against time, on a log scale, starting from three initial imbalances: 1 mV, 10 µV and 0.1 µV. Each grows as until it reaches the 1 V supply.
- Every decade of smaller input costs the same extra time, . The marker is the time available before the result must be valid.
- The readout gives the smallest input that still resolves in that time; anything smaller is a metastable decision.
Predict
A latch with a 20 ps time constant resolves a 1 mV input to 1 V in about 140 ps. How long does a 1 µV input take?
About 280 ps. Regeneration is exponential, so the time is : 1 mV needs = 138 ps, 1 µV needs = 276 ps. A thousand times smaller input costs only twice the time. That's why latches are so good at amplifying tiny differences, and why metastable failures are rare but never impossible.
Name it
The regenerative latch
Two cross-coupled inverters, each with transconductance and load capacitance C, released from a small difference , obey , so
and reaching a logic level takes . A preamplifier in front adds gain (so the latch starts from a larger ), reduces the latch's offset referred to the input, and isolates the input from the latch's kickback, the charge spike when it fires.
Metastability
In a decision time T, inputs smaller than don't resolve. If inputs fall uniformly over a range , the chance of a metastable decision is about per comparison; at a high sampling rate that becomes a mean time between failures. Each extra τ of decision time cuts the rate by e.
The track-and-hold
A switch and a capacitor track the input, then hold it when the switch opens.
- Tracking bandwidth: , and the input must settle to the required accuracy in the tracking time.
- Aperture jitter: sampling a sine at a time uncertain by adds an error of slope × time, limiting SNR to
independent of amplitude. 100 fs of jitter limits a 1 GHz signal to 64 dB, about 10 bits.
- Pedestal: charge injection when the switch opens (lesson 39).
- Droop: leakage current I discharges the hold capacitor at I/C.
- Hold-mode feedthrough: the input couples through the open switch's capacitance.
Worked example
A latch has τ = 20 ps and 500 ps to decide, with inputs spread uniformly over ±0.5 V, at 1 GS/s. How often is it metastable?
Show the solution
- Smallest input that resolves.
- Chance per decision. Inputs that land within of the threshold, out of a 1 V spread, go metastable:
- How often. At decisions a second that's one metastable event every 36 seconds on average.
- More decision time. A further 100 ps (5τ) would stretch it by = 148 times, to about 90 minutes.
- What follows. That's why fast converters pipeline their decisions or add latch stages.
Answer about once every 36 seconds.
Worked example
An ADC samples a 1 GHz signal with a clock of 100 fs rms jitter, through a 100 Ω switch onto 1 pF. What SNR does the jitter allow, and is the tracking bandwidth enough?
Show the solution
- Jitter-limited SNR. an effective 10.3 bits whatever the converter's own resolution.
- Tracking bandwidth. only 1.6 times the signal.
- Is it enough? No: the input would be attenuated and, worse, the nonlinear switch resistance would distort it.
- What samplers do. High-speed samplers use bootstrapped switches and wider bandwidth.
Answer the jitter allows 64.0 dB (10.3 bits), and the 1.6 GHz tracking bandwidth isn't enough.
Worked example
A latch with τ = 20 ps must amplify a 1 mV input to a 1 V logic level. How long does that take?
Show the solution
- Regeneration time. The difference grows as , so
- Smaller inputs. Each tenfold smaller input adds only 46 ps, which is why latches resolve tiny differences quickly, but an input of exactly zero never resolves.
Answer 138 ps.
Check
A latch with τ = 20 ps starts from a 0.01 mV imbalance. How long until it reaches 1 V?
Write units the way you normally would: 1.5 ps and 0.0015 ns are the same answer.
Check
A latch's inverters have = 2 mS and 10 fF of load each. What's its regeneration time constant?
Write units the way you normally would: 1.5 ps and 0.0015 ns are the same answer.
Check
A latch with τ = 10 ps has 200 ps to reach 1 V. What's the smallest input it resolves in time?
Write units the way you normally would: 1.5 µV, 1500 nV and 0.0015 mV are the same answer.
Check
A 1 GHz sine is sampled with 50 fs rms clock jitter. What SNR does the jitter allow?
Check
How much clock jitter can an ideal 12-bit ADC tolerate at 10 MHz before jitter limits its SNR?
Write units the way you normally would: 1.5 fs and 0.0015 ps are the same answer.
Check
A track-and-hold switch of 100 Ω drives 0.5 pF. What's its tracking bandwidth?
Write units the way you normally would: 1.5 GHz, 1500 MHz and 0.0015 THz are the same answer.
Check
A hold capacitor of 1 pF leaks 10 pA. How far does it droop in 100 µs?
Write units the way you normally would: 1.5 mV, 1500 µV and 0.0015 V are the same answer.
Check
A latch with τ = 20 ps must grow a 0.1 mV input to 1.2 V.
(a)
How long does that take?
Write units the way you normally would: 1.5 ps and 0.0015 ns are the same answer.
(b)
How much longer does an input ten times smaller take?
Check
A sine of frequency f and amplitude A is sampled with rms clock jitter s.
Step 1
What SNR does jitter allow, in dB?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
How many effective bits is that?
Explain why
Why does a comparator's decision time grow only logarithmically as its input shrinks?
Once released, a latch's two cross-coupled inverters push their outputs apart, and the rate at which the difference grows is proportional to the difference itself: each inverter's transconductance acting on the other's input. That makes the growth exponential, multiplying by e every time constant. To reach a fixed logic level from a smaller start, the latch only needs enough extra time constants to make up the ratio, so a thousand times smaller input needs ln 1000, about 7 more time constants. The flip side is that there's no input small enough to be guaranteed impossible, only increasingly improbable, which is why metastability can be made rare but never eliminated.
Practice
Keep practicing
11 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.