CN101634967A - Block management method for flash memory, storage system and controller - Google Patents

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

Info

Publication number
CN101634967A
CN101634967A CN 200810134348 CN200810134348A CN101634967A CN 101634967 A CN101634967 A CN 101634967A CN 200810134348 CN200810134348 CN 200810134348 CN 200810134348 A CN200810134348 A CN 200810134348A CN 101634967 A CN101634967 A CN 101634967A
Authority
CN
China
Prior art keywords
block
blocks
plurality
physical
logical block
Prior art date
Application number
CN 200810134348
Other languages
Chinese (zh)
Other versions
CN101634967B (en
Inventor
叶志刚
Original Assignee
群联电子股份有限公司
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 群联电子股份有限公司 filed Critical 群联电子股份有限公司
Priority to CN 200810134348 priority Critical patent/CN101634967B/en
Publication of CN101634967A publication Critical patent/CN101634967A/en
Application granted granted Critical
Publication of CN101634967B publication Critical patent/CN101634967B/en

Links

Abstract

The invention discloses a block management method, a controller and a storage system using the method. The method is suitable for managing a Multi Level Cell (MLC) and a plurality of physical blocks of a NAND flash memory, and the physical blocks are at least grouped into data areas and backup areas, wherein each physical block comprises a plurality of page addresses which are divided into a plurality of last page addresses and a plurality of next page addresses of which the write speed is higher than that of the last page addresses. The block management method comprises the following steps: configuring a plurality of logic blocks for the access of a host computer; recording logic blocks belonging to frequent access blocks; and executing a special mode to use the next page addresses of at least two physical blocks of the MLC NAND flash memory to store data of a logic block belonging to the frequent access blocks. On the basis, the access speed of a flash memory storage system is effectively improved.

Description

用于闪存的区块管理方法、储存系统与控制器 Block management method for a flash memory, the storage system controller

技术领域 FIELD

本发明是有关于一种用于闪存的区块管理方法,且特别是有关于一种用 The present invention relates to a method of managing a flash memory for a block, and more particularly relates to a use

于多层存储单元(Multi Level Cell, MLC) NAND闪存的区块管理方法、使用此方法的储存系统与控制器。 The multilayer storage unit (Multi Level Cell, MLC) NAND flash memory block management method, the storage system controller using this method.

背景技术 Background technique

数字相机、手机相机与MP3在这几年来的成长十分迅速,使得消费者对储存媒体的需求也急速增加。 Digital cameras, mobile phone cameras and MP3 growing very rapidly in the past few years, making the consumer demand for storage media is also rapidly increasing. 由于闪存(Flash Memory)具有数据非易失性、 省电、体积小与无机械结构等的特性,适合可携式应用,最适合使用于这类可携式由电池供电的产品上。 Since the flash memory (Flash Memory) characteristic data having non-volatile, low power, small size with no mechanical structures, etc., suitable for portable applications, the most suitable for use in this type of battery-powered portable products. 存储卡就是一种以与非(NAND)闪存作为储存媒体的储存装置。 It is a kind of memory card with the non-(the NAND) flash memory as a storage medium storage device. 由于存储卡体积小容量大且携带方便,所以已广泛用于个人重要数据的储存。 Due to the small volume large capacity memory card and easy to carry, it has been widely used to store important personal data. 因此,近年闪存产业成为电子产业中相当热门的一环。 Therefore, in recent years, flash memory industry has become very popular in the electronics industry a ring.

一般来说,闪存储存系统的闪存会划分为多个物理区块并且此些物理区块会分组为数据区(data area)与备用区(spare area)。 In general, flash memory storage systems may be divided into a plurality of flash memory physical blocks and physical blocks will be of such a packet as a data area (data area) of a spare area (spare area). 归类为数据区的物理区块中会储存由写入指令所写入的有效数据,而备用区中的物理区块是用以在执行写入指令时替换数据区中的物理区块。 Classified as valid data in the physical block data area is stored by the write command written and the physical blocks in the spare area is to replace the physical blocks in the data area when executing the write instruction. 具体来说,当闪存储存系统接受到主机的写入指令而欲对数据区的物理区块进行写入时,闪存储存系统会从备用区中提取一物理区块并且将在数据区中欲写入的物理区块中的有效旧 Specifically, when the flash memory storage system receives a host command and wish to write to write physical block data area, a flash memory storage system will be extracted from the physical block in the spare area and the data area to be written in the the physical block effective legacy

据的物理区块关联为数据区,并且将原本数据区的物理区块进行抹除并关联为备用区。 It is associated with physical block data area, and the original physical block is erased and the data area is associated spare area. 为了能够让主机能够顺利地存取以轮替方式储存数据的物理区块, 闪存储存系统会提供逻辑区块给主机。 In order to allow smooth access to the host to the physical block in alternation way of storing data, a flash memory storage system asserts a logical block to the host. 也就是说,闪存储存系统会通过在逻辑区块与物理区块映射表中记录与更新逻辑区块与数据区的物理区块之间的映射关系来反映物理区块的轮替,所以主机仅需要针对所提供逻辑区块进行 That is, the flash memory storage system will be reflected by the alternation of the physical block is recorded in the mapping relationship between logical blocks and physical blocks in the mapping table update logical blocks and physical blocks of the data region, the host only We need to be provided for the logical block

进行读取或写入数据。 Read or write data.

7然而,在闪存制程上的进步而使得每一物理区块的设计容量会越来越大的同时,亦造成上述搬移有效旧数据的时间会相对地增加而降低系统的效能。 7, however, progress in the flash process is designed such that the capacity of each physical block will be increasing, while also causing the above-described moving old data valid time will be relatively increased while reducing system performance. 特别是,在当闪存储存系统用作为安装计算机操作系统的储存媒体时,操作 In particular, when the flash memory storage system as a storage medium with a computer operating system installation, operation

系统会经常性地存取特定数据(例如,文件配置表(File Allocation Table, FAT),因此提升此类数据存取的速度是相当重要的。 Will regularly access a particular data (e.g., file allocation table (File Allocation Table, FAT), and therefore enhance the rate at which such data access is very important.

发明内容 SUMMARY

有鉴于此,本发明提供一种区块管理方法,其能够有效地提升MLC NAND 闪存的数据存取的速度。 Accordingly, the present invention provides a method for managing blocks, which can effectively improve the data access speed of the MLC NAND flash memory.

此外,本发明提供一种控制器,其使用上述区块管理方法来管理MLC NAND 闪存,以有效地提升数据存取的速度。 Further, the present invention provides a controller using the above-described block managing method for managing MLC NAND flash memory, in order to effectively improve the speed of data access.

再者,本发明提供一种储存系统,其使用上述区块管理方法来管理MLC NAND闪存,以有效地提升数据存取的速度。 Furthermore, the present invention provides a storage system, using the above-described block managing method for managing MLC NAND flash memory, in order to effectively improve the speed of data access.

本发明提出一种区块管理方法,适用于管理多层存储单元(Multi Level Cell, MLC)与非(NAND)闪存的多个物理区块且此些物理区块至少分组为数据区与备用区,其中每一物理区块包括多个页面地址且此些页面地址区分为多个上页地址与写入速度快于该些上页地址的多个下页地址,此区块管理方法包括配置多个逻辑区块以供主机存取、记录属于频繁存取区块的逻辑区块以及执行特殊模式以使用MLC NAND闪存的至少两个物理区块的下页地址来储存属于频繁存取区块的一个逻辑区块的数据。 The present invention proposes a block management method for a multi-layered memory management unit (Multi Level Cell, MLC) with a plurality of non-physical block (the NAND) flash memory and the physical block of such a data packet zone and at least a spare area wherein each physical block includes a plurality of such page address and page address area is divided into a plurality of page addresses and the write speed at the plurality of page addresses to the plurality of page addresses, this method includes configuring a multi-block management a logic block for host access, the recording block belongs frequently accessed logical blocks and performing special mode to use at least two physical page address blocks of the MLC NAND flash memory to store frequently accessed block belongs to a logical data block.

在本发明的一实施例中,上述的记录属于频繁存取区块的逻辑区块的步骤包括记录每一逻辑区块的使用计数以及依据使用计数来排序所有逻辑区块并且从具有最大的使用计数的逻辑区块开始依序记录预先定义数目的逻辑区块为频繁存取区块。 In an embodiment of the present invention, the above-described recording step frequently accessed logical block belonging to the block count comprises using a recording of each logical block according to the usage count and sort all of the logical blocks and the use from having the largest logical block count start recording a pre-defined number of sequential logical blocks frequently accessed blocks.

在本发明的一实施例中,上述的执行特殊模式以使用MLC NAND闪存的两 In an embodiment of the present invention, the above-described special mode is performed using the two MLC NAND flash memory

个物理区块的下页地址来储存属于频繁存取区块的一个逻辑区块的数据步骤包括当主机写入数据至每一逻辑区块时判断欲写入的逻辑区块是否属于频繁存取区块,其中当欲写入的逻辑区块属于频繁存取区块时则从该备用区中提 A physical block address of the page to be written is determined to store a frequently accessed logical block belonging to the data block comprises the step of when the host writes data to each of the logical block belongs when frequently accessed logical blocks block, wherein when a logical block to be written from the spare area belonging frequently mentioned in the access block

在本发明的一实施例中,上述的记录每一逻辑区块的使用计数的步骤包括当主机写入数据至逻辑区块时更新此些逻辑区块的使用计数在本发明的一实施例中,上述的区块管理方法还包括当欲写入的逻辑区块属于频繁存取区块时在逻辑区块与物理区块映射表中记录特殊模式标记以表示欲写入的逻辑区块的数据是使用所提取的两个物理区块的下页地址来储存以及在特殊模式映射表中记录储存欲写入的逻辑区块的数据的两个物理区块。 In an embodiment of the present invention, the step of recording the usage count of each logic block comprises a logic block update of such a usage count in the embodiment of the present invention, when the host writes data to the logic block said method further comprising a management block when a logical block is a logical block to be written marks when recording the special mode frequently accessed logical blocks and physical blocks in the block mapping table to represent the data to be written the two physical block page address is used to store the extracted physical block and record the data of two logical block to be written is stored in the special mode mapping table.

在本发明的一实施例中,上述的区块管理方法还包括当已使用MLC NAND In an embodiment of the present invention, the above-described block managing method further comprising when used MLC NAND

此欲写入的逻辑区块执行随机写入模式时,从备用区中提取另一物理区块并且在所提取的另一物理区块中暂时地储存主机对欲写入的逻辑区块所写入的数据。 This logical block to be written when performing random write mode, another physical block extracted from the spare area in another physical block and the extracted logical blocks temporarily stored on the host to be written is written the data.

在本发明的一实施例中,上述的区块管理方法还包括当欲写入的逻辑区块不属于频繁存取区块时则从备用区中提取一个物理区块并且使用所提取的一个物理区块的上页地址与下页地址来写入数据。 In an embodiment of the present invention, the above-described block management method also includes a logical block to be written from the spare area are not frequently accessed during a physical block to extract a physical block using the extracted blocks on the page address and the next page address to write the data.

在本发明的一实施例中,上述的记录属于该频繁存取区块的逻辑区块的步骤包括记录每一逻辑区块的使用计数以及判断每一逻辑区块的使用计数是否大于存取频繁门坎值,其中将使用计数大于存取频繁门坎值的每一逻辑区块记录为频繁存取区块。 In one embodiment the step of the embodiment of the present invention, the above-described recording logical blocks belonging to the frequently accessed blocks include use count record for each logic block and the judgment of the usage count is greater than each of the logic blocks frequently accessed threshold value, wherein the usage count is greater than the threshold value of the access frequency of each logical block is recorded as the frequently accessed blocks. . .

本发明亦提供一种闪存储存系统与其控制器。 The present invention also provides a flash memory storage system and its controller. 此闪存储存系统包括MLC NAND闪存、传输连接接口以及控制器,其中闪存储存系统的MLC NAND闪存 This storage system includes a flash memory MLC NAND flash memory, a transmission and a controller connected to the interface, wherein the flash memory storage system MLC NAND flash memory

块包括多个页面地址且此些页面地址区分为多个上页地址与写入速度快于该些上页地址的多个下页地址。 Block includes a plurality of such page address and page address area is divided into a plurality of page addresses and the write speed in the plurality of addresses on a plurality of pages under the page address. 此控制器包括微处理器单元以及耦接至微处理 This controller includes a microprocessor unit and coupled to microprocessor

器单元的闪存接口、緩冲存储器与存储器管理模块。 A flash memory interface, a buffer memory module and the memory management unit. 特别是,此存储器管理模块具有可由微处理器单元执行的多个机器指令以完成上述区块管理方法。 In particular, the memory management module having a plurality of machine instructions executed by the microprocessor unit to perform the above-described block management methods.

在本发明的一实施例中,上述的闪存储存系统为随身碟、快闪存储卡或 In an embodiment of the present invention, the above-described flash drive is a flash memory storage system, a flash memory card or

固态硬盘。 SSD.

本发明还提供了一种控制器,适用于具有多层存储单元与非闪存的闪存储存系统,其中该多层存储单元与非闪存具有多个物理区块且该些物理区块至少分组为数据区与备用区,每一物理区块包括多个页面地址且该些页面地址区分为多个上页地址与写入速度快于该些上页地址的多个下页地址,该控制器包括:微处理器单元;闪存接口,耦接至该微处理器单元;缓冲存储器,耦接至该微处理器单元;以及存储器管理模块,耦接至该微处理器单元且具有可由该微处理器单元执行的多个机器指令以对该闪存进行多个区块管理步 The present invention further provides a controller for a storage unit having a multilayer flash memory and NAND flash memory storage system, wherein the multilayer NAND flash memory cells having a plurality of physical blocks and physical blocks of the plurality of packet data of at least area and a spare area, comprises a plurality of pages of each physical block address and page address area is divided into the plurality of pages on a plurality of write addresses faster than the plurality of addresses on a plurality of pages under the page address, the controller comprising: a microprocessor unit; flash memory interface, coupled to the microprocessor unit; a buffer memory coupled to the microprocessor unit; and a memory management module, coupled to the microprocessor unit by the microprocessor unit and having a plurality of machine instructions executed to perform a plurality of blocks of the flash memory management steps

骤,该些区块管理步骤包括:配置多个逻辑区块以供主机存取;记录属于频繁存取区块的逻辑区块;以及执行特殊模式以分别地使用该多层存储单元与非闪存的至少两个物理区块的下页地址来储存属于该频繁存取区块的逻辑区块的数据。 Step, the plurality of block management step includes: a plurality of logic blocks for accessing the host; frequently accessed logical block belonging to a recording block; and performing special mode to each memory cell using the multilayer NAND flash memory at least two of the physical block address of the page to store the logical block belonging to the data frequently accessed blocks.

本发明还提供了一种储存系统,包括:多层存储单元与非闪存,具有多个物理区块且该些物理区块至少分组为数据区与备用区,其中每一物理区块包括多个页面地址且该些页面地址区分为多个上页地址与写入速度快于该些上页地址的多个下页地址;传输连接接口;以及控制器,电性连接至该多层存储单元与非闪存与该传输连接接口,该控制器会执行存储器管理模块的多个机器指令以执行多个区块管理步骤,该些区块管理步骤包括:配置多个逻辑区块以供主机存取;记录属于频繁存取区块的逻辑区块;以及执行特殊模 The present invention also provides a storage system, comprising: a multi-layered memory cell NAND flash memory, having a plurality of physical blocks and physical blocks of at least the plurality of packet data area and a spare area, wherein each physical block includes a plurality of and the plurality of page address page address into a plurality of page addresses and the write speed in the plurality of addresses on a plurality of pages under the page address; interface transfer; and a controller electrically connected to the multilayer storage unit NAND flash memory is connected to the transmission interface, the controller executes a plurality of machine instructions to perform memory management module management step a plurality of blocks, the plurality of block management step includes: a plurality of logic blocks for accessing the host; frequently accessed logical block belonging to the recording block; and performing special mold

储存属于该频繁存取区块的逻辑区块的数据。 Storing frequently accessed data belonging to the block of the logical block.

本发明因采用两个物理区块的下页地址(即,快速页面)来储存一个逻辑区块的数据,因此可有效地提升闪存储存系统的存取速度。 The present invention due to the use of the two physical block page address (i.e., fast page) to store data in a logical block, can be effectively enhance the access speed of the flash memory storage system.

为让本发明的上述特征和优点能更明显易懂,下文特举较佳实施例,并配合所附图式,作详细说明如下。 To make the above features and advantages of the present invention can be more fully understood by reading the following preferred embodiments and accompanying figures, described in detail below.

附图说明 BRIEF DESCRIPTION

图1是根据本发明实施例绘示闪存储存系统的概要方块图。 FIG 1 is a schematic block diagram illustrates a flash memory storage system according to the present invention. 图2A是绘示MLC NAND闪存的编程示意图。 2A is a schematic diagram of the programming schematic MLC NAND flash memory.

图2B是根据本发明实施例绘示MLC NAND闪存的物理区块的上页地址与下页地址的配置范例。 Configuration Examples page address and page address in FIG 2B is an embodiment of the present invention shows the physical block of the MLC NAND flash memory.

图3A、 3B与3C是根据本发明实施例绘示闪存的物理区块以一般模式进行轮替的示意图。 3A, 3B, and 3C are schematic diagrams Rotation embodiment according to the physical blocks of the flash memory shown in the embodiment of the present invention, the general mode.

行轮替的示意图。 Rotation of the schematic line.

图5B是根据本发明实施例绘示特殊模式映射表的范例。 FIG 5B is an example embodiment illustrates the special mode mapping table according to the present invention.

10图6是根据本发明实施例绘示区块管理步骤的流程图。 FIG 6 is a flowchart 10 illustrates the block management step according to the present embodiment of the invention. [主要元件标号说明] [Reference Numerals main components]

100:闪存储存系统110:控制器110a:微处理器单元110b:存储器管理模块110c:闪存才姿口llOd:緩冲存储器120:传输连接接口130:闪存 100: a flash memory storage system 110: controller 110a: microprocessor unit 110 b: a memory management module 110c: Flash opening posture before LLOD: buffer memory 120: transmission interface 130 are connected: Flash

130-0、 130-1、 130-2、 130-N:物理区块 130-0, 130-1, 130-2, 130-N: the physical block

200:主初j 200: main early j

202:系统区 202: System area

204:数据区 204: data area

206:备用区 206: spare area

208:替换区块 208: replacement block

210:逻辑区块 210: logic blocks

M、 C、 Cl、 C2、 L:区块 M, C, Cl, C2, L: block

502:逻辑区块字l殳502 502: word logic blocks 502 l Shu

504:特殊模式标记字段 504: special mode flag field

506:物理区块字段 506: Physical Block Fields

512:索引字段 512: index field

514:第一特殊^t式区块字段 514: The first special block type field ^ t

516:第二特殊^^莫式区块字段 516: The second block specific fields Mohs ^^

S601、 S603、 S605、 S607、 S609、 S611、 S613、 S615:区块管理步骤。 S601, S603, S605, S607, S609, S611, S613, S615: block management step. 具体实施方式 Detailed ways

图1是根据本发明实施例绘示闪存储存系统的概要方块图。 FIG 1 is a schematic block diagram illustrates a flash memory storage system according to the present invention. 请参照图1, 闪存储存系统100包括控制器(亦称控制器系统)110、传输连接接口120以及闪存130。 Referring to FIG. 1, a flash memory storage system includes a controller 100 (also known as system controller) 110, and the flash memory interface 120 connected to the transmission 130.

通常闪存储存系统100会与主机200 —起使用,以使主机200可将数据写入至闪存储存系统IOO或从闪存储存系统100中读取数据。 And the host 100 will typically flash memory storage system 200-- used together, so that the host 200 may write data to the flash memory storage system IOO or reading data from the flash memory storage system 100. 在本实施例中, In the present embodiment,

闪存储存系统120为固态硬盘(Solid State Drive, SSD)。 120 is a flash memory storage system SSD (Solid State Drive, SSD). 但必须了解的是, 在本发明另一实施例中闪存储存系统100亦可以是存储卡或随身碟。 But it must be understood that the embodiment of the flash memory storage system In another embodiment of the present invention also may be a memory card 100 or stick.

控制器110会执行以硬件形式或固件形式实作的多个指令以配合传输连接接口120与闪存130来进行数据的储存、读取与抹除等运作。 The controller 110 may execute instructions in the form of hardware or firmware implemented to fit transport connection 120 stores data to a flash memory 130 interfaces with the read and erase operation and the like. 控制器110 包括微处理器单元110a、存储器管理模块110b、闪存接口110c与緩冲存储器llOd。 The controller 110 includes a microprocessor unit 110a, a memory management module 110b, 110c and a flash memory interface buffer llOd.

微处理器单元110a用以与存储器管理模块110b、闪存接口110c与緩冲存储器llOd等协同合作以进行闪存储存系统100的各种运作。 The microprocessor unit 110a configured to collaborate with the memory management module 110b, a flash memory interface buffer memory 110c and the like to perform various operational llOd flash storage system 100.

存储器管理模块110b是耦接至微处理器单元110a 。 The memory management module 110b is coupled to the microprocessor unit 110a. 存储器管理模块110b 具有可由微处理器单元110a执行的多个机器指令以管理闪存130,例如执行平均磨损(wear level ing)功能、坏区块管理功能、维护逻辑区块与物理区块映射表(mapping table)功能等的机器指令。 The memory management module 110b having a plurality of machine instructions executed by the microprocessor unit 110a to manage a flash memory 130, such as performing the average wear (wear level ing) function, bad block management, logical blocks and physical blocks maintain a mapping table ( mapping table) function machine instructions. 特别是,在本发明实施例中,存储器管理模块110b包含可完成根据本实施例的区块管理步骤(如图6所示) 的机器指令。 In particular, in the embodiment of the present invention, comprises a memory management module 110b is completed (FIG. 6) of the machine instruction block management step according to the present embodiment.

在本实施例中,存储器管理模块110b是以固件形式实作在控制器110中, 例如以程序语言撰写程序相关机械指令并且储存于程序存储器(例如,只读存储器(Read Only Memory, ROM))来实作存储器管理模块11 Ob,其中当闪存储存系统100运作时,存储器管理模块110b的多个机械指令会被加载至緩冲存储器110d中并且由微处理器单元110a来执行以完成上述平均磨损功能、坏区块管理功能、维护逻辑区块与物理区块映射表功能等。 In the present embodiment, the memory management module 110b is implemented in firmware in the controller 110, for example, a program written in a programming language and stored in the associated machine instruction program memory (e.g., ROM (Read Only Memory, ROM)) to implement the memory management module 11 Ob, wherein when the operation of the flash memory storage system 100, the memory management module 110b of a plurality of mechanical instructions are loaded into the buffer memory 110d and executed by the above average wear to complete the microprocessor unit 110a function, bad block management, logical blocks and physical blocks maintain a mapping table function. 特别是,控制器IIO 通过执行存储器管理模块110b的多个机械指令来此完成根据本发明实施例的区块管理步骤(如图6所示)。 In particular, this controller IIO to complete (6) The block management procedure of Example of the present invention is executed by a plurality of mechanical command of the memory management module 110b.

在本发明另一实施例中,存储器管理模块110b的机械指令亦可以固件形式储存于闪存130的特定区域(例如,下述的系统区202)中。 In another embodiment of the present invention, the memory management module 110b can also be a mechanical form of firmware instructions stored in a specific area of ​​flash memory 130 (e.g., following the system area 202). 同样地,当闪存储存系统100运作时,存储器管理模块110b的多个机器指令会被加载至緩冲存储器110d中并且由微处理器单元110a来执行。 Likewise, when the operation of the flash memory storage system 100, the memory management module 110b of the plurality of machine instructions are loaded into the buffer memory 110d and executed by the microprocessor unit 110a. 此外,在本发明另一实施例中存储器管理模块110b亦可以硬件形式实作在控制器110中。 Further, in this embodiment the memory management module 110b can also be implemented in hardware in the controller 110. In another embodiment of the present invention.

闪存接口110c是耦接至微处理器单元110a并且用以存取闪存130。 Flash Interface 110c is coupled to the microprocessor for accessing the flash unit 130 and 110a. 也就是,主机200欲写入至闪存130的数据会经由闪存接口110c转换为闪存130所能接受的格式。 That is, the host 200 the data to be written to the flash memory 130 is a flash memory 130 can be received via the flash interface format converter 110c.

12緩沖存储器llOd是耦接至微处理器单元110a并且用以暂时地储存系统数据(例如逻辑区块与物理区块映射表)或者主机200所读取或写入的数据。 LlOd buffer memory 12 is coupled to the microprocessor unit 110a and the system for temporarily storing data (e.g., logical blocks and physical block mapping table) or the host 200 write data or read. 在本实施例中,緩冲存储器llOd为静态随机存取存储器(static randomaccess memory, SRAM)。 In the present embodiment, the buffer memory llOd static random access memory (static randomaccess memory, SRAM). 然而,必须了解的是,本发明不限于此,动态随机存取存储器(Dynamic Random Access memory, DRAM)、 磁阻式存储器(Magnetoresistive Random Access Memory, MRAM)、 相变化存储器(PhaseChange Random Access Memory, PRAM)或其它适合的存^渚器亦可应用于本发明。 However, it must be understood that the invention is not limited thereto, and a dynamic random access memory (Dynamic Random Access memory, DRAM), a magnetoresistive memory (Magnetoresistive Random Access Memory, MRAM), phase change memory (PhaseChange Random Access Memory, PRAM ) or other suitable memory device ^ for the present invention may also be applied.

此外,虽未绘示于本实施例,但控制器110可还包括错误校正模块与电源管理模块等用于控制闪存的一般功能模块。 Further, although not shown in the present embodiment, the controller 110 may further include a general functional block error correction module and the power management module for controlling the flash memory.

传输连接接口120用以通过总线300连接主机200。 Transport connection interface 120 for connecting to the host 200 via bus 300. 在本实施例中,传输连接接口120为PCI Express接口。 In the present embodiment, the transmission interface 120 is connected to PCI Express interface. 然而,必须了解的是本发明不限于此,传输连接接口120亦可以是USB接口、 IEEE 1394接口、 SATA接口、 MS接口、MMC接口、 SD接口、 CF接口、 IDE接口或其它适合的数据传输接口。 However, it must be understood that the present invention is not limited transmission connection interface 120 may also be a USB interface, IEEE 1394 interfaces, SATA interfaces, interfaces the MS, MMC interface, SD interfaces, CF interface, IDE interface, or other suitable data transmission interface .

闪存130是电性连接至控制器110并且用以储存数据。 Flash memory 130 is electrically connected to the controller 110 and to store data. 闪存130通常实质上分割为多个物理区块(physical block) 130-0至130-N。 Flash memory 130 is typically divided into a plurality of physical blocks is substantially (physical block) 130-0 through 130-N. 一般而言,在闪存中物理区块为抹除的最小单位。 Generally, in a flash memory erasing the physical block is the minimum unit. 亦即,每一物理区块含有最小数目之一并被抹除的存储单元。 That is, each physical block contains the minimum number of memory cells one and erased. 每一物理区块通常会分割为数个页面地址(page)。 Each physical block is usually divided into several page address (page). 页面地址通常为编程(program)的最小单元。 Page address is generally programmed (Program) is the minimum unit. 但要特别说明的是于有些不同的闪存设计,最小的编程单位也可为一个扇区(sector)。 But special note is slightly different in the design of flash memory, the minimum unit of programming can also be a sector (sector). 也就是说, 一页面地址中有多个扇区并以一扇区为编程的最小单元。 That is, a page address and a plurality of sectors on a sector as a minimum unit of programming. 换言之,页面地址为写入数据或读取数据的最小单元。 In other words, the page address for writing or reading data a minimum data unit. 每一页面地址通常包括使用者数据区D与冗余区R。 Each page typically includes a user address and a data region D redundant area R. 使用者数据区用以储存使用者的数据,而冗余区用以储存系统的数据(例如,错误校正码(error correcting code, ECC))。 A user data area for storing user data, and the redundant area for data storage system (e.g., an error correction code (error correcting code, ECC)).

为对应于磁盘驱动器的扇区(sector)大小, 一般而言,使用者数据区D通常为512字节,而冗余区R通常为16字节。 A sector corresponding to the disk drive (a SECTOR) size, in general, the user data area D is typically 512 bytes, and R is typically redundant area is 16 bytes. 也就是, 一页为一个扇区。 That is, one to one sector. 然而,亦可以多个扇区形成一页,例如一页包括4个扇区。 However, it may also form a plurality of sectors, including for example a 4 sectors.

一般而言,物理区块130-0至130-N可由任意数目的页面地址所组成,例如64个页面地址、128个页面地址、256个页面地址等。 In general, the physical blocks 130-0 to 130-N may be any number of page address consisting, for example, 64 page address, page address 128, page address 256 and the like. 物理区块130-0至130-N通常也可被分组为数个区域(zone),以区域来管理存储器某种程度上是彼此独立地操作以增加操作执行的平行程度且简化管理的复杂度。 Physical blocks 130-0 to 130-N may also be generally grouped into several regions (zone), so as to manage the memory area to operate somewhat independently of each other to increase the degree of parallel operation performed and simplified management complexity. 此外,在本实施中闪存130为多层存储单元(Multi Level Cell, MLC)与非(NAND)闪存,而MLC NAND闪存的物理区块的编程可分为多阶段。 Further, in the present embodiment the flash memory 130 is a multilayer storage unit (Multi Level Cell, MLC) NAND (the NAND) flash memory, programmed MLC NAND flash physical block can be divided into multiple stages. 例如,以4层存储单元为例,如图2A所示,物理区块的编程可分为2阶段。 For example, layer 4 in the storage unit as an example, shown in Figure 2A, programming of the physical block can be divided into two stages. 第一阶段是下页地址(lower page)的写入部分,其物理特性类似于单层存储单元(Single Level Cell, SLC) NAND闪存,在完成第一阶段之后才会编程上页地址(upper page),其中下页地址的写入速度会快于上页地址。 The first stage is the address of the next page (lower page) of the writing portion, its physical properties similar to the memory cell monolayer (Single Level Cell, SLC) NAND flash memory, after completion of the first stage will be programmed on the address page (upper page ), which addresses the following page write speed faster than the page address. 因此,如图2B所示每一物理区块的页面地址可区分为快慢页面(即,上页地址)与快速页面(即,下页地址)。 Thus, 2B, each physical page address block can be divided into pages speed (i.e., the page address) and the quick page (i.e., the page address). 类似地,在8层存储单元或16层存储单元的案例中,存储单元会包括更多个页面地址并且会以更多阶段来写入。 Similarly, in the case of 8 layers 16 layers storage unit or memory cell, the memory cell may comprise more pages and addresses will be written more stages. 在此,将写入速度最快的页面地址称为下页地址,其它写入速度较慢的页面地址统称为上页地址。 Here, the write speed of the fastest page address as the next page address, other write slower page address collectively referred to as the page address. 例如,上页地址包括具有不同写入速度的多个页面。 For example, the page address includes a plurality of pages having a different writing speed. 此外,在其它实施例中,上页地址也可为写入速度最慢的页面,或者写入速度最慢与部份写入速度快于写入速度最慢页面的页面。 Further, in other embodiments, the page address of the page may be the slowest of the write speed, or write the slowest part of the writing and the writing speed is faster than the slowest In page. 例如,在4层存储单元中,下页地址为写入速度最快与写入速度次快的页面,上页则为写入速度最慢与写入速度次慢的页面。 For example, layer 4 in the storage unit, the page address for the writing speed and the fastest times faster write speed page, the page was written to the slowest writing speed and slow page views.

特别是,由于在本发明实施例中闪存130的物理区块的多个页面地址可如上述区分为上页地址与下页地址,因此在存储器管理模块110b会包含有一页面地址查询表,其中会记录在每一区块中哪些页面地址属于上页地址以及哪些页面地址属于下页地址。 In particular, since a plurality of embodiments in the flash memory page address 130 in the physical block address of the page can be divided into upper and lower page address area as described in the embodiment of the present invention, and therefore the memory management module 110b contains a page address look-up table, which will record which belong to the page address page address and page address which belongs to the next page address in each block. 必须了解的是,图2B所示的上页地址与下页地址的配置仅为范例,本发明不限于此。 It must be understood that, in FIG. 2B configuration page address of the page address shown are only examples, the present invention is not limited thereto. 因此,在使用不同上页与下页地址的配置的MLC NAND闪存时可使用上述页面地址查询表来记录。 Thus, when different page on the configuration page address of the MLC NAND flash memory described above may be used to record the page address lookup table.

图3A、 3B与3C是根据本发明实施例绘示闪存的物理区块以一般模式进行轮替的示意图。 3A, 3B, and 3C are schematic diagrams Rotation embodiment according to the physical blocks of the flash memory shown in the embodiment of the present invention, the general mode.

必须了解的是,在此描述闪存的运作时以"提取"、"搬移"、"交换"、"分割"、"划分"等词来操作闪存130的物理区块130-0至130-N是逻辑上的概念。 Must be understood that, when the flash operation described herein to "extract", "move", "Exchange", "division", "division" and other words to operate the flash memory 130 of the physical block 130-0 to 130-N is logical concept. 也就是说,闪存的物理区块的实际位置并未更动,而是逻辑上对闪存的物理区块进行操作。 That is, the actual position of the physical block of the flash memory is not modifiers, but the logic to operate the flash memory physical blocks. 值得一提的是,下述物理区块的运作通过控制器110执行存储器管理模块110b的机械指令所完成。 It is worth mentioning that the operation of the physical block following the completion of an instruction by a mechanical controller 110 performs a memory management module 110b.

请参照图3A,在本发明实施例中,为了有效率地编程(即,写入与抹除)闪存130,控制器110会将闪存130的物理区块130-1至130-N在逻辑上分组为系统区202、数据区204与备用区206。 Referring to Figure 3A, in the embodiment of the invention, in order to efficiently programmed (i.e., written to and erased) a flash memory 130, the controller 110 will flash 130 physical blocks 130-1 to 130-N logically 202 is a packet system area, data area 204 and spare area 206. 一般来说,闪存130中属于数据区204的物理区块会占90%以上。 In general, flash memory data area 130 belonging to the physical block 204 will be more than 90%. 如前所述,闪存130的物理区块130-1至130-N会以轮替方式提供主机来储存数据,因此控制器110会提供逻辑区块210给主机以进行数据存取,并且通过维护逻辑区块与物理区块映射表来记录逻辑区块所映射的物理区块。 As described above, the physical block 130 of the flash memory 130-1 to 130-N will be provided in a manner alternation host to store data, the controller 110 provides a logic block 210 to the host for data access, and by maintaining logical blocks and physical blocks physical block mapping table to record the logical blocks is mapped.

系统区202中的物理区块用以记录系统数据,系统数据例如是关于闪存130的区域数、每一区域的物理区块数、每一物理区块的页面地址数、记录逻辑区块与物理区块映射关系的映射表(mapping table)等。 Physical block system area 202 for recording system data, system data, for example, the number of regions on the flash memory 130, the physical block number of each region, the number of each physical page address of the block, logical blocks and physical records BMT mappings (mapping table) and the like.

数据区204中的物理区块用以储存使用者的数据,一般来说就是主机200所存取的逻辑区块210所映射的区块。 Physical block 204 of the data area for storing user data, the block is generally accessed by host 200 logic block 210 is mapped.

备用区206中的物理区块是用以替换数据区204中的物理区块,因此在备用区206中的物理区块为空或可使用的区块,即无记录数据或标记为已没用的无效数据。 Physical block 206 is a spare area to replace the data area 204 in the physical block, physical block and therefore in the spare area 206 or the empty block may be used, i.e. no data or records marked as useless invalid data.

具体来说,由于在闪存中每个地址仅能编程一次,因此若要对已写过数据位置再次写入数据时,必须先执行抹除的操作。 In particular, since each address in the flash memory can only be programmed once, so to must perform erase operations on location data when writing data has been written again. 然而,如前所述闪存写入单位为页面,其小于以物理区块为单位的抹除单位。 However, as previously described for the page flash memory write unit, which is smaller than the unit of physical block erase unit. 因此,若要执行物理区块的抹除操作时,必须先将欲抹除物理区块中的有效页面地址的数据复制至其它物理区块后才可进行物理区块的抹除操作。 Therefore, to perform the physical block erase operation, valid data must first page address to be erased physical blocks replication erase operation can be conducted after the physical blocks to other physical blocks.

例如,当主机欲写入数据至逻辑区块210之中的逻辑区块L时,控制器IIO会通过逻辑区块与物理区块映射表得知逻辑区块L目前是映射数据区204中的物理区块M。 For example, when the host logical block data to be written to logical block among the 210 L, the controller may be learned by IIO logical blocks and physical blocks of the logical block mapping table mapping L is now in the data region 204 physical block M. 因此,闪存储存系统100将对物理区块M中的数据进行更新,期间,控制器110会从备用区206中提取物理区块C来取代数据区204的物理区块M。 Thus, the data storage system 100 will flash memory physical blocks to be updated in the M period, the controller 110 extracts the physical block 206 from the spare area unsubstituted C physical blocks of the data region 204 M. 然而,当将新数据入至物理区块C的同时,不会立刻将物理区块M中的所有有效数据搬移至物理区块C而抹除物理区块M。 However, when the new data into the physical block to C, while all valid data immediately without physical block M is moved to the physical block and an erase physical block M. C 具体来说,控制器110会将物理区块M中欲写入页面地址之前的有效数据(即页PO与Pl)复制至物理区块C(如图3B的(a)),并且将新数据(即物理区块C的页P2与P3)写入至C区块(如图3B的(b))。 Specifically, the controller 110 will be written in the physical blocks M valid data (i.e. PO and Pl is page) is copied to the physical block C (FIG. 3B (a)) before page address, and the new data (i.e., physical block page C P2 and P3) write to block C (FIG. 3B (b)). 此时,将含有部分的有效旧数据与所写入新数据的物理区块C暂时地关联为替换物理区块208。 At this time, old data will contain an effective portion of the new data is written with the physical block C is replaced temporarily associated physical block 208. 此是因为物理区块M中的有效数据有可能在下个操作(例如,写入指令)中变成无效,因此立刻将物理区块M中的所有有效数据搬移至替换物理区块C可能会造成无谓的搬移。 This is because the effective physical data block M is the next likely operation (e.g., write command) and becomes inactive, thus immediately all valid data in the physical blocks M are moved to the replacement block C may cause physical unnecessary move. 在此案例中,物理区块M与替换物理区块C的内容整合起来才是所映射逻辑区块L的完整内容。 In this case, M and replaces the physical blocks physical block C is to integrate the entire contents of the logic block L is mapped. 此等母子区块(即,物理区块M与替换物理区块C)的瞬时关系可依据控制器110中緩冲存储器llOd的大小而定,例如一般会使用五 Such mother block (i.e., the physical block M alternative physical block C) may be based on the instantaneous relationship between the buffer memory controller 110 llOd on the size of, for example, typically use five

组来实作。 Group to implement. 暂时地维持此种瞬时关系的操作一般可称为开启(open)母子区块。 Temporarily maintain such a relationship transient operations generally referred to as open (open) mother blocks. 之后,当需要将物理区块M与替换物理区块C的内容真正合并时,控制器110才会将物理区块M与替换物理区块C整并为一区块,由此提升区块的使用效率,此合并的操作又可称为关闭(close)母子区块。 Thereafter, when it is desired to replace the contents of physical blocks and physical blocks M C truly combined, the controller 110 will replace the physical blocks and physical blocks M and C is a whole block, thereby lifting block efficiency, this combined operation can be called Close (Close) mother block. 例如,如图3B的(c)所示,当进行关闭母子区块时,控制器110会将物理区块M中剩余的有效数据(即,页P4〜PN)复制至替换物理区块C,然后将物理区块M抹除并关联为备用区206,同时,将替换物理区块C关联为数据区204,并且在逻辑区块与物理区块映射表中将逻辑区块L的映射更改为物理区块C,由此完成关闭母子区块的操作。 For example, as shown in FIG. 3B (c), the mother block when closed, the controller 110 will be M physical blocks remaining valid data (i.e., p P4~PN) copied to replace the physical block C, then erase physical block M and is associated spare area 206, while physical block associated with the replacement data region 204 is C, and L is mapped with the logical block in the physical block map table is changed to the logic block physical block C, thereby completing the closing operation of the mother block.

由于闪存130的编程规格要求必须从每一物理区块的第一页开始写入至最后一页并且在每个位仅能编程一次(即由仅能'T,变为"0")的条件下,一旦存储器物理区块的页面地址写入数据后,若欲更新已写入的数据就必须如图3A所示从备用区206中提取一物理区块重新进行图3B所示的步骤。 Since the flash programming condition specifications 130 must be written starting from the first page of each physical block to the last one and each bit can only be programmed once (i.e. only the 'T, becomes "0") next, once the physical block address of the page memory write data Ruoyu update data has been written in step 206 to extract a physical block in the spare area to re-illustrated in FIG. 3A. 3B must from FIG. 因此,当物理区块在未进行图3B的(c)关闭操作之前(即处于图3B的(b)所示的瞬时),而发生必须更新刚搬移的数据(例如图3B的(a)所示的P0〜P1)时,则所搬移的旧数据就必须再搬移一次,此称为随机(Random)写入模式时。 Thus, when the physical block is not performed prior to FIG. 3B (c) closing operation (i.e., in FIG. 3B (b), transient), occurs just move data must be updated (e.g. in FIG. 3B (a), when the illustrated P0~P1), then the old data must be moved and then moved again, this is called a random (the random) write mode.

例如, 一般在储存装置中会使用文件配置表(File Allocation Table,FAT)来管理储存媒体,其中FAT数据的存取是非常频繁。 For example, the storage device will generally use file allocation table (File Allocation Table, FAT) to manage the storage medium, wherein data is accessed very frequently FAT. 因此,当存取FAT表时可能会因为不断更新刚搬移的数据而进入随机写入模式。 Therefore, when accessing the FAT table may move just because of constantly updated data into the random write mode. 在进入上述随机写入模式时,控制器110会直接在替换物理区块C中循序地写入数据而不进行如图3B的(a)所述的有效数据搬移操作,以避免在随机写入模式下不断重复执行图3A与图3B的操作。 Upon entering the random write mode, the controller 110 sequentially writes data directly in alternative physical block C without effective data migration operation shown in FIG. 3B (a) said to avoid random write repeated execution mode of FIG. 3A and FIG. 3B operations. 并且,当随机写入模式结束后再从备用区206中提取一物理区块来整并物理区块M与替换物理区块C的有效数据。 Further, when the random write mode after the end of a physical block extracted from the spare area 206 and the entire valid data and M physical blocks physical block C is replaced. 在此,进入随机写入模式的替换物理区块C亦被称为混乱子区块。 Here, the random write mode into the physical block replacement sub-block C also known as chaotic.

此外,在另一实施例中倘若主机200对逻辑区块L不断写入不满一个页面的数据时,控制器110会再从备用区206中提取一个物理区块作为暂存物理区块,并且将不满一个页面的数据依序地写入至暂存物理区块的页面中,并且于之后当结束母子区块关系时才进行有效数据的整合。 Further, in another embodiment, if the host 200 pairs of logical blocks written in the L continuously less than a page of data, the controller 110 will be re-extracted from a physical block in the spare area 206 as a temporary physical block, and dissatisfied data of one page is sequentially written to the temporary physical block pages, and then to integrate data valid until the end when the mother-child relationship blocks.

例如,如图3C所示当上述开启母子区块(即,物理区块M与替换物理区块C)的瞬时关系的逻辑区块L进入随机写入模式时,控制器110会再从备用 For example, shown in Figure 3C when the instantaneous relationship between the logical block mother block said opening (i.e., the physical block M alternative physical block C) L enters the random write mode, the controller 110 again from the standby

16区206中提取一个物理区块作为暂存物理区块T,并且在此随机写入模式期间,主机200对逻辑区块L的写入数据会暂时地储存在暂存物理区块T中。 16 area 206 to extract a temporary physical block as a physical block T, and during the random write mode, the host 200 L logical block write data temporarily stored in a temporary physical block in T. 之后,当结束随机写入模式时,暂存物理区块T的数据会被整合至替换物理区块C,并且暂存物理区块T会被抹除并搬移回至备用区206。 Thereafter, when the end of the random write mode, temporary physical block data T may alternatively be integrated into the physical block C, T and temporary physical block is erased and moved back into the spare area 206.

在本实施例中,除了以如图3A与图3B所示的一般模式来储存逻辑区块L的数据外,控制器110亦可执行区块管理模块的机械指令以特殊模式来储存逻辑区块的数据。 In the present embodiment, in addition to the normal mode shown in FIG. 3A and FIG. 3B to store the logical block data L, the controller module 110 may also perform a mechanical block management instructions to the special mode to store a logical block The data. 具体来说,在特殊模式中,控制器IIO会使用两个替换物理区块的下页地址来储存逻辑区块的数据。 Specifically, in the special mode, the controller uses two alternative IIO physical block address of the next page of the logical block to store data. 如上所述,由于下页地址的写入速度快于上页地址,因此仅以下页地址来储存数据将提高数据存取的速度。 As described above, since the write speed faster than the page address is the page address, the page address to store only the data to increase the speed of data access. 然而,由于在本实施例中一个物理区块中属于下页地址的页面地址的总数是占一个物理区块的一半,因此在本实施例的特殊模式中会以两个物理区块的下页地址来储存一个逻辑区块的数据,其中,值得说明的是,下页的页面总数亦可为物理区块的1/N, N为自然数。 However, since the page address belongs to the next page of a physical block address in the present embodiment is half of the total number of a physical block, and therefore the special mode in the present embodiment, two physical blocks will next page a data store address logic blocks, wherein worth noting that, the total number of pages may also be pages of physical block 1 / N, N is a natural number.

图4A、 4B与4C是根据本发明实施例绘示闪存的物理区块以特殊模式进行轮替的示意图。 4A, 4B, and 4C are schematic diagrams Rotation embodiment according to the physical blocks of the flash memory shown in the embodiment of the present invention is the special mode.

请参照图4A,例如当主机欲写入数据至逻辑区块210之中的逻辑区块L时,控制器IIO会通过逻辑区块与物理区块映射表得知逻辑区块L目前是映射数据区204中的物理区块M。 Referring to Figure 4A, for example, when the logical block among the data to be written to the host logic block 210 L, the controller may be learned by IIO logical blocks and physical blocks of the logical block mapping table mapping data currently L the physical block region 204 M. 因此,闪存储存系统100将对物理区块M中的数据进行更新,期间,控制器IIO会从备用区206中提取物理区块C1与物理区块C2来取代数据区204的物理区块M。 Thus, the data storage system 100 to the physical flash block M is updated, during the controller extracts IIO physical blocks C1 and C2 from the physical blocks in the spare area 206 instead of the data area of ​​the physical block 204 M. 类似地,当将新数据写入至物理区块C1与物理区块C2的同时,控制器110不会立刻将物理区块M中的所有有效数据搬移至物理区块Cl与物理区块C2而抹除物理区块M,而会暂时维持如上所述母子区块(即,物理区块M、替换物理区块C1与替换物理区块C2)的关系。 Similarly, when new data is written simultaneously to the physical block and a physical block C1 and C2, the controller 110 does not immediately all valid physical block data M is moved to the physical blocks and physical blocks Cl and C2 erasing the physical block M, with mother block temporarily maintained as described above (i.e., physical block M, alternatively the replacement physical blocks physical block C1 C2) relationship.

在逻辑区块是处于特殊模式期间(即,逻辑区块是以两个物理区块的下页地址来储存数据)且是处于上述母子区块的瞬时关系的例子中,倘若此逻辑区块进入上述随机写入模式时,同样地,控制器IIO会从备用区206中提取一物理区块作为暂存物理区块来暂时储存欲写入的数据,并且于随机写入模式结束时才进行有效数据的整合。 During the special mode is in the logic blocks (i.e., two physical blocks of the logical block is the address of the page to store the data), and is an example in a transient relationship between the blocks of the mother, if this logical block into the when the random write mode, in the same manner, the controller extracts from the IIO spare area 206 in a physical block as a physical block for temporarily storing data to be written is temporarily stored, and when carried out at the end of the random write mode is active data integration.

例如,如图4B所示当上述开启母子区块(即,物理区块M、替换物理区块C1与替换物理区块C2)的瞬时关系的逻辑区块L进入随机写入模式时,控制器110会再从备用区206中提取一个物理区块作为暂存物理区块T,并且在此随机写入模式期间,主机200对逻辑区块L的写入数据会暂时地储存在暂存物理区块T中。 For example, shown in Figure 4B when an instantaneous relation between said logical block mother block opening (i.e., physical block M, alternatively the replacement physical blocks physical block C1 C2) of L enters random write mode, the controller 110 will be re-extracted from a physical block in a spare area as a temporary physical block T 206, and during the random write mode, the host 200 L logical block write data temporarily stored in the temporary storage area physically T in block. 之后,当结束随机写入模式时,暂存物理区块T的数据会被整合至替换物理区块Cl与替换物理区块C2,并且暂存物理区块T会被抹除并搬移回至备用区206。 Thereafter, when the end of the random write mode, temporary physical block data T are integrated into the physical block Cl is replaced replacement block physical C2, and temporary erased physical blocks and T is moved back to the standby District 206.

在本实施例中,由于逻辑区块可处于一般模式或特殊模式,因此控制器110必须知道逻辑区块是否处于特殊模式以及处于特殊模式的逻辑区块是使用哪两个物理区块的下页地址。 In the present embodiment, since the logic blocks may be in a normal mode or special mode, the controller 110 must know whether the logic blocks and logic blocks in the special mode is a special mode which is a two page physical block using address. 图5A是根据本发明实施例绘示逻辑区块与物理区块映射表的范例。 FIG 5A is an embodiment of the present invention is shown exemplary logical blocks and physical block mapping table. 请参照图5A,在本实施例中,逻辑区块与物理区块映射表包括逻辑区块字段502、特殊模式标记字段504与物理区块字段506。 Referring to Figure 5A, in the present embodiment, the logical blocks and physical blocks includes a logical block mapping table field 502, field 504 to the special mode flag field 506 of the physical block. 物理区块字段506用以记录逻辑区块字段502中所记录的逻辑区块映射的物理区块。 Physical block field 506 is used to record a physical block in the logical block field 502 recorded in the logical block mapping. 特殊模式标记字段504用以标记该笔记录的逻辑区块是处于一般模式或特殊模式,其中当特殊模式标记字段被记录为"0"时表示此笔记录所对应的逻辑区块是处于一般模式,而当此特殊模式标记字段被记录为"1"时表示此笔记录所对应的逻辑区块是处于特殊模式。 Special mode flag field 504 to the pen mark recorded in a logical block is normal mode or special mode, which means that when a special mode flag field is recorded as "0" for this record corresponding to the logical block is in the normal mode , while "1" indicates that when this special mode flag field is recorded as records corresponding to this logical block is in the special mode. 例如,在图5A的范例中,在第一笔映射记录中记录了逻辑区块Q是在一般模式并且映射物理区块125。 For example, in the example of FIG. 5A, the recording of the logical block mapping Q in the first pen is recorded in the normal mode and the mapping of the physical block 125.

此外,在本实施例中存储器管理模块110b还包括特殊模式映射表用以记录处于特殊模式的逻辑区块所映射的物理区块。 Further, in the present embodiment, the memory management module further comprises a physical block 110b special mode logic block mapping table for recording the special mode is mapped. 图5B是根据本发明实施例绘示特殊模式映射表的范例。 FIG 5B is an example embodiment illustrates the special mode mapping table according to the present invention. 如图5B所示,特殊模式映射表包括索引字段512、第一特殊模式区块字段514与第二特殊模式区块字段516。 5B, the mapping table includes a special mode index field 512, a first block field 514 of the special mode is a special mode of the second block field 516. 索引字段512用以记录在特殊模式映射表中每笔记录的索引值,第一特殊模式区块字段514与第二特殊模式区块字段516用以记录此笔记录所使用的两个物理区块。 Index field 512 for recording the special mode index value mapping table each record, the first field in the special mode block 514 and the second special mode field 516 is used to record two blocks of the physical block used for this record . special

块字段。 Block field. 也就是,当逻辑区块被标记为处于特殊模式时,控制器110可通过 That is, when the logical block is marked as being in the special mode, the controller 110 may

映射的两个物理区块。 Two physical block mapping. 例如,请参照图5A与图5B的范例,在图5A的第二笔映射记录中记录了逻辑区块1是在特殊模式,并且在物理区块字段506中记录了特殊模式映射表的索引值0。 For example, referring to FIG 5A and FIG. 5B example, a logical block is recorded in the special mode, the special mode and recorded in the physical block mapping table index value in field 506 of the second recording pen mapping in FIG. 5A 0. 基此,可再由特殊模式映射表的记录中查询到索引值0的记录包含物理区块98与物理区块102。 This group can be polled by the special recording mode to record a mapping table containing the index value of 0 physical block 98 with the physical block 102. 基此,通过逻辑区块与物理区块映射表与特殊模式映射表的查询就可得知逻辑区块1是使用物理区块98与物理区块102的下页地址来储存数据。 This group, by querying a logical block and physical block mapping table and the mapping table can be the special mode that a logical block is a physical block 98 with the physical block address 102 of the page to store data.

18值得一提的是,由于备用区206的物理区块是有限的,并且在特殊模式 18 It is worth mentioning that, due to the physical block of the spare area 206 is limited, and in the special mode

映射表中每增加一笔记录就会增加闪存储存系统ioo的负荷(例如,需要较大 Mapping table a record will increase for each additional flash storage system ioo load (e.g., a larger

的緩沖存储器llOd),因此在本发明实施例中会限制使用特殊模式的逻辑区块的数目,例如在本实施例中使用特殊模式的逻辑区块的预先定义数目为10 个。 LLOD buffer memory), and therefore limits the number of logic blocks in the embodiment used in the special mode of the embodiment of the present invention, for example, in the present embodiment the number of pre-defined patterns using special embodiment of the logic block 10. 基此,在本实施例中控制器110会选择主机200经常存取的逻辑区块来执行特殊模式。 By virtue of this, in this embodiment the controller 110 selects frequently accessed logical block 200 the host to perform special mode in the present embodiment.

在本实施例中,当闪存储存系统100开机时,控制器110的微处理器单元110a会执行存储器管理模块110b的机械指令以在緩沖存储器110d中建立使用计数表,其中会记录每一逻辑区块的使用计数。 In the present embodiment, when the flash memory storage system 100 is turned on, the controller 110 of the microprocessor unit 110a will execute the memory management module 110b to establish a mechanical command usage count table 110d in the buffer memory, which records each logical region using the block count. 例如,当主机200对某一逻辑区块进行写入数据时,则此逻辑区块的使用计数就会被加1。 For example, when the host 200 writes a logical block of data, this logic block usage count will be incremented. 在本实施例中除了记录每一逻辑区块的使用计数外,依据使用计数所判断较常使用的数个逻辑区块会被记录在緩沖存储器110d作为频繁存取区块。 Examples In addition to logging the usage count of each of the logic blocks, based on the determined count used more frequently used number of logical blocks in the buffer memory is recorded as a frequently accessed block 110d in the present embodiment. 例如,在本实施例中会根据所有使用计数由大至小的排序从具有最大使用计数的逻辑区块开始在緩冲存储器110d中记录10个逻辑区块,并且每当使用计数表被更新时,记录在緩冲存储器110d中的频繁存取区块就会被更新。 For example, from large to small will be sorted starting from the logical block having the maximum usage count is recorded in accordance with the present embodiment, all the usage count in the buffer memory 10 in logical block 110d, and the table is updated whenever the count , frequently accessed blocks recorded in the buffer memory 110d is updated. 此外,在本实施例中,使用计数表是在闪存储存系统100每次开机时重新建立,换言之, Further, in the present embodiment, a count table 100 is re-established at every boot flash memory storage system, in other words,

所有的计数值会在每次开机时重新归零来计数。 All re-zero count values ​​counted at each boot. 然而,本发明不限于此,使用计数表亦可在闪存储存系统IOO开机前储存至系统区202中以便于下次开机时继续计数。 However, the present invention is not limited thereto, and may use count table storage area 202 to the system to continue counting the next boot to the flash memory before power storage system IOO.

基此,在本发明实施例中当主机200对逻辑区块进行写入时,控制器110 就可依据在緩冲存储器110d中记录的频繁存取区块来判断是否对此欲写入的逻辑区块执行特殊模式。 This group, the frequently accessed blocks in the embodiment, when 200 pairs of host logical block is written, the controller 110 can be recorded in the buffer memory according 110d determines whether the logic to be written in this present invention block perform special mode.

在本发明另一实施例中,当处于特殊模式期间的逻辑区块结束上述母子 In another embodiment of the invention, the logic block when the end of the special mode period in the above-described mother

储存数据。 Store data. 例如,如图4C所示,当结束母子区块的瞬时关系时,当旧有效数据的搬移完成后物理区块M会被抹除并关联为备用区206并且物理区块C1与物理区块C2会被关联为数据区204。 For example, as shown, when the relationship between mother and ending instant of the block, after the completion of the valid data moved old physical block is erased M 4C is a spare area 206 and associated physical block and a physical block C1 and C2 It will be linked to the data area 204. 也就是说,逻辑区块L会映射物理区块Cl与物理区块C2的下页地址。 That is, the logic block L is mapped physical block Cl and C2 of the physical block address of the next page. 同时,当主机200再次i夂对已处于特珠模式的逻辑区块执行写入指令时,控制器IIO会依据緩冲存储器110d中的记录来判断此已处于特殊模式的逻辑区块是否仍然为频繁存取区块。 Meanwhile, when the host again i Fan 200 is in the logical blocks have been special beads write instruction execution mode, the recording controller IIO will be based in the buffer memory 110d to determine a logical block in this particular mode has been still frequently accessed blocks.

倘若已处于特殊模式的逻辑区块仍为频繁存取区块时则控制器110会从备用区206中提取两个物理区块作为替换物理区块并且仅使用此两个物理区块的下页地址来写入数据。 The controller 110 extracts the two when physical block if the logical block is still in the special mode from the frequently accessed blocks in the spare area 206 as an alternative to physical blocks and only the lower two physical pages in this block address to write the data. 此外,倘若已处于特殊模式的逻辑区块不再为频 Further, if the logical block is no longer in the special mode frequency

繁存取区块时则控制器110会从备用区206中提取一个物理区块作为替换物 The controller 110 extracts the physical block from a spare block area 206 as an alternative to access complex

已处于特殊模式的逻辑区块不再为频繁存取区块时则此逻辑区块会恢复为一般模式,而不再占用两个物理区块。 Logical block is no longer in the special mode is frequently accessed logical block This block reverts to normal mode, and does not occupy physical two blocks.

图6是根据本发明实施例绘示区块管理步骤的流程图。 6 is a flowchart illustrating a schematic block management step according to the embodiment of the present invention. 请参照图6,当闪存储存系统IOO开机时,在步骤S601中会配置多个逻辑区块以供主机200存取。 Referring to FIG 6, when the flash memory storage system IOO boot, in step S601, configures the logic blocks 200 for host access. 接着,在步骤S603中会记录每一逻辑区块的使用计数,其中在本实施例中当主机200写入数据至逻辑区块时就会更新逻辑区块的使用计数。 Next, in step S603 will be recorded use count for each logic block, when the embodiment 200 wherein the host writes data to the logical block count will be updated using the logical block in the present embodiment.

之后,在步骤S605中会依据使用计数排序所有逻辑区块并且从具有最大使用计数的逻辑区块开始依序记录预先定义数目(例如,IO个)的逻辑区块为 Thereafter, in step S605 it will be based on the use count and sort all of the logic blocks having a maximum usage count from the logical block sequentially starts pre-recording number (e.g., the IO a) a logical block is defined as

然而在本发明另一实施例中亦可设定存取次数大于特定存取频繁门坎值的逻辑区块为频繁存取区块,其中此存取频繁门坎值是可由使用者自行设定并且可动态变动。 However, in the embodiment, logical blocks may be set larger than the number of access specific threshold value frequently accesses another embodiment of the present invention is a frequently accessed block, wherein this threshold value is frequently accessed by the user and may set their own dynamic changes. 例如,存取频繁门坎值可设为255。 For example, the access frequency threshold value may be set to 255.

在步骤S607中控制器110会等待与接收主机200的写入指令数据,并且在步骤S609中会判断欲写入的逻辑区块是否属于频繁存取区块。 In step S607, the controller 110 will wait for the write command data receiving host 200, and in step S609, determines whether the logical block to be written frequently accessed block belongs.

倘若在步骤S609中判断欲写入的逻辑区块属于频繁存取区块时,则在步 When in step S609 it is determined if logical block to be written frequently accessed block belongs, at step

块的下页地址来写入数据。 The page address to write the data block.

倘若在步骤S609中判断欲写入的逻辑区块不属于频繁存取区块时,则在步骤S613中从备用区206中提取一个物理区块并且使用所提取的物理区块的上页地址与下页地址来写入数据。 When in step S609 it is determined if logical block to be written are not frequently accessed block, a physical block is extracted from the spare area 206 in step S613 and uses the extracted physical block address and page next address to write the data.

如上所述,当控制器110以特殊模式来管理闪存130的物理区块时,则控制器IIO必须记录相关的映射关系以利后续的存取。 As described above, when a special mode for the controller 110 to manage the physical blocks of the flash memory 130, the controller must record associated IIO mapping relationships to facilitate subsequent access. 因此,在步骤S611与步骤S613之后,会进行逻辑区块与物理区块映射表及/或特殊模式映射表的 Thus, after step S611 and step S613, the logical block may be the physical block mapping table and / or the special mode mapping table

模式标记以表示在步骤S611中所写入的数据是使用所提取的两个物理区块的下页地址来储存,并且在特殊模式映射表中记录所使用的两个物理区块。 Mode flag to indicate that the data written in step S611 are two physical block using the extracted address to store the next page, and the two physical blocks are recorded in a special mode using the mapping table. 之后,区块管理步骤会回至步骤S603与S605更新使用计数与频繁存取区块,并且于步骤S607中再次待命接收指令。 Thereafter, the block management step will return to step S603 and S605 to update the use count frequently accessed blocks, and in step S607 the received standby command again. 虽未绘示于图6中,但本领域技术人员可轻易了解图6的区块管理步骤会在接收到关机或电源中断指令后结束。 Although not shown in Figure 6, those skilled in the art can readily understand FIG. 6 is a block management step will end after receiving the power off or interrupt instruction.

综上所述,本发明在物理区块的管理上提供一种以两个物理区块的下页地址来储存一个逻辑区块的数据的特殊模式。 In summary, the present invention provides a physical block in the physical block management two page address in the special mode to store a logical block of data. 基此,在对于使用此特殊模式的逻辑区块进行存取时可有效地提升数据存取的速度。 By virtue of this, when the logical block access to this special mode may effectively improve the speed of data access. 特别是,本发明提供一种通过逻辑区块的使用计数来判断主机频繁存取的逻辑区块,通过对于此 In particular, the present invention is to provide one kind of logic blocks frequently accessed by the host is determined using the logical block count, and for this by

些频繁存取的逻辑区块执行上述特殊模式,可在系统资源有限下提升系统效 These frequently accessed logical blocks to be executed in the special mode, the lifting system may be limited in the efficiency of the system resources,

6匕H匕。 6 H dagger dagger.

虽然本发明已以较佳实施例揭露如上,然其并非用以限定本发明,任何本领域技术人员,在不脱离本发明的精神和范围内,当可作些许的更动与润饰,因此本发明的保护范围当视所附的权利要求范围所界定者为准。 Although the invention has been described by reference to preferred embodiments, they are not intended to limit the present invention, anyone skilled in the art, without departing from the spirit and scope of the present invention, may make various modifications and variations, so this range and their equivalents depending on the scope of the invention as claimed in the appended claims.

21 twenty one

Claims (25)

1.一种区块管理方法,适用于管理多层存储单元与非闪存的多个物理区块且该些物理区块至少分组为数据区与备用区,其中每一物理区块包括多个页面地址且该些页面地址区分为多个上页地址与写入速度快于该些上页地址的多个下页地址,该区块管理方法包括: 配置多个逻辑区块以供主机存取; 记录属于频繁存取区块的逻辑区块;以及执行特殊模式以分别地使用该多层存储单元与非闪存的至少两个物理区块的下页地址来储存属于该频繁存取区块的逻辑区块的数据。 A block management method for managing NAND flash memory unit multilayer of a plurality of physical blocks and physical blocks of at least the plurality of packet data area and a spare area, wherein each physical block includes a plurality of pages the plurality of address and page address into a plurality of page addresses and the write speed in the plurality of addresses on a plurality of pages under the page address, the block management method comprising: a plurality of logic blocks for accessing the host; frequently accessed logical block belonging to the recording block; and performing a special mode, respectively, using at least two physical blocks of the multi-layered memory cell in the NAND flash memory to store the page addresses belonging to the frequently accessed logical block data block.
2. 根据权利要求1所述的区块管理方法,其中记录属于该频繁存取区块的逻辑区块的步骤包括:记录每一逻辑区块的使用计数;以及依据该些使用计数排序该些逻辑区块并且从具有最大的该使用计数的逻辑区块开始依序记录预先定义数目的逻辑区块为该频繁存取区块。 Step 2. The block management method according to claim 1, wherein the recording block belonging to the frequently accessed logical block comprises: recording usage count of each of the logic blocks; sort and count using the plurality of the plurality of and sequentially recording start logical block from the logical block having the largest counted using a pre-defined number of frequently accessed logical block for block.
3. 根据权利要求1所述的区块管理方法,其中执行该特殊模式以分别地存取区块的逻辑区块的数据步骤包括:当该主机写入数据至每一逻辑区块时判断该欲写入的逻辑区块是否属于该频繁存取区块;以及当该欲写入的逻辑区块属于该频繁存取区块时则从该备用区中提取两个 The block management method according to claim 1, wherein the specific mode is performed in each logical block accessed data block comprises the step of: determining when the host writes data to each of the logic blocks logical block to be written belongs to the frequently accessed blocks; and extracted from the two spare area when the logical block to be written frequently accessed block belongs to the
4, 根据权利要求2所述的区块管理方法,其中记录每一逻辑区块的使用计数的步骤包括当该主机写入数据至该些逻辑区块时更新该些逻辑区块的使用计数。 4. The block management method according to claim 2, wherein the step of recording the usage count for each of the logic blocks including the updated use count of the plurality of logical block when the host writes data to the plurality of logic blocks.
5, 根据权利要求3所述的区块管理方法,还包括: 当该欲写入的逻辑区块属于该频繁存取区块时在逻辑区块与物理区块映射表中记录特殊模式标记以表示该欲写入的逻辑区块的数据是使用所提取的两个物理区块的下页地址来储存以及在特殊模式映射表中记录储存该欲写入的逻辑区块的数据的两个物理区块。 5. The block management method according to claim 3, further comprising: when the logical block to be written frequently accessed block belongs to the special mode recorded in physical blocks and logical block mapping table marked with It indicates the logical block of data to be written is two physical block using the extracted address to the next page, and store the logical block data to be written is stored in the recording mode, the special two physical mapping table blocks.
6, 根据权利要求3所述的区块管理方法,还包括:时,从该备用区中提取另一物理区块并且在所提取的另一物理区块中暂时地储存该主机对该欲写入的逻辑区块所写入的数据。 6. The block management method according to claim 3, further comprising: when extracted from another physical block and the spare area is temporarily stored in another physical block in the extracted host write For the logical block of data written into.
7. 根据权利要求3所述的区块管理方法,还包括:当该欲写入的逻辑区块不属于该频繁存取区块时则从该备用区中提取一个物理区块并且使用所提取的一个物理区块的上页地址与下页地址来写入该数据。 The block management method according to claim 3, further comprising: extracting from a spare area of ​​the physical block when the logical block to be written is not part of the frequently accessed blocks and using the extracted a physical page address and the block address is written to the next page of data.
8. 根据权利要求1所述的区块管理方法,其中记录属于该频繁存取区块的逻辑区块的步骤包括:记录每一逻辑区块的使用计数;以及判断每一逻辑区块的使用计数是否大于存取频繁门坎值,其中将该使用计数大于该存取频繁门坎值的每一逻辑区块记录为该频繁存取区块。 Step 8. The block management method according to claim 1, wherein the recording block belonging to the frequently accessed logical block comprises: recording usage count of each of the logic blocks; Analyzing and using each logical block whether the count is greater than the threshold value frequently accessed, wherein the usage count is greater than the threshold value of the access frequency of each logical block for recording frequently accessed blocks.
9. 一种控制器,适用于具有多层存储单元与非闪存的闪存储存系统,其中该多层存储单元与非闪存具有多个物理区块且该些物理区块至少分组为数上页地址与写入速度快于该些上页地址的多个下页地址,该控制器包括: 微处理器单元;闪存接口,耦接至该微处理器单元; 緩冲存储器,耦接至该微处理器单元;以及存储器管理模块,耦接至该微处理器单元且具有可由该微处理器单元执行的多个机器指令以对该闪存进行多个区块管理步骤,该些区块管理步骤包括:配置多个逻辑区块以供主机存取; 记录属于频繁存取区块的逻辑区块;以及执行特殊模式以分别地使用该多层存储单元与非闪存的至少两个物理区块的下页地址来储存属于该频繁存取区块的逻辑区块的数据。 A controller for a storage unit having a multilayer flash memory and NAND flash memory storage system, wherein the multilayer NAND flash memory cells having a plurality of physical blocks and physical blocks of the plurality of packets at least a page number and the address a plurality of writing speed faster than the page address on the plurality of page address, the controller comprising: a microprocessor unit; flash memory interface, coupled to the microprocessor unit; a buffer memory coupled to the microprocessor unit; and a memory management module, coupled to the microprocessor unit and having a plurality of machine instructions executed by the microprocessor unit to perform a plurality of blocks of the flash memory management step, the plurality of block management step comprises: configuring a plurality of logic blocks for accessing the host; frequently accessed logical block belonging to a recording block; and performing a special mode, respectively, using at least two physical blocks of the multi-layered memory cell in the NAND flash memory page address logical block to store the data belonging to the frequently accessed blocks.
10. 根据权利要求9所述的控制器,其中记录属于该频繁存取区块的逻辑区块的步骤包括:记录每一逻辑区块的使用计数;以及依据该些使用计数排序该些逻辑区块并且从具有最大的该使用计数的逻辑区块开始依序记录预先定义数目的逻辑区块为该频繁存取区块。 Step 10. The controller according to claim 9, wherein the recording block belonging to the frequently accessed logical block comprises: recording usage count of each logical block; and ordering the plurality of regions based on the plurality of logical usage count blocks and sequentially recording starts from the logical block having the largest number of counts using a predefined logic blocks for frequently accessed blocks.
11.根据权利要求9所述的控制器,其中执行该特殊模式以分別地使用区块的逻辑区块的数据步骤包括:当该主机写入数据至每一逻辑区块时判断该欲写入的逻辑区块是否属于该频繁存取区块;以及当该欲写入的逻辑区块属于该频繁存取区块时则从该备用区中提取两个 11. The controller of claim 9, wherein the special mode to execute each step using the logical block data block comprises: determining whether the host to be written when the data is written to each logical block logical block belongs to the frequently accessed blocks; and extracted from the two spare area when the logical block to be written frequently accessed block belongs to the
12. 根据权利要求IO所述的控制器,其中记录每一逻辑区块的使用计数数。 12. The controller of claim IO wherein the recording using the count number of each logical block.
13. 根据权利要求11所述的控制器,其中该些区块管理步骤还包括:当该欲写入的逻辑区块属于该频繁存取区块时在逻辑区块与物理区块映两个物理区块的下页地址来储存以及在特殊模式映射表中记录储存该欲写入的逻辑区块的数据的两个物理区块。 13. The controller according to claim 11, wherein the plurality of block management step further comprises: When the logical block to be written frequently accessed block belongs to the two enantiomers in logical block and the physical block the page address and the physical block to store the data record store two physical blocks of the logical block to be written in the special mode mapping table.
14. 根据权利要求11所述的控制器,其中该些区块管理方法还包括:写入的逻辑区块的数据同时该主机对该欲写入的逻辑区块执行随机写入模式时,从该备用区中提取另一物理区块并且在所提取的另一物理区块中暂时地储存该主机对该欲写入的逻辑区块所写入的数据。 14. The controller according to claim 11, wherein the plurality of block management method further comprises: logic to write data blocks to the host while performing a random write mode of the logical block to be written, from the spare area in another physical block extracting and temporarily storing the data written to the host logical block to be written in another physical block are extracted.
15. 根据权利要求11所述的控制器,其中该些区块管理步骤还包括:当该欲写入的逻辑区块不属于该频繁存取区块时则从该备用区中提取一个物理区块并且使用所提取的一个物理区块的上页地址与下页地址来写入该数据。 15. The controller according to claim 11, wherein the plurality of block management step further comprises: extracting from the spare area when a physical area of ​​the logical block to be written is not part of the frequently accessed blocks using a block and physical block of the extracted page by page address and the lower address to write the data.
16. 根据权利要求9所述的控制器,其中该闪存储存系统为随身碟、快闪存储卡或固态硬盘。 16. The controller according to claim 9, wherein the flash memory storage system as flash drive, solid state disk or a flash memory card.
17. 根据权利要求9所述的控制器,其中记录属于该频繁存取区块的逻辑区块的步骤包括:记录每一逻辑区块的使用计数;以及判断每一逻辑区块的使用计数是否大于存取频繁门坎值,其中将该使用计数大于该存取频繁门坎值的每一逻辑区块记录为该频繁存取区块。 17. A controller according to claim 9, wherein the recording block belonging to the frequently accessed logical block comprises: recording usage count of each of the logic blocks; and determining the use of each logical block count is access frequently greater than threshold value, wherein the usage count is greater than the threshold value of the access frequency of each logical block for recording frequently accessed blocks.
18. —种储存系统,包括:多层存储单元与非闪存,具有多个物理区块且该些物理区块至少分组为数据区与备用区,其中每一物理区块包括多个页面地址且该些页面地址区分为多个上页地址与写入速度快于该些上页地址的多个下页地址;传输连接接口;以及控制器,电性连接至该多层存储单元与非闪存与该传输连接接口,该控制器会执行存储器管理模块的多个机器指令以执行多个区块管理步骤,该些区块管理步骤包括:配置多个逻辑区块以供主机存取; 记录属于频繁存取区块的逻辑区块;以及执行特殊模式以分别地使用该多层存储单元与非闪存的至少两个物理区块的下页地址来储存属于该频繁存取区块的逻辑区块的数据。 18. - kind of storage system, comprising: a multi-layered memory cell NAND flash memory, having a plurality of physical blocks and physical blocks of at least the plurality of packet data area and a spare area, wherein each block comprises a plurality of physical page address and the plurality of page address into a plurality of page addresses and the write speed to the plurality of the plurality of the page address page address; transport connection interfaces; and a controller electrically connected to the multi-layered memory cell NAND flash memory and the transmission connection interface, the controller executes a plurality of machine instructions to perform memory management module management step a plurality of blocks, the plurality of block management step includes: a plurality of logic blocks for accessing the host; record belongs frequent access logic block of the block; and performing special mode to each memory cell using the multilayer and the lower page address of the at least two NAND flash memory physical blocks to store frequently accessed logical blocks belonging to the block of data.
19. 根据权利要求18所述的储存系统,其中记录属于该频繁存取区块的逻辑区块的步骤包括:记录每一逻辑区块的使用计数;以及依据该些使用计数排序该些逻辑区块并且从具有最大的该使用计数的逻辑区块开始依序记录预先定义数目的逻辑区块为该频繁存取区块。 Step 19. The storage system according to claim 18, wherein the recording block belonging to the frequently accessed logical block comprises: recording usage count of each logical block; and ordering the plurality of regions based on the plurality of logical usage count blocks and sequentially recording starts from the logical block having the largest number of counts using a predefined logic blocks for frequently accessed blocks.
20. 根据权利要求18所述的储存系统,其中执行该特殊模式以分别地使用该多层存储单元与非闪存的两个物理区块的下页地址来储存属于该频繁存取区块的逻辑区块的数据步骤包括:当该主机写入数据至每一逻辑区块时判断该欲写入的逻辑区块是否属于该频繁存耳又区块;以及当该欲写入的逻辑区块属于该频繁存取区块时则从该备用区中提取两个 20. The storage system according to claim 18, wherein each execution of the special mode to use the multilayer logical NAND flash memory cell of the next two physical blocks belonging to the page address to store frequently accessed block data block comprises the step of: determining whether the logical block to be written frequently belongs to the memory block and the ear when the host writes data to each of the logical blocks; and when the logical block to be written belong the extracts from two spare area frequently accessing the blocks
21. 根据权利要求19所述的储存系统,其中记录每一逻辑区块的使用计计数。 21. The storage system according to claim 19, wherein the recording was counted using each logical block.
22. 根据权利要求20所述的储存系统,其中该些区块管理步骤还包括: 当该欲写入的逻辑区块属于该频繁存取区块时在逻辑区块与物理区块映射表中记录特殊模式标^两个物理区块的下页地址来储存以及在特殊模式映射表中记录储存该欲写入的逻辑区块的数据的两个物理区块。 22. The storage system according to claim 20, wherein the plurality of block management step further comprises: logical blocks and physical blocks in the mapping table when the logical block to be written frequently accessed block belongs to the recording the special mode flag ^ two lower page address and the physical block in the special mode to store the mapping table records the physical block storing the data of two logical block to be written this.
23. 根据权利要求20所述的储存系统,其中该些区块管理方法还包括:写入的逻辑区块的数据同时该主机对该欲写入的逻辑区块执行随机写入模式时,从该备用区中提取另一物理区块并且在所提取的另一物理区块中暂时地储存该主机对该欲写入的逻辑区块所写入的数据。 23. The storage system according to claim 20, wherein the plurality of block management method further comprises: logic to write data blocks to the host while performing a random write mode of the logical block to be written, from the spare area in another physical block extracting and temporarily storing the data written to the host logical block to be written in another physical block are extracted.
24. 根据权利要求20所述的储存系统,其中该些区块管理步骤还包括: 当该欲写入的逻辑区块不属于该频繁存取区块时则从该备用区中提取一个物理区块并且使用所提取的一个物理区块的上页地址与下页地址来写入该数据。 24. The storage system according to claim 20, wherein the plurality of block management step further comprises: extracting from the spare area when a physical area of ​​the logical block to be written is not part of the frequently accessed blocks using a block and physical block of the extracted page by page address and the lower address to write the data.
25. 根据权利要求18所述的储存系统,其中记录属于该频繁存取区块的逻辑区块的步骤包括:记录每一逻辑区块的使用计数;以及判断每一逻辑区块的使用计数是否大于存取频繁门坎值,其中将该使用计数大于该存取频繁门坎值的每一逻辑区块记录为该频繁存取区块。 Step 25. The storage system according to claim 18, wherein the recording block belonging to the frequently accessed logical block comprises: recording usage count of each of the logic blocks; and determining the use of each logical block count is access frequently greater than threshold value, wherein the usage count is greater than the threshold value of the access frequency of each logical block for recording frequently accessed blocks.
CN 200810134348 2008-07-24 2008-07-24 Block management method for flash memory, storage system and controller CN101634967B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200810134348 CN101634967B (en) 2008-07-24 2008-07-24 Block management method for flash memory, storage system and controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200810134348 CN101634967B (en) 2008-07-24 2008-07-24 Block management method for flash memory, storage system and controller

Publications (2)

Publication Number Publication Date
CN101634967A true CN101634967A (en) 2010-01-27
CN101634967B CN101634967B (en) 2012-01-04

Family

ID=41594162

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200810134348 CN101634967B (en) 2008-07-24 2008-07-24 Block management method for flash memory, storage system and controller

Country Status (1)

Country Link
CN (1) CN101634967B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214143A (en) * 2010-04-06 2011-10-12 深圳市江波龙电子有限公司 Method and device for managing multilayer unit flash memory, and storage equipment
CN102381036A (en) * 2011-08-01 2012-03-21 珠海天威技术开发有限公司 Consumable chip, consumable container and data writing method for consumable chip
CN102411544A (en) * 2010-09-17 2012-04-11 株式会社东芝 Memory management device and method for managing access to a nonvolatile semiconductor memory
CN102592670A (en) * 2011-01-07 2012-07-18 群联电子股份有限公司 Data writing method, memory controller and memory storage device
CN103064755A (en) * 2013-01-25 2013-04-24 珠海全志科技股份有限公司 Method and device for processing write data of NAND (not-and) flash memory
CN103176912A (en) * 2011-12-26 2013-06-26 中国移动通信集团公司 Method of random write and converter
CN103226605A (en) * 2013-04-28 2013-07-31 惠州市德赛西威汽车电子有限公司 Method for quickly displaying files in external storage device through vehicle-mounted multimedia equipment
CN103955431B (en) * 2014-04-11 2017-02-08 深圳市江波龙电子有限公司 A flash memory storage device, a data management method and apparatus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100504814C (en) 2007-01-17 2009-06-24 忆正存储技术(深圳)有限公司 Flash-memory zone block management method

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214143A (en) * 2010-04-06 2011-10-12 深圳市江波龙电子有限公司 Method and device for managing multilayer unit flash memory, and storage equipment
CN102411544A (en) * 2010-09-17 2012-04-11 株式会社东芝 Memory management device and method for managing access to a nonvolatile semiconductor memory
US9081661B2 (en) 2010-09-17 2015-07-14 Kabushiki Kaisha Toshiba Memory management device and method for managing access to a nonvolatile semiconductor memory
CN102592670A (en) * 2011-01-07 2012-07-18 群联电子股份有限公司 Data writing method, memory controller and memory storage device
CN102592670B (en) * 2011-01-07 2015-09-30 群联电子股份有限公司 The method of data writing, the memory controller and the memory storage device
CN102381036A (en) * 2011-08-01 2012-03-21 珠海天威技术开发有限公司 Consumable chip, consumable container and data writing method for consumable chip
CN102381036B (en) 2011-08-01 2014-04-16 珠海天威技术开发有限公司 Consumable chip, consumable container and data writing method for consumable chip
CN103176912A (en) * 2011-12-26 2013-06-26 中国移动通信集团公司 Method of random write and converter
CN103176912B (en) * 2011-12-26 2016-01-27 中国移动通信集团公司 Random write and converters
CN103064755B (en) * 2013-01-25 2015-03-25 珠海全志科技股份有限公司 Method and device for processing write data of NAND (not-and) flash memory
CN103064755A (en) * 2013-01-25 2013-04-24 珠海全志科技股份有限公司 Method and device for processing write data of NAND (not-and) flash memory
CN103226605A (en) * 2013-04-28 2013-07-31 惠州市德赛西威汽车电子有限公司 Method for quickly displaying files in external storage device through vehicle-mounted multimedia equipment
CN103226605B (en) * 2013-04-28 2017-01-11 惠州市德赛西威汽车电子股份有限公司 Car multimedia equipment fast method of displaying an external storage device files
CN103955431B (en) * 2014-04-11 2017-02-08 深圳市江波龙电子有限公司 A flash memory storage device, a data management method and apparatus

Also Published As

Publication number Publication date
CN101634967B (en) 2012-01-04

Similar Documents

Publication Publication Date Title
US7991942B2 (en) Memory block compaction method, circuit, and system in storage devices based on flash memories
US7890550B2 (en) Flash memory system and garbage collection method thereof
US8135901B2 (en) Solid state memory (SSM), computer system including an SSM, and method of operating an SSM
US8332576B2 (en) Data reading method for flash memory and controller and storage system using the same
US20050021904A1 (en) Mass memory device based on a flash memory with multiple buffers
CN102576330B (en) Memory system having persistent garbage collection
US9208079B2 (en) Solid state memory (SSM), computer system including an SSM, and method of operating an SSM
US8046526B2 (en) Wear leveling method and controller using the same
KR101394845B1 (en) Systems and methods for obtaining and using nonvolatile memory health information
US8122193B2 (en) Storage device and user device including the same
US8037232B2 (en) Data protection method for power failure and controller using the same
US20110264884A1 (en) Data storage device and method of operating the same
CN100487672C (en) Method and apparatus for splitting a logical block
US8234466B2 (en) Flash memory storage system applying SLC NAND flash memory and MLC NAND flash memory and data writing method thereof
CN101271380B (en) The mixture density memory storage apparatus
US8086787B2 (en) Wear leveling method, and storage system and controller using the same
US8180953B2 (en) Data accessing method for flash memory, and storage system and controller system thereof
US20130073798A1 (en) Flash memory device and data management method
US8103820B2 (en) Wear leveling method and controller using the same
US8583860B2 (en) Block management method for flash memory and controller and storage system using the same
US9563549B2 (en) Data storage device, user device and data write method
JP5907255B2 (en) Selective data storage in LSB and MSB pages
US9098395B2 (en) Logical block management method for a flash memory and control circuit storage system using the same
US8812816B2 (en) Garbage collection schemes for index block
US8935459B2 (en) Heuristics for programming data in a non-volatile memory

Legal Events

Date Code Title Description
C06 Publication
C10 Request of examination as to substance
C14 Granted