版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
计算机中系统结构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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 胃食管反流防治:生活方式是基础
- 胰岛素注射操作中的5个易错点
- 《园艺产品营养与检测》课件-项目五园艺产品污染与预防
- 综招试题及详细答案揭秘
- 2026医学影像技术期末复习-医学免疫学(本医学影像技术)历年题库含答案详解
- 2026勘察设计注册土木工程师考试(港口与航道工程·专业基础)历年参考题库含答案详解
- 2026副高面审答辩-副高021面审答辩口腔医学历年题库含答案详解
- 2026副主任医师副高-儿童保健(副高)094历年题库含答案详解
- 2026初级卫生职称-初级技师-临床医学检验技术(士)代码:105历年参考题库含答案详解
- 审计相关试题及答案17
- 小学数学四年级《一亿有多大:从量感到数感》跨学科主题教学设计
- 中小企业管理技能与实务(第三版)全套课件 第1-9章 中小企业的创立-中小企业财务管理
- 《婴幼儿生理基础》全套教学课件
- 2026中国智能电网分布式能源消纳技术路线与经济性比较
- 急诊分级诊疗指南(2025年版)
- 山东省2026年普通高校招生(春季)统一考试数学试题答案
- 中国水利水电第九工程局有限公司2026届秋季招聘148人笔试历年难易错考点试卷带答案解析
- 2026年建筑行业安全事故案例反思与警示
- 2026年二建《水利水电工程实务》真题卷(附答案解析)
- 化工企业重大隐患自查表 AQ3067
- AutoCAD 2016机械制图案例教程
评论
0/150
提交评论