Flash memory controller, storage device and reading method
AssigneeSilicon Motion, Inc.
InventorShiuan-Hao Kuo
Life of this patent
Estimating the term…
Abstract
A flash memory controller is configured to decode a codeword. During the decoding process, the flash memory can check the decoding status of each codeword segment in the codeword and skip the decoding of a codeword segment whose decoding status is passed, thereby saving time decoding and also improving decoding efficiency. Even though only a part of the codeword segments in the codeword have been successfully decoded in the decoding process at the previous time, the flash memory controller can replace the part of the codeword segments in the codeword with the correct results obtained previously, and then decoding the re-formed codeword again. Accordingly, the decoding accuracy can be increased and the burden on the subsequent decoding process or data recovery can be reduced.
Claims19
A flash memory controller, configured to access a flash memory, the flash memory controller comprises:
- a read-only memory, configured to store a code;
- a processor, configured to execute the code to control access to the flash memory;
- and
- an error correction code unit, comprising an LDPC (low-density parity check) decoder, the LDPC decoder is configured to perform a decoding process, and the LDPC decoder comprises:
- a variable-node circuit, configured to generate a plurality of variable-node messages according to a plurality of channel values of a plurality of codeword segments of a first codeword, the variable-node circuit skips a plurality of first variable-node messages of the plurality of variable-node messages according to a decoding indication, and the variable-node circuit performs a variable-node calculation according to a plurality of second variable-node messages and a plurality of check-node messages, so as to update the plurality of second variable-node messages, wherein the plurality of second variable-node messages are the variable-node messages in the plurality of variable-node messages that are not the plurality of first variable-node messages, each of the codeword segments corresponds to multiple ones of the plurality of variable-node messages, and the plurality of first variable-node messages correspond to a codeword segment whose decoding status is passed;
- a check-node circuit, configured to perform a check-node calculation according to the plurality of variable-node messages so as to generate and update the plurality of check-node messages;
- a segment detection circuit, configured to detect each of the codeword segments according to the variable-node messages that correspond to each of the codeword segments, so as to generate and update the corresponding decoding status of each of the codeword segments;
- a syndrome check circuit, configured to determine whether the first codeword is successfully decoded according to results of the check-node calculation;
- and
- a control circuit, configured to check whether the decoding status of each of the codeword segments is passed, and to generate the decoding indication when it is found that the decoding status of one of the codeword segments is failed, the control circuit increases a recursive number by one when completing one iteration of the check-node calculation and one iteration of the variable-node calculation each time, and the control circuit enables the variable-node circuit to output a decoding result when the syndrome check circuit determines that the first codeword is successfully decoded.
A storage device, comprising:
- a flash memory;
- and
- a flash memory controller, configured to access the flash memory, wherein the flash memory controller comprises:
- a read-only memory, configured to store a code;
- a processor, configured to execute the code to control access to the flash memory;
- and
- an error correction code unit, comprising an LDPC (low-density parity check) decoder, the LDPC decoder is configured to perform a decoding process, and the LDPC decoder comprises:
- a variable-node circuit, configured to generate a plurality of variable-node messages according to a plurality of channel values of a plurality of codeword segments of a first codeword, the variable-node circuit skips a plurality of first variable-node messages of the plurality of variable-node messages according to a decoding indication, and the variable-node circuit performs a variable-node calculation according to a plurality of second variable-node messages and a plurality of check-node messages, so as to update the plurality of second variable-node messages, wherein the plurality of second variable-node messages are the variable-node messages in the plurality of variable-node messages that are not the plurality of first variable-node messages, each of the codeword segments corresponds to multiple ones of the plurality of variable-node messages, and the plurality of first variable-node messages correspond to a codeword segment whose decoding status is passed;
- a check-node circuit, configured to perform a check-node calculation according to the plurality of variable-node messages so as to generate and update the plurality of check-node messages;
- a segment detection circuit, configured to detect each of the codeword segments according to the variable-node messages that correspond to each of the codeword segments, so as to generate and update the corresponding decoding status of each of the codeword segments;
- a syndrome check circuit, configured to determine whether the first codeword is successfully decoded according to results of the check-node calculation;
- and
- a control circuit, configured to check whether the decoding result of each of the codeword segments is passed, and to generate the decoding indication when it is found that the decoding status of one of the codeword segments is failed, the control circuit increases a recursive number by one when completing one iteration of the check-node calculation and one iteration of the variable-node calculation each time, and the control circuit enables the variable-node circuit to output a decoding result when the syndrome check circuit determines that the first codeword is successfully decoded.
A reading method, comprising:
- reading a first codeword from a flash memory according to a read command;
- and
- performing a decoding process, wherein the decoding process comprises:
- generating a plurality of variable-node messages according to a plurality of channel values of a plurality of codeword segments of the first codeword, wherein each codeword segment corresponds to multiple ones of the plurality of variable-node messages;
- detecting each of the codeword segments according to the variable-node messages corresponding to each of the codeword segments, so as to generate and update a decoding status corresponding to each of the codeword segments;
- checking whether the decoding status of each of the codeword segments is passed;
- when finding that the decoding status of one of the codeword segments is failed, generating a decoding indication;
- skipping a plurality of first variable-node messages of the variable-node messages according to the decoding indication, and performing a variable-node calculation according to a plurality of second variable-node messages and a plurality of check-node messages, so as to update the plurality of second variable-node messages, wherein the plurality of second variable-node messages are the variable-node messages in the plurality of variable-node messages that are not the plurality of first variable-node messages, and the plurality of first variable-node messages correspond to a codeword segment whose decoding status is passed;
- performing a check-node calculation according to the plurality of variable-node messages so as to generate and update the plurality of check-node messages;
- increasing a recursive number by one when completing one iteration of the check-node calculation and one iteration of the variable-node calculation each time;
- determining whether the first codeword is successfully decoded according to results of the check-node calculation;
- and
- when determining that the first codeword is successfully decoded, outputting a decoding result.
Dependencies are inferred from the claim text.