Source: https://patents.google.com/patent/US20100211856
Timestamp: 2018-02-25 17:57:51
Document Index: 798939621

Matched Legal Cases: ['Application No. 61', 'Application No. 61', 'Application No. 60', 'Application No. 61', 'Application No. 61', 'Application No. 60', 'Application No. 61', 'Application No. 60', 'Application No. 61', 'Application No. 60', 'Application No. 61', 'Application No. 61', 'Application No. 61', 'Application No. 60', 'Application No. 61', 'Application No. 61', 'Application No. 61', 'Application No. 61', 'Application No. 61', 'Application No. 61', 'Application No. 61', 'Application No. 61', 'Application No. 61', 'Application No. 61', 'Application No. 61', 'Application No. 61']

US20100211856A1 - Systems and methods for error correction and decoding on multi-level physical media - Google Patents
US20100211856A1
US20100211856A1 US12667043 US66704308A US2010211856A1 US 20100211856 A1 US20100211856 A1 US 20100211856A1 US 12667043 US12667043 US 12667043 US 66704308 A US66704308 A US 66704308A US 2010211856 A1 US2010211856 A1 US 2010211856A1
US12667043
US8359516B2 (en )
Apparatus and methods for operating a flash device characterized by use of Lee distance based codes in a flash device so as to increase the number of errors that can be corrected for a given number of redundancy cells, compared with Hamming distance based codes.
Priority is claimed from the following co-pending applications: U.S. Provisional Application No. 61/006,385, filed Jan. 10, 2008 and entitled “A System for Error Correction Encoder and Decoder Using the Lee Metric and Adapted to Work on Multi-Level Physical Media”, U.S. Provisional Application No. 61/064,995, filed Apr. 8, 2008 and entitled “Systems and Methods for Error Correction and Decoding on Multi-Level Physical Media”, U.S. Provisional Application No. 60/996,948, filed Dec. 12, 2007 and entitled “Low Power BCH/RS Decoding: a Low Power Chien-Search Implementation”, U.S. Provisional Application No. 61/071,487, filed May 1, 2008 and entitled “Chien-Search System Employing a Clock-Gating Scheme to Save Power for Error Correction Decoder and other Applications” and U.S. Provisional Application No. 61/071,468, filed Apr. 30, 2008 and entitled “A Low Power Chien-Search Based BCH/RS Recoding System for Flash Memory, Mobile Communications Devices and Other Applications”.
Other co-pending applications include: U.S. Provisional Application No. 60/960,207, filed Sep. 20, 2007 and entitled “Systems and Methods for Coupling Detection in Flash Memory”, U.S. Provisional Application No. 61/071,467, filed Apr. 30, 2008 and entitled “Improved Systems and Methods for Determining Logical Values of Coupled Flash Memory Cells”, U.S. Provisional Application No. 60/960,943, filed Oct. 22, 2007 and entitled “Systems and methods to reduce errors in Solid State Disks and Large Flash Devices” and U.S. Provisional Application No. 61/071,469, filed Apr. 30, 2008 and entitled “Systems and Methods for Averaging Error Rates in Non-Volatile Devices and Storage Systems”, U.S. Provisional Application No. 60/996,027, filed Oct. 25, 2007 and entitled “Systems and Methods for Coping with Variable Bit Error Rates in Flash Devices”, U.S. Provisional Application No. 61/071,466, filed Apr. 30, 2008 and entitled “Systems and Methods for Multiple Coding Rates in Flash Devices”, U.S. Provisional Application No. 61/006,120, filed Dec. 19, 2007 and entitled “Systems and Methods for Coping with Multi Stage Decoding in Flash Devices”, U.S. Provisional Application No. 61/071,464, filed Apr. 30, 2008 and entitled “A Decoder Operative to Effect A Plurality of Decoding Stages Upon Flash Memory Data and Methods Useful in Conjunction Therewith”, U.S. Provisional Application No. 60/996,782, filed Dec. 5, 2007 and entitled “Systems and Methods for Using a Training Sequence in Flash Memory”, U.S. Provisional Application No. 61/064,853, filed Mar. 31, 2008 and entitled “Flash Memory Device with Physical Cell Value Deterioration Accommodation and Methods Useful in Conjunction Therewith”, U.S. Provisional Application No. 61/129,608, filed Jul. 8, 2008 and entitled “A Method for Acquiring and Tracking Detection Thresholds in Flash Devices”, U.S. Provisional Application No. 61/006,806, filed Jan. 31, 2008 and entitled “Systems and Methods for using a Erasure Coding in Flash memory”, U.S. Provisional Application No. 61/071,486, filed May 1, 2008 and entitled “Systems and Methods for Handling Immediate Data Errors in Flash Memory”, U.S. Provisional Application No. 61/006,078, filed Dec. 18, 2007 and entitled “Systems and Methods for Multi Rate Coding in Multi Level Flash Devices”, U.S. Provisional Application No. 61/064,923, filed Apr. 30, 2008 and entitled “Apparatus For Coding At A Plurality Of Rates In Multi-Level Flash Memory Systems, And Methods Useful In Conjunction Therewith”, U.S. Provisional Application No. 61/006,805, filed Jan. 31, 2008 and entitled “A Method for Extending the Life of Flash Devices”, U.S. Provisional Application No. 61/071,465, filed Apr. 30, 2008 and entitled “Systems and Methods for Temporarily Retiring Memory Portions”, U.S. Provisional Application No. 61/064,760, filed Mar. 25, 2008 and entitled “Hardware efficient implementation of rounding in fixed-point arithmetic”, U.S. Provisional Application No. 61/071,404, filed Apr. 28, 2008 and entitled “Apparatus and Methods for Hardware-Efficient Unbiased Rounding”, U.S. Provisional Application No. 61/136,234, filed Aug. 20, 2008 and entitled “A Method Of Reprogramming A Non-Volatile Memory Device Without Performing An Erase Operation”, U.S. Provisional Application No. 61/129,414, filed Jun. 25, 2008 and entitled “Improved Programming Speed in Flash Devices Using Adaptive Programming”, and several other co-pending patent applications being filed concurrently (same day).
The present invention relates generally to error correction encoding and decoding and more particularly to encoding and decoding in flash memory systems.
Many types of flash memory are known. Conventional flash memory technology is described in the following publications inter alia:
G. Campardo, R. Micheloni, D. Novosel, “CLSI-Design of Non-Volatile Memories”, Springer Berlin Heidelberg New York, 2005
The Lee metric is a known metric-based error correction encoder/decoder functionality.
Prior art technologies related to the present invention include:
[1] “Error Correction Coding Mathematical Methods and Algorithms”, Todd K. Moon, A JOHN WILEY & SONS, INC., 2005.
[2] “Introduction to Coding Theory”, Ron M. Roth, Cambridge University Press, 2006.
[3] “Algebraic Codes for Data Transmission”, Richard E. Blahut, Cambridge University Press, 2003.
References to square-bracketed numbers in the specification refer to the above documents.
Bit error rate (BER): a parameter that a flash memory device manufacturer commits to vis a vis its customers, expressing the maximum proportion of wrongly read bits (wrongly read bits/total number of bits) that users of the flash memory device need to expect at any time during the stipulated lifetime of the flash memory device e.g. 10 years.
Cell: A component of flash memory that stores one bit of information (in single-level cell devices) or n bits of information (in a multi-level device having 2 exp n levels). Typically, each cell comprises a floating-gate transistor. n may or may not be an integer. “Multi-level” means that the physical levels in the cell are, to an acceptable level of certainty, statistically partionable into multiple distinguishable regions, plus a region corresponding to zero, such that digital values each comprising multiple bits can be represented by the cell. In contrast, in single-level cells, the physical levels in the cell are assumed to be statistically partitionable into only two regions, one corresponding to zero and one other, non-zero region, such that only one bit can be represented by a single-level cell.
Flash memory: Non-volatile computer memory including cells that are erased block by block, each block typically comprising more than one page, but are written into and read from, page by page. Includes NOR-type flash memory, NAND-type flash memory, and PRAM, e.g. Samsung PRAM, inter glia, and flash memory devices with any suitable number of levels per cell, such as but not limited to 2, 4, or 8.
Page: A portion, typically 512 or 2048 or 4096 bytes in size, of a flash memory e.g. a NAND or NOR flash memory device. Writing can be performed page by page, as opposed to erasing which can be performed only erase sector by erase sector. A few bytes, typically 16-32 for every 512 data bytes are associated with each page (typically 16, 64 or 128 per page), for storage of error correction information. A typical block may include 32 512-byte pages or 64 2048-byte pages.
Precise read, soft read: Cell threshold voltages are read at a precision (number of bits) greater than the number of Mapping levels (2̂n). The terms precise read or soft read are interchangeable. In contrast, in “hard read”, cell threshold voltages are read at a precision (number of bits) smaller than the number of Mapping levels (2̂ where n=number of bits per cell).
Resolution: Number of levels in each cell, which in turn determines the number of bits the cell can store; typically a cell with 2̂n levels stores n bits. Low resolution (partitioning the window, W, of physical values a cell can assume into a small rather than large number of levels per cell) provides high reliability.
Certain embodiments of the present invention seek to provide improved methods for error correction encoding and decoding, for flash memory and other applications.
Reed Solomon (RS) codes are common error correction codes (ECC) used in various applications such as storage and probably among the most prevalent codes today. These codes are particularly common when the output from the physical media is binary and there is no additional information regarding the reliability of the bits. In some cases these codes are also used to handle the case of erasures—i.e. bits whose value is unknown.
Many of these codes are systematic. That is, the code may be divided into two sections, the first containing the original data and the second containing spare bits, containing redundant information which allows a decoder to reconstruct the original data if errors have occurred in the first and/or second sections. The number of errors that can be corrected is a function of the code length and of the length of the redundancy within the code.
In RS codes, the data sequence is a bit sequence which is divided into subsets called symbols. The code itself is a sequence of symbols and only symbols are corrected. It is irrelevant which bit or if several bits (say f, the number of bits in a symbol) were in error in a symbol; the symbol is corrected as a unit. The code t has a limit on the number of symbols that can be corrected regardless of how many bits were corrected. That is, an RS code can correct all received sequences as long as their Hamming distance from the original codeword is not larger than a certain value given by D/2, where “Hamming distance” between two sequences of symbols is the count of a number of different symbols between the sequences. D is also equal to the number of symbols in the redundancy section of the code; therefore, the redundancy would have D*f bits. A special case of RS codes are binary BCH codes, also known as alternant codes. These codes may be viewed as a subset of RS codes where only those code-words whose symbols are only 0 and 1 are used. With these codes it is possible to correct up to D errors with a redundancy of D*f bits. f is now chosen such that the overall length of the code (n) is smaller than n<2f. The code corrects sequences as long as their Hamming distance is less than or equal to D, where the Hamming distance is taken over bits.
Certain embodiments of the present invention seek to provide a code which outperforms the binary BCH code for certain applications e.g. those in which short bit sequences are mapped to different levels—such as, for example, in multi-level Flash memory devices where every 2-4 bits are mapped to 4-16 levels.
Prior art FIG. 1 illustrates the distribution of the charge level in a 2 bit/cell Flash device. Every 2 bits are mapped into one of the 4 levels in each cell. Errors may occur if one charge level is read as another. Almost all errors occur when one level is mistaken for an adjacent level. Only rarely do errors occur between non-adjacent levels.
If a binary BCH code is used, gray mapping of the levels into bits assists in reducing the number of bit error per programmed cell. However, the binary BCH code does not take into account the fact that more than one bit error per cell occurs only very rarely indeed.
There is thus provided, in accordance with at least one embodiment of the present invention, a method for error correction encoding of L level application data residing in a memory comprising L level Multi-level cells (MLCs) including at least some Multi-level cells (MLCs) in which the application data is residing and at least some Multi-level cells (MLCs) which are at least partly available to accept data other than the application data, the method comprising encoding the L level application data over a prime field thereby to generate non-binary redundancy data, binarizing at least some of the non-binary redundancy data thereby to generate binarized redundancy data, effecting binary error-correction encoding of the binarized redundancy data, thereby to generate binary redundancy data, combining the binarized redundancy data and the binary redundancy data thereby to generate combined binarized/binary redundancy data; and restoring the combined binarized/binary redundancy data to L level form, thereby to generate restored L level redundancy data, and storing the restored L level redundancy data in at least some of the at least partly available L level Multi-level cells (MLCs).
Further in accordance with at least one embodiment of the present invention, the method also comprises, for at least one L level MLC, utilizing less than L levels for storing at least a portion of the L level application data and utilizing remaining ones of the L levels for storing at least a portion of the combined binarized/binary redundancy data.
Still further in accordance with at least one embodiment of the present invention, binarizing comprises binarizing all of the non-binary redundancy data.
Additionally in accordance with at least one embodiment of the present invention, binarizing comprises binarizing only some of the non-binary redundancy data thereby to define a portion of the non-binary redundancy data which is un-binarized, and wherein the method also comprises L-level transforming the un-binarized non-binary redundancy data to L-level un-binarized non-binary redundancy data.
Still further in accordance with at least one embodiment of the present invention, binarizing and L-level transforming are effected by a single transform function.
Further in accordance with at least one embodiment of the present invention, the method also comprises storing the L-level un-binarized non-binary redundancy data in the L level Multi-level cells (MLCs).
Still further in accordance with at least one embodiment of the present invention, the encoding over a prime field comprises Reed-Solomon encoding over a prime field.
Still further in accordance with at least one embodiment of the present invention, the combining comprises concatenating the binarized redundancy data and the binary redundancy data thereby to generate concatenated binarized/binary redundancy data.
Additionally in accordance with at least one embodiment of the present invention, the binary error-correction encoding comprises BCH encoding of the binarized redundancy data, thereby to generate BCH-encoded redundancy data.
Further in accordance with at least one embodiment of the present invention, the at least some Multi-level cells (MLCs) which are at least partly available to accept data other than the application data comprise entirely available Multi-level cells (MLCs) in which no L level application data is residing, and wherein the storing comprises storing the restored L level redundancy data in at least some of the entirely available L level Multi-level cells (MLCs).
Also provided, in accordance with at least one embodiment of the present invention, is a method for error correction decoding of at least restored L level redundancy data residing in a memory comprising L level Multi-level cells (MLCs) including at least some Multi-level cells (MLCs) in which possibly erroneous L-level application data resides and at least some Multi-level cells (MLCs) which store at least the restored L level redundancy data, the method comprising binarizing the at least restored L level redundancy data, thereby to generate binarized restored L level redundancy data, deriving binary redundancy data from the binarized restored L level redundancy data, effecting binary error-correction decoding of the binary redundancy data, thereby to generate binarized redundancy data, transforming the binarized redundancy data to generate non-binary redundancy data, and decoding the non-binary redundancy data and the possibly erroneous L-level application data over a prime field, thereby to generate decoded L level application data.
Further in accordance with at least one embodiment of the present invention, binarizing comprises binarizing only some of the non-binary redundancy data thereby to define a portion of the non-binary redundancy data which is un-binarized, and wherein the method also comprises L-level transforming the un-binarized non-binary redundancy data to L-level un-binarized non-binary redundancy data.
Also provided, in accordance with at least one embodiment of the present invention, is an apparatus for error correction encoding of L level application data residing in a memory comprising L level Multi-level cells (MLCs) including at least some Multi-level cells (MLCs) in which the application data is residing and at least some Multi-level cells (MLCs) which are at least partly available to accept data other than the application data, the apparatus comprising prime-field encoding apparatus operative to encode the L level application data over a prime field thereby to generate non-binary redundancy data, binarization apparatus operative to binarize at least some of the non-binary redundancy data thereby to generate binarized redundancy data, binary ECC apparatus operative to effect binary error-correction encoding of the binarized redundancy data, thereby to generate binary redundancy data; and data combination apparatus operative to combine the binarized redundancy data and the binary redundancy data thereby to generate combined binarized/binary redundancy data, and L-level restoration apparatus operative to restore the combined binarized/binary redundancy data to L level form, thereby to generate restored L level redundancy data, and storing the restored L level redundancy data in at least some of the at least partly available L level Multi-level cells (MLCs).
Additionally provided, in accordance with at least one embodiment of the present invention, is a method for operating a flash device, the method comprising using Lee distance based codes in the flash device, thereby increasing the number of errors that can be corrected for a given number of redundancy cells compared with Hamming distance based codes.
Also provided, in accordance with at least one embodiment of the present invention, is a method for operating a flash device, the method comprising providing a Lee code associated with a first group of symbols; and coding data in the flash device using a second group of symbols, the second group being a sub group of the first group, so as to allow extending the number of errors that can be corrected for a given number of redundancy cells compared with Hamming distance based codes.
Further provided, in accordance with yet another embodiment of the present invention, is a method for operating a flash device, the method comprising providing a Lee code associated with a first group of symbols, coding data in the flash device using a second group of symbols, the second group being a sub group of the first group, giving rise to a first data stream, producing a redundancy data stream from the first data stream using a redundancy code, thereby increasing the number of errors that can be corrected for a given number of redundancy cells compared with Hamming distance based codes. Further in accordance with at least one embodiment of the present invention, the first data stream is associated with a first group of symbols and the redundancy data stream is associated with a second group of symbols, the second group being a sub group of the first group.
Further provided, in accordance with at least one embodiment of the present invention, is a decoding system comprising a Lee metric-based decoder operative to decode multi-level physical media.
Also provided, in accordance with at least one embodiment of the present invention, is a method for error correction comprising encoding and decoding, thereby to effect error correction and using a separate encoder to store a Syndrome computation to be used during the decoding.
Yet further provided, in accordance with at least one embodiment of the present invention, is a method for error correction comprising encoding and decoding, thereby to effect error correction, including encoding a syndrome; and encapsulating and mapping the encoded syndrome into designated media cells.
Also provided, in accordance with at least one embodiment of the present invention, is a method for error correction comprising encoding and decoding, thereby to effect error correction, including encoding a syndrome, and reducing error probability in the encoded Syndrome by encapsulating and mapping the encoded Syndrome mixed with data bits into designated media cells.
Also provided, in accordance with at least one embodiment of the present invention, is a method for error correction comprising encoding and decoding, thereby to effect error correction, including multiplying by an inverse matrix to achieve a reduced number of bits sufficient to encode the syndrome and encoding the syndrome using only the reduced number of bits.
Further in accordance with at least one embodiment of the present invention, the multi-level physical media includes media having less levels than symbol values.
FIG. 1 is a prior art graph of physical level distributions in a two-bit per cell flash memory device;
FIG. 2 is a simplified functional block diagram of a “syndrome separate” encoder constructed and operative in accordance with certain embodiments of the present invention;
FIG. 3 is a simplified functional block diagram of a “syndrome separate” decoder constructed and operative in accordance with certain embodiments of the present invention;
FIG. 4 is a simplified functional block diagram of a “syndrome separate, redundancy & data mixed” encoder constructed and operative in accordance with certain embodiments of the present invention;
FIG. 5 is a simplified functional block diagram of a “syndrome separate, redundancy & data mixed” decoder constructed and operative in accordance with certain embodiments of the present invention;
FIG. 6 is a simplified functional block diagram of a “syndrome separate & shortened” encoder constructed and operative in accordance with certain embodiments of the present invention;
FIG. 7 is a simplified functional block diagram of a “syndrome separate & shortened” decoder constructed and operative in accordance with certain embodiments of the present invention;
FIG. 8 is a simplified functional block diagram of a “syndrome separate & shortened, redundancy & data mixed” encoder constructed and operative in accordance with certain embodiments of the present invention;
FIG. 9 is a simplified functional block diagram of a “syndrome separate & shortened, redundancy & data mixed” decoder constructed and operative in accordance with certain embodiments of the present invention;
FIG. 10A is a table representing a first mapping scheme in which each subsequence is mapped into a number represented by the binary representation of that sequence;
FIG. 10B is a table representing a second mapping scheme in which each subsequence is mapped into a symbol using “Gray coding”;
FIG. 11 is a simplified flowchart illustration of a method for encapsulating input data bits, in accordance with certain embodiments of the present invention;
FIG. 12 is a simplified flowchart illustration of a method for de-encapsulation which may be performed by Demapper B in the decoder of FIG. 3, in accordance with certain embodiments of the present invention;
FIG. 13 is a simplified flowchart illustration of a method for de-encapsulation which may be performed by the mapper in the decoder of FIG. 3, in accordance with certain embodiments of the present invention;
FIG. 14 is a diagram of a codeword generated by the encoder of FIG. 8, in accordance with certain embodiments of the present invention;
FIG. 15 is a diagram of a codeword generated by the encoder of FIG. 2, in accordance with certain embodiments of the present invention;
FIG. 16 is a diagram of a codeword generated by the encoder of FIG. 4, in accordance with certain embodiments of the present invention;
FIG. 17 is a diagram of a codeword generated by the encoder of FIG. 6, in accordance with certain embodiments of the present invention;
FIG. 18A is a simplified functional block diagram illustration of a NAND Flash device interacting with an external controller with Lee-metric based error correction encoding & decoding functionality in accordance with certain embodiments of the present invention;
FIG. 18B is a simplified functional block diagram illustration of a flash memory system including an on-board microcontroller, with Lee-metric based error correction encoding & decoding functionality in accordance with certain embodiments of the present invention, wherein the encoding functionality may comprise any of the encoders of FIGS. 2, 4, 6 and 8 and the decoding functionality may comprise any of the decoders of FIGS. 3, 5, 7 and 9 respectively;
FIG. 19 is a simplified flowchart illustration of a method for effecting a NAND flash program command issued by the controller of FIG. 18A, in accordance with certain embodiments of the present invention; and
FIG. 20 is a simplified flowchart illustration of a method for effecting a NAND flash read command issued by the controller of FIG. 18A, in accordance with certain embodiments of the present invention.
Apparatus and methods for operating a flash device are now described, which are characterized by use of Lee distance based codes in the flash device so as to increase the number of errors that can be corrected for a given number of redundancy cells, compared with Hamming distance based codes.
The Lee distance between two sequences of symbols is the absolute sum of differences. If there are two symbols, S1 and S2, which take values between 0 and p−1 where p is a prime number, then the Lee distance between these two symbols is then given by
D  ( S 1 , S 2 ) = {  S 1 - S 2   S 1 - S 2  < ( p - 1 ) / 2 p -  S 1 - S 2   S 1 - S 2  ≥ ( p - 1 ) / 2 .
The distance between two sequences Si and Ri is then given by
∑ i = 0 n - 1  D  ( S i , R i )
where n is the number of symbols in each of the two sequences.
Thus, using the above distance, the measure between two sequences is the number of level shifts assuming that per symbol there is a maximum of one error, i.e. either a single positive shift or a single negative shift; the Lee distance measure is suitable since the fact that multiple shifts per symbol are rare is now taken into account. Generally speaking, gain, compared with binary BCH, results from the fact that less bits are now used to store a full symbol.
In the described embodiments of the present invention, the use of the terms flash memory, flash memory device, flash memory apparatus, solid state disk, memory device and similar is non-limiting and interchangeable (also referred to in general as “storage apparatus”). In certain embodiments of the present invention, the elements associated with the storage apparatus as well as the sequence of operations carried out, are integral to the storage apparatus. In certain other embodiments of the present invention, at least some of the elements associated with the storage apparatus and at least some of the related operations are external to the flash, the solid state disk etc. For example, some of the operations performed by microcontroller 110 of FIG. 18A may be carried out by the central processing unit of the host 100, without limiting the scope of the present invention. For convenience only, the following description of certain embodiments of the present invention refers mainly to the term flash memory or solid state disk, however those versed in the art will readily appreciate that the embodiments that are described with reference to flash memory or solid state disk are likewise applicable mutatis mutandis to other storage apparatuses.
Although the applicability of the current invention is not limited to Flash memory devices, these are considered throughout for the sake of brevity.
One application of this invention, as shown in FIG. 18A, is in NAND Flash applications such as SD cards and USB drives. In these applications, the system comprises a controller 2400 and at least one NAND flash 2405 and perhaps many such as shown. The controller 2400 interfaces to a host through a specified protocol. For example, in the case of a USB drive the protocol is that defined by universal serial bus protocol. The controller 2400 then translates commands from the host. For example, read/write commands are translated into page read, page program and block erase commands on the Flash device 2405 through the NAND interface protocol. In order to combat errors which may occur in the multi-level NAND flash devices, code operative in accordance with certain embodiments of this invention may be employed, e.g. by adding an encoding operation to each program command and adding a decoding operation to each read command. The encoding/decoding operations shown and described herein may replace existing encode/decode operations using less efficient codes.
The NAND devices 2405 are programmed page by page where each page may contain cells that store data and cells that store redundancy. Both sets of cells are used, such that the data and redundancy are spread over both. In the course of a NAND Flash interface program and read commands the page data is transferred as a sequence of bits and the bits are then mapped into cells. During a program or read command issued by the controller 2400, the output of encoder 2320 is mapped into bits such that when stored in the Flash device, the bits are mapped back into symbols in Flash cells as defined by the encoders' output. This process is shown in FIG. 19, for a programming procedure, and in FIG. 20, for a read command.
Taking a 4-level multi-level cell (MLC) device as an example, it is common to match each physical page (i.e. page in the Flash array 2420) into two logical pages such that each cell contains a bit from each of the logical pages, mapped using Gray coding. Here, the basic unit is two logical pages and each NAND flash read/program command is a sequence of two read/program commands of a logical page.
Alternatively, as shown in FIG. 18B, a flash memory device may be provided whose internal or on-board microcontroller has Lee metric-based error correction encoder/decoder functionality capable of effectively correcting more errors than a binary BCH code for a given length of redundancy. Four examples of encoding and decoding schemes in accordance with certain embodiments of the present invention, are now described, which employ four example codes respectively, termed the “syndrome separate” code, “syndrome separate, redundancy & data mixed” code, the “syndrome separate & shortened” code and the “syndrome separate & shortened, redundancy & data mixed” code respectively. Encoders and decoders employing these codes respectively, each constructed and operative in accordance with certain embodiments of the present invention are presented in FIGS. 2 and 3; 4 and 5; 6 and 7; 8 and 9 respectively.
The codes are used to encode information over a multi-level physical medium such as a Flash memory. Thus, the inputs and outputs of the Flash device are symbols containing L levels denoted by “0”, “1”, “2”, through “L−1”. The inputs to the encoder are always assumed to be a sequence of bits while the inputs to the decoder are assumed to be a sequence of Flash symbols. The flash symbols could be represented as a subset of a finite field. More precisely, these symbols may be viewed as a subset of a finite-filed GF(p) where p is a prime number.
The encoders receive k bits, where k is a predetermined constant, and produce n symbols, where n is a predetermined constant. n is such that n*log2 L>k where n*log2 L−k is, generally speaking, the number of spare bits allocated for the code for error correction purposes.
The “syndrome separate” code is characterized by a separately encoded syndrome. The “syndrome separate” code is now described with reference to FIGS. 2 and 3, and using the following symbols:
k—number of data bits to be encoded
n—number of symbols in encoded word
L—number of levels
r—number of bits to be encapsulated by Mapper A (100 in FIG. 2)
t—number of symbols produced by Mapper A (100)
p—the smallest prime larger than t
Di (i=0 . . . t−1)—output symbols of Mapper A (100) comprising numbers in GF(p) with values between 0 and L−1.
w—number of symbols produced by the Syndrome Computation block (110) of FIG. 2.
Sj (j=0 . . . w−1)—output symbols of the Syndrome computation block (110) comprising numbers in GF(p).
α—a non-zero element of GF(p) which is also a primitive element in GF(p).
k′—the number of bits mapped by the Demapper unit (120) following the mapping of the w symbols outputted by the Syndrome Computation block (110).
n′—number of bits at the output of the BCH encoder unit (130).
r′—number of symbols encapsulated at once by the Demapper unit (120).
FIG. 2 represents the “syndrome separate” encoder. The input to the encoder, a sequence of k bits, is mapped into t symbols by Mapper A (100). p is the smallest prime larger than or equal to t. If L is a power of 2, the data is divided into subsequences of log2 L bits, each subsequence being mapped into a symbol between 0 to L−1, these symbols being numbers in the prime field GF(p). Mapping may be effected e.g. by mapping each subsequence into a number represented by the binary representation of that sequence as shown in the table of FIG. 10A. Another possibility is to use Gray coding as shown in the table of FIG. 10B. Gray coding is not crucial for Mapper A because the performance of the code is not degraded if a different mapping is used, due to the fact that the encoding scheme shown and described herein works on entire symbols and not on individual bits.
If L is not a power of 2 encapsulation may be used, typically dividing the input sequence into subsequences of r bits which are then translated into a sequence of
⌈ r log 2  L ⌉
symbols over GF(p) where each symbol is one of 0, 1, . . . , L−1. This may be done by representing the r bits as a number (in the standard number field) and following the procedure described in FIG. 11 to recover the symbols. In the method of FIG. 11, Z is, initially, the number represented by the r bits, and the following computations are repeated
times: SymbolCounter=remainder of the division of Z by L; and computation of Z as the quotient of the division of the previous Z by L. r is a predefined constant chosen to maximize the efficiency of encapsulation but yet sufficiently small to allow adequate implementation of the method in FIG. 11 either in hardware or software.
The output of Mapper A (100) then goes to a delay line block (150) and to a Syndrome computation block (110). The purpose of the delay line (150) is to delay the sequence of the t symbols produced by the Mapper A block (100) such that the first symbols produced by (140) follow immediately after the last symbol was outputted from delay line (150).
The Syndrome computation block (110) produces w elements in GF(p). As described above, the t symbols outputted from Mapper A block (100) are treated like numbers in the field GF(p). The Syndrome computation block (110) then performs the following computation:
S j = ∑ i = 0 t - 1  D i  α ji
where Di (i=0 . . . t−1) are the output symbols of Mapper A (100), Sj (j=0 . . . w−1) are the output symbols of the Syndrome computation block (110) and α is a number between 1 and p−1 which is also a primitive element in GF(p). All multiplications and additions are carried out in the GF(p) field (i.e. modulo p). Finite fields, primitive elements, and other related aspects of the above computations are described in documents [2] and [3].
The output of the Syndrome computation unit (110) then flows to the Demapper unit (120). The Demapper maps the w GF(p) symbols into k′ bits, again, typically by using encapsulation. That is, the w symbols are divided into subsets each including r′ symbols, other than, possibly, one subset which has less than r′ symbols. Each subset is then mapped into bits using the binary representation of the number (now in the standard field):
∑ i = 0 r ′ - 1  S i  p i ·
This number is mapped into a sequence of ┌r′·log2 p┐ bits.
The output of the Demapper (120) flows into a binary BCH encoder (130) which receives k′ bits and produces n′ bits which include, on top of the original k′ bits, additional n′−k′ redundancy bits which are used for error correction in the decoding process. The binary BCH encoder is a standard encoder as is known in the art such as any of these described in references [1], [2] and [3] and designed to function over GF(2┌log 2 n′┐).
The output of the binary BCH encoder (130) is then mapped into symbol Mapper B (140) which receives n′ bits and maps them into n−t symbols. The mapping is performed similarly to that performed by Mapper A, typically using Gray coding. Again, if the number of levels is not a power of 2, encapsulation is effected as for Mapper A. If L is a power of 2 then the sequence of n′ bits is simply divided into subsets of log2 L bits. If the sequence does not exactly divide, the sequence is zero padded until it is divided by log2 L without a quotient. The subsets of log2 L bits are then mapped using Gray coding as shown e.g. in the table of FIG. 10B.
A Selector (160) enables the flow of either the mapped original data from the delay line or the mapped redundancy data from Mapper B (140). At first, typically the selector enables the delay line to flow out; once this has occurred, the output of Mapper B (140) flows out. The delay line is designed to delay the output of Mapper A (100) such that the output of Mapper B is synchronized to the end of the output of the delay line. The end result is a codeword as shown in FIG. 15.
As shown, the codeword of FIG. 15 typically comprises a first portion (1500) which includes a mapping of the data sequence into L levels, and a second portion (1510) which is used as redundancy for the purpose of error correction of the information in the first portion 1500. Second portion 1510 is also mapped into L levels and also typically comprises two portions: a first portion (1520) including the mapping of the syndrome (computed from portion 1500) mapped into bits and then mapped to L levels; and a second portion (1530) including the mapping to L levels of the redundancy as computed by the BCH encoder of the portion (1520).
FIG. 3 shows a schematic view of the “syndrome separate” decoder. The “syndrome separate” decoder of FIG. 3 typically receives n symbols from the Flash device and produces k correct bits. The n received symbols belong to one of L levels and may contain errors causing the wrong level to be read. The first t symbols are associated with actual data whereas the last n−t symbols are associated with redundancy. The first t symbols and the last n−t symbols may be sent to the decoder of FIG. 3 simultaneously and analyzed simultaneously. If all n symbols are not sent simultaneously to the decoder, it is more efficient to send the last n−t symbols, which store the redundancy, first, followed by the first t symbols. The redundancy may then be decoded as the rest of the symbols are being sent to the decoder.
The first t symbols are sent to the Syndrome Computation unit which typically performs the same task as was performed by syndrome computation unit 110 in the “syndrome separate” encoder of FIG. 2. The last n−t symbols are sent to a Demapper B 200 which performs the converse of the operation performed by the Mapper B (140) in FIG. 2. The Demapper receives n−t symbols and produces n′ bits.
If the number of levels, L, is a power of 2, the Demapper 200 simply produces log2 L bits for every symbol, the bits being produced by a process of Gray coding e.g. according to the table of FIG. 10B. If L is not a power of 2, de-encapsulation is performed to reverse the effect of encapsulation. That is, the n−t symbols are divided into sub-sequences of ┌r/log2 L┐ symbols from which the Demapper B 200 produces r bits. FIG. 12 shows a procedure which may be employed to perform the De-encapsulation. In the method of FIG. 12, Symbol0 . . . ┌r/log 2 L┐ is a subsequence of symbols and Z is initially 0. Z=Z+SymbolCounter*L(Counter−1) is repeated
times and the output is the binary representation of the final value of Z.
The binary output of the Demapper 200 is a sequence of n′ bits which are passed to the binary BCH decoder (210) which corrects any errors which might have occurred in the redundancy symbols. The BCH decoding may be effected as known in the art e.g. as described in references ([1], [2], [3]).
The BCH decoder (210) outputs k′ bits which were used to code the Syndrome during the encoding process performed by the encoder of FIG. 2. The k′ bits are passed to a mapper unit (220) which produces w symbols over GF(p). This time the symbols may assume values from 0 to p−1. The mapper unit (220) performs the converse of the operation performed by the Demapper unit (120) in the encoder of FIG. 2, e.g. by De-encapsulation. The k′ bits are divided into subsets of ┌r′·log2 p┐. The symbols may be derived by representing the subset as a number (in the normal field) and performing the method in FIG. 13. In the method of FIG. 13, Z, initially, is the number represented by the ┌r′·log2 p┐ bits and the following computations are repeated r′ times: SymbolCounter=remainder of the division of Z by p; and new Z=the quotient of the division of the current value of Z, by p.
The output of Mapper (220) is the accurate Syndrome whereas the output of the Syndrome Computation unit (230) is the estimated syndrome according to the received symbols from the device. The difference between them is the syndrome only due to the error. Thus, the output of the subtract block (240) is the difference (symbol by symbol) of the two syndromes and is the syndrome of the errors that occurred in the first t symbols. Using the output of the subtraction unit 240, the eligible word which is closest (by the Lee metric) to the word actually received, is recovered by best eligible word recovery block 250. Any suitable conventional method can be used to effect the recovery, such as that described in steps 2-5 on page 311 Section 10.4 (“Decoding alternant codes in the Lee metric”), in reference [2]. Once the correct symbols have been recovered, Demapper A (260) maps the t symbols back into k bits. The Demapper A undoes the operation of Mapper A (100) in the “syndrome separate” encoder of FIG. 2, similarly to Demapper B. However, it is not necessary to use Gray mapping.
Parameter determination according to certain embodiments of the present invention is now described. The length of the input sequence (in bits) and the length of the code word (in symbols) are given by conventional design preferences that are typically unaffected by the teachings of the invention shown and described herein, so k and n are assumed to be known. Therefore, values for the constant p and the number of symbols that contain data t are also immediately available. The encapsulation parameters r and r′ are determined by hardware complexity restrictions; for example, r may not be limited to less than 128 bits. The remaining parameters may be determined by trading off the number of BCH redundancy bits n′−k′ and the number of Syndrome symbols w, it being appreciated that n′ bits may be stored in n−t symbols. The tradeoff is typically between the number of bits (n′−k′) allocated to correct the “accurate” Syndrome and the number of symbols (w) allocated to correct the data referred to above, as stored in the word referred to above.
Perr denotes the frame error rate and Pcross denotes the probability that an individual level is erroneously read as either the following or preceding level. The probability of error may be approximated by assuming that errors only occur between nearby levels.
A decoding error may occur if either one of the following events occurs:
1. An error occurs in the decoding of “accurate” Syndrome (210). i.e., there were more than └(n′−k′)/┌log2 n┐┘ errors in the (n−t) symbols allocated to store the redundancy.
2. An error occurs in the decoding of the data symbols using the Lee metric decoder (240). i.e., there were w or more errors in the first t symbols.
The probability of any of these events may be bounded from above by
P err ≤  ∑ i = ⌊ ( n ′ - k ′ ) / ⌈ log 2  n ′ ⌉ ⌋ + 1 n - t  ( n - t ) ! i !  ( n - t - i ) !   ( 2  L - 2 L  p cross ) i  ( 1 - 2  L - 2 L  P cross ) n - t - i +  ∑ i = w t  t ! i !  ( t - i ) !   ( 2  L - 2 L  p cross ) i  ( 1 - 2  L - 2 L  P cross ) t - i
Thus, by enumerating over w, a value may be selected which reduces the above probability, typically to a minimum.
In “syndrome separate, redundancy & data mixed” code the redundancy symbols are no longer separated from the data symbols but rather mixed with them. This is done in such a manner that the error probability in the redundancy information is decreased. The downside is that p (the prime used for the Lee-metric code) increases with respect to n, which may decrease the error correction capability of the Lee-metric decoder. The number of levels, L, is assumed above to be a power of 2. However, where L is not a power of 2, encapsulation may be used, as described generally above. The following symbols are used in the description of the “syndrome separate, redundancy & data mixed” code:
t—number of symbols produced by Mapper A (300).
p—the smallest prime larger than n
Di (i=0 . . . n−1)—Combined symbol output of Mapper A (300) and A′ (310) comprising numbers in GF(p) with values between 0 and L−1.
w—number of symbols produced by the Syndrome Computation block (340)
Sj (j=0 . . . w−1)—output symbols of the Syndrome computation block (340) comprising numbers in GF(p).
k′—the number of bits mapped by the Demapper unit (350) following the mapping of the w symbols outputted by the Syndrome Computation block (340).
n′—number of bits at the output of the BCH encoder unit (360).
bi—bit i (=0 . . . n′−1) of the output sequence of the BCH encoder unit (360).
Yi—the symbols (i=0 . . . n−1) at the output of the Mapper B (370) unit.
FIG. 4 shows a schematic view of an encoder for the “syndrome separate, redundancy & data mixed” code. The input is a sequence of bits (k bits) which flows into Mappers A (300) and A′ (310). The first t·log2 L bits are mapped by Mapper A into symbols over GF(p) with values between 0 and L−1. Mapper divides the t·log2 L bits into subsequences of log2 L which are mapped into symbols using any type of mapping (for example the mappings in the tables in FIG. 10). It is appreciated that the choice of the mapping does not affect the performance of the code. The last k−t·log2 L bits of the input sequence are mapped by Mapper A′ into symbols over GF(p) with values between 0 and L/2−1. This is done by dividing the remaining bits into subsequences of log2 L−1 bits and mapping the subsequences into symbols according to any mapping scheme.
The Selector (320) simply adjust the flow of the symbols such that the symbols generated by Mapper A′ (310) follow the last symbols generated by Mapper A (300). Overall, there are n symbols (i.e. n=t+┌k−t·log2 L)/(log2 L−1)┐.
The symbols flow into the syndrome computation unit (340) which performs the same task as performed by the syndrome computation unit (110) in the “syndrome separate” encoder of FIG. 2. This unit produces w symbols over GF(p) (this time, the symbols take any value between 0 and p−1).
The w symbols then flow into the Demapper (350) which performs the same task as performed by the Demapper unit (120) in the “syndrome separate” encoder. The output of the Demapper (350) is k′ bits which flow into the binary BCH encoder (360) which produces n′ bits. Again, unit 360 is identical to unit 130 in the “syndrome separate” encoder of FIG. 2.
The output of the BCH encoder (360) then flows into Mapper B (370). The purpose of Mapper B is to combine the outputs of the Mapper A′ (310) with the output of the BCH encoder. More precisely, Mapper A′ (310) produces ┌(k−t·log2 L)/(log2 L−1┐ symbols with values between 0 and L/2−1┐. The BCH encoder (360) produces n′ bits. Typically, n′=┌(k−t·log2 L)/(log2 L−1)┐. That is, t=n−n′. The combined output is a symbol with values between 0 and L−1. This is done using the following formula:
Y i =D i +b i ·L/2, i=n−n′ . . . n−1,
where Yi are the symbols at the output of the Mapper B (370) unit, Di are the symbols at the output of the Selector unit (320) and bi are the bits (with values of 0 and 1) at the output of the BCH encoder (360).
The purpose of the Delay Line (330) is to delay the sequence of the symbols such that symbols i=n−n′ may enter Mapper B (370) when the output of the BCH encoder is ready. The selector unit 380 then outputs the first t symbols from the delay line and the rest of the n′=n−t symbols from Mapper B.
The end result of this process is a codeword structured as shown in FIG. 16 which comprises 2 portions. The first portion (2100) includes the mapping of t·log2 L data bits into L-level symbols. The second portion (2110) includes both data and redundancy mapped into L-level symbols. This is done by letting the data determine the log2 L−1 LSB bits of the index of the L-level symbol. The syndrome (after mapping it into bits) and the redundancy of the BCH codes determine the most significant bit of the index of the L-level symbol.
FIG. 5 gives a schematic view of a decoder for the “syndrome separate, redundancy & data mixed” code. The n symbols of the code flow simultaneously into Demapper A′ (400) and Demapper A (430). Demapper A (430) handles separately the first t symbols and the latter n′ symbols. The first t symbols are passed ‘as is’ to the Syndrome computation unit (440) while the latter n′ symbols are stripped from the Redundancy information produced by the BCH encoder (360) in the encoder. This is done as follows:
F ^ i = { F i i = 0   …   t - 1 rem  ( F i , 2 L - 1 ) i = t   …   n
where {circumflex over (F)}i is the output of Demapper A and Fi is the input. Demapper A′ (400) only handles the last n′ symbols and recovers from them only the redundancy bits produced by the BCH encoder by computing b; =└Yi/(L/2)┘ for i=t=t . . . n−1.
The output of Demapper A′ (400) is a sequence of n′ bits which are decoded by the binary BCH decoder (410) which produces k′ bits. These bits are then mapped back into w symbols over GF(p) by the Mapper (420) which performs the same task as the Mapper (220) in the “syndrome separate” decoder of FIG. 3.
In parallel, the output of Demapper A (430) flows into the Syndrome computation unit (440) which performs the same task as the Syndrome computation unit (340) in the encoder. The output of Mapper (420) are the “accurate” syndrome symbols while the output of the syndrome computation unit (440) is a result of errors symbols. The difference between these syndromes (symbol by symbol) is the syndrome due to the errors alone. This difference is computed by the Subtract unit (450). Unit 460 receives the output of 450 and Demapper A, and recovers the accurate symbols. Any suitable conventional method can be used to effect the recovery, such as that described in steps 2-5 on page 311 Section 10.4 (“Decoding alternant codes in the Lee metric”), in reference [2]. The output of 460 flows into the Demapper B (470) which performs the reverse operation of Mapper A (300) for symbols 0 . . . t−1 and Mapper A′ (310) for symbols t . . . n−1. The output is the reconstructed input stream.
Parameter Determination in accordance with certain embodiments of the present invention is now described. There is a degree of freedom lying, again, in the tradeoff between w which determines the k′ and the ability to correct the data symbols and n′−k′ which is the redundancy allotted for the BCH code and determines the ability to correct errors in the “accurate” syndrome. A decoding error may occur if either one of the following events occurs:
1. An error occurs in the decoding of “accurate” Syndrome (410). i.e., there were more than └(n′−k′)/┌log2 n′┐┘ errors in the (n−t) symbols allocated to store the redundancy. The probability of bit error is Pcross/(L/2).
2. An error occurs in the decoding of the data symbols using the Lee metric decoder (460) indicating that there were w or more errors in one of the n symbols.
The probability of any of these events may be upper-bounded by
P err ≤  ∑ i = ⌊ ( n ′ - k ′ ) / ⌈ log 2  n ′ ⌉ ⌋ + 1 n ′  n ′ ! i !  ( n ′ - i ) !   ( 2 L  p cross ) i   ( 1 - 2 L  P cross ) n ′ - i +  ∑ i = w n  n ! i !  ( n - i ) !   ( 2  L - 2 L  p cross ) i  ( 1 - 2  L - 2 L  P cross ) n - i
Thus, by enumerating over w, a value may be selected which brings the above probability to a minimum.
The improvement in the above expression here compared with that obtained for the “syndrome separate” code is in the first summand which now includes a small probability: Pcross/(L/2). This probability may be compared with the probability appearing for the “syndrome separate” code after normalizing with the number of bits per symbol; the comparison being
2  P cross / L   vis   a   vis   2  P cross / L · L - 1 log 2  L ·
The “syndrome separate & shortened” code, characterized by a separately encoded shortened Syndrome, is now described. The “syndrome separate & shortened” code embodiment improves the “syndrome separate” code embodiment at the expense of adding w2 multiplications over GF(p). The following symbols are used to describe the “syndrome separate & shortened” code:
r—number of bits to be encapsulated by Mapper A (500)
t—number of symbols produced by Mapper A (500)
p—the smallest prime larger than t+w
Di (i=0 . . . t−1)—output symbols of Mapper A (500) comprising numbers in GF(p) with values between 0 and L−1.
w—number of symbols produced by the Syndrome Computation block (510)
Sj (j=0 . . . w−1)—output symbols of the Syndrome computation block (510) comprising numbers in GF(p).
Zj (j=0 . . . w−1)—output symbols of block 520 comprising numbers in GF(p).
Vj (j=0 . . . w−1) and Tj (j=0 . . . w−1)—output symbols of block 530 comprising numbers in GF(p).
α—a non-zero element of GF(p) (i.e. a number between 1 and p−1).
k′—the number of bits mapped by the Demapper unit (540) following the mapping of the w symbols outputted from the Roundup unit (530).
n′—number of bits at the output of the BCH encoder unit (550).
r′—number of symbols encapsulated in unison (in parallel) by the Demapper unit (540).
FIG. 6 illustrates an encoder of the “syndrome separate & shortened” code which is similar to the “syndrome separate” encoder of FIG. 2 but includes 2 additional units: xG−1 unit 520 and roundup unit 530. The operations of all other blocks substantially resemble the operations of their counterparts in FIG. 2, respectively. For example, as in the “syndrome separate” code embodiment, data in the form of a bit sequence flows into Mapper A (500) and then to the syndrome computation unit (510). Both units, 500 and 510, operate substantially as do their counterparts in the “syndrome separate” code encoder of FIG. 2, however the w-symbol output of the Syndrome computation unit (510) flows into a matrix multiplier xG−1 (520) which multiplies the syndrome (as computed before) by the following matrix G−1:
G - 1 = ( α t · 0 α ( t + 1 ) · 0 α ( t + 2 ) · 0 ⋯ α ( t + w - 1 ) · 0 α t · 1 α ( t + 1 ) · 1 α ( t + 2 ) · 1 α t · 2 α ( t + 1 ) · 2 α ( t + 2 ) · 2 ⋮ ⋱ α t · ( w - 1 ) α ( t + w - 1 ) · ( w - 1 ) ) - 1 ,
where α is the primitive element in GF(p) used in the computation of the syndrome. The multiplication operation is defined as follows:
( Z 0 Z 1 ⋮ Z w - 1 ) = G - 1  ( S 0 S 1 ⋮ S w - 1 ) ,
where Zi are the outputs of the matrix multiplication unit.
The output of the matrix multiplier flows into the Roundup unit 530 which adds a number Ti between 0 and L−1 to each of the elements Zi such that Vi+T1 modulo p is divisible by L. The symbols Ti, which take only values between 0 and L−1, are outputted to the Selector unit (580) which appends these symbols to the end of the t symbols holding the data. The symbols Vi flow to the Demapper unit (540). Vi typically only have ┌p/L┐ possible values, all divisible by L.
The Demapper unit (540) operates similarly to the Demapper (120) of the “syndrome separate” code encoder of FIG. 2, however before performing the encapsulation, the symbols are divided by L and in the encapsulation process, the parameter p is exchanged with ┌p/L┐. This yields a more compact presentation of the syndrome and diminishes the BCH code's requirements, thus allowing a tradeoff between w and n′−k′ in the computation of the frame error rate to weigh in favor of w. The operations of the other units in FIG. 6 are similar to those of their counterparts in the “syndrome separate” encoder of FIG. 2. The end result is a codeword as shown in FIG. 17.
The codeword of FIG. 17 may include three portions. The first portion (2200) is simply a mapping of the data sequence into L levels. The second portion (2210) includes W L-level symbols which define a portion of the syndrome characterized in that the overall syndrome of the data symbols along with these W symbols has a significantly smaller set of possibilities. The third portion (2220) includes some of the encoded syndrome (only the portion thereof which was to be defined) and is used as redundancy for purpose of error correction of the information in the first two portions 2200 and 2210. The third portion 2220 is also mapped into L levels and comprises:
a first portion (2230) including the mapping of the total syndrome (computed from portion 2200 and 2210) mapped into bits and then mapped to L levels; and
a second portion (2240) including the mapping to L levels of the redundancy as so computed by the BCH encoder of the portion (2230).
FIG. 7 illustrates a “syndrome separate & shortened” decoder which is similar to the “syndrome separate” decoder of FIG. 3, however, a matrix multiplier unit xG (640) is provided which multiplies the W-symbol output of the Mapper unit (630) by the following matrix G:
G - 1 = ( α t · 0 α ( t + 1 ) · 0 α ( t + 2 ) · 0 ⋯ α ( t + w - 1 ) · 0 α t · 1 α ( t + 1 ) · 1 α ( t + 2 ) · 1 α t · 2 α ( t + 1 ) · 2 α ( t + 2 ) · 2 ⋮ ⋱ α t · ( w - 1 ) α ( t + w - 1 ) · ( w - 1 ) ) ·
The Mapper unit (630) is similar to Mapper unit (220) in the “syndrome separate” decoder of FIG. 2, however, the parameter p is replaced with ┌p/L┐ and the outputs are multiplied by L. Also, the syndrome computation unit (610) operates over t+w elements whereas its counterpart in the “syndrome separate” decoder of FIG. 2 operates over t elements. The remaining units in the “syndrome separate & shortened” decoder of FIG. 7 can be generally identical to their counterparts in the “syndrome separate” code decoder of FIG. 2.
Parameter Determination for the “syndrome separate & shortened” code embodiment of FIGS. 6 and 7 in accordance with certain embodiments of the present invention is now described. Computations for the “syndrome separate & shortened” code embodiment differ from those performed for the “syndrome separate” code to accommodate for the fact that a portion of the redundancy is passed to the Lee decoder and that k′ and n′ are now smaller. A decoding error may occur if either one of the following occurs:
1. An error occurs in the decoding of “accurate” Syndrome (610), e.g. there are more than └(n′−k′)/┌log2 n′┐┘ errors in the (n−t−w) symbols allocated to store the redundancy.
2. An error occurs in the decoding of the data symbols using the Lee metric decoder (660), e.g. there are w or more errors in the first t+w symbols.
The probability of either of these events may be bounded from above by
P err ≤  ∑ i = ⌊ ( n ′ - k ′ ) / ⌈ log 2  n ′ ⌉ ⌋ + 1 n - t - w  ( n - t - w ) ! i !  ( n - t - w - i ) !   ( 2  L - 2 L  p cross ) i   ( 1 - 2  L - 2 L  P cross ) n - t - i +  ∑ i = w t + w  ( t + w ) ! i !  ( t + w - i ) !   ( 2  L - 2 L  p cross ) i  ( 1 - 2  L - 2 L  P cross ) t + w - i
The “syndrome separate & shortened, redundancy & data mixed” code, characterized by mixed data and an encoded shortened Syndrome, is now described. This code improves the “syndrome separate, redundancy & data mixed” code at the cost of adding w2 multiplications over GF(p). The following symbols are used in the following description of the syndrome separate & shortened, redundancy & data mixed” code:
t—number of symbols produced by Mapper A (700).
Di (i=0 . . . n−1)—Combined symbol output of Mapper A (700) and A′ (710) Comprising numbers in GF(p) with values between 0 and L−1.
w—number of symbols produced by the Syndrome Computation block (740)
Sj (j=0 . . . w−1)—output symbols of the Syndrome computation block (740) comprising numbers in GF(p).
Zj (j=0 . . . w−1)—output symbols of block 750 comprising numbers in GF(p).
Vj (j=0 . . . w−1) and Tj (j=0 . . . w−1)—output symbols of block 760 comprising numbers in GF(p).
k′—the number of bits mapped by the Demapper unit (780) following the mapping of the w symbols outputted by the Syndrome Computation block (740).
n′—number of bits at the output of the BCH encoder unit (790).
bi—bit i (=0 . . . n′−1) of the output sequence of the BCH encoder unit (790).
Yi—the symbols (i=0 . . . n−1) at the output of the Mapper B (800) unit
FIG. 8 illustrates a “syndrome separate & shortened, redundancy & data mixed” encoder. A difference between this encoder and the encoder of the “syndrome separate, redundancy & data mixed” code is that w additional symbols with values between 0 and L−1 are appended at the encoder of codeword 2, allowing the sequence of bits (bi, i=0 . . . n′−1) used to encode the Syndrome to be shortened at the expense of adding w elements to the Lee decoding procedure. This guarantees a new tradeoff between w and the size of the redundancy of the BCH code e.g. (n′−k′ bits). The composition of the codeword is shown in FIG. 14. The mid-section 1410 comprises both data bits and encoded syndrome bits (what is left of it following the use of the additional w symbols appended to the end of the codeword) as shown in FIG. 16 in portions 2120 and 2130.
Mapper A (700), Mapper B (710), Selector (720) and the syndrome Computation unit (740) may be generally identical to their counterparts in the “syndrome separate, redundancy & data mixed” encoder of FIG. 4 namely units 300, 310, 320 and 340 respectively. It is appreciated that in this embodiment, t=n−n′−w.
Downstream of the syndrome computation unit (740) are a matrix multiplier xG−1 (750) and a roundup unit (760) which may be generally similar to their counterparts in the “syndrome separate & shortened” encoder of FIG. 6 namely units 520 and 530 respectively. The matrix multiplier xG−1 (750) typically computes the following:
( Z 0 Z 1 ⋮ Z w - 1 ) = ( α ( t + n ′ ) · 0 α ( t + n ′ + 1 ) · 0 α ( t + n ′ + 2 ) · 0 ⋯ α ( t + n ′ + w - 1 ) · 0 α ( t + n ′ ) · 1 α ( t + n ′ + 1 ) · 1 α ( t + n ′ + 2 ) · 1 α ( t + n ′ ) · 2 α ( t + n ′ + 1 ) · 2 α ( t + n ′ + 2 ) · 2 ⋮ ⋱ α ( t + n ′ ) · ( w - 1 ) α ( t + n ′ + w - 1 ) · ( w - 1 ) ) - 1  ( S 0 S 1 ⋮ S w - 1 )
The Demapper unit (780) may be similar to Demapper (350) of the “syndrome separate, redundancy & data mixed” encoder of FIG. 4, however typically, before demapper 780 performs encapsulation, the symbols are divided by L and in the encapsulation process, the parameter p is exchanged with ┌p/L┐, all in contrast to demapper 350, to provide a more compact presentation of the syndrome and diminish the requirements from the BCH, thereby allowing the tradeoff between w and n′−k′ in the computation of the frame error rate to weigh in favor of w. The operation of the other units may be similar to that of their counterparts in the “syndrome separate, redundancy & data mixed” encoder of FIG. 4 except that the Mapper 800, unlike its counterpart, mapper 370 in the “syndrome separate, redundancy & data mixed” code embodiment, effects mixing of the bits b1 from the BCH encoder 790 and the channel symbols for symbols t . . . t+n′−1 instead of for symbols n−n′ . . . n−1 where t=n−n′−w, rather than: t=n−n′.
FIG. 9 illustrates a “syndrome separate & shortened, redundancy & data mixed” decoder which is similar to the “syndrome separate, redundancy & data mixed” decoder of FIG. 5, however, in FIG. 9, a matrix multiplier unit xG (930) is provided which receives the output of w symbols of the Mapper unit (920) and multiplies it by the following matrix G:
G = ( α ( t + n ′ ) · 0 α ( t + n ′ + 1 ) · 0 α ( t + n ′ + 2 ) · 0 ⋯ α ( t + n ′ + w - 1 ) · 0 α ( t + n ′ ) · 1 α ( t + n ′ + 1 ) · 1 α ( t + n ′ + 2 ) · 1 α ( t + n ′ ) · 2 α ( t + n ′ + 1 ) · 2 α ( t + n ′ + 2 ) · 2 ⋮ ⋱ α ( t + n ′ ) · ( w - 1 ) α ( t + n ′ + w - 1 ) · ( w - 1 ) ) ·
Demappers A′ (900) and A (940) may be similar to Demappers A′ (400) and A (430) in the “syndrome separate, redundancy & data mixed” decoder of FIG. 5, except that demixing is effected for symbols t . . . t+n′−1 instead of for symbols n−n′ . . . n−1 where t=n−n′−w rather than t=n−n′. The Mapper unit (920) may be generally similar to the Mapper unit (420) in the “syndrome separate” decoder of FIG. 3 however during de-encapsulation, the parameter p is replaced with ┌p/L┐ and the outputs are multiplied by L. In the “syndrome separate & shortened, redundancy & data mixed” decoder of FIG. 9, as opposed to its FIG. 5 counterpart for the “syndrome separate, redundancy & data mixed” code, the syndrome computation unit (950) operates over n=t+n′+w elements instead of t elements. The remaining units of FIG. 9 may be generally similar to their “syndrome separate, redundancy & data mixed” code counterparts in the embodiment of FIG. 5.
Parameter Determination in accordance with certain embodiments of the present invention is now described. A decoding error may occur if either one of the following events occurs:
1. An error occurs in the decoding of “accurate” Syndrome (910), e.g. there are more than └(n′−k′)/┌log2 n′┐┘ errors in the (n′=n−t−w) symbols allocated to store the redundancy. Now, the probability of bit error is given by Pcross/(L/2).
2. An error occurs in the decoding of the data symbols using the Lee metric decoder (970), e.g. there were w or more errors in n symbols.
P err ≤  ∑ i = ⌊ ( n ′ - k ′ ) / ⌈ log 2  n ′ ⌉ ⌋ + 1 n ′  n ′ ! i !  ( n ′ - i ) !   ( 2 L  p cross ) i   ( 1 - 2 L  P cross ) n ′ - i +    ∑ i = w n   n ! i !  ( n - i ) !   ( 2  L - 2 L  p cross ) i   ( 1 - 2  L - 2 L  P cross ) n - i
Thus, by enumerating over w, a value may be selected which reduces the above probability, e.g. to a minimum.
A numerical example for use of “syndrome separate & shortened, redundancy & data mixed” code is now described. In the following example, the number of levels is L=16, the code length is n=4352, the number of data bits to be encoded is k=16384, the number of symbols produced by Mapper A is t=5462, the prime number of the field is p=4357. the primitive element is α=2, the syndrome size is w=76, the number of bits encapsulated by mapper r is 122 (encapsulating 15 symbols with ┌p/L┐ values each), the bit sequence to be encoded by the BCH is k′=619 bits long, the Bit sequence produced by the BCH is n′=719 bits long, the field over which the binary BCH was constructed is GF(210) and the prime polynomial constructing it is X10+X3+1. A code with the above parameters can handle pcross=0.0036 and obtain a frame error rate of approximately 5e-13. The advantage of the above code, in comparison with other conventional coding schemes, is immediately apparent. The above cross over probability induces an un-coded bit error rate of 0.001688 if Gray coding is used; and it is appreciated that the code above did not actually require Gray coding. A frame error of 5E-13 would be obtained by an equivalent code which can correct up to 75 errors. However, using a conventional binary BCH code with the same number of spare cells (1024 bits) it is only possible to correct 68 errors.
Use of Lee distance based codes rather than Hamming distance based codes is a particular advantage in flash memory devices constructed and operative in accordance with certain embodiments of the present invention because if gray mapping is being used in a flash memory device, errors almost always involve a symbol being confounded with a neighboring symbol in the mapping scheme rather than with a distant symbol in the mapping scheme, such that use of Lee distance based code may give better error correction functionality per unit of redundancy or less redundancy for a given level of error correction functionality adequacy.
It is appreciated that the teachings of the present invention can, for example, be implemented by suitably modifying, or interfacing externally with, flash controlling apparatus. The flash controlling apparatus controls a flash memory array and may comprise either a controller external to the flash array or a microcontroller on-board the flash array or otherwise incorporated therewithin. Examples of flash memory arrays include Samsung's K9XXG08UXM series, Hynix' HY27UK08BGFM Series, Micron's MT29F64008TAAWP or other arrays such as but not limited to NOR or phase change memory. Examples of controllers which are external to the flash array they control include STMicroelectrocincs's ST7265×microcontroller family, STMicroelectrocincs's ST72681 microcontroller, and SMSC's USB97C242, Traspan Technologies' TS-4811, Chipsbank CBM2090/CBM1190. Example of commercial IP software for Flash file systems are: Denali's Spectra™ NAND Flash File System, Aarsan's NAND Flash Controller IP Core and Arasan's NAND Flash File System. It is appreciated that the flash controller apparatus need not be NAND-type and can alternatively, for example, be NOR-type or phase change memory-type.
1. A method for error correction encoding of L level application data residing in a memory comprising L level Multi-level cells (MLCs) including at least some Multi-level cells (MLCs) in which the application data is residing and at least some Multi-level cells (MLCs) which are at least partly available to accept data other than the application data, the method comprising:
encoding the L level application data over a prime field thereby to generate non-binary redundancy data;
binarizing at least some of said non-binary redundancy data thereby to generate binarized redundancy data;
effecting binary error-correction encoding of the binarized redundancy data, thereby to generate binary redundancy data;
combining said binarized redundancy data and said binary redundancy data thereby to generate combined binarized/binary redundancy data; and
restoring said combined binarized/binary redundancy data to L level form, thereby to generate restored L level redundancy data, and storing said restored L level redundancy data in at least some of said at least partly available L level Multi-level cells (MLCs).
2. A method according to claim 1 and also comprising, for at least one L level MLC, utilizing less than L levels for storing at least a portion of said L level application data and utilizing remaining ones of said L levels for storing at least a portion of said combined binarized/binary redundancy data.
3. A method according to claim 1 wherein said binarizing comprises binarizing all of said non-binary redundancy data.
4. A method according to claim 1 wherein said binarizing comprises binarizing only some of said non-binary redundancy data thereby to define a portion of said non-binary redundancy data which is un-binarized, and wherein said method also comprises L-level transforming said un-binarized non-binary redundancy data to L-level un-binarized non-binary redundancy data.
5. A method according to claim 4 wherein said binarizing and said L-level transforming are effected by a single transform function.
6. A method according to claim 4 and also comprising storing said L-level un-binarized non-binary redundancy data in said L level Multi-level cells (MLCs).
7. A method according to claim 1 and wherein said encoding over a prime field comprises Reed-Solomon encoding over a prime field.
8. A method according to claim 1 wherein said combining comprises concatenating said binarized redundancy data and said binary redundancy data thereby to generate concatenated binarized/binary redundancy data.
9. A method according to claim 1 wherein said binary error-correction encoding comprises BCH encoding of the binarized redundancy data, thereby to generate BCH-encoded redundancy data.
10. A method according to claim 1 wherein said at least some Multi-level cells (MLCs) which are at least partly available to accept data other than said application data comprise entirely available Multi-level cells (MLCs) in which no L level application data is residing,
and wherein said storing comprises storing said restored L level redundancy data in at least some of said entirely available L level Multi-level cells (MLCs).
11. A method for error correction decoding of at least restored L level redundancy data residing in a memory comprising L level Multi-level cells (MLCs) including at least some Multi-level cells (MLCs) in which possibly erroneous L-level application data resides and at least some Multi-level cells (MLCs) which store at least said restored L level redundancy data, the method comprising:
binarizing said at least restored L level redundancy data, thereby to generate binarized restored L level redundancy data;
deriving binary redundancy data from said binarized restored L level redundancy data;
effecting binary error-correction decoding of the binary redundancy data, thereby to generate binarized redundancy data;
transforming said binarized redundancy data to generate non-binary redundancy data; and
decoding said non-binary redundancy data and said possibly erroneous L-level application data over a prime field, thereby to generate decoded L level application data.
12. A method according to claim 2 wherein said binarizing comprises binarizing only some of said non-binary redundancy data thereby to define a portion of said non-binary redundancy data which is un-binarized, and wherein said method also comprises L-level transforming said un-binarized non-binary redundancy data to L-level un-binarized non-binary redundancy data.
13. Apparatus for error correction encoding of L level application data residing in a memory comprising L level Multi-level cells (MLCs) including at least some Multi-level cells (MLCs) in which said application data is residing and at least some Multi-level cells (MLCs) which are at least partly available to accept data other than said application data, the apparatus comprising:
prime-field encoding apparatus operative to encode the L level application data over a prime field thereby to generate non-binary redundancy data;
binarization apparatus operative to binarize at least some of said non-binary redundancy data thereby to generate binarized redundancy data;
binary ECC apparatus operative to effect binary error-correction encoding of the binarized redundancy data, thereby to generate binary redundancy data; and
data combination apparatus operative to combine said binarized redundancy data and said binary redundancy data thereby to generate combined binarized/binary redundancy data; and
L-level restoration apparatus operative to restore said combined binarized/binary redundancy data to L level form, thereby to generate restored L level redundancy data, and storing said restored L level redundancy data in at least some of said at least partly available L level Multi-level cells (MLCs).
14. A method for operating a flash device, said method comprising:
using Lee distance based codes in said flash device;
thereby increasing the number of errors that can be corrected for a given number of redundancy cells compared with Hamming distance based codes.
15. A method for operating a flash device, said method comprising:
providing a Lee code associated with a first group of symbols; and
programming data in the flash device using a second group of symbols, said second group being a sub group of the first group so as to allow extending the number of errors that can be corrected for a given number of redundancy cells compared with Hamming distance based codes.
16. The method of claim 15 wherein said first data stream is associated with a first group of symbols and said redundancy data stream is associated with a second group of symbols, said second group being a sub group of the first group.
a Lee metric-based decoder operative to decode multi-level physical media.
18. A method for error correction comprising:
encoding data capable of being decoded, thereby to effect error correction, said encoding comprising using a separate encoder to store a Syndrome computation to be used during said decoding.
19. A method for error correction comprising:
encoding data capable of being decoded, thereby to effect error correction, said encoding comprising:
encoding a syndrome giving rise to encoded syndrome; and
encapsulating and mapping the encoded syndrome into designated media cells.
20. A method for error correction comprising:
encoding a syndrome; and
reducing error probability in the encoded Syndrome by encapsulating and mapping the encoded Syndrome mixed with data bits into designated media cells.
a Lee distance based encoder associated with a first group of symbols; and
a writing module for programming data in at least one cell of the cell array using a second group of symbols, said second group being a sub group of the first group so as to allow extending the number of errors that can be corrected for a given number of redundancy cells compared with Hamming distance based codes.
22. A system according to claim 17 wherein said multi-level physical media includes media having less levels than symbol values.
23. A program storage device readable by machine, tangibly embodying a program of instructions executable by the machine to perform method steps for error correction encoding of L level application data residing in a memory comprising L level Multi-level cells (MLCs) including at least some Multi-level cells (MLCs) in which the application data is residing and at least some Multi-level cells (MLCs) which are at least partly available to accept data other than the application data, the method comprising:
24. A computer program product comprising a computer useable medium having computer readable program code embodied therein for error correction encoding of L level application data residing in a memory comprising L level Multi-level cells (MLCs) including at least some Multi-level cells (MLCs) in which the application data is residing and at least some Multi-level cells (MLCs) which are at least partly available to accept data other than the application data, the computer program product comprising:
computer readable program code for causing the computer to encode the L level application data over a prime field thereby to generate non-binary redundancy data;
computer readable program code for causing the computer to binarize at least some of said non-binary redundancy data thereby to generate binarized redundancy data;
computer readable program code for causing the computer to effect binary error-correction encoding of the binarized redundancy data, thereby to generate binary redundancy data;
computer readable program code for causing the computer to combine said binarized redundancy data and said binary redundancy data thereby to generate combined binarized/binary redundancy data; and
computer readable program code for causing the computer to restore said combined binarized/binary redundancy data to L level form, thereby to generate restored L level redundancy data, and storing said restored L level redundancy data in at least some of said at least partly available L level Multi-level cells (MLCs).
a flash memory cell array; and
a Lee distance based encoder;
wherein said Lee distance based encoder is used for error correction encoding thereby increasing the number of errors that can be corrected for a given number of redundancy cells compared with Hamming distance based codes.
US12667043 2007-12-12 2008-09-17 Systems and methods for error correction and decoding on multi-level physical media Active 2029-08-22 US8359516B2 (en)
PCT/IL2008/001229 WO2009074978A3 (en) 2007-12-12 2008-09-17 Systems and methods for error correction and decoding on multi-level physical media
US12667043 US8359516B2 (en) 2007-12-12 2008-09-17 Systems and methods for error correction and decoding on multi-level physical media
US13746072 US8782500B2 (en) 2007-12-12 2013-01-21 Systems and methods for error correction and decoding on multi-level physical media
US20100211856A1 true true US20100211856A1 (en) 2010-08-19
US8359516B2 US8359516B2 (en) 2013-01-22
ID=40755951
US12667043 Active 2029-08-22 US8359516B2 (en) 2007-12-12 2008-09-17 Systems and methods for error correction and decoding on multi-level physical media
US13746072 Active US8782500B2 (en) 2007-12-12 2013-01-21 Systems and methods for error correction and decoding on multi-level physical media
US14307213 Abandoned US20140365847A1 (en) 2007-12-12 2014-06-17 Systems and methods for error correction and decoding on multi-level physical media
US (3) US8359516B2 (en)
WO (1) WO2009074978A3 (en)
US20120075940A1 (en) * 2010-09-24 2012-03-29 Kabushiki Kaisha Toshiba Memory system
US20120151123A1 (en) * 2010-12-08 2012-06-14 Kabushiki Kaisha Toshiba Memory system and memory controller
JP4982580B2 (en) * 2010-03-23 2012-07-25 株式会社東芝 Data writing and reading method of the memory system and a memory system
KR101678919B1 (en) * 2011-05-02 2016-11-24 삼성전자주식회사 A memory system and an error correction method
US8949696B2 (en) * 2013-02-19 2015-02-03 Lsi Corporation Systems and methods for trapping set disruption
US8122328B2 (en) * 2007-03-30 2012-02-21 Samsung Electronics Co., Ltd. Bose-Chaudhuri-Hocquenghem error correction method and circuit for checking error using error correction encoder
JP4360235B2 (en) * 2004-03-12 2009-11-11 日本電気株式会社 Multi-level modulation method and system
US8595592B2 (en) * 2010-09-24 2013-11-26 Kabushiki Kaisha Toshiba Memory system
US9336085B2 (en) 2010-12-08 2016-05-10 Kabushiki Kaisha Toshiba Memory system and memory controller
US8959415B2 (en) * 2010-12-08 2015-02-17 Kabushiki Kaisha Toshiba Memory system and memory controller
US20140365847A1 (en) 2014-12-11 application
WO2009074978A2 (en) 2009-06-18 application
WO2009074978A3 (en) 2010-03-04 application
US20130139037A1 (en) 2013-05-30 application
US8359516B2 (en) 2013-01-22 grant
US8782500B2 (en) 2014-07-15 grant
Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:WEINGARTEN, HANAN;REEL/FRAME:026352/0035