Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

Hello

Let’s get started!


Lecture 08

Input – Output Organization


Read More

Reference Book : “Computer Organization and Architecture” by


Stallings

Yasas Sri Wickramasinghe 2


Input Output
Organization
Provides an efficient mode of
communication between the central
system and the outside environment
Yasas Sri Wickramasinghe 3
Input or output devices attached to the
computer are called peripherals.
There are three types of peripherals :
• Input peripherals
• Output peripherals
• Input-output peripherals

I/O Interface
Provides a method for transferring information between
internal storage (such as memory and CPU registers) and
external I/O devices.

They are special hardware components between CPU and


peripheral to supervise and synchronize all input and
output transfer.

They are called interface units because they interface between


the processor bus processor bus and the peripheral device.
Yasas Sri Wickramasinghe 4
Accessing I/O Devices
• Single-bus structure
• The bus enables all the devices connected to it to exchange information
• Typically, the bus consists of three sets of lines used to carry address, data,
and control signals
• Each I/O device is assigned a unique set of addresses

Yasas Sri Wickramasinghe 5


I/O Mapping
1. Memory-Mapped I/O
• When I/O devices and the memory share the same address space, the
arrangement is called memory-mapped I/O.
• Any machine instruction that can access memory can be used to transfer data
to or from an I/O device.
Move DATAIN, R0
Move R0, DATAOUT
• Some processors have special In and Out instructions to perform I/O transfer.

Yasas Sri Wickramasinghe 6


I/O Mapping
1. Memory-Mapped I/O
• A single set of read/write control lines (no distinction between memory and
I/O transfer)
• Memory and I/O addresses share the common address space
-> reduces memory address range available
• No specific input or output instruction
-> The same memory reference instructions can be used for I/O transfers
• Considerable flexibility in handling I/O operations

Yasas Sri Wickramasinghe 7


I/O Mapping
2. Isolated I/O
• Many computers use common bus to transfer information between
memory or I/O.
• Separate I/O read/write control lines in addition to memory
read/write control lines
• Separate (isolated) memory and I/O address spaces
• Distinct input and output instructions
- each associated with address of interface register

Yasas Sri Wickramasinghe 8


I/O Mapping

Yasas Sri Wickramasinghe 9


I/O Mapping

Yasas Sri Wickramasinghe 10


Asynchronous Data Transfer

Yasas Sri Wickramasinghe 11


Yasas Sri Wickramasinghe 12
Strobe Control

Yasas Sri Wickramasinghe 13


Strobe Control

Yasas Sri Wickramasinghe 14


Handshaking

Yasas Sri Wickramasinghe 15


Modes of Transfer Mechanisms
1. Program-controlled I/O – processor polls the device.
2. Interrupt
3. Direct Memory Access (DMA)

Yasas Sri Wickramasinghe 16


Yasas Sri Wickramasinghe 17
Yasas Sri Wickramasinghe 18
Yasas Sri Wickramasinghe 19
Yasas Sri Wickramasinghe 20
Yasas Sri Wickramasinghe 21
Stay Safe – Stay Home

Yasas Sri Wickramasinghe 22

You might also like