版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
计算机中系统结构AbstractionAbstractionistheartofgeneralizingaconceptorideafromaspecificinstanceLookatsamethingfromdifferentperspective,ignoreinternaldetailsAbstractioninComputerHardwareTransistor→Gate→SimpleCircuit→
ComplexCircuit→ComponentInthischapterwewillbestudyingthecomponentsthatmakeupacomputerTopdownviewofacomputerCOMPUTERARCHITECTURETherearemanydifferentcomputers: Multi-milliondollarsupercomputers Milliondollarmainframes Minicomputers Workstations Laptops Lessthan$100handheldpersonaldigitalassistantsAlthoughthepricetagsontheseandthespeed,capacity,andsoftwarediffersignificantly,theyMOSTarebasicallydesignedthesame.VONNEUMANNARCHITECTUREThereare3majorunitsinacomputertiedtogetherbybuses:1)Memory
Theunitthatstoresandretrievesinstructionsanddata.2)Processor:Theunitthathousestwoseparatecomponents:Thecontrolunit:Repeatsthefollowing3tasksrepeatedly Fetchesaninstructionfrommemory Decodestheinstruction ExecutestheinstructionThearithmetic/logicunit(ALU):Performsmathematicalandlogicaloperations.3)Input/Output(I/O)Units:Handlescommunicationwiththeoutsideworld.VonNeumannArchitecture Thearchitectureisnamedafterthemathematician,JohnVonNeumann,whosupposedlyproposedstoringinstructionsinthememoryofacomputerandusingacontrolunittohandlethefetch-decode-executecycle: fetchaninstruction decodetheinstruction executetheinstructionInterestingly,asimilararchitecturewasproposedin1830byCharlesBabbageforhisAnalyticEngine:ALU millmemory storecontrolunit operator(processcardsstoringinstructions)I/Ounits output(typewriter)PortionofthemilloftheAnalyticalEnginewithprintingmechanism,underconstructionatthetimeofBabbage’sdeath.©ScienceMuseum/Science&SocietyPictureLibraryProcessorPictorialViewof
ComputerOrganizationMemoryControlUnitALUInput/OutputFlowofInformationThepartsareconnectedtooneanotherbyacollectionofwirescalledabusFigure
5.2DataflowthroughavonNeumannarchitectureProcessorTHEUNITSOFACOMPUTER
(Notethis
MODIFIESFigure5.18onpage220TheLabSimulatorAfterLoadingaProgramRAMandROMRAMstandsforRandomAccessMemoryInherentintheideaofbeingabletoaccesseachlocationistheabilitytochangethecontentsofeachlocationROMstandsforReadOnlyMemoryThecontentsinlocationsinROMcannotbechangedRAMisvolatile,ROMisnotThismeansthatRAMdoesnotretainitsbitconfigurationwhenthepoweristurnedoff,
butROMdoesMEMORYUNIT
(orRAM-RandomAccessMemory)Eachcellhasanaddress,startingat0andincreasingby1foreachcell.Acellwithalowaddressisjustasaccessibleasonewithahighaddress-hencethenameRAM.Thewidthofthecelldetermineshowmanybitscanbereadorwritteninonemachineoperation&isnormallyapower2AcellistypicallyabytetodayMemoryMemoryisacollectionofcells,
eachwithauniquephysicaladdressThesizeofacellisnormallyapowerof2,typicallyabytetoday.MemoryAcellisthesmallestaddressableunitofmemory–i.e.onecellcanbereadfrommemoryoronecellcanbewrittenintomemory,butnothingsmaller.WhatisaRegister?Datacanbemovedintoandoutofregistersfasterthanfrommemory.Ifwecouldreplaceallofmemorywithregisters,wecouldproduceavery,veryfastcomputer...But,thepricewouldbeterriblyprohibitive.Mostcomputershavequiteafewregistersthatservedifferentpurposes.We’llseehowtheMARandtheMDRareused.AnotherTypeofMemory:CacheCachespeedisfasterthanmainmemoryandslowerthanregisters.Ourlabsimulatorwillnotuseanycachememory,butcomputerstodaydouseit.Tospeedupretrievalsfrommemory,itemsareprefetchedintocachememoryandthen,whenneededbytheCPU,theyareretrievedfromcachememoryratherthanmemory.However,tokeepthingssimple,we’llassumefetcheswilloccurfrommainmemory.THEUNITSOFACOMPUTERMEMORY: Storesandretrievesinstructionsanddata. WesawinChapter4thatnumbersandcharacters(thedata)canberepresentedinbinaryformats. Instructionsarealsorepresentedinbinaryform:Differentcomputersusedifferentinstructionsetsandformats.Wewilluseaverysimple,genericformatforwhatiscalleda1-address
machine:addressof12bitsopcodeof4bitsOthermachinesuse2-address,3-address,andmixedformatinstructions.A2-addressmemorywillbediscussedlater.OPCODES(i.e.1-AddressOperationCodes)
REF:221,Fig5.19ArithmeticOpCodes0000load0001store0010clear0011add0100increment0101subtract0110decrementI/0OpCodes1101in1110outLogic/ControlOpCodes0111compare1000jump1001jumpgt1010jumpeq1011jumplt1100jumpneq1111haltWewillseehowtheseareusedlater.STRUCTUREOFRANDOMACCESSORMAINMEMORYMemory1bitaddresses:
012•••2N-1
•••MAR-NbitsonememorycellWbitswideMemoryAddressRegisterMemoryDataRegisterMDR-kWbitsALLACOMPUTERDOESIS...Repeatforever(oruntilyoupulltheplugorthesystemcrashes)1)FETCH2)DECODE3)EXECUTESOMESIZESDICTATEDBYTHESTRUCTUREOFMAINMEMORYWithourinstructionhavingtheformof 4bitsfortheopcode 12bitsfortheaddressifweplantohaveoneinstructionpermemorycell,thenweneedtohaveforourcomputerAnMAR(memoryaddressregister)of12bits.Amemorysizeofatmost212=22*210=4KAmemorywidthof4+12=16bitsIfMDR(memorydataregister)is16bits,thenthelargestsizednumberis 01111111111111112=215-1=32,768.OTHERCOMPONENTSOFTHEMEMORYUNITBesidestheRandomAccessMemoryandtheMARandMDR,twoothercomponentsexist:1)Fetch/storecontroller:SendsasignaltoFetchorStore2)Memorydecodercircuits:(Ref,Chpt4,pg180-182)ANx2NdecoderhasNinputlinesand2Noutputlines.WhentheNinputlinesaresetto0sor1sandtheNvaluesareinterpretedasabinarynumber,theyrepresentallthenumbersbetween0and2N-1.Theoutputtothedecoderisa1onthelineidentifiedbythevalueoftheinputanda0onalltheotherlines.Example:011
0112=3sothelinelabeled3,the4thfromthetopoutputsa1andallotherlinesoutputa0.3x8decoderAdecoderselectsonelineforapulse,whentheinputlinesareinterpretedasabinarynumber.Whyisthisusefulforamemoryunit?USINGTHEDECODERCIRCUITTOSELECTMEMORYLOCATIONS01234567•••154x24decoder10111MAR0000THEDECODERCIRCUITCANBEBUILTFROMAND-OR-NOTGATESSeeFigure4.29onpage181fora2x4decodercircuit.Aswithallcircuits,tobuildadecoder, 1)Buildatruthtableforthecircuit(Forexample,fora3x8decoder,thereare8rows,3inputchoices,and8outputvalues). 2)Usethesum-of-productsalgorithmtofindtheBooleanexpressionforthetruthtable. 3)Buildthecircuit.Thedecodercircuitdoesn'tscalewelli.e.asthenumberofbitsintheMARincreases,thenumberofoutputlinesforthedecodergoesupexponentially.MostcomputerstodayhaveanMARof32bits.Thus,ifthememorywaslaidoutasweshowedit,wewouldneeda32x232decoder!Note232is22230=4GSomostmemoryisnot1dimensional,but2-dimensional(oreven3-dimensionalifbankedmemoryisused).2-DMEMORY0111MAR2x4decoder2x4decodercolumnsrowsNotethata4x16
decoderwasusedforthe1-Dmemory.Howdoesthememoryunitwork?Tracethefollowingoperation:
StoredataDinmemorylocation0.DD00D0DsDHowdoesthememoryunitwork?Tracethefollowingoperation:1)FetchdataDfrommemorylocation1.2)ObtainaninstructionIfrommemorylocation7.Howdoesthecomputerdistinguishbetween1)and2)above?Weneedtolookatthecontrolunitlater.1DfDIHowDoestheControlUnitWork?ControlUnitAControlUnitistheunitthathandlesthecentralworkofthecomputer.TherearetworegistersinthecontrolunitTheinstructionregister(IR)containstheinstructionthatisbeingexecutedTheprogramcounter(PC)containstheaddressofthenextinstructiontobeexecutedTheALUandthecontrolunittogetherarecalledeithertheProcessorCentralProcessingUnit(i.e.,CPU)HowDoestheControlUnitWork?ThePCholdstheaddressofthenextinstructiontobeexecuted.Whateverisstoredatthataddressisassumedtobeaninstruction.Oncetheinstructionisfetched,thePCisincremented.THECONTROLUNITPC+1
0011|addressIRinstructiondecoderenableaddline3Tracewhathappensduring fetch decode executeNote:ThePCisincrementedaftereachfetch.THEARITHMETIC-LOGICUNIT
(ALU)Thetextshowsmultipleregisterswhichistypical.However,weareworkingwitha1-addressmachinewhichhasasinglesystemregisterR.OtherregistersareattachedtotheALU.THEARITHMETIC/LOGICUNITRAL1AL2ALUcircuitsmultiplexorselectorlinesoutput(Inthelabyouwillseewherethiswillgo)Whatisamultiplexorandhowdoesitwork?GTEQLTconditioncoderegisterRegisterROtherregistersMULTIPLEXORCIRCUITmultiplexorcircuit2Ninputlines0122N-1NselectorlinesoutputInterprettheselectorlinesasabinarynumberA.TheoutputisthevalueonthelinenumberedAExample:multiplexorwithN=201Note:Amultiplexorisaswitch.ItshouldbeobviousthatamultiplexorcanbebuiltwithAND-OR-NOTgates.(seepage179)THECONDITIONCODEREGISTER
partoftheALUWhenevera COMPAREXcommandisexecuted,aconditioncode(whichisasinglebit)isset(toa1).ThesecodesareusedtocontrolJUMPcommands.GTissetifCON(X)>REQissetifCON(X)=RLTissetifCON(X)<RWhathappenswiththesequence: LOAD1 COMPARE2 JUMPGT51)ifaddress1holds15andaddress2holds12?2)ifaddress1holds12andaddress2holds15?ADDX
XDDADDXfALU1&ALU2EE+DEDE+DE+DLAST,BUTNOTLEAST,THEI/ODEVICESPictorially,theselookthesimplest,butinreality,theyformthemostdiversepartofacomputer.Includes:keyboards,monitors,joysticks,mice,tablets,lightpens,spaceballs,Input/OutputUnitsAninputunitisadevicethroughwhichdataandprogramsfromtheoutsideworldareenteredintothecomputerKeyboard,themouse,andscanningdevicesAnoutputunitisadevicethroughwhichresultsstoredinthecomputermemoryaremadeavailabletotheoutsideworldPrintersandvideodisplayterminalsI/OUNITSProcessorMemoryI/ObufferControl-logicI/0deviceEachdeviceisdifferent,butmostareinterruptdriven.ThismeanswhentheI/Odevicewantsattention,itsendsasignal(theinterrupt)totheCPU.NOWUSETHECOMPLETEARCHITECTURETOTRACETHEACTIONSTAKENFOREXECUTING
INXOUTXLOADXSTOREXINCREMENTXWealreadyhavedone:ADDXCOMPAREXJUMPXJUMPLTXINX
XDINXsDDOUTX
XDDOUTXfDLOADX
LOADXXDfDDSTOREX-youshouldbeabletodothisnowINCREMENTX
INCRXXDD+1COMPAREX
COMPXaswithotheropsfetchDDDSettheseaccordingtocompopJUMPX
JUMPXXJUMPLTX
IfLT=1,moveXtoPCTheJumpCommands
Allowustoconstructbranchesandloopsaswewillsee.TheirpurposeistochangethePC–programcounterJUMPX–alwayschangePCtoaddressXJUMPGTX–changePCtoaddressXifandonlyifGT=1JUMPEQX-changePCtoaddressXifandonlyifEQ=1JUMPLTX-changePCtoaddressXifandonlyifLT=1JUMPNEQX-changePCtoaddressXifandonlyifEQ=0SecondaryStorageDevicesBecausemostofmainmemoryisvolatileandlimited,itisessentialthattherebeothertypesofstoragedeviceswhereprogramsanddatacanbestoredwhentheyarenolongerbeingprocessedSecondarystoragedevicescanbeinstalledwithinthecomputerboxatthefactoryoraddedlaterasneededMagneticTapeThefirsttrulymassauxiliarystoragedevicewasthemagnetictapedriveAmagnetictapeCompactDisksACDdriveusesalasertoreadinformationstoredopticallyonaplasticdiskCD-ROMisRead-OnlyMemoryDVDstandsforDigitalVersatileDiskAreAllArchitecturesthevonNeumannArchitecture?No.OneofthebottlenecksinthevonNeumanArchitectureisthefetch-decode-executecycle.Withonlyoneprocessor,thatcycleisdifficulttospeedup.I/Ohasbeendoneinparallelformanyyears.WhyhaveaCPUwaitforthetransferofdatabetweenthememoryandtheI/Odevices?Mostcomputerstodayalsomultitask–theymakeitappearthatmultipletasksarebeingperformedinparallel(wheninrealitytheyaren’taswe’llseewhenwelookatoperatingsystems).But,somecomputersdoallowmultipleprocessors.SynchronousprocessingOneapproachtoparallelismistohavemultipleprocessorsapplythesameprogramtomultipledatasetsFigure5.6ProcessorsinasynchronouscomputingenvironmentPipeliningArrangesprocessorsintandem,whereeachprocessorcontributesoneparttoanoverallcomputationFigure5.7ProcessorsinapipelineShared-MemorySharedMemoryProcessorProcessorProcessorProcessorLocalMemory1LocalMemory2LocalMemory3LocalMemory4Differentprocessorsdodifferentthingstodifferentdata.Ashared-memoryareaisusedforcommunication.ComparingVariousTypesofArchitecture
Typically,synchronouscomputershavefairlysimpleprocessorssotherecanbemanyofthem–inthethousands.OnehasbeenbuiltbyParacel(GeneMatcher)withover1Mprocessors.UsedbyCeleraincompletingthedescriptionofthehumangenomesequencingPipelinedcomputersareoftenusedforhighspeedarithmeticcalculationsasthesepipelineeasily.Shared-memorycomputersbasicallyconfigureindependentcomputerst
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025-2026学年苏科版小学信息技术四年级下册第八单元《数据安全保护》综合测试卷及答案
- 临床术中低体温患者护理
- 年度市农机化工作总结及下一年度工作计划
- 导游工作计划书
- 城市轨道交通运营管理电子教案4-2 车站行车组织管理
- 校园、培训机构从业人员及家庭无监护人学生排查登记表
- 2025年人工智能伦理评估学习体系构建
- 学校地质灾害隐患排查表
- 特殊科室护理质量标准解读
- 气管吸痰的气道评估方法
- 2025年东莞市招聘事业编制教职员笔试真题附答案
- (新教材)2026年人教版一年级下册数学 七 复习与关联 第3课时 图形的认识 课件
- 光伏自投合同范本
- 设计师分享大会
- 基于人工智能的糖尿病处方审核系统
- 2026年外国人在中国永久居留资格申请服务合同
- 齐商银行笔试题库及答案
- DB31T+1545-2025卫生健康数据分类分级要求
- 婺安安全生产培训课件
- 《环境设计制图》全套教学课件
- 安全生产培训学校申请书范文
评论
0/150
提交评论