Upload
melina-allen
View
222
Download
1
Tags:
Embed Size (px)
Citation preview
Basic Computer System
MAIN MEMORY
ALU CNTL.....
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
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
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
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
2. Interrupt Processing
Issue an I/O requestStore program parametersStart another processProcess interruptReturn to original process
3. DMA
Processor issues a request, thenGoes about its businessDMA module transfers the data, thenTells the processor
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
Interrupt Processing
Issue an I/O requestStore program parametersStart another processProcess interruptReturn to original process
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.
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.
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