CN101794254A - NAND-FLASH data processing method - Google Patents

NAND-FLASH data processing method Download PDF

Info

Publication number
CN101794254A
CN101794254A CN200910109880A CN200910109880A CN101794254A CN 101794254 A CN101794254 A CN 101794254A CN 200910109880 A CN200910109880 A CN 200910109880A CN 200910109880 A CN200910109880 A CN 200910109880A CN 101794254 A CN101794254 A CN 101794254A
Authority
CN
China
Prior art keywords
user data
physical address
fdt
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.)
Granted
Application number
CN200910109880A
Other languages
Chinese (zh)
Other versions
CN101794254B (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 NANDFLASH.
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 to be wiped free of in FLASH.If will write data with the Data Update in this piece in one according to logical address A, its flow process is roughly as follows:
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 page or leaf of A address correspondence is the 20th page in the piece of data if will write, then earlier with the 0th~19 page copying data in new piece;
Then, the data that will write 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, to in its file system, write one piece of data based on NAND FLASH, at first want frequent its system file of modification, 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, the data in the piece and the new piece of copying data to of the above page or leaf of logical address have been written to when being about to data interruption, in the page or leaf of will not write then that is written to the logical address correspondence, 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, it is just higher that FAT, FDT revise ratio, causes FLASH copied files speed slow excessively.
Summary of the invention
Fundamental purpose of the present invention is to provide the data processing method of a kind of NAND FLASH at the prior art defective, 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 operation is shown by FAT or the FDT table upgrades when interrupting 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.
Preferably, describedly shown by FAT or FDT table when interrupting, preserve in the step of the physical address of empty piece and operating environment and comprise when user data update operation:
The setting data length threshold;
The length and the data length threshold value that compare FAT table or FDT table;
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, described 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:
When User Data Length during greater than described threshold value end data upgrade operation;
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 described 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 more new data according to finishing physical address.
Preferably, also comprise in the described step of interrupting the Data Update operation according to the data length threshold value following:
Compare User Data Length and threshold value;
When User Data Length during, interrupt the user data update operation less than threshold value.
As from the foregoing, when the present invention is interrupted in data manipulation, record is when the physical address and the operating environment of space-time piece, after the renewal of file system is finished, physical address and operating environment by 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 purpose of the present invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.
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 as those of ordinary skills institute, NAND FLASH is formed by one or more die package, comprise one or more rank (Plane) in each crystal grain, each rank comprises several storage blocks (Block), each storage block is made 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 by 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, File Directory Table), 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 have been known the particular location of file in hard disk and size according to the start element among the DIR in conjunction with the FAT table.
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 is when user data update operation is shown by FAT or the FDT table upgrades when interrupting 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 NANDFLASH 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 shown by FAT or the renewal of FDT table is interrupted, then be interrupted the physical address and the operating environment of space-time piece by the record of the microcontroller in flash memory write operation, this operating environment can comprise the piece of logical address correspondence, loop variable, state machine state etc. are 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, when inserting FAT table or the renewal of FDT table once more with convenient file system, pairing page or leaf in the time of can finding last time FAT table or FDT table to upgrade by logical address and mapping relations, thus continued access was upgraded last time.
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 interruption Data Update operation flow process realization by the following method:
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, interrupts the Data Update 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, in the certain-length zone, reserve several physical blocks 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 when the renewal operation of FAT table or FDT table interrupted the Data Update operation, whether the data that can utilize this threshold decision to insert 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 if data length has only 0.5K, 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 unanimities 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 interrupts the Data Update operation according to the data length threshold value; Return and carry out above-mentioned steps S22;
Step S90, if, then continue more new data according to finishing physical address, return and carry out above-mentioned steps S60.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, 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 operation is shown by FAT or the FDT table upgrades when interrupting 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.
2. method according to claim 1 is characterized in that, is describedly shown by FAT or FDT table when interrupting when user data update operation, preserves in the step of the physical address of empty piece and operating environment to comprise:
The setting data length threshold;
The length and the data length threshold value that compare FAT table or FDT table;
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 1 and 2 is characterized in that, described 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:
When User Data Length during greater than described threshold value end data upgrade operation;
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, the physical address and the operating environment of space-time piece interrupted in described calling and obtaining user data manipulation, also comprises in the step of continuation 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 described 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, interrupt the Data Update operation less than threshold value.
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 true CN101794254A (en) 2010-08-04
CN101794254B 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)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103123576A (en) * 2012-12-14 2013-05-29 厦门市美亚柏科信息股份有限公司 Computer storage medium replica method based on pointer
CN104583973A (en) * 2012-08-07 2015-04-29 松下知识产权经营株式会社 Recording device, access device, recording system, and recording method
WO2020082452A1 (en) * 2018-10-25 2020-04-30 江苏华存电子科技有限公司 Method for improving random write performance

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1148659C (en) * 1999-05-07 2004-05-05 英业达集团(南京)电子技术有限公司 Structure and operation method of flash memory
US7139864B2 (en) * 2003-12-30 2006-11-21 Sandisk Corporation Non-volatile memory and method with block management system
JP2009003783A (en) * 2007-06-22 2009-01-08 Toshiba Corp Control device and control method for nonvolatile memory and storage device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104583973A (en) * 2012-08-07 2015-04-29 松下知识产权经营株式会社 Recording device, access device, recording system, and recording method
CN103123576A (en) * 2012-12-14 2013-05-29 厦门市美亚柏科信息股份有限公司 Computer storage medium replica method based on pointer
CN103123576B (en) * 2012-12-14 2015-12-09 厦门市美亚柏科信息股份有限公司 A kind of computer-readable storage medium clone method based on continuous point
WO2020082452A1 (en) * 2018-10-25 2020-04-30 江苏华存电子科技有限公司 Method for improving random write performance

Also Published As

Publication number Publication date
CN101794254B (en) 2012-07-04

Similar Documents

Publication Publication Date Title
CN110908925B (en) High-efficiency garbage collection method, data storage device and controller thereof
US7882301B2 (en) Wear leveling in storage devices based on flash memories and related circuit, system, and method
US8386698B2 (en) Data accessing method for flash memory and storage system and controller using the same
JP4004468B2 (en) Method and system for having large pages supported
JP5295778B2 (en) Flash memory management method
US8117374B2 (en) Flash memory control devices that support multiple memory mapping schemes and methods of operating same
US8510500B2 (en) Device driver including a flash memory file system and method thereof and a flash memory device and method thereof
US8843691B2 (en) Prioritized erasure of data blocks in a flash storage device
US8046526B2 (en) Wear leveling method and controller using the same
US8055873B2 (en) Data writing method for flash memory, and controller and system using the same
US8650379B2 (en) Data processing method for nonvolatile memory system
CN110895514A (en) Mapping table updating method
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
US20100042774A1 (en) Block management method for flash memory, and storage system and controller using the same
US20090210611A1 (en) Storage system and data write method
US20090307413A1 (en) Data writing method for flash memory and storage system and controller using the same
CN101625897B (en) Data write-in method, storage system and controller used for quick flash memory
US20100169556A1 (en) Nonvolatile storage device, information recording system, and information recording method
WO2005124530A2 (en) Method for controlling memory card and method for controlling nonvolatile semiconductor memory
EP2829969A1 (en) Controller management of memory array of storage device using magnetic random access memory (MRAM)
CN104572478A (en) Data access method and data access device
KR100703807B1 (en) Method and apparatus for managing block by update type of data in block type memory
CN101640069A (en) Average wear method, storage system and controller used for flash memory
US9772782B2 (en) Non-volatile complement data cache

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