Mapping I / O with memory mapping and I / O with port mapping

Memory I / O is a method that allows the use of a central memory (RAM) to communicate with peripheral devices. Port-mapped I / O inputs use ports (with special assembly instructions) to communicate over digital ports.

What are the advantages of one method over another?

+6
assembly io memory architecture cpu
source share
1 answer

As Cthulhu said,

  • memory I / O memory allows you to write / read ports of the input / output device in the same way as read / write to regular memory (using the same machine code / asm)

but there is a drawback:

  • you are using the address space of physical memory for I / O devices with memory mapping (think that 32-bit Windows will not be able to access all 4G RAM on the PC).

Thus, the advantage of using an I / O method with port mapping is that you have a separate address space for your I / O devices, and you can use the entire range of memory addressing for memory access.

EDIT: Below is a more complete answer to your question: hardware ports in memory addresses

+11
source share

All Articles