Movatterモバイル変換


[0]ホーム

URL:


CN103559141A - Management method and device for nonvolatile memory (NVM) - Google Patents

Management method and device for nonvolatile memory (NVM)
Download PDF

Info

Publication number
CN103559141A
CN103559141ACN201310535530.1ACN201310535530ACN103559141ACN 103559141 ACN103559141 ACN 103559141ACN 201310535530 ACN201310535530 ACN 201310535530ACN 103559141 ACN103559141 ACN 103559141A
Authority
CN
China
Prior art keywords
page
pages
data
check code
object address
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.)
Pending
Application number
CN201310535530.1A
Other languages
Chinese (zh)
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.)
KT MICRO Inc
Beijing KT Micro Ltd
Original Assignee
KT MICRO Inc
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 KT MICRO IncfiledCriticalKT MICRO Inc
Priority to CN201310535530.1ApriorityCriticalpatent/CN103559141A/en
Publication of CN103559141ApublicationCriticalpatent/CN103559141A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Landscapes

Abstract

The invention relates to a management method and device for a nonvolatile memory (NVM). The method comprises the following steps: when write operation is performed according to a destination page address, a destination block is inquired to obtain two pages with the same page address and a page corresponding to the destination page address, one of the two pages is selected as an alternating page according to check codes and page identifications of the two pages, and new page data is obtained according to page data of the page corresponding to the destination page address and is written into the alternating page; when read operation is performed according to the destination page address, the destination block is inquired to obtain pages corresponding to the destination page address, when the destination page address corresponds to two pages, one of the two pages is selected as an effective page according to check codes and page identifications of the two pages, and data in the effective page is read. The management method and device can improve the efficiency of data writing and prolong the service life of the NVM.

Description

The management method of nonvolatile memory and device
Technical field
The present invention relates to memory area, relate in particular to a kind of management method and device of nonvolatile memory.
Background technology
In today of social high speed development, nonvolatile memory (Nonvolatile memory, be called for short: use NVM) is seen everywhere, and closely bound up with life, common NVM has, (Electrically Erasable Programmable Read-Only Memory is called for short: EEPROM) and flash memory (Flash Memory, abbreviation: FLASH) EEPROM (Electrically Erasable Programmable Read Only Memo).Such as, the smart card that the every field such as public transport, social security, bank, electric power, identification are all used has all been widely used NVM.Therefore, guarantee that in NVM, data efficient safe storage just seems particularly important.Smart card in the course of the work, if there is power-off or other unpredictable mistakes, causes smart card to be wiped or the termination of data writing process exception, will make data writing incorrect, like this with regard to serious threat data integrity and security.Therefore need to there is a solution to complete the power-off protection problem of data.
Current, solving power-off protection problem is generally to adopt backup area to complete, that is, at a backup area of memory block application, the user more flow process of new data is as follows:
Step 1, write legacy data to backup area;
Step 2, write backup area sign;
Step 3, write new data to former data field;
Step 4, write backup area and empty sign.
By said method, complete data security and write, like this, can guarantee data or right with regard to all writing, or just not write data, there will not be other situations, thereby guaranteed the integrality of data.But profit in this way, security update one secondary data need to be write 4 times, and the efficiency that causes writing data is lower.And every renewal one secondary data just need to be upgraded backup area one time, and backup area is fixed, and frequently the operation of fixed area will be greatly reduced to the life-span of NVM.
Summary of the invention
The invention provides a kind of management method and device of nonvolatile memory, in order to realize, improve the efficiency of writing data, the life-span of improving NVM.
The invention provides a kind of management method of nonvolatile memory, described nonvolatile memory comprises an above block, each block comprises a plurality of pages, every page comprises data field and control information district, described control information district preserves page address, for identifying page sign and the check code of order that page object address is the write operation of described page address, described method comprises;
When carrying out write operation according to page object address, query aim block obtains two pages corresponding to page and described page object address that page address is identical, according to the check code of described two pages, choosing a page with page sign from described two pages skips as wheel, according to the page data of page corresponding to described page object address, obtain new page data, described new page data is write to described wheel and skip;
When carrying out read operation according to page object address, query aim block obtains page corresponding to described page object address, when corresponding two pages in described page object address, according to the check code of described two pages and page sign, from described two pages, choose a page as active page, read the data in described active page.
The present invention also provides a kind of management devices of nonvolatile memory, described nonvolatile memory comprises an above block, each block comprises a plurality of pages, every page comprises data field and control information district, described control information district preserves page address, for identifying page sign and the check code of order that page object address is the write operation of described page address, described device comprises:
The first enquiry module, for when carrying out write operation according to page object address, query aim block obtains two pages corresponding to page and described page object address that page address is identical;
Take turns the acquisition module that skips, be connected with described the first query block, for choosing one page with page sign from described two pages according to the check code of described two pages, as wheel, skip;
New data acquisition module, is connected with described the first enquiry module, for obtaining new page data according to the page data of page corresponding to described page object address;
Data writing module, skips for described new page data is write to described wheel;
The second enquiry module, for when carrying out read operation according to page object address, query aim block obtains page corresponding to described page object address;
Active page acquisition module, is connected with described the second enquiry module, for when corresponding two pages in described page object address, according to the check code of described two pages and page sign, from described two pages, chooses one page as active page;
Data read through model, is connected with described active page acquisition module, for reading the data of described active page.
In embodiments of the present invention, every renewal one secondary data only need to be write NVM one time, only need to spend in prior art for 1/4 time, has greatly improved the efficiency of writing data.In addition, every renewal one secondary data need to be write once wheel and skips, and wheel to skip be unfixed, so increased to a certain extent the life-span of NVM.
Accompanying drawing explanation
Fig. 1 is the structural representation of NVM in the management method embodiment of NVM of the present invention;
Fig. 2 is the schematic flow sheet of read operation in the management method embodiment of nonvolatile memory of the present invention;
Fig. 3 is the schematic flow sheet of write operation in the management method embodiment of nonvolatile memory of the present invention;
Fig. 4 carries out the structural representation of the device of write operation in the management devices embodiment of NVM of the present invention;
Fig. 5 carries out the structural representation of the device of read operation in the management devices embodiment of NVM of the present invention.
Embodiment
Below in conjunction with specification drawings and specific embodiments, the invention will be further described.
The management method embodiment of NVM
As shown in Figure 1, structural representation for NVM in the management method embodiment of NVM of the present invention, this NVM comprises an above block: block 1, block 2... block n, n is more than or equal to 1 natural number, each block comprises a plurality of pages: page 1, page 2... page m and 1 wheel skip, and m is more than or equal to 2 natural number, and every page comprises data field and control information district, data field save data, control information district preserves page address, page sign and check code.Wherein, this page address is logical page address, and page sign is for identifying page object address for the order of the write operation of this page address, and check code calculates according to the data of this page.
Alternatively, page sign can adopt the mode of sequential counting to identify the order of write operation, like this, carries out write operation one time, and page sign adds 1.Or page sign also can adopt the mode of cycle count to identify the order of write operation, for example: the length of page sign is 2 bits, the value of page sign can have 4 kinds of selections: 00,01,10,11, and cycle count mode is: 00 → 01 → 10 → 11 → 00.When adopting the mode of cycle count, should not occur cannot decision operation order situation, when cannot decision operation order, illustrate that the length that page identifies is inadequate.
As shown in Figure 2, be the schematic flow sheet of read operation in the management method embodiment of nonvolatile memory of the present invention, can comprise the steps;
Step 21, when carrying out read operation according to page object address, query aim block obtains page corresponding to this page object address, performs step 22;
Wherein, target block is the block at place, page object address.
Step 22, judge this page object address corresponding page quantity whether be two, if so, performstep 23, otherwise performstep 24.
Step 23, when corresponding two pages in this page object address, according to the check code of these two pages and page sign, from these two pages, choose one page as active page, performstep 25;
Alternatively, first judge that whether the check code of these two pages is correct; When the check code of one page is wherein correct and during the check code mistake of other one page, choose the correct page of check code as active page, there is the error in data that power-off or other unpredictable situations cause this page in check code explanation of error, check code correctly illustrates that the data in this page are correct while writing this page; When the check code of these two pages is all correct, the page of choosing nearest operation according to the page sign of these two pages is as active page, the data of storing in active page are latest data, the data of storing in another one page are legacy data, in other words, when the data of two pages are all correct, select the page that stores latest data as active page.
Step 24, when the corresponding page in this page object address, using this page as active page, performstep 25;
Step 25, read the data in this active page.
As shown in Figure 3, the schematic flow sheet for write operation in the management method embodiment of nonvolatile memory of the present invention, can comprise the steps:
Step 31, when carrying out write operation according to page object address, query aim block obtains two pages and page corresponding to this page object address that page address is identical.
Step 32, according to the check code of these two pages and page sign, from these two pages, choose one page and skip as wheel;
Alternatively, judge that whether the check code of these two pages is correct; When the check code of one page is wherein correct and during the check code mistake of other one page, the page of choosing check code mistake skips as wheel, there is the error in data that power-off or other unpredictable situations cause this page in check code explanation of error, check code correctly illustrates that the data of this page are correct while writing this page; When the check code of these two pages is all correct, the page of choosing operation the earliest according to the page sign of these two pages skips as wheel, and in the page of operation the earliest, the data of storage are legacy data, in other words, when the data of two pages are all correct, select the page that stores legacy data to skip as wheel.
Step 33, according to this page object address corresponding page page data obtain new page data;
Particularly, read the page data of page corresponding to this page object address, revise page sign in the page data of page corresponding to this page object address and the data of data field, obtain new page data.
Step 34, this new page data is write during this takes turns and skip;
What skip middle storage due to wheel is legacy data or wrong data, so new data can be write to wheel, covers original legacy data in skipping.
In schematic flow sheet shown in Fig. 3, there will be a kind of special circumstances: after query aim block, find that the quantity of the page that page object address is corresponding is two, and the page address of two pages identical with page address is identical.In order to process this situation, using in these two pages except this takes turns the page that another page skipping is corresponding as this page object address.
Adopt said method to operate NVM, in skipping, wheel writes new data, the content of preserving the page of legacy data remains unchanged, even if there is like this power-off or other unpredictable mistakes in writing the process of data, after re-powering, according to page sign and check code, judge, guarantee data or right with regard to all writing, or just do not write, there will not be other situations, thereby guaranteed the safety of data.
In the present embodiment, every renewal one secondary data only need to be write NVM one time, only need to spend in prior art for 1/4 time, has greatly improved the efficiency of writing data.In addition, every renewal one secondary data need to be write once wheel and skips, and wheel to skip be unfixed, so increased to a certain extent the life-span of NVM.
The management devices embodiment of NVM
In the present embodiment, the structure of this NVM is identical with structural representation shown in Fig. 1, does not repeat them here.
As shown in Figure 4, in management devices embodiment for NVM of the present invention, carry out the structural representation of the device of write operation, this device that carries out write operation can comprise thefirst enquiry module 41, take turns skipacquisition module 42, newdata acquisition module 43,data writing module 44, taking turns theacquisition module 42 that skips is connected with thefirst enquiry module 41, newdata acquisition module 43 is connected with thefirst enquiry module 41, anddata writing module 44 and newdata acquisition module 43 and thewheel acquisition module 42 that skips is connected.
Thefirst enquiry module 41 is for when carrying out write operation according to page object address, and query aim block obtains two pages and page corresponding to this page object address that page address is identical; Wherein, target block is the block at place, page object address.Taking turns theacquisition module 42 that skips skips as wheel for choosing one page with page sign from these two pages according to the check code of these two pages.Newdata acquisition module 43 is for obtaining new page data according to the page data of page corresponding to this page object address.Data writing module 44 is taken turns and is skipped for this new page data being write to this.
This course of work of device of carrying out write operation is as follows: when carrying out write operation according to page object address, thefirst enquiry module 41 query aim blocks obtain two pages and page corresponding to this page object address that page address is identical, thewheel acquisition module 42 that skips is chosen one page according to the check code of these two pages and page sign and is skipped as wheel from these two pages, newdata acquisition module 43 obtains new page data according to the page data of page corresponding to this page object address, anddata writing module 44 writes this new page data during this takes turns and skip.
As shown in Figure 5, carry out the structural representation of the device of read operation in the management devices embodiment for NVM of the present invention, this device that carries out read operation can comprise thesecond enquiry module 45, activepage acquisition module 46 and data read through model 47.Activepage acquisition module 46 is connected with thissecond enquiry module 45, and data read throughmodel 47 is connected with this activepage acquisition module 46.
Wherein, thesecond enquiry module 45 is for when carrying out read operation according to page object address, and query aim block obtains page corresponding to this page object address.Activepage acquisition module 46, for when corresponding two pages in this page object address, is chosen one page as active page according to the check code of these two pages and page sign from these two pages.Data read throughmodel 47 is for reading the data of this active page.
This course of work of device of carrying out read operation is as follows: when carrying out read operation according to page object address, thesecond enquiry module 45 query aim blocks obtain page corresponding to this page object address, when corresponding two pages in this page object address, activepage acquisition module 46 is chosen one page as active page according to the check code of these two pages and page sign from these two pages, and data read throughmodel 47 reads the data in this active page.When the corresponding page in page object address, data read throughmodel 47 directly reads the data in this page.
In the present embodiment, every renewal one secondary data only needsdata writing module 44 to write NVM one time, only need to spend in prior art for 1/4 time, has greatly improved the efficiency of writing data.In addition, every renewal one secondary data need to be write once wheel and skips, and wheel to skip be unfixed, so increased to a certain extent the life-span of NVM.
Alternatively, in order to find wheel to skip, thewheel acquisition module 42 that skips can comprise that thefirst judging unit 421, the firstround acquiring unit 422 and second that skips takes turns the acquiringunit 423 that skips.Thefirst judging unit 421 is connected with thefirst enquiry module 41, the firstround acquiring unit 422 and second that skips is taken turns the acquiringunit 423 that skips and is connected with thefirst judging unit 421, anddata writing module 44 and the firstround acquiring unit 422 and second that skips is taken turns the acquiringunit 423 that skips and is connected.
Wherein, whether thefirst judging unit 421 is correct for judging the check code of these two pages.The first round is skipped acquiringunit 422 for according to the judged result of thefirst judging unit 421, when the check code of one page is wherein correct and during the check code mistake of other one page, the page of choosing check code mistake skips as wheel, test the error in data that power-off or other unpredictable situations cause this page occurs when yard explanation of error is write this page, check code correctly illustrates that the data in this page are correct.Second takes turns the acquiringunit 423 that skips for according to the judged result of thefirst judging unit 421, when the check code of these two pages is all correct, the page of choosing operation the earliest according to the page sign of these two pages skips as wheel, in the page of operation the earliest, the data of storage are legacy data, in other words, when the data of two pages are all correct, select the page that stores legacy data to skip as wheel.
Alternatively, in order to find active page, activepage acquisition module 46 can comprise thesecond judging unit 461, the first activepage acquiring unit 462 and the second active page acquiring unit 463.Thesecond judging unit 461 is connected with thesecond enquiry module 45, the firstround acquiring unit 422 and second that skips is taken turns the acquiringunit 423 that skips and is connected with thesecond judging unit 461, and data read throughmodel 47 is connected with the second activepage acquiring unit 463 with the first activepage acquiring unit 462.
Whether thesecond judging unit 461 is correct for judging the check code of these two pages.The first activepage acquiring unit 462 is for according to the judged result of thissecond judging unit 461, when the check code of one page is wherein correct and during the check code mistake of other one page, choose the correct page of check code as active page, there is the error in data that power-off or other unpredictable situations cause this page in check code explanation of error, check code correctly illustrates that the data in this page are correct while writing this page.The second activepage acquiring unit 463 is for according to the judged result of thissecond judging unit 461, when the check code of these two pages is all correct, the page of choosing nearest operation according to the page sign of these two pages is as active page, the data of storing in active page are latest data, the data of storing in another one page are legacy data, in other words, when the data of two pages are all correct, select the page that stores latest data as active page.
Alternatively, in order to obtain new page data, newdata acquisition module 43 can comprise that readingunit 431 is connected with thefirst enquiry module 41 withmodification 432,Du unit,unit 431, revise 432Yu Du unit,unit 431 and connect,data writing module 44 is connected withmodification unit 43.
Readunit 431 for reading the page data of page corresponding to this page object address.Reviseunit 432 for revising the page sign of page data of page corresponding to this page object address and the data of data field, obtain new page data.Alternatively, the page sign in the page data of page corresponding to page object address is added to 1, in Update Table district, need the data revised, thereby obtain new page data.
Alternatively, in the process of write operation, also may there are a kind of special circumstances: after query aim block, the quantity of the page that page object address is corresponding is that the page address of two and two pages identical with page address is identical.In order to process this special circumstances, the present embodiment can also compriseabnormality processing module 48, is connected with thefirst enquiry module 41 and thewheel acquisition module 42 that skips, and newdata acquisition module 43 is also connected with abnormality processing module 48.Abnormality processing module 48 is for when carrying out write operation according to page object address, when the page address of this page object address and these two pages is identical, using in these two pages except this takes turns another page page corresponding as this page object address skipping.
Finally it should be noted that: above embodiment is only unrestricted in order to technical scheme of the present invention to be described, although the present invention is had been described in detail with reference to preferred embodiment, those of ordinary skill in the art is to be understood that, can modify or be equal to replacement technical scheme of the present invention, and not depart from the spirit and scope of technical solution of the present invention.

Claims (10)

CN201310535530.1A2013-11-012013-11-01Management method and device for nonvolatile memory (NVM)PendingCN103559141A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201310535530.1ACN103559141A (en)2013-11-012013-11-01Management method and device for nonvolatile memory (NVM)

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201310535530.1ACN103559141A (en)2013-11-012013-11-01Management method and device for nonvolatile memory (NVM)

Publications (1)

Publication NumberPublication Date
CN103559141Atrue CN103559141A (en)2014-02-05

Family

ID=50013392

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201310535530.1APendingCN103559141A (en)2013-11-012013-11-01Management method and device for nonvolatile memory (NVM)

Country Status (1)

CountryLink
CN (1)CN103559141A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107967222A (en)*2017-12-202018-04-27北京兆易创新科技股份有限公司A kind of method and device of SPI-Nand searching datas page
CN109165115A (en)*2018-06-262019-01-08北京中电华大电子设计有限责任公司A method of enhancing FLASH memory reliability
CN110008059A (en)*2019-02-202019-07-12深圳市汇顶科技股份有限公司Data-updating method, device and the storage medium of non-volatile memory medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101344868A (en)*2008-08-282009-01-14北京握奇数据系统有限公司Data backup and acquiring method and device
CN101561950A (en)*2009-05-212009-10-21北京握奇数据系统有限公司Method and device for processing data of intelligent card
CN101699476A (en)*2009-10-292010-04-28北京握奇数据系统有限公司Data processing method and device of smart cards
US20100115188A1 (en)*2008-11-062010-05-06Chun-Kun LeeMethod for managing a memory apparatus, and associated memory apparatus thereof
CN101819532A (en)*2010-03-162010-09-01北京握奇数据系统有限公司Method and device for updating data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101344868A (en)*2008-08-282009-01-14北京握奇数据系统有限公司Data backup and acquiring method and device
US20100115188A1 (en)*2008-11-062010-05-06Chun-Kun LeeMethod for managing a memory apparatus, and associated memory apparatus thereof
CN101561950A (en)*2009-05-212009-10-21北京握奇数据系统有限公司Method and device for processing data of intelligent card
CN101699476A (en)*2009-10-292010-04-28北京握奇数据系统有限公司Data processing method and device of smart cards
CN101819532A (en)*2010-03-162010-09-01北京握奇数据系统有限公司Method and device for updating data

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107967222A (en)*2017-12-202018-04-27北京兆易创新科技股份有限公司A kind of method and device of SPI-Nand searching datas page
CN109165115A (en)*2018-06-262019-01-08北京中电华大电子设计有限责任公司A method of enhancing FLASH memory reliability
CN110008059A (en)*2019-02-202019-07-12深圳市汇顶科技股份有限公司Data-updating method, device and the storage medium of non-volatile memory medium
CN110008059B (en)*2019-02-202021-05-11深圳市汇顶科技股份有限公司 Data update method, device and storage medium of non-volatile storage medium

Similar Documents

PublicationPublication DateTitle
CN101656106B (en)Method for writing data into EEPROM and device thereof
CN100377120C (en)Control method of nonvolatile memory device
US8321481B2 (en)Method for incremental anti-tear garbage collection
TWI436369B (en)Methods for measuring usable lifespan and replacing an in-system programming code of a memory device, and data storage system using the same
US7725646B2 (en)Method of using a flash memory for a circular buffer
US7979737B2 (en)Method for accessing a Flash memory, and associated memory device and controller thereof
CN102033814B (en) Method for accessing a flash memory and related memory device
US20110138254A1 (en)Method for reducing uncorrectable errors of a memory device regarding error correction code, and associated memory device and controller thereof
CN105988939B (en)data storage device and flash memory control method
CN102999431A (en)Weave sequence counter for non-volatile memory systems
CN103778964B (en)Process, using method and the device of a kind of NAND Flash programming data, system
CN108897492B (en)Data writing method and device
CN103456360A (en)Management method and device for nonvolatile memory (NVM)
CN101216789A (en)Data update method, device and system
CN103823642A (en)Method and system used for Flash balance storage
CN101567220A (en)Damaged block identification method of flash memory, storage system and controller thereof
CN103593301B (en)Bad block management method and system
CN104090732A (en)Nonvolatile memory management method and device
CN103559141A (en)Management method and device for nonvolatile memory (NVM)
US20160034388A1 (en)Data management method, memory control circuit unit and memory storage apparatus
CN113204316A (en)Method for high-efficiency data storage by using FLASH
KR101826778B1 (en)EEPROM Emulation Method Considering implementation of Flash Life Cycle and Performance Improvement
CN109783005A (en)Control method, memory storage and its controller and electronic device of memory storage
CN105095101A (en)Method and device for writing data in memorizer and intelligent card
US20130019056A1 (en)Data Storing Method and Apparatus Applied to Flash Memory Storage Device

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
C02Deemed withdrawal of patent application after publication (patent law 2001)
WD01Invention patent application deemed withdrawn after publication

Application publication date:20140205


[8]ページ先頭

©2009-2025 Movatter.jp