Other Definitions
o (enc)
o (dict)
o (dict)

Memory-mapped I/o

For more generic meanings of input/output port, see port (computing).
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. 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. 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.

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

See also

  • Java 1.4's New I/O, or NIO provides memory-mapped I/O.

 

<< PreviousWord BrowserNext >>
list of new brunswick lieutenant governors
cralog
saffuriyya
ma'lul
jackfruit
lubya
list of star wars weapons
japanese instrument of surrender
nimrin
human rights campaign
compressive strength
science fiction weapon
paul soldner
european credit transfer system
leominster
self healing ring
operation schfifon
polyphase coil
marquess of zetland
thomas dundas, 1st baron dundas
zetland
anglo saxon architecture
zynaddsubfx
winston peters
paul gross
robert helpmann
bonaparte's gull
source compatibility
gavin douglas
alan garca
transformative economics
saemund
polydore vergil
richard pace
xerces blue
anterior pituitary
william elphinstone
rudolf nureyev
original six
rodriguez, rizal
operation yoav
james douglas, 4th earl of morton
paradelma
pygopus