CN101794254B - NAND-FLASH data processing method - Google Patents

NAND-FLASH data processing method Download PDF

Info

Publication number
CN101794254B
CN101794254B CN2009101098805A CN200910109880A CN101794254B CN 101794254 B CN101794254 B CN 101794254B CN 2009101098805 A CN2009101098805 A CN 2009101098805A CN 200910109880 A CN200910109880 A CN 200910109880A CN 101794254 B CN101794254 B CN 101794254B
Authority
CN
China
Prior art keywords
user data
fdt
physical address
fat
data update
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.)
Active
Application number
CN2009101098805A
Other languages
Chinese (zh)
Other versions
CN101794254A (en
Inventor
罗胜
李发生
张彦伟
成晓华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen SiliconGo Semiconductor Co., Ltd.
Original Assignee
SHENZHEN SILICONGO SEMICONDUCTOR CO Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by SHENZHEN SILICONGO SEMICONDUCTOR CO Ltd filed Critical SHENZHEN SILICONGO SEMICONDUCTOR CO Ltd
Priority to CN2009101098805A priority Critical patent/CN101794254B/en
Publication of CN101794254A publication Critical patent/CN101794254A/en
Application granted granted Critical
Publication of CN101794254B publication Critical patent/CN101794254B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides an NAND-FLASH data processing method, which belongs to the technical field of semiconductor storage media. The method comprises the following steps of: applying for an empty block according to a mapping table of logic addresses and physical addresses for user data update operation; storing the physical address and an operation environment of the empty block when the user data update operation is interrupted by an FAT (File Allocation Table) or an FDT (File Description Table); updating the FAT or the FDT; recording a mapping relationship of the FAT or the FDT; invoking the physical address and the operation environment of the empty block when the user data update operation is interrupted; and continuing the data update operation. After the user data update operation is interrupted, the physical address and the operation environment of the empty block are recorded; and after the update of a file system is finished, the continuing operation of user data is realized by invoking the physical address and the operation environment of the empty block, thereby reducing FLASH abrasion and enhancing FLASH data copying speed.

Description

The data processing method of NAND FLASH
Technical field
The present invention relates to the semiconductor storage medium technical field, more particularly, relate to the data processing method of a kind of NAND FLASH.
Background technology
NAND FLASH (nonvolatile memory; The least unit of wiping the abbreviation flash memory) is piece (Block); The least unit that writes is page or leaf (Page); All user data write operations need to carry out based on an empty piece, carry out in the piece that promptly all write operations are not programmed after needing in FLASH, to be wiped free of.If will in one, write data with the Data Update in this piece according to logical address A, its flow process is roughly following:
At first, find an empty piece, the copying data in the page or leaf more than the old middle A address is arrived empty piece; For example, the corresponding page or leaf in A address is the 20th page in the piece of data if will write, then earlier with the 0th~19 page copying data in new piece;
The data that will write then, are written to page or leaf corresponding in the sky piece;
At last, other copying datas of old are arrived the relevant position of empty piece.
At present, in its file system, write one piece of data, at first want frequent its system file of modification based on NAND FLASH; For example; The FAT file system is wanted copied files, must upgrade FAT table, FDT table, at last updating user data; And User Data Length is generally longer, needs some pages of ability ccontaining.So in data writing process, the renewal of the frequent interruption of user data of file system, and insert the renewal operation of FAT table with the FDT table.At this moment, need to finish the operation of current block, and FAT table and FDT table are upgraded operation, the FAT table is consistent with the renewal operating process and the above-mentioned Data Update operating process of FDT table, promptly need repeat the step of above-mentioned user data update.After FAT and FDT have upgraded; When user data continues down to write; Must repeat above-mentioned data writing process again; Be written to data and the new piece of copying data to of the above page or leaf of logical address in the piece when being about to data interruption, will not write then be written to logical address corresponding page in, copy other data in old then.The wearing and tearing of the not only consuming time and FLASH of whole process but also big, special file number more for a long time, FAT, that FDT revises ratio is just higher, causes FLASH copied files speed slow excessively.
Summary of the invention
Fundamental purpose of the present invention is to the prior art defective data processing method of a kind of NAND FLASH to be provided, and is intended to reduce the wearing and tearing of FLASH, improves the document copying speed of FLASH.
The data processing method of NAND FLASH of the present invention may further comprise the steps:
According to logical address and the empty piece of physical address mapping table application, carry out the user data update operation;
When user data update is operated by FAT table or FDT table renewal interruption, the physical address and the operating environment of preserving empty piece;
Upgrade FAT table or FDT table, the mapping relations of record FAT table or FDT table;
The physical address and the operating environment of calling and obtaining user Data Update operation disruption space-time piece continue the user data update operation; Said operating environment comprises piece, loop variable, the state machine state that logical address is corresponding.
Preferably, said when user data update operation is interrupted by FAT table or FDT table, preserve in the step of physical address and operating environment of empty piece and comprise:
The setting data length threshold;
Length and data length threshold value that relatively FAT shows or FDT shows;
When the length of FAT table or FDT table is less than or equal to the data length threshold value, interrupt the user data update operation.
Preferably, said renewal FAT table or FDT table also comprise in the step of the mapping relations of record FAT table or FDT table:
In the FLASH redundancy, write down the logical address of FAT table or FDT table, and the mapping relations that record FAT shows or FDT shows in internal memory.
Preferably, above-mentioned data processing method is further comprising the steps of:
End data was upgraded operation when the data length of insertion was greater than said threshold value when programming;
The logical address and the physical address mapping table of application user data;
Preserve the end physical address and the operating environment of current operation.
Preferably, the physical address and the operating environment of said calling and obtaining user Data Update operation disruption space-time piece also comprise in the step of continuation Data Update operation:
Whether the physical address of judging current operation is consistent with the end physical address; If not, then interrupt the user data update operation according to the data length threshold value; If then continue to Update Information according to finishing physical address.
Preferably, also comprise in the said step of upgrading operation according to data length threshold value interrupt data following:
Compare User Data Length and threshold value;
When User Data Length during, interrupt the user data update operation less than threshold value.
By on can know; When the present invention was interrupted in data manipulation, record was when the physical address and the operating environment of space-time piece, after the renewal of file system is accomplished; Physical address and operating environment through transferring the sky piece again; Realization has reduced the wearing and tearing of FLASH to the operation of continuing of data, has improved the copying data speed of FLASH.
Description of drawings
Fig. 1 is the data processing method process flow diagram of NAND FLASH in an embodiment of the invention;
Fig. 2 interrupts user data update method of operating process flow diagram according to the data length threshold value among the embodiment of above-mentioned embodiment;
Fig. 3 interrupts user data update method of operating process flow diagram according to the data length threshold value among another embodiment of above-mentioned embodiment;
Fig. 4 is a method flow diagram of continuing user data in the above-mentioned embodiment.
In order to make the object of the invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with accompanying drawing and embodiment.
Embodiment
Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
Known like those of ordinary skills institute; NAND FLASH is formed by one or more die package, comprises one or more rank (Plane) in each crystal grain, and each rank comprises several storage blocks (Block); Each storage block is made up of several pages or leaves (Page), and each page or leaf comprises a plurality of sectors.Writing data and be with the page or leaf is unit, and obliterated data is to be unit with the piece.When writing data, write in proper order by the sector of page or leaf.And, distribute the address to storage block in order, distributed the storage block of address to be called physical block, this address is called physical address; Be called logical address and storage block is divided into some pages virtual address, set up mapping relations through address mapping table between logical address and the physical address.
FAT shows (File Allocation Table, file allocation table), is used to represent the allocation of space information of disk file.FDT shows (File Directory Table, FDT), the start element of each file (catalogue) under the record root directory, the attribute of file etc.During the locating file position, operating system just can know that in conjunction with the FAT table particular location of file in hard disk is with big or small according to the start element among the DIR.
As shown in Figure 1, NAND FLASH data processing of multithread of the present invention may further comprise the steps:
Step S10 according to logical address and the empty piece of physical address mapping table application, carries out the user data update operation;
Step S20, when user data update is operated by FAT table or FDT table renewal interruption, the physical address and the operating environment of preserving empty piece;
Step S30 upgrades FAT table or FDT table, the mapping relations of record FAT table or FDT table;
Step S40, the physical address and the operating environment of calling and obtaining user Data Update operation disruption space-time piece continue the Data Update operation.
In one embodiment; If will user data be write in one so that this piece is carried out Data Update according to logical address A; At first found piece (because of any write operation of NAND FLASH device can only be carried out) in sky or the unit of having wiped according to logical address and physical address mapping table; If the operation that user data writes is interrupted by the renewal of FAT table or FDT table; Then be interrupted the physical address and the operating environment of space-time piece through the record of the microcontroller in flash memory write operation, this operating environment can comprise the corresponding piece of logical address, loop variable, state machine state etc., so that subsequent operation.
When FAT table or the renewal of FDT table; Record FAT table or FDT table upgrade the pairing logical address of corresponding page or leaf in the redundancy of FLASH; The mapping relations of record FAT table or FDT table in internal memory; Insert when FAT table or FDT table upgraded pairing page or leaf in the time of to find last time FAT table or FDT table to upgrade through logical address and mapping relations, thereby continued access renewal last time once more with convenient file system.
Treat that FAT table or the renewal of FDT table finish, physical address and operating environment when microcontroller interrupts according to data write operation find data write operation place piece last time, continue the Data Update operation.
The length of FAT table or FDT table is all fixed, and the FAT table is generally 0.5K, and the FDT table is generally 4K.Among the present invention; According to FAT table and the fixing characteristics of FDT table length is that unit upgrades FAT table and FDT table with the page or leaf; Redundant area at FLASH writes down its corresponding logical address to recover its mapping relations after making things convenient for power down, writes down the convenient use in service of its corresponding mapping relations simultaneously.The data that take place whole when so just avoiding FAT table or FDT table to upgrade copy again, when coming updating user data again after handling, only need to finish last time physical address and continue down to write with the operating environment reduction, just as once interruption takes place.Wearing and tearing number of times in system file district will reduce greatly like this, thereby the availability of raising NAND FLASH can be improved the speed of FLASH copied files simultaneously.
As shown in Figure 2, above-mentioned interrupt data is upgraded operation and can be realized through following method flow:
Step S21, the setting data length threshold;
Step S22, the relatively length and the data length threshold value of FAT table or FDT table;
Step S23, when the length of FAT table or FDT table during less than the data length threshold value, interrupt data is upgraded operation.
The length of FAT table, FDT table is fixed, and the FAT table is generally the 0.5K size, and the size of FDT table is generally 4K, and the length of user data is then often greater than the length of FAT table or FDT table.For example, when programming, general data length all surpasses 4K.Can in FLASH, reserve several physical blocks in every separated certain-length zone according to These characteristics, a data length threshold value is set simultaneously, so that whether judgment data is FAT table or FDT table.In one embodiment, this threshold value can be 4K, when file system is inserted the renewal operation of FAT table or FDT table and interrupt data when upgrading operation; Whether the data that this threshold decision capable of using is inserted are FAT table or FDT table; If data length is less than or equal to threshold value, then interrupt the user data update operation, carry out above-mentioned steps S30; Upgrade FAT table or FDT table, the mapping relations of record FAT table or FDT table.As shown in Figure 3, if data length greater than threshold value, then is judged as user data, carry out following steps:
Step S40, the operation of end user Data Update;
Step S50, the logical address and the physical address mapping table of application user data;
Step S60 preserves the end physical address and the operating environment of current operation.
When User Data Length and FAT table or the general size of FDT table; When not satisfying the condition of writing continuously, for example, when having only 0.5K as if data length; Then carry out the renewal operation of end data; Apply for the logical address and the physical address mapping table of this user data, preserve the end physical address and the operating environment of operation, so that continue.For example, when continuing, can be with the physical address of EO and the physical address comparison of operating environment and current operation; If both are consistent, then can continue the user data update operation, if both are inconsistent; Then interrupt the user data update operation, return and carry out above-mentioned steps S22.As shown in Figure 4, in the said method, continue the operation of user data when interrupting, can may further comprise the steps:
Step S70 judges whether the physical address of current operation is consistent with the end physical address;
Step S80 if not, then upgrades operation according to data length threshold value interrupt data; Return and carry out above-mentioned steps S22;
Step S90, if, then continue to Update Information according to finishing physical address, return and carry out above-mentioned steps S60.
The above is merely preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of within spirit of the present invention and principle, being done, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (6)

1. the data processing method of a NAND FLASH is characterized in that, may further comprise the steps:
According to logical address and the empty piece of physical address mapping table application, carry out the user data update operation;
When user data update is operated by FAT table or FDT table renewal interruption, the physical address and the operating environment of preserving empty piece;
Upgrade FAT table or FDT table, the mapping relations of record FAT table or FDT table;
The physical address and the operating environment of calling and obtaining user Data Update operation disruption space-time piece continue the user data update operation; Said operating environment comprises piece, loop variable, the state machine state that logical address is corresponding.
2. method according to claim 1 is characterized in that, and is said when user data update operation is interrupted by FAT table or FDT table, preserves in the step of physical address and operating environment of empty piece to comprise:
The setting data length threshold;
Length and data length threshold value that relatively FAT shows or FDT shows;
When the length of FAT table or FDT table is less than or equal to the data length threshold value, interrupt the user data update operation.
3. method according to claim 2 is characterized in that, said renewal FAT table or FDT table comprise in the step of the mapping relations of record FAT table or FDT table:
In the FLASH redundancy, write down the logical address of FAT table or FDT table, and the mapping relations that record FAT shows or FDT shows in internal memory.
4. method according to claim 3 is characterized in that, and is further comprising the steps of:
End data was upgraded operation when the data length of insertion was greater than said threshold value when programming;
The logical address and the physical address mapping table of application user data;
Preserve the end physical address and the operating environment of current operation.
5. method according to claim 4 is characterized in that, said calling and obtaining user the Update Information physical address and the operating environment of operation disruption space-time piece continue also to comprise in the step of user data update operation:
Whether the physical address of judging current operation is consistent with the end physical address; If not, then interrupt the user data update operation according to the data length threshold value; If then continue updating user data according to finishing physical address.
6. method according to claim 5 is characterized in that, also comprises in the said step according to the operation of data length threshold value interruption user data update:
Compare User Data Length and threshold value;
When User Data Length during less than threshold value, interrupt data is upgraded operation.
CN2009101098805A 2009-11-25 2009-11-25 NAND-FLASH data processing method Active CN101794254B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009101098805A CN101794254B (en) 2009-11-25 2009-11-25 NAND-FLASH data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101098805A CN101794254B (en) 2009-11-25 2009-11-25 NAND-FLASH data processing method

Publications (2)

Publication Number Publication Date
CN101794254A CN101794254A (en) 2010-08-04
CN101794254B true CN101794254B (en) 2012-07-04

Family

ID=42586964

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101098805A Active CN101794254B (en) 2009-11-25 2009-11-25 NAND-FLASH data processing method

Country Status (1)

Country Link
CN (1) CN101794254B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6112461B2 (en) * 2012-08-07 2017-04-12 パナソニックIpマネジメント株式会社 Recording apparatus, access apparatus, recording system, and recording method
CN103123576B (en) * 2012-12-14 2015-12-09 厦门市美亚柏科信息股份有限公司 A kind of computer-readable storage medium clone method based on continuous point
CN109408409A (en) * 2018-10-25 2019-03-01 江苏华存电子科技有限公司 A method of promoting random writing efficiency

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1273392A (en) * 1999-05-07 2000-11-15 英业达集团(南京)电子技术有限公司 Structure and operation method of flash memory
CN1922585A (en) * 2003-12-30 2007-02-28 桑迪士克股份有限公司 Non-volatile memory and method with non-sequential update block management
CN101329654A (en) * 2007-06-22 2008-12-24 株式会社东芝 Nonvolatile memory control device, nonvolatile memory control method, and storage device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1273392A (en) * 1999-05-07 2000-11-15 英业达集团(南京)电子技术有限公司 Structure and operation method of flash memory
CN1922585A (en) * 2003-12-30 2007-02-28 桑迪士克股份有限公司 Non-volatile memory and method with non-sequential update block management
CN101329654A (en) * 2007-06-22 2008-12-24 株式会社东芝 Nonvolatile memory control device, nonvolatile memory control method, and storage device

Also Published As

Publication number Publication date
CN101794254A (en) 2010-08-04

Similar Documents

Publication Publication Date Title
US11068391B2 (en) Mapping table updating method for data storage device
CN110908925B (en) High-efficiency garbage collection method, data storage device and controller thereof
US8386698B2 (en) Data accessing method for flash memory and storage system and controller using the same
JP5295778B2 (en) Flash memory management method
US8117374B2 (en) Flash memory control devices that support multiple memory mapping schemes and methods of operating same
US8650379B2 (en) Data processing method for nonvolatile memory system
US8055873B2 (en) Data writing method for flash memory, and controller and system using the same
US20170228154A1 (en) Device and method for power loss protection in solid state drive
US20120290779A1 (en) Data management in solid-state storage devices and tiered storage systems
US20110055464A1 (en) Device driver including a flash memory file system and method thereof and a flash memory device and method thereof
US20090210611A1 (en) Storage system and data write method
US20100042774A1 (en) Block management method for flash memory, and storage system and controller using the same
US20100169556A1 (en) Nonvolatile storage device, information recording system, and information recording method
CN101625897B (en) Data write-in method, storage system and controller used for quick flash memory
WO2005124530A2 (en) Method for controlling memory card and method for controlling nonvolatile semiconductor memory
KR100703807B1 (en) Method and apparatus for managing block by update type of data in block type memory
CN104572478A (en) Data access method and data access device
EP2829969A1 (en) Controller management of memory array of storage device using magnetic random access memory (MRAM)
CN101640069A (en) Average wear method, storage system and controller used for flash memory
CN109902034A (en) Snapshot creation method, device, electronic equipment and machine readable storage medium
US9772782B2 (en) Non-volatile complement data cache
TW201015563A (en) Block management and replacement method, flash memory storage system and controller using the same
CN112882649A (en) Data storage device and non-volatile memory control method
CN101794254B (en) NAND-FLASH data processing method
CN105487824A (en) Information processing method, storage device and electronic device

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
C56 Change in the name or address of the patentee
CP01 Change in the name or title of a patent holder

Address after: The southern city of Shenzhen province Guangdong 518057 Keyuan Road, Nanshan District high tech Zone students Pioneering Building No. 2208

Patentee after: SILICONGO MICROELECTRONICS CO., LTD.

Address before: The southern city of Shenzhen province Guangdong 518057 Keyuan Road, Nanshan District high tech Zone students Pioneering Building No. 2208

Patentee before: Shenzhen SiliconGo Semiconductor Co., Ltd.

CP03 Change of name, title or address

Address after: 518057 05-2, 06-08 unit, 6 floor, Changhong science and technology building, 18 Nanshan District science and technology south twelve Road, Shenzhen, Guangdong.

Patentee after: Shenzhen SiliconGo Semiconductor Co., Ltd.

Address before: 518057 international business building 2208, South Yuan Road, Nanshan District high tech Zone, Shenzhen, Guangdong.

Patentee before: SILICONGO MICROELECTRONICS CO., LTD.

CP03 Change of name, title or address