Nothing Special   »   [go: up one dir, main page]

CN101727397A - Block management and change method, flash memory storage system and controller thereof - Google Patents

Block management and change method, flash memory storage system and controller thereof Download PDF

Info

Publication number
CN101727397A
CN101727397A CN200810169083A CN200810169083A CN101727397A CN 101727397 A CN101727397 A CN 101727397A CN 200810169083 A CN200810169083 A CN 200810169083A CN 200810169083 A CN200810169083 A CN 200810169083A CN 101727397 A CN101727397 A CN 101727397A
Authority
CN
China
Prior art keywords
described physical
physical blocks
physical location
flash memory
unspoiled
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
CN200810169083A
Other languages
Chinese (zh)
Other versions
CN101727397B (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.)
Phison Electronics Corp
Original Assignee
Phison Electronics Corp
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 Phison Electronics Corp filed Critical Phison Electronics Corp
Priority to CN2008101690831A priority Critical patent/CN101727397B/en
Publication of CN101727397A publication Critical patent/CN101727397A/en
Application granted granted Critical
Publication of CN101727397B publication Critical patent/CN101727397B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention relates to a block management and change method for a flash memory, a flash memory storage system and a controller thereof. The block management and change method comprises the following steps of: dividing multiple physical blocks of the flash memory into multiple physical units, and grouping into a using area and a substituting area, wherein the physical blocks of each physical unit can be accessed by using a multi-block surface access order; when the physical blocks of the physical units of the using area are damaged, if the alternate area stores good physical units, changing the damaged physical units by taking the physical units as units, and recording undamaged physical blocks of the substituted physical units; if the alternate area does not store the good physical units but good physical blocks, changing the damaged physical blocks by taking the physical blocks as units, thus the access efficiency of the flash memory is enhanced, and the service life of the flash memory is prolonged.

Description

Block management and replacing method, flash memory system and controller thereof
Technical field
The flash memory system and the controller thereof that the present invention relates to a kind of block management that is used for flash memory and replacing method and use the method particularly relate to a kind of block management of the flash chip that is used to have the multi-tiling face and the flash memory system and the controller thereof of replacing method and use the method.
Background technology
Digital camera, mobile phone camera and MP3 are very rapid in growth over the years, make the consumer also increase rapidly the demand of Storage Media.Because flash memory (Flash Memory) has that data are non-volatile, power saving, volume is little and the characteristic of no mechanical structure etc., suitable portable use, the most suitable being used on the portable battery-powered product of this class.Solid state hard disc is exactly a kind of with the storage device of nand flash memory as Storage Media.
In general, the flash memory crystal grain (die) in the flash chip of flash memory system (chip) can be divided into a plurality of physical locations (physical unit), and these physical locations generally can be made up of a physical blocks or a plurality of physical blocks.These physical locations can be defined as data field (data area) and spare area (sparearea).Classify as and to store in the physical location of data field by writing the valid data that instruction writes, and the physical location in the spare area is the physical location in the replacement data district when writing instruction in execution.Specifically, when flash memory system receive host computer system writing the instruction and desire is write fashionable to the physical location of data field, flash memory system can be from the spare area extracts physical unit and will the physical location that desire is upgraded in the data field in effective legacy data write to the physical location that from the spare area, extracts with the new data of desiring to write and the physical location that will write new data is associated as the data field, and the spare area is wiped and be associated as to the physical location of data field originally.In order to allow the physical location of host computer system access successfully with the mode storage data of rotating, flash memory system can configuration logic unit carry out access for host computer system, and wherein logical block is to dispose according to the size of physical location with one or more physical blocks.That is to say, flash memory system can be set up logical-physical address mapping table (logical-physical address mapping table), and the enantiomorphic relationship in this table between the physical location of record and renewal logical block and data field reflects rotating of physical location, so host computer system only need be carried out access and flash memory system can come the physical location of institute's mapping is read or write data according to logical-physical address mapping table at providing logical block.
In addition, the physical location of meeting reserve part is as an alternate area in the general flash chip (chip), and it is to continue running in order to replacing damaged physical location when the physical location in data field or the spare area damages.Particularly, at the flash chip of tool multi-tiling face in order to utilize the lifting access speed, generally can be to belong to the different blocks face and can carry out the physical location that a plurality of physical blocks of multi-tiling face access instruction (multi-planes accessingcommand) formed and carry out access.In this example, if when one of them physical blocks in the physical location is damaged, flash memory system can with whole physical location be unit change damage physical location so that its can continue to carry out access with multi-tiling face access instruction.The action of this replacing can be performed till the alternate area does not have available physical location and can come replacing damaged physical location, and this moment, flash memory system will and can't continue to use by the declaration damage again.
Yet, still have unspoiled physical blocks in the damage physical location that in fact is replaced, but therefore carry out the management of block and the waste that replacing can cause the storage area of flash memory system in the above described manner, and can shorten the life-span of flash memory system.
Summary of the invention
In view of this, the invention provides a kind of block management and replacing method, its data that can promote flash memory system write efficient and prolong the life-span of flash memory system.
In addition, the invention provides a kind of controller, it uses above-mentioned block management and replacing method to manage flash chip, and its data that can promote flash memory system write efficient and prolong the life-span of flash memory system.
Moreover, the invention provides a kind of stocking system, it uses above-mentioned block management and replacing method to manage flash chip, and its data that can promote flash memory system write efficient and prolong the life-span of flash memory system.
The present invention proposes a kind of block management and replacing method, be applicable to flash memory system, wherein this flash memory system has a plurality of physical blocks, this block management and replacing method comprise physical blocks being divided into a plurality of physical locations and being grouped into uses district and alternate area, and wherein the physical blocks in each physical unit can be by using multi-tiling face access (multi-planes accessing) instruction come access.This block management and replacing method also comprise when one of them physical blocks in belonging to the physical location that uses the district is damaged, whether the number of judging unspoiled physical location in the alternate area is greater than a predetermined threshold, wherein when the number of unspoiled physical location in the alternate area during greater than this predetermined threshold, then selecting unspoiled physical location from the alternate area is that unit replaces the physical location of the physical blocks that tool damages in the general district and writes down the physical blocks of not damaging or damaging in the substituted physical location with the physical location.And when the number of unspoiled physical location in the alternate area was not more than this predetermined threshold, then selecting unspoiled physical blocks from the alternate area was the replacing damaged physical blocks of unit with the physical blocks.
In one embodiment of this invention, above-mentioned block management and replacing method also comprise trivial data field and the spare area of being divided into of use, the physical location that wherein belongs to the spare area in order to the physical location that belongs to the data field ground storage data of rotating.
In one embodiment of this invention, each above-mentioned physical blocks has a redundant area, and the step of unspoiled physical blocks is included in record one mark in the redundant area of unspoiled physical blocks in the substituted physical location of above-mentioned record.
In one embodiment of this invention, the step of unspoiled described physical blocks is included in the unspoiled physical blocks of record in the replacing table in the above-mentioned substituted physical location of record.
The present invention also provides a kind of flash memory system and controller thereof, and this flash memory system comprises flash chip, connector and controller, and wherein flash chip has a plurality of physical blocks.This controller is to be electrically connected to above-mentioned flash chip and connector, and this controller the flash interface module, memory buffer, host interface module and the memory management module that comprise microprocessor unit and be coupled to microprocessor unit.Particularly, this memory management module has a plurality of machine instructions that can be carried out by microprocessor unit flash memory is finished above-mentioned block management and replacing method.
In one embodiment of this invention, above-mentioned flash memory system is carry-on dish, flash card or solid state hard disc.
In one embodiment of this invention, above-mentioned physical blocks is to belong to a plurality of block faces, and each physical location is made up of two physical blocks that belong to the different blocks face at least.
In one embodiment of this invention, above-mentioned block face is to belong to a flash memory crystal grain.
In one embodiment of this invention, above-mentioned block face is to belong to a plurality of flash memory crystal grain.
In one embodiment of this invention, above-mentioned flash memory crystal grain is to belong to a plurality of flash chips.
In one embodiment of this invention, above-mentioned flash memory crystal grain is to belong to a flash chip.
Method provided by the present invention can still have in the alternate area can the access of multi-tiling face access instruction physical blocks form physical location the time be that unit changes the physical blocks of having damaged with the physical location when being the physical location that unit changes the physical blocks damaged and physical blocks that can not the access of multi-tiling face access instruction in the alternate area is formed with the physical blocks, therefore can promote the access efficiency of flash memory system effectively and prolong life-span of flash memory system.
For above-mentioned feature and advantage of the present invention can be become apparent, preferred embodiment cited below particularly, and be described with reference to the accompanying drawings as follows.
Description of drawings
Fig. 1 is the summary calcspar according to the flash memory system shown in one embodiment of the invention.
Fig. 2 is the calcspar according to the flash chip shown in the embodiment of the invention.
Fig. 3 A is general district and the alternate area according to the flash chip shown in the embodiment of the invention.
Fig. 3 B carries out the synoptic diagram that block is changed according to general district shown in the embodiment of the invention and alternate area.
Fig. 3 C is the running synoptic diagram according to physical location in the general district shown in the embodiment of the invention.
Fig. 3 D is the example schematic that writes according to physical location among Fig. 3 C shown in the embodiment of the invention.
Fig. 4 is according to block management shown in the embodiment of the invention and the process flow diagram of changing step.
The reference numeral explanation
100: flash memory system
110: controller
110a: microprocessor unit
110b: memory management module
110c: flash interface module
110d: memory buffer
110e: host interface module
120: connector
130: flash chip
130a: the first block face
130b: the second block face
200: host computer system
210-1~210-M: logical block
300: bus
302: general district
312: the alternate area
304: system region
306: the data field
308: the spare area
310-(1), 310-(2), 310-(P), 310-(P+1), 310-(P+2), 310-(N): physical location
350: replace physical location
S401, S403, S405, S407, S409, S411, S413, S415, S417: block management and replacing step
Embodiment
Fig. 1 is the summary calcspar according to the flash memory system shown in one embodiment of the invention.Please refer to Fig. 1, flash memory system 100 comprises controller (also claiming controller system) 110, connector 120 and flash chip 130.
Usually flash memory system 100 can use with host computer system 200, so that host computer system 200 can write to data flash memory system 100 or reading of data from flash memory system 100.In the present embodiment, flash memory system 100 be solid state hard disc (Solid State Drive, SSD).But it must be appreciated that flash memory system 100 can also be storage card or coil with oneself in another embodiment of the present invention.
Controller 110 can carry out with hardware pattern or the real a plurality of instructions done of firmware pattern with matching connector 120 and flash chip 130 carry out data storage, running such as read and wipe.Controller 110 comprises microprocessor unit 110a, memory management module 110b, flash interface module 110c, memory buffer 110d and host interface module 110e.
Microprocessor unit 110a in order to cooperative cooperatings such as memory management module 110b, flash interface module 110c, memory buffer 110d and host interface module 110e to carry out the various runnings of flash memory system 100.
Memory management module 110b is coupled to microprocessor unit 110a.Memory management module 110b has a plurality of machine instructions that can be carried out by microprocessor unit 110a with management flash chip 130, for example machine instruction of average abrasion, block management function, service logic-physical address mapping table (mapping table) function etc.Particularly, in embodiments of the present invention, memory management module 110b comprises the block management and the machine instruction of changing step that can finish according to present embodiment.
In the present embodiment, memory management module 110b is embodied in the controller 110 with a firmware pattern, for example write the associated mechanical instruction and (for example be stored in the formula storer with programming language, ROM (read-only memory) (Read Only Memory, ROM)) is implemented memory management module 110b.When flash memory system 100 runnings, a plurality of machine instructions of memory management module 110b can be loaded among the memory buffer 110d indirectly, and are carried out or directly carried out to finish above-mentioned average abrasion function, bad block management function, service logic-physical blocks mapping table function etc. by microprocessor unit 110a by microprocessor unit 110a.Particularly, controller 110 by a plurality of mechanical orders of execute store administration module 110b come this finish according to the block management of the embodiment of the invention with change step.
In another embodiment of the present invention, the mechanical order of memory management module 110b can also the firmware pattern be stored in the specific region (for example, being exclusively used in the system region of storage system data in the flash memory) of flash chip 130.Same, when flash memory system 100 runnings, a plurality of machine instructions of memory management module 110b can be loaded among the memory buffer 110d and by microprocessor unit 110a to be carried out.In addition, in another embodiment of the present invention, memory management module 110b can also a hardware pattern be implemented in the controller 110.
Flash interface module 110c is coupled to microprocessor unit 110a and in order to access flash chip 130.Just, the data of desiring to write to flash chip 130 can be converted to 130 receptible forms of flash chip via flash interface module 110c.
Memory buffer 110d is coupled to microprocessor unit 110a and in order to stocking system data (for example logical-physical address mapping table) temporarily or data that host computer system 200 read or write.In the present embodiment, memory buffer 110d be static RAM (static random accessmemory, SRAM).Yet, it must be appreciated, the invention is not restricted to this, dynamic RAM (Dynamic Random Access memory, DRAM), reluctance type storer (Magnetoresistive Random Access Memory, MRAM), phase transition storage (PhaseChange Random Access Memory, PRAM) or other storeies that are fit to also can be applicable to the present invention.
The instruction that host interface module 110e is coupled to microprocessor unit 110a and is transmitted in order to reception and identification host computer system 200.Just, the instruction and the data that are transmitted of host computer system 200 can be sent to microprocessor unit 110a by host interface module 110e.In the present embodiment, host interface module 110e is the SATA interface.Yet, it must be appreciated to the invention is not restricted to this that host interface module 110e can also be USB interface, IEEE 1394 interfaces, PCI Express interface, MS interface, MMC interface, SD interface, CF interface, ide interface or other data transmission interfaces that is fit to.Particularly, host interface module 110e can be corresponding with connector 120.Just, host interface module 110e must arrange in pairs or groups mutually with connector 120.
In addition, though unshowned in present embodiment, controller 110 can comprise also that error correction module and power management module etc. are used to control the general utility functions module of flash memory.
Connector 120 is in order to connect host computer system 200 by bus 300.In the present embodiment, connector 120 is the SATA connector.Yet, it must be appreciated to the invention is not restricted to this that connector 120 can also be USB connector, IEEE 1394 connectors, PCI Express connector, MS connector, MMC connector, SD connector, CF connector, IDE connector or other connectors that is fit to.
Flash chip 130 is to be electrically connected to controller 110 and in order to storage data.Flash chip 130 is multilayer storage unit (Multi Level Cell, a MLC) nand flash memory in this enforcement.Yet, it must be appreciated, the invention is not restricted to this.In another embodiment of the present invention, (Single Level Cell, SLC) nand flash memory also can be applicable to the present invention to the individual layer storage unit.
Flash chip 130 comprises first block face (plane) 130a and the second block face 130b in the present embodiment, comprises a plurality of physical blocks respectively among the first block face 130a and the second block face 130b.Particularly, the first block face and the second block face can be physics or virtual cutting apart to each other.
What deserves to be mentioned is, though present embodiment is to be described with two block faces, yet the invention is not restricted to this, the present invention also can be applicable to have the flash chip of the block face of any number.In addition, be that the first block face 130a and the second block face 130b of the flash memory crystal grain (not indicating) with flash chip 130 is described in the present embodiment, yet the present invention also can be applicable to the flash chip of a plurality of flash memory crystal grain of tool.Similarly, describe though present embodiment is a flash chip, the present invention also can be applicable to have the flash memory system of a plurality of flash chips.
Physical blocks is the least unit of wiping in flash memory.That is each physical blocks contains the storage unit that is wiped free of in the lump of minimal amount.Each physical blocks can be divided into a plurality of page addresses (page) usually.The page address is generally the minimum unit of programming (program).But what specify is in some different flash memory design, and minimum unit of program also can be a sector (sector).That is to say the minimum unit that in page address a plurality of sectors is arranged and be programming with a sector.In other words, the page address is the minimum unit that writes data or reading of data.Each page address generally includes user data field D and redundant area R.The user data field is in order to storage user's data, and redundant area is in order to data (for example, the error-correcting code (error correcting code, ECC)) of stocking system.
Be sector (sector) size corresponding to disc driver, generally speaking, user data field D is generally 512 bytes, and redundant area R is generally 16 bytes.Just, a page address is a sector.Yet, can also form a page address in a plurality of sectors.In the present embodiment, flash memory block page address is to comprise 4 sectors.
Generally speaking, physical blocks can be made up of the page address of arbitrary number, for example 64 page addresses, 128 page addresses, 256 page addresses etc.In addition, physical blocks in the first block face 130a or the second block face 130b also can be grouped into several zones (zone) usually, and coming diode-capacitor storage with the zone is to operate independently of one another with the parallel degree of increase operation execution and the complexity of streamlining management in a way.
In addition, controller 110 can be configured to a physical location with a plurality of physical blocks among the first block face 130a and the second block face 130b and manage, and for example a physical location comprises two physical blocks.Because when managing with physical location, controller 110 is to come service logic-physical address mapping table with bigger unit (being physical location), therefore can save the space of required use memory buffer 110d.
Particularly, in the present embodiment since controller 110 can multi-tiling face access (multi-planesaccessing) pattern the particular physical block among the access first block face 130a and the second block face 130b simultaneously.That is to say that particular physical block in flash chip 130 among the first block face 130a and the particular physical block of the second block face 130b can be operated (for example, carry out and write, read and wipe) by multi-tiling face access instruction simultaneously.Therefore, in the present embodiment controller 110 more can be respectively the physical blocks of operative relationship is configured to a physical location with having simultaneously.Specifically, in specific flash memory chip circuit design, can make and overlap actuation time that some block faces can at least a portion that () mode comes access data to shorten the required time of access data or synchronously.Therefore, claim particular block face that these can part method of synchronization access data for having operative relationship simultaneously at this, and be called multi-tiling face access mode with the access mode of part method of synchronization access data.
Fig. 2 is the calcspar according to the flash chip shown in the embodiment of the invention.Please refer to Fig. 2, the physical blocks of the first block face 130a and the second block face 130b is formed physical location 310-1~310-N discriminably.
Fig. 3 A~3D is according to the running synoptic diagram of physical location in the first block face 130a and the second block face 130b shown in the embodiment of the invention.
It must be appreciated, when this describes the running of flash memory with " extraction ", " moving ", " exchange ", " replacement ", " rotating ", " cut apart ", " division " and etc. the speech physical blocks of operating flash chip 130 are in logic notions.That is to say that the physical location of the physical blocks of flash memory is not changed, but in logic the physical blocks of flash memory is operated.What deserves to be mentioned is that following running is that the mechanical order of controller 110 execute store administration module 110b is finished.
Fig. 3 A is general district and the alternate area according to the flash chip shown in the embodiment of the invention.
Please refer to Fig. 3 A, in embodiments of the present invention, for (that is, the writing) data of programming efficiently, controller 110 can logically be grouped into physical location shown in Figure 2 general district 302 and alternate area 312.
Physical location 310-(1)~310-(P) in general district 302 is the flash memory system 100 normal physical locations that use.That is to say that controller 110 can write to the physical location that belongs to general district 302 with data.
Physical location 310-(P+1) in alternate area 312~310-(N) is the alternate physical unit.Flash chip 130 can be reserved 4% physical blocks as changing use when dispatching from the factory, that is to say that when the physical blocks in the general district 302 was damaged, the physical blocks of reserving in alternate area 312 can be in order to replacing damaged physical blocks.Therefore, if when still having available physical blocks in the alternate area 312, controller 110 can extract available physical blocks and change the physical blocks of damage from alternate area 312 when the physical blocks damage takes place.If during no available physical blocks, flash memory system 100 will can't be re-used by declaration when the physical blocks damage takes place in the alternate area 312.In general, controller 110 can be set judge the predetermined threshold whether flash chip 130 can continue to use, if then judge extracts physical block from alternate area 312 again during less than this predetermined threshold when the number of physical blocks available in the alternate area 312.In the present embodiment, this predetermined threshold is to be set at 0.Yet, the invention is not restricted to this, this predetermined threshold can be set at 1 or greater than 1 integer.
Particularly, in the present embodiment, controller 110 can be from alternate area 312 is that unit or physical blocks are the replacing that unit damages physical location or physical blocks with the physical location.
Fig. 3 B carries out the synoptic diagram that block is changed according to general district shown in the embodiment of the invention and alternate area.
Please refer to Fig. 3 B, when having physical blocks to be damaged in the general district 302, the controller 110 of present embodiment can be changed the physical blocks of damage in two ways.For example, when supposing physical blocks a (1) damage of the first block face 130a, in first kind of mode, the physical location 310-(P+1) that controller 110 is understood with the physical blocks b (P+1) of the physical blocks a (P+1) that comprises the first block face 130a and the second block face 130b changes whole physical location 310-1 (shown in Fig. 3 B (a)).That is to say that when controller 110 need use physical location 310-(1), controller 110 can use physical location 310-(P+1) by the record that reads replacing afterwards.For example, this changes in the redundant area that writes down the physical blocks that can be recorded in physical location 310-1.In addition, in the second way, controller 110 only can be changed the physical blocks a (1) of the first block face 130a that damaged with physical blocks a (P+1).That is to say, when controller 110 access physical location 310-(1), if the address of access during for the address of physical blocks a (1) originally then controller 110 can change to access physical blocks a (P+1).Similarly, for example this replacing record can be recorded in the redundant area of physical blocks a (1).
What deserves to be mentioned is, according to present embodiment when controller 110 uses first kind of mode to change the block of damage, owing to (for example still have normal physical blocks in the physical location that is replaced, physical blocks b shown in Fig. 3 B (1)), therefore can special this information of record according to the controller 110 of the embodiment of the invention.For example, can change this information of record in the table one in an embodiment of the present invention, perhaps also can use the redundant area of physical blocks b (1) to write down this information.
Controller 110 according to the embodiment of the invention can use above-mentioned dual mode to change the physical blocks of having damaged, and its concrete function mode will describe in detail below in conjunction with Fig. 4.
In an embodiment of the present invention, when flash memory system 100 runnings, controller 110 can more be grouped into system region, data field and spare area with the physical location in the general district 302 of flash chip 130.Fig. 3 C is the running synoptic diagram according to physical location in the general district shown in the embodiment of the invention.Please refer to Fig. 3 C, system region 304 comprises physical location 310-(1)~physical location 310-(S), data field 306 comprises physical location 310-(S+1)~physical location 310-(S+M), and spare area 308 comprises physical location 310-(S+M+1)~physical location 310-(P).In the present embodiment, above-mentioned S, M and P are positive integer, the physical blocks quantity of each district's configuration of its representative, and it can be set according to the capacity of employed flash memory by the manufacturer of flash memory system.
Physical location in the system region 304 is in order to the register system data, and this system data comprises about the logical-physical address mapping table of page address number, record logical address and the physical address enantiomorphic relationship of the number of regions of the first block face 130a, physical blocks number that each is regional, each physical blocks etc.
In general physical location in the data field 306 is exactly the block of the logical blocks institute mapping of 200 accesses of host computer system in order to store user's data.
Therefore physical blocks in the spare area 308 is in order to the physical location in the data field 306 of rotating, and the physical blocks in spare area 206a be sky or spendable block, i.e. no record data or be labeled as invalid data useless.That is to say that data field 306 can store the data that 200 pairs of flash memory systems 100 of host computer system write in the mode of rotating with the physical blocks of spare area 308.
As previously mentioned, the physical location of flash chip 130 can provide host computer system to come storage data in the mode of rotating, therefore controller 110 can provide logical block 210-1~210-M to host computer system 200 carrying out data access, and write down the physical location of logical block institute mapping by service logic-physical address mapping table (logical-physical addressmapping table).
Fig. 3 D is according among Fig. 3 C shown in the embodiment of the invention physical location being carried out the example schematic that writes instruction.
Please refer to Fig. 3 D, for example, when host computer system desired to write data to logical block 210-1, controller 110 can learn that logical block is the physical location 310-(S+1) in the mapping data field 306 at present by logical-physical address mapping table.Therefore, flash memory system 100 will upgrade the data among the physical location 310-(S+1), during, controller 110 can be from spare area 308 the rotate physical location 310-(S+1) of data field 306 of extracts physical unit 310-(S+M+1).Yet, when new data being write to physical location 310-(S+M+1), can at once all valid data among the physical location 310-(S+1) not moved to physical location 310-(S+M+1) and wipe physical location 310-(S+1).Specifically, controller 110 can write page address valid data before (promptly with desiring among the physical location 310-(S+1), page or leaf P0 and P1) be copied to physical location 310-(S+M+1) (as (a) of Fig. 3 D), and (that is, page or leaf P2 and the P3 of physical location 310-(S+M+1)) writes to physical location 310-(S+M+1) (as (b) of Fig. 3 D) with new data.At this moment, the physical location 310-(S+M+1) that will contain effective legacy data and the new data that writes of part temporarily is associated as replacement physical location 350.This is because the valid data among the physical location 310-(S+1) might be in next operation (for example, write instruction) in become invalidly, therefore at once all valid data among the physical location 310-(S+1) are moved to replacing physical location 310-(S+M+1) and may be caused meaningless moving.In this embodiment, the content integration of physical location 310-(S+1) and replacement physical location 310-(S+M+1) gets up to be only the complete content of the mapping logical block 210-1 of institute.This mother-child relationship (MCR) (that is, physical location 310-(S+1) and replacement physical location 310-(S+M+1) can decide according to the size of memory buffer 110d in the controller 110, for example is to use five groups to implement in the present embodiment by) transient state relation.The action of temporarily keeping this kind transient state relation generally can be described as unlatching (open) mother and child blocks.
Afterwards, in the time physical location 310-(S+1) really need being merged with the content of replacing physical location 310-(S+M+1), controller 110 just can be put in order physical location 310-(S+1) and replacement physical location 310-(S+M+1) and be a physical location, promote the service efficiency of block thus, the action of this merging can be described as again closes (close) mother and child blocks.For example, shown in Fig. 3 D (c), when closing mother and child blocks, controller 110 can be with remaining valid data among the physical location 310-(S+1) (promptly, page or leaf P4~PN) is copied to and replaces physical location 310-(S+M+1), then physical location 310-(S+1) is wiped and is associated as spare area 308, simultaneously, to replace physical location 310-(S+M+1) and be associated as data field 306, and the mapping with logical block 210-1 in logical-physical address mapping table changes to physical location 310-(S+M+1), finishes the action of closing mother and child blocks thus.
What deserves to be mentioned is, because each physical location is made up of the physical blocks that belongs to the different blocks face in the present embodiment.Therefore, when a plurality of physical blocks in the physical location were carried out access, in general controller 110 must be finished each physical blocks fill order block face access (single-plane accessing) instruction respectively in mode repeatedly and write or read.This kind successively only the pattern of a physical blocks of access be called single block face access mode.Yet, as mentioned above because when the circuit layout (lay out) of storage unit manufacture process, belong to and have operative relationship simultaneously between the physical blocks of different blocks face, when therefore if operative relationship is grouped into a physical location with the corresponding physical block simultaneously according to this, then when a plurality of physical blocks in this physical location were carried out access, controller 110 just can be carried out multi-tiling face access instruction to physical blocks wherein simultaneously and finish the efficient that writes or read with the lifting access.This kind is called multi-tiling face access mode to the mode that a plurality of physical blocks are carried out access simultaneously.
Therefore, in the present embodiment when the physical blocks damage takes place in flash chip 130, controller 110 can be changed the physical location (shown in Fig. 3 B (a)) that tool damages physical blocks from the physical location that preferential selection the alternate area 312 can be carried out the access of multi-tiling face, guarantees that thus flash memory system 100 is in the access of carrying out that it(?) still can more efficient multi-tiling face access mode carry out after bad block is changed data.
Fig. 4 is according to block management shown in the embodiment of the invention and the process flow diagram of changing step, and wherein these steps are that the mechanical order of the microprocessor unit 110a execute store administration module 110b of controller 110 is finished.It must be appreciated that block management step proposed by the invention is not limited to execution sequence shown in Figure 4, those skilled in the art can change the order of block management step according to spirit of the present invention arbitrarily.
Please refer to Fig. 4, when flash memory system 100 is connected to host computer system 200 and start, controller 110 can carry out initialization, wherein can be with can be in the first block face 130a and the second block face 130b by using multi-tiling face access instruction to come the physical blocks of access to be grouped into a plurality of physical locations severally and dividing into and use district 302 and alternate area 312 (step S401), particularly in the present embodiment, controller 110 also can will use district 302 to divide into system region 304, data field 306 and spare area 308.
Then, in the operation of flash memory system 100, whether controller 110 can be judged constantly in general district 302 has physical blocks to damage (step S403).Specifically, can determine at the example middle controller 110 that writes data whether write state is normal, and whether correct at the example middle controller 110 meeting specified data readouts of sense data, decide the physical blocks of institute's access whether to damage thus.If when controller 110 finds to have physical blocks to damage, whether (this predetermined threshold is 0 in the present embodiment greater than predetermined threshold then to understand the number that judge unspoiled physical location in the alternate area 312 at step S405 middle controller 110, wherein this predetermined threshold can be set up on their own by the user and be other values, for example 1,2 or other suitable round valuess), wherein so-called unspoiled physical location represents that all physical blocks in this physical location are all normal and can carry out access to it by multi-tiling face access mode.Specifically, step S405 judges whether there are enough unspoiled physical locations in the alternate area 312.
If the number of unspoiled physical location greater than predetermined threshold (promptly in alternate area 312, the situation that has enough unspoiled physical locations in the alternate area 312) time, be that unit replaces the physical location that has damaged then, and can in changing table (unshowned), write down the information of being correlated with at step S409 middle controller 110 in one of them of the unspoiled physical location of step S407 middle controller 110 meeting selections and with whole physical location.For example, in changing table, can write down still normal physical blocks in this substituted physical location in an embodiment of the present invention.For example, in another embodiment of the present invention the physical location that record is replaced in the replacing table, come the still spendable physical blocks of identification by the mark in the redundant area in each physical blocks then.In addition, except using above-mentioned replacing table, in another embodiment of the present invention step S409 also can do not use in the redundant area of only utilizing under the above-mentioned replacing table in unspoiled physical blocks record one mark come annotation this for normal physical blocks or in damage physics block redundancy district record one mark come this physical blocks of annotation for damaging, mark all in addition also or in two blocks, and when controller 100 is carried out initialization in flash memory system 100 each starts, can learn the state of physical blocks by scanning and the redundant area that reads physical blocks.
If the number of unspoiled physical location is not more than predetermined threshold (promptly in alternate area 312, do not have the situation that has enough unspoiled physical locations in the alternate area 312) time, then can judge whether there is unspoiled physical blocks in the alternate area 312 by the record of replacing table at step S411 middle controller 110.
If in step S411, judge when having unspoiled physical blocks in the alternate area 312, then in step S413, can select one of them unspoiled physical blocks and be that unit replaces the physical blocks of having damaged with the physical blocks, and step S415 middle controller 110 can be in the record of changing table the selected physical blocks of deletion.If judging in the alternate area 312 in step S411 does not have when having unspoiled physical blocks, then can send error messages and inform host computer system 200 flash memory systems 100 storage data again at step S417 middle controller 110.
Though it is unshowned in Fig. 4, but the block management that those skilled in the art can understand Fig. 4 easily with change step except finishing the program of Fig. 4 when can't change the physical blocks of damage, when receiving the instruction of shutdown or power interruption, also can finish the program of Fig. 4.
In sum, the present invention will have the physical blocks of can multi-tiling face access mode carrying out access to be grouped into physical location when the flash memory system initialization, come that with multi-tiling face access mode flash chip is carried out access thus and promote access efficiency.In addition, when the physical blocks damage takes place when, the present invention is to be the physical location that unit changes physical blocks that tool damages with the physical location when having the physical location that can multi-tiling face access mode carries out access in the alternate area, and can continue to carry out access with multi-tiling face access mode.In addition, the present invention can write down in the physical location that is replaced still spendable physical blocks and when taking place physical blocks to damage when the alternate area does not have normal physical location, the present invention can change the physical blocks of being damaged with the still spendable physical blocks of write down, and prolongs the life-span of flash memory system thus.
Though the present invention discloses as above with preferred embodiment; right its is not in order to limit the present invention; those skilled in the art can do some changes and retouching under the premise without departing from the spirit and scope of the present invention, so protection scope of the present invention is as the criterion with claim of the present invention.

Claims (18)

1. block management and replacing method are applicable to a flash memory system, and wherein this flash memory system has a plurality of physical blocks, and this block management and replacing method comprise:
Described physical blocks is divided into a plurality of physical locations and is grouped into a use district and an alternate area, wherein the physical blocks of each described physical unit can be by using a multi-tiling face access instruction come access; And
When one of them physical blocks in the physical location that belongs to this use district was damaged, whether the number of then judging unspoiled described physical location in this alternate area greater than a predetermined threshold,
Wherein when the number of unspoiled described physical location in this alternate area during greater than this predetermined threshold, then selecting unspoiled described physical location from this alternate area is that unit replaces the described physical location of the described physical blocks that tool damages in this general district and writes down the described physical blocks of not damaging or damaging in the substituted described physical location with described physical location, and
When the number of unspoiled described physical location in this alternate area was not more than this predetermined threshold, then selecting unspoiled described physical blocks from this alternate area was the replacing damaged described physical blocks of unit with described physical blocks.
2. block management as claimed in claim 1 and replacing method also comprise this use zoning is divided into a data field and a spare area, the physical location that wherein belongs to this spare area be in order to the physical location that belongs to this data field rotate ground storage data.
3. block management as claimed in claim 1 and replacing method, wherein each physical blocks has a redundant area, and the step that writes down unspoiled described physical blocks in the substituted described physical location is included in record one mark in the described redundant area of unspoiled described physical blocks.
4. block management as claimed in claim 1 and replacing method, the step that wherein writes down unspoiled described physical blocks in the substituted described physical location is included in the unspoiled described physical blocks of record in the replacing table.
5. a controller is applicable to a flash memory system, and wherein this flash memory system has a plurality of physical blocks, and this controller comprises:
One microprocessor unit;
One host interface module is coupled to this microprocessor unit;
One flash interface is coupled to this microprocessor unit;
One memory buffer is coupled to this microprocessor unit; And
One memory management module is coupled to this microprocessor unit, and has a plurality of machine instructions that can be carried out by this microprocessor unit, this flash memory system being finished a plurality of block managements and to be changed step, described block management with change step and comprise:
Described physical blocks is divided into a plurality of physical locations and is grouped into a use district and an alternate area, wherein the physical blocks of each described physical unit can be by using a multi-tiling face access instruction come access; And
When one of them physical blocks in the physical location that belongs to this use district was damaged, whether the number of then judging unspoiled described physical location in this alternate area greater than a predetermined threshold,
Wherein when the number of unspoiled described physical location in this alternate area during greater than this predetermined threshold, then selecting unspoiled described physical location from this alternate area is that unit replaces the described physical location of the described physical blocks that tool damages in this general district and writes down the described physical blocks of not damaging or damaging in the substituted described physical location with described physical location, and
When the number of unspoiled described physical location in this alternate area was not more than this predetermined threshold, then selecting unspoiled described physical blocks from this alternate area was the replacing damaged described physical blocks of unit with described physical blocks.
6. controller as claimed in claim 5 also comprises and divides a data field and a spare area with this use zoning, the physical location that wherein belongs to this spare area be in order to the physical location that belongs to this data field rotate ground storage data.
7. controller as claimed in claim 5, wherein each described physical blocks has a redundant area, and the step that writes down unspoiled described physical blocks in the substituted described physical location is included in record one mark in the described redundant area of unspoiled described physical blocks.
8. controller as claimed in claim 5, the step that wherein writes down unspoiled described physical blocks in the substituted described physical location is included in the unspoiled described physical blocks of record in the replacing table.
9. controller as claimed in claim 5, wherein this flash memory system is dish, a flash memory cards or a solid state hard disc with oneself.
10. flash memory system comprises:
A plurality of physical blocks;
A connector; And
One controller is electrically connected to described physical blocks and this connector, and this controller can be carried out a plurality of machine instructions of a memory management module to finish a plurality of block managements and to change step, and described block management comprises with the replacing step:
Described physical blocks is divided into a plurality of physical locations and is grouped into a use district and an alternate area, wherein the physical blocks of each described physical unit can be by using a multi-tiling face access instruction come access; And
When one of them physical blocks in the physical location that belongs to this use district was damaged, whether the number of then judging unspoiled described physical location in this alternate area greater than a predetermined threshold,
Wherein when the number of unspoiled described physical location in this alternate area during greater than this predetermined threshold, then selecting unspoiled described physical location from this alternate area is that unit replaces the described physical location of the described physical blocks that has damage in this general district and writes down the described physical blocks of not damaging or damaging in the substituted described physical location with described physical location, and
When the number of unspoiled described physical location in this alternate area was not more than this predetermined threshold, then selecting unspoiled described physical blocks from this alternate area was the replacing damaged described physical blocks of unit with described physical blocks.
11. flash memory system as claimed in claim 10 also comprises a trivial data field and the spare area of being divided into of this use, the physical location that wherein belongs to this spare area be in order to the physical location that belongs to this data field rotate ground storage data.
12. flash memory system as claimed in claim 10, wherein each described physical blocks has a redundant area, and the step that writes down unspoiled described physical blocks in the substituted described physical location is included in record one mark in the described redundant area of unspoiled described physical blocks.
13. flash memory system as claimed in claim 10, the step that wherein writes down unspoiled described physical blocks in the substituted described physical location is included in the unspoiled described physical blocks of record in the replacing table.
14. flash memory system as claimed in claim 10, wherein said physical blocks belong to a plurality of block faces, and each described physical location is made up of two physical blocks that belong to different described block faces at least.
15. flash memory system as claimed in claim 14, wherein said block face belongs to a flash memory crystal grain.
16. flash memory system as claimed in claim 14, wherein said block face belongs to a plurality of flash memory crystal grain.
17. flash memory system as claimed in claim 16, wherein said flash memory crystal grain belongs to a plurality of flash chips.
18. flash memory system as claimed in claim 16, wherein said flash memory crystal grain belongs to a flash chip.
CN2008101690831A 2008-10-20 2008-10-20 Block management and change method, flash memory storage system and controller thereof Active CN101727397B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008101690831A CN101727397B (en) 2008-10-20 2008-10-20 Block management and change method, flash memory storage system and controller thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008101690831A CN101727397B (en) 2008-10-20 2008-10-20 Block management and change method, flash memory storage system and controller thereof

Publications (2)

Publication Number Publication Date
CN101727397A true CN101727397A (en) 2010-06-09
CN101727397B CN101727397B (en) 2012-06-27

Family

ID=42448315

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008101690831A Active CN101727397B (en) 2008-10-20 2008-10-20 Block management and change method, flash memory storage system and controller thereof

Country Status (1)

Country Link
CN (1) CN101727397B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102456401A (en) * 2010-10-26 2012-05-16 群联电子股份有限公司 Block management method, memory controller and memory storage device
WO2015101051A1 (en) * 2013-12-30 2015-07-09 华为技术有限公司 Method and apparatus for improving reliability of solid state disk
CN108038065A (en) * 2017-12-22 2018-05-15 湖南国科微电子股份有限公司 A kind of method, apparatus and system of raising Block utilization rates
WO2019127350A1 (en) * 2017-12-29 2019-07-04 Micron Technology, Inc. Uncorrectable ecc
CN110364216A (en) * 2018-04-09 2019-10-22 合肥沛睿微电子股份有限公司 Solid state hard disk and its operation method
CN113207225A (en) * 2021-03-16 2021-08-03 合肥致存微电子有限责任公司 Chip-replaceable storage device and chip replacement, verification and manufacturing method thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6591330B2 (en) * 2001-06-18 2003-07-08 M-Systems Flash Disk Pioneers Ltd. System and method for flexible flash file
US7275140B2 (en) * 2005-05-12 2007-09-25 Sandisk Il Ltd. Flash memory management method that is resistant to data corruption by power loss
CN100520734C (en) * 2005-11-18 2009-07-29 凌阳科技股份有限公司 Control apparatus and method of flash memory

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102456401A (en) * 2010-10-26 2012-05-16 群联电子股份有限公司 Block management method, memory controller and memory storage device
CN102456401B (en) * 2010-10-26 2015-04-22 群联电子股份有限公司 Block management method, memory controller and memory storage device
WO2015101051A1 (en) * 2013-12-30 2015-07-09 华为技术有限公司 Method and apparatus for improving reliability of solid state disk
CN108038065B (en) * 2017-12-22 2021-11-12 湖南国科微电子股份有限公司 Method, device and system for improving Block utilization rate
CN108038065A (en) * 2017-12-22 2018-05-15 湖南国科微电子股份有限公司 A kind of method, apparatus and system of raising Block utilization rates
WO2019127350A1 (en) * 2017-12-29 2019-07-04 Micron Technology, Inc. Uncorrectable ecc
KR20200100167A (en) * 2017-12-29 2020-08-25 마이크론 테크놀로지, 인크. Uncorrectable ECC
US11074989B2 (en) 2017-12-29 2021-07-27 Micron Technology, Inc. Uncorrectable ECC
KR102362767B1 (en) * 2017-12-29 2022-02-15 마이크론 테크놀로지, 인크. Uncorrectable ECC
KR20220025189A (en) * 2017-12-29 2022-03-03 마이크론 테크놀로지, 인크. Uncorrectable ecc
KR102420955B1 (en) 2017-12-29 2022-07-15 마이크론 테크놀로지, 인크. Uncorrectable ecc
US11694760B2 (en) 2017-12-29 2023-07-04 Micron Technology, Inc. Uncorrectable ECC
CN110364216A (en) * 2018-04-09 2019-10-22 合肥沛睿微电子股份有限公司 Solid state hard disk and its operation method
CN110364216B (en) * 2018-04-09 2022-03-01 合肥沛睿微电子股份有限公司 Solid state disk and operation method thereof
CN113207225A (en) * 2021-03-16 2021-08-03 合肥致存微电子有限责任公司 Chip-replaceable storage device and chip replacement, verification and manufacturing method thereof

Also Published As

Publication number Publication date
CN101727397B (en) 2012-06-27

Similar Documents

Publication Publication Date Title
CN101483067B (en) Flash memory data writing method and flash memory controller
CN101625897B (en) Data write-in method, storage system and controller used for quick flash memory
CN102292711B (en) Solid state memory formatting
CN101634967B (en) Block management method for flash memory, storage system and controller
CN101640069B (en) Average wear method and average wear system for flash memory
US20100042774A1 (en) Block management method for flash memory, and storage system and controller using the same
CN101556555B (en) Block managing method for flash memory as well as controller and storage system thereof
US8074128B2 (en) Block management and replacement method, flash memory storage system and controller using the same
CN101630233B (en) Data access method used for flash memory, storage system and controller
CN102073600B (en) Data backup method, flash memory controller and flash memory storage system
CN101727397B (en) Block management and change method, flash memory storage system and controller thereof
CN101661431B (en) Block management method for flash memory, flash storage system and controller
CN101414282B (en) Average abrasion method and controller using the same
CN101667157A (en) Flash memory data transmission method, flash memory storage system and controller
CN101567220A (en) Bad block identifying method, storage system and controller thereof for flash memory
CN101408864B (en) Data protection method for current failure and controller using the same
CN101425338B (en) Writing method for nonvolatile memory and controller using the method
CN101625661B (en) Data management method, storage system and controller used for flash memory
CN102129353A (en) Flash storage system, flash controller and data writing method
CN101859278B (en) Data storage method and storage system for flash memory
CN102402396B (en) Combined type storage device as well as combined type storage media controller and addressing method thereof
CN101425334A (en) Method for implementing NOR FLASH bad block management and control circuit thereof
CN101661432B (en) Flash memory block management method, flash memory storage system and controller
CN101957799B (en) Data writing method used for flash memory, control circuit and storage system thereof
CN101882111B (en) Data access method, storage system and controller for flash memory

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