This application claims the benefit of People's Republic of China Application Serial No. 201210493348.X, filed Nov. 27, 2012, the subject matter of which is incorporated herein by reference.
The present invention relates to a solid state drive and a controlling method thereof, and more particularly to a solid state drive and a joint encoding/decoding method thereof.
As is well known, the data storage devices using NAND-based flash memories are widely used in a variety of electronic devices. For example, a SD card or a solid state drive (SSD) is a data storage device that uses a NAND-based flash memory to store data. Generally, in the solid state drive or the related data storage device, a BCH code (Bose-Chaudhuri-Hocquenghem code) is used as an error correction code (ECC code) for facilitating increasing the reliability of the flash memory modules of the solid state drive.
Generally, the flash memory module of the solid state drive comprises plural cells. Each cell comprises a floating gate transistor. Depending on the data amount to be stored in the floating gate transistor, the flash memory modules may be classified into three types, i.e. a single-level cell (SLC) flash memory module, a multi-level cell (MLC) flash memory module and a triple-level cell (TLC) flash memory module. The SLC flash memory module can store only one bit of data per cell. The MLC flash memory module can store two bits of data per cell. The TLC flash memory module can store three bits of data per cell.
Moreover, the floating gate transistor of each cell has a floating gate to store hot carriers. A threshold voltage (VTH) of the floating gate transistor is determined according to the amount of the stored hot carriers. If a floating gate transistor has a higher threshold voltage, it means that a higher gate voltage is required to turn on the floating gate transistor. Whereas, if a floating gate transistor has a lower threshold voltage, it means that the floating gate transistor can be turned on by a lower gate voltage.
During a program cycle of the flash memory module, the threshold voltage of the floating gate transistor may be changed by controlling the amount of hot carriers to be injected into the floating gate. During a read cycle, a sensing circuit of the data storage device may judge the storing status of the floating gate transistor according to the threshold voltage of the floating gate transistor.
Similarly, even if many cells are in the same storing state, the threshold voltages of these cells are not all identical. That is, the threshold voltages of these cells are distributed in a specified distribution curve with a median threshold voltage. As shown in
However, since the threshold voltages of the cells with the same storing state are distributed in a threshold voltage distribution curve, the storing states of some cells may be erroneously judged. For example, since the threshold voltage of the area b under the threshold voltage distribution curve of the storing state B is higher than the third slicing voltage Vs3, the cells of the area b are erroneously judged to be in the storing state C. Similarly, since the threshold voltage of the area c under the threshold voltage distribution curve of the storing state C is lower than the third slicing voltage Vs3, the cells of the area c are erroneously judged to be in the storing state B.
By the method of encoding the BCH code, the erroneous storing states of the cells can be corrected during the read cycle. Recently, as the importance of the process shrink is gradually increased, the demand on the correcting capability of the ECC code becomes more stringent. Conventionally, for increasing the correcting capability, the mainstream BCH code needs a large number of parity bits. Under this circumstance, the cost of the layout area is increased.
For solving this drawback, a low-density parity check code (also referred as a LDPC code hereinafter) using soft information in decoding can achieve higher correcting capability at less number of parity bits.
Take the threshold voltage distribution curves of the cells in the storing state B and the storing state C for example. When the threshold voltage of the area b under the threshold voltage distribution curve of the storing state B is read, the data in the storing state C is not directly read. Whereas, a probability value is provided for performing the subsequent data-correcting process. For example, the probability value may be 70% of the occurrence of the storing state C.
Similarly, when the threshold voltage of the area c under the threshold voltage distribution curve of the storing state C is read, a probability value is provided for performing the subsequent data-correcting process. For example, the probability value may be 80% of the occurrence of the storing state B. From the above discussions, the probability value is the soft information. The cooperation of the soft information and the LDPC code may correct the data.
However, for acquiring the soft information, the read level of judging the threshold voltages of the cells should be increased and the data bandwidth should be broadened. Under this circumstance, the hardware cost will be increased.
The present invention provides a solid state drive and a joint encoding/decoding method thereof. During a data-encoding process, a first encoder and a second encoder are used to generate two independent sets of parity bits. During a data-decoding process, the cyclic decoding characteristics of a first decoder and a second decoder are used to generate the accurate data.
A first embodiment of the present invention provides a joint encoding/decoding method for a solid state drive. The joint encoding/decoding method includes the following steps. Firstly, a data-writing process is implemented for encoding a user data by a hard codec and a soft codec respectively, thereby generating a first number of parity bits and a second number of parity bits. Then, the user data, the first number of parity bits and the second number of parity bits are written into a flash memory module. Then, a data-reading process is implemented for decoding the user data by the hard codec according to the first number of parity bits. If the user data is successfully decoded, the user data is outputted. If the user data is unsuccessfully decoded, the joint encoding/decoding method further includes a step of decoding the user data by the soft codec according to the second number of parity bits.
A second embodiment of the present invention provides a joint encoding/decoding method for a solid state drive. The joint encoding/decoding method includes the following steps. Firstly, a data-writing process is implemented for encoding a user data by a hard codec and a soft codec respectively, thereby generating a first number of parity bits and a second number of parity bits. Then, the user data, the first number of parity bits and the second number of parity bits are written into a flash memory module. Then, a data-reading process is implemented for decoding the user data by the soft codec according to the second number of parity bits. If the user data is successfully decoded, the user data is outputted. If the user data is unsuccessfully decoded, the joint encoding/decoding method further includes a step of decoding the user data by the hard codec according to the first number of parity bits.
A third embodiment of the present invention provides a solid state drive. The solid state drive includes plural flash memory modules and a memory controller. The memory controller is connected with the plural flash memory modules, and includes plural hard codecs correspond to the plural flash memory modules and a soft codec. A user data is encoded by one of the hard codecs and the soft codec of the memory controller to generate a first number of parity bits and a second number of parity bits respectively. The user data, the first number of parity bits and the second number of parity bits are written into a corresponding one of the plural flash memory modules. During a data-reading process, the memory controller selectively uses the corresponding hard codec to decode the user data according to the first number of parity bits and/or uses the soft codec to decode the user data according to the second number of parity bits.
A fourth embodiment of the present invention provides a joint encoding/decoding method for a solid state drive. The joint encoding/decoding method includes the following steps. Firstly, a data-writing process is implemented for encoding a user data by a first encoding method and a second encoding respectively, thereby generating a first number of parity bits and a second number of parity bits. Then, the user data, the first number of parity bits and the second number of parity bits are written into a flash memory module. Then, a data-reading process is implemented for decoding the user data according to the first number of parity bits. If the user data is successfully decoded, the user data is outputted. If the user data is unsuccessfully decoded, the joint encoding/decoding method further includes a step of decoding the user data according to the second number of parity bits.
Numerous objects, features and advantages of the present invention will be readily apparent upon a reading of the following detailed description of embodiments of the present invention when taken in conjunction with the accompanying drawings. However, the drawings employed herein are for the purpose of descriptions and should not be regarded as limiting.
The above objects and advantages of the present invention will become more readily apparent to those ordinarily skilled in the art after reviewing the following detailed description and accompanying drawings, in which:
The present invention provides a solid state drive and a joint encoding/decoding method thereof.
In the memory controller 310, the plural first codecs 321˜32N are respectively used for processing the plural flash memory modules 301˜30N, and the second codec 330 is used for processing the whole system. In the following embodiments, the first codecs 321˜32N will be illustrated by referring to hard codecs (e.g. BCH codecs), and the second codec 330 will be illustrated by referring to a soft codec (e.g. a LDPC codec). It is noted that the types of the first codecs and the second codec may be varied according to practical requirements.
That is, the plural first codecs 321˜32N (i.e. the BCH codecs) of the memory controller 310 are respectively used for processing the plural flash memory modules 301˜30N, and the second codec 330 (i.e. the LDPC codec) of the memory controller 310 is used for processing the whole system. If the BCH codecs fail to correct all errors, the LDPC codec will further correct the errors. Moreover, if the LDPC codec results in an error floor effect, the cyclic decoding characteristics of the BCH codecs may be used to solve this drawback.
In this embodiment, since the first code (e.g. the BCH code) and the second code (e.g. the LDPC code) are independent of each other, the data-decoding process may be performed by a first decoder or a second decoder at first. Moreover, during the data-decoding process, associated judging operations are implemented by a judging unit (not shown) of the memory controller, which will be described later.
Please refer to
A first implementation example of the joint encoding/decoding method of the present invention is shown in
First of all, a N1-bit code is read from the flash memory module 520 by the read unit 512, wherein N1=K+R1. During the data-decoding process, the hard algebraic code decoder (e.g. the BCH decoder 513) is firstly used to decode the data according to the N1-bit code. If the K-bit user data is accurately generated (Step 514), the K-bit user data is directly outputted, and the data-decoding process is ended.
On the other hand, if the K-bit user data fails to be accurately generated (Step 514), it means that the number of erroneous bits contained in the read data exceeds the correcting range of the BCH decoder 513. Consequently, the BCH decoder 513 fails to generate the K-bit user data according to the N1-bit code. Next, a N2-bit code is read from the flash memory module 520 by the read unit 512, wherein N2=K+R2. The soft probability code decoder (e.g. the LDPC decoder 515) is used to decode the data according to the N2-bit code. If no error floor effect occurs (Step 516), it means that the K-bit user data can be accurately generated by the LDPC decoder 515. Consequently, the K-bit user data is directly outputted, and the data-decoding process is ended.
On the other hand, if the error floor effect occurs (Step 516), it means that the K-bit user data fails to be accurately generated by the LDPC decoder 515. Next, the initially-decoded K-bit user data generated by the LDPC decoder 515 is fed back to the BCH decoder 513, and further decoded by the BCH decoder 513 according to the R1 parity bits.
Although the K-bit user data fails to be accurately generated when the soft probability code decoder (e.g. the LDPC decoder 515) results in the error floor effect, the LDPC decoder 515 is still capable of correcting some of the erroneous bits and generating the initially-decoded K-bit user data. The number of erroneous bits contained in the initially-decoded K-bit user data is reduced or even decreased to the correcting range of the BCH decoder 513. Consequently, after the initially-decoded K-bit user data is fed back to the BCH decoder 513 and decoded by the BCH decoder 513 according to the R1 parity bits, the decoding capability of the BCH decoder 513 is enhanced.
In this implementation example, the soft probability code decoder (e.g. the LDPC decoder) decodes the soft probability code (e.g. the LDPC code) according to a hard-decision decoding method. However, the soft probability code decoder can decodes the soft probability code (e.g. the LDPC code) according to a soft-decision decoding method. The way of decoding the soft probability code by the soft-decision decoding method will be illustrated later.
Moreover, the soft probability code decoder may be used to decode data at first.
A second implementation example of the joint encoding/decoding method of the present invention is shown in
On the other hand, if the error floor effect occurs (Step 534), it means that the K-bit user data fails to be accurately generated by the LDPC decoder 533. Next, a N1-bit code is read from the flash memory module 540 by the read unit 532, wherein N1=K+R1. A hard algebraic code decoder (e.g. the BCH decoder 535) is used to decode the data according to the N1-bit code. If the K-bit user data is accurately generated (Step 536), the K-bit user data is directly outputted, and the data-decoding process is ended.
On the other hand, if the K-bit user data fails to be accurately generated (Step 536), it means that the BCH decoder 535 fails to generate the K-bit user data according to the N1-bit code. Next, the initially-decoded K-bit user data generated by the BCH decoder 535 is fed back to the LDPC decoder 533, and further decoded by the LDPC decoder 533 according to the R2 parity bits.
Although the hard algebraic code decoder (e.g. the BCH decoder 535) fails to generate the K-bit user data, the BCH decoder 535 is still capable of correcting some of the erroneous bits and generating the initially-decoded K-bit user data. The number of erroneous bits contained in the initially-decoded K-bit user data is reduced or even decreased to prevent from occurrence of the error floor effect. Consequently, after the initially-decoded K-bit user data is fed back to the LDPC decoder 533 and decoded by the LDPC decoder 533 according to the R2 parity bits, the decoding capability of the LDPC decoder 533 is enhanced.
In this implementation example, the soft probability code decoder (e.g. the LDPC decoder) decodes the soft probability code (e.g. the LDPC code) according to a hard-decision decoding method. However, the soft probability code decoder can decodes the soft probability code (e.g. the LDPC code) according to a soft-decision decoding method. The way of decoding the soft probability code by the soft-decision decoding method will be illustrated later.
A third implementation example of the joint encoding/decoding method of the present invention is shown in
On the other hand, if the K-bit user data fails to be accurately generated (Step 554), it means that the number of erroneous bits contained in the read data exceeds the correcting range of the BCH decoder 553. Consequently, the BCH decoder 553 fails to generate the K-bit user data according to the N1-bit code. Next, a N2-bit code is read from the flash memory module 560 by the read unit 552, wherein N2=K+R2. The soft probability code decoder (e.g. the LDPC decoder 555) is used to decode the data according to the N2-bit code and a soft information. For example, in response to a request from the LDPC decoder 555, the read unit 552 generates the soft information to the LDPC decoder 555. Consequently, the LDPC decoder 555 decodes the soft probability code (e.g. the LDPC code) by the soft-decision decoding method.
If no error floor effect occurs (Step 556), it means that the K-bit user data can be accurately generated by the LDPC decoder 555. Consequently, the K-bit user data is directly outputted, and the data-decoding process is ended.
On the other hand, if the error floor effect occurs (Step 556), it means that the K-bit user data fails to be accurately generated by the LDPC decoder 555. Next, the initially-decoded K-bit user data generated by the LDPC decoder 555 is fed back to the BCH decoder 553, and further decoded by the BCH decoder 553 according to the R1parity bits.
Although the K-bit user data fails to be accurately generated when the soft probability code decoder (e.g. the LDPC decoder 555) results in the error floor effect, the LDPC decoder 555 is still capable of correcting some of the erroneous bits and generating the initially-decoded K-bit user data. The number of erroneous bits contained in the initially-decoded K-bit user data is reduced or even decreased to the correcting range of the BCH decoder 553. Consequently, after the initially-decoded K-bit user data is fed back to the BCH decoder 553 and decoded by the BCH decoder 553 according to the R1 parity bits, the decoding capability of the BCH decoder 553 is enhanced.
Moreover, the soft probability code decoder may be used to decode data at first.
A fourth implementation example of the joint encoding/decoding method of the present invention is shown in
If no error floor effect occurs (Step 574), it means that the K-bit user data can be accurately generated by the LDPC decoder 573. Consequently, the K-bit user data is directly outputted, and the data-decoding process is ended.
On the other hand, if the error floor effect occurs (Step 574), it means that the K-bit user data fails to be accurately generated by the LDPC decoder 573. Next, a N1-bit code is read from the flash memory module 580 by the read unit 572, wherein N1=K+R1. A hard algebraic code decoder (e.g. the BCH decoder 575) is used to decode the data according to the N1-bit code. If the K-bit user data is accurately generated (Step 576), the K-bit user data is directly outputted, and the data-decoding process is ended.
On the other hand, if the K-bit user data fails to be accurately generated (Step 576), it means that the BCH decoder 575 fails to generate the K-bit user data according to the N1-bit code. Next, the initially-decoded K-bit user data generated by the BCH decoder 575 is fed back to the LDPC decoder 573, and further decoded by the LDPC decoder 573 according to the R2 parity bits.
From the above descriptions, the present invention provides a solid state drive and a joint encoding/decoding method thereof. During a data-encoding process, a first encoder and a second encoder are used to generate two independent sets of parity bits. During a data-decoding process, the cyclic decoding characteristics of a first decoder and a second decoder are used to generate the accurate data.
While the invention has been described in terms of what is presently considered to be the most practical and preferred embodiments, it is to be understood that the invention needs not be limited to the disclosed embodiment. On the contrary, it is intended to cover various modifications and similar arrangements included within the spirit and scope of the appended claims which are to be accorded with the broadest interpretation so as to encompass all such modifications and similar structures.
Number | Date | Country | Kind |
---|---|---|---|
201210493348.X | Nov 2012 | CN | national |