# US 2022/0035736 A1 · Data processing method for controlling write speed of memory device to avoid significant write delay and data storage device utilizing the same

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

- Number: US 2022/0035736 A1
- Document ID: US20220035736A1
- Status: Published application
- Kind: A1
- Application number: 17/341,410
- Filed: 2021-06-08
- Published: 2022-02-03
- Earliest claimed: 2020-07-29
- Assignees: Silicon Motion, Inc.
- Applicants: Silicon Motion, Inc.
- Inventors: Tsung-Yao Chiang
- Web page: https://patentgrep.com/patent/US20220035736A1

## CPC

- G06F 12/0253: {Garbage collection, i.e. reclamation of unreferenced memory}
- G06F 3/0613: {in relation to throughput}
- G06F 3/0656: {Data buffering arrangements}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 2212/7205: Cleaning, compaction, garbage collection, erase control
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A memory controller includes a buffer memory and a microprocessor. The buffer memory includes at least a first cache memory and a second cache memory. The microprocessor is configured to control access of a flash memory device. The microprocessor is configured to obtain a number of spare blocks of the flash memory device corresponding to a first operation period, determine a write speed compensation value, determine a target write speed according to the write speed compensation value and a balance speed, and determine a target garbage collection speed according to the target write speed. The microprocessor is further configured to perform one or more write operations in response to one or more write commands received from a host device in the first operation period according to the target write speed and perform at least one garbage collection operation according to the target garbage collection speed.

## Claims

### Claim 1

A memory controller, coupled to a host device and a flash memory device and configured to access the flash memory device, comprising:
a buffer memory, comprising at least a first cache memory and a second cache memory; and
a microprocessor, configured to control access of the flash memory device,
wherein the microprocessor is configured to obtain a number of spare blocks of the flash memory device corresponding to a first operation period, determine a write speed compensation value according to the number of spare blocks, determine a target write speed according to the write speed compensation value and a balance speed, and determine a target garbage collection speed according to the target write speed,
wherein the microprocessor is further configured to process one or more write commands received from the host device in the first operation period according to the target write speed and perform at least one garbage collection operation in the first operation period according to the target garbage collection speed.

### Claim 2 (depends on 1)

The memory controller as claimed in claim 1, wherein the microprocessor is further configured to configure a size of the first cache memory and a size of the second cache memory utilized in the first operation period according to the target write speed and the target garbage collection speed, wherein the first cache memory is utilized for buffering write data received from the host device to assist the microprocessor in executing the one or more write commands, and the second cache memory is utilized for assisting the microprocessor in performing the at least one garbage collection operation.

### Claim 3 (depends on 1)

The memory controller as claimed in claim 1, wherein the microprocessor is further configured to obtain the number of spare blocks of the flash memory device corresponding to a second operation period, re-determine the write speed compensation value according to the number of spare blocks, re-determine the target write speed according to the re-determined write speed compensation value and the balance speed, and re-determine the target garbage collection speed according to the re-determined target write speed, and wherein the microprocessor is further configured to process one or more write commands received from the host device in the second operation period according to the re-determined target write speed and perform the at least one garbage collection operation in the second operation period according to the re-determined target garbage collection speed.

### Claim 4 (depends on 3)

The memory controller as claimed in claim 3, wherein the target write speed determined in the first operation period and the target write speed re-determined in the second operation period are different.

### Claim 5 (depends on 3)

The memory controller as claimed in claim 3, wherein the target garbage collection speed determined in the first operation period and the target garbage collection speed re-determined in the second operation period are different.

### Claim 6 (depends on 1)

The memory controller as claimed in claim 1, wherein the balance speed is related to a read speed of the flash memory device.

### Claim 7 (depends on 1)

The memory controller as claimed in claim 1, wherein the balance speed is related to a write speed of the flash memory device.

### Claim 8

A data processing method for a data storage device comprising a memory device and a memory controller, wherein the memory device comprises a plurality of memory blocks and the memory blocks comprising a plurality of spare blocks, and the data processing method comprises:
obtaining a number of spare blocks corresponding to a first operation period;
determining a write speed compensation value according to the number of spare blocks;
determining a target write speed according to the write speed compensation value and a balance speed;
determining a target garbage collection speed according to the target write speed;
processing one or more write commands received from a host device in the first operation period according to the target write speed; and
performing at least one garbage collection operation in the first operation period according to the target garbage collection speed.

### Claim 9 (depends on 8)

The data processing method as claimed in claim 8, further comprising:
configuring a size of a first cache memory utilized in the first operation period according to the target write speed, wherein the first cache memory is utilized for buffering write data received from the host device to assist the memory controller in executing the one or more write commands; and
configuring a size of a second cache memory utilized in the first operation period according to the target garbage collection speed, wherein the second cache memory is utilized for assisting the memory controller in performing the at least one garbage collection operation.

### Claim 10 (depends on 8)

The data processing method as claimed in claim 8, further comprising:
obtaining the number of spare blocks corresponding to a second operation period;
re-determining the write speed compensation value according to the number of spare blocks;
re-determining the target write speed according to the re-determined write speed compensation value and the balance speed;
re-determining the target garbage collection speed according to the re-determined target write speed;
processing one or more write commands received from the host device in the second operation period according to the re-determined target write speed; and
performing the at least one garbage collection operation in the second operation period according to the re-determined target garbage collection speed.

### Claim 11 (depends on 10)

The data processing method as claimed in claim 10, wherein the target write speed determined in the first operation period and the re-determined target write speed re-determined in the second operation period are different.

### Claim 12 (depends on 10)

The data processing method as claimed in claim 10, wherein the target garbage collection speed determined in the first operation period and the re-determined target garbage collection speed re-determined in the second operation period are different.

### Claim 13 (depends on 8)

The data processing method as claimed in claim 8, wherein the balance speed is related to a read speed of the memory device.

### Claim 14 (depends on 8)

The data processing method as claimed in claim 8, wherein the balance speed is related to a write speed of the memory device.

### Claim 15

A data storage device, coupled to a host device, comprising:
a flash memory device, comprising a plurality memory blocks, wherein the memory blocks comprises a plurality of spare blocks; and
a memory controller, coupled to the flash memory device and configured to access the flash memory device, wherein the memory controller is configured to obtain a number of spare blocks corresponding to an operation period, determine a write speed compensation value according to the number of spare blocks, determine a target write speed according to the write speed compensation value and a balance speed, and determine a target garbage collection speed according to the target write speed,
wherein the memory controller is further configured to process one or more write commands received from the host device in the operation period according to the target write speed and perform at least one garbage collection operation in the operation period according to the target garbage collection speed.
