Wear leveling method and controller using the same
First Claim
Patent Images
1. A wear leveling method for a non-volatile memory, wherein the non-volatile memory is substantially divided into a plurality of blocks, and the blocks are grouped into at least a data area, a spare area, a substitute area, and a temporary area, the wear leveling method comprising:
- (a) determining the blocks to be selected from the spare area is used for the substitute area or the temporary area;
(b) selecting the blocks from the spare area according to a result determined by the step (a), wherein the blocks in the substitute area used for substituting blocks in the data area and the blocks in the temporary area used for storing data of small quantity; and
(c) executing a wear leveling procedure,wherein step (b) comprises;
determining a hot area in the spare area in order to identify at least one block having relatively higher erase count in the spare area; and
when a first block is selected from the spare area to be used in the substitute area, moving the first block to the substitute area if the erase count of the first block is lower than or equal to the sum of the erase count of the block in the hot area and a first threshold, and moving one of the at least one block in the hot area to the substitute area and identifying the first block as a block in the hot area if the erase count of the first block is greater than the sum of the erase count of the block in the hot area and the first threshold.
1 Assignment
0 Petitions
Accused Products
Abstract
A wear leveling method for a non-volatile memory is provided. The non-volatile memory is substantially divided into a plurality of blocks, and these blocks are grouped into at least a data area, a spare area, a substitute area, and a temporary area. The wear leveling method includes selecting blocks from the spare area according to different purposes and executing a wear leveling procedure.
49 Citations
45 Claims
-
1. A wear leveling method for a non-volatile memory, wherein the non-volatile memory is substantially divided into a plurality of blocks, and the blocks are grouped into at least a data area, a spare area, a substitute area, and a temporary area, the wear leveling method comprising:
-
(a) determining the blocks to be selected from the spare area is used for the substitute area or the temporary area; (b) selecting the blocks from the spare area according to a result determined by the step (a), wherein the blocks in the substitute area used for substituting blocks in the data area and the blocks in the temporary area used for storing data of small quantity; and (c) executing a wear leveling procedure, wherein step (b) comprises; determining a hot area in the spare area in order to identify at least one block having relatively higher erase count in the spare area; and when a first block is selected from the spare area to be used in the substitute area, moving the first block to the substitute area if the erase count of the first block is lower than or equal to the sum of the erase count of the block in the hot area and a first threshold, and moving one of the at least one block in the hot area to the substitute area and identifying the first block as a block in the hot area if the erase count of the first block is greater than the sum of the erase count of the block in the hot area and the first threshold. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
-
15. A controller, suitable for a storage device, wherein a non-volatile memory of the storage device is substantially divided into a plurality of blocks, and the blocks are grouped into at least a data area, a spare area, a substitute area, and a temporary area, the controller comprising:
-
a microprocessor unit is configured for controlling a whole operation of the controller; a buffer memory is electrically connected to the microprocessor unit and configured for temporarily storing data; a non-volatile memory interface is electrically connected to the microprocessor unit and configured for accessing the non-volatile memory; and a memory management module is electrically connected to the microprocessor unit and configured for managing the non-volatile memory, wherein the memory management module determines the blocks to be selected from the spare area is used for the substitute area or the temporary area, selects the blocks from the spare area according to a determined result and exchanges a block in the spare area with a block in the data area, wherein the blocks in the substitute area used for substituting blocks in the data area and the blocks in the temporary area used for storing data of small quantity, wherein the memory management module further determines a hot area in the spare area in order to identify at least one block having relatively higher erase count in the spare area, and when a first block is selected from the spare area to be used in the substitute area, the memory management module moves the first block to the substitute area if the erase count of the first block is lower than or equal to the sum of the erase count of the block in the hot area and a first threshold, and the memory management module moves one of the at least one block in the hot area to the substitute area and identifying the first block as a block in the hot area if the erase count of the first block is greater than the sum of the erase count of the block in the hot area and the first threshold. - View Dependent Claims (16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29)
-
-
30. A wear leveling method for a non-volatile memory, wherein the non-volatile memory is substantially divided into a plurality of blocks, and the blocks are grouped into at least a data area, a spare area, and a substitute area, the wear leveling method comprising
(a) determining a hot area in the spare area in order to identify at least one block having relatively higher erase count in the spare area; -
(b) selecting a first block from the spare area to be used in the substitute area by using the sum of the erase count of the block in the hot area and a first threshold as a selection condition; and (c) executing a wear leveling procedure, wherein the wear leveling procedure comprises moving one of the at least one block in the hot area to the data area, and at the same time, moving a third block in the data area to the spare area and identifying the third block as a block in the hot area, wherein the third block is a block having relatively lower erase count in the data area. - View Dependent Claims (31, 32, 33, 34)
-
-
35. A controller, suitable for a storage device, wherein a non-volatile memory of the storage device is substantially divided into a plurality of blocks, and the blocks are grouped into at least a data area, a spare area, and a substitute area, the controller comprising:
-
a microprocessor unit is configured for controlling a whole operation of the controller; a buffer memory is electrically connected to the microprocessor unit and configured for temporarily storing data; a non-volatile memory interface is electrically connected to the microprocessor unit and configured for accessing the non-volatile memory; and a memory management module is electrically connected to the microprocessor unit and configured for managing the non-volatile memory, wherein the memory management module determines a hot area in the spare area in order to identify at least one block having relatively higher erase count in the spare area, selects a first block from the spare area to be used in the substitute area by using the sum of the erase count of the block in the hot area and a first threshold as a selection condition, and exchanges a block in the spare area with a block in the data area. - View Dependent Claims (36, 37, 38, 39, 40)
-
-
41. A wear leveling method for a non-volatile memory, wherein the non-volatile memory is substantially divided into a plurality of blocks, and the blocks are grouped into at least a data area, a spare area, and a substitute area, the wear leveling method comprising:
-
(a) determining a hot area in the spare area in order to identify at least one block having relatively higher erase count in the spare area; (b) selecting a first block from the spare area to be used in the substitute area; (c) using the comparison between the erase count of the hot area and a predetermined value as a counting condition; and (d) executing a wear leveling procedure when a counting value is greater than a third threshold, wherein the counting condition comprises; adding 1 to the counting value when the erase count of the block in the hot area is greater than the sum of the predetermined value and a second threshold. - View Dependent Claims (42, 43, 44, 45)
-
Specification