




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
WilliamStallings
ComputerOrganization
andArchitecture
7thEditionChapter13ReducedInstructionSetComputers1Chapter13
ReducedInstructionSetComputersKeytermsCISCcomplexinstructionsetcomputerRISCreducedinstructionsetcomputerDelayedbranchDelayedloadHLLhigh-levellanguageRegisterfileRegisterwindowSPARC2MajorAdvancesinComputers(1)ThefamilyconceptIBMSystem/3601964DECPDP-8SeparatesarchitecturefromimplementationMicroporgrammedcontrolunitIdeabyWilkes1951ProducedbyIBMS/3601964CachememoryIBMS/360model8519693MajorAdvancesinComputers(2)SolidStateRAM(Seememorynotes)MicroprocessorsIntel40041971PipeliningIntroducesparallelismintofetchexecutecycleMultipleprocessors4TheNextStep-RISCReducedInstructionSetComputerKeyfeaturesLargenumberofgeneralpurposeregistersoruseofcompilertechnologytooptimizeregisteruseLimitedandsimpleinstructionsetEmphasisonoptimisingtheinstructionpipeline5Comparisonofprocessors6DrivingforceforCISCSoftwarecostsfarexceedhardwarecostsIncreasinglycomplexhighlevellanguagesSemanticgapLeadsto:LargeinstructionsetsMoreaddressingmodesHardwareimplementationsofHLLstatementse.g.CASE(switch)onVAXSemantic:語義的;語義學(xué)的
Gap英音:[g?p]豁口,裂口
7IntentionofCISCEasecompilerwritingImproveexecutionefficiencyComplexoperationsinmicrocodeSupportmorecomplexHLLsease減輕
HLL
縮寫詞abbr.
high-levellanguage【電腦】高級語言8ExecutionCharacteristicsOperationsperformedOperandsusedExecutionsequencingStudieshavebeendonebasedonprogramswritteninHLLsDynamicstudiesaremeasuredduringtheexecutionoftheprogram9OperationsAssignmentsMovementofdataConditionalstatements(IF,LOOP)SequencecontrolProcedurecall-returnisverytimeconsumingSomeHLLinstructionleadtomanymachinecodeoperationsAssignment
分配;指派,選派10WeightedRelativeDynamicFrequencyofHLLOperations[PATT82a]
DynamicOccurrenceMachine-InstructionWeightedMemory-ReferenceWeighted
PascalCPascalCPascalCASSIGN45%38%13%13%14%15%LOOP5%3%42%32%33%26%CALL15%12%31%33%44%45%IF29%43%11%21%7%13%GOTO—3%————OTHER6%1%3%1%2%1%11OperandsMainlylocalscalarvariablesOptimisationshouldconcentrateonaccessinglocalvariables
PascalCAverageIntegerConstant16%23%20%ScalarVariable58%53%55%Array/Structure26%24%25%12ProcedureCallsVerytimeconsumingDependsonnumberofparameterspassedDependsonlevelofnestingMostprogramsdonotdoalotofcallsfollowedbylotsofreturnsMostvariablesarelocal(c.f.localityofreference)13ImplicationsBestsupportisgivenbyoptimisingmostusedandmosttimeconsumingfeaturesLargenumberofregistersOperandreferencingCarefuldesignofpipelinesBranchpredictionetc.Simplified(reduced)instructionset14LargeRegisterFileSoftwaresolutionRequirecompilertoallocateregistersAllocatebasedonmostusedvariablesinagiventimeRequiressophisticatedprogramanalysisHardwaresolutionHavemoreregistersThusmorevariableswillbeinregisters15RegistersforLocalVariablesStorelocalscalarvariablesinregistersReducesmemoryaccessEveryprocedure(function)callchangeslocalityParametersmustbepassedResultsmustbereturnedVariablesfromcallingprogramsmustberestored16RegisterWindowsOnlyfewparametersLimitedrangeofdepthofcallUsemultiplesmallsetsofregistersCallsswitchtoadifferentsetofregistersReturnsswitchbacktoapreviouslyusedsetofregisters17RegisterWindowscont.ThreeareaswithinaregistersetParameterregistersLocalregistersTemporaryregistersTemporaryregistersfromonesetoverlapparameterregistersfromthenextThisallowsparameterpassingwithoutmovingdatacont.
1.內(nèi)容,所含之物(contents)2.繼續(xù)的;不斷的;連續(xù)的18OverlappingRegisterWindows……19CircularBufferdiagram主程序1子程序A2子程序B3子程序C4子程序D5子程序E6子程序F7子程序G20OperationofCircularBufferWhenacallismade,acurrentwindowpointerismovedtoshowthecurrentlyactiveregisterwindowIfallwindowsareinuse,aninterruptisgeneratedandtheoldestwindow(theonefurthestbackinthecallnesting)issavedtomemoryAsavedwindowpointerindicateswherethenextsavedwindowsshouldrestoreto21GlobalVariablesAllocatedbythecompilertomemoryInefficientforfrequentlyaccessedvariablesHaveasetofregistersforglobalvariables22RegistersvCacheLargeRegisterFileCacheAlllocalscalarsRecently-usedlocalscalarsIndividualvariablesBlocksofmemoryCompiler-assignedglobalvariablesRecently-usedglobalvariablesSave/RestorebasedonprocedurenestingdepthSave/RestorebasedoncachereplacementalgorithmRegisteraddressingMemoryaddressing23ReferencingaScalar-
WindowBasedRegisterFile24ReferencingaScalar-Cache25ReferencingaScalar-
WindowBasedRegisterFile26CompilerBasedRegisterOptimizationAssumesmallnumberofregisters(16-32)OptimizinguseisuptocompilerHLLprogramshavenoexplicitreferencestoregistersusually-thinkaboutC-registerintAssignsymbolicorvirtualregistertoeachcandidatevariableMap(unlimited)symbolicregisterstorealregistersSymbolicregistersthatdonotoverlapcansharerealregistersIfyourunoutofrealregisterssomevariablesusememory27GraphColoringGivenagraphofnodesandedgesAssignacolortoeachnodeAdjacentnodeshavedifferentcolorsUseminimumnumberofcolorsNodesaresymbolicregistersTworegistersthatareliveinthesameprogramfragmentarejoinedbyanedgeTrytocolorthegraphwithn
colors,wherenisthenumberofrealregistersNodesthatcannotbecoloredareplacedinmemory28GraphColoringApproach29GraphColoringApproach30WhyCISC(1)?Compilersimplification?
Disputed…ComplexmachineinstructionshardertoexploitOptimizationmoredifficult
(開發(fā))Smallerprograms?Programtakesuplessmemorybut…MemoryisnowcheapMaynotoccupylessbits,justlookshorterinsymbolicformMoreinstructionsrequirelongerop-codesRegisterreferencesrequirefewerbits
dispute
英音:[di‘spju:t]爭論;爭執(zhí)
simplification
1.單純化2.簡單化31WhyCISC(2)?Fasterprograms?BiastowardsuseofsimplerinstructionsMorecomplexcontrolunitMicroprogramcontrolstorelargerthussimpleinstructionstakelongertoexecuteItisfarfromclearthatCISCistheappropriatesolution
Bias傾向,趨勢32RISCCharacteristicsOneinstructionpercycleRegistertoregisteroperationsFew,simpleaddressingmodesFew,simpleinstructionformatsHardwireddesign(nomicrocode)FixedinstructionformatMorecompiletime/effort33RISCvCISCNotclearcutManydesignsborrowfrombothphilosophiese.g.PowerPCandPentiumIIphilosophies
哲學(xué);觀點(diǎn)34RISCPipeliningMostinstructionsareregistertoregisterTwophasesofexecutionI:InstructionfetchE:ExecuteALUoperationwithregisterinputandoutputForloadandstoreI:InstructionfetchE:ExecuteCalculatememoryaddressD:MemoryRegistertomemoryormemorytoregisteroperation35Figure13.6cFigure13.6c,threeinstructionscanbeoverlapped,andtheimprovementisasmuchasafactorof3.I36Figure13.6dE1:RegisterfilereadE2:ALUoperationandregisterwriteI37EffectsofPipelining38OptimizationofPipeliningDelayedbranchDelayedLoadLoopUnrollingunroll
展開,打開(卷著的東西)39OptimizationofPipelining
(1)LoopUnrollingReplicatebodyofloopanumberoftimesIterateloopfewertimesReducesloopoverheadIncreasesinstructionparallelismImprovedregister,datacacheorTLBlocality
unroll
展開,打開(卷著的東西)
replicate
英音:[‘replikeit]折疊;復(fù)制
iterate
英音:['it?reit]反復(fù),重復(fù)
overhead英音:[‘?uv?’hed]日常開支,額外開銷40OptimizationofPipelining
(2)DelayedbranchDoesnottakeeffectuntilafterexecutionoffollowinginstructionThisfollowinginstructionisthedelayslot41NormalandDelayedBranchAddressNormalBranchDelayedBranchOptimizedDelayedBranch100LOAD X,rALOAD X,rALOADX,rA101ADD 1,rAADD 1,rAJUMP 105102JUMP 105JUMP 106ADD 1,rA103ADD rA,rBNOOP
ADD rA,rB104SUB rC,rBADD rA,rBSUB rC,rB105STORErA,Z
SUB rC,rBSTORErA,Z
106
STORErA,Z
42UseofDelayed
BranchAddressNormalBranchDelayedBranchOptimizedDelayedBranch100LOAD X,rALOADX,rALOADX,rA101ADD1,rAADD1,rAJUMP105102JUMP105JUMP106ADD1,rA103ADDrA,rBNOOP ADDrA,rB104SUBrC,rBADDrA,rBSUBrC,rB105STORErA,Z
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 河北省2025屆高考語文一輪復(fù)習(xí)語言表達(dá)專題復(fù)習(xí)42教案
- 公租房轉(zhuǎn)讓合同范例
- 門禁一卡通施工方案
- 六年級語文上冊第一單元1開國大典第2課時教案北京版
- 修路拆遷合同范例
- 公司臨時雇傭合同范例
- 個人和勞務(wù)公司合同范例
- IP形象合同范例版
- 出租聚氨酯地坪合同范例
- 農(nóng)藥訂購合同范例
- 2024年江西省中考地理試題(原卷版+解析版)
- CHT 1024-2011 影像控制測量成果質(zhì)量檢驗(yàn)技術(shù)規(guī)程(正式版)
- 新概念英語第二冊-Lesson18-同步習(xí)題含答案
- 2024年3月江蘇海洋大學(xué)招考聘用專職輔導(dǎo)員和工作人員5人筆試參考題庫附帶答案詳解
- 東來順牛羊肉培訓(xùn)
- 中考百日誓師大會-百日沖刺決戰(zhàn)中考-2024年中考百日誓師大會(課件)
- 非線粒體氧化體系講解課件
- 初中八年級語文課件-桃花源記 全國公開課一等獎
- 《無人機(jī)操控技術(shù)》教案全套 1.1 無人機(jī)概述 -6.2 自動機(jī)場操控
- ISO27001標(biāo)準(zhǔn)培訓(xùn)課件
- 《審核員培訓(xùn)教程》課件
評論
0/150
提交評論