Top Banner
Computers Internal Communication
22

Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

Jan 02, 2016

Download

Documents

Melina Allen
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

Computers

Internal Communication

Page 2: Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

Basic Computer System

MAIN MEMORY

ALU CNTL.....

BUS

CONTROLLER

Processor

I/O moduleInterconnections

BUS

Memory

Page 3: Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

Local and Peripheral

Bus

Page 4: Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

Bus Operation

Transfer Quantity (word)Address busControl busData bus

SpeedClock speed

Page 5: Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

Controller

PROCESSOR REGISTER

REGISTER

REGISTER

BUFFER

Page 6: Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

Controller Operation

PROCESSOR REGISTER

REGISTER

REGISTER

BUFFER

VALUE

VALUE

VALUE

PROCESSOR

BUFFERHEADER CRC

PROCESSOR

BUFFERBUFFERBUFFERBUFFERBUFFERBUFFERBUFFERBUFFERBUFFERBUFFERBUFFERBUFFER

CRC

CPU passes parameters into the registersController transfers data into the card bufferCard processor checks the CRC Data is transferred from the buffer to the bus

Page 7: Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

I/O Operations

For the I/O device to communicate with the CPU, the designer includes additional registers in the CPU.

•I/O Address Register contains address of I/O device•I/O Buffer Register contains the value to be transferred to/from the I/O device

Page 8: Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

I/O Registers

IR

300 PC

CONTROL ARITHMETIC-LOGIC

ACCUM

PROGRAM

1940

5941

2941

300

301

302

DATA

0003

0002

940

941

I/O Address

I/O Buffer

Page 9: Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

I/O Processing

Programmed I/OControlTestRead/Write

Interrupt Driven I/ODirect Memory Access

Page 10: Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

1. Programmed I/O

Issue an I/O request

CPU is tied up checking the I/O device until the response is ready.

Solution: Interrupt Processing

Wait until I/O finished

Continue program

Page 11: Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

2. Interrupt Processing

Issue an I/O requestStore program parametersStart another processProcess interruptReturn to original process

Page 12: Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

3. DMA

Processor issues a request, thenGoes about its businessDMA module transfers the data, thenTells the processor

Page 13: Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

Programmed I/O

Issue an I/O request

CPU is tied up checking the I/O device until the response is ready.

Solution: Interrupt Processing

Wait until I/O finished

Continue program

Page 14: Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

Interrupt Processing

Page 15: Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

Interrupt Processing

Page 16: Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

Interrupt Processing

Start FETCH EXECUTE

Halt

CHECKINTERRUPT

Page 17: Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

Interrupt Processing

Issue an I/O requestStore program parametersStart another processProcess interruptReturn to original process

Page 18: Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

Classes of Interrupts

Program: illegal program operations

Timer: scheduled special operationsI/O: device controller signals completion of operations or errorHardware Failure: power failure, memory parity error, etc.

Page 19: Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

Interrupt Request (IRQ) Registers

IR

300 PC

CONTROL ARITHMETIC-LOGIC

ACCUM

PROGRAM

1940

5941

2941

300

301

302

DATA

0003

0002

940

941

I/O Address

I/O Buffer

IRQ

Stack Addr.

Page 20: Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

Interrupt Stack

Add a CPU register: stack pointer.Recognize interruptStore register contents (push stack)Process interruptRestore register contents (pop stack)

STACK

PROGRAM COUNTER

INSTRUCTION REGISTER

ACCUMULATOR

Etc.

Base Address

May also contain interim program values

Page 21: Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

Data Transfer:Interrupt Driven I/O

MAIN MEMORY

BUFFER

CPU

T AAD

CONTROLLER

DASD

CPUCPUCPUCPU

Page 22: Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.

Data Transfer:Direct Memory Access

MAIN MEMORY

BUFFER

CPU

T AAD

DASD

CONTROLLERCONTROLLERCONTROLLERCONTROLLERCONTROLLER