# US 2004/0083333 A1 · Hybrid implementation for error correction codes within a non-volatile memory system

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

- Number: US 2004/0083333 A1
- Document ID: US20040083333A1
- Status: Published application
- Kind: A1
- Application number: 10/678,893
- Filed: 2003-10-02
- Published: 2004-04-29
- Earliest claimed: 2002-10-28
- Assignees: SanDisk Corporation
- Inventors: Robert C. Chang; Bahman Qawami; Farshid Sabet-Sharghi
- Web page: https://patentgrep.com/patent/US20040083333A1

## CPC

- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 11/1068: {in sector programmable memories, e.g. flash disk (G06F11/1072 takes precedence)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods and apparatus for using different error correction code algorithms to encode and to decode contents of blocks within a non-volatile memory are disclosed. According to one aspect of the present invention, a method for storing data within a non-volatile memory includes identifying a first block into which the data is to be stored, and obtaining an indicator associated with the first block. A determination may then be made regarding whether the indicator indicates that the data is to be encoded using a first algorithm. The data is encoded using the first algorithm when it is determined that the data is to be encoded using the first algorithm, after which point the data encoded using the first algorithm is written into the first block.

## Claims

### Claim 1

A method for storing data within a non-volatile memory of a memory system, the method comprising:
identifying a first block into which the data is to be stored;
obtaining an indicator associated with the first block;
determining when the indicator indicates that the data is to be encoded using a first algorithm;
encoding the data using the first algorithm when it is determined that the data is to be encoded using the first algorithm; and
writing the data encoded using the first algorithm into the first block.

### Claim 2 (depends on 1)

The method of claim 1 further including:
encoding the data using a second algorithm when it is determined that the data is not to be encoded using the first algorithm; and
writing the data encoded using the second algorithm into the first block.

### Claim 3 (depends on 2)

The method of claim 2 wherein the first algorithm is a 1-bit error correction code (ECC) algorithm and the second algorithm is a 2-bit ECC algorithm.

### Claim 4 (depends on 2)

The method of claim 2 wherein the indicator is arranged to indicate when the block is a reclaimed block, wherein when the block is a reclaimed block, the indicator is further arranged to indicate that the data is to be encoded using the second algorithm.

### Claim 5 (depends on 2)

The method of claim 2 wherein the indicator is arranged to indicate a number of times the block has been erased.

### Claim 6 (depends on 5)

The method of claim 5 wherein determining when the indicator indicates that the data is to be encoded using the first algorithm includes:
determining when the indicator is less than a threshold value, wherein when the indicator is less than the threshold value, the data is to be encoded using the first algorithm.

### Claim 7 (depends on 2)

The method of claim 2 wherein the indicator is arranged to indicate an approximately average number of times blocks within the non-volatile memory have been erased.

### Claim 8 (depends on 2)

The method of claim 2 wherein the indicator is stored in a data structure, the data structure being substantially separate from the first block, and obtaining the indicator associated with the block includes obtaining the indicator from the data structure.

### Claim 9 (depends on 1)

The method of claim 1 wherein the non-volatile memory is a flash memory.

### Claim 10 (depends on 9)

The method of claim 9 wherein the flash memory is one of a NAND flash memory and an MLC NAND flash memory.

### Claim 11

A method for reading data within a non-volatile memory of a memory system, the method comprising:
identifying a first block from which data is to be read;
obtaining an indicator associated with the first block;
determining when the indicator indicates that the data stored in the first block has encoded using a first algorithm; and
decoding the data using the first algorithm when it is determined that the data has been encoded using the first algorithm.

### Claim 12 (depends on 11)

The method of claim 11 further including:
decoding the data using a second algorithm when it is determined that the data has not been encoded using the first algorithm.

### Claim 13 (depends on 12)

The method of claim 12 wherein the first algorithm is a 1-bit ECC algorithm and the second algorithm is a 2-bit ECC algorithm.

### Claim 14 (depends on 12)

The method of claim 12 wherein the indicator is arranged to indicate when the block is a reclaimed block, wherein when the block is a reclaimed block, the indicator is further arranged to indicate that the data has been encoded using the second algorithm.

### Claim 15 (depends on 12)

The method of claim 12 wherein the indicator is arranged to indicate a number of times the block has been erased.

### Claim 16 (depends on 15)

The method of claim 15 wherein determining when the indicator indicates that the data has been encoded using the first algorithm includes:
determining when the indicator is less than a threshold value, wherein when the indicator is less than the threshold value, the data has been encoded using the first algorithm.

### Claim 17 (depends on 12)

The method of claim 12 wherein the indicator is arranged to indicate an approximately average number of times physical blocks of the non-volatile memory have been erased.

### Claim 18 (depends on 12)

The method of claim 12 wherein the indicator is stored in a data structure, the data structure being substantially separate from the first block, and obtaining the indicator associated with the block includes obtaining the indicator from the data structure.

### Claim 19 (depends on 11)

The method of claim 11 wherein the non-volatile memory is a flash memory.

### Claim 20 (depends on 19)

The method of claim 19 wherein the flash memory is one of a NAND flash memory and an MLC NAND flash memory.

### Claim 21

A memory system comprising:
a non-volatile memory including a plurality of blocks, the plurality of blocks including a first block;
code devices for identifying the first block into which data is to be stored;
code devices for obtaining an indicator associated with the first block;
code devices for determining when the indicator indicates that the data is to be encoded using a first algorithm;
code devices for encoding the data using the first algorithm when it is determined that the data is to be encoded using the first algorithm;
code devices for writing the data encoded using the first algorithm into the first block; and
a memory area that stores the code devices.

### Claim 22 (depends on 21)

The memory system of claim 21 further including:
code devices for encoding the data using a second algorithm when it is determined that the data is not to be encoded using the first algorithm; and
code devices for writing the data encoded using the second algorithm into the first block.

### Claim 23 (depends on 22)

The memory system of claim 22 wherein the first algorithm is a 1-bit ECC algorithm and the second algorithm is a 2-bit ECC algorithm.

### Claim 24 (depends on 22)

The memory system of claim 22 wherein the indicator is arranged to indicate when the block is a reclaimed block, wherein when the block is a reclaimed block, the indicator is further arranged to indicate that the data is to be encoded using the second algorithm.

### Claim 25 (depends on 22)

The memory system of claim 22 wherein the indicator is arranged to indicate a number of times the block has been erased.

### Claim 26 (depends on 25)

The memory system of claim 25 wherein the code devices for determining when the indicator indicates that the data is to be encoded using the first algorithm include:
code devices for determining when the indicator is less than a threshold value, wherein when the indicator is less than the threshold value, the data is to be encoded using the first algorithm.

### Claim 27 (depends on 21)

The memory system of claim 21 wherein the non-volatile memory is one of a NAND flash memory and an MLC NAND flash memory.

### Claim 28

A memory system comprising:
a non-volatile memory including a plurality of blocks, the plurality of blocks including a first block, the first block including data;
code devices for identifying the first block;
code devices for obtaining an indicator associated with the first block;
code devices for determining when the indicator indicates that the data has been encoded using a first algorithm;
code devices for decoding the data using the first algorithm when it is determined that the data has been encoded using the first algorithm; and
a memory area that stores the code devices.

### Claim 30 (depends on 29)

The memory system of claim 29 further including:
code devices for decoding the data using a second algorithm when it is determined that the data has not been encoded using the first algorithm.

### Claim 31 (depends on 30)

The memory system of claim 30 wherein the first algorithm is a 1-bit ECC algorithm and the second algorithm is a 2-bit ECC algorithm.

### Claim 32 (depends on 30)

The memory system of claim 30 wherein the indicator is arranged to indicate when the block is a reclaimed block, wherein when the block is a reclaimed block, the indicator is further arranged to indicate that the data has been encoded using the second algorithm.

### Claim 33 (depends on 30)

The memory system of claim 30 wherein the indicator is arranged to indicate a number of times the block has been erased.

### Claim 34 (depends on 33)

The memory system of claim 33 wherein the code devices for determining when the indicator indicates that the data has been encoded using the first algorithm include:
code devices for determining when the indicator is less than a threshold value, wherein when the indicator is less than the threshold value, the data has been encoded using the first algorithm.

### Claim 35 (depends on 29)

The memory system of claim 29 wherein the non-volatile memory is one of a NAND flash memory and an MLC NAND flash memory.

### Claim 36

A memory system comprising:
a non-volatile memory including a plurality of blocks, the blocks including a first block and a second block, the first block including a first set of contents encoded using a first algorithm, the second block including a second set of contents encoded using a second algorithm, wherein the non-volatile memory further includes a data structure that is arranged to indicate that the first set of contents is encoded using the first algorithm and that the second set of contents is encoded using the second algorithm;
code devices for accessing the data structure, wherein the code devices for accessing the data structure include code devices for determining that the first set of contents is encoded using the first algorithm and code devices for determining that the second set of contents is encoded using the second algorithm; and
a memory area that stores the code devices.

### Claim 37 (depends on 36)

The memory system of claim 36 wherein the first algorithm is a 1-bit ECC algorithm and the second algorithm is a 2-bit ECC algorithm.

### Claim 38 (depends on 37)

The memory system of claim 37 wherein the non-volatile memory is one of a NAND flash memory and an MLC NAND flash memory.

### Claim 39

A memory system comprising:
a non-volatile memory that includes a first block into which data is to be stored;
means that identify the first block;
means that obtain an indicator associated with the first block;
means that determine when the indicator indicates that the data is to be encoded using a first algorithm; and
means that encode the data using the first algorithm when it is determined that the data is to be encoded using the first algorithm.

### Claim 40 (depends on 39)

The memory system of claim 39 further including:
means that encode the data using a second algorithm when it is determined that the data is not to be encoded using the first algorithm; and
means that write the data encoded using the second algorithm into the first block.

### Claim 41 (depends on 40)

The memory system of claim 40 wherein the first algorithm is a 1-bit ECC algorithm and the second algorithm is a 2-bit ECC algorithm.

### Claim 42 (depends on 39)

The memory system of claim 39 wherein the non-volatile memory is one of a NAND flash memory and an MLC NAND flash memory.

### Claim 43

A memory system comprising:
a non-volatile memory that includes a first block from which data is to be read;
means that identify the first block;
means that obtain an indicator associated with the first block;
means that determine when the indicator indicates that the data stored in the first block has encoded using a first algorithm; and
means that decode the data using the first algorithm when it is determined that the data has been encoded using the first algorithm.

### Claim 44 (depends on 43)

The memory system of claim 43 further including:
means that decode the data using a second algorithm when it is determined that the data has not been encoded using the first algorithm.

### Claim 45 (depends on 44)

The memory system of claim 44 wherein the first algorithm is a 1-bit ECC algorithm and the second algorithm is a 2-bit ECC algorithm.

### Claim 46 (depends on 43)

The memory system of claim 43 wherein the non-volatile memory is one of a NAND flash memory and an MLC NAND flash memory.
