CN1937077B - Multi-state management method for data in flash-memory medium - Google Patents
Multi-state management method for data in flash-memory medium Download PDFInfo
- Publication number
- CN1937077B CN1937077B CN2005100375357A CN200510037535A CN1937077B CN 1937077 B CN1937077 B CN 1937077B CN 2005100375357 A CN2005100375357 A CN 2005100375357A CN 200510037535 A CN200510037535 A CN 200510037535A CN 1937077 B CN1937077 B CN 1937077B
- Authority
- CN
- China
- Prior art keywords
- data
- status indication
- data block
- flash
- state
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000007726 management method Methods 0.000 title claims description 16
- 230000008859 change Effects 0.000 claims abstract description 10
- 238000012795 verification Methods 0.000 claims description 4
- 238000000034 method Methods 0.000 abstract description 4
- 238000011065 in-situ storage Methods 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 6
- 238000006243 chemical reaction Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000003446 memory effect Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
Images
Landscapes
- Read Only Memory (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Status indication is setup for data block in media of flash memory. The status indication is denoted by byte variable. Digit of the status indication is defined based on number of status of data. Indication of initial status of data block is setup as number with most of bit 1. Then, status change in each time, number of bit 1 in indication is reduced. When data in flash memory are changed in multimode, the disclosed method can rewrite indication in situ without need of moving data block so as to raise efficiency for storing data in flash memory.
Description
Technical field
The present invention relates to the semiconductor storage field, relate in particular to the multi-state management method for data in a kind of flash media.
Background technology
Flash memory (Flash Memory) with regard to its essence, belongs to EEPROM (electrically erasable programmable ROM) type.Flash media commonly used has two kinds of nand flash and nor flash, and they are divided into storage space the erase block of a plurality of specific sizes, as 16KB, 64KB etc.; Disposable position with an erase block all is changed to " 1 " when carrying out erase operation, " 1 " of single position can be written as " 0 " when carrying out write operation, but " 0 " cannot be write as " 1 "; So common write the flash memory action and will wipe the original content of whole erase block earlier, write new data again; The erasing times of flash media is limited, and same maximum erasing times is about 100,000 times to 1,000,000 times.
On data writing operation, what nand flash and nor flash were different is, nand flash is divided into erase block the page or leaf of a plurality of fixed sizes, typical example is to be that the erase block of 16KB is divided into 32 pages or leaves with size, every page of data storage area that 512B YTE is arranged, and the redundant area of every page of additional one 16 byte, because there is the situation of " bit flipping " in nandflash in the read-write process, so nand flash generates the ECC check code simultaneously and leaves redundant area in when writing a whole page data, utilize this check code to carry out verification during reading of data simultaneously at every turn.
System in order to realize functions such as power loss recovery, logic sector mapping, can add a status indication to the data block of logical partitioning usually when using flash media storage data, when the data block state changes, rewrite this mark.
If tag content arbitrarily is provided with, because flash media can only be write put in place " 0 " by position " 1 " to the write operation of local data, rewrite mark and may make current data block invalid, even the wiping of monoblock, make overall system efficiency descend.
System can be divided into data less data block usually when using flash media storage data, when the modification of management data block, deletion, can change the state of data block, as effective, invalid, idle, revise, deleting etc.; For example to delete a data block, will the status indication of this data block is invalid from effectively being rewritten as.If it is improper that status indication is provided with, write " 1 " from " 0 " again, read-write characteristics according to flash memory, can not rewrite in the original place, whole data block is rewritten to other blank position, or writes new status indication again after wiping whole, these two kinds of methods have all been carried out unnecessary erase operation, reduce the speed of system, also reduced the serviceable life of flash memory.
Summary of the invention
Technical matters to be solved by this invention is to provide the multi-state management method for data in a kind of flash media, and it makes flash data when the multimode conversion, can rewrite mark in the original place, does not need to move data block, has improved the storage efficiency of flash data.
For solving the problems of the technologies described above, the technical solution adopted in the present invention is: the multi-state management method for data in a kind of flash media is provided, data block in the described flash media is provided with status indication, this status indication is represented by the byte variable, the figure place of this status indication determines what according to the state of data, and the initial state mark of data block is set to the maximum numeral in position 1, and later on each state changes, then reducing the position " 1 " in the mark, is 0 up to status indication; For represent being embodied in of status indication with binary digit: change status indication 11111111 into 11111110, when data block is idle, then change status indication 11111110 into 11111100, when data block is revised, then change status indication 11111100 into 11111000, when data block is deleted, then change status indication 11111000 into 11110000, by that analogy, be 0 up to status indication.
The invention has the beneficial effects as follows: because the initial state mark of multi-state management method for data data block in the flash media of the present invention is set to the maximum numeral in position 1, later on each state changes, then reduce the position " 1 " in the mark, thereby make flash data when the multimode conversion, can rewrite mark in the original place, do not need to move data block, thereby improved the storage efficiency of flash data.
Description of drawings
Fig. 1 is the synoptic diagram of the status indication of data block on the nor flash.
Fig. 2 is the synoptic diagram of the status indication of data block on the nand flash.
Fig. 3 is the synoptic diagram of status indication conversion.
Embodiment
Multi-state management method for data in the flash media of the present invention comprises: what determine the figure place of status indication according to the state of data, but byte 9 kinds of states of mark at most; From full position " 1 ", one " 1 " of each conversion minimizing is up to being " 0 " entirely with the tag content of different conditions.Thereby make flash data when the multimode conversion, can rewrite mark, do not need to move data block, therefore improved the storage efficiency of flash data in the original place.
For nor flash; it is after data block is wiped; write operation can be carried out in the optional position in data block; write " 0 " by " 1 "; so its data block mark can be placed on the optional position; usually can logically mark off the notion of " sector ", as each sector-size 512 byte, the sector status indication follows closely after sector data.Fig. 1 is the synoptic diagram of the status indication of data block on the nor flash, and flag is exactly a status indication, and length can define arbitrarily.
For nand flash, owing to will use the ECC verification, a page or leaf wants write once intact, so the data block status indication will be placed on the retention position of redundant area, usually the redundant area size is 16 bytes, and preceding 8 bytes are used as purposes such as ECC verification, bad piece mark, and back 8 bytes keep, can self-definedly use, we just are placed on status indication here.Fig. 2 is the synoptic diagram of the status indication of data block on the nand flash, and flag is a status indication, and length is no more than 8 bytes.
Because the write operation of flash memory can only be write " 0 " from " 1 ", so the initial state that we can data block is set to the maximum numeral in position 1, later on each state changes, and reduces " 1 " in the mark, up to being " 0 " entirely.Like this, just can rewrite when rewriting mark at every turn, not need extra erase operation, improve the whole efficiency of system in the original place.
Illustrate, status indication represents that with the byte variable original state is 0xff, succeeding state is represented with 0xfe, 0xfc, 0xf8,0xf0,0xe0,0xc0,0x80,0x00 respectively, when rewriting status indication like this, all be to write " 0 ", just can rewrite in the original place from " 1 ".Rewriting process synoptic diagram such as Fig. 3 represent status indication with binary digit among the figure.
Certainly,, also can represent status indication, so just can represent more state with the multibyte variable if data mode is too much; Also can be more after a little while at state, status indication does not use some numerical value in the middle of the byte variable, represents three state as only using 0x0f, 0x0c, 0x00; More or, each state is rewritten the position difference of " 1 " of reducing, as reducing by one " 1 " from 0xff, just can be with following numerical value alternative 0xfe:0xfd, 0xfb, 0xf7,0xef, 0xdf, 0xbf, 0x7f.
Claims (8)
1. the multi-state management method for data in the flash media, data block in the described flash media is provided with status indication, it is characterized in that: this status indication is represented by the byte variable, how many figure places of this status indication is determined according to the state of data, the initial state mark of data block is set to position 1 maximum numeral, later on each state changes, and then reduces the position " 1 " in the mark, is 0 up to status indication; For represent being embodied in of status indication with binary digit: change status indication 11111111 into 11111110, when data block is idle, then change status indication 11111110 into 11111100, when data block is revised, then change status indication 11111100 into 11111000, when data block is deleted, then change status indication 11111000 into 11110000, by that analogy, be 0 up to status indication.
2. the multi-state management method for data in the flash media as claimed in claim 1 is characterized in that: for nand flash, the data block status indication is placed on the redundant area.
3. the multi-state management method for data in the flash media as claimed in claim 2 is characterized in that: this redundant area size is 16 bytes, and preceding 8 bytes are as ECC verification, bad piece mark, and back 8 bytes are as the status indication of data block.
4. the multi-state management method for data in the flash media as claimed in claim 1 is characterized in that: for nor flash, the data block status indication can be placed on the optional position.
5. the multi-state management method for data in the flash media as claimed in claim 4 is characterized in that: the length for the status indication of data block on the nor flash can define arbitrarily.
6. the multi-state management method for data in the flash media as claimed in claim 1, it is characterized in that: if the state of data is no more than 9 kinds, then status indication can be represented with the byte variable, if the state of data surpasses 9 kinds, then represents status indication with the multibyte variable.
7. the multi-state management method for data in the flash media as claimed in claim 6 is characterized in that: if the state of data is less, then status indication does not use some middle numerical value of byte variable.
8. the multi-state management method for data in the flash media as claimed in claim 6 is characterized in that: the position difference of " 1 " in the mark that each state reduces when rewriting.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2005100375357A CN1937077B (en) | 2005-09-22 | 2005-09-22 | Multi-state management method for data in flash-memory medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2005100375357A CN1937077B (en) | 2005-09-22 | 2005-09-22 | Multi-state management method for data in flash-memory medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1937077A CN1937077A (en) | 2007-03-28 |
CN1937077B true CN1937077B (en) | 2011-03-23 |
Family
ID=37954520
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2005100375357A Expired - Fee Related CN1937077B (en) | 2005-09-22 | 2005-09-22 | Multi-state management method for data in flash-memory medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1937077B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101625889B (en) * | 2009-07-29 | 2013-09-18 | 深圳国微技术有限公司 | Memory with redefined pins and protection method thereof |
WO2013078676A1 (en) * | 2011-12-02 | 2013-06-06 | 华为技术有限公司 | Method and device for detecting nand flash page |
CN112347002B (en) * | 2020-11-13 | 2023-07-28 | 杭州芯炬视人工智能科技有限公司 | flash data storage method, system, computer equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5966720A (en) * | 1992-02-20 | 1999-10-12 | Fujitsu Limited | Flash memory accessed using only the logical address |
CN1645516A (en) * | 2004-01-19 | 2005-07-27 | 三星电子株式会社 | Data recovery apparatus and method used for flash memory |
-
2005
- 2005-09-22 CN CN2005100375357A patent/CN1937077B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5966720A (en) * | 1992-02-20 | 1999-10-12 | Fujitsu Limited | Flash memory accessed using only the logical address |
CN1645516A (en) * | 2004-01-19 | 2005-07-27 | 三星电子株式会社 | Data recovery apparatus and method used for flash memory |
Also Published As
Publication number | Publication date |
---|---|
CN1937077A (en) | 2007-03-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102043727B (en) | Method and device for recovering solid-state hard disc mapping table | |
CN101493794B (en) | Flash memory data processing method and device | |
CN100356347C (en) | Safety writing method for flash memory | |
JP4751163B2 (en) | Memory system | |
CN101320594B (en) | Physical operation method of flash memory chip | |
US8214578B2 (en) | Method of storing data into flash memory according to usage patterns of addresses and data storage system using the same | |
CN100580811C (en) | Dirty block recovery method for flash memory device | |
CN101634967B (en) | Block management method for flash memory, storage system and controller | |
US20100082878A1 (en) | Memory controller, nonvolatile storage device, nonvolatile storage system, and data writing method | |
CN104750625A (en) | Data storage device and flash memory control method | |
CN104063186A (en) | Data access method of electronic equipment | |
CN101436158A (en) | Parameter management method and system based on embedded type equipment flash memory | |
CN104317671A (en) | Power-down data storage and recovery algorithm prolonging service life of non-volatile memory | |
CN109147849A (en) | Data storage device and non-volatile memory operation method | |
CN101667157A (en) | Flash memory data transmission method, flash memory storage system and controller | |
CN1937077B (en) | Multi-state management method for data in flash-memory medium | |
CN100465910C (en) | Method for error protecting and error correcting of flash memory data in products | |
CN112882649A (en) | Data storage device and non-volatile memory control method | |
CN103885889A (en) | Data storage method and system based on NOR FLASH | |
TWI435216B (en) | Method for performing meta block management, and associated memory device and controller thereof | |
CN102521146B (en) | Data addressing storage method of flash memory block subdivision | |
CN101526922B (en) | Flash data access method and device thereof | |
CN101425334A (en) | Method for implementing NOR FLASH bad block management and control circuit thereof | |
CN201156432Y (en) | Control circuit implementing NOR FLASH bad block management | |
CN101887750A (en) | Method for storing dynamic data by using Flash memory |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20110323 Termination date: 20180922 |
|
CF01 | Termination of patent right due to non-payment of annual fee |