Memory mapped I / O

from Wikipedia, the free encyclopedia

Memory Mapped I / O (MMIO) (German transmissions such as memory-mapped input / output or memory- related addressing have so far not been able to establish themselves) is a method for communication between a central unit and peripheral devices . The I / O registers of electronic devices with which the connected hardware is controlled to be, in the main memory - address space mapped. The components can then be accessed via conventional memory access routines. No special commands are required, as is the case with the implementation of input / output using I / O ports on the processor. If the components are integrated in the processor ( microcontroller ), memory mapped I / O is the rule. The counterpart is Port-Mapped I / O or Isolated I / O - the registers of the components are addressed via their own port addresses in a separate I / O address space.

Compared to a separate I / O bus , memory mapped I / O has the advantage that the hardware can usually be fully accessed via structures and pointers from a high-level language such as C or C ++ without having to write parts of the program in assembler or machine language to have to. The disadvantage is that part of the address space is occupied and can no longer be used for real main memory. This reduces the maximum usable memory size, which can be problematic especially with processors with small address spaces.

Today there is still a coexistence of memory and port-mapped processes. Memory-mapped I / O is a simplification for software development, but problematic in terms of construction - especially when the systems are modular. Memory mapped I / O was therefore initially mainly used in systems with a fixed structure, such as many 8-bit computers and the Commodore Amiga. The Intel processors, which dominate personal computers , also offer port-mapped I / O, but are still being operated more and more in memory-mapped environments in order to take advantage of their advantages, which has increased thanks to the 64-bit era Address spaces is easier to implement.

See also: Isolated I / O , Direct Memory Access , Virtual Memory