KawaiKx
KawaiKx

Reputation: 9910

What is the meaning of memory-mapped I/O?

Does it mean that buffers of I/O devices are assigned addresses in the total memory space just like the bytes of the main memory are assigned??

Upvotes: 3

Views: 2362

Answers (2)

paxdiablo
paxdiablo

Reputation: 881103

That's basically it. You have I/O devices which monitor the address lines (and data lines, and control lines) of your processor to "capture" certain addresses and act on them.

For example, you may have a memory mapped keyboard device (using address 0xff00) that basically collects the keystrokes from the physical keyboard and buffers them ready to be received by the processor.

So, when it see address 0xff00 on the address lines and a read signal (such as a memio line and the r/not-w line both going high (indicating a memory read is desired), it will inject the code for the keypress onto the data lines and signal the processor to read it.

If no keypresses are buffered, it may just give back a code of 0 (it depends entirely on the protocol).

Upvotes: 3

stefan
stefan

Reputation: 2886

Pretty much. Not that the actual peripheral hardware buffers must be mapped but the OS / Mapper will take care of it somehow.

Upvotes: 1

Related Questions