欢迎来到淘文阁 - 分享文档赚钱的网站! | 帮助中心 好文档才是您的得力助手!
淘文阁 - 分享文档赚钱的网站
全部分类
  • 研究报告>
  • 管理文献>
  • 标准材料>
  • 技术资料>
  • 教育专区>
  • 应用文书>
  • 生活休闲>
  • 考试试题>
  • pptx模板>
  • 工商注册>
  • 期刊短文>
  • 图片设计>
  • ImageVerifierCode 换一换

    (8.4.7)--Ch_07-Input Output计算机组成原理.ppt

    • 资源ID:96597277       资源大小:797KB        全文页数:67页
    • 资源格式: PPT        下载积分:20金币
    快捷下载 游客一键下载
    会员登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录   QQ登录  
    二维码
    微信扫一扫登录
    下载资源需要20金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    (8.4.7)--Ch_07-Input Output计算机组成原理.ppt

    计算机组成原理 -双语教学课件双语教学课件William Stallings Computer Organization and Architecture6th EditionChapter 7Input/OutputInput/Output ProblemsWide variety of peripheralsDelivering different amounts of dataAt different speedsIn different formatsAll slower than CPU and RAMNeed I/O modulesInput/Output ModuleInterface to CPU and MemoryInterface to one or more peripheralsGeneric Model of I/O ModuleExternal DevicesHuman readableScreen,printer,keyboardMachine readableMonitoring and controlCommunicationModemNetwork Interface Card(NIC)External Device Block DiagramTypical I/O Data RatesI/O Module FunctionControl&TimingCPU CommunicationDevice CommunicationData BufferingError DetectionI/O Steps e.g.Read from input moduleCPU checks I/O module device statusI/O module prepares status for CPU to fetchIf the status is ready,CPU requests data transferI/O module gets data from deviceCPU fetches data from I/O moduleVariations for output,I/O Module DiagramI/O Module DecisionsHide or reveal device properties to CPUSupport multiple or single deviceControl device functions or leave for CPUAlso O/S decisionse.g.Unix treats everything it can as a fileInput Output TechniquesProgrammedInterrupt drivenDirect Memory Access(DMA)Programmed I/OCPU has direct control over I/OSensing statusRead/write commandsTransferring dataCPU waits for I/O module to complete operationWastes CPU timeProgrammed I/O-detailCPU requests I/O operationI/O module performs operationI/O module sets status bitsCPU checks status bits periodicallyI/O module does not inform CPU directlyI/O module does not interrupt CPUCPU may wait or come back laterProgram I/O block of data PAGE 206 Issue read command to I/O moduleRead status of I/O moduleCheck status Read word from I/O moduleWrite word into memoryDone?Next instruction yesNo No readyreadyCPU-I/OI/O-CPUError ConditionI/O-CPUCPU-MEMORYI/O CommandsCPU issues addressIdentifies module(&device if 1 per module)CPU issues commandControl-telling module what to doe.g.spin up diskTest-check statuse.g.power?Error?Read/WriteModule transfers data via buffer from/to deviceAddressing I/O DevicesUnder programmed I/O data transfer is very like memory access(CPU viewpoint)Each device given unique identifierCPU commands contain identifier(address)I/O MappingMemory mapped I/ODevices and memory share an address spaceI/O looks just like memory read/writeNo special commands for I/OLarge selection of memory access commands availableIsolated I/OSeparate address spacesNeed I/O or memory select linesSpecial commands for I/OLimited set7.4 Interrupt Driven I/O PAGE 208Overcomes CPU waitingNo repeated CPU checking of deviceI/O module interrupts when readyTransfer of Control via Interrupts page61suspendingresumingbranchingprocessingInterrupt-driven I/O block of data PAGE 208 Issue read command to I/O moduleRead status of I/O moduleCheck status Read word from I/O moduleWrite word into memoryDone?Next instruction yesNo readyCPU-I/OI/O-CPUError ConditionI/O-CPUCPU-MEMORYDo something elseinterruptSimple interrupt processing Hardware software ISRDevice controller or other system hardware issue an interruptProcessor finishes execution of current instruction Processor signals acknowledgment of interruptProcessor pushes PSW&PC onto control stackProcessor loads new PC value based on interrupt Save remainder of process state informationProcess interruptRestore process state information Restore old PSW&PCInterrupt Driven I/OBasic OperationCPU issues read commandI/O module gets data from peripheral whilst CPU does other workI/O module interrupts CPUCPU requests dataCPU fetches data from I/O module CPU ViewpointIssue read commandDo other workCheck for interrupt at end of each instruction cycleIf interrupted:-Save context(registers)Process interruptFetch data&storeSee Operating Systems notesInterrupt processing(1)0.CPU does something else.1.The device issues an interrupt signal to CPU2.The CPU finishes execution of the current instruction before responding to the interrupt3.The CPU tests for&makes sure of an interrupt,and sends an acknowledge signal to device(allows the device to remove its interrupt signal&to sends interrupt number to CPU)4.The CPU saves information of current program to stack for resuming it.The important information is PSW(running status of current program)&PC(the address of next instruction)Interrupt processing(2)5.The CPU loads PC with the entry location of ISR(Interrupt Service Routine)which responds to this interrupt.The CPU must determine the enter location(start address)of ISR by some method based on interrupt number.Above is completed by HARDWARE in the interrupt cycle.Following is completed by SOFTWARE(ISR)6.The CPU begins to execute the instructions of ISR.It saves the remainder(the context of some registers)of program-interrupted onto stack for resuming.(e.g.AC contains the sum of addition.)Interrupt processing(3)7.The CPU executes instructions of ISR to process interrupt:tests status of device,fetches data from the device,stores data to memory,.(or fetches data form memory,sends data to device).8.After service,the CPU prepares to resume the program-interrupted,CPU retrieves the remainder from stack&restores them to registers.9.The CPU executes the last instruction RETI(means return from interrupt),the processing is restoring PSW&PC from stack.Interrupt processing(4)10.The instruction cycle,the CPU fetches the instruction of program-interrupted by PC&resumes the program-interrupted.Design IssuesHow do you identify the module issuing the interrupt?How do you deal with multiple interrupts?i.e.an interrupt handler being interruptedIdentifying Interrupting Module(1)Different line for each modulePCLimits number of devicesSoftware pollCPU asks each module in turnSlowIdentifying Interrupting Module(2)Daisy Chain or Hardware pollInterrupt Acknowledge sent down a chainModule responsible places vector on busCPU uses vector to identify handler routineBus MasterModule must claim the bus before it can raise interrupte.g.PCI&SCSIMultiple InterruptsEach interrupt line has a priorityHigher priority lines can interrupt lower priority linesIf bus mastering only current master can interruptExample-PC Bus80 x86 has one interrupt line8086 based systems use one 8259A interrupt controller8259A has 8 interrupt linesSequence of Events8259A accepts interrupts8259A determines priority8259A signals 8086(raises INTR line)CPU Acknowledges8259A puts correct vector on data busCPU processes interruptISA Bus Interrupt SystemISA bus chains two 8259As togetherLink is via interrupt 2Gives 15 lines16 lines less one for linkIRQ 9 is used to re-route anything trying to use IRQ 2Backwards compatibilityIncorporated in chip set82C59A InterruptControllerIntel 82C55A Programmable Peripheral InterfaceUsing 82C55A To Control Keyboard/Display7.5 Direct Memory Access page216Interrupt driven and programmed I/O require active CPU interventionTransfer rate is limitedCPU is tied upDMA is the answerDMA FunctionAdditional Module(hardware)on busDMA controller takes over from CPU for I/ODMA Module DiagramDMA OperationCPU tells DMA controller:Read/WriteDevice addressStarting address of memory block for dataAmount of data to be transferredCPU carries on with other workDMA controller deals with transferDMA controller sends interrupt when finishedDMA TransferCycle StealingDMA controller takes over bus for a cycleTransfer of one word of dataNot an interruptCPU does not switch contextCPU suspended just before it accesses busi.e.before an operand or data fetch or a data writeSlows down CPU but not as much as CPU doing transferAsideWhat effect does caching memory have on DMA?Hint:how much are the system buses available?DMA Configurations(1)Single Bus,Detached DMA controllerEach transfer uses bus twiceI/O to DMA then DMA to memoryCPU is suspended twiceDMA Configurations(2)Single Bus,Integrated DMA controllerController may support 1 deviceEach transfer uses bus onceDMA to memoryCPU is suspended onceDMA Configurations(3)Separate I/O BusBus supports all DMA enabled devicesEach transfer uses bus onceDMA to memoryCPU is suspended onceI/O ChannelsI/O devices getting more sophisticatede.g.3D graphics cardsCPU instructs I/O controller to do transferI/O controller does entire transferImproves speedTakes load off CPUDedicated processor is fasterI/O Channel ArchitectureInterfacingConnecting devices togetherBit of wire?Dedicated processor/memory/buses?E.g.FireWire,InfiniBandIEEE 1394 FireWireHigh performance serial busFastLow costEasy to implementAlso being used in digital cameras,VCRs and TVFireWire ConfigurationDaisy chainUp to 63 devices on single portReally 64 of which one is the interface itselfUp to 1022 buses can be connected with bridgesAutomatic configurationNo bus terminatorsMay be tree structureSimple FireWire ConfigurationFireWire 3 Layer StackPhysicalTransmission medium,electrical and signaling characteristicsLinkTransmission of data in packetsTransactionRequest-response protocolFireWire Protocol StackFireWire-Physical LayerData rates from 25 to 400MbpsTwo forms of arbitrationBased on tree structureRoot acts as arbiterFirst come first servedNatural priority controls simultaneous requestsi.e.who is nearest to rootFair arbitrationUrgent arbitrationFireWire-Link LayerTwo transmission typesAsynchronousVariable amount of data and several bytes of transaction data transferred as a packetTo explicit addressAcknowledgement returnedIsochronousVariable amount of data in sequence of fixed size packets at regular intervalsSimplified addressingNo acknowledgementFireWire SubactionsInfiniBandI/O specification aimed at high end serversMerger of Future I/O(Cisco,HP,Compaq,IBM)and Next Generation I/O(Intel)Version 1 released early 2001Architecture and spec.for data flow between processor and intelligent I/O devicesIntended to replace PCI in serversIncreased capacity,expandability,flexibilityInfiniBand ArchitectureRemote storage,networking and connection between serversAttach servers,remote storage,network devices to central fabric of switches and linksGreater server densityScalable data centreIndependent nodes added as requiredI/O distance from server up to 17m using copper300m multimode fibre optic10km single mode fibreUp to 30GbpsInfiniBand Switch FabricInfiniBand Operation16 logical channels(virtual lanes)per physical linkOne lane for management,rest for dataData in stream of packetsVirtual lane dedicated temporarily to end to end transferSwitch maps traffic from incoming to outgoing laneInfiniBand Protocol StackForeground ReadingCheck out Universal Serial Bus(USB)Compare with other communication standards e.g.Ethernet

    注意事项

    本文((8.4.7)--Ch_07-Input Output计算机组成原理.ppt)为本站会员(奉***)主动上传,淘文阁 - 分享文档赚钱的网站仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知淘文阁 - 分享文档赚钱的网站(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于淘文阁 - 版权申诉 - 用户使用规则 - 积分规则 - 联系我们

    本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

    工信部备案号:黑ICP备15003705号 © 2020-2023 www.taowenge.com 淘文阁 

    收起
    展开