# US 11,442,662 B2 · Data writing method, memory control circuit unit and memory storage apparatus

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

- Number: US 11,442,662 B2
- Document ID: US11442662B2
- Status: Granted
- Kind: B2
- Application number: 16/880,985
- Filed: 2020-05-22
- Published: 2021-11-04
- Granted: 2022-09-13
- Earliest claimed: 2020-04-30
- Assignees: Phison Electronics Corp.
- Applicants: Phison Electronics Corp.
- Inventors: Ping-Chuan Lin; Hsiang-Jui Huang; Ping-Yu Hsieh; Tsung-Ju Wu
- Web page: https://patentgrep.com/patent/US11442662B2

## CPC

- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 3/06: Digital input from, or digital output to, record carriers {, e.g. RAID, emulated record carriers or networked record carriers}
- G06F 3/0604: {Improving or facilitating administration, e.g. storage management}
- G06F 3/0616: {in relation to life time, e.g. increasing Mean Time Between Failures [MTBF]}
- G06F 3/064: {Management of blocks}
- G06F 3/0644: {Management of space entities, e.g. partitions, extents, pools}
- G06F 3/065: {Replication mechanisms}
- G06F 3/0652: {Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A data writing method, a memory control circuit unit, and a memory storage apparatus are provided. The method includes: receiving a write command from a host system; and determining whether to write a data corresponding to the write command into a first area or a second area according to a write amplification factor of the first area, where if it is determined to write the data into the second area, copying the written data to the first area after writing the data.

## Claims

### Claim 1

A data writing method for a memory storage apparatus, the memory storage apparatus having a rewritable non-volatile memory module, the rewritable non-volatile memory module comprising a plurality of areas, each of the plurality of areas comprising a plurality of physical erasing units, and each of the plurality of physical erasing units having a plurality of memory cells, wherein the plurality of areas comprises a first area and a second area, and the data writing method comprising:
receiving a write command from a host system;
calculating a write amplification factor (WAF) of the first area according to an amount of data previously written by the host system and an amount of data previously written to the first area; and
determining, according to the write amplification factor of the first area of the plurality of areas, whether to write a first data corresponding to the write command into the first area or the second area of the plurality of areas, wherein if it is determined to write the first data into the second area, the written first data is copied to the first area after writing the first data,
wherein the first area includes memory cells which store two or more number of bits per memory cell and the second area includes memory cells which store one bit per memory cell.

### Claim 2 (depends on 1)

The data writing method according to claim 1, wherein step of determining, according to the write amplification factor of the first area of the plurality of areas, whether to write the first data corresponding to the write command into the first area or the second area of the plurality of areas comprises:
writing the first data into the second area when the write amplification factor is greater than a preset threshold; and
writing the first data into the first area when the write amplification factor is not greater than the preset threshold.

### Claim 3 (depends on 1)

The data writing method according to claim 1, wherein if it is determined to write the first data into the first area, a first programming mode and a second programming mode are employed to program the plurality of memory cells in the first area.

### Claim 4 (depends on 3)

The data writing method according to claim 3, wherein the number of bits stored by the memory cells programmed by using the first programming mode is less than the number of bits stored by the memory cells programmed by using the second programming mode.

### Claim 5 (depends on 3)

The data writing method according to claim 3, wherein the step of using the first programming mode and the second programming mode to program the plurality of memory cells in the first area comprises:
using the first programming mode to program the plurality of memory cells in the first area; and
copying data of the plurality of physical erasing units written into the first area to another one of the plurality of physical erasing units in the first area by using the second programming mode through a copyback operation.

### Claim 6 (depends on 1)

The data writing method according to claim 1, wherein if it is determined to write the first data into the second area, a first programming mode is used to program the plurality of memory cells in the second area.

### Claim 7 (depends on 6)

The data writing method according to claim 6, wherein the step of copying the written first data into the first area after writing the first data comprises:
copying data of the plurality of physical erasing units written into the second area to one of the plurality of physical erasing units in the first area by using the second programming mode through a copyback operation.

### Claim 8 (depends on 1)

The data writing method according to claim 1, wherein the step of determining, according to the write amplification factor of the first area of the plurality of areas, whether to write the first data corresponding to the write command into the first area or the second area of the plurality of areas comprises:
determining whether to execute a first write mode or a second write mode according to life cycle parameters of the rewritable non-volatile memory module,
in the first write mode, writing the corresponding first data into the first area, and
in the second write mode, determining whether to write the first data into the first area or the second area according to the write amplification factor of the first area.

### Claim 9 (depends on 1)

The data writing method according to claim 1, wherein the number of bits stored by the memory cells in the first area is greater than the number of bits stored by the memory cells in the second area.

### Claim 10 (depends on 1)

The data writing method according to claim 1, wherein the plurality of areas respectively have corresponding storage capacities, and when calculating a space size of the rewritable non-volatile memory module, the space size does not comprise the storage capacity corresponding to the second area.

### Claim 11

A memory control circuit unit, comprising:
a host interface configured to be coupled to a host system;
a memory interface configured to be coupled to a rewritable non-volatile memory module, wherein the rewritable non-volatile memory module comprises a plurality of areas, each of the plurality of areas comprises a plurality of physical erasing units, each of the plurality of physical erasing units has a plurality of memory cells, wherein the plurality of areas comprises a first area and a second area; and
a memory management circuit comprising a processor coupled to the host interface and the memory interface,
wherein the memory management circuit is configured to receive a write command from the host system,
the memory management circuit is further configured to calculate a write amplification factor (WAF) of the first area according to an amount of data previously written by the host system and an amount of data previously written to the first area, and
the memory management circuit is further configured to determine, according to the write amplification factor of the first area of the plurality of areas, whether to write a first data corresponding to the write command into the first area or the second area of the plurality of areas, wherein it if is determined to write the first data into the second area, the written first data is copied into the first area after writing the first data,
wherein the first area includes memory cells which store two or more number of bits per memory cell and the second area includes memory cells which store one bit per memory cell.

### Claim 12 (depends on 11)

The memory control circuit unit according to claim 11, wherein in the operation that the memory management circuit is further configured to determine, according to the write amplification factor of the first area of the plurality of areas, whether to write the first data corresponding to the write command into the first area or the second area of the plurality of areas,
writing the first data into the second area when the write amplification factor is greater than a preset threshold, and
writing the first data into the first area when the write amplification factor is not greater than the preset threshold.

### Claim 13 (depends on 11)

The memory control circuit unit according to claim 11, wherein if it is determined to write the first data into the first area, the memory management circuit is further configured to use a first programming mode and a second programming mode to program the plurality of memory cells in the first area.

### Claim 14 (depends on 13)

The memory control circuit unit according to claim 13, wherein the number of bits stored by the memory cells programmed by the memory management circuit by using the first programming mode is less than the number of bits stored by the memory cells programmed by using the second programming mode.

### Claim 15 (depends on 13)

The memory control circuit unit according to claim 13, wherein in the operation that the memory management circuit is further configured to use the first programming mode and the second programming mode to program the plurality of memory cells in the first area,
using the first programming mode to program the plurality of memory cells in the first area, and
copying data of the plurality of physical erasing units written into the first area to another one of the plurality of physical erasing units in the first area by using the second programming mode through a copyback operation.

### Claim 16 (depends on 11)

The memory control circuit unit according to claim 11, wherein if it is determined to write the first data into the second area, the memory management circuit is further configured to use a first programming mode to program the plurality of memory cells in the second area.

### Claim 17 (depends on 16)

The memory control circuit unit according to claim 16, wherein in the operation of copying the written first data into the first area after writing the first data,
the memory management circuit is further configured to copy data of the plurality of physical erasing units written into the second area to one of the plurality of physical erasing units in the first area by using the second programming mode through a copyback operation.

### Claim 18 (depends on 11)

The memory control circuit unit according to claim 11, wherein in the operation that the memory management circuit is further configured to determine, according to the write amplification factor of the first area of the plurality of areas, whether to write the first data corresponding to the write command into the first area or the second area of the plurality of areas,
determine whether to execute a first write mode or a second write mode according to life cycle parameters of the rewritable non-volatile memory module,
in the first write mode, write the corresponding first data into the first area, and
in the second write mode, determine whether to write the first data into the first area or the second area according to the write amplification factor of the first area.

### Claim 19 (depends on 11)

The memory control circuit unit according to claim 11, wherein the number of bits stored by the memory cells in the first area is greater than the number of bits stored by the memory cells in the second area.

### Claim 20 (depends on 11)

The memory control circuit unit according to claim 11, wherein the plurality of areas respectively have corresponding storage capacities, and when the memory management circuit calculates a space size of the rewritable non-volatile memory module, the space size does not comprise the storage capacity corresponding to the second area.

### Claim 21

A memory storage apparatus, comprising:
a connection interface unit configured to be coupled to a host system;
a rewritable non-volatile memory module comprising a plurality of areas, each of the plurality of areas comprising a plurality of physical erasing units, and each of the plurality of physical erasing units having a plurality of memory cells, wherein the plurality of areas comprises a first area and a second area; and
a memory control circuit unit, coupled to the connection interface unit and the rewritable non-volatile memory module,
wherein the memory control circuit unit is configured to receive a write command from the host system,
the memory control circuit unit is further configured to calculate a write amplification factor (WAF) of the first area according to an amount of data previously written by the host system and an amount of data previously written to the first area, and
the memory control circuit unit is further configured to determine, according to the write amplification factor of the first area of the plurality of areas, whether to write a first data corresponding to the write command into the first area or the second area of the plurality of areas, wherein if it is determined to write the first data into the second area, the written first data is copied into the first area after writing the first data,
wherein the first area includes memory cells which store two or more number of bits per memory cell and the second area includes memory cells which store one bit per memory cell.

### Claim 22 (depends on 21)

The memory storage apparatus according to claim 21, wherein in the operation that the memory control circuit unit is further configured to determine, according to the write amplification factor of the first area of the plurality of areas, whether to write the first data corresponding to the write command into the first area or the second area of the plurality of areas,
writing the first data into the second area when the write amplification factor is greater than a preset threshold, and
writing the first data into the first area when the write amplification factor is not greater than the preset threshold.

### Claim 23 (depends on 21)

The memory storage apparatus according to claim 21, wherein if it is determined to write the first data into the first area, the memory control circuit unit is further configured to use a first programming mode and a second programming mode to program the plurality of memory cells in the first area.

### Claim 24 (depends on 23)

The memory storage apparatus according to claim 23, wherein the number of bits stored by the memory cells programmed by the memory control circuit unit by using the first programming mode is less than the number of bits stored by the memory cells programmed by using the second programming mode.

### Claim 25 (depends on 23)

The memory storage apparatus according to claim 23, wherein in the operation that the memory control circuit unit is further configured to use the first programming mode and the second programming mode to program the plurality of memory cells in the first area,
using the first programming mode to program the plurality of memory cells in the first area, and
copying data of the plurality of physical erasing units written into the first area to another one of the plurality of physical erasing units in the first area by using the second programming mode through a copyback operation.

### Claim 26 (depends on 21)

The memory storage apparatus according to claim 21, wherein if it is determined to write the first data into the second area, the memory control circuit unit is further configured to use a first programming mode to program the plurality of memory cells in the second area.

### Claim 27 (depends on 26)

The memory storage apparatus according to claim 26, wherein in the operation of copying the written first data into the first area after writing the first data,
the memory control circuit unit is further configured to copy data of the plurality of physical erasing units written into the second area to one of the plurality of physical erasing units in the first area by using the second programming mode through a copyback operation.

### Claim 28 (depends on 21)

The memory storage apparatus according to claim 21, wherein in the operation that the memory management circuit is further configured to determine, according to the write amplification factor of the first area of the plurality of areas, whether to write the first data corresponding to the write command into the first area or the second area of the plurality of areas,
determine whether to execute a first write mode or a second write mode according to life cycle parameters of the rewritable non-volatile memory module,
in the first write mode, write the corresponding first data into the first area, and
in the second write mode, determine whether to write the first data into the first area or the second area according to the write amplification factor of the first area.

### Claim 29 (depends on 21)

The memory storage apparatus according to claim 21, wherein the number of bits stored by the memory cells in the first area is greater than the number of bits stored by the memory cells in the second area.

### Claim 30 (depends on 21)

The memory storage apparatus according to claim 21, wherein the plurality of areas respectively have corresponding storage capacities, and when the memory control circuit unit calculates a space size of the rewritable non-volatile memory module, the space size does not comprise the storage capacity corresponding to the second area.
