Data writing method for non-volatile memory and controller using the same
First Claim
1. A data writing method for a non-volatile memory, comprising:
- respectively using a plurality of blocks belonging to a substitution area of the non-volatile memory for substituting a plurality of blocks belonging to a data area of the non-volatile memory to building a plurality of mother-child blocks sets, wherein each of the mother-child blocks sets includes one block belonging to the data area and one block belonging to the substitution area, and the blocks belonging to the substitution area are selected from a spare area of the non-volatile memory;
using a plurality of temporary blocks of the non-volatile memory as a temporary area for the plurality of mother-child blocks sets, wherein each of the temporary blocks does not independently belong to any one of the mother-child blocks sets,receiving new data to be written into the blocks belonging to the data area;
determining whether the new data to be written is in a random mode;
writing the new data into the blocks belonging to the substitution area if the new data to be written is not in the random mode; and
writing the new data into the temporary blocks belonging to the temporary area if the new data to be written is in the random mode.
1 Assignment
0 Petitions
Accused Products
Abstract
A data writing method for a non-volatile memory is provided, wherein the non-volatile memory includes a data area and a spare area. In the data writing method, a plurality of blocks in a substitution area of the non-volatile memory is respectively used for substituting a plurality of blocks in the data area, wherein data to be written into the blocks in the data area is written into the blocks in the substitution area, and the blocks in the substitution area are selected from the spare area of the non-volatile memory. A plurality of temporary blocks of the non-volatile memory is used as a temporary area of the blocks in the substitution area, wherein the temporary area is used for temporarily storing the data to be written into the blocks in the substitution area.
-
Citations
12 Claims
-
1. A data writing method for a non-volatile memory, comprising:
-
respectively using a plurality of blocks belonging to a substitution area of the non-volatile memory for substituting a plurality of blocks belonging to a data area of the non-volatile memory to building a plurality of mother-child blocks sets, wherein each of the mother-child blocks sets includes one block belonging to the data area and one block belonging to the substitution area, and the blocks belonging to the substitution area are selected from a spare area of the non-volatile memory; using a plurality of temporary blocks of the non-volatile memory as a temporary area for the plurality of mother-child blocks sets, wherein each of the temporary blocks does not independently belong to any one of the mother-child blocks sets, receiving new data to be written into the blocks belonging to the data area; determining whether the new data to be written is in a random mode; writing the new data into the blocks belonging to the substitution area if the new data to be written is not in the random mode; and writing the new data into the temporary blocks belonging to the temporary area if the new data to be written is in the random mode. - View Dependent Claims (2, 3, 4, 5, 6, 10)
-
-
7. A controller, comprising:
-
a microprocessor unit, for controlling the operation of the controller; a non-volatile memory interface, electrically connected to the microprocessor unit and used for accessing the non-volatile memory; a buffer memory, electrically connected to the microprocessor unit and used for temporarily storing data; and a memory management module, electrically connected to the microprocessor unit and used for managing the non-volatile memory, wherein the memory management module respectively uses a plurality of blocks belonging to a substitution area of the non-volatile memory for substituting a plurality of blocks belonging to a data area of the non-volatile memory to building a plurality of mother-child blocks sets, wherein each of the mother-child blocks sets includes one block belonging to the data area and one block belonging to the substitution area, and the blocks belonging to the substitution area are selected from a spare area of the non-volatile memory, and wherein the memory management module uses a plurality of temporary blocks of the non-volatile memory as a temporary area for the plurality of mother-child blocks sets, wherein each of the temporary blocks does not independently belong to any one of the mother-child blocks sets, wherein the memory management module receives new data to be written into the blocks belonging to the data area, and the memory management module further determines whether the new data to be written is in a random mode, wherein the memory management module writes the new data into the blocks belonging to the substitution area if the new data to be written is not in the random mode, and wherein the memory management module writes the new data into the temporary blocks belonging to the temporary area if the new data to be written is in the random mode. - View Dependent Claims (8, 9, 11, 12)
-
Specification