# US 2019/0171559 A1 · Method for accessing flash module, associated flash controller and electronic device

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

- Number: US 2019/0171559 A1
- Document ID: US20190171559A1
- Status: Published application
- Kind: A1
- Application number: 16/011,616
- Filed: 2018-06-18
- Published: 2019-06-06
- Earliest claimed: 2017-12-05
- Assignees: Silicon Motion, Inc.
- Applicants: Silicon Motion Inc.
- Inventors: Jie-Hao Lee; Hsuan-Ping Lin
- Web page: https://patentgrep.com/patent/US20190171559A1

## CPC

- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 12/0253: {Garbage collection, i.e. reclamation of unreferenced memory}
- G06F 12/0292: {using tables or multilevel address translation means (G06F12/023 takes precedence; address translation in virtual memory systems G06F12/10)}
- G06F 12/1009: using page tables, e.g. page table structures
- G06F 2212/1044: Space efficiency improvement
- G06F 2212/7201: Logical to physical mapping or translation of blocks or pages
- G06F 2212/7205: Cleaning, compaction, garbage collection, erase control
- G06F 2212/7207: management of metadata or control data
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present invention provides a method for accessing a flash module, wherein the method includes: creating a logical address group table corresponding to a block of the flash module, wherein the logical address group table records states of a plurality of logical address groups, and the state of each logical address group represents if data written into the block has any logical address within the logical address group; when the block is under a garbage collection operation, referring to the logical address group table to read at least one logical address to physical address (L2P) mapping table; and determining valid pages and invalid pages within the block according to the L2P table, for performing the garbage collection operation.

## Claims

### Claim 1

A method for accessing a flash module, comprising:
creating a logical address group table corresponding to a block of the flash module, wherein the logical address group table records states of a plurality of logical address groups, and the state of each logical address group represents whether data written into the block has any logical address located in the logical address group;
when the block is under a garbage collection operation, referring to the logical address group table to read at least one logical address to physical address (L2P) mapping table from the flash module; and
determining valid pages and invalid pages within the block according to the at least one L2P mapping table, for performing the garbage collection operation.

### Claim 2 (depends on 1)

The method of claim 1, wherein the step of creating the logical address group table corresponding to the block comprises:
writing the data into the block, and creating a physical address to logical address (P2L) mapping table which comprises a plurality of successive physical addresses and corresponding logic addresses in the block; and
creating the logical address group table according to the P2L mapping table.

### Claim 3 (depends on 2)

The method of claim 2, wherein the logical address group table indicates the state of the logical address group with a bit, and each of two digital values of the bit indicates whether the P2L mapping table records any logical address located in the logical address group.

### Claim 4 (depends on 2)

The method of claim 2, further comprising:
deleting the P2L mapping table after the logical address group table is created.

### Claim 5 (depends on 4)

The method of claim 4, wherein the P2L mapping table is not stored into the flash module.

### Claim 6 (depends on 4)

The method of claim 4, further comprising:
writing the logical address group table into the flash module.

### Claim 7 (depends on 1)

The method of claim 1, wherein each logical address group comprises a logical address range, and the logical address range is equal to a range of an L2P mapping table stored in the flash module.

### Claim 8 (depends on 7)

The method of claim 7, wherein the step of referring to the logical address group table to read at least one L2P mapping table from the flash module comprises:
referring to the logical address group table to determine at least one specific logical address group, wherein the state of the at least one specific logical address group indicates that data written into the block has a logical address located in the logical address group; and
reading the at least one L2P mapping table corresponding to the at least one specific logical address group from the flash module, without reading any other L2P mapping tables.

### Claim 9 (depends on 1)

The method of claim 1, wherein the step of determining the valid pages and the invalid pages within the block according to the at least one L2P mapping table comprises:
based on a specific logical address comprised by the block and the at least one L2P mapping table, determining whether a corresponding physical address of the specific logical address in the at least one L2P mapping table is identical to that of the specific logical address in the block;
when a determination result indicates that the two physical addresses are identical, determining pages in the block that have the physical address as valid pages; and
when the determination result indicates that the two physical addresses are not identical, determining pages in the block that have the physical address to be invalid pages.

### Claim 10

A flash controller, arranged to access a flash module, and the flash controller comprising:
a read only memory (ROM), arranged to store a code;
a microprocessor, arranged to execute the code to control the access of the flash module; and
a memory, arranged to store a logical address group table corresponding to a block in the flash module, wherein the logical address group table marks states of a plurality of logical address groups, and the state of each of the logical address groups indicates whether data written into the block has any logical address located in the logical address group;
wherein when the block requires a garbage collection operation, the microprocessor refers to the logical address group table to read at least one logical address to physical address (L2P) mapping table from the flash module, and refers to the at least one L2P mapping table to determine valid pages and invalid pages in the block, for performing the garbage collection operation.

### Claim 11 (depends on 10)

The flash controller of claim 10, wherein the microprocessor creates a physical address to logical address (P2L) mapping table while writing the data into the block, wherein the P2L mapping table comprises a plurality of successive physical addresses and corresponding logical addresses in the block; and the microprocessor creates the logical address group table according to the P2L mapping table.

### Claim 12 (depends on 11)

The flash controller of claim 11, wherein the logical address group table indicates the state of the logical address group with a bit, and each of two digital values of the bit indicates whether the P2L mapping table records any logical address located in the logical address group.

### Claim 13 (depends on 11)

The flash controller of claim 11, wherein after the logical address group table is created, the microprocessor deletes the P2L mapping table.

### Claim 14 (depends on 13)

The flash controller of claim 13, wherein the microprocessor does not store the P2L mapping table into the flash module.

### Claim 15 (depends on 13)

The flash controller of claim 13, wherein the microprocessor further writes the logical address group table into the flash module.

### Claim 16 (depends on 10)

The flash controller of claim 10, wherein each logical address group comprises a logical address range, and the logical address range is equal to a range of an L2P mapping table stored in the flash module.

### Claim 17 (depends on 16)

The flash controller of claim 16, wherein the microprocessor refers to the logical address group table in order to determine at least one specific logical address group, and the state of the at least one specific logical address group indicates whether data written into the block has any logical address located in the logical address group; and the microprocessor reads the at least one L2P mapping table corresponding to the at least one specific logical address group from the flash module, without reading any other L2P mapping tables.

### Claim 18 (depends on 10)

The flash controller of claim 10, wherein based on a specific logical address commonly comprised by the block and the at least one L2P mapping table, the microprocessor determines whether a corresponding physical address of the specific logical address in the at least one L2P mapping table is identical to that of the specific logical address in the block; if a determination result indicates that the two physical addresses are identical, determining pages in the block that have the physical address to be valid pages; and if the determination result indicates that the two physical addresses are not identical, determining pages in the block that have the physical address to be invalid pages.

### Claim 19

An electronic device, comprising:
a flash module; and
a flash controller, arranged to access the flash module, wherein the flash controller creates a logical address group table corresponding to a block in the flash module;
wherein the logical address group table marks states of a plurality of logical address groups, and the state of each of the logical address groups indicates whether data written into the block has any logical address located in the logical address group; and when the block requires a garbage collection operation, the flash controller refers to the logical address group table to read at least one L2P mapping table from the flash module, and refers to the at least one L2P mapping table to determine valid pages and invalid pages in the block, for performing the garbage collection operation.

### Claim 20 (depends on 19)

The electronic device of claim 19, wherein the flash controller deletes the P2L mapping table after the logical address group table is created; and the P2L mapping table is not stored into the flash module.
