chapter 5 - Computer Architecture

Info iconThis preview shows pages 1–18. Sign up to view the full content.

View Full Document Right Arrow Icon
A focused mind is one of the most powerful forces in the Universe. -Swami Vivekananda
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Chapter 3 Input / Output Organization
Background image of page 2
Chapter objectives Program-controlled I/O using polling Interrupts DMA Data transfer over synchronous and asynchronous buses Commercial bus standards, PCI, SCSI, USB
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Input / Output Communication Exchange information
Background image of page 4
Accessing I/O devices Single-bus structure Memory-mapped I/O Move DATAIN, R0 Move R0, DATAOUT
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Processor Memory I/O device  1 I/O device  n Bus Figure. A single-bus structure
Background image of page 6
Hardware required to connect an I/O device to the bus Figure Address decoder Control circuits Interface Data and status registers circuit
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
I/O Bus Address lines Data lines Control lines Figure.   I/O interface for an input device. interface decoder Address Data and status registers Control circuits Input device
Background image of page 8
Illustration of program-controlled I/O I/O operations involving a keyboard and a display device in a computer system.
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
KEN SOUT CONTROL DATAIN Figure. Registers in keyboard and display interfaces          DEN DATAOUT 7 KIRQ SIN STATUS 6 5 4 3 2 1 0 DIRQ
Background image of page 10
Move #LINE, R0 Initialize memory pointer. WAITK TestBit #0,STATUS Test SIN. Branch=0 WAITK Wait for character to be entered. Move DATAIN,R1 Read character. WAITD TestBit #1,STATUS Test SOUT. Branch=0 WAITD Wait for display to becomeready. Move R1,DATAOUT Send character to display. Move R1,(R0)+ Store characterandadvance pointer. Compare #$0D,R1 Check ifCarriage Return. Branch 0 WAITK If not, getanother character. Move #$0A,DATAOUT Otherwise, send Line Feed. Call PROCESS Call asubroutine to process theinput line. re. A program that reads one line from the keyboard stores it in memory buffer and echoes it back to the display.
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Program-controlled I/O Processor repeatedly checks a status flag to achieve synchronization between the processor and I/O device Processor polls the device
Background image of page 12
INTERRUPTS Hardware signal Sent by I/O device to alert the processor when it becomes ready Processor can utilize waiting period to perform other useful functions
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Interrupts ( cont .) Interrupt Service Routine Interrupt-request line Interrupt-acknowledge signal Interrupt vs. subroutine Interrupt latency Interrupt vs. Exception
Background image of page 14
Example to illustrate interrupts Figure. Transfer of control through the use of interrupts. here Interrupt occurs M i 2 1 PRINT routine Program 2 Program 1 COMPUTE routine i 1 + (ISR)
Background image of page 15

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Types of Exceptions I / O device request Invoking an operating system service from a user program Tracing instruction execution Breakpoint(programmer-requested) Integer arithmetic overflow / underflow Power failure
Background image of page 16
Figure. An equivalent circuit for an open-drain bus used to implement a common interrupt-request line. Processor
Background image of page 17

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 18
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 82

chapter 5 - Computer Architecture

This preview shows document pages 1 - 18. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online