FACTOID # 8: Bookworms: Vermont has the highest number of high school teachers per capita and third highest number of librarians per capita.
 
 Home   Encyclopedia   Statistics   States A-Z   Flags   Maps   FAQ   About 
   
 
WHAT'S NEW
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > Memory map

Memory-mapped I/O (MMIO) and port I/O (also called port-mapped I/O or PMIO) are two complementary methods of performing input/output between the CPU and I/O devices in a computer. Another method is using dedicated I/O processors (channels, used in IBM mainframe computers). This article is about the computer interface. ... This CPU uses numerous pins to connect to the motherboard. ... A computer is a device or machine for making calculations or controlling operations that are expressible in numerical or logical terms. ... International Business Machines Corporation (IBM, or colloquially, Big Blue) (NYSE: IBM) (incorporated June 15, 1911, in operation since 1888) is headquartered in Armonk, NY, USA. The company manufactures and sells computer hardware, software, and services. ... Mainframes (often colloquially referred to as big iron) are large and expensive computers used mainly by government institutions and large companies for legacy applications, typically bulk data processing (such as censuses, industry/consumer statistics, ERP, and bank transaction processing). ...


Memory-mapped I/O uses the same bus to address both memory and I/O devices, and the CPU instructions used to read and write to memory are also used in accessing I/O devices. In order to accommodate the I/O devices, areas of CPU addressable space must be reserved for I/O rather than memory. This does not have to be permanent, for example the Commodore 64 could bank switch between its I/O devices and regular memory. The I/O devices monitor the CPU's address bus and respond to any CPU access of their assigned address space, mapping the address to their hardware registers. The Commodore 64 (C64, CBM 64) was a popular home computer of the 1980s. ... Bank switching (also known as paging, but unrelated to the ordinary meaning of this term in computing) was a technique common in 8-bit microcomputer systems, to increase the amount of addressable RAM and ROM without extending the address bus. ... An address bus is (part of) a computer bus, used by CPUs or DMA-capable units for communicating the physical addresses of computer memory elements/locations that the requesting unit wants to access (read/write). ... In computing, a hardware register is a storage area for hardware I/O (input/output) of different kinds. ...


Port-mapped I/O uses a special class of CPU instructions specifically for performing I/O. This is generally found on Intel microprocessors, specifically the IN and OUT instructions which can read and write a single byte to an I/O device. I/O devices have a separate address space from general memory, either accomplished by an extra "I/O" pin on the CPU's physical interface, or an entire bus dedicated to I/O. This list of Intel microprocessors attempts to present all of Intels processors (µPs) from the pioneering 4-bit 4004 (1971) to the present high-end offerings, the 64-bit Itanium 2 (2002) and Pentium 4F with EM64T (2004). ... In computer architecture, a bus is a subsystem that transfers data or power between computer components inside a computer or between computers. ...


Relative merits of the two I/O methods

The main advantage of using port-mapped I/O is on CPUs with a limited addressing capability. Because port-mapped I/O separates I/O access from memory access, the full address space can be used for memory. It is also obvious to a person reading an assembly language program listing when I/O is being performed, due to the special instructions that can only be used for that purpose. Assembly language or simply assembly is a human-readable notation for the machine language that a specific computer architecture uses. ...


The advantage of using memory mapped I/O is that, by discarding the extra complexity that port I/O brings, a CPU requires less internal logic and is thus cheaper, faster and easier to build; this follows the basic tenets of reduced instruction set computing. As 16-bit CPU architectures have become obsolete and replaced with 32-bit and 64-bit architectures in general use, reserving space on the memory map for I/O devices is no longer a problem. The fact that regular memory instructions are used to address devices also means that all of the CPU's addressing modes are available for the I/O as well as memory. Reduced Instruction Set Computing (RISC), is a microprocessor CPU design philosophy that favors a smaller and simpler set of instructions that all take about the same amount of time to execute. ... In computer science, 16-bit is an adjective used to describe integers that are at most two bytes wide, or to describe CPU architectures based on registers, address buses, or data buses of that size. ... 32-bit is a term applied to processors, and computer architectures which manipulate the address and data in 32-bit chunks. ... In computing, a 64-bit component is one in which data are processed or stored in 64-bit units (words). ...


With the popularisation of higher-level programming languages such as C and Lisp, which do not support generation of the special port-mapped I/O instructions without incompatible and proprietary extensions, port-mapped I/O has become remarkably cumbersome to use. Contrast this situation with when assembly language was dominant and port-mapped I/O instructions simplified the code. The C Programming Language, Brian Kernighan and Dennis Ritchie, the original edition that served for many years as an informal specification of the language The C programming language is a standardized imperative computer programming language developed in the early 1970s by Ken Thompson and Dennis Ritchie for use on the... Lisp is a reflective, functional programming language family with a long history. ... Assembly language or simply assembly is a human-readable notation for the machine language that a specific computer architecture uses. ...


Example

Consider a simple system built around an 8-bit microprocessor. Such a CPU might provide 16 address lines, allowing it to address up to 64K bytes (65,535 bytes) of memory. On such a system, perhaps the first 32K of address space would be allotted to Random access memory (RAM), a further 16K to Read only memory (ROM) and the remainder to a variety of other devices such as timers, counters, video display chips, sound generating devices, and so forth. The hardware of the system is arranged so that devices on the address bus will only respond to particular addresses which are intended for them; all other addreses are ignored. This is the job of the address decoding circuitry, and it is this that establishes the memory map of the system. Some very simple decoding circuitry might allow a device to respond to several different addresses, effectively creating virtual copies of the device at different places in the memory map. Of course there is only one real device, so there is no particular advantage in doing this, except to simplify the decoder. The decoding itself may be programmable, allowing the system to reconfigure its own memory map as required. This is commonly done. 8-bit refers to the number of bits used in the data bus of a computer. ... Microprocessors, including an Intel 80486DX2 and an Intel 80386 A microprocessor (abbreviated as µP or uP) is an electronic computer central processing unit (CPU) made from miniaturized transistors and other circuit elements on a single semiconductor integrated circuit (IC) (aka microchip or just chip). ... This article refers to the unit of binary information. ... Look up RAM and random access memory in Wiktionary, the free dictionary Different types of RAM. From top to bottom: DIP, SIPP, SIMM 30 pin, SIMM 72 pin, DIMM, DDR DIMM Random access memory (sometimes random-access memory), commonly known by its acronym RAM, is a type of computer storage... Rom is also the name of a toy and comic book character Rom (Spaceknight). ...


Thus we might end up with a memory map like so:

Device Address range Size
RAM $0000 - $7FFF 32K
ROM $8000 - $BFFF 16K
General purpose I/O $C000 - $C0FF 256 bytes
Sound controller $D000 - $D0FF 256 bytes
Video controller $E000 - $E0FF 256 bytes


Note that this memory map contains gaps, that is also quite common. Addresses here are in hexadecimal notation. In mathematics and computer science, hexadecimal, or simply hex, is a numeral system with a radix or base of 16 usually written using the symbols 0–9 and A–F or a–f. ...


For example if the fourth register of the video controller sets the background colour of the screen, the CPU can set this colour by writing a value to the memory location $E003 using its standard memory write instruction.


See also

  • mmap
  • PDP-11 -- An early example of a computer architecture using memory-mapped I/O
  • Unibus -- The I/O bus used by the PDP-11
  • Java 1.4's New I/O (NIO) provides memory-mapped I/O.
  • University lecture notes about computer I/O

  Results from FactBites:
 
Memory mapping: Definition and Much More from Answers.com (310 words)
Memory mapping is a process whereby some item of digital hardware is connected to a processor's address bus and data bus in such a way that it can be accessed (for reading and/or writing) exactly as if it were a memory cell.
For example, an analog-to-digital converter could be memory mapped to a certain address.
Memory mapping also hogs the address and data buses if the mapped device is slower than true memory (as for instance, a successive approximation A-to-D converter might well be).
ITworld.com - LINUX TIPS AND TRICKS - Memory mapping (501 words)
A process may map files to its address space, thereby creating a 1-to-1 equivalence between the files' data and its corresponding memory-mapped region.
Memory mapping eliminates this intermediary buffering, thus improving the overall I/O performance.
Memory persistence -- Memory mapping enables processes to share memory sections that persist independently of a certain process's lifetime.
  More results at FactBites »

 
 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments

Want to know more?
Search encyclopedia, statistics and forums:

 


Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms, 1022, m