復(fù)習(xí)第十二章2簡(jiǎn)化版_第1頁(yè)
復(fù)習(xí)第十二章2簡(jiǎn)化版_第2頁(yè)
復(fù)習(xí)第十二章2簡(jiǎn)化版_第3頁(yè)
復(fù)習(xí)第十二章2簡(jiǎn)化版_第4頁(yè)
復(fù)習(xí)第十二章2簡(jiǎn)化版_第5頁(yè)
已閱讀5頁(yè),還剩8頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

William

StallingsComputer

Organizationand

Architecture6th

EditionCPU結(jié)構(gòu)和功能Chapter12CPU

Structureand

FunctionPage424Execution

usually

does

not

access

mainmemoryCan

fetch

nextinstruction

during

executionof

current

instructionCalled

instruction

prefetch指令預(yù)取流水線§12.4

PipeliningFetch

accessing

main

memoryTwo

Stage

Instruction

PipelinePage425作廢Improved

PerformanceBut

not

doubled,

for

two

reasons:—Fetch

usually

shorter

than

execution—Any

jump

or

branch

means

thatprefetched

instructions

are

not

therequired

instructionsAdd

more

stages

to

improveperformancePage424Instruction

operationsdivided

6

stages

6階段Fetch

instruction(FI)Decode

instruction(DI)Calculate

operands(CO)

(i.e.

calculate

EA)Fetch

operands(FO)Execute

instructions(EI)Write

result(WR)Overlap

these

operationsPage425Page426Timing

of

Pipeline

流水線時(shí)序圖兩點(diǎn)說(shuō)明:不會(huì)總是6個(gè)階段;存儲(chǔ)器沖突問(wèn)題。Speedup

factort

–max

stage

delay

最大段延遲n

number

of

instructionsk

number

of

stagesWithout

pipeline—T1

=

n

k

t—e.g.

TK=

9

x

6

t=54

tWith

pipeline—TK

=[(K–1)

+

n]

t—e.g.

TK=(6-1+9)

t=14

tPage431加速因子Speedup

factorSk

=T1

/

Tk=

n

kt

/[k

+

(n

–1)]t=

n

k

/[k

+

(n

–1)]When

k

increases,

Sk

increases.When

n

increase,

Sk

tendsto

k.

It

means:thelargerthe

numberof

pipeline

stages,

thegreater

the

potentialforspeedup.However,as

a

practical

matter, k=(6~十幾個(gè))stagesPage431加速因子Speedup

Factors

withInstruction

PipeliningPage432對(duì)數(shù)坐標(biāo)log2

xK=6,9,12n=10,20,30※Branch

limits

pipeline’s

performance*Several

other

factors

serve

to

limit

theperformance

enhancement.The

worse

factor

isthe

conditional

branch

instruction,

which

can

invalidate

severalinstructionfetches.Itchanges the

sequenceof

instruction

flowing.Assume

instruction

3

isa

conditional

branchtoinstruction

15.Until

the

instruction

is

executed,

no

way

ofknowing

which

instruction

will

comenext.Page426The

Effect

of

a

Condition

Branch

onInstruction

Pipeline

OperationPage427知道轉(zhuǎn)移指令知道轉(zhuǎn)移目的知道條件滿(mǎn)足※Dealing

with

Branches*(1)Multiple

Streams多流水線Have

two

pipelinesprefetch

each

branch

into

a

separate

pipelinePrefetch

Branch

Target

預(yù)取轉(zhuǎn)移目標(biāo)Loop

buffer

循環(huán)緩沖Branch

prediction

轉(zhuǎn)移預(yù)測(cè)—Predict

never

taken

預(yù)測(cè)轉(zhuǎn)移絕不發(fā)生—Predict

always

taken

預(yù)測(cè)轉(zhuǎn)移總是發(fā)生—Predict

by

Opcode

依操作碼預(yù)測(cè)連續(xù)猜錯(cuò)兩次,改變狀態(tài)—Taken/Not

taken

switch預(yù)測(cè)轉(zhuǎn)移發(fā)生不發(fā)生—Branch

history

table

轉(zhuǎn)移歷史表(5)Delayed

branching

延遲轉(zhuǎn)移Do

not

take

jump

untilyouhave

toThis

following

instruction

is

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論