slide1
Download
Skip this Video
Download Presentation
Troisième Partie Chapitre 6 Les interfaces D’entrée-sortie

Loading in 2 Seconds...

play fullscreen
1 / 14

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


  • 68 Views
  • Uploaded on

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;

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Troisième Partie Chapitre 6 Les interfaces D’entrée-sortie' - stephen-navarro


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
slide1

Troisième Partie

Chapitre 6

Les interfaces

D’entrée-sortie

polled i o

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
Polling Procedure

public void print(char ch);

// Printer polling method

{

while Sy do {/* wait */};

Data = ch;

Sy = true /* activate printer interface */;

};

interrupt

Normal Program

Interrupt Handler

Interrupt
interrupt issues
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
direct interrupt addresses
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

indirect interrupt addresses
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

vectored interrupt

+

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

interrupt handling
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
interrupt driven i o

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

interrupt driven printing 1
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}

};

interrupt driven printing 2
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;

}

};

direct memory access

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

dma controller
DMA Controller

to CPU

Bus

Request

Bus

Granted

Interrupt

Request

Configuration

BUS

Origin Address

Destination Address

Ready =

Transfert

Request

Byte Count

ad