Академический Документы
Профессиональный Документы
Культура Документы
Review Session
Monday 11/3?
C L
Output Logic
Next State
C L
Copyright 2007 Elsevier
Outputs
C L
outputs
inputs st tate
outputs
C L
Moore Machine
Inputs Excitation Current State Outputs p
Clock input p
Clock
Mealy Machine
Inputs Excitation Current State Outputs
Clock input
Clock
clock inputs state outputs t t Moore machine timing Mealy machine timing
advantages/disadvantages
Mealy often has fewer states than Moore machine since it associates outputs with transitions Mealy machine can fall victim to glitches since outputs are asynchronous
Computer Science 141 David Brooks
Mealy FSM
reset 1/1 1/0 S1 0/0 0/0 1/0 1/0 S2 0/0 0/0 S3
S0
S1
0 0 0 0 1 1 1 1 0 0
S0
0 0 1 1 0 0 1 1 0 0
A
0 1 0 1 0 1 0 1 0 1
S S'2
S S'1
S S'0
State S0 S1 S2 S3 S4
S1
0 0 0 0 1 1 1 1 0 0
S0
0 0 1 1 0 0 1 1 0 0
A
0 1 0 1 0 1 0 1 0 1
S S'2
0 0 0 0 0 0 0 1 0 0
S S'1
0 0 0 1 1 1 0 0 0 1
S S'0
0 1 0 0 1 0 0 0 0 0
State S0 S1 S2 S3 S4
Current State S2 0 0 0 0 1 S1 0 0 1 1 0 S0 0 1 0 1 0
Output Y
Current State S2 0 0 0 0 1 S1 0 0 1 1 0 S0 0 1 0 1 0
Output Y 0 0 0 0 1
Y = S2
Current State S1
0 0 0 0 1 1 1 1
Input p A
0 1 0 1 0 1 0 1
Output p Y
S0
0 0 1 1 0 0 1 1
State S0 S1 S2 S3
Encoding 00 01 10 11
Current State S1
0 0 0 0 1 1 1 1
Input p A
0 1 0 1 0 1 0 1
Output p Y
0 0 0 0 0 0 0 1
S0
0 0 1 1 0 0 1 1
S'0
0 1 0 0 1 0 0 1
State S0 S1 S2 S3
Encoding 00 01 10 11
S S'1
S1
S'0
S0 Reset
S2
Copyright 2007 Elsevier
S1
S0
S'0
S0 Reset
S1
S0
Moore Machine
Mealy Machine
S Y ?? S0 S1 S2 S2 S3 S1 S2 S3 S1 S0
Timing
Flip-flop samples D at clock edge D must be stable when it is sampled Similar to a photograph, D must be stable around the clock edge If D is changing when it is sampled, metastability can occur
D tsetup thold ta
Copyright 2007 Elsevier
Dynamic Discipline
The input to a synchronous sequential circuit must be stable during the aperture ( g p (setup and hold) time around the clock p ) edge. Specifically, the input must be stable
at l least tsetup b f before the clock edge h l k d at least until thold after the clock edge
Dynamic Discipline
The delay between registers has a minimum and maximum delay, dependent on the delays of the circuit y, p y elements
CLK Q1 ( ) (a) CLK Q1 D2 (b)
Copyright 2007 Elsevier
CLK C L D2 R2 Tc
R1
CLK C L D2 R2
Tc
tpd p
tsetup p
CLK C L D2 R2
tpd p
tsetup p
CLK C L D2 R2
tpd p
tsetup p
CLK C L D2 R2
thold <
CLK C L D2 R2
CLK C L D2 R2
Timing Analysis
CLK A B X X' Y' X Y CLK
Timing Characteristics
tccq = 30 ps tpcq = 50 ps tsetup = 60 ps thold = 70 ps
per gate
C D
tpd = 35 ps p tcd = 25 ps
Timing Analysis
CLK A B X X' Y' X Y CLK
Timing Characteristics
tccq = 30 ps tpcq = 50 ps tsetup = 60 ps thold = 70 ps
per gate
C D
tpd = 35 ps p tcd = 25 ps
tpd = 3 x 35 ps = 105 ps tcd = 25 ps p Setup time constraint: Tc (50 + 105 + 60) ps = 215 ps fc = 1/Tc = 4 65 GHz 4.65 GH
Copyright 2007 Elsevier
Hold time constraint: tccq + tpd > thold ? (30 + 25) ps > 70 ps ? N ! No!
Timing Characteristics
tccq = 30 ps tpcq = 50 ps tsetup = 60 ps thold = 70 ps
per gate
tpd = 35 ps p tcd = 25 ps
Timing Characteristics
tccq = 30 ps tpcq = 50 ps tsetup = 60 ps thold = 70 ps
per gate
tpd = 35 ps p tcd = 25 ps
tpd = 3 x 35 ps = 105 ps tcd = 2 x 25 ps = 50 p p ps Setup time constraint: Tc (50 + 105 + 60) ps = 215 ps fc = 1/Tc = 4 65 GHz 4.65 GH
Copyright 2007 Elsevier
Hold time constraint: tccq + tpd > thold ? (30 + 50) ps > 70 ps ? Y ! Yes!