A kind of the flash memory error-detecting method and device of dynamic adjustment
Technical field
It is more particularly to a kind of to be applied to bag the present invention relates to a kind of the flash memory error-detecting method and device of dynamic adjustment
The flash memory error-detecting method and device of the dynamic adjustment of the flash medias of Flash containing Nand.
Background technology
At present, Nand Flash are as non-volatile memory medium, from TF cards, SD card to SSD hard disks and various electronic equipments,
It is obtained for and is widely applied.The external packing forms of Nand Flash flash memories are pellet designs, have in each particle one or
Multiple Die, each Die is constituted by several pieces, and block is then made up of page, and several data cells, these data cells are included in page
1bit can be stored to several bit data according to design.Operationally, it is necessary to which first erasing could write, wipe using block as most
Subsection, write-in and reading are using page as least unit.There is the life-span in Nand Flash flash memories, weighing apparatus is used as using erasing/write cycle
Measure standard index.
The number of electrons that Nand Flash flash memories are existed in inherent shortcoming, the unit of data storage in itself can be over time
Change, after this change is accumulated to a certain extent, just occur that the change of reading state, the i.e. Bit value occur
Upset.Meanwhile, with the progress of processing technology, the processing procedure of Nand Flash particles further reduces, and also exacerbates the problem
Probability of happening.
In the processing of Bit turning problems, general processing mode is to add ECC check function.By the number in a page
According to several ECC cells are divided into, when the Bit numbers that the data in ECC cell are overturn are the error correcting capability scopes in ECC Engine
Interior, then the data in the ECC cell can ensure correctly.But Bit upset number can be over time growth and increase, with when
Between accumulate, the total number that Bit is overturn in ECC cell can exceed ECC Engine ability, so as to cause the data of whole ECC cell to be lost
Effect.Such case is present, such as certain historical record of data center in practical application, deposits and is situated between into Nand Flash
It can be only read after matter when consulting, without writing again.
To solve the problem of data of longer-term storage are possible to exceed ECC Engine ability, there is a kind of general processing method,
The controller that industry is referred to as inspection, i.e. memory according to the order of block, will be successively read each page in block, set a unification
ECC threshold values, during reading find more than threshold value page, data can be written in new page, due to passing through in reading process
In the error correction of ECC Engine, the then data re-write without ECC, it is to avoid occur that data are not repairable asks within this cycle
Topic.After the completion of a block is read, continue to perform same operation to next piece.
The content of the invention
Inspection technology is while the problem of solution, the problem of have also been introduced new.As shown in figure 1, in a product, its
It is fixed that ECC maximums, which can entangle value, represents the Bit numbers of maximum allowable error in an ECC cell.Existing inspection technology
In, ECC inspection threshold values are also a global value.But actual observation is found, in a block, different pages are in same period
Interior, its ECC amplification is different.Because ECC inspections thresholding is using global unified value, expression needs to consider most to dislike in a block
Bad page, it is ensured that in a polling period, its ECC amplification can entangle the difference of value and ECC inspection threshold values no more than ECC maximums
Value, and among this, ECC maximums can entangle value and polling period and be decided initial stage in design, then adjustable is ECC inspections door
Limit value.
Using unified ECC inspection threshold values, the worst page of situation is covered, but for the preferable page of ECC situations,
Then in the case where the page can entangle value also a very long time from ECC maximums, the page will be written over, wiping can be increased
Except/write cycle, this is the sacrifice to life of product.The situation of negligible amounts particularly in ill-conditioned page in block
Under, bigger are sacrificed to the aging effects of whole product.In this regard, particle characteristics can be based on, page is grouped, different groups are set
Fixed different ECC threshold values, it is hereby achieved that the lifting on the particle life-span.However, the source of the group technology is static feelings
Particle characteristics under condition, although have larger effect in terms of the extension particle life-span, but there is also problem in actual applications.
In actual application, the problem of there is the physical characteristic difference that cold and hot data band comes, as shown in Fig. 2 therefore, according to
Particle characteristics set changeless packet, it is impossible to which the life-span of particle is performed into maximum.
Adjusted the technical problem to be solved in the present invention is to provide a kind of life of product, the dynamic of lifting inspection operating efficiency of extending
Whole flash memory error-detecting method and device.
The technical solution adopted by the present invention is as follows:A kind of flash memory error-detecting method of dynamic adjustment, according to each in flash memory
The physical characteristic difference of page position, is divided into different groups, in reality by the page in a block according to the ECC speed differences increased
In the inspection operation of border, different ECC inspection threshold values are distributed according to the difference of the ECC growth rate of different page groups, ECC increases
The faster page, ECC inspection threshold values are lower, otherwise higher;During inspection is performed, the physics first inquired about where this page
Cold and hot subregion residing for position, the data volume that one's respective area writes using within the unit interval is used as foundation, write-in data volume more at most area
Domain is hotter, show that the coefficient of cold and hot subregion is adjusted to inspection threshold value.
Preferably, being according to the specific method of the specific inspection threshold value of coefficient adjustment of cold and hot subregion:Start inspection
Afterwards, the page on current task chain is read according to the prompting of timer, while result to be read is waited, looked into
The cold-hot condition of the page is ask, and thus obtains the coefficient of a cold and hot subregion, by the old ECC threshold values+cold and hot subregion
Coefficient obtains the new ECC threshold values for carrying out contrast operation.
Preferably, the computational methods of the cold and hot subregion coefficient are:Y=AX+B;Wherein Y is cold and hot subregion coefficient, and X is
The writing of unit interval, A and B are constant, and the A and B of same packet value are definite value, are obtained according to experiment.On A's and B
Value:According to actual experiment, the speed of ECC growths and the data volume of unit interval write-in are recorded, for example, ECC increasing value
Interval is [10,20], then takes value on the basis of median 15, then Y interval is that ECC increasing values interval subtracts a reference value, i.e., [- 5,
5], the data volume of write-in is interval if [0,1000], then is obtained according to the linear relationship of interval [- 5,5] and interval [0,1000]
Go out A and B value.
Preferably, methods described also includes, after the completion of the read operation of certain one page in some block, judge that the page is worked as
Whether preceding ECC value alreadys exceed the inspection thresholding of group where this page, no, then waits after a timing cycle, continues reading next
Individual page;It is then to write new data into the new page, and allows the ECC zeros in the new page in data.
Preferably, methods described also includes, while the ECC in by the new page in data is zeroed, by the block
It is interior, behind the page that was not read also, be not to wait for the timer of inspection, run through successively, during read operation is confirmed,
Still inspection threshold value corresponding with the group where this page is contrasted.
Preferably, methods described also includes, and after the completion of described piece is read, the first page of next piece of selection, inspection
Timer rework.
A kind of flash memory error detector element of dynamic adjustment, it is characterised in that including
Page grouping module, according to the physical characteristic of each page position in flash memory, the page in a block is increased according to ECC
Speed difference be divided into different groups;
Inspection threshold value distribute module, different ECC inspections are distributed according to the difference of the ECC growth rate of different page groups
Threshold value, ECC increases the faster page, and ECC inspection threshold values are lower, otherwise higher;
ECC threshold value adjusting modules, it is cold residing for the physical location first inquired about where this page during inspection is performed
Hot subregion, the data volume that one's respective area writes using within the unit interval draws the coefficient of cold and hot subregion to inspection threshold value as foundation
It is adjusted.
Preferably, also include,
Inspection thresholding exceeds judge module, after the completion of the read operation of certain one page in some block, judges that the page is current
Whether ECC value alreadys exceed the inspection thresholding of group where this page;
Beyond inspection threshold processing module, by beyond new data write the new page, and allow data in the new page
In ECC zero.
Preferably, also include, read operation module, will while the ECC in by the new page in data is zeroed
In the block, behind the page that was not read also, be not to wait for the timer of inspection, run through successively.
Compared with prior art, the beneficial effects of the invention are as follows:By dynamic adjustment, it can preferably meet the reality of particle
Border situation, on the premise of data reliability is ensured, it is ensured that the maximum realization of life of product.
Brief description of the drawings
Fig. 1 is ECC accumulated value schematic diagrames.
Fig. 2 is that cold and hot area ECC increases schematic diagram.
Fig. 3 is the inspection control flow schematic diagram with dynamic adjusted threshold of a wherein embodiment of the invention.
Fig. 4 is that the ECC thresholdings of a wherein embodiment of the invention dynamically adjust schematic diagram.
Fig. 5 is that the ECC of a wherein embodiment of the invention transfinites handling process schematic diagram.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples
The present invention is further elaborated.It should be appreciated that specific embodiment described herein is only to explain the present invention, not
For limiting the present invention.
This specification(Including any accessory claim, summary and accompanying drawing)Disclosed in any feature, except non-specifically is chatted
State, can alternative features equivalent by other or with similar purpose replaced.I.e., unless specifically stated otherwise, each feature
A simply example in a series of equivalent or similar characteristics.
Nand Flash flash memories are using page as read/write unit minimum in its operating process, several page of Page (128/
256/512) a block Block is constituted.Existing inspection scheme is successively read each page in block according to the order of block, with this
Determine whether that page occurs in that the situation more than ECC thresholdings.Due to the global unified ECC threshold values of use, many ECC situations
Preferable page can be also rewritten in the case where unifying threshold value more than this, waste a part of life-span.
The flash memory error-detecting method of dynamic adjustment as shown in Figure 3 and Figure 4, based on the actual situation of particle, according to sudden strain of a muscle
The physical characteristic difference of each page position in depositing, the page in a block is divided into according to the ECC speed differences increased different
Group, in actual inspection operation, different ECC inspection threshold values are distributed according to the difference of the ECC growth rate of different page groups,
ECC increases the faster page, and ECC inspection threshold values are lower, otherwise higher.
Need, according to the property difference of each page in block and specific technological means, each page in same piece to be divided into not
More easily there is the situation of Bit upsets in page in same group, group, then its corresponding ECC inspections threshold value is lower.
During inspection is performed, the cold and hot subregion residing for physical location first inquired about where this page, with the unit interval
The data volume of interior one's respective area write-in is as foundation, and write-in data volume more at most region is hotter, draws the coefficient of cold and hot subregion to patrolling
Inspection threshold value is adjusted.
It is according to the specific method of the specific inspection threshold value of the coefficient adjustment of cold and hot subregion:After startup inspection, according to
The prompting of timer is read to the page on current task chain, while result to be read is waited, inquires about the page
Cold-hot condition, and thus obtain the coefficient of a cold and hot subregion, the coefficient of the old ECC threshold values+cold and hot subregion obtained
New ECC threshold values for carrying out contrast operation.
Cold and hot subregion can select the physical region of unit-sized first, then to writing the data in the region in the unit interval
Total amount is counted.Unit interval write-in is more, then shows that the region is hotter.Meanwhile, the unit interval writing in region is also
The important sources of the cold and hot coefficient in the region, the feedback variable that the coefficient can be adjusted as ECC inspections thresholding.
Based on the packet that practical physical characteristics are made, in actual operating process, according to the page in cold and hot subregion
Physical location, each page is entered Mobile state adjustment, determine its this inspection threshold value.Adjusted by this dynamic, can
Preferably meet the actual conditions of particle, on the premise of data reliability is ensured, it is ensured that the maximum realization of life of product.
The computational methods of the cold and hot subregion coefficient are:Y=AX+B;Wherein Y is cold and hot subregion coefficient, and X is the unit time
Writing, A and B are constant, and the A and B of same packet value are definite value, are obtained according to experiment.Value on A and B:According to right
A certain packet actual experiment, records the speed of ECC growths and the data volume of unit interval write-in, for example, ECC increasing value area
Between be [10,20], then take value on the basis of median 15, then Y interval subtracts a reference value for ECC increasing values interval, i.e., [- 5,5],
The data volume of write-in is interval if [0,1000], then draws A according to the linear relationship of interval [- 5,5] and interval [0,1000]
With B value.By the establishment of relational expression, quick draw needs the cold and hot subregion coefficient of dynamic adjustment during facilitating inspection.When
Cold and hot subregion coefficient can also be so drawn by way of linear relationship is searched.
In prior art application, in the case of the overwhelming majority, the data of device interior, which update, has a ratio.We are false
Data provided with half can be updated always, and second half renewal frequency is extremely low.Because mapping relations are relatively fixed, so always
The region being updated is hot-zone, and remaining is cold-zone.After a phases-time, the erasing-programming number of times meeting of hot-zone
Higher than cold-zone, it is necessary to change mapping relations, the physical location in cold and hot area is exchanged., it is necessary to right in this phases-time
The inspection in cold and hot area sets different ECC threshold values.
Find after tested, under same environment temperature and erasing-programming number of times, the ECC growth rate of cold-zone substantially compare
Hot-zone is small, and concrete numerical value depends on each actual particle.Assuming that the data of half are cold-zone data, the ECC growth rate of cold-zone are
The 2/3 of hot-zone, then after adjusting, the time data memory of cold-zone is than 0.5 times of extension before adjustment;The time data memory of hot-zone is not
Become.Then on the whole, after adjustment, the life-span of disc can extend 0.5(Half capacity)*0.5(The longevity that half capacity is extended
Life)=0.25 times, obtain 25% life-span upgrading.
In general, Mobile state adjustment is entered, it is necessary to increase certain extra calculating operation, but because inspection process is rear
Platform timing is progressively carried out, and its frequency is relatively low, and the time is controllable, is that can quantify and less to the influence that whole system is brought.But from
The benefit that this programme is obtained is then significant, and therefore, the income of this programme is much larger than its cost of implementation.
In this specific embodiment, detection method also includes, and starts after inspection, first according to the sequential selection block of block, successively
Each page in selection block, when a read-write operation timer then after, by current page be sent to read operation perform structure enter
Row read operation, after the completion of reading, and the corresponding ECC inspections threshold value of group at this page of place is contrasted, and judges that the page is worked as
Whether preceding ECC value alreadys exceed the inspection thresholding of group where this page, below thresholding, then etc. timer to be inspected initiates next
The reading of the page, is waited after a timing cycle, continues to read next page;More than the thresholding of the group, then write new data into
The new page, and allow the ECC zeros in the new page in data.
After reading ECC and transfiniting, first the data of this page can be written in a new page, drawn due to have passed through ECC
The correction held up, the then data that Bit upsets occur in the page have been repaired, that is, the data for writing new page are no Bit upsets
's.
In by the new page while ECC zeros in data, by the block, behind the page that was not read also
Face, is not to wait for the timer of inspection, runs through successively, still corresponding with the group where this page during read operation is confirmed
Inspection threshold value contrasted, until by whole block travel through complete, in this process, the page that the ECC of discovery transfinites also can
The same operating procedure is carried out, i.e., after ECC Engine error correction, writes new page, all generation Bit data overturn are corrected
Come over.
After the completion of described piece is read, i.e., after the completion of all pages of the block are traversed, startup next time of waiting timer,
The first page of next piece of selection, the timer of inspection is reworked.
Read after the situation that ECC transfinites, all pages in this block can all be read one time.Due to the page in a block
Between influence each other larger, in this case, it is found that the probability that other pages in this block ECC equally occur and transfinited can also increase
Plus.Therefore, the efficiency of inspection operation is also improved.