# US 2012/0254522 A1 · Method for giving read commands and reading data, and controller and storage system using the same

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

- Number: US 2012/0254522 A1
- Document ID: US20120254522A1
- Status: Published application
- Kind: A1
- Application number: 13/494,672
- Filed: 2012-06-12
- Published: 2012-10-04
- Earliest claimed: 2009-08-26
- Assignees: Phison Electronics Corp.
- Inventors: CHIH-KANG YEH
- Web page: https://patentgrep.com/patent/US20120254522A1

## CPC

- G06F 12/0862: with prefetch
- G06F 12/0866: for peripheral storage systems, e.g. disk cache
- G06F 2212/214: Solid state disk
- G06F 2212/6022: Using a prefetch buffer or dedicated prefetch cache
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for giving a read command to a flash memory chip to read data to be accessed by a host system is provided. The method includes receiving a host read command; determining whether the received host read command follows a last host read command; if yes, giving a cache read command to read data from the flash memory chip; and if no, giving a general read command and the cache read command to read data from the flash memory chip. Accordingly, the method can effectively reduce time needed for executing the host read commands by using the cache read command to combine the host read commands which access continuous physical addresses and pre-read data stored in a next physical address.

## Claims

### Claim 1

A method for giving a read command to a flash memory chip having a first buffer region, a second buffer region and a storage region, the method comprising:
receiving a host command from a host system by a flash memory controller having a buffer memory, wherein the host command is a host read command and the host command comprises a first logic address, wherein the first logic address maps to a first physical address of the storage region;
giving a general read command and a first cache read command to the flash memory chip by the flash memory controller according to the host command so as to sequentially read a first data starting from the first physical address, wherein the first data is moved from the storage region to the second buffer region, moved from the second buffer region to the first buffer region and transferred from the first buffer region to the buffer memory, a second data is moved from the storage region to the second buffer region during the first data is transferred from the first buffer region to the buffer memory and after the first data is transferred from the first buffer region to the buffer memory, the second data is moved from the second buffer region to the first buffer region, wherein the second data is not requested by the host command and a logic address corresponding to the second data follows the first logic address;
giving a second cache read command to the flash memory chip by the flash memory controller to read a third data, wherein the third data is moved from the storage region to the second buffer region during the second data is transferred from the first buffer region to the buffer memory and after the second data is transferred from the first buffer region to the buffer memory, the third data is moved from the second buffer region to the first buffer region;
receiving a next host command from the host system, wherein the next host command comprises a second logic address;
determining whether the next host command is the host read command and whether the next host command follows the host command; and
when the next host command is the host read command and the next host command follows the host command, transmitting the second data from the buffer memory to the host system.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
when the next host command is the host read command and the next host command does not follow the host command, giving a reset command to the flash memory chip and then giving the general read command and a third cache read command to the flash memory chip by the flash memory controller to sequentially read a fourth data, from the flash memory chip, corresponding to the next host command from a physical address mapping a fourth logic address.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
when the next host command is not the host read command, giving a reset command to the flash memory chip by the flash memory controller.

### Claim 4 (depends on 1)

The method of claim 1, wherein determining whether the next host command follows the host command comprises:
determining whether the second logic address follows the first logic address; and
if the second logic address follows the first logic address, determining that the next host command follows the host command.

### Claim 5 (depends on 1)

The method of claim 1, wherein determining whether the next host command follows the host command comprises:
determining whether the second logic address is the same as the logic address corresponding to the second data in the buffer memory; and
if the second logic address is the same as the logic address corresponding to the second data in the buffer memory, determining that the next host command follows the host command.

### Claim 6 (depends on 1)

The method of claim 1 further comprising determining whether a logic block mapping the first logic address is at an open-mother-son-block state before the second data, which is not requested by the host command, is read from the flash memory chip,
wherein only when the logic block mapping the first logic address is not at an open-mother-son-block state, the second data, which is not requested by the host command, is read from the flash memory chip.

### Claim 7

A flash memory controller for reading data to be accessed by a host system from a flash memory chip having a first buffer region, a second buffer region and a storage region, the flash memory controller comprising:
a microprocessor unit;
a flash memory interface unit coupled to the microprocessor unit and configured to connect to the flash memory chip;
a host interface unit coupled to the microprocessor unit and configured to connect to the host system;
a buffer memory coupled to the microprocessor unit; and
a memory management unit coupled to the microprocessor unit and configured to receive a host command from the host system, wherein the host command is a host read command and the host command comprises a first logic address, wherein the first logic address maps to a first physical address of the storage region;
wherein the memory management unit is further configured to, according to the host command, give a general read command and a first cache read command to the flash memory chip so as to sequentially read a first data starting from the first physical address, wherein the first data is moved from the storage region to the second buffer region, moved from the second buffer region to the first buffer region and transferred from the first buffer region to the buffer memory, a second data is moved from the storage region to the second buffer region during the first data is transferred from the first buffer region to the buffer memory and after the first data is transferred from the first buffer region to the buffer memory, the second data is moved from the second buffer region to the first buffer region, wherein the second data is not requested by the host command and a logic address corresponding to the second data follows the first logic address;
wherein the memory management unit is further configured to give a second cache read command to the flash memory chip to read a third data, wherein the third data is moved from the storage region to the second buffer region during the second data is transferred from the first buffer region to the buffer memory and after the second data is transferred from the first buffer region to the buffer memory, the third data is moved from the second buffer region to the first buffer region;
wherein the memory management unit is further configured to receive a next host command from the host system through the host interface unit, wherein the next host command comprises a second logic address;
wherein the memory management unit is further configured to determine whether the next host command is the host read command and whether the next host command follows the host command, and, when the next host command is the host read command and the next host command follows the host command, the memory management unit is configured to transmit the second data from the buffer memory to the host system.

### Claim 8 (depends on 7)

The flash memory controller of claim 7, wherein when the next host command is the host read command and the next host command does not follow the host command, the memory management unit gives a reset command to the flash memory chip and then gives the general read command and a third cache read command to the flash memory chip to sequentially read a fourth data, from the flash memory chip, corresponding to the next host command from a physical address mapping a fourth logic address.

### Claim 9 (depends on 7)

The flash memory controller of claim 7, wherein, when the next host command is not the host read command, the memory management unit is configured to give a reset command to the flash memory chip.

### Claim 10 (depends on 7)

The flash memory controller of claim 7, wherein the memory management unit is configured to determine whether the second logic address follows the first logic address,
wherein if the second logic address follows the first logic address, the memory management unit is configured to determine that the next host command follows the host command.

### Claim 11 (depends on 7)

The flash memory controller of claim 7, wherein the memory management unit is configured to determine whether the second logic address is the same as the logic address corresponding to the second data in the buffer memory,
wherein if the second logic address is the same as the logic address corresponding to the second data in the buffer memory, the memory management unit is configured to determine that the next host command follows the host command.

### Claim 12 (depends on 7)

The flash memory controller of claim 7, wherein the memory management unit is further configured to determine whether a logic block mapping the first logic address is at an open-mother-son-block state before the second data, which is not requested by the host command, is read from the flash memory chip,
wherein only when the logic block mapping the first logic address is not at an open-mother-son-block state, the second data, which is not requested by the host command, is read from the flash memory chip by the memory management unit.

### Claim 13

A flash memory storage system, comprising:
a connector coupled to a host system;
a flash memory chip having a first buffer region, a second buffer region and a storage region; and
a flash memory controller coupled to the connector and the flash memory chip and having a buffer memory,
wherein the flash memory controller is configured to receive a host command from the host system, wherein the host command is a host read command and the host command comprises a first logic address, wherein the first logic address maps to a first physical address of the storage region;
wherein the flash memory controller is further configured to, according to the host command, give a general read command and a first cache read command to the flash memory chip so as to sequentially read a first data starting from the first physical address, wherein the first data is moved from the storage region to the second buffer region, moved from the second buffer region to the first buffer region and transferred from the first buffer region to the buffer memory, a second data is moved from the storage region to the second buffer region during the first data is transferred from the first buffer region to the buffer memory and after the first data is transferred from the first buffer region to the buffer memory, the second data is moved from the second buffer region to the first buffer region, wherein the second data is not requested by the host command and a logic address corresponding to the second data follows the first logic address;
wherein the flash memory controller is further configured to give a second cache read command to the flash memory chip to read a third data, wherein the third data is moved from the storage region to the second buffer region during the second data is transferred from the first buffer region to the buffer memory and after the second data is transferred from the first buffer region to the buffer memory, the third data is moved from the second buffer region to the first buffer region;
wherein the flash memory controller is further configured to receive a next host command from the host system through the connector, wherein the next host command comprises a second logic address,
wherein the flash memory controller is further configured to determine whether the next host command is the host read command and whether the next host command follows the host command, and, when the next host command is the host read command and the next host command follows the host command, the flash memory controller is configured to transmit the second data from the buffer memory to the host system.

### Claim 14 (depends on 13)

The flash memory storage system of claim 13, wherein when the next host command is the host read command and the next host command does not follow the host command, the flash memory controller is configured to give a reset command to the flash memory chip and then give the general read command and a third cache read command to the flash memory chip to sequentially read a fourth data, from the flash memory chip, corresponding to the next host command from a physical address mapping a fourth logic address.

### Claim 15 (depends on 13)

The flash memory storage system of claim 13, wherein when the next host command is not the host read command, the flash memory controller is configured to give a reset command to the flash memory chip.

### Claim 16 (depends on 13)

The flash memory storage system of claim 13, wherein the flash memory controller is configured to determine whether the second logic address follows the first logic address,
wherein if the second logic address follows the first logic address, the flash memory controller is configured to determine that the next host command follows the host command.

### Claim 17 (depends on 13)

The flash memory storage system of claim 13, wherein the flash memory controller is configured to determine whether the second logic address is the same as the logic address corresponding to the second data in the buffer memory,
wherein if the second logic address is the same as the logic address corresponding to the second data in the buffer memory, the flash memory controller is configured to determine that the next host command follows the host command.

### Claim 18 (depends on 13)

The flash memory storage system of claim 13, wherein the flash memory controller is further configured to determine whether a logic block mapping the first logic address is at an open-mother-son-block state before the second data, which is not requested by the host command, is read from the flash memory chip,
wherein only when the logic block mapping the first logic address is not at an open-mother-son-block state, the second data, which is not requested by the host command, is read from the flash memory chip by the flash memory controller.
