As I know no device sends data to CPU. They write data to a known location and will signal the CPU somehow (or not) to read from that location. This location is accessed by CPU via I/O bus or Memory bus depending on the device and configuration.
I think these links would be very helpful:
http://en.wikipedia.org/wiki/Memory-mapped_I/O
http://www.cs.umd.edu/class/spring2003/ ... apped.html
memory mapped i/o
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: memory mapped i/o
You missed the obvious ones: the interrupt controllers.As I know no device sends data to CPU.
Re: memory mapped i/o
Doesn't it just signal the processor? Or maybe you could say because it includes a number it is counted as data?Combuster wrote:You missed the obvious ones: the interrupt controllers.As I know no device sends data to CPU.
Re: memory mapped i/o
I think I understand that but what sends instructions do the address decoder?ii) address decode logic maps the address to a chip select which tells a bus device that the CPU is talking to it
Re: memory mapped i/o
There are no instructions there, just bits of address. You can read about demultiplexer ICs (for example, 74LS138), they receive part of the address as an input and on the output only one pin is active, those with the number equal to digits on the input (i.e. if inputs equal to 000 (binary), then output0 pin will be active, if 001 - then output1 and so on).icealys wrote:I think I understand that but what sends instructions do the address decoder?ii) address decode logic maps the address to a chip select which tells a bus device that the CPU is talking to it
Look, here's the second link found by google, it has some nice pictures: http://www.ece.unm.edu/~jimp/310/slides ... mory2.html
Re: memory mapped i/o
Of course, none of the physical details matter to the OS. From the software's point of view, there are really only two ways to communicate with anything outside of the CPU: memory (MOV instruction) and I/O (IN/OUT instructions).
When the CPU executes one of these instructions, it reads or writes to its memory or I/O port, and the motherboard routes the connection to the appropriate device (memory, keyboard, controllers, PCI bus, etc.)
When the CPU executes one of these instructions, it reads or writes to its memory or I/O port, and the motherboard routes the connection to the appropriate device (memory, keyboard, controllers, PCI bus, etc.)