Embodiments described herein relate generally to a memory controller, a memory system, and a decoding method.
In a storage device, generally, data as an error correction code is stored in order to protect the data to be stored. There is a block product code as a type of code having a large code length configured by combining the error correction codes (called a component code) having a small code length.
According to an embodiment, a memory controller includes an encoder which generates a block product code having a first code and a second code (linear cyclic codes) as component codes, and a memory interface which writes the block product code to a nonvolatile memory and reads out a received word corresponding to the block product code from the nonvolatile memory. In addition, the memory controller includes a decoder which performs a decoding using a code constraint corresponding to a generator polynomial as a common divisor between a generator polynomial of the first code and a generator polynomial of the second code with respect to a symbol of an area which is included in the block product code and not subjected to a code constraint of the first code but subjected to a code constraint of the second code.
A memory controller, a memory system, and a decoding method according to an embodiment will be described with reference to the accompanied drawings below. Further, the invention is not limited to the embodiment.
The nonvolatile memory 3 is a nonvolatile memory to store data in a nonvolatile manner (for example, a NAND memory). Further, the description herein will be made about an example of a NAND memory used as the nonvolatile memory 3. As the nonvolatile memory 3, any storage member other than the NAND memory such as a three-dimensional flash memory, a resistance random access memory (ReRAM), or a ferroelectric random access memory (FeRAM) may be employed. In addition, the description herein will be made about an example of a semiconductor memory used as the storage member. An error correction process according to this embodiment may be applied to a storage device using a storage member other than the semiconductor memory.
The storage device 1 may be a memory card in which the memory controller 2 and the nonvolatile memory 3 are integrated in one package, or may be a solid state drive (SSD).
The memory controller 2 controls writing onto the nonvolatile memory 3 in response to a write command (request) from the host 4. In addition, the memory controller 2 controls reading out of the nonvolatile memory 3 in response to a read-out command from the host 4. The memory controller 2 includes a host I/F (host interface) 21, a memory I/F (the memory interface) 22, a control unit 23, an encoder/decoder 24, and a data buffer 25. The host I/F 21, the memory I/F 22, the control unit 23, the encoder/decoder 24, and the data buffer 25 are connected to each other through an internal bus 20.
The host I/F 21 performs a process according to an interface standard with respect to the host 4, and outputs a command received from the host 4 and user data to the internal bus 20. In addition, the host I/F 21 transmits the user data read out of the nonvolatile memory 3 and a response from the control unit 23 to the host 4. Further, in this embodiment, data to be written into the nonvolatile memory 3 in response to a write request from the host 4 will be referred to as user data.
The memory I/F 22 performs a write process into the nonvolatile memory 3 based on an instruction of the control unit 23. In addition, the memory I/F 22 performs a read process on the nonvolatile memory 3 based on an instruction of the control unit 23.
The control unit 23 is a control unit which collectively controls the respective components of the storage device 1. In a case where a command is received from the host 4 through the host I/F 21, the control unit 23 performs control according to the command. For example, the control unit 23 instructs the memory I/F 22 to write the user data and the writing of redundant data generated by encoding to the nonvolatile memory 3 according to a command from the host 4. In addition, the control unit 23 instructs the memory I/F 22 to read out the user data from the nonvolatile memory 3 according to the command from the host 4.
In addition, in a case where the write request is received from the host 4, the control unit 23 determines a storage area (memory area) on the nonvolatile memory 3 with respect to the user data accumulated in the data buffer 25. In other words, the control unit 23 determines a write destination of the user data. A correspondence between a logical address of the user data received from the host 4 and a physical address indicating the storage area on the nonvolatile memory 3 with the user data stored therein is stored as an address conversion table.
In addition, in a case where the read request is received from the host 4, the control unit 23 converts the logical address designated by the read request into the physical address using the address conversion table, and instructs the memory I/F 22 to perform the reading out of the physical address.
In the NAND memory, the writing and the reading are generally performed in a unit of data called a page, and erasing is performed in a unit of data called a block. In this embodiment, a plurality of memory cells connected to the same word line are called a memory cell group. In a case where the memory cell is a single level cell (SLC), one memory cell group corresponds to one page. In a case where the memory cell is a multi-level cell (MLC), one memory cell group corresponds to a plurality of pages. In addition, each memory cell is connected to the word line and also to a bit line. Each memory cell can be identified using an address for identifying the word line and an address for identifying the bit line. In this embodiment, the writing of one page of data to the same page of the same memory cell group is expressed as a writing to one page of the nonvolatile memory 3.
The data buffer 25 temporarily stores the user data received by the memory controller 2 from the host 4 until the user data is stored in the nonvolatile memory 3. In addition, the data buffer 25 temporarily stores the user data read out of the nonvolatile memory 3 until the user data is transmitted to the host 4. The data buffer 25, for example, is formed by a general purpose memory such as a static random access memory (SRAM) or a dynamic random access memory (DRAM).
The user data transmitted from the host 4 is transferred to the internal bus 20 and stored in the data buffer 25. The encoder/decoder 24 encodes the data stored in the nonvolatile memory 3 and generates a code word. The encoder/decoder 24 includes an encoder 26 and a decoder 27. The encoding and the decoding according to this embodiment will be described in detail in the description of the write process to the nonvolatile memory 3 and the read process from the nonvolatile memory 3 described below.
First, the write process according to this embodiment will be described. At the time of the writing to the nonvolatile memory 3, the control unit 23 instructs the encoder 26 to perform the encoding of the data, determines a storage location (a storage address) of the code word in the nonvolatile memory 3, and instructs the memory I/F 22 with the storage location. The encoder 26 encodes the data on the data buffer 25 to generate the code word based on the instruction from the control unit 23. The memory I/F 22 controls the storing of the code word to the storage location on the nonvolatile memory 3 instructed from the control unit 23.
The encoder 26 generates the block product code.
As illustrated in
The encoder 26 according to this embodiment first generates r′ code words of the code C1 in the row direction. Therefore, r rows are generated in the upper portion of the block product code of
In addition, data other than the user data received from the host 4 (for example, data used for the control of the memory controller 2) may be targeted for the encoding. In addition, as the component code, for example, a Bose-Chaudhuri-Hocquenghem (BCH) code, a Reed-Solomon (RS) code, or the like may be employed.
Herein, it is assumed that a k-th symbol of the block (the symbol string) at a row number i and a column number j in the block product code according to this embodiment is denoted by si,j,k.
Herein, a code word c configured by n symbol strings is denoted by c=(s0, S1, s2, . . . , sn-1), and a code polynomial c(x) corresponding to the code word c is denoted by the following Equation (1).
In this case, in the linear cyclic code, the following Equation (2) is established in a polynomial g(x) called a generator polynomial. In other words, c(x) comes to have a remainder of “0” when being divided by g(x).
c(x)≡0 mod g(x) (2)
In addition, the codes C1 and C2 of the block product code both are assumed to be the linear cyclic code, and the generator polynomials of the component codes C1 and C2 are denoted by g1(x) and g2(x), respectively. In this case, when the code polynomial of the code word of an i-th component code C1 of the block product code is denoted by c1i(x), and the code polynomial of the code word of a j-th code C2 is denoted by c2j(x), the following Equations (3) and (4) are established by the above Equation (2).
Further, in this description, the left upper side of the block product code corresponds to a term having the lowest degree of the code polynomial, and the right lower side corresponds to a term having a high degree.
The symbol included in the areas of checks2 and checks2 on checks1 in
In this embodiment, an error correcting performance on the symbol included in the areas of checks2 and checks2 on checks1 can be improved by performing the decoding using another code constraint as well as the code constraint equation (4) by the code C2 even on checks2 and checks2 on checks1.
The decoding method according to this embodiment will be described. First, a mathematical property of the block product code which is used in the decoding method of the block product code in this embodiment will be described. Further, in this embodiment, the component codes C1 and C2 are used as the linear cyclic codes, and a symbol of the codes always is its own additive inverse.
The above Equations (3) and (4) represent equations of the code constraints by the codes C1 and C2 which are established in the block product code. Herein, when a greatest common divisor of the generator polynomials g1 (x) and g2(x) of the codes C1 and C2 is set to ggcd(x), the following Equations (5) and (6) are established from Equations (3) and (4).
Herein, when the term obtained by multiplying xib by the left side of Equation (5) and the term obtained by multiplying xjb by the left side of Equation (6) are added, the following Equation (7) can be derived from Equations (5) and (6).
In this embodiment, the description will be made about an example in which r−r′ is 1. In this case, the above Equation (7) can be expressed as the following Equation (8).
Herein, a symbol group of checks2 and checks2 on checks1 (that is, the symbol group in the lowest one row of the block product code illustrated in
Next, the description has been made about an exemplary decoding method of the block product code according to this embodiment using the mathematical property. In this embodiment, a hard decision decoding may be employed as the decoding method of each component code, or a soft decision decoding may be employed. In addition, in a case where the soft decision decoding is performed, there may be employed a decoding method called a turbo decoding in which an external value is exchanged in each component code. memory I/F 22 reads data (a received word) corresponding to the block product code illustrated in
The first decoder 61 performs the decoding (C1 decoding) corresponding to the code constraint of the code C1 on the received word which is previously encoded to a C1 code word stored in the data buffer 25. When an error location is specified through the decoding, the error at the place corresponding to the data buffer 25 is corrected.
The second decoder 62 performs the decoding (C2 decoding) corresponding to the code constraint of the code C2 on the received word which is previously encoded to a C2 code word stored in the data buffer 25. When the error location is specified through the decoding, the error at the place corresponding to the data buffer 25 is corrected.
The third decoder 63 performs the decoding (Cgcd decoding) corresponding to the code constraint of the code Cgcd on the read data corresponding to the symbol group of checks2 and checks2 on checks1 stored in the data buffer 25 (that is, dchecks2 in the lowest one row of the block product code illustrated in
Any decoding method may be used in the first decoder 61, the second decoder 62, and the third decoder 63, and for example a bounded distance decoding may be employed. In addition,
For example, the decoding of the block product code is performed in the following procedure using the decoder 27 illustrated in
Next, the decoding controller 64 determines whether an execution condition of the Cgcd decoding in which the decoding algorithm is applied to the code Cgcd is satisfied (Step S3). As the execution condition of the Cgcd decoding, for example, a condition in which repetition counts of the C1 decoding and the C2 decoding are equal to or more than a first threshold may be used. The execution condition of the Cgcd decoding is not limited to the above configuration.
In a case where it is determined that the execution condition of the Cgcd decoding is satisfied (Yes in Step S3), the decoding controller 64 instructs the third decoder 63 to perform the Cgcd decoding, and the third decoder 63 performs the Cgcd decoding with respect to the area (from a r′-th row to (r−1)-th row of the block product code illustrated in
Next, the decoding controller 64 determines whether an end condition of the decoding of the block product code is satisfied (Step S5). In a case where the end condition of the decoding of the block product code is satisfied (Yes in Step S5), the decoding controller 64 ends the decoding of the block product code. As the end condition of the decoding of the block product code, a condition that all the code words of at least one component code of the code C1 and the code C2 satisfy the code constraint may be used. In addition, as the end condition of the decoding of the block product code, a condition that the repetition count is equal to or more than a second threshold may be used.
In Step S3, in a case where it is determined that the execution condition of the Cgcd decoding is not satisfied (No in Step S3), the procedure proceeds to Step S5. In Step S5, in a case where it is determined that the end condition of the decoding of the block product code is not satisfied (No in Step S5), the procedure proceeds to Step S1.
The above description has been made about an example in which the hard decision decoding is used for the decoding of the component code, and the soft decision decoding may be used for the decoding of the component code as described above. In a case where the soft decision decoding is performed as the decoding of the component code, as one of the decoding methods corresponding to the entire block product code, there is a method called the turbo decoding in which the external value is exchanged between the component codes.
The first decoder 53 performs the soft decision decoding (C1 decoding) corresponding to the code constraint of the code C1 using the received word which is previously encoded to a C1 code word stored in the data buffer 25 or the received word+the external value stored in the second external value memory 52, and stores the external value obtained by the soft decision decoding to the first external value memory 51.
The second decoder 54 performs the soft decision decoding (C2 decoding) corresponding to the code constraint of the code C2, using the received word which is previously encoded to a C2 code word stored in the data buffer 25 or the received word+the external value stored in the first external value memory 51, and stores the external value obtained by the soft decision decoding to the second external value memory 52. In addition, the second decoder 54 outputs a posteriori value obtained by the decoding to the hard decision unit 56.
The third decoder 55 performs the soft decision decoding (Cgcd decoding) corresponding to the code constraint of the code Cgcd, and updates the external value of the first external value memory 51 with the external value obtained by the soft decision decoding using the symbol group of checks2 and checks2 on checks1 stored in the data buffer 25 (that is, read data corresponding to dchecks2 in the lowest one row of the block product code illustrated in
Further, in a case where the soft decision decoding is performed, the hard decision value may be set as an input in the reading from the nonvolatile memory 3 similarly to the case where the above-mentioned hard decision decoding is performed, and a soft decision value may be input. In a case where the soft decision value is input, the reading from the nonvolatile memory 3 is performed by a soft bit read.
Then, for example, a log-likelihood ratio (LLR) table may be used, and the LLR can be obtained from a result of determination on whether the threshold voltage of each memory cell is equal to or more than each read voltage.
The conversion from a result of the determination on whether the threshold voltage of each memory cell is equal to or more than each read voltage may be performed by the memory controller 2 or the nonvolatile memory 3. In a case where the memory controller 2 performs the conversion, for example, the nonvolatile memory 3 outputs information indicating a subject area among eight areas of which the threshold voltages are less than Vr1, Vr1 or more and Vr2 or less, Vr2 or more and Vr3 or less, Vr3 or more and Vr4 or less, Vr4 or more and Vr5 or less, Vr5 or more and Vr6 or less, Vr6 or more and Vr7 or less, Vr7 or more to each memory cell. Then, the memory I/F 22 obtains the LLR based on the LLR table and the information output from the nonvolatile memory 3, and stores the LLR to the data buffer 25.
Further, in
A decoding procedure of the block product code in a case where the turbo decoding is performed is similar to the decoding processing procedure illustrated in
The decoding method in a case where the soft decision decoding is performed using the C1 decoding, the C2 decoding, and the Cgcd decoding is not particularly limited. For example, a chase decoding may be used.
As described above, in this embodiment, the decoding corresponding to the code constraint with the greatest common divisor between the generator polynomial of the code C1 and the generator polynomial of the code C2 is performed on the areas of checks2 and checks2 on checks1 which follow the code constraint of the code C2 but do not follow the coding constraint of the code C1 in the block product code. Therefore, it is possible to increase a possibility to correct an error in the areas of checks2 and checks2 on checks1.
In the first embodiment, the description has been made about an example in which r−r′ is 1. In a second embodiment, the block product code is targeted in a case of where r−r′ is t (t is an integer of 2 or more). In other words, the description will be made about a case where checks2 and checks2 on checks1 are over the t rows.
The third decoder 55a includes a shift and addition unit 551, a decoder 552, and an error location specifying unit 553.
Herein, the left side of Equation (7) described in the first embodiment can be expressed as Equation (10) as follows. However, the symbol group s′j′,k in Equation (9) is defined in Equation (10). Further, min(y,z) shows a value of small one of y and z, and max(y,z) shows a value of large one of y and z.
The left side of Equation (9) shows that the symbol groups of the respective rows are added as many as one block (that is, b symbols) with respect to the respective symbol groups of the t rows from the r′-th row to the (r−1)-th row of the block product code illustrated in
In addition, as illustrated in
The symbol group dadd made of the symbol string {s′j,′k} belongs to the code constraint of the linear cyclic code Cgcd having the code length (v+t−1)b from the above Equation (7). Then, an erroneous symbol s′j*,k* included in dadd can be specified by applying the decoding algorithm on the Code Cgcd to dadd.
However, the specified erroneous symbol s′j*,k is an addition of the subsets of the symbol group {si,j,k} of the block product code as illustrated in
R
j*k*
={S
r′+i′,j*−i′,k*|ε[max(0,j*−ν+1),min(t−1,j*)]} (11)
Therefore, when |Rj*k*|>1 is satisfied, it is not possible to specify a cause of the erroneous symbol s′j*,k* in the elements of the set Rj*k* containing s′j*,k*. Therefore, in this embodiment, in order to specify the cause of the error, the symbol having the lowest reliability among the elements of the set Rj*k* is considered to have an error. Herein, the reliability of the symbol is a value having a negative correlation with a probability of an error occurring in the symbol (that is, a value having a positive correlation with a probability of the symbol having no error.)
For example, the decoding result of the code C2 may be used as the above reliability. Depending on the decoding algorithm of the error correction code, when a lot of errors are contained in the received word, the decoding may be failed (the algorithm fails in finding out an appropriate decoding word). Therefore, there is a strong correlation between “the decoding of a certain received word is failed” and “a lot of errors are contained in the received word”.
In the block product code illustrated in
In addition, as another example of the reliability, for example, a probability distribution of the values of the respective symbols obtained in the soft decision decoding may be employed. As an example, here is considered a case where the possible values of the respective symbols are any one of 0 and 1 (binary symbol). In a decoding process called the soft decision decoding, the probability values P(si,j,k=0) and P(si,j,k=1) are calculated for each of the possible values of the symbols si,j,k. At this time, a value called a log-likelihood ratio (LLR) obtained by taking the logarithm of a ratio of P(si,j,k=0) and P(si,j,k=1) is used in some cases, but an absolute value of the LLR is taken, a value larger than that in a case where an estimated value of the symbol is a great likelihood, and becomes a value approaching 0 compared to a case where the estimated value is less likelihood. Therefore, it can be considered that there is an error in the symbol having the lowest absolute value of the LLR among the symbols contained in the set Rj*k*.
Therefore, as described in the first embodiment, in a case where the LLR is used for an input value of the soft decision decoding, the absolute value of the input value LLR may be used as the reliability.
Further, as the reliability, in a case where information indicating whether the symbol is successful in the C2 decoding is used, and in a case where a symbol failed in the C2 decoding two or more times is contained in the set Rj*k* of the symbol string forming s′j*,k*, it is not possible to specify a symbol which causes an error. Therefore, in this case, it is determined that the decoding of checks2 and checks2 on checks1 is failed, or another reliability is used as well.
In addition, in a case where the received word is the soft decision value, for example, the following process is performed. The shift and addition unit 551 calculates dadd as the soft decision value, and the decoder 552 uses this dadd as an input and performs the Cgcd decoding which is a soft input hard output (SIHO) decoding, and specifies a location of the symbol having a high probability of causing an error in dadd based on a hard output. Then, the error location specifying unit 553 determines the symbol in the block product code which is highly likely to cause the symbol to have an error in dadd with a high probability based on the reliability as described above. Then, the fact that the symbol in the block product code which is highly likely to cause the symbol to have an error in dadd with a high probability has a high probability to cause an error, and the other symbols in the block product code have a low probability to cause an error is reflected on the external value.
Further, the process in a case where the received word is the soft decision value is not limited to the above example. For example, the shift and addition unit 551 calculates dadd as the soft decision value, and the decoder 552 creates a list of combinations of the symbols of the block product code which satisfies the code constraint of the code Cgcd with the use of dadd as an input. Then, a procedure (list-based SISO decoding) may be used in which an external value for each symbol of the block product code is calculated based on the probability to cause an error in the combination of the values of the block product codes contained in the list.
As described above, in this embodiment, in a case where there are two or more rows of checks2 and checks2 on checks1, the Cgcd decoding is performed on the data obtained by shifting and adding the received word of each row. Then, the symbol causing an error of the symbol which is determined as having an error by the Cgcd decoding is obtained based on the reliability. Even in a case where there are two or more rows of checks2 and checks2 on checks1, it is possible to increase the possibility to correct the error of the areas of checks2 and checks2 on checks1.
While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the inventions. Indeed, the novel embodiments described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions and changes in the form of the embodiments described herein may be made without departing from the spirit of the inventions. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the inventions.
This application is based upon and claims the benefit of priority from U.S. Provisional Application No. 62/131,033, filed on Mar. 10, 2015; the entire contents of which are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
62131033 | Mar 2015 | US |