130 likes | 232 Vues
Learn about Flash EEPROM, its history, programming, limitations, types like NOR and NAND, file systems, wear leveling, and its use as SSD. Understand transfer rates, advantages, and disadvantages of Flash Memory in comparison to traditional disks. Stay informed about the latest developments and improvements in Flash Memory technology.
E N D
Introduction to Systems Programming Lecture 8.3 Non-volatile MemoryFlash
EEPROM • EEPROM – Electrically Erasable Programmable Read Only Memory. • this is a historical term to differentiate from an older type of memory that used UV-light to for eraser • “Flash” memory is the dominant type currently • NOR flash • NAND flash • Main feature: contents remain when power is off
Examples of Flash Memory • Your computer's BIOS chip • USB sticks • Digital Camera memory • Cellphone memory • Solid-state disks (SSD) in laptops • Memory cards for video game consoles • Invented by Toshiba in 1980s
Basics • Initially every bit is logical ‘1’ • Programming a bit – set it to ‘0’ by applying a voltage • Once a bit is set to ‘0’ – cannot be set back to ‘1’ by programming • Erasing – set bits back to ‘1’ by applying a higher voltage
Limitations • Erasure can only be performed on a “block” – not on individual bits or bytes • Memory wear: a finite number of erase-write cycles. • Typical: guaranteed to withstand around 100,000 write-erase-cycles
NOR Flash • Has Data and Address lines, like RAM • Byte addressable • Can store code – execute in place (XIP) • Typical (erase) block sizes 64 - 256 Kilobytes. • But: more expensive, uses more power • Typical usage: BIOS, Firmware
NAND Flash • Not byte-addressable – can only be read in “pages” • Typical “page” size: 512-4096 bytes • Typical erase block size: 16KB – 512KB • Cheaper than NOR flash • Slower read time • Typical use: file systems (USB sticks, camera & cell phone memory)
NAND vs NOR Flash Toshiba Sept 2007
NAND vs. NOR Flash • NAND denser than NOR • preferred for data memory storage (flash drives) • NAND slower read time • NOR preferred as program memory storage for microcontrollers because of faster access time • NAND is always block read/block write; NOR allows read of individual memory locations • NAND programming/erase is faster than NOR programming/erase
Flash File Systems • “Wear Leveling” – blocks are not rewritten in-place. • Instead, written elsewhere, file pointers updated • Avoid rewriting same bits too often • Error correcting – correct bad bits via ECC • one bit error in each 2048 bits (256 bytes) using 22 bits of ECC code • one bit error in each 4096 bits (512 bytes) using 24 bits of ECC code.
Transfer Rates • NAND Flash: advertized raw read rate of 15,000KB/s = 14.65MB/s. • That’s about 70ns to read one byte • Slower than RAM – but much faster than disk • Write is much slower
Flash as replacement to disks • Advantages of Flash as SSD, especially in laptop • Noise • Speed • Power consumption, Heat • Weight • Reliability (no moving parts) • Disadvantages (as of 2009) • Price per MB [Improving] • Capacity [Moore’s law, 2x every 1.5 years] • Finite write-erase cycle: [improving]
Recent numbers (SanDisk) • SSD: 64GB, 128GB and 256GB • Mobile memory & USB: up to 16GB