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 physical blocks, and the physical blocks are at least grouped into a data area, a spare area and a temporary area, the wear leveling method comprising:
- recording a plurality of erased physical blocks in an erased block table based on an erased sequence of the erased physical blocks, wherein the erased physical blocks are recorded without a weight mark or with the weight mark;
when a target physical block is about to be selected from the spare area, judging whether the target physical block is used for the data area or the temporary area;
selecting a physical block with the weight mark and being primarily erased among the physical blocks of the spare area to be the target physical block based on the erased sequence in the erased block table when the target physical block is used for the data area;
selecting a physical block without the weight mark and being lastly erased within the spare area to be the target physical block based on the erased sequence in the erased block table when the target physical block is used for the temporary area; and
performing a wear leveling procedure.
2 Assignments
0 Petitions
Accused Products
Abstract
A wear leveling method for non-volatile memory is provided, by which the non-volatile memory is substantially divided into a plurality of blocks and the blocks are grouped into a data area and a spare area. The method includes selecting a block based on an erased sequence when getting the block from the spare area. The method also includes performing a wear leveling procedure.
13 Citations
23 Claims
-
1. A wear leveling method for a non-volatile memory, wherein the non-volatile memory is substantially divided into a plurality of physical blocks, and the physical blocks are at least grouped into a data area, a spare area and a temporary area, the wear leveling method comprising:
-
recording a plurality of erased physical blocks in an erased block table based on an erased sequence of the erased physical blocks, wherein the erased physical blocks are recorded without a weight mark or with the weight mark; when a target physical block is about to be selected from the spare area, judging whether the target physical block is used for the data area or the temporary area; selecting a physical block with the weight mark and being primarily erased among the physical blocks of the spare area to be the target physical block based on the erased sequence in the erased block table when the target physical block is used for the data area; selecting a physical block without the weight mark and being lastly erased within the spare area to be the target physical block based on the erased sequence in the erased block table when the target physical block is used for the temporary area; and performing a wear leveling procedure. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A controller, for a storage device, wherein a non-volatile memory of the storage device is substantially divided into a plurality of physical blocks, and the physical blocks are at least grouped into a data area and a spare 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 records a plurality of erased physical blocks in an erased block table based on the erased sequence of the erased physical blocks, wherein the erased physical blocks are recorded without a weight mark or with the weight mark, wherein when a target physical block is about to be selected from the spare area, the memory management module judges whether the target physical block is used for the data area or the temporary area, wherein the memory management module selects a physical block with the weight mark and being primarily erased among the physical blocks of the spare area to be the target physical block based on the erased sequence in the erased block table when the target physical block is used for the data area, wherein the memory management module selects a physical block without the weight mark and being lastly erased among the physical blocks of the spare area to be the target physical block based on the erased sequence in the erased block table when the target physical block is used for the temporary area, wherein the memory management module exchanges the physical block in the spare area with a physical block in the data area. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23)
-
Specification