lecture 19 input output i o
play

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


  1. lecture 19 Input / Output (I/O) - system bus - input e.g. keyboard, mouse - output e.g. printer, display screen Mon. March 21, 2016

  2. System "Bus" (up to mid 1990's only) system bus 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.

  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.

  4. System Bus has... - address lines (each device or component attached to the bus has a bus address) - data lines - control lines

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

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

  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.)

  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)

  9. e.g. 1: Keyboard input one byte at a time keyboard controller

  10. e.g. 2: Mouse (historical) controller contains circuits that read mouse contains system bus and sensors (button, convert mouse XY position, ..) packets into data to go onto data bus. Packets of data are sent along wire: - button pressed? - X, Y position - scroll mouse controller address data control

  11. e.g. PS/2 connection port https://en.wikipedia.org/wiki/PS/2_port keyboard mouse 6 pins 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.)

  12. e.g. reading mouse input in an application void mouse(int button, int state, int x, int y) { if (state == DOWN) { switch( button ) { case LEFT_BUTTON: // do something In the next few lectures I break; will say more about how case RIGHT_BUTTON: the application (running on CPU) interacts with // do something else mouse controller. break; } }

  13. e.g. 3 output device: screen pixels draw commands (picture elements) (contour position, direction, thickness)

  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)

  15. Postscript Example (polygon) http://paulbourke.net/dataformats/postscript/ % 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 set line join set line width

  16. Postscript Printer instructions in postscrip language printer controller address data control

  17. 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 % Polyline 0 slj PostScript 0 slc interpreter 7.500 slw n 2115 2790 m 3600 1980 l instructions in gs col0 s gr postscript printed page or display language

  18. Display

  19. Computer Graphics and Video suppose your computer is generating the images e.g. game image rows columns RGB frames /sec Making images is alot of work, and sending images to display on the system bus would create a bottleneck.

  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.

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

  22. 1990's buses PCI - Peripheral Component Interconnect

  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)

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend