



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The concept of metastable states in digital logic, focusing on synchronization and the importance of avoiding them. Topics such as digital values, time, synchronizers, and arbiters, providing insights into the challenges and solutions related to metastable states in digital systems.
Typology: Slides
1 / 7
This page cannot be seen from the preview
Don't miss anything!




L07 - Synchronization 1
2/26/
Due tonight:
^ Lab #
^ Lab #1 checkoff meeting
"If you can't be just,
be arbitrary"
Naked Lunch
Did you vote for Bush or Gore?
Didn’t have enough time to decide.
Well, which hole did you punch?
Both, but not very hard...
modified 2/23/09 09:
L07 - Synchronization 2
6.004 – Spring 2009
2/26/
Digital Values:
Problem: Distinguishing voltages
representing “1” from “0” Solution:
Forbidden Zone:
avoid
using similar voltages for “1”and “0”
Digital Time:
Problem: “Which transition
happened first?” questions
Solution: Dynamic Discipline: avoid
asking such questions inclose races
V V OH V IH V IL V OL OUT
V IN
V OL
V IL
V IH
V OH
tS
tH
D ClkQ
tCDtPD
We avoid possible errors by disciplines that avoid asking the tough
questions – using a
forbidden zone
in both voltage and time dimensions:
L07 - Synchronization 3
2/26/
D Q
D Q
Out
In
Combinational
logic
D Q
Out
Combinational
logic
D Q
In Clk
Combinational
logic
D Q
Combinational
logic
D Q
Combinational
logic
D Q
Out
Combinational
logic
almost
everywhere...
L07 - Synchronization 4
6.004 – Spring 2009
2/26/
Which edge Came FIRST?
What if each button input is
an asynchronous 0/1level?
B
U
B
0 1
0 1
To build a system with asynchronous inputs, we have to break the rules:
we cannot guarantee that setup and hold time requirements are met at theinputs! So,
lets use a “synchronizer” at each input: 0 1
(Unsynchronized)
U(t)
S(t)(Synchronized)Clock
Synchronizer
Valid except for brief periodsfollowing active clock edges
But whatAbout theDynamicDiscipline?
L07 - Synchronization 5
2/26/
Arbiter
B C
S
B: C:
at t
B
at t
C
B: C: S:
tD
tD
t
E^
t
E
tD
Arbiter specifications: • finite t
D
(decision time)
finite t
E^
(allowable error)
value of S at time t
C +t
D
if t
B
< t
C^
E
if t
B
t
C^
E
otherwise
CASE 1
CASE 2
CASE 3
For NO finite valueof t
E^
and t
D
is this
spec realizable,even with reliablecomponents!
L07 - Synchronization 6
6.004 – Spring 2009
2/26/
The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. Ifthe red x still appears, you may have to delete the image and then insert it again.
tB
-t
C
(t
B =t
C
B Earlier
C Earlier
Arbiter
B C
S
B: C:
at t
B
at t
C
Issue: Mapping the
continuous
variable (t
B
onto the
discrete
variable S in bounded time.
With no “forbidden zone,” all inputs have to bemapped to a valid output. As the inputapproaches discontinuities in the mapping, ittakes longer to determine the answer. Givena particular time bound, you can find an inputthat won’t be mapped to a valid outputwithin the allotted time.
L07 - Synchronization 7
2/26/
D
Q
B: C:
at t
B
at t
C
DECISION TIME
is T
PD
of flop.
ALLOWABLE ERROR
is max(t
SETUP
, t
HOLD
)
Our logic:T
PD
after T
, we’ll haveC
Q=0 iff t
B^
SETUP
< t
C
Q=1 iff t
HOLD
< t
B
Q=0 or 1 otherwise.
We’re lured by the digital
abstraction into assumingthat Q must be either 1 or 0.But lets look at the input latchin the flip flop when B and Cchange at about the sametime...
D G
Q
D G
Q
B C
master
slave
L07 - Synchronization 8
6.004 – Spring 2009
2/26/
in
out
VTC of
“closed” latch
VTC of feedback path (V
in =V
out
)
Latched ina ‘0’ state
Latched ina ‘1’ state
Latched inan undefined
state
(^01)
out
in
Recall that the latch output is the
solution to two simultaneousconstraints:
MUX; and
in
out
In addition to our expected stable solutions, we find an unstable
equilibrium in the forbidden zone called the “Metastable State”
L07 - Synchronization 13
2/26/
Our active devices always have a fixed-point voltage, V
M
, such that
IN
M
implies V
OUT
M
Violation of dynamic discipline puts our feedback loop at some voltageV
0
near V
M
The rate at which V progresses toward a stable “0” or “1” value isproportional to (V - V
M
The time to settle to a stable value depends on (V
0
M ); its
theoretically infinite for V
0
M
Since there’s no lower bound on (V
0
M
), there’s no upper bound on
the settling time.
Noise, uncertainty complicate analysis (but don’t help).
L07 - Synchronization 14
6.004 – Spring 2009
2/26/
0 1
S(t)(Synchronized)Clock
Synchronizer
Assume asynchronous 0->1at T
A , clock period CP:
Whats the FF output voltage,V 0 , immediately after T
?A
A C
< t
+tS
H
CP
V
M
voltage, V
0 , immediately after
TA is within
of V
M
0
L
H
H
S
M
t
t
V
0
t
-tA
C
Potential trouble comes when V
0
is near the metastable point, V
M
…
L07 - Synchronization 15
2/26/
We can model our
combinationalcycle as anamplifier with gainA and saturationat V
L
0 A 1
out
in 0
R
C
H
L
Vout
Slope = AVin
out
near V
M
out
(t) is an
exponential whose time constantreflects RC/A:
minimum value of
= |V
0 -V
M | that will
guarantee validity after T:
out
V
M
t(A-1)/RC
t/
H
M
T/
computed by probability of a V
0
yielding
(T) …
M
0
M
T/
L07 - Synchronization 16
6.004 – Spring 2009
2/26/
Making conservative assumptions about the distribution of V
0
and system
time constants, and assuming a 100 MHz clock frequency, we get results likethe following:
Average time
Delay
P(Metastable)
between failures
31 ns
3x
1 year
33.2 ns
3x
10 years
100 ns
30
years!
[For comparision:
Age of oldest hominid fossil: 5x
6 years
Age of earth: 5x
9 years]
L07 - Synchronization 17
2/26/
a brief history
Buriden’s Ass, and other fables…Widespread disbelief. Early analysesdocumenting inevitability of problemrejected by skeptical journal editors.Popular pastime: Concoct a “Cure” forthe problem of “synchronization failure”.Commercial synchronizer products.Acceptance of the reality:synchronization takes time. Interestingspecial case solutions.
L07 - Synchronization 18
6.004 – Spring 2009
2/26/
The idea of Metastability is not new:
The Paradox of Buridan’s Ass
Buridan, Jean (1300-58), French Scholastic philosopher,who held a theory of determinism, contending that thewill must choose the greater good. Born in Bethune, hewas educated at the University of Paris, where he studied withthe English Scholastic philosopher William of Ockham (whomyou might recall from his razor business). After his studies werecompleted, he was appointed professor of philosophy, and laterrector, at the same university. Buridan is traditionally, butprobably incorrectly, associated with a philosophical dilemma ofmoral choice called "Buridan's ass.”In the problem an ass starves to death between two alluringbundles of hay because it does not have the will to decide whichone to eat.
L07 - Synchronization 19
2/26/
the “perpetual motion machine” of digital logic
FF
"FIXER"
delay
AsyncInput
"Clean"Output
Bad Idea # 1: Detect metastable state & Fix
Theimagecannot
Theimagecannot
Theimagecannot
valid"0"
valid "1"
Bad Idea #2: Define the problem away by making metastable point a valid output
Bug: detecting metastability isitself subject to metastablestates, i.e., the “fixer” will fail toresolve the problem in boundedtime. Bug: the memory element will flipsome valid “0” inputs to “1”after a while.
Many other bad ideas – involving noise injection,
strange analog circuitry, … have beenproposed.
L07 - Synchronization 20
6.004 – Spring 2009
2/26/
… so, embrace the confusion.
level.
parameters (gain, noise, etc)
time -- modest delay after state change can make it very unlikely. Our STRATEGY; since we can’t eliminate metastability, we will do the
best we can to keep it from contaminating our designs
L07 - Synchronization 25
2/26/
Bit Bucket Cafe
The imagecannot bedisplayed.Yourcomputermay nothaveenoughmemoryto openthe image,
Ben Bitdiddle tries the famous“6.004 defense”:Ben leaves the Bit Bucket Caféand approaches fork in theroad. He hits the barrier in themiddle of the fork, laterexplaining “I can’t be expectedto decide which fork to take inbounded time!”.Is the accident Ben’s fault?
“Yes; he should have stopped until his decision
was made.”
Judge R. B. Trator, MIT ‘
L07 - Synchronization 26
6.004 – Spring 2009
2/26/
Normal traffic light:
GREEN, YELLOW, RED sequence
55 MPH Speed Limit
Sufficiently long YELLOW, GREEN periods
Analog POSITION input
digital RED, YELLOW, GREEN inputs
digital GO output
Can one reliably obey....
A. Move at 55. At calculated distance D from light, sample color (using an
unbounded-time synchronizer). GO ONLY WHEN stable GREEN. B. Stop 1 foot before intersection. On positive GREEN transition, gun it.
LAW #1: DON’T CROSS LINE while light is RED.
GO = GREEN
LAW #2: DON’T BE IN INTERSECTION while light is RED.
L07 - Synchronization 27
2/26/
Use single clock, obey dynamic discipline
Avoid state. Combinational logic has no metastablestates!
Image by MIT OpenCourseWare.