Page 2 of 2
Re: memory mapped i/o
Posted: Sat Feb 22, 2014 11:03 pm
by siavoshkc
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
Re: memory mapped i/o
Posted: Sun Feb 23, 2014 11:41 am
by Combuster
As I know no device sends data to CPU.
You missed the obvious ones: the interrupt controllers.
Re: memory mapped i/o
Posted: Mon Feb 24, 2014 9:40 am
by siavoshkc
Combuster wrote:As I know no device sends data to CPU.
You missed the obvious ones: the interrupt controllers.
Doesn't it just signal the processor? Or maybe you could say because it includes a number it is counted as data?
Re: memory mapped i/o
Posted: Fri May 02, 2014 4:43 pm
by icealys
ii) address decode logic maps the address to a chip select which tells a bus device that the CPU is talking to it
I think I understand that but what sends instructions do the address decoder?
Re: memory mapped i/o
Posted: Sat May 03, 2014 3:28 am
by Nable
icealys wrote:ii) address decode logic maps the address to a chip select which tells a bus device that the CPU is talking to it
I think I understand that but what sends instructions do the address decoder?
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).
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
Posted: Sat May 03, 2014 8:33 am
by SpyderTL
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.)