文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Memory Mapped Vs I/O Mapped Vs others

Memory Mapped Vs I/O Mapped Vs others

时间:2006-12-22  来源:seawolf1979

http://groups.google.com/group/comp.arch.embedded/browse_thread/thread/8999bc6e4e509ec7/bf024d310af8e2d9?hl=zh-CN  
发件人: karthikbg - 查看个人资料
日期: 2006年12月17日(星期日) 下午1时33分
电子邮件: "karthikbg" <[email protected]>
论坛: comp.arch.embedded
评级:  (1 位用户)
显示选项
回复 | 答复作者 | 转发 | 打印 | 显示个别帖子 | 显示原始邮件 | 报告滥用行为 | 查找此作者的帖子
Hi,

What is the actual difference between the following :
"Memory Mapped"  Vs  " I/O Mapped"   Vs "Memory Mapped I/O"  Vs " I/O
Mapped Memory"   ?

Kindly tell me their actual definitions/meanings .
Further, Let me know some best conditions whereit should be used and
other scenarios where it should not be used.

Need some clarifications / links / docs.

Thx in advans,
Karthik Balaguru

===

发件人: karthikbg - 查看个人资料
日期: 2006年12月21日(星期四) 下午7时15分
电子邮件: "karthikbg" <[email protected]>
论坛: comp.arch.embedded
尚未评分 评级:
 
显示选项
回复 | 答复作者 | 转发 | 打印 | 显示个别帖子 | 显示原始邮件 | 报告滥用行为 | 查找此作者的帖子
Hi,

Thx for all of your replies that gave me clarifications.

Got some good info from the net regarding this -  i have placed it
below ....

Generally, Processor families have two distinct address spaces
through which they can communicate with these memories and peripherals.
The first address space is called the memory space and is intended
mainly for memory devices; the second is reserved exclusively for
peripherals and is called the I/O space. However, peripherals can also
be located within the memory space, at the discretion of the hardware
designer. When that happens, we say that those peripherals are
memory-mapped.

>From the processor's point of view, memory-mapped peripherals look and

act very much like
memory devices. However, the function of a peripheral is obviously
quite different from that
of a memory. Instead of simply storing the data that is provided to it,
a peripheral might
instead interpret it as a command or as data to be processed in some
way.

If peripherals are located within the memory space, we say that the
system has memory-mapped I/O.

The designers of embedded hardware often prefer to use memory-mapped
I/O exclusively,
because it has advantages for both the hardware and software
developers. It is attractive to the hardware developer because he might
be able to eliminate the I/O space, and some of its
associated wires, altogether. This might not significantly reduce the
production cost of theboard, but it might reduce the complexity of the
hardware design.

Memory-mapped peripherals are also better for the programmer, who is
able to use pointers, data structures, and unions to interact with the
peripherals more easily and efficiently.

Chips are located in the processor's memory space, and the processor
communicates
with them by way of two sets of electrical wires called the address bus
and the data bus. To
read or write a particular location in memory, the processor first
writes the desired address
onto the address bus. The data is then transferred over the data bus.
The memory map contains one entry for each of the memories and
peripherals that are accessible from the processor's memory space.
Mostly  External RAM,ROM,FLASH memory devices come in this region.

If a separate I/O space is present, and devices are connected at that
region, then it is called as I/O Mapped. Typically, a large percentage
of the I/O space will be unused because most of the peripherals located
there will have only a handful of registers. Devices like the
peripheral control block (PCB), parallel port, and debugger port
etc.... come in this region.

Unfortunately, registers within the I/O space of an 80x86 processor can
be accessed only by using the assembly language instructions in and
out. The C language has no built-in support for these operations. The
actual algorithm is straightforward: read the contents of the register,
toggle the bit that controls the I/O (LED etc) of interest, and write
the new value back into the register. You will notice that although
this routine is written in C, the functional part is actually
implemented in assembly language. This is a handy technique, known as
inline assembly.

Regards,
Karthik Balaguru

 

 

排行榜 更多 +
暗区地铁逃生

暗区地铁逃生

飞行射击 下载
怪兽战争模拟器

怪兽战争模拟器

飞行射击 下载
骑马狩猎模拟器

骑马狩猎模拟器

飞行射击 下载