Memory Mapped I/O. What is Memory Mapped I/O? Instead of having special methods for accessing the values to be read or written, just get them from memory.

Slides:



Advertisements
Similar presentations
Input and Output CS 215 Lecture #20.
Advertisements

Lecture Objectives: 1)Explain the limitations of flash memory. 2)Define wear leveling. 3)Define the term IO Transaction 4)Define the terms synchronous.
Avishai Wool lecture Introduction to Systems Programming Lecture 8 Input-Output.
CS 430 – Computer Architecture 1 CS 430 – Computer Architecture Input/Output: Polling and Interrupts William J. Taffe using the slides of David Patterson.
ECE 15B Computer Organization Spring 2010 Dmitri Strukov Lecture 9 and 10: Wrap-up of hardware Partially adapted from Computer Organization and Design,
Logical & shift ops (1) Fall 2007 Lecture 05: Logical Operations.
CS61C L13 I/O © UC Regents 1 CS61C - Machine Structures Lecture 13 - Input/Output: Polling and Interrupts October 11, 2000 David Patterson
CS 61C L39 I/O (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures.
CS61C L37 I/O (1) Garcia © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
Cs 61C L12 I/O.1 Patterson Spring 99 ©UCB CS61C Input/Output Lecture 12 February 26, 1999 Dave Patterson (http.cs.berkeley.edu/~patterson) www-inst.eecs.berkeley.edu/~cs61c/schedule.html.
CMPUT Computer Organization and Architecture I1 CMPUT229 - Fall 2003 Topic8: Input/Output Programming José Nelson Amaral.
1 COMP541 Final Missing Pieces of MIPS: Adding Memory & I/O Montek Singh Oct 29, 2014.
Input and Output How things get into and out of the CPU.
1 COMP541 Completing the MIPS Datapath Montek Singh Mar 27, 2007.
Practical Session No. 10 Input &Output (I/O). I/O Devices Input/output (I/O) devices provide the means to interact with the “outside world”. An I/O device.
0 What is a computer?  Simply put, a computer is a sophisticated electronic calculating machine that:  Accepts input information,  Processes the information.
Group 7 Jhonathan Briceño Reginal Etienne Christian Kruger Felix Martinez Dane Minott Immer S Rivera Ander Sahonero.
Input / Output CS 537 – Introduction to Operating Systems.
MIPS I/O and Interrupt. SPIM I/O and MIPS Interrupts The materials of this lecture can be found in A7-A8 (3 rd Edition) and B7-B8 (4 th Edition).
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
Introduction to Computing Systems from bits & gates to C & beyond Chapter 8 Input/Output Basic organization Keyboard input Monitor output Interrupts DMA.
Chapter 8 Input/Output l I/O basics l Keyboard input l Monitor output l Interrupt driven I/O l DMA.
Interrupts. 2 Definition: An electrical signal sent to the CPU (at any time) to alert it to the occurrence of some event that needs its attention Purpose:
Input/OUTPUT [I/O Module structure].
CS 61C L7.1.1 VM I (1) K. Meinz, Summer 2004 © UCB CS61C : Machine Structures Lecture VM I Kurt Meinz inst.eecs.berkeley.edu/~cs61c.
Input and Output Computer Organization and Assembly Language: Module 9.
Interrupts and DMA CSCI The Role of the Operating System in Performing I/O Two main jobs of a computer are: –Processing –Performing I/O manage and.
1. Introduction 2. Methods for I/O Operations 3. Buses 4. Liquid Crystal Displays 5. Other Types of Displays 6. Graphics Adapters 7. Optical Discs 10/01/20151Input/Output.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Overview of Hardware.
I/O Example: Disk Drives To access data: — seek: position head over the proper track (8 to 20 ms. avg.) — rotational latency: wait for desired sector (.5.
Chapter 8 I/O. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 8-2 I/O: Connecting to Outside World So far,
Input/Output 2 What is I/O? How we get the CPU to communicate with devices From the computer’s point of view, it’s just 1’s and 0’s Gets interpreted.
MIPS I/O and Interrupt. .data val1:.float 0.6 val2:.float 0.8 msg_done:.asciiz "done\n".text.globl main main: li.s $f0, mfc1 $a0, $f0 jal calsqrt.
1 COMP541 Final Missing Pieces of MIPS: Adding Memory & I/O Montek Singh Apr 11, 2012.
 8251A is a USART (Universal Synchronous Asynchronous Receiver Transmitter) for serial data communication.  Programmable peripheral designed for synchronous.
10-Sep Fall 2001: copyright ©T. Pearce, D. Hutchinson, L. Marshall Sept Recall Objective: understand computers at machine level interested.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
Computer System Internal components - The processor - Main memory - I / O controllers - Buses External components (peripherals). These include: - keyboard.
Modes of transfer in computer
Interrupt driven I/O. MIPS RISC Exception Mechanism The processor operates in The processor operates in user mode user mode kernel mode kernel mode Access.
MIPS I/O and Interrupt.
Instructor: Francis G. Wolff Case Western Reserve University This presentation uses powerpoint animation: please viewshow EECS 322.
1 Lecture 1: Computer System Structures We go over the aspects of computer architecture relevant to OS design  overview  input and output (I/O) organization.
Computer Architecture Lecture – 4.  Discussed individual functional units of the computer.  But to form a fully computational unit, they must be connected.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Interrupt driven I/O Computer Organization and Assembly Language: Module 12.
TANNENBAUM: 5, BIC & SHAW, SILBERSCHATZ: 12 INPUT/OUTPUT DEVICE DRIVERS.
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 2, 2005 I/O through system calls Protection.
Copyright © 2007 by Curt Hill Interrupts How the system responds.
Input Output Techniques Programmed Interrupt driven Direct Memory Access (DMA)
BCS361: Computer Architecture I/O Devices. 2 Input/Output CPU Cache Bus MemoryDiskNetworkUSBDVD …
MISP Exception Facility Supported by SPIM simulator.
Practical Session 12 Input &Output (I/O). I/O Device Input / Output (I/O) devices Input / Output (I/O) devices provide the means to interact with the.
Pigeon Hole Device What does it resemble? What can it do? How could it be improved? Will it ever look familiar? How much ‘memory’ does it have? What kind.
8251 USART.
Chapter 8 Input/Output An Hong 2015 Fall School of Computer Science and Technology Lecture on Introduction to.
Exceptions and Interrupts ◆ Breakpoints, arithmetic overflow, traps, and interrupts are all classified as exceptions. ◆ An exception is an event that requires.
Computer Science 210 Computer Organization
Computer System Structures
I/O Systems.
MIPS I/O and Interrupt.
Input/Output.
Inst.eecs.berkeley.edu/~cs61c UC Berkeley CS61C : Machine Structures Lecture 35 – Input / Output Lecturer SOE Dan Garcia
Computer Science 210 Computer Organization
MIPS I/O and Interrupt.
MIPS I/O and Interrupt.
MIPS Assembly.
MIPS I/O and Interrupt.
Chapter 8 I/O.
CS61C - Machine Structures Lecture 14 - Input/Output
Presentation transcript:

Memory Mapped I/O

What is Memory Mapped I/O? Instead of having special methods for accessing the values to be read or written, just get them from memory or put them into memory. The device is connected directly to certain main memory locations. Two types of information to/from the device – Status – Value read/write

Why use Memory Mapped I/O Makes programming simpler. Do not have special commands to access I/O devices. – Just use lw and sw. Takes some memory locations – Very few compared to the size of main memory.

Which Memory? Memory addresses xffff0000 and above are used for I/O devices. The device controller has “registers”. These registers are given a memory address. Recall that the processor is attached to a bus, memory is attached to the bus, I/O devices are attached to the bus. – When the bus sees certain addresses, it knows they are not memory addresses, but are addresses for accessing I/O devices.

Communicating with the Keyboard The keyboard has 2 registers associated with it – Receiver control at address xffff0000 – Receiver data at address xffff0004 The receiver control will have a 1 in the rightmost bit when there is a value ready to be read. It will have a 0 in that bit otherwise. The receiver data will have the character pressed on the keyboard (only when the receiver control has a 1 in the rightmost bit)

Polling To read, you go: do you have something now? Now? Now? Now? Ok now read the value. li$t4, 0xffff0000 #rec. control addr again: lw $t1,0($t4) #get rec. control value andi$t1, $t1, 1 #get rightmost bit beqz$t1, again #if not ready check again lw $t0, 4($t4) #get char. from rec. data

Display Again 2 registers – Transmitter control (0xffff008) – Transmitter data (0xffff000c) li$t4, 0xffff0000 again: lw $t1, 8($t4) andi $t1,$t1,1 beqz $t1,again sw$t0, 12($t4)

Working with Memory Mapped I/O When using memory mapped I/O on Spim, you must check the Mapped I/O box in the options. A real MIPS system (not one simulated by Spim) will have many more control/data register pairs for all of the devices. Must make sure you empty the data register before key is pressed again. Accessing the data register resets the status register.