Docsity

Computer Architecture: Understanding Pipeline Basics & Its Impact on Throughput, Study notes of Computer Architecture and Organization

Toggle sidebar
bg1
ECE 366: Computer Architecture
Lecture Notes # 14
Pipeline Basics
SHANTANU DUTT
Department of Electrical and Computer Engineering
University of Illinois, Chicago
Phone: (312) 355-1314; e-mail: [email protected]
URL: http://www.eecs.uic.edu/˜dutt
Shantanu Dutt UIC 1
1
pf3
pf4
pf5
pf8

Partial preview of the text

Download Computer Architecture: Understanding Pipeline Basics & Its Impact on Throughput and more Study notes Computer Architecture and Organization in PDF only on Docsity!

ECE 366: Computer Architecture

Lecture Notes # 14

SHANTANU Pipeline Basics

D

UTT

Department of Electrical and Computer Engineering

University of Illinois, Chicago

Phone: (312) 355-1314;

e-mail: [email protected]

URL: http://www.eecs.uic.edu/

dutt

Shantanu Dutt

UIC

1

Pipelining Introduction

(^) Pipelining

(^) is the processing concept in which the entire processing flow is

broken up into multiple

(^) stages

, and a new data/instruction is processed by

which then goes onto the next stage for further processing.a stage potentially as soon as it is done with the current data/instruction,

  1. In a non-pipelined processing, by contrast, the next data/instruction is complete.processed after the entire processing of the previous data/instruction is

Instr. Data/

Instr.Data/

k stages each of delay D/k

"fill", a data/instr. is done every D/k secsis inputted every D/k secs. After initial (b) Pipelined processing: new data/instr.

data/instr. is done evry D secs.data/instr. inputted every D secs. A(a) Non-pipelined processing; new

Processing Path Delay = D

  1. A data/instruction’s processing in a pipeline is complete when it exits the last stage. If there are

(^) k (^) stages each of equal delay, then the processing

throughput

(^) (# of data/instruction processed per second) increases roughly

by a factor of

(^) k .

  1. The real-world has pipelining!

E.g., water/oil pipeline—processing

tination.communication—processing is sending all the signals from source to des-is sending all the fluid from source to destination, TV/radio signal

of the Decode stage will store instruction

(^) i (^) 1, the input register of the

Read stage will store instruction

(^) i (^) 2, the input register of the Execute

stage will store the opcode and write register fields of instruction

(^) i (^) 3 as

processing of nstructionwell as the twi input operands generated by the Read stage in its previous

(^) i (^) 3, while the Write stage’s input register would

store the ALU output and the write register field of instruction

(^) i (^)

  1. Further, the C.U. of stage

(^) j (^) can only store new data.instruction in the input

register of stage

(^) j ^ 1 after it receives a signal (

done

 j^ (^1) ) from stage

(^) j ^ 1

informing it that it is done with its current processing (much like

(^) wait

(^) is

used to communicate between the memory unit and the processor).

  1. Also, the C.U. of stage

(^) j (^) can only start processing new data/instruction

in its input register when it receives a signal

(^) new

j^  (^1) from stage

(^) j (^) 1 in-

(which, will be done, of course, only after stageforming it that new data/instruction has been written into its input register

(^) j (^) asserts signal

(^) done

j to

stage

(^) j (^)

  1. Some extra delay has been added to the total delay/latency for processing delay in our discussions.that is needed in the pipelined version. We will, however, ignore this extraa single instruction due to the writing and reading of the stage registers

Pipeline Throughput–Non-branching model

  1. Let

(^) t i be the delay of stage

(^) i

. Then, non-pipelined time

T

(^) no

pipe

 n^

^

for

processing

(^) n (^) instruction is

T

(^) no

pipe

 n^

n

i 1 ∑ k

i^ t

  1. Pipelined time

T

(^) pipe

 n^

^

for processing

(^) n (^) instruction is

T

(^) pipe

 n^

Fill Time

n

^

k i^ max (^1) it

where the

(^) Fill Time

(^) is the time taken to “fill” the pipeline, i.e., the time

theall pipeline stages ate “filled” or busy processing some instruction; beforetaken for the first instruction to emerge from the pipeline, by which time, (^) Fill Time

, some stages may be idle. The

(^) Fill Time

(^) is given by

Fill Time

sum

i k (^1) t i

throughput is 1

(^) kt (^) instr/sec, while the pipelined throughput is 1

(^) t (^) in-

str/sec, which is

(^) k (^) times more than the non-pipelined version.

  1. Example 2: Consider a pipeline with 3 stages F, D, E with delays of 3 cc’s, 1 cc and 2 cc’s, respectively.

T

(^) no  pipe  n^ 

n  6 cc

(^) s

T

(^) pipe

 n^ 

6   n (^) 1 ^  3 cc

(^) s

Pipelined throughput =

(^) n  6   n (^) 1 ^  3 

1 (^) 3 instr/cc.

Non-pipeline throughput is 1/6 instr/cc.

Pipelined Myth8 Processor

Register File

O2 O

O2 O

O2 O

O2 O

ALU

alu_sel[0..2] cin

cout, m7, v

StageDecode & ALU

register ALU o/p

8

o/p regsReg. file

MEMORY SYSTEM

Memory Data Bus

CPU

read

write

dr_enb

Mux

b_sel[0..2] a_sel[0..2]

dr_sel[0..1]

result_sel[0..1]

MAR

mar_sel

8

8

Memory Address Bus

MDR

rk_selrj_sel ri_selr0write r0write

(^8)

8 Write Bus

Read Bus A

Read Bus B

IR

IR ir1_sel

ir0_sel

CUWrite CUALU CURead CUFetch

Opcode register^ opcode

StageWriteDecode & StageDecode & Read^ Fetch Stage

The Myth8 Pipelined Processor