Microprocessor & Computer Architecture (Μpca) : I/O And Bus Architecture
Microprocessor & Computer Architecture (Μpca) : I/O And Bus Architecture
Microprocessor & Computer Architecture (Μpca) : I/O And Bus Architecture
Architecture (μpCA)
I/O and Bus Architecture
UE19CS252
Session 4.5
MPCA - I/o and Bus Architecture
Accessing I/O Devices - Introduction
CPU
Cache
Bus
…
Memory Disk Network USB DVD
3
MPCA - I/o and Bus Architecture
Accessing I/O Devices – I/O Hierarchy
CPU
Cache
Disk
Memory Bus
I/O
Controller I/O Bus
Memory
…
Network USB DVD
4
MPCA - I/o and Bus Architecture
Accessing I/O Devices – Intel Example
P4
Processor
System bus 800 MHz, 604 GB/sec
266 MB/sec
Serial ATA
150 MB/s
Disk CD/DVD
100 MB/s
I/O Tape
Controller 100 MB/s
USB 2.0 Hub
60 MB/s (South Bridge)
5
MPCA - I/o and Bus Architecture
Accessing I/O Devices - Introduction
• There exists special hardware components between CPU and peripherals to supervise
and synchronize all the input and output transfers that are called interface units.
• The I/O Bus consists of data lines, address lines and control lines.
• The I/O bus from the processor is attached to all peripherals interface.
• To communicate with a particular device, the processor places a device address on
address lines.
MPCA - I/o and Bus Architecture
Accessing I/O Devices - Memory Mapped Device Interface
• Main ()
• {
Phone rings
• Interrupt controller is responsible for sending the interrupt vector to the CPU.
MPCA - I/o and Bus Architecture
Accessing I/O Devices - How is interrupt nesting handled?
Consider a scenario.
• A device D0 has interrupted and the CPU is servicing the (executing the ISR) device D0.
• In the meantime, device D1 has interrupted.
• Two possible scenarios are here:
1. D1 will interrupt the ISR for D0, get processed first, and then the ISR for device D0 will
be resumed.
This creates problem for multi nesting.
2. Disable the interrupt system automatically whenever an interrupt is acknowledged.
This will not require nested interrupts to be handled.
MPCA - I/o and Bus Architecture
Accessing I/O Devices – Polling Technique
• Each device can have a status bit whether the device has interrupted?
• CPU can poll the status bit to check for the device which has interrupted.
MPCA - I/o and Bus Architecture
Accessing I/O Devices – Daisy Chain Technique
Stack Layouts:
MPCA - I/o and Bus Architecture
Accessing I/O Devices - Basic Interrupt Stack Design and Implementation
MPCA - I/o and Bus Architecture
Accessing I/O Devices – Interrupt Handling Schemes Non-Nested Interrupt Handler
Various stages in a NNIH –
Enable Interrupts
spsr ← spsr_{interrupt request mode}
pc is restored
MPCA - I/o and Bus Architecture
Accessing I/O Devices – Interrupt Handling Schemes Non-Nested Interrupt Handler
For Interrupts, I/O organization please refer to
Carl Hamecher, Computer organization text book
Chapter 4: Input output organization
Team MPCA
Department of Computer Science and Engineering