Summary of the invention
In view of this, the purpose of the present invention is to provide a kind of three-dimensional flash memory erasing control method and its systems, it is intended to solve
The problem of certainly frequent erasing operation is by the serious curtailment chip service life in the prior art.
The present invention proposes a kind of three-dimensional flash memory erasing control method, which comprises
Issue the solicited message for updating logical page number (LPN);
Corresponding logical block number (LBN) and block bias internal page number are calculated according to the solicited message;
By searching for the mapping table of logical block to physical block, the entrance physical block number of physical block chain is obtained;
Judge the organizational form of the physical block chain;
Data write-in or erasing reclaimer operation are carried out to physical block according to the organizational form of the physical block chain.
Preferably, the organizational form of the physical block chain includes the organizational form of the first physical block chain, if it is determined that institute
The organizational form for stating physical block chain is the organizational form of the first physical block chain, then the group according to the physical block chain
Knitting the step of form carries out data write-in or erasing reclaimer operation to physical block includes:
Check whether the offset Physical Page of first physical block on the physical block chain is idle, if not idle,
Each physical block is sequentially searched backward along the physical block chain, is idle physical block until finding offset Physical Page,
And it writes data into idle physical block in offset Physical Page;
If the offset Physical Page of all physical blocks has data in the physical block chain, into the physical block chain
New free physical block is added, and is write data into new free physical block in offset Physical Page;
If being wiped according to the present situation of chip existing physical block without the space new physical block of sub-distribution again
Reclaimer operation.
Preferably, the organizational form of the physical block chain further includes the organizational form of second of physical block chain, with described
The physical block chain that the organizational form of two kinds of physical block chains carries out tissue includes basic block and multiple replacement blocks, wherein if
Judge the organizational form of the physical block chain for the organizational form of second of physical block chain, then it is described according to the physical block
The step of organizational form of chain carries out data write-in or erasing reclaimer operation to physical block further include:
Check whether the offset Physical Page in the basic block on the physical block chain is idle;
If idle, write data into offset Physical Page idle in the basic block;
If not idle, whether each Physical Page that each replacement block is sequentially searched in the multiple replacement block is available free
Page;
If available free page, write data into that replacement block with free physical page, and marks Physical Page corresponding
Logical page (LPAGE) be offset;
If judging whether the length of the physical block chain is less than preset value without free page;
If it is less than the preset value, then new free physical block is added into the physical block chain, and write data into
In first Physical Page in the free physical block;
If being not less than the preset value, erasing reclaimer operation is carried out to the physical block chain according to corresponding information, and
Convert organizational form.
Preferably, if it is described without the space new physical block of sub-distribution again, according to the present situation of chip to existing object
Managing the step of block carries out erasing reclaimer operation includes:
Other physical block chains are found in the chips, and calculate respective free page proportion in these physical block chains;
Select the highest physical block chain of free page proportion as new physical block chain, by the significant figure in original physical block chain
It is carried out in the new physical block chain of tissue according to copying to the organizational form of second of physical block chain, and to original physical block
Chain carries out erasing reclaimer operation.
Preferably, if described be not less than the preset value, the physical block chain is wiped according to corresponding information
Reclaimer operation, and the step of converting organizational form includes:
Obtain the previous data carried out in the physical block chain of tissue with the organizational form of second of physical block chain
The ratio of read operation number and data access total degree;
When the ratio is greater than 1/2, after carrying out erasing reclaimer operation to the physical block chain, the new physical block chain of establishment
Tissue will be carried out with the organizational form of the first physical block chain, and the valid data in original physical block chain are copied into establishment
New physical block chain in;
When the ratio is not more than 1/2, after carrying out erasing reclaimer operation to the physical block chain, the new physical block of establishment
Chain will carry out tissue with the organizational form of second of physical block chain, and the valid data in original physical block chain are copied to group
In the new physical block chain built.
On the other hand, the present invention also provides a kind of three-dimensional flash memories to wipe control system, and the identifying system includes:
Request module, for issuing the solicited message for updating logical page number (LPN);
Computing module, for calculating corresponding logical block number (LBN) and block bias internal page number according to the solicited message;
Mapping block obtains the entrance physical block of physical block chain for the mapping table by searching for logical block to physical block
Number;
Judgment module, for judging the organizational form of the physical block chain;
Processing module carries out data write-in to physical block for the organizational form according to the physical block chain or wipes back
It brings drill to an end work.
Preferably, the organizational form of the physical block chain includes the organizational form of the first physical block chain, if described sentence
Disconnected module judges the organizational form of the organizational form of the physical block chain the first physical block chain for described in, then the processing module
It is specifically used for:
Check whether the offset Physical Page of first physical block on the physical block chain is idle, if not idle,
Each physical block is sequentially searched backward along the physical block chain, is idle physical block until finding offset Physical Page,
And it writes data into idle physical block in offset Physical Page;
If the offset Physical Page of all physical blocks has data in the physical block chain, into the physical block chain
New free physical block is added, and is write data into new free physical block in offset Physical Page;
If being wiped according to the present situation of chip existing physical block without the space new physical block of sub-distribution again
Reclaimer operation.
Preferably, the organizational form of the physical block chain further includes the organizational form of second of physical block chain, with described
The physical block chain that the organizational form of two kinds of physical block chains carries out tissue includes basic block and multiple replacement blocks, wherein if
The judgment module judge the organizational form of the physical block chain for the organizational form of second of physical block chain, then the place
Reason module is specifically also used to:
Check whether the offset Physical Page in the basic block on the physical block chain is idle;
If idle, write data into offset Physical Page idle in the basic block;
If not idle, whether each Physical Page that each replacement block is sequentially searched in the multiple replacement block is available free
Page;
If available free page, write data into that replacement block with free physical page, and marks Physical Page corresponding
Logical page (LPAGE) be offset;
If judging whether the length of the physical block chain is less than preset value without free page;
If it is less than the preset value, then new free physical block is added into the physical block chain, and write data into
In first Physical Page in the free physical block;
If being not less than the preset value, erasing reclaimer operation is carried out to the physical block chain according to corresponding information, and
Convert organizational form.
Preferably, the processing module is specifically also used to:
Other physical block chains are found in the chips, and calculate respective free page proportion in these physical block chains;
Select the highest physical block chain of free page proportion as new physical block chain, by the significant figure in original physical block chain
It is carried out in the new physical block chain of tissue according to copying to the organizational form of second of physical block chain, and to original physical block
Chain carries out erasing reclaimer operation.
Preferably, the processing module is specifically also used to:
Obtain the previous data carried out in the physical block chain of tissue with the organizational form of second of physical block chain
The ratio of read operation number and data access total degree;
When the ratio is greater than 1/2, after carrying out erasing reclaimer operation to the physical block chain, the new physical block chain of establishment
Tissue will be carried out with the organizational form of the first physical block chain, and the valid data in original physical block chain are copied into establishment
New physical block chain in;
When the ratio is not more than 1/2, after carrying out erasing reclaimer operation to the physical block chain, the new physical block of establishment
Chain will carry out tissue with the organizational form of second of physical block chain, and the valid data in original physical block chain are copied to group
In the new physical block chain built.
Technical solution provided by the invention is directed to different data operating characteristics, constructs different physical block chain logical organization shapes
Formula extends the service life of chip to reduce the response time wiped physical block chain and recycled, while by improving erasing recycling
Strategy selects more suitable physical block chain and carries out erasing operation, to extend the bulk life time of chip.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
The specific embodiment of the invention provides a kind of three-dimensional flash memory erasing control method, and the method mainly includes as follows
Step:
S1, the solicited message for updating logical page number (LPN) is issued;
S2, corresponding logical block number (LBN) and block bias internal page number are calculated according to the solicited message;
S3, by searching for the mapping table of logical block to physical block, obtain the entrance physical block number of physical block chain;
S4, the organizational form for judging the physical block chain;
S5, data write-in or erasing reclaimer operation are carried out to physical block according to the organizational form of the physical block chain.
A kind of three-dimensional flash memory erasing control method provided by the invention is directed to different data operating characteristics, constructs different objects
Block chain logical organization form is managed, to reduce the response time wiped physical block chain and recycled, extends the service life of chip, simultaneously
Take-back strategy is wiped by improving, more suitable physical block chain is selected and carries out erasing operation, to extend the whole longevity of chip
Life.
A kind of three-dimensional flash memory erasing control method provided by the present invention will be described in detail below.
Referring to Fig. 1, wiping control method flow chart for three-dimensional flash memory in an embodiment of the present invention.
In step sl, the solicited message for updating logical page number (LPN) is issued.
In the present embodiment, it is issued from the operating system of chip to storage management system and updates log_page logic
The solicited message of page.
In step s 2, corresponding logical block number (LBN) and block bias internal page number are calculated according to the solicited message.
In the present embodiment, storage management system calculates corresponding logical block number (LBN) log_ according to the solicited message
Block and block bias internal page number offset.
In step s3, by searching for the mapping table of logical block to physical block, the entrance physical block number of physical block chain is obtained.
In the present embodiment, storage management system obtains physics by searching for the mapping table of logical block to physical block
The entrance physical block number of block chain.
In step s 4, judge the organizational form of the physical block chain.
In the present embodiment, in such a way that two kinds of physical block chain organizational forms coexist, enable what operating system provided to patrol
Collecting page number is log_page, and each physical block possesses page_per_block Physical Page, then the corresponding logical block of the logical page (LPAGE)
It number is log_block=log_page/page_per_block, physical page offset position in block is offset=log_
Page%page_per_block.
In the present embodiment, both physical block chain organizational forms include the organizational form and of the first physical block chain
The organizational form of two kinds of physical block chains.
Wherein, the organizational form of the first physical block chain are as follows: search logical block number (LBN) according to log_block and arrive physical block number
Mapping table, obtains the entrance physical block number of the corresponding physical block chain of logical page (LPAGE) of request, and operating system request to logic number
The operation data of log_page is merely stored in physical block chain on the offset Physical Page of each physical block, if necessary to right
The logical page data is updated, then is needed in next physical block of the physical block where its latest data, offset
Page is updated.
The organizational form of second of physical block chain are as follows: physical block chain is divided into it is " basic block " and multiple " replacement block ",
In, first physical block of physical block chain, i.e. entrance physical block are " basic block ", other blocks in block chain are " replacement thereafter
Block ";For " basic block ", still according to the organizational form of the first physical block chain, for logical page number (LPN) patrolling for log_page
The data in page are collected, are merely stored in (log_page%page_per_block) Physical Page in " basic block ", and for
Multiple " replacement blocks " request the update of logical page (LPAGE), will be successive according to request time, are written in multiple " replacement blocks " in order
Physical Page in.Meanwhile in order to guarantee to have compared with fast-response time the form block chain, it is specified that can only include in each physical block chain
4 " replacement block ", when " replacement block " is updated without space, then erasing reclaimer operation is carried out to physical block chain, and according to right
Read operation proportion is in the corresponding logical block of physical block chain come the object that determines whether to be translated into the first organizational form
Manage block chain.
In step s 5, data write-in is carried out to physical block according to the organizational form of the physical block chain or erasing is recycled
Operation.
In the present embodiment, if step S4 judges the organizational form of the physical block chain for the first described physical block
The organizational form of chain, then the organizational form according to the physical block chain carries out data write-in to physical block or erasing is recycled
The step S5 of operation includes:
Check whether the offset Physical Page of first physical block on the physical block chain is idle, if not idle,
Each physical block is sequentially searched backward along the physical block chain, is idle physical block until finding offset Physical Page,
And it writes data into idle physical block in offset Physical Page;
If the offset Physical Page of all physical blocks has data in the physical block chain, into the physical block chain
New free physical block is added, and is write data into new free physical block in offset Physical Page;
If being wiped according to the present situation of chip existing physical block without the space new physical block of sub-distribution again
Reclaimer operation.
In the present embodiment, if it is described without the space new physical block of sub-distribution again, according to the present situation pair of chip
Existing physical block carries out the step of erasing reclaimer operation and includes:
Other physical block chains are found in the chips, and calculate respective free page proportion in these physical block chains;
Select the highest physical block chain of free page proportion as new physical block chain, by the significant figure in original physical block chain
It is carried out in the new physical block chain of tissue according to copying to the organizational form of second of physical block chain, and to original physical block
Chain carries out erasing reclaimer operation.
Above-mentioned steps are to carry out the physical block chain of tissue with the organizational form of the first physical block chain to encounter insufficient space feelings
Free physical block is distributed to the physical block chain that request updates by the erasing take-back strategy taken when condition.
In the present embodiment, if step S4 judges the organizational form of the physical block chain for second of physical block
The organizational form of chain, then the organizational form according to the physical block chain carries out data write-in to physical block or erasing is recycled
The step S5 of operation further include:
Check whether the offset Physical Page in the basic block on the physical block chain is idle;
If idle, write data into offset Physical Page idle in the basic block;
If not idle, whether each Physical Page that each replacement block is sequentially searched in the multiple replacement block is available free
Page;
If available free page, write data into that replacement block with free physical page, and marks Physical Page corresponding
Logical page (LPAGE) be offset;
If judging whether the length of the physical block chain is less than preset value without free page;
If it is less than the preset value, then new free physical block is added into the physical block chain, and write data into
In first Physical Page in the free physical block;
If being not less than the preset value, erasing reclaimer operation is carried out to the physical block chain according to corresponding information, and
Convert organizational form.
In the present embodiment, if described be not less than the preset value, according to corresponding information to the physical block chain
Erasing reclaimer operation is carried out, and the step of converting organizational form specifically includes:
Obtain the previous data carried out in the physical block chain of tissue with the organizational form of second of physical block chain
The ratio of read operation number and data access total degree;
When the ratio is greater than 1/2, after carrying out erasing reclaimer operation to the physical block chain, the new physical block chain of establishment
Tissue will be carried out with the organizational form of the first physical block chain, and the valid data in original physical block chain are copied into establishment
New physical block chain in;
When the ratio is not more than 1/2, after carrying out erasing reclaimer operation to the physical block chain, the new physical block of establishment
Chain will carry out tissue with the organizational form of second of physical block chain, and the valid data in original physical block chain are copied to group
In the new physical block chain built.
In the present embodiment, the first physical block chain organizational form is for the data for frequently reading a certain logical address
Situation and design, using the first physical block chain organizational form, counterlogic page recent renewal data institute can be quickly found out
Physical location, ensure that shorter access delay.Second of physical block chain organizational form is frequent for a certain logical page (LPAGE)
More news and design, using second of physical block chain organizational form, the logical page (LPAGE) that frequent updating can be effectively prevented is accounted for
With a large amount of physical block, so that physical block chain is too long, and the data of actual storage are less, and existing in physical block chain is not made largely
The case where Physical Page, occurs;And when carrying out erasing operation, due to too long physical block chain, on the one hand reduce the delay of access
On the other hand time can shorten the service life of chip.
In the present embodiment, in terms of wiping reclaimer operation, method of the invention is more flexible, by certain condition
Under, the physical block chain of two kinds of organizational forms is mutually converted, the efficiency for reading data has both been ensure that, has been also prevented from physical block chain
Too long the problem of causing update data delay time longer and the shortening in chip service life, occurs, and improves the globality of system
Energy.
A kind of three-dimensional flash memory provided by the invention wipes control method, uses two kinds of physical blocks in the tissue of physical block chain
Chain organizational form takes corresponding data access and storage strategy respectively, ensure that shorter read operation delay time and data
The delay time of update;On the strategy of erasing recycling physical block chain, the present invention is by accounting in physical block chain free physical page
The statistics of ratio, and the statistics of ratio is always operated to physical block chain read operation Zhan, it makes two kinds of form physical block chains and is wiping
Except the condition mutually converted in reclaimer operation, guarantees that physical block chain had both been able to satisfy frequent read operation, be also able to satisfy and patrol specific
The requirement that volume page frequently updates operation improves the performance of system so as to shorten system response time.That is, for not
Same data manipulation features construct different physical block chain logical organization forms, thus what reduction was wiped physical block chain and recycled
Response time extends the service life of chip, while by improving erasing take-back strategy, selecting more suitable physical block chain and being wiped
Except operation, to extend the bulk life time of chip.
The specific embodiment of the invention also provides a kind of three-dimensional flash memory erasing control system 10, specifically includes that
Request module 11, for issuing the solicited message for updating logical page number (LPN);
Computing module 12, for calculating corresponding logical block number (LBN) and block bias internal page number according to the solicited message;
Mapping block 13 obtains the entrance physics of physical block chain for the mapping table by searching for logical block to physical block
Block number;
Judgment module 14, for judging the organizational form of the physical block chain;
Processing module 15, for carrying out data write-in or erasing to physical block according to the organizational form of the physical block chain
Reclaimer operation.
A kind of three-dimensional flash memory erasing control system 10 provided by the invention is directed to different data operating characteristics, constructs different
Physical block chain logical organization form extends the service life of chip, together to reduce the response time wiped physical block chain and recycled
When by improving erasing take-back strategy, select more suitable physical block chain and carry out erasing operation, to extend the entirety of chip
Service life.
Referring to Fig. 2, showing the structural schematic diagram of three-dimensional flash memory erasing control system 10 in an embodiment of the present invention.
In the present embodiment, three-dimensional flash memory erasing control system 10 mainly includes request module 11, computing module 12, mapping block
13, judgment module 14 and processing module 15.
Request module 11, for issuing the solicited message for updating logical page number (LPN).
Computing module 12, for calculating corresponding logical block number (LBN) and block bias internal page number according to the solicited message.
Mapping block 13 obtains the entrance physics of physical block chain for the mapping table by searching for logical block to physical block
Block number.
Judgment module 14, for judging the organizational form of the physical block chain.
Processing module 15, for carrying out data write-in or erasing to physical block according to the organizational form of the physical block chain
Reclaimer operation.
In the present embodiment, the organizational form of the physical block chain includes the organizational form of the first physical block chain, such as
Judgment module 14 described in fruit judges the organizational form of the organizational form of the physical block chain the first physical block chain for described in, then institute
Processing module 15 is stated to be specifically used for:
Check whether the offset Physical Page of first physical block on the physical block chain is idle, if not idle,
Each physical block is sequentially searched backward along the physical block chain, is idle physical block until finding offset Physical Page,
And it writes data into idle physical block in offset Physical Page;
If the offset Physical Page of all physical blocks has data in the physical block chain, into the physical block chain
New free physical block is added, and is write data into new free physical block in offset Physical Page;
If being wiped according to the present situation of chip existing physical block without the space new physical block of sub-distribution again
Reclaimer operation.
In the present embodiment, the processing module 15 is specifically also used to:
Other physical block chains are found in the chips, and calculate respective free page proportion in these physical block chains;
Select the highest physical block chain of free page proportion as new physical block chain, by the significant figure in original physical block chain
It is carried out in the new physical block chain of tissue according to copying to the organizational form of second of physical block chain, and to original physical block
Chain carries out erasing reclaimer operation.
In the present embodiment, the organizational form of the physical block chain further includes the organizational form of second of physical block chain,
It include basic block and multiple replacement blocks with the physical block chain that the organizational form of second of physical block chain carries out tissue,
In, if the judgment module 14 judges the organizational form of the physical block chain for the tissue shape of second of physical block chain
Formula, then the processing module 15 is specifically also used to:
Check whether the offset Physical Page in the basic block on the physical block chain is idle;
If idle, write data into offset Physical Page idle in the basic block;
If not idle, whether each Physical Page that each replacement block is sequentially searched in the multiple replacement block is available free
Page;
If available free page, write data into that replacement block with free physical page, and marks Physical Page corresponding
Logical page (LPAGE) be offset;
If judging whether the length of the physical block chain is less than preset value without free page;
If it is less than the preset value, then new free physical block is added into the physical block chain, and write data into
In first Physical Page in the free physical block;
If being not less than the preset value, erasing reclaimer operation is carried out to the physical block chain according to corresponding information, and
Convert organizational form.
In the present embodiment, the processing module 15 is specifically also used to:
Obtain the previous data carried out in the physical block chain of tissue with the organizational form of second of physical block chain
The ratio of read operation number and data access total degree;
When the ratio is greater than 1/2, after carrying out erasing reclaimer operation to the physical block chain, the new physical block chain of establishment
Tissue will be carried out with the organizational form of the first physical block chain, and the valid data in original physical block chain are copied into establishment
New physical block chain in;
When the ratio is not more than 1/2, after carrying out erasing reclaimer operation to the physical block chain, the new physical block of establishment
Chain will carry out tissue with the organizational form of second of physical block chain, and the valid data in original physical block chain are copied to group
In the new physical block chain built.
A kind of three-dimensional flash memory provided by the invention wipes control system 10, uses two kinds of physics in the tissue of physical block chain
Block chain organizational form takes corresponding data access and storage strategy respectively, ensure that shorter read operation delay time sum number
According to the delay time of update;On the strategy of erasing recycling physical block chain, the present invention is by accounting for physical block chain to free physical page
The statistics of middle ratio, and the statistics of ratio is always operated to physical block chain read operation Zhan, it makes two kinds of form physical block chains and exists
The condition mutually converted in erasing reclaimer operation guarantees that physical block chain had both been able to satisfy frequent read operation, is also able to satisfy to specific
Logical page (LPAGE) frequently updates operation, so as to shorten system response time, the performance of height-adjusting system.That is, the present invention provides
A kind of three-dimensional flash memory erasing control system 10 be directed to different data operating characteristics, construct different physical block chain logical organization shapes
Formula extends the service life of chip to reduce the response time wiped physical block chain and recycled, while by improving erasing recycling
Strategy selects more suitable physical block chain and carries out erasing operation, to extend the bulk life time of chip.
It is worth noting that, included each unit is only divided according to the functional logic in above-described embodiment,
But it is not limited to the above division, as long as corresponding functions can be realized;In addition, the specific name of each functional unit
It is only for convenience of distinguishing each other, the protection scope being not intended to restrict the invention.
In addition, those of ordinary skill in the art will appreciate that realizing all or part of the steps in the various embodiments described above method
It is that relevant hardware can be instructed to complete by program, corresponding program can store to be situated between in a computer-readable storage
In matter, the storage medium, such as ROM/RAM, disk or CD.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within mind and principle.