Embodiments described herein relate generally to a memory controller and a decoding method.
Generally, in a storage device, data is stored while being applied with error correction coding in order that the data to be stored is protected. Methods of decoding a codeword, on which error correction coding has been performed, include HIHO (hard-input hard-output) decoding and SISO (soft-input soft-output) decoding. SISO decoding has higher error correction performance than that of HIHO decoding, but takes a longer processing time.
According to the embodiments described herein, a memory controller, which controls a non-volatile memory configured to store codewords, includes a SISO decoder which performs SISO decoding based on the received word corresponding to the codeword read as a set of soft decision values from the non-volatile memory and outputs a posteriori information. The memory controller also includes a hard decision processor which performs hard decision on a posteriori information and calculates a hard decision value for each bit in the codeword, and a HIHO decoder which performs HIHO decoding by using the hard decision value for each bit in the codeword.
Hereinafter, a memory controller and decoding methods according to the embodiments will be described in detail with reference to the accompanying drawings. It should be noted that the present invention is not limited by those embodiments.
The non-volatile memory 3 is a non-volatile memory configured to store data in a non-volatile manner, which is a NAND memory, for example. It should be noted that while an example of using a NAND memory as the non-volatile memory 3 is described herein, a storage unit other than the NAND memory such as a three-dimensional structural flash memory, a ReRAM (Resistance Random Access Memory), a FeRAM (Ferroelectric Random Access Memory), or the like may be used as the non-volatile memory 3. Further, while an example of using a semiconductor memory as a storage unit is described herein, it is possible to apply error correction processing of the present embodiment to a storage device using a storage unit other than a semiconductor memory.
The storage device 1 may be a memory card in which the memory controller 2 and the non-volatile memory 3 are configured as one package, an SSD (Solid State Drive), or the like.
The memory controller 2 controls writing to the non-volatile memory 3 in accordance with a write command (request) from the host 4. The memory controller 2 also controls reading from the non-volatile memory 3 in accordance with a read command from the host 4. The memory controller 2 includes a host I/F (host interface) 21, a memory I/F (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 via an internal bus 20.
The host I/F 21 performs processing adhering to the interface standard with the host 4, and outputs commands, user data, and the like, received from the host 4, to the internal bus 20. The host I/F 21 also transmits user data read from the non-volatile memory 3, responses from the control unit 23, and the like, to the host 4. It should be noted that in the present embodiment, data to be written into the non-volatile memory 3 according to a request from the host 4 is called used data.
The memory I/F 22 performs write processing to the non-volatile memory 3 based on an instruction from the control unit 23. The memory I/F 22 also performs read processing from the non-volatile memory 3 based on an instruction from the control unit 23.
The control unit 23 is a control unit which generally controls the respective components of the storage device 1. When the control unit 23 receives a command from the host 4 via the host I/F 21, the control unit 23 performs control in accordance with the command. For example, the control unit 23 instructs the memory I/F 22 to write user data and parity into the non-volatile memory 3 in accordance with a command from the host 4. Further, the control unit 23 instructs the memory I/F 22 to read user data and parity from the non-volatile memory 3 in accordance with a command from the host 4.
Further, when the control unit 23 receives a write request from the host 4, the control unit 23 determines a storage area (memory area) on the non-volatile memory 3, with respect to user data accumulated in the data buffer 25. This means that the control unit 23 determines a writing destination of the user data and manages the writing destination. A correspondence between the logical address of the user data received from the host 4 and the physical address indicating the storage area on the non-volatile memory 3 in which the user data is stored is stored as an address conversion table.
Further, when the control unit 23 receives a read request from the host 4, the control unit 23 converts the logical address, designated by the read request, to the physical address using the address conversion table, and instructs the memory I/F 22 to read from the physical address.
In the NAND memory of the NAND memory, reading and writing are performed in data units called pages, and erasure is performed in data units called blocks, generally. In the present embodiment, memory cells connected with the same word line are called a memory cell group. If a memory cell is a single level cell (SLC), one memory cell group corresponds to one page. If a memory cell is a multi-level cell (MLC), one memory cell group corresponds to a plurality of pages. Each memory cell is connected with a word line, and is also connected with a bit line. Each memory cell is identifiable with an address identifying a word line and an address identifying a bit line.
The data buffer 25 temporarily stores user data, received from the host 4 by the memory controller 2, until it is stored in the non-volatile memory 3. The data buffer 25 also temporarily stores user data, read from the non-volatile memory 3, until it is transmitted to the host 4. The data buffer 25 is configured of a general-purpose memory such as an SRAM (Static Random Access Memory), a DRAM (Dynamic Random Access Memory), or the like, for example.
User data, transmitted from the host 4, is transferred to the internal bus 20 and is stored in the data buffer 25. The encoder/decoder 24 encodes data to be stored in the non-volatile memory 3 to thereby generate a codeword. The encoder/decoder 24 includes an encoder 26 and a decoder 27. The details of encoding and decoding of the present embodiment will be described below.
Generally, in a storage device, a method of protecting data to be stored by using error correction codes has been known. As specific error correction codes, codes having a plurality of constraint conditions such as product codes configured by combining block codes, staircase codes, braided codes, and the like for example, may be used. In the case of using those codes, HIHO decoding is performed generally for decoding. On the other hand, in the case of using those codes, it is also possible to perform SISO decoding. SISO decoding has higher error correction performance than that of HIHO decoding, but takes a longer processing time. In the present embodiment, when SISO decoding is performed, it is combined with HIHO decoding so as to reduce the processing time.
Hereinafter, encoding and decoding of the present embodiment will be described. Here, while description will be given on product codeword generated by combining two or more dimensional block codes, the decoding method of the present embodiment is applicable to any codes without limiting to product codeword, provided that HIHO decoding is possible and that the codes have a plurality of constraint conditions. For example, the decoding method of the present embodiment is applicable to staircase codes, braided codes, and the like.
Next, write processing of the present embodiment will be described. When the control unit 23 performs writing to the non-volatile memory 3, the control unit 23 instructs the encoder 26 to encode data, determines a storage location (storage address) of a codeword in the non-volatile memory 3, and makes an instruction to the memory I/F 22. Based on the instruction from the control unit 23, the encoder 26 encodes the data on the data buffer 25 and generates a codeword. The memory I/F 22 performs control to store the codeword on the storage location on the non-volatile memory 3 instructed by the control unit 23.
The encoder 26 generates a product codeword, for example.
The product codeword illustrated in
Further, the encoder 26 encodes (kA×kB−nCRC)-bit data by the CRC method to thereby generate CRC bits which are redundant bits. It should be noted that nCRC is the number of bits per product codeword. As illustrated in
The configuration of the codeword illustrated in
While there is no particular constraint regarding the storage location when the product codeword illustrated in
Next, processing at the time of reading from the non-volatile memory 3 of the present embodiment will be described. When the control unit 23 performs reading from the non-volatile memory 3, the control unit 23 instructs the memory I/F 22 to read while designating an address on the non-volatile memory 3, and also instructs the decoder 27 to start decoding. In accordance with the instruction from the control unit 23, the memory I/F 22 reads a codeword from the non-volatile memory 3. The decoder 27 decodes the codeword read from the non-volatile memory 3.
The channel value memory 271 is a memory which stores channel information, that is, a received word corresponding to a codeword (data and parity) read as a set of soft decision input values from the non-volatile memory 3. The extrinsic value memory 272 is a memory which stores extrinsic values which are included in the outputs from the SISO decoder 273. The SISO decoder 273 performs SISO decoding on the received word corresponding to the codeword read from the channel value memory 271 to thereby estimate a posteriori values (a posteriori information) to be described below, and output a set of soft decision results including the extrinsic values. The SISO decoder 273 outputs the soft decision result the hard decision processor 274, and stores the extrinsic values in the extrinsic value memory 272.
The hard decision processor 274 performs hard decision on the a posteriori values which are included in the soft decision results output from the SISO decoder 273 to thereby obtain hard decision values, and stores the hard decision values in the hard decision value memory 275. The HIHO decoder 276 performs HIHO decoding on the hard decision values read from the hard decision value memory 275 or on the received word corresponding to the codeword read as a set of hard decision input values from the non-volatile memory 3, and stores the set of hard decision values, which is obtained as the HIHO decoding result, in the hard decision value memory 275. The termination determination unit 277 determines whether or not to terminate decoding using the hard decision values read from the hard decision value memory 275, and notifies the decode controller 278 of the determination result. The decode controller 278 controls the entire operation of the decoder 27.
In the HIHO decoding performed by the HIHO decoder 276, decoding such as bounded distance decoding, for example, is performed on the received word corresponding to the codeword input as a set of hard decision values. HIHO decoding performed by the HIHO decoder 276 is not limited to bounded distance decoding, and any HIHO decoding can be used. In the case of using the product codeword illustrated in
The SISO decoder 273 performs soft decision decoding on the received word corresponding codewords input as soft decision values. While there is no particular constraint on the specific method of soft decision decoding, the principle of soft decision decoding is described in a literature by William Ryan, Shu Lin, Cambridge University Press, “Channel Codes”, 330p-334p (hereinafter referred to as Literature 1), for example. In the present embodiment, based on the premise that the principle described in Literature 1 is used, the definitions of the terms in soft decision decoding such as a channel value, a posteriori value, an extrinsic value, and the like follow the definitions described in Literature 1.
Hereinafter, input and output of the SISO decoder 273 will be described in brief. In soft decision decoding of the SISO decoder 273, received words corresponding to the codewords read by soft bit read from the non-volatile memory 3 serve as inputs of the soft decision decoding. The details of soft bit read will be described below. In soft bit read, a log of a ratio between the probability (or likelihood) that a value stored in a memory cell of the non-volatile memory 3 is zero and the probability (or likelihood) that the value is one, namely an LLR (Log Likelihood Ratio), is obtained. In the present embodiment, a channel value in Literature 1 is an LLR obtained by soft bit read.
Further, if a log of the ratio between the probability that a value stored in the non-volatile memory 3 is zero and the probability that the value being one has been known, it is called a priori information or an a priori value. The SISO decoder 273 uses a channel value, namely LLR, and an a priori value as inputs for each bit in the product codeword to thereby decode the respective codewords of the respective dimensions. This means that the SISO decoder 273 uses a channel value, namely LLR, and an a priori value as inputs to thereby obtain the most likely codeword among the codewords satisfying the code constraints. Through the decoding by the SISO decoder 273, a log of the ratio between the probability that each bit of the codeword is zero and the probability that the each bit is one, that is, a log posteriori probability ratio, is obtained. Hereinafter, the log a posteriori probability ratio is called an a posteriori value.
A resultant of subtracting a channel value (+an a priori value) from an a posteriori value is called an extrinsic value. In the present embodiment, the SISO decoder 273 performs decoding by using extrinsic values obtained in a different dimension as a priori values. For example, the SISO decoder 273 uses extrinsic values obtained based on the a posteriori values obtained by decoding first-dimensional codewords, for decoding of second-dimensional codewords. Further, the SISO decoder 273 is also able to use extrinsic values obtained based on the a posteriori values obtained by decoding second-dimensional codewords, for decoding of first-dimensional codewords. It should be noted that a priori values when starting decoding (if decoding of another dimension has not been performed) are assumed to be given previously.
If the non-volatile memory 3 is a NAND memory, at the time of data writing, electrons are injected such that the number of electrons (charge amount) of a floating gate corresponds to any of distributions (threshold distributions), according to the data value. In this example, in order to simplify the description, description will be given on an example of one bit/cell in which one memory cell stores one bit. In the case of one bit/cell, either one of two distributions corresponds to “zero”, and the other corresponds to “one”. In the case of applying a voltage to a memory cell, if a voltage not less than a voltage value corresponding to the charge amount of the memory cell is applied, an electric current flows, while if a voltage less than the voltage is applied, an electric current does not flow. Accordingly, the voltage serving as the boundary is determined for each memory cell corresponding to the charge amount of the memory cell. The voltage determined corresponding to the charge amount of the memory cell is called a threshold voltage (Vth) herein. By injecting charges so as to correspond to one of two threshold distributions in the initial state, and applying a reference read voltage for separating the two threshold distributions at the time of reading, it is possible to determine whether or not the data stored in the memory cell is one.
Hard bit read is reading in which the non-volatile memory 3 applies a reference read voltage to a memory cell, determines whether the data stored in the memory cell is one or zero, and outputs the determined result. It should be noted that the read voltage to be applied at the time of hard bit read may be changed from the reference read voltage.
Going back to the description of
The decode controller 278 determines whether or not decoding of all of the codewords constituting the product codeword succeeded based on the notification from the HIHO decoder 276, and notifies the control unit 23 of the determination result. The control unit 23 determines whether or not decoding of all of the codewords constituting the product codeword succeeded based on the notification from the decode controller 278 (step S3), and if decoding of all of the codewords succeeded (step S3, Yes), ends the reading. It should be noted that at step S3, the control unit 23 determines whether or not decoding of all of the codewords of at least one dimension, constituting the product codeword, succeeded. Further, if redundant bits are appended to the error-detecting code such as CRC, it is also possible to perform checking with use of the error-detecting code together, when determining whether or not decoding succeeded at step S3.
If determining that there is a failed one in decoding among the codewords constituting the product codeword (step S3, No), the control unit 23 designates a read address and instructs the memory I/F 22 to read the received word corresponding to the produce codeword by soft bit read (SBR) from the non-volatile memory 3, and the memory I/F 22 performs soft bit read which is reading to read it as a set of soft decision values (step S4).
Then, by using the LLR table, for example, it is possible to obtain an LLR from the determination result of whether or not the threshold voltage of each memory cell is not lower than each reading voltage.
Conversion to LLR from the determination result of whether or not the threshold value of each memory cell is not less than each read voltage may be performed by the memory controller 2 or by the non-volatile memory 3. In the case where the memory controller 2 performs it, the non-volatile memory 3 outputs, for each memory cell, information representing whether or not the threshold voltage is in any of eight areas, namely, less than Vr1, not less than Vr1 but less than Vr2, not less that Vr2 but less than Vr3, not less than Vr3 but less than Vr4, not less than Vr4 but less than Vr5, not less than Vr5 but less than Vr6, not less than Vr6 but less than Vr7, and not less than Vr7, for example. Then, the memory I/F 22 obtains an LLR based on the LLR table and the information output from the non-volatile memory 3, and stores it in the channel value memory 271 of the decoder 27.
It should be noted that while
Going back to the description of
By performing the processing described above, if error correction can be made in hard bit read and HIHO decoding, decoding ends by performing hard bit read and HIHO decoding, and high-speed reading can be performed. On the other hand, if error correction cannot be made in hard bit read and HIHO decoding, SISO decoding having higher correction performance is performed. In the case of decoding the product codeword exemplary illustrated in
As such, in the present embodiment, if error correction cannot be made in hard bit read and HIHO decoding, SISO-HIHO decoding, which is a combined decoding of SISO decoding and HIHO decoding, is performed. It should be noted that in the present embodiment, hard bit read and HIHO decoding are performed first, and only when error correction cannot be made in hard bit read and HIHO decoding, soft bit read and SISO-HIHO decoding are performed. However, it is possible to perform soft bit read and SISO-HIHO decoding from the beginning, without performing hard bit read and HIHO decoding.
Next, SISO-HIHO decoding of the present embodiment will be described.
Next, the decoder 27 performs second SISO decoding on a second-dimensional codeword group constituting the product codeword (step S13). More specifically, the decoder 27 performs the following processing. The SISO decoder 273 reads an LLR corresponding to each bit of each second-dimensional codeword constituting the product codeword, from the channel value memory 271. Further, the SISO decoder 273 reads the extrinsic value obtained as a result of first-dimensional SISO decoding (step S12), corresponding to each bit of each second-dimensional codeword, from the extrinsic value memory 272, and uses it as an input to the second SISO decoding as an a priori value of the second dimension. Then, the SISO decoder 273 performs SISO decoding on each codeword using the LLRs and the a priori values, and stores the extrinsic values, obtained by the SISO decoding, in the extrinsic value memory 272. Further, the SISO decoder 273 outputs the a posteriori value of each bit of each codeword obtained by the second SISO decoding, to the hard decision processor 274.
The hard decision processor 274 performs hard decision on the a posteriori value of each bit of each codeword, and stores the hard decision result in the hard decision value memory 275. Further, the decode controller 278 initializes the counter itr_h of the number of iterations of HIHO decoding to zero (step S14). The decode controller 278 instructs the HIHO decoder 276 to perform HIHO decoding, and when the HIHO decoder 276 receives the instruction from the decode controller 278, the HIHO decoder 276 performs first HIHO decoding on the first-dimensional codeword group constituting the product codeword (step S15). Specifically, the following processing will be performed. The HIHO decoder 276 reads a hard decision value corresponding to each bit of each first-dimensional codeword from the hard decision value memory 275, and performs bounded distance decoding, for example, as first HIHO decoding. If data which should be corrected is found on the hard decision value memory 275 by the first HIHO decoding, the HIHO decoder 276 updates the corresponding data to a correct value.
Next, the HIHO decoder 276 performs second HIHO decoding on the second-dimensional codeword group constituting the product codeword (step S16). Specifically, the HIHO decoder 276 reads a hard decision value corresponding to each bit of each second-dimensional codeword, from the hard decision value memory 275, and performs bounded distance decoding, for example, as second HIHO decoding. If data which should be corrected is found on the hard decision value memory 275 by the second HIHO decoding, the HIHO decoder 276 updates the corresponding data to a new value.
Next, the termination determination unit 277 determines whether or not the termination determination condition is satisfied (step S17). The decode controller 278 outputs the hard decision values stored in the hard decision value memory 275 as read data after the error correction. The termination determination unit 277 notifies the decode controller 278 of a determination result of whether or not the termination determination condition is satisfied. As the termination determination condition, if redundant bits of an error-detecting code such as CRC are appended, check of the error-detecting code is satisfied (no error), parity check of the first-dimensional codeword is satisfied (no error), parity check of the second-dimensional codeword is satisfied (no error), or a combination of two or more of these checks, may be used, for example. In the case of using the product codeword of
If it is determined by the termination determination unit 277 that the termination determination condition is satisfied (step S17, satisfied), the SISO-HIHO decoding is terminated in successful decoding. If it is determined that the termination determination condition is not satisfied (step S17, un-satisfied), the decode controller 278 determines whether or not the counter itr_h of the number of iterations of HIHO decoding is less than the maximum number of iterations itr_hmax (step S18). If itr_h is less than itr_hmax (step S18, Yes), the decode controller 278 increments itr_h by one (step S19), and returns to step S15.
When itr_h becomes equal to itr_hmax (step S18, No), the decode controller 278 determines whether or not the counter itr_s of the number of iterations of SISO decoding is less than the maximum number of iterations itr_smax of SISO decoding (step S20). If itr_s is less than itr_smax (step S20, Yes), the decode controller 278 increments itr_s by one (step S21), and returns to step S12. At this time, the decode controller 278 may perform processing to reflect the result of HIHO decoding on SISO decoding. In the case of performing processing to reflect the result of HIHO decoding on SISO decoding, any processing method may be used. For example, in order that the amplitude of the a posteriori value of the bit corrected by the HIHO decoding becomes smaller, an extrinsic value (an extrinsic value other than the extrinsic value of the second dimension used in SISO decoding) is adjusted, and is input to the SISO decoder 273. When itr_s becomes equal to itr_smax (step S20, No), SISO-HIHO decoding is terminated in failure.
The part surrounded by the dotted line in
Writing operation (including encoding) to the non-volatile memory 3 of the present embodiment is similar to that of the first embodiment. The entire reading operation from the non-volatile memory 3 in the present embodiment is similar to that illustrated in
Next, SISO-HIHO decoding of the present embodiment will be described. Step S11 to step S13 are the same as those of the first embodiment. Subsequent to step S13, the hard decision processor 274 performs hard decision on the a posteriori value of each bit of each codeword, and stores the hard decision result in the hard decision value memory 275 (step S14a). The termination determination unit 277 determines whether or not the termination determination condition is satisfied (step S22). The termination determination condition is the same as that of the first embodiment. At step S22, if an error-detecting code such as CRC are used, the termination determination unit 277 determines whether or not there is an error by using the hard decision values obtained by performing hard decision on the a posteriori values and stored in the hard decision value memory 275.
If it is determined by the termination determination unit 277 that the termination determination condition is satisfied (step S22, satisfied), the SISO-HIHO decoding is terminated in successful decoding. If it is determined that the termination determination condition is not satisfied (step S22, un-satisfied), the decode controller 278 initializes the counter itr_h of the number of iterations of HIHO decoding to zero (step S14b). Then, step S15 to step S21 are the same as those of the first embodiment.
Further, with respect to SISO-HIHO decoding of the first embodiment, it is possible to add determination of whether or not the termination determination condition is satisfied, between step S15 and step S16. If the termination determination condition is satisfied, SISO-HIHO decoding is terminated because correction was performed correctly, while if the termination determination condition is not satisfied, the processing proceeds to S16.
Further, with respect to SISO-HIHO decoding of the first embodiment, it is possible to add determination of whether or not the termination determination condition is satisfied, between step S12 and step S13. If checking using an error-detecting code is used as the termination determination condition, after the first SISO decoding at step S12, the hard decision processor 274 performs hard decision on the a posteriori value of each bit of each codeword, and stores the hard decision result in the hard decision value memory 275. With use of the hard decision result, determination of whether or not the termination determination condition is satisfied is performed. Then, if the termination determination condition is satisfied, SISO-HIHO decoding is terminated because correction was performed correctly, while if the termination determination condition is not satisfied, the processing proceeds to S13.
Any two or more items of the determination of the termination determination condition described above may be added to SISO-HIHO decoding of the first embodiment.
As described above, in the present embodiment, the part of determining whether or not the termination determination condition is satisfied is added to the first embodiment. As such, if the termination determination condition is satisfied, it is possible to terminate the processing promptly, whereby the processing time required for decoding can be reduced.
First, step S31 to step S33 are performed in the same manner as step S11 to step S13 of the first embodiment. After the second SISO decoding at step S33, the termination determination unit 277 determines whether or not the termination determination condition is satisfied (step S34). The termination determination condition is the same as that of the first embodiment. If checking using an error-detecting code is used as the termination determination condition, after step S33, the hard decision processor 274 performs hard decision on the a posteriori value of each bit of each codeword, and stores the hard decision result in the hard decision value memory 275. At step S34, determination of whether or not the termination determination condition is performed using the hard decision result.
If it is determined by the termination determination unit 277 that the termination determination condition is satisfied (step S34, satisfied), the decode controller 278 terminates the SISO-HIHO decoding in successful decoding. If it is determined that the termination determination condition is not satisfied (step S34, un-satisfied), the decode controller 278 determines whether or not the counter itr_s of the number of iterations of SISO decoding is less than the maximum number of iterations itr_smax of the SISO decoding (step S35). If itr_s is less than itr_smax (step S35, Yes), the decode controller 278 increments itr_s by one (step S36), and returns to step S32.
When itr_s becomes equal to itr_smax (step S35, No), the processing proceeds to step S37. Step S37 to step S42 are similar to step S14 to step S19 in the first embodiment. However, at step S41, when itr_h becomes equal to itr_hmax (step S41, No), SISO-HIHO decoding is terminated in failure. Further, if checking using an error-detecting code is used as the termination determination condition, after step S33, as the hard decision result has been stored in the hard decision value memory 275, it is not necessary to perform hard decision of the a posteriori value at step S37.
Further, similar to the second embodiment, it is possible to add determination of whether or not the termination determination condition is satisfied in one or more of between step 32 and step S33 and between step S38 and step S39.
As described above, in the present embodiment, SISO decoding is iterated the maximum number of iterations, and only when an error cannot be corrected completely, HIHO decoding is performed. As such, there is a case where the processing time is reduced compared with the case of performing SISO decoding only, depending on the error occurrence state.
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/048,987, filed on Sep. 11, 2014; the entire contents of which are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
62048987 | Sep 2014 | US |