The words of memory that are set aside for an I/O controller are equated to its control registers, which play the same role as the ports in section 2. When the CPU wants to inspect an I/O controller's register, it issues a memory read to the system bus specifying the address that corresponds to that peripheral's register. When it wishes to give a command or send actual data, it issues a write to the memory word corresponding to the peripheral's register. The memory is never really involved at all during these memory-mapped I/O operations. It completely ignores any read or write commands that specify addresses not within its range. Thus, the name of this type of I/O arrangement, memory-mapped I/O, is misleading because what is really mapped is the memory address, but memory address-mapped I/O is a mouthful and computer programmers are in a hurry. |