lecture 19 Input / Output (I/O) - system bus - input e.g. - - PowerPoint PPT Presentation

lecture 19 input output i o
SMART_READER_LITE
LIVE PREVIEW

lecture 19 Input / Output (I/O) - system bus - input e.g. - - PowerPoint PPT Presentation

lecture 19 Input / Output (I/O) - system bus - input e.g. keyboard, mouse - output e.g. printer, display screen Mon. March 21, 2016 System "Bus" (up to mid 1990's only) system bus It is cheaper and simpler to have


slide-1
SLIDE 1

lecture 19 Input / Output (I/O)

  • system bus
  • input e.g. keyboard, mouse
  • output e.g. printer, display screen
  • Mon. March 21, 2016
slide-2
SLIDE 2

System "Bus" (up to mid 1990's only)

It is cheaper and simpler to have multiple components sharing the same communication line. Disadvantage is that the access must be shared, which leads to a bottleneck. Over the past two decades, the disadvantages outweighed the advantages and buse because less common. But the history is important and we want to keep concepts simple.

system bus

slide-3
SLIDE 3

System bus has a clock, but it is slower than the CPU

  • clock. Why?

Voltage (electric field) information cannot move faster than the speed of light (3 x 10^8 m/s). e.g. 3 GHz CPU clock (3 x 10^8 m/s) / (3 * 10^9 cycles/sec) = 10 cm/cycles Signals can only travel 10 cm in time of one clock cycle.

slide-4
SLIDE 4

System Bus has...

  • address lines

(each device or component attached to the bus has a bus address)

  • data lines
  • control lines
slide-5
SLIDE 5

ASIDE: Sometimes address and data lines are multiplexed. 40 pins in total. 16 were "AD". This was a 16 bit processor. e.g. Intel 8086 from 1970's (pre-MIPS)

https://en.wikipedia.org/wiki/Intel_8086

slide-6
SLIDE 6

Recall cache miss and refill from last lecture. How do cache and memory communicate across bus?

slide-7
SLIDE 7

CPU writes main memory block address on address bus and sets ReadMem control to 1. Main memory puts block on data bus. CPU reads data from data bus, and writes it into cache. (This may take several bus clock cycles, depending on block size.)

slide-8
SLIDE 8

Peripherals and I/O "device" controllers

  • interface between devices and system bus
  • contain registers, clock, memory, processor ("driver

software" is part of OS and thus is in main memory or on hard disk -- not shown)

slide-9
SLIDE 9

e.g. 1: Keyboard

input one byte at a time

keyboard controller

slide-10
SLIDE 10

e.g. 2: Mouse (historical)

address data control controller contains circuits that read system bus and convert mouse packets into data to go onto data bus. mouse contains sensors (button, XY position, ..) Packets of data are sent along wire:

  • button pressed?
  • X, Y position
  • scroll

mouse controller

slide-11
SLIDE 11

keyboard mouse 6 pins

e.g. PS/2 connection port

https://en.wikipedia.org/wiki/PS/2_port

In the past 10 years has been replaced by USB ports. (Even though USB is a standard port, any particular mouse hardware will still require driver software. Usually ships with the OS or automatically downloads/updates.)

slide-12
SLIDE 12

void mouse(int button, int state, int x, int y) { if (state == DOWN) { switch( button ) { case LEFT_BUTTON: // do something break; case RIGHT_BUTTON: // do something else break; } }

e.g. reading mouse input in an application

In the next few lectures I will say more about how the application (running

  • n CPU) interacts with

mouse controller.

slide-13
SLIDE 13

e.g. 3 output device: screen

draw commands (contour position, direction, thickness) pixels (picture elements)

slide-14
SLIDE 14
  • Windows Journal file (these slides!)
  • Adobe Postscript file (and PDF)

Ultimately these produce pixels if displayed on monitor or printer, but this conversion happens on the device. printer output display output (screen, monitor, projector)

slide-15
SLIDE 15

% Polyline 0 slj 0 slc 7.500 slw n 2490 1605 m 1665 2745 l 2475 3990 l 3585 2820 l 3315 1755 l 2475 1590 l gs col0 s gr

Postscript Example (polygon)

http://paulbourke.net/dataformats/postscript/

set line join set line width

slide-16
SLIDE 16

address data control instructions in postscrip language

Postscript Printer

printer controller

slide-17
SLIDE 17

% Polyline 0 slj 0 slc 7.500 slw n 2115 2790 m 3600 1980 l gs col0 s gr

Postscript Interpreter

  • a program that converts a PostScript program into a pixel

("raster") image

  • lives inside printer, not to be confused with the printer "driver"

which is in the CPU PostScript interpreter printed page or display

instructions in postscript language

slide-18
SLIDE 18

Display

slide-19
SLIDE 19

rows columns RGB

Computer Graphics and Video

suppose your computer is generating the images e.g. game

Making images is alot of work, and sending images to display on the system bus would create a bottleneck. image frames /sec

slide-20
SLIDE 20

Graphics cards (industry grew quickly in 1990s)

Instead, the CPU sends 'high level' instructions to the GPU (graphics card) and the GPU does the work of making and displaying the images.

slide-21
SLIDE 21

Modern graphics cards are massively parallel (thousands of specialized processors) and computationally powerful, and very expensive.

slide-22
SLIDE 22

PCI - Peripheral Component Interconnect

1990's buses

slide-23
SLIDE 23

Modern computers (since 2000) use a combination of small shared buses and "point-to-point" connections. If you want to read more, see e.g.: https://en.wikipedia.org/wiki/Northbridge_(computing) https://en.wikipedia.org/wiki/Southbridge_(computing)