CN102662849B - The block management method of multi-channel flash memory - Google Patents

The block management method of multi-channel flash memory Download PDF

Info

Publication number
CN102662849B
CN102662849B CN201210058081.1A CN201210058081A CN102662849B CN 102662849 B CN102662849 B CN 102662849B CN 201210058081 A CN201210058081 A CN 201210058081A CN 102662849 B CN102662849 B CN 102662849B
Authority
CN
China
Prior art keywords
page
block
physical
write
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201210058081.1A
Other languages
Chinese (zh)
Other versions
CN102662849A (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

Abstract

The invention discloses a kind of block management method of multi-channel flash memory, flash memory comprises several blocks, and each piece is divided into M Physical Page, in M Physical Page, P logical page (LPAGE) in front P continuous print Physical Page and page map table maps one by one, and rear Q continuous print Physical Page is as reservation page; Establish a page write pointer for each piece, be used in reference to a blank page in block; Often write a page, described page write pointer adds 1.When carrying out the page write operation in object block, the Physical Page that a logical page (LPAGE) in P logical page (LPAGE) maps, if this Physical Page is empty, then writes data at this Physical Page; If this Physical Page non-NULL, then write the Physical Page of page write pointers point by data, be then rubbish page by original physical page marker, then the physical page address of write data is mapped to former logical page (LPAGE).The unit of data write operation of the present invention tapers to page from monoblock, avoids a large amount of erase operations, thus substantially increases the efficiency writing data, improves the life-span of 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
In order to improve effective bandwidth and the read-write efficiency of flash memory, existing multi-channel flash memory is generally divided into some pieces (block), and each piece is divided into several pages (page), and each page comprises several sectors (sector).During multi-channel flash memory read-write, addressing in units of each page; But for the write operation of each passage flash memory, be in units of block then.A kind of block management method of flash memory as disclosure of the invention that China Patent No. is 200710072980, described flash memory comprises several blocks, every block is made up of multiple page, every page is divided into data storage area and redundant area, in described block, delimit one or more as address mapping table reserved area, in units of page, preserve the logical address of flash memory block and the mapping table of physical address; A selected blank block in return block, sets up the address maps list item of this swap block in the redundant area of described mapping table preservation page; When carrying out write operation, according to address map information, described swap block is write accordingly by new data and/or by the legacy data of the target block operated, erasing target block, then exchanges physical address corresponding with target block logical address for physical address corresponding for swap block logical address in mapping table page.This invention can effectively extend flash memory serviceable life while guarantee operating speed, and improves the security of flash data.
But for the application scenario of small data quantity write operation frequently, such scheme causes the frequently erasable of the block of flash memory, limits flash memory device operating efficiency, damages the serviceable life of flash memory.
Summary of the invention
Technical matters to be solved by this invention is to provide a kind of block management method of new multi-channel flash memory, further improves flash memory device operating efficiency, extends the serviceable life of flash memory.
For solving the problems of the technologies described above, the invention provides a kind of block management method of new multi-channel flash memory, described flash memory comprises several blocks, each piece is divided into M Physical Page, it is characterized in that, in a described M Physical Page, P logical page (LPAGE) in front P continuous print Physical Page and page map table maps one by one, rear Q continuous print Physical Page is as retaining page, M=P+Q; Establish a page write pointer for each piece, be used in reference to a blank page in block; When Physical Page all in block are blank, described page write pointer value is 1; Often write a page, described page write pointer adds 1.
When carrying out the page write operation in object block, in P logical page (LPAGE) of object block, choosing a logical page (LPAGE), this Physical Page choosing logical page (LPAGE) to map, if choose Physical Page to be empty, then writing data at this Physical Page; If choose Physical Page to there is data, non-NULL, then data are write the Physical Page of described page write pointers point, then described Physical Page of choosing is labeled as rubbish page, then choose logical page (LPAGE) described in the physical page address of write data being mapped to.
The scheme of further optimization, when the described page write operation carried out in object block, first judge whether described page write pointer value is greater than M, if described page write pointer value is greater than M, namely, when reservation page in object block is all write, obtain a swap block, non-junk page in object block, i.e. valid data page are copied one by one in P Physical Page of described swap block, then, the physical address that physical address corresponding for swap block logical address in mapping table is corresponding with former object block logical address exchanges, more former object block is emptied.Now, described swap block becomes data block, and its page of write pointer value is P+1, and former object block becomes swap block.Then data writing operation is carried out according to new address mapping table and page write pointer.
If described page write pointer value is not more than M, then directly carry out data writing operation according to address mapping table and page write pointer.
Beneficial effect: when Host end will write a page data, this method is directly programmed to page, instead of writes the data of whole piece.When Host end will repeat to write to same logical page (LPAGE), be mapped to different Physical Page by page map table, thus realize page programming, and this block need not be wiped the data writing whole piece again.Because the unit of data write operation tapers to page from monoblock, avoid a large amount of erase operations, thus substantially increase the efficiency writing data, improve the life-span of flash memory.
Accompanying drawing explanation
Below in conjunction with the drawings and specific embodiments, technical scheme of the present invention is further described in detail.
Fig. 1 is the logical page (LPAGE) of a block and the mapping schematic diagram of Physical Page.
When Fig. 2 is for writing N page operations, the mapping pair of logical page (LPAGE), Physical Page is according to figure.
Fig. 3 is for when page write pointer is greater than M, and the mapping pair that data block, swap block exchange is according to figure.
Fig. 4 is 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 block table on the right comprises 0 ~ 63 M=64 Physical Page altogether, and front P=48 of 64 Physical Page maps one by one with 48 logical page (LPAGE)s, and a rear Q=16 Physical Page is as retaining page.
Establish a page write pointer for each piece, be used in reference to a blank page in block; When Physical Page all in block are blank, page write pointer value is 1, namely points to the 0th Physical Page; Often write a page, page write pointer adds 1.
As shown in Figure 2, when in object block, certain Physical Page carries out write operation, first, by logical page (LPAGE) addressing, in 48 logical page (LPAGE)s of object block, choose N logical page (LPAGE), N logical page (LPAGE) is mapped to N Physical Page.Now, if N Physical Page has existed data, non-NULL, then the 48th Physical Page being positioned at reservation page table of data write page write pointers point, has then been labeled as rubbish page by N Physical Page, then by the address maps of current 48th Physical Page to N logical page (LPAGE).
As shown in Figure 3, when after repeatedly page write operation, page write pointer value is greater than M, and 16 namely in object block retain pages when all being write, application acquisition swap block, copies the non-junk page in object block, i.e. valid data page one by one in P Physical Page of swap block.Special instruction, those skilled in the art should learn, the valid data number of pages order now in object block is exactly P=48.Then, the physical address that physical address corresponding for swap block logical address in mapping table is corresponding with former object block logical address exchanges, then object block is emptied.Now, swap block becomes new data block, and the page write pointer value of new data block is P+1, namely 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.First, flash memory enters normal operating conditions, the read write command that wait-receiving mode main frame Host sends, after receiving the read write command that Host sends, flash controller carries out address mapping table conversion, comprise and be transformed into physical block address by LBA (Logical Block Addressing), logical page address is transformed into physical page address, if be read data, is then addressed to Physical Page according to the mapping address of address mapping table, read this number of physical pages certificate, then return.If for writing data, then judge whether page write pointer exceeds threshold value, namely whether the value of page write pointer is greater than M, if not, then performs according to address mapping table and page write pointer, data write flash memory step, and scheduler mapping table step.Specifically comprise: in P logical page (LPAGE) of object block, choose a logical page (LPAGE), this Physical Page choosing logical page (LPAGE) to map, if choose Physical Page to be empty, then write data at this Physical Page; If choose Physical Page to there is data, non-NULL, then data are write the Physical Page of described page write pointers point, then described Physical Page of choosing is labeled as rubbish page, then choose logical page (LPAGE) described in the physical page address of write data being mapped to.Illustrate see Fig. 2.
If, namely, when reservation page in object block is all write, obtain a swap block, non-junk page in object block, i.e. valid data page are copied one by one in P Physical Page of swap block, then, the physical address that physical address corresponding for swap block logical address in mapping table is corresponding with former object block logical address exchanges, more former object block is emptied.Now, swap block becomes data block, and its page of write pointer value is P+1, and former object block becomes swap block.And then perform according to address mapping table and page write pointer, data write flash memory step, scheduler mapping table step, really completes the write operation of data.
It should be noted last that, above embodiment is only in order to illustrate technical scheme of the present invention and unrestricted, although with reference to preferred embodiment to invention has been detailed description, those of ordinary skill in the art is to be understood that, can modify to technical scheme of the present invention or equivalent replacement, and not departing from the spirit and scope of technical solution of the present invention, it all should be encompassed in the middle of right of the present invention.

Claims (2)

1. a block management method for multi-channel flash memory, described flash memory comprises several blocks, and each piece is divided into M Physical Page, it is characterized in that, each piece of correspondence page map table, and each page map table is divided into P logical page (LPAGE); In a described M Physical Page, P logical page (LPAGE) in front P continuous print Physical Page and page map table maps one by one, rear Q continuous print Physical Page as reservation page, M=P+Q; Establish a page write pointer for each piece, be used in reference to a blank page in block; When Physical Page all in block are blank, described page write pointer value is 1; Often write a page, described page write pointer adds 1;
When carrying out the page write operation in object block, in P logical page (LPAGE) of object block, choosing a logical page (LPAGE), this Physical Page choosing logical page (LPAGE) to map, if choose Physical Page to be empty, then writing data at this Physical Page; If choose Physical Page to there is data, non-NULL, then data are write the Physical Page of described page write pointers point, then described Physical Page of choosing is labeled as rubbish page, then choose logical page (LPAGE) described in the physical page address of write data being mapped to.
2. the block management method of multi-channel flash memory according to claim 1, it is characterized in that, when the described page write operation carried out in object block, first judge whether described page write pointer value is greater than M, if described page write pointer value is greater than M, namely, when reservation page in object block is all write, obtain a swap block, by the non-junk page in object block, namely valid data page copies one by one in P Physical Page of described swap block, then, the physical address that physical address corresponding for swap block logical address in mapping table is corresponding with former object block logical address exchanges, again former object block is emptied, now, described swap block becomes data block, and its page of write pointer value is P+1, and former object block becomes swap block, then data writing operation is carried out according to new address mapping table and page write pointer,
If described page write pointer value is not more than M, then directly carry out data writing operation according to address mapping table and page 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 CN102662849A (en) 2012-09-12
CN102662849B true 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)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3394758A4 (en) * 2017-01-23 2019-02-20 Micron Technology, Inc. Partially written block treatment
CN110287129B (en) * 2019-06-27 2021-07-13 深圳忆联信息系统有限公司 L2P table updating and writing management method and device based on solid state disk
CN110471626B (en) * 2019-08-15 2023-04-25 无锡融卡科技有限公司 Nor Flash management layer and method applied to Java Card
CN112506438B (en) * 2020-12-14 2024-03-26 深圳大普微电子科技有限公司 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

Also Published As

Publication number Publication date
CN102662849A (en) 2012-09-12

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
CN108121503B (en) NandFlash address mapping and block management method
CN104750625B (en) Data memory device and method for controlling flash memory
TWI398770B (en) Data accessing method for flash memory and storage system and controller using the same
CN104102585B (en) Map information recording method, Memory Controller and memorizer memory devices
CN101937319B (en) Memory systems and mapping methods thereof
EP2115595B1 (en) Memory device performance enhancement through pre-erase mechanism
CN103049397B (en) A kind of solid state hard disc inner buffer management method based on phase transition storage and system
US8898370B2 (en) Data storage method for flash memory, and flash memory controller and flash memory storage system using the same
TWI399644B (en) Block management method for a non-volatile memory
CN104484283B (en) A kind of method for reducing solid state disk write amplification
CN104423894B (en) Data memory device and method for controlling flash memory
CN103019971A (en) Method of quickly responding to trim command, SSD (Solid State Disk) controller and system
CN104461393A (en) Mixed mapping method of flash memory
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
CN104268095A (en) Memory and data reading/ writing operation method based on memory
CN106557432B (en) Buffer storage supervisory method, memorizer control circuit unit and storage device
US10482009B1 (en) Use of a logical-to-logical translation map and a logical-to-physical translation map to access a data storage device
CN106354658B (en) A method of it reducing mapping table memory source in mixed-use developments algorithm and occupies
CN102662849B (en) The block management method of multi-channel flash memory
CN101630233B (en) Data access method used for flash memory, storage system and controller
US20100318726A1 (en) Memory system and memory system managing method
CN102999441B (en) Fine granularity memory access method
CN102609358B (en) Method for aggregating static data and solid-state disk thereof

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.