1 / 14

Troisième Partie Chapitre 6 Les interfaces D’entrée-sortie

Troisième Partie Chapitre 6 Les interfaces D’entrée-sortie. D. I/O. A. D. T. E. A. V. I. C. E. Sy. Polled I/O. Computer bus. CPU. mem. I/O interface. Polling Procedure. public void print(char ch); // Printer polling method { while Sy do { /* wait */ } ; Data = ch;

Download Presentation

Troisième Partie Chapitre 6 Les interfaces D’entrée-sortie

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Troisième Partie Chapitre 6 Les interfaces D’entrée-sortie

  2. D I/O A D T E A V I C E Sy Polled I/O Computer bus CPU mem I/O interface

  3. Polling Procedure public void print(char ch); // Printer polling method { while Sy do {/* wait */}; Data = ch; Sy = true /* activate printer interface */; };

  4. Normal Program Interrupt Handler Interrupt

  5. Where is the interrupt handler ? Fixed direct addresses (INTEL) Fixed indirect addresses (Motorola) Vectored Interrupts (DEC) How to save the program state ? By programmer Automatically, the entire state. Automatically, a part of the state. By shadow registers Interrupt Issues

  6. Direct Interrupt Addresses Contents of P register when interrupt 1 occurred = xyz RESET JMP 00000 Interrupt handler 01000 0D000 Save context 00004 INT.1 JSB 0D000 00008 INT.2 Restore context RET xyz

  7. Indirect Interrupt Addresses Contents of P register when interrupt 1 occurred = xyz Interrupt handler 0D000 INT.2 INT.1 0D000 FFFFF 00000 RESET At interrupt, the entire context, including P, is saved on stack by the control unit. The RTI instruction restores the entire context, including P RTI xyz

  8. + 1 - Vectored Interrupt Interrupting device After an interrupt, the interrupting device will normally put a JSB instruction on the data bus for calling the interrupt handler

  9. Fetching the next instruction at a predefined address A JSB at the predefined address and a RET at the end of the interrupt handler take care of the return address. All other context needs to be saved explicitly Very simple from an hardware point of view Fetching the next instruction via a predefined address Context (full or subset) saved by hardware Specific Return from Interrupt instruction to restore context More complex control unit required Fetching the next instruction from the interrupting interface No restrictions on number of interrupting devices Context saving similar to the case of direct interrupt addresses Very simple control unit but rather complex interfaces Interrupt Handling

  10. D I/O A D T E A V I C E Sy Interrupt Driven I/O Computer bus CPU interrupt mem I/O interface

  11. Interrupt Driven Printing (1) public void print(char ch); // Printer function pseudocode { while bufferfull do {/* wait */}; put ch intobuffer; if (buffer was empty){start driver} };

  12. Interrupt driven Printing (2) public void pdriver; // Interrupt driven printer driver { while (true) do { if (BufferEmpty) {Suspend pdriver}; Data = Next Character from Buffer; Sy = true; (* activate printer interface *) Suspend driver until printer interrupt; } };

  13. D I/O bus request/ bus granted A D T E A V I C E Sy Direct Memory Access Computer bus CPU interrupt DMAC ready mem I/O interface

  14. DMA Controller to CPU Bus Request Bus Granted Interrupt Request Configuration BUS Origin Address Destination Address Ready = Transfert Request Byte Count

More Related