TW201015561A - Flash memory controller having configuring unit of error correction code (ECC) capability and method thereof - Google Patents

Flash memory controller having configuring unit of error correction code (ECC) capability and method thereof Download PDF

Info

Publication number
TW201015561A
TW201015561A TW97139566A TW97139566A TW201015561A TW 201015561 A TW201015561 A TW 201015561A TW 97139566 A TW97139566 A TW 97139566A TW 97139566 A TW97139566 A TW 97139566A TW 201015561 A TW201015561 A TW 201015561A
Authority
TW
Taiwan
Prior art keywords
flash memory
ecc
error correction
correction code
value
Prior art date
Application number
TW97139566A
Other languages
Chinese (zh)
Other versions
TWI393146B (en
Inventor
Ju-Peng Chen
Original Assignee
Genesys Logic Inc
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 Genesys Logic Inc filed Critical Genesys Logic Inc
Priority to TW97139566A priority Critical patent/TWI393146B/en
Publication of TW201015561A publication Critical patent/TW201015561A/en
Application granted granted Critical
Publication of TWI393146B publication Critical patent/TWI393146B/en

Links

Abstract

A flash memory controller having a configuring unit of error correction code (ECC) capability and method thereof are described. The flash memory has a data area for storing the data content and a first spare area for storing a first ECC value corresponding to the data content. The ECC module utilizes the data content for generating a second ECC value and comparing the second ECC value with the first ECC value to determine whether the data content comprises a plurality of errors based on the compared result. The configuring unit computes the amount of the errors if the data content has the errors to determine whether the amount of the errors exceeds a predetermined threshold. If the amount of the errors exceeds the predetermined threshold, the configuring unit configures the data area of the flash memory via the control unit for assigning a portion of the data area to be a second spare area, and the storage capacity of the first spare area to allow the ECC module to correct the errors.

Description

201015561 九、發明說明: 【發明所屬之技術領域】 本發明係關於-種記憶體裝置及其方法,特破有關於一種具有錯誤 修正碼容量設定單元之㈣記憶贿㈣及其方法,雜雜閃記憶體的 使用狀態來設定。 【先前技術】 ⑩ 快閃記憶體(flash memory)係為一種非揮發性記憶體,即使移除供應電 源之後仍能保存資料。非及閘_ AND,删^型式的記憶體是一種快問 記憶體’具有肖密度躲’並且.其他種_記,隨。特獻ΝΑΝ]_ 間記憶體具有較大的儲存容量、較佳的記憶體存取速度以及低成本之特點。 > ^^#iE.^(error correction code, ECC)# 為nand快閃記憶體控制器的常用功能。具有多層式晶片(muitiievei ceu) 的NAND ‘决閃記憶體之成本較低,廣泛應用於固態碟機㈣id state drive, φ SSD)。然而多層式晶片的NAND快閃記憶趙亦有缺點,例如讀取对久性 endurance)*佳,而較差的讀取对久性的多層式晶片nand快閃記憶趙導致 固態碟機(SSD)的可靠度下降。有赛於此,讀有必要發展一種新式的快閃記 憶體’以解決上述問題。 【發明内容】 本發明之一目的在於提供一種具有錯誤修正碼(ECC)容量設定單元之 侧心It·制器及其方法,以依據快閃記憶體的使躲絲提升該快閃 記憶體控制器的錯誤修正瑪容量。 201015561 本侧另—目的在於提供-種具有錯縣正魏量設定單元之快閃記 憶體控制器及其方法,以改善該快閃記憶體的讀取/寫人耐久性㈣d endurance)以及可靠度。 為達成上述目的,本義提供-種具有修正碼容量設定單元之快 閃記憶趙控制器及其方法。該快閃記憶趙控制器包括控制單元、緩衝器、 錯誤修正碼(ECC)模組以及設定單元。控制單元用以產生一讀取命令,以讀 取該快閃纖_資_容’該,_記憶體具有雜區域·存該資料 β N容’並且具有第-備龍域,以儲存相對應於該資料内容的第—錯誤修 正碼(ECC)i。緩衝器用以儲存來自於該快閃記憶趙的資料區域之資料内 容。錯誤修正碼(ECC)模組利用該資料内容產生第二錯誤修正郷cc)值, 並且比較該第二錯誤修正碼(ECC)值與該第一錯誤修正碼保^^值然後依 據該比較躲來蚊該倾魄是林在複_碼(e_)。當該資料 内容存在該些個錯誤碼時,該設定單元計算該錯誤碼的數量,以決定該錯 誤碼的數量是否超出一預定臨界值。 ® 具體纽’當制誤碼的數量超㈣預辦界斜,槪定單元透過 該控制單元設定該快閃記憶體的資料區域,以分配一部分的資料區域作為 第二備用區域,其中該第一備用區域以及該第二備用區域的儲存容量相關 於該錯誤修正碼(ECC)容量,以使該錯誤修正碼(ECC)模組修正該資料内容 的錯誤碼。另一方面’當該些錯誤碼的數量小於該預定臨界值,該錯誤修 正碼(ECC)模組依據該第二錯誤修正碼(eCC)值與該第一錯誤修正碼戌cc) 值的比較結果來修JL該些錯誤碼。根據上述,當錯誤碼的數量超過一預定 201015561 • 臨界值時’該設定單元有效提高該快閃記憶體控制器的錯誤修正碼(eCC) 容量。 本發明之執行快閃記憶體控制器的控制方法包括下列步驟:產生一 讀取命令,以讀取該快閃記憶體的資料内容;(2)利用該資料内容產生一第 一錯誤修正碼(ECC)值;(3)比較該第二錯誤修正碼(ECC)值與該第一錯誤修 正碼(ECC)值,以依據該比較結果來決定該資料内容是否存在複數個錯誤 碼;(4)當該資料内容存在該些個錯誤碼時,利用設定單元計算該些錯誤碼 翁 一 的數量,以決定該錯誤碼的數量是否超出一預定臨界值;以及(5)該設定單 元6又疋該快閃s己憶體的資料區域,以分配一部分的資料區域作為一第二備 用區域’其中該第-備用區域以及該第二備用區域的儲存容量相關於該錯 誤修正碼(ECC)容量,以使該錯誤修正碼(ECC)模組修正該資料内容的錯誤 碼0 本發明使用一部分的儲存容量來執行高階的錯誤修正碼田cc)機制,以 改善非AM(NAND>刚記憶體的可靠度。該錯剩狂碼(Ε(χ)機制依據快 閃記憶體的使職態具有多段調整式修正#料之能力。可以利用額外 的錯誤修正碼(ECC)容量來提級航體驗用壽命。 為讓本發明之上勒容能更_錢,下文特舉較佳實施例,並配合 所附圖式’作詳細說明如下: 【實施方式】 參考第1 ® ’其♦示依據本發明實施例中快閃記憶體控㈣100之方 塊圖,係以設定單it 1〇〇來適應性設定錯誤修正郷cc)容量。該快間記憶 201015561 體控制器100包括控制單元102、緩衝器i〇4、錯誤修正碼(error correction code,ECC)模組106以及設定單元i〇8 該快閃記憶體控制器loo控制設定 單元108 ’以適應性調整快閃記憶體11〇的錯誤修正碼(ECC)容量。錯誤修 正碼(ECC)主要是用於提高快閃記憶體的資料整合性(dataintegrity),並且確 保資料存取的可靠性(reliability)。該快閃記憶體no例如是非及閘(hand) 型式的快閃記憶體。 該快閃記憶體控制器100耦接於該快閃記憶體110,該控制單元1〇2耦 義 接於該設定單元108,並且透過複數個控訊號耦接至該快閃記憶體11〇。該 控制單元102產生一寫入命令,用以寫入該資料内容至該快閃記憶體u〇, 並且寫入該第一錯誤修正碼(ECC)值至該第一備用區域(如第2圖所示)>該 錯誤修正碼(ECC)模組106以及設定單元108分別耦接至該控制單元1〇2, 該緩衝器104分別耦接至該錯誤修正碼(ECC)模組1〇6以及快閃記憶體11〇。 參考第1圖以及第2圖,第2圖係緣示依據本發明實施例中非及閘 (NAND)型式的快閃記憶體之結構示意圖,其中該快閃記憶體具有第一備用 區域以及第二備用區域。控制單元102用以產生一讀取命令,以讀取該快 閃記憶體110的資料内容,該快閃記憶體110具有資料區域,以儲存該資 料内容,並且具有第一備用區域,以儲存相對應於該資料内容的第一錯誤 修正碼(ECC)值。在一實施例中,該快閃記憶體ι10係以複數個頁面①呢從) 來儲存該資料内容。緩衝器104用以儲存來自於該快閃記憶體11〇的資料 區域之資料内容。錯誤修正碼(ECC)模組106利用該資料内容產生第二錯誤 修正碼(ECC)值’並且比較該第二錯誤修正碼(ECC)值與該第一錯誤修正竭 8 201015561 (ECC)值然後依據該比較結果來決定該資料内容是否存在複數個錯誤碼 (errors) $該資料内容存在該些個錯誤碼時該設定料⑽計算該錯誤 碼的數量以决疋該錯誤碼的數量是否超出一預定臨界值。 具體來說’當觸誤碼的數量超_預定臨界值時,職定單元⑽ 透過該控制單元1〇2設定該快閃記,隨11()的資料區域,以分配—部分的 資料區域作為第二備用區域,其中該第一備用區域以及該第二備用區域的 儲存合量相關於該錯誤修正,ECC)容量,以使該錯誤修正碼(Ε(χ)模組修 ® 正該貝獅容的錯誤碼。另―方面,當該些錯誤碼的數量小於該預定臨界 值’該錯誤修正碼(ECC)模、组1〇6依據該第二錯誤修正碼(ECC)值與該第一 錯誤修正瑪(ECC)值力比較結果來修正該些錯誤碼。根據上述,當錯誤瑪的 數量超過-敎臨界辦’該蚊料1G8有餓高(b_)該賴記憶體控 制器100的錯誤修正碼(ECC)容量。 該第-備㈣域更包括-計數區域,以齡一計數值,並且依據該計 數值來決定該設定單元1〇8是否設定該資料區域,鄉成該第二備用區域。 ⑩ tmt數值大於-預定計數值時,該設定單元1G8設定該綱記憶體ιι〇, 以分配-部分的資料賊作為麟二翻區域。觸定計練例如是該快 閃記憶體的抹存計數值(wear leveling counter),亦即抹存計數值係為該快閃 記憶體的使用狀態。 在一實施例中,該錯誤修正碼(ECC)容量係表示該快閃記憶體11〇的複 數個預定位元組(bytes)之可修正複數位元(bits)數量·»該第一備用區域與該第 二備用區域的儲存容量正比於該錯誤修正碼(ECC)容量。 201015561 • 繼續參考第1圖,該快閃記憶體110的控制訊號包括命令栓鎖致能訊 號(command latch enable signal,SCLE)、晶片致能訊號(chip enable signal, /SCE)、寫入致能訊號(write enable signal, /SWE)、位址致能訊號(address latch enable signal, SALE)、讀取致能訊號(read enable signal, /SRE)、輸入/輸出 (input/output signal,I/O)訊號以及預備/忙碌訊號(ready/busy signal,R/B) 〇 晶 片致能訊號(/SCE)表示當快閃記憶體110受到快閃記憶體控制器loo激發 時,該快閃記憶體110處於致能(active)狀態。例如當快閃記憶體11〇處於 ❹ 低準位時,該快閃記憶體110處於有效狀態。寫入致能訊號(/SWE)表示當 寫入致能訊號(/SWE)被激發時,例如是低準位時,將資料寫入至該快閃記 憶體110。 讀取致能訊號(/SRE)表示當讀取致能訊號(/SRE)被激發時,例如是低準 位時,讀取該快閃記憶體110内的資料。當該命令栓鎖致能訊號(SCle)被 激發時’該命令在寫入致能訊號(/SWE)的上升緣栓鎖。當該位址致能訊號 (SALE)被激發時,該位址在寫入致能訊號(/SWE)的上升緣栓鎖。輸入/輸出 ® (I/O)訊號表示傳輸於該快閃記憶體110與該資料暫存器之間的訊號。該預 備/忙碌訊號(R/B)表示該狀態模組報告給該快閃記憶體控制裝置100的狀態 訊號。 在一實施例中,快閃記憶體控器100提供給快閃記憶體11〇的寫入致 能訊號(/SWE) ’將選定的頁面(page)之位元組資料寫入至快閃記憶艘ι1〇, 且錯誤修正碼(ECC)模組106亦接收該位元組資料並產生相對應於該頁面的 錯誤修正碼(ECC)值。當該頁面中全部的位元組資料寫入至快閃記憶體no 201015561 ’ 之後’快閃記憶體控器100將該頁面的錯誤修正碼(ECC)值寫入至該頁面的 備用區域。接著當錯誤修正碼(ECC)值寫入完畢之後,傳送一寫入確定命令 至該快閃記憶體110 ’並且藉由將晶片致能訊號(/SCE)設為高準位,以使該 快閃記憶體110禁能(disable)。 參考第1-3圖’第3圖係依據本發明實施例中執行快閃記憶鱧控制器 1〇〇的控制方法之流程圖,以適應性(adaptively)設定錯誤修正碼(ECC)容 量。該快閃記憶體控制器100包括控制單元102、緩衝器104、錯誤修正碼 ® (enw ewrection code, ECC)模組106以及設定單元108,該方法包括下列步 驟: 在步驟S300中,控制單元102產生寫入命令,用以寫入該資料内容至 該快閃記憶體110。 在步驟S302中,該控制單元1〇2寫入該第一錯誤修正碼(ECC)值至該 第一備用區域。 在步驟S304中,該控制單元1〇2產生讀取命令,以讀取該快閃記憶體 ® 110的資料内容。 在步驟S306中’錯誤修正碼模組1〇6利用該資料内容產生第二 錯誤修正碼(ECC)值。 在步驟S308中,該錯誤修正瑪识叫模組1〇6峨該帛二錯誤修正碼 (ECC)值胃修正郷⑹值’赚據賊機絲蚊該資料内 谷是否存在複雜錯辦。當未包括錯誤碼,返回步驟S3Q4,侧執行步 驟 S310。 201015561 . 在步驟S310中,當該資料内容存在該些個錯誤碼時,利用設定單元ι〇8 計算該些錯誤碼的數量,以決定該錯誤碼的數量是否超出一預定臨界值。 當超出該預定臨界值,執行步驟S312a,而當未超出該預定臨界值,執行步 驟 S314。 在步驟S312a中’該設定單元1〇8設定該快閃記憶體的資料區域, 以分配一部分的資料區域作為一第二備用區域,其中該第一備用區域以及 該第二備用區域的儲存容量相關於該錯誤修正碼(ECC)容量,以使該錯誤修 ® 正碼(ECC)模組106修正該資料内容的錯誤碼。接著執行步驟S318。 在步驟S312b中,儲存一計數值於該第一備用區域,以依據該計數值 來決定該設定單元108是否設定該資料區域,以形成該第二備用區域。接 著在步驟S316中,當該計數值大於一預定計數值時,該設定單元1〇8設定 該快閃記憶體110,以分配一部分的資料區域作為該第二備用區域。 在步驟S314中,該錯誤修正碼(ECC)模組106依據該第一備用區域的 第一錯誤修正碼(ECC)值以及該第二錯誤修正碼(ecc)值,以修正該錯誤碼。 鲁 在步驟S318中,該錯誤修正碼(ECC)模組106依據該第一備用區域以 及該第二備用區域的第一錯誤修正碼(ECC)值以及該第二錯誤修正碼择cc) 值,以修正該錯誤碼。 綜上所述,本發明使用一部分的儲存容量來執行高階的錯誤修正碼 (ECC)機制,以改善非及閘(Nam))快閃記憶體的可靠度。該錯誤修正碼 (ECC)機制依據快閃記憶體的使用狀態具有多段調整式修正資料之能力。因 此可以利用額外的錯誤修正碼(ECC)容量來提高快閃記體的使用壽命。 12 201015561 ' 雖然本發明已用較佳實施例揭露如上,然其並非用以限定本發明,本 發明所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍内, 當可作各種之更動與潤飾’因此本發明之保護範圍當視後附之申請專利範 圍所界定者為準。 【圖式簡單說明】 第1圖係依據本發明實施例中快閃記憶體控制器之方塊圖,係以設定 單元來適應性設定錯誤修正碼(ECC)容量。 第2圖係依據本發明實施例中非及閘型式的快閃記憶體之結構 示意圖,其中該快閃記憶體具有第一備用區域以及第二備用區域。 第3圖係依據本發明實施例中執行快閃記憶體控制器之流程圖,以適 應性(adaptively)設定錯誤修正碼(ECC)容量。 【主要元件符號說明】 1〇〇快閃記憶體控制器 102控制單元 104緩衝器 106 ECC模組 108設定單元 11〇快閃記憶體 13201015561 IX. Description of the Invention: [Technical Field] The present invention relates to a memory device and a method thereof, and particularly relates to a memory bribe (four) having a fault correction code capacity setting unit and a method thereof, and a method Set the usage status of the memory. [Prior Art] 10 Flash memory is a non-volatile memory that retains data even after the power supply is removed. Non-gate _ AND, delete type memory is a quick question memory 'has a density of hiding' and other kinds of _ note, with. Special offer] _ memory has the characteristics of large storage capacity, better memory access speed and low cost. >^^#iE.^(error correction code, ECC)# is a common function of the nand flash memory controller. NAND ‘flash memory with multi-layer wafers (muitiievei ceu) is less expensive and is widely used in solid state drives (IV) id state drives (φ SSD). However, multi-layer wafer NAND flash memory Zhao also has shortcomings, such as reading for long-term endurance*, while poorer read-to-length multi-layer wafer nand flash memory Zhao leads to solid state disk drive (SSD) Reliability is declining. In this case, it is necessary to develop a new type of flash memory to solve the above problems. SUMMARY OF THE INVENTION An object of the present invention is to provide a center-of-the-body controller with an error correction code (ECC) capacity setting unit and a method thereof for improving the flash memory control according to the flash memory The error correction of the device is the capacity of the device. 201015561 This side is another - the purpose is to provide a flash memory controller with a wrong count positive unit and its method to improve the read/write durability (d) of the flash memory and reliability . In order to achieve the above object, the present invention provides a flash memory controller having a correction code capacity setting unit and a method thereof. The flash memory controller includes a control unit, a buffer, an error correction code (ECC) module, and a setting unit. The control unit is configured to generate a read command to read the flash fiber, and the memory has a heterogeneous region, stores the data, and has a first-prepared domain to store the corresponding data. The first error correction code (ECC) i of the data content. The buffer is used to store the data content from the data area of the flash memory. The error correction code (ECC) module generates a second error correction 郷cc) value by using the data content, and compares the second error correction code (ECC) value with the first error correction code and then hides according to the comparison The mosquito is the forest in the complex _ code (e_). When the data content has the error codes, the setting unit calculates the number of the error codes to determine whether the number of the error codes exceeds a predetermined threshold. ® specific button 'the number of error codes exceeds (4) pre-emption skew, the setting unit sets the data area of the flash memory through the control unit to allocate a part of the data area as the second spare area, wherein the first The spare area and the storage capacity of the second spare area are related to the error correction code (ECC) capacity such that the error correction code (ECC) module corrects the error code of the data content. On the other hand, when the number of the error codes is less than the predetermined threshold, the error correction code (ECC) module compares the second error correction code (eCC) value with the first error correction code 戌cc) value. The result is to fix the error codes of JL. According to the above, when the number of error codes exceeds a predetermined 201015561 • threshold value, the setting unit effectively increases the error correction code (eCC) capacity of the flash memory controller. The control method for executing the flash memory controller of the present invention comprises the steps of: generating a read command to read the data content of the flash memory; and (2) generating a first error correction code by using the data content ( (3) comparing the second error correction code (ECC) value with the first error correction code (ECC) value to determine whether the data content has a plurality of error codes according to the comparison result; (4) When the data content has the error codes, the setting unit calculates the number of the error codes to determine whether the number of the error codes exceeds a predetermined threshold; and (5) the setting unit 6 Flashing the data area of the memory to allocate a part of the data area as a second spare area, wherein the storage capacity of the first spare area and the second spare area is related to the error correction code (ECC) capacity, The error correction code (ECC) module corrects the error code of the data content. The present invention uses a portion of the storage capacity to perform a high-order error correction code field cc) mechanism to improve non-AM (NAND> just memory The erroneous mad code (Ε(χ) mechanism has the ability to adjust multiple corrections according to the flash memory's status. The additional error correction code (ECC) capacity can be used to upgrade the life experience. In order to make the present invention more versatile, the preferred embodiments are described below, and are described in detail with reference to the following drawings: [Embodiment] Referring to the first 1 '' In the example, the block diagram of the flash memory controller (four) 100 is adapted to set the error correction 郷 cc) capacity. The fast memory 201015561 body controller 100 includes the control unit 102 and the buffer i〇4. The error correction code (ECC) module 106 and the setting unit i 〇 8 the flash memory controller loo control setting unit 108 ′ to adaptively adjust the error correction code (ECC) of the flash memory 11 〇 Capacity. The error correction code (ECC) is mainly used to improve the data integrity of the flash memory and ensure the reliability of the data access. The flash memory no is, for example, a hand. Type of flash memory. The flash memory controller 100 is coupled to the flash memory 110. The control unit 1 is coupled to the setting unit 108 and coupled to the flash memory 11 through a plurality of control signals. The control unit 102 generates a write command for writing the data content to the flash memory, and writing the first error correction code (ECC) value to the first spare area (as shown in FIG. 2) The error correction code (ECC) module 106 and the setting unit 108 are respectively coupled to the control unit 1〇2, and the buffer 104 is coupled to the error correction code (ECC) module 1〇6, respectively. Flash memory 11〇. Referring to FIG. 1 and FIG. 2, FIG. 2 is a schematic structural view of a non-NAND (NAND) type flash memory according to an embodiment of the present invention, wherein the flash memory has a first spare area and a first Two spare areas. The control unit 102 is configured to generate a read command to read the data content of the flash memory 110. The flash memory 110 has a data area to store the data content, and has a first spare area to store the phase. A first error correction code (ECC) value corresponding to the content of the material. In one embodiment, the flash memory ι 10 stores the data content from a plurality of pages 1 . The buffer 104 is used to store the data content from the data area of the flash memory 11A. An error correction code (ECC) module 106 generates a second error correction code (ECC) value using the data content and compares the second error correction code (ECC) value with the first error correction 8 201015561 (ECC) value and then Determining whether there is a plurality of error codes (errors) according to the comparison result. When the data content has the error codes, the setting material (10) calculates the number of the error codes to determine whether the number of the error codes exceeds one. The threshold is predetermined. Specifically, when the number of tactile errors exceeds a predetermined threshold, the job unit (10) sets the flash record through the control unit 1〇2, and the data area of the 11() is used as the data area of the distribution-part. a second spare area, wherein the storage amount of the first spare area and the second spare area is related to the error correction, ECC) capacity, so that the error correction code (Ε(χ)Module® is the The error code. In another aspect, when the number of the error codes is less than the predetermined threshold value, the error correction code (ECC) mode, the group 1〇6 is based on the second error correction code (ECC) value and the first error. Correct the horse (ECC) value comparison result to correct the error codes. According to the above, when the number of error horses exceeds -敎 threshold, the mosquito material 1G8 has a high hung (b_) error correction of the memory controller 100 The code (ECC) capacity further includes a -counting area, a count value of the age, and determining, according to the count value, whether the setting unit 1〇8 sets the data area, and the second spare area When the tmt value is greater than - the predetermined count value, the setting unit 1G8 The memory of the program is ιι〇, and the data thief of the distribution-part is used as the lining area. For example, the wear leveling counter of the flash memory, that is, the erase count value is The use state of the flash memory. In an embodiment, the error correction code (ECC) capacity is an executable multi-bit of a plurality of predetermined bytes of the flash memory 11 ( ( The number of bits » the storage capacity of the first spare area and the second spare area is proportional to the error correction code (ECC) capacity. 201015561 • Continuing to refer to FIG. 1 , the control signal of the flash memory 110 includes a command pin Command latch enable signal (SCLE), chip enable signal (SCE), write enable signal (SWE), address enable signal (address latch enable signal) , SALE), read enable signal (SRE), input/output (I/O) signal, and ready/busy signal (R/B) The power signal (/SCE) indicates that the flash memory 110 is flashed When the memory controller loo is excited, the flash memory 110 is in an active state. For example, when the flash memory 11 is at a low level, the flash memory 110 is in an active state. The energy signal (/SWE) indicates that data is written to the flash memory 110 when the write enable signal (/SWE) is activated, for example, at a low level. The read enable signal (/SRE) indicates that the data in the flash memory 110 is read when the read enable signal (/SRE) is activated, for example, at a low level. When the command latch enable signal (SCle) is activated, the command is latched at the rising edge of the write enable signal (/SWE). When the address enable signal (SALE) is activated, the address is latched at the rising edge of the write enable signal (/SWE). The Input/Output ® (I/O) signal indicates the signal transmitted between the flash memory 110 and the data buffer. The ready/busy signal (R/B) indicates the status signal that the status module reports to the flash memory control device 100. In one embodiment, the flash memory controller 100 provides a write enable signal (/SWE) to the flash memory 11' to write the byte data of the selected page to the flash memory. The ship ι1〇, and the error correction code (ECC) module 106 also receives the byte data and generates an error correction code (ECC) value corresponding to the page. When all the byte data in the page is written to the flash memory no 201015561', the flash memory controller 100 writes the error correction code (ECC) value of the page to the spare area of the page. Then, after the error correction code (ECC) value is written, a write determination command is sent to the flash memory 110' and the wafer enable signal (/SCE) is set to a high level to make the fast The flash memory 110 is disabled. Referring to Figures 1-3, FIG. 3 is a flow chart showing a method of controlling a flash memory controller 1 in accordance with an embodiment of the present invention to adaptively set an error correction code (ECC) capacity. The flash memory controller 100 includes a control unit 102, a buffer 104, an error correction code (ECC) module 106, and a setting unit 108. The method includes the following steps: In step S300, the control unit 102 A write command is generated for writing the data content to the flash memory 110. In step S302, the control unit 102 writes the first error correction code (ECC) value to the first spare area. In step S304, the control unit 102 generates a read command to read the data content of the flash memory ® 110. In step S306, the error correction code module 1〇6 uses the material content to generate a second error correction code (ECC) value. In step S308, the error correction module 〇 峨 峨 峨 错误 错误 错误 错误 错误 错误 EC 胃 胃 胃 胃 胃 胃 胃 胃 胃 胃 胃 胃 胃 胃 胃 胃 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 When the error code is not included, the process returns to step S3Q4, and the side proceeds to step S310. In step S310, when the error codes exist in the data content, the number of the error codes is calculated by the setting unit ι 8 to determine whether the number of the error codes exceeds a predetermined threshold. When the predetermined threshold is exceeded, step S312a is performed, and when the predetermined threshold is not exceeded, step S314 is performed. In step S312a, the setting unit 1〇8 sets the data area of the flash memory to allocate a part of the data area as a second spare area, wherein the storage capacity of the first spare area and the second spare area are related. The error correction code (ECC) capacity is such that the error correction code (ECC) module 106 corrects the error code of the data content. Then step S318 is performed. In step S312b, a count value is stored in the first spare area to determine whether the setting unit 108 sets the data area according to the count value to form the second spare area. Next, in step S316, when the count value is greater than a predetermined count value, the setting unit 〇8 sets the flash memory 110 to allocate a portion of the data area as the second spare area. In step S314, the error correction code (ECC) module 106 corrects the error code according to the first error correction code (ECC) value of the first spare area and the second error correction code (ecc) value. In step S318, the error correction code (ECC) module 106 selects the cc) value according to the first error correction code (ECC) value of the first spare area and the second spare area, and the second error correction code. To correct the error code. In summary, the present invention uses a portion of the storage capacity to perform a high order error correction code (ECC) mechanism to improve the reliability of the non-lamatom (Nam) flash memory. The error correction code (ECC) mechanism has the ability to modify data in multiple stages depending on the state of use of the flash memory. Therefore, additional error correction code (ECC) capacity can be utilized to increase the life of the flash recorder. The present invention has been described above with reference to the preferred embodiments thereof, and is not intended to limit the invention, and the invention may be practiced without departing from the spirit and scope of the invention. The scope of protection of the present invention is therefore defined by the scope of the appended claims. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram of a flash memory controller in accordance with an embodiment of the present invention, which is adapted to set an error correction code (ECC) capacity by a setting unit. Fig. 2 is a schematic view showing the structure of a flash memory of a non-gate type according to an embodiment of the present invention, wherein the flash memory has a first spare area and a second spare area. Figure 3 is a flowchart of the execution of a flash memory controller in accordance with an embodiment of the present invention to adaptively set the error correction code (ECC) capacity. [Main component symbol description] 1〇〇 Flash memory controller 102 Control unit 104 buffer 106 ECC module 108 setting unit 11〇 Flash memory 13

Claims (1)

201015561 十、申請專利範圍: 一種快閃記憶體㈣ϋ,肋適應性設定快閃記歷的錯誤修正碼 (ECC)容# ’該快閃記紐控制器包括: 控制單70,用以產生一讀取命令,以讀取該快閃記憶體的資料内容, 其中該快晚憶體具有-資料區域,_存該龍内容,並且具有一第一 備用區域,⑽存姉應機資料内容H錯雖正碼(ECC)值; -緩衝器’用以儲存來自於該快閃記憶體的資料區域之該資料内容; -錯誤修it碼(ECC)模組,分_概該控解元以及該緩衝器利用 該資料内★產生-第二錯誤修正碼(ECC)值,並且比較該第二錯誤修正碼 (ECC)值無帛—錯雖正郷⑽值’錄雜崎結縣蚁該資料内 容是否存在複數個錯誤碼;以及 一設定單元,分別耦接於該錯誤修正碼(ECC)模組以及該控制單元,當 該資料内;^存在該些個錯誤時,該設^單元計算該些錯誤碼的數量,以 決定該錯誤碼的數量是否超出一預定臨界值; 其中當該錯誤碼雜量超_狀畔值時,該蚊單元透過該控制 單元設定該快閃記憶_該資料區域,以分配—部分的該f料區域作為一 第二備用區域,其中該第—備用區域以及該第二備用區域的儲存容量相關 於該錯誤修正碼(;ECQ容# ’喊觸絲正娜⑹模峰正該資料内容 的該錯誤碼》 2.如申請專利範圍第1項所述之快閃記憶體控制器,其中該第一備用 區域更包括-計數區域’以儲存一計數值,並且依據該計數值來決定該設 201015561 , • 定單元是否設定該資料區域,以形成該第二偫用區域。 3. 如申請專利範圍第2項所述之快閃記憶體控制器,其中當該計數值 大於一預定計數值時,該設定單元設定該快閃記憶體,以分配一部分的該 資料區域作為該第二備用區域。 4. 如申請專利範圍第3所述之快閃記憶體控制器,其中該預定計數值 係為該快閃記憶體的抹存計數值(wegr leveling c〇unter)。 5·如申請專利範圍第1項所述之快閃記憶體控制器,其中當該些錯誤 ❹碼的數量小於該預定臨界值,該錯誤修正碼(ECC)模組依據該第二錯誤修正 碼(ECC)值與該第一錯誤修正碼(ECC)值的比較結果來修正該些錯誤碼。 6. 如申請專利範圍第1項所述之快閃記憶體控制器,其中該控制單元 更包括產生一寫入命令,用以寫入該資料内容至該快閃記憶體,並且寫入 該第一錯誤修正碼(ECC)值至該第一備用區域。 7. 如申請專利範圍第1項所述之快閃記憶體控制器,其中該錯誤修正 碼(ECC)容量係表示該快閃記憶體的複數個預定位元組(bytes)之可修正複數 ® 位元(bits)數量。 8. 如申請專利範圍第7項所述之快閃記憶體控制器,其中該第一備用 區域與該第二備用區域的儲存容量正比於該錯誤修正碼(gCC)容量。 9·如申請專利範圍第1項所述之快閃記憶體控制器,其中該快閃記憶 體係為非及閘(NAND)型式。 1〇. 一種設定快閃記憶體的錯誤修正碼(ECC)容量之方法,其中該快閃 記憶體具有-資料區域,靖存該資料内容,並且具有—第—備用區域, 15 201015561 '以儲存相對應於該資料内容的一第一錯誤修正碼(ECC)值,且該第-備用區 域更包括數區域,該方法包括下列步驟: 產生-讀取命令’以讀取該賴記憶體的資料内容; 利用該資_容產生—第二錯誤修正碼(Ecc)值; 比較該第—錯誤修正碼(ECC)值與該帛—錯誤修正碼㈣^值以依據 該比較結絲蚊騎_容是贿在個錯誤碼; 當〇資料内谷存在該些個錯誤碼時,利用設定單元計算該些錯誤碼的 ©數量,以決定該錯誤碼的數量是否超出一預定臨界值;以及 § 疋單元叹疋該快閃記憶體的該資料區域,以分配—部分的該資料 區域作為f一備用區域,其中該第一備用區域以及該第二備用區域的儲 存今量相關於該錯誤修正碼(ECC)容量,以使該錯誤修正瑪氏cc)模組修正 該資料内容的該錯誤碼。 n.如申請專利範M 1G項所述之方法,其中在比較該第二錯誤修正 碼(ECC)值與辦—觸狂碼(ECC)__讀更包括:儲存一計數 值,並且依據該計數值來決定該設定單元是否設定該資料區域以形成該 第'一備用區域。 I2.如申請專利範圍第u項所述之方法其中在儲存一計數值的步驟 之後更包括.當該計數值大於一預定計數值時,該設定單元設定該快閃 記憶體,以分配-部分的該資料區域作為該第二備用區域。 a如申請專利範圍第12項所述之方法,其中該預定計數值係為該快 閃5己憶體的抹存計數值⑼咖。 16 201015561 、 · 、 14.如申請專利範圍第ι〇項所述之方法,其中在利用設定單元計算該 些錯誤碼的數量的步驟之後,更包括:當該些錯誤碼的數量小於該預定臨 界值,依據該第二錯誤修正碼(ECC)值與該第一錯誤修正碼(ECC)值的比較 結果來修正該些錯誤碼。 15.如申請專利範圍第1〇項所述之方法,其中在產生該讀取命令以 讀取該快閃記憶體的資料内容的步驟之前,更包括:產生一寫入命令,用 以寫入該資料内容至該快閃記憶體。 _ 16·如申請專利範圍帛15項所述之方法’其中在產生該寫入命的步驟 之後,更包括:寫入該第一錯誤修正碼(ECC)值至該第一備用區域。 17.如申請專利範圍帛10項所述之方法,其中該錯誤修正碼(Ecc)容量 係表示該快閃記憶體的複數個預定位元組(b㈣之可修正複數位元_數 量0 ❹ 17201015561 X. Patent application scope: A flash memory (4) ϋ, rib adaptability setting error correction code (ECC) capacity # ' The flash controller controller includes: a control unit 70 for generating a read command In order to read the data content of the flash memory, wherein the fast memory has a data area, _ the content of the dragon, and has a first spare area, (10) the information content of the file is wrong, although the code is correct (ECC) value; - the buffer ' is used to store the data content from the data area of the flash memory; - the error repair code (ECC) module, the _ the control element and the buffer utilization In the data, the second error correction code (ECC) value is generated, and the second error correction code (ECC) value is compared. If the error is correct (10) value, the data content of the data is recorded. And an error unit; and a setting unit respectively coupled to the error correction code (ECC) module and the control unit, when the data exists; and the setting unit calculates the error codes Quantity to determine if the number of error codes exceeds a pre- a threshold value; wherein when the error code amount exceeds a value, the mosquito unit sets the flash memory_the data area through the control unit to allocate the part of the material area as a second spare area. The storage capacity of the first spare area and the second spare area is related to the error correction code (; ECQ capacity # 'Calling the error code of the data content of the data content of the data element. The flash memory controller of claim 1, wherein the first spare area further includes a -counting area to store a count value, and determining the setting according to the count value, whether the setting unit sets the data area. 3. The flash memory controller of claim 2, wherein the setting unit sets the flash memory when the count value is greater than a predetermined count value The flash memory controller of claim 3, wherein the predetermined count value is the flash memory. The flash memory controller of claim 1, wherein the error correction code is used when the number of the error weights is less than the predetermined threshold value. The (ECC) module corrects the error codes according to the comparison result of the second error correction code (ECC) value and the first error correction code (ECC) value. 6. As described in claim 1 a flash memory controller, wherein the control unit further comprises: generating a write command for writing the data content to the flash memory, and writing the first error correction code (ECC) value to the first spare 7. The flash memory controller of claim 1, wherein the error correction code (ECC) capacity is a correction of a plurality of predetermined bytes of the flash memory. Complex number of bits. 8. The flash memory controller of claim 7, wherein the storage capacity of the first spare area and the second spare area is proportional to the error correction code (gCC) capacity. 9. The flash memory controller of claim 1, wherein the flash memory system is a non-NAND gate (NAND) type. A method for setting an error correction code (ECC) capacity of a flash memory, wherein the flash memory has a data area, the content of the data is stored, and has a -first spare area, 15 201015561 'to store Corresponding to a first error correction code (ECC) value of the data content, and the first spare area further includes a plurality of regions, the method comprising the steps of: generating a read command to read the data of the memory Using the resource to generate a second error correction code (Ecc) value; comparing the first error correction code (ECC) value with the 帛-error correction code (four) value to determine the silkworm mosquito _ _ Is the bribe in an error code; when there are some error codes in the data valley, the setting unit is used to calculate the number of the number of the error codes to determine whether the number of the error codes exceeds a predetermined threshold; and § 疋 unit Singing the data area of the flash memory, the data area of the distribution-part is used as a spare area, wherein the storage quantity of the first spare area and the second spare area is related to the error correction code (E) CC) capacity to make the error correction Markov cc) module correct the error code of the data content. n. The method of claim 2, wherein comparing the second error correction code (ECC) value with the erroneous code (ECC) __ reading includes: storing a count value, and according to the The count value determines whether the setting unit sets the data area to form the first spare area. The method of claim 5, wherein the step of storing a count value further comprises: when the count value is greater than a predetermined count value, the setting unit sets the flash memory to allocate-part This data area serves as the second spare area. The method of claim 12, wherein the predetermined count value is a flash count value (9) of the flash 5 memory. The method of claim 1 , wherein, after the step of calculating the number of the error codes by using the setting unit, the method further comprises: when the number of the error codes is less than the predetermined threshold The value is corrected based on a comparison result of the second error correction code (ECC) value and the first error correction code (ECC) value. 15. The method of claim 1, wherein before the step of generating the read command to read the data content of the flash memory, the method further comprises: generating a write command for writing The content of the material is to the flash memory. The method of claim 15 wherein the step of generating the write life further comprises: writing the first error correction code (ECC) value to the first spare area. 17. The method of claim 10, wherein the error correction code (Ecc) capacity is indicative of a plurality of predetermined bytes of the flash memory (b(d) of the correctable complex bits_number 0 ❹ 17
TW97139566A 2008-10-15 2008-10-15 Flash memory controller having configuring unit of error correction code (ecc) capability and method thereof TWI393146B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW97139566A TWI393146B (en) 2008-10-15 2008-10-15 Flash memory controller having configuring unit of error correction code (ecc) capability and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW97139566A TWI393146B (en) 2008-10-15 2008-10-15 Flash memory controller having configuring unit of error correction code (ecc) capability and method thereof

Publications (2)

Publication Number Publication Date
TW201015561A true TW201015561A (en) 2010-04-16
TWI393146B TWI393146B (en) 2013-04-11

Family

ID=44830094

Family Applications (1)

Application Number Title Priority Date Filing Date
TW97139566A TWI393146B (en) 2008-10-15 2008-10-15 Flash memory controller having configuring unit of error correction code (ecc) capability and method thereof

Country Status (1)

Country Link
TW (1) TWI393146B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI489472B (en) * 2010-11-18 2015-06-21 Grandis Inc Memory write error correction circuit
TWI658464B (en) * 2014-08-19 2019-05-01 南韓商三星電子股份有限公司 Memory devices and memory modules
US10521113B2 (en) 2015-07-13 2019-12-31 Samsung Electronics Co., Ltd. Memory system architecture
US10824499B2 (en) 2014-08-19 2020-11-03 Samsung Electronics Co., Ltd. Memory system architectures using a separate system control path or channel for processing error information

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI550615B (en) * 2014-08-28 2016-09-21 群聯電子股份有限公司 Data accessing method, memory storage device and memory controlling circuit unit
TWI539282B (en) 2014-10-13 2016-06-21 慧榮科技股份有限公司 Non-volatile memory device and controller

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4513420A (en) * 1982-11-22 1985-04-23 Ncr Corporation Error detecting system
JPH05225798A (en) * 1991-08-14 1993-09-03 Internatl Business Mach Corp <Ibm> Memory system
KR950010768B1 (en) * 1993-10-20 1995-09-22 주식회사 Lg전자 Error correction code decoding apparatus and method
JP3242890B2 (en) * 1998-12-16 2001-12-25 株式会社ハギワラシスコム Storage device
KR100681429B1 (en) * 2005-10-24 2007-02-15 삼성전자주식회사 Semiconductor memory device and bit error detection method thereof
US7739576B2 (en) * 2006-08-31 2010-06-15 Micron Technology, Inc. Variable strength ECC
TW200828328A (en) * 2006-12-28 2008-07-01 Genesys Logic Inc Method of improving accessing reliability of flash memory
US7861139B2 (en) * 2007-01-26 2010-12-28 Micron Technology, Inc. Programming management data for NAND memories

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI489472B (en) * 2010-11-18 2015-06-21 Grandis Inc Memory write error correction circuit
TWI658464B (en) * 2014-08-19 2019-05-01 南韓商三星電子股份有限公司 Memory devices and memory modules
US10824499B2 (en) 2014-08-19 2020-11-03 Samsung Electronics Co., Ltd. Memory system architectures using a separate system control path or channel for processing error information
US10521113B2 (en) 2015-07-13 2019-12-31 Samsung Electronics Co., Ltd. Memory system architecture

Also Published As

Publication number Publication date
TWI393146B (en) 2013-04-11

Similar Documents

Publication Publication Date Title
US8161354B2 (en) Flash memory controller having configuring unit for error correction code (ECC) capability and method thereof
EP2162822B1 (en) Emerging bad block detection
US7559004B1 (en) Dynamic redundant area configuration in a non-volatile memory system
KR101655306B1 (en) Memory system and access method thereof
JP4059472B2 (en) Memory card and memory controller
US8738987B2 (en) Memory controller and memory management method
US20040083334A1 (en) Method and apparatus for managing the integrity of data in non-volatile memory system
TWI582779B (en) Read voltage level estimating method, memory storage device and memory controlling circuit unit
US8732553B2 (en) Memory system and control method thereof
TW201015561A (en) Flash memory controller having configuring unit of error correction code (ECC) capability and method thereof
KR101343262B1 (en) Method and apparatus to perform concurrent read and write memory operations
US8386868B2 (en) Using programming-time information to support error correction
US8631310B2 (en) Method for reducing uncorrectable errors of a memory device regarding error correction code, and associated memory device and controller thereof
US9129689B2 (en) Tracking erase pulses for non-volatile memory
US20090319825A1 (en) Monitoring memory
WO2007136018A1 (en) Data storage device and data storage method
US9043672B2 (en) Memory controller, storage device, and memory control method
TWI802324B (en) Method of sudden power off recovery, memory controlling circuit unit and memory storage device
JP2007310916A (en) Memory card
JP4357305B2 (en) External storage device
US11726709B2 (en) Memory control method, memory storage device and memory control circuit unit
JP2011018371A (en) Memory storage device
US20150332758A1 (en) Memory system and method of controlling memory system
CN117174132A (en) Memory management method, memory storage device and memory control circuit unit