Top Banner
Lecture 4 Comparator & Flash ADC Design Trevor Caldwell [email protected] ECE1371 Advanced Analog Circuits
42

Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

Mar 21, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

Lecture 4Comparator & Flash ADC Design

Trevor [email protected]

ECE1371 Advanced Analog Circuits

Page 2: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE13712

Lecture PlanDate Lecture (Wednesday 2-4pm) Reference Homework

2020-01-07 1 MOD1 & MOD2 PST 2, 3, A 1: Matlab MOD1&22020-01-14 2 MODN + Toolbox PST 4, B

2: Toolbox2020-01-21 3 SC Circuits R 12, CCJM 142020-01-28 4 Comparator & Flash ADC CCJM 10

3: Comparator2020-02-04 5 Example Design 1 PST 7, CCJM 142020-02-11 6 Example Design 2 CCJM 18

4: SC MOD22020-02-18 Reading Week / ISSCC2020-02-25 7 Amplifier Design 1

Project

2020-03-03 8 Amplifier Design 22020-03-10 9 Noise in SC Circuits2020-03-17 10 Nyquist-Rate ADCs CCJM 15, 172020-03-24 11 Mismatch & MM-Shaping PST 62020-03-31 12 Continuous-Time PST 82020-04-07 Exam2020-04-21 Project Presentation (Project Report Due at start of class)

Page 3: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE13713

Circuit of the Day: Linear Transconductor

• Useful in many circuits1. Gm-C filter2. LNA3. Mixer4. Continuous-Time ADC

Page 4: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE13714

What you will learn…• Example Comparator Circuit• Regeneration Time Constant • Metastability, Probability of Error• Offset, Auto-zeroing• Flash ADC

Page 5: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE13715

Comparator• Basic building block of an A/D converter

Acts as a 1-bit A/D converter

• Output amplifies difference between VIN & VREFWith a large gain, output is ‘digital’ at either the positive or negative supply rail

VIN

VREFDOUT

Page 6: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE13716

Comparator• Not an open-loop amplifier

Amplifier (A1) typically high gain, low 3dB frequencyCascaded low-gain stages (A2) faster for a given power

Gain

FreqBW1

BW2

A1

A2

A1 A2 A2OR

Power proportional to UGF (GM/C)

?

Page 7: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE13717

Comparator• Latched comparator

Track when CK high, precharge output lowLatch when CK low

VB

VIN- VIN+

Preamplifier

CK

CKVS

Track and latch

R R CKVR

Page 8: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE13718

Comparator: Track and Latch

• Falling CK phase initiates regenerative actionS and R connected to a Set/Reset latch

CK CK

CK

Page 9: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE13719

Comparator: Track and Latch• CK is High: ‘Reset’ or ‘Track’ Mode

• Active part of the comparator is resetGrayed-out devices are off

• R and S are low the SR latch is in hold mode

CK CK

Page 10: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137110

Comparator: Track and Latch• CK goes Low: ‘Latch’ Mode

Page 11: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137111

Example Waveforms• Quick design in 65nm with VDD=1V

Page 12: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137112

Better Design

CK CK

CK

Page 13: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137113

Responses for Various Vin

Page 14: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137114

Delay vs Vin

Page 15: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137115

Latch Mode Dynamics• For Vin near the trip point, an inverter is

essentially just a transconductor:

• So near balance the comparator looks like this:

Page 16: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137116

Small-Signal Analysis

• Differential component grows exponentially• CM component decays exponentially

Page 17: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137117

Metastability• Metastability is fundamentally unavoidable• Assuming the universe is continuous and

deterministic, a comparator can be unresolved for any length of time

Page 18: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137118

Probability of Error

• Take t0 = 100ps and = 20ps• Then for t = 500ps (1 GHz clock with a half-cycle

between the comparator’s clock and the clock of the subsequent latch),

• Assuming Vin is uniformly distributed in [-0.5, +0.5] V, PE = 2 x 10-9

Metastability occurs twice a second!

𝑷𝑬 𝑷 𝐧𝐨𝐭 𝐫𝐞𝐬𝐨𝐥𝐯𝐞𝐝 𝐛𝐲 𝐭𝐢𝐦𝐞 𝒕

𝑷 𝑽𝒊𝒏 𝒆 𝒕 𝒕𝟎 𝝉⁄

𝑷𝑬 𝑷 𝑽𝒊𝒏 𝟐 𝐧𝐕

Page 19: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137119

Metastability Summary• Metastability is unavoidable

All you can do is make small and give enough time for regeneration to make PE small

• At best, metastability causes SNR degradationAt worst, it causes a system failure

• In Continuous-Time Lecture we will look at metastability further

Find SNR equation for a CT ADC

Page 20: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137120

Offset

• Sources of offsetMismatch in the input differential pairMismatch in the regenerating devices

CK CK

CKCK CK

Page 21: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137121

Dynamic Offset

• Mismatched parasitic capacitance causes offset20 mV/fF for this comparator

• We can fix this with better design

CK CK

CK CKCK

Page 22: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137122

Improved Comparator

• Reset when CK = 1, regenerates when CK = 0• x & y don’t step if biased properly

Mismatch in overlap capacitance still a problem

Page 23: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137123

Reducing Offset with a Preamp

Comparator offset is reduced by preamp gainAmplifier offset dominates

Amplifier also isolates driving stage from ‘charge kickback’

Amplifier bandwidth limits speed

Page 24: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137124

Auto-Zeroed SC Comparator

• During P1, the inverter/amplifier is biased at its threshold/offset voltage

• During P2, the difference between Vin and Vref is amplified

Page 25: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137125

Measuring Offset• In ideal schematic, differential comparator has

no offsetMonte Carlo simulations will show offsets in comparator due to mismatchAdditional offsets will be seen in extracted layout (should be small with good layout)

• Traditional measurementIn a given MC trial, ramp the input across the threshold of the comparator, crossing point is the offsetRequires ~50-100 transient trials, each one ~10 cycles

clk

VOSVRAMP

VCM

Page 26: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137126

Measuring Offset• Alternative Method

In a single Monte Carlo trial, set a DC input voltage and run the transient for a single cycleRepeat ~100 transient single cycle MC trialsDetermine percentage of sims that output +1 or -1Assuming normal distribution, offset can be determined

• Example: DC voltage = 1mV84% output ‘+1’,16% output ‘-1’ Offset is 1mVWolfram Alpha: -inverse erfc(2*0.84)*sqrt(2)

clk

VOSVDC+VCM

VCM

Page 27: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137127

Measuring Noise• Output is latched, a traditional AC noise sim is

insufficient• Simulate using Offset measurement technique

In a given transient noise simulation, set a DC input voltage and run the transient for a single cycleRepeat ~100 transient noise single-cycle simulationsDetermine percentage of sims that output +1 or -1Assuming normal distribution, offset can be determined

clk

VNVDC+VCM

VCM

[Razavi 2015]

Page 28: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137128

Comparator with Preamp

Page 29: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137129

Dual-Difference Comparator

• In any of our comparator circuits, make the following replacement

• Where should Va- go?

Page 30: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137130

StrongArm Latch

• No static current• Can be used as a comparator

Note that input CM voltage defines the bias point during regeneration

Page 31: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137131

StrongArm Latch

• Well-defined initial state less hysteresis[2014 Abidi] ‘Understanding the Regenerative…’[2015 Razavi], ‘The StrongARM Latch’

Page 32: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137132

Yang’s High-Speed Comparator

• nom = 6ps in 65nm CMOSUsed in a CT ADC clocked at 4 GHz [Shibata2012]

Page 33: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137133

Flash ADC

Page 34: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137134

Flash Bubbles• Need to modify logic to handle

bubbles gracefully unless bubbles guaranteed to not occur

• Counting the number of 1s is the safest method

Use a ‘Wallace-Tree Adder’

Page 35: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137135

Averaging and Interpolation

Page 36: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137136

Circuit of the Day: Linear Transconductors• Degenerated Differential Pair

• Vgs varies nonlinearly with Ioutgm is nonlinearIncrease Ibias to improve linearity

Page 37: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137137

Linear Transconductors• Force Constant Vgs

• Id constant Vgs constant• Linearity dependent on current-mirror linearity

Page 38: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137138

Linear Transconductors• Add Op Amps

• Linearity limited only by op amp gain and BW• High output resistance• Output compliance depends on input swing

Page 39: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137139

Linear Transconductors• Mirror the Output Current

Output compliance is 𝑽𝑫𝑫 𝟐𝑽𝒅𝒔𝒂𝒕 Top of differential pair at 𝑽𝑫𝑫 𝑽𝒈𝒔

Page 40: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137140

Linear Transconductance• Fold the Output Current

Increased headroom for differential pair Increased output resistance Extra cascode in output branch

Page 41: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137141

Homework #3 (Due Feb 11)• Read ‘The StrongARM Latch’ [Razavi 2015]

1. Design a version of this comparator including the subsequent RS latch

A. Make sure your schematic is complete and legible2. State the power consumption at Fck = 100 MHz,

regeneration time constant (), t0, rms noise and the mean and standard deviation of the offset

A. Use nominal PTVB. Summarize the specifications in a tableC. Include both hand calculations and simulation

results

Page 42: Lecture 4 Comparator & Flash ADC Designindividual.utoronto.ca/trevorcaldwell/course/comparators.pdf41 ECE1371 Homework #3 (Due Feb 11) • Read ‘The StrongARM Latch’ [Razavi 2015]

ECE137142

What You Learned Today• Example Comparator Circuit• Comparator metrics

Metastability and regeneration time constantOffset measurementNoise measurement

• Flash ADC