版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
WilliamStallings
ComputerOrganization
andArchitecture
5thEditionChapter13InstructionLevelParallelismandSuperscalarProcessors淘寶刷信譽WhatisSuperscalar?Thetermsuperscalarreferstoamachinethatdesignedtoimprovetheperformanceoftheexecutionofscalarinstructions.Therearemultipleindependentinstructionpipelinesinasuperscalarprocessor.Eachpipelineconsistsofmultiplestages,canhandlemultipleinstructionsatatime.Multiplepipelinesintroduceanewlevelofparallelism,enablingmultiplestreamsofinstructionstobeprocessedatatime.WhatisSuperscalar?AsuperscalarprocessorfetchesmultipleinstructionsatatimeAttemptstofindnearbyinstructionsthatareindependentofoneanotherandcanbeexecutedinparallel.Theessenceofthesuperscalarapproachistheabilitytoexecuteinstructionsindependentlyindifferentpipelines.WhatisSuperscalar?Commoninstructions(arithmetic,load/store,conditionalbranch)canbeinitiatedandexecutedindependentlyinasuperscalarprocessorEquallyapplicabletoRISC&CISCInpracticeusuallyRISCWhySuperscalar?Mostoperationsareonscalarquantities(seeRISCnotes)ImprovetheseoperationstogetanoverallimprovementGeneralSuperscalarOrganizationTwointeger,twofloating-point,andonememory(eitherloadorstore)operationscanbeexecutingatthesametime.SuperpipelinedManypipelinestagesneedlessthanhalfaclockcycleDoubleinternalclockspeedgetstwotasksperexternalclockcycleSuperscalarv
SuperpipelineSuperscalarvSuperpipelineBasemachineSuperscalarvSuperpipelineSuperpipelineSuperscalarvSuperpipelineSuperscalarLimitationsInstructionlevelparallelismCompilerbasedoptimisationHardwaretechniquesLimitedbyTruedatadependency 數據相關Proceduraldependency 過程相關Resourceconflicts 資源沖突Outputdependency 輸出相關Antidependency 反相關TrueDataDependencyADDr1,r2(r1:=r1+r2;)MOVEr3,r1(r3:=r1;)CanfetchanddecodesecondinstructioninparallelwithfirstCanNOTexecutesecondinstructionuntilfirstisfinishedAlsocalledflowdependency
orwrite-readdependencyTrueDataDependencyProceduralDependencyCannotexecuteinstructionsafterabranchinparallelwithinstructionsbeforeabranchAlso,ifinstructionlengthisnotfixed,instructionshavetobedecodedtofindouthowmanyfetchesareneededThispreventssimultaneousfetchesProceduralDependencyResourceConflictResourcesMemories,caches,buses,register-file,ports,functionalunitsTwoormoreinstructionsrequiringaccesstothesameresourceatthesametimee.g.twoarithmeticinstructionsCanduplicateresourcese.g.havetwoarithmeticunitsResourceConflictEffectof
DependenciesDesignIssuesInstructionlevelparallelismInstructionsinasequenceareindependentExecutioncanbeoverlappedGovernedbydataandproceduraldependencyMachineParallelismAbilitytotakeadvantageofinstructionlevelparallelism處理器提供指令級并行性支持能力的度量GovernedbynumberofparallelpipelinesE.g.LoadR1R2(23) AddR3R3,”1”AddR3R3,”1” AddR4R3,R2AddR4R4,R2 Store[R4]R0InstructionIssuePolicy(指令發(fā)射策略)Orderinwhichinstructionsarefetched取指令的順序Orderinwhichinstructionsareexecuted指令執(zhí)行的順序Orderinwhichinstructionschangeregistersandmemory指令改變寄存器和存儲器內容的順序In-OrderIssue
In-OrderCompletionIssueinstructionsintheordertheyoccurNotveryefficientMayfetch>1instructionInstructionsmuststallifnecessaryIn-OrderIssueIn-OrderCompletion(Diagram)In-OrderIssue
Out-of-OrderCompletionOutputdependencyR3:=R3+R5;(I1)R4:=R3+1;(I2)R3:=R5+1;(I3)I2dependsonresultofI1-datadependencyIfI3completesbeforeI1,theresultfromI1willbewrong-output(read-write)dependencyIn-OrderIssueOut-of-OrderCompletion(Diagram)Out-of-OrderIssue
Out-of-OrderCompletionDecoupledecodepipelinefromexecutionpipelineCancontinuetofetchanddecodeuntilthispipelineisfullWhenafunctionalunitbecomesavailableaninstructioncanbeexecutedSinceinstructionshavebeendecoded,processorcanlookaheadOut-of-OrderIssueOut-of-OrderCompletion(Diagram)AntidependencyWrite-writedependencyR3:=R3+R5;(I1)R4:=R3+1;(I2)R3:=R5+1;(I3)R7:=R3+R4;(I4)I3cannotcompletebeforeI2startsasI2needsavalueinR3andI3changesR3RegisterRenamingOutputandantidependenciesoccurbecauseregistercontentsmaynotreflectthecorrectorderingfromtheprogramMayresultinapipelinestallRegistersallocateddynamicallyi.e.registersarenotspecificallynamedRegisterRenamingexampleRegisterrenamingR3b:=R3a+R5a(I1)R4b:=R3b+1(I2)R3c:=R5a+1(I3)R7b:=R3c+R4b(I4)WithoutsubscriptreferstologicalregisterininstructionWithsubscriptishardwareregisterallocatedNoteR3aR3bR3cMachineParallelismThreehardwaretechniquesDuplicationofResourcesOutoforderissueRenamingFigure13.5showssimulationresultsNotworthduplicationfunctionswithoutregisterrenamingRegisterrenamingeliminatesantidependenciesandoutputdependenciesNeedinstructionwindowlargeenough(morethan8)BranchPrediction80486fetchesbothnextsequentialinstructionafterbranchandbranchtargetinstructionGivestwocycledelayifbranchtakenRISC-DelayedBranchCalculateresultofbranchbeforeunusableinstructionspre-fetchedAlwaysexecutesingleinstructionimmediatelyfollowingbranchKeepspipelinefullwhilefetchingnewinstructionstreamNotasgoodforsuperscalarMultipleinstructionsneedtoexecuteindelayslotInstructiondependenceproblemsReverttobranchpredictionSuperscalarExecutionSuperscalarImplementationSimultaneouslyfetchmultipleinstructionsLogictodeterminetruedependenciesinvolvingregistervaluesMechanismstocommunicatethesevaluesMechanismstoinitiatemultipleinstructionsinparallelResourcesforparallelexecutionofmultipleinstructionsMechanismsforcommittingprocessstateincorrectorderPentium480486-CISCPentium–somesuperscalarcomponentsTwoseparateintegerexecutionunitsPentiumPro–FullblownsuperscalarSubsequentmodelsrefine&enhancesuperscalardesignPentium4BlockDiagramPentium4OperationFetchinstructionsformmemoryinorderofstaticprogramTranslateinstructionintooneormorefixedlengthRISCinstructions(micro-operations)Executemicro-opsonsuperscalarpipelinemicro-opsmaybeexecutedoutoforderCommitresultsofmi
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025版土建項目施工人員勞動合同范本9篇
- 2025年倉儲果蔬存儲合同
- 2025年智能社區(qū)內新型消費體驗商鋪租賃合同2篇
- 2025年分銷代理合作模板書
- 2025年醫(yī)療支持服務合作協議
- 2025年主題公寓租賃協議
- 2025年危險品運輸報關報檢協議
- 2025年作品使用授權合同
- 2025版外墻內保溫系統(tǒng)施工與節(jié)能監(jiān)測合同3篇
- 2025版信用卡醫(yī)療借款服務協議3篇
- 安全常識課件
- 河北省石家莊市2023-2024學年高一上學期期末聯考化學試題(含答案)
- 小王子-英文原版
- 新版中國食物成分表
- 2024年山東省青島市中考生物試題(含答案)
- 河道綜合治理工程技術投標文件
- 專題24 短文填空 選詞填空 2024年中考英語真題分類匯編
- 再生障礙性貧血課件
- 產后抑郁癥的護理查房
- 2024年江蘇護理職業(yè)學院高職單招(英語/數學/語文)筆試歷年參考題庫含答案解析
- 電能質量與安全課件
評論
0/150
提交評論