The present disclosure relates to data storage systems, and more particularly, to techniques for encoding and decoding data to accommodate memory cells having stuck-at faults.
Many data communication systems use error correction encoders and decoders to detect and correct errors in data. A data communication system may, for example, correct random errors that are generated at a rate of about 1×10−4. To protect against an error rate of about 1×10−4, an error correction encoder generates encoded bits having about 10% more bits than its input bits.
Phase change memory (PCM) is a class of non-volatile memory. PCM devices have many advantages over traditional non-volatile flash memory. However, PCM devices may generate a large number of errors that are induced by degradation. For example, a PCM device may generate errors at a rate of 1×10−2 or greater.
At the limits of endurance, the error rate in non-volatile memory devices is dominated by degradation. Errors that are caused by degradation include stuck-at faults, which have different statistics than the random errors that are common in data communication systems.
According to some embodiments, a data storage system includes a memory circuit that has memory cells and a control circuit. The control circuit is operable to receive data bits provided for storage in the memory cells. The control circuit is operable to receive a first matrix. Each row of the first matrix corresponds to a unique one of the data bits. The control circuit is operable to generate a second matrix having only the rows of the first matrix that correspond to the data bits provided for storage in a subset of the memory cells having stuck-at faults. The control circuit is operable to generate a third matrix having linearly independent columns of the second matrix. The control circuit is operable to encode the data bits to generate encoded data bits and redundant bits using the third matrix.
According to some embodiments, the control circuit is operable to receive encoded data bits read from the memory cells, and the control circuit is operable to receive redundant bits. The control circuit is operable to receive a first matrix. The control circuit is operable to generate a second matrix having a subset of columns from the first matrix that are selected based on a first subset of the redundant bits. The control circuit is operable to generate a first vector based on a second subset of the redundant bits. The control circuit is operable to generate a second vector based on the first vector and the second matrix. The control circuit is operable to apply the second vector to the encoded data bits to generate data bits.
Various objects, features, and advantages of the present invention will become apparent upon consideration of the following detailed description and the accompanying drawings.
According to some embodiments described herein, an encoder encodes input data bits to generate encoded data bits and redundant bits. The encoded data bits generated by the encoder are stored in memory cells of a memory circuit. The encoded data bits accommodate memory cells in the memory circuit that have stuck-at faults. The memory circuit may be, for example, a phase change memory circuit (e.g., that uses chalcogenide glass) or another type of memory circuit that has stuck-at faults.
A memory cell having a stuck-at fault is a memory cell that can only store a single digital value. A memory cell having a stuck-at fault value of 1 can only store a logic high digital value, and a memory cell having a stuck-at fault value of 0 can only store a logic low digital value. Thus, only a logic high digital value can be read from a memory cell having a stuck-at fault value of 1 (i.e., stuck-at 1), and only a logic low digital value can be read from a memory cell having a stuck-at fault value of 0 (i.e., stuck-at 0). Memory cells having stuck-at faults generally have stuck-at fault values that are stable over time.
If some of the memory cells in the memory circuit have stuck-at faults, the digital values of the stuck-at faults and the addresses of the memory cells having the stuck-at faults are determined before the encoding process and are provided to the encoder. The encoder generates the encoded data bits and the redundant bits using the digital values and addresses of the stuck-at faults. The encoded data bits are stored in the memory cells of the memory circuit. The redundant bits may be stored in the same memory circuit as the encoded data bits or in a different memory circuit.
Subsequently, the encoded data bits and the redundant bits are read from memory and provided to a decoder. The decoder decodes the encoded data bits using the redundant bits to regenerate the data bits. The data bits regenerated by the decoder do not contain errors that are caused by the known stuck-at faults in the memory circuit.
The techniques described herein are directly applicable to multi-level memory cells. Multi-level memory cells can store more than one bit per memory cell. For example, if a memory cell holds 2 bits, and it becomes stuck, then the values of those two bits are fixed, and they can be treated as two separate stuck-at fault locations. Because the location of one of the stuck-at faults is known, the location of the other stuck-at fault is also known. As a result, for the same stuck-at fault error rate, less redundant bits can be generated for multi-level memory cells than the redundant bits that are generated for single-level memory cells. The number of redundant bits may be smaller, for example, by a factor equal to the number of bits per memory cell.
Initially, the encoder receives data bits that are provided for storage in the memory cells of the memory circuit. Each of the data bits is provided for storage in a corresponding memory cell of the memory circuit. One or more of the data bits is provided for storage in a corresponding memory cell that has a known stuck-at fault.
In operation 201, the encoder receives a first matrix. Each row of the first matrix corresponds to a unique one of the data bits. In operation 202, the encoder generates a second matrix having only the rows of the first matrix that correspond to the data bits provided for storage in the memory cells that have stuck-at faults. In operation 203, the encoder generates a third matrix having linearly independent columns of the second matrix. In operation 204, the encoder encodes the data bits to generate encoded data bits and redundant bits using the third matrix.
The digital values of the data bits that do not match their corresponding stuck-at faults are inverted to generate corresponding ones of the encoded data bits. The digital values of the data bits that match their corresponding stuck-at faults are not inverted to generate corresponding ones of the encoded data bits. According to various embodiments, the redundant bits may include index bits in an index, as described below.
Subsequently, the encoded data bits are stored in their corresponding memory cells in the memory circuit. The redundant bits are also stored in memory. The encoded data bits and the redundant bits may be stored in the same memory circuit or in different memory circuits. For example, the encoded data bits may be stored in memory circuit 102, and the redundant bits may be stored in memory circuit 103.
Initially, data bits are provided for storage in memory cells of a memory circuit. Each of the data bits is provided for storage in a corresponding memory cell of the memory circuit. A subset of the data bits are provided for storage in corresponding memory cells that have known stuck-at faults. The subset may include one or more data bits.
Prior to the process of encoding the data bits, a matrix M is generated that has a different row for each of the data bits. Each row of the matrix M corresponds to a unique one of the data bits. For a k number of data bits provided for storage in memory cells having an s number of stuck-at faults, the matrix M has a k number of rows, and any subset of an s number of rows of the matrix M are linearly independent, where s is a positive integer that is less than the positive integer k. Matrix M can be used to encode the data bits to generate encoded data bits that are stored in a k number of memory cells, where the s number of stuck-at faults are at any locations within the memory cells.
As an example, the matrix M may be generated using a block code, such as a parity check code. According to a more specific example, the matrix M is generated by taking the transpose of a parity check matrix of a BCH code, where BCH refers to Bose Chaudhuri Hocquenghem. For a k number of data bits provided for storage in memory cells having an s number of stuck-at faults (where s<k), a BCH code can be generated that has a block size equal to k, as follows. Given m>2, and t<2m-1, a BCH code can be created such that the block length is n=2m−1, the number of parity check bits is less than or equal to m×t, and the minimum distance is at least 2t+1, which also means that any 2t columns of the parity check matrix are linearly independent. Therefore, a BCH code is generated with block length k=2log2(k+1)−1 (therefore m=log2(k+1)), and a minimum distance s+1 (therefore 2t+1=s+1, and thus t=s/2). The resulting parity check matrix Mp of the BCH code with parameters n=k and t=s/2 has at most m×t=(s/2) log2(k+1) rows and k columns, with the property that any subset of 2t=s columns are linearly independent. For simplicity, log2 k is used instead of log2(k+1). The transpose of the parity check matrix MP is the matrix M. Thus, matrix M is the transpose of parity check matrix MP in this example. The number of parity check bits described above corresponds to the number of rows in the parity check matrix MP, and therefore becomes the number of columns in the transposed matrix M.
In operation 302, the encoder selects an s number of columns of the matrix MS that are linearly independent to generate a square matrix M′S that is fully invertible. Each of the columns of matrix MS is identified by a unique column number. The column numbers of the s columns of matrix MS that are selected in operation 302 to generate square matrix M′S are referred to as column numbers b1, b2, . . . bS. The encoder causes matrix M′S to have only the s number of columns of matrix MS that are indicated by column numbers b1, b2, . . . bS. The square matrix M′S generated in operation 302 has an s number of rows and an s number of columns. Also, matrix M′S has full rank with linearly independent columns, and thus, matrix M′S is fully invertible. In an embodiment, the encoder uses the reduced row echelon form of matrix MS to generate square matrix M′S. Transforming MS into row echelon form is performed by using a sequence of row operations.
A subset of the data bits are provided for storage in corresponding memory cells that have known stuck-at faults. The encoder compares the subset of the data bits to the digital values of their corresponding stuck-at faults to determine which of the data bits in the subset have the same digital values as their corresponding stuck-at faults and which of the data bits in the subset have different digital values than their corresponding stuck-at faults. In operation 303 in
In operation 304, the encoder generates a vector V by solving the equation M′S×V=U. This equation has a solution, because matrix M′S is fully invertible. The encoder inverts matrix M′S and then multiplies the inversion of matrix M′S by vector U generated in operation 303 to generate vector V. Vector V is an s×1 vector having an s number of values.
In operation 305, the encoder generates index bits that indicate vector V and the columns of matrix MS that were selected in operation 302 to generate matrix M′S. The index bits are redundant bits. The index bits are provided as an index associated with the encoded data bits generated in operation 308. The index bits are used by a decoder to decode the encoded data bits to regenerate the data bits.
In an embodiment of operation 305, the encoder generates a unique binary number to identify each of the s column numbers b1, b2, . . . bS of matrix MS that were selected in operation 302 to generate matrix M′S. These binary numbers are provided as a first subset of the index bits generated in operation 305. Thus, in this embodiment, the first subset of the index bits identifies each of the column numbers b1, b2, . . . bS of matrix MS that were selected in operation 302 to generate matrix M′S. The number of index bits used to indicate the binary numbers that identify the column numbers b1, b2, . . . bS of matrix MS used to generate matrix M′S is shown below in equation (1).
Equation (1) equals less index bits than an index that records the exact bit positions of an s number of stuck-at faults out of k bit positions, as long as (s log2 k)/2<k.
In operation 305, the encoder also generates an s number of index bits that indicate the values of vector V. The s number of index bits that indicate the values of vector V are a second subset of the index bits generated in operation 305. The total number of index bits generated in operation 305 is shown below in equation (2).
total number of index bits=2s+s log2 log2 k (2)
According to another embodiment of operation 305, the encoder generates a unique binary number to identify each of the ((s log2 k)/2−s) column numbers of matrix MS that were not selected in operation 302 to generate matrix M′S. These binary numbers are provided as the first subset of the index bits generated in operation 305. In this embodiment, the first subset of the index bits identifies each of the column numbers of matrix MS that were not selected to generate matrix M′S in operation 302. A decoder infers the columns of matrix MS that were selected to generate matrix M′S based on the binary numbers in the index indicating the column numbers of matrix MS that were not selected to generate matrix M′S. In this embodiment, the encoder also generates an s number of index bits that indicate the values of vector V in operation 305.
Only the vector V in the index bits depends on whether the data bits in the subset match or do not match the digital values of their corresponding stuck-at faults. The remaining index bits only depend on the locations of the stuck-at faults within the corresponding memory cells. Only an s number of the index bits change when encoding different sets of data bits for the same memory cells. The remaining index bits remain the same when encoding different sets of data bits for the same memory cells.
Each of the columns of the matrix M is identified by a unique column number. The columns of matrix M are identified by the same column numbers that identify the corresponding columns of matrix MS. In operation 306, the encoder generates a sub-matrix G of matrix M by selecting an s number of columns from matrix M having the same column numbers b1, b2, . . . bS that were selected from matrix MS to generate matrix M′S in operation 302. Sub-matrix G has a k number of rows and an s number of columns. The encoder causes sub-matrix G to have the s number of columns from matrix M having the column numbers b1, b2, . . . bS that were selected from matrix MS to generate matrix M′S in operation 302.
In operation 307, the encoder computes a vector W that equals sub-matrix G times vector V (i.e., W=G×V). Vector W is a k×1 vector having k values, where k is the number of data bits. In operation 308, the encoder applies vector W to the data bits to generate encoded data bits. In operation 308, the encoder generates the encoded data bits by inverting each of the ith data bits that has a corresponding ith value in vector W equal to 1 and by not inverting each of the ith data bits that has a corresponding ith value in vector W equal to 0. Because M′S×V=U, the subset of the encoded data bits that are provided for storage in memory cells having stuck-at faults have the same digital values as their corresponding stuck-at faults. In operation 309, the encoder provides the encoded data bits for storage in the corresponding memory cells of the memory circuit.
Some of the operations shown in and described above with respect to
In operation 401, the decoder receives the matrix M. The matrix M in operation 401 is the same matrix M that was used to generate the encoded data bits in the operations of
As discussed above with respect to the first embodiment of operation 305 in
In the first embodiment of operation 305, the decoder causes sub-matrix G to have the s number of columns from matrix M having the column numbers b1, b2, . . . bS that are indicated by the first subset of the index bits in operation 503. In the second embodiment of operation 305, the decoder causes sub-matrix G to have the s number of columns from matrix M having the column numbers b1, b2, . . . bS that are not indicated by the first subset of the index bits in operation 503. Sub-matrix G has a k number of rows and an s number of columns.
As discussed above with respect to operation 305 in
In operation 405, the decoder applies vector W to the encoded data bits to regenerate the data bits. In operation 405, the decoder regenerates the data bits by inverting each of the ith encoded data bits that has a corresponding ith value in vector W equal to 1 and by not inverting each of the ith encoded data bits that has a corresponding ith value in vector W equal to 0.
The columns of matrix MS indicated by column numbers 11, 10, and 00 are linearly independent. Column number 01 is a linear combination of column numbers 11 and 00. Therefore, the encoder causes matrix M′S to have the three columns of matrix MS that have column numbers 11, 10, and 00, as shown in
In operation 306, the encoder generates sub-matrix G of matrix M, as described above. Sub-matrix G has all eight rows of matrix M, but sub-matrix G has only the three columns of matrix M that have column numbers 11, 10, and 00, as shown in
In operation 303, the encoder generates vector U, as described above. Because the stuck-at fault of the memory cell corresponding to bit position 2 has the same digital value as the data bit at bit position 2 as shown in
According to another embodiment, the number of index bits in the index can be reduced if the number k of data bits is very large. This embodiment is referred to as an asymptotic improvement. In this embodiment, a block of data bits is provided for storage in corresponding memory cells of a memory circuit. For some parameter t, where t is a positive integer, the block of data bits is split into an s/t number of sub-blocks, where s is the number of stuck-at faults in the corresponding memory cells of the memory circuit. Each of the sub-blocks of data bits corresponds to a subset of the memory cells. Each of the subsets of the memory cells has exactly the same number t of memory cells that have stuck-at faults. Let a1, a2, . . . , as/t be the numbers of data bits in the s/t number of sub-blocks of data bits. Each of the sub-blocks may have a different number of data bits. Alternatively, some or all of the sub-blocks may have the same number of data bits.
In order to store the numbers of data bits a1, a2, . . . , as/t in the sub-blocks, an encoder generates a number of index bits equal to
where k is the total number of data bits in the block of data bits. For each of the sub-blocks of data bits, the encoder uses the linear algebraic technique described above with respect to
number of index bits=2s+t(Σs/ti=1 log2 log2 aL) (3)
The function log2 log2 x is a concave function. Equation (3) is at its maximum value when all of the ai's in equation (3) are equal, such that each of the sub-blocks has the same number of bits. Equation (4) below shows the total number of index bits generated by the encoder for this embodiment when each of the sub-blocks has the same number of bits.
The number of index bits in the index in this embodiment can be minimized with respect to parameter t. If q=k/s, then t=(log2 q)2 minimizes the number of index bits in the index in this embodiment. For this value of t, the total number of index bits in the index is shown below in equation (5).
The second term of equation (5) is approximately s log2 log2 q. Each of the remaining terms of equation (5) is smaller than s, if q>3. Therefore, equation (5) can be simplified as shown below in equation (6). Equation (6) below shows the maximum number of index bits according to this approximation.
number of index bits=3s+s log2 log2 q (6)
Embodiments of the present invention can, for example, be implemented using one or a combination of hardware, software, and a computer-readable medium containing program instructions. Embodiments of the present invention can be embodied as program code stored on a non-transitory computer readable medium that can be run on a computer. Software implemented by embodiments of the present invention and results of the present invention can be stored on a computer-readable medium such as semiconductor memory, phase change memory, hard disk drive, compact disc (CD), digital video disc (DVD), or other media. Results of the present invention can be used for various purposes such as being executed or processed by a processor, being displayed to a user, transmitted in a signal over a network, etc. Embodiments of the present invention may also be embodied as a computer readable program code unit stored on a non-transitory computer readable medium, for causing a number of computer systems connected via a network to affect distributed processing.
The foregoing description of the exemplary embodiments of the present invention has been presented for the purposes of illustration and description. The foregoing description is not intended to be exhaustive or to limit the present invention to the examples disclosed herein. In some instances, features of the present invention can be employed without a corresponding use of other features as set forth. Many modifications, substitutions, and variations are possible in light of the above teachings, without departing from the scope of the present invention.