Académique Documents
Professionnel Documents
Culture Documents
Circuitos secuenciales
Adaptado de:
Digital Design and Computer Architecture, 2nd Edition
David Money Harris and Sarah L. Harris
Chapter 3 <1>
Chapter 3 :: Topics
Introduction
Latches and Flip-Flops
Synchronous Logic Design
Finite State Machines
Timing of Sequential Logic
Parallelism
Chapter 3 <2>
Chapter 3 <14>
Parade FSM
Unfactored FSM
P
R
TA
TB
Factored FSM
P
R
Controller
FSM
LA
LB
Mode
FSM
M
TA
TB
Lights
FSM
LA
LB
Controller
FSM
Chapter 3 <15>
Factored FSM
TA
Reset
S0
LA: green
LB: red
TA
S1
LA: yellow
LB: red
Reset
S3
LA: red
LB: yellow
S2
LA: red
LB: green
MTB
P
S0
M: 0
S1
M: 1
R
M + TB
Lights FSM
R
Mode FSM
Chapter 3 <16>
Timing
Flip-flop samples D at clock edge
D must be stable when sampled
Similar to a photograph, D must be stable
around clock edge
If not, metastability can occur
Chapter 3 <19>
D
tsetup thold
ta
Chapter 3 <20>
Chapter 3 <21>
Dynamic Discipline
Synchronous sequential circuit inputs must be
stable during aperture (setup and hold) time
around clock edge
Specifically, inputs must be stable
at least tsetup before the clock edge
at least until thold after the clock edge
Chapter 3 <22>
Dynamic Discipline
The delay between registers has a
minimum and maximum delay, dependent
on the delays of the circuit elements
CLK
CLK
Q1
(a)
C
L
R1
D2
R2
Tc
CLK
Q1
D2
(b)
Chapter 3 <23>
CLK
Q1
CL
D2
R1
Tc
R2
Tc
CLK
Q1
D2
tpcq
tpd
tsetup
Chapter 3 <24>
CLK
Q1
CL
D2
R1
R2
Tc
CLK
Q1
D2
tpcq
tpd
tsetup
Chapter 3 <25>
CLK
Q1
CL
D2
R1
R2
Tc
CLK
Q1
D2
tpcq
tpd
tsetup
Chapter 3 <26>
CLK
Q1
R1
CL
D2
R2
thold <
CLK
Q1
D2
tccq tcd
thold
Chapter 3 <27>
CLK
Q1
R1
CL
D2
R2
CLK
Q1
D2
tccq tcd
thold
Chapter 3 <28>
CLK
Q1
R1
CL
D2
R2
CLK
Q1
D2
tccq tcd
thold
Chapter 3 <29>
Timing Analysis
CLK
Timing Characteristics
CLK
tccq = 30 ps
tpcq = 50 ps
tsetup = 60 ps
tpd =
X'
Y'
thold = 70 ps
per gate
tpd
= 35 ps
tcd
= 25 ps
tcd =
Setup time constraint:
Tc
fc =
Chapter 3 <30>
Timing Analysis
CLK
Timing Characteristics
CLK
tccq = 30 ps
tpcq = 50 ps
tsetup = 60 ps
tpd = 3 x 35 ps = 105 ps
X'
Y'
thold = 70 ps
per gate
tpd
= 35 ps
tcd
= 25 ps
tcd = 25 ps
Setup time constraint:
Chapter 3 <31>
Timing Analysis
Add buffers to the short paths:
CLK
Timing Characteristics
CLK
tccq = 30 ps
tpcq = 50 ps
B
tsetup = 60 ps
tpd =
X'
Y'
thold = 70 ps
per gate
tpd
= 35 ps
tcd
= 25 ps
tcd =
Setup time constraint:
Tc
fc =
Chapter 3 <32>
Timing Analysis
Add buffers to the short paths:
Timing Characteristics
CLK
CLK
tccq = 30 ps
tpcq = 50 ps
B
tsetup = 60 ps
X'
Y'
tpd = 3 x 35 ps = 105 ps
thold = 70 ps
per gate
tpd
= 35 ps
tcd
= 25 ps
tcd = 2 x 25 ps = 50 ps
Setup time constraint:
Chapter 3 <33>
Clock Skew
The clock doesnt arrive at all registers at same time
Skew: difference between two clock edges
Perform worst case analysis to guarantee dynamic
discipline is not violated for any register many
registers in a system!
delay
CLK
CLK1
CLK2
Q1
R1
C
L
D2
R2
t skew
CLK1
CLK2
CLK
Chapter 3 <34>
CLK
taperture
Case I
Q
D
Case II
tsetup thold
Q
D
Q
???
Chapter 3 <41>
Case III
button
Parallelism
Two types of parallelism:
Spatial parallelism
duplicate hardware performs multiple tasks at once
Temporal parallelism
task is broken into multiple stages
also called pipelining
for example, an assembly line
Chapter 3 <42>
Parallelism Definitions
Token: Group of inputs processed to produce
group of outputs
Latency: Time for one token to pass from
start to end
Throughput: Number of tokens produced
per unit time
Parallelism increases throughput
Chapter 3 <43>
Parallelism Example
Ben Bitdiddle bakes cookies to celebrate traffic light
controller installation
5 minutes to roll cookies
15 minutes to bake
What is the latency and throughput without parallelism?
Chapter 3 <44>
Parallelism Example
Ben Bitdiddle bakes cookies to celebrate traffic light
controller installation
5 minutes to roll cookies
15 minutes to bake
What is the latency and throughput without parallelism?
Latency = 5 + 15 = 20 minutes = 1/3 hour
Throughput = 1 tray/ 1/3 hour = 3 trays/hour
Chapter 3 <45>
Parallelism Example
What is the latency and throughput if Ben
uses parallelism?
Spatial parallelism: Ben asks Allysa P. Hacker to
help, using her own oven
Temporal parallelism:
two stages: rolling and baking
He uses two trays
While first batch is baking, he rolls the
second batch, etc.
Chapter 3 <46>
Spatial Parallelism
Latency:
time to
first tray
0
10
15
20
25
30
35
40
45
50
Spatial
Parallelism
Time
Tray 1
Ben 1
Ben 1
Tray 2
Alyssa 1
Alyssa 1
Roll
Tray 3
Ben 2
Ben 2
Tray 4
Alyssa 2
Alyssa 2
Latency = ?
Throughput = ?
Chapter 3 <47>
Bake
Legend
Spatial Parallelism
Latency:
time to
first tray
0
10
15
20
25
30
35
40
45
50
Spatial
Parallelism
Time
Tray 1
Ben 1
Ben 1
Tray 2
Alyssa 1
Alyssa 1
Roll
Tray 3
Ben 2
Ben 2
Tray 4
Alyssa 2
Alyssa 2
Chapter 3 <48>
Bake
Legend
Temporal Parallelism
Latency:
time to
first tray
0
10
15
20
25
30
35
40
45
50
Temporal
Parallelism
Time
Tray 1
Tray 2
Ben 1
Ben 1
Ben 2
Tray 3
Ben 2
Ben 3
Ben 3
Latency = ?
Throughput = ?
Chapter 3 <49>
Temporal Parallelism
Latency:
time to
first tray
0
10
15
20
25
30
35
40
45
50
Temporal
Parallelism
Time
Tray 1
Tray 2
Tray 3
Ben 1
Ben 1
Ben 2
Ben 2
Ben 3
Ben 3
Chapter 3 <50>