0% found this document useful (0 votes)
27 views13 pages

Unit 5 Pipeline

The document discusses the concept of pipelining in computing, which involves breaking down a sequential process into sub-operations that can be executed concurrently in dedicated segments. It highlights the importance of registers in managing data flow between these segments, enabling multiple computations to occur simultaneously. Additionally, it covers the structure of arithmetic pipelines used for high-speed computations, particularly in floating-point operations.

Uploaded by

abrin2112
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views13 pages

Unit 5 Pipeline

The document discusses the concept of pipelining in computing, which involves breaking down a sequential process into sub-operations that can be executed concurrently in dedicated segments. It highlights the importance of registers in managing data flow between these segments, enabling multiple computations to occur simultaneously. Additionally, it covers the structure of arithmetic pipelines used for high-speed computations, particularly in floating-point operations.

Uploaded by

abrin2112
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Uni

t5
Pi
pel
i
ningandVect
orPr
ocessi
ng
Pi
pel
ini
ng

Thet
erm Pi
pel
i
ningr
efer
stoat
echni
queofdecomposi
ngasequent
ialpr
ocessi
nto
sub-
oper
ati
ons,
wit
heachsub-
oper
ati
onbei
ngexecut
edi
nadedi
cat
edsegmentt
hat
oper
atesconcur
rent
lywi
thal
lot
hersegment
s.

The most i
mpor
tant char
act
eri
sti
c of a pi
pel
i
ne t
echni
que i
sthat sev
eral
comput
ati
onscan bei
n pr
ogr
essi
n di
sti
nctsegment
satt
hesame t
ime.The
ov
erl
appi
ngofcomput
ati
oni
smadepossi
blebyassoci
ati
ngar
egi
sterwi
theach
segmenti
nthepi
pel
i
ne.Ther
egi
ster
spr
ovi
dei
sol
ati
onbet
weeneachsegmentso
t
hateachcanoper
ateondi
sti
nctdat
asi
mul
taneousl
y.

Thest
ruct
ureofapi
pel
i
neor
gani
zat
ioncanber
epr
esent
edsi
mpl
ybyi
ncl
udi
ngan
i
nputr
egi
sterf
oreachsegmentf
oll
owedbyacombi
nat
ional
cir
cui
t.

Letusconsi
deranexampl
eofcombi
nedmul
ti
pli
cat
ionandaddi
ti
onoper
ati
ont
oget
abet
terunder
standi
ngoft
hepi
pel
i
neor
gani
zat
ion.

The combi
ned mul
ti
pli
cat
ion and addi
ti
on oper
ati
on i
s done wi
th a st
ream of
number
ssuchas:

Ai*Bi+Cif
ori
=1,
2,3,
..
..
..
.,
7

Theoper
ati
ont
obeper
for
medont
henumber
sisdecomposedi
ntosub-
oper
ati
ons
wi
theachsub-
oper
ati
ont
obei
mpl
ement
edi
nasegmentwi
thi
napi
pel
i
ne.

Thesub-
oper
ati
onsper
for
medi
neachsegmentoft
hepi
pel
i
near
edef
inedas:

R1← Ai,R2← Bi I
nputAi,
andBi

R3← R1*R2,
R4← Ci Mul
ti
ply
,andi
nputCi

R5← R3+R4 Add Cit


opr
oduct

1
Pr
epar
edbySahal
aKI
,Jai
Bhar
athCol
l
egeAr
ackappady.
Thef
oll
owi
ngbl
ockdi
agr
am r
epr
esent
sthecombi
nedaswel
last
hesub-
oper
ati
ons
per
for
medi
neachsegmentoft
hepi
pel
i
ne.

Regi
ster
sR1,
R2,
R3,
andR4hol
dthedat
aandt
hecombi
nat
ional
cir
cui
tsoper
atei
na
par
ti
cul
arsegment
.

Theout
putgener
atedbyt
hecombi
nat
ional
cir
cui
tinagi
vensegmenti
sappl
i
edas
ani
nputr
egi
steroft
henextsegment
.Fori
nst
ance,
from t
hebl
ockdi
agr
am,
wecan
seet
hatt
her
egi
sterR3i
susedasoneoft
hei
nputr
egi
ster
sfort
hecombi
nat
ional
adderci
rcui
t.

Ar
it
hmet
icPi
pel
ine

Ar
it
hmet
icPi
pel
i
nesar
emost
lyusedi
nhi
gh-
speedcomput
ers.Theyar
eusedt
o
i
mpl
ementf
loat
ing-
poi
ntoper
ati
ons,mul
ti
pli
cat
ion off
ixed-
poi
ntnumber
s,and

2
Pr
epar
edbySahal
aKI
,Jai
Bhar
athCol
l
egeAr
ackappady.
si
mil
arcomput
ati
onsencount
eredi
nsci
ent
if
icpr
obl
ems.

Tounder
standt
heconcept
sofar
it
hmet
icpi
pel
i
nei
namor
econv
eni
entway
,letus
consi
deranexampl
eofapi
pel
i
neuni
tforf
loat
ing-
poi
ntaddi
ti
onandsubt
ract
ion.

Thei
nput
stot
hef
loat
ing-
poi
ntadderpi
pel
i
near
etwonor
mal
i
zedf
loat
ing-
poi
nt
bi
nar
ynumber
sdef
inedas:

X=A*2a=0.
9504*103
Y=B*2b=0.
8200*102

WhereAandBar
etwof
ract
ionst
hatr
epr
esentt
hemant
issaandaandbar
ethe
exponent
s.

Thecombi
nedoper
ati
onoff
loat
ing-
poi
ntaddi
ti
onandsubt
ract
ioni
sdi
vi
dedi
nto
f
oursegment
s.Each segmentcont
ainst
hecor
respondi
ng sub oper
ati
on t
o be
per
for
medi
nthegi
venpi
pel
i
ne.Ther
egi
ster
slabel
l
edRar
epl
acedbet
weent
he
segment
stost
oret
hei
nter
medi
ater
esul
ts.Thesuboper
ati
onst
hatar
eshowni
nthe
f
oursegment
sar
e:

1.Compar
etheexponent
sbysubt
ract
ion.
2.Al
i
gnt
hemant
issas.
3.Addorsubt
ractt
hemant
issas.
4.Nor
mal
i
zet
her
esul
t.

Theexponent
sar
ecompar
edbysubt
ract
ingt
hem t
odet
ermi
net
hedi
ff
erence.The
l
argerexponenti
schosenast
heex
ponentoft
her
esul
t.Theexponentdi
ff
erence
det
ermi
neshow manyt
imest
hemant
issaassoci
atedwi
thsmal
l
erexponentmust
beshi
ft
edt
other
ight
.Thi
spr
oducesanal
i
gnmentoft
hemant
issas.
Thet
wo
mant
issasaddedorsubt
ract
edi
nsegment3.Ther
esul
tisnor
mal
i
zedi
nsegment4.
Whenanov
erf
lowoccur
sthemant
issaoft
hesum ordi
ff
erencei
sshi
ft
edr
ightand
t
heexponenti
sincr
ement
edbyone.

Thefoll
owing bl
ockdiagr
am r
epr
esent
sthesub oper
ati
onsper
for
med i
n each
segmentofthepi
pel
ine.

3
Pr
epar
edbySahal
aKI
,Jai
Bhar
athCol
l
egeAr
ackappady.
4
Pr
epar
edbySahal
aKI
,Jai
Bhar
athCol
l
egeAr
ackappady.
Not
e:Regi
ster
sar
epl
acedaf
tereachsuboper
ati
ont
ost
oret
hei
nter
medi
ate
r
esul
ts.
1.Compar
eexponent
sbysubt
ract
ion:

Theexponentsarecomparedbysubtr
acti
ngthem t
odeter
minet
hei
rdi
ff
erence.The
l
argerexponenti
schosenastheexponentoft
heresul
t.

The di
ff
erence ofthe exponent
s,i.
e.,3-2=1determines how manyt i
mes t
he
manti
ssaassoci
atedwit
ht hesmall
erexponentmustbeshif
tedtother
ight
.

2.Al
ignt
hemant
issas:

Themant i
ssaassociatedwiththesmall
erexponenti
sshi
ft
edaccor
dingt
othe
di
ff
erenceofexponentsdet
erminedi
nsegmentone.

9504*103
X=0.
08200*103
Y=0.
3.Addmant
issas:

Thet
womant
issasar
eaddedi
nsegmentt
hree.

0324*103
Z=X+Y=1.
4.Nor
mal
izet
her
esul
t:
Thesum isadjust
edbynormali
zi
ngtheresul
tsot
hati
thasafr
act
ionwi
thanonzer
o
foi
stdi
git
.Thisisdonebyshi
ft
ingmanti
ssaoncet
otheri
ght
.

Af
ternor
mal
i
zat
ion,
ther
esul
tiswr
it
tenas:

1324*104
Z=0.
I
nst
ruct
ionPi
pel
ine

Pi
pel
i
nepr
ocessi
ngcanoccurnotonl
yint
hedat
ast
ream buti
nthei
nst
ruct
ion
st
ream aswel
l
.

Ani
nst
ruct
ionpi
pel
i
ner
eadsconsecut
ivei
nst
ruct
ionf
rom memor
ywhi
l
epr
evi
ous
i
nst
ruct
ionsar
ebei
ngexecut
edi
not
hersegment
s.Thi
scausest
hei
nst
ruct
ionf
etch
andexecut
ephasest
oov
erl
apandper
for
m si
mul
taneousoper
ati
ons.

Mostoft
hedi
git
alcomput
erswi
thcompl
exi
nst
ruct
ionsr
equi
rei
nst
ruct
ionpi
pel
i
ne
t
ocar
ryoutoper
ati
onsl
i
kef
etch,
decodeandexecut
einst
ruct
ions.

I
n gener
al,t
hecomput
erneedst
o pr
ocesseach i
nst
ruct
ion wi
tht
hef
oll
owi
ng

5
Pr
epar
edbySahal
aKI
,Jai
Bhar
athCol
l
egeAr
ackappady.
sequenceofst
eps.

1.Fet
chi
nst
ruct
ionf
rom memor
y.
2.Decodet
hei
nst
ruct
ion.
3.Cal
cul
atet
heef
fect
iveaddr
ess.
4.Fet
cht
heoper
andsf
rom memor
y.
5.Execut
ethei
nst
ruct
ion.
6.St
oret
her
esul
tint
hepr
operpl
ace.

Eachst
epi
sexecut
edi
napar
ti
cul
arsegment
,andt
her
ear
eti
meswhendi
ff
erent
segment
s may t
ake di
ff
erentt
imes t
o oper
ate on t
he i
ncomi
ng i
nfor
mat
ion.
Mor
eov
er,
ther
ear
eti
meswhent
woormor
esegment
smayr
equi
rememor
yaccess
att
hesamet
ime,causi
ngonesegmentt
owai
tunt
ilanot
heri
sfi
nishedwi
tht
he
memor
y.

Theor
gani
zat
ionofani
nst
ruct
ionpi
pel
i
newi
l
lbemor
eef
fi
cienti
fthei
nst
ruct
ion
cy
clei
sdi
vi
dedi
ntosegment
sofequal
dur
ati
on.Oneoft
hemostcommonexampl
es
oft
hist
ypeofor
gani
zat
ioni
saFour
-segmenti
nst
ruct
ionpi
pel
ine.

Af
our
-segmenti
nst
ruct
ionpi
pel
i
necombi
nest
woormor
edi
ff
erentsegment
sand
makesi
tasasi
ngl
eone.Fori
nst
ance,t
hedecodi
ngoft
hei
nst
ruct
ioncanbe
combi
nedwi
tht
hecal
cul
ati
onoft
heef
fect
iveaddr
essi
ntoonesegment
.

Whi
l
eani
nst
ruct
ioni
sexecut
edi
nsegment4t
henexti
nst
ruct
ioni
nsequencei
s
busyi
nfet
chi
ngt
heoper
andf
rom memor
yinsegment3.Theef
fect
iveaddr
essmay
becal
cul
atedi
nasepar
atear
it
hmet
icci
rcui
tfort
hir
dinst
ruct
iont
hef
our
thandal
l
subsequenti
nst
ruct
ionscanbef
etchedandpl
acei
nani
nst
ruct
ionFI
FO.Thusupt
o
4suboper
ati
onsi
nthei
nst
ruct
ioncy
clecanov
erl
apandupt
o4di
ff
erenti
nst
ruct
ion
canbei
npr
ogr
essofbei
ngpr
ocessedatt
hesamet
ime.I
ncaseofbr
anchi
ngt
he
pendi
ngoper
ati
onsi
nthel
ast2segment
sar
ecompl
etedandal
linf
ormat
ionst
ored
i
ninst
ruct
ionbuf
feri
sdel
eted.Thepi
pel
i
net
henr
est
art
sfr
om t
henew addr
essi
n
t
hePC.Si
mil
arl
yani
nter
ruptr
equestwhenacknowl
edgedwi
l
lcauset
hepi
pel
i
net
o
empt
yandst
artagai
nfr
om t
henewv
alue.

6
Pr
epar
edbySahal
aKI
,Jai
Bhar
athCol
l
egeAr
ackappady.
Thei
nst
ruct
ioncy
clei
scompl
etedi
nfoursegment
s.

Segment1:

Theinstr
uct
ionf
etchsegmentcanbei
mpl
ement
edusi
ngf
ir
sti
n,f
ir
stout(
FIFO)
buf
fer.

Segment2:

Theinst
ructi
on f
etched f
rom memoryisdecoded i
nt hesecond segment,and
event
ual
l
y,theef
fecti
veaddressi
scal
cul
atedi
naseparat
eari
thmeti
ccircui
t.

Segment3:

Anoper
andf
rom memor
yisf
etchedi
nthet
hir
dsegment
.

Segment4:

Thei
nst
ruct
ionsar
efi
nal
l
yexecut
edi
nthel
astsegmentoft
hepi
pel
i
neor
gani
zat
ion.

Thef
oll
owi
ngbl
ockdi
agr
am showsat
ypi
calexampl
eofaf
our
-segmenti
nst
ruct
ion
pi
pel
i
ne.

7
Pr
epar
edbySahal
aKI
,Jai
Bhar
athCol
l
egeAr
ackappady.
Thef
oll
owi
ngf
igur
eshowst
heoper
ati
onoft
hei
nst
ruct
ionpi
pel
i
ne

8
Pr
epar
edbySahal
aKI
,Jai
Bhar
athCol
l
egeAr
ackappady.
Exampl
e:

Thef
oursegment
sar
erepr
esent
edi
nthedi
agr
am wi
thanabbr
evi
atedsy
mbol

1.FI-i
sthesegmentt
hatf
etchesani
nst
ruct
ion.

2.DA–i
sthesegmentt
hatdecodest
hei
nst
ruct
ionandcal
cul
atet
heef
fect
ive
addr
ess.

3.FO–i
sthesegmentt
hatf
etchest
heoper
and.

4.EX–i
sthesegmentt
hatexecut
est
hei
nst
ruct
ion.

I
ngener
alt
her
ear
ethr
eemaj
ordi
ff
icul
ti
es t
hatcausei
nst
ruct
ionpi
pel
inet
o
dev
iat
efr
om i
tsnor
mal
oper
ati
on,

1.Resour
ceconf
li
cts:
-causedbyaccesst
omemor
yby2segment
satt
he
samet
ime.

2.Dat
adependencyconf
li
cts:
-ar
isewhenani
nst
ruct
iondependsont
her
esul
t
oft
epr
evi
ousi
nst
ruct
ion.

3.Br
anchDi
ff
icul
ti
es:
-ar
isef
rom br
anchandot
heri
nst
ruct
iont
hatchanget
he
v
alueoft
hePC

Adv
ant
agesofPi
pel
ini
ng

1.Thecy
clet
imeoft
hepr
ocessori
sreduced.

2.I
tincr
easest
het
hroughputoft
hesy
stem

3.I
tmakest
hesy
stem r
eli
abl
e.

9
Pr
epar
edbySahal
aKI
,Jai
Bhar
athCol
l
egeAr
ackappady.
Di
sadv
ant
agesofPi
pel
ini
ng

1.Thedesi
gnofpi
pel
i
nedpr
ocessori
scompl
exandcost
lyt
omanuf
act
ure.

2.Thei
nst
ruct
ionl
atencyi
smor
e.

Vect
orPr
ocessi
ng

Vect
orpr
ocessi
ngdeal
swi
thcomput
ati
onsi
nvol
vi
ngl
argev
ect
orsandmat
ri
ces.
Appl
i
cat
ionsofVect
orPr
ocessor
sComput
erwi
thv
ect
orpr
ocessi
ngcapabi
l
iti
esar
e
i
ndemandi
nspeci
ali
zedappl
i
cat
ions.Thef
oll
owi
ngar
esomear
easwher
evect
or
pr
ocessi
ngi
sused:

1.Pet
rol
eum expl
orat
ion.

2.Medi
cal
diagnosi
s.

3.Dat
aanal
ysi
s.

4.Weat
herf
orecast
ing.

5.Aer
ody
nami
csandspacef
li
ghtsi
mul
ati
ons.

6.I
magepr
ocessi
ng.

7.Ar
ti
fi
cial
int
ell
i
gence.Super
scal
arPr
oc

8.Sei
smi
cdat
aanal
ysi
s

Ar
raypr
ocessor
s

Ar
raypr
ocessor
sar
eal
soknownasmul
ti
processor
sorv
ect
orpr
ocessor
s.They
per
for
m comput
ati
onsonl
argear
ray
sofdat
a.Thus,t
heyar
eusedt
oimpr
ovet
he
per
for
manceoft
hecomput
er.

Ty
pesofAr
rayPr
ocessor
s

Ther
ear
ebasi
cal
l
ytwot
ypesofar
raypr
ocessor
s:

10
Pr
epar
edbySahal
aKI
,Jai
Bhar
athCol
l
egeAr
ackappady.
1.At
tachedAr
rayPr
ocessor
s

2.SI
MDAr
rayPr
ocessor
s

At
tachedAr
rayPr
ocessor
s

Anat
tachedar
raypr
ocessori
sapr
ocessorwhi
chi
sat
tachedt
oagener
alpur
pose
comput
erandi
tspur
posei
sto enhanceand i
mpr
ovet
heper
for
manceoft
hat
comput
eri
nnumer
icalcomput
ati
onalt
asks.I
tachi
eveshi
ghper
for
mancebymeans
ofpar
all
elpr
ocessi
ngwi
thmul
ti
plef
unct
ional
uni
ts.

Anat
tachedar
raypr
ocessori
sdesi
gnedasaper
ipher
alf
oraconv
ent
ionalhost
comput
er andi
tspur
posei
stoenhancet
heper
for
manceoft
hecomput
erby
pr
ovi
ding v
ect
orpr
ocessi
ng f
orcompl
exsci
ent
if
icappl
i
cat
ion.I
tachi
eveshi
gh
per
for
mance bymeans ofpar
all
elpr
ocessi
ng wi
th mul
ti
plef
unct
ionaluni
ts.I
t
i
ncl
udesar
it
hemet
icuni
tcont
aini
ngoneormor
epi
pel
i
nedf
loat
ingpoi
ntadder
sand
mul
ti
pli
ers.The f
oll
owi
ng f
igur
e shows i
nter
connect
ion ofan at
tached ar
ray
pr
ocessort
oahostcomput
er.

Thehostcomput
eri
sagener
alpur
posecomput
erandat
tachedar
raypr
ocessori
s
abackendmachi
nedr
ivenbyhostcomput
er.Thear
raypr
ocessori
sconnect
ed
t
hrough an i
nput– out
putcont
rol
l
ert
o comput
erand comput
ert
reat
sli
kean
ext
ernali
nter
face.Thedat
afort
heat
tachedpr
ocessorar
etr
ansf
err
edf
rom mai
n
memor
ytol
ocalcomput
ert
hroughahi
ghspeedbus.Thegener
alpur
posecomput
er

11
Pr
epar
edbySahal
aKI
,Jai
Bhar
athCol
l
egeAr
ackappady.
wi
thoutt
he at
tached pr
ocessorser
ves t
he user
sthatneed conv
ent
ionaldat
a
pr
ocessi
ng.Thesy
stem wi
tht
heat
tachedar
raypr
ocessorsat
isf
iest
het
heneedsf
or
compl
exar
it
hmet
icappl
i
cat
ions.

SI
MDAr
rayPr
ocessor
s

SI
MD i
sthe or
gani
zat
ion ofa si
ngl
e comput
ercont
aini
ng mul
ti
ple pr
ocessor
s
oper
ati
ngi
npar
all
el.Thepr
ocessi
nguni
tsar
emadet
ooper
ateundert
hecont
rolofa
commoncont
roluni
t,t
huspr
ovi
dingasi
ngl
einst
ruct
ionst
ream andmul
ti
pledat
a
st
reams.

Agener
albl
ockdi
agr
am ofanar
raypr
ocessori
sshownbel
ow.I
tcont
ainsasetof
i
dent
icalpr
ocessi
ngel
ement
s(PE'
s),eachofwhi
chi
shav
ingal
ocalmemor
yM.
Each pr
ocessorel
ementi
ncl
udesanALUandr
egi
ster
s.Themast
ercont
roluni
t
cont
rol
s al
lthe oper
ati
ons oft
he pr
ocessorel
ement
s.I
tal
so decodes t
he
i
nst
ruct
ionsanddet
ermi
neshowt
hei
nst
ruct
ioni
stobeexecut
ed.Themai
nmemor
y
i
susedf
orst
ori
ngt
hepr
ogr
am.Thecont
roluni
tisr
esponsi
blef
orf
etchi
ngt
he
i
nst
ruct
ions.Vect
ori
nst
ruct
ionsar
esendt
oal
lPE'
ssi
mul
taneousl
yandr
esul
tsar
e
r
etur
nedt
othememor
y.Theyar
eonl
ysui
tabl
efornumer
icalpr
obl
emst
hatcanbe
expr
essedi
nvect
orormat
ri
xfor
m andt
heyar
enotsui
tabl
eforot
hert
ypesof
comput
ati
ons

12
Pr
epar
edbySahal
aKI
,Jai
Bhar
athCol
l
egeAr
ackappady.
Whyuset
heAr
rayPr
ocessor

 Ar
raypr
ocessor
sincr
easest
heov
eral
li
nst
ruct
ionpr
ocessi
ngspeed.

 Asmostoft
heAr
raypr
ocessor
soper
atesasy
nchr
onousl
yfr
om t
hehostCPU,
hencei
timpr
ovest
heov
eral
lcapaci
tyoft
hesy
stem.

 Ar
rayPr
ocessor
shasi
tsownl
ocal
memor
y,hencepr
ovi
dingext
ramemor
y
f
orsy
stemswi
thl
owmemor
y.

13
Pr
epar
edbySahal
aKI
,Jai
Bhar
athCol
l
egeAr
ackappady.

You might also like