CSL718 : Pipelined Processors - PowerPoint PPT Presentation

About This Presentation
Title:

CSL718 : Pipelined Processors

Description:

Title: CS 412 / CS718 Author: Anshul Kumar Last modified by: Dr. Anshul Kr. Created Date: 1/29/1990 5:13:18 AM Document presentation format: On-screen Show – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 23
Provided by: Ansh55
Category:

less

Transcript and Presenter's Notes

Title: CSL718 : Pipelined Processors


1
CSL718 Pipelined Processors
  • Types of Pipelines
  • Types of Hazards
  • 16th Jan, 2006

2
Types of Pipelined processors
  • Degree of overlap
  • Serial, Overlapped, Pipelined, Super-pipelined
  • Depth
  • Shallow, Deep
  • Structure
  • Linear, Non - linear
  • Scheduling of operations
  • Static, Dynamic

3
Degree of overlap Depth
Serial
Shallow
Overlapped
Deep
Pipelined
4
Pipeline Structure
Linear Pipeline
A
B
C
Non-linear Pipeline
A
B
C
Sequence A, B, C, B, C, A, C, A
5
Scheduling/timing alternatives
  • Static
  • same sequence of stages for all instructions
  • all actions in order
  • if one instruction stalls, all subsequent
    instructions are delayed
  • Dynamic
  • above conditions are relaxed
  • higher throughput is achieved

6
Dynamic Scheduling
  • type 1 beginnings (decode) and endings (put
    away) in order
  • type 2 only beginnings in order
  • type 3 no order restrictions except
    dependencies
  • type 1 extended beginnings in order, references
    that effect memory state are in order
  • note that a memory reference may lead to page
    fault

7
Pipelining and CPI
8
Hazards in Pipelining
  • Data dependencies gt Data hazards
  • RAW (read after write)
  • WAR (write after read)
  • WAW (write after write)
  • Resource conflicts gt Structural hazards
  • use of same resource in different stages
  • Procedural dependencies gt Control hazards
  • conditional and unconditional branches,
    calls/returns

9
Data Hazards
read/write
previous instr
read/write
current instr
delay 3
10
Structural Hazards
Caused by Resource Conflicts
  • Use of a hardware resource in more than one cycle
  • Different sequences of resource usage by
    different instructions
  • Non-pipelined multi-cycle resources

11
Control Hazards
cond eval
target addr gen
branch instr
next inline instr
delay 2
target instr
delay 5
  • the order of cond eval and target addr gen may
    be different
  • cond eval may be done in previous instruction

12
Handling Data Hazards
W
EX
previous instr
Data Forwarding
1
R
EX
current instr
W
previous instr
Instruction Reordering
2
R
current instr
13
Analysis of Structural Hazards
Non-linear Pipeline
A
B
C
Reservation Table for X
14
Analysis of Structural Hazards
Multi-functional Pipeline
A
B
C
Y
Y
Reservation Table for X
Y
for Y
Y
Y
Y
15
Collisions with Initiation Interval 2
16
Collisions with Initiation Interval 5
17
Latency Sequences and Cycles
  • 1, 8, 1, 8, . (1, 8) avg 4.5
  • 3, 3, 3, 3, . (3) avg 3
  • 6, 6, 6, 6, . (6) avg 6
  • Minimum Average Latency (MAL) ?

18
Collision Free Scheduling for X
m . 2 1
1 0 1 1 0 1 0
Collision vector for X
1 collision 0 no collision
8
1 0 1 1 0 1 0
8
3
1
6
8
1 0 1 1 0 1 1
1 1 1 1 1 1 1
6
3
19
Collision Free Scheduling for Y
m.2 1
1 0 1 0
Collision vector for Y
1 collision 0 no collision
5
1 0 1 0
5
1
3
5
1 0 1 1
1 1 1 1
3
20
Latency Cycles from State Diagram
  • Latency Cycles
  • (1, 8) (1, 8, 6, 8) (3) (6) (3, 8) (3, 6, 3)
  • Simple Latency Cycles (no figure repeats)
  • (1, 8) (3) (6) (3, 8) (6, 8)
  • Greedy Latency Cycles
  • (1, 8) (3) - from different starting states

21
Minimum Average Latency (MAL)
  • MAL gt max no. of check marks in any row
  • MAL lt avg latency of any greedy cycle
  • avg latency of any greedy cycle lt
  • no. of 1s in initial collision vector 1

22
Upper Bound on MAL
  • Consider a greedy cycle (k1,k2,..,kn)
  • Let p no. of 1s in initial collision vector
  • ? k1 lt p 1
  • k2 lt 2 p - k1 2
  • k3 lt 3 p - k1 - k2 3
  • .
  • kn lt n p - k1 - k2 - kn-1 n
  • ? k1 k2 kn lt n p n ? MAL lt p 1
Write a Comment
User Comments (0)
About PowerShow.com