Edge-Sensitive Flip-Flops Setup and Hold Time: Definition of Terms Definition of Terms
Edge-Sensitive Flip-Flops Setup and Hold Time: Definition of Terms Definition of Terms
Output
Invalid! Invalid!
Input value changes after the setup Input value changes before the hold
Input time. The input is not stable long Input time. The input is not stable long
Tsu enough before the clock edge. enough after the clock edge.
Clock Clock Th
Analogy - Taking Your Friend to the Train Analogy - Taking Your Friend to the Train (cont.)
If the train leaves at 8:00 and you live 20 minutes Your friend needs help boarding the train and the
away from the station, when should you leave your train allows only 5 minutes for boarding.
house?
If you leave after 7:40, you will miss the train. If you
leave before 7:40, you should have enough time to
get to the station before it leaves.
Negative Hold Time Negative Setup Time
The
Thevalid
validregion
regionor
or The
Thevalid
validregion
regionor
or
"window"
"window"associated
associated "window"
"window"associated
associated
with
withthe
theclock
clockevent
event with
withthe
theclock
clockevent
event
doesnot
does nothave
havetotobe
be doesnot
does nothave
havetotobe
be
centered
centeredaround
aroundthe
the centered
centeredaround
aroundthe
the
Input clock
clockedge.
edge. Input clock
clockedge.
edge.
Tsu The
Theregion
regioncan
canbe beto
to Tsu The
Theregion
regioncan
canbe beto
to
Th (Negative Hold Time) the
theright
rightor
orleft
leftof
ofthe
the the
theright
rightor
orleft
leftof
ofthe
the
(Negative Setup Time)
clock
clock edge whenthe
edge when the clock
clock edge whenthe
edge when the
setup Th
Clock setupororhold
holdtimes
times Clock setup
setupororhold
holdtimes
times
arenegative.
are negative. arenegative.
are negative.
When the hold time is negative, the When the setup time is negative, the
valid region is to the left of the clock valid region is to the right of the clock
edge. edge. Note: you cannot have both
a negative setup time and
This allows the input to change This allows the input to change a negative hold time!
slightly before the clock edge without slightly after the clock edge without
disturbing the operation of the flip-flop. disturbing the operation of the flip-flop.
Q
All measurements are made from the clocking event
that is, the rising edge of the clock
The propagation delay is usually different for the
low to high and high to low transitions.
Q0: Input is IN
IN Q0 Q1 IN Q0 Q1
D Q D Q D Q D Q
Setup and hold
C Q C Q C Q C Q
times are met
if the input, IN,
CLK CLK
does not change
within the valid
region or
window.
Clock Clock
IN IN
Q0 Q0
Q1 Q1
Cascaded Flipflops Cascaded Flipflops
Are the Setup and Hold Times met? Are the Setup and Hold times of Q1 met?
Q1: Input is Q0
IN Q0 Q1
D Q D Q
Wait!
C Q C Q
Q0 is changing
CLK right at the clock
edge. Wont this
violate the hold
time of Q1?
IN
Does it violate
Clock the setup time of
Q1? T plh
T phl
IN Q0
Th Th
Q0
Q1
Q1
As long as Tplh > Th and Tphl > Th
IN Q0 Q1
D Q D Q
C Q C Q
CLK
Tclk ?
IN
Clock
T plh
Q0 Tphl
Th Th
Q0
Q1
Q1
If Tplh < Th or Tphl < Th, there is a hold time violation!
C Q C Q
T plh
Q0
CLK 0 CLK 1
Tsetup
Q1 Clock Delay
Clock Skew Clock Skew
CLK1 is a delayed version of CLK0 (delayed Are the Setup and Hold Times of Q1 met?
by the clock skew, )
IN Q0 Q1
D Q D Q
IN Q0 Q1
D Q D Q
C Q C Q
C Q C Q
CLK 0 CLK 1
CLK 0 CLK 1
CLK0 CLK0
IN IN
Q0 Q0
CLK1 CLK1
IN Q0 Q1
D Q D Q
CLK0
C Q C Q
CLK 0 CLK 1
IN
CLK0 T plh
Q0
IN Tphl
Ts
Q0 Th
CLK1
Tsu T
CLK1
Th
To insure hold-time constraints are met,Tskew + Thold < Tprop,
or Tskew < Tprop - Thold
1. Output of state flip-flops, through the IFL, and back into the FFs 2. Inputs signals through the IFL and into the FFs
FF propagation, IFL propagation, and FF setup time Input delay, IFL propagation, and FF setup time
CLK
Tinput
Tp_ff + Tp_ofl
When is the output signal valid? When is the output signal valid?
State Machine Timing State Machine Timing
Example Example
X A X A
D Q D Q
B Z B Z Tp_fl
Q
A Q
A
B B 40 ns
A B A B
D Q D Q
Q
B Q
B
CLK CLK
Example Example
X A X A
D Q D Q
B Z Tp_fl + Tp_ifl B Z Tp_fl + Tp_ifl + Tsu
Q
A Q
A
B 40 + 22 + 22 ns B 40 + 22 + 22 + 20 = 104 ns
A B A B
D Q D Q
Q
B Q
B
CLK CLK
Example Example
X A X A
D Q D Q
B Z Tinput B Z Tinput + Tp_ifl
Q
A Q
A
B 35 ns B 35 + 22 + 22 ns
A B A B
D Q D Q
Q
B Q
B
CLK CLK
State Machine Timing State Machine Timing
Example Example
Flip-Flop Timing Input Timing Flip-Flop Timing Input Timing Feedback Path: 104 ns
Th 5 ns Tinput 35 ns (max) Th 5 ns Tinput 35 ns (max) Input Path: 99 ns
25 ns (min) 25 ns (min)
Tsu 20 ns Gate Timing Tsu 20 ns Gate Timing
Critical Path: 104 ns (9.6 MHz)
Tplh 25 ns (max) Tplh 22 ns (max) Tplh 25 ns (max) Tplh 22 ns (max)
10 ns (min) 10 ns (min) 10 ns (min) 10 ns (min)
Tphl 40 ns (max) Tphl 15 ns (max) Tphl 40 ns (max) Tphl 15 ns (max)
20 ns (min) 8 ns (min) 20 ns (min) 8 ns (min)
X A X A
D Q D Q
B Z Tinput + Tp_ifl + Tsu B Z
Q
A Q
A
B 35 + 22 + 22 + 20 = 99 ns B
A B A B
D Q D Q
Q
B Q
B
CLK CLK
Example Example
Output Timing Output Timing
Flip-Flop Timing Input Timing Flip-Flop Timing Input Timing
Th 5 ns Tinput 35 ns (max) Th 5 ns Tinput 35 ns (max)
25 ns (min) 25 ns (min)
Tsu 20 ns Gate Timing Tsu 20 ns Gate Timing
Tplh 25 ns (max) Tplh 22 ns (max) Tplh 25 ns (max) Tplh 22 ns (max)
10 ns (min) 10 ns (min) 10 ns (min) 10 ns (min)
Tphl 40 ns (max) Tphl 15 ns (max) Tphl 40 ns (max) Tphl 15 ns (max)
20 ns (min) 8 ns (min) 20 ns (min) 8 ns (min)
X A X A
D Q D Q
B Z Tp_fl B Z Tp_fl + Tp_ofl
Q
A Q
A
B 40 ns B 40 + 22 = 62 ns
A B A B
D Q D Q
Q
B Q
B
CLK CLK
Inputs Input/Output NS CS
Forming
X A Logic
D Q
B Z
Q
A
Outputs
B
A B
D Q
Q
B
CLK
State Machine Timing State Machine Timing
Mealy Machine - Critical Path Same as the Moore Machine Mealy Machine - Critical Path Same as the Moore Machine
#1 - FF, IFL, FF (Q to D) #1 - FF, IFL, FF (Q to D)
#2 - Input, IFL, FF #2 - Input, IFL, FF
Outputs Outputs
Outputs Outputs
Example Example
Flip-Flop Timing Input Timing Critical Path: 104 ns (9.6 MHz) Flip-Flop Timing Input Timing
Th 5 ns Tinput 35 ns (max) Th 5 ns Tinput 35 ns (max)
25 ns (min) 25 ns (min)
Tsu 20 ns Gate Timing Tsu 20 ns Gate Timing
Tplh 25 ns (max) Tplh 22 ns (max) Tplh 25 ns (max) Tplh 22 ns (max)
10 ns (min) 10 ns (min) 10 ns (min) 10 ns (min)
Tphl 40 ns (max) Tphl 15 ns (max) Tphl 40 ns (max) Tphl 15 ns (max)
20 ns (min) 8 ns (min) 20 ns (min) 8 ns (min)
Output Path
X A X A
D Q D Q
B Z B Z Tp_ff
Q
A Q
A
B B 40 ns
A B A B
D Q D Q
Q
B Q
B
CLK CLK
State Machine Timing State Machine Timing
Example Example
Q
B Q
B
CLK CLK
Example Example
Q
B Q
B
CLK CLK
Example
D Q
A
B Z S3
Counter
Q
A
S2
clr S1
B S0
A B
D Q
Q
B
CLK