# US 2020/0005874 A1 · Recovering from failure in programming a nonvolatile memory

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

- Number: US 2020/0005874 A1
- Document ID: US20200005874A1
- Status: Published application
- Kind: A1
- Application number: 16/202,130
- Filed: 2018-11-28
- Published: 2020-01-02
- Earliest claimed: 2018-06-28
- Assignees: Apple Inc.
- Applicants: Apple Inc.
- Inventors: Assaf Shappir; Barak Baum; Itay Sagron; Roman Guy; Guy Ben-Yehuda; Stas Mouler
- Web page: https://patentgrep.com/patent/US20200005874A1

## CPC

- G11C 16/105: {Circuits or methods for updating contents of nonvolatile memory, especially with 'security' features to ensure reliable replacement, i.e. preventing that old data is lost before new data is reliably written}
- G06F 11/1048: {using arrangements adapted for a specific error detection or correction feature}
- G06F 11/1072: {in multilevel memories}
- G11C 11/5628: {Programming or writing circuits; Data input circuits}
- G11C 16/10: Programming or data input circuits
- G11C 16/26: Sensing or reading circuits; Data output circuits
- G11C 16/3459: {Circuits or methods to verify correct programming of nonvolatile memory cells}
- G11C 29/12: Built-in arrangements for testing, e.g. built-in self testing [BIST] {or interconnection details}
- G06F 11/108: {Parity data distribution in semiconductor storages, e.g. in SSD}
- G11C 29/52: Protection of memory contents; Detection of errors in memory contents
- G11C 2029/1202: {Word line control}
- G11C: STATIC STORES (semiconductor memory devices H10B)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A controller includes an interface and a processor. The interface is configured to communicate with a nonvolatile memory including multiple memory cells organized in multiple memory blocks that each includes multiple Word Lines (WLs). The processor is configured to store first data in one or more WLs of a memory block, the first data occupies less than a maximal number of WLs available in the memory block, to calculate redundancy data over the first data and store the redundancy data in a dedicated memory, to program second data to a selected WL of the memory block that was not programmed with the first data, to check a programming status resulting from the programming of the selected WL, and in response to identifying that programming the second data to the selected WL has corrupted at least part of the first data, to recover the first data using the redundancy data.

## Claims

### Claim 1

A controller, comprising:
an interface, which is configured to communicate with a nonvolatile memory comprising multiple memory cells organized in multiple memory blocks, wherein each memory block comprises multiple Word Lines (WLs) of the memory cells; and
a processor, configured to:
receive first data, and store the first data in one or more WLs of a given memory block, wherein the first data occupies less than a maximal number of WLs available in the given memory block;
calculate redundancy data over the first data, and store the redundancy data in a dedicated memory;
receive second data and program the second data to a selected WL of the given memory block that was not programmed with the first data;
check a programming status resulting from the programming of the selected WL; and
in response to identifying that programming the second data to the selected WL has corrupted at least part of the first data, recover the first data using the redundancy data.

### Claim 2 (depends on 1)

The controller according to claim 1, wherein in response to identifying that the second data has been programmed successfully and that programming the second data has filled the given memory block completely, the processor is configured to discard the redundancy data from the dedicated memory.

### Claim 3 (depends on 1)

The controller according to claim 1, wherein the processor is configured to identify that programming the second data has corrupted the first data by receiving a program failure indication from the nonvolatile memory.

### Claim 4 (depends on 1)

The controller according to claim 1, wherein the processor is configured to identify that programming the second data has corrupted the first data by reading and verifying the first data.

### Claim 5 (depends on 1)

The controller according to claim 1, wherein the memory blocks support programming a first number of bits per memory cell, wherein the dedicated memory comprises one or more selected memory blocks in the nonvolatile memory, and wherein the processor is configured to program the redundancy data to the one or more selected memory blocks using a second number of bits per memory cell smaller than or equal to the first number.

### Claim 6 (depends on 1)

The controller according to claim 1, wherein the dedicated memory comprises an auxiliary nonvolatile memory, which resides externally to the nonvolatile memory and is accessible to the controller.

### Claim 7 (depends on 1)

The controller according to claim 1, wherein the dedicated memory comprises an auxiliary volatile memory, wherein the processor is configured to recover the redundancy data after system power is lost and then resumes, by recovering the redundancy data based on the first data, and storing the recovered redundancy data in the volatile memory.

### Claim 8 (depends on 1)

The controller according to claim 1, wherein the memory blocks are organized in multiple planes whose WLs are accessible in parallel, and wherein the processor is configured to calculate multiple plane-specific redundancy chunks for respective memory blocks belonging to different respective planes.

### Claim 9 (depends on 8)

The controller according to claim 8, wherein the processor is configured to recover a WL whose programming to multiple memory blocks in multiple respective planes has failed, using the multiple plane-specific redundancy chunks.

### Claim 10 (depends on 1)

The controller according to claim 1, wherein in response to identifying that programming the second data has filled the given memory block completely, the processor is configured to calculate for the given memory block permanent redundancy data, smaller than the redundancy data, and to store the permanent redundancy data in the nonvolatile memory.

### Claim 11 (depends on 10)

The controller according to claim 10, wherein the processor is configured to calculate the redundancy data by applying bit-wise XOR operations among WLs programmed with the first data, and to calculate the permanent redundancy data by applying bit-wise XOR operations over the redundancy data.

### Claim 12 (depends on 10)

The controller according to claim 10, wherein the processor is configured to calculate the permanent redundancy data from the redundancy data by reading at least part of the first data from the memory block, and applying ECC encoding to the redundancy data and to the at least part of the first data that was read.

### Claim 13 (depends on 1)

The controller according to claim 1, wherein the processor is configured to allocate at least a portion of a storage space of the dedicated memory from a predefined pool of multiple spare memory blocks.

### Claim 14 (depends on 1)

The controller according to claim 1, wherein the dedicated memory comprises the nonvolatile memory or an auxiliary memory accessible to the controller, wherein the processor is configured to select a memory for storing the redundancy data, between the nonvolatile memory and the auxiliary memory, and to store the redundancy data in the selected memory.

### Claim 15 (depends on 14)

The controller according to claim 14, wherein the controller and the nonvolatile memory are comprised in a storage system, wherein the processor is configured to select the memory for storing the redundancy data, at power up, based on a configuration of the storage system.

### Claim 16 (depends on 14)

The controller according to claim 14, wherein the processor is configured to select the memory for storing the redundancy data based on a criterion that aims to maximize at least one of (i) a writing throughput to the nonvolatile memory and (ii) a number of programming and erasure cycles that the nonvolatile memory sustains.

### Claim 17 (depends on 14)

The controller according to claim 14, wherein the processor is configured to move at least some of redundancy data previously written to one of the nonvolatile memory and the auxiliary memory to the other one of the nonvolatile memory and the auxiliary memory, based on evaluating storage space availability in at least one of the nonvolatile memory and the auxiliary memory.

### Claim 18 (depends on 14)

The controller according to claim 14, wherein the processor is configured to hold a table for translating between logical addresses used by a host coupled to the controller and physical addresses used by the nonvolatile memory, to check a fragmentation level of the table, and in response to detecting that the fragmentation level exceeds a predefined fragmentation threshold, to select the nonvolatile memory for storing the redundancy data.

### Claim 19 (depends on 14)

The controller according to claim 14, wherein the processor is configured to allocate in the auxiliary memory a given storage space to be shared between (i) a write buffer for storing data pending programming to the nonvolatile memory and (ii) a storage area for storing redundancy data, to estimate a writing rate to the write buffer, and to re-allocate the write buffer and the storage area, based on the estimated writing rate.

### Claim 20

A method for data storage, comprising:
in a controller that communicates with a nonvolatile memory comprising multiple memory cells organized in multiple memory blocks, wherein each memory block comprises multiple Word Lines (WLs) of the memory cells,
receiving first data, and storing the first data in one or more WLs of a given memory block, wherein the first data occupies less than a maximal number of WLs available in the given memory block;
calculating redundancy data over the first data, and storing the redundancy data in a dedicated memory;
receiving second data and programming the second data to a selected WL of the given memory block that was not programmed with the first data;
checking a programming status resulting from the programming of the selected WL; and
in response to identifying that programming the second data to the selected WL has corrupted at least part of the first data, recovering the first data using the redundancy data.

### Claim 21 (depends on 20)

The method according to claim 20, wherein in response to identifying that the second data has been programmed successfully and that programming the second data has filled the given memory block completely, discarding the redundancy data from the dedicated memory.

### Claim 22 (depends on 20)

The method according to claim 20, wherein identifying that programming the second data has corrupted the first data comprises receiving a program failure indication from the nonvolatile memory.

### Claim 23 (depends on 20)

The method according to claim 20, wherein identifying that programming the second data has corrupted the first data comprises reading and verifying the first data.

### Claim 24 (depends on 20)

The method according to claim 20, wherein the memory blocks support programming a first number of bits per memory cell, wherein the dedicated memory comprises one or more selected memory blocks in the nonvolatile memory, and wherein storing the redundancy data comprises programming the redundancy data to the one or more selected memory blocks using a second number of bits per memory cell smaller than or equal to the first number.

### Claim 25 (depends on 20)

The method according to claim 20, wherein the memory blocks are organized in multiple planes whose WLs are accessible in parallel, and wherein calculating the redundancy data comprises calculating multiple plane-specific redundancy chunks for respective memory blocks belonging to different respective planes.

### Claim 26 (depends on 20)

The method according to claim 20, wherein in response to identifying that programming the second data has filled the given memory block completely, calculating for the given memory block permanent redundancy data, smaller than the redundancy data, and storing the permanent redundancy data in the nonvolatile memory.

### Claim 27 (depends on 20)

The method according to claim 20, wherein the dedicated memory comprises the nonvolatile memory or an auxiliary memory accessible to the controller, and comprising selecting a memory for storing the redundancy data, between the nonvolatile memory and the auxiliary memory, and storing the redundancy data in the selected memory.

### Claim 28 (depends on 20)

The method according to claim 20, wherein selecting the memory for storing the redundancy data comprises selecting the memory based on a criterion that aims to maximize at least one of (i) a writing throughput to the nonvolatile memory and (ii) a number of programming and erasure cycles that the nonvolatile memory sustains.
