How Computers Work Asynchronous State Machines and Metastability
How Computers Work Asynchronous State Machines and Metastability
Lecture 8
Review:
Edge-Triggered Timing Constraints
n Edge Triggered Flip-Flop
1
clk
in out 3 4
C.L.
current state
current next
state state 5 6
next state
Q D
1133
TcdC-Q < t____ 3355
TcdC.L. < t____
TpdC-Q > t____ Tpd > t____
1144 C.L. 4466
clk
Thold
Thold
_________________ < Tcd + Tcd
C-Q C.L.
1
page 2
Maximum Frequency
clk
in out
C.L.
current state
current next
state state
next state
Q D
clk Tpd
Tpdc-q
c-q++Tpd
Clock Period > ___________ Tpdclcl++Tsetup
Tsetup
Skew
D Q C.L. D Q
clk1 clk2
Thold + Tskew
_______________________<
Thold + Tskew _______________________________
Tcd
Tcdc-q
c-q++tcd
tcdclcl
Tpd
Tpdc-q
c-q++Tpd
Tpdclcl++Tsetup
Tsetup++Tskew
Clock Period > _______________________________ Tskew
2
page 3
in
D Q D Q out
current next
clk state state clk
Q D
clk
How Computers Work Lecture 8 Page 5
A Synchronizer as Arbiter
D Q
clock clock
D D
Q Q
3
page 4
CLOCK Ts Th
Nothing
Nothing
Flip-Flop Specification Says:______________________
Buridans Ass
Buridan, Jean
Buridan, Jean (1300-58), French Scholastic philosopher, who held a theory of determinism, contending
that the will must choose the greater good. Born in Bethune, he was educated at the University of Paris,
where he studied with the English Scholastic philosopher William of Ockham. After his studies were
completed, he was appointed professor of philosophy, and later rector, at the same university. Buridan is
traditionally but probably incorrectly associated with a philosophical dilemma of moral choice called
"Buridan's ass." In the problem an ass starves to death between two alluring bundles of hay because it
does not have the will to decide which one to eat.
4
page 5
A B
Arbiter
A wins B Wins
A Simpler Arbiter
AA AAwins
wins
BBwins
wins
BB
5
page 6
Static Metastability
Vin Vout
Vin Vout R
A
i C
Vout = Vin
Vout > Vin
Vout
Vin
6
page 7
Static Metastability:
Inverted Pendulum Analogy
Potential Energy
(mgh)
m
h
angle
left up right
7
page 8
0 Ta - Tb
IT IS IMPOSSIBLE TO BUILD ! ! ! !
8
page 9
Dynamic Metastability
(More Stupid Classroom
Tricks)
delay D Q
delay
To Scope
9
page 10
Answer:
A B
The
Asynchronous
Yes
Arbiter: __________
Yes
Winner Done
Practical Metastability
Async. FSM
Inputs
Clock
10
page 11
i C
Vout
-1
Evolution of Vout
Vout
1
time
-1
How Computers Work Lecture 8 Page 22
11
page 12
1
Vin ( t ) = Vin ( 0 )e t / =
A
Vin
12
page 13
Ptransition t /
Pmetstable (t ) = e
A
Ptransition
e t / =
A Pmetstable (t )
Ptransition
t = ln( )
A Pmetstable (t )
How Computers Work Lecture 8 Page 25
Example:
How Long for 1 failure / year?
100 MHz Clock (t = 10 ns) P
Pmetstable = transition e t /
ptransition = 0.1 A
A = 10 P
t = ln( transition )
A Pmetstable
= 1 ns
Pmetstable = 1 / (100MHz . 1 year)
= 1 / (108 x x 10 7 ) = x 10 -16
13
page 14
You 30
Youget
get10
10 30Years!
Years!
14
page 15
15