CN101075211A - Flash memory management based on sector access - Google Patents

Flash memory management based on sector access Download PDF

Info

Publication number
CN101075211A
CN101075211A CNA2007100692568A CN200710069256A CN101075211A CN 101075211 A CN101075211 A CN 101075211A CN A2007100692568 A CNA2007100692568 A CN A2007100692568A CN 200710069256 A CN200710069256 A CN 200710069256A CN 101075211 A CN101075211 A CN 101075211A
Authority
CN
China
Prior art keywords
physical
page
logical
block
lpage
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
CNA2007100692568A
Other languages
Chinese (zh)
Other versions
CN100470506C (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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CNB2007100692568A priority Critical patent/CN100470506C/en
Publication of CN101075211A publication Critical patent/CN101075211A/en
Application granted granted Critical
Publication of CN100470506C publication Critical patent/CN100470506C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/0292User address space allocation, e.g. contiguous or non contiguous base addressing using tables or multilevel address translation means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1032Reliability improvement, data loss prevention, degraded operation etc
    • G06F2212/1036Life time enhancement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7201Logical to physical mapping or translation of blocks or pages

Abstract

A method for managing storage of flash storage based on sector access includes mapping continuous virtual sector uniformly onto each logic block in scattering way, setting up mapping of logic block to physical block and setting up mapping of logic page in logic block to physical page in physical block for mapping virtual sector into each physical block in scattering way for realizing balance service of each physical block and for satisfying sequence-write requirement of said physical page so as to provide multi-time read-write ability of virtual address space.

Description

Storage administration based on the flash storer of sector visit
Affiliated field
The invention belongs to the storage management technique field, relate to the flash memory devices is the storage management system of medium, relate in particular to method for organizing and management method and data access method based on the flash storer of sector visit, make the flash memory devices promptly to realize the solid-state memory disk as the running of disk.
Background technology
The Flash storer of prior art is the nonvolatile memory device of a kind of EEPROM of being similar to, is widely used in the embedded device at present.The Flash storer has following characteristic:
1.Flash write operation can on the flash storer arbitrarily the data of bit become 0 from 1.But to arbitrary bit, write operation all can not become 1 to it from 0.
2.Flash erase operation can only become 1 to the data of each bit on the flash storer from 0.And with respect to write operation, erase operation needs the more execution time.No matter be NAND flash or NOR is flash, wiping all is an operation very consuming time.
3.Flash the size in the size in minimum erasable area territory and minimum writable area territory is different, and differs greatly.The minimum erasable area territory of Flash is called piece (block), and to NOR flash, the size of piece is 8KB or 64KB or 128KB etc. normally.To NAND flash, the size of piece is 16KB, 128KB or 256KB etc. (disregarding the spare area) normally.And the size in minimum writable area territory big or small much smaller than piece.To NOR flash storer, piece directly is made up of a series of continuous bytes, and minimum writable area territory is byte or double byte.To NAND flash storer, piece is made up of a series of equal-sized pages or leaves (page), minimum writable area territory is the sub-fraction of page or leaf or page or leaf, the size of page or leaf is 512B or 2KB etc. (disregarding the spare area) normally, but between twice continuous erase operation, the indegree of writing of each page is conditional, normally 3-10 time, surpass this number of times, it is unreliable that the data on this page will become.
4.Flash memory devices is formed by a series of, but the erasing times of each piece is limited, but after surpassing the restriction of this maximum erasing times, the job stability of this piece does not just guarantee.
5. for some high capacity NAND flash, such as the NAND flashK9K8G08U0A of SAMSUNG, each page or leaf in the piece must be sequentially written into, and can not write data to each page or leaf in the piece with order at random.
Therefore at every turn in revising the flash storer before the existing data, need read the full content in the corresponding blocks among the RAM earlier, in RAM, corresponding data are made amendment, wipe the flash piece that comprises raw data then, at last the data among the RAM are write back in the original piece.There is following defective in this flash memory management method:
1) causes loss of data during write data easily.After erase block but before data are write back piece, system's power down of any reason takes place, the losing of the data that all can cause the total data of this piece to comprise not require modification.
2) the slow efficient of memory write operation speed is low.Even the modification of each Bit of data modification all requires to wipe corresponding piece earlier, increased the time of write operation.
3) data in one specific of the frequent modification can cause this piece by frequent wiping, but this piece will reach the maximum erasing times faster than other pieces, therefore influence the serviceable life of total system.
Many existing operating system (OS) all have the file system of management data, and those file system are usually with the object of disk as management, and disk is the unit read-write with sector (sector), and the size of sector is 512 bytes normally.File system can be operated the data read and write that any sector on the disk carries out repeatedly.The above-mentioned characteristic of Flash storer makes it can't be directly used in existing file system.In order to allow the existing file system can the not modified flash of being used for memory devices, need provide a kind of method to distribute and manage the flash storer, make file system come the corresponding sector of addressing with its address, and read-write that can be repeatedly, and its read-write can be unit with the size of disk sector.
The flash management method that United States Patent (USP) 6381176 proposes, the efficient write and the robustness of system have been improved, but this technical scheme need be reserved some zones in each piece of flash storer, be used for Data Update, this has influenced the space availability ratio of flash storer, simultaneously, because reserve update area and two zoness of different of raw data district in same (block), this technical scheme can't be applicable to that some requires the NAND flash that the page or leaf order in the piece is write.This scheme is mapped to the adjacent virtual sectors of a sector address in the piece in addition, when file data upgrades, data in several adjacent virtual sectors may be upgraded simultaneously, therefore can use up the renewal zone of reservation very soon, cause frequent this piece of wiping, influence the serviceable life of flash and the speed of writing.
The management method of the flash that Chinese patent publication number: CN 1805049 proposes improved the efficient write and the robustness of system, but this technical scheme is when tracking mode changes, and need carry out writing repeatedly to the same zone of flash, to write down each process.Because NAND flash has the previously described restriction of writing number of times to same page or leaf, so this scheme can not be used for NAND flash.And, because it is few with the time phase difference that the sub-fraction of writing page or leaf consumes that NAND flash writes whole page or leaf, therefore this technical scheme promptly enables to reduce the number of times of writing, the problem that NAND flash is still had the efficient write, therefore need the method for an optimization, and this method can also be applicable to NOR flash and NAND flash.
Summary of the invention
In order to overcome the above-mentioned defective of prior art, the invention provides a kind of method for organizing, management method and the data read-write method of flash storer, robustness when being used for data storage to improve flash, raising is write efficient during write data on flash, improve the use harmony of each flash piece, and make the flash storer can simulate the data access interface based on sector the same with memory disk, make existing file system just need not revise and can be used as the file data memory device to the flash storer.Though these methods are that example is described with NOR flash and NAND flash, these methods also can be used for other the memory device that similar read write attribute is arranged.
The objective of the invention is to realize by following technical scheme: based on the flash storer of sector visit, its method comprises the following steps:
(1) physical space of definition Flash storer.According to the physical arrangement of flash storer, its storer is divided into more than one, be referred to as physical block, each physical block big or small identical specifies numbering (physical block number PBN) for each physical block according to physical block start address order from small to large.Then each physical block is divided into more than one page or leaf, is referred to as Physical Page, each Physical Page big or small identical.Each Physical Page in the physical block specifies a numbering unique in this physical block (physical page number PPN) for each Physical Page according to its start offset address order from small to large in physical block.The space that physical block is formed calls physical space.
(2) define a logical storage area, and it is divided into more than one, be referred to as logical block, each logical block big or small identical, and the size of logical block and physical block is big or small identical, and each logical block all has a logical address, and the space that logical block is formed calls logical space.Specify a numbering (logical block number (LBN) LBN) for each logical block according to the start address of logical block in logical space order from small to large.Then logical block is divided into more than one page or leaf, is referred to as logical page (LPAGE), each logical page (LPAGE) big or small identical, and the size of logical page (LPAGE) and Physical Page is big or small identical.Each logical page (LPAGE) in the logical block specifies a numbering unique in this logical block (logical page number (LPN) LPN) for each logical page (LPAGE) according to its start offset address order from small to large in logical block.
(3) set up the mapping of logical space and physical space.Each logical block all can be mapped to a unique physical block, but not that each physical block all can be mapped to a logical block, there are some at least one physical blocks to be retained with replacement or transmission block or stored configuration management data as bad piece, these physical blocks that are retained are not mapped to logical block, and each physical block is mapped in the logical block at the most.Therefore the logical block number in the logical space needs not to be identical with physical block number in the physical space.When physical block is mapped with logical block, corresponding logical block number (LBN) is kept in the physical block, this moment this physical block except a physical block number PBN who gives according to its start address is arranged, also have a logical block number (LBN) LBN in addition.Then the logical page (LPAGE) in the logical block be mapped to the Physical Page in the corresponding physical block.When Physical Page is mapped with logical page (LPAGE), corresponding logical page number (LPN) (LPN) is kept in the Physical Page, this Physical Page also has a logical page number (LPN) LPN in addition except having one according to its physical page number PPN that start offset address is given in physical block at this moment.When physical block (page or leaf) not and logical block (page or leaf) when shining upon, just do not preserve logical block (page or leaf) number in the physical block (page or leaf).
(4), in RAM, set up the reverse mapping table of two-stage according to logical block number (LBN) in the physical block and the logical page number (LPN) in the Physical Page.First order mapping table is mapped to a unique physical block to each logical block in the logical space and gets on, first of first order mapping table belongs to logical block 0, be used to preserve logical block 0 corresponding physical piece number, second belongs to logical block 1, be used to preserve logical block 1 corresponding physical piece number, the rest may be inferred.Set up a second level mapping table for each logical block then, the Physical Page that the logical page (LPAGE) in this logical block is mapped in the corresponding physical block gets on.First of second level mapping table belongs to logical page (LPAGE) 0, is used to preserve logical page (LPAGE) 0 corresponding physical page number, and second belongs to logical page (LPAGE) 1, is used to preserve logical page (LPAGE) 1 corresponding physical page number, and the rest may be inferred.All logical page (LPAGE)s in logical block all are mapped in the same physical block.
(5) virtual disk of definition, it is made up of more than one sector (sector), is referred to as virtual sectors.Each virtual sectors big or small identical, and the sector of the size of virtual sectors and real disk is big or small identical, normally 512 bytes.The space that all virtual sectors are formed calls the Virtual Space.Specify a numbering (virtual sectors VSN) for each virtual sectors according to the start address of virtual sectors in Virtual Space order from small to large.The address that provides during the content of computer program (such as file system) on read-write flash storer is interpreted into virtual sectors number.
(6) set up the mapping of Virtual Space, each virtual sectors in the Virtual Space is mapped to a unique logical page (LPAGE) gets on to logical space.This mapping method is: a top M virtual sectors (being numbered 0~(M-1)) is mapped to first logical page (LPAGE) in first logical block, M virtual sectors in back to back back (be numbered M~(2M-1)) is mapped to first logical page (LPAGE) in second logical block, and the like, until first logical page (LPAGE) in last logical block; And then get back to first logical block, a follow-up back to back M virtual sectors is mapped to second logical page (LPAGE) in first logical block, until second logical page (LPAGE) in last logical block, the rest may be inferred, until last logical page (LPAGE) in last logical block.The number of the virtual sectors that each logical page (LPAGE) of the M here (also being each Physical Page) comprises, promptly M is exactly the merchant of the size of logical page (LPAGE) divided by the size of virtual sectors.The size of Virtual Space is identical with the size of logical space.Virtual address to the computing formula of logical address mapping method is:
offset=(VSN?mod?M),
LBN=(((VSN-offset)÷M)mod?N),
LPN=(((VSN-offset)÷M)-LBN)÷N,
Mod is modular arithmetic, just is divided by to get the computing of remainder.
VSN is the virtual sectors number of virtual sectors.
LBN is the logical block number (LBN) in the logical address.
LPN is the logical page number (LPN) in the logical address.
Offset is the page or leaf bias internal (being which virtual sectors in the logical page (LPAGE)) of logical page (LPAGE).
M is the number of the virtual sectors that comprises of each logical page (LPAGE) (also being each Physical Page), promptly the logical page (LPAGE) size be the virtual sectors size M doubly.
N is the piece number of logical block in the logical space.
During data on reading the flash storer, the address that computer program (such as file system) provides is interpreted into virtual sectors number, calculate the logical block number (LBN) and the logical page number (LPN) of virtual sectors correspondence earlier according to the method in aforementioned (6) step, and the skew in the page or leaf, according to the two-stage mapping table in aforementioned (4) step logical block number (LBN) and logical page number (LPN) are converted to corresponding physical piece number and physical page number again, in the Physical Page of corresponding physical block, begin reading of data then from the page or leaf bias internal.
When write data, the address that computer program (such as file system) provides also is interpreted into virtual sectors number, calculate the logical block number (LBN) and the logical page number (LPN) of virtual sectors correspondence earlier according to the method in aforementioned (6) step, and the skew in the page or leaf, according to the two-stage mapping table in aforementioned (4) step logical block number (LBN) and logical page number (LPN) are converted to corresponding physical piece number and physical page number again.If logical block does not have the corresponding physical piece, then distribute a new physical block to be mapped to this logical block.If logical block has the corresponding physical piece, but logical page (LPAGE) does not have the corresponding physical page or leaf, then looks for first not data of writing with the request of preserving of the Physical Page of write data (Physical Page that first is idle) in this physical block.If logical page (LPAGE) has corresponding Physical Page, promptly logical page (LPAGE) corresponding physical page or leaf then can not directly be write on this page or leaf with data, should read whole Physical Page among the RAM earlier, and according to page or leaf bias internal amount new data more in this RAM.In this physical block, look for first idle Physical Page then, the whole page data after upgrading in RAM is written to this free time Physical Page.The second level mapping table of this logical block of final updating, make logical page (LPAGE) in the logical block be mapped in the corresponding physical block on the Physical Page of new data.That Physical Page originally comprises old data, becomes dirty page or leaf, and dirty page or leaf can not be used for data and write, and is wiped free of up to the physical block that comprises it.If aforesaid that idle Physical Page can't find in this physical block, mapping method according to (6) step, having only whole Virtual Space all to use up, just the situation that whole logical space all uses up can take place, also is that all logical page (LPAGE)s all have been mapped to Physical Page in the logical block.Do not had idle Physical Page in the corresponding physical piece if the Virtual Space does not use up, then this physical block must comprise dirty page or leaf.At this moment reclaim this physical block earlier, to discharge the Physical Page that is taken by legacy data in this physical block.After recovery is finished, must find the whole page data after an idle Physical Page is preserved renewal in this physical block, upgrade the second level mapping table of this logical block simultaneously, logical page (LPAGE) is mapped on this new Physical Page.Physical Page originally comprises old data, becomes dirty page or leaf, will discharge when reclaiming this physical block next time.When in physical block, looking for idle Physical Page, always preferentially use the idle Physical Page of physical page number minimum.
The inventive method has kept some at least one physical blocks, and the physical block of these reservations is used for: 1) replace the bad piece that the flash storer in use forms, physical block number feasible and the logical block mapping remains unchanged.2) management data of realization system of storage the technical program is such as the concordance list of all bad pieces etc.Data conversion storage (being called transmission block) when 3) recycling.Reclaimer operation is selected a physical block (recovery physical block) that comprises dirty Physical Page earlier, then the content on the Physical Page that comprises valid data on this physical block is copied in the physical block of a reservation, wipe the recovery physical block at last, it is the idle physical block of a reservation that this recovery physical block just becomes, and reclaimer operation subsequently can come the unloading data with this piece.
The method that the hardware of NAND flash self provides Physical Page to divide, physical block is made up of a series of at least one Physical Page.Each Physical Page comprises the zone (the follow-up data field that is referred to as) that is used to preserve file data, and a bit of zone (the follow-up spare area that is referred to as) that is used to preserve the management information of physical block and Physical Page.The hardware of NOR flash does not provide the division methods of this Physical Page, the invention provides a division methods, a Physical Page is formed in one group of continuous fixed length zone of physical address, each Physical Page comprises the zone (data field) that is used to preserve file data, and a bit of zone (spare area) that is used to preserve the management information of Physical Page.The size of Physical Page data field is set at 512B, and the size of spare area is 2B~16B, according to how many decisions of the management information of Physical Page.To NORflash, each physical block has the sub-fraction 6B management information that is preserved for preserving physical block at least, such as the logical block number (LBN) of physical block correspondence, and the erasing times of physical block, the state of physical block etc.
In order to reduce demand to RAM, an improvement of the inventive method is the second level mapping table that omits each logical block, finish logical block number (LBN) after the conversion of physical block number, come of the conversion of completion logic page number by the method that scans the Physical Page in the corresponding physical block to physical page number, promptly, realize the function of logical block second level mapping table by in physical block, searching the method for the up-to-date Physical Page that comprises this logical page number (LPN).
Two-stage mapping table among the employed RAM of being placed on of the inventive method can be reconstructed in system start-up.During system start-up, scan each physical block,, then physical block number is write in the list item of this logical block number (LBN) correspondence if physical block has corresponding logical block number (LBN).If there are two physical blocks to correspond to same logical block number (LBN), then be when reclaiming physical block, power down to have taken place, scan two physical blocks, select to be mapped with physical block and this logical block number (LBN) correspondence of more effective logical page (LPAGE) then, the another one physical block is wiped free of.If effective number of physical pages that two physical blocks comprise is identical, then optional one and this logical block number (LBN) correspondence, the another one physical block is wiped free of.After all physical blocks all are scanned, first order mapping table reconstruct success.If system need make up second level mapping table in RAM, then begin to check from logical block 0, if physical block and logical block correspondence are arranged, each Physical Page on scanning and this logical block corresponding physical piece, if Physical Page has corresponding logical page number (LPN), then physical page number is write in the list item of this logical page number (LPN) correspondence.If there are two Physical Page to correspond to same logical page number (LPN), then select the big Physical Page of physical page number and this logical page number (LPN) correspondence.
The present invention has following substantial effect:
1) during realization of the present invention system change file data, successfully preserving new data before the flash storer, can not destroy the raw data of file, therefore whenever system's power down, can guarantee that perhaps data write, perhaps can recover original file data, improve the robustness of the reliability and the system of data.
When 2) writing data on the flash storer, write operation all will be wiped the flash piece earlier at every turn, has significantly reduced the erasing times of flash piece, has prolonged the serviceable life of flash and has improved the speed of writing.
3) mapping method of the virtual sectors that adopts of the present invention to the mapping method of logical block logical page (LPAGE) and logical block logical page (LPAGE) to the physical block Physical Page, (be virtual address to the conversion method of logical address and logical address to physical address conversion method), make the static data (data of very few modifications of file system, such as program code etc.) can as much as possible be distributed in the different physical blocks, therefore eliminated the formation (static zones refers to that whole spaces are used for the physical block of static data storage) of static region to the full extent, improve the use harmony of each flash physical block, prolonged the serviceable life of flash.The use of these mapping methods simultaneously, made before whole address space uses up, always have the not Physical Page of usefulness in the physical block, the Physical Page of present not usefulness can use as upgrading the zone temporarily in the physical block, so needn't reserve the renewal zone of fixed qty in each physical block.Improved the space availability ratio of flash storer.
4) distribution method of idle Physical Page of the present invention has guaranteed that the Physical Page in each physical block writes in a sequential manner.Therefore technical scheme of the present invention goes for various NAND flash models.Carry out page or leaf by the physical block to NOR flash and divide, technical scheme of the present invention can be used for NOR flash simultaneously.
5) provide distribution and management method based on the access interface and the flash storer of sector, make flash storer energy and disk compatibility, farthest reused existing OS program (file system), allow existing file system can be used for the flash memory devices, made things convenient for the structure of whole application system and improved versatility without revising.The inventive method is applicable to various flash storer, and has good storage administration performance, has showed wide application, and economic benefit is very remarkable.
Description of drawings
Fig. 1 is the synoptic diagram of each functional part of a system of realization according to the present invention.
Fig. 2 is the synoptic diagram according to the application examples of the method for organizing of NAND flash storer of the present invention.
Fig. 3 is the synoptic diagram according to the application examples of the management data in the NAND flash Physical Page of the present invention spare area.
Fig. 4 is the synoptic diagram according to the application examples of the method for organizing of NOR flash storer of the present invention.
Fig. 5 a is the synoptic diagram according to the embodiment of the management data in the NOR flash build of the present invention portion.
Fig. 5 b is the synoptic diagram according to the embodiment of the management data in the NOR flash Physical Page of the present invention spare area.
Fig. 6 is the synoptic diagram of virtual address according to the present invention to the embodiment of the mapping method of logical address.
Fig. 7 is according to the synoptic diagram of logical address of the present invention to the embodiment of the mapping method of physical address.
Fig. 8 is the view of each Physical Page of physical block embodiment illustrated in fig. 7.
Among Fig. 8: Valid-active page, the dirty page or leaf of Dirty-, Free-free page.
Fig. 9 is that the virtual sectors of the embodiment of the invention is read FB(flow block).
Figure 10 is that the virtual sectors of the NOR flash of the embodiment of the invention is write FB(flow block).
Figure 11 is that the virtual sectors of the NAND flash of the embodiment of the invention is write FB(flow block).
Figure 12 is the recycling FB(flow block) of dirty page or leaf on the physical block of the embodiment of the invention.
Figure 13 a is the state of the physical block of a physical block before reclaimer operation is carried out of the embodiment of the invention.
Figure 13 b is the state of the physical block of a physical block after reclaimer operation is carried out of the embodiment of the invention.
Figure 14 is the virtual sectors deletion FB(flow block) of the NOR flash of the embodiment of the invention.
Figure 15 is the virtual sectors deletion FB(flow block) of the NAND flash of the embodiment of the invention.
Figure 16 is the set up FB(flow block) of the logical block number (LBN) (LBN) of the embodiment of the invention to the mapping table of physical block number (PBN).
Figure 17 is the set up FB(flow block) of the logical page number (LPN) (LPN) of embodiment of the invention logical block when being used for NOR flash to the mapping table of physical page number (PPN).
Figure 18 is the set up FB(flow block) of the logical page number (LPN) (LPN) of embodiment of the invention logical block when being used for NAND flash to the mapping table of physical page number (PPN).
Specific implementation
By specific embodiment, and in conjunction with the accompanying drawings, the technology of the present invention originating party case is described in further detail, advantage of the present invention and characteristics can more clearly be presented.But method of the present invention is not subjected to the restriction of following embodiment, and available various similar mode realizes.
Each functional part of the canonical system of realizing according to the present invention as shown in Figure 1.It is made of microprocessor 10, ROM 12, RAM 14, Flash Memory controller 16 and Flash storer 18.The method that the application of the invention provides, Flash Memory controller 16 provides a virtual address space based on the sector visit, Flash storer 18 has been modeled into the non-volatile memory apparatus that can repeatedly read and write, microprocessor 10 and corresponding OS program are sent read write command as the visit disk, number read and write data in flash storer 18 with the virtual sectors in the virtual address space.
The method for organizing application examples of NAND flash storer as shown in Figure 2, in specific embodiments of the invention, NAND flash memory devices comprises an independent flash subregion 20.Flash subregion 20 is divided into series of physical piece 21.Each physical block 21 is divided into series of physical page or leaf 22 again.Each Physical Page 22 is formed data field 24 and spare area 26 by two parts.Data field 24 is used for store file data, and spare area 26 is used for the management data of storage administration physical block and Physical Page.For NAND flash storer, the division of physical block and Physical Page, and the division of Physical Page inside is by the ardware feature decision of NAND flash.The data structure of the management data in the NAND flash Physical Page spare area 26 as shown in Figure 3, the information that comprises in the data structure has: the error correcting code ECC 38 of the data of storing in the piece LBN 36 of the logical block of the page number LPN 34 of the logical page (LPAGE) of the state of each sector in the Physical Page (Sector state 32, Sector state 33), this Physical Page correspondence, the erase count 35 of this Physical Page place physical block, this Physical Page place physical block correspondence, the bulk state 37 of this Physical Page place physical block and this Physical Page.The state of physical block has: Bad (bad piece), Valid (active block).All there is a corresponding states indication territory each sector in the Physical Page in spare area 26, be used for illustrating the state of each sector of this Physical Page, the state of sector has: Free (sector is idle), Valid (sector comprises valid data), Deleted (data in the sector are deleted).Each Physical Page data field comprises the just explanation for example of two sectors among the NAND flash embodiment, and according to design of the present invention, the size of Physical Page data field can be the size of an arbitrary integer sector.
If each sector all is the Free state in the Physical Page, that just claims that this Physical Page is the Free state.If each sector all is the Deleted state in the Physical Page, that just claims that this Physical Page is the Deleted state.If the state of certain sector is Valid in the Physical Page, that just claims that this Physical Page is the Valid state.The state of Physical Page is free, illustrate that this Physical Page is not written into data, this Physical Page is a free page, the state of Physical Page is valid, illustrates that this Physical Page comprises active data, but the not necessarily up-to-date data of data in this page or leaf, the Physical Page that has in the same physical block more than 1 corresponds to same logical page (LPAGE), and state all is Valid, and only the Physical Page of physical page number maximum is comprising up-to-date data, and what other Physical Page comprised is the data that are replaced.The state of Physical Page is Deleted, and expression is released in logical space with the logical page (LPAGE) of this Physical Page mapping, also be in the same physical block before this Physical Page all to be mapped to the Physical Page of this logical page (LPAGE) also all simultaneously deleted.The state of the physical block of NAND flash is valid, illustrates that this piece can be used for the storage of data.The state of physical block is bad, illustrates that this piece is a bad piece, can not be used further to data storage.
The method for organizing application examples of NOR flash storer as shown in Figure 4, in specific embodiments of the invention, NOR Flash memory devices comprises an independent Flash subregion 40.Flash subregion 40 is divided into series of physical piece 42, and to NOR flash storer, the division of physical block is by the ardware feature decision of NORflash.The method that the application of the invention provides, each physical block 42 of NOR Flash storer is divided into again: a build portion (Block Header) 43, series of physical page or leaf 44, and according to the difference of physical block size, each physical block afterbody has a remaining area 45, and its size is less than the size of a Physical Page 44.Each Physical Page 44 is divided into spare area 46 and data field 47 two parts again, and data field 47 is used for store file data, and spare area 46 is used for the management data of storage administration Physical Page.Build portion 43 is used for the management data of storage administration physical block.The data structure of the management data in the build portion 43 is shown in Fig. 5 a, and the information that comprises in the data structure has: the erase count 51 of this physical block, the piece LBN 52 of the logical block of this physical block correspondence, and the state 53 of physical block.The state of physical block has: Free (free block) and Valid (active block).The data structure of the management data in the Physical Page spare area 46 is shown in Fig. 5 b, and the information that comprises in the data structure has: the state 54 of each sector in the Physical Page, and the page number LPN 55 of the logical page (LPAGE) of this Physical Page correspondence.The sector state has: Free (free sector), Pending (toward the sector write data), Valid (comprising valid data in the sector), Invalid (data in the sector are invalid).Each Physical Page data field comprises the just explanation for example of a sector among the NOR flash embodiment, and according to principle of the present invention, Physical Page data field size can be the size of an arbitrary integer sector.To NOR flash, consider the easy of specific implementation, recommending the size of Physical Page data field is the size of a sector.
If each sector all is the Free state in the Physical Page, that just claims that this Physical Page is the Free state.If each sector all is the Invalid state in the Physical Page, that just claims that this Physical Page is the Invalid state.If the state of certain sector is Valid in the Physical Page, that just claims that this Physical Page is the Valid state.The state of Physical Page is free, illustrates that this Physical Page is not written into data, and this Physical Page is a free page; The state of Physical Page is valid, illustrates that this Physical Page comprises active data; The state of Physical Page is invalid, illustrates that the data that this Physical Page comprises are all invalid, and this Physical Page is a dirty page or leaf.The state of the physical block of NORflash is valid, illustrates that this physical block comprises effective data message; The state of physical block is free, illustrates that this physical block is idle at present, is the physical block that keeps.
Virtual address of the present invention to the embodiment of the mapping method of logical address as shown in Figure 6.At first logical address space is divided into a series of logical block 62, and logical block 62 is divided into a series of logical page (LPAGE) 63 more then.Big or small identical (if NOR is the Flash, then big or small identical with Physical Page 44) of the size of logical page (LPAGE) 63 and Physical Page 22.Big or small identical (if NOR is the Flash, then big or small identical with physical block 42) of the size of logical block 62 and physical block 21.Virtual address space 60 is divided into a series of virtual sectors 61.The size of logical page (LPAGE) 63 is twices of virtual sectors 61 sizes.The size of logical page (LPAGE) is the just explanation for example of twice of virtual sectors size, according to design of the present invention, the logical page (LPAGE) size can be the virtual sectors size arbitrary integer doubly.Virtual address to the mapping method of logical address is: per 2 virtual sectors 61 are mapped to a logical page (LPAGE) 63 in the logical block 62, first logical page (LPAGE) 63 that virtual sectors 61 is mapped to earlier in each logical block 62 successively, then be mapped to second logical page (LPAGE) 63 in each logical block 62 successively, the rest may be inferred, to the last 2 virtual sectors (VSN=2KN-2) and (VSN=2KN-1) be mapped to last logical page (LPAGE) (LPN=K-1) in last logical block (LBN=N-1).
When the data of read-write among the flash, the address of read-write is interpreted into the virtual sectors number (VSN) in the virtual address space.At first this virtual sectors number is converted into logical address, i.e. logical block number (LBN) (LBN) and logical page number (LPN) (LPN) and page or leaf bias internal (offset), and offset points out it is which sector in the page or leaf.The computing formula of conversion method is:
offset=(VSN?mod?M),
LBN=(((VSN-offset)÷M)mod?N),
LPN=(((VSN-offset)÷M)-LBN)÷N,
In the formula: mod is modular arithmetic, just is divided by to get the computing of remainder.
M is the number of the virtual sectors that comprises of each logical page (LPAGE) (also being each Physical Page), promptly the logical page (LPAGE) size be the virtual sectors size M doubly, present embodiment is example with M=2,
N is the piece number of logical block in the logical space.
And then logical address is converted to physical address, as shown in Figure 7.First order mapping table 70 also is the piece mapping table, and it is an index with logical block number (LBN) LBN, and the PBN the LBN of logical block 62 converts corresponding physical block 21 to realizes the mapping of logical block to physical block.The second level mapping table 72 of logical block is an index with logical page number (LPN) LPN, and the LPN of logical page (LPAGE) 63 is converted to the PPN of corresponding Physical Page 22, realizes the mapping of the Physical Page of logical page (LPAGE) in the corresponding physical block in this logical block.Be index at first, from the list item 71 of first order mapping table 70, obtain the PBN of corresponding physical block with the LBN in the logical address.By the second level mapping table 72 of this logical block, be index obtains corresponding Physical Page from the list item 73 of correspondence PPN again with LPN.Interior skew is the same with logical page (LPAGE) in skew in the Physical Page, so the offset in the logical address is directly as the offset in the physical address.Finished the conversion of logical address (LBN:LPN:offset) like this to physical address (PBN:PPN:offset).Because logical address is identical with offset in the physical address, follow-uply during to physical address translations, the conversion of (LBN:LPN) to (PBN:PPN) is only described in the description logic address.In this example, LBN be 2 logical block to be mapped to PBN be 100 physical block, and the logical page (LPAGE) of LPN=1 is mapped to the Physical Page of the PPN=0 in the PBN=100 physical block in this logical block.
Fig. 8 shows the state of each Physical Page on the physical block of physical block number PBN=100 indication, and the mapping relations of Physical Page-logical page (LPAGE), and this mapping is corresponding to logical page (LPAGE)-Physical Page mapping of Fig. 7 example.Page map table 72 among Fig. 7 is mapped to Physical Page to logical page (LPAGE), and promptly logical page (LPAGE) 0 (LPN=0) is mapped to Physical Page 2 (PPN=2), and logical page (LPAGE) 1 is mapped to Physical Page 0, and logical page (LPAGE) 2 is mapped to Physical Page 5 ...In Fig. 8, show a reverse mapping, Physical Page is to the mapping of logical page (LPAGE), and promptly Physical Page 0 is mapped to logical page (LPAGE) 1, and Physical Page 1 is mapped to logical page (LPAGE) 3, and Physical Page 2 is mapped to logical page (LPAGE) 0, and Physical Page 5 is mapped to logical page (LPAGE) 2 ...
Fig. 9 shows the flow process of read operation.In a read operation, corresponding address is interpreted into virtual sectors number, this virtual sectors number is converted into logical block number (LBN) and logical page number (LPN) and page or leaf bias internal earlier, then by first order mapping table 70, logical block number (LBN) converts corresponding physical block number to, by the second level mapping table 72 of this logical block, logical page number (LPN) converts corresponding physical page number to, and the page or leaf bias internal of appointment begins to read required data in this Physical Page at last.Idiographic flow is:
S900: number (VSN) converts logical address (LBN:LPN:offset) to virtual sectors;
S902:, logical block number (LBN) LBN is converted to corresponding physical block number PBN by first order mapping table 70;
S904: by the second level mapping table 72 of this logical block, logical page number (LPN) LPN is converted to corresponding physical page number PPN then;
S906: the offset skew from (PBN:PPN) indication Physical Page begins reading corresponding data then.
In a write operation, corresponding address is interpreted into virtual sectors number, and this virtual sectors number is replaced by logical block number (LBN) and logical page number (LPN) and page or leaf bias internal earlier.If this logical block number (LBN) does not have corresponding effective physical block number, physical block and this logical block correspondence of then distributing a free time, upgrade first order mapping table then and make logical block and physical block correspondence, in this physical block, distribute the Physical Page (being first idle Physical Page) of a free time then according to physical deflection order (also being physical page number order from small to large) from small to large, write data into this Physical Page, the second level mapping table of this logical block of final updating.If this logical block number (LBN) has corresponding effective physical block number, second level mapping table by this logical block, check this logical page (LPAGE) corresponding physical page or leaf, if there is not the corresponding physical page or leaf, then in this physical block, according to the physical page number Physical Page of a free time of order assignment from small to large (being first idle Physical Page), data are write this Physical Page, the second level mapping table of this logical block of final updating.If logical block has the corresponding physical piece, and logical page (LPAGE) has the corresponding physical page or leaf, then earlier the content of this Physical Page is read among the RAM, according to the page or leaf bias internal, revise related data, in this physical block, look for first idle Physical Page then, amended data are write this free time Physical Page, the second level mapping table of this logical block of final updating.
Referring to Figure 10, the virtual sectors write operation flow process of the NOR flash of embodiment, this process flow diagram shows the write operation method of NOR flash:
S1000: number (VSN) converts logical address (LBN:LPN:offset) to virtual sectors;
S1010:, then change S1020 if LBN does not have corresponding effective physical block number (PBN); If LBN has corresponding effective physical block number (PBN), change S1030;
S1020: distribute the physical block of a free time, upgrade first order mapping table 70 then and make logical block and physical block correspondence, change S1030 at last;
S1030:, check that LPN whether to effective PPN should be arranged, checks promptly whether logical page (LPAGE) has the corresponding physical page or leaf by the second level mapping table 72 of this logical block; If the corresponding physical page or leaf is arranged, change S1040; If there is not the corresponding physical page or leaf, change S1050;
S1040: the content of corresponding Physical Page is read among the RAM, and, revise the data of upgrading appropriate section, change S1050 then according to page or leaf bias internal (offset);
S1050: check whether idle Physical Page is arranged in this physical block; If there is not idle Physical Page, change S1060; If idle Physical Page is arranged, change S1070;
S1060: reclaim this physical block, so that the dirty page or leaf in this physical block can be reused for the storage data;
S1070: in this physical block, look for first idle Physical Page (being the little idle Physical Page priority allocation of page number), up-to-date data are write this Physical Page;
S1080: if this logical page (LPAGE) had the corresponding physical page or leaf originally, each sector in the then original corresponding physical page or leaf state be set to invalid;
S1090: upgrade the second level mapping table of this logical block, make LPN be mapped to the PPN of newly assigned Physical Page.
The write operation flow process of NAND flash is referring to Figure 11.Earlier virtual address VSN is converted to logical address (LBN, LPN, offset) (S1100).If LBN does not have corresponding effective PBN (S1110), physical block and this logical block correspondence of then distributing a free time, upgrade first order mapping table 70 then and make logical block and physical block correspondence (S1120), second level mapping table 72 by this logical block, check whether logical page (LPAGE) (LPN) has corresponding physical page or leaf (S1130), if the corresponding physical page or leaf is arranged, earlier the content of corresponding Physical Page is read among the RAM, according to the page or leaf bias internal, revise the data (S1140) of appropriate section, then, no matter whether logical page (LPAGE) has the corresponding physical page or leaf, in this physical block, look for first idle Physical Page (being the little idle Physical Page priority allocation of page number), up-to-date data are write this Physical Page (S1170), the second level mapping table of this logical block of final updating makes LPN be mapped to the PPN (S1180) of newly assigned Physical Page.If there is not idle Physical Page (S1150) in this physical block, then this physical block need be done recycling (S1160) earlier.To NAND flash, the state of each sector in the original corresponding physical page or leaf of logical page (LPAGE) is not set to invalid, so that the present invention can be used for having order to write the NAND flash of requirement to the Physical Page of physical block, the while also can reduce the indegree of writing to the Physical Page of NAND flash.Same piece of data new and old can judge that the Physical Page that page number is big comprises new data according to the page number size of the Physical Page that comprises data.
Writing in the flow process of Figure 10 and Figure 11, if can't find idle Physical Page in the physical block, then this physical block need be done recycling, to discharge the Physical Page (dirty page or leaf) that comprises legacy data or invalid data in this physical block, makes these Physical Page can be used for the data of storage update.As previously mentioned, the system that uses the present invention to realize is keeping some idle physical blocks in physical space, as the transmission block in the recycling.
Referring to Figure 12, the figure shows the recycling flow process of dirty page or leaf on the physical block of the embodiment of the invention.Select the physical block of a free time as transmitting physical piece (S1200) earlier.Scan each list item 73 of the second level mapping table 72 of the logical block that is recovered the physical block correspondence then, list item (S1210) from LPN 0 correspondence, if LPN corresponding physical page number (PPN) is (S1220) effectively, then the content of the Physical Page of this physical page number indication is read earlier in first idle Physical Page of writing transmission block again (S1230), promptly in the transmitting physical piece, preferentially write the little idle Physical Page of page number, the content that only is in the sector of valid state during copy in each Physical Page is copied, upgrade second level mapping table then, LPN is mapped to the PPN (S1240) of this Physical Page in the transmission block, then next logical page number (LPN) is carried out same processing procedure (S1250); If logical page number (LPN) LPN corresponding physical piece number invalid (S1220) is then directly carried out aforesaid processing procedure (S1250) to next logical page number (LPN).Above process is carried out logical page number (LPN) LPN always and is arrived (S1260) till the largest logical page number.At last the physical block that is recovered is wiped,, be can be used as new transmission block again, upgrade the PBN (S1270) of first order mapping table mapping LBN simultaneously to original transmission block its free block as a reservation.In order to reduce the probability of carrying out the physical block reclaimer operation in the write operation process, make write operation can in physical block, find idle Physical Page as much as possible, the present invention proposes periodically to reclaim the design of physical block, and physical block recovery process promptly shown in Figure 12 can periodically be performed.
Referring to Figure 13 a and Figure 13 b,, it shows the state preceding and recovery back physical block that reclaims.The Physical Page that comprises valid data on the physical block that is recovered (corresponding to logical block number (LBN) LBN=2) copies on the transmitting physical piece in order, then the physical block (corresponding to logical block 2) that is recovered is wiped, become an idle physical block, no longer correspond to logical block 2, and copy there is the former transmitting physical piece of valid data to correspond to logical block 2.
By the method that this new and old Physical Page is replaced, the used storage space of OS program (such as file system) has just had the repeatedly ability of read-write.Owing to be not that each write operation all needs to carry out earlier to wipe, thereby prolonged the serviceable life of flash memory devices, improved the write performance of system yet.In addition, before new data successfully writes, can not lose old data earlier, even there is the situation of power down to take place in writing the process of new data, data originally can not lost yet, and have improved the robustness of system.And the present invention according to PPN order assignment from small to large, has therefore also satisfied the requirement of high capacity NAND flash memory devices to the Physical Page needs sequential write in the physical block when distributing idle Physical Page at every turn.OS program (such as file system) is when the storage data, always use continuous virtual sectors section as much as possible, and the usefulness virtual sectors of trying one's best number little sector (beginning to distribute) from low address, according to the conversion method of aforesaid virtual address to logical address, continuous virtual sectors is dispersed in each logical block uniformly, also promptly be dispersed in each physical block uniformly, this makes the physical block that being dispersed in of static data maximum possible is different, also with regard to the elimination of maximum possible the formation of static region, make each physical block prolonged the serviceable life of whole flash equipment by average use.And because continuous virtual sectors is dispersed in each logical block uniformly, (also promptly all virtual sectors have all dispensed so unless all logical page (LPAGE)s in the logical block all have been assigned with away, the Virtual Space of system has been used up), otherwise the quantity of Physical Page is always more than the quantity of the logical page (LPAGE) that is assigned with away in this logical block in the corresponding physical piece, like this during the content in upgrading the logical page (LPAGE) of this logical block, these quantitatively additional Physical Page can be used as update area and use, therefore just need not reserve Physical Page in each physical block and specialize in update area, improve the utilization ratio of flash.
When OS program (such as file system) deleted file, the content of virtual sectors that belongs to this document is just invalid, at this moment need to delete the sector of the correspondence in the corresponding Physical Page of virtual sectors on flash equipment, to discharge this segment space, can reduce the physical block that comprises the related physical page or leaf like this and in recycling, need the sector number that copies, therefore saved the time of recycling, and discharge Physical Page timely, more Physical Page can be arranged as update area, reduce the erasing times of physical block, prolonged the serviceable life of flash.
Figure 14 is the virtual sectors deletion flow process of the present invention embodiment of being used for NOR flash, when receiving that a delete command is deleted certain virtual sectors, earlier virtual sectors VSN is converted to logical address (LBN:LPN:offset) (S1401), if logical block does not have corresponding physical piece (S1402), finish deletion action.If corresponding physical piece (S1402) is arranged, but logical page (LPAGE) does not have corresponding physical page or leaf (S1403), finishes deletion action.If it is not valid (S1404) that the state of the sector of corresponding Physical Page (S1403) and skew offset correspondence is arranged, finish deletion action.If the state of the sector of skew offset correspondence is valid (S1404), then the state of this sector is become invalid (S1405), if at this moment this Physical Page no longer comprises the sector (S1406) of any valid state, then upgrade the mapping of LPN to PPN, this LPN is mapped to invalid PPN value (S1407), and promptly this LPN is not mapped to any PPN.
Figure 15 is the virtual sectors deletion flow process of the present invention embodiment of being used for NAND flash, and the processing procedure of previous section S1501~S1504 is the same with NOR flash.If the state of the sector of skew offset correspondence is valid (S1504), and idle Physical Page (S1505) is arranged in this physical block, the content of whole Physical Page is read among the RAM, the state of the sector of change offset correspondence is deleted (S1506) in RAM, in this physical block, find out first idle Physical Page then, data after the change are write this Physical Page, and the state of this sector correspondence is exactly deleted (S1506) like this.If no longer comprise the sector (S1508) of any valid state in this Physical Page, then upgrade the mapping of LPN to PPN, this LPN just is not mapped to any PPN, and also promptly this LPN is mapped to invalid PPN value (S1509).If there is not idle physical block (S1505) in this physical block, then reclaim this physical block, and in removal process, do not copy the data (S1507) in the sector of offset correspondence in this Physical Page, discharge the space of this sector thus.
Referring to Figure 16, the logical block number (LBN) (LBN) that the figure shows the embodiment of the invention is to the flow process of setting up of the mapping table of physical block number (PBN).When system start-up,, begin to scan each physical block (S1601) of flash subregion from first physical block (PBN=0) in order to set up first order mapping table.Obtain the logical block number (LBN) LBN and the bulk state (S1602) of this physical block correspondence; To NAND flash, the LBN of physical block and bulk state are kept at the spare area of the Physical Page that belongs to this physical block; To NOR flash, the LBN of physical block and bulk state are kept at the head of physical block; NAND flash if the bulk state indication is a bad piece, is then directly skipped over this piece.The if block state is not valid, the LBN that perhaps obtains invalid the largest logical piece number of system (promptly greater than) (S1603), then to be taken as be idle physical block (S1604) to this physical block.The if block state is valid and the LBN that obtains effectively (S1603), then scans this physical block, sets up the mapping table between the PPN and LPN in this physical block, also the i.e. second level mapping table (S1605) of this logical block.The set up flow process such as Figure 17 and Figure 18 of second level mapping table are described.If this LBN does not also have corresponding PBN (S1606) in the first order mapping table, then LBN is mapped to current PBN (S1607).If in mapping table, LBN and effectively PBN mapping, the power down that illustrates then that something unexpected happened in the recycling process of physical block, being mapped in two physical blocks of same LBN has one to be original physical block.The Physical Page number (also promptly being in the number of the sector of valid state) that relatively is mapped to logical page (LPAGE) in these two physical blocks (S1608), selection is mapped with the physical block of more logical page (LPAGE)s as original physical block, and LBN is mapped to the PBN (S1609) of this physical block, wipe the another one physical block, make him become the physical block (S1610) of a free time.If the Physical Page in two physical blocks is mapped with as many logical page (LPAGE), the then PBN of an optional physical block and LBN mapping is wiped the another one physical block then and is made it become an idle physical block.Then handle next physical block (S1611), after all physical blocks all are scanned (S1612), first order mapping table has just been set up, and the second level mapping table of each logical block has also been set up simultaneously.
Referring to Figure 17, this process flow diagram shows the process of setting up of second level mapping table of the logical block of NOR flash physical block correspondence.From first Physical Page (PPN=0), scan whole physical block (S1701), obtain the logical page number (LPN) LPN of current Physical Page correspondence, and the state (S1702) of interior all sectors of this physical block.If each sector in the Physical Page all be Free state (being that Physical Page is idle) (S1703), according to aforesaid Physical Page distribution method, follow-up Physical Page also all is idle in this physical block, so the second level mapping table of this logical block is set up and finished.If it is valid state (S1704) that the sector is arranged in the Physical Page, then this LPN and current PPN are set up mapping (S1705).If there is not the sector of valid state in the Physical Page, then get along well current PPN of LPN sets up mapping.Then handle next Physical Page (S1706) with above-mentioned same quadrat method, if all Physical Page in the physical block have all scanned (S1707), the second level mapping table of the logical block of this physical block correspondence is set up and is finished.
Referring to Figure 18, this process flow diagram shows the process of setting up of second level mapping table of the logical block of NAND flash physical block correspondence.From first Physical Page (PPN=0), scan the Physical Page (S1801) of whole physical block, obtain the logical page number (LPN) LPN of this Physical Page correspondence, and this physical block in all sectors state (S1802).If each sector in the Physical Page all be Free state (being that Physical Page is idle) (S1803), according to aforesaid Physical Page distribution method, follow-up Physical Page also all is idle in this physical block, so the second level mapping table of this logical block is set up and finished.If each sector in the Physical Page all is Deleted state (S1804), then this LPN is mapped to invalid PPN (S1805), is the valid state if Physical Page has the sector, then this LPN and current PPN is set up mapping (S1806).Then handle next Physical Page (S1807) with above-mentioned same quadrat method.If all Physical Page in the physical block have all scanned (S1808), the second level mapping table of the logical block of this physical block correspondence is set up and is finished.
In order to save demand to RAM, an optimization method of the present invention is to simplify logical address to the used mapping table of physical address translations, only set up the mapping table (be first order mapping table) of logical block, and each logical block is not set up the mapping table (be second level mapping table) of logical page (LPAGE) to Physical Page to physical block.For finishing the mapping of LPN to PPN, according to each Physical Page in the physical page number PPN sequential scanning logical block corresponding physical piece from big to small, from the spare area of Physical Page, search corresponding LPN, the Physical Page that comprises this LPN that first finds is exactly the Physical Page that this LPN logical page (LPAGE) is shone upon, if can't find the Physical Page that comprises this LPN, think that then this LPN is mapped to invalid PPN, so just finished the mapping of LPN to PPN.The present invention only need set up first order mapping table thus, and promptly LBN has saved a large amount of RAM demands to the mapping table of PBN.
Though specific implementation of the present invention is that example is described with NOR flash and NAND flash, the basic technical scheme of storage administration of the present invention also can be used for other and flash to be had on the equipment of similar operations characteristic, such as AND flash etc.When specific implementation, do a bit adaptive modification with this method.

Claims (10)

1. based on the storage administration of the flash storer of sector visit, its memory management method comprises the following steps:
(1) physical space of definition Flash storer
A. at first according to the physical arrangement of flash storer, its storer is divided into more than one, be referred to as physical block, each physical block big or small identical specifies a numbering PBN (physical block number) for each physical block according to physical block start address order from small to large;
B. then each physical block is divided into more than one page or leaf, is referred to as Physical Page, each Physical Page big or small identical; Each Physical Page in the physical block specifies a numbering PPN unique in this physical block (physical page number) for each Physical Page according to its start offset address order from small to large in physical block;
C. the space of being made up of all physical blocks is called physical space;
(2) logical storage area of definition
A. it is divided into more than one, be referred to as logical block, each logical block big or small identical, and the size of logical block and physical block is big or small identical, each logical block all has a logical address, specifies a numbering LBN (logical block number (LBN)) for each logical block according to the start address of logical block in logical space order from small to large;
B. then each logical block is divided into more than one page or leaf, is referred to as logical page (LPAGE), each logical page (LPAGE) big or small identical, and the size of logical page (LPAGE) and Physical Page is big or small identical; Each logical page (LPAGE) in the logical block specifies a numbering LPN unique in this logical block (logical page number (LPN)) for each logical page (LPAGE) according to its start offset address order from small to large in logical block;
C. the space of being made up of all logical blocks is called logical space;
(3) set up the mapping of logical space and physical space
A. each logical block all can be mapped to a unique physical block, but is not that each physical block all can be mapped to a logical block, and each physical block is mapped in the logical block at the most; Physical space is retained some at least one physical blocks with replacement or transmission block or stored configuration management data as bad piece, these physical blocks that are retained are not mapped to any logical block, so the logical block number in the logical space needs not to be identical with physical block number in the physical space;
B. when physical block is mapped with logical block, corresponding logical block number (LBN) is kept in the physical block, this moment, this physical block was except having a physical block number PBN who gives according to its start address, in addition also to a logical block number (LBN) LBN should be arranged;
C. then the logical page (LPAGE) in the logical block be mapped to the Physical Page in the corresponding physical block; When Physical Page is mapped with logical page (LPAGE), corresponding logical page number (LPN) LPN is kept in the Physical Page, this moment, this Physical Page was except having one according to its physical page number PPN that start offset address is given in physical block, in addition also to a logical page number (LPN) LPN should be arranged; When physical block or page or leaf not and when logical block or page or leaf mapping, just do not preserve logical block number (LBN) or page number in physical block or the page or leaf;
(4), in RAM, set up the reverse mapping table of two-stage according to logical block number (LBN) in the physical block and the logical page number (LPN) in the Physical Page
A. set up first order mapping table earlier, each logical block in the logical space be mapped to a unique physical block get on:
First of first order mapping table belongs to logical block 0, is used to preserve logical block 0 corresponding physical piece number, and second belongs to logical block 1, is used to preserve logical block 1 corresponding physical piece number; The rest may be inferred, and last of first order mapping table belongs to last logical block, is used to preserve last logical block corresponding physical piece number;
B. set up a second level mapping table for each logical block then, the Physical Page that the logical page (LPAGE) in this logical block is mapped in the corresponding physical block gets on:
First of second level mapping table belongs to logical page (LPAGE) 0, be used to preserve logical page (LPAGE) 0 corresponding physical page number, second belongs to logical page (LPAGE) 1, be used to preserve logical page (LPAGE) 1 corresponding physical page number, the rest may be inferred, and all logical page (LPAGE)s in logical block all are mapped on each Physical Page in same physical block;
(5) virtual disk of definition
A. it is made up of more than one sector, is referred to as virtual sectors; Each virtual sectors big or small identical, and the sector in the size of virtual sectors and the real disk is big or small identical, normally 512 bytes;
B. the space of being made up of all virtual sectors is called the Virtual Space; Specify a numbering VSN (virtual sectors number) for each virtual sectors according to the start address of virtual sectors in Virtual Space order from small to large;
C. during the content of the program of computing machine (such as file system) on read-write flash storer, the address that provides is interpreted into virtual sectors number;
(6) set up the mapping of Virtual Space, each virtual sectors in the Virtual Space is mapped to a unique logical page (LPAGE) gets on to logical space; This mapping method is:
A. earlier the foremost is numbered 0~(M-1) M virtual sectors and is mapped to first logical page (LPAGE) in first logical block, M the virtual sectors that and then back is numbered M~(2M-1) is mapped to first logical page (LPAGE) in second logical block again, and the like, up to first logical page (LPAGE) that a back back to back M virtual sectors is mapped in last logical block;
B. then, mapping is set up in continuation in first logical block, a follow-up back to back M virtual sectors is mapped to second logical page (LPAGE) in first logical block, until a back back to back M virtual sectors is mapped to second logical page (LPAGE) in last logical block; The rest may be inferred, up to last logical page (LPAGE) that a back back to back M virtual sectors is mapped in last logical block;
M is the number of the virtual sectors that comprises of each logical page (LPAGE), and promptly the M value is the merchant of the size of logical page (LPAGE) divided by the size of virtual sectors, and the size of Virtual Space is identical with the size of logical space;
C. virtual address to the computing formula of logical address mapping method is:
offset=(VSN?mod?M);
LBN=((VSN-offset)÷M)mod?N);
LPN=(((VSN-offset)÷M)-LBN)÷N;
In the formula: mod is modular arithmetic (is divided by and gets remainder);
VSN is the virtual sectors number of virtual sectors;
LBN is the logical block number (LBN) in the logical address;
LPN is the logical page number (LPN) in the logical address;
Offset is the page or leaf bias internal of logical page (LPAGE), i.e. which virtual sectors in the logical page (LPAGE);
M is the number of the virtual sectors that comprises of each logical page (LPAGE) (also being each Physical Page), promptly the logical page (LPAGE) size be the virtual sectors size M doubly;
N is the piece number of logical block in the logical space.
2. method according to claim 1 is characterized in that: during the data of the computer program (such as file system) of described step (5) on reading the flash storer, the address that provides is interpreted into virtual sectors number, and read operation comprises:
A. calculate the logical block number (LBN) and the logical page number (LPN) of virtual sectors correspondence earlier, and the skew in the page or leaf;
B. according to the two-stage mapping table logical block number (LBN) and logical page number (LPN) are converted to corresponding physical piece number and physical page number again;
C. in the Physical Page of corresponding physical block, begin reading of data then from the page or leaf bias internal.
3. method according to claim 1 is characterized in that: the computer program (such as file system) of described step (5) is when writing data to the flash storer, and the address that provides also is interpreted into virtual sectors number, and write operation comprises:
A. calculate the logical block number (LBN) and the logical page number (LPN) of virtual sectors correspondence earlier, and the skew in the page or leaf;
B. according to the two-stage mapping table logical block number (LBN) and logical page number (LPN) are converted to corresponding physical piece number and physical page number again;
C. the data of the Physical Page of this physical block number and the addressing of physical page number institute are read among the RAM, and according to page or leaf bias internal amount new data more in this RAM; In this physical block, look for first not Physical Page of write data (Physical Page that first is idle) then, the whole page data after upgrading in RAM is written to this free time Physical Page by physical page number order from small to large;
D. upgrade the second level mapping table of this logical block, make logical page (LPAGE) in the logical block be mapped in the corresponding physical block on the Physical Page of new data.
4. according to claim 1 or 3 described methods, it is characterized in that: the computer program (such as file system) of described step (5) is when writing data to the flash storer, and the address that provides also is interpreted into virtual sectors number, and write operation comprises:
A. calculate the logical block number (LBN) and the logical page number (LPN) of virtual sectors correspondence earlier, and the skew in the page or leaf;
If b. do not have the corresponding physical piece according to first order mapping table logical block, then distribute a new physical block to be mapped to this logical block, in this new physical block, look for first idle Physical Page then, in this free time Physical Page, begin to write data from the page or leaf bias internal;
If c. the corresponding physical piece is arranged according to first order mapping table logical block, but the second level mapping table logical page (LPAGE) according to this logical block does not have the corresponding physical page or leaf, then in corresponding physical block, look for first idle Physical Page, in this free time Physical Page, begin to write data then from the page or leaf bias internal;
D. upgrade the second level mapping table of this logical block, make logical page (LPAGE) in the logical block be mapped in the corresponding physical block on the Physical Page of new data;
5. method according to claim 3 is characterized in that write operation further comprises:
If a. in the corresponding physical piece, can not find an idle Physical Page, then reclaim this physical block earlier, to discharge the Physical Page that is taken by legacy data in this physical block;
B. after recovery is finished, in this physical block, find the whole page data after first idle Physical Page is preserved renewal;
C. upgrade the second level mapping table of this logical block, logical page (LPAGE) is mapped on this new Physical Page.
6. method according to claim 4 is characterized in that write operation further comprises:
If a. in the corresponding physical piece, can not find an idle Physical Page, then reclaim this physical block earlier, to discharge the Physical Page that is taken by legacy data in this physical block;
B. after recovery is finished, in this physical block, find the whole page data after first idle Physical Page is preserved renewal;
C. upgrade the second level mapping table of this logical block, logical page (LPAGE) is mapped on this new Physical Page.
7. method according to claim 5 is characterized in that reclaimer operation comprises:
A. keep some at least one physical blocks, as the transmitting physical piece, the data conversion storage when being used to recycle;
B. in copying data to the transmitting physical piece that is recovered on the Physical Page that on the physical block all comprise valid data, upgrade the second level mapping table of the logical block of this physical block correspondence simultaneously;
C. wipe at last and be recovered physical block, this is recovered that physical block just becomes is the physical block of a free time, and reclaimer operation subsequently can come the unloading data with this piece.
8. the storage administration of the flash storer based on sector visit according to claim 1 is characterized in that memory management method further comprises:
(1) provides a division methods to NOR flash, a Physical Page is formed in one group of continuous fixed length zone of physical address, each Physical Page comprises the zone that is used to preserve file data, be referred to as the data field, and a bit of zone that is used to preserve the management information of Physical Page, be referred to as the spare area;
The size of Physical Page data field is set at 512B, and the size of spare area is 2B~16B, according to how many decisions of the management information of Physical Page;
(2) to NOR flash, each physical block has the sub-fraction 6B management information that is preserved for preserving physical block at least; Management information has the logical block number (LBN) of physical block correspondence, the erasing times of physical block, the state of physical block etc.
9. the storage administration of the flash storer based on sector visit according to claim 1, it is characterized in that memory management method further comprises: in order to reduce demand to RAM, omit the second level mapping table of each logical block, finish logical block number (LBN) after the conversion of physical block number, come of the conversion of completion logic page number by the method that scans the Physical Page in the corresponding physical block to physical page number, promptly, realize the function of logical block second level mapping table by in physical block, searching the method for the up-to-date Physical Page that comprises this logical page number (LPN).
10. the storage administration of the flash storer based on sector visit according to claim 1, it is characterized in that memory management method further comprises: the two-stage mapping table among the RAM of building in used in the present invention can be reconstructed in system start-up, and reconstructing method comprises:
(1) first order level mapping table reconstructing method comprises:
A. during system start-up, scan each physical block;
If b. physical block has corresponding logical block number (LBN), then physical block number is write in the list item of this logical block number (LBN) correspondence;
If c. there are two physical blocks to correspond to same logical block number (LBN), scan two physical blocks, then select to be mapped with physical block and this logical block number (LBN) correspondence of more effective logical page (LPAGE), the another one physical block is wiped free of; If effective number of physical pages that two physical blocks comprise is identical, then optional one and this logical block number (LBN) correspondence, the another one physical block is wiped free of;
D. after all physical blocks all are scanned, finish the reconstruct of first order mapping table;
(2) second level level mapping table reconstructing method comprises:
If a. system need make up second level mapping table in RAM, then begin to check from logical block 0;
If b. physical block and logical block correspondence are arranged, each Physical Page on scanning and this logical block corresponding physical piece;
If c. Physical Page has corresponding logical page number (LPN), then physical page number is write in the list item of this logical page number (LPN) correspondence;
If d. there are two Physical Page to correspond to same logical page number (LPN), then select the big Physical Page of physical page number and this logical page number (LPN) correspondence;
E. after all Physical Page all are scanned on this logical block corresponding physical piece, finish the second level mapping table reconstruct of this logical block.
F. after all logical blocks all are scanned, finish the second level mapping table reconstruct of all logical blocks.
CNB2007100692568A 2007-06-08 2007-06-08 Flash memory management based on sector access Expired - Fee Related CN100470506C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007100692568A CN100470506C (en) 2007-06-08 2007-06-08 Flash memory management based on sector access

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007100692568A CN100470506C (en) 2007-06-08 2007-06-08 Flash memory management based on sector access

Publications (2)

Publication Number Publication Date
CN101075211A true CN101075211A (en) 2007-11-21
CN100470506C CN100470506C (en) 2009-03-18

Family

ID=38976271

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007100692568A Expired - Fee Related CN100470506C (en) 2007-06-08 2007-06-08 Flash memory management based on sector access

Country Status (1)

Country Link
CN (1) CN100470506C (en)

Cited By (65)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101944065A (en) * 2010-08-24 2011-01-12 苏州国芯科技有限公司 Flash memory bad block shielding method based on section
CN102043721A (en) * 2010-05-12 2011-05-04 中颖电子股份有限公司 Memory management method for flash memory
CN102272848A (en) * 2008-11-13 2011-12-07 韩商英得联股份有限公司 Controller for solid state disk which controls access to memory bank
CN102279815A (en) * 2010-06-13 2011-12-14 宇瞻科技股份有限公司 Flash-memory-based storage device and data writing method thereof
CN102339255A (en) * 2010-07-16 2012-02-01 安凯(广州)微电子技术有限公司 Nand writing balance processing method
CN102356382A (en) * 2009-03-19 2012-02-15 韩商英得联股份有限公司 Apparatus and method for managing dram buffer
CN102364450A (en) * 2011-06-27 2012-02-29 浪潮电子信息产业股份有限公司 Method for mapping of Nand Flash physical address and logical address
CN102375779A (en) * 2010-08-16 2012-03-14 深圳市朗科科技股份有限公司 Data processing method and data processing module
CN101470664B (en) * 2007-12-29 2012-04-18 安凯(广州)微电子技术有限公司 Management method for NAND flash memory with MLC medium
CN102622301A (en) * 2011-01-28 2012-08-01 深圳兆日科技股份有限公司 Method and system for reading and updating flash-memory files
CN102667739A (en) * 2010-01-13 2012-09-12 株式会社东芝 Storage device management device and method for managing storage device
CN102662849A (en) * 2012-03-07 2012-09-12 忆正科技(武汉)有限公司 Method for managing blocks of multichannel flash memory
CN102707899A (en) * 2011-03-04 2012-10-03 索尼公司 Virtual memory system, virtual memory controlling method, and program
CN102831072A (en) * 2012-08-10 2012-12-19 深圳市江波龙电子有限公司 Flash memory device, and management method, data read-write method and data read-write device thereof
CN103106159A (en) * 2013-01-31 2013-05-15 武汉天喻信息产业股份有限公司 Method for establishing channel to access intelligent storage device
CN103365786A (en) * 2012-04-01 2013-10-23 国民技术股份有限公司 Data storage method, device and system
CN103383664A (en) * 2012-05-01 2013-11-06 索尼公司 Control device, storage device, and storage control method
CN103678144A (en) * 2012-09-05 2014-03-26 慧荣科技股份有限公司 Data storage device and flash memory control method
CN103853669A (en) * 2014-03-21 2014-06-11 北京国芯威电子科技股份有限公司上海分公司 Storage management method based on NOR Flash
CN103902229A (en) * 2012-12-27 2014-07-02 北京华清瑞达科技有限公司 Blade storage device
CN103999059A (en) * 2011-09-29 2014-08-20 法国大陆汽车公司 Method of erasing information stored in a nonvolatile rewritable memory, storage medium and motor vehicle computer
CN103996412A (en) * 2013-02-19 2014-08-20 北京同方微电子有限公司 Power-fail protection method applied to intelligent-card nonvolatile memories
CN104199619A (en) * 2014-08-18 2014-12-10 北京君正集成电路股份有限公司 Method and device for processing data in NAND
CN104598386A (en) * 2013-10-31 2015-05-06 Lsi公司 Method for recycling solid state drive block by tracking and utilizing secondary mapping index
CN104679440A (en) * 2013-11-29 2015-06-03 深圳市国微电子有限公司 Flash memory array management method and device
CN105243025A (en) * 2015-09-25 2016-01-13 联想(北京)有限公司 Mapping table forming and loading methods and electronic device
CN105825082A (en) * 2014-10-31 2016-08-03 慧荣科技股份有限公司 Data storage device and flash memory control method
CN106201778A (en) * 2016-06-30 2016-12-07 联想(北京)有限公司 Information processing method and storage device
CN106293543A (en) * 2016-08-25 2017-01-04 中国科学院计算技术研究所 A kind of based on incidentally reclaim watt record a RAID write ordered method and device
CN106469122A (en) * 2015-08-14 2017-03-01 群联电子股份有限公司 Valid data merging method, Memory Controller and memorizer memory devices
CN106598504A (en) * 2016-12-26 2017-04-26 华为机器有限公司 Data storage method and apparatus
CN106598493A (en) * 2016-11-30 2017-04-26 郑州云海信息技术有限公司 Solid state disk address mapping table management method
CN107015764A (en) * 2017-03-17 2017-08-04 深圳市江波龙电子有限公司 Nand flash data processing method, device and a kind of Nand flash
CN107039076A (en) * 2017-03-20 2017-08-11 北京握奇智能科技有限公司 A kind of method and apparatus for extending the erasable chip life-span
CN107066202A (en) * 2013-03-11 2017-08-18 北京忆恒创源科技有限公司 Storage device with multiple solid-state disks
CN107092563A (en) * 2017-04-20 2017-08-25 紫光华山信息技术有限公司 A kind of rubbish recovering method and device
CN107229571A (en) * 2017-06-08 2017-10-03 中国电子信息产业集团有限公司第六研究所 FMMU control method and system in EtherCAT slave stations
CN107315648A (en) * 2017-06-29 2017-11-03 成都三零嘉微电子有限公司 A kind of method of data-moving performance during raising bad block management
CN107402715A (en) * 2016-05-20 2017-11-28 华为终端(东莞)有限公司 Method, apparatus, memory and the terminal of data-moving
CN107870926A (en) * 2016-09-26 2018-04-03 北京信威通信技术股份有限公司 A kind of method and device of real-time storage
CN107957850A (en) * 2016-10-14 2018-04-24 乔鼎资讯股份有限公司 Data storage system with virtual block and disk array structure and management method thereof
CN108121670A (en) * 2017-08-07 2018-06-05 鸿秦(北京)科技有限公司 A kind of mapping method for reducing solid state disk metadata backwash frequency
CN108228376A (en) * 2017-12-29 2018-06-29 北京联想核芯科技有限公司 A kind of data processing method and device of SSD hard disks
CN108287665A (en) * 2017-01-10 2018-07-17 华邦电子股份有限公司 Flash memory device and access control method
US10061711B2 (en) 2014-09-01 2018-08-28 Huawei Technologies Co., Ltd. File access method and apparatus, and storage system
CN105138465B (en) * 2015-04-30 2018-09-11 北京天诚盛业科技有限公司 Accelerate the method and device of Nand Flash write operations
US10157143B2 (en) 2014-09-01 2018-12-18 Huawei Technologies Co., Ltd. File access method and apparatus, and storage system
CN109308171A (en) * 2018-09-19 2019-02-05 华立科技股份有限公司 Improve the date storage method and system of nonvolatile storage service life
CN109407963A (en) * 2017-08-15 2019-03-01 深圳市中兴微电子技术有限公司 A kind of method and device for realizing storage management
CN109918024A (en) * 2019-02-28 2019-06-21 深圳和而泰数据资源与云技术有限公司 Memory management method, device, singlechip equipment and readable storage medium storing program for executing
CN110007859A (en) * 2019-03-27 2019-07-12 新华三云计算技术有限公司 A kind of I/O request processing method, device and client
CN110209603A (en) * 2019-05-31 2019-09-06 龙芯中科技术有限公司 Address conversion method, device, equipment and computer readable storage medium
CN110471626A (en) * 2019-08-15 2019-11-19 深圳融卡智能科技有限公司 Nor Flash management level and method applied to Java Card
CN110825659A (en) * 2018-08-14 2020-02-21 爱思开海力士有限公司 Apparatus and method for checking valid data in a block in a memory system
CN111344686A (en) * 2017-12-01 2020-06-26 华为技术有限公司 System and method for clustering subpages of a physical memory page
CN112214160A (en) * 2019-12-20 2021-01-12 青岛鼎信通讯股份有限公司 Method for prolonging FLASH service life applied to electric energy meter
CN112486854A (en) * 2020-12-28 2021-03-12 潍柴动力股份有限公司 NAND Flash Nand Flash storage management method and device
CN112506438A (en) * 2020-12-14 2021-03-16 深圳大普微电子科技有限公司 Mapping table management method and solid state disk
CN112748848A (en) * 2019-10-29 2021-05-04 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for storage management
CN113282521A (en) * 2021-05-19 2021-08-20 武汉天喻信息产业股份有限公司 Method and device for prolonging service life of smart card
CN113868148A (en) * 2020-06-30 2021-12-31 华为技术有限公司 Data writing method and device
CN114415942A (en) * 2021-12-21 2022-04-29 联芸科技(杭州)有限公司 L2P mapping table rebuilding method and solid state disk
CN114428592A (en) * 2022-03-25 2022-05-03 北京得瑞领新科技有限公司 Method and system for storing block information of SSD (solid State disk) and SSD
CN116661704A (en) * 2023-07-07 2023-08-29 深圳宏芯宇电子股份有限公司 Storage device data reading and writing method, storage device and storage controller
CN113868148B (en) * 2020-06-30 2024-04-09 华为技术有限公司 Data writing method and device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541777B (en) * 2010-12-13 2015-08-19 深圳市硅格半导体有限公司 The Flash data transfer control method mapped based on DMA and device

Cited By (100)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101470664B (en) * 2007-12-29 2012-04-18 安凯(广州)微电子技术有限公司 Management method for NAND flash memory with MLC medium
CN102272848A (en) * 2008-11-13 2011-12-07 韩商英得联股份有限公司 Controller for solid state disk which controls access to memory bank
CN102356382A (en) * 2009-03-19 2012-02-15 韩商英得联股份有限公司 Apparatus and method for managing dram buffer
CN102667739A (en) * 2010-01-13 2012-09-12 株式会社东芝 Storage device management device and method for managing storage device
US9367451B2 (en) 2010-01-13 2016-06-14 Kabushiki Kaisha Toshiba Storage device management device and method for managing storage device
CN102667739B (en) * 2010-01-13 2015-07-01 株式会社东芝 Storage device management device and method for managing storage device
CN102043721A (en) * 2010-05-12 2011-05-04 中颖电子股份有限公司 Memory management method for flash memory
CN102043721B (en) * 2010-05-12 2016-10-26 中颖电子股份有限公司 Flash memory storage management method
CN102279815A (en) * 2010-06-13 2011-12-14 宇瞻科技股份有限公司 Flash-memory-based storage device and data writing method thereof
CN102339255A (en) * 2010-07-16 2012-02-01 安凯(广州)微电子技术有限公司 Nand writing balance processing method
CN102339255B (en) * 2010-07-16 2014-04-23 安凯(广州)微电子技术有限公司 Nand writing balance processing method
CN102375779B (en) * 2010-08-16 2015-08-19 深圳市朗科科技股份有限公司 A kind of data processing method and data processing module
CN102375779A (en) * 2010-08-16 2012-03-14 深圳市朗科科技股份有限公司 Data processing method and data processing module
CN101944065B (en) * 2010-08-24 2012-07-04 苏州国芯科技有限公司 Flash memory bad block shielding method based on section
CN101944065A (en) * 2010-08-24 2011-01-12 苏州国芯科技有限公司 Flash memory bad block shielding method based on section
CN102622301A (en) * 2011-01-28 2012-08-01 深圳兆日科技股份有限公司 Method and system for reading and updating flash-memory files
CN102707899B (en) * 2011-03-04 2017-06-30 索尼半导体解决方案公司 Virtual memory system, virtual memory control method and program
CN102707899A (en) * 2011-03-04 2012-10-03 索尼公司 Virtual memory system, virtual memory controlling method, and program
CN102364450A (en) * 2011-06-27 2012-02-29 浪潮电子信息产业股份有限公司 Method for mapping of Nand Flash physical address and logical address
CN103999059A (en) * 2011-09-29 2014-08-20 法国大陆汽车公司 Method of erasing information stored in a nonvolatile rewritable memory, storage medium and motor vehicle computer
CN103999059B (en) * 2011-09-29 2017-02-22 法国大陆汽车公司 Method of erasing information stored in a nonvolatile rewritable memory, and motor vehicle computer
CN102662849B (en) * 2012-03-07 2015-12-16 忆正科技(武汉)有限公司 The block management method of multi-channel flash memory
CN102662849A (en) * 2012-03-07 2012-09-12 忆正科技(武汉)有限公司 Method for managing blocks of multichannel flash memory
CN103365786A (en) * 2012-04-01 2013-10-23 国民技术股份有限公司 Data storage method, device and system
CN103365786B (en) * 2012-04-01 2016-12-14 国民技术股份有限公司 Date storage method, device and system
CN103383664B (en) * 2012-05-01 2018-01-02 泰塞拉先进技术公司 Control device, storage device and storage controlling method
CN103383664A (en) * 2012-05-01 2013-11-06 索尼公司 Control device, storage device, and storage control method
CN102831072A (en) * 2012-08-10 2012-12-19 深圳市江波龙电子有限公司 Flash memory device, and management method, data read-write method and data read-write device thereof
CN102831072B (en) * 2012-08-10 2016-03-02 深圳市江波龙电子有限公司 Flash memory device and management method, data read-write method and read-write equipment
CN103678144B (en) * 2012-09-05 2017-08-25 慧荣科技股份有限公司 Data storage device and flash memory control method
CN103678144A (en) * 2012-09-05 2014-03-26 慧荣科技股份有限公司 Data storage device and flash memory control method
CN103902229A (en) * 2012-12-27 2014-07-02 北京华清瑞达科技有限公司 Blade storage device
CN103902229B (en) * 2012-12-27 2016-12-28 北京华清瑞达科技有限公司 Blade storage device
CN103106159B (en) * 2013-01-31 2015-12-23 武汉天喻信息产业股份有限公司 A kind of method setting up channel access intelligent storage equipment
CN103106159A (en) * 2013-01-31 2013-05-15 武汉天喻信息产业股份有限公司 Method for establishing channel to access intelligent storage device
CN103996412A (en) * 2013-02-19 2014-08-20 北京同方微电子有限公司 Power-fail protection method applied to intelligent-card nonvolatile memories
CN107066202A (en) * 2013-03-11 2017-08-18 北京忆恒创源科技有限公司 Storage device with multiple solid-state disks
CN104598386B (en) * 2013-10-31 2018-03-27 Lsi公司 By following the trail of and reusing solid-state drive block using two level map index
CN104598386A (en) * 2013-10-31 2015-05-06 Lsi公司 Method for recycling solid state drive block by tracking and utilizing secondary mapping index
CN104679440B (en) * 2013-11-29 2017-11-10 深圳市国微电子有限公司 A kind of flash memory array management method and device
CN104679440A (en) * 2013-11-29 2015-06-03 深圳市国微电子有限公司 Flash memory array management method and device
CN103853669A (en) * 2014-03-21 2014-06-11 北京国芯威电子科技股份有限公司上海分公司 Storage management method based on NOR Flash
CN104199619A (en) * 2014-08-18 2014-12-10 北京君正集成电路股份有限公司 Method and device for processing data in NAND
US10061711B2 (en) 2014-09-01 2018-08-28 Huawei Technologies Co., Ltd. File access method and apparatus, and storage system
US10157143B2 (en) 2014-09-01 2018-12-18 Huawei Technologies Co., Ltd. File access method and apparatus, and storage system
CN105825082B (en) * 2014-10-31 2019-03-19 慧荣科技股份有限公司 data storage device and flash memory control method
CN105825082A (en) * 2014-10-31 2016-08-03 慧荣科技股份有限公司 Data storage device and flash memory control method
CN105138465B (en) * 2015-04-30 2018-09-11 北京天诚盛业科技有限公司 Accelerate the method and device of Nand Flash write operations
CN106469122B (en) * 2015-08-14 2019-11-19 群联电子股份有限公司 Valid data merging method, Memory Controller and memorizer memory devices
CN106469122A (en) * 2015-08-14 2017-03-01 群联电子股份有限公司 Valid data merging method, Memory Controller and memorizer memory devices
CN105243025A (en) * 2015-09-25 2016-01-13 联想(北京)有限公司 Mapping table forming and loading methods and electronic device
CN107402715B (en) * 2016-05-20 2020-05-08 华为终端有限公司 Data moving method and device, memory and terminal
CN107402715A (en) * 2016-05-20 2017-11-28 华为终端(东莞)有限公司 Method, apparatus, memory and the terminal of data-moving
CN106201778B (en) * 2016-06-30 2019-06-25 联想(北京)有限公司 Information processing method and storage equipment
CN106201778A (en) * 2016-06-30 2016-12-07 联想(北京)有限公司 Information processing method and storage device
CN106293543A (en) * 2016-08-25 2017-01-04 中国科学院计算技术研究所 A kind of based on incidentally reclaim watt record a RAID write ordered method and device
CN107870926A (en) * 2016-09-26 2018-04-03 北京信威通信技术股份有限公司 A kind of method and device of real-time storage
CN107957850A (en) * 2016-10-14 2018-04-24 乔鼎资讯股份有限公司 Data storage system with virtual block and disk array structure and management method thereof
CN106598493A (en) * 2016-11-30 2017-04-26 郑州云海信息技术有限公司 Solid state disk address mapping table management method
CN106598504A (en) * 2016-12-26 2017-04-26 华为机器有限公司 Data storage method and apparatus
CN108287665A (en) * 2017-01-10 2018-07-17 华邦电子股份有限公司 Flash memory device and access control method
CN108287665B (en) * 2017-01-10 2021-05-28 华邦电子股份有限公司 Flash memory device and access control method
CN107015764B (en) * 2017-03-17 2020-03-27 深圳市江波龙电子股份有限公司 Data processing method and device for Nand flash and Nand flash
CN107015764A (en) * 2017-03-17 2017-08-04 深圳市江波龙电子有限公司 Nand flash data processing method, device and a kind of Nand flash
CN107039076A (en) * 2017-03-20 2017-08-11 北京握奇智能科技有限公司 A kind of method and apparatus for extending the erasable chip life-span
CN107092563A (en) * 2017-04-20 2017-08-25 紫光华山信息技术有限公司 A kind of rubbish recovering method and device
CN107229571A (en) * 2017-06-08 2017-10-03 中国电子信息产业集团有限公司第六研究所 FMMU control method and system in EtherCAT slave stations
CN107315648A (en) * 2017-06-29 2017-11-03 成都三零嘉微电子有限公司 A kind of method of data-moving performance during raising bad block management
CN107315648B (en) * 2017-06-29 2020-07-03 成都三零嘉微电子有限公司 Method for improving data moving performance during bad block management
CN108121670A (en) * 2017-08-07 2018-06-05 鸿秦(北京)科技有限公司 A kind of mapping method for reducing solid state disk metadata backwash frequency
CN108121670B (en) * 2017-08-07 2021-09-28 鸿秦(北京)科技有限公司 Mapping method for reducing solid state disk metadata back-flushing frequency
CN109407963A (en) * 2017-08-15 2019-03-01 深圳市中兴微电子技术有限公司 A kind of method and device for realizing storage management
CN111344686A (en) * 2017-12-01 2020-06-26 华为技术有限公司 System and method for clustering subpages of a physical memory page
CN108228376A (en) * 2017-12-29 2018-06-29 北京联想核芯科技有限公司 A kind of data processing method and device of SSD hard disks
CN110825659A (en) * 2018-08-14 2020-02-21 爱思开海力士有限公司 Apparatus and method for checking valid data in a block in a memory system
CN110825659B (en) * 2018-08-14 2023-04-07 爱思开海力士有限公司 Apparatus and method for checking valid data in a block in a memory system
CN109308171A (en) * 2018-09-19 2019-02-05 华立科技股份有限公司 Improve the date storage method and system of nonvolatile storage service life
CN109308171B (en) * 2018-09-19 2021-08-24 华立科技股份有限公司 Data storage method and system for prolonging service life of nonvolatile memory
CN109918024B (en) * 2019-02-28 2022-07-05 深圳和而泰数据资源与云技术有限公司 Storage management method and device, single-chip microcomputer equipment and readable storage medium
CN109918024A (en) * 2019-02-28 2019-06-21 深圳和而泰数据资源与云技术有限公司 Memory management method, device, singlechip equipment and readable storage medium storing program for executing
CN110007859A (en) * 2019-03-27 2019-07-12 新华三云计算技术有限公司 A kind of I/O request processing method, device and client
CN110007859B (en) * 2019-03-27 2022-04-08 新华三云计算技术有限公司 I/O request processing method and device and client
CN110209603A (en) * 2019-05-31 2019-09-06 龙芯中科技术有限公司 Address conversion method, device, equipment and computer readable storage medium
CN110471626A (en) * 2019-08-15 2019-11-19 深圳融卡智能科技有限公司 Nor Flash management level and method applied to Java Card
CN110471626B (en) * 2019-08-15 2023-04-25 无锡融卡科技有限公司 Nor Flash management layer and method applied to Java Card
CN112748848A (en) * 2019-10-29 2021-05-04 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for storage management
CN112214160A (en) * 2019-12-20 2021-01-12 青岛鼎信通讯股份有限公司 Method for prolonging FLASH service life applied to electric energy meter
CN113868148A (en) * 2020-06-30 2021-12-31 华为技术有限公司 Data writing method and device
WO2022001215A1 (en) * 2020-06-30 2022-01-06 华为技术有限公司 Data writing method and device
CN113868148B (en) * 2020-06-30 2024-04-09 华为技术有限公司 Data writing method and device
CN112506438A (en) * 2020-12-14 2021-03-16 深圳大普微电子科技有限公司 Mapping table management method and solid state disk
CN112506438B (en) * 2020-12-14 2024-03-26 深圳大普微电子科技有限公司 Mapping table management method and solid state disk
CN112486854A (en) * 2020-12-28 2021-03-12 潍柴动力股份有限公司 NAND Flash Nand Flash storage management method and device
CN113282521A (en) * 2021-05-19 2021-08-20 武汉天喻信息产业股份有限公司 Method and device for prolonging service life of smart card
CN114415942B (en) * 2021-12-21 2022-11-04 联芸科技(杭州)股份有限公司 L2P mapping table reconstruction method and solid state disk
CN114415942A (en) * 2021-12-21 2022-04-29 联芸科技(杭州)有限公司 L2P mapping table rebuilding method and solid state disk
CN114428592B (en) * 2022-03-25 2022-06-03 北京得瑞领新科技有限公司 Method and system for storing block information of SSD (solid State disk) and SSD
CN114428592A (en) * 2022-03-25 2022-05-03 北京得瑞领新科技有限公司 Method and system for storing block information of SSD (solid State disk) and SSD
CN116661704A (en) * 2023-07-07 2023-08-29 深圳宏芯宇电子股份有限公司 Storage device data reading and writing method, storage device and storage controller
CN116661704B (en) * 2023-07-07 2024-03-08 深圳宏芯宇电子股份有限公司 Storage device data reading and writing method, storage device and storage controller

Also Published As

Publication number Publication date
CN100470506C (en) 2009-03-18

Similar Documents

Publication Publication Date Title
CN101075211A (en) Flash memory management based on sector access
CN1295622C (en) Address mapping method and mapping information managing method for flash memory, and flash memory using the same
CN1277213C (en) A flash memory file system management method
CN1303498C (en) Open type systemic structure flash storage driving program
JP5530012B2 (en) Method and system for storage address remapping for storage devices
CN1441440A (en) Regulating system and method for obtaining uniform wear in flash storage device
US8214583B2 (en) Direct file data programming and deletion in flash memories
CN1282089C (en) Device and method for controllintg proper execution in serial flash memory and corresponding chip
TWI400608B (en) A method of transferring data between a host system and a re-programmable non-volatile semiconductor mass storage system, a method for operating a controller in a flash memory system, and a mass storage memory system
CN1466060A (en) Flash memory file system
CN100501868C (en) Method for realizing memory file system based on NAND Flash
CN1705936A (en) Method and apparatus for splitting a logical block
CN1991791A (en) Storage apparatus using non-volatile memory as cache and method of operating the same
US20060184722A1 (en) Direct data file storage implementation techniques in flash memories
CN1701307A (en) Method and apparatus for managing an erase count block
CN1701308A (en) Maintaining erase counts in non-volatile storage systems
CN101069163A (en) Memory system and method of writing into nonvolatile semiconductor memory
EP2286341A1 (en) Method and system for storage address re-mapping for a multi-bank memory device
CN1795437A (en) Method and apparatus for grouping pages within a block
KR20070012630A (en) Data run programming
CN1959672A (en) Optimized startup verification of file system integrity
CN1719422A (en) Virtual access method of storage document data
CN1538456A (en) Flash memory access apparatus and method
CN1645516A (en) Data recovery apparatus and method used for flash memory
CN1162782C (en) Processing method of rapid memory file

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: 20090318

Termination date: 20150608

EXPY Termination of patent right or utility model