|
发表于 2005-6-10 15:56:54
|
显示全部楼层
我刚才又看了一下 s3c4510 的手册,我说的意思是指 CPU 在 remap 设置之后,系统访问存储器 (Flash & SDRAM) 的寻址方式,也是你问的 “每个存储器组织在组内通过基指针寻址,寻址范围为64k(16位),同时该指针为10位,能寻址64M字节;cpu究竟是如何寻址的?地址线和基指针又有什么关系呢?”
cpu 发出的 32 位地址,在内部经过 System Manager Registers 的辨别分析后对应到某一个 bank 的片选,这个 bank 支持的最大存储空间是 64Mbytes。目前 lumit4510 接的两类存储器是 4M*32 共 16Mbytes 的 SDRAM和 1M*16 共 2Mbytes 的 Nor Flash。而 Nand Flash 不是挂在地址总线上的,属于类似硬盘的 I/O 设备。
你所说的“应该是把所有的存储器空间都影射到1个64M的地址空间包括DRAM的BANK0-BANK4,SRAM/ROM/FLASH的BANK0-BANK6,External I/O的BANK0-4,Internal SRAM,Special regesiters” ,是指加电后系统的默认设置的 System Manager Registers 值,不过一般都会通过 remap 重新设置的。具体可看数据手册中这段:
After a power-on or system reset, all bank address pointer registers are initialized to their default values. In this
case, all bank pointers except for the next pointer of ROM bank 0 are set to zero. This means that, except for
ROM bank 0, all banks are undefined following a system start-up.
The reset values for the next pointer and base pointer of ROM bank 0 are 0x200 and 0x000, respectively. This
means that a system reset automatically defines ROM bank 0 as a 32-Mbyte space with a start address of zero.
This initial definition of ROM bank 0 lets the system power-on or reset operation pass control to the user-supplied
boot code that is stored in external ROM. (This code is located at address 0 in the system memory map.) When
the boot code (i.e. ROM program) executes, it performs various system initialization tasks and reconfigures the
system memory map according to the application's actual external memory and device configuration.
其实关于这个我也没很深入地去读数据手册,每种 cpu 对于存储器管理的寄存器设置都不太一样,这方面我一直是不求甚解的。 |
|