NAND & NOR study

体会:

1. Nand一般是用于Mess storage的,比如存储uImage, vmlinux, rootfs等. NOR一般是放置Boot代码和启动参数的. Nand也可以用于放启动代码, 但,一般要额外的逻辑的支持, 可以通过CPLD支持,也可以在CPU上加上这部分的逻辑(比如Netl的XLS/XLR/XLP/XLT系列处理器都支持Nand启动) , 也可以在Nand上加入一些逻辑,比如Samsung提出的OneNand.

2. Nand的读取最小单位是Page(2KB+64Bspare, 当然也有小page和超大page的Nand), program和erase的最小单位是Block(64pages=128KB+4KB=1Mb). NOR读取的最小单位是Byte,Program的最小单位也是Byte,也可以Buffer Program(32Word),Erase是按Sector(128KB=1Mb)。Nand的坏块管理是按Block的,一般在一个Block的前2个page的spare area的一个Byte写成非0xff表示坏块。

3. 从软件上,NOR read和RAM read相同,一个Bus cycle就可以:给一个地址,NOR返回Data。NOR的program和erase都要几个Bus cycle来完成:memcpy如果源是Nor,给一个地址指针就可以。

Nand read的最小单位是page,read/program/erase都要几个Bus cycle来完成。

4. CFI 是针对Nor的标准(98h)。Nand需要ECC和坏块管理的软件。

5. MTD是针对raw nand和raw nor的。SSD, MMC, eMMC, RS-MMC, SD, mini-SD, micro-SD, USB flash drive, CompactFlash, MemoryStick, MemoryStick Micro都不时MTD设备,它们都是Block设备。Block设备和MTD设备的一个重要区别是MTD设备有Erase/Program,而Block只有Write,另外块大小也不相同。SSD MMC等设备是带有FTL的,经过硬件逻辑的转换,是Block设备。在Linux里,有转换层,将MTD设备转换成Char设备和Block设备。/dev/mtd0, /dev/mtdblock0

6. JFFS2只能在MTD设备上运行,如果非要在块设备上运行,需要一个block2mtd的Layer,ext2只能在块设备上,否则也需要一个mtd2block的层。由于这些层掩盖了设备本身的一些特性,不推荐使用。

 

7. NOR通常要映射到CPU的Memory Map的一段地址空间中,Nand只要映射一个Byte大小(8x),short(x16)大小的一个地址用于间接的收发数据就可以了。

 

8. Netl的demo板中3号板只有Nand flash,从Nand启动.其余的单板上都有Nor和Nand的. Nor和Nand的0--8M是Boot和参数用, Nor的8M-end作为一个分区,名字是"User Fs", Nand的8-16M 是系统一个分区作为根文件系统,16-end作为一个分区是home dir。Linux启动后,cat /proc/mtd 可以看到这些分区 

参考1:

Flash Memory Device List

The non-volatile memories are the essential components of the electronics devices. The industry expects a perfect non-volatile memory to meet all requirements for both code and data. However, there is not such perfect memory at all. Alternatively, we have many choices of the flash memories with various parameters including interfaces (data/address buses, protocols and timing), capability (memory density and cost) and reliability (writing endurance and bad blocks). As a result, the designers have to study the available products very carefully to select the suitable components for the projects. In most cases, the system designers have to deploy certain system software components for the specific platforms as well. The software part is so complex that I will cover it in a separate title.

Competitive Non-volatile Memories

The standard PC architecture adopts a hierarchy structure of memories. The mask ROM and OTP EPROM are used for BIOS. The code and data are stored in the secondary memory devices like the floppy and the hard disk drivers. The code is loaded from the secondary memory devices to DRAM and executes there. A fraction of the loaded code is placed in the high speed cache (SRAM) to improve the system performance. Along with fast development of the silicon storage technologies, the flash memories are widely used in the PC architecture as well. The MTP NOR flash and SPI serial flash memories replace the legacy memories in BIOS. The flash cards and the flash SSD drivers are used as the secondary memory devices in the stylish UMPC and Netbook.

 

SSD Samsung

In comparison, the embedded products adopt a wider range of memory types since the embedded hardware platforms are very diverse and tailor-made. Similarly, the flash memories are replacing the legacy non-volatile memories as well. Let us have an overview for the non-volatile memories first.

UV-EPROM

The UV light erasable EPROM was very popular and widely used as the major code storage media. It is not convenient to repr

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值