Flash memory
Introduce ROM / PROM / EPROM / EEPROM
EEPROM:
- NOR type: byte-addressed
- NAND type: block device
Levels of Cells
SLC: 1 bit/cell; low error rates and good endurance (≈104–105 P/E cycles).
MLC: ≈ 103–104 P/E cycles.
TLC: ≈ 300–3000 P/E cycles.
Brownian motion is the random motion of particles suspended in a fluid (a liquid or a gas) resulting from their collision with the fast-moving molecules in the fluid.
High bits: 適合存取,不易更動
BER: Bit error rate

TSOP封裝成Chip
+----+ / +----+ / +-----+ / +----+ / +-----+ / bit
|Chip| < |Bank| < |Block| < |Page| < |Data | < - bit
+----+ \ +----+ \ +-----+ \ +----+ \ | Area| \ bit
\ +-----+ / bit
|Spare| < - bit
+-----+ \ bitreal page > 4KB
Write-once Property
- Relaxed: Each page can be sequentially written for at most 4 times. (Can not turn back to write skipped bits)
- Strict: Each page can be written for only once.
Bulk Erase Property: clean whole block (erase is slower than write)
Worn-out effect: breakdown of the oxide layer. Bits in a NAND flash block be erased over and over, it eventually breaks down the oxide layer -> causing bad cell/bit
System Architecture
+-----------------------------------------+
| Operating System |
| +---------------------------------+ |
| | File System (FAT, NTFS...) | |
| +---------------------------------+ |
| |
| +----------------------------------+ |
| | NAND Flash Translation Layer | |
| | +---------+ +------+ +--------+ | |
| | |Allocator| | Wear | | Garbage| | |
| | +---------+ +------+ +--------+ | |
| +-----------------^----------------+ |
+---------------------|-------------------+
|
|
v
+------------------------------------------+
| NAND Flash Memory |
+------------------------------------------+Out-place update
Eraser is slower than write.
Insert updated data and turn original data invalid
garbage collector will free invalid pages.
Block 0 Block 0
+------+ +------+
| A | --- A |
| B | | | B |
| C | | | C |
| D | ===Updata page A===> | | D |
| E | | | E |
| free | ˋ---> A' |
| Free | | free |
| free | | free |
+------+Block 0 Block 1
+------+ +------+
| A | | A' |
| B | | B |
| C | | C |
| D | ===Live page coping===> | D | ==> Clean block 0
| E | | E |
| A' | | F |
| F | | G |
| G | | free |
+------+ +------+

