0% found this document useful (0 votes)
0 views22 pages

IO Function

The document discusses the I/O function of computer systems, explaining how I/O modules interact with processors and memory, including the use of direct memory access (DMA) for efficient data transfer. It describes the structure and roles of various computer modules, including memory, I/O modules, and the processor, emphasizing their communication through control signals and data paths. Additionally, it covers the bus interconnection system, detailing the functions of data, address, and control lines in facilitating communication between devices.

Uploaded by

Fida Hussain
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views22 pages

IO Function

The document discusses the I/O function of computer systems, explaining how I/O modules interact with processors and memory, including the use of direct memory access (DMA) for efficient data transfer. It describes the structure and roles of various computer modules, including memory, I/O modules, and the processor, emphasizing their communication through control signals and data paths. Additionally, it covers the bus interconnection system, detailing the functions of data, address, and control lines in facilitating communication between devices.

Uploaded by

Fida Hussain
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

I/O Function

• I/O module can exchange data directly with the processor

• We already know that processor can read/write data directly from memory by using a
particular address.

• Now, processor can also read data from or write data to directly to an
I/O module
• Processor identifies a specific device that is controlled by a particular I/O module
• I/O instructions rather than memory referencing instructions
I/O Function
• In some cases it is desirable to allow I/O exchanges to occur
directly with memory

• The processor grants to an I/O module the authority to read from


or write to memory so that the I/O memory transfer can occur
without tying up the processor

• The I/O module issues read or write commands to memory


relieving the processor of responsibility for the exchange

• This operation is known as direct memory access (DMA)


Interconnection Structures

• This diagram illustrates the three


fundamental hardware modules of a
computer system and how they interact
through their input/output signals.

• Each module is shown as a standalone


block with its inputs (left side) and
outputs (right side).
Computer Modules
Memory:

• A memory module will consist of N words


of equal length. Each word is assigned a
unique numerical address (0, 1, …, N - 1).
• A word of data can be read from or
written into the memory. The nature of
the operation is indicated by read and
write control signals.
• The location for the operation is specified
by an address
Computer Modules

I/O Module:

• I/O module: From an internal point of


view, I/O is functionally similar to
memory.
• There are two operations, read and
write.
• Further, an I/O module may control
more than one external device.
Computer Modules
I/O Module:

• We can refer to each of the interfaces to


an external device as a port and give each
a unique address (e.g., 0, 1, …, M - 1).

• In addition, there are external data paths


for the input and output of data with an
external device.

• Finally, an I/O module may be able to send


interrupt signals to the processor.
Computer Modules
I/O Module:

• The I/O Module sits physically inside the


computer but faces outward.

• Its job is to translate between the internal


world (CPU, Memory) and the external
world (keyboard, printer, disk).

• It has M ports — each port connects to


one external device.
Computer Modules
I/O Module:

• External Data = data crossing the


boundary from/to the outside world

• Internal Data = data crossing the boundary


from/to the CPU and Memory

• And the I/O Module itself is the internal


component that manages both sides of
that boundary.
Computer Modules
I/O Module:

• Example
• A keyboard press happens:
• The keyboard sends External Data into
the I/O module
• The I/O module raises an Interrupt
Signal to alert the CPU
• CPU stops its current task, reads the key
data via Internal Data
Computer Modules – I/O Module
Signal Direction What it does
Read / Write Input CPU commands: read from or write to a port
Selects which of the M ports to
Address Input
communicate with
Internal Data (in) Input Data arriving from the CPU or Memory
Data arriving from an external device (e.g.
External Data (in) Input
keyboard)
Internal Data (out) Output Data going toward CPU or Memory
Data going out to an external device (e.g.
External Data (out) Output
printer)
Notifies CPU that an external device needs
Interrupt Signals Output
attention
Computer Modules – I/O Module
Why the same data has two names
• When you press a key, the same keystroke travels the full path below — but
the signal is named differently depending on which side of the I/O Module
it is on:
External I/O Internal
keyboard CPU
Data Module Data

• External Data = data crossing between the I/O Module and the outside
world.
• Internal Data = that same data, now crossing between the I/O Module and
the CPU or Memory. The I/O Module is the internal component that
manages both sides.
Computer Modules

Processor:

The processor reads in


instructions and data, writes out
data after processing, and uses
control signals to control the
overall operation of the system. It
also receives interrupt signals
Computer Modules – I/O Module

How do they communicate

• CPU ──(Address, Control Signals)──► Memory


• CPU ◄──(Data / Instructions)────── Memory
• CPU ──(Address, Write, Data)──► I/O Module ──► External Device
• CPU ◄──(Interrupt Signals, Data)── I/O Module◄──External Device
The interconnection structure must support the following
types of transfers:

Memory Processor I/O to or


I/O to Processor
to to from
processor to I/O
processor memory memory
An I/O
module is
allowed to
exchange
Processor data directly
Processor
reads an Processor Processor with
reads data
instruction writes a unit sends data memory
from an I/O
or a unit of of data to to the I/O without
device via an
data from memory device going
I/O module
memory through the
processor
using direct
memory
access
Bus Interconnection

• A bus is a communication pathway connecting two or more devices.

• A key characteristic of a bus is that it is a shared transmission medium.

• Multiple devices connect to the bus, and a signal transmitted by any


one device is available for reception by all other devices attached to the
bus.
Bus Structure
• A system bus consists, typically, of from about fifty to hundreds of
separate lines.
• Each line is assigned a particular meaning or function.

• Although there are many different bus designs, on any bus the lines can
be classified into three functional groups: data, address, and control
lines.
Bus Interconnection Scheme
Data Line
• The data lines provide a path for moving data among system modules.
These lines, collectively, are called the data bus.

• The data bus may consist of 32, 64, 128, or even more separate lines,
the number of lines being referred to as the width of the data bus.
• Each line can carry 1 bit at a time

• For example, if the data bus is 32 bits wide and each instruction is 64
bits long, then the processor must access the memory module twice
during each instruction cycle
Address Line
• The address lines are used to designate the source or destination of the
data on the data bus.
• For example, if the processor wishes to read a word (8, 16, or 32 bits) of
data from memory, it puts the address of the desired word on the
address lines.
• Furthermore, the address lines are generally also used to address I/O
ports.
• Typically, the higher-order bits are used to select a particular module on
the bus, and the lower-order bits select a memory location or I/O port
within the module.
Address Line
• Typically, the higher-order bits are used to select a particular module on
the bus, and the lower-order bits select a memory location or I/O port
within the module.
• For example, on an 8-bit address bus, address 01111111 and below
might reference locations in a memory module (module 0) with 128
words of memory, and address 10000000 and above refer to devices
attached to an I/O module (module 1)
Control Line
• The control lines are used to control the access to and the use of the
data and address lines.
• Because the data and address lines are shared by all components, there
must be a means of controlling their use.

• Control signals transmit both command and timing information among


system modules.
• Timing signals indicate the validity of data and address information.
• Command signals specify operations to be performed.
Typical control lines include –

You might also like