TWI594251B - Memory control method, controller and electronic device - Google Patents

Memory control method, controller and electronic device Download PDF

Info

Publication number
TWI594251B
TWI594251B TW102117418A TW102117418A TWI594251B TW I594251 B TWI594251 B TW I594251B TW 102117418 A TW102117418 A TW 102117418A TW 102117418 A TW102117418 A TW 102117418A TW I594251 B TWI594251 B TW I594251B
Authority
TW
Taiwan
Prior art keywords
data
memory
column
memory element
input data
Prior art date
Application number
TW102117418A
Other languages
Chinese (zh)
Other versions
TW201351424A (en
Inventor
楊宗杰
Original Assignee
慧榮科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 慧榮科技股份有限公司 filed Critical 慧榮科技股份有限公司
Priority to CN201710152409.9A priority Critical patent/CN107133122B/en
Priority to US13/911,096 priority patent/US9417958B2/en
Priority to CN201310223394.2A priority patent/CN103473146B/en
Publication of TW201351424A publication Critical patent/TW201351424A/en
Priority to KR1020140040462A priority patent/KR101659888B1/en
Priority to US14/600,020 priority patent/US9268638B2/en
Application granted granted Critical
Publication of TWI594251B publication Critical patent/TWI594251B/en

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Read Only Memory (AREA)

Description

記憶體控制方法、控制器跟電子裝置 Memory control method, controller and electronic device

本發明是關於快閃記憶體的錯誤處理裝置與方法,且特別是關於多維度快閃記憶體的錯誤處理裝置與方法。 The present invention relates to error handling apparatus and methods for flash memory, and more particularly to error handling apparatus and methods for multi-dimensional flash memory.

快閃記憶體等非揮發性記憶體近年來快速發展,並且出現在各式各樣的電子裝置。目前看來,接下來不管是容量或是技術的發展,還會繼續加強。一旦越來越多的資料被放在這類的非揮發性記憶體,為了確保儲存資料的正確性與安全性,提供有效而且可靠的錯誤偵測與錯誤管理也就越來越重要。 Non-volatile memory such as flash memory has developed rapidly in recent years and has appeared in a wide variety of electronic devices. At present, it seems that the next step will continue to strengthen regardless of the development of capacity or technology. Once more and more data is placed in such non-volatile memory, it is increasingly important to provide effective and reliable error detection and error management in order to ensure the correctness and security of stored data.

根據本發明的一個實施例提供的是一種記憶體控制方法,用於控制快閃記憶體。該快閃記憶體包含第一記憶元件與第二記憶元件,該第二記憶元件包含複數區塊,每一該區塊包含複數資料頁。在這個記憶體控制方法中,首先,將一原始資料寫入到該第一記憶元件。並且,從該第一記憶元件讀取該原始資料得到一輸入資料,該輸入資料包含複數輸入資料列。此外,將該複數輸入資料列分成複數資料組。將每一該資料組對應的每一該輸入資料列寫到該第二記憶元件對應的一個該資料頁。並且,將對應每一該資料組的一校驗列寫到該第二記憶元件對應的一個該資料頁,其中,每一該資料組對應的該資料列之數目小於該第二記憶元件每一該區塊具有的該資料頁之數目。 According to an embodiment of the present invention, a memory control method for controlling a flash memory is provided. The flash memory includes a first memory element and a second memory element, the second memory element comprising a plurality of blocks, each of the blocks comprising a plurality of data pages. In this memory control method, first, an original material is written to the first memory element. And reading the original data from the first memory element to obtain an input data, the input data comprising a plurality of input data columns. In addition, the complex input data column is divided into a plurality of data sets. Each of the input data columns corresponding to each of the data sets is written to one of the data pages corresponding to the second memory element. And writing a check column corresponding to each of the data groups to the data page corresponding to the second memory element, wherein the number of the data columns corresponding to each of the data groups is smaller than each of the second memory elements The number of pages of this material that the block has.

根據本發明的另一實施例提供的是一種記憶體控制器,用 於控制一快閃記憶體。該快閃記憶體包含一第一記憶元件與一第二記憶元件,該第二記憶元件包含複數區塊,每一區塊包含複數資料頁,該記憶體控制器包含第一記憶元件寫入器、讀取器跟第二記憶元件寫入器。第一記憶元件寫入器將一原始資料寫入到該第一記憶元件。讀取器從該第一記憶記憶元件讀出該原始資料並產生一輸入資料,該輸入資料包含複數輸入資料列。 According to another embodiment of the present invention, a memory controller is provided. For controlling a flash memory. The flash memory includes a first memory element and a second memory element, the second memory element includes a plurality of blocks, each block includes a plurality of data pages, and the memory controller includes a first memory element writer , the reader and the second memory component writer. The first memory element writer writes an original material to the first memory element. The reader reads the raw data from the first memory storage element and generates an input data comprising a plurality of input data columns.

第二記憶元件寫入器將該複數輸入資料列分成複數資料組,將每一該資料組對應的該些輸入資料列寫到該第二記憶元件對應的該些資料頁,以及將對應每一該資料組對應的一校驗列寫到該第二記憶元件對應的該資料頁,其中,每一該資料組對應的該些輸入資料列之數目小於該第二記憶元件每一該區塊具有的該資料頁之數目。 The second memory element writer divides the plurality of input data columns into a plurality of data sets, and writes the input data columns corresponding to each of the data sets to the data pages corresponding to the second memory elements, and corresponding each a check column corresponding to the data set is written to the data page corresponding to the second memory element, wherein the number of the input data columns corresponding to each of the data sets is smaller than each of the second memory elements The number of this information page.

根據本發明的另一實施例提供的是一種電子裝置,具有快閃記憶體跟控制器。快閃記憶體包含一第一記憶元件與一第二記憶元件,該第二記憶元件包含複數區塊,每一區塊包含複數資料頁。 According to another embodiment of the present invention, an electronic device having a flash memory and a controller is provided. The flash memory includes a first memory element and a second memory element, the second memory element comprising a plurality of blocks, each block comprising a plurality of data pages.

記憶體控制器,用於控制該快閃記憶體。該記憶體控制器具有第一記憶元件寫入器、一讀取器,以及第二記憶元件寫入器。第一記憶元件寫入器,將一輸入資料寫入到該第一記憶元件。讀取器從該第一記憶記憶元件讀出該待輸入資料,該輸入資料包含複數輸入資料列。第二記憶元件寫入器將該複數輸入資料列分成複數資料組,將每一資料組對應的該些輸入資料列寫到該第二記憶元件對應的該些資料頁,以及將對應每一資料組的一校驗列寫到該第二記憶元件對應的該資料頁,其中,每一該資料組對應的該些輸入資料列數目小於該第二記憶元件每一該區塊具有的資料頁數目。 A memory controller for controlling the flash memory. The memory controller has a first memory element writer, a reader, and a second memory element writer. The first memory element writer writes an input data to the first memory element. The reader reads the data to be input from the first memory storage element, the input data comprising a plurality of input data columns. The second memory element writer divides the plurality of input data columns into a plurality of data groups, and writes the input data columns corresponding to each data group to the data pages corresponding to the second memory element, and corresponding data a check column of the group is written to the data page corresponding to the second memory element, wherein the number of the input data columns corresponding to each of the data groups is smaller than the number of data pages of each block of the second memory device Head.

根據本發明的另一個實施例提供的是一種記憶體控制方法,用於控制一快閃記憶體。該快閃記憶體包含一記憶元件,該記 憶元件包含複數區塊,每一區塊包含複數資料頁。該記憶體控制方法包含下列步驟。 According to another embodiment of the present invention, a memory control method for controlling a flash memory is provided. The flash memory includes a memory component, the memory The component contains a plurality of blocks, each block containing a plurality of data pages. The memory control method includes the following steps.

讀取一資料組設定,該資料組設定指示一個資料組包含的複數資料列之一數目,每一資料列存於對應的一個該資料頁,且該資料組的該複數輸入資料列之數目少於每一該區塊所擁有的複數資料頁個數。根據該資料組設定,從該記憶元件讀取對應一個該資料組的該複數資料列以及一校驗列。此外,利用該校驗列對讀取的該複數資料列進行錯誤偵測及更正。 Reading a data set setting, indicating the number of the plurality of data columns included in one data group, each data column being stored in a corresponding one of the data pages, and the number of the plural input data columns of the data group is small The number of multiple data pages owned by each block. According to the data set setting, the complex data column corresponding to one of the data groups and a check column are read from the memory element. In addition, the check column is used to perform error detection and correction on the read complex data column.

701‧‧‧應用電路(Application Circuit) 701‧‧‧Application Circuit

702‧‧‧驅動程式 702‧‧‧Driver

703‧‧‧控制器 703‧‧‧ Controller

704‧‧‧緩衝記憶體 704‧‧‧ buffer memory

705‧‧‧快閃記憶體 705‧‧‧Flash memory

80‧‧‧快閃記憶體 80‧‧‧Flash memory

804‧‧‧記憶體介面電路 804‧‧‧Memory interface circuit

SLC 806‧‧‧單層式儲存單元快閃記憶體體模塊 SLC 806‧‧‧Single-layer storage unit flash memory body module

MLC A 807、MLC B 808‧‧‧多層式儲存式儲存單元快閃記憶體模塊 MLC A 807, MLC B 808‧‧‧Multilayer storage storage unit flash memory module

82‧‧‧控制器 82‧‧‧ Controller

820‧‧‧第一記憶元件寫入器 820‧‧‧First Memory Component Writer

824‧‧‧讀取器 824‧‧‧Reader

824‧‧‧第二記憶元件寫入器 824‧‧‧Second memory component writer

第1圖例示一個NAND結構快閃記憶體的記憶元件的一個區塊。 Figure 1 illustrates a block of a memory element of a NAND structured flash memory.

第2圖是一個三層式儲存單元(TLC)的快閃記憶體儲存單元存放電量跟操作電壓的示意圖。 Figure 2 is a schematic diagram of the storage capacity and operating voltage of a flash memory storage unit of a three-layer storage unit (TLC).

第3圖例示如果對儲存單元施加操作電壓VT_1所可能發生的情形。 Fig. 3 illustrates a situation that may occur if an operating voltage VT_1 is applied to the storage unit.

第4圖例示在一次的讀取操作時,依序使用7個不同的電壓對儲存單元進行讀取操作。 Figure 4 illustrates the sequential read operation of the memory cell using seven different voltages during a single read operation.

第5圖例示用來找CSB的方法。 Figure 5 illustrates the method used to find the CSB.

第6圖例示用來找MSB的方法。 Figure 6 illustrates the method used to find the MSB.

第7圖例示一個使用快閃記憶體的電子裝置的範例。 Fig. 7 illustrates an example of an electronic device using a flash memory.

第8圖說明包括一個具有階層式記憶元件架構的快閃記憶體架構。 Figure 8 illustrates a flash memory architecture including a hierarchical memory component architecture.

第9圖說明在多層式儲存單元快閃記憶體裡頭的資料存放格式。 Figure 9 illustrates the data storage format in the flash memory of the multi-layer storage unit.

第10圖說明第二種配對資料跟校驗資料的方法。 Figure 10 illustrates the second method of pairing data and verifying data.

第11圖說明第三種配對資料跟校驗碼的方法。 Figure 11 illustrates the third method of pairing data and checksums.

第12圖為流程圖。 Figure 12 is a flow chart.

第13圖~第16圖為示意圖。 Figures 13 to 16 are schematic views.

第17圖例示一種記憶體控制方法實施例的流程圖。 Figure 17 illustrates a flow chart of an embodiment of a memory control method.

第18圖例示快閃記憶體模塊一個區塊的邏輯分配示意圖。 Figure 18 illustrates a schematic diagram of the logical allocation of a block of a flash memory module.

第19圖~第20圖為快閃記憶體模塊除錯之示意圖。 Figure 19 to Figure 20 are schematic diagrams of the debugging of the flash memory module.

本發明的實施例包括一種記憶體控制方法,透過軟體、硬體或軟體加硬體的方式實作,用來控制快閃記憶體。在這個記憶體控制方法的實施例中,被控制的快閃記憶體具有一個或多個的第一類記憶元件跟一個或多個的第二類記憶元件,且亦為快閃記憶體模塊,例如以裸晶的方式封裝在一起,或是以晶片的方式透過連接線連在一起或其他製作方式產生。第一類記憶元件相對於第二類記憶元件相對穩定,出錯率較低。在原始資料要寫入快閃記憶體時,先將原始資料寫入第一類記憶元件。然後,在適當的時間,原始資料再度從第一類記憶元件讀出,作為寫入第二類記憶元件的輸入資料。 Embodiments of the present invention include a memory control method implemented by software, hardware, or software plus hardware for controlling flash memory. In an embodiment of the memory control method, the controlled flash memory has one or more first type memory elements and one or more second type memory elements, and is also a flash memory module. For example, they are packaged together in a bare crystal manner, or are connected in a wafer manner through a connection line or other fabrication methods. The first type of memory element is relatively stable relative to the second type of memory element and has a low error rate. When the original data is to be written to the flash memory, the original data is first written into the first type of memory element. Then, at the appropriate time, the original data is again read from the first type of memory element as input data for writing to the second type of memory element.

第二類記憶元件具有多個區塊(block),每個區塊包括一定數目的資料頁(page)。上述的輸入資料被分成多個資料組,每個資料組具有一定數目的輸入資料列。資料組所具有輸入資料列的數目小於第二類記憶元件每個區塊所能承載的資料頁數目。換言之,第二類記憶元件的每個區塊可存放多個資料組的輸入資料列。 The second type of memory element has a plurality of blocks, each block including a certain number of pages. The above input data is divided into a plurality of data groups, each of which has a certain number of input data columns. The data set has a number of input data columns that is smaller than the number of data pages that can be carried by each block of the second type of memory element. In other words, each block of the second type of memory element can store input data columns of multiple data sets.

如上所述,由於第二類記憶元件的穩定性可能較差,因此,對要存放到第二類記憶元件的每個資料組,可透過低密度校驗碼(low density parity-check,LDPC)、波西-曹杜立-霍權漢(Bose-Chaudhuri-Hocquenghem,BCH)等已知的校驗碼(parity)產生方法來計算對應每個資料組的校驗列(parity row)。除此以外,每個輸入資料列本身也可以包含對應該輸入資料列的列校驗碼(row parity code)。 As described above, since the stability of the second type of memory element may be poor, each data set to be stored in the second type of memory element may pass through a low density parity-check (LDPC), A known parity generation method such as Bose-Chaudhuri-Hocquenghem (BCH) calculates a parity row corresponding to each data group. In addition, each input data column itself can also contain a row parity code corresponding to the input data column.

相對於以整個區塊作為單位,採用上述資料組的方法可減少寫入過程斷電或其他原因造成寫入中斷的風險。 The use of the above data set method in the entire block as a unit can reduce the risk of write interruption due to power failure during writing or other reasons.

此外,每個資料組對應的輸入資料列數目可設定跟調整,且每個資料組可設定對應一個或多個校驗列。這樣的設計可針對第二記憶元件的特性來做調整。 In addition, the number of input data columns corresponding to each data group can be set and adjusted, and each data group can be set corresponding to one or more check columns. Such a design can be adjusted for the characteristics of the second memory element.

此外,在不同的區塊中,資料組可設定為包含不同數目的輸入資料列。事實上,在同一區塊中,不同的資料組也可以有不同數目的輸入資料列。 In addition, in different blocks, the data set can be set to contain a different number of input data columns. In fact, different data sets can have different numbers of input data columns in the same block.

舉例來說,第一類記憶元件可為單層式儲存快閃記憶體(Single Level Cell Flash Memory),也就是每個儲存單元存放的電位代表一個位元,第二類記憶元件可為多層式儲存快閃記憶體(Multiple Layer Cell Flash Memory),例如三層式儲存快閃記憶體(Triple Layer Cell Flash Memory),在一個儲存單元可存放代表多個位元的資訊,例如一個儲存單元可存放三個位元的資訊。在這樣的配置下,隨著半導體製程持續往高密集度微小化發展,加上對於成本下降的需求,每個儲存單元的穩定性有越來越大的問題。 For example, the first type of memory component can be a single level memory flash memory, that is, the potential stored in each storage unit represents one bit, and the second type of memory element can be multi-layered. Multiple Layer Cell Flash Memory, such as Triple Layer Cell Flash Memory, can store information representing multiple bits in a storage unit, for example, a storage unit can be stored. Three bits of information. Under such a configuration, as semiconductor processes continue to develop toward high density miniaturization, coupled with the need for cost reduction, the stability of each storage unit has become increasingly problematic.

透過上述的設計概念,可以針對不同穩定性的快閃記憶體,使用同一套記憶體控制電路的設計。例如,在確定在某個設計下,會使用到穩定性較低的第二類記憶元件,可增加每個資料組所使用校驗列的數目,減少每個資料組所對應的輸入資料列數目等,或增加列校驗碼的佔全體資料的比例等。 Through the above design concept, the same set of memory control circuit design can be used for different stability flash memories. For example, when it is determined that a second type of memory element with lower stability is used under a certain design, the number of check columns used by each data group can be increased, and the number of input data columns corresponding to each data group can be reduced. Etc., or increase the proportion of the column check code in the total data.

相反的,假如第二類記憶元件的錯誤率相對較少,則可設定增加每個資料組所包含的輸入資料列的數目,或是減少校驗列與列校驗碼佔全體資料的比例。 Conversely, if the error rate of the second type of memory element is relatively small, it can be set to increase the number of input data columns included in each data group, or to reduce the ratio of the check column and the column check code to the total data.

除了出廠時可進行上述設置外,也可在控制電路中設定動態偵測的機制。假如發現第二類記憶元件的穩定性在產品使用的過程中逐漸變差,可動態調整每個資料組對應的輸入資料列的比例。藉此,即使電子裝置用久了,資料的穩定性也不會有急速的降低。 In addition to the above settings, the dynamic detection mechanism can also be set in the control circuit. If the stability of the second type of memory element is found to be gradually degraded during the use of the product, the proportion of the input data column corresponding to each data set can be dynamically adjusted. Thereby, even if the electronic device is used for a long time, the stability of the data does not decrease rapidly.

必須說明的是,雖然這邊舉例的第一類記憶元件與第二類記憶元件為快閃記憶體裡的電路,但本領域技術入員透過本說明的介紹,應該可以將同一個概念用在快閃記憶體以外的儲存裝置。 It should be noted that although the first type of memory element and the second type of memory element exemplified herein are circuits in the flash memory, the introduction of the present description by the technical personnel in the field should be able to apply the same concept to A storage device other than flash memory.

本發明的實施例還包括如上說明的記憶體控制器,以及配備此記憶體控制器與快閃記憶體的電子裝置。 Embodiments of the present invention also include a memory controller as described above, and an electronic device equipped with the memory controller and flash memory.

此外,本發明的實施例還包括記憶體控制方法,用來讀取快閃記憶體的資料。其讀取資料組設定,以得知快閃記憶體每個區塊包含的資料組設定方式,例如每個資料組包含多少數目的輸入資料列以及多少數目的校驗列。 In addition, embodiments of the present invention also include a memory control method for reading data of a flash memory. It reads the data set settings to know how the data set is included in each block of the flash memory, such as how many input data columns and how many check columns are included in each data set.

在得知快閃記憶體的資料組設定後,以每個資料組作為單位,將資料組的資料列依次讀出。在讀出資料列後,使用資料列的列校驗碼對資料列進行錯誤的偵測動作。假如發現透過列校驗碼即可更正錯誤,則對資料列進行錯誤更正。 After knowing the data set of the flash memory, the data column of the data group is sequentially read out by using each data group as a unit. After reading the data column, the column of the data column is used to perform an error detection operation on the data column. If you find that you can correct the error by using the checksum code, you will correct the error in the data column.

假如發現透過列校驗碼還是無法更正資料,例如列校驗碼能承受的錯誤只有兩個位元,而實際資料有三個以上的錯誤時,則繼續透過資料組的校驗列進行錯誤的偵測與更正。反之,假如無法透過列校驗碼進行錯誤的偵測與更正,則記錄下到底是哪幾個資料列屬於無法更正的情況。 If it is found that the data cannot be corrected by the column check code, for example, the error that the column check code can bear is only two bits, and if the actual data has more than three errors, the error check is continued through the check column of the data group. Test and correction. On the other hand, if the error detection and correction cannot be performed through the column check code, it is recorded which of the data columns are uncorrectable.

此外,如上所述,每一資料組具有複數個資料列,這些資料列按序排列時,構成具有列與行的矩陣(array)。對於每一行資料,有對應的校驗列的校驗資料(parity data)。假如使用的是LDPC或BCH等錯誤偵測與更正方法來產生校驗列,此時可透過校驗列跟資料組的資料列進行計算,而得出每行對應的症狀(syndrome)。在這些方法中,症狀可以指出,有可能是那些資料列出現錯誤。 Further, as described above, each data group has a plurality of data columns which, when arranged in order, constitute an array having columns and rows. For each line of data, there is a parity data for the corresponding check column. If an error detection and correction method such as LDPC or BCH is used to generate the check column, the check column can be calculated through the check column and the data column of the data group to obtain the symptom corresponding to each line (syndrome). In these methods, the symptoms can indicate that there may be errors in those data columns.

假如症狀指出的出錯資料列跟前述記錄下來無法更正且出現錯誤的資料列記錄吻合,則推測症狀指出的錯誤是可靠的。此 時,透過校驗列的校驗資料對資料列的錯誤內容進行更正。 If the error data column indicated by the symptom coincides with the record of the data record that cannot be corrected and the error is recorded, the error indicated by the symptom is reliable. this When correcting the error content of the data column through the verification data of the verification column.

隨著上述方法的逐次進行,可進一步減少錯誤。此時,可再次進行列校驗碼的計算。原先可能因為一個資料列有超過三個位元出錯而無法更正的情況,由於這三個位元已經更正一個位元,讓錯誤降低到兩個位元,因此,已經可以用列校驗碼來更正錯誤。 As the above methods are performed sequentially, errors can be further reduced. At this time, the calculation of the column check code can be performed again. Originally, it may be impossible to correct because one data column has more than three bit errors. Since these three bits have corrected one bit and the error is reduced to two bits, the column check code can already be used. correct the mistake.

隨著列校驗碼進一步減少錯誤位元,可再次進行上述症狀的計算。如果有需要,可進行多次(iteration)的動作,逐步找出錯誤,並在一定的限制條件下,盡可能更正所有的錯誤,以確保資料的正確性與穩定性。 As the column check code further reduces the error bit, the calculation of the above symptoms can be performed again. If necessary, you can perform multiple iterations, find out the errors step by step, and correct all errors as much as possible to ensure the correctness and stability of the data.

這樣的特性,對於保存使用者資料來說,是極端重要的。雖然為了降低成本,可能需要使用穩定性較低的第二記憶單元,但透過上述方法,可盡量降低使用者寶貴資料喪失的風險。 Such characteristics are extremely important for preserving user data. Although it is necessary to use a second memory unit with lower stability in order to reduce the cost, the above method can minimize the risk of loss of valuable data of the user.

以下將進一步透過圖示,更詳細的說明關於本發明實施例的實際製作方法。 The actual fabrication method of the embodiment of the present invention will be described in more detail below by way of illustration.

請參考第1圖,其例示一個NAND結構快閃記憶體的記憶元件的一個區塊(block)。在這個區塊中具有一定數目的資料頁(Page),亦即P_0、P_1、P_2、到P_N。每一個資料頁則具有M_0、M_1、M_2、到M_K個記憶單元(cell)。透過對每資料頁設定適當的電壓VG_0、VG_1、VG_2、到VG_N,可讀取存於每個儲存單元的浮動閘(Floating Gate)的電位,進而得到每個儲存單元所存放的資料。 Please refer to FIG. 1, which illustrates a block of a memory element of a NAND structure flash memory. There are a certain number of pages in this block, namely P_0, P_1, P_2, and P_N. Each data page has M_0, M_1, M_2, and M_K memory cells. By setting the appropriate voltages VG_0, VG_1, VG_2, and VG_N for each data page, the potential of the floating gate stored in each storage unit can be read, and the data stored in each storage unit can be obtained.

對於單層式儲存單元(SLC)快閃記憶體來說,每個儲存單元只存放一個位元的資料,也就是0或1。此時,理論上,只要給每資料頁適當的一個設定電壓VG_0、VG_1、VG_2、到VG_N,就可以偵測出到底儲存單元存放的電量,而得出對應的資料值。 For single-layer storage unit (SLC) flash memory, each storage unit stores only one bit of data, which is 0 or 1. At this time, in theory, as long as the appropriate set voltage VG_0, VG_1, VG_2, and VG_N for each data page, the amount of power stored in the storage unit can be detected, and the corresponding data value is obtained.

相對的,假如是多層式儲存單元(MLC)快閃記憶體,針對 一次的讀取動作就需要施加多個不同的設定電壓,以判斷到底儲存單元裡頭存放的電量到底是多少,而換算出實際存放的資料內容。 In contrast, if it is a multi-layer storage unit (MLC) flash memory, A single read operation requires the application of a plurality of different set voltages to determine exactly what amount of power stored in the storage unit is, and to convert the actual stored data content.

第2圖是一個三層式儲存單元(TLC)的快閃記憶體儲存單元存放電量跟操作電壓的示意圖。在這個示意圖中可看到,一個儲存單元根據儲存的電量落在L0、L1、L2...L7區間,而代表存放的位元資料分別為111,011,001,...110。 Figure 2 is a schematic diagram of the storage capacity and operating voltage of a flash memory storage unit of a three-layer storage unit (TLC). As can be seen in this diagram, a storage unit falls within the L0, L1, L2, ... L7 interval according to the stored power, and the stored bit data is 111, 011, 001, ... 110, respectively.

對於這樣的儲存單元,理論上,在施加VT_1的操作電壓時,偵測電路可以判斷到底儲存單元存放的電量是屬於L0這一邊,也就是資料111,或是L1,L2,L3,L4,L5,L6,L7那一邊,也就是資料為111,011,001,101,100,000或110。 For such a storage unit, in theory, when the operating voltage of VT_1 is applied, the detecting circuit can determine whether the amount of electricity stored in the storage unit belongs to the side of L0, that is, the data 111, or L1, L2, L3, L4, L5. On the side of L6, L7, that is, the data is 111, 011, 001, 101, 100, 000 or 110.

透過有次序的施加多個不同的電壓組合,理論上就可以判斷出所有三個位元的資料,也就是最大位元MSB(Most Significant Bit)、CSB(Central Significant Bit)與LSB(Least Significant Bit)的資料內容。 By sequentially applying a plurality of different voltage combinations, it is theoretically possible to determine the data of all three bits, that is, the Most Significant Bit (MSB), the Central Significant Bit (CSB), and the LSB (Least Significant Bit). ) the content of the information.

但是,如上所述,隨著半導體製程持續朝密集化以及微小化的方向發展,以及快閃記憶體為了降低成本或是使用時間越來越長,相關的電路以及記憶體儲存單元的穩定性的問題越來越大。 However, as described above, as the semiconductor process continues to develop toward miniaturization and miniaturization, and the flash memory is used to reduce cost or use time, the related circuits and the stability of the memory storage unit are The problem is getting bigger and bigger.

第3圖例示一種可能的狀況,也就是如果對儲存單元施加操作電壓VT_1,有可能因為位元狀態間出現部分重疊或甚至位移,導致解讀出的資料發生不正確的情形。在這樣的情況下,就需要透過各種不同錯誤校驗方法,或是動態調整操作電壓來解決資料判斷不準確的問題。 Fig. 3 illustrates a possible situation, that is, if the operating voltage VT_1 is applied to the storage unit, there is a possibility that the read data is incorrect due to partial overlap or even displacement between the bit states. In such a case, it is necessary to solve the problem of inaccurate data judgment through various error verification methods or dynamically adjusting the operating voltage.

第4圖例示在一次的讀取操作時,依序使用7個不同的電壓對儲存單元進行讀取操作,偵測儲存單元內浮動閘的電量,以判讀儲存單元存放的資料的LSB數值到底是0還是1。 Figure 4 illustrates the reading operation of the storage unit using seven different voltages in sequence during a single read operation. The power of the floating gate in the storage unit is detected to determine the LSB value of the data stored in the storage unit. 0 or 1.

從第4圖可以清楚看到,如果儲存單元儲存的電量分佈落 在VLSB的左側L0,L1,L2,L3,代表LSB的內容是0。相反的,如果是落在VLSB的右側L4,L5,L6,L7,則代表LSB的內容是1。 It can be clearly seen from Figure 4 that if the amount of electricity stored in the storage unit falls On the left side of the VLSB, L0, L1, L2, L3, the content representing the LSB is 0. Conversely, if it falls on the right side of the VLSB, L4, L5, L6, and L7, the content representing the LSB is 1.

由於在狀態間有重疊的問題,因此,可依序施加不同的電壓VLSB,VLSB+D,VLSB-D,VLSB+2D,VLSB-2D,VLSB+3D,VLSB-3D。藉此,假如儲存單元的電量分佈剛好落在例如VLSB+D與VLSB之間,就可以從偵測的結果得到一定的情報。 Due to the overlap between states, different voltages VLSB, VLSB+D, VLSB-D, VLSB+2D, VLSB-2D, VLSB+3D, VLSB-3D can be applied sequentially. Thereby, if the power distribution of the storage unit falls just between, for example, VLSB+D and VLSB, certain information can be obtained from the detection result.

每次施加一個電壓可以得到一個位元結果,因此7次電壓就可以得到7個位元。這7個位元總共有八種可能的組合。由這7個位元對應的位元序(bit sequence),可配合LDPC的解碼電路跟方法,用來計算校驗碼以及用來找出正確的位元資料,也就是利用所取得之軟資訊(soft information)搭配LDPC與BCH等方法,用來進行錯誤校驗。 Each time a voltage is applied, one bit result can be obtained, so 7 voltages can get 7 bits. There are a total of eight possible combinations of these seven bits. The bit sequence corresponding to the 7 bits can be combined with the decoding circuit and method of the LDPC to calculate the check code and find the correct bit data, that is, to use the obtained soft information. (soft information) with LDPC and BCH and other methods for error checking.

第5圖例示用來找CSB的方法。由於CSB代表第二個位元,在第5圖中可看到如果儲存單元的電量是落在L2,L3,L4,L5則代表儲存單元儲存的CSB是0。另一方面,如果儲存單元的電量落在L0,L1,L6,L7區間,則代表儲存單元儲存的CSB是1。在這樣的配置下,可以理解的是需要使用VCSB1與VCSB2兩個操作電壓來過濾出到底儲存單元的電量是落在哪個區間。 Figure 5 illustrates the method used to find the CSB. Since CSB represents the second bit, it can be seen in Figure 5 that if the power of the storage unit falls to L2, L3, L4, and L5, the CSB stored in the storage unit is 0. On the other hand, if the power of the storage unit falls within the L0, L1, L6, and L7 intervals, the CSB stored on behalf of the storage unit is 1. Under such a configuration, it can be understood that it is necessary to use the two operating voltages of VCSB1 and VCSB2 to filter out which area the power of the storage unit falls.

相似於上述的說明,VCSB1與VCSB2也可以施加多個步進調整量,依序多次用不同的電壓進行讀取的動作。每次讀取的結果產生位元序,可搭配LDPC與BCH等方法,用來進行錯誤校驗。 Similar to the above description, VCSB1 and VCSB2 can also apply a plurality of step adjustment amounts, and sequentially perform reading operations with different voltages. The result of each reading produces a bit sequence, which can be used with LDPC and BCH to perform error checking.

第6圖例示用來找MSB的方方法。由於MSB代表最高的位元,在第6圖中可看到如果儲存單元的電量是落在L0,L3,L4,L7區間,則代表儲存單元存放的MSB位元為1。相對的, 假如儲存單元的電量是落在L1,L2,L5,L6區間,則代表儲存單元存放的MSB位元為0。 Figure 6 illustrates the method used to find the MSB. Since the MSB represents the highest bit, it can be seen in Fig. 6 that if the power of the storage unit falls within the L0, L3, L4, and L7 intervals, the MSB bit stored in the storage unit is 1. relatively, If the power of the storage unit falls within the L1, L2, L5, and L6 intervals, the MSB bit stored in the storage unit is 0.

相似於上述的說明,VMSB1,VMSB2,VMSB3,VMSB4也可以施加多個步進調整量,依序多次用不同的電壓進行讀取的動作。每次讀取的結果產生位元序,可搭配LDPC與BCH等方法,用來進行錯誤校驗。 Similar to the above description, VMSB1, VMSB2, VMSB3, and VMSB4 can also apply a plurality of step adjustment amounts, and sequentially perform reading operations with different voltages in sequence. The result of each reading produces a bit sequence, which can be used with LDPC and BCH to perform error checking.

第7圖例示一個使用快閃記憶體的電子裝置的範例。這個電子裝置包括應用電路(Application Circuit)701、驅動程式702、控制器703、緩衝記憶體704、快閃記憶體705。這樣的電子裝置可透過不同的硬體跟軟體的設計,搭配額外的感測器與輸出入周邊裝置,而構成各種市面上的電子裝置,例如筆記型電腦、照相機、攝影機、SSD硬碟、手機、隨身碟、多媒體播放機、電視機、機上盒等等。 Fig. 7 illustrates an example of an electronic device using a flash memory. The electronic device includes an application circuit 701, a driver 702, a controller 703, a buffer memory 704, and a flash memory 705. Such electronic devices can be designed with various hardware and software, with additional sensors and input and output devices to form various electronic devices on the market, such as notebook computers, cameras, cameras, SSD hard disks, and mobile phones. , flash drives, multimedia players, TV sets, set-top boxes, and more.

根據不同的設計需求,應用電路701可以由一個或多個客制集體電路晶片,或一般處理器、控制器,搭配對應的韌體跟軟體,配合電路板跟相關的元件,共同構成所需能達成特定應用的的應用電路701。 According to different design requirements, the application circuit 701 can be composed of one or more custom collective circuit chips, or a general processor, a controller, a corresponding firmware and software, and a circuit board and related components to form a required energy. An application circuit 701 for a particular application is reached.

在這個例子中,應用電路701在需要存取快閃記憶體705時,透過驅動程式702的指令之執行,經由控制器703存取快閃記憶體705內部存放的資料。這裡提到的快閃記憶體705可以是上述的快閃記憶體架構或是其他的儲存硬體。在一實施例中,可將應用電路701與驅動程式702視為一主機(host),但不以此為限。 In this example, the application circuit 701 accesses the data stored in the flash memory 705 via the controller 703 through the execution of the instructions of the driver 702 when the flash memory 705 needs to be accessed. The flash memory 705 referred to herein may be the above-described flash memory architecture or other storage hardware. In an embodiment, the application circuit 701 and the driver 702 can be regarded as a host, but not limited thereto.

在需要將資料寫入到快閃記憶體705的時候,控制器703負責協調跟快閃記憶體705的溝通,按照快閃記憶體705的架構將資料傳送給快閃記憶體705。通常,控制器705會使用一些緩衝記憶體704來做為緩衝或是快取之用。這些緩衝記憶體 704在設計的時候可以跟控制器703封裝在一起、做成同一個模組,或是設計成兩個不同的模組。舉例來說,有些快閃記憶體705每次存取需要有一定的資料量,例如一個區塊或是一個資料頁等,這時候要寫入快閃記憶體705的資料就會先準備好放在緩衝記憶體704。此外,為了避免過度頻繁使用快閃記憶體705,也可以使用不同的演算法設計快取機制,以加快資料的整體存取速度。 When it is necessary to write data to the flash memory 705, the controller 703 is responsible for coordinating communication with the flash memory 705, and transferring the data to the flash memory 705 in accordance with the architecture of the flash memory 705. Typically, controller 705 uses some buffer memory 704 for buffering or caching. These buffer memories The 704 can be packaged with the controller 703, made into the same module, or designed into two different modules. For example, some flash memory 705 needs to have a certain amount of data per access, such as a block or a data page. At this time, the data to be written into the flash memory 705 is ready to be placed. In the buffer memory 704. In addition, in order to avoid excessive use of the flash memory 705, a different algorithm can be used to design a cache mechanism to speed up the overall access speed of the data.

應用電路701可以有許多不同的類型。例如手機或照相機裡頭的電路板,攝影鏡頭,處理器等。應用電路701也可以是數位電視裡頭的處理器或是電腦裡頭的處理器。控制器可以製作成獨立的積體電路晶片,或是嵌入到處理電路701裡頭,也可能將相關控制流程寫成程式碼,並且由通用控制器加以執行後,產生對應控制功能的控制器。有時候,應用電路701跟控制器703之間的溝通,也可能先寫成程式碼構成驅動程式,然後由應用電路701執行這個驅動程式,來完成跟控制器之間的溝通動作。 Application circuit 701 can be of many different types. For example, a mobile phone or a circuit board inside a camera, a photographic lens, a processor, and the like. The application circuit 701 can also be a processor in a digital television or a processor in a computer. The controller can be fabricated as a separate integrated circuit chip, or embedded in the processing circuit 701, or the relevant control flow can be written as a code, and executed by the general controller to generate a controller corresponding to the control function. Sometimes, the communication between the application circuit 701 and the controller 703 may also be written as a code to form a driver, and then the application circuit 701 executes the driver to complete the communication with the controller.

到底哪些功能由控制器703進行,哪些功能由驅動程式702,或甚至應用電路701本身來執行,會根據系統跟設計需求的不同,而能夠做不同的調整。舉例來說,以下所描述跟錯誤管理有關的功能,可以由狹義的控制器703來進行,也可能部分或全部的錯誤管理機制由驅動程式702配合應用電路701來執行。此時,完成這些錯誤管理機制的各個環節,整體構成了廣義的控制器的概念。 Which functions are performed by the controller 703 and which functions are executed by the driver 702, or even the application circuit 701 itself, can be adjusted differently depending on the system and design requirements. For example, the functions related to error management described below may be performed by the narrow controller 703, or some or all of the error management mechanisms may be performed by the driver 702 in conjunction with the application circuit 701. At this point, the completion of all aspects of these error management mechanisms constitutes the concept of a generalized controller.

第8圖說明包括一個具有階層式記憶元件架構的快閃記憶體80架構。在這個例子中,快閃記憶體80包括記憶體介面電路804、單層式儲存單元快閃記憶體體模塊SLC 806,以及兩個多層式儲存式儲存單元快閃記憶體模塊MLC A 807與MLC B 808。在實際的設計上,可以配置更多數量的多層式儲存單元快閃記憶體。 Figure 8 illustrates a flash memory 80 architecture including a hierarchical memory component architecture. In this example, the flash memory 80 includes a memory interface circuit 804, a single-layer storage unit flash memory block module SLC 806, and two multi-layer storage storage unit flash memory modules MLC A 807 and MLC. B 808. In actual design, a larger number of multi-layer storage unit flash memory can be configured.

控制器82包括第一記憶元件寫入器820、讀取器824與第二記憶元件寫入器824。控制器82用來控制快閃記憶體80。控制器82將控制指令跟資料信號傳給快閃記憶體80的記憶體介面電路804,根據不同的設計需求,快閃記憶體804的記憶體介面電路804可以只是單純執行控制器82的指令,也可以跟控制器82共同分擔以下的資料存取與錯誤管理的處理工作。 The controller 82 includes a first memory element writer 820, a reader 824, and a second memory element writer 824. Controller 82 is used to control flash memory 80. The controller 82 transmits the control command and the data signal to the memory interface circuit 804 of the flash memory 80. The memory interface circuit 804 of the flash memory 804 can simply execute the command of the controller 82 according to different design requirements. The following data access and error management processing can also be shared with the controller 82.

單層式儲存單元快閃記憶體跟多層式儲存單元快閃記憶體各有不同的優缺點。簡單來說,單層式儲存單元快閃記憶體由於構造單純,存取速度較快而且資料比較不容易出錯,但多層式儲存單元快閃記憶體由於每個儲存單元可以存放兩個以上的位元,所以單位成本會比單層式儲存單元快閃記憶體便宜很多,但其電路卻也較為複雜。 Single-layer storage unit flash memory and multi-layer storage unit flash memory have different advantages and disadvantages. In simple terms, the single-layer storage unit flash memory is simple in structure, faster in access speed and less error-prone data, but multi-layer storage unit flash memory can store more than two bits per storage unit. Yuan, so the unit cost will be much cheaper than the single-layer storage unit flash memory, but the circuit is more complicated.

在第8圖的架構裡頭,單層式儲存單元快閃記憶體可以作為多層式儲存單元快閃記憶體的一個緩衝機制。也就是說,資料如果要寫入快閃記憶體80,可以先指定寫到單層式儲存單元快閃記憶體裡頭。例如使用者正在攝影或錄音,因為有時間的限制,資料先寫入到單層式儲存單元快閃記憶體。 In the architecture of Figure 8, the single-layer storage unit flash memory can be used as a buffer mechanism for the flash memory of the multi-layer storage unit. In other words, if the data is to be written to the flash memory 80, it can be specified to be written to the flash memory of the single-layer storage unit. For example, the user is taking a picture or recording, because there is time limit, the data is first written to the single-layer storage unit flash memory.

接著,控制器82利用空檔,或是指示快閃記憶體80的記憶體介面電路804同步或流水線(pipeline)方式,將單層式儲存單元快閃記憶體的資料寫到對應的多層式儲存單元快閃記憶體。 Then, the controller 82 writes the data of the single-layer storage unit flash memory to the corresponding multi-layer storage by using the neutral or the memory interface circuit 804 of the flash memory 80 to synchronize or pipeline. Unit flash memory.

在第8圖的例子中,單層式儲存單元快閃記憶體只畫了一個,而多層式儲存單元快閃記憶體只畫了兩個,但是在實際設計時,單層式儲存單元快閃記憶體跟多層式儲存單元快閃記憶體的數量都可以根據實際需求加以調整,而且,單層式儲存單元快閃記憶體也不一定只能專門作為緩衝快取,本身也可根據需求作為資料長期儲存使用。以下的錯誤管理機制,也可以根據設計的需求,或使用者 對快閃記憶體80的使用情況進行對應的調整。例如,在資料已經快要滿載,而不得不用到單層式儲存單元快閃記憶體來存放資料時,也可以動態開啟,關閉或是調整以下的錯誤調整機制。 In the example of Figure 8, the single-layer storage unit flash memory is only one, while the multi-layer storage unit flash memory is only two, but in the actual design, the single-layer storage unit flashes. The number of flash memory in memory and multi-layer storage unit can be adjusted according to actual needs. Moreover, the flash memory of single-layer storage unit may not only be used as a buffer cache, but also can be used as data according to requirements. Long-term storage use. The following error management mechanisms can also be based on the needs of the design, or the user Corresponding adjustments are made to the use of the flash memory 80. For example, when the data is almost full and you have to use the single-layer storage unit flash memory to store data, you can also dynamically turn on, turn off or adjust the following error adjustment mechanism.

此外,第8圖中的單層式儲存單元快閃記憶體也可以用品質比較好或是存取速度比較快的多層式儲存單元快閃記憶體來替代,甚至也可以使用揮發性記憶體,例如隨機存取記憶體來替代。例如假如有後備電源,即使突然斷電或是主電池用完,後備電源仍然可以維持隨機存取記憶體一定時間保存資料的能力,而在此期間,控制器或記憶體介面電路盡快將資料存放到非揮發性記憶體裡頭。另外,也可以將第8圖的MLC改成TLC(同一個儲存存放三個或更多位元信息),或是同時把第8圖的SLC改成MLC。這一類的變更都可以適用以下的錯誤管理機制。 In addition, the single-layer memory flash memory in Figure 8 can also be replaced by a multi-layer memory flash memory with better quality or faster access speed, and even volatile memory can be used. For example, random access memory is used instead. For example, if there is a backup power supply, even if the power is suddenly turned off or the main battery runs out, the backup power supply can maintain the ability of the random access memory to save data for a certain period of time. During this period, the controller or the memory interface circuit stores the data as soon as possible. Into non-volatile memory. Alternatively, the MLC of FIG. 8 may be changed to TLC (the same storage stores three or more bits of information), or the SLC of FIG. 8 may be changed to MLC at the same time. The following error management mechanisms are applicable to this type of change.

第9圖說明在多層式儲存單元快閃記憶體裡頭的資料存放格式。如上所述,快閃記憶體通常是進行分組,以進行讀取,寫入或是刪除的動作,而第9圖顯示的就是第8圖的多層式儲存單元快閃記憶體裡頭一種資料排列配置的範例。 Figure 9 illustrates the data storage format in the flash memory of the multi-layer storage unit. As described above, the flash memory is usually grouped for reading, writing or deleting, and FIG. 9 shows the first data arrangement in the flash memory of the multi-layer memory unit of FIG. Example.

在第9圖中例示的資料排列配置中,整個陣列構成一個區塊,在這個區塊中,每一列構成了一個資料頁,在每列中的每個方塊代表的,就是用來存放一個位元組或是一個位元的儲存單位,該資料頁可視為邏輯上的資料頁亦可視為實體上的資料頁,熟悉此項技藝者當可在本發明的教導之下,自由選擇運用。通常,快閃記憶體的標準,例如JDEC,會要求區塊的大小是固定值,且資料頁的大小也是固定值,不可以任意改變,藉此讓不同的製造商製造的產品間,具有一定程度的相容性,以利整體產業的研究跟發展。然而,以下所描述的做法,即使在區塊大小固定,以及資料頁大小固定下,仍然可以加以運用。當然,本發明的做法也可以用在特殊的區塊跟 資料頁的大小規格。 In the data arrangement configuration illustrated in Fig. 9, the entire array constitutes a block in which each column constitutes a data page, and each square in each column represents a bit for storing a bit. A tuple or a storage unit of a bit. The data page can be regarded as a logical data page or as a physical data page. Those skilled in the art can freely choose to use it under the teaching of the present invention. In general, standards for flash memory, such as JDEC, require that the size of the block be a fixed value, and the size of the data page is also a fixed value, which cannot be arbitrarily changed, so that products made by different manufacturers have certain The degree of compatibility to facilitate the research and development of the overall industry. However, the practices described below can be applied even when the block size is fixed and the data page size is fixed. Of course, the practice of the present invention can also be used in special blocks. The size and size of the data page.

另外,如上所述,為了達成錯誤偵測,以及錯誤更正的能力,可以使用目前已知或正在發展的錯誤處理編碼方式。例如LDPC,BCH或Reed Soloman等。由於這類的計算方法會針對所要儲存的資料進行運算,以產生校驗碼資料(parity data),這些校驗碼資料,可透過第8圖的控制器82進行對應的計算產生出來後,一併存放到第8圖的MLC的記憶體單元中。 In addition, as described above, in order to achieve error detection and the ability to correct errors, an error handling coding method currently known or under development may be used. For example, LDPC, BCH or Reed Soloman. Since such a calculation method performs operations on the data to be stored to generate parity data, the check code data can be generated by the corresponding calculation by the controller 82 of FIG. And stored in the memory unit of the MLC of FIG.

在第9圖中的這個範例中,每一個資料頁,也就是每列的列校驗碼放在最後的每一列最後頭(標示為列校驗碼的斜線方塊)。這裡雖然只以一個方塊為例,但究竟要保留多少記憶體單元來放置校驗碼,則跟到底要保留多高的容錯率,以及使用哪種演算法有關,而可以做對應的調整,熟習此項技藝者得在本發明的教導之下,搭配使用適當位元數之列校驗碼。 In the example in Figure 9, each data page, that is, the column check code for each column, is placed at the end of each of the last columns (labeled as a diagonal block of the column check code). Although only one block is used as an example here, how many memory cells should be reserved to place the check code, it is related to the high fault tolerance rate, and which algorithm is used, and can be adjusted accordingly. The skilled artisan will use the check code of the appropriate number of bits in conjunction with the teachings of the present invention.

此外,除了對於每列資料進行錯誤偵測或錯誤更正的編碼,也可以針對每行資料進行錯誤偵測或錯誤更正的編碼處理。第9圖的例子中,針對每行進行錯誤更正編碼產生的一個或多個校驗列存放在這個區塊最下方(標示為校驗列的斜線方塊)。在一實施例中,可將一校驗列放置在該區塊的最後一頁,但不以此為限。同樣地,到底要保留多少的空間來放置校驗碼資料(校驗列)跟選擇的錯誤更正演算法以及所需要的容錯率有關,而可以做對應的調整。 In addition, in addition to the error detection or error correction coding for each column of data, it is also possible to perform error detection or error correction coding processing for each line of data. In the example of Figure 9, one or more check columns resulting from error correction coding for each row are stored at the bottom of the block (labeled as a diagonal block of the check column). In an embodiment, a check column may be placed on the last page of the block, but is not limited thereto. Similarly, how much space is reserved to place the checksum data (check column) is related to the selected error correction algorithm and the required fault tolerance, and can be adjusted accordingly.

在這個例子中,校驗列與列校驗碼的產生,雖然可以用相同的演算法,但也不一定要用同樣的演算法。例如校驗列對應的是在垂直方向記憶體單元的狀況,而垂直方向記憶體單元可能有共用信號線,而跟水平方向記憶體單元間有不同的關聯特性。此時,各自使用不同的演算法可以更有效的完成錯誤管理的處理工作。 In this example, the generation of the check column and the column check code, although the same algorithm can be used, does not necessarily use the same algorithm. For example, the check column corresponds to the state of the memory cells in the vertical direction, and the vertical direction memory cells may have a common signal line, and have different correlation characteristics with the horizontal memory cells. At this time, each of the different algorithms can be used to perform the error management processing more efficiently.

另外,在第9圖中可看到標示校驗列跟列校驗碼有交集的 地方。這個地方的資料可以用另一種演算法或產生校驗列跟列校驗碼的演算法,或是全部都採用同樣的演算法。在一些演算法中,不管是先算列校驗碼再算校驗列或是相反,最後得出交集部分的校驗資料都會一樣。 In addition, in Figure 9, you can see that there is an intersection between the checksum column and the checksum code. local. The information in this place can be used in another algorithm or an algorithm that produces a check column and a checksum code, or all of them use the same algorithm. In some algorithms, whether it is to calculate the column check code before calculating the check column or vice versa, the final check data will be the same.

在第9圖中,在同一個區塊中的所有資料頁在垂直方向共同算出對應的校驗資料(校驗列),但這並不是必要的限制,第10圖跟第11圖說明了不同的資料與校驗資料之間的配置關係,而這些配置都可以應用在這個實施例的方法。 In Figure 9, all the data pages in the same block are jointly calculated in the vertical direction (check column), but this is not a necessary limitation. Figure 10 and Figure 11 illustrate the difference. The configuration relationship between the data and the verification data, and these configurations can be applied to the method of this embodiment.

第10圖說明第二種配對資料跟校驗資料的方法。在第10圖中的例子中,每三列(資料頁)就提供一個對應的列(資料頁)用來存放校驗列資料(校驗列),整體構成了一個資料組。換言之,在這樣的配置下,同一個區塊可以有多個資料組。當然,這邊例示的3列資料配置1列校驗列也可以改成例如50列資料配置3個校驗列或各種其他的數字。 Figure 10 illustrates the second method of pairing data and verifying data. In the example in Fig. 10, each of the three columns (data pages) provides a corresponding column (data page) for storing the check column data (check column), which constitutes a data group as a whole. In other words, in such a configuration, the same block can have multiple data sets. Of course, the three columns of data configuration 1 column check column exemplified here can also be changed to, for example, 50 columns of data configuration 3 check columns or various other numbers.

相似的,在水平方向,資料與列校驗碼之間的配對關係也可以做動態的調整。到底要有多少的列校驗碼以及列校驗碼放在哪個位置,列校驗碼跟資料是不是要交錯放置,或列校驗碼是否統一放在最前面或最後面都可以根據實際的需要做調整。 Similarly, in the horizontal direction, the pairing relationship between data and column check code can also be dynamically adjusted. In the end, how many column check codes and column check codes should be placed, whether the column check code and the data are to be staggered, or whether the column check code is uniformly placed at the front or the end can be based on actual needs. Make adjustments.

第11圖說明第三種配對資料跟校驗碼的方法。第11圖例示了另一種可能性。在第11圖中,資料跟校驗資料的比例不需要是固定比例,而可以根據需求動態調整。舉例來說,控制器可以在確定配合的快閃記憶體後,透過驅動程式或是設定暫存器等設定所要使用的錯誤管理方式,資料跟校驗碼之間的比例以及如何安排存放位置等等。 Figure 11 illustrates the third method of pairing data and checksums. Figure 11 illustrates another possibility. In Figure 11, the ratio of data to calibration data does not need to be a fixed ratio, but can be dynamically adjusted according to demand. For example, after determining the matching flash memory, the controller can set the error management mode to be used through the driver or setting the scratchpad, the ratio between the data and the check code, and how to arrange the storage location. Wait.

事實上,本發明的實施例也可以在產品出廠後,經過統計實際的錯誤發生情況,而動態調整或是選擇不同的演算法,設置不 同的資料跟校驗碼之間的比例以及如何安排存放位置。這些可能的變化方式都被本發明的概念所涵蓋。 In fact, the embodiment of the present invention can also dynamically adjust or select different algorithms after the product is shipped, after statistical actual error occurrence, and the setting is not The ratio between the same data and the check code and how to arrange the storage location. These possible variations are covered by the concepts of the present invention.

第12圖的流程圖及第13圖、第14圖、第15圖跟第16圖的示意圖,說明第8圖資料從SLC讀出後寫到MLC的處理流程。 The flowchart of Fig. 12 and the diagrams of Fig. 13, Fig. 14, Fig. 15, and Fig. 16 illustrate the processing flow of the Fig. 8 data read from the SLC and written to the MLC.

在這個處理範例中,控制器的第二記憶元件寫入器824對MLC的區塊進行分組。在第13圖的範例中,為了說明方便,每三個資料列(資料頁)就搭配一個校驗列(資料頁),共同構成一個資料組。當然,在實際的應用中,資料列跟校驗列的比例會比較小,例如在一個有100個資料頁的區塊中,可以分成五組,也就是每組19個資料列搭配一個校驗列。 In this processing example, the second memory element writer 824 of the controller groups the blocks of the MLC. In the example of Fig. 13, for the convenience of explanation, every three data columns (data pages) are combined with a check column (data page) to form a data group. Of course, in practical applications, the ratio of the data column to the check column will be relatively small. For example, in a block with 100 data pages, it can be divided into five groups, that is, each group of 19 data columns with a check. Column.

接著請搭配第12圖跟第13圖到第16圖,用來了解這個範例所揭露的做法。 Then please use Figure 12 and Figure 13 to Figure 16 to understand the practices exposed in this example.

首先,控制器先從SLC讀出一個資料頁放到緩衝器中(步驟1202),由於這個資料頁本身就有可能出錯,控制器一旦發現錯誤(步驟1204),就用SLC讀到的資料裡頭校驗碼對資料進行更正(步驟1206)。更正後的資料,或者說,正確的資料接著被傳到快閃記憶體的記憶體介面電路,將這個資料頁的資料寫到對應的MLC的資料頁位置(步驟1208)。 First, the controller first reads a data page from the SLC and puts it into the buffer (step 1202). Since the data page itself may be in error, once the controller finds an error (step 1204), it uses the data read by the SLC. The check code corrects the data (step 1206). The corrected data, or the correct data, is then transferred to the memory interface circuit of the flash memory, and the data of the data page is written to the data page location of the corresponding MLC (step 1208).

此外,這個經過檢查的資料也傳給控制器中的錯誤更正碼產生單元(步驟1210),用來產生列校驗碼(步驟1211)。要產生這樣的資料,在這個例子裡頭,是將本次檢查過的資料列跟前次算出來的校驗列資料進行累積計算,以更新校驗列的內容。 In addition, the checked data is also passed to the error correction code generating unit in the controller (step 1210) for generating the column check code (step 1211). To generate such information, in this example, the data column that has been inspected is cumulatively calculated with the previously calculated verification column data to update the contents of the verification column.

舉例來說,第14圖的校驗列使用第13圖算出來的校驗列跟第14圖讀到的第二列資料,用例如LDPC,BCH等方法來產生。第15圖的校驗列則是使用第14圖更新的校驗列跟第15圖讀到的第三列資料做運算而進行更新。 For example, the check column of Fig. 14 uses the check column calculated in Fig. 13 and the second column data read in Fig. 14, and is generated by, for example, LDPC, BCH, or the like. The check column of Fig. 15 is updated by using the check column updated in Fig. 14 and the third column data read in Fig. 15.

等到本次分組的資料列都已經處理完畢,也就是對於本資料組的校驗列已經完整的得出,這個校驗列就被寫入到MLC對應的位置中(步驟1212),請一併參考第16圖。 Wait until the data column of this group has been processed, that is, the check column of this data group has been completely obtained, and the check column is written into the corresponding position of the MLC (step 1212), please also Refer to Figure 16.

透過這樣的做法,即使在操作的過程中發生斷電的情況,例如使用者拔插頭或是臨時把記憶卡從電腦拔出,或是把手機的電池取出,受影響的將不會是整個區塊的資料,而最多只是受影響的該組資料需要重新寫入到MLC。 In this way, even if there is a power outage during the operation, such as the user pulling the plug or temporarily pulling the memory card out of the computer, or removing the battery of the mobile phone, the affected area will not be the entire area. Block data, and at most only the affected group of data needs to be rewritten to the MLC.

接下來,請參考第17圖到第20圖,其用來說明本發明的另一實施例。 Next, please refer to Figs. 17 to 20 for explaining another embodiment of the present invention.

第17圖例示一種記憶體控制方法實施例的流程圖。這個控制方法用於控制一快閃記憶體,以讀取該快閃記憶體內的資料。 Figure 17 illustrates a flow chart of an embodiment of a memory control method. This control method is used to control a flash memory to read data in the flash memory.

這個快閃記憶體具有一個記憶元件,例如一個多層式儲存元件快閃記憶體(MLC),而這個記憶元件具有複數區塊。每一區塊具有複數資料頁,這個記憶體控制方法包含下列步驟。 The flash memory has a memory component, such as a multi-layer storage component flash memory (MLC), and the memory component has a plurality of blocks. Each block has a plurality of data pages, and the memory control method includes the following steps.

首先,讀取資料組設定,以得知記憶元件的區塊跟資料列的配置關係,例如一個資料組包含多少資料列、多少校驗列等信息,一個區塊裡頭那些資料頁存放的是資料列,那些又是校驗列。接著讀取資料組的一個資料列(步驟170)。利用該資料列的列校驗碼判斷該資料列資料是否有錯誤發生(步驟171)。假如發現有錯誤發生且該錯誤可更正(步驟172),則更正錯誤(步驟173)。 First, the data set setting is read to know the configuration relationship between the block of the memory element and the data column, for example, how many data columns and how many check columns are included in a data group, and those data pages in a block store data. Columns, those are the check columns. A data column of the data set is then read (step 170). The column check code of the data column is used to determine whether the data column data has an error (step 171). If an error is found to occur and the error can be corrected (step 172), the error is corrected (step 173).

假如透過校驗碼無法直接更正錯誤,例如校驗碼能承受的錯誤為3個位元,而此時發生超過3個位元的錯誤,便將這個資料列無法更正錯誤的狀態記錄起來,例如,在一錯誤更正表中記錄該資料列之位址(步驟174)。 If the error cannot be directly corrected by the check code, for example, the error that the check code can bear is 3 bits, and when more than 3 bits occur, the data column cannot be corrected for error status, for example, The address of the data column is recorded in an error correction table (step 174).

接著,繼續讀取資料組的其他資料列以及校驗列。利用校驗列對應的校驗方法,例如LDPC或BCH或其他相關校驗方法,計 算該資料組中各行的對應症狀(步驟175)。也就是該資料組各資料列排列成陣列(array)時,跨資料列同相對位置資料的組合。 Next, continue to read the other data columns and check columns of the data group. Using the verification method corresponding to the check column, such as LDPC or BCH or other related verification methods The corresponding symptoms of each row in the data set are calculated (step 175). That is, when the data columns of the data group are arranged in an array, the data is combined with the relative position data.

以第18圖為例,其例示一個記憶元件,例如快閃記憶體模塊一個區塊的邏輯分配示意圖。在這個區塊中,具有兩個資料組182跟184。第一個資料組182由7個資料列1821跟兩個校驗列1822組成。除了校驗列,資料列1821中的每個資料列還有自己的列校驗碼1823。這些資料列以圖示陣列方式排列式,同一列指的是水平方向資料單元構成的邏輯資料單位,同一行指的是垂直方向資料單元構成的邏輯資料單位,例如圖示186代表這個區塊的第一行資料。 Taking Figure 18 as an example, it illustrates a logical component of a memory component, such as a block of a flash memory module. In this block, there are two data sets 182 and 184. The first data set 182 consists of seven data columns 1821 and two check columns 1822. In addition to the check column, each data column in data column 1821 has its own column check code 1823. These data are arranged in a graphical array, the same column refers to the logical data unit formed by the horizontal data unit, and the same row refers to the logical data unit formed by the vertical data unit. For example, the representation 186 represents the block. The first line of information.

由於LDPC跟BCH等校驗方法,在根據校驗列跟資料組的資料內容計算出症狀後,可以指出到底可能在哪幾列出現錯誤並相對應的進行更正。例如,根據第一個資料組182的第一行資料1823與第一行資料之校驗列部分1824進行錯誤更正運算(諸如計算症狀等),可以得知該第一行資料是否存在錯誤,及判斷該錯誤狀態是否在可更正的範圍內(步驟176),例如第一行資料之校驗列部分1824係可提供3位元之更正能力,而第一行資料1823僅有2位元的錯誤,該錯誤狀態即屬於可更正。如該錯誤狀態可更正,則進行更正(步驟178)。反之,如該錯誤狀態不可更正,則不進行更正。 Due to the calibration methods such as LDPC and BCH, after calculating the symptoms according to the contents of the checklist and the data group, it can be pointed out which columns may be wrong and corresponding corrections. For example, according to the first row data 1823 of the first data group 182 and the check column portion 1824 of the first row data, an error correction operation (such as calculating symptoms, etc.) can be used to know whether the first line of data has an error, and Determining whether the error state is within a correctable range (step 176), for example, the check column portion 1824 of the first row of data can provide a 3-bit correction capability, and the first row of data 1823 has only a 2-bit error. The error status is correctable. If the error status can be corrected, a correction is made (step 178). Conversely, if the error status cannot be corrected, no correction will be made.

舉例來說,第19圖中的資料組192具有7個資料列以及兩列校驗列(下方畫陰影線處)。首先,每個資料列先用自己的列校驗碼進行校驗,假如發現錯誤就進行更正。假如發現錯誤,但無法更正,則將之記錄在表格194中(畫陰影線對應的資料列)。在這個例子中,每個列校驗碼最多可更正兩個錯誤,而每個校驗列可更正一個錯誤。表格194指出第二列跟第四列發現錯誤,而且這個錯誤無法直接由其列校驗碼直接加以更正(錯誤超過兩個)。 For example, the data set 192 in Fig. 19 has 7 data columns and two columns of check columns (hatched below). First, each data column is first verified with its own column check code, and if an error is found, it is corrected. If an error is found but cannot be corrected, it is recorded in table 194 (the data column corresponding to the hatched line). In this example, each column checksum can correct up to two errors, and each check column can correct an error. Table 194 indicates that the second column and the fourth column found an error, and this error cannot be directly corrected by its column check code (more than two errors).

接著,一行一行的利用校驗列來協助更正。首先,利用資料組192的第一行資料1921與其相對應的校驗列1922對第一行資料1921進行錯誤校驗並發現該行資料沒有發生錯誤。接著,利用資料組192的第二行資料1923與其相對應的校驗列1924對第二行資料1923進行錯誤校驗並發現該行資料具有一個錯誤(標示星號處),在此實施例中,每個校驗列可更正一個錯誤,故立即對此錯誤進行更正。以此類推。而後,利用資料組192的第四行資料1925與其相對應的校驗列1926對第四行資料1925進行錯誤校驗並發現該行資料具有兩個錯誤(標示星號處),在此實施例中,每個校驗列可更正兩個錯誤,故無法對此錯誤進行更正。 Next, the check columns are used line by line to assist in the correction. First, the first row of data 1921 and the corresponding check column 1922 of the data set 192 are used to perform error checking on the first row of data 1921 and it is found that no error occurs in the row of data. Next, using the second row of data 1923 of the data set 192 and its corresponding check column 1924, the second row of data 1923 is error checked and it is found that the row of data has an error (marked at the asterisk), in this embodiment, Each check column corrects an error, so correct it immediately. And so on. Then, using the fourth row of data 1925 of the data set 192 and its corresponding check column 1926, the fourth row of data 1925 is error-checked and found that the row of data has two errors (marked at the asterisk), in this embodiment Each check column corrects two errors, so this error cannot be corrected.

以此類推,在利用校驗列逐行對該資料組192進行錯誤校驗之後,可以更正各資料行中具有一個錯誤的錯誤態樣。從而該資料組的錯誤態樣可以第20圖表示,其中,標示星號的資料單元即表示發生錯誤的資料單元。從第20圖可以發現,資料組192的每一個資料列中,都不存在超過兩個錯誤的資料單元,故此時可再利用相對應的列校驗碼對第二列跟第四列資料進行錯誤校驗,則可得到正確的第二列及第四列。 By analogy, after error checking of the data set 192 by using the check column row by row, it is possible to correct an error pattern having an error in each data line. Thus, the error state of the data set can be represented by Figure 20, wherein the data unit indicating the asterisk indicates the data unit in which the error occurred. It can be found from Fig. 20 that in each data column of the data group 192, there are no more than two erroneous data units, so the corresponding column check code can be reused for the second column and the fourth column data. Error checking, you can get the correct second and fourth columns.

綜上,假如原先因為錯誤太多,無法用列校驗碼更正,此時可能因為利用校驗列進行錯誤校驗後,而使得錯誤減少而可以利用列校驗碼更正,例如第20圖所描繪的,代表錯誤的星星符號減少。一旦更正後,錯誤更少,再反複使用先前垂直方向的症狀則又可以繼續減少錯誤。 In summary, if the original error is too many to correct with the column check code, it may be corrected by using the check column after the error check, so that the error can be reduced and the column check code can be corrected. For example, in Figure 20 Depicted, the star symbol representing the error is reduced. Once corrected, fewer errors, and repeated use of the previous vertical symptoms can continue to reduce errors.

透過多次(iteration)的重複操作,雖然不是所有的錯誤一定都可以更正回來,但確實有更高比例的錯誤可以透過這些方法更正回來。 Through repeated iterations of the iteration, although not all errors can be corrected, there are indeed a higher percentage of errors that can be corrected by these methods.

綜上所陳,本發明無論就目的、手段及功效,在在均顯示 其迥異於習知技術之特徵,懇請 貴審查委員明察,早日賜准專利,俾嘉惠社會,實感德便。惟應注意的是,上述諸多實施例僅係為了便於說明而舉例而已,本發明所主張之權利範圍自應以申請專利範圍所述為準,而非僅限於上述實施例。 In summary, the present invention displays both in terms of purpose, means, and efficacy. It is different from the characteristics of the prior art. You are kindly asked to review the examination and express the patent as soon as possible. It should be noted that the various embodiments described above are merely illustrative for ease of explanation, and the scope of the invention is intended to be limited by the scope of the claims.

701‧‧‧應用電路 701‧‧‧Application Circuit

702‧‧‧驅動程式 702‧‧‧Driver

703‧‧‧控制器 703‧‧‧ Controller

704‧‧‧緩衝記憶體 704‧‧‧ buffer memory

705‧‧‧快閃記憶體 705‧‧‧Flash memory

Claims (22)

一種記憶體控制方法,用於控制一快閃記憶體,該快閃記憶體包含一第一記憶元件與一第二記憶元件,該第二記憶元件包含複數區塊,每一該區塊包含複數資料頁,該記憶體控制方法包含:將一原始資料寫入到該第一記憶元件;從該第一記憶元件讀取該原始資料得到一輸入資料,該輸入資料包含複數輸入資料列;將該複數輸入資料列分成複數資料組;將每一該資料組對應的每一該輸入資料列寫到該第二記憶元件對應的一個該資料頁;以及將對應每一該資料組的一校驗列寫到該第二記憶元件對應的一個該資料頁,其中,每一該資料組對應的該資料列之數目小於該第二記憶元件每一該區塊具有的該資料頁之數目。 A memory control method for controlling a flash memory, the flash memory comprising a first memory element and a second memory element, the second memory element comprising a plurality of blocks, each of the blocks comprising a plurality of blocks a data page, the memory control method comprising: writing an original data to the first memory element; reading the original data from the first memory element to obtain an input data, the input data comprising a plurality of input data columns; The plurality of input data columns are divided into a plurality of data groups; each of the input data columns corresponding to each of the data groups is written to one of the data pages corresponding to the second memory element; and a check column corresponding to each of the data groups is Write to the data page corresponding to the second memory element, wherein the number of the data columns corresponding to each of the data groups is smaller than the number of the data pages of each of the second memory elements. 如申請專利範圍第1項所述的記憶體控制方法,其中在對於該複數輸入資料列分成該複數資料組時,每一該資料組所對應的該輸入資料列之該數目是參考該第二記憶元件的一錯誤發生率而決定。 The memory control method according to claim 1, wherein when the plurality of input data columns are divided into the plurality of data groups, the number of the input data columns corresponding to each of the data groups is referenced to the second The rate of error in the memory component is determined. 如申請專利範圍第2項所述的記憶體控制方法,其中當該第二記憶元件的該錯誤發生率越高,每一該資料組所對應的該輸入資料列數目越少。 The memory control method according to claim 2, wherein the higher the error occurrence rate of the second memory element, the smaller the number of the input data columns corresponding to each of the data groups. 如申請專利範圍第1項所述的記憶體控制方法,其中至少兩個該資料組所對應之該輸入資料列之該數目不相同,該至少兩個該資料組對應該第二記憶元件中兩個不同的該區塊。 The memory control method according to claim 1, wherein at least two of the data sets correspond to the number of the input data columns, and the at least two of the data sets correspond to two of the second memory elements. A different block. 如申請專利範圍第1項所述的記憶體控制方法,其中至少兩個該資料組所對應之該輸入資料列之該數目不相同,該至少兩個該資料組對應該第二記憶元件的同一該區塊。 The memory control method according to claim 1, wherein the number of the input data columns corresponding to at least two of the data groups is different, and the at least two data sets correspond to the same of the second memory element. The block. 如申請專利範圍第1項所述的記憶體控制方法,更包含提供一設定機制,供設定每一該資料組所對應的該輸入資料列數目。 The memory control method of claim 1, further comprising providing a setting mechanism for setting the number of the input data columns corresponding to each of the data groups. 如申請專利範圍第1項所述的記憶體控制方法,更包含根據偵測該第二記憶元件在運作過程中的一錯誤發生率,動態調整每一該資料組所包含的該輸入資料列數目。 The memory control method according to claim 1, further comprising dynamically adjusting the number of the input data columns included in each of the data groups according to an error occurrence rate during detecting the operation of the second memory element . 如申請專利範圍第1項所述的記憶體控制方法,更包含每次在寫入一個該輸入資料列到該第二記憶元件前,利用該個該輸入資料列的內容累積計算更新所屬該資料組所對應的該校驗列的內容。 The memory control method according to claim 1, further comprising updating the data belonging to the data by using the content accumulation calculation of the input data column each time before writing the input data column to the second memory element. The content of the check column corresponding to the group. 如申請專利範圍第6項所述的記憶體控制方法,更包含計算該個該輸入資料列所對應之一列校驗碼,並將該列校驗碼連同該個該輸入資料列寫入到該第二記憶元件。 The memory control method of claim 6, further comprising calculating a column check code corresponding to the input data column, and writing the column check code together with the input data column to the Second memory element. 如申請專利範圍第1項所述的記憶體控制方法,更包含在從該第一記憶元件讀取該原始資料時,對該原始資料進行錯誤更正以獲得該些輸入資料列。 The memory control method according to claim 1, further comprising: when the original data is read from the first memory element, error correction is performed on the original data to obtain the input data columns. 如申請專利範圍第1項所述的記憶體控制方法,其中該第一記憶元件比該第二記憶元件發生錯誤率較低。 The memory control method according to claim 1, wherein the first memory element has a lower error rate than the second memory element. 如申請專利範圍第1項所述的記憶體控制方法,其中該第一記憶元件為一單層式儲存快閃記憶體,且該第二記憶元件為一多層式儲存快閃記憶體。 The memory control method according to claim 1, wherein the first memory element is a single-layer storage flash memory, and the second memory element is a multi-layer storage flash memory. 一種記憶體控制器,用於控制一快閃記憶體,該快閃記憶體包含一第一記憶元件與一第二記憶元件,該第二記憶元件包含複數區塊,每一區塊包含複數資料頁,該記憶體控制器包含:一第一記憶元件寫入器,將一原始資料寫入到該第一記憶元件;一讀取器,從該第一記憶元件讀出該原始資料並產生一輸入資料,該輸入資料包含複數輸入資料列;以及一第二記憶元件寫入器,將該複數輸入資料列分成複數資料組,將每一該資料組對應的該些輸入資料列寫到該第二記憶元件對應的該些資料頁,以及將對應每一該資料組對應的一校驗列寫到該第二記憶元件對應的該資料頁,其中,每一該資料組對應的該些輸入資料列之數目小於該第二記憶元件每一該區塊具有的該資料頁之數目。 A memory controller for controlling a flash memory, the flash memory comprising a first memory element and a second memory element, the second memory element comprising a plurality of blocks, each block comprising a plurality of data a memory controller comprising: a first memory element writer for writing an original data to the first memory element; a reader for reading the original data from the first memory element and generating a Entering data, the input data includes a plurality of input data columns; and a second memory component writer, dividing the plurality of input data columns into a plurality of data groups, and writing the input data columns corresponding to each of the data groups to the first And the data pages corresponding to the two memory elements, and the one verification column corresponding to each of the data groups is written to the data page corresponding to the second memory element, wherein the input data corresponding to each of the data groups The number of columns is less than the number of pages of material that each block of the second memory element has. 如申請專利範圍第13項所述的記憶體控制器,更包含一設定器,供設定每一該資料組所包含的該輸入資料列之數目。 The memory controller of claim 13 further comprising a setter for setting the number of the input data columns included in each of the data sets. 如申請專利範圍第13項所述的記憶體控制器,其中該第二記憶元件寫入器更包含根據偵測該第二記憶元件在運作過程中的錯誤發生率,動態調整每一該資料組所包含的該輸入資料列數目。 The memory controller of claim 13, wherein the second memory element writer further comprises dynamically adjusting each of the data sets according to detecting an error occurrence rate of the second memory element during operation The number of input data columns included. 如申請專利範圍第13項所述的記憶體控制器,更包含一 列校驗碼產生器,每次在寫入一個該輸入資料列到該第二記憶元件前,該列校驗碼產生器利用該個該輸入資料列的內容累積更新該個該輸入資料列所屬該資料組所對應的該校驗列的內容。 The memory controller according to claim 13 of the patent application, further comprising a a column check code generator, each time before writing the input data column to the second memory element, the column check code generator cumulatively updates the input data column by using the content of the input data column The content of the check column corresponding to the data group. 一種電子裝置,包含:一快閃記憶體,包含一第一記憶元件與一第二記憶元件,該第二記憶元件包含複數區塊,每一區塊包含複數資料頁;以及一記憶體控制器,用於控制該快閃記憶體,該記憶體控制器包含:一第一記憶元件寫入器,將一輸入資料寫入到該第一記憶元件;一讀取器,從該第一記憶元件讀出該輸入資料,該輸入資料包含複數輸入資料列;以及一第二記憶元件寫入器,將該複數輸入資料列分成複數資料組,將每一資料組對應的該些輸入資料列寫到該第二記憶元件對應的該些資料頁,以及將對應每一資料組的一校驗列寫到該第二記憶元件對應的該資料頁,其中,每一該資料組對應的該些輸入資料列數目小於該第二記憶元件每一該區塊具有的資料頁數目。 An electronic device comprising: a flash memory comprising a first memory element and a second memory element, the second memory element comprising a plurality of blocks, each block comprising a plurality of data pages; and a memory controller For controlling the flash memory, the memory controller includes: a first memory element writer for writing an input data to the first memory element; and a reader from the first memory element Reading the input data, the input data includes a plurality of input data columns; and a second memory component writer, dividing the plurality of input data columns into a plurality of data groups, and writing the input data columns corresponding to each data group to The data pages corresponding to the second memory element, and a check column corresponding to each data group is written to the data page corresponding to the second memory element, wherein the input data corresponding to each of the data groups The number of columns is less than the number of data pages each of the blocks of the second memory element has. 如申請專利範圍第17項所述的電子裝置,其中該第一記憶元件為一單層式儲存閃存記憶體,且該第二記憶元件為一多層式儲存閃存記憶體。 The electronic device of claim 17, wherein the first memory component is a single-layer storage flash memory, and the second memory component is a multi-layer storage flash memory. 一種記憶體控制方法,用於控制一快閃記憶體,該快閃記憶體包含一記憶元件,該記憶元件包含複數區塊,每一區塊包含複數資料頁,該記憶體控制方法包含:讀取一資料組設定,該資料組設定指示一個資料組包含的複數 資料列之一數目,每一資料列存於對應的一個該資料頁,且該資料組的該複數資料列之數目少於每一該區塊所擁有的複數資料頁個數;根據該資料組設定,從該記憶元件讀取對應一個該資料組的該複數資料列以及一校驗列;以及利用該校驗列對讀取的該複數資料列進行錯誤偵測及更正。 A memory control method for controlling a flash memory, the flash memory comprising a memory component, the memory component comprising a plurality of blocks, each block comprising a plurality of data pages, the memory control method comprising: reading Take a data group setting that indicates the plural number included in a data group a number of data columns, each of which is stored in a corresponding one of the data pages, and the number of the plural data columns of the data group is less than the number of plural data pages owned by each of the blocks; Setting, reading the complex data column corresponding to the data group and a check column from the memory element; and performing error detection and correction on the read multiple data column by using the check column. 如申請專利範圍第19項所述的記憶體控制方法,更包含:對於該資料組的每一該資料列,利用該資料列的一列校驗碼判斷是否發生錯誤;以及當利用該列校驗碼發現錯誤且錯誤可更正時,利用該列校驗碼更正該資料列。 The method for controlling a memory according to claim 19, further comprising: determining, for each of the data columns of the data set, a check code of the data column to determine whether an error occurs; and when using the column check When the code finds an error and the error can be corrected, the column is corrected with the column check code. 如申請專利範圍第20項所述的記憶體控制方法,更包含:當利用該列校驗碼發現錯誤且錯誤不可更正時,記錄無法透過該列校驗碼更正之該資料列;針對該資料組對應的各行,利用校驗列計算一對應症狀;以及假如該些對應症狀配合該些列檢驗碼找出無法更正錯誤的該資料列的記錄足以指出錯誤發生的位置,利用該校驗列對該資料組進行錯誤更正。 The memory control method according to claim 20, further comprising: when the error is found by using the column check code and the error cannot be corrected, the data column that cannot be corrected by the check code is recorded; Each row of the group uses a check column to calculate a corresponding symptom; and if the corresponding symptom matches the column check code to find that the record of the data column that cannot correct the error is enough to indicate the location where the error occurred, the check column pair is utilized. The data set is corrected for errors. 如申請專利範圍第21項所述的記憶體控制方法,更包含:在利用該校驗列進行錯誤更正後,利用錯誤更正後的資料重新計算該資料組中的該些列校驗碼,以再次進行錯誤偵測與更正。 The memory control method according to claim 21, further comprising: after the error correction is performed by using the check column, recalculating the column check codes in the data group by using the error corrected data, Perform error detection and correction again.
TW102117418A 2012-06-06 2013-05-16 Memory control method, controller and electronic device TWI594251B (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
CN201710152409.9A CN107133122B (en) 2012-06-06 2013-06-06 Memory control method
US13/911,096 US9417958B2 (en) 2012-06-06 2013-06-06 Flash memory control method, controller and electronic apparatus
CN201310223394.2A CN103473146B (en) 2012-06-06 2013-06-06 Memory control method, memory controller and electronic device
KR1020140040462A KR101659888B1 (en) 2013-05-16 2014-04-04 Flash memory control method, controller and electronic apparatus
US14/600,020 US9268638B2 (en) 2012-06-06 2015-01-20 Flash memory control method, controller and electronic apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US201261656017P 2012-06-06 2012-06-06

Publications (2)

Publication Number Publication Date
TW201351424A TW201351424A (en) 2013-12-16
TWI594251B true TWI594251B (en) 2017-08-01

Family

ID=50158103

Family Applications (1)

Application Number Title Priority Date Filing Date
TW102117418A TWI594251B (en) 2012-06-06 2013-05-16 Memory control method, controller and electronic device

Country Status (1)

Country Link
TW (1) TWI594251B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010048628A1 (en) * 2000-03-31 2001-12-06 Daisuke Koyanagi Method of controlling line memory
US20060140036A1 (en) * 2004-12-28 2006-06-29 Seiko Epson Corporation Memory controller, display controller, and memory control method
TWI302318B (en) * 2006-09-06 2008-10-21 Nanya Technology Corp Memory control circuit and method
US7440338B2 (en) * 2005-12-22 2008-10-21 Sanyo Electric Co., Ltd. Memory control circuit and memory control method
TWI317519B (en) * 2006-01-30 2009-11-21 Fujitsu Microelectronics Ltd Semiconductor memory, memory controller and control method for semiconductor memory
EP1581876B1 (en) * 2002-12-30 2010-08-04 Nxp B.V. Memory controller and method for writing to a memory
TWI347610B (en) * 2007-08-08 2011-08-21 Mediatek Inc Memory control circuit and related method
US8072826B2 (en) * 2009-12-03 2011-12-06 Himax Technologies Limited Memory control circuit and memory control method
TWI362667B (en) * 2007-12-31 2012-04-21 Phison Electronics Corp Data writing method for flash memory and controller thereof
TWI364761B (en) * 2006-12-28 2012-05-21 Intel Corp Modular memory controller clocking architecture

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010048628A1 (en) * 2000-03-31 2001-12-06 Daisuke Koyanagi Method of controlling line memory
EP1581876B1 (en) * 2002-12-30 2010-08-04 Nxp B.V. Memory controller and method for writing to a memory
US20060140036A1 (en) * 2004-12-28 2006-06-29 Seiko Epson Corporation Memory controller, display controller, and memory control method
US7440338B2 (en) * 2005-12-22 2008-10-21 Sanyo Electric Co., Ltd. Memory control circuit and memory control method
TWI317519B (en) * 2006-01-30 2009-11-21 Fujitsu Microelectronics Ltd Semiconductor memory, memory controller and control method for semiconductor memory
TWI302318B (en) * 2006-09-06 2008-10-21 Nanya Technology Corp Memory control circuit and method
TWI364761B (en) * 2006-12-28 2012-05-21 Intel Corp Modular memory controller clocking architecture
TWI347610B (en) * 2007-08-08 2011-08-21 Mediatek Inc Memory control circuit and related method
TWI362667B (en) * 2007-12-31 2012-04-21 Phison Electronics Corp Data writing method for flash memory and controller thereof
US8072826B2 (en) * 2009-12-03 2011-12-06 Himax Technologies Limited Memory control circuit and memory control method

Also Published As

Publication number Publication date
TW201351424A (en) 2013-12-16

Similar Documents

Publication Publication Date Title
CN107133122B (en) Memory control method
TWI479495B (en) Reading method, memory controller, and memory storage device
TWI500039B (en) Outputting information of ecc corrected bits
TWI674767B (en) Turbo product codes for nand flash
US8725944B2 (en) Implementing raid in solid state memory
US8869007B2 (en) Three dimensional (3D) memory device sparing
US10803971B2 (en) Device for supporting error correction code and test method thereof
US9223648B2 (en) Memory storage device, memory controller thereof, and method for processing data thereof
KR101837318B1 (en) Access method and device for message-type memory module
TW201545167A (en) Method of handling error correcting code in non-volatile memory and non-volatile storage device using the same
TWI684857B (en) Flash memory apparatus and storage management method for flash memory
US10803973B2 (en) Memory management method and storage controller
CN103218271B (en) A kind of data error-correcting method and device
US20180152203A1 (en) Error correction circuits and memory controllers including the same
TWI808098B (en) Device for supporting error correction code and test method thereof
US9626242B2 (en) Memory device error history bit
KR102023121B1 (en) Memory device which corrects error and method of correcting error
KR20200104791A (en) Memory die layouts for failure protection in ssds
US11662941B2 (en) System and method for mitigating effect of erase cells on adjacent cells
TWI594251B (en) Memory control method, controller and electronic device
US10886002B1 (en) NAND field use erase plus defect detections
US20170170848A1 (en) Video server device and writing/reading data method
TWI509622B (en) Fault bits scrambling memory and method thereof
KR20230121611A (en) Adaptive error correction to improve system memory reliability, availability and serviceability (RAS)
WO2020015129A1 (en) Method for using error correcting code for checking in random memory without redundant storage unit