版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
ComputerOrganization&ArchitectureChapter13
ReducedInstructionSetComputersMajorAdvancesinComputersThefamilyconceptIBMSystem/360(1964),
andthenDECPDP-8SamearchitecturebutdifferentimplementationsMicroporgrammedcontrolunitIdeabyWilkes1951ProducedbyIBMS/3601964CachememoryIBMS/360model851969MicroprocessorsIntel40041971PipeliningIntroducesparallelismintofetchexecutecycleMultipleprocessorsTheNextStep-RISCWhatisRISCReducedInstructionSetComputerKeyfeaturesLargenumberofgeneralpurposeregistersoruseofcompilertechnologytooptimizeregisteruseLimitedandsimpleinstructionsetwithafixedformatEmphasisonoptimizingtheinstructionpipelineComparisonofprocessors13.1InstructionexecutioncharacteristicsDrivingforceforCISCSoftwarecostsfarexceedhardwarecostsIncreasinglycomplexhighlevellanguages(HLL)SemanticgapLeadstoLargeinstructionsetsMoreaddressingmodesHardwareimplementationsofHLLstatementsIntentionofCISCEasecompilerwritingImproveexecutionefficiencyComplexoperationsinmicrocodeSupportmorecomplexHLLsExecutionCharacteristicsOperationsperformedOperandsusedExecutionsequencingStudieshavebeendonebasedonprogramswritteninHLLsDynamicstudiesaremeasuredduringtheexecutionoftheprogramOperationsAssignmentsMovementofdataConditionalstatements(IF,LOOP)SequencecontrolProcedurecall-returnisverytimeconsumingSomeHLLinstructionleadtomanymachinecodeoperationsOperandsMainlylocalscalarvariablesOptimisationshouldconcentrateonaccessinglocalvariablesProcedureCallsVerytimeconsumingDependsonnumberofparameterspassedDependsonlevelofnestingThenumberofwordsusedbyperprocedurecallisnotlargeMostvariablesarelocalMostprogramsdonotdoalotofcallsfollowedbylotsofreturns(c.f.localityofreference)ImplicationsBestsupportisgivenbyoptimisingmostusedandmosttimeconsumingfeaturesLargenumberofregistersOperandreferencingCarefuldesignofpipelinesBranchpredictionetc.Simplified(reduced)instructionset13.2TheuseofalargeregisterfileRegisterFeatures:Fasterthancache,memoryShorteraddressNearCPUSoftwaresolutionRequirecompilertoallocateregistersAllocatebasedonmostusedvariablesinagiventimeRequiressophisticatedprogramanalysisHardwaresolutionHavemoreregistersThusmorevariableswillbeinregistersRegistersforLocalVariablesStorelocalscalarvariablesinregistersReducesmemoryaccessEveryprocedure(function)callchangeslocalityParametersmustbepassedResultsmustbereturnedVariablesfromcallingprogramsmustbestoredtoregistersRegisterWindowsTypically,
aprocedureemploys:OnlyfewparametersandlocalvariablesLimitedrangeofdepthofcallUsemultiplesmallsetsofregisters,eachassignedtoadifferentprocedureawindowforaprocedureCallsswitchtoadifferentsetofregisters,
ratherthansavingcontentsofregistersintomemoryWindowsforadjacentproceduresareoverlappedtoallowparameterpassingReturnsswitchbacktoapreviouslyusedsetofregisters
OverlappingRegisterWindowsRegisterWindowsContents.ThreeareaswithinaregistersetParameterregistersLocalregistersTemporaryregistersTemporaryregistersfromonesetoverlapparameterregistersfromthenextThisallowsparameterpassingwithoutmovingdataCircular-BufferOrganizationofOverlappedWindows
OperationofCircularSetsofRegisterWhenacallismade,acurrentwindowpointerismovedtoshowthecurrentlyactiveregisterwindowIfallwindowsareinuse,aninterruptisgeneratedandtheoldestwindow(theonefurthestbackinthecallnesting)issavedtomemoryAsavedwindowpointerindicateswherethenextsavedwindowsshouldrestoretoN-windowscanholdonlyN-1procedurecalls.Typically,8windowsof16registerseachisadoptedBerkeleyRISCGlobalVariablesIfwedeclaresomevariablesasglobalinaHLL,atypicalmethodisAllocatedbythecompilertomemoryInefficientforfrequentlyaccessedvariablesTheotheristohaveasetofregistersforglobalvariablesDoitbycompilerLargeRegistersvCacheTheregisters,organizedintowindows,actasasmall,fastbufferforholdingasubsetofallvariablesFromthisviewpoint,theregistersetismuchlikeacacheWhoisbetter?FeatureCompareofRegisterSetAndCacheSpecificationsforRegisterSetAndCacheWindows-basedregistersarefaster,butcachemaymakemoreefficientuseofspace,becauseitisreactingtothesituationdynamicallyCachemaysufferfromanothersortofinefficiency:dataarereadintoinblock,someofwhichwillnotbeusedInregisterfile,usingmemoryisrelativelyin-frequently,setassociativecachewillsufferfromoverwritingusedvariablesRegisterfileisshorteraddressingmode,fasterthancacheIngeneral,registerfileissuperiorforvariables
ReferencingaScalar-WindowBasedRegisterFileReferencingaScalar-Cache
13.3CompilerBasedRegisterOptimizationLargeregistersetcanimproveperformanceofacomputer,howaboutasmallnumberofregisters?Assumesmallnumberofregisters(16-32)inRISC,wecanobtainahighperformancealsobyusingoptimizedregistersOptimizationisdonebytheRISCcompilerHowtoOptimize?HLLprogramshavenoexplicitreferencestoregistersusually-thinkaboutC-registerintAssignsymbolicorvirtualregistertoeachcandidatevariableMap(unlimited)symbolicregisterstorealregistersSymbolicregistersthatdonotoverlapcansharerealregistersIfyourunoutofrealregisterssomevariablesusememory,
andso,load-and-storeDRAMoperationsareminimizedRegistersOptimizationbasedonGraphColoringTheessenceoftheoptimizationistodecidewhichvariablescanuseregistersatanygivenpointinaprogramThetechniquemostcommonlyusedinRISCcompilerisgraphcoloringDefinition:givenagraphconsistingofnodesandedges,assigncolorstonodessuchthatadjacentnodeshavedifferentcolors,andthenumberofcolorsareminimized.Thenodesaresymbolicregisters,iftwosymbolicregistersare“live”duringthesameprogramfragment,theyarejoinedbyanedgetodepictinterferenceTrytocolorthegraphwithn
colors,wherenisthenumberofrealregistersColorsrepresentsthenumberofphysicalregistersThesamecolormeansthesameregisterIfthisprocessdoesnotfullysucceed,thenthosenodesthatcannotbecoloredmustbeplacedinmemory
ADGraphColoringApproach13.4ReducedinstructionsetarchitectureWhyCISC?Compilersimplification?Disputed…ComplexmachineinstructionshardertoexploitOptimizationmoredifficultSmallerprograms?Programtakesuplessmemorybut…MemoryisnowcheapMaynotoccupylessbits,justlookshorterinsymbolicformMoreinstructionsrequirelongerop-codesRegisterreferencesrequirefewerbitsFasterprograms?BiastowardsuseofsimplerinstructionsMorecomplexcontrolunitMicroprogramcontrolstorelargerthussimpleinstructionstakelongertoexecuteItisfarfromclearthatCISCistheappropriatesolutionRISCCharacteristicsOneinstructionpercycleRegistertoregisteroperationsFew,simpleaddressingmodesFew,simple,fixedinstructionformatsHardwireddesign(nomicrocode)EffectivelyinstructionpipeliningMoreresponsivetointerruptMorecompiletime/effortRISCvCISCNotclearcut,
fightingisstillgoingonManydesignsborrowfrombothphilosophiese.g.PowerPCandPentiumII13.5RISCPipeliningMostinstructionsareregistertoregisterTwophasesofexecutionI:InstructionfetchE:ExecuteForloadandstore,
threephasesarerequired:I:InstructionfetchE:ExecuteCalculatememoryaddressD:MemoryRegistertomemoryormemorytoregisteroperationTheEffectsofPipeliningOptimizationofPipelining2Concepts:DelayedbranchDoesnottakeeffectuntilafterexecutionoffollowinginstructionThisfollowinginstructionisthedelayslotNormal,DelayedandOptimizedBranch
Address
Normal
Delayed Optimized
100
LOADX,A
LOADX,A LOADX,A
101
ADD1,AADD1,A JUMP105
102
JUMP105
JUMP106 ADD1,A
103
ADDA,B NOOP
ADDA,B
104
SUBC,B
ADDA,B SUBC,B
105
STOREA,Z SUBC,B STOREA,Z
106 STOREA,Z
Use
of
DelayedBranch13.7SPARCSPARC(scalableprocessorarchitecture)AnprocessorarchitecturedefinedanddevelopedbySUNMachinewiththisprocessorrefersastoSPARCworkstationSPARC10,SPARC20SPARCRegisterSetUsingregisterwindows2~32windowsEachwindowhas24registersPhysicalregisters0~7areglobalregisterssharedbyallprocedures8registersareusedforparameterspassing8registersareusedforresultsreturning8localregistersareusedfortheprocedure
WindowInvalidMaskCurrentWindowPointer8RegistersWindowsinSPARCInstructionSetInSPARCset,mostofinstructionreferenceonlyregisteroperands,goodforahighproportionoflocalscalarsandconstantsRd
Rs1ops2ALUoperationsgroupedasfollows:Integeraddition(withorwithoutcarry)Integersubtraction(withorwithoutcarry)LogicalopShiftlogicorarithmeticSeetable13.12,noneedforrememberingDisplacementaddressingandsimpleaddressingmodes(seetable13.13)InstructionFormat32-bitinstructionformatAllbeginwith2-bitopcodeSomeinstructi
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年文安县网格员招聘笔试备考试题及答案解析
- 2026年佳县事业单位人员招聘考试参考题库及答案解析
- 2026年望都县网格员招聘考试参考题库及答案解析
- 2026年通化县中小学幼儿园教师招聘考试备考题库及答案解析
- 2026年绥宁县中小学幼儿园教师招聘笔试参考题库及答案解析
- 2026年石台县网格员招聘考试备考试题及答案解析
- 2026年寿县中小学幼儿园教师招聘笔试参考题库及答案解析
- 2026年依安县网格员招聘笔试备考题库及答案解析
- 2026中国室内外装修行业市场供需分析及投资评估规划分析研究报告
- 2026中国玉米行业市场投资机会及投资价值规划分析研究报告
- GB/T 22107-2025气动方向控制阀切换时间的测量
- 应急物流管理 课件 第四章 应急物资的需求预测与储备
- 光学课程电子教案
- 《网店客户服务》中职全套教学课件
- CRRT治疗剂量与处方剂量
- 代收代付合同协议
- 《煤炭工业露天矿工程建设项目可行性研究报告编制标准》
- 华为MA5800配置及调试手册
- 熊猫烧香病毒样本
- JCT564.1-2018 纤维增强硅酸钙板 第1部分:无石棉硅酸钙板
- 提高PICC导管维护规范率成果汇报
评论
0/150
提交评论