Lecture11 PDF
Lecture11 PDF
Timing Analysis
Lecture 11: 1
Announcements
• Lab report guidelines are uploaded on CMS
– As part of the assignment for Lab 3 report
Lecture 11: 2
Synchronous Circuits
combinational
logic
CLOCK
Lecture 11: 3
Review: Glitches in Synchronous Circuits
X
Y
S
S’
S•Y
S’•X
F
CLOCK
X S’•X
S F
S•Y
Y
CLOCK
Lecture 11: 4
Stable FF Situation
tclk
stable stable
tsetup thold
tffpd
Flip-flop propagation delay (or clock-to-Q delay):
the time it takes for the FF output to be stable
after the clock edge
Lecture 11: 5
What if This Happens?
Q1 combinational D2
IN D Q D Q
CLK1 CLK logic CLK2
CLK
IN
CLK1
Q1
D2
CLK2
D2 input still transitioning
May capture neither
HIGH nor LOW
Lecture 11: 6
Metastable State
unstable
tsetup thold
• Q stuck in the undefined region
between 0 and 1
metastable
Lecture 11: 7
But What About This Situation?
X
Y
S
S’
S•Y
S’•X
F
CLOCK
Wrong value captured
X S’•X
S F
S•Y
Y
CLOCK
Lecture 11: 8
Avoiding Timing Failure
• Possible causes of metastability and wrong
value capture
– Clock pulse that is too narrow
– Input changes too soon before a clock edge
– Input changes too soon after a clock edge
Lecture 11: 9
Sequential Circuit Timing Analysis
• Timing analysis involves calculating the time
delays between all FF pairs within the circuit
Lecture 11: 10
Important Timing Parameters
combinational
logic
CLOCK
tclk
tffpd
tcomb
tsetup thold
Lecture 11: 11
Setup Time Constraint
• tsetup is the minimum amount of time before
the triggering edge during which FF input must
be stable
tclk
tffpd
tcomb
tsetup thold
Lecture 11: 12
Determining Clock Cycle Time
combinational
FF1 logic FF2
CLOCK
Lecture 11: 13
Example: Setup Time Calculations
combinational
FF1 logic FF2
CLOCK
Comb 3 9 - -
Lecture 11: 14
Example: Setup Time Calculations
combinational
FF1 logic FF2
CLOCK
Comb 3 9 - -
Lecture 11: 15
Hold Time Constraint
combinational
FF1 logic FF2
CLOCK
CLOCK
IN
Q1
D2
Q2
CLOCK
Comb 3 9 - -
Lecture 11: 18
Clock Skew Complicates
Matters Further
• Clock may not reach all flip-flops simultaneously
combinational
FF1 logic FF2
CLK2
CLK1
[long wire] CLOCK
(assume nontrivial delay)
tskew
CLK1 (delayed)
CLK2
IN
CLK1(delayed)
Q1 (delayed)
D2 (delayed)
CLK2
tskew tsetup
Lecture 11: 20
Negative Clock Skew
Q1 D2
IN Combinational
FF1 logic FF2
CLK1 CLK2
[long wire]
CLOCK
IN
CLK1(delayed) tffpd
Q1 (delayed) tcomb
D2 (delayed)
CLK2
tskew tsetup
Sending FF receives clock later than receiving FF
tffpd(max) + tcomb(max) + tsetup ≤ tclk – tskew(max)
IN
CLK1
Q1
D2
CLK2 (delayed)
tskew tsetup
Receiving FF receives clock later than sending FF
tffpd(max) + tcomb(max) + tsetup ≤ tclk + tskew(min)
Beneficial skew for meeting setup time constraint
Lecture 11: 22
Hold Time With Positive Clock Skew
Q1 D2
IN Combinational
FF1 logic FF2
CLK1 CLK2
CLOCK [long wire]
IN
CLK1
Q1
D2
CLK2 (delayed)
Lecture 11: 24
Example: Setup Analysis with Clock Skew
combinational
FF1 logic FF2
CLOCK
Clock may arrive at FF1 up to 1ns later than FF2
Prop Delay (ns) Setup Hold Time
min max Time (ns) (ns)
FF 1 7 3 1
Comb 3 9 - -
Lecture 11: 25
Before Next Class
• H&H 5.1-5.2.3, 5.5
Next Time
Binary Arithmetic
Lecture 11: 26