# US 2021/0175900 A1 · Memory controller and method of accessing flash memory

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0175900 A1
- Document ID: US20210175900A1
- Status: Published application
- Kind: A1
- Application number: 16/835,906
- Filed: 2020-03-31
- Published: 2021-06-10
- Earliest claimed: 2019-12-09
- Assignees: Silicon Motion, Inc.
- Applicants: Silicon Motion, Inc.
- Inventors: Shiuan-Hao KUO
- Web page: https://patentgrep.com/patent/US20210175900A1

## CPC

- H03M 13/1108: {Hard decision decoding, e.g. bit flipping, modified or weighted bit flipping}
- H03M 13/1148: {Structural properties of the code parity-check or generator matrix}
- H03M 13/1575: {Direct decoding, e.g. by a direct determination of the error locator polynomial from syndromes and subsequent analysis or by matrix operations involving syndromes, e.g. for codes with a small minimum Hamming distance}
- H03M 13/2948: {Iterative decoding (H03M13/2957 takes precedence)}
- H03M: CODING; DECODING; CODE CONVERSION IN GENERAL (using fluidic means F15C4/00; optical analogue/digital converters G02F7/00; coding, decoding or code conversion, specially adapted for particular applications, see the relevant subclasses, e.g. G01D, G01R, G06F, G06T, G09G, G10L, G11B, G11C, H04B, H04L, H04M, H04N; ciphering or deciphering for cryptography or other purposes involving the need for secrecy G09C)

## Abstract

A memory controller for use in a data storage device is provided. The memory controller includes a variable-node circuit and a check-node circuit. The check-node circuit is configured to obtain a codeword difference from the variable-node circuit, and calculate a syndrome according to the codeword difference. During each LDPC (low-density parity check) decoding iterative operation, the variable-node circuit executes the following steps: determining syndrome weight according to a channel value and the syndrome from the check-node circuit; obtaining a previous codeword generated by a previous LDPC decoding iterative operation; determining a flipping strategy of a bit-flipping algorithm for each codeword bit in the previous codeword according to the syndrome weight and a predetermined threshold, and flipping one or more codeword bits in the previous codeword according to the flipping strategy to generate an updated codeword; and subtracting the previous codeword from the updated codeword to generate the codeword difference.

## Claims

### Claim 1

A memory controller, for use in a data storage device, the memory controller comprising:
a variable-node circuit, configured to obtain a channel value read from a flash memory of the data storage device; and
a check-node circuit, configured to obtain a codeword difference from the variable-node circuit, and to calculate a syndrome according to the codeword difference,
wherein during each LDPC (low-density parity check) decoding iterative operation, the variable-node circuit executes the following steps:
determining a syndrome weight according to the channel value and the syndrome from the check-node circuit;
obtaining a previous codeword generated by a previous LDPC decoding iterative operation;
determining a flipping strategy of a bit-flipping algorithm for each codeword bit in the previous codeword according to the syndrome weight and a predetermined threshold, and flipping one or more codeword bits in the previous codeword according to the flipping strategy to generate an updated codeword; and
subtracting the previous codeword from the updated codeword to generate the codeword difference.

### Claim 2 (depends on 1)

The memory controller as claimed in claim 1, wherein when the channel value is obtained from the flash memory using a hard-decision method, the variable-node circuit sets the channel value to the previous codeword in an initial LDPC decoding iterative operation, and sets reliability information corresponding to each codeword bit in the previous codeword to 1.

### Claim 3 (depends on 1)

The memory controller as claimed in claim 1, wherein when the channel value is obtained from the flash memory using a soft-decision method, each bit in the channel value has corresponding reliability information.

### Claim 4 (depends on 2)

The memory controller as claimed in claim 2, wherein the variable-node circuit comprises:
a flipping-determination circuit, comprising a flipping-strategy lookup table for recording the flipping strategy corresponding to different values of the syndrome weight and the predetermined threshold, wherein the flipping strategy comprises a strong-flipping strategy, a weak-flipping strategy, and a doing-nothing strategy; and
a bit-flipping circuit, configured to generate the updated codeword and the reliability information corresponding to each codeword bit in the updated codeword by flipping one or more codeword bits in the previous codeword and the reliability information corresponding to each codeword in the previous codeword according to the flipping strategy.

### Claim 5 (depends on 4)

The memory controller as claimed in claim 4, wherein the bit-flipping circuit further stores the updated codeword and the reliability information corresponding to each codeword bit in the updated codeword in a variable-node memory for use by a next LDPC decoding iterative operation.

### Claim 6 (depends on 4)

The memory controller as claimed in claim 4, wherein a combination of each codeword bit and the reliability information in the previous codeword comprises four states: strong 1, weak 1, weak 0, and strong 0,
wherein the strong-flipping strategy indicates that a specific state of the four states is flipped to a state that has a distance of two or more steps to the specific state, and the weak-flipping strategy indicates that the specific state is flipped to a state that has a distance of one or more steps to the specific state, and the doing-nothing strategy indicates that the specific state is kept unchanged.

### Claim 7 (depends on 6)

The memory controller as claimed in claim 6, wherein when the syndrome weight and the predetermined threshold are greater than a predefined value and the syndrome weight is greater than or equal to the predetermined threshold, the flipping strategy corresponding to the syndrome weight and the predetermined threshold is the strong-flipping strategy.

### Claim 8

A method of accessing a flash memory, for use in a memory controller of a data storage device, the method comprising:
storing data to the flash memory of the data storage device via a storage program;
obtaining a channel value read from the flash memory of the data storage device;
obtaining a codeword difference, and calculating a syndrome according to the codeword difference,
during each LDPC (low-density parity check) decoding iterative operation, performing the following steps:
determining a syndrome weight according to the channel value and the syndrome from the check-node circuit;
obtaining a previous codeword generated by a previous LDPC decoding iterative operation;
determining a flipping strategy of a bit-flipping algorithm for each codeword bit in the previous codeword according to the syndrome weight and a predetermined threshold, and flipping one or more codeword bits in the previous codeword according to the flipping strategy to generate an updated codeword; and
subtracting the previous codeword from the updated codeword to generate the codeword difference.

### Claim 9 (depends on 8)

The method as claimed in claim 8, further comprising:
when the channel value is obtained from the flash memory using a hard-decision method, setting the channel value to the previous codeword in an initial LDPC decoding iterative operation, and setting reliability information corresponding to each codeword bit in the previous codeword to 1.

### Claim 10 (depends on 8)

The method as claimed in claim 8, wherein when the channel value is obtained from the flash memory using a soft-decision method, each bit in the channel value has corresponding reliability information.

### Claim 11 (depends on 9)

The method as claimed in claim 9, further comprising:
building a flipping-strategy lookup table for recording the flipping strategy corresponding to different values of the syndrome weight and the predetermined threshold, wherein the flipping strategy comprises a strong-flipping strategy, a weak-flipping strategy, and a doing-nothing strategy; and
generating the updated codeword and the reliability information corresponding to each codeword bit in the updated codeword by flipping one or more codeword bits in the previous codeword and the reliability information corresponding to each codeword in the previous codeword according to the flipping strategy.

### Claim 12 (depends on 11)

The method as claimed in claim 11, further comprising:
storing the updated codeword and the reliability information corresponding to each codeword bit in the updated codeword in a variable-node memory for use by a next LDPC decoding iterative operation.

### Claim 13 (depends on 11)

The method as claimed in claim 11, wherein a combination of each codeword bit and the reliability information in the previous codeword comprises four states: strong 1, weak 1, weak 0, and strong 0,
wherein the strong-flipping strategy indicates that a specific state of the four states is flipped to a state that has a distance of two or more steps to the specific state, and the weak-flipping strategy indicates that the specific state is flipped to a state that has a distance of one or more steps to the specific state, and the doing-nothing strategy indicates that the specific state is kept unchanged.

### Claim 14 (depends on 13)

The method as claimed in claim 13, wherein when the syndrome weight and the predetermined threshold are greater than a predefined value and the syndrome weight is greater than or equal to the predetermined threshold, the flipping strategy corresponding to the syndrome weight and the predetermined threshold is the strong-flipping strategy.

### Claim 15

A memory controller, for use in a data storage device, the memory controller comprising:
a variable-node circuit, configured to obtain a channel value read from a flash memory of the data storage device; and
a check-node circuit, configured to obtain a codeword difference from the variable-node circuit, and to calculate a syndrome according to the codeword difference,
wherein during each LDPC (low-density parity check) decoding iterative operation, the variable-node circuit executes the following steps:
determining a syndrome weight according to the channel value and the syndrome from the check-node circuit;
obtaining a previous codeword generated by a previous LDPC decoding iterative operation;
determining whether each codeword bit in the previous codeword has been flipped according to the channel value and the previous codeword;
selecting a first flipping-strategy lookup table and a second flipping-strategy lookup table for the codeword bits that have been flipped and the codeword bits that have not been flipped in the previous codeword, wherein the first flipping-strategy lookup table is different from the second flipping-strategy lookup table;
determining a flipping strategy of a bit-flipping algorithm for each codeword bit in the previous codeword according to the syndrome weight, a predetermined threshold, and the selected first flipping-strategy lookup table or the second flipping-strategy lookup table, and flipping one or more codeword bits in the previous codeword according to the flipping strategy to generate an updated codeword; and
subtracting the previous codeword from the updated codeword to generate the codeword difference.

### Claim 16 (depends on 15)

The memory controller as claimed in claim 15, wherein when the channel value is obtained from the flash memory using a hard-decision method, the variable-node circuit sets the channel value to the previous codeword in an initial LDPC decoding iterative operation, and sets reliability information corresponding to each codeword bit in the previous codeword to 1.

### Claim 17 (depends on 16)

The memory controller as claimed in claim 16, wherein the variable-node unit comprises:
a flipping-determination circuit, comprising the first flipping-strategy lookup table and the second flipping-strategy lookup table for recording the flipping strategy corresponding to different values of the syndrome weight and the predetermined threshold, wherein the flipping strategy comprises a strong-flipping strategy, a weak-flipping strategy, and a doing-nothing strategy; and
a bit-flipping circuit, configured to generate the updated codeword and the reliability information corresponding to each codeword bit in the updated codeword by flipping one or more codeword bits in the previous codeword and the reliability information corresponding to each codeword in the previous codeword according to the flipping strategy.

### Claim 18 (depends on 17)

The memory controller as claimed in claim 17, wherein the bit-flipping circuit further stores the updated codeword and the reliability information corresponding to each codeword bit in the updated codeword in a variable-node memory for use by a next LDPC decoding iterative operation.

### Claim 19 (depends on 17)

The memory controller as claimed in claim 17, wherein a combination of each codeword bit and the reliability information in the previous codeword comprises four states: strong 1, weak 1, weak 0, and strong 0,
wherein the strong-flipping strategy indicates that a specific state of the four states is flipped to a state that has a distance of two or more steps to the specific state, and the weak-flipping strategy indicates that the specific state is flipped to a state that has a distance of one or more steps to the specific state, and the doing-nothing strategy indicates that the specific state is kept unchanged.

### Claim 20 (depends on 19)

The memory controller as claimed in claim 19, wherein an overall flipping step of the flipping strategy used in the second flipping-strategy lookup table is less than that of the flipping strategy used in the first flipping-strategy lookup table.
