CN102662849A - Method for managing blocks of multichannel flash memory - Google Patents

Method for managing blocks of multichannel flash memory Download PDF

Info

Publication number
CN102662849A
CN102662849A CN2012100580811A CN201210058081A CN102662849A CN 102662849 A CN102662849 A CN 102662849A CN 2012100580811 A CN2012100580811 A CN 2012100580811A CN 201210058081 A CN201210058081 A CN 201210058081A CN 102662849 A CN102662849 A CN 102662849A
Authority
CN
China
Prior art keywords
page
leaf
physical
block
write
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
CN2012100580811A
Other languages
Chinese (zh)
Other versions
CN102662849B (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.)
Zhiyu Technology Co ltd
Original Assignee
Memoright Memoritech Wuhan Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Memoright Memoritech Wuhan Co Ltd filed Critical Memoright Memoritech Wuhan Co Ltd
Priority to CN201210058081.1A priority Critical patent/CN102662849B/en
Publication of CN102662849A publication Critical patent/CN102662849A/en
Application granted granted Critical
Publication of CN102662849B publication Critical patent/CN102662849B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method for managing blocks of a multichannel flash memory. The flash memory includes several blocks of which each is divided into M physical pages where former P continuous physical pages are mapped to P logical pages in a page mapping table one by one and later Q continuous physical pages are used as reserved pages. A page writing pointer is set to each block for pointing to a blank page in the block and is added by one when every time one page is written. When page-writing operation is carried out in a target block, if one physical page mapped by one of the P logic pages is blank, then data is written on the physical page; if not, then data is written on a physical page to which the page-writing pointer points, the original physical page is marked as a garbage page, and then an address of the physical page where data is written is mapped to the original physical page. A unit of data-writing operation in the invention is reduced from a whole block to a page, which avoids a lot of erasing operation, greatly enhances an efficiency of data writing and increases a life of the flash memory.

Description

The block management method of multi-channel flash memory
Technical field
The present invention relates to a kind of block management method of multi-channel flash memory.
Background technology
For effective bandwidth and the read-write efficiency that improves flash memory, existing multi-channel flash memory generally is divided into some (block), and each piece is divided into several pages or leaves (page), and each page or leaf comprises several sectors (sector).During the multi-channel flash memory read-write, be unit-addressed with each page or leaf; But, then be to be unit with the piece for the write operation of each passage flash memory.A kind of block management method of flash memory that like Chinese patent number has been 200710072980 disclosure of the Invention; Said flash memory comprises several blocks; Every is made up of a plurality of page or leaf; Every page is divided into data storage area and redundant area, in said block, delimits one or more as the address mapping table reserved area, is that unit preserves the logical address of flash memory block and the mapping table of physical address with the page or leaf; A selected blank block is piece in return, sets up the map addresses list item of this swap block in the redundant area of said mapping table preservation page or leaf; When carrying out write operation; According to address mapping table information; The legacy data of new data and/or operated target block is write said swap block accordingly; Wipe target block, then swap block logical address physical address corresponding in the mapping table page or leaf and target block logical address physical address corresponding are exchanged.This invention can effectively prolong flash memory serviceable life and the security that improves flash data when guaranteeing operating speed.
But for the application scenario of frequent small data quantity write operation, such scheme causes block frequently erasable of flash memory, has limited the flash memory device operating efficiency, diminishes the serviceable life of flash memory.
Summary of the invention
Technical matters to be solved by this invention provides a kind of block management method of new multi-channel flash memory, further improves the flash memory device operating efficiency, prolongs the serviceable life of flash memory.
For solving the problems of the technologies described above, the present invention provides a kind of block management method of new multi-channel flash memory, and said flash memory comprises several pieces; Each piece is divided into M Physical Page; It is characterized in that in the said M Physical Page, a preceding P continuous Physical Page and the logical page (LPAGE) of the P in the page map table shines upon one by one; Back Q continuous Physical Page is as keeping page or leaf, M=P+Q; Each piece is established a page or leaf write pointer, is used in reference to blank page in piece; When all Physical Page in the piece were blank, said page or leaf write pointer value was 1; Whenever write a page or leaf, said page or leaf write pointer adds 1.
Page or leaf in carrying out object block is during write operation, in P logical page (LPAGE) of object block, chooses a logical page (LPAGE), and this chooses a Physical Page of logical page (LPAGE) mapping, is sky if choose Physical Page, then in this Physical Page write data; If choose Physical Page to have data, non-NULL, then data are write the Physical Page of said page or leaf write pointers point, then the said Physical Page of choosing is labeled as the rubbish page or leaf, the physical page address that will write data again is mapped to the said logical page (LPAGE) of choosing.
The scheme of further optimizing when the said page or leaf write operation that carries out in the object block, judges that at first whether said page or leaf write pointer value is greater than M; If said page or leaf write pointer value is greater than M; That is, when the reservation page or leaf in the object block is all write, obtain a swap block; With the non-rubbish page or leaf in the object block, be that the valid data page or leaf duplicates one by one in P Physical Page of said swap block; Then, swap block logical address physical address corresponding in the mapping table and former object block logical address physical address corresponding are exchanged, more former object block is emptied.At this moment, said swap block becomes data block, and its page write pointer value is P+1, and former object block becomes swap block.Carry out data writing operation according to new address mapping table and page or leaf write pointer then.
If said page or leaf write pointer value is not more than M, then directly carry out data writing operation according to address mapping table and page or leaf write pointer.
Beneficial effect: when the Host end will be write a page data, this method was directly programmed to page or leaf, rather than writes whole data.When the Host end will repeat to write to same logical page (LPAGE), be mapped to different Physical Page through page map table, thereby realize the page or leaf programming, write whole data again and need not wipe this piece.Because the unit of data write operation tapers to page or leaf from monoblock, has avoided a large amount of erase operations, thereby has improved the efficient of write data greatly, has improved the life-span of flash memory.
Description of drawings
Below in conjunction with accompanying drawing and embodiment technical scheme of the present invention is further specified.
Fig. 1 is the logical page (LPAGE) of a piece and the mapping synoptic diagram of Physical Page.
Fig. 2 when writing the N page operations, the mapping map of logical page (LPAGE), Physical Page.
Fig. 3 is for when page or leaf write pointer during greater than M, the mapping map of data block, swap block exchange.
Fig. 4 is a flash reading and writing process flow diagram of the present invention.
Embodiment
As shown in Figure 1, the addresses map table on the left side comprises 0~47 totally 48 logical page (LPAGE)s, and the piece table on the right comprises 0~63 M=64 Physical Page altogether, and the preceding P=48 of 64 Physical Page shines upon with 48 logical page (LPAGE)s one by one, and a back Q=16 Physical Page is as reservation page.
Each piece is established a page or leaf write pointer, is used in reference to blank page in piece; When all Physical Page in the piece were blank, a page or leaf write pointer value was 1, promptly points to the 0th Physical Page; Whenever write a page or leaf, the page or leaf write pointer adds 1.
As shown in Figure 2, when certain Physical Page carries out write operation in object block, at first,, in 48 logical page (LPAGE)s of object block, choose the N logical page (LPAGE) through the logical page (LPAGE) addressing, the N logical page (LPAGE) is mapped to the N Physical Page.At this moment, if the N Physical Page has existed data, non-NULL, then data write the 48th Physical Page that being positioned at of page write pointers point keeps page table, then the N Physical Page are labeled as the rubbish page or leaf, again with the map addresses of current the 48th Physical Page to the N logical page (LPAGE).
As shown in Figure 3; When through behind the page or leaf write operation repeatedly, the page or leaf write pointer value is greater than M, when promptly 16 in the object block keep page or leaf and all write; Application obtains a swap block, with the non-rubbish page or leaf in the object block, be that the valid data page or leaf duplicates one by one in P Physical Page of swap block.What specify is that those skilled in the art should learn that the valid data number of pages order in the object block is exactly P=48 at this moment.Then, swap block logical address physical address corresponding in the mapping table and former object block logical address physical address corresponding are exchanged, again object block is emptied.At this moment, swap block becomes new data block, and the page or leaf write pointer value of new data block is P+1, promptly points to the 48th Physical Page.Former object block becomes swap block.
Below in conjunction with Fig. 4 the flash reading and writing flow process that the present invention is overall is described.At first, flash memory gets into normal operating conditions, waits for receiving the read write command that main frame Host sends; After receiving the read write command that Host sends, flash controller carries out the address mapping table conversion, comprises by LBA being transformed into physical block address; Logical page address is transformed into physical page address, if be read data, then the mapping address according to address mapping table is addressed to Physical Page; Read this number of physical pages certificate, return then.If be write data, judge then whether the page or leaf write pointer exceeds threshold value, promptly whether the value of page or leaf write pointer, is then carried out according to address mapping table and page or leaf write pointer if not greater than M, writes the flash memory step to data, scheduler mapping table step.Specifically comprise: in P logical page (LPAGE) of object block, choose a logical page (LPAGE), this chooses a Physical Page of logical page (LPAGE) mapping, is empty if choose Physical Page, then in this Physical Page write data; If choose Physical Page to have data, non-NULL, then data are write the Physical Page of said page or leaf write pointers point, then the said Physical Page of choosing is labeled as the rubbish page or leaf, the physical page address that will write data again is mapped to the said logical page (LPAGE) of choosing.Referring to Fig. 2 explanation.
If; That is, when the reservation page or leaf in the object block is all write, obtain a swap block; With the non-rubbish page or leaf in the object block, be that the valid data page or leaf duplicates one by one in P Physical Page of swap block; Then, swap block logical address physical address corresponding in the mapping table and former object block logical address physical address corresponding are exchanged, more former object block is emptied.At this moment, swap block becomes data block, and its page write pointer value is P+1, and former object block becomes swap block.And then carry out according to an address mapping table and a page or leaf write pointer, writing the flash memory step to data, scheduler mapping table step is really accomplished the write operation of data.
It should be noted last that; Above embodiment is only unrestricted in order to technical scheme of the present invention to be described; Although with reference to preferred embodiment the present invention is specified, those of ordinary skill in the art should be appreciated that and can make amendment or be equal to replacement technical scheme of the present invention; And not breaking away from the spirit and the scope of technical scheme of the present invention, it all should be encompassed in the middle of the claim scope of the present invention.

Claims (2)

1. the block management method of a multi-channel flash memory; Said flash memory comprises several pieces, and each piece is divided into M Physical Page, it is characterized in that; In the said M Physical Page; A preceding P continuous Physical Page and the logical page (LPAGE) of the P in the page map table shines upon one by one, and back Q continuous Physical Page is as keeping page or leaf, M=P+Q; Each piece is established a page or leaf write pointer, is used in reference to blank page in piece; When all Physical Page in the piece were blank, said page or leaf write pointer value was 1; Whenever write a page or leaf, said page or leaf write pointer adds 1;
Page or leaf in carrying out object block is during write operation, in P logical page (LPAGE) of object block, chooses a logical page (LPAGE), and this chooses a Physical Page of logical page (LPAGE) mapping, is sky if choose Physical Page, then in this Physical Page write data; If choose Physical Page to have data, non-NULL, then data are write the Physical Page of said page or leaf write pointers point, then the said Physical Page of choosing is labeled as the rubbish page or leaf, the physical page address that will write data again is mapped to the said logical page (LPAGE) of choosing.
2. the block management method of multi-channel flash memory according to claim 1 is characterized in that, carries out page or leaf in the object block during write operation when said; Whether at first judge said page or leaf write pointer value greater than M, if said page or leaf write pointer value is greater than M, promptly; When the reservation page or leaf in the object block is all write; Obtain a swap block, with the non-rubbish page or leaf in the object block, be that the valid data page or leaf duplicates one by one in P Physical Page of said swap block, then; Swap block logical address physical address corresponding in the mapping table and former object block logical address physical address corresponding are exchanged, more former object block is emptied; At this moment, said swap block becomes data block, and its page write pointer value is P+1, and former object block becomes swap block; Carry out data writing operation according to new address mapping table and page or leaf write pointer then;
If said page or leaf write pointer value is not more than M, then directly carry out data writing operation according to address mapping table and page or leaf write pointer.
CN201210058081.1A 2012-03-07 2012-03-07 The block management method of multi-channel flash memory Active CN102662849B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210058081.1A CN102662849B (en) 2012-03-07 2012-03-07 The block management method of multi-channel flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210058081.1A CN102662849B (en) 2012-03-07 2012-03-07 The block management method of multi-channel flash memory

Publications (2)

Publication Number Publication Date
CN102662849A true CN102662849A (en) 2012-09-12
CN102662849B CN102662849B (en) 2015-12-16

Family

ID=46772346

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210058081.1A Active CN102662849B (en) 2012-03-07 2012-03-07 The block management method of multi-channel flash memory

Country Status (1)

Country Link
CN (1) CN102662849B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108701084A (en) * 2017-01-23 2018-10-23 美光科技公司 The processing of partial write block
CN110287129A (en) * 2019-06-27 2019-09-27 深圳忆联信息系统有限公司 L2P table based on solid state hard disk updates and is written management method and device
CN110471626A (en) * 2019-08-15 2019-11-19 深圳融卡智能科技有限公司 Nor Flash management level and method applied to Java Card
CN112506438A (en) * 2020-12-14 2021-03-16 深圳大普微电子科技有限公司 Mapping table management method and solid state disk

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1281562A (en) * 1997-10-16 2001-01-24 M-系统快闪盘开拓者公司 Improved flash file system
CN101030167A (en) * 2007-01-17 2007-09-05 忆正存储技术(深圳)有限公司 Flash-memory zone block management
CN101075211A (en) * 2007-06-08 2007-11-21 马彩艳 Flash memory management based on sector access
CN101123116A (en) * 2006-08-09 2008-02-13 安国国际科技股份有限公司 Memory device and its reading and writing method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1281562A (en) * 1997-10-16 2001-01-24 M-系统快闪盘开拓者公司 Improved flash file system
CN101123116A (en) * 2006-08-09 2008-02-13 安国国际科技股份有限公司 Memory device and its reading and writing method
CN101030167A (en) * 2007-01-17 2007-09-05 忆正存储技术(深圳)有限公司 Flash-memory zone block management
CN101075211A (en) * 2007-06-08 2007-11-21 马彩艳 Flash memory management based on sector access

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108701084A (en) * 2017-01-23 2018-10-23 美光科技公司 The processing of partial write block
CN110287129A (en) * 2019-06-27 2019-09-27 深圳忆联信息系统有限公司 L2P table based on solid state hard disk updates and is written management method and device
CN110287129B (en) * 2019-06-27 2021-07-13 深圳忆联信息系统有限公司 L2P table updating and writing management method and device based on solid state disk
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
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

Also Published As

Publication number Publication date
CN102662849B (en) 2015-12-16

Similar Documents

Publication Publication Date Title
US20180260317A1 (en) Method for managing the copying and storing of data in garbage collection, memory storage device and memory control circuit unit using the same
US10915475B2 (en) Methods and apparatus for variable size logical page management based on hot and cold data
CN101937319B (en) Memory systems and mapping methods thereof
CN108121503B (en) NandFlash address mapping and block management method
CN101382918B (en) NAND flash memory optimizing and managing method based on data interchange zone
EP2115595B1 (en) Memory device performance enhancement through pre-erase mechanism
US8966205B1 (en) System data management using garbage collection and hybrid self mapping
CN104484283B (en) A kind of method for reducing solid state disk write amplification
CN103019971A (en) Method of quickly responding to trim command, SSD (Solid State Disk) controller and system
US20130103889A1 (en) Page-buffer management of non-volatile memory-based mass storage devices
US9213629B2 (en) Block management method, memory controller and memory stoarge apparatus
CN104360958A (en) Bad block management system and bad block management method based on block reservation area replacement
CN102819496A (en) Address translation method of flash FTL (Flash Translation Layer)
US20220100650A1 (en) Storage device, and control method and recording medium thereof
US20140328127A1 (en) Method of Managing Non-Volatile Memory and Non-Volatile Storage Device Using the Same
CN103294607A (en) Memory management method
CN106598493A (en) Solid state disk address mapping table management method
US20100318726A1 (en) Memory system and memory system managing method
CN104317753A (en) Storage device and data reading-writing method thereof
CN103365786A (en) Data storage method, device and system
CN102279809A (en) Method for redirecting write in and garbage recycling in solid hard disk
CN102662849A (en) Method for managing blocks of multichannel flash memory
CN105224238B (en) Storage management method, memory storage apparatus and memorizer control circuit unit
CN102999441A (en) Fine granularity memory access method
TWI692688B (en) Flash memory controller and associated electronic device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 430070 Hubei city of Wuhan province Wuhan East Lake New Technology Development Zone Road No. two high Guan Nan Industrial Park No. 2 building 2-3 floor West

Applicant after: MEMORIGHT (WUHAN) Co.,Ltd.

Address before: 430070 Hubei city of Wuhan province Kuanshan road Optics Valley Software Park building C3 on the third floor 301-303 room

Applicant before: MEMORIGHT (WUHAN) Co.,Ltd.

C14 Grant of patent or utility model
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 430070 Hubei city of Wuhan province Wuhan East Lake New Technology Development Zone Road No. two high Guan Nan Industrial Park No. 2 building 2-3 floor West

Patentee after: EXASCEND TECHNOLOGY (WUHAN) CO.,LTD.

Address before: 430070 Hubei city of Wuhan province Wuhan East Lake New Technology Development Zone Road No. two high Guan Nan Industrial Park No. 2 building 2-3 floor West

Patentee before: MEMORIGHT (WUHAN) Co.,Ltd.

CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 430000 west of 2-3 / F, No.2 factory building, Guannan Industrial Park, No.1 Gaoxin 2nd Road, Wuhan Donghu New Technology Development Zone, Wuhan City, Hubei Province

Patentee after: Zhiyu Technology Co.,Ltd.

Address before: 430070 Wuhan, Hubei Wuhan East Lake New Technology Development Zone, high-tech two Road No. 1 South Guan Industrial Park 2 factory 2-3 floor West.

Patentee before: EXASCEND TECHNOLOGY (WUHAN) CO.,LTD.