版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
計算機組成原理
雙語教學(xué)課件WilliamStallings
ComputerOrganization
andArchitecture
6thEditionChapter
7Input/OutputInput/OutputProblemsWidevarietyofperipheralsDeliveringdifferentamountsofdataAtdifferentspeedsIndifferentformatsAllslowerthanCPUandRAMNeedI/OmodulesInput/OutputModuleInterfacetoCPUandMemoryInterfacetooneormoreperipheralsGenericModelofI/OModuleExternalDevicesHumanreadableScreen,printer,keyboardMachinereadableMonitoringandcontrolCommunicationModemNetworkInterfaceCard(NIC)ExternalDeviceBlockDiagramTypicalI/ODataRatesI/OModuleFunctionControl&TimingCPUCommunicationDeviceCommunicationDataBufferingErrorDetectionI/OStepse.g.ReadfrominputmoduleCPUchecksI/OmoduledevicestatusI/OmodulepreparesstatusforCPUtofetchIfthestatusisready,CPUrequestsdatatransferI/OmodulegetsdatafromdeviceCPUfetchesdatafromI/OmoduleVariationsforoutput,…I/OModuleDiagramI/OModuleDecisionsHideorrevealdevicepropertiestoCPUSupportmultipleorsingledeviceControldevicefunctionsorleaveforCPUAlsoO/Sdecisionse.g.UnixtreatseverythingitcanasafileInputOutputTechniquesProgrammedInterruptdrivenDirectMemoryAccess(DMA)ProgrammedI/OCPUhasdirectcontroloverI/OSensingstatusRead/writecommandsTransferringdataCPUwaitsforI/OmoduletocompleteoperationWastesCPUtimeProgrammedI/O-detailCPUrequestsI/OoperationI/OmoduleperformsoperationI/OmodulesetsstatusbitsCPUchecksstatusbitsperiodicallyI/OmoduledoesnotinformCPUdirectlyI/OmoduledoesnotinterruptCPUCPUmaywaitorcomebacklaterProgramI/OblockofdataPAGE206
IssuereadcommandtoI/OmoduleReadstatusofI/OmoduleCheckstatusReadwordfromI/OmoduleWritewordintomemoryDone?Nextinstruction
yesNoNoreadyreadyCPU->I/OI/O->CPUErrorConditionI/O->CPUCPU->MEMORYI/OCommandsCPUissuesaddressIdentifiesmodule(&deviceif>1permodule)CPUissuescommandControl-tellingmodulewhattodoe.g.spinupdiskTest-checkstatuse.g.power?Error?Read/WriteModuletransfersdataviabufferfrom/todeviceAddressingI/ODevicesUnderprogrammedI/Odatatransferisverylikememoryaccess(CPUviewpoint)EachdevicegivenuniqueidentifierCPUcommandscontainidentifier(address)I/OMappingMemorymappedI/ODevicesandmemoryshareanaddressspaceI/Olooksjustlikememoryread/writeNospecialcommandsforI/OLargeselectionofmemoryaccesscommandsavailableIsolatedI/OSeparateaddressspacesNeedI/OormemoryselectlinesSpecialcommandsforI/OLimitedset§7.4InterruptDrivenI/OPAGE208OvercomesCPUwaitingNorepeatedCPUcheckingofdeviceI/OmoduleinterruptswhenreadyTransferofControlviaInterruptspage61suspendingresumingbranchingprocessingInterrupt-drivenI/OblockofdataPAGE208
IssuereadcommandtoI/OmoduleReadstatusofI/OmoduleCheckstatusReadwordfromI/OmoduleWritewordintomemoryDone?Nextinstruction
yesNoreadyCPU->I/OI/O->CPUErrorConditionI/O->CPUCPU->MEMORYDosomethingelseinterruptSimpleinterruptprocessing
Hardware
softwareISRDevicecontrollerorothersystemhardwareissueaninterruptProcessorfinishesexecutionofcurrentinstructionProcessorsignalsacknowledgmentofinterruptProcessorpushesPSW&PContocontrolstackProcessorloadsnewPCvaluebasedoninterruptSaveremainderofprocessstateinformationProcessinterruptRestoreprocessstateinformationRestoreoldPSW&PCInterruptDrivenI/O
BasicOperationCPUissuesreadcommandI/OmodulegetsdatafromperipheralwhilstCPUdoesotherworkI/OmoduleinterruptsCPUCPUrequestsdataCPUfetchesdatafromI/OmoduleCPUViewpointIssuereadcommandDootherworkCheckforinterruptatendofeachinstructioncycleIfinterrupted:-Savecontext(registers)ProcessinterruptFetchdata&storeSeeOperatingSystemsnotesInterruptprocessing(1)0.CPUdoessomethingelse….1.ThedeviceissuesaninterruptsignaltoCPU2.TheCPUfinishesexecutionofthecurrentinstructionbeforerespondingtotheinterrupt3.TheCPUtestsfor&makessureofaninterrupt,andsendsanacknowledgesignaltodevice(allowsthedevicetoremoveitsinterruptsignal&tosendsinterruptnumbertoCPU)4.TheCPUsavesinformationofcurrentprogramtostackforresumingit.TheimportantinformationisPSW(runningstatusofcurrentprogram)&PC(theaddressofnextinstruction)Interruptprocessing(2)5.TheCPUloadsPCwiththeentrylocationofISR(InterruptServiceRoutine)whichrespondstothisinterrupt.TheCPUmustdeterminetheenterlocation(startaddress)ofISRbysomemethodbasedoninterruptnumber.AboveiscompletedbyHARDWAREintheinterruptcycle.FollowingiscompletedbySOFTWARE(ISR)6.TheCPUbeginstoexecutetheinstructionsofISR.Itsavestheremainder(thecontextofsomeregisters)ofprogram-interruptedontostackforresuming….(e.g.ACcontainsthesumofaddition…..)Interruptprocessing(3)7.TheCPUexecutesinstructionsofISRtoprocessinterrupt:testsstatusofdevice,fetchesdatafromthedevice,storesdatatomemory,….(orfetchesdataformmemory,sendsdatatodevice).8.Afterservice,theCPUpreparestoresumetheprogram-interrupted,CPUretrievestheremainderfromstack&restoresthemtoregisters.9.TheCPUexecutesthelastinstructionRETI(meansreturnfrominterrupt),theprocessingisrestoringPSW&PCfromstack.Interruptprocessing(4)10.Theinstructioncycle,theCPUfetchestheinstructionofprogram-interruptedbyPC&resumestheprogram-interrupted.DesignIssuesHowdoyouidentifythemoduleissuingtheinterrupt?Howdoyoudealwithmultipleinterrupts?i.e.aninterrupthandlerbeinginterruptedIdentifyingInterruptingModule(1)DifferentlineforeachmodulePCLimitsnumberofdevicesSoftwarepollCPUaskseachmoduleinturnSlowIdentifyingInterruptingModule(2)DaisyChainorHardwarepollInterruptAcknowledgesentdownachainModuleresponsibleplacesvectoronbusCPUusesvectortoidentifyhandlerroutineBusMasterModulemustclaimthebusbeforeitcanraiseinterrupte.g.PCI&SCSIMultipleInterruptsEachinterruptlinehasapriorityHigherprioritylinescaninterruptlowerprioritylinesIfbusmasteringonlycurrentmastercaninterruptExample-PCBus80x86hasoneinterruptline8086basedsystemsuseone8259Ainterruptcontroller8259Ahas8interruptlinesSequenceofEvents8259Aacceptsinterrupts8259Adeterminespriority8259Asignals8086(raisesINTRline)CPUAcknowledges8259AputscorrectvectorondatabusCPUprocessesinterruptISABusInterruptSystemISAbuschainstwo8259AstogetherLinkisviainterrupt2Gives15lines16lineslessoneforlinkIRQ9isusedtore-routeanythingtryingtouseIRQ2BackwardscompatibilityIncorporatedinchipset82C59AInterrupt
ControllerIntel82C55A
ProgrammablePeripheralInterfaceUsing82C55AToControlKeyboard/Display§7.5DirectMemoryAccesspage216InterruptdrivenandprogrammedI/OrequireactiveCPUinterventionTransferrateislimitedCPUistiedupDMAistheanswerDMAFunctionAdditionalModule(hardware)onbusDMAcontrollertakesoverfromCPUforI/ODMAModuleDiagramDMAOperationCPUtellsDMAcontroller:Read/WriteDeviceaddressStartingaddressofmemoryblockfordataAmountofdatatobetransferredCPUcarriesonwithotherworkDMAcontrollerdealswithtransferDMAcontrollersendsinterruptwhenfinishedDMATransfer
CycleStealingDMAcontrollertakesoverbusforacycleTransferofonewordofdataNotaninterruptCPUdoesnotswitchcontextCPUsuspendedjustbeforeitaccessesbusi.e.beforeanoperandordatafetchoradatawriteSlowsdownCPUbutnotasmuchasCPUdoingtransferAsideWhateffectdoescachingmemoryhaveonDMA?Hint:howmucharethesystembusesavailable?DMAConfigurations(1)SingleBus,DetachedDMAcontrollerEachtransferusesbustwiceI/OtoDMAthenDMAtomemoryCPUissuspendedtwiceDMAConfigurations(2)SingleBus,IntegratedDMAcontrollerControllermaysupport>1deviceEachtransferusesbusonceDMAtomemoryCPUissuspendedonceDMAConfigurations(3)SeparateI/OBusBussupportsallDMAenableddevicesEachtransferusesbusonceDMAtomemoryCPUissuspendedonceI/OChannelsI/Odevicesgettingmoresophisticatede.g.3DgraphicscardsCPUinstructsI/OcontrollertodotransferI/OcontrollerdoesentiretransferImprovesspeedTakesloadoffCPUDedicatedprocessorisfasterI/OChannelArchitectureInterfacingConnectingdevicestogetherBitofwire?Dedicatedprocessor/memory/buses?E.g.FireWire,InfiniBandIEEE1394FireWireHighperformanceserialbusFastLowcostEasytoimplementAlsobeingusedindigitalcameras,VCRsandTVFireWireConfigurationDaisychainUpto63devicesonsingleportReally64ofwhichoneistheinterfaceitselfUpto1022busescanbeconnectedwithbridgesAutomaticconfigurationNobusterminatorsMaybetreestructureSimpleFireWireConfigurationFireWire3LayerStackPhysicalTransmissionmedium,electricalandsignalingcharacteristicsLinkTransmissionofdatainpacketsTransactionRequest-responseprotocolFireWireProtocolStackFireWire-PhysicalLayerDataratesfrom25to400MbpsTwoformsofarbitrationBasedontreestructureRootactsasarbiterFirstcomefirstservedNaturalprioritycontrolssimultaneousrequestsi.e.whoisnearesttorootFairarbitrationUrgentarbitrationFireWire-LinkLayerTwotransmissiontypesAsynchronousVariableamountofdataandseveralbytesoftransactiondatatransferredasapacketToexplicitaddressAcknowledgementreturnedIsochronousVariableamountofdatainsequenceoffixedsizepacketsatregularintervalsSimplifiedaddressingNoacknowledgementFireWireSubactionsInfiniBand
溫馨提示
- 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)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2026四川涼山州雷波縣糧油貿(mào)易總公司面向社會招聘6人筆試備考試題及答案解析
- 2026年河北承德醫(yī)學(xué)院公開選聘工作人員25名筆試備考題庫及答案解析
- 2026上半年貴州事業(yè)單位聯(lián)考遵義市招聘329人考試備考試題及答案解析
- 2026年鄉(xiāng)村旅游開發(fā)實務(wù)培訓(xùn)
- 2026年大慶市中醫(yī)醫(yī)院招聘4人考試參考題庫及答案解析
- 2026年AI數(shù)據(jù)標注質(zhì)量控制培訓(xùn)
- 2026年水泥廠粉塵治理操作規(guī)范
- 2026年礦山爆破安全距離管理
- 2026年電競賽事執(zhí)行管理培訓(xùn)
- 2026年康復(fù)輔具適配技術(shù)培訓(xùn)
- 北京市順義區(qū)2025-2026學(xué)年八年級上學(xué)期期末考試英語試題(原卷版+解析版)
- 英語A級常用詞匯
- (二調(diào))武漢市2025屆高中畢業(yè)生二月調(diào)研考試 英語試卷(含標準答案)+聽力音頻
- 福建省龍巖市2024-2025學(xué)年高一上學(xué)期期末考試物理試卷(含答案)
- 汽車修理廠輪胎采購 投標方案(技術(shù)標 )
- 2023年7月浙江省普通高中學(xué)業(yè)水平考試(學(xué)考)化學(xué)試題
- DB3301-T 0461-2024 電動自行車停放充電場所消防安全管理規(guī)
- 小兒支氣管炎護理課件
- NB-T 47013.15-2021 承壓設(shè)備無損檢測 第15部分:相控陣超聲檢測
- 打針協(xié)議免責(zé)書
- 四川省成都市八年級上學(xué)期物理期末考試試卷及答案
評論
0/150
提交評論