What Types of ECC Should Be Used on Flash Memory?



Similar documents
Practical Guide to Endurance and Data Retention

NAND Flash FAQ. Eureka Technology. apn5_87. NAND Flash FAQ

The following document contains information on Cypress products.

Nonlinear Multi-Error Correction Codes for Reliable NAND Flash Memories

Booting from NAND Flash Memory

The following document contains information on Cypress products.

The following document contains information on Cypress products.

Trends in NAND Flash Memory Error Correction

Improved NAND Flash Memories Storage Reliablity Using Nonlinear Multi Error Correction Codes

WP001 - Flash Management A detailed overview of flash management techniques

AN10860_1. Contact information. NXP Semiconductors. LPC313x NAND flash data and bad block management

NAND Flash Architecture and Specification Trends

FUNDAMENTALS of INFORMATION THEORY and CODING DESIGN

Comparison of NAND Flash Technologies Used in Solid- State Storage

Solid State Drive Technology

EUDAR Technology Inc. Rev USB 2.0 Flash Drive. with Card Reader. Datasheet. Rev. 1.0 December 2008 EUDAR 1

MirrorBit Technology: The Foundation for Value-Added Flash Memory Solutions FLASH FORWARD

Choosing the Right NAND Flash Memory Technology

Flash Memory. For Automotive Applications. White Paper F-WP001

Improved NAND Flash Memories Storage Reliablity Using Nonlinear Multi Error Correction Codes

Nasir Memon Polytechnic Institute of NYU

Addressing Fatal Flash Flaws That Plague All Flash Storage Arrays

MCF54418 NAND Flash Controller

A Comparison of Client and Enterprise SSD Data Path Protection

Linux flash file systems JFFS2 vs UBIFS

Data Storage - II: Efficient Usage & Errors

USB Flash Drive. RoHS Compliant. AH321 Specifications. June 4 th, Version 1.4. Apacer Technology Inc.

Part Number Decoder for Toshiba NAND Flash

NAND Flash Architecture and Specification Trends

Data Storage Time Sensitive ECC Schemes for MLC NAND Flash Memories

Atmel AVR4920: ASF - USB Device Stack - Compliance and Performance Figures. Atmel Microcontrollers. Application Note. Features.

A New Chapter for System Designs Using NAND Flash Memory

Industrial Flash Storage Module

AN11008 Flash based non-volatile storage

S34ML08G2 NAND Flash Memory for Embedded

Application Note AN-00160

Programming NAND devices

HG2 Series Product Brief

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

Product Brief. 2.0 microtoled. Intelligent GOLDELOX Display Module. µtoled-20-g2. Rev 1.0

COS 318: Operating Systems. Storage Devices. Kai Li Computer Science Department Princeton University. (

32-bit AVR UC3 Microcontrollers. 32-bit AtmelAVR Application Note. AVR32769: How to Compile the standalone AVR32 Software Framework in AVR32 Studio V2

Important Differences Between Consumer and Enterprise Flash Architectures

USB Flash Drive. RoHS Compliant. AH322 Specifications. July 2 nd, Version 1.2. Apacer Technology Inc.

V850. Application Note. 32-Bit Single-Chip Microcontrollers AES 128 Encryption/Decryption. Document No. U19668EE1V0AN00 Date Published January 2009

udrive-usd-g1 Embedded DOS micro-drive Module Data Sheet

Solid State Drives Data Reliability and Lifetime. Abstract

AN1819 APPLICATION NOTE Bad Block Management in Single Level Cell NAND Flash Memories

On the Use of Strong BCH Codes for Improving Multilevel NAND Flash Memory Storage Capacity

Key Factors for Industrial Flash Storage

Programming Matters. MLC NAND Reliability and Best Practices for Data Retention. Data I/O Corporation. Anthony Ambrose President & CEO

APPLICATION NOTE. AT07175: SAM-BA Bootloader for SAM D21. Atmel SAM D21. Introduction. Features

How To Write On A Flash Memory Flash Memory (Mlc) On A Solid State Drive (Samsung)

A Simple Virtual FAT File System for Wear-Leveling Onboard NAND Flash Memory

Physical Data Organization

Distributed Storage Networks and Computer Forensics

QuickSpecs. HP Z Turbo Drive

Algorithms and Methods for Distributed Storage Networks 5 Raid-6 Encoding Christian Schindelhauer

Technical Note Memory Management in NAND Flash Arrays

How To Write To An Eeprom Memory On A Flash Memory On An Iphone Or Ipro Memory On Microsoft Flash Memory (Eeprom) On A Microsoft Microsoft Powerbook (Ai) 2.2.2

High-Performance SSD-Based RAID Storage. Madhukar Gunjan Chakhaiyar Product Test Architect

DUAL MONITOR DRIVER AND VBIOS UPDATE

AT88CK490 Evaluation Kit

White Paper. Avoiding premature failure of NAND Flash memory. Inhalt

Atmel AVR4921: ASF - USB Device Stack Differences between ASF V1 and V2. 8-bit Atmel Microcontrollers. Application Note. Features.

Technologies Supporting Evolution of SSDs

Vol.2. Industrial SD Memory. Program/Erase Endurance. Extended Temperature. Power Failure Robustness

Error Control Coding and Ethernet

End to End Data Path Protection

Sheet 7 (Chapter 10)

Impact of Stripe Unit Size on Performance and Endurance of SSD-Based RAID Arrays

The Shortcut Guide to Balancing Storage Costs and Performance with Hybrid Storage

Industrial Semi Metal USB

Mass Storage Basics. When to Use a Storage Device

Endurance Models for Cactus Technologies Industrial-Grade Flash Storage Products. White Paper CTWP006

RealSSD Embedded USB Mass Storage Drive MTFDCAE001SAF, MTFDCAE002SAF, MTFDCAE004SAF, MTFDCAE008SAF

Understanding endurance and performance characteristics of HP solid state drives

Implementing MLC NAND Flash for Cost-Effective, High-Capacity Memory

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay

Low-Power Error Correction for Mobile Storage

Digital Satellite Broadcasting and HDTV Services in Japan

AVR1318: Using the XMEGA built-in AES accelerator. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

NAND Flash Memories. Understanding NAND Flash Factory Pre-Programming. Schemes

Disks and RAID. Profs. Bracy and Van Renesse. based on slides by Prof. Sirer

Reed-Solomon Codes. by Bernard Sklar

COS 318: Operating Systems. Storage Devices. Kai Li and Andy Bavier Computer Science Department Princeton University

A NOR Emulation Strategy over NAND Flash Memory

Homework # 2. Solutions. 4.1 What are the differences among sequential access, direct access, and random access?

Data Distribution Algorithms for Reliable. Reliable Parallel Storage on Flash Memories

1 Gbit, 2 Gbit, 4 Gbit, 3 V SLC NAND Flash For Embedded

Flash Memory. Jian-Jia Chen (Slides are based on Yuan-Hao Chang) TU Dortmund Informatik 12 Germany 2015 年 01 月 27 日. technische universität dortmund

Advantages of e-mmc 4.4 based Embedded Memory Architectures

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

QuickSpecs. PCIe Solid State Drives for HP Workstations

File System Management

Transcription:

What Types of ECC Should Be Used on Flash Memory? Application 1. Abstract NOR Flash normally does not need ECC (Error-Correcting Code). On the other hand, NAND requires ECC to ensure data integrity. NAND Flash includes extra storage on each page to store ECC code as well as other information for wear-leveling, logical to physical block mapping, and other software overhead functions. The size of extra storage (spare area) is normally 16 byte per 512 byte sector but other sizes are also used. ECC algorithm correction strength (number of bit errors that can be corrected) depends on the ECC algorithm used to correct the errors (these algorithms may be implemented in either hardware or software). Simple Hamming codes can only correct single bit errors. Reed-Solomon code can correct more errors and is used on many of the current controllers. BCH (Bose, Ray-Chaudhuri, Hocquenghem) codes can also correct multiple bit errors and are becoming popular because of their improved efficiency over Reed-Solomon. 2. ECC Usage with Spansion's MS NAND Flash Spansion has created the industry's first charge-trapping 1.8V, 4-gigabit SLC NAND flash memory. This NAND memory is based on Spansion's MirrorBit charge-trapping technology. The MS NAND flash guarantees that the first block is valid at factory shipment time and ensures an endurance of 100,000 Write/ Erase cycles with 1 bit ECC handling a partial page (528 bytes). It also guarantees a consistent 10-year data retention cycle. It's important to note that since the MS NAND flash supports the Copy back function, some important considerations have to be taken into account by the host in order to avoid any possible accumulation of single bit errors. The host should make sure to implement either of the following scenarios: Readout of data to compute ECC (and modify data if needed) before writing it back. Actually, the data read from the source page can be read out by the host in order to compute error detection. Before copying back data to the device page, the host may perform data correction if needed. Since the data to be written is still in the page register, the host is required to upload only the corrected bytes using the Change Write Column command, making the sequence faster. Implement an ECC scheme that exceeds the minimum required ECC. On the other hand, in order to ensure that the data is stored properly over the life of the MS NAND flash device, it is highly recommended that the following additional precautions be taken: Always check status after executing Write, Erase and Copyback operations. Implement bad-block management, garbage collection and wear-leveling algorithms. 3. Most Commonly Used ECC Algorithms This section provides details of the three most commonly used ECC algorithms. Hamming Algorithm Reed-Solomon Algorithm Bose-Chaudhuri-Hocquenghem (BCH) algorithm Publication Number Types_of_ECC_Used_on_Flash_AN Revision 02 Issue Date March 30, 2011

Byte 2,112 Byte 2,111 Byte 2,110 Byte 2,109 Byte 2,108 Byte 2,107 Byte 2,106 Byte 2,105 Byte 2,104 Byte 2,103 Byte 2,102 Byte 2,101 Application 3.1 The Hamming Algorithm The Hamming algorithm is relatively straightforward and easy to be implemented in software or hardware. The limitation of Hamming algorithm is its limited error correction abilities. Hamming code is able to correct single bit errors and detect two bits errors. As to the S33MS NAND flash, the Hamming algorithm for ECC computation should be used only in case the host system would make sure to read back the source page to be copied using the Copy Back function and make all necessary bit corrections prior to writing it back, as explained in the previous section. A Hamming code is usually defined as (2 n -1, 2 n -n-1), where: n = the number of overhead bits 2 n -1 = the block size 2 n -n-1 = the number of data bits in the block All Hamming codes can detect two errors and correct one error. Common Hamming code sizes are (7, 4), (15, 11), and (31, 26). Meaning in a 7-bit block only 4 bits are data, the other 3 bits are correction code; the same goes for (15,11) and (31,26). For example, a NAND flash with 2 kb pages that uses a Hamming code algorithm may look like Figure 3.1. Figure 3.1 NAND Storage of Hamming Code 52 spare bytes not used by ECC module Spare Area Bytes 2,049 to 2,100 1st 2nd 3rd 4th ECC for 1st ECC for 2nd ECC for 3rd ECC for 4th Flash page = 2,112 bytes In this configuration the Hamming code requires 3 bytes of ECC information for each 512-bytes sector, or 12 bytes (96 bits) of ECC encoding information is required per 2 kb page. 3.2 The Reed-Solomon Algorithm The Reed-Solomon algorithm is often used on outer encoding while convolutional code is used on inner encoding (The inner code takes the result of the pre-coding operation and generates a sequence of encoding symbols. Each encoding symbol is the XOR of a randomly chosen set of symbols from the pre-code output). The convolutional code allows the correction of widely scattered errors but is not able to correct highly concentration errors. Reed-Solomon algorithm is often used in NAND flash memory interfaces. Reed-Solomon codes are often used to handle NAND flash bit-flipping phenomenon. As to the S33MS NAND flash, Spansion recommends the implementation of the Reed-Solomon Algorithm. Reed-Solomon encoder uses Galois Field arithmetic operations to add parity symbols. Parameters are listed below: n = the number of code symbols s = gives the size of symbols (s-bit symbols). n=2 s -1 t = number of correctable errors, 2*t is the number of parity check symbols k = number of message symbols (k=n-2t) A Reed-Solomon code is specified as RS(n,k) with S-bit symbols. 2 Types_of_ECC_Used_on_Flash_AN_02 March 30, 2011

n= k+2t = 2 s -1 Data (k) Parity (2t) The decode process takes several stages to get error location and correct the error. The first decoding stage is syndrome computation; this stage transfers symbols to data syndrome. The decoder tells if errors are detected at this stage. After that, the algorithm computes error polynomial based on syndromes in the finite Galois field. Following stages find the roots of error polynomial to locate errors and correct them. Example: A popular Reed-Solomon code is RS (255, 223) with 8-bit symbols. Each code word contains 255 code word bytes, of which 223 bytes are data and 32 bytes are parity. For this code: n=255, k =223, s=8 2t=32, t=16 The decoder can correct any 16 symbol errors in the code word: i.e. errors up to 16 bits anywhere in the code word can be automatically corrected. Currently, there are only a few micro-controllers that implement Reed-Solomon encoding, most of which are targeted to the USB or memory card applications, using a 4-byte-on-512-byte-page encoding specifically for MLC (Multi-Level Cell) NAND flash devices. 3.3 The BCH Algorithm Hamming code provides the easiest hardware or software implementation; but it only corrects single bit errors. Reed-Solomon algorithm provides more robust error correction ability; but requires a large amount of system resources (CPU cycles or logic cells) to implement. Bose-Chaudhuri-Hocquenghem (BCH) algorithm is becoming popular because of its improved efficiency over Reed-Solomon algorithm. BCH code is a large class of multiple errors correcting codes. One advantage of BCH is that both highly concentrated and widely scattered errors are detected. Another advantage is that the encoding and decoding techniques are relatively simple compared to Reed-Solomon code. BCH codes belong to the class of linear block codes, to be more specific, the subclass of cyclic codes. A block code consists of a set of vectors with N elements, where the vectors are called code word and N is called the length of the code word; q symbols are the elements of a code word. If the elements consist of the two symbols 1 and 0, the code is a binary code. A block code maps k information bit into a code word with length of N, and the ratio r = k/n is defined to be the rate of the code. As stated before, the elements of a code word are selected from an alphabet of q symbols. Codes are constructed from fields with q elements. In coding, q is usually a finite number, so the field is a finite field or a so called Galois field. The main difference between Reed-Solomon and binary BCH is the underlying structures. Reed-Solomon algorithm is symbol-based and BCH algorithm is binary. Reed-Solomon algorithm (Symbol base code) Symbol 1 Symbol 2 Symbol 3 Symbol 4 Symbol 5 Symbol length = 4; code length = 5 symbols BCH algorithm (binary base code) Symbol length = 1; code length = 20 symbols Both Reed-Solomon algorithm and BCH algorithm are common ECC choices for MLC NAND flash. Microcontrollers specially designed for SD Cards, SPI, emmc and embedded NAND are becoming more common that use built-in hardware 6/9/12-bit BCH ECC circuits. Moreover, some MLC NAND flash devices have an March 30, 2011 Types_of_ECC_Used_on_Flash_AN_02 3

internal BCH ECC (Error Correction Code) generation engine, which can speed up data integrity checking. Extra command functions concerning embedded ECC are also provided in software drivers. 4. Conclusion Hamming based block codes are the most commonly used ECC for SLC. Hamming codes are relatively straightforward and simple to be implemented in either software or hardware. The disadvantage of Hamming codes is its limited error correction capabilities, with two bit errors detection and only one bit error correction. Therefore, it is mainly used on SLC NAND flash application. As to the S33MS NAND flash, the Hamming algorithm for ECC computation should be used to some extent. For instance, this technique should be considered only in the case where the host system would make sure to read back the source page to be copied using the Copy Back function and make all necessary bit corrections prior to writing it back. On the contrary, both Reed-Solomon and BCH are able to handle multiple errors and are widely used on MLC flash. It is also recommended to use these algorithms with the S33MS NAND flash since they ensure a reliable usage of the Copy Back function. Both codes are powerful and able to handle both random and burst errors. Reed-Solomon code is a subset of the BCH. However, BCH is simpler than Reed-Solomon to decode and implement. On the other hand, Reed-Solomon code is more suitable for concatenated codes. 4 Types_of_ECC_Used_on_Flash_AN_02 March 30, 2011

5. Revision History Section Revision 01 (November 27, 2007) Revision 02 (March 30, 2011) Global Initial release Description Updated this document with references to Spansion's MS NAND flash March 30, 2011 Types_of_ECC_Used_on_Flash_AN_02 5

Colophon The products described in this document are designed, developed and manufactured as contemplated for general use, including without limitation, ordinary industrial use, general office use, personal use, and household use, but are not designed, developed and manufactured as contemplated (1) for any use that includes fatal risks or dangers that, unless extremely high safety is secured, could have a serious effect to the public, and could lead directly to death, personal injury, severe physical damage or other loss (i.e., nuclear reaction control in nuclear facility, aircraft flight control, air traffic control, mass transport control, medical life support system, missile launch control in weapon system), or (2) for any use where chance of failure is intolerable (i.e., submersible repeater and artificial satellite). Please note that Spansion will not be liable to you and/or any third party for any claims or damages arising in connection with above-mentioned uses of the products. Any semiconductor devices have an inherent chance of failure. You must protect against injury, damage or loss from such failures by incorporating safety design measures into your facility and equipment such as redundancy, fire protection, and prevention of over-current levels and other abnormal operating conditions. If any products described in this document represent goods or technologies subject to certain restrictions on export under the Foreign Exchange and Foreign Trade Law of Japan, the US Export Administration Regulations or the applicable laws of any other country, the prior authorization by the respective government entity will be required for export of those products. Trademarks and Notice The contents of this document are subject to change without notice. This document may contain information on a Spansion product under development by Spansion. Spansion reserves the right to change or discontinue work on any product without notice. The information in this document is provided as is without warranty or guarantee of any kind as to its accuracy, completeness, operability, fitness for particular purpose, merchantability, non-infringement of third-party rights, or any other warranty, express, implied, or statutory. Spansion assumes no liability for any damages of any kind arising out of the use of the information in this document. Copyright 2007-2011 Spansion Inc. All rights reserved. Spansion, the Spansion logo, MirrorBit, MirrorBit Eclipse, ORNAND, EcoRAM and combinations thereof, are trademarks and registered trademarks of Spansion LLC in the United States and other countries. Other names used are for informational purposes only and may be trademarks of their respective owners. 6 Types_of_ECC_Used_on_Flash_AN_02 March 30, 2011