Documente Academic
Documente Profesional
Documente Cultură
Pipelining
Kuruvilla Varghese
DESE
Indian Institute of Science
Kuruvilla Varghese
Pipelining - Genesis 2
Kuruvilla Varghese
1
2
2/24/2020
tcomb
clk
Kuruvilla Varghese
Breaking Datapath 4
Kuruvilla Varghese
2
4
2/24/2020
Practical scenario 6
Kuruvilla Varghese
3
6
2/24/2020
Pipelining 7
Kuruvilla Varghese
5 ns 10 ns
Kuruvilla Varghese
4
8
2/24/2020
5 ns 10 ns
5
ns
5
ns
Kuruvilla Varghese
5 ns 10 ns
5
ns
5
ns
• This situation can happen when you integrate a standard IP from some
vendors, the delay of the IP may not match the delay of your blocks.
• IP vendors sometime provides IP’s with customizable pipelines inside
IP.
• Designer would be able to customize IP with number of pipeline
stages inside.
Kuruvilla Varghese
5
10
2/24/2020
Resource manipulation 11
10 ns 5 ns
Kuruvilla Varghese
11
10 ns
1 5 ns
10 ns
clk
Kuruvilla Varghese
6
12
2/24/2020
Kuruvilla Varghese
13
Retiming 14
7
14
2/24/2020
Retiming 15
Kuruvilla Varghese
15
Trick 16
• Extend all the inputs to start from the left most side.
• Let all outputs extend to the right-most output side.
• Introduce registers vertically in all paths.
Kuruvilla Varghese
8
16
2/24/2020
Logic Delays 18
A
A Y tcd
Comb tpd
Y
Kuruvilla Varghese
18
Logic Delays 19
A sel 0 1
0 1 2 3
B Y
C Y2 1 0 0 0
D Y1 0 0 0 1
1 1 0 0
sel Y0 tcd
tpd
Y 5 1 0 2
9
19
2/24/2020
Kuruvilla Varghese
20
Register Delays 21
Kuruvilla Varghese
10
21
2/24/2020
Flip-Flop Delays 22
ts th
CLK
D Q
D
CLK
tccq
tpcq
Kuruvilla Varghese
22
Latch Delays 23
ts th
CLK
D Q
D
CLK tccq tpdq
tpcq tcdq
tccq: Clock-to-Q contamination delay In FF, tcq appears at the positive edge
for +ve edge triggered FF
tpcq: Clock-to-Q propagation delay
In a latch which is transparent when
tcdq: D-to-Q contamination delay clock is high tcq is defined at positive
tpdq: D-to-Q propagation delay edge, not at the latching –ve edge
Kuruvilla Varghese
11
23
2/24/2020
D1 Q1 D2 Q2
Comb
CLK CLK
tclk
CLK
D1
tccq
tpcq
tclk > [tpcq + tpd + ts]maxptah
ts
Q1
tpd
D2
Kuruvilla Varghese
24
• In pipelining using flip-flops, one is forced to choose the clock period greater than
the delay of the stage with largest delay, even if all other stages has less delays.
• But, in pipelining using latches, a stage can borrow the time from following
stages, as the latches will be in transparent mode when the clock signal is high.
• Or, delay across multiple cycles can be accommodated, even if individual stage
delays vary.
• There will be twice the number of stages with each stage with half the delay in
case of pipelining with latches as compared to pipelining with flip-flops.
• Odd numbered stage Latches are clocked using original clock signal and even
numbered stage latches are clocked by inverted clock signal (starting number 1).
Kuruvilla Varghese
12
25
2/24/2020
Q1 D2 D3
D1 Q2 Q3
L1 comb1 L2 comb2 L3
CLK CLK/ CLK
CLK
CLK/
D1
Q1
D2
Q2
D3
Q3
26
Clocking 27
• In both cases, the clock frequency is same. In the case with flip-flops,
a single stage pipeline is used.
• In the case with latches, a double stage pipeline is used.
• To analyze consider a four stage combinational blocks with path
delays 12 ns, 12 ns, 8 ns, and 8 ns. Clock period of 20 ns is the target
with 2 stage pipelining.
• For pipelining with flip-flops analyze 2 stage pipeline with 24 ns and
16 ns.
• For pipelining with latches analyze 4 stage pipeline with 12 ns, 12 ns,
8 ns, and 8 ns
Kuruvilla Varghese
13
27
2/24/2020
• When CLK is low, odd numbered latches (L1, L3, …) are in latch
state and even numbered latches (L2, L4, …) are in transparent state,
allowing odd numbered stages to borrow time from even numbered
stages.
• When CLK is high, even numbered latches (L2, L4, …) are in latch
state and odd numbered latches (L1, L3, …) are in transparent state,
allowing even numbered stages to borrow time from odd numbered
stages.
Kuruvilla Varghese
28
Kuruvilla Varghese
14
29
2/24/2020
Kuruvilla Varghese
30
15
31
2/24/2020
Datapath
Control path
con
trol
Kuruvilla Varghese
32
33
Thank You
Kuruvilla Varghese
16
33