Computer architecture - Input/Output - lecture 7b - Charles Fox - University of Lincoln
Overview
Charles Fox compares memory-mapped I/O, direct I/O, and bus-based architectures, showing how bus hierarchies and standards such as PCIe, USB, SCSI, and MIDI address congestion and device compatibility. He traces I/O from 1980s video and sound chips to modern touchscreens, cameras, keyboards, and optical mice, emphasizing that computation increasingly takes place inside peripherals.
Key takeaways
- Memory-mapped I/O makes device access resemble ordinary memory access: writing to VRAM can change displayed pixels, while reading mapped keyboard bits can reveal simultaneous key states.
- Bus expansion increases device connectivity but also creates contention; hierarchical designs such as Northbridge and Southbridge separate fast traffic from slower peripheral traffic.
- USB's major architectural benefit is consolidating many peripherals behind one controller and IRQ, which supports plug-and-play without configuring a separate CPU connection for every device.
- High-speed serial links can outperform parallel connections in practice because parallel wires develop timing skew, requiring error handling that can erase their bandwidth advantage.
- I/O devices increasingly compute locally: optical mice perform machine-vision optical flow in dedicated logic, and USB keyboards process key states before sending data to the computer.
Chapters
- Memory mapping assigns a reserved RAM address range to device functions, such as pixels or screen characters.
- Video RAM, or VRAM, looks like ordinary RAM to the CPU but has output connections that send stored values to the display.
- In an ASCII display mode, each byte can select a character; in pixel modes, bytes encode color values such as RGB and alpha.
- Memory-mapped keyboards can represent key states as bits, allowing simultaneous key presses to be checked directly.
- The Commodore 64's 6510 processor adds dedicated I/O pins to the 6502-family design, allowing I/O independent of the bus.
- Direct I/O typically requires additional instructions, such as input and output operations, rather than ordinary load and store.
- Arduino devices use direct pins to connect components such as LEDs and buzzers without an I/O bus module.
- The trade-off is a limited number of physical CPU pins, balanced against conserving address space for programs and data.
- A shared system bus can become a bottleneck when many devices, especially DMA-capable modules, request transfers.
- Hierarchical buses isolate traffic: a USB controller can connect to the main bus while individual USB devices use a lower-level network.
- Traditional PC designs placed fast components such as RAM and graphics on the Northbridge, with slower peripherals on the Southbridge.
- Northbridge functions later moved onto CPU silicon, while the Platform Controller Hub retains the slower-device role in modern Intel designs.
- PCIe slots provide different lane widths, and the protocol has evolved from a shared bus toward mesh-like routing between devices.
- Fox cites modern PCIe throughput of about 64 gigabits per second per lane, with aggregate capacity scaling by lane count.
- Storage interconnects evolved from shared SCSI buses toward SAS, SATA, and NVMe connections, reducing contention for mass data transfers.
- MIDI remains a true bus: its Through port relays messages to daisy-chained devices, and up to 16 channels can address instruments.
- Older expansion cards often needed separate IRQ lines to notify the CPU, making multi-device setups difficult to configure.
- Sound cards, MIDI interfaces, and robotics devices could compete for scarce IRQs, sometimes requiring manual configuration or sharing.
- USB places many peripherals behind a single controller and IRQ, moving device-specific communication to a lower level of the hierarchy.
- Operating systems can install USB support once, enabling many devices to be connected while the computer is running.
- USB has scaled from 12 megabits per second to rates around 80 gigabits per second, but connector shapes and capabilities have varied.
- USB-C standardizes the physical connector shape more than the behavior of cables, so charging speed and power support can still differ.
- USB On-The-Go, or OTG, lets a phone act as the manager and control peripherals such as hard disks or sound cards.
- High-speed links shifted from parallel to serial because tiny timing differences between parallel wires can corrupt word alignment above roughly one gigabit per second.
- The BBC Micro used video RAM and a VDU chip to translate stored pixel data into display signals, an ancestor of modern GPU pipelines.
- CRT systems used a controller to generate scan movements, while modern screens build red, green, and blue pixels using technologies such as OLED and AMOLED.
- Capacitive touchscreens detect changes between grid electrodes and a finger; transparent conductive indium tin oxide enables sensing without blocking the display.
- Camera sensors use pixel arrays and light-sensitive materials to convert color information into signals, much like displays use pixels to emit light.
- The BBC Micro's sound chip generated simple square waves, which are easy to produce digitally and became a hallmark of early 8-bit audio.
- The Commodore 64's SID chip added waveforms such as sine and triangle waves plus filtering, enabling richer synthesized sound.
- The Nintendo Entertainment System used wavetable synthesis, while the Amiga's Paula chip replayed longer samples such as instrument notes or sound effects.
- Modern sound cards use large ring buffers that the CPU can update with arbitrary audio, replacing the distinctive fixed sounds of older computers.
- A USB keyboard contains circuitry that scans key switches and translates their states into USB messages.
- Modern optical mice implement optical flow, a machine-vision technique, using dedicated digital logic rather than relying on the host CPU.
- Peripheral chips can perform substantial computation locally, illustrating how processing has spread beyond the CPU into everyday I/O devices.
Transcript excerpt
0:00 The module based system is the the conventional approach to architectural I/O. There are a couple of other ways of doing it, um that you might encounter as well. One of those is called memory mapping. So in in memory mapping, we don't use a module as such. We we use a an area of almost ordinary RAM which has existing addresses, but we modify that RAM to have wires coming out of the back. So we we we make the RAM look a bit more like an I/O module, but it it really is ordinary RAM at this level. So for example, this is sometimes done for video. If you if you go back to eight-bit machines, 16-bit machines
0:48 or or some some modern machines outside the conventional PC architecture, right? We'll talk more about embedded computing later in the module. Um this this can be a a a simpler architecture. Um so here's here's an example. You can tell this is from the eight-bit era because the the screen is a nice curvy screen, yeah? This is from a manual where the screen was probably a television or a CRT monitor. The the idea of memory mapping is we we take over a specific region of RAM. So these are all the addresses in RAM starting at zero going up to 64K and we we assign this special range of addresses to each represent something on the screen. That that might
1:34 be an individual pixel on the screen. It might be if you're using an ASCII based system, it might be a a character to be rendered on the screen like in this example. But each location here is just normal RAM and by storing something in it, you are telling the screen to do something directly. So on
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Charles Fox.