Memory Mapped I/O - Winthrop

Memory Mapped I/O - Winthrop

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.

Recently Viewed Presentations

  • Bayfirst Solutions Llc: an Overview of Our Services

    Bayfirst Solutions Llc: an Overview of Our Services

    Program Management Risk Management ABOUT BAYFIRST SOLUTIONS LLC - 8(A) CERTIFIED What is BayFirst Solutions LLC BAYFIRST is a management and technology consulting firm working successfully at all levels in government from the 'trenches' to the top tier policy makers.
  • The Skin - Ms. Trimble's Website

    The Skin - Ms. Trimble's Website

    The skin acts as a physical barrier and its acidic secretions discourage the growth of pathogens on the surface. ... The body surface is divided into 9 regions the extent of the burn injury is based on this. Head and...
  • Brainstorming Power: Inventing Your Topic, Thesis Statement ...

    Brainstorming Power: Inventing Your Topic, Thesis Statement ...

    Brainstorming Power: Inventing Your Topic, Thesis Statement, and Organization. Michelle LaFrance. Staci Pribush
  • VEX and Robot C Presented by Chris Patterson

    VEX and Robot C Presented by Chris Patterson

    The VEX Kit. VEX Robotics Platform:Testbed for Learning Programming. ... A motor turns on once the bump switch is touched and then turns off once the limit ... A motor turns on clockwise at full power when the potentiometer is...
  • Summary - nas-sites.org

    Summary - nas-sites.org

    Hou, P., Cai, J., Qu, S., & Xu, M. (2018). Estimating missing unit process data in life cycle assessment using a similarity-based approach. Environmental . Science & Technology, 52 (9), 5259-5267. We can estimate missing data in ecoinvent database with...
  • OE/AAA Processes & E-Filing - NH.gov

    OE/AAA Processes & E-Filing - NH.gov

    Miscellaneous . Bill Board Structures will require site plan, dimensions, and construction details and coordinate locations, and an identification if bill board is digital.In addition, reference to either True North or Airport layout depicting runway configuration. Flagpoles. will require a...
  • ENERGY STAR for Buildings and Plants

    ENERGY STAR for Buildings and Plants

    A good example of this is a tenant sub-meter which is used for billing purposes, but has already been captured in the building's master meter. The LP must verify that this is a sub-meter and that it should not be...
  • Cropping VHT Basic/Supported MCS Sets from Below

    Cropping VHT Basic/Supported MCS Sets from Below

    Cropping VHT Basic/Supported MCS Sets from Below Date: 2012-03-06 Brian Hart, Cisco Systems Slide * Slide * Situation (1/3) Very challenging environment 500 people each with devices in close proximity, starting with 20-40% retries in reality Native client algorithms are...