# US 2008/0313505 A1 · Flash memory wear-leveling

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

- Number: US 2008/0313505 A1
- Document ID: US20080313505A1
- Status: Published application
- Kind: A1
- Application number: 11/771,531
- Filed: 2007-06-29
- Published: 2008-12-18
- Earliest claimed: 2007-06-14
- Assignees: Samsung Electronics Co., Ltd.
- Inventors: Yang-Sup Lee; Chan-lk Park; Won-Moon Cheon
- Web page: https://patentgrep.com/patent/US20080313505A1

## CPC

- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 2212/1036: Life time enhancement
- G06F 2212/7211: Wear leveling
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A memory system and corresponding method of wear-leveling are provided, the system including a controller, a random access memory in signal communication with the controller, and another memory in signal communication with the controller, the other memory comprising a plurality of groups, each group comprising a plurality of first erase units or blocks and a plurality of second blocks, wherein the controller exchanges a first block from a group with a second block in response to at least one block erase count within the group; and the method including receiving a command having a logical address, converting the logical address into a logical block number, determining a group number for a group that includes the converted logical block number, and checking whether group information comprising block erase counts for the group is loaded into random access memory, and if not, loading the group information into random access memory.

## Claims

### Claim 1

A method of wear-leveling a memory device, the method comprising:
receiving a command having a logical address;
converting the logical address into a logical block number;
determining a group number for a group that includes the converted logical block number; and
checking whether group information comprising block erase counts for the group is loaded into random access memory (“RAM”), and if not, loading the group information into RAM.

### Claim 2 (depends on 1)

A method as defined in claim 1 wherein the command is a write command, further comprising checking whether a log block for the same logical block number already exists, and if so, copying write data to the associated log block.

### Claim 3 (depends on 1)

A method as defined in claim 1 wherein the command is a write command, further comprising:
checking if a free block is available, and if none are free, performing a merge operation to free a block; and
copying write data to the free block.

### Claim 4 (depends on 1)

A method as defined in claim 1, further comprising determining a physical block address corresponding to the logical block number.

### Claim 5 (depends on 1)

A method as defined in claim 1 wherein the command is a read command, further comprising:
reading a mapping table entry associated with requested data, and if it indicates that a log block contains the requested data, returning the requested data from the log block;
if the mapping table entry associated with the requested data indicates that the latest data is in the data block, reading the data block itself and returning the requested data from the data block.

### Claim 6 (depends on 1)

A method as defined in claim 1, further comprising:
checking whether the accumulated number of merge operations is greater than a predetermined number, and if so, calculating group erase counts, selecting a data block having a minimum block erase count from a group having a minimum group erase count, and swapping a free block having a maximum erase count with the selected data block.

### Claim 7 (depends on 6)

A method as defined in claim 6 wherein a group erase count is one of a minimum, maximum or average of all of the data block erase counts in the group.

### Claim 8 (depends on 1)

A method as defined in claim 1, further comprising:
checking whether the variance between an erase count for a free block and an erase count for a data block in a group is greater than a predetermined variance, and if so, swapping the free block with the data block.

### Claim 9 (depends on 8)

A method as defined in claim 8, further comprising calculating a group erase count whenever a free block is used.

### Claim 10 (depends on 8)

A method as defined in claim 8 wherein the erase count for the free block is a maximum erase count for all free blocks, and the erase count for the data block is a minimum erase count for all data blocks in the group.

### Claim 11 (depends on 10)

A method as defined in claim 10 wherein the erase count for the group is a minimum erase count for all groups.

### Claim 12 (depends on 1)

A method as defined in claim 1, the memory device comprising at least one of DRAM, PRAM, MRAM, FRAM, EEPROM, or Flash Memory.

### Claim 13

A method of wear-leveling a memory device, the method comprising:
dividing a first region of the device into a plurality of groups wherein each group comprises a plurality of erase units or blocks;
calculating a group erase count for each group in response to at least one block erase count from the group; and
replacing a block in one group in response to a comparison of the calculated group erase counts.

### Claim 14 (depends on 13)

A method as defined in claim 13 wherein the blocks interleaved among the plurality of groups.

### Claim 15 (depends on 13)

A method as defined in claim 13, further comprising performing a merge operation to free a block, wherein the step of replacing a block is performed when a number of merge operations reaches a threshold.

### Claim 16 (depends on 15)

A method as defined in claim 15 wherein the step of performing a merge operation is performed when there are no free blocks remaining.

### Claim 17 (depends on 13)

A method as defined in claim 13, further comprising defining a second region comprising free blocks within the memory.

### Claim 18 (depends on 13)

A method as defined in claim 13, further comprising accumulating a block erase count for at least one of said plurality of blocks in each group.

### Claim 19 (depends on 13)

A method as defined in claim 13 wherein replacing a block in one group comprises re-mapping a logical block number of the block to the physical address of a replacement block.

### Claim 20 (depends on 13)

A method as defined in claim 13 wherein calculating a group erase count comprises loading block erase count information for blocks of one group at a time into random access memory (“RAM”), and calculating a group erase count for the loaded group.

### Claim 21 (depends on 17)

A method as defined in claim 17 wherein the first region is a data region and the second region is a log or free region.

### Claim 22 (depends on 13)

A method as defined in claim 13, further comprising defining a reserved region within the memory for storing blocks reserved for replacing defective blocks.

### Claim 23 (depends on 13)

A method as defined in claim 13, further comprising defining a meta region within the memory for storing at least one of erase counts for all blocks or mapping information indicative of mapping blocks to physical block addresses.

### Claim 24 (depends on 17)

A method as defined in claim 17, further comprising:
defining a meta region within the memory; and
exchanging a block from the second region with a block from the meta region having a different block erase count.

### Claim 25 (depends on 13)

A method as defined in claim 13, further comprising reserving a spare area in each block for storing an erase count of the block.

### Claim 26 (depends on 13)

A method as defined in claim 13 wherein each block comprises a plurality of read/write units or pages.

### Claim 27 (depends on 13)

A method as defined in claim 13, further comprising accumulating a block erase count for each of said plurality of blocks in each group.

### Claim 28 (depends on 13)

A method as defined in claim 13 wherein said block erase count corresponds to the total number of erasures for a block.

### Claim 29 (depends on 13)

A method as defined in claim 13 wherein the calculated group erase count for a group is a minimum, maximum or average for all of the block erase counts in said group.

### Claim 30 (depends on 17)

A method as defined in claim 17, further comprising calculating a group erase count for each group, wherein exchanging a block from the second region with a block having a different block erase count is responsive to all of the calculated group erase counts.

### Claim 31

A memory system comprising:
a controller;
a random access memory (“RAM”) in signal communication with the controller; and
another memory in signal communication with the controller, the other memory comprising a plurality of groups, each group comprising a plurality of first erase units or blocks and a plurality of second blocks,
wherein the controller exchanges a first block from a group with a second block in response to at least one block erase count within the group.

### Claim 32 (depends on 31)

A system as defined in claim 31 wherein the RAM size is sufficient to store all block erase counts for one group at a time, but insufficient to store all block erase counts for all groups at once.

### Claim 33 (depends on 31)

A system as defined in claim 31 wherein the first blocks comprise data blocks and the second blocks comprise free blocks.

### Claim 34 (depends on 31)

A system as defined in claim 31 wherein the first blocks comprise meta blocks and the second blocks comprise free blocks.

### Claim 35 (depends on 31)

A system as defined in claim 31, the other memory further comprising blocks defining at least one of erase counts or physical address mapping information for the first blocks.

### Claim 36 (depends on 31)

A system as defined in claim 31, the first blocks each comprising a data portion and a spare portion, the spare portion for defining at least one of erase counts or physical address mapping information for the first blocks.

### Claim 37 (depends on 31)

A system as defined in claim 31 wherein the controller comprises program control steps stored in the other memory.

### Claim 38 (depends on 31)

A system as defined in claim 31, further comprising a read-only memory (“ROM”) in signal communication with the controller, wherein the controller comprises program control steps-stored in the ROM.

### Claim 39 (depends on 31)

A system as defined in claim 31 wherein the pluralities of first logical block numbers are arranged in an interleaved order among the groups.
