[go: up one dir, main page]

JP2008305451A - State detection method of flash memory - Google Patents

State detection method of flash memory Download PDF

Info

Publication number
JP2008305451A
JP2008305451A JP2007149112A JP2007149112A JP2008305451A JP 2008305451 A JP2008305451 A JP 2008305451A JP 2007149112 A JP2007149112 A JP 2007149112A JP 2007149112 A JP2007149112 A JP 2007149112A JP 2008305451 A JP2008305451 A JP 2008305451A
Authority
JP
Japan
Prior art keywords
data
block
bit
byte
sequentially
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2007149112A
Other languages
Japanese (ja)
Inventor
Hiromichi Oribe
浩道 織部
Yoshihiro Kito
佳宏 鬼頭
Tetsuo Tanigawa
哲夫 谷川
Akiteru Watahashi
晃輝 渡橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hagiwara Sys Com Co Ltd
Original Assignee
Hagiwara Sys Com Co Ltd
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 Hagiwara Sys Com Co Ltd filed Critical Hagiwara Sys Com Co Ltd
Priority to JP2007149112A priority Critical patent/JP2008305451A/en
Publication of JP2008305451A publication Critical patent/JP2008305451A/en
Pending legal-status Critical Current

Links

Landscapes

  • For Increasing The Reliability Of Semiconductor Memories (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Read Only Memory (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a new state detection method of a flash memory by which natural writing accuracy of the flash memory can be individually estimated to contribute to its quality control in a manufacturer shipment step and the whole writing accuracy of the flash memory and secular change (degradation) of a stored value can be known in a user usage step. <P>SOLUTION: Writing and erasing errors to a data written block and data erased block, respectively, are detected in a bit unit in order of the physical block number by using firmware and the errors are totaled to calculate a BER (Bit Error Rate) of the flash memory. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、半導体フラッシュメモリの工場出荷段階の品質管理及び/又はユーザ使用後における寿命到来の予測などに用いて好適なフラッシュメモリの状態検出方法に関する。 The present invention relates to a flash memory state detection method suitable for use in quality control at the time of factory shipment of a semiconductor flash memory and / or prediction of arrival of a lifetime after use by a user.

半導体記憶装置の一つとして、フラッシュメモリが知られている。フラッシュメモリは工場出荷前において、セルに物理的欠陥のある不良ブロックを検査するとともに、該不良ブロックを除いた一群の良ブロックに対しては繰り返しデータの書き込みを行なって電気的ストレスを負荷し、その電気的耐性を検査することによる信頼性試験が行なわれている。しかしながらこの方法は、あくまでセルの物理的構造上の欠陥や電気的耐性の観点で実施される信頼性試験であり、フラッシュメモリ特有のデータの書き込みエラーの発生頻度が増大することによって推定される当該フラッシュメモリの総体的かつ経年的な劣化を監視するという観点に立ったものではない(特許文献1乃至特許文献3)。 A flash memory is known as one of semiconductor memory devices. Before the factory shipment of the flash memory, a defective block having a physical defect in a cell is inspected, and a group of good blocks excluding the defective block is repeatedly written with data to load an electrical stress, A reliability test is performed by inspecting the electrical resistance. However, this method is only a reliability test that is performed from the viewpoint of defects in the physical structure of the cell and electrical durability, and is estimated by an increase in the frequency of data write errors peculiar to flash memory. This is not from the viewpoint of monitoring the overall and aged deterioration of the flash memory (Patent Documents 1 to 3).

また、フラッシュメモリは不揮発性メモリの一種であるが、セルの構造上、例えば、10万回など、データの書き替え回数に一定の制限がある。このため、通常、主記憶領域の他に、予め予備記憶領域を設けておき、特定のブロックの書き換え回数やビットエラーが所定数に達すると、その物理ブロックを予備のブロックにおき替えて書き換え処理が行なわれ、記憶エラーがないよう担保されている。この方法の場合、書き換え回数の増大にしたがって予備記憶領域数も減少し、記憶エラーを生ずる虞があるため、残存予備記憶領域数を常時監視して、フラッシュメモリの交換時期をユーザに報知する方法が提案されている(特許文献4)。この方法は、当該フラッシュメモリが産業機器の場合など、特にそのデータの信頼性が要求される場合に有用である。しかしながら、主記憶領域の各ブロックの書込みエラー頻度が近似している場合、予備記憶領域のブロックが急激に減少する場合が考えられ、不測の事態も生じかねない。 A flash memory is a kind of non-volatile memory, but due to the cell structure, there is a certain limit on the number of times data can be rewritten, for example, 100,000 times. For this reason, in general, a spare storage area is provided in addition to the main storage area, and when the number of rewrites or bit errors of a specific block reaches a predetermined number, the physical block is replaced with a spare block and a rewrite process is performed. To ensure that there are no memory errors. In the case of this method, the number of spare storage areas decreases as the number of rewrites increases, and a storage error may occur. Therefore, a method of constantly monitoring the number of remaining spare storage areas and notifying the user of the replacement timing of the flash memory Has been proposed (Patent Document 4). This method is useful particularly when the data is required to be reliable, such as when the flash memory is an industrial device. However, if the write error frequency of each block in the main storage area is approximate, there may be a case where the number of blocks in the spare storage area decreases rapidly, and an unexpected situation may occur.

特に、近年、フラッシュメモリは、旧来の二値メモリだけでなく、多値メモリが出現している。二値メモリの場合は、一つのセル(ビット線とワード線の交点)で、“0”か“1”の二つの値しか表現できないが、多値メモリの場合は、一つのセルで、“00”、“01”、“10”、“11”の4つの値(2bit)を表現できる。これは、セルに対し、電荷が0から3までの4段階で蓄積し得ることによるものであるが、書込み時における書込みエラーや記憶値の経年変化は2値メモリの場合とは当然異なる。さらに回路線幅が90nmから70nmへ、さらには56nmへと、より細線化が図られており、セル面積や線間マージンの縮小が記憶エラーや記憶値の経年変化に及ぼす影響は計り知れない。
特開2006−048893 特開2006−351056 特開平09−288899 特許第3242890号(米国特許第6993690号)
In particular, in recent years, not only the conventional binary memory but also a multi-value memory has appeared in the flash memory. In the case of a binary memory, only one value (“0” or “1”) can be expressed by one cell (intersection of a bit line and a word line). Four values (2 bits) of “00”, “01”, “10”, and “11” can be expressed. This is due to the fact that charges can be stored in the cell in four stages from 0 to 3, but the writing error at the time of writing and the secular change of the stored value are naturally different from those of the binary memory. Further, the circuit line width is further reduced from 90 nm to 70 nm, and further to 56 nm, and the influence of the reduction of the cell area and the margin between the lines on the storage error and the secular change of the stored value is immeasurable.
JP 2006-048893 A JP 2006-351056 A JP 09-288899 A Patent No. 3242890 (US Pat. No. 6,993,690)

ここにおいて、本発明が解決すべき第1の課題は、工場出荷段階において、個別にその生来的書込み精度を推定しその品質管理に資することができるとともに、ユーザによる使用段階においては、当該フラッシュメモリの総体的な書込み精度や記憶値の経年変化(劣化)を検知し、これによりフラッシュメモリの寿命到来を好適に予測することのできるフラッシュメモリの新たな状態検出方法の提供である。その他の課題は、明細書、図面、特に特許請求の範囲から自ずと明らかとなろう。 Here, the first problem to be solved by the present invention is that the inherent writing accuracy can be individually estimated and contributed to the quality control in the factory shipment stage, and the flash memory is used in the use stage by the user. It is possible to provide a new method for detecting the state of a flash memory that can detect the overall writing accuracy and the secular change (deterioration) of a stored value and thereby predict the end of the life of the flash memory. Other problems will become apparent from the specification, drawings, and claims.

上記課題解決のため、本発明方法は、ユーザデータの書込み対象となるすべての物理ブロックに対し、データエラーを検出する。即ち、本発明方法の第1の特徴は、そのブロックがデータ書込済のブロックであるかデータ消去済のブロックであるかに拘らず、論理ブロックアドレスで対応付けされるすべての物理ブロックに対しデータエラーをbit単位で検出し、これをbitエラーとして総計し、これにより当該フラッシュメモリのBER(Bit Error Rate)を算出するフラッシュメモリの状態検出方法の構成採用にある。 In order to solve the above problem, the method of the present invention detects a data error for all physical blocks to which user data is to be written. That is, the first feature of the method of the present invention is that for all physical blocks associated with logical block addresses, regardless of whether the block is a data-written block or a data-erased block. The configuration employs a configuration of a flash memory state detection method that detects data errors in bit units, totals these as bit errors, and calculates a BER (Bit Error Rate) of the flash memory.

ここにおいて、“論理ブロックアドレスで対応付けされるすべての物理ブロック”とは、1)システム情報が記憶されている、通常、アドレス番号「0」の物理ブロック、2)システム上の予約領域(reserved block)であって論理ブロックアドレスと対応付けされない物理ブロック、3)製造段階で不良と判断された物理ブロック(bad Block)、4)使用後にBad Blockとなった物理ブロック、を除いたすべての物理ブロックである。即ち、ユーザデータが書込まれ得る全ブロックである。この内、データ消去済ブロックは、工場出荷の際にフォーマットされたブロックと工場出荷後ユーザが一旦データを書込んだ後これを消去したブロックの両者を含む。ブロックのデータ消去は、そのブロックのセル(ビット線とワード線の交点)に蓄積されていた電荷を除去するものであるが、セルの構造上の欠陥によりこの電荷除去処理がうまく実行されない場合がある。当該ブロックの全セルの電荷除去が完全に実行された場合は、Readの際、ALL“1”の値のデータとして読み出される。構造上の欠陥によりこの電荷除去処理がうまく実行されないセルが存在すると、そのセルについてはReadの際“0”の値として読み出される。すなわち、当該セルにデータがプログラムされた状態となる。本願ではこれを消去エラー(data erasing error)と定義する。データエラーであるこの消去エラーはセル毎、即ちbit単位で生じ得る。工場出荷段階では、電気的耐性試験終了後、全ブロックがフォーマットされるが、このときの消去エラーをbit単位で検出し、これによりBERを求める。BERは、消去エラーのあったbit数をエラー検出対象となった全データのbit総数で除した値である。これにより、工場出荷段階における個別的かつ初期的な書込み品質を推し量ることができる。 Here, “all physical blocks associated with a logical block address” are 1) a physical block with system information stored, usually a physical block with an address number “0”, and 2) a reserved area on the system (reserved) all physical blocks except physical blocks that are not associated with logical block addresses, 3) physical blocks that were determined to be bad at the manufacturing stage, and 4) physical blocks that became bad blocks after use It is a block. That is, all blocks into which user data can be written. Among them, the data erased block includes both a block formatted at the time of factory shipment and a block from which data has been erased once written by a user after factory shipment. Data erasure of a block is to remove charges accumulated in cells (intersections of bit lines and word lines) of the block, but this charge removal processing may not be executed successfully due to a structural defect of the cell. is there. When the charge removal of all the cells in the block is completely executed, data of ALL “1” is read at the time of reading. If there is a cell in which this charge removal processing is not executed successfully due to a structural defect, the cell is read as a value of “0” at the time of reading. That is, data is programmed in the cell. In the present application, this is defined as an erasing error. This erase error, which is a data error, can occur on a cell-by-cell basis, that is, in units of bits. At the factory shipment stage, all blocks are formatted after the endurance test, but the erasure error at this time is detected in units of bits, and the BER is obtained. The BER is a value obtained by dividing the number of bits having an erasure error by the total number of bits of all data subjected to error detection. This makes it possible to estimate the individual and initial writing quality at the factory shipment stage.

ユーザがその使用を開始した後は、データ書込済ブロックとデータ消去済ブロック(フォーマットされた状態のブロックを含む)が混在する。当該ブロックに対して所定のデータの書込みを実行する場合、データ書込対象のセルには電荷蓄積処理が実行される。このとき、その構造上の欠陥により電荷蓄積処理がうまく実行されないセルが存在すると、書込み指令がなされた値と異なる値が読み出されることとなる。本願ではこれを書込みエラー(data writing error)と定義する。このデータエラーもセル毎、即ちbit単位で生じ得る。また、データの書込みを実行した際、ライトディスターブエラー(write disturb error)という現象を生じる場合がある。ライトディスターブエラーとは、データの書込みを実行するページ内の非選択セルやデータの書込みを実行するそのブロック内の他のページの非選択セルに電荷が蓄積され、“0”が誤ってプログラムされてしまう現象をいう。このデータエラーもセル毎、即ちbit単位で生じ得る。また、データの読み出しを実行した場合、リードディスターブエラー(read disturb error)という現象を生じる場合がある。リードディスターブとは、同一ブロック内のあるページを読み出したときに、他のページの一つまたは複数のセルに電荷が蓄積され、“0が誤ってプログラムされてしまう現象をいう。このデータエラーもセル毎、即ちbit単位で生じ得る。また、データ保持エラー(data retention error)という現象を生じる場合がある。フラッシュメモリでは、bit線とワード線間に存在する浮遊ゲートに電荷が蓄積されてデータを保持するが、この浮遊ゲートに蓄積されている電荷が時間の経過によって徐々に抜けて、遂にはデータを保持し得なくなる現象、または電荷が保持されていないセルに不如意に電荷が蓄積され、データがプログラムされる現象をいう。浮遊ゲートは、書込み回数が多いほど劣化する。このデータエラーもセル毎、即ちbit単位で生じ得る。 After the user starts its use, data written blocks and data erased blocks (including formatted blocks) are mixed. When writing predetermined data to the block, charge accumulation processing is performed on the cell to which data is to be written. At this time, if there is a cell in which the charge accumulation process is not executed successfully due to the structural defect, a value different from the value for which the write command has been issued is read out. In the present application, this is defined as a data writing error. This data error can also occur on a cell-by-cell basis, that is, in bit units. In addition, when data is written, a phenomenon called a write disturb error may occur. A write disturb error is a charge accumulated in a non-selected cell in a page where data is written or in a non-selected cell in another page where data is written, and "0" is programmed incorrectly. The phenomenon that ends up. This data error can also occur on a cell-by-cell basis, that is, in bit units. In addition, when data reading is executed, a phenomenon called read disturb error may occur. Read disturb is a phenomenon in which when a page in the same block is read, charges are accumulated in one or a plurality of cells on another page and “0” is erroneously programmed. This may occur for each cell, that is, in units of bits, and may cause a phenomenon called data retention error In flash memory, charges are accumulated in a floating gate existing between a bit line and a word line, and data is stored. However, the charge accumulated in this floating gate gradually escapes over time, and eventually the data cannot be retained, or the charge is unintentionally accumulated in the cell that does not retain the charge, A phenomenon in which data is programmed, and the floating gate deteriorates as the number of times of writing increases. It can occur in place.

本発明方法では、物理ブロックアドレスを指定して、ユーザデータが書込まれ得る全ブロックを対象に、上述のデータエラーをbit単位で検出し、これを総計して、BERを算出する。このBERは、bitエラー総数をエラー検出対象となった全データのbit総数で除した値である。尚、本願においてbitエラーとは、ECCでエラーとして検出されたbit単位のエラーであって、上述したもの以外のデータエラーがあった場合はそれを含む。 In the method of the present invention, a physical block address is designated, the above-mentioned data errors are detected in units of bits for all blocks in which user data can be written, and the total is calculated to calculate the BER. This BER is a value obtained by dividing the total number of bit errors by the total number of bits of all data that is the target of error detection. In the present application, a bit error is an error in bit units detected as an error by ECC, and includes any data error other than those described above.

本発明は、上記の通り、データ消去済ブロックもエラーチェック対象となるが、その意義は下記の通りである。即ち、特許文献4に記載された実施形態例では、主記憶領域のブロック(データ書込済ブロック)だけをエラーチェックの対象としているが、書込みの平均化の図る上で、予備ブロック(spare block)は何回も使いまわされることがある。即ち、その時点ではデータが何も書き込まれていない予備ブロックと雖も、以前に何回も書込みが実行されていることがあり、フラッシュメモリの総体的な書き込み精度(言い換えれば、劣化)をチェックするという観点では、エラーチェック対象とすることが好ましい。本発明はまさにその点を解決するものである。 As described above, according to the present invention, the data erased block is also subject to error check, and its significance is as follows. In other words, in the embodiment described in Patent Document 4, only the block (data-written block) in the main storage area is subjected to error check, but a spare block (spare block) is used for averaging writing. ) May be reused many times. In other words, both the spare block and the data where no data has been written at that time may have been written many times before, and the overall writing accuracy (in other words, deterioration) of the flash memory is checked. From the viewpoint of doing, it is preferable to make an error check target. The present invention exactly solves that point.

以上より、本発明によれば、工場出荷段階においては、フラッシュメモリの生来的書込み精度を個別的に推定してその品質管理に資することができるとともに、ユーザが使用を開始した後においては、当該フラッシュメモリの書込み精度や記憶値の経年変化(データ劣化)を、当該フラッシュメモリについて総体的に知ることができる。 As described above, according to the present invention, in the factory shipment stage, it is possible to individually estimate the inherent writing accuracy of the flash memory and contribute to quality control thereof, and after the user starts use, The flash memory writing accuracy and the secular change (data deterioration) of the stored value can be known as a whole for the flash memory.

さらに具体的には、本願において、上記課題解決のため、本発明が以下に列挙する上位概念から下位概念に亙るそれぞれ新規な特徴的構成を採用することにより、上記課題を解決する。 More specifically, in the present application, in order to solve the above-described problems, the present invention solves the above-described problems by adopting a novel characteristic configuration ranging from a superordinate concept to a subordinate concept listed below.

即ち、本発明方法の第2の特徴は、本発明方法の第1の特徴において、(A)ブロックに対するデータの書込みは、ユーザデータとセクタ/ブロック情報を、それぞれ反転して順次エンコーダに入力するステップと、エンコーダから出力されたユーザデータを反転してフラッシュメモリのデータ領域に格納するステップと、エンコーダから出力されたセクタ/ブロック情報とECCをそれぞれ反転してフラッシュメモリの冗長領域に格納するステップを含み、(B)データ書込済ブロックに対するbitエラーの検出は、前記データ領域に格納されたユーザデータを読み出し、これを反転してデコーダに順次入力するステップと、前記冗長領域に格納されているセクタ/ブロック情報とECCを読み出し、これを反転してデコーダに順次入力するステップと、デコーダに入力された前記ユーザデータ、セクタ/ブロック情報及びECCとに基づいてそのシンドロームを生成するステップと、前記シンドロームによって当該ブロックにbitエラーがあることが判明した場合、該シンドロームをコレクタに入力し、当該ブロック内のbitエラー数をカウントするステップを含み、(C)データ消去済ブロックに対するbitエラーの検出は、当該ブロックのデータ領域からデータを読み出して反転し、これをデコーダに順次入力するステップと、当該ブロックの冗長領域のセクタ/ブロック情報格納領域からデータを読み出して反転し、これをデコーダに順次入力するステップと、当該ブロックの冗長領域のECC格納領域からデータを読み出して反転し、これをデコーダに順次入力するステップと、デコーダに入力された前記データに基づいてそのシンドロームを生成するステップと、前記シンドロームによって当該データ消去済ブロックにbitエラーがあることが判明した場合、該シンドロームをコレクタに入力し、当該ブロック内のbitエラー数をカウントするステップを含むフラッシュメモリの状態検出方法の構成採用にある。 That is, the second feature of the method of the present invention is the first feature of the method of the present invention. (A) When writing data to a block, user data and sector / block information are inverted and sequentially input to the encoder. A step of inverting the user data output from the encoder and storing it in the data area of the flash memory; and a step of inverting the sector / block information and ECC output from the encoder and storing them in the redundant area of the flash memory. (B) detection of a bit error for a data-written block is performed by reading user data stored in the data area, inverting it and sequentially inputting it to a decoder; The sector / block information and ECC that are present are read, inverted, and sequentially input to the decoder. And generating a syndrome based on the user data, sector / block information and ECC input to the decoder, and if the syndrome reveals that the block has a bit error, collect the syndrome And (C) detecting a bit error for a data erased block reads out the data from the data area of the block, inverts it, and sequentially outputs it to the decoder. A step of inputting, reading the data from the sector / block information storage area of the redundant area of the block and inverting it, sequentially inputting the data to the decoder, and reading and inverting the data from the ECC storage area of the redundant area of the block And sequentially inputting these into the decoder; Generating the syndrome based on the data input to the coder, and if the syndrome reveals that the data erased block has a bit error, the syndrome is input to the collector and the bit in the block is The present invention employs a configuration of a flash memory state detection method including a step of counting the number of errors.

この方法によれば、従来、データ消去済ブロックをReadしようとしてもECCエラーとなって検出困難であった消去エラーをbit単位で確実に検出することができる。   According to this method, it is possible to reliably detect, in bit units, an erasure error that has conventionally been an ECC error and has been difficult to detect even when attempting to read a data erased block.

また、本発明方法の第3の特徴は、本発明方法の第1の特徴において、(A)ブロックに対するデータの書込みは、ホスト側から1byteずつ送出されるユーザデータを反転してその先頭に2bitのダミーデータを付加してこれを1情報シンボルとして、エンコーダに計512シンボル分順次入力するステップと、セクタ/ブロック情報を反転してその先頭に2bitのダミーデータを付加し、これを同じく1情報シンボルとしてエンコーダに計6シンボル分順次入力するステップと、エンコーダから出力された1情報シンボルのユーザデータの先頭2bitの前記ダミーデータを除去し、残りの1byteを反転した本来のユーザデータを計512byte分フラッシュメモリのデータ領域に順次格納するステップと、エンコーダから出力された1情報シンボルのセクタ/ブロック情報の先頭2bitの前記ダミーデータを除去し、残りの1byteを反転した本来のセクタ/ブロック情報を計6byte分フラッシュメモリの冗長領域に順次格納するステップと、エンコーダから10bit単位で順次出力されるECCからなるチェックシンボルを、連続する1byte単位のECCに順次加工し、これを反転したものをフラッシュメモリの冗長領域に順次格納するステップを含み、(B)データ書込済ブロックに対するbitエラーの検出は、データ領域に格納された前記ユーザデータを1byteずつ読み出してこれを反転するとともに、その先頭に2bitのダミーデータを付加して1情報シンボルとし、これを順次デコーダに入力するステップと、冗長領域に格納された前記セクタ/ブロック情報を1byteずつ読み出してこれを反転するとともに、その先頭に2bitのダミーデータを付加して同じく1情報シンボルとし、これを順次デコーダに入力するステップと、冗長領域に格納された前記ECCを1byteずつ順次読み出し、これを10bitで構成される連続する1シンボル単位の形式に順次加工し反転した本来のチェックシンボルをデコーダに順次入力するステップと、デコーダに入力された前記情報シンボルとチェックシンボルとに基づいてそのシンドロームを生成するステップと、前記シンドロームによってbitエラーがあることが判明した場合、該シンドロームをコレクタに入力し、当該ブロック内のbitエラー数をカウントするステップを含み、(C)データ消去済ブロックに対するbitエラーの検出は、当該ブロックのデータ領域から1byteずつデータを読み出してこれを反転し、その先頭に2bitのダミーデータを付加して1情報シンボルとし、これを512シンボル分、デコーダに順次入力するステップと、当該ブロックの冗長領域のセクタ/ブロック情報格納領域から、1byteずつデータを読み出してこれを反転し、その先頭に2bitのダミーデータを付加して同じく1情報シンボルとし、これを6シンボル分、順次デコーダに入力するステップと、当該ブロックの冗長領域のECC格納領域から1byteずつデータを読み出して、これを10bitで構成される連続する1シンボル単位の形式に順次加工して反転し、これをチェックシンボルとして計8シンボル分、デコーダに順次入力するステップと、デコーダに入力された前記情報シンボルとチェックシンボルとに基づいてそのシンドロームを生成するステップと、前記シンドロームによってbitエラーがあることが判明した場合、該シンドロームをコレクタに入力し、bitエラーのあるシンボル内のbitエラー数をカウントするステップを含むフラッシュメモリの状態検出方法の構成採用にある。 The third feature of the method of the present invention is the first feature of the method of the present invention. (A) When writing data to a block, user data sent from the host side by 1 byte is inverted and 2 bits are added at the head. The dummy data is added as a single information symbol, and a step of sequentially inputting 512 symbols to the encoder in total, and the sector / block information is inverted and a 2-bit dummy data is added to the head, and this is also used as one information symbol. A step of sequentially inputting a total of 6 symbols as symbols to the encoder, and removing the first 2 bits of the dummy data of the user data of one information symbol output from the encoder, the original user data obtained by inverting the remaining 1 byte is a total of 512 bytes Steps to store sequentially in the data area of the flash memory and output from the encoder Removing the first 2 bits of the dummy data of the sector / block information of the inputted 1 information symbol and sequentially storing the original sector / block information obtained by inverting the remaining 1 byte in the redundant area of the flash memory for a total of 6 bytes; (B) including a step of sequentially processing check symbols including ECCs sequentially output from the encoder in units of 10 bits into ECCs in units of 1-byte units, and sequentially inverting the check symbols in a redundant area of the flash memory. To detect a bit error for a written block, the user data stored in the data area is read one byte at a time and inverted. At the beginning, 2-bit dummy data is added to form one information symbol. Input to the decoder, and the stored in the redundant area In addition to reading out the invertor / block information 1 byte at a time, inverting it, adding 2 bits of dummy data to the head to form one information symbol, which is sequentially input to the decoder, and the ECC stored in the redundant area Are sequentially read into 1-byte units, sequentially processed into a continuous 1-symbol unit format composed of 10 bits, and the original check symbols inverted are sequentially input to the decoder, and the information symbols and check symbols input to the decoder And generating the syndrome based on the above and, when the syndrome is found to have a bit error, inputting the syndrome to a collector and counting the number of bit errors in the block, (C) Bi for data erased blocks The error is detected by reading out 1-byte data from the data area of the block, inverting it, adding 2-bit dummy data to the head to form one information symbol, and sequentially inputting 512 symbols to the decoder. Then, data is read out by 1 byte from the sector / block information storage area of the redundant area of the block and inverted, and 2-bit dummy data is added to the head to make one information symbol, which is equivalent to 6 symbols, Sequentially input to the decoder and data is read out by 1 byte from the ECC storage area of the redundant area of the block, and this is sequentially processed and inverted into a single symbol unit format consisting of 10 bits, and this is checked. A step of sequentially inputting a total of 8 symbols as symbols to the decoder; Generating a syndrome based on the information symbol and check symbol input to the coder, and if the syndrome reveals that there is a bit error, the syndrome is input to the collector, The configuration of the flash memory state detection method includes the step of counting the number of bit errors.

また、本発明方法の第4の特徴は、本発明方法の第1の特徴において、(A)ブロックに対するデータの書込みは、ホストから1byteずつ順次送出されるユーザデータを反転して、1bitずつ計512byte分順次エンコーダに入力するステップと、コントローラから1byteずつ順次送出されるセクタ/ブロック情報を反転して、1bitずつ計6byte分順次エンコーダに入力するステップと、エンコーダから1bitずつ順次出力されるユーザデータを1byteずつ反転して、これを計512byte分フラッシュメモリのデータ領域に順次格納するステップと、エンコーダから1bitずつ順次出力されるセクタ/ブロック情報を1byteずつ反転して、これを計6byte分フラッシュメモリの冗長領域に順次格納するステップと、エンコーダから1bitずつ順次出力されるECCを、最終byteを除き1byteずつ反転するとともに、最終byteとなるECCにはその不足する分適宜ダミーデータを付加して形式上1byteとしてこれを反転し、これらをフラッシュメモリの冗長領域に順次格納するステップを含み、(B)データ書込済ブロックに対するbitエラーの検出は、前記データ領域に格納されている512byteのユーザデータを1byteずつ読み出し、これを反転したものを1bitずつ順次デコーダに入力するステップと、前記冗長領域に格納されている6byteのセクタ/ブロック情報を1byteずつ読み出し、これを反転したものを1bitずつ順次デコーダに入力するステップと、前記冗長領域に格納されているECCを1byteずつ読み出し反転し、最終byteを除き1bitずつ、最終byteからは前記ダミーデータを除去して1bitずつデコーダに順次入力するステップと、デコーダに入力された前記ユーザデータ、セクタ/ブロック情報及びECCとに基づいてそのシンドロームを生成するステップと、前記シンドロームによってbitエラーがあることが判明した場合、該シンドロームをコレクタに入力し、当該ブロック内のbitエラー数をカウントするステップを含み、(C)データ消去済ブロックに対するbitエラーの検出は、当該ブロックのデータ領域から計512byteのデータを1byteずつ読み出し、これを反転したものを1bitずつ順次デコーダに入力するステップと、当該ブロックの冗長領域のセクタ/ブロック格納領域から計6byteのデータを1byteずつ読み出し、これを反転したものを1bitずつデコーダに順次入力するステップと、当該ブロックの冗長領域のECC格納領域から、データを1byteずつ読み出し反転し、最終byteを除き1bitずつ、最終byteの後尾からは前記ダミーデータと同量のbit数のデータを除去して1bitずつデコーダに順次入力するステップと、デコーダに入力された前記データに基づいてそのシンドロームを生成するステップと、前記シンドロームによってbitエラーがあることが判明した場合、該シンドロームをコレクタに入力し、当該ブロック内のbitエラー数をカウントするステップを含むフラッシュメモリの状態検出方法の構成採用にある。   The fourth feature of the method of the present invention is that in the first feature of the method of the present invention, (A) data writing to the block is performed by inverting the user data sequentially sent from the host one byte at a time and measuring one bit at a time. User data that is sequentially input to the encoder by 512 bytes, the sector / block information that is sequentially transmitted from the controller by 1 byte is inverted, and is input to the encoder by 6 bits in total, and user data that is sequentially output by 1 bit from the encoder Is inverted one byte at a time, and this is sequentially stored in the data area of the flash memory for 512 bytes. The sector / block information sequentially output from the encoder is inverted one byte at a time, and this is flash memory for a total of 6 bytes. Sequentially into redundant areas And the ECC sequentially output 1 bit at a time from the encoder is inverted by 1 byte except for the last byte, and dummy data is appropriately added to the ECC that becomes the final byte, and the format is inverted as 1 byte. And sequentially storing them in a redundant area of the flash memory. (B) The detection of a bit error for a data-written block reads 512 bytes of user data stored in the data area one byte at a time. Are sequentially input to the decoder one bit at a time, the 6-byte sector / block information stored in the redundant area is read one byte at a time, and the inverted one is sequentially input to the decoder one bit at a time. ECC stored in the redundant area Read and invert 1 byte at a time, except for the last byte, 1 bit at a time, removing the dummy data from the last byte and sequentially inputting it to the decoder 1 bit at a time, and the user data, sector / block information and ECC input to the decoder, Generating a syndrome based on the syndrome, and if the syndrome reveals that there is a bit error, inputting the syndrome to a collector and counting the number of bit errors in the block, (C) data The detection of a bit error for an erased block is performed by reading a total of 512 bytes of data from the data area of the block, inputting the inverted version to the decoder one bit at a time, and the sector / block of the redundant area of the block Store A total of 6 bytes of data is read from the area in units of 1 byte, the inverted version is sequentially input to the decoder in increments of 1 bit, and the data is read out and inverted in increments of 1 byte from the ECC storage area of the relevant block, excluding the final byte Removing the same number of bits as the dummy data from the tail of the last byte, and sequentially inputting the data to the decoder one bit at a time, and generating the syndrome based on the data input to the decoder If the syndrome is found to have a bit error, the flash memory state detection method includes the step of inputting the syndrome to the collector and counting the number of bit errors in the block.

以下、本発明を実施するための最良の形態について図面を用いて説明するが、本発明は特許請求の範囲内において種々の形態を採ることができ、下記実施形態に限定されないことはいうまでもない。 The best mode for carrying out the present invention will be described below with reference to the drawings. However, the present invention can take various forms within the scope of the claims, and is not limited to the following embodiments. Absent.

(フラシュメモリのデータ領域の構成)
本発明方法を説明するにあたり、初めに、フラッシュメモリのページ構成について図1により説明する。フラッシュメモリは、二値小ブロック、二値大ブロックの他、多値大ブロックがある。二値小ブロックは、1ページが1ECCセクタ、即ち、512byteのデータ領域と16byteの冗長領域で構成されるとともに(図1(a))、1ブロックが16ページ又は32ページで構成される。二値大ブロックは、例えば1ページが4ECCセクタで構成されるとともに、1ブロックが64ページで構成される。多値大ブロックも、例えば、1ページが4ECCセクタで構成され得るが(図1(b))、1ブロックが128ページで構成される。
(Configuration of data area of flash memory)
In describing the method of the present invention, first, the page configuration of the flash memory will be described with reference to FIG. The flash memory includes a multi-value large block in addition to a binary small block and a binary large block. In the binary small block, one page is composed of one ECC sector, that is, a data area of 512 bytes and a redundant area of 16 bytes (FIG. 1A), and one block is composed of 16 pages or 32 pages. In the binary large block, for example, one page is composed of 4 ECC sectors and one block is composed of 64 pages. In the multi-value large block, for example, one page can be composed of 4 ECC sectors (FIG. 1B), and one block is composed of 128 pages.

そのさらに具体的構成例は、図2に示される通り、データ領域と冗長領域とで構成される。データ領域は、512byteのユーザデータを格納する領域であり、冗長領域は、そのユーザデータを格納するセクタやブロックに関する6byte分のセクタ/ブロック情報を格納するセクタ/ブロック情報格納領域とデータ量10byte分のECC(error correcting code)を格納するECC格納領域とで構成される。ユーザデータとセクタ/ブロック情報は、ともに後述する情報シンボルを構成するものである。ECCは、後述するエンコーダで生成されるチェックシンボルの構成要素である。なお、本発明方法は二値メモリと多値メモリの両者に適用できる。 A more specific configuration example includes a data area and a redundant area as shown in FIG. The data area is an area for storing 512-byte user data, and the redundant area is a sector / block information storage area for storing sector / block information for 6 bytes related to a sector or block for storing the user data and a data amount of 10 bytes. ECC storage area for storing ECC (error correcting code). Both the user data and the sector / block information constitute an information symbol to be described later. ECC is a component of a check symbol generated by an encoder described later. The method of the present invention can be applied to both a binary memory and a multi-level memory.

(システム構成)
本発明方法を実施するシステムは、NAND型フラッシュメモリ(以下、フラッシュメモリという)と、ホストからの指令に基づいてこのフラッシュメモリにデータの書き込みや読み出しの制御を行なうコントローラとで構成されるフラッシュメモリデバイス(「記憶装置」という)と、この記憶装置に対しデータの書き込みや読み出しを指令する前記ホストとによって構成される。フラッシュメモリとコントローラは、個別のICで構成してもよいし、ワンパッケージで構成してもよい。記憶装置は、それ自身若しくはそれが搭載された基板ごと、ホストから着脱自在にして、新品と容易に交換可能な構成にすることが好ましい。コントローラは、ハードウエアとして図3に示すエラー訂正回路(リードソロモン方式)と、該エラー訂正回路を用いて本発明方法を実行するためのプログラム(ファームウエア)を有している。エラー訂正回路は、10bitを1シンボルという単位でデータ処理するENDEC(エンコーダ1及びデコーダ2)と、後述するコレクタ3とにより構成される。
(System configuration)
A system for implementing the method of the present invention is a flash memory comprising a NAND flash memory (hereinafter referred to as a flash memory) and a controller for controlling the writing and reading of data to and from the flash memory based on commands from the host. A device (referred to as a “storage device”) and the host that instructs the storage device to write and read data. The flash memory and the controller may be composed of individual ICs or a single package. The storage device is preferably configured to be detachable from the host and the substrate on which the storage device is mounted so that it can be easily replaced with a new one. The controller has, as hardware, an error correction circuit (Reed-Solomon method) shown in FIG. 3 and a program (firmware) for executing the method of the present invention using the error correction circuit. The error correction circuit is composed of an ENDEC (encoder 1 and decoder 2) that processes 10 bits in units of one symbol, and a collector 3 described later.

(ユーザデータ及びセクタ/ブロック情報のエンコード処理、メモリへの格納)
まず、本発明方法において実行される1ECCセクタ単位のデータの書込み処理について、図4を用いて説明する。ここで図4はエンコーダであり、その内部処理を表している(図4は、後述するデコーダの処理の説明でも使用するが、以下の説明はあくまでエンコーダの処理に関するものであることに注意されたい)。まず、ホストからデータ書込み指令(Writeコマンド)を受けると、エンコーダ1に1byte(即ち8bit)ずつユーザデータが順次入力される(図のData_in)。この1byteの各bitをXOR 0xff処理、即ち8bitの各bitの値を“1”とXORすると、8bitの全データが反転される。エンコーダ1は、10bitのデータを1シンボルという単位で扱うため、前記反転した8bitのデータの先頭に2bitのダミーデータを付加し、形式上計10bitの1シンボル形式に加工して、演算回路に入力し(図のData_in1)、エンコードを実行する。
(Encoding of user data and sector / block information, storage in memory)
First, a data write process for each ECC sector executed in the method of the present invention will be described with reference to FIG. Here, FIG. 4 shows an encoder and represents its internal processing (FIG. 4 is also used in the description of the decoder processing described later, but it should be noted that the following description relates only to the encoder processing. ). First, when a data write command (Write command) is received from the host, user data is sequentially input to the encoder 1 by 1 byte (ie, 8 bits) (Data_in in the figure). When each bit of 1 byte is XOR 0xff processed, that is, when the value of each bit of 8 bits is XORed with “1”, all data of 8 bits are inverted. Since encoder 1 handles 10-bit data in units of 1 symbol, 2-bit dummy data is added to the head of the inverted 8-bit data, processed into a single symbol format of 10 bits in total, and input to the arithmetic circuit. (Data_in1 in the figure) and execute encoding.

ここで、エンコードとはエンコーダ1に入力された情報(ユーザデータと後述するセクタ/ブロック情報)をもとに、そのECC(error check code)を生成することを意味する。ユーザデータがエンコードされると、1シンボル(10bit)単位のユーザデータが演算回路より出力されるが(図4のData_out1)、この内、先頭の2bitはダミーであるため除去されるとともに、残りの8bitのユーザデータに再度XOR 0xff処理が実行される(図4のData_out)。この1byteのユーザデータは、入力された本来のユーザデータである。以上述べたユーザデータの処理が、計512byte分順次実行され、ブロックのデータ領域に順次書き込まれる。 Here, encoding means that an ECC (error check code) is generated based on information (user data and sector / block information described later) input to the encoder 1. When the user data is encoded, user data in units of one symbol (10 bits) is output from the arithmetic circuit (Data_out1 in FIG. 4). Of these, the first 2 bits are dummy and are removed, and the remaining data The XOR 0xff process is executed again on the 8-bit user data (Data_out in FIG. 4). This 1-byte user data is input original user data. The above-described user data processing is sequentially executed for a total of 512 bytes, and is sequentially written in the data area of the block.

ユーザデータのエンコードが終了すると、コントローラ内のデータフォーマッタと呼ばれるハードウエア(図示せす)から、前記ユーザデータの書込み対象となるセクタ及び該セクタが属するブロックに関する情報(特許請求範囲の「セクタ/ブロック情報」)が1byteずつエンコーダ1入力される(Data_in)。このセクタ/ブロック情報は、ALL“1”ではない値となるよう予め規定されており、前記計512byteのユーザデータのエンコードが終了すると、セクタ/ブロック情報が、上述したユーザデータと同様の処理によって、演算回路に入力されて(Data_in1)、エンコードされる。セクタ/ブロック情報については、当業者において周知であるから、本願においてその詳細な説明は割愛する。 When the encoding of the user data is completed, information on the sector to which the user data is to be written and the block to which the sector belongs is obtained from hardware called a data formatter in the controller (not shown). Information ") is input to the encoder 1 by 1 byte (Data_in). This sector / block information is preliminarily specified to be a value other than ALL “1”. When the encoding of the user data of 512 bytes is completed, the sector / block information is processed by the same process as the above-described user data. The data is input to the arithmetic circuit (Data_in1) and encoded. Sector / block information is well known to those skilled in the art, and will not be described in detail herein.

セクタ/ブロック情報がエンコードされると、ユーザデータの場合同様、1シンボル(10bit)単位のセクタ/ブロック情報が出力されるが(Data_out1)、この内先頭の2bitは同様にダミーデータであるため除去され、残りの8bitのセクタ/ブロック情報にXOR 0xff処理が実行される(Data_out)。この1byteのユーザデータは、入力された本来のセクタ/ブロック情報である。以上述べたセクタ/ブロック情報の処理が、計6byte分順次実行され、ブロックの冗長領域に順次書き込まれる。 When the sector / block information is encoded, as in the case of user data, sector / block information in units of one symbol (10 bits) is output (Data_out1), but the top 2 bits are similarly dummy data and thus removed. Then, XOR 0xff processing is executed on the remaining 8-bit sector / block information (Data_out). This 1-byte user data is the input original sector / block information. The sector / block information processing described above is sequentially executed for a total of 6 bytes, and is sequentially written in the redundant area of the block.

尚、フラッシュメモリをフォーマット(初期化/initialize)するとき、またはデータ書込済ブロックに対してデータの消去(delete)を実行する場合は、対象となるブロックの全セルの電荷を除去する処理が実行される。   Note that when formatting (initializing) the flash memory, or when erasing (deleting) data from a data-written block, there is a process of removing the charges of all cells in the target block. Executed.

(チェックシンボルの形成、メモリへの格納)
ユーザデータとセクタ/ブロック情報に対する上記エンコード処理によって、エンコーダ1では、前記ユーザデータ及びセクタ/ブロック情報に関する計10byte(80bit)分のECC(error check code)が生成され、演算回路から出力される。これを、図5を用いて説明する。図示するように、エンコーダ1の演算回路からは、10bitからなる1シンボル単位で、計8シンボル分のECCが順次出力される。本願ではシンボルという単位で構成されたECCをチェックシンボルという。尚、生成されたECCは上述したダミーデータを含んだユーザデータ及びセクタ/ブロック情報に対するエラーチェックコードである。図5に示すように、第1番目に出力されたチェックシンボルCS0、2番目のチェックシンボルCS1、以降順番に、8番目のチェックシンボル(CS7)が順に出力される。チェックシンボルが出力されるごとに、これらが連続した1byte単位の構成に順次切り貼り加工され、加工されるごとに反転される。反転されたものは、最初の1byte目の8bitのECCをCB0として、次の1byteのECCをCB1、以降順番に、10番目の1byteのECC(CB9)として再構成される。そして順次冗長領域に格納される。途中切り貼り加工されるが、エンコーダ1から出力されたチェックシンボルと冗長領域に格納されるECCは、どちらも総計80bitで、同じデータ量である(図7a)参照)。
(Formation of check symbol, storage in memory)
By the encoding process for user data and sector / block information, the encoder 1 generates an ECC (error check code) for a total of 10 bytes (80 bits) related to the user data and sector / block information and outputs it from the arithmetic circuit. This will be described with reference to FIG. As shown in the figure, ECCs for a total of 8 symbols are sequentially output from the arithmetic circuit of the encoder 1 in units of 10 bits. In the present application, ECC configured in units of symbols is referred to as a check symbol. The generated ECC is an error check code for the user data and sector / block information including the dummy data described above. As shown in FIG. 5, the check symbol CS0 output first, the second check symbol CS1, and then the eighth check symbol (CS7) are output in order. Each time a check symbol is output, these are sequentially cut and pasted into a 1-byte unit structure, and inverted every time the check symbol is processed. The inverted one is reconfigured with the first 1-byte 8-bit ECC as CB0, the next 1-byte ECC as CB1, and the 10th 1-byte ECC (CB9) in order. Then, it is sequentially stored in the redundant area. The check symbol output from the encoder 1 and the ECC stored in the redundant area are both 80 bits in total and the same data amount (see FIG. 7A).

(情報シンボルのデコード)
次に、ブロックに格納されているユーザデータとセクタ/ブロック情報のエラー検出方法について説明する。尚、以下の第1実施例では、エラー訂正回路は10bitを1シンボルという単位でデータ処理するENDEC(エンコーダ1及びデコーダ2)を使用するため、エンコーダ1とデコーダ2の演算回路で処理される際のユーザデータとセクタ/ブロック情報を“情報シンボル”という。まずブロックに格納されているデータのRead処理について、図4を用いて説明するが、ここで図4はデコーダ2を表すものとする。すなわち、以下の説明において、図4の演算回路はデコード処理する演算回路であり、先に説明したエンコード処理する演算回路とは当然異なることに注意されたい。
(Decoding information symbols)
Next, an error detection method for user data and sector / block information stored in a block will be described. In the following first embodiment, since the error correction circuit uses ENDEC (encoder 1 and decoder 2) that processes data in units of 10 bits per symbol, when processing is performed by the arithmetic circuit of encoder 1 and decoder 2. The user data and sector / block information are referred to as “information symbols”. First, read processing of data stored in a block will be described with reference to FIG. 4, where FIG. 4 represents the decoder 2. That is, in the following description, it should be noted that the arithmetic circuit in FIG. 4 is an arithmetic circuit that performs decoding processing, and is naturally different from the arithmetic circuit that performs encoding processing described above.

読み出し対象となる物理ブロックアドレスを指定し当該物理ブロックからデータの読み出しを実行するファームウエアに基づき、フラッシュメモリに対しReadが実行されると、そのブロックの先頭ページに存在する最初のECCセクタのデータ領域からユーザデータがFIFO方式で、1byte(8bit)ずつ読み出され、デコーダ2に入力される(図4のData_in)。 Based on the firmware that specifies the physical block address to be read and executes data reading from the physical block, when Read is executed for the flash memory, the data of the first ECC sector existing in the first page of that block User data is read from the area in 1-byte (8-bit) units by FIFO method and input to the decoder 2 (Data_in in FIG. 4).

この8bitのデータは、XOR 0xff処理され、その先頭に2bitのダミーデータが付加されて形式上1シンボル(10bit)に加工され(図4のData_in1)、情報シンボルとして演算回路に順次入力される。データ消去ブロックに関しては、消去エラーがない限り、その値がすべて“1”のデータがデータ領域から読み出され、上記同様の処理が実行される。 The 8-bit data is subjected to XOR 0xff processing, 2-bit dummy data is added to the head of the 8-bit data, is processed into one symbol (10 bits) in form (Data_in1 in FIG. 4), and is sequentially input to the arithmetic circuit as an information symbol. As for the data erase block, as long as there is no erase error, data whose values are all “1” are read from the data area, and the same processing as described above is executed.

演算回路でデコードされると、当該演算回路に入力されたときと同じく1シンボルのユーザデータが演算回路から出力される(図4のData_ont1)。そして、その先頭のダミーデータ2bitが除去され、残りの8bitにXOR 0xff処理が実行される(Data_out)。これはデコーダ1に入力された本来の8bitのユーザデータである。このユーザデータのデコード処理が計512byte分順次実行され、デコーダ2からコントローラ内のRAMに転送される。 When decoded by the arithmetic circuit, one symbol of user data is output from the arithmetic circuit (Data_ont1 in FIG. 4) as when input to the arithmetic circuit. Then, the leading dummy data 2 bits are removed, and XOR 0xff processing is executed on the remaining 8 bits (Data_out). This is the original 8-bit user data input to the decoder 1. This user data decoding process is sequentially executed for a total of 512 bytes and transferred from the decoder 2 to the RAM in the controller.

続いて、当該セクタの冗長領域に格納されているセクタ/ブロック情報が同じくFIFO方式で1byte(8bit)ずつデータが読み出される(Data_in)。この8bitのデータも、ユーザデータ同様にXOR 0xff処理され、その先頭に2bitのダミーデータが付加されて形式上1シンボル(10bit)に加工され(Data_in1)、ユーザデータ同様に情報シンボルとしてデコーダに順次入力される。データ消去済ブロックに関しては、消去エラーがない限り、その値がすべて“1”であるデータがセクタ/ブロック格納領域から読み出され、上記同様の処理が実行される。このセクタ/ブロック情報のデコード処理が、計6byte分順次実行される。 Subsequently, data is read from the sector / block information stored in the redundant area of the sector by 1 byte (8 bits) by the FIFO method (Data_in). This 8-bit data is also XOR 0xff processed in the same way as the user data, 2 bits of dummy data is added to the head and processed into 1 symbol (10 bits) in form (Data_in1), and sequentially as an information symbol to the decoder as in the user data. Entered. As for the data erased block, as long as there is no erase error, data whose value is all “1” is read from the sector / block storage area, and the same processing as described above is executed. This sector / block information decoding process is sequentially executed for a total of 6 bytes.

(ECCのデコード)
次に、セクタ/ブロック情報に続き、冗長領域より、ECCが読み出される。そして、ECCのチェックシンボル化、並びにそのデコードが実行されるが、これを、図6を用いて説明する。尚、図6はデコーダ2を示している。ECCは、前述したCB0乃至CB9がそのまま(即ち8bitずつ)FIFO方式で読み出されるが、デコーダ2は10bitを1シンボルとしてその処理を実行するため、読み出されたECCは10bitのシンボル形式に順次切り貼り加工され、その後、各シンボル(10bit)の全データに反転処理(XOR 0x3ff)が実行され、計8の本来のチェックシンボルとしてデコーダに順次入力される(CS0乃至CS7)。図6では、チェックシンボルCS3が構成され、デコーダ2の演算回路に入力される状態を示している。冗長領域から読み出されたECC(CB0乃至CB9)と反転されてデコーダ2の演算回路に入力されるチェックシンボル(CS0乃至CS9)は、どちらも総計80bitで、同じデータ量である(図7b)参照)。尚、データ消去済ブロックに関しては、消去エラーがない限り、その値がすべて“1”であるデータがECC格納領域から読み出され、上記同様の処理が実行される。
(ECC decoding)
Next, following the sector / block information, ECC is read from the redundant area. Then, ECC check symbols are generated and decoded, which will be described with reference to FIG. FIG. 6 shows the decoder 2. In ECC, the above-described CB0 to CB9 are read as they are (ie, 8 bits at a time) in the FIFO method, but since the decoder 2 executes the processing with 10 bits as one symbol, the read ECC is sequentially cut and pasted into a 10-bit symbol format. After that, inversion processing (XOR 0x3ff) is performed on all data of each symbol (10 bits), and sequentially input to the decoder as a total of 8 original check symbols (CS0 to CS7). FIG. 6 shows a state in which the check symbol CS3 is configured and input to the arithmetic circuit of the decoder 2. The ECC (CB0 to CB9) read from the redundant area and the check symbols (CS0 to CS9) inverted and input to the arithmetic circuit of the decoder 2 are both 80 bits in total and the same data amount (FIG. 7b). reference). For the data erased block, as long as there is no erase error, data whose value is all “1” is read from the ECC storage area, and the same processing as described above is executed.

(データエラー有無検出)
デコーダ2は、ブロックから、コントローラ内の通信路を経由してその演算回路に入力された受信語(情報シンボルとチェックシンボル)に基づいて、シンドロームを生成するものである。ユーザデータからなる計512の情報シンボルと、セクタ/ブロック情報からなる計6の情報シンボル、並びに、ECCからなる計8のチェックシンボルのすべてがデコーダ2の演算回路に入力されると、デコーダ2はそのECCセクタに関するシンドロームを生成する。デコーダ2では、このシンドロームにより、情報シンボル(512byteのユーザデータと6byteのセクタ/ブロック情報)とチェックシンボルにデータエラーがあるか否かを判別する。
(Data error detection)
The decoder 2 generates a syndrome from a block based on a received word (information symbol and check symbol) input to the arithmetic circuit via a communication path in the controller. When all 512 information symbols composed of user data, 6 information symbols composed of sector / block information, and 8 check symbols composed of ECC are all input to the arithmetic circuit of the decoder 2, the decoder 2 Generate a syndrome for that ECC sector. The decoder 2 determines whether there is a data error in the information symbol (512-byte user data and 6-byte sector / block information) and the check symbol based on this syndrome.

(bitエラー数検出)
シンドロームに依って、情報シンボル又はチェックシンボルのいずれか、またはその両者にデータエラーがあることが判明した場合、そのシンドロームはコレクタ3に入力される。コレクタ3は、デコーダ2から入力したシンドロームをもとに、Berlekamp-Massey Algorithmを用いて誤り位置多項式を生成するとともに、Chein Searchを用いて、誤りの位置(エラーのあるシンボル位置)とその根を求める。そして、Forney Algorithm により、エラーのあるシンボルを正しい値にするため、そのエラーのあるシンボルにXORする値を求める。エラーのあるシンボルが複数ある場合は、そのシンボルごとにこれを求める。これにより、当該セクタにおけるbitエラー数が判明する。
(Bit error count detection)
If it is found that there is a data error in either the information symbol and / or the check symbol, depending on the syndrome, the syndrome is input to the collector 3. The collector 3 generates an error position polynomial using the Berlekamp-Massey Algorithm based on the syndrome input from the decoder 2 and also uses the Chein Search to determine the error position (the symbol position with the error) and its root. Ask. Then, in order to make a symbol with an error a correct value by the Forney Algorithm, a value to be XORed with the symbol with the error is obtained. If there are multiple symbols with errors, this is determined for each symbol. As a result, the number of bit errors in the sector is determined.

このbitエラー数の検出を、その物理ブロックのすべてのページのすべてのセクタについて実施する。bitエラー数は、1ECCセクタの情報シンボルとチェックシンボルをエラーチェックするごとに累積記憶する。この処理を、物理ブロック番号「1」から順に、物理ブロック番号「2」、「3」・・・というように、ブロック番号(アドレス番号)を指定して、順に実施する。但し、論理ブロックアドレスと対応付けされない物理ブロック、例えば、1)システム情報が記憶されている、通常、アドレス番号「0」の物理ブロック、2)システム上の予約領域(reserved block)であって論理ブロックアドレスと対応付けされない物理ブロック、3)製造段階で不良と判断された物理ブロック(bad Block)、4)使用後にBad Blockとなった物理ブロックは除外される。エラー検出対象の全ブロックのbitエラーの検出を終了したら、エラーチェック対象となった全ブロックのユーザデータとセクタ/ブロック情報及びECCのbit総数で、カウントされたbitエラー総数を除算し、当該フラッシュメモリのBER(Bit Error Rate)を求める。求めた値を記憶装置(フラッシュメモリ又はコントローラの所定記憶領域)に記憶する。 This number of bit errors is detected for all sectors of all pages of the physical block. The number of bit errors is accumulated and stored every time an error check is performed on information symbols and check symbols of one ECC sector. This processing is performed in order from the physical block number “1” by designating block numbers (address numbers) such as physical block numbers “2”, “3”. However, a physical block that is not associated with a logical block address, such as 1) a system block in which system information is stored, usually a physical block with an address number “0”, 2) a reserved area on the system that is logical A physical block that is not associated with a block address, 3) a physical block that is determined to be bad at the manufacturing stage (bad block), and 4) a physical block that becomes a bad block after use is excluded. After detecting the bit error of all blocks subject to error detection, the total number of bit errors is divided by the total number of user data, sector / block information and ECC bits of all blocks subject to error check, and the relevant flash Obtain the BER (Bit Error Rate) of the memory. The obtained value is stored in a storage device (a flash memory or a predetermined storage area of the controller).

尚、通常のデータのReadでは、ブロックから読み出された情報にデータエラーがなかった場合、前記RAMに転送されたユーザデータは、ホストに読み出される。ブロックから読み出された情報にデータエラーがあった場合は、デコーダ2で生成された前記シンドロームがコレクタ3に入力され、Forney Algorithm によって正しい値が求められて、この正しい値で前記RAMに転送されているユーザデータを訂正する。そして正しい値に訂正されたユーザデータが前記RAMからホストに読み出される。この点、本発明方法はBERを求めること自体を主目的とするため、ユーザデータは、必ずしもホストに送出される必要はない。 In the normal data read, if there is no data error in the information read from the block, the user data transferred to the RAM is read to the host. If there is a data error in the information read from the block, the syndrome generated by the decoder 2 is input to the collector 3, and the correct value is obtained by the Forney Algorithm and transferred to the RAM with this correct value. Correct user data. Then, the user data corrected to the correct value is read from the RAM to the host. In this respect, since the method of the present invention is mainly intended to obtain the BER, the user data does not necessarily have to be transmitted to the host.

bitエラー数の検出並びにBERの算出は、例えば毎日1回定刻(例えば午前零時)に実施することができる。このとき、システムが稼働中であっても、ホストから受けるコマンドとコマンドの間など、フラッシュメモリのアイドリング中に実行することができる。 The detection of the number of bit errors and the calculation of the BER can be performed, for example, once a day (for example, at midnight). At this time, even if the system is in operation, it can be executed while the flash memory is idling, such as between commands received from the host.

経験則又は実験値によって、フラッシュメモリのメンテナンス時期若しくは交換時期とBERの関係を予め把握し、そのBERの値を閾値として設定することにより、フラッシュメモリが当該時期に達したことを、光、音などでシステム管理人に報知するようにしてもよい。報知は、特許文献4に記載したように、記憶装置に設けた報知手段、または、ホストに接続された表示装置やホストに内蔵されているスピーカのいずれで行ってもよい。ホスト側で報知する場合は、記憶装置に記憶してあるBERをホストが読み出して行う。尚閾値は、第1の値(注意caution)、第2の値(警告warning)のように複数のレベルで設定し、閾値ごとに異なる方法で報知するようにしても良い。 Based on empirical rules or experimental values, the relationship between the maintenance time or replacement time of the flash memory and the BER is grasped in advance, and the BER value is set as a threshold value to indicate that the flash memory has reached that time. For example, the system administrator may be notified. As described in Patent Document 4, the notification may be performed by either notification means provided in the storage device, a display device connected to the host, or a speaker built in the host. When the notification is made on the host side, the host reads out the BER stored in the storage device. The threshold value may be set at a plurality of levels such as the first value (caution caution) and the second value (warning warning), and the threshold value may be notified by a different method.

また、カレンダー機能やタイマー機能、さらにはコマンド発行機能を設けた外部監視装置を別途設けるとともに、記憶装置側からシリアルインターフェースやGPIOを介し又はBluetooth無線通信によってこの外部監視装置に接続し、外部監視装置から一定日の一定時刻にコマンドを発行してフラッシュメモリの状態を監視するようにしてもよい。さらには外部監視装置に通信機能を設け、フラッシュメモリの状態を管理者の携帯電話やパーソナルコンピュータ(PC)に通知するようにしてもよい。そして、BERが上記第2の閾値に達し、外部監視装置から記憶装置の交換時期の到来が通知されたとき、交換までの予備的な措置として、管理者のPCから記憶装置に対してフラッシュメモリに対するライトプロテクトやデータバックアップなどのコマンドを送り、記憶装置のコントローラにその処理を行わせてもよい。 In addition, an external monitoring device with a calendar function, a timer function, and a command issuing function is separately provided, and the external monitoring device is connected to the external monitoring device from the storage device side via a serial interface or GPIO or by Bluetooth wireless communication. The command may be issued at a certain time on a certain day to monitor the state of the flash memory. Furthermore, a communication function may be provided in the external monitoring device so that the state of the flash memory is notified to the administrator's mobile phone or personal computer (PC). When the BER reaches the second threshold value and the external monitoring device is notified of the arrival of the replacement time of the storage device, a flash memory is sent from the administrator's PC to the storage device as a preliminary measure until the replacement. A command such as write protection or data backup may be sent to the controller of the storage device to perform the processing.

また、BERの履歴を、記憶装置若しくはホストに不揮発的に記録して、管理可能にしてもよい。特に従来、エラーの発生頻度は、一般にデータの書き替え回数に依存すると考えられていたため、書替え回数を概算して寿命の到来を予測するなどしていたが、データの読み出しによっても記憶データにエラーが発生することが判明している。本発明方法によって得られたBERに依れば、そのフラッシュメモリが主にデータの書替えの行われるものであるか、読み出しの行なわれるものであるかなどの使われ方の如何に拘らず、そのメンテナンス時期または寿命到来時期(endpoint period)を事前に検知して、データ破損など不測の事態を未然に防止することに大いに役立つであろう。 Further, the BER history may be recorded in a nonvolatile manner in a storage device or a host so as to be manageable. In particular, since the frequency of error occurrence was generally considered to depend on the number of data rewrites, the number of rewrites was roughly estimated to predict the end of the service life. Has been found to occur. According to the BER obtained by the method of the present invention, the flash memory is used regardless of whether the flash memory is mainly used for data rewriting or reading. It will be of great help in detecting the maintenance period or the end point period in advance and preventing unexpected situations such as data corruption.

なお、上記実施形態例では、エンコーダ1、デコーダ2及びコレクタ3は、リードソロモン符号に対応するものであって、10bitを1シンボルという単位でデータ処理するため、ホストから送出された1byteのデータにダミーデータを2bit付加してその処理を実行している。また、エンコーダ1からは1ECCセクタあたり計10byte出力されたECCにより、1ECCセクタあたり最大4シンボル計40bitまで、ユーザデータおよびセクタ/ブロック情報及びECCのbitエラー数をカウント可能である。 In the above embodiment, the encoder 1, the decoder 2 and the collector 3 correspond to the Reed-Solomon code, and 10 bits are processed in units of 1 symbol, so that 1-byte data sent from the host is processed. The process is executed by adding 2 bits of dummy data. In addition, the ECC 1 that outputs a total of 10 bytes per ECC sector can count user data, sector / block information, and ECC bit error counts up to a total of 40 symbols per ECC sector.

同様に、リードソロモン符号に対応するエンコーダ1、デコーダ2及びコレクタ3を使用し、10bitを1シンボルという単位でデータ処理するとともに、エンコーダ1からは1ECCセクタあたりECCが計20byte出力するように構成し、該ECCにより、1ECCセクタあたり最大8シンボル、計80bitまでbitエラー数をカウントすることもできる。このとき、1ECCセクタは、ユーザデータ512byteを格納するデータ領域、並びに、6byteのセクタ/ブロック情報と20byteのECCを格納する冗長領域で構成されることになる。 Similarly, the encoder 1, decoder 2 and collector 3 corresponding to the Reed-Solomon code are used, and 10 bits are processed in units of one symbol, and the encoder 1 is configured to output a total of 20 bytes per ECC sector. According to the ECC, the number of bit errors can be counted up to a maximum of 8 symbols per ECC sector and a total of 80 bits. At this time, one ECC sector includes a data area for storing user data 512 bytes, and a redundant area for storing 6-byte sector / block information and 20-byte ECC.

また、本発明方法で使用するエンコーダ、デコーダ及びコレクタは、リードソロモン符号を使用するものに限らず、BCH(Bose-Chaudhuri- Hocquenghem multiple
error correction)符号を使用するものであってもよい。以下、BCH方式を使用したフラッシュメモリの状態検出方法の実施形態例について説明する。
In addition, the encoder, decoder and collector used in the method of the present invention are not limited to those using Reed-Solomon codes, but BCH (Bose-Chaudhuri-Hocquenghem multiple
error correction) code may be used. An embodiment of a flash memory state detection method using the BCH method will be described below.

図8は、BCH方式を使用する場合の1ECCセクタの構成例である。図に示すように、ECC格納領域には78bitのECCと2bitのダミーデータが格納される。これは、上述したリードソロモン方式のエラー訂正回路で最大4シンボル訂正を行なう場合の構成と実質的に同じである。図9は、エンコーダまたはデコーダにおけるユーザデータ及びセクタ/ブロック情報の入出力例である。BCH方式のエンコーダ及びデコーダは、1bitずつデータを処理するものであり、したがってリードソロモン方式の場合のように、シンボルという単位で入出力は行われない。よって、図示するように、ホストから送出される1byteずつのユーザデータ、並びにデータフォーマッタから入力される当該ユーザデータを書き込むべきセクタ及びブロックに関する1byteずつのセクタ/ブロック情報は、反転された後に、1bitずつエンコーダまたはデコーダの演算回路に入力される。 FIG. 8 is a configuration example of one ECC sector when the BCH method is used. As shown in the figure, the ECC storage area stores 78-bit ECC and 2-bit dummy data. This is substantially the same as the configuration in the case where a maximum of four symbols are corrected by the above-described Reed-Solomon error correction circuit. FIG. 9 is an input / output example of user data and sector / block information in the encoder or decoder. The BCH encoder and decoder process data one bit at a time, and therefore, input / output is not performed in units of symbols as in the Reed-Solomon method. Therefore, as shown in the figure, 1-byte user data sent from the host, and 1-byte sector / block information regarding the sector and block to which the user data to be written input from the data formatter are written, are inverted after 1 bit. Each is input to the arithmetic circuit of the encoder or decoder.

BCH方式を採用する場合、エンコーダまたはデコーダの演算回路からは1bitずつデータが出力される。演算回路から出力されたユーザデータ及びセクタ/ブロック情報は、8bit即ち1byte分溜まった時点でこれらがまとめて反転され、1byteずつ、フラッシュメモリに格納される。 When the BCH method is adopted, data is output bit by bit from the arithmetic circuit of the encoder or decoder. The user data and sector / block information output from the arithmetic circuit are inverted together when 8 bits, that is, 1 byte are accumulated, and stored in the flash memory by 1 byte.

またエンコーダの演算回路からは1ECCセクタにつき計78bitのECCが1bitずつ出力されるが、これも8bit即ち1byte溜まった時点でまとめて反転され、フラッシュメモリの冗長領域に格納される。但し、最終10byte目(CB9)のECCは6bitしか出力されないため、2bitのダミーデータが最終ECCのあとに付加されて形式上1byteに構成されて反転され、冗長領域に格納される(CB0〜CB9:図10参照)。 The encoder arithmetic circuit outputs a total of 78 bits of ECC per ECC sector, one bit at a time. When 8 bits, that is, 1 byte is accumulated, the ECC is inverted and stored in the redundant area of the flash memory. However, since the ECC of the final 10-byte (CB9) is output only 6 bits, 2-bit dummy data is added after the final ECC, is formed into 1-byte formally, inverted, and stored in the redundant area (CB0 to CB9) : Refer to FIG.

一方、データ領域から1byteずつ読み出されたユーザデータと冗長領域から同じく1byteずつ読み出されたセクタ/ブロック情報は、1byte単位でまとめて反転された後、1bitずつデコーダに入力される。また冗長領域から1byte単位で読み出されたECCも、同様に1byte単位でまとめて反転された後、1bitずつデコーダに入力される(CB0〜CB8)。但し、最終のCB9の最終2bitはダミーデータであるからデコーダには入力されない(後述する4bitのダミーデータも同様である)。この場合、78bitのECCで、1ECCセクタあたり、最大6bitまでのbitエラー検出が可能である。 On the other hand, user data read 1 byte from the data area and sector / block information similarly read 1 byte from the redundant area are inverted together in units of 1 byte and then input to the decoder 1 bit at a time. Similarly, the ECC read from the redundant area in units of 1 byte is similarly inverted in units of 1 byte and then input to the decoder bit by bit (CB0 to CB8). However, since the final 2 bits of the final CB9 are dummy data, they are not input to the decoder (the same applies to 4-bit dummy data described later). In this case, a 78-bit ECC can detect a bit error of up to 6 bits per ECC sector.

またBCH符号を用い、1ECCセクタを図11のように構成し、最大12bitまでのbitエラーを検出するようにしてもよい。即ちこの場合は、ECC格納領域に156bitのECCと4bitのダミーデータとが格納されることになる。これは、上述したリードソロモン方式のエラー訂正回路で最大8シンボル訂正を行なう場合の構成と実質的に同じである。また、エンコーダから出力されるECCは、CB0〜CB18までは、1byte分のECCが、最終のCB19は、ECCが4bit、ダミーデータが4bitで構成されることとなる(図12参照)。 Alternatively, a BCH code may be used to configure one ECC sector as shown in FIG. 11 so that a bit error of up to 12 bits can be detected. That is, in this case, 156-bit ECC and 4-bit dummy data are stored in the ECC storage area. This is substantially the same as the configuration in the case where a maximum of 8 symbol correction is performed by the above-described Reed-Solomon error correction circuit. Further, the ECC output from the encoder is composed of 1-byte ECC for CB0 to CB18, and the final CB19 is composed of 4 bits for ECC and 4 bits for dummy data (see FIG. 12).

BCH符号を用いるエラー訂正回路を図13に示す。BCH方式では、デコーダ2’でデータエラーの有無を判別後、データエラーの位置をbitで出力するものであり、正しい値は一義的に決定するため、エラー訂正の際、データエラーの値を求める処理が不要となっている。すなわち、コレクタ3’でエラーのある値にXORする値を求める処理は不要である。BCH方式の場合、データエラーの位置が示されることにより、このbitエラー数をカウントし、累積して、当該フラッシュメモリのBERを算出することが可能である。尚、エンコーダ1’、デコーダ2’及びコレクタ3’のいずれも、リードソロモン方式を採用するエンコーダ1、デコーダ2及びコレクタ3とは異なることはいうまでもない。 An error correction circuit using the BCH code is shown in FIG. In the BCH method, the decoder 2 'determines whether or not there is a data error, and then outputs the data error position in bits. Since the correct value is uniquely determined, the value of the data error is obtained at the time of error correction. Processing is unnecessary. That is, it is not necessary to obtain a value for XORing the erroneous value in the collector 3 '. In the case of the BCH method, it is possible to calculate the BER of the flash memory by counting and accumulating the number of bit errors by indicating the position of the data error. Needless to say, the encoder 1 ′, the decoder 2 ′, and the collector 3 ′ are all different from the encoder 1, the decoder 2, and the collector 3 that employ the Reed-Solomon method.

以上説明したように、本発明方法によれば、フラッシュメモリの状態(書込み精度、データ劣化)を日常的に監視し、その保守に利用して好適である。また本発明方法を利用してフラッシュメモリの寿命到来の予測を行う場合は、特許文献4に開示している構成、またはパワーオン時間の総計、その他の判断要素を併せてS.M.A.R.T.(self-monitoring analysis and
reporting technology)方式で実行してもよいことは言うまでもない。
As described above, according to the method of the present invention, the state (write accuracy, data deterioration) of the flash memory is monitored on a daily basis, and it is suitable for use in the maintenance thereof. In addition, when the lifetime of the flash memory is predicted using the method of the present invention, the configuration disclosed in Patent Document 4, the total power-on time, and other determination factors are combined. RT (self-monitoring analysis and
It goes without saying that it may be performed by the reporting technology method.

フラッシュメモリのページ構成例である。2 is a page configuration example of a flash memory. リードソロモン方式ENDECを使用する場合の1ECCセクタのデータ構成例である。This is a data configuration example of one ECC sector when the Reed-Solomon system ENDEC is used. リードソロモン方式のエラー訂正回路の構成である。This is a configuration of a Reed-Solomon type error correction circuit. リードソロモン方式のエンコーダ又はデコーダにおける情報シンボルのデータ入出力状態例である。It is an example data input / output state of an information symbol in a Reed-Solomon encoder or decoder. リードソロモン方式のエンコーダからのチェックシンボルのデータ出力例である。It is an example of data output of a check symbol from a Reed-Solomon encoder. リードソロモン方式のデコーダでのECC−チェックシンボル変換と演算回路への入力例である。This is an example of ECC-check symbol conversion and input to an arithmetic circuit in a Reed-Solomon decoder. リードソロモン方式ENDECを使用する場合のエンコード時とデコード時のチェックシンボルのデータ加工例である。It is an example of data processing of check symbols at the time of encoding and decoding when using the Reed-Solomon method ENDEC. BCH方式ENDECを使用する場合のECCセクタのデータ構成例である。It is an example of a data structure of the ECC sector when using the BCH system ENDEC. BCH方式のエンコーダ又はデコーダにおけるデータ入出力状態例である。It is an example of a data input / output state in a BCH encoder or decoder. BCH方式ENDECを使用する場合の冗長領域へ格納されるECCデータ構成例である。It is an example of ECC data structure stored in a redundant area when using the BCH system ENDEC. BCH方式ENDECを使用する場合のECCセクタの他のデータ構成例である。It is another data structure example of the ECC sector when using the BCH system ENDEC. BCH方式ENDECを使用する場合の冗長領域へ格納されるECCデータの他の構成例である。It is another structural example of the ECC data stored in the redundant area when using the BCH system ENDEC. BCH方式のエラー訂正回路の構成例である。It is an example of a structure of the error correction circuit of a BCH system.

符号の説明Explanation of symbols

1、1’ エンコーダ
2、2’ デコーダ
3、3’ コレクタ





















1, 1 'encoder 2, 2' decoder 3, 3 'collector





















Claims (11)

そのブロックがデータ書込済のブロックであるかデータ消去済のブロックであるかに拘らず、論理ブロックアドレスで対応付けされるすべての物理ブロックに対し、データエラーをbit単位で検出し、これをbitエラーとして総計し、当該フラッシュメモリのBER(Bit Error Rate)を算出することを特徴とするフラッシュメモリの状態検出方法。 Regardless of whether the block is a data-written block or a data-erased block, a data error is detected in bit units for all physical blocks associated with the logical block address. A method for detecting a state of a flash memory, comprising: summing up as bit errors and calculating a BER (Bit Error Rate) of the flash memory. (A)ブロックに対するデータの書込みは、
ユーザデータとセクタ/ブロック情報を、それぞれ反転して順次エンコーダに入力するステップと、
エンコーダから出力されたユーザデータを反転してフラッシュメモリのデータ領域に格納するステップと、
エンコーダから出力されたセクタ/ブロック情報とECCをそれぞれ反転してフラッシュメモリの冗長領域に格納するステップを含み、
(B)データ書込済ブロックに対するbitエラーの検出は、
前記データ領域に格納されたユーザデータを読み出し、これを反転してデコーダに順次入力するステップと、
前記冗長領域に格納されているセクタ/ブロック情報とECCを読み出し、これを反転してデコーダに順次入力するステップと、
デコーダに入力された前記ユーザデータ、セクタ/ブロック情報及びECCとに基づいてそのシンドロームを生成するステップと、
前記シンドロームによってデータエラーがあることが判明した場合、該シンドロームをコレクタに入力し、当該ブロック内のbitエラー数をカウントするステップを含み、
(C)データ消去済ブロックに対するbitエラーの検出は、
当該ブロックのデータ領域からデータを読み出して反転し、これをデコーダに順次入力するステップと、
当該ブロックの冗長領域のセクタ/ブロック情報格納領域からデータを読み出して反転し、これをデコーダに順次入力するステップと、
当該ブロックの冗長領域のECC格納領域からデータを読み出して反転し、これをデコーダに順次入力するステップと、
デコーダに入力された前記データに基づいてそのシンドロームを生成するステップと、
前記シンドロームによって当該データ消去済ブロックにbitエラーがあることが判明した場合、該シンドロームをコレクタに入力し、当該ブロック内のbitエラー数をカウントするステップを含む、
ことを特徴とする請求項1記載のフラッシュメモリの状態検出方法。
(A) Writing data to the block
Inverting user data and sector / block information, respectively, and sequentially inputting them to the encoder;
Inverting the user data output from the encoder and storing it in the data area of the flash memory;
Including the step of inverting the sector / block information and ECC output from the encoder and storing them in a redundant area of the flash memory,
(B) Detection of a bit error for a data-written block
Reading user data stored in the data area, inverting it and sequentially inputting it to a decoder;
Reading sector / block information and ECC stored in the redundant area, inverting it and sequentially inputting it to a decoder;
Generating the syndrome based on the user data, sector / block information and ECC input to the decoder;
If the syndrome reveals that there is a data error, the syndrome is input to a collector, and the number of bit errors in the block is counted.
(C) Bit error detection for a data erased block is as follows:
Reading and inverting data from the data area of the block, and sequentially inputting it to the decoder;
Reading and inverting data from the sector / block information storage area of the redundant area of the block, and sequentially inputting the data to the decoder;
Reading the data from the ECC storage area of the redundant area of the block, inverting it, and sequentially inputting it to the decoder;
Generating the syndrome based on the data input to the decoder;
If the syndrome reveals that the data erased block has a bit error, the syndrome is input to a collector, and the number of bit errors in the block is counted.
The flash memory state detection method according to claim 1.
(A)ブロックに対するデータの書込みは、
ホスト側から1byteずつ送出されるユーザデータを反転してその先頭に2bitのダミーデータを付加してこれを1情報シンボルとして、エンコーダに計512シンボル分順次入力するステップと、
セクタ/ブロック情報を反転してその先頭に2bitのダミーデータを付加し、これを同じく1情報シンボルとしてエンコーダに計6シンボル分順次入力するステップと、
エンコーダから出力された1情報シンボルのユーザデータの先頭2bitの前記ダミーデータを除去し、残りの1byteを反転した本来のユーザデータを計512byte分フラッシュメモリのデータ領域に順次格納するステップと、
エンコーダから出力された1情報シンボルのセクタ/ブロック情報の先頭2bitの前記ダミーデータを除去し、残りの1byteを反転した本来のセクタ/ブロック情報を計6byte分フラッシュメモリの冗長領域に順次格納するステップと、
エンコーダから10bit単位で順次出力されるECCからなるチェックシンボルを、連続する1byte単位のECCに順次加工し、これを反転したものをフラッシュメモリの冗長領域に順次格納するステップを含み、
(B)データ書込済ブロックに対するbitエラーの検出は、
データ領域に格納された前記ユーザデータを1byteずつ読み出してこれを反転するとともに、その先頭に2bitのダミーデータを付加して1情報シンボルとし、これを順次デコーダに入力するステップと、
冗長領域に格納された前記セクタ/ブロック情報を1byteずつ読み出してこれを反転するとともに、その先頭に2bitのダミーデータを付加して同じく1情報シンボルとし、これを順次デコーダに入力するステップと、
冗長領域に格納された前記ECCを1byteずつ順次読み出し、これを10bitで構成される連続する1シンボル単位の形式に順次加工し反転した本来のチェックシンボルをデコーダに順次入力するステップと、
デコーダに入力された前記情報シンボルとチェックシンボルとに基づいてそのシンドロームを生成するステップと、
前記シンドロームによってbitエラーがあることが判明した場合、該シンドロームをコレクタに入力し、当該ブロック内のbitエラー数をカウントするステップを含み、
(C)データ消去済ブロックに対するbitエラーの検出は、
当該ブロックのデータ領域から1byteずつデータを読み出してこれを反転し、その先頭に2bitのダミーデータを付加して1情報シンボルとし、これを512シンボル分、デコーダに順次入力するステップと、
当該ブロックの冗長領域のセクタ/ブロック情報格納領域から、1byteずつデータを読み出してこれを反転し、その先頭に2bitのダミーデータを付加して同じく1情報シンボルとし、これを6シンボル分、順次デコーダに入力するステップと、
当該ブロックの冗長領域のECC格納領域から1byteずつデータを読み出して、これを10bitで構成される連続する1シンボル単位の形式に順次加工して反転し、これをチェックシンボルとして計8シンボル分、デコーダに順次入力するステップと、
デコーダに入力された前記情報シンボルとチェックシンボルとに基づいてそのシンドロームを生成するステップと、
前記シンドロームによってbitエラーがあることが判明した場合、該シンドロームをコレクタに入力し、bitエラーのあるシンボル内のbitエラー数をカウントするステップを含む、
ことを特徴とする請求項1記載のフラッシュメモリの状態検出方法。
(A) Writing data to the block
Reversing user data sent 1 byte at a time from the host side, adding dummy data of 2 bits to the head of the user data, and inputting this as one information symbol to the encoder sequentially for a total of 512 symbols;
Inverting the sector / block information and adding 2 bits of dummy data to the head of the information, and sequentially inputting this to the encoder as a single information symbol for a total of 6 symbols;
Removing the first 2-bit dummy data of user data of one information symbol output from the encoder and sequentially storing the original user data obtained by inverting the remaining 1 byte in the data area of the flash memory for a total of 512 bytes;
The step of removing the first 2-bit dummy data of the sector / block information of one information symbol output from the encoder and sequentially storing the original sector / block information obtained by inverting the remaining 1 byte in the redundant area of the flash memory for a total of 6 bytes When,
Including sequentially processing check symbols including ECCs sequentially output from the encoder in units of 10 bits into ECCs in units of 1 byte units, and sequentially storing the inverted symbols in a redundant area of the flash memory;
(B) Detection of a bit error for a data-written block
Reading the user data stored in the data area 1 byte at a time, inverting it, adding a 2-bit dummy data to the head to form one information symbol, and sequentially inputting it to the decoder;
Reading out the sector / block information stored in the redundant area 1 byte at a time, inverting it, adding 2-bit dummy data to the head to form one information symbol, and sequentially inputting it to the decoder;
Sequentially reading the ECC stored in the redundant area one byte at a time, sequentially processing the ECC into a continuous one-symbol format composed of 10 bits, and sequentially inputting the original check symbols to the decoder;
Generating a syndrome based on the information symbols and check symbols input to a decoder;
If the syndrome reveals that there is a bit error, the syndrome is input to a collector, and the number of bit errors in the block is counted.
(C) Bit error detection for a data erased block is as follows:
Reading data from the data area of the block one byte at a time, inverting this, adding 2-bit dummy data to the head to form one information symbol, and sequentially inputting this to the decoder for 512 symbols;
Data is read out from the sector / block information storage area in the redundant area of the block by 1 byte, inverted, and 2-bit dummy data is added to the head to form one information symbol, which is sequentially decoded by 6 symbols. Step to enter
Data is read out by 1 byte from the ECC storage area of the redundant area of the block, and is sequentially processed and inverted into a format of 1 symbol unit composed of 10 bits, and this is used as a check symbol for a total of 8 symbols. Step to sequentially input to,
Generating a syndrome based on the information symbols and check symbols input to a decoder;
If the syndrome reveals that there is a bit error, the syndrome is input to a collector and includes counting the number of bit errors in a symbol with a bit error.
The flash memory state detection method according to claim 1.
エンコーダ、デコーダ及びコレクタは、リードソロモン符号に対応するものであって、エンコーダからは1ECCセクタあたり計10byteのECCが出力され、1ECCセクタあたり最大4シンボル計40bitまでbitエラー数をカウント可能であることを特徴とする請求項3記載のフラッシュメモリの状態検出方法。 The encoder, decoder, and collector are compatible with Reed-Solomon codes, and the encoder outputs a total of 10 bytes of ECC per ECC sector, and the number of bit errors can be counted up to a maximum of 40 symbols total of 4 symbols per ECC sector. The flash memory state detection method according to claim 3. エンコーダ、デコーダ及びコレクタは、リードソロモン符号に対応するものであって、エンコーダからは1ECCセクタあたり計20byteのECCが出力され、1ECCセクタあたり最大8シンボル計80bitまでbitエラー数をカウント可能であることを特徴とする請求項3記載のフラッシュメモリの状態検出方法。 The encoder, decoder, and collector support Reed-Solomon codes, and the encoder outputs a total of 20 bytes of ECC per ECC sector, and can count the number of bit errors up to a maximum of 80 bits per ECC sector. The flash memory state detection method according to claim 3. (A)ブロックに対するデータの書込みは、
ホストから1byteずつ順次送出されるユーザデータを反転して、1bitずつ計512byte分順次エンコーダに入力するステップと、
コントローラから1byteずつ順次送出されるセクタ/ブロック情報を反転して、1bitずつ計6byte分順次エンコーダに入力するステップと、
エンコーダから1bitずつ順次出力されるユーザデータを1byteずつ反転して、これを計512byte分フラッシュメモリのデータ領域に順次格納するステップと、
エンコーダから1bitずつ順次出力されるセクタ/ブロック情報を1byteずつ反転して、これを計6byte分フラッシュメモリの冗長領域に順次格納するステップと、
エンコーダから1bitずつ順次出力されるECCを、最終byteを除き1byteずつ反転するとともに、最終byteとなるECCにはその不足する分適宜ダミーデータを付加して形式上1byteとしてこれを反転し、これらをフラッシュメモリの冗長領域に順次格納するステップを含み、
(B)データ書込済ブロックに対するbitエラーの検出は、
前記データ領域に格納されている512byteのユーザデータを1byteずつ読み出し、これを反転したものを1bitずつ順次デコーダに入力するステップと、
前記冗長領域に格納されている6byteのセクタ/ブロック情報を1byteずつ読み出し、これを反転したものを1bitずつ順次デコーダに入力するステップと、
前記冗長領域に格納されているECCを1byteずつ読み出し反転し、最終byteを除き1bitずつ、最終byteからは前記ダミーデータを除去して1bitずつデコーダに順次入力するステップと、
デコーダに入力された前記ユーザデータ、セクタ/ブロック情報及びECCとに基づいてそのシンドロームを生成するステップと、
前記シンドロームによってbitエラーがあることが判明した場合、該シンドロームをコレクタに入力し、当該ブロック内のbitエラー数をカウントするステップを含み、
(C)データ消去済ブロックに対するbitエラーの検出は、
当該ブロックのデータ領域から計512byteのデータを1byteずつ読み出し、これを反転したものを1bitずつ順次デコーダに入力するステップと、
当該ブロックの冗長領域のセクタ/ブロック格納領域から計6byteのデータを1byteずつ読み出し、これを反転したものを1bitずつデコーダに順次入力するステップと、
当該ブロックの冗長領域のECC格納領域から、データを1byteずつ読み出し反転し、最終byteを除き1bitずつ、最終byteの後尾からは前記ダミーデータと同量のbit数のデータを除去して1bitずつデコーダに順次入力するステップと、
デコーダに入力された前記データに基づいてそのシンドロームを生成するステップと、
前記シンドロームによってbitエラーがあることが判明した場合、該シンドロームをコレクタに入力し、当該ブロック内のbitエラー数をカウントするステップを含む、
ことを特徴とする請求項1記載のフラッシュメモリの状態検出方法。
(A) Writing data to the block
Reversing user data sequentially sent from the host in 1-byte units and sequentially inputting the data to the encoder in units of 512 bytes;
Reversing the sector / block information sequentially sent out from the controller in 1-byte units, and inputting it to the encoder sequentially in 6-byte increments;
Inverting user data that is sequentially output from the encoder bit by bit by 1 byte, and sequentially storing the user data in a data area of the flash memory for a total of 512 bytes;
Inverting the sector / block information sequentially output by 1 bit from the encoder by 1 byte, and sequentially storing the inverted information in the redundant area of the flash memory for a total of 6 bytes;
The ECC sequentially output 1 bit at a time from the encoder is inverted by 1 byte except for the last byte, and dummy data is appropriately added to the ECC that is the final byte, and the data is inverted as 1 byte in the format, and these are inverted. Including sequentially storing in a redundant area of the flash memory;
(B) Detection of a bit error for a data-written block
Reading 512 bytes of user data stored in the data area one byte at a time, and inverting the read data one bit at a time into the decoder;
Reading 6-byte sector / block information stored in the redundant area one byte at a time, and sequentially inverting it and inputting it to the decoder one bit at a time;
The ECC stored in the redundant area is read and inverted one byte at a time, except for the last byte, one bit at a time, and the dummy data is removed from the last byte and sequentially input to the decoder one bit at a time;
Generating the syndrome based on the user data, sector / block information and ECC input to the decoder;
If the syndrome reveals that there is a bit error, the syndrome is input to a collector, and the number of bit errors in the block is counted.
(C) Bit error detection for a data erased block is as follows:
Reading a total of 512 bytes of data from the data area of the block one byte at a time, and sequentially inputting the inverted data one bit at a time to the decoder;
Reading a total of 6 bytes of data from the sector / block storage area of the redundant area of the block one byte at a time, and sequentially inputting the inverted data to the decoder one bit at a time;
The data is read out from the ECC storage area of the redundant area of the block by 1 byte, inverted, 1 bit is removed except for the last byte, and the same number of bits as the dummy data is removed from the tail of the last byte to decode 1 bit. Step to sequentially input to,
Generating the syndrome based on the data input to the decoder;
If the syndrome reveals that there is a bit error, the syndrome is input to a collector, and the number of bit errors in the block is counted.
The flash memory state detection method according to claim 1.
エンコーダ及びデコーダはBCH方式であって、エンコーダからは1ECCセクタあたり計78bitのECCが出力され、1ECCセクタあたり最大6bitまでbitエラー数をカウント可能であることを特徴とする請求項6記載のフラッシュメモリの状態検出方法。 7. The flash memory according to claim 6, wherein the encoder and the decoder are of a BCH system, and the encoder outputs a total of 78 bits of ECC per ECC sector, and can count the number of bit errors up to 6 bits per ECC sector. State detection method. エンコーダ及びデコーダはBCH方式であって、エンコーダからは1ECCセクタあたり計156bitのECCが出力され、1ECCセクタあたり最大12bitまでbitエラー数をカウント可能であることを特徴とする請求項6記載のフラッシュメモリの状態検出方法。 7. The flash memory according to claim 6, wherein the encoder and the decoder are of a BCH system, and the encoder outputs a total of 156 bits of ECC per ECC sector, and can count the number of bit errors up to a maximum of 12 bits per ECC sector. State detection method. bitエラーの検出は、フラッシュメモリがアイドリング中に実行されることを特徴とする、請求項1乃至請求項8記載のフラッシュメモリの状態検出方法。 9. The method for detecting a state of a flash memory according to claim 1, wherein the bit error is detected while the flash memory is idling. BERが所定の閾値に達した場合、当該閾値に到達したことを外部に報知することを特徴とする、請求項1乃至請求項8記載のフラッシュメモリの状態検出方法。 9. The method for detecting a state of a flash memory according to claim 1, wherein when the BER reaches a predetermined threshold, the fact that the threshold has been reached is notified to the outside. 閾値は少なくとも2以上の値で設定されてなり、外部への報知は、閾値ごとに異なった方法で実行されることを特徴とする請求項10記載のフラッシュメモリの状態検出方法。

























11. The flash memory state detection method according to claim 10, wherein the threshold value is set to a value of at least 2 and the notification to the outside is executed by a different method for each threshold value.

























JP2007149112A 2007-06-05 2007-06-05 State detection method of flash memory Pending JP2008305451A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007149112A JP2008305451A (en) 2007-06-05 2007-06-05 State detection method of flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007149112A JP2008305451A (en) 2007-06-05 2007-06-05 State detection method of flash memory

Publications (1)

Publication Number Publication Date
JP2008305451A true JP2008305451A (en) 2008-12-18

Family

ID=40234042

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007149112A Pending JP2008305451A (en) 2007-06-05 2007-06-05 State detection method of flash memory

Country Status (1)

Country Link
JP (1) JP2008305451A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8832506B2 (en) 2012-01-20 2014-09-09 International Business Machines Corporation Bit error rate based wear leveling for solid state drive memory
CN110459259A (en) * 2019-07-31 2019-11-15 至誉科技(武汉)有限公司 Store test method, system and the storage medium of equipment write error error correcting capability
US11360836B2 (en) 2020-07-02 2022-06-14 Kioxia Corporation Receiving terminal, communication system, and program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8832506B2 (en) 2012-01-20 2014-09-09 International Business Machines Corporation Bit error rate based wear leveling for solid state drive memory
US9015537B2 (en) 2012-01-20 2015-04-21 International Business Machines Corporation Bit error rate based wear leveling for solid state drive memory
CN110459259A (en) * 2019-07-31 2019-11-15 至誉科技(武汉)有限公司 Store test method, system and the storage medium of equipment write error error correcting capability
US11360836B2 (en) 2020-07-02 2022-06-14 Kioxia Corporation Receiving terminal, communication system, and program

Similar Documents

Publication Publication Date Title
CN102693760B (en) Error Correction Method for NAND Flash Memory
TWI385666B (en) Data structure for flash memory and data reading/writing method thereof
JP5017407B2 (en) Semiconductor memory device
JP5764392B2 (en) Memory controller
US9176814B2 (en) Decoding in solid state memory devices
KR100842680B1 (en) Error Correction Controller of Flash Memory Device and Memory System Including It
TWI582779B (en) Read voltage level estimating method, memory storage device and memory controlling circuit unit
US9110827B2 (en) Error detection and correction apparatus, mismatch detection apparatus, memory system and error detection and correction method
TWI490871B (en) Method for preventing read-disturb, memory control circuit unit and memory storage apparatus
JP2010237822A (en) Memory controller and semiconductor storage device
JP2012137994A (en) Memory system and controlling method thereof
US9594615B2 (en) Estimating flash quality using selective error emphasis
CN101308706B (en) Data writing method and error correction encoding/decoding method suitable for flash memory
JP6018508B2 (en) Nonvolatile semiconductor memory device and test method thereof
JP2009271852A (en) Semiconductor storage device
KR20160075001A (en) Operating method of flash memory system
JP2008305451A (en) State detection method of flash memory
CN101308702A (en) Data structure suitable for flash memory and data writing method and data reading method thereof
JP2008305507A (en) State detection method of flash memory
TWI698881B (en) Encoding method and memory storage apparatus using the same
CN104461379A (en) Method for improving stability of NAND and NAND
JP2010108029A (en) Nonvolatile memory controller, non-volatile storage device, and non-volatile storage system
TWI836877B (en) Read voltage calibration method, memory storage device and memory control circuit unit
KR20130077401A (en) Semiconductor memory device and operating method thereof
CN101178943A (en) Memory and read error detection method thereof