




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
WilliamStallings
ComputerOrganization
andArchitecture
7thEditionChapter13ReducedInstructionSetComputers1Chapter13
ReducedInstructionSetComputersKeytermsCISCcomplexinstructionsetcomputerRISCreducedinstructionsetcomputerDelayedbranchDelayedloadHLLhigh-levellanguageRegisterfileRegisterwindowSPARC2MajorAdvancesinComputers(1)ThefamilyconceptIBMSystem/3601964DECPDP-8SeparatesarchitecturefromimplementationMicroporgrammedcontrolunitIdeabyWilkes1951ProducedbyIBMS/3601964CachememoryIBMS/360model8519693MajorAdvancesinComputers(2)SolidStateRAM(Seememorynotes)MicroprocessorsIntel40041971PipeliningIntroducesparallelismintofetchexecutecycleMultipleprocessors4TheNextStep-RISCReducedInstructionSetComputerKeyfeaturesLargenumberofgeneralpurposeregistersoruseofcompilertechnologytooptimizeregisteruseLimitedandsimpleinstructionsetEmphasisonoptimisingtheinstructionpipeline5Comparisonofprocessors6DrivingforceforCISCSoftwarecostsfarexceedhardwarecostsIncreasinglycomplexhighlevellanguagesSemanticgapLeadsto:LargeinstructionsetsMoreaddressingmodesHardwareimplementationsofHLLstatementse.g.CASE(switch)onVAXSemantic:语义的;语义学的
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.内容,所含之物(contents)2.继续的;不断的;连续的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
(开发)Smallerprograms?Programtakesuplessmemorybut…MemoryisnowcheapMaynotoccupylessbits,justlookshorterinsymbolicformMoreinstructionsrequirelongerop-codesRegisterreferencesrequirefewerbits
dispute
英音:[di‘spju:t]争论;争执
simplification
1.单纯化2.简单化31WhyCISC(2)?Fasterprograms?BiastowardsuseofsimplerinstructionsMorecomplexcontrolunitMicroprogramcontrolstorelargerthussimpleinstructionstakelongertoexecuteItisfarfromclearthatCISCistheappropriatesolution
Bias倾向,趋势32RISCCharacteristicsOneinstructionpercycleRegistertoregisteroperationsFew,simpleaddressingmodesFew,simpleinstructionformatsHardwireddesign(nomicrocode)FixedinstructionformatMorecompiletime/effort33RISCvCISCNotclearcutManydesignsborrowfrombothphilosophiese.g.PowerPCandPentiumIIphilosophies
哲学;观点34RISCPipeliningMostinstructionsareregistertoregisterTwophasesofexecutionI:InstructionfetchE:ExecuteALUoperationwithregisterinputandoutputForloadandstoreI:InstructionfetchE:ExecuteCalculatememoryaddressD:MemoryRegistertomemoryormemorytoregisteroperation35Figure13.6cFigure13.6c,threeinstructionscanbeoverlapped,andtheimprovementisasmuchasafactorof3.I36Figure13.6dE1:RegisterfilereadE2:ALUoperationandregisterwriteI37EffectsofPipelining38OptimizationofPipeliningDelayedbranchDelayedLoadLoopUnrollingunroll
展开,打开(卷着的东西)39OptimizationofPipelining
(1)LoopUnrollingReplicatebodyofloopanumberoftimesIterateloopfewertimesReducesloopoverheadIncreasesinstructionparallelismImprovedregister,datacacheorTLBlocality
unroll
展开,打开(卷着的东西)
replicate
英音:[‘replikeit]折叠;复制
iterate
英音:['itəreit]反复,重复
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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 医疗器械生产质量管理预案
- 三农产品种养殖技术培训手册
- 基于“互联网+医院-家庭”双向联动模式在冠心病PCI术后患者康复中的应用分析
- 6 飞向蓝天的恐龙 教学设计-2023-2024学年语文四年级下册统编版
- 5《协商决定班级事务》第一课时(教学设计)2024-2025学年统编版道德与法治五年级上册
- 共享办公空间运营与管理预案
- 拒绝校园欺凌守护美好青春
- 5 多样的栖息地 教学设计-2023-2024学年六年级下册科学苏教版
- 专业建筑室内设计合作协议
- 某县污水管网施工组织设计方案
- 2024年江西省中考地理试题(原卷版+解析版)
- 城市农贸市场摊位租赁合同
- CHT 1024-2011 影像控制测量成果质量检验技术规程(正式版)
- 新概念英语第二册-Lesson18-同步习题含答案
- 2024年3月江苏海洋大学招考聘用专职辅导员和工作人员5人笔试参考题库附带答案详解
- 《公路桥涵养护规范》(JTG5120-2021)
- 东来顺牛羊肉培训
- 中考百日誓师大会-百日冲刺决战中考-2024年中考百日誓师大会(课件)
- 非线粒体氧化体系讲解课件
- 打铁花非物质文化遗产
- 初中八年级语文课件-桃花源记 全国公开课一等奖
评论
0/150
提交评论