TWI335502B - Flash memory system and method for controlling the same - Google Patents

Flash memory system and method for controlling the same Download PDF

Info

Publication number
TWI335502B
TWI335502B TW96110780A TW96110780A TWI335502B TW I335502 B TWI335502 B TW I335502B TW 96110780 A TW96110780 A TW 96110780A TW 96110780 A TW96110780 A TW 96110780A TW I335502 B TWI335502 B TW I335502B
Authority
TW
Taiwan
Prior art keywords
ecc
code
flash memory
memory system
page
Prior art date
Application number
TW96110780A
Other languages
Chinese (zh)
Other versions
TW200839502A (en
Inventor
Yu An Chang
Chee-Kong Awyong
Chin Ling Wang
Original Assignee
Phison Electronics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Phison Electronics Corp filed Critical Phison Electronics Corp
Priority to TW96110780A priority Critical patent/TWI335502B/en
Publication of TW200839502A publication Critical patent/TW200839502A/en
Application granted granted Critical
Publication of TWI335502B publication Critical patent/TWI335502B/en

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Description

1335502 ' . 99 年10 月 九、發明說明: 【發明所屬之技術領域】 本發明是關於一種快閃記憶體,尤指一種快閃記憶體 *系統及其控制方法。 产 【先前技術】 在過去的數十年間,錯誤修正和錯誤彳貞測的問題有實 鲁際可行的重要性。錯誤偵測和修正可在傳送方傳輸到接受 方的過程中偵測因塗改或其他損傷造成的錯誤,並同時定 位和修正錯誤。為了解決上述問題而產生了錯誤修正碼 (Error Correcting Code, ECC)。ECC使用於如快閃記憶體 和動態隨機存取記憶體的電腦資料儲存設備和資料傳輸 中。例子包含漢明碼(Hamming code)、里德所羅門碼 (Reed-Solomon code) 、 BCH 碼 ® (Bose-Chaudhuri-Hocquenham, BCH)、里德米勒碼 (Reed-Muller code)、二次元格雷碼(Binary Golay code)、迴旋碼(convolutional code)、及滿輪碼(turbo code)。最簡單的錯誤修正碼可修正單一位元錯誤並偵測雙 位元錯誤。其他碼則可偵測或修正多位元錯誤。ECC藉由對 抗電腦記憶體中可能的錯誤來提高資料準確性和系統正常 運行時間。 5 1335502 99年10月12日修正贊換頁 圖1依據先别技術說明快閃檔案系統中虛擬對實體位 址的轉換。實體空間13是由實際上是抹除區的實體單元U1 所組成,意即.可被抹除的最小區塊。每一個實體單元 含有一或多個實體頁113’而一頁是可被寫入的最小區塊。 虛擬空間11疋由有等同實體單元大小的虛擬單元121所組 成。每一虛擬單元含有一或多個虛擬頁123,其大小等同實 體頁113。當一應用為了讀取或寫入提供一虛擬位址時,虛 擬位址所屬的虛擬單元數字將從虛擬位址中摘錄。同上所毫 述’-實體頁是用以程式設計資料讀取的最小單元。換言 之,先别技術無法處理小於一頁大小的儲存資料像是傳 統决閃。己憶體的512位元組或細D快閃記憶體的2〇48位元 組,並相對地影響快閃記憶體的整體可靠度和表現。 另外,錯誤修正所需時間與錯誤修正位元的長度和錯 誤修正循環中處理的資料位元長度有關。一般而言,可藉 由在錯誤位置中處理更長位元長度的ECC來達成高效率, 所謂錯誤位置意即錯誤最常發生處,反之亦然。然而,先 前記憶體管理電路,像是美國專利申請號n〇 5,937,425的 快閃記憶體系統’因為ECC位元長度和頁數大小受工業標 準:限制’使錯誤修正的經常性消耗相對較高。為了克服 先月J技術的限制’就需要提供一種更有效利用一頁的容量 並有效配置ECC的快閃記憶體系統及其控制方法。 6 1335502 - 、 99年10月12日修正替換頁 ' * 【發明内容】 本發明發現了習知裝置的某些問題。本發明所揭示效 率倍增和其他好處的方法克服了習知錯誤修正電路系統所 .無法達成的缺點。本發明的目標是提供一種更有效利用一 -頁的容量並有效配置ECC的快閃記憶體系統。 依照本發明之一觀點,快閃記憶體系統包括每頁由不 同容量的複數個記憶體區域所組成的一組頁數、用以控制 •其中一頁的資料讀取或寫入的讀取/寫入控制器、包含至 少兩個ECC引擎且每個引擎可編碼或解碼資料用以執行錯 誤偵測和錯誤修正的錯誤修正單元、及用以在預設條件基 礎上選取一適當ECC引擎的ECC判斷單元。 根據本案構想,預設條件包括考量所使用記憶體區域 和所放置的資料特性。 根據本案構想,ECC有不同的位元長度。 # 根據本案構想,ECC有不同的編碼演算法。 根據本案構想,編碼演算法包括漢明碼、里德所羅門 碼、BCH碼、里德米勒碼、二次元格雷碼、迴旋碼、及渦輪 碼。 根據本案構想,每頁包含2048位元組。 根據本案構想,每頁包含512位元組。 根據本案構想,錯誤頻繁的記憶體區域搭配更長位元 長度的ECC。 7 99年10月I2日修正管換頁 本根據本案構想,快閃記憶體系統能成為USB隨身碟、SD 卡、MMC卡、及快閃隨身碟。 本發明的另一個目標是提供一種用以控制有一組頁數 的快閃s己憶體系統的方法。 依照本發明的另一觀點,一種用以控制有一組頁數的 快閃記憶體系統的方法’包括以下步驟··將每頁分割成有 不同容量的複數個記憶體區域;取得資料;在預設條件基 礎上由複數個ECC引擎中選取一個適當的咖;及儲存資料 和ECC輸出(通稱冗位或同位檢查數字)。 根據本案構想,預設條件包括考量所使用記憶體區域 和所放置的資料特性。 根據本案構想,ECC有不同的位元長度。 根據本案構想,ECC有不同的編碼演算法。 根據本案構想,編碼演算法包括漢明碼、里德所羅門 碼、BCH碼、里德米勒碼、二次元格雷碼、迴旋碼、及渴 輪編碼。 根據本案構想,每頁包含2048位元組。 根據本案構想’每頁包含512位元組。 根據本案構想,錯誤頻繁的記憶體區域搭配更長位元 長度的ECC。 根據本案構想,快閃記憶體系統能成為USB隨身碟、幼 卡、MMC卡、及快閃隨身碟。 1335502 99年10月12日修正替換頁 依照本發明的另一觀點,一種用以控制有一組頁數的 快閃記憶體系統的方法,包括以下步驟:要求存取儲存於 記憶體區域的資料;透過快閃記憶體系統存取資料;在預 設條件基礎上由複數個ECC引擎中選取一個適當的ECC ;用 選取的ECC修正資料;及輸出資料。 根據本案構想,預設條件包括考量所使用記憶體區域 和所放置的資料特性。 根據本案構想,ECC有不同的位元長度。 根據本案構想5 ECC有不同的編碼演鼻法。 根據本案構想,編碼演算法包括漢明碼、里德所羅門 碼、BCH碼、里德米勒碼、二次元格雷碼、迴旋碼、及渦 輪編碼。 根據本案構想,每頁包含2048位元組。 根據本案構想,每頁包含512位元組。 根據本案構想,錯誤頻繁的記憶體區域搭配更長位元 長度的ECC。 根據本案構想,快閃記憶體系統能成為USB隨身碟、SD 卡、MMC卡、及快閃隨身碟。 依照本發明的另一觀點,一種快閃記憶體系統包括每 頁由相同容量的複數個記憶體區域所組成的一組頁數、用 以控制其中一頁的資料讀取或寫入的讀取/寫入控制器、 包含至少兩個ECC引擎且每個引擎可編碼或解碼資料用以 91335502 '. October 1999 IX. Description of the Invention: [Technical Field] The present invention relates to a flash memory, and more particularly to a flash memory system and a control method thereof. Production [Prior Art] In the past few decades, the problems of error correction and error speculation have been of practical importance. Error detection and correction can detect errors caused by alterations or other damage during transmission to the recipient, and simultaneously locate and correct errors. In order to solve the above problem, an Error Correcting Code (ECC) has been generated. ECC is used in computer data storage devices and data transmission such as flash memory and dynamic random access memory. Examples include Hamming code, Reed-Solomon code, BCH code (Bose-Chaudhuri-Hocquenham, BCH), Reed-Muller code, and second-order Gray code ( Binary Golay code), convolutional code, and turbo code. The simplest error correction code corrects a single bit error and detects double bit errors. Other codes can detect or correct multi-bit errors. ECC improves data accuracy and system uptime by countering possible errors in computer memory. 5 1335502 October 12, 1999 Revised Likes Page 1 Figure 1 illustrates the conversion of virtual to physical addresses in a flash file system based on prior art. The physical space 13 is composed of a physical unit U1 which is actually an erased area, that is, the smallest block that can be erased. Each physical unit contains one or more physical pages 113' and one page is the smallest block that can be written. The virtual space 11 is composed of virtual units 121 having an equivalent physical unit size. Each virtual unit contains one or more virtual pages 123 that are equal in size to the physical page 113. When an application provides a virtual address for reading or writing, the virtual unit number to which the virtual address belongs will be extracted from the virtual address. As stated above, the '-physical page is the smallest unit used to read the programming data. In other words, the prior art cannot handle stored data smaller than one page in size like a traditional flash. The 512-bit tuple of the memory or the 2〇48-bit of the fine-D flash memory, and relatively affect the overall reliability and performance of the flash memory. In addition, the time required for error correction is related to the length of the error correction bit and the length of the data bit processed in the error correction loop. In general, high efficiency can be achieved by processing ECCs of longer bit lengths in the wrong location, meaning that the wrong location means that the error occurs most often, and vice versa. However, prior memory management circuits, such as the flash memory system of U.S. Patent Application Serial No. 5,937,425, are subject to industry standards because of the ECC bit length and the number of pages. In order to overcome the limitations of the prior art J technology, it is necessary to provide a flash memory system and a control method thereof that efficiently utilize the capacity of one page and effectively configure the ECC. 6 1335502 - , October 12, 1999 Amendment Replacement Page '* [Invention] The present invention finds certain problems with conventional devices. The method of multiplying efficiency and other benefits disclosed by the present invention overcomes the shortcomings that conventional error correction circuitry cannot achieve. It is an object of the present invention to provide a flash memory system that utilizes one-page capacity more efficiently and efficiently configures ECC. According to one aspect of the present invention, a flash memory system includes a set of pages consisting of a plurality of memory regions of different capacities per page, for controlling the reading of a page of data reading or writing/ Writing to the controller, an error correction unit including at least two ECC engines, each of which can encode or decode data for performing error detection and error correction, and an ECC for selecting an appropriate ECC engine based on preset conditions Judging unit. According to the concept of the present case, the preset conditions include consideration of the memory area used and the characteristics of the data placed. According to the concept of the case, ECC has different bit lengths. # According to the concept of this case, ECC has different coding algorithms. According to the present concept, the encoding algorithm includes Hamming code, Reed Solomon code, BCH code, Reed Miller code, quadratic Gray code, convolutional code, and turbo code. According to the concept of the case, each page contains 2048 bytes. According to the concept of the case, each page contains 512 bytes. According to the concept of the case, the frequently erroneous memory area is matched with the ECC of a longer bit length. 7 October 1999 I2 revision tube change page According to the concept of this case, the flash memory system can become a USB flash drive, SD card, MMC card, and flash flash drive. Another object of the present invention is to provide a method for controlling a flash suffix system having a set of pages. According to another aspect of the present invention, a method for controlling a flash memory system having a set of pages includes the following steps: dividing each page into a plurality of memory regions having different capacities; acquiring data; Based on the conditions, select an appropriate coffee from a plurality of ECC engines; and store data and ECC output (known as redundant or parity check numbers). According to the concept of the present case, the preset conditions include consideration of the memory area used and the characteristics of the data placed. According to the concept of the case, ECC has different bit lengths. According to the concept of this case, ECC has different coding algorithms. According to the present concept, the coding algorithm includes Hamming code, Reed Solomon code, BCH code, Reed Miller code, quadratic Gray code, convolutional code, and thirsty wheel coding. According to the concept of the case, each page contains 2048 bytes. According to the concept of the case, each page contains 512 bytes. According to the concept of the case, the frequently erroneous memory area is matched with the ECC of a longer bit length. According to the concept of this case, the flash memory system can be a USB flash drive, a baby card, an MMC card, and a flash flash drive. 1335502 Modified on October 12, 1999, in accordance with another aspect of the present invention, a method for controlling a flash memory system having a set of pages, comprising the steps of: requiring access to data stored in a memory region; Accessing data through the flash memory system; selecting an appropriate ECC from a plurality of ECC engines based on preset conditions; correcting the data with the selected ECC; and outputting the data. According to the concept of the present case, the preset conditions include consideration of the memory area used and the characteristics of the data placed. According to the concept of the case, ECC has different bit lengths. According to the concept of this case, 5 ECC has different coded nasal algorithms. According to the present concept, the encoding algorithm includes Hamming code, Reed Solomon code, BCH code, Reed Miller code, quadratic Gray code, convolutional code, and turbo coding. According to the concept of the case, each page contains 2048 bytes. According to the concept of the case, each page contains 512 bytes. According to the concept of the case, the frequently erroneous memory area is matched with the ECC of a longer bit length. According to the concept of the case, the flash memory system can be a USB flash drive, an SD card, an MMC card, and a flash drive. According to another aspect of the present invention, a flash memory system includes a set of pages each composed of a plurality of memory regions of the same capacity, and a reading for reading or writing data of one of the pages. / write controller, contains at least two ECC engines and each engine can encode or decode data for 9

JJUZ 99年10月l2日修正管換頁 執行錯誤仙!和錯祕正的錯誤修正單元^用以 條件基礎上選取-適當ECC引擎的ECC判斷單元。 根據本案構想’預設條件包括考量所使用記憶體區 域和所放置的資料特性。 根據本案構想,ECC有不同的位元長度。 根據本案構想,Ecc有不同的編碼演算法。 根據本案構想,編碼演算法包括漢明碼、里德所羅 ’ I BCH碼、里德米勒碼、二次元格雷碼、迴旋碼、及 渴輪碼。 根據本案構想,每頁包含2048位元組。 根據本案構想,每頁包含512位元組。 根據本案構想,複數個記憶體區域各有n x 512位 元組的容量,而η是一個自然數。 根據本案構想,錯誤頻繁的記憶體區域搭配更長位元 長度的ECC。 根據本案構想,快閃記憶體系統包含USB隨身碟、 SD卡、MMC卡、及快閃隨身碟。 依照本發明的另一觀點,一種用以控制有一組頁數 的快閃記憶體系統的方法,包括以下步驟:將每頁分割成 有相同容量的複數個記憶體區域;取得資料在預設條件基 礎上由複數個ECC引擎t選取一個適當的ECC;及儲存資 料和ECC輸出(通稱冗位或同位檢查數字)。 1335502 - 、 99年10月12日修正替換頁 - « ♦ / 【實施方式】 本發明揭露一種快閃記憶體系統及其控制方法。熟悉 此技藝者將在閱讀接下來實施方式和附帶圖式後,更了解 .本發明的上述目標和優點。本發明不需被接下來的實施例 • 所限制。 請參考圖2,其根據本發明說明快閃記憶體系統的較 佳内部結構。如圖2所示,快閃記憶體系統含有一組頁數(為 • 了示範用途,所以在圖式中只以頁20來呈現)、用以控制其 中一頁資料讀取或寫入的一讀取/寫入控制器21、一ECC 判斷單元22、及一錯誤修正單元23。錯誤修正單元23進一 步包括ECC引擎231、232、及233。 每頁之容量為21 12(2048資料攔位+64備用欄位)位元 組,及進一步組成不同容量的複數個記憶體區域用以儲存 資料。儲存的資料分割成數段以符合分別的記憶體區域。 _替代實施例亦可在快閃記憶體系統使用不同容量大小的一 頁。如圖2的頁20所示,為了清楚說明,記憶體區域被分別 給予區號。如圖3所示,每一記憶體區域可儲存帶有ECC的 資料段,意即,描述在資料段中位元序列的冗餘資訊。另 外,分別資料段的ECC亦可一併放在每頁頁尾的冗餘部份。 根據在預設條件基礎上ECC判斷單元22的選取,例如考量所 使用的記憶體區域和所放置的資料特性,錯誤修正單元23 的ECC引擎23卜232或233將編碼輸入的資料及產生冗位。 11 1335502 _ 99年10月I2日修正管換頁 搭配的ECC可以有不同的位元長度,如果有偵測到錯誤的 -話,可用增加額外資訊到資料段的方式允許資料段的修 正。此外,ECC引擎231、232及233可採納一些不同的編碼 演算法,例如漢明碼、里德所羅門碼、BCH碼、里德米勒碼、 二次元格雷碼、迴旋碼、及渦輪碼等等之類。錯誤修正單 -元23是專用以ECC判斷單元22方式選取的ECC來編碼或解碼 資料。 請參考圖4和圖5,其根據本發明說明一種用以控制資 _ 料輸入方法的步驟。步驟S 31是在寫入資料到錯誤修正循環 期間的頁數之前實施。2112位元組容量的頁20是被分割成 有不同容量的複數個記憶體區域。在此實施例中,共有8 個記憶體區域,區1、區2、區3..... 及區8,且替代實 施例亦可分割額外的記憶體區域以進行操作。分割過的每 頁容量分別是522位元組、8位元組、522位元組、4位元組、 522位元組、4位元組、522位元組、及8位元組。輸入的資 φ 料也是依照每個記憶體區域的大小去分割。在圖4步驟 S32,輸入的資料是傳送到ECC判斷單元22以從錯誤修正單 元23的ECC引擎23卜232、及233中選取適當的ECC引擎。基 於考量所使用的記憶體區域和所放置的資料特性,此實施 例中,里德所羅門碼和BCH碼是被選取做為編碼資料。在步 驟S33中,錯誤修正單元23中ECC引擎23卜232及233的其中 一個被指示產生有分別冗位的8個不同編碼資料段。 12 1335502 - 99年10月12日修正替換頁 v • ' 每個ECC引擎利用一個特殊的編碼演算法把資料段重 組及編碼成冗餘格式。更具體而言,編碼演算法可以依據 錯誤位置在位元或符號層作業。因此,藉由里德所羅門碼、 .BCH碼、里德所羅門碼、BCH碼、里德所羅門碼、BCH碼、里 .德所羅門碼、及BCH碼將資料編碼,並分割成8段後落在對 應的記憶體區域,而它們對應的ECC分別如下:4個符號、4 個位元、4個符號、5個位元、4個符號、5個位元、4個符號、 參及4個位元。在步驟S34,演算法基礎冗餘資訊是透過讀取 /寫入控制器21與資料段一起記錄,並同時增加到預先定 義記憶體區域的冗餘部分,在此部份中,ECC含有可被解碼 以偵測及修正可能因資料傳輸造成的錯誤有效冗餘資訊。 請參考圖6及圖7,其根據本發明說明一種用以控制資 料輸出方法的步驟。如圖7的步驟S41,當要求讀取儲存的 資料時,連同ECC的資料段由頁20的記憶體區域取得並透過 鲁讀取/寫入控制器21傳送到ECC判斷單元22,如圖6所示。 同樣地,在圖7的步驟S42,ECC判斷單元22根據冗餘資訊決 定哪個ECC引擎有使用過。基於ECC判斷單元22的選取,產 生的ECC藉由原本所使用的演算法再次計算和解碼儲存的 資料及資料段,意即,如圖7步驟S43所示的里德所羅門碼 和BCH碼。接著是步驟S44,在偵測出錯誤,且可被錯誤修 正的情況下,錯誤修正單元23偵測錯誤存在與否並對頁20 的儲存資料段進行適當修正,如果藉由解碼ECC的方式沒偵 13 1335502 _ 99年10月I2日修正管換頁 測出錯誤的話,代表資料沒錯誤且將被讀出,如圖7的步驟-· S45所示。否則,遺漏或錯誤的位元會透過解碼的ECC決定, 並藉由步驟S46所設定之演算法方式提供或修正單一位元 或數個位元,並在圖7最後一個步驟S47輸出修正的資料。 本發明的特性特別適合應用於USB隨身碟、SD卡、MMC 卡、及快閃隨身碟。另外,每頁亦可被分割成數個相同容 量的記憶體區域,每區有η X 512位元組的容量,而η是一 個自然數。無疑地,替代實施例可能採納多樣性的編碼演 鲁 算法或更長位元長度的ECC以進行一頁的錯誤修正操作。換 言之,為了達到ECC的有效利用和配置,更長位元長度或較 佳修正能力的ECC可配合來使用及分配其預設條件,例如錯 誤頻繁的記憶體區域,或儲存容許零位元錯誤的重要資料。 總而言之,本發明提供一種快閃記憶體系統及其控制 方法。快閃記憶體系統含有分割成不同容量記憶區的複數 頁,且此方法在一頁中使用多個ECC來控制快閃記憶體系 _ 統,如在錯誤位置應用更長位元長度的ECC,意即,錯誤最 常發生處,反之亦然。不同於傳統快閃記憶體管理系統, 本發明提供一ECC判斷單元,依據所使用記憶體區域和所放 置的資料特性,選取適當的ECC。本快閃記憶體系統為有效 利用ECC進一步納入至少兩個ECC引擎。鑑於ECC位元長度和 頁數大小受工業標準的限制,本發明藉由提供一種更有效 利用一頁的容量、有效配置ECC的快閃記憶體系統及其控制 1335502 - 、 99年10月12日修正替換頁 . , « ••方法,並整合完整的快閃記憶體系統來成功克服先前技術 的限制。 縱使本發明已由上述之實施例詳細敘述而可由熟悉 本技藝之人士任施匠思而為諸般修飾,然皆不脫如附申請 - 專利範圍所欲保護者。JJUZ October, October, l2, correction tube change page execution error! And the wrong error correction unit ^ used to select the ECC judgment unit of the appropriate ECC engine. According to the concept of the case, the pre-set conditions include consideration of the memory area used and the characteristics of the data placed. According to the concept of the case, ECC has different bit lengths. According to the concept of this case, Ecc has different coding algorithms. According to the present concept, the coding algorithm includes Hamming code, Reed's IBS code, Reed Miller code, quadratic Gray code, convolutional code, and thirsty wheel code. According to the concept of the case, each page contains 2048 bytes. According to the concept of the case, each page contains 512 bytes. According to the present concept, a plurality of memory regions each have a capacity of n x 512 bytes, and η is a natural number. According to the concept of the case, the frequently erroneous memory area is matched with the ECC of a longer bit length. According to the concept of the case, the flash memory system includes a USB flash drive, an SD card, an MMC card, and a flash drive. According to another aspect of the present invention, a method for controlling a flash memory system having a set of pages includes the steps of: dividing each page into a plurality of memory regions having the same capacity; obtaining data in a preset condition Based on a plurality of ECC engines t select an appropriate ECC; and store data and ECC output (known as redundancy or parity check numbers). 1335502 - , October 12, 1999 Amendment Replacement Page - « ♦ / [Embodiment] The present invention discloses a flash memory system and a control method thereof. Those skilled in the art will appreciate the above objects and advantages of the present invention after reading the following embodiments and accompanying drawings. The invention is not limited by the following embodiments. Referring to Figure 2, a preferred internal structure of a flash memory system is illustrated in accordance with the present invention. As shown in Figure 2, the flash memory system contains a set of pages (for demonstration purposes, so only the page 20 is presented in the drawing), one for controlling the reading or writing of one page of data. The read/write controller 21, an ECC judging unit 22, and an error correcting unit 23 are provided. The error correcting unit 23 further includes ECC engines 231, 232, and 233. Each page has a capacity of 21 12 (2048 data block + 64 spare fields) and further forms a plurality of memory areas of different capacities for storing data. The stored data is divided into segments to match the respective memory regions. Alternative embodiments may also use one page of different size in the flash memory system. As shown on page 20 of Fig. 2, the memory regions are given area codes, respectively, for clarity of explanation. As shown in Figure 3, each memory region can store data segments with ECC, meaning redundant information describing the sequence of bits in the data segment. In addition, the ECC of the data segment can also be placed in the redundant part of the page at the end of each page. According to the selection of the ECC judging unit 22 based on the preset condition, for example, considering the memory area used and the placed data characteristics, the ECC engine 23 232 or 233 of the error correcting unit 23 will encode the input data and generate redundancy. . 11 1335502 _ October 1999 I2 correction tube change page The ECC can be used with different bit lengths. If there is an error detected, the data segment can be corrected by adding additional information to the data segment. In addition, ECC engines 231, 232, and 233 can employ a number of different encoding algorithms, such as Hamming code, Reed Solomon code, BCH code, Reed Miller code, Quadratic Gray code, gyro code, and turbo code. class. Error Correction Unit - Element 23 is an ECC specifically selected by the ECC judgment unit 22 to encode or decode data. Referring to Figures 4 and 5, a method for controlling the input method of the material is illustrated in accordance with the present invention. Step S31 is performed before the number of pages during which the data is written to the error correction loop. Page 20 of the 2112-byte capacity is divided into a plurality of memory regions having different capacities. In this embodiment, there are a total of 8 memory areas, area 1, area 2, area 3, ... and area 8, and alternative memory areas may be split for operation in place of the embodiment. The divided page capacity is 522 bytes, octets, 522 bytes, 4 bytes, 522 bytes, 4 bytes, 522 bytes, and 8 bytes. The input information is also divided according to the size of each memory area. At step S32 of Fig. 4, the input data is transmitted to the ECC judging unit 22 to select an appropriate ECC engine from the ECC engines 23, 232, and 233 of the error correcting unit 23. Based on the memory area used and the characteristics of the data placed, in this embodiment, the Reed Solomon code and the BCH code are selected as the encoded data. In step S33, one of the ECC engines 23 232 and 233 in the error correcting unit 23 is instructed to generate 8 different coded data segments having respective redundancy. 12 1335502 - October 12, 1999 Revised Replacement Page v • 'EEC's ECC engine uses a special encoding algorithm to reassemble and encode data segments into a redundant format. More specifically, the encoding algorithm can operate at the bit or symbol level depending on the location of the error. Therefore, the data is encoded by Reed Solomon code, .BCH code, Reed Solomon code, BCH code, Reed Solomon code, BCH code, Riede Solomon code, and BCH code, and is divided into 8 segments and then falls on Corresponding memory regions, and their corresponding ECC are as follows: 4 symbols, 4 bits, 4 symbols, 5 bits, 4 symbols, 5 bits, 4 symbols, and 4 bits. yuan. In step S34, the algorithm basic redundancy information is recorded together with the data segment by the read/write controller 21, and simultaneously added to the redundant portion of the predefined memory region, in which the ECC contains Decoding to detect and correct invalid and redundant information that may be caused by data transmission. Referring to Figures 6 and 7, a method for controlling a data output method is illustrated in accordance with the present invention. As step S41 of FIG. 7, when the stored data is requested to be read, the data segment along with the ECC is taken from the memory area of page 20 and transmitted to the ECC judging unit 22 through the Lu/Read controller 21, as shown in FIG. Shown. Similarly, in step S42 of Fig. 7, the ECC judging unit 22 decides which ECC engine has been used based on the redundant information. Based on the selection of the ECC judging unit 22, the generated ECC recalculates and decodes the stored data and data segments by the algorithm originally used, i.e., the Reed Solomon code and the BCH code as shown in step S43 of FIG. Next, in step S44, in the case where an error is detected and can be corrected by mistake, the error correcting unit 23 detects the presence or absence of the error and appropriately corrects the stored data segment of the page 20, if the method of decoding the ECC is not Detective 13 1335502 _ In October, I2, when the correction tube was changed, the data was found to be error-free and will be read, as shown in step-S45 of Figure 7. Otherwise, the missing or erroneous bit is determined by the decoded ECC, and a single bit or a plurality of bits are provided or corrected by the algorithm set in step S46, and the corrected data is output in the last step S47 of FIG. . The features of the present invention are particularly well suited for use with USB flash drives, SD cards, MMC cards, and flash flash drives. In addition, each page can be divided into a plurality of memory areas of the same capacity, each area having a capacity of η X 512 bytes, and η is a natural number. Undoubtedly, alternative embodiments may employ a diverse coded algorithm or a longer bit length ECC to perform a one page error correction operation. In other words, in order to achieve efficient use and configuration of ECC, ECCs with longer bit lengths or better correction capabilities can be used in conjunction with and assigning their preset conditions, such as frequently erroneous memory regions, or storing permissible zero bit errors. Important information. In summary, the present invention provides a flash memory system and a control method therefor. The flash memory system contains a plurality of pages divided into different capacity memory areas, and this method uses multiple ECCs in one page to control the flash memory system, such as applying a longer bit length ECC at the wrong location, That is, the most common occurrence of the error, and vice versa. Unlike the conventional flash memory management system, the present invention provides an ECC judging unit that selects an appropriate ECC depending on the memory area used and the data characteristics placed. This flash memory system is further integrated into at least two ECC engines for efficient use of ECC. In view of the limitation of ECC bit length and page size by industry standards, the present invention provides a flash memory system and its control for effectively configuring ECC with more efficient use of one page capacity. 1335502 - October 12, 1999 Fixed replacement page. , « •• method, and integrated complete flash memory system to successfully overcome the limitations of the prior art. Even though the invention has been described in detail by the above-described embodiments, it can be modified by those skilled in the art, and the invention is intended to be protected by the appended claims.

15 1335502 . 99年10月I2日修正弩換頁 【圖式簡單說明】 熟悉此技藝者將在閱讀接下來實施方式和附帶圖式 後,更了解本發明的上述目標和優點: 圖1根據習知說明在快閃檔案系中實體位址的示意圖; 圖2根據本發明說明快閃記憶體系統的内部結構· 圖3是一頁的示意圖; 圖4是根據本發明之資料輸入路徑的示意圖; 圖5根據本發明說明資料輸入方法的步驟流程; 《 圖6是根據本發明之資料輸出路徑的示意圖;及 圖7根據本發明說明資料輸出方法的步驟流程。 【主要元件符號說明】 11 虛擬空間 111 XiO — 早兀 113 頁 121 單元 123 頁 13 實體空間 20 頁 21 讀取/寫入控制器 22 ECC判斷單元 23 錯誤修正單元 16 1335502 231 232 233 ECC引擎 ECC引擎 ECC引擎 99年10月12日修正替換頁15 1335502. October 1999 I2 弩 弩 弩 【 【 【 【 【 【 【 【 【 【 【 【 【 【 【 【 【 【 【 【 【 【 【 【 【 【 【 【 【 【 【 【 【 【 【 【 阅读 阅读 阅读 阅读 阅读 阅读 阅读 阅读 阅读 阅读 阅读BRIEF DESCRIPTION OF THE DRAWINGS FIG. 2 is a schematic diagram showing the internal structure of a flash memory system according to the present invention. FIG. 3 is a schematic diagram of a page; FIG. 4 is a schematic diagram of a data input path according to the present invention; 5 is a flow chart showing the steps of the data input method according to the present invention; and Fig. 6 is a schematic diagram showing the data output path according to the present invention; and Fig. 7 is a flow chart showing the steps of the data output method according to the present invention. [Main component symbol description] 11 Virtual space 111 XiO — Early 113 pages 121 Unit 123 Page 13 Physical space 20 Page 21 Read/write controller 22 ECC judgment unit 23 Error correction unit 16 1335502 231 232 233 ECC engine ECC engine ECC engine revised replacement page on October 12, 1999

1717

Claims (1)

1335502 -----^ 日紅管換頁 ff年日修正本 L_ · 十、申請專利範面 1. 一種快閃記憶體系統,包括: -組頁數,每頁由不同容量的複數個 一讀取/寫入控制器,用以控制 A域所組成; 寫入; 、令-頁的資料讀取或 -錯誤修正單心包含至少兩甸錯誤修 Correction Code)引擎,每個引擎 ^ rror 以 執行錯誤偵測和錯誤修正;A 編碼或解喝資料用 - ECC判斷單元,用以在預設條件 ECC引擎。 咬上、取一適當 2.如申請專利範圍第i項所述之快閃記憶體系統,其中預 設條件包括考量所使航憶體區域和所放置的資料特性。 3·如申請專利範圍第i項所述之快閃記憶體系統,其中 ECC有不同的位元長度。 八 4.如申請專利範圍第1項所述之快閃記憶體系統,其中 ECC有不同的編碼演算法。 5.如申請專利範圍第4項所述之快閃記憶體系統,其中編 碼演算法包括漢明碼(Hamming code)、里德所羅。碼(里德 所羅門碼(Reed-Solomon code) 、 BCH 碼 (Bose-Chaudhuri-Hocquenham, BCH)、里德米勒碼 (Reed-Muller code)、二次元格雷碼(Binary Golay code)、迴旋碼(convolutional code)、及渴輪碼(turbo 1335502 ___ .' , 99年10月12日修正替換頁 code) 〇 6.如申請專利範圍第1項所述之快閃記憶體系統,其中每 頁包含2048位元組或512位元組。 • 7.如申請專利範圍第1項所述之快閃記憶體系統,其中錯 誤頻繁的記憶體區域搭配更長位元長度的ECC。 8. 如申請專利範圍第1項所述之快閃記憶體系統,其中快 閃。己憶體系統包括USB隨身碟(USB PenDrive)、安全數位 •卡(secure digital (SD) card)、多媒體卡(multi-media card (MMC))、及快閃隨身碟(flash drive)。 9. 一種用以控制有一組頁數的快閃記憶體系統的方法,包 括以下步驟: 將每頁分割成有不同容量的複數個記憶體區域; 取得資料; 在預設條件基礎上由複數個ECC引擎中選取一個適當 •的ECC ;及 儲存資料和ECC輸出。 \如申請專利範圍第9項所述之方法,其中預設條件包括 考量所使用記憶體區域和所放置的資料特性。 如申請專利範圍第9項所述之方法,其中ECC有不同 的位元長度。 12.如申請專利範圍第9項所述之方法,其中預設Ecc有不 同的編碼演算法。 1335502 , ---β fcj 修正晉 利範圍第12項所述之方法,其中編碼演算法 元格雷碑、里德所羅門碼、_碼、里德米勒碼、二次 70格雷碼、迴旋碼、及渴輪碼。 ^如:請專利範圍第9項所述之方法,其中每頁包含 2048位凡組或512位元組。 ^5.如申晴專利範圍第9項所述 記s 之方法,其中錯誤頻繁的 隐體£域搭配更長位元長度的ECC。 範圍第9項所述之方法,其中㈣記憶體系 二括USB隨身碟、SD卡、MMC卡、及快閃隨身碟。 “-種用以控制有一組頁數的快閃記憶體系統的方法, 包括以下步驟: 要求存取儲存於記憶體區域的資料; 透過快閃記憶體系統存取資料; 在預設條件基礎上*複數個Ecc引擎中選取—個適备 的 ECC ; ^ 用選取的ECC修正資料;及 輸出資料。 A如ΐ請專利範圍第17項所述之方法,其中預設條件包 括考量所使用記憶體區域和所放置的資料特性。 如申請專利範圍第17項所述之方法,其中ecc有不同 的位元長度。 机如中請專利範圍第17項所述之方法,其中預設Ecc有 20 13355021335502 -----^ Japanese Red Tube Change Page ff Year Correction L_ · X. Patent Application Format 1. A flash memory system, including: - Number of pages, each page is read by multiple readings of different capacities The fetch/write controller is used to control the composition of the A domain; the write; the data of the read-page or the error correction single heart contains at least two errors of the Correction Code) engine, each engine ^ rror to execute Error detection and error correction; A coded or decommissioned data - ECC judgment unit for ECC engine in preset conditions. A bite is applied as appropriate. 2. A flash memory system as described in claim i, wherein the pre-set conditions include consideration of the area of the memory and the characteristics of the data being placed. 3. The flash memory system of claim i, wherein the ECC has a different bit length. 8. The flash memory system of claim 1, wherein the ECC has different coding algorithms. 5. The flash memory system of claim 4, wherein the encoding algorithm comprises a Hamming code, a Reed Solo. Code (Reed-Solomon code, BCH code (Bose-Chaudhuri-Hocquenham, BCH), Reed-Muller code, Binary Golay code, and convolutional code (Reed-Solomon code) Convolutional code), and thirsty wheel code (turbo 1335502 ___ .', October 12, 1999 revised replacement page code) 〇 6. The flash memory system of claim 1, wherein each page contains 2048 A byte or 512-bit tuple. 7. A flash memory system as described in claim 1, wherein the frequently erroneous memory region is matched with a longer bit length ECC. The flash memory system of item 1, wherein the flash memory system includes a USB pen drive, a secure digital (SD) card, and a multimedia card (multi-media card ( MMC)), and flash drive 9. A method for controlling a flash memory system having a set of pages, comprising the steps of: dividing each page into a plurality of memories having different capacities Area; access to information; in pre-set conditions Based on a plurality of ECC engines, an appropriate ECC is selected; and the data and ECC output are stored. The method of claim 9, wherein the preset conditions include consideration of the memory area used and the placed The method of claim 9, wherein the ECC has a different bit length. 12. The method of claim 9, wherein the preset Ecc has a different encoding algorithm. , ---β fcj amends the method described in item 12 of the scope of the Jinli, in which the coding algorithm Yuan Leibei, Reed Solomon code, _ code, Reed Miller code, secondary 70 Gray code, convolutional code, and Thirsty wheel code. ^ For example, please refer to the method described in item 9 of the patent scope, in which each page contains 2048 bits or 512 bytes. ^5. For the method described in the 9th item of Shen Qing Patent Range, The error is frequently used in the implicit domain with a longer bit length ECC. The method described in the ninth item, wherein (4) the memory system includes a USB flash drive, an SD card, an MMC card, and a flash flash drive. Used to control flash memory with a set of pages The system method includes the following steps: requesting access to data stored in the memory area; accessing data through the flash memory system; selecting a suitable ECC from a plurality of Ecc engines based on preset conditions; Correct the data with the selected ECC; and output the data. A. The method of claim 17, wherein the preconditions include consideration of the memory area used and the characteristics of the data being placed. The method of claim 17, wherein the ecc has a different bit length. The method of claim 17, wherein the preset Ecc has 20 1335502 不同的編碼演算法。 21·如申請專利範圍第20項所述之方法,其尹編 包括漢明碼、里德所羅門碼、則碼、里德米勒碼、、二次 兀格雷碼、迴旋碼、及渦輪碼。 A如申請專利範圍第17項所述之方法,其中每頁包含 2048位元組或512位元組。 23.如中請專利範目第17項所述之 ♦記憶體區域搭配更長位Μ度的Εα。㈣的 24·如申請專利範圍第17項所述之方法,其中快閃記憶體 糸統包括USB隨身碟、抑卡、騰卡、及快閃隨身碟。 25.—種快閃記憶體系統,包括: —組頁數,每頁由相同容量的複數個記憶體區域所组 成;Different coding algorithms. 21. The method of claim 20, wherein the Yin code includes a Hamming code, a Reed Solomon code, a code, a Reed Miller code, a secondary 兀 Gray code, a whirling code, and a turbo code. A. The method of claim 17, wherein each page comprises 2048 bytes or 512 bytes. 23. As stated in paragraph 17 of the patent specification, the memory area is matched with the longer-order Εα. (4) The method of claim 17, wherein the flash memory system comprises a USB flash drive, a card, a card, and a flash flash drive. 25. A flash memory system comprising: - a number of pages, each page consisting of a plurality of memory regions of the same capacity; 一颉取/寫入控制器,用以控制其中 寫入; 一頁的資料讀取或 一錯誤修正單元,包含至少兩個Ecc引擎,每個引擎 可編碼或解碼資料用以執行錯誤偵測和錯誤修正;及 —ECC判斷單元,用以在預設條件基礎上選取一適當 ECC引擎。 * 26·如申請專利範圍第25項所述之快閃記憶體系統,其中 預設條件包括考量所使用記憶體區域和所放置的資料特 性。 ' 21a capture/write controller for controlling the writing therein; a page read or an error correction unit comprising at least two Ecc engines, each of which can encode or decode data for performing error detection and Error correction; and - ECC judgment unit for selecting an appropriate ECC engine based on preset conditions. *26. The flash memory system of claim 25, wherein the preset conditions include consideration of the memory area used and the data characteristics placed. ' twenty one 27.如申凊專利範圍第25項所述 Frr . 項所述之快閃記憶體系統,其中 ECC有不同的位元長度。 丁 28·如申請專利範圍第 許士 弟。項所返之快閃記憶體系統,其中 队匕有不同的編碼演算法。 專利範圍第28項所述之快閃記憶體㈣,其中 、石‘,、、决异法包括漢明碼、里德所羅門馬、懸瑪、里德米 勒碼、二次元格雷碼、迴旋碼、及渴輪碼。 —如申喷專利範圍第25項所述之快閃記憶體系統,其中 母頁包含2048位元組或512位元組。 如申明專利範圍第25項所述之快閃記憶體系統,其中 複數個記憶體區域各有n x 512位元址的容量,而n是一 個自然數。 32·如申请專利範圍第25項所述之快閃記憶體系統,其中 錯誤頻繁的記憶體區域搭配更長位元長度的Ecc。 33.如申請專利範圍第託項所述之快閃記憶體系統,其中籲 快閃記憶體系統包括USB隨身碟、SD卡、MMC卡、及快閃 隨身碟。 •種用以控制有一組頁數的快閃記憶體系統的方法,包 括以下步驟: 將每頁分割成有相同容量的複數個記憶體區域; 取得資料; 在預設條件基礎上由複數個ECC引擎中選取一個適當 22 1335502 - ^ 99年10月12日修正替換頁 秦 - —— I " " " ' - " ' ••的ECC ;及 儲存資料和ECC輸出。27. A flash memory system as described in claim 25, wherein the ECC has a different bit length. Ding 28·If you apply for the patent scope, Xu Shidi. The flash memory system returned by the item, in which the team has different coding algorithms. The flash memory (4) described in the scope of Patent No. 28, wherein the stone ',, and the different methods include Hamming code, Reed Solomon horse, hanging horse, Ridmüller code, quadratic Gray code, and convolutional code. And thirsty wheel code. - A flash memory system as described in claim 25, wherein the master page comprises 2048 bytes or 512 bytes. A flash memory system as claimed in claim 25, wherein the plurality of memory regions each have a capacity of n x 512 bit addresses, and n is a natural number. 32. The flash memory system of claim 25, wherein the frequently erroneous memory region is matched with a longer bit length Ecc. 33. The flash memory system of claim 1, wherein the flash memory system comprises a USB flash drive, an SD card, an MMC card, and a flash drive. A method for controlling a flash memory system having a set of pages, comprising the steps of: dividing each page into a plurality of memory regions having the same capacity; acquiring data; and a plurality of ECCs based on preset conditions Select an appropriate 22 1335502 - ^ October 12, 99, replace the replacement page Qin - —— I """" ' - " ' • ECC; and store data and ECC output. 23 1335502 七 99年10月I2日修正管換頁 、指定代表圖: (一) 本案指定代表圖為:第(2 )圖。 (二) 本代表圖之元件符號簡單說明:23 1335502 7 October 1999 I2 correction tube change page, designated representative map: (1) The representative representative of the case is: (2). (2) A brief description of the symbol of the representative figure: 20 頁 21 讀取/寫入控制器 22 ECC判斷單元 23 錯誤修正單元 231 ECC引擎 232 ECC引擎 233 ECC引擎 八 本案若有化學式時,請揭示最能顯示發明特徵的 化學式: 4Page 20 21 Read/Write Controller 22 ECC Judgment Unit 23 Error Correction Unit 231 ECC Engine 232 ECC Engine 233 ECC Engine 8 If there is a chemical formula in this case, please reveal the chemical formula that best shows the characteristics of the invention: 4
TW96110780A 2007-03-28 2007-03-28 Flash memory system and method for controlling the same TWI335502B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW96110780A TWI335502B (en) 2007-03-28 2007-03-28 Flash memory system and method for controlling the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW96110780A TWI335502B (en) 2007-03-28 2007-03-28 Flash memory system and method for controlling the same

Publications (2)

Publication Number Publication Date
TW200839502A TW200839502A (en) 2008-10-01
TWI335502B true TWI335502B (en) 2011-01-01

Family

ID=44820871

Family Applications (1)

Application Number Title Priority Date Filing Date
TW96110780A TWI335502B (en) 2007-03-28 2007-03-28 Flash memory system and method for controlling the same

Country Status (1)

Country Link
TW (1) TWI335502B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI475378B (en) * 2008-10-09 2015-03-01 Micron Technology Inc Storage system to couple to a host, controller to interface with nand memory in storage system, and method of managing a stack of nand memory devices
JP5650116B2 (en) 2008-10-09 2015-01-07 マイクロン テクノロジー, インク. Virtualized ECC-NAND
US8935592B2 (en) * 2012-11-20 2015-01-13 Arm Limited Apparatus and method for correcting errors in data accessed from a memory device
TWI685850B (en) * 2018-08-22 2020-02-21 大陸商深圳大心電子科技有限公司 Memory management method and storage controller

Also Published As

Publication number Publication date
TW200839502A (en) 2008-10-01

Similar Documents

Publication Publication Date Title
US7900118B2 (en) Flash memory system and method for controlling the same
US8239725B2 (en) Data storage with an outer block code and a stream-based inner code
US8726140B2 (en) Dummy data padding and error code correcting memory controller, data processing method thereof, and memory system including the same
US9124300B2 (en) Error correction coding in non-volatile memory
TWI479506B (en) Memory controller supporting rate-compatible punctured codes
US8635510B2 (en) Non-systematic coded error correction
TWI332611B (en) Method for writing data in flash memory and error correction coding/decoding method thereof
JP2015507409A (en) Multi-phase ECC encoding using algebraic codes
TW201025346A (en) Flash memory controller, error correction code controller therein, and the methods and systems thereof
US20080294935A1 (en) Data structure for flash memory and data reading/writing method thereof
TW201245953A (en) Data recovery using additional error correction coding data
KR20120134144A (en) Non-regular parity distribution detection via metadata tag
TW201331946A (en) Using ECC encoding to verify an ECC decode operation
TW200910367A (en) Flash memory device and error correction method
US9003264B1 (en) Systems, methods, and devices for multi-dimensional flash RAID data protection
WO2014066595A2 (en) Non-volatile memory error correction
CN101281788A (en) Flash memory system as well as control method thereof
TWI335502B (en) Flash memory system and method for controlling the same
JP4819843B2 (en) ECC code generation method for memory device
TWI309776B (en) Secure storage system and method for solid memory
JP4300462B2 (en) Information recording / reproducing method and apparatus
CN101634938A (en) Data migration method and data migration device of solid state disk and solid state disk
CN104182292A (en) Data storage method and device
TW200839503A (en) Nonvolatile memory with modulated error correction coding
CN103098378B (en) System and method of distributive ecc processing