TN-29-61: Wear Leveling in NAND Flash Memory Introduction

Technical Note Wear Leveling in Micron® NAND Flash Memory

Introduction This document describes the recommended wear leveling algorithm to be implemented in the flash translation layer (FTL) software for Micron® NAND Flash memory.

Wear Leveling and the Flash Translation Layer In Micron single-level cell (SLC) and multilevel cell (MLC)NAND Flash memory, each physical block can be programmed and erased reliably up to 100,000 and 10,000 times, respectively. For write-intensive applications, it is recommended to implement a wear leveling algorithm to monitor and spread the number of write cycles per block. In memory devices that do not use a wear leveling algorithm not all blocks get used at the same rate. The wear leveling algorithm ensures that equal use is made of all the available write cycles for each block. Wear leveling is implemented in the flash translation layer (FTL), which is the additional software layer between the file system and the NAND Flash memory. The FTL allows operating systems to read and write to NAND Flash memory devices in the same way as disk drives and provides the translation from virtual to physical addresses. Wear leveling can also be implemented by the file system directly on the NAND Flash (see Figure 1). Refer to the data sheets for the full list of root part numbers and for further information on the devices (see “References” on page 5).

PDF: 09005aef8467d996/Source: 09005aef8467d99e tn2961_wear_leveling_in_nand.fm - Rev. G 4/11 EN

1

Micron Technology, Inc., reserves the right to change products or specifications without notice. ©2011 Micron Technology, Inc. All rights reserved.

Products and specifications discussed herein are for evaluation and reference purposes only and are subject to change by Micron without notice. Products are only warranted by Micron to meet Micron’s production data sheet specifications. All information discussed herein is provided on an “as is” basis, without warranties of any kind.

TN-29-61 Wear Leveling in NAND Flash Memory Wear Leveling and the Flash Translation Layer Figure 1:

Software Tool Chain for an Embedded System Using NAND

Wear Leveling in the FTL

Wear Leveling in the File System

Operating System

Operating System

File System

File System

Hardware Adaptation Layer

Flash Translation Layer FTL interface Garbage Collection

Wear Leveling

Low Level Driver

Wear Leveling

Error Correction Code

Bad Block Management

Hardware Adaptation Layer NAND Flash Device Low Level Driver

Error Correction Code

Bad Block Management

NAND Flash Device

PDF: 09005aef8467d996/Source: 09005aef8467d99e tn2961_wear_leveling_in_nand.fm - Rev. G 4/11 EN

2

Micron Technology, Inc., reserves the right to change products or specifications without notice. ©2011 Micron Technology, Inc. All rights reserved.

TN-29-61 Wear Leveling in NAND Flash Memory Increasing the Lifespan of a NAND Flash Memory Device

Increasing the Lifespan of a NAND Flash Memory Device This section shows how using wear leveling can increase the lifespan of a NAND Flash device.

Lifetime Without Wear Leveling For systems that have a file allocation table (FAT) based file system, the FAT table is always stored in the same virtual blocks. Frequent FAT table updates are required during data WRITE operations, which implies frequent erase cycles on the same physical blocks, hence a reduced NAND Flash lifetime. The following example calculates how many times a FAT table (FAT32 and a cluster size of 2KB) is updated when writing a 10MB file to a NAND Flash memory with a physical erase unit of 16KB (NAND small page device). To write a file of 10MB, 5KB entries in FAT and 5KB clusters in the file system are required. This corresponds to 640 physical NAND Flash blocks. This means that the file can be written at the same location 20 times: 20 × 5120 = 102400

This is greater than the maximum number of program/erase cycles. The expected NAND Flash lifetime can be calculated as follows: Size of NAND flash × number of erase cycles × FAT overhead Expected lifetime = ------------------------------------------------------------------------------------------------------------------------------------------------------bytes written per day

This means that if the application writes at 3KB/s, the expected lifetime of the NAND blocks is: 10Mbyte × 20 × 0.7 Expected lifetime = ------------------------------------------------------------------ = 0.55 days ( 3Kbyte ⁄ s ) × 24 × 60 × 60

In a NAND Flash, when virtual blocks are mapped to the same physical blocks, the lifetime of the device is significantly reduced, independently of its size.

Lifetime with Wear Leveling Wear leveling extends the lifetime of NAND Flash devices because it ensures that even if an application writes to the same virtual blocks over and over again, the PROGRAM/ ERASE cycles will be distributed evenly over the NAND Flash memory. For example, the expected lifetime of a 64MB (512Mb) NAND Flash device can be calculated as follows: 64Mbyte × 100Kcycles × 0.7 Expected lifetime = ----------------------------------------------------------------------- = 18,124 days (about 49.7 years) ( 3KBbyte ⁄ s ) × 24 × 60 × 60

In this example, 0.7 is the file system overhead.

PDF: 09005aef8467d996/Source: 09005aef8467d99e tn2961_wear_leveling_in_nand.fm - Rev. G 4/11 EN

3

Micron Technology, Inc., reserves the right to change products or specifications without notice. ©2011 Micron Technology, Inc. All rights reserved.

TN-29-61 Wear Leveling in NAND Flash Memory Wear Leveling Algorithms

Wear Leveling Algorithms Wear leveling is associated with a block aging table (BAT) to store information about which blocks have been erased in a selected period of time. There are two kinds of wear leveling that can be implemented in the FTL: • Dynamic wear leveling • Static wear leveling

Dynamic Wear Leveling When applying the dynamic wear leveling, new data is programmed to the free blocks (among blocks used to store user data) that have had the fewest WRITE/ERASE cycles.

Static Wear Leveling With static wear leveling, the content of blocks storing static data (such as code) is copied to another block so that the original block can be used for data that is changed more frequently. Static wear leveling is triggered when the difference between the maximum and the minimum number of WRITE/ERASE cycles per block reaches a specific threshold. With this particular technique, the mean age of physical NAND blocks is maintained constant.

PDF: 09005aef8467d996/Source: 09005aef8467d99e tn2961_wear_leveling_in_nand.fm - Rev. G 4/11 EN

4

Micron Technology, Inc., reserves the right to change products or specifications without notice. ©2011 Micron Technology, Inc. All rights reserved.

TN-29-61 Wear Leveling in NAND Flash Memory References

References The following documents related to NAND Flash memory are available on www.micron.com • NANDxxx-A, single-level cell, small page, 528-byte/264-word page, 3 V supply voltage, NAND Flash memory data sheets • NAND01G-B2B_NAND02G-B2C, single level cell, large page, 2112-byte/1056-word page, 1.8 V/3 V supply voltage, NAND Flash memory data sheets • NANDxxGW3C2B, multilevel cell, large page, 2112-byte page, 3 V supply voltage, NAND Flash memory data sheets • Garbage collection in NAND Flash memory • Error Correction Code in Single-Level Cell NAND Flash Memory • Bad Block Management in NAND Flash Memory

Conclusion Implementing wear leveling is recommended as part of the software tool chain (either in the FTL or file system) to increase the lifetime of NAND Flash in an embedded system. In addition, it is recommended that you implement garbage collection and bad block management algorithms. It is mandatory that you implement error correction code algorithms. To help integrate NAND Flash memory in applications, Micron can provide a full range of software solutions, such as a file system, sector manager, drivers, and code management. Contact your Micron sales representative or visit www.micron.com for more details.

8000 S. Federal Way, P.O. Box 6, Boise, ID 83707-0006, Tel: 208-368-3900 www.micron.com/productsupport Customer Comment Line: 800-932-4992 Micron and the Micron logo are trademarks of Micron Technology, Inc. All other trademarks are the property of their respective owners.

PDF: 09005aef8467d996/Source: 09005aef8467d99e tn2961_wear_leveling_in_nand.fm - Rev. G 4/11 EN

5

Micron Technology, Inc., reserves the right to change products or specifications without notice. ©2011 Micron Technology, Inc. All rights reserved.

Introduction to Levelling Notes 1.pdf

... FTL Wear Leveling in the File System. Hardware Adaptation Layer. Low. Level. Driver. Error. Correction. Code. Bad Block. Management. NAND Flash Device.

214KB Sizes 33 Downloads 144 Views

Recommend Documents

Introduction to Levelling notes 1.pdf
Page 1 of 16. 1. INTRODUCTION. to. LEVELING. INTRODUCTION INTRODUCTION. to. LEVELING LEVELING. By. Robert J. Mergel, P.E., P.S.. July, 2004. By.

trigonometric levelling pdf
Sign in. Loading… Whoops! There was a problem loading more pages. Retrying... Whoops! There was a problem previewing this document. Retrying.

AHEAD EC Levelling Layer
AHEAD EC Levelling Layer will, when applied on Zebra Anode, act as an alkaline ... 2-3 hours. No. of coats required on ZEBRA normally one coat at 1 mm ...

PF character levelling outline.pdf
Con mod – Fortitude save, HP. vi. Wis mod – Will save. 5. Skills. a. You get more skill points at each level based on your class (e.g. 4+Int). b. Add them to the ...

Lecture Notes Introduction to Fortran O and ...
fetches the value of Z from memory, adds 2.0, and stores the result at the same ...... However, it is good programming practice to have the EXTERNAL attribute, and I ...... 3. the procedure is internal, and a module is its host; the calling program .

1. Introduction to Robotics notes 2.pdf
Manipulator. Newton-Euler. Equations. Coordinate- invariant. algorithms for. robot. dynamics. Lagrange's. Equations with. Constraints. 4.1 Lagrangian Equations.

Lecture Notes for Health Science Students (Introduction to Sociology ...
Page 1 of 292. LECTURE NOTES. For Health Science Students. Introduction to Sociology. Zerihun Doda, M.A.. Debub University. In collaboration with the Ethiopia Public Health Training Initiative, The Carter Center,. the Ethiopia Ministry of Health, and

Introduction to Sericulture Notes 1.pdf
Whoops! There was a problem loading more pages. Retrying... Introduction to Sericulture Notes 1.pdf. Introduction to Sericulture Notes 1.pdf. Open. Extract.

Introduction To Computer Networks-1 Notes 1.pdf
Introduction To Computer Networks-1 Notes 1.pdf. Introduction To Computer Networks-1 Notes 1.pdf. Open. Extract. Open with. Sign In. Main menu.

JOINT CIRCULAR ON SUC LEVELLING 2016.pdf
JOINT CIRCULAR ON SUC LEVELLING 2016.pdf. JOINT CIRCULAR ON SUC LEVELLING 2016.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying ...

pdf-1453\introduction-to-psychoneuroimmunology-introduction-to ...
Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. pdf-1453\introduction-to-psychoneuroimmunology-introduction-to-psychoneuroimmunology-.pdf. pdf-1453\introduction-to-psychoneuroimmunology-introduction-to-

Notes
And He shows them how faith in Him would make that possible! YOUR TURN IN THE SCRIPTURES. As we turn to this passage, we'll use the Searching the ...

Notes
He said that only through believing in Him can we have eternal life .... “Everyone who lives in me and believes in me will never die” (11:26, emphasis added).

Notes
make some distinctions. The Distinction ... It changes your child's course from a destructive path of .... Remember your own childhood, and apply the oil of good humor and ... For these and related resources, visit www.insightworld.org/store.

Notes
Searching the Scriptures study will help you analyze your life's choices so you can ... but let God transform you into a new person by changing the way you think.

Notes
Christ, the Son of God, and learn from the Master Provider of the water of life. ... in a Bible atlas, trace the route Jesus and His disciples traveled from Judea to ...

Notes
1. STUDY. LET'S BEGIN HERE. Even as death crept close, Socrates proclaimed his teachings while standing on trial before the Athenian democracy in 399 BC. Plato witnessed Socrates' defense during ..... or call USA 1-800-772-8888 • AUSTRALIA +61 3 97

Notes
not room enough in your Bible's margins for all the richness you can observe ... Here are some lessons to share with children regarding encouragement:.

Notes
or call USA 1-800-772-8888 • AUSTRALIA +61 3 9762 6613 • CANADA 1-800-663-7639 • UK +44 1306 640156. For the 2018 broadcast, this Searching the Scriptures study was developed by Mark Tobey in collaboration with. Bryce Klabunde, executive vice p

Notes
Duplication of copyrighted material for commercial use is strictly prohibited. Committed to Excellence in Communicating Biblical Truth and Its Application. S05.

Notes
awe of Christ's words, but miss ... What did Jesus do after the wedding day in Cana? What chronological clues .... Because of Jesus' resurrection power, I can ...

Notes
Chuck Swindoll uses four Bible study methods every time he prepares a ... What did you learn about Barnabas ... Write your illustration ideas down here:.