TW531698B - Rapid and abnormal power shutdown prevention algorithm for flash memory - Google Patents

Rapid and abnormal power shutdown prevention algorithm for flash memory Download PDF

Info

Publication number
TW531698B
TW531698B TW90121573A TW90121573A TW531698B TW 531698 B TW531698 B TW 531698B TW 90121573 A TW90121573 A TW 90121573A TW 90121573 A TW90121573 A TW 90121573A TW 531698 B TW531698 B TW 531698B
Authority
TW
Taiwan
Prior art keywords
data
mapping table
block
memory
item
Prior art date
Application number
TW90121573A
Other languages
Chinese (zh)
Inventor
Jen-Nan Lai
Yau-Tze Jang
Guo-Hung Wang
Chuan-Sheng Lin
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 TW90121573A priority Critical patent/TW531698B/en
Application granted granted Critical
Publication of TW531698B publication Critical patent/TW531698B/en

Links

Landscapes

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

Abstract

A flash memory algorithm, especially a flash memory algorithm and its control system can rapidly set up table and prevent abnormal power shutdown from inducing data disorder, is provided. The main way is to store logic block address and connection relation mapping table of entity block address values corresponding to the logic block in a data entity block page of the memory. The address and table are protected by a set of ECC data. When the computer turns on normally, the control device directly loads the mapping table data into a register in the control device to control device access. The setup of its mapping table is instant and rapid. It is not necessary to rapidly construct the mapping table through scanning procedure. The turn-on time and operation procedure are saved. If the wrong mapping table is resulted from abnormal system operation, the mapping table will be back to the previous record to recover the system connection.

Description

五、發明說明(1) 發明說明: 具有im關於一種快閃記憶體演算*,尤指-種可 記憶體二防不正常斷電所衍生資料錯亂之快閃 、骽肩异法及其控制系統。 品興起的f Ϊf曰千里’受CPU速度愈來愈快及1 Α產 閃記憶。而在各種資料儲存裝置中,由於快 使用ϊ I寺 性及易於更改資料存取的特性而廣受V. Description of the invention (1) Description of the invention: It has im about a kind of flash memory calculation *, especially-a kind of flash memory, scapular method and its control system that are derived from erroneous data that can be prevented from abnormal power failure. . The rise of the product f Ϊf said thousands of miles ’is subject to faster and faster CPU speed and 1 Α flash memory. Among various data storage devices, it is widely used due to its fast use and easy access to data.

示音S . 5 圖所示’係為一般資料儲存系統之構i 卡了 M 一個資料儲存裝置(如Mart Media記憶 係葬Aem〇ry StlCk記憶卡等各種快閃記憶體)1卜19主要 制制裝置20而與-電腦主機29連接(當然,該, dm内建於電腦主機29之-子系統中),該控· Ide 匕有一微處理器25,其可藉由一符合PCMCIA、 之主她2、MMC、SD、C〇mPaCt FUsh或其組合式規格協戈 1機界面控制器24而與電腦主機29相互連#,而微處写 料#,#端則可經由一儲存控制邏輯電路2 6以連線於該,Symptom S. 5 shown in the picture is the structure of a general data storage system. I card M a data storage device (such as Mart Media memory system Aem〇ry StlCk memory cards and other flash memory) 1 19 main system The control device 20 is connected to the host computer 29 (of course, the dm is built into the subsystem of the host computer 29). The control unit has a microprocessor 25, which can be controlled by a host computer that complies with PCMCIA, She 2, MMC, SD, ComPaCt FUsh or its combined specification Xie Ge 1 machine interface controller 24 is interconnected with the host computer 29, and the micro-location writes material #, and the # end can be passed through a storage control logic circuit 2 6 to connect to that,

22 :二二Ϊ 1 1〜1 9 ;微處理器25亦可連接一暫存區控制器 μ 子區控制器2 2可控制電腦主機2 9欲存取資料暫名 資Λ儲存區21中(第一暫存器211、第二暫存器213及 暫子益219)。另外,一Ε(χ邏輯電路23則分別連線於德 處理器25、暫存器控制器22及儲存控制邏輯電路26,其受 控於微處理器25而對欲存取之資料磁區給予相對應之錯領22: 2 2 1 1 ~ 1 9; the microprocessor 25 can also be connected to a temporary storage area controller μ sub-area controller 2 2 can control the computer host 2 9 temporary storage information Λ storage area 21 for accessing data ( The first register 211, the second register 213, and the temporary benefit 219). In addition, an E (χ logic circuit 23 is connected to the German processor 25, the register controller 22, and the storage control logic circuit 26, respectively. It is controlled by the microprocessor 25 and gives the magnetic field of the data to be accessed. Corresponding wrong collar

531698 五、發明說明(2) 更正碼ECC資料。又,微處理器25可連接一搜索列 (Lookup Table) 255,該搜索列表2 55可用以記載邏 :二(L。〜Lm+1)和與其相對應之各資料儲存f置"之:塊 體區塊位址資料值(PBA)。 有n531698 V. Description of the invention (2) Correct code ECC data. In addition, the microprocessor 25 can be connected to a Lookup Table 255, and the search list 2 55 can be used to record the logic: two (L. ~ Lm + 1) and the corresponding data storage f settings ": Block Block Address Data Value (PBA). Have n

Lm、L 每一邏輯區塊位址内包含有一記錄 請參閱第1 B圖,搜尋列表25 5所使用之記債體 返機存取記憶體(RAM),主要係以字元(謝D)^取單如 立,而被分割成複數個字元位址(邏輯區塊位址)l 1 著相對影到記憶體實體區塊位址資料值m A、 /Μ···/Λ+ι、Bm、…)。快閃記憶體11主要係以3區“ Γ實:子「取f位而分被割成複數個實體區塊位址VB n二:貫體區塊位址Bfl〜Bn之實體區塊内 包含有複數個區塊分頁,而每一 0 Uatan)白 最小儲存里开TSfrr , 、 、 §於主機端的一個 錄區=::=(二I,;-分頁後又可加設有-記 分祁耵應刀貝之錯祆更正碼攔ECC ( ; ln.g ;ode) ^ ^ ^ t 1 2 3 1 、Lm+1)之邏輯區塊位址攔LBA,其中搜 := 欄與i己憶體11之LBA攔㈣為相對應關 ’、σ 5己憶體貧料實體區塊β〇内所儲存資料Data ^的邏輯Each logical block address contains a record. Please refer to Figure 1B, search list 25 5 used for the credit card return machine access memory (RAM), mainly in characters (thanks D) ^ The order is taken as it stands, and it is divided into a plurality of character addresses (logical block addresses). L 1 The data values m A, / Μ ·· / Λ + ι which are relative to the physical block address of the memory. , Bm, ...). The flash memory 11 is mainly divided into three areas: "Γ real: sub" and f is divided into a plurality of physical block addresses VB n two: the physical block addresses Bfl ~ Bn are included in the physical block There are multiple block pages, and each 0 Uatan) TSfrr is opened in the white minimum storage, and § is in a recording area on the host side = :: = (二 I,;-can be added after the paging-scores Qi (Correspond to the error of the knife shell) Correct the code block ECC (; ln.g; ode) ^ ^ ^ t 1 2 3 1, Lm + 1) logical block address block LBA, where: = column and i Jiyi The logic of the LBA of the body 11 is the corresponding relation, the logic of the data Data ^ stored in the body block β0 of the σ5 memory.

=G ί :L指Λ搜,255中之磁區L2、,所以丄其LBA 即使斷電後亦將儲存而不消失), =即登錄指向為B。(此資料在 失),如實線雙箭頭所示,依此類推,如第 531698 五、發明說明(3) 當系統開機時,搜索列表255的PBA攔係不存在,: 理器25將掃瞄快閃記憶體11〜19之各實體區塊位 ’微处 域輯位址資料值lba,並按照邏輯區塊位址把相對廉關仏 填入搜索列表255之實體區塊位址欄PBA中,藉此以"建〖立糸… 正之技索列表2 5 5。惟,此種掃瞒再建立搜索列矣一 方式,不僅不方便且浪費作業時間。 ” 又’由於快閃記憶體11之構造使然,其抹除或存 料時係以區塊B。為單位,因此當有實體區塊修正變更時貝 (如),必須把欲更改區塊4内原本已儲存之資料“七:先 轉存於一可用但尚未儲存有資料之一乾淨實體區塊(如a2B )中,並在此實體區塊Bm+i後之LBA攔中登錄邏輯位址 L1,之後並將欲更改區塊A内資料Data2抹除成為—乾 $ J記錄不使用。惟,若當乾淨區塊(如‘)已完成資 轉存及填入邏輯位址資料值程序,但欲更改區塊6在尚未 完成抹除動作時,發生如突然斷電或當機等不正^機 =丄而於重新開機且微處理器25再次進行掃瞄 體區塊邏輯位址資料程序時,將可能發生有兩= 麻丄及B㈣皆登錄邏輯區塊位址值為u並指向同一個 =哥列表255位址(如虛線雙箭頭所 卞 無;接之情況,如此不僅容易造成資料之錯 表連、纟σ,甚至形成資料之毀損。 建構;Γ =另一種更新賴之快閃記憶體映射表及其 :構方法,不僅於糸統開機時可直接且快速的建立映射 且又可預防各種突發或斷電等不正常操作狀況,以確= G ί: L refers to the magnetic field L2 in Λsou, 255, so its LBA will be stored without disappearing even after the power is off), that is, the login point is B. (This information is missing), as shown by the solid double arrow, and so on, as described in Section 531698 V. Invention Description (3) When the system is turned on, the PBA block of the search list 255 does not exist: The processor 25 will scan Each physical block of flash memory 11 ~ 19 has a value of micro-location address data lba, and the relatively cheap key is filled into the physical block address column PBA of the search list 255 according to the logical block address. In order to build a list of "Li Li ... Zheng Zhishen 2 5 5". However, it is not only inconvenient and wastes time to establish such a search method. "Also because of the structure of flash memory 11, its erasing or stocking is based on block B. As a unit, when there is a physical block modification and change (such as), the block 4 to be changed must be changed. The originally stored data "Seven: first transferred to a clean physical block (such as a2B) that is available but has not yet stored data, and the logical address is registered in the LBA block after this physical block Bm + i L1, and then erase the data Data2 in the block A to be changed-dry $ J records are not used. However, if a clean block (such as') has completed the asset transfer and filled in the logical address data value procedure, but wants to change the block 6 before the erasing action has been completed, an error such as a sudden power failure or a crash occurs. ^ Machine = 丄 When restarting and the microprocessor 25 scans the logical address data program of the block again, two things may happen: = 丄 and B㈣ both register the logical block address value u and point to the same One = 255 addresses of the brother list (as shown by the dashed double-headed arrow; if this is the case, then it is not only easy to cause data to be wrongly connected, 纟 σ, or even damage the data. Construction; Γ = Another update depends on flashing Memory mapping table and its construction method, which can not only establish the mapping directly and quickly when the system is powered on, but also prevent various unexpected operating conditions such as sudden or power failure.

531698 五、發明說明(4) 保資料連結 本發明欲行 於資訊產製 良之意念, 經無數次試 速且預防不 統。爰是’ 本發明 操作功效之 用一實體區 接從區塊分 理器利用掃 掃瞄,因此 節省作業時 本發明 操作功效之 體區塊分頁 操作下而造 本發明 操作功效之 料可藉由一 者0 本發明之又一目的 操作功效之快閃記憶體 之準確性,長久以來一直是使用者殷切盼望及 解決之困難點所在,而本發明人基於多年從事 品研究、開發、及銷售之實務經驗,乃思及改 窮其個人之專業知識,經多方設計、探討,並 A樣及改良後,終此創出本發明一種具有快 當操作功效之快閃記憶體演算法及其控制系、 之主要目的在於提供一種具有快速且預防不當 决閃冗憶體演算法及其控制系統,其主要係利 塊之分頁儲存映射表資料,而於系統開機時直 頁中轉載於一暫存器裡快速切換,而無需微處 目苗程式對各記憶體實體區塊進行邏輯位址資料 不僅可簡化微處理器之作業時間,且亦可大幅 間者。 之次要目的在於提供一種具有怏速且預防不當 决=δ己憶體演算法及其控制系統,其記憶體實 中I記载映射表資料,藉此可避免因為不正常 成資料不正常連結之遺憾者。 一目的在於提供一種具有快速且預防不當 决閃兄憶體演算法及其控制系統,其映射表資 組ECC資料之保護,以提高其資料之正確性 在於提供一種具有快速且預防不當 演算法及其控制系統,其可將所有531698 V. Description of the invention (4) Guarantee of data link The present invention intends to act on the good ideas of the information system. It has undergone countless trials and prevented inconsistencies.爰 Yes' The operation efficiency of the present invention uses a physical area to connect to the block processor and use scanning and scanning, so the operation efficiency of the present invention can be saved under the operation of the body block paging operation to save the operation efficiency of the present invention. One 0 The accuracy of the flash memory for another purpose of the present invention has long been a difficult point for users to eagerly hope and solve. The inventor has been engaged in product research, development, and sales for many years. The practical experience is to consider and improve his personal expertise. After various designs and discussions, and after A-like and improvement, he finally created a flash memory algorithm and control system of the present invention with fast operation effects. The main purpose is to provide a fast and prevent improper flash memory performance algorithm and its control system. It is mainly used to store the mapping table data in paging blocks, and it is reproduced in a temporary register when the system is turned on. Fast switching without the need for micro-programming programs to perform logical address data on each physical block of memory can not only simplify the operation time of the microprocessor, but also Significantly. The secondary purpose is to provide a fast and prevent improper decision-making algorithm and its control system. The memory records the mapping table data in the memory, thereby avoiding the abnormal connection of data due to abnormalities. Sorry. An object is to provide a fast and prevent improper flash memory performance algorithm and its control system. The mapping table is protected by ECC data to improve the accuracy of its data. It is to provide a fast and prevent improper performance algorithm and Its control system, which can

531698 五、發明說明(5) :記憶體區塊數量依照暫存器或區塊分頁記旦 割成複數個分段區,每一分段區皆有一相對應'之; 射表以建立資料映射關係,當有區塊資料變動時僅會影$ 到相關之映射表資料,因此可有效減少映射表之更&二曰 時間’並可有效降低資料錯誤連結狀況發生者。 業 本發明之又一目的在於提供一種具有快速且預防不& 撫作功效之快閃記憶體演算法及其控制系統,可將所二 實體區塊劃分為複數個分區,以使映射表的大小降低、 好一個磁區( 256 Words),以便此映射表亦可被當為二护 資料而存入快閃記憶體内,因此可大幅節省登錄區塊實又 位址貢料之記憶體容量,且可適用於連結 記恃俨 之儲存系統中。 门Z IS體 貴審查委員對本發明之結構、特徵及所 詳細說明如后: 权住之貝轭圖例及 =閱::A:,係本發明快閃記憶體儲存系 造不思圖)一快閃記憶體3卜39主要係藉由一控制冓 置40=一:腦主機49連接(當然,該控制裝㈣Λ内 建於=細主機49之-子系統中),該控 一微處理器45,其可藉由—符合pcmcu、ide、at内广括有 :C、SD、Compact Flash 或其組 而;=機49相互連接,而微處理器45 = 則可經由一儲存控制邏親雷 ^ ……處理器45亦可V接線於糊 J運接一暫存區控制器42,該暫存531698 V. Description of the invention (5): The number of memory blocks is divided into a plurality of segment areas according to the temporary register or the block paging record, and each segment area has a corresponding one; Relationship, when there is a change in block data, it will only affect $ to the related mapping table data, so it can effectively reduce the mapping table's "second time" and can effectively reduce the occurrence of data error link conditions. Another object of the present invention is to provide a flash memory algorithm and a control system with fast and preventive effects, which can divide the two physical blocks into a plurality of partitions, so that the mapping table The size is reduced and a magnetic area (256 Words) is saved, so that this mapping table can also be stored in flash memory as secondary protection data, so the memory capacity of the registration block and address data can be greatly saved. , And can be applied to the storage system of linked records. The detailed description of the structure, characteristics, and description of the present invention by the review committee of the gate is as follows: Legend of the right yoke and = read :: A :, the flash memory storage system of the present invention is not a map) The flash memory 3 and 39 are mainly controlled by a control device 40 = 1: the brain host 49 is connected (of course, the control device Λ is built in the = subsystem of the thin host 49), the microprocessor 45 , Which can be-in accordance with pcmcu, ide, at broad: C, SD, Compact Flash or a combination thereof; = machine 49 is connected to each other, and the microprocessor 45 = can be controlled by a storage logic logic ^ ...... The processor 45 can also be connected to the controller J to connect a temporary storage area controller 42.

ilM 第8頁 531698 五、發明說明(6) 】=二控二=欲:取資料暫時館存於-資 Μ、暫存号控制六電路43則分別連線於微處理器 處理器45:fJ欲控制邏輯電路46,其受控於微 ECC資料。區給Μ對應之錯誤更正碼 作為儲存記载各士己貝产體i #「由之部分暫存器419可被用以 PBA之映射二9 (:貝體區塊相關實體區塊位址資料值 ^T’4i9(mapping table)。 岸古己=^2圖,在本發明實施例令’其記載有相對 = 址資料值PBA之映射表419係登錄於控 二部,暫存器419中,為搭配暫存器419或實體‘ 鬼u0)之刀頁(1)叫6)記憶儲存容量256 bytes或512 bytes (亦就疋128或256字元數),映射表419之每一 元數w。1、...u内含代表—相對應之區塊b。、Βι、二 的位址^值,所以一個映射表419可對應128或小於256個 記憶體實體區塊(B。),因此記憶體實體區塊總個數將可被 適時分割成複數個分區族群(SegQ〜Segn )。每一被切分的 segement所含的區塊(Biock)數將被限制在256之内(或 128之内)’當然每一segement内皆有一專門記錄映射更新 (Mapping update)的特殊保留區塊(如2b之*號者或2C所 示) 每一分段區Segement皆有一相對應之映射更新(Mapping update)的特殊保留區塊(此映射區塊的初使建表值乃在 系統初始化時所建立)用以建立資料映射關係,當電腦主ilM Page 8 531698 V. Description of the invention (6)] = Two controls two = To: fetch data temporarily stored in-Zi M, temporary storage number control circuit 43 is connected to the microprocessor processor 45: fJ To control the logic circuit 46, it is controlled by micro-ECC data. The error correction code corresponding to the area M is used to store the records of each Shijibei body i # "The part of the temporary register 419 can be used for the mapping of the PBA 2 9 (: Shell body block related entity block address data The value ^ T'4i9 (mapping table). An ancient shore = ^ 2 map, in the embodiment of the present invention, 'it records the relative = address data value PBA mapping table 419 is registered in the second control unit, the temporary register 419 , For the register page 419 or the entity 'ghost u0) knife page (1) called 6) memory storage capacity of 256 bytes or 512 bytes (also 疋 128 or 256 characters), each digit w of the mapping table 419 .1, ... u contains the address of the corresponding-corresponding block b., Bι, two, so a mapping table 419 can correspond to 128 or less than 256 memory physical blocks (B.), Therefore, the total number of memory physical blocks can be timely divided into multiple partition families (SegQ ~ Segn). The number of blocks (Biock) contained in each segmented segment will be limited to 256 (or (Within 128) 'Of course, each segment has a special reserved block that specifically records the mapping update (as indicated by * in 2b or 2C). Each segmentation segment has a special reserved block corresponding to Mapping update (the initial value of this mapping block is created during system initialization) to establish the data mapping relationship.

第9頁 531698 五、發明說明(7) 一 存取槽案資料時’控制裝置4〇之微處理器45 m機49所傳入的LBA值除以分區内所含的實體心错 ^值,再除以區塊内含的磁區(sector)數以獲得所需结鬼 分段内的映射表’且將此分區映射表由映:: =Plng UPdate)的特殊保留區塊之最新更新: 存於映射暫存器419,藉此以方便李蛴杳屮 二中轉 之實體區塊位址…每一分:區 : = =appingupdate)特殊保留區塊以儲存最㊁ i = f映射關係,當有區塊映射資料變動時僅會更新Ϊ ^ 因=更新(Mapping update)特殊保留區塊之最新分 兮降2 t可有效減少整個映射表之更動作業時間,並可有 效降低貧料錯誤連結狀況發生者。 了有 之:射表419本身即為-個可儲存資料,所以 t K H新rpping update)特殊保留區塊之實體區 木"之W 中,而此部分分頁311為標記有特殊標記” 數個分區頁MT。、MTl、MT2、…..、MT ”JU二割為複 料有所閱第2°圖,當映射表419内之登錄資 — ate)特殊;留P二將之此貧料八儲—映射更新 料時,存於,+1中,,每增加新登錄資Page 9 531698 V. Description of the invention (7) When accessing the case data, the LBA value transmitted by the microprocessor 45 m of the control device 40 and the machine 49 is divided by the physical error value contained in the partition. Divide by the number of sectors contained in the block to obtain the mapping table in the desired ghost segment 'and map this partition mapping table to the latest update of the special reserved block :: = Plng UPdate): It is stored in the mapping register 419, so as to facilitate the transfer of the physical block address of Li Yier ... every minute: block: = = appingupdate) special reserved block to store the maximum i = f mapping relationship, when there are changes in the block mapping information is updated only Ϊ ^ due to update the latest points = Xi (mapping update) special reserved blocks of lower 2 t modifier can effectively reduce the operation time of the entire map, and can effectively reduce poverty material error link The situation happened. It is known that the shooting table 419 itself is a storable data, so t KH new rpping update) in the physical area of the special reserved block "W", and this part of the page 311 is marked with a special mark "several Partition pages MT., MT1, MT2, ....., MT "JU Ercut is a complex material. See Figure 2 °. When the registration information in the mapping table 419 — ate) is special; leaving P Er to make it poor. Eight storages—When the map is updated, it is stored in +1, and each time new registration data is added

Erase hl· ηύ.、射將往不分頁寫入,直到寫滿則重新 、射更新(Mapping update)特殊保留區塊再由分 、發明說明(8) 頁〇開始更新,以作 存器41 g之資料,^大電腦開機時可立即轉載於一暫 藉由電腦主機49掃r此發明無需如習用儲存系統一般需 資料重新建立搜尋=&塊之邏輯位址(如1Β圖令之L值) 動程序,亦可大巾s #二,因此不僅可省略電腦主機49之作 當然,由i;::構建搜尋列表時間。Erase hl · ηύ., Shots will be written to non-paged pages, until they are full, they will be renewed, and mapping update (Mapping update) special reserved blocks will be updated from the page, page 8 of the invention description (8), as a memory 41 g The data can be reprinted immediately when the large computer is turned on. This invention is temporarily scanned by the host computer 49. This invention does not require the data to be re-established as in the conventional storage system. Search for the logical address of the & ) It is also possible to use the big program s # 二, so not only can the computer host 49 make it of course, but also the time of constructing the search list by i; ::.

實體區塊之分頁中f、之重點在於映射表資料可儲存於一 轉载於映射表記憶體^ f便在系統開機時可直接且迅逮的 再者,請來間笛Q (或讀取)摔作:逮:係為本發明快閃記憶體在寫入 不’其主要步驟係包括有:η之動作-私圖,如圖所 步驟30 1 ’電腦主機 系統成待命狀態、; 制4置成開機或供€後,整個 步:3 02,等待主機下達寫入指令; 處m’電腦主機需要存取權案資料,控制裝置之微 指定專入的lba資料經過處理以得到所 =區映射表資料從一實體區塊之分頁中轉載於 ::304,微處理器藉由分區映射表資料找到電 人子取之檔案資料所對應之記憶體實體區塊,並將主 端欲寫入之資料轉存於Sect〇r Buffer(磁區暫存器)中機 步驟305,由舊區塊中已寫入的分頁比對此將寫入之位The focus of f and p in the physical block page is that the mapping table data can be stored in a mapping table memory ^ f will be directly and quickly captured when the system is turned on, please come to Q (or read ) Wrestling: Catch: The flash memory of the present invention is not being written. Its main steps include: η action-private picture, as shown in step 30 1 'The computer host system is in standby state; system 4 After setting it to boot or supply, the whole step: 3 02, waiting for the host to issue a write instruction; the computer host needs access to the case data, and the micro-designated lba data specified by the control device is processed to obtain the = The mapping table data is reproduced from the paging page of a physical block in :: 304. The microprocessor finds the memory physical block corresponding to the file data taken by the e-man through the partition mapping table data, and writes the master to write The data is transferred to the Sector Buffer (Sector Register) in step 305. The written page in the old block is compared with the bit that will be written to it.

址偵測出寫入指令是否 塊中且無須更新映鼾:'、、覆寫狀況,若無則直接寫到舊區 步驟305 ; 射關係而回至待命狀態;若是,則執行 步驟30 6,表示有一徐 寫,首先將新資料寫入汽―:品塊内之某一分頁資料將被覆 步驟307,將先前已系統保留之乾淨區塊中 搬入此乾淨區塊中;:存於舊區塊内而不被更改之資料 步驟308,抹除原舊 保留之乾淨記憶體實^^意内之所有資料以成為另一系統 淨區塊中; 品塊’成為一個下次將欲使用之乾 步驟3 0 9,更改與卜、+ 應之映射表中,以期逢^目關區塊邏輯位址資料值於相對 步驟31〇,將暫存考夕立兩者間之正確連結關係; 灯节;裔之映射砉資 (,P:ng update)特殊保留區塊、中之下一到、映射更新 次電腦開機時控制裝置 为頁,以作為下 最後,請參閱匕載映射表之資料。 表時之動作流程圖;如圖所示了 *月系統在要建構映射 步驟4 0 1 ,系統經由控The address detects whether the write instruction is in the block and does not need to update the mapping: ',, overwrite status, if not, write directly to the old area, step 305; the mapping relationship and return to the standby state; if so, go to step 30 6, It means there is a Xu write, first write the new data into the steam ——: a page of data in the product block will be covered by step 307, and the clean block previously reserved by the system will be moved into this clean block;: stored in the old block Step 308 of the data that has not been changed, erase all the data in the clean memory that was originally retained ^^ to become another system net block; the block 'becomes a dry step that will be used next time. 309, change the mapping table with Bu, + Ying, in order to hope that the logical address data value of the ^ Muguan block in relative step 31, will temporarily store the correct connection relationship between the two; Kao Festival; Mapping resources (, P: ng update) special reserved blocks, middle-to-lower one, and mapping update. The control device is a page when the computer is turned on, as the last, please refer to the information in the mapping table. The operation flow chart at the time of the table; as shown in the figure * The month system is constructing a mapping Step 4 0 1

入的分頁映射表位址;當缺' 处^換算已得到必須載 由:特殊標記而找到、映射=例中讓^ y ,從某一特別保留不被映射的F 分頁映射表; 散、对的&塊中讀取指定之 =,4。3,映射表中之咖是否錯誤 二人的刼作有經歷過不正常疋,則表不上- W ^ ^不§刼作之情形,需執;j 五、發明說明(10) 404 ;若否,則代表操作一切正 步驟404,代表不正常操=双則執行步驟4〇5 ; 映射表之應對關係,只要重新接/ I生,必須回朔上一個 update)特殊保留區塊中喝映射更新(Mapping 即可; 4 1 —映射分頁到記憶體中 步,405,繼續執行系統動作。 閃記憶體演算 常斷電所衍生 。故本發明實 功效者,應符 專利申請,祈 施例而已,並 明申請專利範 等變化與修 :土所述,當知本發明係有關於 f尤指一種可具有可快速建表且預防= 之快閃記憶體演算法 進步性,及可供產業:用 4h s. ja °月要件無疑,爰依法提出發明 鈞局早日賜准專利,至為感禱。 非用::ΐ 1斤ΐ者二僅為本發明之-較佳實 圍所二疋心明貫施之範圍。即凡依本發 偷,二之形狀、構造、特徵及精神所為之均 二應包括於本發明之申請專利範圍内。 圖號對照說明: 20 控制裝置 2 11第一暫存器 219第Ν暫存器 23 ECC邏輯電路 25 微處理器 29 電腦主機 11〜19快閃記憶體 21 資料暫存區 213第二暫存器 22暫存區控制器 24主機界面控制器 26儲存控制邏輯電路 531698 五、發明說明(π) 255 映 射 表 31 〜39 快 閃 記憶體 311 部 分 分 頁 40 控 制 裝 置 41 資料 暫 存 區 411 第 一 暫 存器 413 第二 暫 存 器 419 映 射 表 42 暫存 區 控 制器 43 ECC邏輯電路 44 主機界面控制器 45 微 處 理 器 46 儲存 控 制 邏輯電 49 電 腦 主 機The address of the paging mapping table that was entered; when the missing '^ conversion has been obtained, it must be found by: special mark, mapping = let ^ y in the example, from a particular F paging mapping table that is not mapped; The & block reads the specified =, 4, 3. If the coffee in the mapping table is wrong, the work of the two people has experienced abnormal behavior, then it is not on the table-W ^ ^ does not § Implementation; j V. Description of the invention (10) 404; if not, it means that all positive steps are performed 404, which means that abnormal operation = double then step 40 is performed; the coping relationship of the mapping table, as long as you reconnect / I must, Go back to the previous update) Mapping update in the special reserved block; 4 1 —Map paging to the memory step, 405, continue to perform system actions. Flash memory calculation is derived from power failure. Therefore, the present invention Those who are effective should comply with the patent application, pray for examples, and make clear the changes and amendments of the patent application: as mentioned, when the present invention is related to f, especially a type that can be quickly built and prevented = fast Flash memory algorithm is progressive and available for industry: use 4h s. Ja ° month Undoubtedly, it ’s a pity for Ji to propose an invention based on an early grant of a patent by law. Non-use :: 1 catty is only the scope of the present invention-a better practice. For anyone who steals according to this issue, the shape, structure, characteristics, and spirit of the two should be included in the scope of the patent application of the present invention. Drawing number comparison description: 20 control device 2 11 first register 219th N temporary storage Device 23 ECC logic circuit 25 microprocessor 29 host computer 11 ~ 19 flash memory 21 data temporary storage area 213 second temporary storage device 22 temporary storage area controller 24 host interface controller 26 storage control logic circuit 531698 5. Invention Explanation (π) 255 Mapping table 31 ~ 39 Flash memory 311 Partial paging 40 Control device 41 Data temporary storage area 411 First temporary storage device 413 Second temporary storage device 419 Mapping table 42 temporary storage area controller 43 ECC logic circuit 44 Host interface controller 45 Microprocessor 46 Storage control logic 49 Computer host

第14頁 531698 圖式簡單說明 第1 A圖:係一般快閃記憶體儲存系統之構造示意圖; 第1 B圖:係習用快閃記憶體之映射表構造示意圖; 第2 A圖:係本發明快閃記憶體儲存系統之構造示意圖; 第2 B圖:係本發明快閃記憶體之映射表構造示意圖; 第2 C圖:係本發明快閃記憶體實體區塊部分分頁之構造 不意圖, 第3圖:係本發明快閃記憶體在存取資料時之動作流程 圖;及 第4圖:係本發明建構映射表時之動作流程圖。Page 14 531698 Brief description of the diagram Figure 1 A: Schematic diagram of the general flash memory storage system; Figure 1 B: Schematic diagram of the mapping table of conventional flash memory; Figure 2 A: The present invention Schematic diagram of the structure of the flash memory storage system; Figure 2B: a schematic diagram of the mapping table structure of the flash memory of the present invention; Figure 2C: the structure of the partial page of the flash memory physical block of the present invention is not intended, FIG. 3 is a flowchart of operations of the flash memory of the present invention when accessing data; and FIG. 4 is a flowchart of operations of the present invention when constructing a mapping table.

Claims (1)

531698 六 、申請專利範圍 一種快閃記憶體之控制系 ~ 裝置分別連接於一電腦主機及至少—快係藉由一控制 中該控制裝置内設有複數個 ^ A记憶體,其 用以載入邏輯區塊位址和盥苴斟 邛分暫存器可 2 資料值之映射表資料,此映射表區塊位址 記憶體之部分實體區塊中。、、/可儲存於一快閃 3 如申請專利範圍第i項所述之 閃記憶體中之實體區塊數量為配二入暫存、」/、中該快 而可被分段成複數個分區族群。口之儲存容量 範圍第2項所述:控制系統…每一 。 廿T儲存於相對應之記憶體實體區塊分頁中 4 6 ’射如表申^專/^^第1項所述之控料統,其中該映 中之—者。子谷里係可選擇256 bytes及512 bytes之其 射如表申Λ專圍/4項,述之控制系統^ ^ 2 5 6之其令之、记憶體霄體區塊數量係可選擇1 2 8及 射表第1項所述之控制系統’其中該映 之記憶體區^字元數(W〇rd)係可登錄而映射一相對應 登釺盹#專範圍第1項所述之控制系統,其中該可 錄映射表之暫存器係可為-資料儲存裝置。 7 六、申請專利範圍 8 如申請專利範圍第1項所it少^ 存有映射表資料之記情、返之控制系統,其中該儲 。 。 ^ _只體區塊設有一特殊標記者 9 ·;,閃記憶體之演算法 體中儲存有一却备士 > 其主要係在一快閃記憶 ,相對應邏輯區塊=位址資料值和 時,藉由—控制裝置 =射表“斗,在系統開機 10 載於該控制裝置之一暫^=將此映射表資料直接轉 申請專利範圍第9項所述 驟: t次异法,尚包括有下列步 塊内所儲存資料時,首先會將此欲 有其它ίΠ :改資料轉載於-可用但尚未儲存 内之所有資料二貫體區塊中,之後並將欲更改區塊 接於暫存写二矛、,而此相關實體區塊位址資料將直 W〜f孖态之映射矣中 11 映射表資料儲存於記怜另?稍後將此更動後之 如申往直4丨^ 、忑匕體之另一貫體區塊中。 步驟了 粑圍第1〇項所述之演算法,尚包括有下列 當欲^改區塊内之資料已進行抹除後,若發生不 乍之情況發生而重新開機時,控制裝置將之前: 於記憶體實體區塊之映射表資料將轉載於暫存 12 請專利範圍第9項所述之演算法,尚包括有下列 第17頁 531698531698 6. Scope of patent application A flash memory control system ~ The device is connected to a computer host and at least-the fast system is controlled by a plurality of ^ A memory in the control device, which is used to load The logical block address and the sub-register can be mapped to 2 data values in the mapping table data. This mapping table block address memory is part of the physical block. 、 // Can be stored in a flash 3 The number of physical blocks in the flash memory as described in item i of the patent application scope is two for temporary storage, "/, and the flash can be segmented into multiple Zoning ethnic groups. The storage capacity of the port is described in item 2: control system ... each.廿 T is stored in the corresponding page of the physical block of memory. 4 6 ′ The data control system as described in Table 1 ^^ / ^^ item 1 is used, among which- Ziguli can choose between 256 bytes and 512 bytes, as shown in the table above, and the control system described above is ^ ^ 2 5 6 of the order, the number of memory blocks can be selected 1 2 8 and the control system described in item 1 of the table above, wherein the number of memory areas of the mapping ^ characters (W0rd) can be registered and mapped to a corresponding registration #specified in item 1 The control system, wherein the register of the recordable mapping table may be a data storage device. 7 VI. Scope of patent application 8 If it is less than item 1 of the scope of patent application ^ There is a memory and return control system for mapping table data, which is stored in it. . ^ _Only a block is provided with a special marker 9 ;; a flash memory is stored in the algorithm body > It is mainly in a flash memory, the corresponding logical block = address data value and At this time, by-control device = shooting table "bucket, when the system is turned on 10 is contained in one of the control devices temporarily ^ = this mapping table data is directly transferred to the patent application scope item 9 steps: t times of different methods, yet When including the data stored in the following step blocks, this will be the first to be changed: the data is reprinted in-all available data blocks that are not stored yet, and then the block to be changed is temporarily connected Save and write the two spears, and the relevant entity block address data will be stored in the mapping of the W ~ f state. The 11 mapping table data will be stored in the memory of the other? Later, this change will be applied as soon as possible 4 丨 ^ , In the other consistent block of the dagger body. The algorithm described in item 10 of the step has been included, and it also includes the following when the data in the block to be modified has been erased, When the situation occurs and the device is restarted, the control device will: The map data will be reproduced in the scope of patenting algorithms staging 12 of the first nine, also include the following on page 17 531 698 错由儲存有映 13 14 1516 是否 如申請 步驟: 記載有 係儲 分分 機時 中。 如申請 憶體中 被分段 如申請 區之實 如申請 中之一 憶體區 有不正 專利範 記憶體 存於記 頁之位 可立即 專利範 之實體 成複數 專利範 體區塊 專利範 個字元 塊0 射表資料之實體區塊之ECC資料來辨 常操作之狀況發生。 ° 圍第9項所述之演算法,尚包括有下列 各實體區塊相關連結位址之映射表資料 憶體之一實體區塊部分分頁中,而該邙 址,包括有一特殊標記以利於系統在開 搜尋該分頁映射表資料並轉載於暫存器 圍第9項所述之演算法,其中該快閃記 區塊數量為配合暫存器之儲存容量而可 個分段族群。 圍第1 3項所述之演算法,其中每一分段 I存在有一與之相對應之分區映射表。 圍第9項所述之演算法,其中該映射表 數(word)係可記錄而映射一相對應之記 1 7 ·如申請專利範圍第9項所述之演算法,其中一映射表 所能映射之記憶體實體區塊數量係可選擇丨28及256 ^ 其中之一者。 1 8 ·如申請專利範圍第9項所述之演算法,其中更動後之 映射表資料亦可直接儲存於一被固定之映射表資料實 體區塊分頁中。 'The reason for the storage is 13 14 1516 Whether it is the same as the application Steps: It is recorded when the extension is stored. If the application memory is segmented as in the application area, one of the applications in the application memory area has the patent patent memory stored on the page, and the entity of the patent patent can be turned into a plurality of patent patent blocks. Block 0 shoots the ECC data of the physical block of the table data to identify the normal operation. ° The algorithm described in item 9 also includes one of the physical block sections of the mapping table data memory of the following related block addresses of each physical block, and the address includes a special mark to facilitate the system Search the page mapping table data and reproduce it in the algorithm described in Item 9 of the register, where the number of flash memory blocks can be divided into groups for the storage capacity of the register. The algorithm described in item 13 above, wherein each segment I has a corresponding partition mapping table. The algorithm described in item 9 above, wherein the number of mapping tables (words) is recordable and maps a corresponding record 1 7 · As in the algorithm described in item 9 of the scope of patent application, one of the mapping tables can The number of mapped memory physical blocks is one of 28 and 256 ^. 18 · The algorithm described in item 9 of the scope of patent application, in which the modified mapping table data can also be directly stored in a fixed mapping table data physical block page. '
TW90121573A 2001-08-31 2001-08-31 Rapid and abnormal power shutdown prevention algorithm for flash memory TW531698B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW90121573A TW531698B (en) 2001-08-31 2001-08-31 Rapid and abnormal power shutdown prevention algorithm for flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW90121573A TW531698B (en) 2001-08-31 2001-08-31 Rapid and abnormal power shutdown prevention algorithm for flash memory

Publications (1)

Publication Number Publication Date
TW531698B true TW531698B (en) 2003-05-11

Family

ID=28787773

Family Applications (1)

Application Number Title Priority Date Filing Date
TW90121573A TW531698B (en) 2001-08-31 2001-08-31 Rapid and abnormal power shutdown prevention algorithm for flash memory

Country Status (1)

Country Link
TW (1) TW531698B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI467371B (en) * 2006-01-24 2015-01-01 Memory Technologies Llc Memory module and utilizing method thereof, computer program and computer readable medium
US11342008B2 (en) 2020-04-14 2022-05-24 Silicon Motion, Inc. Method and apparatus for accessing to data in response to power-supply event
CN115543865A (en) * 2022-11-25 2022-12-30 成都佰维存储科技有限公司 Power failure protection method and device, readable storage medium and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI467371B (en) * 2006-01-24 2015-01-01 Memory Technologies Llc Memory module and utilizing method thereof, computer program and computer readable medium
US11342008B2 (en) 2020-04-14 2022-05-24 Silicon Motion, Inc. Method and apparatus for accessing to data in response to power-supply event
US11664056B2 (en) 2020-04-14 2023-05-30 Silicon Motion, Inc. Method and apparatus for accessing to data in response to power-supply event
CN115543865A (en) * 2022-11-25 2022-12-30 成都佰维存储科技有限公司 Power failure protection method and device, readable storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
US11249840B2 (en) Data storage devices and methods for rebuilding a memory address mapping table
TWI692690B (en) Method for accessing flash memory module and associated flash memory controller and electronic device
TWI398770B (en) Data accessing method for flash memory and storage system and controller using the same
US11354236B2 (en) Garbage collection method for data storage device
JP4248510B2 (en) Computer system, disk device, and data update control method
US8055873B2 (en) Data writing method for flash memory, and controller and system using the same
TW201830253A (en) Storage device and method of operating storage device
US11928053B2 (en) System garbage collection method and method for garbage collection in solid state disk
US20100082878A1 (en) Memory controller, nonvolatile storage device, nonvolatile storage system, and data writing method
CN109522154B (en) Data recovery method and related equipment and system
JP2013061799A (en) Memory device, control method for memory device and controller
KR20180126118A (en) Data storage device and operating method thereof
EP3346387B1 (en) Storage system and system garbage collection method
JP2004139503A (en) Storage device and its control method
JP4745465B1 (en) Semiconductor memory device and method for controlling semiconductor memory device
US10235284B2 (en) Memory system
TWI668573B (en) Data storing method and data storing apparatus for reducing power consumption upon sudden power-off
TWI459198B (en) Memory storage device, memory controller thereof, and method for identifying valid data
JP2008009527A (en) Memory system
TW201917578A (en) Method for accessing flash memory module and associated flash memory controller and electronic device
TW201248404A (en) Program code loading and accessing method, memory controller and memory storage apparatus
US20180267715A1 (en) Memory system, memory control device, and method of controlling memory system
CN108804026A (en) A kind of solid state disk scan full hard disk method and solid state disk
TW202015057A (en) Flash memory controller, control method of flash memory controller and associated electronic device
TWI557559B (en) Method for writing into and reading from bad pages of a flash memory

Legal Events

Date Code Title Description
GD4A Issue of patent certificate for granted invention patent