Memory mapped I/O vs Port mapped I/O [closed]

故事扮演 提交于 2019-12-06 00:03:55

问题


Memory mapped I/O is a technique which allows the use of central memory (RAM) to communicate with peripherals. Port mapped I/O uses ports (with special assembly instructions) to communicate over digital ports.

What are the advantages of one method with respect to another?


回答1:


As Cthulhu said,

  • memory mapped I/O allows writing/reading to I/O device ports the same as reading/writing to normal memory (using the same machine code/asm)

but there is a disadvantage:

  • you use up physical memory address space for your memory mapped I/O devices (think of 32 bit Windows not being able to access all 4G of RAM on a PC)

So an advantage of using the port mapped I/O method is that you have a separate address space for your I/O devices and you can use the whole memory addressing range to access memory.

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



来源:https://stackoverflow.com/questions/15371953/memory-mapped-i-o-vs-port-mapped-i-o

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!