CS251 - Computer Organization and Design - Spring 2008
Lecture 36 - Input/Output
Practical Details
- Assignment 9
- Optional Assignment
Input/Output
The key concept is the `system bus', which is also known as the
though these two night be separate entities. Combined memory-I/O buses are
used in systems with
On the system bus you will find three types of devices
- Parts of the User interface, interact with humans
Note. Data rates that follow are nominal, which does not always match
up with useful. E.g. keyboard
- 100 words per minute
- 10 keystrokes per second
- 100 possible keys means 7 bits per key
- Therefore 70 ~ 100 bits per second
But to get that rate most of us would need to type the same phrase
over and over, which is not very useful. That is, I, and probably also
you, can't think up worthwhile things to type fast enough to keep up with
our typing speed.
| Device |
Input/Output |
I/O data rate (Mbit/sec) |
| Keyboard |
Input |
0.0001 |
| Mouse |
Input/output |
0.0038 |
| Voice |
Input/output |
0.264 |
| Printer |
Output |
3.2 |
| Bit-mapped graphics |
Output |
100 |
- Memory
| Device |
Data rate (Mbit/sec) |
Access Delay (microsec) |
| Magnetic tape |
30 |
1,000,000,000 (human limited) |
| Optical disk (CDROM) |
80 |
100,000,000 (human limited) |
| Magnetic disk |
1,000 |
10,000 |
| SDRAM |
20,000 |
0.05 |
Built into a `seamless' memory hierarchy, but if you don't know where
the seams are your programs won't run very well.
- Network interfaces
| Device |
Data rate (Mbit/sec) |
Access Delay (microsec) |
| Modem |
0.06 |
15,000,000 |
| Wireless LAN |
50 |
1,000,000 |
| Wired LAN |
1,000 |
< 1,000 |
Buses
Processor to Cache
Bandwidth: 1-5 Gwords/sec
Cache to High Bandwidth Devices (North Bridge)
Devices
- Main memory
- Bit-mapped graphics
- Network
Bandwidth: 200-500 Mwords/sec
High Bandwidth Devices to Low Bandwidth Devices (South Bridge)
Devices
- Disks
- Audio
- USB for keyboard, mouse, etc
- Slow ethernet
- CDROM
- Legacy devices
Bus Transactions
Concepts
- Master/slave
- Bus arbitration
- Synchronous/asynchronous
- Block transfer
- Multiplexed/non-Multiplexed
Typical Bus Transaction (Asynchronous, multiplexed)
- Master requests bus
- Master receives bus from bus arbitration hardware
- Master asserts Address, then Read.
- Slave sees Read, latches Address, then asserts Acknowledge
- Master sees Acknowledge, releases Read and Address
- Slave sees Read released, releases Acknowledge
- Slave asserts Data, then DataReady
- Master sees DataReady, latches Data, then asserts Acknowledge
- Slave sees Acknowledge, releases Data and DataReady
- Master sees DatReady released, releases Acknowledge
- Master releases bus
On a block transfer steps 7 to 10 are repeated until all data is
transferred, the releases bus.
On a synchronous bus, assertion of Read, Acknowledge and DataReady are
timed by a bus clock
On a non-Multiplexed bus there are separate address and data lines, and
separate acknowledge lines
DMA (direct memory access) is possible if a device can become bus
master.
Interrupts
Devices can assert interrupt lines on the bus to request service from the
processor.
Interrupt Processing
- Device asserts its interrupt output
- Interrupt control unit (ICU) receives interrupt signal on its input,
asserts its interrupt output
- Before each instruction fetch the processor checks its interrupt
input.
- If it sees the input asserted
- It reads a register of the ICU, during which the pipeline
drains
- The read returns a program counter (called an interrupt vector)
- The program counter is used to fetch the first instruction of the
interrupt service routine (ISR). We saw this briefly earlier when we
were discussing control signals in the processor.
Return to: