COMPUTER HARDWARE. Input- Output and Communication Memory Systems



Similar documents
Computer Performance. Topic 3. Contents. Prerequisite knowledge Before studying this topic you should be able to:

Computer Systems Structure Input/Output

Communicating with devices

Computer Organization & Architecture Lecture #19

The Quest for Speed - Memory. Cache Memory. A Solution: Memory Hierarchy. Memory Hierarchy

We r e going to play Final (exam) Jeopardy! "Answers:" "Questions:" - 1 -

1. Computer System Structure and Components

Memory Hierarchy. Arquitectura de Computadoras. Centro de Investigación n y de Estudios Avanzados del IPN. adiaz@cinvestav.mx. MemoryHierarchy- 1

CSE2102 Digital Design II - Topics CSE Digital Design II

CPS104 Computer Organization and Programming Lecture 18: Input-Output. Robert Wagner

Input / Ouput devices. I/O Chapter 8. Goals & Constraints. Measures of Performance. Anatomy of a Disk Drive. Introduction - 8.1

Introduction the Serial Communications Huang Sections 9.2, 10.2 SCI Block User Guide SPI Block User Guide

Lizy Kurian John Electrical and Computer Engineering Department, The University of Texas as Austin

Chapter 1 Computer System Overview

CSCA0102 IT & Business Applications. Foundation in Business Information Technology School of Engineering & Computing Sciences FTMS College Global

Elettronica dei Sistemi Digitali Costantino Giaconia SERIAL I/O COMMON PROTOCOLS

Chapter 6. Inside the System Unit. What You Will Learn... Computers Are Your Future. What You Will Learn... Describing Hardware Performance

Chapter 11 I/O Management and Disk Scheduling

Memory unit. 2 k words. n bits per word

Memory ICS 233. Computer Architecture and Assembly Language Prof. Muhamed Mudawar

Computer Systems Structure Main Memory Organization

Quiz for Chapter 6 Storage and Other I/O Topics 3.10

Serial Communications

CHAPTER 7: The CPU and Memory

OpenSPARC T1 Processor

Data Cables. Schmitt TTL LABORATORY ELECTRONICS II

Central Processing Unit

361 Computer Architecture Lecture 14: Cache Memory

UMBC. ISA is the oldest of all these and today s computers still have a ISA bus interface. in form of an ISA slot (connection) on the main board.

Read this before starting!

COMPUTER SCIENCE AND ENGINEERING - Microprocessor Systems - Mitchell Aaron Thornton

Computer-System Architecture

MICROPROCESSOR AND MICROCOMPUTER BASICS

Primary Memory. Input Units CPU (Central Processing Unit)

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

Price/performance Modern Memory Hierarchy

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Secondary Storage. Any modern computer system will incorporate (at least) two levels of storage: magnetic disk/optical devices/tape systems

- Nishad Nerurkar. - Aniket Mhatre

Have both hardware and software. Want to hide the details from the programmer (user).

Data Storage - I: Memory Hierarchies & Disks

Chapter 2: Computer-System Structures. Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General System Architecture

Computer Architecture

CS 6290 I/O and Storage. Milos Prvulovic

File System & Device Drive. Overview of Mass Storage Structure. Moving head Disk Mechanism. HDD Pictures 11/13/2014. CS341: Operating System

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

Chapter Introduction. Storage and Other I/O Topics. p. 570( 頁 585) Fig I/O devices can be characterized by. I/O bus connections

Project 4: Pseudo USB Simulation Introduction to UNIVERSAL SERIAL BUS (USB) STANDARD

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

Introduction To Computers: Hardware and Software

Chapter 3: Computer Hardware Components: CPU, Memory, and I/O

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

OC By Arsene Fansi T. POLIMI

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

Process Control and Automation using Modbus Protocol

Computer Peripherals

Computer Architecture Prof. Mainak Chaudhuri Department of Computer Science and Engineering Indian Institute of Technology, Kanpur

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

Chapter 13. PIC Family Microcontroller

Chapter 11: Input/Output Organisation. Lesson 06: Programmed IO

Implementing SPI Communication Between MSP430 G2452 and LTC ADC

Homework # 2. Solutions. 4.1 What are the differences among sequential access, direct access, and random access?

Multiple Choice Questions(Computer)

COMPUTER ARCHITECTURE. Input/Output

A DIY Hardware Packet Sniffer

AMD Opteron Quad-Core

Application Note 132. Introduction. Voice Video and Data Communications using a 2-Port Switch and Generic Bus Interface KSZ MQL/MVL

Quick Installation. A Series of Intelligent Bar Code Reader with NeuroFuzzy Decoding. Quick Installation

Logical Operations. Control Unit. Contents. Arithmetic Operations. Objectives. The Central Processing Unit: Arithmetic / Logic Unit.

Storage. The text highlighted in green in these slides contain external hyperlinks. 1 / 14

Open Architecture Design for GPS Applications Yves Théroux, BAE Systems Canada

Microprocessor & Assembly Language

Hardware: Input, Processing, and Output Devices. A PC in Every Home. Assembling a Computer System

Chapter 1 Lesson 3 Hardware Elements in the Embedded Systems Chapter-1L03: "Embedded Systems - ", Raj Kamal, Publs.: McGraw-Hill Education

Chapter 4 System Unit Components. Discovering Computers Your Interactive Guide to the Digital World

Introduction to Information System Layers and Hardware. Introduction to Information System Components Chapter 1 Part 1 of 4 CA M S Mehta, FCA

Switch Fabric Implementation Using Shared Memory

Input/output (I/O) I/O devices. Performance aspects. CS/COE1541: Intro. to Computer Architecture. Input/output subsystem.

Location-Aware and Safer Cards: Enhancing RFID Security and Privacy

Computer Architecture

Chapter 5 Busses, Ports and Connecting Peripherals

LIN (Local Interconnect Network):

Serial Communications

What is a bus? A Bus is: Advantages of Buses. Disadvantage of Buses. Master versus Slave. The General Organization of a Bus

Am186ER/Am188ER AMD Continues 16-bit Innovation

Writing Assignment #2 due Today (5:00pm) - Post on your CSC101 webpage - Ask if you have questions! Lab #2 Today. Quiz #1 Tomorrow (Lectures 1-7)

8051 Serial Port. Crystal TXD. I/O Device RXD. Embedded Systems Peripherals

Understanding Digital Components

PART B QUESTIONS AND ANSWERS UNIT I

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

Chapter 1. The largest computers, used mainly for research, are called a. microcomputers. b. maxicomputers. c. supercomputers. d. mainframe computers.

Objectives. Basics of Serial Communication. Simplex vs Duplex. CMPE328 Microprocessors (Spring ) Serial Interfacing. By Dr.

Computer Network. Interconnected collection of autonomous computers that are able to exchange information

SPI I2C LIN Ethernet. u Today: Wired embedded networks. u Next lecture: CAN bus u Then: wireless embedded network

Learning Outcomes. Simple CPU Operation and Buses. Composition of a CPU. A simple CPU design

Chapter 2 Logic Gates and Introduction to Computer Architecture

Discovering Computers Living in a Digital World

Freescale Semiconductor, Inc. Product Brief Integrated Portable System Processor DragonBall ΤΜ

Microtronics technologies Mobile:

Transcription:

COMPUTER HARDWARE Input- Output and Communication Memory Systems

Computer I/O I/O devices commonly found in Computer systems Keyboards Displays Printers Magnetic Drives Compact disk read only memory (CD-ROM) Others Modems or other communications devices Scanners Sound cards with speakers and microphones Significant numbers of computers, such as those used in automobiles Analog-to-digital converters Digital-to-analog converters Data acquisition and control components

Sample Peripherals Devices that the CPU controls directly are said to be connected online. Input or output devices attached to the computer online are called peripherals Keyboard Hard Drive Liquid Crystal Display Screen

Keyboard Scan matrix lies beneath the keys. Whether a key is depressed and released, the control code at the time of the event is sensed and is translated 12-1 by the microcontroller into K-scan code. When a key is depressed, a make code is produced, when a key is released a break code is produced. 4 Multiplexer Microcontroller 3 X Decoder Y

Hard Drive The hard drive is the primary intermediate-speed, nonvolatile, writable storage medium. Revolutions Per Minute (rpm) : rotational speed of a disk 12-2 Disk access time and transfer time Track Sector Head positioning 2008 Pearson Education, Inc. M. Morris Mano & Charles R. Kime LOGIC AND COMPUTER DESIGN FUNDAMENTALS, 4e

Liquid Crystal Display (LCD) Screen The display screen is defined in terms of picture elements called pixels The color display has three subpixels correspond to the primary colors red, green and blue (RGB)

I/O Processors I/O Processors handles all of the interactions between the I/O devices and the CPU. I/O Processors communicates with input and output devices through separate address, data, and control lines. This provides an independent pathway for the transfer of information between external devices and internal memory. Relieves the CPU of I/O device chores Input-Output Processor (IOP) Classified as a processor with direct memory access capability. IOP fetches and execute its own instructions u Independent of the CPU u CPU initiating the IOP program CPU is the master processor. IOP is considered the slave processors There can be more than one or more IOP s

The Process of the IOP CPU Instructions Sends Command to test IOP path Status approved and sends I/O commands CPU continues with other process Request IOP status Check status for correct transfer. IOP Operations Transfer status to Memory location Access memory for IOP Commands Conduct I/O transfer I/O transfer completed, send status to CPU Transfer status to memory location

I/O Interfaces The differences with CPU Peripherals are often electromechanical devices whose manner of operation is different. A conversion of signal values may be required. The data transfer rare is different from the clock rate of the CPU. A synchronization mechanism may be needed. Data codes and formats differ from the word format in CPU. The operating modes od peripherals differ from each other.

I/O Bus and Interface Unit 12-5 A typical communication structure between the CPU and several peripherals. Central processing unit (CPU) Data bus Address bus Control Interface Interface Interface Interface Keyboard CRT display Printer Magnetic disk Input device Output device Output device Input and output device

I/O Configurations The I/O configurations Memory-mapped: Use common data, address, and control busses for both memory and I/O Isolated: Share a common address and data but, but use different control lines.

12-6 12-6 Example of I/O Interface Bidirectional Bidirectional data bus data bus Chip select Chip select Register select Register select I/O read I/O read I/O write I/O write To CPU Bus buffers Bus buffers CS CS RS1 RS1 RS0 Timing and RS0 Timing control RD and control RD WR WR Internal bus Internal bus Port A register Port A register Port B register Port B register Control register Control register Status register Status register To I/O device I/O data I/O data I/O data I/O data Control lines Control lines Status lines Status lines To CPU CS CS0 1 0 1 1 1 1 1 2008 Pearson Education, Inc. 1 1 0 M. Morris Mano & Charles R. Kime LOGIC 2008 Pearson AND COMPUTER Education, Inc. DESIGN 1 FUNDAMENTALS,4e 1 1 M. Morris Mano & Charles R. Kime RS1 RS0 Register selected To I/O device RS1 X RS0 X None: data Register bus in selected high-impedance state 0 0 Port A register X 0 X 1 None: Port B data register bus in high-impedance state 0 1 0 0 Port Control A register register 0 1 1 1 Port Status B register register Control register Status register

Strobing The data bus between the two units is assumed to be 12-7 made bidirectional by the use of three state buffers. 12-7 Data bus Data bus Destination unit Strobe Source unit Destination unit Strobe Source unit Data bus Data bus Strobe Strobe (a) Destination-initiated transfer (a) Destination-initiated transfer Source unit Source unit Data bus Data bus Strobe Strobe Destination unit Destination unit Data bus Data bus Strobe Strobe 2008 Pearson Education, Inc. M. 2008 MorrisPearson Mano & Education, Charles R. Inc. Kime LOGIC M. Morris AND Mano COMPUTER & CharlesDESIGN R. Kime FUNDAMENTALS, 4e LOGIC AND COMPUTER DESIGN FUNDAMENTALS, 4e (b) Source-initiated transfer (b) Source-initiated transfer

Handshaking Use two control signals to deal with the timing of transfers 12-8 Databus Destination unit Request Source unit Reply Data bus Request Reply (a) Destination-initiated transfer Source unit Data bus Request Reply Destination unit Data bus Request Reply (b) Source-initiated transfer 2008 Pearson Education, Inc. M. Morris Mano & Charles R. Kime LOGIC AND COMPUTER DESIGN FUNDAMENTALS,4e

Serial Communication Two forms of communication Parallel communication u Transfers more than one bit of data at a given time u N-bits transmitted at the same time through n- wires u Faster but requires many wires and is used in short distances u EX: Input/output devices, DMA controllers, and I/O processors Serial Communication u Serial communication refers to devices that cannot handle more than one bit of data at any given time by design. u Requires one wire and is slower. u Usually CPU use Parallel communication, if the device is serial, then the data is converted to use Parallel communication u EX: Modems

Serial Communication Serial transmission is slower but less expensive and easy. The devices that do the conversion to digital signals are called data sets or modems. Three different modes Simplex: Carry information in one direction only. Half-duplex: capable of transmitting in both direction but in only one direction at a time. Full-duplex: send and receive data in both directions simultaneously. Device must agree on number of data bits per data transmission. Parity Bits: Error checking Stop Bits: End of transmission

Two types of Serial Communication Asynchronous Serial Communication Interacts with devices outside of the computer u Ex: modem connecting to another computer Transmit individual bytes instead of large blocks Do not share a common clock. Synchronous Serial transmission Transmits block of data in frames. u Frames are had head in front of the data and a tail at the end of the data. The head and tail contain information that allows the two computers to synchronize their clocks

Synchronous Transmission Instead of transmitting a start and stop bit for each data value, Synchronous transmission strings together several data values into a data block called a frame. There are several layers in the frame, similar to a data packet. There is a leading information, address of where the data is going, control ensure correct destination, the data it self, Cyclic redundancy check (CRC) to check there is no error and the trailing information

Asynchronous Serial Communication Each byte is transmitted separate entity. The Device must be able to recognize: u When transmission is occurring u When to read a bit of data u When the transmission ends u When the transmission is idle (no data being transmitted) Steps: Device 1 transmission will output a start bit u A line of transmission is used to describe the communication. Device 2 receives and confirms the bit. Device 2 begins to read a data bit off the line Then the process repeats however many data bits are on the line. The least significant bit is sent first and most important significant bit is sent last. Then Device 2 receives and confirms stop bit

Universal Asynchronous Receiver/Transmitters (UARTs) Asynchronous serial communication is a popular function. Manufacturers have designed special chip to deal with Asynchronous serial communication. This relieves the CPU of this task It is used to convert serial communication to parallel communication when receiving and convert parallel communication to serial when sending CPU sends command to the UARTs control register to determine the number of data bits, parity, and the number of stop bits to be used in transmission

Modes of Transfer Data transfer to and from peripherals may be handled in one of three possible modes. Data transfer under program control Interrupt-initiated data transfer Direct memory access (DMA) transfer. DMA DMA improves system performance by speeding up data transfer between memory and I/O System Bypass CPU, allow CPU to be use in another process. DMA controllers must manipulates each data transfer from I/O devices, and can only read

DMA Transfer 12-20 Interrupt BG CPU Memory BR RD WR Address Data RD WR Address Data Read control Write control Address bus Address decoder DS RS BR RD BG Interrupt 2008 Pearson Education, Inc. M. Morris Mano & Charles R. Kime LOGIC AND COMPUTER DESIGN FUNDAMENTALS, 4e WR Address Data DMA controller Data bus DMA request DMA acknowledge I/O peripheral device

The Memory System: Memory Hierarchy A Memory System is normally comprised of a hierarchy of memories: Cache - very fast (1 or 2 cycle access), but small (e.g. 32 KB-64 KB) built with SRAM on-board the processor chip designed as two separate caches (to improve bandwidth) - one for instructions and one for data Main Memory - larger (typically 32 MB 512 MB) and slower (50 ns access) than cache built with DRAM chips on separate modules/card Virtual Memory - very large (say 2 GB - 16 GB), but also very slow (15-20 ms access) built with magnetic (hard) disk Ideally, we would like the memory system to always appear as very large and very fast!!

13-1 The Memory System: Memory Hierarchy CPU Cache Main memory Hard drive 13-2 2008 Pearson Education, Inc. M. Morris Mano & Charles R. Kime LOGIC AND COMPUTER DESIGN FUNDAMENTALS,4e CPU Instruction cache Data cache Main memory Hard disk

Memory Systems: Hierarchy Concept of an infinite cache: fetches by the CPU for instructions or data normally come from cache (say 95% of time) if instructions or operands are not in cache, a "miss" occurs and CPU waits while MMU (memory management unit) goes to main memory for the missing instruction or operand on the very rare occasion that the operand or instruction is not in main memory, the CPU must go to the hard disk to find it (while the processor either waits idle or branches) u most of the time the instructions/data are available in cache giving the appearance of a large, fast memory! Memory addressing: 32 bit address can access 4 GB of data/ instructions Speed & Cost of 4GB DRAM Main Memory: u if all memory were only main memory (DRAM), 4 GB would cost $24,000 at $6/MB u access time would be only 50 ns, rather than the 2-3 ns obtainable with onboard cache Memory hierarchy is essential to achieving high speed, large memory, & low cost!!!

The Ideal Memory System Assume the memory hierarchy on the previous chart is comprised of the following: 2 on-chip 32 MB caches running at 3 ns cycle time (single cycle cache) u perform instruction fetch from I-cache while concurrently fetching operands or writing data in D-cache u assume we find instructions and data in the caches (hit) 95% of the time 64 MB DRAM main memory operating at 50 ns cycle time u assume of the 5% cache misses, we find the data in main memory 99.9999% of the time, i.e. we have to go to the hard disk drive for the data or instructions only 0.000005% of the time 4 GB hard disk (virtual memory) with a 16 ms latency (random access time) Apparent access time: System cost: u (0.95 x 3 ns) + (0.04999995 x 50 ns) + (5E-8 x 16 ms) = 6.15 ns u SRAM cache adds ~$70 to cost of processor chip u DRAM cost = ~$380 at $6/MB u 4 GB Hard disk cost = ~$200 u Total cost to system = ~$650 By all appearances, a very large, very fast, and cheap memory system!

Why it works: Locality of Reference temporal locality programs tend to contain loops (often nested loops) where an instruction and/or data are accessed many times in sequence spatial locality instructions and/or data that are stored in contiguous (neighboring) locations are often repeatedly accessed for reading or writing in a typical program memory hierarchy makes use of temporal and spatial locality by transferring at one time a group of instructions/data into cache or into main memory A group of instructions or data transferred from main memory into cache is called a line of data (say 32 bytes) A group of instructions or data transferred from disk storage into main memory is called a page of data (say 4K bytes) u Virtual memory = the appearance that all 4GB addressable memory resides in main memory Studies of the execution of computer programs have demonstrated the importance of locality of reference in designing a hierarchical memory system. Temporal and spatial locality allow us to achieve a near infinite cache in practice for the operation of most computer programs! thrashing = phenomenon of frequent disk accesses due to a particular program perhaps accessing a database which does not fit entirely into main memory Solution: need a larger main memory!

Cache Memory Organization Cache organization schemes: direct mapped fully associative set-associative Line: A block of data transferred into cache at a given time (4B in text illustrations) the memory address is comprised of 5 bit tag, 3 bit index, and 2 bit byte fields the cache stores both the data (line) as well as the main memory address (tag) of the data Hit and Miss When CPU requests data from cache, the address of requested data is compared with addresses of data in cache. If both tag and index addresses match (called a cache hit), the requested data is present in cache u data word (or byte) is transferred to CPU If the address of requested data does not match tag plus index address of data present in cache, the cache signals the CPU that a cache miss has occurred. u Main memory transfers a new line (containing the requested data word) into the cache and also sends the requested word (or byte) along to the CPU When a cache miss occurs and a new line of data is to be transferred in from main memory, the cache is likely already full of existing data lines so that one of them needs to be replaced with the new data line. If the line to be replaced has been changed since it was brought in from main memory, it must be written back into main memory first.

13-3 Cache Memory Organization 9 8 7 6 5 4 3 2 1 0 Index 000 001 010 011 100 101 110 111 Cache: Eight 32-bit word. Main memory with 1 KB (256 Words) Cache address: 3 bits Tag Index Byte (a) Memory address Tag 00000 Cache Memory Address = 10 bits 2008 Pearson Education, Inc. M. Morris Mano & Charles R. Kime LOGIC AND COMPUTER DESIGN FUNDAMENTALS, 4e Data Direct-mapped cache Address 0000000000 0000000100 0000001000 0000001100 0000010000 0000010100 0000011000 0000011100 1111100000 1111100100 1111101000 1111101100 1111110000 1111110100 1111111000 1111111100 Data Main memory (b) Cache mapping

Virtual Memory Concept and Implementation Virtual Memory is large memory storage addressable by 32 bit (or higher) memory address but beyond the size capability of the physical address space in main memory desire that virtual memory appears to the CPU to be main memory u addressability u average latency not to exceed main memory access time by very much each program sees a memory space equal to the virtual address space u the hardware must map each virtual address into a physical address in main memory Virtual address space from different programs may map to the same physical address space u Allows code and data to be shared across multiple programs normally implemented with hard disk (or tape drive) storage Pages: Blocks of addresses in virtual memory which map into physical page frames of identical size in main memory u analogous to "line" in main memory/cache hierarchy