CN101770427A - Method and device for utilizing flash memory space - Google Patents

Method and device for utilizing flash memory space Download PDF

Info

Publication number
CN101770427A
CN101770427A CN200910000395A CN200910000395A CN101770427A CN 101770427 A CN101770427 A CN 101770427A CN 200910000395 A CN200910000395 A CN 200910000395A CN 200910000395 A CN200910000395 A CN 200910000395A CN 101770427 A CN101770427 A CN 101770427A
Authority
CN
China
Prior art keywords
page
piece
active page
additional identification
page table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN200910000395A
Other languages
Chinese (zh)
Inventor
陈伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CHIPSBANK TECHNOLOGY (SHENZHEN) Co Ltd
Original Assignee
CHIPSBANK TECHNOLOGY (SHENZHEN) 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 CHIPSBANK TECHNOLOGY (SHENZHEN) Co Ltd filed Critical CHIPSBANK TECHNOLOGY (SHENZHEN) Co Ltd
Priority to CN200910000395A priority Critical patent/CN101770427A/en
Publication of CN101770427A publication Critical patent/CN101770427A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)
  • Memory System (AREA)

Abstract

The embodiment of the invention discloses a method and device for utilizing flash memory space. The method comprises the following steps: acquiring whether each page in a block is in the valid state; adding an identification to each block containing invalid pages, and creating a valid page list which records the valid pages contained in each block with the additional identification; and when the controller needs to operate the block with the additional identification, indicating the controller to acquire the number of the valid pages contained in the block according to the valid page list, and offsetting the address of the operational objective page to the valid pages. By using the embodiment of the invention, when the controller needs to operate the block with the additional identification, the number of the valid pages contained in the block can be acquired according to the valid page list, and the address of the operational objective page can be offset to the valid pages, so that the NAND flash memory is used for storing the valid pages in the block containing invalid pages, thereby maximally utilizing the memorable space.

Description

A kind of method and device that utilizes the Flash storage space
Technical field
The present invention relates to field of data storage, especially relate to a kind of method and device of the Flash of utilization storage space.
Background technology
Flash memory (Flash Memory) is the storer of a kind of long-life non-volatile (still can keep institute's data information stored under powering-off state), become successful, the most popular a kind of solid-state memory at present, can be used in USB flash disk, flash card (Flash Card), MP3 (MPEG Audio Layer3) player, MP4 (Motion Picture Experts Group 4) player, mobile phone, digital camera, on the digital products such as palm PC.Flash card can be divided into Smart Media (SM card), Compact Flash (CF card), Multi Media Card (mmc card), Secure Digital (SD card), Memory Stick (memory stick), XD-PictureCard (XD card) and micro harddisk (MICRODRIVE) according to different production firms and different application.
Flash memory can be divided into NOR type and NAND type, and NAND type flash memory is that unit carries out erase operation with piece (block), and the base unit of programming is the unit than the little one-level of piece: page or leaf (Page), generally each piece comprises several pages or leaves.
In research and practice process to prior art, the present inventor finds that there is following problem in prior art:
When the part page or leaf in the NAND type flash block was made mistakes or lost efficacy, controller can be labeled as this piece bad piece (bad block), and it is abandoned, thereby caused the active page of not makeing mistakes in this piece to use.Only during a page fault, controller also can be abandoned this piece to the piece that for example comprises 64 pages or leaves, and then 63 active pages of all the other in this piece can not use the serious waste resource.
Summary of the invention
The embodiment of the invention provides a kind of method and device of the Flash of utilization storage space, makes controller to use to comprise in the NAND type flash memory active page in the piece of invalid page or leaf, but maximally utilises storage space.
For solving the problems of the technologies described above, embodiment provided by the present invention is achieved through the following technical solutions:
A kind of data storing method:
Whether each page or leaf that gets access in the piece is effective status;
With the piece additional identification that comprises invalid page or leaf that gets access to, and create effective page table, the active page that described active page table record has the piece of additional identification to comprise;
When controller need be operated the piece of additional identification, indicating control obtained the number of the active page that this piece comprises according to described effective page table, and with the address offset of operand page or leaf to described active page.
A kind of device of storing data comprises:
Obtain the page status unit, whether each page or leaf that is used to get access in the piece is effective status;
Establishment active page table unit, the piece additional identification that comprises invalid page or leaf that is used for getting access to, and create effective page table, the active page that described active page table record has the piece of additional identification to comprise;
The operation converting unit is used for when controller need be operated the piece of additional identification, and indicating control obtains the number of the active page that this piece comprises according to described effective page table, and with the address offset of operand page or leaf to described active page.
By technique scheme as can be seen, the piece additional identification that comprise invalid page or leaf of the embodiment of the invention by getting access to, and the active page that comprises of the piece of creating active page table record additional identification, controller makes when need be operated the piece of additional identification, can obtain the number of the active page that this piece comprises according to described effective page table, and with the operand address offset to described active page, then used NAND type flash memory to comprise active page in the piece of invalid page or leaf, but maximally utilised storage space.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the method flow synoptic diagram of the embodiment of the invention one;
Fig. 2 is a page status synoptic diagram in comprising of the embodiment of the invention two of invalid page the piece;
Fig. 3 is the structural representation of embodiment of the invention device.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
(raising of Flash processing procedure also improves greatly for the demand of the error correcting capability of controller for Multi Level Cell, the MLC) appearance of technology along with multi-level unit.Therefore, face when possessing the controller of same error correcting capability, the stability of Flash has been not so good as in the past, is embodied in the piece that comprises invalid page or leaf and has increased.
Embodiment one, describe in detail referring to Fig. 1, Fig. 1 is the method flow synoptic diagram of present embodiment.
Step 101: whether each page or leaf that gets access in the piece is effective status.
Obtain the state of each page in the piece, can scan the state of each page by scan code, return to the volume production instrument then in the volume production stage.
Step 102: the piece additional identification that comprises invalid page or leaf that will get access to, and create effective page table, the active page that described active page table record has the piece of additional identification to comprise.
For example, block-0 comprises 16 page, and the 1st to the 8th page that the volume production instrument gets access to wherein is invalid page, then with this block additional identification, and creates effective page table.Sign can be any mark that certain field or other can distinguish this piece and other pieces that does not comprise invalid page or leaf.
Effectively page table can make to record in two ways and imitate page or leaf: a kind of for represent the address of active page with Byte; A kind of for represent the state of each page with Bit, 0 is that effectively 1 is invalid.
As above routine, the address of the active page among this block of active page table record of first kind of mode is the 9th to the 16th; Effective page table of the second way then is recorded as: 0000000011111111, represent that the first eight page or leaf is invalid, and back eight pages or leaves are effective.
Described effective page table can be write the allocation list of flash memory, allocation list is the table that is used for writing down some key parameters of Flash and controller.
Step 103: when controller need be operated the piece of additional identification, indicating control obtained the number of the active page that this piece comprises according to described effective page table, and with the address offset of operand page or leaf to described active page.
The executive agent of the embodiment of the invention can be the volume production instrument.The volume production instrument can be that the Related product (as digital products such as USB flash disk, flash card, MP3 player, MP4 player, mobile phones) that can will use flash memory technology in batches carries out formative tool software for rewriting the instrument of the data in its corresponding main control chip.The piece of operation additional identification can be storage data or other operation in this piece.
The piece additional identification that comprise invalid page or leaf of the embodiment of the invention by getting access to, and the active page that comprises of the piece of creating active page table record additional identification, controller makes when need be operated the piece of described additional identification, the number of the active page that can comprise according to the piece that described effective page table obtains described additional identification, and with the operand address offset to described active page, then use NAND type flash memory to comprise active page in the piece of invalid page or leaf, but maximally utilised storage space.
Following examples two comprise 64 pages or leaves but have only 32 effective flash memories of page or leaf with one is example, effectively page table represents that with Byte the address of active page is specifically described, and certainly, represents the state of each page with Bit, 0 is effectively, and 1 does not influence realization of the present invention for invalid mode yet.Obviously, the active page number is 21 or 35 to wait other numerals also not influence the realization of the embodiment of the invention.
Embodiment two,
Step 201: whether each page or leaf that gets access in the piece is effective status.
The state of each page as shown in Figure 2 among the block-2 that obtains, 32 pages or leaves in 64 pages or leaves are invalid, 0,1,4,5,6,7,8,9, E, 10,11,19,1A, 1B, 1C, 1E, 20,21,23,24,25,26,28,29,2E, 33,34,35,36,3D, 3E, 3F 32 pages or leaves are effective, and the address is respectively:.
Step 202: the piece additional identification that comprises invalid page or leaf that will get access to, and create effective page table, the active page that described active page table record has the piece of described additional identification to comprise.
With the block-2 additional identification, and create effective page table, can be as shown in table 1 below:
??0 ??1 ??4 ??5 ??6 ??7 ??8 ??9 ??E ??10 ??11 ??19 ??1A ??1B ??1C ??1E
??20 ??21 ??23 ??24 ??25 ??26 ??28 ??29 ??2E ??33 ??34 ??35 ??36 ??3D ??3E ??3F
Table 1
Table 1 has comprised the address of 32 active pages among the block-2.
In actual applications, the physical arrangement that is limited to flash memory, the active page position of a plurality of pieces that comprise invalid page or leaf is normally the same, therefore, can represent a plurality of active page positions that comprise the piece of invalid page or leaf with same Zhang Youxiao page table when the active page position is identical, the save memory space does not influence the realization of the embodiment of the invention.In the active page position of a plurality of pieces that comprise invalid page or leaf not simultaneously, then can create corresponding each comprise effective page table of the piece of invalid page or leaf, do not influence the realization of the embodiment of the invention yet.
Described effective page table can be write the allocation list of flash memory, allocation list is the table that is used for writing down some key parameters of Flash and controller.
Step 203: when controller need be operated the piece of additional identification, indicating control obtained the number of the active page that this piece comprises according to described effective page table, and with the address offset of operand page or leaf to described active page.
When controller arrives block-2 with data storage, inquire about effective page table, learn that block-2 comprises 32 active pages.When for example data storage being arrived the 16th page or leaf of block-2, then the physical address that finds the 16th page or leaf of block-2 according to effective page table correspondence is 1E, then with data storage to 1E, the storage space of the active page in the piece that comprises invalid page or leaf that prior art can not be used fully utilizes.
When effective page table is represented the state of each page with Bit, 0 is effectively, and 1 when creating for invalid mode, can be determined whether using by the state of firmware (Firmware) according to each Page.Effective page table shown in the present embodiment then is:
64b ' 00,011,111,100,001,111,011,110,010,000,100,101,000,011,111,110,010,111,100 00001100, and changing hexadecimal representation into is 0x1F87BC84A1FCBC0C.
When Page that controller need be operated drops in this Block, suppose LogicalPage offset=0x08, can show ring shift right according to this, obtain 0 o'clock pairing bit number that moved to right of 0x08 1b ' and be the corresponding physics Page address of operating of answering.Get back to this example and come up, then Physical Page offset should be 0x0E.
Effectively page table is represented the state of each page with Bit, and 0 be effectively, and 1 is invalid mode when creating, and takies less resources, with this example 8 Byte only; And this example is when representing the address of active page with effective page table with Byte, and effectively page table need take 32 Byte.
Like this, the piece additional identification that comprise invalid page or leaf of the embodiment of the invention by getting access to, and the active page that comprises of the piece of creating active page table record additional identification, controller makes when need be operated the piece of additional identification, can obtain the number of the active page that this piece comprises according to described effective page table, and with the operand address offset to described active page, then used NAND type flash memory to comprise active page in the piece of invalid page or leaf, but maximally utilised storage space.
And described effective page table can be created with the address of representing active page and the state dual mode of representing each page, wherein, represents that the mode of the state of each page then more economizes on resources, and then efficient is higher for the former.
Present circulation on the market has failure product or the substandard products on quite a few production line, i.e. DowngradeFlash; Or flash memory contains invalid page or leaf in the piece because of reasons such as this body structure, access times have caused, and causes that big quantity space can't use in the flash memory, and prior art is at one's wit's end to these products; And the embodiment of the invention is to propose at these products, makes that a piece that comprises invalid page or leaf is interior as long as also comprise an active page, and this active page just can not be wasted.The embodiment of the invention there is no any specific (special) requirements for this body structure of flash memory, that can deal with on the market to be run into be a lot of because the Downgrade Flash that part Page makes mistakes and causes BadBlock too much consequently can't use, thereby obsolete " electronic waste " is life-giving again, turn waste into wealth.
Need to prove, for aforesaid each method embodiment, for simple description, so it all is expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not subjected to the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in the instructions all belongs to preferred embodiment, and related action and module might not be that the present invention is necessary.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, do not have the part that describes in detail among certain embodiment, can be referring to the associated description of other embodiment.
A kind of method of the Flash of utilization storage space more than is provided, and the embodiment of the invention also provides a kind of device of the Flash of utilization storage space.
A kind of device 30 that utilizes the Flash storage space, referring to Fig. 3, Fig. 3 is the structural representation of embodiment of the invention device, comprising:
Obtain page status unit 31, whether each page or leaf that is used to get access in the piece is effective status.
Create active page table unit 32, the piece additional identification that comprises invalid page or leaf that is used for to get access to, and create effective page table, described active page table record has the address of the active page that the piece of additional identification comprises, perhaps record the state of all pages of the piece of described additional identification, comprise the effective status of active page and the disarmed state of invalid page or leaf.
The operation converting unit, controller is used for when need be operated the piece of additional identification, effective page table that indicating control is created according to described establishment active page table unit 32 obtains the number of the active page that this piece comprises, and with the address offset of operand page or leaf to described active page.
The piece additional identification that comprise invalid page or leaf of the embodiment of the invention by getting access to, and the active page that comprises of the piece of creating the described additional identification of active page table record, controller makes when need be operated the piece of additional identification, can obtain the number of the active page that this piece comprises according to described effective page table, and with the operand address offset to described active page, then use NAND type flash memory to comprise active page in the piece of invalid page or leaf, but maximally utilised storage space.
One of ordinary skill in the art will appreciate that, realize all or part of flow process in the foregoing description method, be to instruct relevant hardware to finish by computer program, described program can be stored in the computer read/write memory medium, this program can comprise the flow process as the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
More than the method and the device of a kind of Flash of utilization storage space that the embodiment of the invention provided is described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (9)

1. method of utilizing the F1ash storage space is characterized in that:
Whether each page or leaf that gets access in the piece is effective status;
With the piece additional identification that comprises invalid page or leaf that gets access to, and create effective page table, the active page that described active page table record has the piece of additional identification to comprise;
When controller need be operated the piece of additional identification, indicating control obtained the number of the active page that this piece comprises according to described effective page table, and with the address offset of operand page or leaf to described active page.
2. method according to claim 1 is characterized in that, the active page that described active page table record has the piece of additional identification to comprise is specially:
The active page that the active page table record has the piece of single additional identification to comprise.
3. the active page that described active page table record has the piece of additional identification to comprise is specially:
The identical active page that described active page table record has the piece of at least two additional identification to comprise.
4. method according to claim 1 is characterized in that, the active page that described active page table record has the piece of additional identification to comprise is specially:
Described active page table record has the address of the active page that the piece of additional identification comprises.
5. method according to claim 1 is characterized in that, the active page that described active page table record has the piece of additional identification to comprise is specially:
Described active page table record has the state of all pages that the piece of additional identification comprises, and comprises the effective status of active page and the disarmed state of invalid page or leaf.
6. according to each described method of claim 1 to 5, it is characterized in that, also comprise:
Described effective page table is write allocation list.
7. a device that utilizes the Flash storage space is characterized in that, comprising:
Obtain the page status unit, whether each page or leaf that is used to get access in the piece is effective status;
Establishment active page table unit, the piece additional identification that comprises invalid page or leaf that is used for getting access to, and create effective page table, the active page that described active page table record has the piece of additional identification to comprise;
The operation converting unit is used for when controller need be operated the piece of additional identification, and indicating control obtains the number of the active page that this piece comprises according to described effective page table, and with the address offset of operand page or leaf to described active page.
8. device according to claim 7 is characterized in that, described establishment active page table unit specifically is used to create effective page table of the active page that the piece that records single or at least two additional identification comprises.
9. according to claim 7 or 8 described devices, it is characterized in that, described establishment active page table unit specifically is used to create the address of the active page that the piece that records additional identification comprises, perhaps record effective page table of the state of all pages that the piece of additional identification comprises, the state of described all pages comprises the effective status of active page and the disarmed state of invalid page or leaf.
CN200910000395A 2009-01-07 2009-01-07 Method and device for utilizing flash memory space Pending CN101770427A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910000395A CN101770427A (en) 2009-01-07 2009-01-07 Method and device for utilizing flash memory space

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910000395A CN101770427A (en) 2009-01-07 2009-01-07 Method and device for utilizing flash memory space

Publications (1)

Publication Number Publication Date
CN101770427A true CN101770427A (en) 2010-07-07

Family

ID=42503300

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910000395A Pending CN101770427A (en) 2009-01-07 2009-01-07 Method and device for utilizing flash memory space

Country Status (1)

Country Link
CN (1) CN101770427A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102385921A (en) * 2010-09-06 2012-03-21 复格企业股份有限公司 Marking method and initializing method for non-volatile memory array
US20130132703A1 (en) * 2011-11-18 2013-05-23 Micron Technology, Inc. Apparatuses and methods for storing validity masks and operating apparatuses
CN106484761A (en) * 2015-08-24 2017-03-08 Hgst荷兰公司 For improving the method and system of storage daily record
CN107391038A (en) * 2017-07-26 2017-11-24 深圳市硅格半导体股份有限公司 Method for writing data, flash memory and the storage medium of data storage type flash memory
CN112764670A (en) * 2019-11-04 2021-05-07 深圳宏芯宇电子股份有限公司 Flash memory device and flash memory management method

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102385921A (en) * 2010-09-06 2012-03-21 复格企业股份有限公司 Marking method and initializing method for non-volatile memory array
CN105427885B (en) * 2010-09-06 2022-07-26 复格企业股份有限公司 Marking method for a non-volatile memory array
CN105427885A (en) * 2010-09-06 2016-03-23 复格企业股份有限公司 Method for marking non-volatile memory array
CN102385921B (en) * 2010-09-06 2015-12-16 复格企业股份有限公司 For labeling method and the initial method of a nonvolatile memory array
US8892828B2 (en) * 2011-11-18 2014-11-18 Micron Technology, Inc. Apparatuses and methods for storing validity masks and operating apparatuses
US20150100853A1 (en) * 2011-11-18 2015-04-09 Micron Technology, Inc. Apparatuses and methods for storing validity masks and operating apparatuses
CN104094238A (en) * 2011-11-18 2014-10-08 美光科技公司 Apparatuses and methods for storing validity masks and operating apparatuses
US9274883B2 (en) * 2011-11-18 2016-03-01 Micron Technology, Inc. Apparatuses and methods for storing validity masks and operating apparatuses
KR20140088212A (en) * 2011-11-18 2014-07-09 마이크론 테크놀로지, 인크 Apparatuses and methods for storing validity masks and operating apparatuses
KR101645829B1 (en) 2011-11-18 2016-08-04 마이크론 테크놀로지, 인크 Apparatuses and methods for storing validity masks and operating apparatuses
CN104094238B (en) * 2011-11-18 2018-02-02 美光科技公司 For storing the device and method of validity mask and operation equipment
US20130132703A1 (en) * 2011-11-18 2013-05-23 Micron Technology, Inc. Apparatuses and methods for storing validity masks and operating apparatuses
CN106484761A (en) * 2015-08-24 2017-03-08 Hgst荷兰公司 For improving the method and system of storage daily record
CN106484761B (en) * 2015-08-24 2019-06-28 Hgst荷兰公司 For improving the method and system of storage log
CN107391038A (en) * 2017-07-26 2017-11-24 深圳市硅格半导体股份有限公司 Method for writing data, flash memory and the storage medium of data storage type flash memory
CN107391038B (en) * 2017-07-26 2020-07-17 深圳市硅格半导体有限公司 Data writing method of data storage type flash memory, flash memory and storage medium
CN112764670A (en) * 2019-11-04 2021-05-07 深圳宏芯宇电子股份有限公司 Flash memory device and flash memory management method

Similar Documents

Publication Publication Date Title
US9632880B2 (en) Data storage device and flash memory control method
US7573754B2 (en) Nonvolatile memory, apparatus and method for determining data validity of the same
KR100977899B1 (en) Method and apparatus for effectively enabling an out of sequence write process within a non-volatile memory system
CN101288054B (en) Virtual-to-physical address translation in a flash file system
US20080195833A1 (en) Systems, methods and computer program products for operating a data processing system in which a file system's unit of memory allocation is coordinated with a storage system's read/write operation unit
CN101202106B (en) Non-volatile memory system and corresponding programming method
US9570183B1 (en) Method and controller for managing memory device
US20090248965A1 (en) Hybrid flash memory device and method of controlling the same
DE112007002437B4 (en) Power or power optimized code data storage for non-volatile memory
CN106681652B (en) Storage management method, memorizer control circuit unit and memory storage apparatus
CN108694096A (en) Controller, storage system and its operating method
US7945723B2 (en) Apparatus and method of managing mapping table of non-volatile memory
KR20180037320A (en) Volatile memory architecture in non-volatile memory devices and related controllers
JP2008009942A (en) Memory system
CN101727983A (en) Memory device and program method thereof
CN101770427A (en) Method and device for utilizing flash memory space
CN110764691A (en) Data storage device and non-volatile memory control method
CN111158579A (en) Solid state disk and data access method thereof
CN108733580A (en) Method for scheduling read commands
US11347640B2 (en) Data storage device and data processing method
KR101270685B1 (en) Apparatus and method for processing data of non-volitaile memory
CN101178933B (en) Flash memory array device
CN103186470B (en) Memorizer memory devices and Memory Controller thereof and method for writing data
CN102543184B (en) Memorizer memory devices, its Memory Controller and method for writing data
KR20130063243A (en) Non-volatile memory system and method of programming the same

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Open date: 20100707