Differences Between Nor Flash and Nand Flash

NOR Flash technology is one of the two main types of non-volatile flash memory on the market today.Intel first developed NOR Flash technology in 1988, which completely changed the dominance of EPROM (Erasable Programmable Read-Only Memory) and EEPROM (Electrically Erasable Programmable Read-Only Memory).In 1989, Toshiba introduced the NAND Flash structure, emphasizing lower cost per bit, higher performance, and easy upgrades via interfaces like disks.

The feature of NOR Flash is eXecute In Place (XIP), which allows applications to run directly in flash memory without needing to load code into system RAM.NOR has high transfer efficiency, especially in small capacities of 1-4MB, providing high cost-effectiveness, but its low write and erase speeds significantly impact its performance.The structure of NAND provides extremely high cell density, achieving high storage density, and its write and erase speeds are also very fast.The challenge with using NAND is that flash management requires a special system interface.Typically, reading NOR is slightly faster than NAND, while NAND’s write speed is significantly faster than NOR, and these factors should be considered in design.

1. Performance Comparison

Flash memory is a non-volatile memory that can be erased and reprogrammed in blocks of memory cells.Any write operation on flash devices can only be performed in empty or erased cells, so most of the time, an erase operation must be performed before writing.NAND devices perform erase operations very simply, while NOR requires all bits in the target block to be written as 0 before erasing.Since NOR devices are erased in blocks of 64-128KB, performing a write/erase operation takes about 5 seconds, whereas NAND devices erase in blocks of 8-32KB, requiring at most 4 milliseconds for the same operation.The difference in block sizes during erasure further widens the performance gap between NOR and NAND; statistics show that for a given set of write operations (especially when updating small files), more erase operations must be performed on NOR-based cells.Therefore, when selecting storage solutions, designers must weigh the following factors.

1. NOR’s read speed is slightly faster than NAND.

2. NAND’s write speed is much faster than NOR.

3. NAND’s 4ms erase speed is significantly faster than NOR’s 5s.

4. Most write operations require an erase operation first.

5. NAND’s erase unit is smaller, leading to fewer erase circuits.

Additionally, NAND’s actual application is much more complex than NOR.NOR can be used directly and code can be run directly on it;while NAND requires I/O interfaces, thus needing drivers for use.However, modern operating systems support NAND structure flash.Moreover, the Linux kernel also provides support for NAND structure flash.NOR’s transfer efficiency is high, especially in small capacities of 1-4MB, providing high cost-effectiveness, but its low write and erase speeds significantly impact its performance.NAND structure can provide extremely high cell density, achieving high storage density, and its write and erase speeds are also very fast.The challenge with applying NAND is that flash management requires a special system interface.

2. Interface Differences

NOR flash has an SRAM interface with sufficient address pins for addressing, making it easy to access each byte internally.NAND devices use complex I/O ports to access data serially, and methods may vary between products or manufacturers.Eight pins are used to transmit control, address, and data information.NAND read and write operations use 512-byte blocks, somewhat similar to how hard disks manage such operations, making NAND-based memory a natural substitute for hard disks or other block devices.

3. Capacity Costs

NAND flash has a cell size nearly half that of NOR devices; due to a simpler production process, NAND structures can provide higher capacity within a given mold size, thus lowering prices accordingly.NOR flash occupies the majority of the 1-16MB flash memory market, while NAND flash is only used in products ranging from 8-128MB, indicating that NOR is mainly applied in code storage media, while NAND is suitable for data storage, with NAND holding the largest share in the CompactFlash, Secure Digital, PC Cards, and MMC (Multi Media Card) storage markets.

4. Reliability and Durability

When using flash media, a key consideration is reliability.For systems requiring extended MTBF (Mean Time Between Failures), flash is a very suitable storage solution.Reliability between NOR and NAND can be compared from three aspects: lifespan (durability), bit swapping, and bad block handling.Lifespan (durability) in NAND flash allows a maximum erase cycle of one million times per block, while NOR allows only one hundred thousand times.NAND memory not only has a 10-to-1 advantage in block erase cycles, but its typical block size is one-eighth that of NOR devices, leading to fewer deletions per NAND memory block over a given time.

5. Bit Swapping

All flash devices are troubled by the phenomenon of bit swapping.In rare cases (more often in NAND than NOR), a bit may flip or be reported as flipped.A single bit change may not be noticeable, but if it occurs in a critical file, this small fault could lead to system downtime.If the issue is merely a report of a problem, reading multiple times may resolve it.However, if the bit has truly changed, error detection/correction (EDC/ECC) algorithms must be employed.Bit inversion issues are more common in NAND flash, and NAND suppliers recommend using EDC/ECC algorithms when using NAND flash.This problem is not fatal when storing multimedia information with NAND.However, when using local storage devices to store operating systems, configuration files, or other sensitive information, EDC/ECC systems must be used to ensure reliability.

6. Bad Block Handling

Bad blocks in NAND devices are randomly distributed.There have been past efforts to eliminate bad blocks, but the yield was too low and the cost too high, making it impractical.NAND devices need to perform an initialization scan of the medium to discover bad blocks and mark them as unusable.If this process cannot be performed reliably on manufactured devices, it will lead to a high failure rate.

7. Ease of Use

NOR-based flash can be used very directly; it can be connected like other memory and can run code directly on it.NAND is much more complex due to the need for I/O interfaces.Access methods for various NAND devices may differ by manufacturer.

When using NAND devices, drivers must be written first before proceeding with other operations.Writing information to NAND devices requires considerable skill, as designers must never write to bad blocks, meaning that virtual mapping must be performed throughout the entire process on NAND devices.

8. Software Support

When discussing software support, it is essential to distinguish between basic read/write/erase operations and higher-level software for disk emulation and flash management algorithms, including performance optimization.Running code on NOR devices requires no software support, while doing the same on NAND devices typically requires drivers, specifically Memory Technology Device (MTD) drivers; both NAND and NOR devices require MTD for write and erase operations.The MTD required for using NOR devices is relatively less, and many manufacturers provide advanced software for NOR devices, including M-System’s TrueFFS driver, which is adopted by companies such as Wind River System, Microsoft, QNX Software System, Symbian, and Intel.Drivers are also used for emulating DiskOnChip products and managing NAND flash, including error correction, bad block handling, and wear leveling.

Leave a Comment