[go: up one dir, main page]

CN1534509A - Flash memory algorithm with fast and improper operation prevention function and control system thereof - Google Patents

Flash memory algorithm with fast and improper operation prevention function and control system thereof Download PDF

Info

Publication number
CN1534509A
CN1534509A CNA031214363A CN03121436A CN1534509A CN 1534509 A CN1534509 A CN 1534509A CN A031214363 A CNA031214363 A CN A031214363A CN 03121436 A CN03121436 A CN 03121436A CN 1534509 A CN1534509 A CN 1534509A
Authority
CN
China
Prior art keywords
mapping table
data
block
memory
flash memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA031214363A
Other languages
Chinese (zh)
Inventor
赖振楠
张耀泽
王国鸿
林传生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Key Technology Corp
Original Assignee
Key Technology 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 Key Technology Corp filed Critical Key Technology Corp
Priority to CNA031214363A priority Critical patent/CN1534509A/en
Publication of CN1534509A publication Critical patent/CN1534509A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Memory System (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The present invention relates to a flash memory algorithm, and more particularly, to a flash memory algorithm and a control system thereof capable of fast table establishment and preventing data corruption due to abnormal power failure, it mainly stores the link relation mapping table data of the logical block address and the corresponding physical block address value data in a data physical block paging of the memory and is protected by an ECC data, when the computer host is normally started up, the control device directly transfers and registers the mapping table data in a register of the control device to be read by the control device, the establishment of the mapping table is immediate and fast, the system not only can quickly establish the mapping table without the need of scanning procedure to save the startup time and operation procedure, if the mapping table is wrong due to abnormal operation of the system, the system connection can be recovered to normal by backtracking the last mapping table.

Description

具有快速且预防不当操作功效的快闪记忆体演算法及其控制系统Flash Memory Algorithm and Control System with Fast and Improper Operation Prevention

技术领域technical field

本发明是有关于一种快闪记忆体演算法,尤指一种可具有可快速建表且预防不正常断电所衍生资料错乱的快闪记忆体演算法及其控制系统。The present invention relates to a flash memory algorithm, in particular to a flash memory algorithm and its control system which can quickly build a table and prevent data confusion caused by abnormal power failure.

背景技术Background technique

资讯产业发展一日千里,受CPU速度愈来愈快及IA产品兴起的影响,高速传输的资料储存装置(记忆体)亦将扮演极为重要的角色。而在各种资料储存装置中,由于快闪记忆体具有非挥发性及易于更改资料存取的特性而广受使用者期待。The rapid development of the information industry, affected by the faster and faster CPU speed and the rise of IA products, high-speed data storage devices (memory) will also play an extremely important role. Among various data storage devices, flash memory is widely expected by users because of its non-volatile and easy-to-change data access characteristics.

按,如图1A所示,为一般资料储存系统的构造示意图;至少一个资料储存装置(如Smart Media记忆卡、Memory Stick记忆卡等各种快闪记忆体)11~19主要是由一控制装置20而与一电脑主机29连接(当然,该控制装置20亦可内建于电脑主机29的一子系统中),该控制装置20内包括有一微处理器25,其可由一符合PCMCIA、IDE、ATA、MMC、SD、Compact Flash或其组合式规格协定的主机界面控制器24而与电脑主机29相互连接,而微处理器25的一端则可经由一储存控制逻辑电路26以连线于该资料储存装置11~19;微处理器25亦可连接一暂存区控制器22,该暂存区控制器22可控制电脑主机29欲存取资料暂存于一资料储存区21中(第一暂存器211、第二暂存器213及第N暂存器219)。另外,一ECC逻辑电路23则分别连线于微处理器25、暂存器控制器22及储存控制逻辑电路26,其受控于微处理器25而对欲存取的资料磁区给予相对应的错误更正码ECC资料。又,微处理器25可连接一搜索列表(Lookup Table)255,该搜索列表255可用以记载逻辑区块位址(L0~Lm+1)和与其相对应的各资料储存装置11的所有实体区块位址资料值(PDA)。Press, as shown in Figure 1A, be the structure schematic diagram of general data storage system; At least one data storage device (such as Smart Media memory card, Memory Stick memory card etc. various flash memories) 11~19 is mainly by a control device 20 and connected with a host computer 29 (certainly, the control device 20 can also be built in a subsystem of the computer host 29), the control device 20 includes a microprocessor 25, which can be controlled by a PCMCIA, IDE, ATA, MMC, SD, Compact Flash or the host interface controller 24 of its combined specification agreement and is connected with the host computer 29, and one end of the microprocessor 25 can be connected to the data via a storage control logic circuit 26 Storage device 11~19; Microprocessor 25 also can be connected with a temporary storage area controller 22, and this temporary storage area controller 22 can control host computer 29 to want to access data to temporarily store in a data storage area 21 (the first temporary storage area 21). register 211, the second register 213 and the Nth register 219). In addition, an ECC logic circuit 23 is respectively connected to the microprocessor 25, the temporary register controller 22 and the storage control logic circuit 26, which is controlled by the microprocessor 25 and gives corresponding control to the data magnetic area to be accessed. Error Correction Code ECC data. In addition, the microprocessor 25 can be connected to a lookup table (Lookup Table) 255, which can be used to record the logical block addresses (L 0 ˜L m+1 ) and all data storage devices 11 corresponding thereto. Physical block address data value (PDA).

请参阅图1B,搜寻列表255所使用的记忆体,如随机存取记忆体(RAM)主要是以字元(WORD)为存取单位,而被分割成复数个字元住址(逻辑区块位址)L0、L1、...、Lm、Lm+1、...,每一逻辑区块位址内包含有一记录着相对影到记忆体实体区块位址资料值PBA(B3、B2、...、Bm+1、Bm、...)。快闪记忆体11主要是以区块(block)为存取单位而分被割成复数个实体区块位址B0~Bn,每一实体区块位址B0~BX的实体区块内(Data0~Datan)皆包含有复数个区块分页,而每一分页相当于主机端的一个最小储存单元磁区(sector),每一分页后又可加设有一记录区块内各相对应分页的错误更正码栏ECC(E0~En;error-correctingcode)、及记录相对应逻辑区块(L2、L3、L1..、Lm+1)的逻辑区块位址栏LBA,其中搜寻列表255的PDA栏与记忆体11的LBA栏内为相对应关系,例如记忆体资料实体区块B0内所储存资料Data0的逻辑位址资料值是指向搜寻列表255中的磁区L2,所以在其LBA栏中即登录为L2(此资料即使断电后亦将储存而不消失),而搜寻列表255的磁区L2的PBA栏即登录指向为B0(此资料在断电后即予消失),如实线双箭头所示,依此类推,如图1B所示。Please refer to FIG. 1B, the memory used by the search list 255, such as random access memory (RAM), is mainly based on a character (WORD) as an access unit, and is divided into a plurality of character addresses (logical block bits) address) L 0 , L 1 , ..., L m , L m+1 , ..., each logical block address contains a data value PBA ( B 3 , B 2 , . . . , B m+1 , B m , . . . ). The flash memory 11 is mainly divided into a plurality of physical block addresses B 0 ~B n based on a block (block) as an access unit, and each physical block address B 0 ~B X is a physical area Each block (Data 0 ~ Data n ) contains a plurality of block pages, and each page is equivalent to a minimum storage unit sector (sector) on the host side. After each page, a record can be added for each phase in the block. Error-correcting code column ECC (E 0 ~E n ; error-correcting code) corresponding to the page, and record the logical block address of the corresponding logical block (L 2 , L 3 , L 1 .., L m+1 ) column LBA, wherein the PDA column of the search list 255 is corresponding to the LBA column of the memory 11, for example, the logical address data value of the stored data Data 0 in the memory data entity block B 0 points to the search list 255 Therefore, it is registered as L2 in its LBA column (this data will be stored without disappearing even after a power failure), and the PBA column of the magnetic zone L2 in the search list 255 is registered as B0 (this The data will disappear after power off), as shown by the double arrows in the solid line, and so on, as shown in Figure 1B.

当系统开机时,搜索列表255的PBA栏是不存在,微处理器25将扫描快闪记忆体11~19的各实体区块位址及区块逻辑位址资料值LBA,并按照逻辑区块位址把相对应关系填入搜索列表255的实体区块位址栏PBA中,由此以建立完整的搜索列表255。惟,此种扫描再建立搜索列表的作业方式,不仅不方便且浪费作业时间。When the system is turned on, the PBA column of the search list 255 does not exist, and the microprocessor 25 will scan each physical block address and block logical address data value LBA of the flash memory 11-19, and perform the logical block according to the logical block The address fills the corresponding relationship into the physical block address column PBA of the search list 255 , thereby establishing a complete search list 255 . However, this operation method of scanning and then building a search list is not only inconvenient but also a waste of operation time.

又,由于快闪记忆体11的构造使然,其抹除或存取资料时是以区块伍为单位,因此当有实体区块修正变更时(如B2),必须把欲更改区块B2内原本已储存的资料Data2先转存于一可用但尚未储存有资料之一乾净实体区块(Bm+1)中,并在此实体区块Bm+1后的LBA栏中登录逻辑位址L1,之后并将欲更改区块B2内资料Data2抹除成为一乾净区块或记录不使用。惟,若当乾净区块(如Bm+1)已完成资料转存及填入逻辑位址资料值程序,但欲更改区块B2在尚未完成抹除动作时,发生如突然断电或当机等不正常关机状况,而于重新开机且微处理器25再次进行扫描各记忆体11各实体区块逻辑位址资料程序时,将可能发生有两个资料区块B2及Bm+1皆登录逻辑区块住址值为L1并指向同一个相对应搜寻列表255位址(如虚线双箭头所示),或者可能出现有些区块并无连接的情况,如此不仅容易造成资料的错误连结,甚至形成资料的毁损。Also, due to the structure of the flash memory 11, block 5 is used as a unit when erasing or accessing data, so when there is a physical block modification (such as B 2 ), the block B to be changed must be changed. The originally stored data Data 2 in 2 is first transferred to a clean physical block (B m+1 ) that is available but has not yet stored data, and registered in the LBA column after this physical block B m+1 Logical address L1, and then erase the data Data 2 in the block B 2 to be changed into a clean block or record unused. However, if the clean block (such as B m+1 ) has completed data transfer and filled in logical address data value procedures, but the block B 2 to be changed has not yet completed the erasing operation, such as a sudden power failure Or crash and other abnormal shutdown conditions, and when restarting and the microprocessor 25 scans the logic address data program of each physical block of each memory 11 again, two data blocks B 2 and B m may occur +1 is registered in the logical block address value L1 and points to the same corresponding search list 255 address (as shown by the dotted double arrow), or some blocks may not be connected, which is not only easy to cause data errors links, and even cause data damage.

因此如何使用另一种更新颖的快闪记忆体映射表及其建构方法,不仅于系统开机时可直接且快速的建立映射表,且又可预防各种突发或断电等不正常操作状况,以确保资料连结的准确性,长久以来一直是使用者殷切盼望及本发明欲行解决的困难点所在,而本发明人基于多年从事于资讯产制品研究、开发、及销售的实务经验,乃思及改良的意念,穷其个人的专业知识,经多方设计、探讨,并经无数次试作样品及改良后,终能创出本发明一种具有快速且预防不当操作功效的快闪记忆体演算法及其控制系统。Therefore, how to use another more novel flash memory mapping table and its construction method can not only directly and quickly establish the mapping table when the system is turned on, but also prevent various abnormal operating conditions such as sudden or power failures. , to ensure the accuracy of data linking, has long been a difficult point that users have longed for and that the present invention intends to solve, and the inventor is based on many years of practical experience in research, development, and sales of information products. Thinking about the idea of improvement, relying on personal professional knowledge, after many designs, discussions, and numerous trial samples and improvements, we can finally create a flash memory of the present invention that is fast and prevents improper operation. Algorithm and its control system.

发明内容Contents of the invention

本发明的主要目的在于提供一种具有快速且预防不当操作功效的快闪记忆体演算法及其控制系统,其主要是利用一实体区块的分页储存映射表资料,而于系统开机时直接从区块分页中转载于一暂存器里快速切换,而无需微处理器利用扫描程式对各记忆体实体区块进行逻辑位址资料扫描,因此不仅可简化微处理器的作业时间,且亦可大幅节省作业时间者。The main purpose of the present invention is to provide a flash memory algorithm and its control system with fast and improper operation prevention functions. Block paging is reproduced in a temporary register for fast switching, without the need for the microprocessor to scan the logical address data of each memory entity block with a scanning program, so it not only simplifies the working time of the microprocessor, but also can Great time saver.

本发明的次要目的在于提供一种具有快速且预防不当操作功效的快闪记忆体演算法及其控制系统,其记忆体实体区块分页中可记载映射表资料,由此可避免因为不正常操作下而造成资料不正常连结的遗憾。The secondary purpose of the present invention is to provide a flash memory algorithm and its control system with fast and improper operation prevention functions. It is a pity that the data is not properly linked due to the operation.

本发明的又一目的在于提供一种具有快速且预防不当操作功效的快闪记忆体演算法及其控制系统,其映射表资料可由一组ECC资料的保护,以提高其资料的正确性。Another object of the present invention is to provide a flash memory algorithm and its control system with fast and preventive effects of improper operation. The mapping table data can be protected by a set of ECC data to improve the accuracy of the data.

本发明的又一目的在于提供一种具有快速且预防不当操作功效的快闪记忆体演算法及其控制系统,其可将所有的记忆体区块数量依照暂存器或区块分页记忆体容量而分割成复数个分段区,每一分段区皆有一相对应的暂存器映射表以建立资料映射关系,当有区块资料变动时仅会影响到相关的映射表资料,因此可有效减少映射表的更动作业时间,并可有效降低资料错误连结状况发生者。Another object of the present invention is to provide a fast and preventive flash memory algorithm and its control system, which can allocate all memory blocks according to the temporary register or block paging memory capacity It is divided into a plurality of segment areas, and each segment area has a corresponding register mapping table to establish a data mapping relationship. When there is a block data change, only the relevant mapping table data will be affected, so it can be effectively Reduce the operating time for changing the mapping table, and effectively reduce the occurrence of data error link situations.

本发明的又一目的在于提供一种具有快速且预防不当操作功效的快闪记忆体演算法及其控制系统,可将所有的实体区块划分为复数个分区,以使映射表的大小降低到刚好一个磁区(256Words),以便此映射表亦可被当为一般资料而存入快闪记忆体内,因此可大幅节省登录区块实体位址资料的记忆体容量,且可适用于连结多个快闪记忆体的储存系统中。Another object of the present invention is to provide a fast and preventive flash memory algorithm and its control system, which can divide all physical blocks into multiple partitions, so that the size of the mapping table can be reduced to Exactly one magnetic sector (256Words), so that this mapping table can also be stored in the flash memory as general data, so it can greatly save the memory capacity of the physical address data of the registration block, and is suitable for linking multiple fast in flash memory storage systems.

本发明的目的是这样实现的:一种快闪记忆体的控制系统,其主要是由一控制装置分别连接于一电脑主机及至少一快闪记忆体,该控制装置内设有复数个暂存器,而部分暂存器可用以载入逻辑区块位址和与其相对应的实体区块住址资料值的映射表资料,此映射表资料可储存于一快闪记忆体的部分实体区块中。The object of the present invention is achieved in this way: a control system of flash memory, which is mainly connected to a host computer and at least one flash memory respectively by a control device, and a plurality of temporary storage devices are arranged in the control device. device, and part of the temporary register can be used to load the mapping table data of the logical block address and the corresponding physical block address data value, and the mapping table data can be stored in a part of the physical block of the flash memory .

该快闪记忆体中的实体区块数量为配合暂存器的储存容量而可被分段成复数个分区族群。The number of physical blocks in the flash memory can be segmented into a plurality of partition groups in order to match the storage capacity of the register.

每一个分区族群皆具有一对应的分页映射表资料,而分页映射表资料可储存于相对应的记忆体实体区块分页中。Each partition group has a corresponding page mapping table data, and the page mapping table data can be stored in the corresponding memory physical block page.

该映射表的储存容量是可选择256bytes及512bytes的其中之一。The storage capacity of the mapping table is one of 256bytes and 512bytes.

一映射表所能映射的记忆体实体区块数量是可选择128及256的其中之一。The number of memory physical blocks that can be mapped by a mapping table is one of 128 and 256 selectable.

该映射表中的一个字元数可登录而映射一相对应的记忆体区块。A character number in the mapping table can be registered to map a corresponding memory block.

该可登录映射表的暂存器可为一资料储存装置。The register for registering the mapping table can be a data storage device.

该储存有映射表资料的记忆体实体区块设有一特殊标记。The physical memory block storing the mapping table data is provided with a special mark.

本发明所述的一种快闪记忆体的演算法,其主要是在一快闪记忆体中储存有一记载有记忆体各实体区块位址资料值和与其相对应逻辑区块位址的映射表资料,在系统开机时,由一控制装置的控制可将此映射表资料直接转载于该控制装置的一暂存器内。The algorithm of a kind of flash memory described in the present invention, it mainly stores in a flash memory a mapping that records the address data values of each physical block of the memory and its corresponding logical block address When the system is turned on, the mapping table data can be directly transferred to a temporary register of the control device under the control of a control device.

上述演算法尚包括有下列步骤:当欲更改一实体区块肉所储存资料时,首先会将此欲更改区块内的不需更改资料转载于一可用但尚未储存有其它资料的乾净实体区块中,之后并将欲更改区块内的所有资料抹除,而此相关实体区块位址资料将直接于暂存器的映射表中更动,且于稍后将此更动后的映射表资料储存于记忆体的另一实体区块中。The above-mentioned algorithm also includes the following steps: when it is desired to change the data stored in a physical block, first the data that does not need to be changed in the block to be changed will be reprinted to a clean entity that is available but has not yet stored other data Afterwards, all the data in the block to be changed will be erased, and the address data of the relevant physical block will be directly changed in the mapping table of the temporary register, and the changed data will be changed later The mapping table data is stored in another physical block of the memory.

上述演算法尚可包括有下列步骤:当欲更改区块内的资料已进行抹除后,若发生不正常操作的情况发生而重新开机时,控制装置将之前已储存于记忆体实体区块的映射表资料将转载于暂存器中。The above-mentioned algorithm can also include the following steps: after the data in the block to be changed has been erased, if abnormal operation occurs and the computer is restarted, the control device will store the data stored in the physical block of the memory before. The mapping table data will be reproduced in the scratchpad.

上述演算法尚包括有下列步骤:由储存有映射表资料的实体区块的ECC资料来辨识是否有不正常操作的状况发生。The above-mentioned algorithm further includes the following steps: identifying whether there is abnormal operation from the ECC data of the physical block storing the mapping table data.

上述演算法尚包括有下列步骤:记载有记忆体各实体区块相关连结位址的映射表资料是储存于记忆体的一实体区块部分分页中,而该部分分页的位址是包括有一特殊标记以利于系统在开机时可立即搜寻该分页映射表资料并转载于暂存器中。The above-mentioned algorithm also includes the following steps: the mapping table data recorded with the relevant link addresses of each physical block of the memory is stored in a partial page of a physical block of the memory, and the address of the partial page includes a special The mark is useful for the system to immediately search for the page mapping table data and reprint it in the temporary register when the system is turned on.

该快闪记忆体中的实体区块数量为配合暂存器的储存容量而可被分段成复数个分段族群。The number of physical blocks in the flash memory can be segmented into a plurality of segment groups in order to match the storage capacity of the register.

每一分段区的实体区块皆存在有一与的相对应的分区映射表。There is a corresponding partition mapping table for each physical block in the segment area.

该映射表中的一个字元数可记录而映射一相对应的记忆体区块。A character number in the mapping table can be recorded to map a corresponding memory block.

一映射表所能映射的记忆体实体区块数量是可选择128及256的其中之一。The number of memory physical blocks that can be mapped by a mapping table is one of 128 and 256 selectable.

更动后的映射表资料亦可直接储存于一被固定的映射表资料实体区块分页中。The modified mapping table data can also be directly stored in a fixed mapping table data entity block page.

附图说明Description of drawings

图1A是一般快闪记忆体储存系统的构造示意图;1A is a schematic diagram of the structure of a general flash memory storage system;

图1B是习用快闪记忆体的映射表构造示意图;FIG. 1B is a schematic diagram of the structure of a mapping table of a conventional flash memory;

图2A是本发明快闪记忆体储存系统的构造示意图;FIG. 2A is a structural schematic diagram of a flash memory storage system of the present invention;

图2B是本发明快闪记忆体的映射表构造示意图;Fig. 2B is a schematic diagram of the mapping table structure of the flash memory of the present invention;

图2C是本发明快闪记忆体实体区块部分分页的构造示意图;FIG. 2C is a structural schematic diagram of partial paging of the physical block of the flash memory according to the present invention;

图3是本发明快闪记忆体在存取资料时的动作流程图:及Fig. 3 is the action flow diagram of flash memory of the present invention when accessing data: and

图4是本发明建构映射表时的动作流程图。Fig. 4 is a flow chart of the present invention when constructing a mapping table.

图号说明:Description of figure number:

11~19    快闪记忆体           20     控制装置11~19 Flash memory 20 Control device

21        资料暂存区           211    第一暂存器21 Data Temporary Storage Area 211 First Temporary Storage

213       第二暂存器           219    第N暂存器213 The second register 219 The Nth register

22        暂存区控制器         23     ECC逻辑电路22 Temporary storage area controller 23 ECC logic circuit

24        主机界面控制器       25     微处理器24 Host Interface Controller 25 Microprocessor

26        储存控制逻辑电路     29     电脑主机26 Storage control logic circuit 29 Computer host

255       映射表               31~39 快闪记忆体255 Mapping table 31~39 Flash memory

311       部分分页             40     控制装置311 Partial pagination 40 Control device

41        资料暂存区           411    第一暂存器41 Data temporary storage area 411 First temporary storage

413       第二暂存器           419    映射表413 Second register 419 Mapping table

42        暂存区控制器         43     ECC逻辑电路42 Temporary storage area controller 43 ECC logic circuit

44        主机界面控制器       45     微处理器44 Host Interface Controller 45 Microprocessor

46        储存控制逻辑电路     49     电脑主机46 Storage control logic circuit 49 Computer host

具体实施方式Detailed ways

请参阅图2A,是本发明快闪记忆体储存系统的构造示意图;至少一快闪记忆体31~39主要是由一控制装置40而与一电脑主机49连接(当然,该控制装置40亦可内建于电脑主机49的一子系统中),该控制装置40内包括有一微处理器45,其可由一符合PCMCIA、IDE、ATA、MMC、SD、Compact Flash或其组合式规格协定的主机界面控制器44而与电脑主机49相互连接,而微处理器45的一端则可经由一储存控制逻辑电路46以连线于该资料储存装置31~39;微处理器45亦可连接一暂存区控制器42,该暂存区控制器42可控制电脑主机49欲存取资料暂时储存于一资料储存区41中(第一暂存器411、第二暂存器413及第N暂存器419)。另外,一ECC逻辑电路43则分别连线于微处理器45、暂存器控制器42及储存控制逻辑电路46,其受控于微处理器45而对欲存取的资料磁区给予相对应的错误更正码ECC资料。其中,资料储存区41的部分暂存器419可被用以作为储存记载各记忆体实体区块相关实体区块位址资料值PBA的映射表419(mappingtable)。Please refer to FIG. 2A, which is a structural schematic view of the flash memory storage system of the present invention; at least one flash memory 31-39 is mainly connected with a computer host 49 by a control device 40 (of course, the control device 40 can also be Built in a subsystem of the host computer 49), the control device 40 includes a microprocessor 45, which can be controlled by a host interface that meets PCMCIA, IDE, ATA, MMC, SD, Compact Flash or its combined specification agreement The controller 44 is connected to the host computer 49, and one end of the microprocessor 45 can be connected to the data storage devices 31-39 through a storage control logic circuit 46; the microprocessor 45 can also be connected to a temporary storage area Controller 42, the temporary storage area controller 42 can control the host computer 49 to temporarily store the data to be accessed in a data storage area 41 (the first temporary register 411, the second temporary register 413 and the Nth temporary register 419 ). In addition, an ECC logic circuit 43 is respectively connected to the microprocessor 45, the temporary register controller 42 and the storage control logic circuit 46, which is controlled by the microprocessor 45 and gives a corresponding data magnetic area to be accessed. Error Correction Code ECC data. Wherein, part of the temporary register 419 of the data storage area 41 can be used as a mapping table 419 (mapping table) for storing data values PBA related to physical block addresses of each memory physical block.

请参阅图2B,在本发明实施例中,其记载有相对应记忆体实体区块位址资料值PBA的映射表419是登录于控制装置加的部分暂存器419中,为搭配暂存器419或实体区块(B0)的分页(page)记忆储存容量256bytes或512bytes(亦就是128或256字元数)映射表419的每一个字元数W0、W1、...Wm皆内含代表一相对应的区块B0、B1、...Bm的位址值,所以一个映射表419可对应128或小于256个记忆体实体区块(B0),因此记忆体实体区块总个数将可被适时分割成复数个分区族群(Seg0~Segn),其中每一个被切分的segemnet所含的区块(Block)数将被限制在256之内(或128之内),当然每一segement内皆有一专门记录映射更新(Mapping update)的特殊保留区块(如图2B的*号表示的或图2C所示)。Please refer to FIG. 2B. In the embodiment of the present invention, the mapping table 419 that records the corresponding memory physical block address data value PBA is registered in the partial register 419 added to the control device, which is a collocation register 419 or the paging (page) memory storage capacity of the physical block (B 0 ) is 256bytes or 512bytes (that is, 128 or 256 characters) each character number W 0 , W 1 , ... W m of the mapping table 419 All contain address values representing a corresponding block B 0 , B 1 , ... B m , so a mapping table 419 can correspond to 128 or less than 256 memory physical blocks (B 0 ), so the memory The total number of physical blocks can be divided into multiple partition groups (Seg 0 ~ Seg n ) in a timely manner, and the number of blocks (Block) contained in each segmented segemnet will be limited to 256 ( or within 128), of course, each segment has a special reserved block for recording mapping update (Mapping update) (as indicated by * in FIG. 2B or shown in FIG. 2C).

每一分段区Segement皆有一相对应的映射更新(Mapping update)的特殊保留区块(此映射区块的初使建表值乃在系统初始化时所建立)用以建立资料映射关系,当电脑主机49欲存取档案资料时,控制装置40的微处理器45将会由电脑主机49所传入的LBA值除以分区内所含的实体区块数值,再除以区块内含的磁区(sector)数以获得所需读进的segement分段内的映射表,且将此分区映射表由映射更新(Mapping update)的特殊保留区块的最新更新分页中转存于映射暂存器419,由此以方便系统查出此LBA所需对映的实体区块位址。又,每一分段区Segement皆有一相对应的映射更新(Mapping update)特殊保留区块以储存最新建立的资料映射关系,当有区块映射资料变动时仅会更新此分区映射更新(Mapping update)特殊保留区块的最新分页,因此可有效减少整个映射表的更动作业时间,并可有效降低资料错误连结状况发生。Each segment area Segement has a corresponding special reserved block for mapping update (the initial value of the mapping block is established when the system is initialized) to establish the data mapping relationship, when the computer When the host 49 wants to access the file data, the microprocessor 45 of the control device 40 will divide the LBA value imported by the host computer 49 by the value of the physical block contained in the partition, and then divide it by the magnetic area contained in the block (sector) number to obtain the mapping table in the segment segment that needs to be read in, and this partition mapping table is transferred to the mapping temporary register 419 by the latest update page of the special reserved block of the mapping update (Mapping update) , so as to facilitate the system to find out the address of the physical block that this LBA needs to map. In addition, each segment area Segement has a corresponding special reserved block for mapping update (Mapping update) to store the newly established data mapping relationship. When there is a block mapping data change, only this partition mapping update (Mapping update) will be updated ) specially reserves the latest page of the block, so it can effectively reduce the modification operation time of the entire mapping table, and can effectively reduce the occurrence of data error connection situations.

由于本发明的映射表419本身即为一个可储存资料,所以当映射表419内的登录资料有所变更时,即可将此资料储存于一映射更新(Mapping update)特殊保留区块的实体区块部分分页311中,而此部分分页311为标记有特殊标记“*”的不被映射的资料区块,其中该部分分页311分割为复数个分区页MT0、MT1、MT2.......、MTm,其中m为Block内含的分页数,请参阅图2C,当映射表419内的登录资料有所变更时,即可将此资料储存于一映射更新(Mapping update)特殊保留区块的实体分页311的MTn中,当再度更新时,新映射关系将储存于MTn+1中,每增加新登录资料时,新更新映射将往下分买写入,直到写满则重新Erase此映射更新(Mapping update)特殊保留区块再由分页O开始更新,以作为下次电脑开机时可立即转载于一暂存器419的资料,因此本发明无需如已用储存系统一般需由电脑主机49扫描各区块的逻辑位址(如图1B中的L值)资料重新建立搜寻列表,因此不仅可省略电脑主机49的作动程序,亦可大幅节省构建搜寻列表时间。Since the mapping table 419 itself of the present invention is a storable data, when the registration data in the mapping table 419 is changed, this data can be stored in the entity area of a special reserved block for mapping update (Mapping update) Part of the block page 311, and this part of the page 311 is a data block marked with a special mark "*" that is not mapped, wherein the part of the page 311 is divided into a plurality of partition pages MT 0 , MT 1 , MT 2 ... ..., MT m , where m is the number of pages contained in the Block, please refer to Figure 2C, when the registration data in the mapping table 419 is changed, this data can be stored in a mapping update (Mapping update ) in the MT n of the entity page 311 of the special reserved block, when updating again, the new mapping relationship will be stored in MT n+1 , and when adding new login data, the new update mapping will be written down until When it is full, Erase this mapping update (Mapping update) special reserved block and start updating from page 0 again, so as to be the data that can be immediately reprinted in a temporary register 419 when the computer is turned on next time, so the present invention does not need to be stored as already used Generally, the system requires the host computer 49 to scan the logical address data of each block (L value in FIG. 1B ) to rebuild the search list. Therefore, not only the operating program of the host computer 49 can be omitted, but also the time for constructing the search list can be greatly saved.

当然,由于本发明的重点在于映射表资料可储存于一实体区块的分页中,以方便在系统开机时可直接且迅速的转载于映射表记忆体中。Of course, the key point of the present invention is that the mapping table data can be stored in the paging of a physical block, so that it can be directly and quickly transferred to the mapping table memory when the system is turned on.

再者,请参阅图3,是为本发明快闪记忆体在写入(或读取)操作下建构映射表时的动作流程图:如图所示,其主要步骤是包括有:Furthermore, please refer to FIG. 3, which is a flow chart of the flash memory of the present invention when constructing a mapping table under a write (or read) operation: as shown in the figure, its main steps include:

步骤301,电脑主机或控制装置成开机或供电后,整个系统成待命状态;Step 301, after the host computer or the control device is turned on or powered, the entire system is in a standby state;

步骤302,等待主机下达写入指令;Step 302, waiting for the host to issue a write command;

步骤303,电脑主机需要存取档案资料,控制装置的微处理器利用电脑主机所传入的LBA资料经过处理以得到所指定的实体区块位址是存在于哪一分段区内,并将此分段区的分区映射表资料从一实体区块的分页中转载于一映射暂存器;Step 303, the host computer needs to access the file data, the microprocessor of the control device processes the LBA data imported by the host computer to obtain which segment area the specified physical block address exists in, and The data of the partition mapping table of the segment area is transferred from a page of a physical block to a mapping register;

步骤304,微处理器由分区映射表资料找到电脑主机所欲存取的档案资料所对应的记忆体实体区块,并将主机端欲写入的资料转存于sector Buffer(磁区暂存器)中;Step 304, the microprocessor finds the memory physical block corresponding to the file data that the computer host wants to access from the partition mapping table data, and transfers the data that the host side wants to write to the sector Buffer (magnetic sector temporary register) middle;

步骤305,由旧区块中已写入的分页比对此将写入的位址侦测出写入指令是否为覆写状况,若无则直接写到旧区块中且无须更新映射关系而回至待命状态;若是,则执行步骤305:Step 305: Detect whether the write command is an overwrite condition from the written page in the old block compared to the address to be written, if not, write directly to the old block without updating the mapping relationship Get back to the standby state; if so, then perform step 305:

步骤306,表示有一实体区块内的某一分页资料将被覆写,首先将新资料写入一系统保留的乾净区块中;Step 306, indicating that a certain paging data in a physical block will be overwritten, first write the new data into a clean block reserved by the system;

步骤307,将先前已储存于旧区块内而不被更改的资料搬入此乾净区块中;Step 307, move the data previously stored in the old block and not changed into this clean block;

步骤308,抹除原旧区块内的所有资料以成为另一系统保留的乾净记忆体实体区块,成为一个下次将欲使用的乾净区块中:Step 308, erasing all the data in the original old block to become another clean memory physical block reserved by the system, and become a clean block to be used next time:

步骤309,更改与上述相关区块逻辑位址资料值于相对应的映射表中,以期建立两者间的正确连结关系;Step 309, changing the data value of the logical address of the above-mentioned related block in the corresponding mapping table, so as to establish a correct connection relationship between the two;

步骤310,将暂存器的映射表资料更新到映射更新(Mapping update)特殊保留区块中的下一分页,以作为下次电脑开机时控制装置可方便搜寻及转载映射表的资料。Step 310, updating the mapping table data of the temporary register to the next page in the special reserved block for mapping update, so that the control device can conveniently search and reprint the mapping table data when the computer is turned on next time.

最后,请参阅图4,是为本发明系统在要建构映射表时的动作流程图;如图所示:Finally, please refer to Fig. 4, which is an action flow chart of the system of the present invention when the mapping table is to be constructed; as shown in the figure:

步骤401,系统经由控制装置的处理换算已得到必须载入的分页映射表位址;当然,另一实施例中控制装置亦可直接由一特殊标记而找到映射表位址;In step 401, the system obtains the address of the page mapping table that must be loaded through conversion through the processing of the control device; of course, in another embodiment, the control device can also directly find the address of the mapping table from a special mark;

步骤402,从某一特别保留不被映射的区块中读取指定的分页映射表:Step 402, read the specified paging mapping table from a block specially reserved for unmapping:

步骤403,映射表中的ECC是否错误,若是,则表示上一次的操作有经历过不正常断电或不当操作的情形,需执行404;若否,则代表操作一切正常,则执行步骤405;Step 403, whether the ECC in the mapping table is wrong, if yes, it means that the last operation has experienced abnormal power failure or improper operation, and 404 needs to be executed; if not, it means that the operation is normal, then execute step 405;

步骤404,代表不正常操作状况发生,必须回朔上一个映射表的应对关系,只要重新读取映射更新(Mapping update)特殊保留区块中的最近上一映射分页到记忆体中即可;Step 404, it means that an abnormal operation situation occurs, and it is necessary to look back on the response relationship of the previous mapping table, as long as the latest previous mapping page in the special reserved block of the mapping update (Mapping update) is re-read and stored in the memory;

步骤405,继续执行系统动作。Step 405, continue to execute system actions.

综上所述,当知本发明是有关于一种快闪记忆体演算法,尤指一种可具有可快速建表且预防不正常断电所衍生资料错乱的快闪记忆体演算法及其控制系统。故本发明实为一富有新颖性、进步性,及可供产业利用功效者,应符合发明专利申请要件无疑,爰依法提出发明专利申请,祈钩局早日赐准专利,至为感祷。To sum up, it should be known that the present invention is related to a flash memory algorithm, especially a flash memory algorithm and its control that can quickly build tables and prevent data confusion derived from abnormal power failures. system. Therefore, the present invention is indeed novel, progressive, and can be used by the industry. It should undoubtedly meet the requirements of the invention patent application. I file an invention patent application in accordance with the law. I pray that the Bureau will grant the patent as soon as possible. I am very grateful.

惟以上所述者,仅为本发明的一较佳实施例而已,并非用来限定本发明实施的范围。即凡依本发明申请专利范围所述的形状、构造、特征及精神所为的均等变化与修饰,均应包括于本发明的申请专利范围内。However, what is described above is only a preferred embodiment of the present invention, and is not intended to limit the implementation scope of the present invention. That is, all equivalent changes and modifications made according to the shape, structure, characteristics and spirit described in the scope of the patent application of the present invention shall be included in the scope of the patent application of the present invention.

Claims (18)

1、一种快闪记忆体的控制系统,其主要是由一控制装置分别连接于一电脑主机及至少一快闪记忆体,其特征在于,该控制装置内设有复数个暂存器,而部分暂存器可用以载入逻辑区块位址和与其相对应的实体区块住址资料值的映射表资料,此映射表资料可储存于一快闪记忆体的部分实体区块中。1. A control system of a flash memory, which is mainly connected to a host computer and at least one flash memory by a control device, characterized in that the control device is provided with a plurality of temporary registers, and Part of the register can be used to load the mapping table data of the logical block address and the corresponding physical block address data value, and the mapping table data can be stored in a part of the physical block of the flash memory. 2、如权利要求1所述的控制系统,其特征在于,该快闪记忆体中的实体区块数量为配合暂存器的储存容量而可被分段成复数个分区族群。2. The control system according to claim 1, wherein the number of physical blocks in the flash memory can be segmented into a plurality of partition groups in order to match the storage capacity of the temporary register. 3、如权利要求2所述的控制系统,其特征在于,每一个分区族群皆具有一对应的分页映射表资料,而分页映射表资料可储存于相对应的记忆体实体区块分页中。3. The control system according to claim 2, wherein each partition group has a corresponding page mapping table data, and the page mapping table data can be stored in the corresponding memory physical block page. 4、如权利要求1所述的控制系统,其特征在于,该映射表的储存容量是可选择256bytes及512bytes的其中之一。4. The control system according to claim 1, wherein the storage capacity of the mapping table is one of 256 bytes and 512 bytes. 5、如权利要求4所述的控制系统,其特征在于,一映射表所能映射的记忆体实体区块数量是可选择128及256的其中之一。5. The control system according to claim 4, wherein the number of memory physical blocks that can be mapped by a mapping table is one of 128 and 256 selectable. 6、如权利要求1所述的控制系统,其特征在于,该映射表中的一个字元数可登录而映射一相对应的记忆体区块。6. The control system as claimed in claim 1, wherein a character number in the mapping table can be registered to map a corresponding memory block. 7、如权利要求1所述的控制系统,其特征在于,该可登录映射表的暂存器可为一资料储存装置。7. The control system as claimed in claim 1, wherein the register in which the mapping table can be registered is a data storage device. 8、如权利要求1所述的控制系统,其特征在于,该储存有映射表资料的记忆体实体区块设有一特殊标记。8. The control system as claimed in claim 1, wherein the physical memory block storing the mapping table data is provided with a special mark. 9、一种快闪记忆体的演算法,其主要是在一快闪记忆体中储存有一记载有记忆体各实体区块位址资料值和与其相对应逻辑区块位址的映射表资料,在系统开机时,由一控制装置的控制可将此映射表资料直接转载于该控制装置的一暂存器内。9. An algorithm for a flash memory, which mainly stores a mapping table data that records the address data values of each physical block of the memory and the address of the corresponding logical block in a flash memory, When the system is turned on, the mapping table data can be directly transferred to a temporary register of the control device under the control of a control device. 10、如权利要求9所述的演算法,其特征在于,尚包括有下列步骤:10. The algorithm according to claim 9, further comprising the following steps: 当欲更改一实体区块肉所储存资料时,首先会将此欲更改区块内的不需更改资料转载于一可用但尚未储存有其它资料的乾净实体区块中,之后并将欲更改区块内的所有资料抹除,而此相关实体区块位址资料将直接于暂存器的映射表中更动,且于稍后将此更动后的映射表资料储存于记忆体的另一实体区块中。When you want to change the data stored in a physical block, you will first reprint the data that does not need to be changed in the block you want to change to a clean physical block that is available but has not yet stored other data, and then you will change it All the data in the block will be erased, and the relevant physical block address data will be directly changed in the mapping table of the temporary register, and the changed mapping table data will be stored in another part of the memory later in a physical block. 11、如权利要求10所述的演算法,其特征在于,尚包括有下列步骤:当欲更改区块内的资料已进行抹除后,若发生不正常操作的情况发生而重新开机时,控制装置将之前已储存于记忆体实体区块的映射表资料将转载于暂存器中。11. The algorithm according to claim 10, further comprising the following steps: after the data in the block to be changed has been erased, if abnormal operation occurs and the computer is restarted, control The device will reload the mapping table data previously stored in the physical memory block into the temporary register. 12、如权利要求9所述的演算法,其特征在于,尚包括有下列步骤:12. The algorithm according to claim 9, further comprising the following steps: 由储存有映射表资料的实体区块的ECC资料来辨识是否有不正常操作的状况发生。Whether abnormal operation occurs is identified by the ECC data of the physical block storing the mapping table data. 13、如权利要求9所述的演算法,其特征在于,尚包括有下列步骤:13. The algorithm according to claim 9, further comprising the following steps: 记载有记忆体各实体区块相关连结位址的映射表资料是储存于记忆体的一实体区块部分分页中,而该部分分页的位址是包括有一特殊标记以利于系统在开机时可立即搜寻该分页映射表资料并转载于暂存器中。The mapping table data that records the link addresses of each physical block of the memory is stored in a partial page of a physical block of the memory, and the address of this partial page includes a special mark so that the system can immediately Search the page mapping table data and reprint it in the register. 14、如权利要求9所述的演算法,其特征在于,该快闪记忆体中的实体区块数量为配合暂存器的储存容量而可被分段成复数个分段族群。14. The algorithm of claim 9, wherein the number of physical blocks in the flash memory can be segmented into a plurality of segment groups to match the storage capacity of the register. 15、如权利要求13所述的演算法,其特征在于,每一分段区的实体区块皆存在有一与的相对应的分区映射表。15. The algorithm according to claim 13, wherein there is a partition mapping table corresponding to the physical block of each segment area. 16、如权利要求9所述的演算法,其特征在于,该映射表中的一个字元数可记录而映射一相对应的记忆体区块。16. The algorithm of claim 9, wherein a number of characters in the mapping table can be recorded to map a corresponding memory block. 17、如权利要求9所述的演算法,其特征在于,一映射表所能映射的记忆体实体区块数量是可选择128及256的其中之一。17. The algorithm according to claim 9, wherein the number of memory physical blocks that can be mapped by a mapping table is one of 128 and 256 selectable. 18、如权利要求9所述的演算法,其特征在于,更动后的映射表资料亦可直接储存于一被固定的映射表资料实体区块分页中。18. The algorithm according to claim 9, wherein the modified mapping table data can also be directly stored in a fixed mapping table data entity block page.
CNA031214363A 2003-03-27 2003-03-27 Flash memory algorithm with fast and improper operation prevention function and control system thereof Pending CN1534509A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA031214363A CN1534509A (en) 2003-03-27 2003-03-27 Flash memory algorithm with fast and improper operation prevention function and control system thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA031214363A CN1534509A (en) 2003-03-27 2003-03-27 Flash memory algorithm with fast and improper operation prevention function and control system thereof

Publications (1)

Publication Number Publication Date
CN1534509A true CN1534509A (en) 2004-10-06

Family

ID=34285702

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA031214363A Pending CN1534509A (en) 2003-03-27 2003-03-27 Flash memory algorithm with fast and improper operation prevention function and control system thereof

Country Status (1)

Country Link
CN (1) CN1534509A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100353337C (en) * 2005-06-01 2007-12-05 旺玖科技股份有限公司 flash storage system
CN100421462C (en) * 2004-12-23 2008-09-24 普立尔科技股份有限公司 Digital video data storage method
CN101364206B (en) * 2005-06-01 2010-06-23 旺玖科技股份有限公司 flash storage system
CN104679672A (en) * 2013-11-27 2015-06-03 慧荣科技股份有限公司 Data storage device and flash memory control method
CN105389266A (en) * 2015-10-16 2016-03-09 联想(北京)有限公司 Data management method and apparatus
US9329992B2 (en) 2013-12-04 2016-05-03 Silicon Motion, Inc. Data storage device and flash memory control method
CN107015913A (en) * 2016-01-28 2017-08-04 瑞昱半导体股份有限公司 Memory device and mapping table guarantee method
CN109521944A (en) * 2017-09-18 2019-03-26 慧荣科技股份有限公司 data storage device and data storage method
US10866850B2 (en) 2016-01-21 2020-12-15 Raymx Microelectronics Corp. Memory device for guaranteeing a mapping table and method thereof

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100421462C (en) * 2004-12-23 2008-09-24 普立尔科技股份有限公司 Digital video data storage method
CN100353337C (en) * 2005-06-01 2007-12-05 旺玖科技股份有限公司 flash storage system
CN101364206B (en) * 2005-06-01 2010-06-23 旺玖科技股份有限公司 flash storage system
CN104679672A (en) * 2013-11-27 2015-06-03 慧荣科技股份有限公司 Data storage device and flash memory control method
US9218891B2 (en) 2013-11-27 2015-12-22 Silicon Motion, Inc. Data storage device and flash memory control method
CN104679672B (en) * 2013-11-27 2018-02-23 慧荣科技股份有限公司 Data storage device and flash memory control method
US9329992B2 (en) 2013-12-04 2016-05-03 Silicon Motion, Inc. Data storage device and flash memory control method
CN105389266A (en) * 2015-10-16 2016-03-09 联想(北京)有限公司 Data management method and apparatus
US10866850B2 (en) 2016-01-21 2020-12-15 Raymx Microelectronics Corp. Memory device for guaranteeing a mapping table and method thereof
CN107015913A (en) * 2016-01-28 2017-08-04 瑞昱半导体股份有限公司 Memory device and mapping table guarantee method
CN109521944A (en) * 2017-09-18 2019-03-26 慧荣科技股份有限公司 data storage device and data storage method

Similar Documents

Publication Publication Date Title
US11520697B2 (en) Method for managing a memory apparatus
US11687262B2 (en) Memory system and method of operating the same
CN101354715A (en) Systems, methods and computer program products for operating data processing systems
CN1658171A (en) Faster writes to non-volatile memory by controlling frequently accessed sectors
CN113900582B (en) Data processing method and corresponding data storage device
CN113961140B (en) Data processing method and corresponding data storage device
US10990536B2 (en) Memory controller, operating method of the memory controller, and storage device including the memory controller
CN111966281B (en) Data storage device and data processing method
CN112099985A (en) Data storage device and non-volatile memory control method
CN111338562A (en) Data storage device and data processing method
CN103136111B (en) Data writing method, memory controller and memory storage device
CN113885779B (en) Data processing method and corresponding data storage device
CN112130750A (en) Data storage device and non-volatile memory control method
CN1447243A (en) Algorithm and its control system which are fast and can prevent abnormal power failure in flash memory
CN1534509A (en) Flash memory algorithm with fast and improper operation prevention function and control system thereof
TW201935232A (en) Memory management method and storage controller using the same
TW202414221A (en) Data processing method and the associated data storage device
CN113835617B (en) Data processing method and corresponding data storage device
CN112099731B (en) Data storage device and data processing method
JP5910596B2 (en) Storage management system, storage management method, program, and information processing system
CN1228716C (en) Non-volatile memory access system and access method thereof
CN113377282B (en) Data storage device and data processing method
TW202414217A (en) Data processing method and the associated data storage device
EP4400977B1 (en) Storage device supporting multi-namespace and method of operating the same
CN111596859B (en) Data storage device and data processing method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication