JP6642188B2 - Nonvolatile storage device, integrated circuit device, electronic device, and method of controlling nonvolatile storage device - Google Patents

Nonvolatile storage device, integrated circuit device, electronic device, and method of controlling nonvolatile storage device Download PDF

Info

Publication number
JP6642188B2
JP6642188B2 JP2016064840A JP2016064840A JP6642188B2 JP 6642188 B2 JP6642188 B2 JP 6642188B2 JP 2016064840 A JP2016064840 A JP 2016064840A JP 2016064840 A JP2016064840 A JP 2016064840A JP 6642188 B2 JP6642188 B2 JP 6642188B2
Authority
JP
Japan
Prior art keywords
bit
error
write
data
error correction
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.)
Active
Application number
JP2016064840A
Other languages
Japanese (ja)
Other versions
JP2017182850A (en
Inventor
真樹 正田
真樹 正田
徳田 泰信
泰信 徳田
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2016064840A priority Critical patent/JP6642188B2/en
Publication of JP2017182850A publication Critical patent/JP2017182850A/en
Application granted granted Critical
Publication of JP6642188B2 publication Critical patent/JP6642188B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Detection And Correction Of Errors (AREA)
  • Read Only Memory (AREA)

Description

本発明は、不揮発性記憶装置、集積回路装置、電子機器及び不揮発性記憶装置の制御方法等に関する。   The present invention relates to a nonvolatile storage device, an integrated circuit device, an electronic device, a method for controlling a nonvolatile storage device, and the like.

メモリーから読み出したデータが正しいか否かを検出し、誤ったデータを正しいデータに訂正する技術(ECC:Error Check and Correct又はError Correction Code)が知られている。この技術では、エラー訂正用データを付加したデータをメモリーに記憶させておき、そのデータを読み出してエラー訂正処理を行う。メモリーから読み出したデータにエラーがあったとしても、エラー訂正処理によってエラーが訂正され、正しいデータが得られる。エラー訂正処理で訂正できるビット数には上限があり、その上限は、付加されるエラー訂正用データのビット数などにより決まっている。   There is known a technology (ECC: Error Check and Correct or Error Correction Code) for detecting whether data read from a memory is correct and correcting erroneous data to correct data. In this technique, data to which error correction data is added is stored in a memory, and the data is read to perform an error correction process. Even if there is an error in the data read from the memory, the error is corrected by the error correction processing to obtain correct data. There is an upper limit on the number of bits that can be corrected by the error correction process, and the upper limit is determined by the number of bits of the added error correction data.

このようなECCの従来技術は、例えば特許文献1〜3に開示されている。特許文献1〜3では、読み出しにおいてエラー訂正処理でエラーが訂正されることを前提に、消去動作又は書き込み動作においてエラービットの存在を許可している。即ち、特許文献1、2では、書き込みベリファイにおいて検出されたエラービット数が、エラー訂正処理で訂正可能なビット数以下である場合、エラービットが検出されていても書き込みが成功したとみなしている。特許文献3では、消去ベリファイにおいて検出されたエラービット数が、エラー訂正処理で訂正可能なビット数以下である場合、エラービットが検出されていても消去が成功したとみなしている。   Conventional techniques of such ECC are disclosed in Patent Documents 1 to 3, for example. In Patent Documents 1 to 3, the existence of an error bit is permitted in an erasing operation or a writing operation on the assumption that an error is corrected by an error correction process in reading. That is, in Patent Literatures 1 and 2, when the number of error bits detected in the write verify is equal to or less than the number of bits that can be corrected by the error correction process, it is considered that the writing has succeeded even if the error bit is detected. . In Patent Literature 3, when the number of error bits detected in the erase verify is equal to or less than the number of bits that can be corrected by the error correction process, the erasure is regarded as successful even if the error bit is detected.

特開平06−131884号公報JP 06-131884 A 特開平06−131886号公報JP-A-06-131886 特開平10−222995号公報JP-A-10-222959

上記のように、従来技術では消去及び書き込みのいずれか一方でエラービットの存在を許可しているが、メモリーの長寿命化の点から消去及び書き込みの両方においてエラービットの存在を許可できることが望ましい。   As described above, in the related art, the existence of the error bit is permitted in either the erasing or the writing. However, it is desirable that the existence of the error bit can be permitted in both the erasing and the writing in view of extending the life of the memory. .

しかしながら、消去と書き込みの両方においてエラービットの存在を許可しようとすると、消去用と書き込み用にエラー訂正用データが必要となり、メモリー容量が増加してしまう。一方、エラー訂正用データのデータ量を増やさずに消去と書き込みの両方においてエラービットの存在を許可しようとすると、マージンリードの影響で不具合が生じる可能性がある。即ち、消去ベリファイ、書き込みベリファイ、通常の読み出し動作では、読み出されるビットが「0」であるか「1」であるかを判定する基準が異なっている。そのため、エラー訂正処理で訂正可能なビット数を超えてエラービットの存在が許可される可能性があり、エラー訂正処理において間違ったデータが出力される可能性がある。   However, if an attempt is made to permit the presence of an error bit in both erasing and writing, error correction data is required for erasing and writing, and the memory capacity increases. On the other hand, if an attempt is made to permit the presence of error bits in both erasing and writing without increasing the data amount of the error correction data, a problem may occur due to the influence of margin reading. That is, in the erase verify, the write verify, and the normal read operation, the criteria for determining whether the read bit is “0” or “1” are different. Therefore, the existence of error bits exceeding the number of bits that can be corrected in the error correction processing may be permitted, and erroneous data may be output in the error correction processing.

本発明の幾つかの態様によれば、消去及び書き込みの両方においてエラービットの存在を許可すると共にエラー訂正処理において正しいデータに訂正可能な不揮発性記憶装置、集積回路装置、電子機器及び不揮発性記憶装置の制御方法等を提供できる。   According to some embodiments of the present invention, a nonvolatile memory device, an integrated circuit device, an electronic device, and a nonvolatile memory that allow the presence of an error bit in both erasing and writing and that can correct correct data in an error correction process An apparatus control method and the like can be provided.

本発明の一態様は、不揮発性メモリーと、前記不揮発性メモリーへの消去動作、読み出し動作、及び書き込み動作の制御を行うメモリー制御部と、を含み、前記メモリー制御部は、前記書き込み動作において、消去ベリファイを行い、前記消去ベリファイの結果データである消去ベリファイ結果データと書き込みデータとをビット単位で比較するビット比較処理を行い、書き込みベリファイにおけるエラーをエラー訂正処理により訂正可能であるとして許可するか否かの可否決定を、前記ビット比較処理の結果に基づいて行う不揮発性記憶装置に関係する。   One embodiment of the present invention includes a non-volatile memory, a memory control unit that controls an erasing operation, a reading operation, and a writing operation to the non-volatile memory, and the memory control unit includes: Erase verify is performed, bit comparison processing is performed to compare the erase verify result data, which is the result data of the erase verify, with the write data in bit units, and whether an error in the write verify is permitted as being correctable by the error correction processing is permitted or not. The non-volatile storage device determines whether or not to perform the determination based on the result of the bit comparison process.

本発明の一態様によれば、消去ベリファイ結果データと書き込みデータとのビット比較処理を行うことで、エラー訂正処理で訂正可能なビット数を超えてエラービットの存在が許可される可能性がある場合を検出することが可能となる。そして、書き込みベリファイにおけるエラーを許可するか否かの決定をビット比較処理の結果に基づいて行うことで、上記の場合に応じた決定を行うことが可能となる。これにより、消去及び書き込みの両方においてエラービットの存在を許可し、エラー訂正処理において正しいデータに訂正することが可能となる。   According to one embodiment of the present invention, by performing the bit comparison process between the erase verification result data and the write data, the existence of an error bit may be permitted beyond the number of bits that can be corrected by the error correction process. The case can be detected. Then, by determining whether or not to permit an error in the write verification based on the result of the bit comparison processing, it is possible to make a determination according to the above case. As a result, the presence of an error bit is permitted in both erasing and writing, and correct data can be corrected in error correction processing.

また本発明の一態様では、前記メモリー制御部は、前記消去ベリファイにおいてエラーと判断された場合に、前記ビット比較処理を行ってもよい。   In one aspect of the present invention, the memory control unit may perform the bit comparison process when an error is determined in the erase verify.

書き込みベリファイにおけるエラーを許可した場合に、読み出しデータにおいてエラー訂正可能なエラービット数を超える可能性があるのは、消去ベリファイにおいてエラーと判断されている場合である。本発明の一態様によれば、そのような場合にビット比較処理を行うので、消去ベリファイにおいてエラーと判断されている場合に書き込みベリファイにおけるエラーを許可しない決定をできる。これにより、読み出しデータにおけるエラービット数をエラー訂正可能なビット数以下にできる。   When an error in write verification is permitted, there is a possibility that the number of error bits that can be corrected in read data may exceed the number of error bits in erase verification. According to one embodiment of the present invention, the bit comparison process is performed in such a case. Therefore, when an error is determined in the erase verification, it is possible to determine not to permit an error in the write verification. This makes it possible to reduce the number of error bits in the read data to the number of error-correctable bits or less.

また本発明の一態様では、前記メモリー制御部は、前記ビット比較処理において、前記消去ベリファイ結果データのうちエラーと判定された消去エラービットと、前記消去エラービットに対応する前記書き込みデータの書き込みビットとの比較処理を行ってもよい。   In one aspect of the present invention, the memory control unit may include, in the bit comparison processing, an erase error bit determined as an error in the erase verify result data, and a write bit of the write data corresponding to the erase error bit. May be compared.

消去エラービットと、それに対応する書き込みデータの書き込みビットとが異なる論理レベルである場合に、書き込みベリファイにおけるエラーを許可すると、読み出しデータにおいてエラー訂正可能なエラービット数を超える可能性がある。本発明の一態様によれば、消去エラービットと書き込みビットとの比較処理を行うことで、上記のような場合を検出することが可能となる。   If an error in the write verification is permitted when the erase error bit and the write bit of the corresponding write data are at different logical levels, the number of error bits in the read data may exceed the number of error bits that can be corrected. According to one embodiment of the present invention, the above-described case can be detected by comparing the erase error bit and the write bit.

また本発明の一態様では、前記メモリー制御部は、前記ビット比較処理において前記消去エラービットと前記書き込みビットとが同じ第1の論理レベルであると判定された場合、前記書き込みベリファイの結果データである書き込みベリファイ結果データのうちエラーと判定された書き込みエラービットを、前記エラー訂正処理による訂正が可能なビットとして、前記書き込みデータの前記不揮発性メモリーへの書き込みが成功したと判定してもよい。   Further, in one aspect of the present invention, when it is determined in the bit comparison process that the erasure error bit and the write bit are at the same first logical level, the memory control unit determines whether the write verification result data is the same. A write error bit determined as an error in certain write verify result data may be determined as a bit that can be corrected by the error correction processing, and it may be determined that the write data has been successfully written to the nonvolatile memory.

上述のように、消去エラービットと書き込みビットとが異なる論理レベルである場合に、読み出しデータにおいてエラー訂正可能なエラービット数を超える可能性がある。本発明の一態様によれば、消去エラービットと書き込みビットとが同じ第1の論理レベルであると判定された場合に書き込みエラービットが許可される。これにより、エラー訂正可能なエラービット数を超える可能性がない場合に、書き込みエラービットを許可できる。   As described above, when the erase error bit and the write bit are at different logical levels, there is a possibility that the number of error bits in the read data that can be corrected is exceeded. According to one aspect of the present invention, the write error bit is permitted when it is determined that the erase error bit and the write bit are at the same first logical level. Thus, when there is no possibility that the number of error bits that can be corrected is exceeded, a write error bit can be permitted.

また本発明の一態様では、前記メモリー制御部は、前記ビット比較処理において前記消去エラービットと前記書き込みビットとが同じ前記第1の論理レベルであると判定された場合、前記書き込みベリファイにおけるエラーを許可するか否かを表すエラー訂正可否フラグを、エラーを許可するアクティブに設定し、前記エラー訂正可否フラグがアクティブである場合、前記書き込みエラービットが前記エラー訂正処理により訂正可能であるか否かを判定し、前記書き込みエラービットが前記エラー訂正処理により訂正可能であると判定された場合、前記書き込みデータの前記不揮発性メモリーへの書き込みが成功したと判定してもよい。   In one aspect of the present invention, the memory control unit, when it is determined in the bit comparison process that the erase error bit and the write bit are at the same first logical level, removes an error in the write verify. An error correction enable / disable flag indicating whether or not to allow is set to active to allow an error.If the error correction enable / disable flag is active, whether or not the write error bit can be corrected by the error correction processing is determined. If it is determined that the write error bit can be corrected by the error correction process, it may be determined that the write data has been successfully written to the nonvolatile memory.

このようにすれば、ビット比較処理において消去エラービットと書き込みビットとが同じ第1の論理レベルであるか否かに応じて、エラー訂正可否フラグの論理レベルが設定される。そして、そのエラー訂正可否フラグがアクティブの場合に、書き込みエラービットがエラー訂正処理により訂正可能であるか否かの判定が行われる。このようにして、ビット比較処理において消去エラービットと書き込みビットとが同じ第1の論理レベルである場合に、書き込みエラービットを許可することが可能となる。   In this way, the logic level of the error correction enable / disable flag is set in the bit comparison process according to whether the erase error bit and the write bit have the same first logic level. Then, when the error correction enable / disable flag is active, it is determined whether or not the write error bit can be corrected by the error correction process. In this way, when the erase error bit and the write bit are at the same first logical level in the bit comparison processing, the write error bit can be permitted.

また本発明の一態様では、不揮発性記憶装置は、前記読み出し動作を行う読み出し回路を含み、前記読み出し回路は、前記消去ベリファイでは、消去ベリファイ用判定基準で前記不揮発性メモリーからデータを読み出し、前記書き込みベリファイでは、前記消去ベリファイ用判定基準とは異なる書き込みベリファイ用判定基準で前記不揮発性メモリーからデータを読み出してもよい。   In one embodiment of the present invention, the nonvolatile memory device includes a read circuit that performs the read operation, and the read circuit reads data from the nonvolatile memory based on an erase verify determination criterion in the erase verify, In the write verification, data may be read from the nonvolatile memory according to a write verification criterion different from the erase verification criterion.

本発明の一態様では、消去ベリファイで用いられる消去ベリファイ用判定基準と、書き込みベリファイで用いられる書き込みベリファイ用判定基準とは異なっている。このようなマージンリードを行うことで、消去や書き込みにおいてデータにマージンを持たせる(データを保証する)ことが可能となる。一方で、エラー訂正処理を前提としてエラービットを許容した場合、マージンリードの影響でエラーを正しく訂正できない可能性があるという問題があるが、本発明の一態様によれば、そのような問題を解決できる。   In one embodiment of the present invention, the criterion for erasure verification used in erase verification is different from the criterion for write verification used in write verification. By performing such a margin read, it is possible to provide a margin to data (guaranteed data) in erasing or writing. On the other hand, when error bits are allowed on the premise of error correction processing, there is a problem that errors may not be correctly corrected due to the influence of margin reading. According to one embodiment of the present invention, such a problem is solved. Solvable.

また本発明の一態様では、不揮発性記憶装置は、前記消去動作及び前記書き込み動作を行う消去及び書き込み回路と、前記読み出し動作を行う読み出し回路と、を含み、前記メモリー制御部は、前記ビット比較処理を行うビット比較部と、前記消去及び書き込み回路及び前記読み出し回路の制御と、前記可否決定と、を行う制御部と、前記読み出し回路により読み出されたデータに対して前記エラー訂正処理を行うエラー訂正部と、前記エラー訂正処理に用いるエラー訂正用データを生成するエラー訂正用データ生成部と、を有してもよい。   In one embodiment of the present invention, a nonvolatile memory device includes an erase and write circuit that performs the erase operation and the write operation, and a read circuit that performs the read operation. A bit comparison unit that performs processing, a control unit that controls the erase / write circuit and the read circuit, and determines whether or not the read / write circuit is enabled, and performs the error correction process on data read by the read circuit. An error correction unit and an error correction data generation unit that generates error correction data used for the error correction processing may be provided.

このようにすれば、ビット比較部により消去ベリファイ結果データと書き込みデータとのビット比較処理が行われ、制御部により、書き込みエラービットを許可するか否かの可否判定が行われる。これにより、エラー訂正部が行うエラー訂正処理において、正しい結果データを得ることが可能となる。   With this configuration, the bit comparison unit performs a bit comparison process between the erase verification result data and the write data, and the control unit determines whether or not to permit the write error bit. This makes it possible to obtain correct result data in the error correction processing performed by the error correction unit.

また本発明の他の態様は、上記のいずれかに記載された不揮発性記憶装置を含む集積回路装置に関係する。   Another embodiment of the present invention relates to an integrated circuit device including the nonvolatile memory device described in any of the above.

また本発明の更に他の態様は、上記のいずれかに記載された不揮発性記憶装置を含む電子機器に関係する。   Still another embodiment of the present invention relates to an electronic device including the nonvolatile memory device described in any of the above.

また本発明の更に他の態様は、不揮発性メモリーを含む不揮発性記憶装置の制御方法であって、前記不揮発性メモリーへの書き込み動作において、消去ベリファイを行い、前記消去ベリファイの結果データである消去ベリファイ結果データと書き込みデータとをビット単位で比較するビット比較処理を行い、書き込みベリファイにおけるエラーをエラー訂正処理により訂正可能であるとして許可するか否かの可否決定を、前記ビット比較処理の結果に基づいて行う不揮発性記憶装置の制御方法に関係する。   Still another aspect of the present invention is a method of controlling a nonvolatile memory device including a nonvolatile memory, wherein in a write operation to the nonvolatile memory, an erase verify is performed, and an erase as data resulting from the erase verify is performed. A bit comparison process of comparing the verification result data and the write data in a bit unit is performed, and whether or not to permit an error in the write verification as being correctable by the error correction process is determined based on the result of the bit comparison process. The present invention relates to a method of controlling the nonvolatile memory device based on the control method.

図1は、本実施形態の不揮発性記憶装置の構成例である。FIG. 1 is a configuration example of a nonvolatile storage device according to the present embodiment. 図2は、本実施形態の消去動作のフローチャートである。FIG. 2 is a flowchart of the erasing operation of the present embodiment. 図3は、比較例の書き込み動作のフローチャートである。FIG. 3 is a flowchart of the write operation of the comparative example. 図4は、ビットの記憶データが消去される消去回数とビット数の関係を示すヒストグラムの例である。FIG. 4 is an example of a histogram showing the relationship between the number of times of erasure of stored data of bits and the number of bits. 図5は、消去ベリファイ及び書き込みベリファイをパスしたにも関わらずエラー訂正できない場合の具体例である。FIG. 5 shows a specific example in which error correction cannot be performed even though the erase verify and the write verify have been passed. 図6Aは、図5の具体例におけるエラー訂正処理の説明図である。FIG. 6A is an explanatory diagram of the error correction processing in the specific example of FIG. 図6Bは、図5の具体例におけるエラー訂正処理の説明図である。FIG. 6B is an explanatory diagram of the error correction processing in the specific example of FIG. 図6Cは、図5の具体例におけるエラー訂正処理の説明図である。FIG. 6C is an explanatory diagram of the error correction processing in the specific example of FIG. 図7は、マージンリードを模式的に説明する図である。FIG. 7 is a diagram schematically illustrating margin reading. 図8は、本実施形態の書き込み動作のフローチャートである。FIG. 8 is a flowchart of the write operation of the present embodiment. 図9は、ビット比較処理によりエラー訂正可否フラグが「1」となる場合の具体例である。FIG. 9 is a specific example in which the error correction enable / disable flag becomes “1” by the bit comparison process. 図10は、ビット比較処理によりエラー訂正可否フラグが「0」となる場合の具体例である。FIG. 10 is a specific example in a case where the error correction enable / disable flag becomes “0” by the bit comparison process. 図11は、本実施形態の不揮発性記憶装置の詳細な構成例である。FIG. 11 is a detailed configuration example of the nonvolatile memory device according to the present embodiment. 図12は、読み出し回路、不揮発性メモリーの詳細な構成例である。FIG. 12 is a detailed configuration example of the readout circuit and the nonvolatile memory. 図13Aは、エラー訂正用データの生成処理の説明図である。FIG. 13A is an explanatory diagram of the generation processing of the error correction data. 図13Bは、エラー訂正用データの生成処理の説明図である。FIG. 13B is an explanatory diagram of the generation processing of the error correction data. 図13Cは、エラー訂正用データの生成処理の説明図である。FIG. 13C is an explanatory diagram of the generation processing of the error correction data. 図14Aは、エラー訂正処理の説明図である。FIG. 14A is an explanatory diagram of the error correction processing. 図14Bは、エラー訂正処理の説明図である。FIG. 14B is an explanatory diagram of the error correction processing. 図14Cは、エラー訂正処理の説明図である。FIG. 14C is an explanatory diagram of the error correction processing. 図14Dは、エラー訂正処理の説明図である。FIG. 14D is an explanatory diagram of the error correction processing. 図15は、消去動作において許可されたエラービットを訂正する場合の具体例である。FIG. 15 shows a specific example in which an error bit permitted in an erasing operation is corrected. 図16は、書き込み動作において許可されたエラービットを訂正する場合の具体例である。FIG. 16 shows a specific example of correcting an error bit permitted in a write operation. 図17は、本実施形態の電子機器の構成例である。FIG. 17 is a configuration example of an electronic device of the present embodiment.

以下、本発明の好適な実施の形態について詳細に説明する。なお以下に説明する本実施形態は特許請求の範囲に記載された本発明の内容を不当に限定するものではなく、本実施形態で説明される構成の全てが本発明の解決手段として必須であるとは限らない。   Hereinafter, preferred embodiments of the present invention will be described in detail. Note that the present embodiment described below does not unduly limit the contents of the present invention described in the claims, and all the configurations described in the present embodiment are essential as solving means of the present invention. Not necessarily.

1.構成
図1は、本実施形態の不揮発性記憶装置200の構成例である。不揮発性記憶装置200は、不揮発性メモリー10、消去及び書き込み回路20、読み出し回路30、メモリー制御部100(メモリー制御回路)を含む。不揮発性記憶装置200は、例えば集積回路装置として構成される。
1. 1. Configuration FIG. 1 is a configuration example of a nonvolatile storage device 200 according to the present embodiment. The nonvolatile memory device 200 includes a nonvolatile memory 10, an erasing and writing circuit 20, a reading circuit 30, and a memory control unit 100 (memory control circuit). The nonvolatile storage device 200 is configured as, for example, an integrated circuit device.

不揮発性メモリー10は、電源が供給されない状態においても記憶データを保持するメモリーである。本実施形態では、不揮発性メモリー10として、電気的に記憶データを複数回書き替え(消去及び書き込み)可能なものを想定しており、例えばEEPROM(Electrically Erasable Programmable Read-Only Memory)やフラッシュメモリ等である。例えば、不揮発性メモリー10はマトリックス状に配置されたメモリーセルアレイと、メモリーセルアレイの各行に沿って設けられるワード線と、メモリーセルアレイの各列に沿って設けられるビット線とで構成される。メモリーセルアレイの各メモリーセルはワード線とビット線の交点に設けられており、ワード線とビット線によりメモリーセルの物理アドレスが指定される。メモリーセルは、例えばフローティングゲートに注入された電荷によりデータを保持するフローティングゲート型MOSトランジスターや、絶縁膜に注入された電荷によりデータを保持するMONOS(Metal-Oxide-Nitride-Oxide-Silicon)型トランジスター等である。   The nonvolatile memory 10 is a memory that retains stored data even when power is not supplied. In the present embodiment, it is assumed that the nonvolatile memory 10 is capable of electrically rewriting (erasing and writing) the stored data a plurality of times, such as an electrically erasable programmable read-only memory (EEPROM) or a flash memory. It is. For example, the nonvolatile memory 10 includes a memory cell array arranged in a matrix, word lines provided along each row of the memory cell array, and bit lines provided along each column of the memory cell array. Each memory cell of the memory cell array is provided at the intersection of a word line and a bit line, and the physical address of the memory cell is specified by the word line and the bit line. The memory cell is, for example, a floating gate type MOS transistor that holds data by charge injected into a floating gate, or a MONOS (Metal-Oxide-Nitride-Oxide-Silicon) transistor that holds data by charge injected into an insulating film. And so on.

消去及び書き込み回路20は、不揮発性メモリー10に記憶されたデータを消去する消去動作と、不揮発性メモリー10に対してデータを書き込む書き込み動作とを行う回路である。具体的には、消去動作では、対象のメモリーセル全てに対して「1」(ハイレベル、広義には第2の論理レベル)を書き込む。書き込み動作では、消去動作によってオール「1」となっているメモリーセルのうち、書き込みデータの「0」(ローレベル、広義には第1の論理レベル)のビットに対応するメモリーセルに対して「0」を書き込む。消去及び書き込み回路は、例えばビット線を駆動する書き込みアンプ回路や、ワード線を選択する選択回路で構成される。なお選択回路はメモリー制御部100に含まれてもよい。   The erasing and writing circuit 20 is a circuit that performs an erasing operation for erasing data stored in the nonvolatile memory 10 and a writing operation for writing data to the nonvolatile memory 10. Specifically, in the erase operation, "1" (high level, in a broad sense, the second logic level) is written to all the target memory cells. In the write operation, among the memory cells that are all “1” due to the erase operation, the memory cell corresponding to the bit of the write data “0” (low level, first logical level in a broad sense) is “ Write "0". The erase and write circuit includes, for example, a write amplifier circuit that drives a bit line and a selection circuit that selects a word line. Note that the selection circuit may be included in the memory control unit 100.

読み出し回路30は、不揮発性メモリー10に記憶されたデータを読み出す読み出し動作を行う回路である。読み出し回路30は、例えばメモリーセルからビット線に出力されるセル電流とリファレンス電流とを比較し、その比較結果に基づいて読み出しデータ(ビットの論理レベル)を検出するセンスアンプで構成される。   The read circuit 30 is a circuit that performs a read operation for reading data stored in the nonvolatile memory 10. The read circuit 30 is configured by, for example, a sense amplifier that compares a cell current output from a memory cell to a bit line with a reference current and detects read data (logic level of a bit) based on the comparison result.

メモリー制御部100は、不揮発性記憶装置200の各部を制御する。例えばメモリー制御部100は、論理アドレスを物理アドレスにデコードし、その物理アドレスに対する消去動作、書き込み動作、読み出し動作を制御する。また、ユーザーデータからエラー訂正用データ(ECCデータ)を生成する処理や、読み出しデータに対するエラー訂正処理(ECC処理)を行う。ここで消去動作は、記憶データの消去、消去ベリファイ、消去の成功(パス)及び失敗(フェイル)の判定を含む動作である。書き込み動作は、書き込みデータの書き込み、書き込みベリファイ、書き込みの成功及び失敗の判定を含む動作である。本実施形態では、書き込み動作は更に、消去ベリファイ、消去ベリファイで読み出したデータと書き込みデータ(期待値)とのビット比較処理を含む。そして、そのビット比較処理の結果に基づいて書き込みの成功及び失敗の判定を行う。読み出し動作は、記憶データの読み出しを含む動作である。メモリー制御部100は、例えばゲートアレイ等の自動配置配線手法で生成されたロジック回路や、或いはマイクロコンピューターやDSP(Digital Signal Processor)などの各種のプロセッサーにより実現できる。プロセッサーにより実現する場合、例えば不揮発性記憶装置200は更にメモリーを含み、そのメモリーにはメモリー制御部100の機能を記述したプログラム等が記憶される。そして、そのプログラムをプロセッサーが実行することによってメモリー制御部100の機能が実現される。   The memory control unit 100 controls each unit of the nonvolatile storage device 200. For example, the memory control unit 100 decodes a logical address into a physical address and controls an erase operation, a write operation, and a read operation for the physical address. In addition, a process for generating error correction data (ECC data) from user data and an error correction process (ECC process) for read data are performed. Here, the erasing operation is an operation including erasing of stored data, erasing verification, and determination of success (pass) and failure (fail) of erasing. The write operation is an operation including writing of write data, write verification, and determination of success or failure of writing. In the present embodiment, the write operation further includes an erase verify, and a bit comparison process between the data read by the erase verify and the write data (expected value). Then, based on the result of the bit comparison processing, the success or failure of the writing is determined. The read operation is an operation including reading of stored data. The memory control unit 100 can be realized by a logic circuit generated by an automatic placement and routing method such as a gate array, or various processors such as a microcomputer and a DSP (Digital Signal Processor). When implemented by a processor, for example, the non-volatile storage device 200 further includes a memory, in which a program or the like describing the function of the memory control unit 100 is stored. Then, the function of the memory control unit 100 is realized by the processor executing the program.

さて、読み出し時のエラー訂正処理により訂正可能であることを前提として、消去動作や書き込み動作においてエラービットの存在を許可(許容)する手法がある。しかしながら、図2〜図7で後述するように、消去動作と書き込み動作の両方においてエラービットを許可した場合、読み出しデータに対してエラー訂正処理を行っても正しいデータに訂正できない可能性がある。   Now, there is a method of permitting (permitting) the existence of an error bit in an erasing operation or a writing operation on the assumption that the error bit can be corrected by an error correction process at the time of reading. However, as will be described later with reference to FIGS. 2 to 7, when error bits are permitted in both the erasing operation and the writing operation, there is a possibility that even if error correction processing is performed on read data, correct data cannot be corrected.

即ち、消去ベリファイで用いる判定基準(図7のリファレンス電流IE)と書き込みベリファイで用いる判定基準(リファレンス電流IW)には、それぞれ異なるマージンが設定されているため、消去ベリファイでエラーと判定されたビットが書き込みベリファイでパスと判定される場合がある。この場合、書き込みベリファイで新たにエラービットが許可されることになる。そして、読み出し動作ではマージンリードを行わない(リファレンス電流IR)ので、消去ベリファイでエラーと判定され且つ書き込みベリファイでパスと判定されたビットが、読み出しデータでエラービットとなる可能性がある。そうすると、書き込みベリファイで新たに許可したエラービットと合わせて、エラー訂正可能な最大のビット数を超えてしまう可能性がある。   That is, since different margins are set for the judgment criterion (reference current IE in FIG. 7) used for erase verification and the judgment criterion (reference current IW) used for write verification, a bit determined as an error in the erase verification is set. May be determined as a pass in the write verify. In this case, a new error bit is permitted in the write verify. Since the margin read is not performed in the read operation (reference current IR), there is a possibility that a bit determined as an error in the erase verify and a pass in the write verify becomes an error bit in the read data. Then, there is a possibility that the maximum number of bits that can be error-corrected, together with the error bits newly permitted in the write verification, will be exceeded.

この点、本実施形態の不揮発性記憶装置200は、不揮発性メモリー10と、不揮発性メモリー10への消去動作、読み出し動作、及び書き込み動作の制御を行うメモリー制御部100と、を含む。そしてメモリー制御部100は、書き込み動作において、消去ベリファイを行い、その消去ベリファイの結果データである消去ベリファイ結果データと書き込みデータとをビット単位で比較するビット比較処理を行う。メモリー制御部100は、書き込みベリファイにおけるエラーをエラー訂正処理により訂正可能であるとして許可するか否かの可否決定を、ビット比較処理の結果に基づいて行う。   In this regard, the non-volatile storage device 200 of the present embodiment includes the non-volatile memory 10 and the memory control unit 100 that controls an erasing operation, a reading operation, and a writing operation for the non-volatile memory 10. In the write operation, the memory control unit 100 performs an erase verify, and performs a bit comparison process of comparing the erase verify result data, which is the result data of the erase verify, with the write data on a bit basis. The memory control unit 100 determines whether or not to permit an error in the write verification as being correctable by the error correction processing based on the result of the bit comparison processing.

例えば図8で後述する書き込み動作のフローでは、ステップS21で消去ベリファイを行い、ステップS25でビット比較を行う。そしてステップS26、S24、S27でビット比較の結果に基づいてエラー訂正可否フラグを設定し、ステップS31〜S34でエラー訂正可否フラグに基づいて、書き込みベリファイにおけるエラーをエラー訂正処理により訂正可能であるとして許可するか否かの可否決定を行っている。   For example, in the flow of a write operation described later with reference to FIG. 8, erase verify is performed in step S21, and bit comparison is performed in step S25. In steps S26, S24, and S27, an error correction enable / disable flag is set based on the result of the bit comparison. In steps S31 to S34, based on the error correction enable / disable flag, it is determined that an error in the write verify can be corrected by an error correction process. A decision is made as to whether to permit.

図5で後述するように、消去ベリファイでエラーと判定されたビット(B1)に対応する書き込みデータのビットが「1」である場合に、エラー訂正できなくなる可能性がある。本実施形態によれば、消去ベリファイ結果データと書き込みデータのビット比較処理を行うことで、このような場合を検出することが可能となる。そして、ビット比較処理の結果に基づいて書き込みベリファイのエラーを許可するか否かを決定することで、上記の場合に応じた決定(書き込みベリファイのエラーを許可しない決定)を行うことが可能となり、エラービット数をエラー訂正可能なビット数以下にできる。   As will be described later with reference to FIG. 5, when the bit of the write data corresponding to the bit (B1) determined as an error in the erase verify is “1”, there is a possibility that the error cannot be corrected. According to the present embodiment, such a case can be detected by performing a bit comparison process between the erase verification result data and the write data. By deciding whether or not to permit a write-verify error based on the result of the bit comparison process, it is possible to make a decision corresponding to the above case (decision not to permit a write-verify error), The number of error bits can be reduced to the number of error-correctable bits or less.

また本実施形態では、メモリー制御部100は、消去ベリファイにおいてエラーと判断された場合に、ビット比較処理を行う。   In the present embodiment, the memory control unit 100 performs a bit comparison process when an error is determined in the erase verify.

例えば図8に示すように、ステップS21の消去ベリファイでエラービットが検出された場合、ステップS23でYESに分岐し、ステップS25でビット比較処理を行う。   For example, as shown in FIG. 8, when an error bit is detected in the erase verify in step S21, the process branches to YES in step S23, and performs a bit comparison process in step S25.

消去ベリファイで用いる判定基準(図7のリファレンス電流IE)は通常の読み出し動作で用いる判定基準(リファレンス電流IR)に対して、「1」を厳しく判定するマージンが設定されている。即ち、消去ベリファイをパスしたビットは通常の読み出し動作においても正しい値が読み出される。このことから、エラー訂正可能なエラービット数を超える可能性があるのは、消去ベリファイにおいてエラーと判断された場合であり、そのような場合にビット比較処理を行うことで、エラービット数をエラー訂正可能なビット数以下にできる。   The criterion (reference current IE in FIG. 7) used in the erase verify has a margin for strictly determining “1” with respect to the criterion (reference current IR) used in the normal read operation. That is, a correct value is read out from a bit that has passed the erase verify even in a normal read operation. From this, there is a possibility that the number of error bits may exceed the number of error bits that can be corrected if the erase verification determines that an error has occurred.In such a case, the bit comparison process is performed to reduce the number of error bits. The number of correctable bits can be reduced.

また本実施形態では、メモリー制御部100は、ビット比較処理において、消去ベリファイ結果データのうちエラーと判定された消去エラービット(例えば図5のB1)と、その消去エラービットに対応する書き込みデータの書き込みビット(B2)との比較処理を行う。   Further, in the present embodiment, the memory control unit 100 determines, in the bit comparison processing, the erase error bit (for example, B1 in FIG. 5) determined as an error in the erase verify result data and the write data corresponding to the erase error bit. A comparison process with the write bit (B2) is performed.

上述したように、消去エラービットに対応する書き込みデータの書き込みビットが「1」である場合に、エラー訂正可能なエラービット数を超える可能性がある。本実施形態によれば、それらのビットの比較処理を行うことで、上記の場合を検出することが可能となる。   As described above, when the write bit of the write data corresponding to the erase error bit is “1”, there is a possibility that the number of error bits that can be corrected is exceeded. According to the present embodiment, the above-described case can be detected by performing the comparison processing of those bits.

また本実施形態では、メモリー制御部100は、ビット比較処理において消去エラービットと書き込みビットとが同じ第1の論理レベル(「0」)であると判定された場合、書き込みベリファイの結果データである書き込みベリファイ結果データのうちエラーと判定された書き込みエラービットを、エラー訂正処理による訂正が可能なビットとして、書き込みデータの不揮発性メモリー10への書き込みが成功したと判定する。   Further, in the present embodiment, when it is determined in the bit comparison process that the erase error bit and the write bit are at the same first logical level (“0”), the memory control unit 100 is the data of the write verify. A write error bit determined as an error in the write verification result data is determined as a bit that can be corrected by an error correction process, and it is determined that the write data has been successfully written to the nonvolatile memory.

例えば図8に示すように、ステップS26で消去エラービットと書き込みビットとが一致すると判定された場合にはYESに分岐し、ステップS24でエラー訂正可否フラグが1に設定される。そしてステップS32でYESに分岐し、ステップS33で書き込みエラービット数がエラー訂正可能なビット数以下と判定された場合にYESに分岐し、書き込みが成功したと判定される。   For example, as shown in FIG. 8, if it is determined in step S26 that the erase error bit and the write bit match, the process branches to YES, and the error correction enable / disable flag is set to 1 in step S24. Then, the process branches to YES in step S32, and if it is determined in step S33 that the number of write error bits is equal to or less than the number of bits in which error correction is possible, the process branches to YES and determines that the write was successful.

書き込みベリファイで用いる判定基準(図7のリファレンス電流IW)は通常の読み出し動作で用いる判定基準(リファレンス電流IR)に対して、「0」(第1の論理レベル)を厳しく判定するマージンが設定されている。即ち、書き込みベリファイをパスした「0」のビットは通常の読み出し動作においても正しい値が読み出される。図9に示すように、消去ベリファイでは「0」のビットがエラービットと判定される(D1)。即ち、その消去エラービットと書き込みビットとが同じ第1の論理レベル(「0」)であると判定された場合、そのビットは通常の読み出し動作ではエラービットにならない。これにより、書き込みベリファイにおいてエラーと判定されたビットを許可しても、エラービット数をエラー訂正可能なビット数以下にできる。   As for the criterion (reference current IW in FIG. 7) used in the write verify, a margin for strictly determining “0” (first logical level) is set with respect to the criterion (reference current IR) used in the normal read operation. ing. That is, a correct value is read out even in a normal read operation for a bit of “0” that has passed the write verify. As shown in FIG. 9, in the erase verify, the bit of "0" is determined as an error bit (D1). That is, when it is determined that the erase error bit and the write bit are at the same first logical level (“0”), the bit does not become an error bit in a normal read operation. As a result, the number of error bits can be made equal to or less than the number of error-correctable bits even if the bits determined as errors in the write verification are permitted.

また本実施形態では、メモリー制御部100は、ビット比較処理において消去エラービットと書き込みビットとが同じ第1の論理レベルであると判定された場合(図8のS26、YES)、書き込みベリファイにおけるエラーを許可するか否かを表すエラー訂正可否フラグを、エラーを許可するアクティブに設定する(S24)。メモリー制御部100は、エラー訂正可否フラグがアクティブである場合(S32、YES)、書き込みエラービットがエラー訂正処理により訂正可能であるか否かを判定する(S33)。そしてメモリー制御部100は、書き込みエラービットがエラー訂正処理により訂正可能であると判定された場合(S33、YES)、書き込みデータの不揮発性メモリー10への書き込みが成功(パス)したと判定する。   Further, in the present embodiment, when it is determined in the bit comparison process that the erase error bit and the write bit are at the same first logic level (S26, YES in FIG. 8), an error in the write verify is performed. An error correction enable / disable flag indicating whether or not the error is permitted is set to be active for permitting the error (S24). When the error correction enable / disable flag is active (S32, YES), the memory control unit 100 determines whether the write error bit can be corrected by the error correction process (S33). Then, when it is determined that the write error bit can be corrected by the error correction process (S33, YES), the memory control unit 100 determines that the writing of the write data to the nonvolatile memory 10 has succeeded (passed).

このようにすれば、ビット比較処理において消去エラービットと書き込みビットとが同じ第1の論理レベルであるか否かに応じて、エラー訂正可否フラグの論理レベルが設定される。そして、そのエラー訂正可否フラグがアクティブの場合に、書き込みベリファイにおいてエラーと判定されたビットがエラー訂正処理により訂正可能であるか否かの判定が行われる。このようにして、ビット比較処理において消去エラービットと書き込みビットとが同じ第1の論理レベルである場合に、書き込み動作において書き込みエラービットを許可することが可能となる。   In this way, the logic level of the error correction enable / disable flag is set in the bit comparison process according to whether the erase error bit and the write bit have the same first logic level. Then, when the error correction enable / disable flag is active, it is determined whether a bit determined as an error in the write verify can be corrected by the error correction process. In this way, when the erase error bit and the write bit are at the same first logical level in the bit comparison processing, the write error bit can be permitted in the write operation.

また本実施形態の不揮発性記憶装置200は、読み出し動作を行う読み出し回路30を含む。そして読み出し回路30は、消去ベリファイでは、消去ベリファイ用判定基準(図7のリファレンス電流IE)で不揮発性メモリー10からデータを読み出し、書き込みベリファイでは、消去ベリファイ用判定基準とは異なる書き込みベリファイ用判定基準(リファレンス電流IW)で不揮発性メモリー10からデータを読み出す。   Further, the nonvolatile memory device 200 of the present embodiment includes a read circuit 30 that performs a read operation. Then, the read circuit 30 reads data from the nonvolatile memory 10 using the erase verify criterion (the reference current IE in FIG. 7) in the erase verify, and the write verify criterion different from the erase verify criterion in the write verify. The data is read from the nonvolatile memory 10 by (reference current IW).

図7に示すように、消去ベリファイでは「1」を厳しく判定する判定基準を用い、書き込みベリファイでは「0」を厳しく判定する判定基準を用いる。このようなマージンリードを行うことで、消去や書き込みにおいてデータにマージンを持たせる(データを保証する)ことが可能となる。一方で、エラー訂正処理を前提としてエラービットを許容した場合、上記のようなマージンリードの影響で上述したような問題が起こりうるが、本実施形態では、そのような問題を解決できる。   As shown in FIG. 7, a criterion for strictly determining “1” is used in erase verification, and a criterion for strictly determining “0” is used in write verification. By performing such a margin read, it is possible to provide a margin to data (guaranteed data) in erasing or writing. On the other hand, if the error bit is allowed on the premise of the error correction processing, the above-described problem may occur due to the influence of the margin read as described above. In the present embodiment, such a problem can be solved.

また本実施形態では、図11で後述するように、不揮発性記憶装置200は、消去動作及び書き込み動作を行う消去及び書き込み回路20と、読み出し動作を行う読み出し回路30と、を含む。メモリー制御部100は、ビット比較処理を行うビット比較部130と、消去及び書き込み回路20及び読み出し回路30の制御と可否決定とを行う制御部110と、読み出し回路30により読み出されたデータのエラー訂正処理を行うエラー訂正部150と、エラー訂正処理に用いるエラー訂正用データを生成するエラー訂正用データ生成部140と、を有する。   In the present embodiment, as described later with reference to FIG. 11, the nonvolatile memory device 200 includes an erasing and writing circuit 20 for performing an erasing operation and a writing operation, and a reading circuit 30 for performing a reading operation. The memory control unit 100 includes a bit comparison unit 130 that performs a bit comparison process, a control unit 110 that controls the erase / write circuit 20 and the read circuit 30 and determines whether or not the data is read, and an error of data read by the read circuit 30. It has an error correction unit 150 that performs a correction process, and an error correction data generation unit 140 that generates error correction data used for the error correction process.

このようにすれば、ビット比較部130により消去ベリファイ結果データと書き込みデータとのビット比較処理が行われ、制御部110により、書き込みエラービットを許可するか否かの判定(可否決定)が行われる。これにより、エラー訂正部150が行うエラー訂正処理において、正しい結果データを得ることが可能となる。   With this configuration, the bit comparison unit 130 performs a bit comparison process between the erase verification result data and the write data, and the control unit 110 determines whether to permit the write error bit (permission determination). . Accordingly, it is possible to obtain correct result data in the error correction processing performed by the error correction unit 150.

なお、上記では不揮発性記憶装置200の構成及び動作を説明したが、以下のような不揮発性記憶装置200の制御方法が実行されてもよい。即ち、不揮発性メモリー10を含む不揮発性記憶装置200の制御方法において、不揮発性メモリー10への書き込み動作において、消去ベリファイを行い、消去ベリファイの結果データである消去ベリファイ結果データと書き込みデータとをビット単位で比較するビット比較処理を行い、書き込みベリファイにおけるエラーをエラー訂正処理により訂正可能であるとして許可するか否かの可否決定を、ビット比較処理の結果に基づいて行う。   Although the configuration and operation of the nonvolatile storage device 200 have been described above, the following control method of the nonvolatile storage device 200 may be executed. That is, in the method of controlling the nonvolatile memory device 200 including the nonvolatile memory 10, the erase verify is performed in the write operation to the nonvolatile memory 10, and the erase verify result data and the write data, which are the result data of the erase verify, are bit-separated. A bit comparison process for comparing in units is performed, and a determination as to whether or not to permit an error in the write verification as being correctable by the error correction process is made based on the result of the bit comparison process.

このような不揮発性記憶装置200の制御方法により、消去ベリファイと書き込みベリファイの両方において、検出されたエラーをエラー訂正処理で訂正可能であるとして許可することが可能となる。これにより、不揮発性メモリー10の寿命を延ばすこと等が可能になる。   With such a control method of the nonvolatile memory device 200, it is possible to permit a detected error as being correctable by an error correction process in both the erase verify and the write verify. This makes it possible to extend the life of the nonvolatile memory 10 and the like.

2.消去動作と書き込み動作でエラービットを許可した場合の問題点
以下、本実施形態の消去動作と、比較例の書き込み動作とを説明し、それらの両方を実行した場合に生じる課題について説明する。そして、その課題を解決できる本実施形態の手法の詳細について説明する。
2. Problems When Error Bits Are Allowed in Erase Operation and Write Operation Hereinafter, the erase operation of the present embodiment and the write operation of the comparative example will be described, and the problem that occurs when both of them are executed will be described. Then, details of the method of the present embodiment that can solve the problem will be described.

図2は、本実施形態の消去動作のフローチャートである。消去動作が開始されると、消去及び書き込み回路20が、メモリー制御部100から指示されたアドレス(ワード或いはページ)にオール「1」のデータ(消去用データ)を書き込み、記憶データを消去する(S1)。次に、読み出し回路30が、ステップS1で消去されたアドレスのデータを消去用マージンリードにより読み出し、メモリー制御部100が消去ベリファイを行う(S2)。即ち、読み出し回路30が、消去ベリファイ用の判定基準で各ビットのデータが「0」であるか「1」であるかを判定して、データを読み出す。そしてメモリー制御部100が、読み出したデータと期待値(オール「1」)を比較し、期待値と異なるビット(「0」のビット)をエラービットと判定(検出)する。次に、メモリー制御部100は、ステップS2で判定されたエラービットのビット数をカウントする(S3)。   FIG. 2 is a flowchart of the erasing operation of the present embodiment. When the erasing operation is started, the erasing and writing circuit 20 writes all “1” data (erasing data) to the address (word or page) specified by the memory control unit 100 and erases the stored data ( S1). Next, the read circuit 30 reads the data of the address erased in step S1 by the margin read for erasing, and the memory control unit 100 performs the erase verify (S2). That is, the read circuit 30 determines whether the data of each bit is “0” or “1” based on the criterion for erasure verification, and reads the data. Then, the memory control unit 100 compares the read data with the expected value (all “1”), and determines (detects) a bit (“0” bit) different from the expected value as an error bit. Next, the memory control unit 100 counts the number of error bits determined in step S2 (S3).

次に、メモリー制御部100は、エラービットのビット数がエラー訂正処理で訂正可能なビット数以下であるか否かを判定する(S4)。エラービットのビット数がエラー訂正処理で訂正可能なビット数以下である場合には、メモリー制御部100は、消去が成功(パス)したと判断し、消去動作を終了する。一方、エラービットのビット数がエラー訂正処理で訂正可能なビット数以下でない場合には、メモリー制御部100は、消去回数が規定値未満であるか否かを判定する(S5)。消去回数は、今回の消去動作においてステップS1の消去を実行した回数である。消去回数が規定値未満である場合には、メモリー制御部100は、消去回数を示す変数をカウントアップ(インクリメント)し、ステップS1に戻る(S6)。一方、消去回数が規定値未満でない場合には、メモリー制御部100は、消去動作が失敗(フェイル)したと判断し、消去動作を終了する。   Next, the memory control unit 100 determines whether or not the number of error bits is equal to or less than the number of bits that can be corrected by the error correction process (S4). If the number of error bits is equal to or smaller than the number of bits that can be corrected by the error correction process, the memory control unit 100 determines that the erasing has been successful (passed), and ends the erasing operation. On the other hand, when the number of error bits is not less than the number of bits that can be corrected by the error correction process, the memory control unit 100 determines whether the number of erasures is less than a specified value (S5). The number of times of erasing is the number of times that the erasing in step S1 is executed in the current erasing operation. If the erase count is less than the specified value, the memory control unit 100 counts up (increments) a variable indicating the erase count, and returns to step S1 (S6). On the other hand, if the erase count is not less than the specified value, the memory control unit 100 determines that the erase operation has failed (failed), and ends the erase operation.

このように、本実施形態の消去動作では基本的に、不揮発性メモリー10に記憶されたデータが正しく消去されるまで繰り返し消去を行う。一方で、読み出し時のエラー訂正処理により訂正可能なビット数以下であれば、エラービットが存在していたとしても消去できたものとみなしている。   As described above, in the erasing operation of the present embodiment, basically, erasing is repeatedly performed until data stored in the nonvolatile memory 10 is correctly erased. On the other hand, if the number of bits is equal to or less than the number of bits that can be corrected by the error correction process at the time of reading, it is regarded that the erasure was possible even if there were error bits.

図3は、比較例の書き込み動作のフローチャートである。書き込み動作が開始されると、消去及び書き込み回路20が、メモリー制御部100から指示されたアドレス(ワード或いはページ)に書き込みデータを書き込む(S41)。次に、読み出し回路30が、ステップS41で書き込まれたデータを書き込み用マージンリードにより読み出し、メモリー制御部100が書き込みベリファイを行う(S42)。即ち、読み出し回路30が、書き込みベリファイ用の判定基準で各ビットのデータが「0」であるか「1」であるかを判定して、データを読み出す。そしてメモリー制御部100が、読み出したデータと期待値(書き込みデータ)を比較し、期待値と異なるビットをエラービットと判定する。次に、メモリー制御部100は、ステップS42で判定されたエラービットのビット数をカウントする(S43)。   FIG. 3 is a flowchart of the write operation of the comparative example. When the writing operation is started, the erasing and writing circuit 20 writes the writing data to the address (word or page) specified by the memory control unit 100 (S41). Next, the read circuit 30 reads the data written in step S41 by a write margin read, and the memory control unit 100 performs write verification (S42). That is, the read circuit 30 determines whether the data of each bit is “0” or “1” based on the determination criteria for write verification, and reads the data. Then, the memory control unit 100 compares the read data with an expected value (write data), and determines a bit different from the expected value as an error bit. Next, the memory control unit 100 counts the number of error bits determined in step S42 (S43).

次に、メモリー制御部100は、エラービットのビット数がエラー訂正処理で訂正可能なビット数以下であるか否かを判定する(S44)。エラービットのビット数がエラー訂正処理で訂正可能なビット数以下である場合には、メモリー制御部100は、書き込みが成功(パス)したと判断し、書き込み動作を終了する。一方、エラービットのビット数がエラー訂正処理で訂正可能なビット数以下でない場合には、メモリー制御部100は、書き込み回数が規定値未満であるか否かを判定する(S45)。書き込み回数は、今回の書き込み動作においてステップS41の書き込みを実行した回数である。書き込み回数が規定値未満である場合には、メモリー制御部100は、書き込み回数を示す変数をカウントアップ(インクリメント)し、ステップS41に戻る(S46)。一方、書き込み回数が規定値未満でない場合には、書き込み動作が失敗(フェイル)したと判断し、書き込み動作を終了する。   Next, the memory control unit 100 determines whether or not the number of error bits is equal to or less than the number of bits that can be corrected by the error correction processing (S44). If the number of error bits is equal to or smaller than the number of bits that can be corrected by the error correction process, the memory control unit 100 determines that the writing has succeeded (passed), and ends the writing operation. On the other hand, when the number of error bits is not less than the number of bits that can be corrected by the error correction process, the memory control unit 100 determines whether the number of times of writing is less than a specified value (S45). The number of times of writing is the number of times of executing the writing in step S41 in the current writing operation. When the number of times of writing is less than the specified value, the memory control unit 100 counts up (increments) a variable indicating the number of times of writing, and returns to step S41 (S46). On the other hand, if the number of times of writing is not less than the specified value, it is determined that the writing operation has failed (failed), and the writing operation is terminated.

このように、比較例の書き込み動作では基本的に、不揮発性メモリー10に書き込みデータが正しく書き込まれるまで繰り返し書き込みを行う。一方で、読み出し時のエラー訂正処理により訂正可能なビット数以下であれば、エラービットが存在していたとしても書き込みできたものとみなしている。   As described above, in the write operation of the comparative example, basically, the write operation is repeatedly performed until the write data is correctly written in the nonvolatile memory 10. On the other hand, if the number of bits is equal to or less than the number of bits that can be corrected by the error correction processing at the time of reading, it is considered that writing was possible even if there were error bits.

以上のように消去動作や書き込み動作においてエラービット数がエラー訂正可能なビット数以下であればエラービットを許可しているのは、以下の理由による。   As described above, if the number of error bits is equal to or less than the number of error-correctable bits in the erasing operation or the writing operation, error bits are permitted for the following reason.

図4は、ビットの記憶データが消去される(即ち消去ベリファイをパスする)消去回数とビット数の関係を示すヒストグラムの例である。   FIG. 4 is an example of a histogram showing the relationship between the number of erases and the number of bits in which stored data of bits is erased (that is, the erase verify is passed).

図4のA1に示すように、平均的な消去回数よりも突出して消去回数が多いビットが存在する場合がある。もし、エラービットを許可せずに、消去ベリファイにより全てのビットが「1」と判定されるまで消去を繰り返したとする。この場合、A1に示すビットに「1」が書き込まれるまで消去を繰り返すことになる。そうすると、A2に示すような平均的な消去回数で済むはずのビットに対して、必要以上に消去(「1」の書き込み)が繰り返されることになる。このようなオーバーライティングが行われると、メモリーセルにダメージを与える可能性があり、不揮発性メモリー10の寿命を縮めてしまう可能性がある。   As indicated by A1 in FIG. 4, there may be a case where there is a bit that is more prominent than the average number of times of erasure and has a higher number of times of erasure. Suppose that erasure is repeated without permitting error bits until all bits are determined to be "1" by erase verify. In this case, erasure is repeated until "1" is written to the bit indicated by A1. As a result, erasure (writing of “1”) is repeated more than necessary for the bit that should be completed with the average number of erasures as indicated by A2. When such overwriting is performed, the memory cells may be damaged, and the life of the nonvolatile memory 10 may be shortened.

この点、A1に示すようなビットが消去ベリファイでエラーと判定されたとしても、それを許可して消去動作を終了することによって、A3に示すように消去回数を抑えることが可能となる。これによって不揮発性メモリー10の寿命を延ばすことができる。   In this regard, even if a bit such as A1 is determined to be an error in the erase verification, by permitting the error and terminating the erase operation, it is possible to reduce the number of erases as indicated by A3. As a result, the life of the nonvolatile memory 10 can be extended.

なお、上記では消去を例に説明したが、書き込み回数においても同様な特性のヒストグラムとなり、同様の議論が成り立つ。即ち、書き込み動作では消去で「1」になっているビットに「0」を書き込むが、書き込みベリファイにおけるエラービットを許可することで、書き込み回数(「0」のオーバーライティング)を抑制できる。   In the above description, erasing is described as an example. However, a histogram having similar characteristics is obtained for the number of times of writing, and the same argument holds. That is, in a write operation, “0” is written to a bit that has been set to “1” by erasure, but by permitting an error bit in write verification, the number of times of writing (overwriting of “0”) can be suppressed.

さて、消去動作でのみエラービットを許可し、書き込み動作ではエラービットを許可しない場合、或いは書き込み動作でのみエラービットを許可し、消去動作ではエラービットを許可しない場合には、エラー訂正処理により正しいデータに訂正可能である(例えば後述する図13A〜図16を参照)。しかしながら、上述した本実施形態の消去動作と比較例の書き込み動作では、その両方においてエラービットを許可している。このように消去動作と書き込み動作の両方においてエラービットを許可した場合、エラー訂正処理により正しいデータに訂正できない場合がある。以下、この点について図5〜図7を用いて説明する。   By the way, when the error bit is permitted only in the erasing operation and the error bit is not permitted in the writing operation, or when the error bit is permitted only in the writing operation and the error bit is not permitted in the erasing operation, the error correction processing corrects the error bit. The data can be corrected (for example, see FIGS. 13A to 16 described later). However, in the above-described erase operation of the present embodiment and the write operation of the comparative example, the error bit is permitted in both of the operations. When error bits are permitted in both the erasing operation and the writing operation, correct data may not be corrected by error correction processing. Hereinafter, this point will be described with reference to FIGS.

図5は、消去ベリファイ及び書き込みベリファイをパスしたにも関わらずエラー訂正できない場合の具体例である。   FIG. 5 shows a specific example in which error correction cannot be performed even though the erase verify and the write verify have been passed.

図5に示すように、不揮発性メモリー10に記憶されるデータは、不揮発性メモリー10に本来記憶させようとしているデータ(以下、ユーザーデータと呼ぶ)と、書き込みデータのエラー訂正を行うためにユーザーデータから生成されたエラー訂正用データと、で構成される。ここで、ユーザーデータは、例えば処理装置(CPU等)から転送されたデータや、メモリー制御部100等の処理によって生成されたデータ等であり、特定のユーザー等によって用意されたデータのみを想定するものではない。   As shown in FIG. 5, data stored in the non-volatile memory 10 includes data originally to be stored in the non-volatile memory 10 (hereinafter, referred to as user data) and a user data for performing error correction of write data. And error correction data generated from the data. Here, the user data is, for example, data transferred from a processing device (CPU or the like), data generated by a process of the memory control unit 100 or the like, and only data prepared by a specific user or the like is assumed. Not something.

例えば、メモリーを所定サイズのページ単位に分割して制御するページング方式の場合、ユーザーデータは1ページのデータに対応する。そして、その1ページのデータからエラー訂正用データを生成する。或いは、ワード単位で制御する方式の場合、ユーザーデータは1ワードのデータに対応する。そして、その1ワードのデータからエラー訂正用データを生成する。   For example, in the case of a paging method in which a memory is divided into pages of a predetermined size and controlled, user data corresponds to data of one page. Then, error correction data is generated from the one page of data. Alternatively, in the case of the method of controlling in word units, the user data corresponds to one word data. Then, error correction data is generated from the one word data.

図5は、ハミング符号によるエラー訂正用データを付加する例である。この手法では、2ビットのユーザーデータに対してN+1ビットのエラー訂正用データを対応させることで、ユーザーデータとエラー訂正用データを合わせたデータのうち最大で1ビットまでのエラービットを訂正可能である。エラー訂正手法の詳細については図13A〜図16で後述する。図5は、4(=2)ビットのユーザーデータ(x1,x2,x3,x4)に対して、ハミング符号による3(=2+1)ビットのエラー訂正用データ(p1,p2,p3)を付加する例であり、7ビットの書き込みデータのうち最大で1ビットのエラービットを訂正可能である。なお、訂正可能な最大のビット数は2以上であってもよい。また、エラー訂正用データの生成手法はハミング符号に限定されない。 FIG. 5 shows an example of adding error correction data using a Hamming code. In this method, up to 1 error bit can be corrected from the combined data of user data and error correction data by associating N + 1 bits of error correction data with 2N bits of user data. It is. Details of the error correction method will be described later with reference to FIGS. FIG. 5 shows that 4 (= 2 2 ) bits of user data (x1, x2, x3, x4) are added with 3 (= 2 + 1) bits of error correction data (p1, p2, p3) by Hamming code. This is an example in which one error bit can be corrected at a maximum of 7 bits of write data. Note that the maximum number of correctable bits may be two or more. Further, the method of generating the error correction data is not limited to the Hamming code.

図5に示すように、消去用データの期待値は「1111111」である。消去動作において、消去ベリファイによって読み出されたデータ(消去ベリファイ結果データと呼ぶ)が「1101111」だったとすると、B1に示すビットx3がエラービットである。エラービット数は1以下なので、消去動作は成功したと判断される。   As shown in FIG. 5, the expected value of the data for erasure is “1111111”. In the erase operation, if the data read by the erase verify (referred to as erase verify result data) is “1101111”, the bit x3 indicated by B1 is an error bit. Since the number of error bits is 1 or less, it is determined that the erasing operation has been successful.

次に書き込み動作が行われる。書き込みデータの期待値を「0110001」とする。書き込み動作では、「0」のビットx1、x4、p1、p2に対してのみ書き込みが行われる。即ち、B2に示すビットx3(書き込みビット)は「1」なので書き込みが行われず、消去動作における消去ベリファイで「0」と判定された状態(消去動作でメモリーセルに蓄積された電荷)が維持される。このとき、書き込みベリファイによって読み出されたデータ(書き込みベリファイ結果データと呼ぶ)において、ビットx3が「0」となることが期待される。しかし、B3に示すように、マージンリードの影響でビットx3が「1」と判定される可能性がある。このマージンリードの影響については図7で後述する。   Next, a write operation is performed. Assume that the expected value of the write data is “0110001”. In the writing operation, writing is performed only on the bits x1, x4, p1, and p2 of “0”. That is, since the bit x3 (write bit) shown in B2 is "1", writing is not performed, and the state (charge accumulated in the memory cell in the erase operation) determined to be "0" by the erase verify in the erase operation is maintained. You. At this time, it is expected that the bit x3 becomes “0” in the data read by the write verify (referred to as write verify result data). However, as indicated by B3, the bit x3 may be determined to be “1” due to the influence of the margin read. The effect of the margin read will be described later with reference to FIG.

ビットx3の期待値は「1」なので、書き込みベリファイでは消去ベリファイとは異なり、ビットx3はパスと判定される。そうすると、ビットx3はエラービットとしてカウントされないので、ビットx3以外にエラービットが1ビットあったとしても、書き込みが成功したと判断されることになる。B4に示すように、期待値が「0」であるビットx1が書き込みベリファイにおいて「1」と判定され、エラービットと判断されたとする。   Since the expected value of the bit x3 is "1", the bit x3 is determined to be a pass in the write verify unlike the erase verify. Then, since bit x3 is not counted as an error bit, it is determined that writing has succeeded even if there is one error bit other than bit x3. As shown in B4, it is assumed that the bit x1 whose expected value is "0" is determined to be "1" in the write verify, and is determined to be an error bit.

このとき、B5に示すように、通常の読み出し動作における読み出しデータ(エラー訂正前のデータ)では、マージンリードを行わないためビットx3が「0」と読み出される可能性がある。この場合、ビットx1、x3の2ビットが期待値と異なる状態となり、エラー訂正可能なエラービット数を超えてしまう。このような読み出しデータに対してエラー訂正処理を行うと、エラー訂正処理の結果データは「1101001」となり、書き込みデータの期待値「0110001」とは異なるデータとなってしまう。   At this time, as shown in B5, in the read data (data before error correction) in the normal read operation, the bit x3 may be read as “0” because the margin read is not performed. In this case, two bits x1 and x3 differ from the expected value, and exceed the number of error bits that can be corrected. When error correction processing is performed on such read data, the data resulting from the error correction processing becomes “1101001”, which is different from the expected value “0110001” of the write data.

具体的には、図6Aに示すように、読み出しデータ「1100001」からシンドローム(s1,s2,s3)を求める。そして図6Bに示すように、シンドローム(s1,s2,s3)を誤りベクトル(e1,e2,e3,e4,e5,e6,e7)に変換する。図6Bの誤りベクトルでは、e4=1となっており、ビットx4がエラービットであることを示している。図6Cに示すように、読み出しデータと誤りベクトルの排他的論理和(xor)を求める。この処理により、エラービットであるビットx4の論理レベルが「0」から「1」に反転され、エラー訂正処理の結果データとして「1101001」が得られる。このように、エラー訂正可能なビット数を超えるエラービットが読み出しデータに存在した場合、その読み出しデータに対してエラー訂正処理を行っても、書き込みデータの期待値と同じデータに復元することはできない。   Specifically, as shown in FIG. 6A, the syndromes (s1, s2, s3) are obtained from the read data “1100001”. Then, as shown in FIG. 6B, the syndrome (s1, s2, s3) is converted into an error vector (e1, e2, e3, e4, e5, e6, e7). In the error vector in FIG. 6B, e4 = 1, indicating that bit x4 is an error bit. As shown in FIG. 6C, an exclusive OR (xor) of the read data and the error vector is obtained. By this processing, the logical level of the bit x4, which is an error bit, is inverted from “0” to “1”, and “1101001” is obtained as the result data of the error correction processing. As described above, when error bits exceeding the number of error-correctable bits exist in the read data, even if the error correction processing is performed on the read data, the data cannot be restored to the same value as the expected value of the write data. .

図7は、マージンリードを模式的に説明する図である。不揮発性メモリー10ではメモリーセルからの電流(セル電流)とリファレンス電流をセンスアンプで比較することで、データを読み出す。図7に示すように、通常の読み出し動作におけるリファレンス電流IRに対して、消去ベリファイにおけるリファレンス電流IE(>IR)や書き込みベリファイにおけるリファレンス電流IW(<IR)にはマージンが設けられている。   FIG. 7 is a diagram schematically illustrating margin reading. In the nonvolatile memory 10, data is read by comparing the current from the memory cell (cell current) with a reference current by a sense amplifier. As shown in FIG. 7, a margin is provided for a reference current IE (> IR) in erase verification and a reference current IW (<IR) in write verification with respect to a reference current IR in a normal read operation.

消去ベリファイでは、セル電流がリファレンス電流IEよりも大きい場合に「1」と判定される。即ち、消去ベリファイをパスしたビットのビット数を各セル電流でカウントしたヒストグラムDSEは、リファレンス電流IEよりも上に分布をもつ。一方、リファレンス電流IEよりもセル電流が小さい場合は「0」と判定されるので、図5のB1のビットx3に対応するメモリーセルのセル電流は、リファレンス電流IEよりも小さいことになる。ここでC1に示すように、そのセル電流が通常の読み出し動作におけるリファレンス電流IR付近(例えば少しだけ小さい値)だったとする。   In the erase verify, when the cell current is larger than the reference current IE, it is determined to be “1”. That is, the histogram DSE in which the number of bits that have passed the erase verify is counted for each cell current has a distribution above the reference current IE. On the other hand, if the cell current is smaller than the reference current IE, it is determined to be “0”, so that the cell current of the memory cell corresponding to the bit x3 of B1 in FIG. 5 is smaller than the reference current IE. Here, as shown by C1, it is assumed that the cell current is near the reference current IR in a normal read operation (eg, a slightly smaller value).

書き込みベリファイでは、セル電流がリファレンス電流IWよりも小さい場合に「0」と判定される。即ち、書き込みベリファイをパスしたビットのビット数を各セル電流でカウントしたヒストグラムDSWは、リファレンス電流IWよりも下に分布をもつ。一方、リファレンス電流IWよりもセル電流が大きい場合は「1」と判定されるので、C1に示すセル電流のビットは、「1」と判定されることになる。このようにして、図5のB3に示すように、書き込みベリファイにおいてビットx3が「1」と判定され、消去ベリファイとは異なった判定結果となる。   In the write verify, when the cell current is smaller than the reference current IW, it is determined to be “0”. That is, the histogram DSW in which the number of bits passing the write verify is counted by each cell current has a distribution below the reference current IW. On the other hand, when the cell current is larger than the reference current IW, it is determined to be “1”, so that the bit of the cell current indicated by C1 is determined to be “1”. In this manner, as shown by B3 in FIG. 5, the bit x3 is determined to be "1" in the write verify, and the determination result is different from that of the erase verify.

そして、このビットx3を通常の読み出し動作で読み出した場合、C1に示すようにセル電流はリファレンス電流IRよりも少し小さいので、ビットx3は「0」と判定されることになる。このようにして、図5のB5に示すように、通常の読み出し動作においてビットx3が「0」と読み出され、書き込みデータのビットx3の期待値「1」とは異なった値となる。   When the bit x3 is read by the normal read operation, the bit x3 is determined to be "0" because the cell current is slightly smaller than the reference current IR as indicated by C1. In this way, as indicated by B5 in FIG. 5, the bit x3 is read as "0" in the normal read operation, and has a value different from the expected value "1" of the bit x3 of the write data.

3.本実施形態の手法
以下、上記のような課題を解決できる本実施形態の手法について説明する。図8は、本実施形態の書き込み動作のフローチャートである。
3. Hereinafter, a method according to the present embodiment that can solve the above-described problem will be described. FIG. 8 is a flowchart of the write operation of the present embodiment.

書き込み動作が開始されると、読み出し回路30が、書き込みデータを書き込もうとするアドレスのデータ(書き込み動作の前の消去動作で書き込まれたデータ)を消去用マージンリードにより読み出し、メモリー制御部100が消去ベリファイを行う(S21)。即ち、メモリー制御部100は、読み出したデータと期待値(オール「1」)を比較し、期待値と異なるビット(「0」のビット)をエラービットと判定する。次に、メモリー制御部100は、ステップS21で判定されたエラービットのビット数をカウントする(S22)。   When the write operation is started, the read circuit 30 reads the data at the address where the write data is to be written (data written in the erase operation before the write operation) by the erase margin read, and the memory control unit 100 erases the data. Verify is performed (S21). That is, the memory control unit 100 compares the read data with the expected value (all “1”), and determines a bit (bit “0”) different from the expected value as an error bit. Next, the memory control unit 100 counts the number of error bits determined in step S21 (S22).

次に、メモリー制御部100は、消去動作においてエラー訂正処理の使用を許可したか否かを判定する(S23)。即ち、ステップS22でカウントされたエラービット数が1以上(本実施形態では1)であるか否かを判定する。消去動作においてエラー訂正処理の使用を許可していない(エラービット数が0だった)場合には、メモリー制御部100は、エラー訂正可否フラグを「1」(アクティブ)に設定する(S24)。   Next, the memory control unit 100 determines whether or not use of the error correction processing is permitted in the erasing operation (S23). That is, it is determined whether or not the number of error bits counted in step S22 is 1 or more (1 in the present embodiment). When the use of the error correction process is not permitted in the erasing operation (the number of error bits is 0), the memory control unit 100 sets the error correction enable / disable flag to “1” (active) (S24).

一方、消去動作においてエラー訂正処理の使用を許可した(エラービット数が1以上だった)場合には、メモリー制御部100は、ステップS21の消去ベリファイで読み出された消去ベリファイ結果データと書き込みデータ(期待値)とのビット比較処理を行う(S25)。具体的には、消去ベリファイ結果データのうちのエラービットと、そのエラービットと同じ桁(位置)の書き込みデータのビットとを比較する。   On the other hand, when the use of the error correction processing is permitted in the erasing operation (the number of error bits is 1 or more), the memory control unit 100 determines whether the erasure verification result data and the write data read in the erasure verification in step S21. A bit comparison process with (expected value) is performed (S25). Specifically, an error bit in the erase verify result data is compared with a bit of write data of the same digit (position) as the error bit.

次に、メモリー制御部100は、エラービットと、それに対応する書き込みデータのビットとが一致するか否かを判定する(S26)。エラービットと、それに対応する書き込みデータのビットとが一致した場合には、ステップS24においてエラー訂正可否フラグを「1」に設定する。消去ベリファイにおけるエラービットは「0」なので、それに対応する書き込みデータのビットが「0」の場合に一致したと判定される。一方、エラービットと、それに対応する書き込みデータのビットとが一致しない場合には、メモリー制御部100は、エラー訂正可否フラグを「0」(非アクティブ)に設定する(S27)。なお、エラー訂正可能なエラービット数が2以上である場合、例えば1ビットでも一致しなかった場合にはエラー訂正可否フラグを「0」に設定する。   Next, the memory control unit 100 determines whether or not the error bit matches the bit of the write data corresponding to the error bit (S26). If the error bit matches the corresponding bit of the write data, the error correction enable / disable flag is set to "1" in step S24. Since the error bit in the erase verify is “0”, it is determined that they match when the bit of the corresponding write data is “0”. On the other hand, if the error bit does not match the corresponding write data bit, the memory control unit 100 sets the error correction enable / disable flag to “0” (inactive) (S27). When the number of error bits for which error correction is possible is two or more, for example, when even one bit does not match, the error correction enable / disable flag is set to “0”.

次に、消去及び書き込み回路20が、ステップS21で消去ベリファイを行ったアドレスに書き込みデータを書き込む(S28)。次に、読み出し回路30が、ステップS28で書き込まれたデータを書き込み用マージンリードにより読み出し、メモリー制御部100が書き込みベリファイを行う(S29)。即ちメモリー制御部100は、読み出したデータと期待値(書き込みデータ)を比較し、期待値と異なるビットをエラービットと判定する。次に、メモリー制御部100は、ステップS29で判定されたエラービットのビット数をカウントする(S30)。このとき、ステップS21の消去ベリファイでエラービットと判定されたビット以外のビットについて、エラービットのビット数をカウントする。   Next, the erase and write circuit 20 writes the write data to the address where the erase verify was performed in step S21 (S28). Next, the read circuit 30 reads the data written in step S28 by a write margin read, and the memory control unit 100 performs write verification (S29). That is, the memory control unit 100 compares the read data with an expected value (write data), and determines a bit different from the expected value as an error bit. Next, the memory control unit 100 counts the number of error bits determined in step S29 (S30). At this time, the number of error bits is counted for bits other than the bits determined to be error bits in the erase verify in step S21.

次に、メモリー制御部100は、ステップS30でカウントしたエラービット数が0か否かを判定する(S31)。エラービット数が0である場合には、メモリー制御部100は、書き込みが成功(パス)したと判断し、書き込み動作を終了する。エラービット数が0でない場合には、メモリー制御部100は、エラー訂正可否フラグが「1」であるか否かを判定する(S32)。エラー訂正可否フラグが「1」である場合には、メモリー制御部100は、ステップS30でカウントしたエラービット数がエラー訂正処理で訂正可能なビット数以下であるか否かを判定する(S33)。エラービット数がエラー訂正処理で訂正可能なビット数以下である場合には、メモリー制御部100は、書き込みが成功(パス)したと判断し、書き込み動作を終了する。   Next, the memory control unit 100 determines whether or not the number of error bits counted in step S30 is 0 (S31). If the number of error bits is 0, the memory control unit 100 determines that the writing has succeeded (passed), and ends the writing operation. If the number of error bits is not 0, the memory control unit 100 determines whether or not the error correction enable / disable flag is "1" (S32). If the error correction enable / disable flag is “1”, the memory control unit 100 determines whether the number of error bits counted in step S30 is equal to or less than the number of bits that can be corrected by the error correction process (S33). . If the number of error bits is equal to or less than the number of bits that can be corrected by the error correction processing, the memory control unit 100 determines that the writing has succeeded (passed), and ends the writing operation.

一方、エラービット数がエラー訂正処理で訂正可能なビット数以下でない場合には、メモリー制御部100は、書き込み回数が規定値未満であるか否かを判定する(S34)。書き込み回数が規定値未満である場合には、メモリー制御部100は、書き込み回数を示す変数をカウントアップ(インクリメント)し、ステップS28に戻る(S35)。一方、書き込み回数が規定値未満でない場合には、メモリー制御部100は、書き込み動作が失敗(フェイル)したと判断し、書き込み動作を終了する。この場合、故障(不良品)を示すフラグを不図示のレジスターに格納してもよいし、更にそれをユーザーに通知可能にしてもよい(例えばCPU等が不揮発性記憶装置200の不図示のインターフェースを介してレジスターからフラグを読み出し、それに基づいてCPUがユーザーに通知する処理を行ってもよい)。或いは、不揮発性メモリー10が冗長なメモリー領域を有しており、書き込み動作を失敗した書き込みデータを、その冗長なメモリー領域に書き込んでもよい。   On the other hand, when the number of error bits is not smaller than the number of bits that can be corrected by the error correction process, the memory control unit 100 determines whether the number of times of writing is less than a specified value (S34). If the number of times of writing is less than the specified value, the memory control unit 100 counts up (increments) a variable indicating the number of times of writing, and returns to step S28 (S35). On the other hand, if the number of times of writing is not less than the specified value, the memory control unit 100 determines that the writing operation has failed (failed), and ends the writing operation. In this case, a flag indicating a failure (defective product) may be stored in a register (not shown) or may be notified to a user (for example, the CPU or the like may use an interface (not shown) of the nonvolatile storage device 200). The CPU may read a flag from the register via the CPU, and perform processing for notifying the user based on the flag). Alternatively, the nonvolatile memory 10 may have a redundant memory area, and write data for which a write operation has failed may be written to the redundant memory area.

ステップS32において、エラー訂正可否フラグが「0」である場合には、メモリー制御部100は、エラービットを訂正可能であるか否かを判定せずに、ステップS34に進む。即ち、エラー訂正可否フラグが「0」である場合には書き込みベリファイにおけるエラービットを許可しない(エラービット数が0になるか、書き込み回数が規定値を超えるまで書き込みを繰り返す)。   If the error correction enable / disable flag is “0” in step S32, the memory control unit 100 proceeds to step S34 without determining whether the error bit can be corrected. That is, when the error correction enable / disable flag is “0”, the error bit in the write verify is not permitted (writing is repeated until the number of error bits becomes 0 or the number of times of writing exceeds a specified value).

上記のフローによる書き込み動作を、図9、図10を用いて具体例に説明する。図9は、ビット比較処理によりエラー訂正可否フラグが「1」となる場合の具体例である。   The write operation according to the above flow will be described in a specific example with reference to FIGS. FIG. 9 is a specific example in which the error correction enable / disable flag becomes “1” by the bit comparison process.

図9に示すように、消去ベリファイ結果データの期待値は「1111111」である。消去ベリファイによって読み出された消去ベリファイ結果データが「1101111」だったとすると、D1に示すように「0」のビットx3がエラービット(消去エラービット)と判定される。エラービットが検出されたので、図8のステップS23でYESに分岐し、消去ベリファイ結果データと書き込みデータのビット比較処理が行われる。   As shown in FIG. 9, the expected value of the erase verification result data is “1111111”. Assuming that the erase verify result data read by the erase verify is “1101111”, the bit x3 of “0” is determined as an error bit (erase error bit) as indicated by D1. Since an error bit is detected, the process branches to YES in step S23 in FIG. 8, and a bit comparison process between the erase verification result data and the write data is performed.

書き込みデータの期待値を「0101100」とすると、D2に示すように、消去ベリファイのエラービットx3に対応する書き込みデータのビットx3は「0」である。即ち、ビット比較処理で一致と判定されるので、図8のステップS26でYESに分岐し、ステップS24でエラー訂正可否フラグが「1」に設定される。   Assuming that the expected value of the write data is "0101100", the bit x3 of the write data corresponding to the error bit x3 of the erase verify is "0" as indicated by D2. That is, since it is determined that they match in the bit comparison process, the process branches to YES in step S26 in FIG. 8, and the error correction enable / disable flag is set to "1" in step S24.

書き込みデータ「0101100」を書き込んだ後、書き込みベリファイにより読み出された書き込みベリファイ結果データが「1101100」だったとする。この場合、D3に示すようにビットx1が「1」であり、期待値「0」と異なるのでエラービット(書き込みエラービット)と検出される。エラー訂正可否フラグが「1」なので、図8のステップS32でYESに分岐し、エラービット数は1ビット以下なのでステップS33でYESに分岐する。即ち、このエラービットx1は許可され、書き込み動作が終了する。   It is assumed that, after writing the write data “0101100”, the write verify result data read by the write verify is “1101100”. In this case, as indicated by D3, the bit x1 is "1", which is different from the expected value "0", so that it is detected as an error bit (write error bit). Since the error correction enable / disable flag is "1", the flow branches to YES in step S32 of FIG. 8, and the flow branches to YES in step S33 because the number of error bits is 1 or less. That is, the error bit x1 is permitted, and the write operation ends.

この書き込みデータを通常の読み出し動作で読み出した場合、読み出しデータは例えば「1101100」となる。D4に示すように、書き込みベリファイにおけるエラービットx1は、読み出しデータにおいても「1」と読み出される可能性がある。この場合、ビットx1はエラービットとなる。一方、消去ベリファイにおけるエラービットx3は、書き込みベリファイにおいて期待値「0」に一致するか否かがチェックされている。即ち、図7で説明したようにビットx3のセル電流がリファレンス電流IWよりも小さいと判定されている。通常の読み出し動作におけるリファレンス電流はIR>IWなので、書き込みベリファイで「0」と判定されたビットは、D5に示すように通常の読み出し動作においても「0」と読み出される。即ち、そのビットはエラービットにはならない。   When the write data is read by a normal read operation, the read data is, for example, “1101100”. As indicated by D4, the error bit x1 in the write verify may be read as "1" even in the read data. In this case, bit x1 is an error bit. On the other hand, it is checked whether the error bit x3 in the erase verify matches the expected value "0" in the write verify. That is, as described in FIG. 7, it is determined that the cell current of the bit x3 is smaller than the reference current IW. Since the reference current in the normal read operation is IR> IW, the bit determined to be “0” in the write verify is read as “0” also in the normal read operation as indicated by D5. That is, the bit does not become an error bit.

以上から、読み出し動作においてエラービットとなる可能性があるのは、書き込みベリファイでエラービットと判定されたビットx1だけであり、エラー訂正可能なビット数を超えない。これにより、エラー訂正処理の結果データは「0101100」となり、書き込みデータの期待値が復元される。   As described above, only the bit x1 determined to be an error bit in the write verify operation may become an error bit in the read operation, and does not exceed the number of error-correctable bits. As a result, the result data of the error correction processing becomes “0101100”, and the expected value of the write data is restored.

図10は、ビット比較処理によりエラー訂正可否フラグが「0」となる場合の具体例である。   FIG. 10 is a specific example in a case where the error correction enable / disable flag becomes “0” by the bit comparison process.

図10に示すように、E1に示すように消去ベリファイにおいてビットx3がエラービット(消去エラービット)と判定されたとすると、図8のステップS23でYESに分岐し、消去ベリファイ結果データと書き込みデータのビット比較処理が行われる。   As shown in FIG. 10, assuming that bit x3 is determined to be an error bit (erase error bit) in the erase verify as indicated by E1, the process branches to YES in step S23 in FIG. 8, and the erase verify result data and the write data are erased. A bit comparison process is performed.

書き込みデータの期待値を「0111010」とすると、E2に示すように、消去ベリファイのエラービットx3に対応する書き込みデータのビットx3は「1」である。即ち、ビット比較処理で不一致と判定されるので、図8のステップS26でNOに分岐し、ステップS27でエラー訂正可否フラグが「0」に設定される。   Assuming that the expected value of the write data is “0111010”, the bit x3 of the write data corresponding to the error bit x3 of the erase verify is “1” as indicated by E2. That is, since it is determined that the bits do not match in the bit comparison process, the process branches to NO in step S26 in FIG.

書き込みデータ「0111010」を書き込んだ後、書き込みベリファイにより読み出された書き込みベリファイ結果データは「0101010」となる可能性がある。即ち図7で説明したように、消去ベリファイでエラービット(「0」)と判定され、且つ書き込みデータの期待値が「1」であるビットx3は、E3に示すように書き込みベリファイにおいて「0」(即ち、書き込みエラービット)と判定される可能性がある。エラー訂正可否フラグは「0」なので、図8のステップS32でNOに分岐し、書き込みベリファイでビットx3以外に新たにエラービットが発生することは許可されない。即ち、通常の読み出し動作における読み出しデータは、ビットx3にエラーがある「0101010」となる可能性があるが、ビットx3以外にはエラービットは発生しない。   After writing the write data “0111010”, the write verify result data read by the write verify may be “0101010”. That is, as described with reference to FIG. 7, the bit x3 determined to be an error bit ("0") in the erase verify and the expected value of the write data is "1" is "0" in the write verify as indicated by E3. (That is, a write error bit). Since the error correction enable / disable flag is "0", the process branches to NO in step S32 in FIG. 8, and it is not permitted to generate a new error bit other than the bit x3 in the write verification. That is, the read data in the normal read operation may be “0101010” having an error in the bit x3, but no error bit is generated other than the bit x3.

以上から、読み出し動作においてエラービットとなる可能性があるのは、消去ベリファイでエラービットと判定されたビットx3だけであり、エラー訂正可能なビット数を超えない。これにより、エラー訂正処理の結果データは「0111010」となり、書き込みデータの期待値が復元される。   As described above, only the bit x3 determined to be an error bit in the erase verify operation may become an error bit in the read operation, and does not exceed the number of error-correctable bits. As a result, the result data of the error correction processing becomes “0111010”, and the expected value of the write data is restored.

4.詳細構成
図11は、本実施形態の不揮発性記憶装置200の詳細な構成例である。図11では、不揮発性メモリー10が、ユーザーデータメモリーセルアレイ11、エラー訂正用データメモリーセルアレイ12を含む。またメモリー制御部100が、制御部110、ベリファイ判定部120、ビット比較部130、エラー訂正用データ生成部140、エラー訂正部150を含む。ビット比較部130は、書き込みデータレジスター131、読み出しデータレジスター132を含む。
4. Detailed Configuration FIG. 11 is a detailed configuration example of the nonvolatile storage device 200 of the present embodiment. In FIG. 11, the nonvolatile memory 10 includes a user data memory cell array 11 and an error correction data memory cell array 12. Further, the memory control unit 100 includes a control unit 110, a verify determination unit 120, a bit comparison unit 130, an error correction data generation unit 140, and an error correction unit 150. The bit comparison unit 130 includes a write data register 131 and a read data register 132.

ユーザーデータメモリーセルアレイ11は、消去用データや書き込みデータのうちユーザーデータを記憶するメモリーセルアレイである。エラー訂正用データメモリーセルアレイ12は、消去用データや書き込みデータのうちエラー訂正用データを記憶するメモリーセルアレイである。例えば、これらのメモリーセルアレイは、1つのメモリーセルアレイを領域分割したものである。消去、書き込み、読み出しを行う場合には、ユーザーデータと、それに対応付けられたエラー訂正用データとがアクセスされる。   The user data memory cell array 11 is a memory cell array that stores user data among erase data and write data. The error correction data memory cell array 12 is a memory cell array that stores error correction data among erase data and write data. For example, these memory cell arrays are obtained by dividing one memory cell array into regions. When erasing, writing, and reading are performed, the user data and the error correction data associated therewith are accessed.

エラー訂正用データ生成部140は、ユーザーデータDINからエラー訂正用データを生成する。このエラー訂正用データとユーザーデータDINが書き込みデータとして書き込みデータレジスター131に保持される。消去及び書き込み回路20は、書き込みデータレジスター131に保持された書き込みデータに基づいて不揮発性メモリー10への書き込みを行う。   The error correction data generator 140 generates error correction data from the user data DIN. The error correction data and the user data DIN are held in the write data register 131 as write data. The erasing and writing circuit 20 performs writing to the nonvolatile memory 10 based on the write data held in the write data register 131.

読み出し回路30が不揮発性メモリー10から読み出したデータは、読み出しデータとして読み出しデータレジスター132に保持される。エラー訂正部150は、読み出しデータレジスター132に保持された読み出しデータに基づいてエラー訂正処理を行い、エラー訂正処理の結果データDOUTを出力する。   Data read from the nonvolatile memory 10 by the read circuit 30 is held in the read data register 132 as read data. The error correction unit 150 performs an error correction process based on the read data held in the read data register 132, and outputs result data DOUT of the error correction process.

ベリファイ判定部120は、消去動作における消去ベリファイ(図2のS2)、書き込み動作における消去ベリファイ(図8のS21)、書き込み動作における書き込みベリファイ(図8のS29)を行う。即ち、これらのベリファイで読み出されたデータと期待値とを比較し、エラービットを検出する。   The verify determination unit 120 performs erase verify in the erase operation (S2 in FIG. 2), erase verify in the write operation (S21 in FIG. 8), and write verify in the write operation (S29 in FIG. 8). That is, the data read by these verifications is compared with an expected value to detect an error bit.

ビット比較部130は、書き込み動作におけるビット比較処理(図8のS25)を行う。即ち、書き込みデータレジスター131に保持された書き込みデータと、読み出しデータレジスター132に保持された消去ベリファイ結果データとを、各ビットについて比較する。   The bit comparison unit 130 performs a bit comparison process (S25 in FIG. 8) in the write operation. That is, the write data held in the write data register 131 and the erase verify result data held in the read data register 132 are compared for each bit.

制御部110は、消去動作、書き込み動作、読み出し動作の制御を行う。即ち、制御部110は、消去動作において図2のステップS3〜S6の処理を実行する。またステップS1において消去及び書き込み回路20に対して、アドレスの指定と消去の指示を行う。また制御部110は、書き込み動作において図8のステップS22〜S24、S26、S27、S30〜S35の処理を実行する。またステップS28において消去及び書き込み回路20に対して、アドレスの指定と書き込みの指示を行う。また制御部110は、読み出し動作において読み出し回路30に対して、アドレスの指定と読み出しの指示を行う。   The control unit 110 controls an erasing operation, a writing operation, and a reading operation. That is, the control unit 110 performs the processing of steps S3 to S6 in FIG. 2 in the erasing operation. In step S1, an address is designated and an erase instruction is given to the erase / write circuit 20. Further, the control unit 110 executes the processing of steps S22 to S24, S26, S27, and S30 to S35 in FIG. 8 in the writing operation. In step S28, an address designation and a write instruction are issued to the erase / write circuit 20. Further, the control unit 110 instructs the read circuit 30 to specify an address and read in the read operation.

図12は、読み出し回路30、不揮発性メモリー10の詳細な構成例である。読み出し回路30は、カレントミラー回路31、センスアンプ32を含む。不揮発性メモリー10は、リファレンスセル14、メモリーセルアレイ13を含む。なお、図12には1つのセンスアンプ32を図示しているが、実際には複数のビット線に対応して複数のセンスアンプが設けられる。   FIG. 12 is a detailed configuration example of the readout circuit 30 and the nonvolatile memory 10. The read circuit 30 includes a current mirror circuit 31 and a sense amplifier 32. The nonvolatile memory 10 includes a reference cell 14 and a memory cell array 13. Although one sense amplifier 32 is shown in FIG. 12, a plurality of sense amplifiers are actually provided corresponding to a plurality of bit lines.

リファレンスセル14は、基本的には通常のメモリーセルと同一構造であるが、検査工程においてリファレンスセル14に書き込みを行うことでしきい値電圧の調整が行われ、それによって所定電流のリファレンスセル電流Ircを出力するようになっている。メモリーセルアレイ13は、図11のユーザーデータメモリーセルアレイ11とエラー訂正用データメモリーセルアレイ12に対応する。Icelは、ワード線により選択されたメモリーセルがビット線に出力するセル電流である。   The reference cell 14 has basically the same structure as a normal memory cell, but the threshold voltage is adjusted by writing to the reference cell 14 in the inspection step, thereby adjusting the reference cell current to a predetermined current. Irc is output. The memory cell array 13 corresponds to the user data memory cell array 11 and the error correction data memory cell array 12 in FIG. Icel is a cell current output from the memory cell selected by the word line to the bit line.

カレントミラー回路31は、不揮発性メモリー10のリファレンスセル14から出力されるリファレンスセル電流Ircをミラーして、リファレンス電流Irefを出力する。センスアンプ32は、リファレンス電流Irefとセル電流Icelとを比較し、「0」又は「1」をデータとして出力する。   The current mirror circuit 31 mirrors the reference cell current Irc output from the reference cell 14 of the nonvolatile memory 10 and outputs a reference current Iref. The sense amplifier 32 compares the reference current Iref with the cell current Icel, and outputs “0” or “1” as data.

カレントミラー回路31は複数のミラー比を選択可能である。そして、制御部110からの制御信号に基づいてミラー比を切り替えることにより、図7のリファレンス電流IW、IR、IEの切り替えを実現する。   The current mirror circuit 31 can select a plurality of mirror ratios. Then, by switching the mirror ratio based on the control signal from the control unit 110, the switching of the reference currents IW, IR, and IE in FIG. 7 is realized.

なお、リファレンス電流の切り替え手法はこれに限定されない。例えばリファレンスセル電流が異なる複数のリファレンスセルを設け、制御部110からの制御信号に基づいてリファレンスセルを選択することにより、リファレンス電流を切り替えてもよい。   Note that the method of switching the reference current is not limited to this. For example, a plurality of reference cells having different reference cell currents may be provided, and the reference current may be switched by selecting the reference cells based on a control signal from the control unit 110.

5.エラー訂正用データの生成処理、エラー訂正処理
以下、エラー訂正用データの生成処理、エラー訂正処理の詳細について説明する。図13A〜図13Cは、エラー訂正用データの生成処理の説明図である。以下ではハミング符号によりエラー訂正用データを生成し、最大で1ビットのエラービットを訂正できる場合の例を説明する。
5. Error Correction Data Generation Processing and Error Correction Processing Hereinafter, details of the error correction data generation processing and the error correction processing will be described. FIG. 13A to FIG. 13C are explanatory diagrams of the generation processing of the error correction data. Hereinafter, an example will be described in which error correction data is generated by a Hamming code and an error bit of up to one bit can be corrected.

なお、データは「0011」のように表記し、それをベクトルとして考える場合には(0,0,1,1)のように表記するが、表記が異なるだけで実質的に意味しているデータ内容は同じである。   The data is represented as "0011", and when it is considered as a vector, it is represented as (0, 0, 1, 1), but the data is substantially different only in the notation. The content is the same.

図13Aに示すように、ユーザーデータが4ビットの場合、3ビットのエラー訂正用データを生成する。そして、それらを合わせた7ビットのデータが書き込みデータwとなる。エラー訂正用データのビットp1、p2、p3は、図13Bに示す式により求められる。ここで「xor」は排他的論理和である。図13Cは、図13Bの式を真理値表として示したものである。ユーザーデータが「1111」の場合にはエラー訂正用データは「111」となり、消去動作ではオール「1」が書き込まれるようになっている。   As shown in FIG. 13A, when the user data is 4 bits, 3-bit error correction data is generated. Then, the combined 7-bit data becomes the write data w. The bits p1, p2, and p3 of the error correction data are obtained by the equations shown in FIG. 13B. Here, “xor” is an exclusive OR. FIG. 13C shows the expression of FIG. 13B as a truth table. When the user data is "1111", the error correction data is "111", and all "1" s are written in the erasing operation.

図14A〜図14Dは、エラー訂正処理の説明図である。図14Aに示すように、読み出しデータyは書き込みデータwと同じ7ビットである。図14Bに示す式により、読み出しデータyからシンドローム(s1,s2,s3)を求める。図14Cに示すシンドロームパターン(シンドロームと誤りベクトルの対応)により、シンドローム(s1,s2,s3)から誤りベクトル(e1,e2,e3,e4,e5,e6,e7)を求める。誤りベクトルの成分(ビット)ei=1の場合、読み出しデータyのビットyiがエラービットであることを示している。ここでiは1以上7以下の整数である。シンドロームが(0,0,0)の場合には誤りベクトルは(0,0,0,0,0,0,0)となり、エラービットが無いことを示している。図14Dに示すように、誤りベクトルと読み出しデータの排他的論理和を求め、その結果をエラー訂正処理の結果データ(最終的な読み出しデータ)として出力する。   14A to 14D are explanatory diagrams of the error correction processing. As shown in FIG. 14A, the read data y has the same 7 bits as the write data w. The syndrome (s1, s2, s3) is obtained from the read data y by the equation shown in FIG. 14B. An error vector (e1, e2, e3, e4, e5, e6, e7) is obtained from the syndromes (s1, s2, s3) according to the syndrome pattern (correspondence between the syndrome and the error vector) shown in FIG. 14C. When the component (bit) ei = 1 of the error vector, it indicates that the bit yi of the read data y is an error bit. Here, i is an integer of 1 or more and 7 or less. When the syndrome is (0,0,0), the error vector is (0,0,0,0,0,0,0), indicating that there is no error bit. As shown in FIG. 14D, the exclusive OR of the error vector and the read data is obtained, and the result is output as result data (final read data) of the error correction process.

図15は、消去動作において許可されたエラービットを訂正する場合の具体例である。消去ベリファイ結果データが「1101111」であった場合、そのまま通常の読み出し動作を行ったとすると、読み出しデータとして「1101111」が読み出される可能性がある。この読み出しデータは、ビットx3がエラーとなっている。この場合、図14Bの式からシンドロームは(1,1,0)となり、図14Cのシンドロームパターンから誤りベクトルは(0,0,1,0,0,0,0)となる。図14Dの式から結果データを求めるとビットx3の論理レベルが反転されて「1111111」となり、ビットx3のエラーが訂正されている。   FIG. 15 shows a specific example in which an error bit permitted in an erasing operation is corrected. When the erase verify result data is “1101111”, if a normal read operation is performed as it is, “1101111” may be read as the read data. In this read data, the bit x3 has an error. In this case, the syndrome is (1,1,0) from the equation in FIG. 14B, and the error vector is (0,0,1,0,0,0,0) from the syndrome pattern in FIG. 14C. When the result data is obtained from the equation of FIG. 14D, the logical level of bit x3 is inverted to “1111111”, and the error of bit x3 has been corrected.

図16は、書き込み動作において許可されたエラービットを訂正する場合の具体例である。書き込みデータが「0110001」であり、書き込みベリファイ結果データが「1110001」であった場合、読み出しデータとして「1110001」が読み出される可能性がある。この読み出しデータは、ビットx1がエラーとなっている。図14Bの式からシンドロームは(1,0,1)となり、図14Cのシンドロームパターンから誤りベクトルは(1,0,0,0,0,0,0)となる。図14Dの式から結果データを求めるとビットx1の論理レベルが反転されて「0110001」となり、ビットx1のエラーが訂正されている。   FIG. 16 shows a specific example of correcting an error bit permitted in a write operation. If the write data is “0110001” and the write verify result data is “1110001”, “1110001” may be read as the read data. In this read data, the bit x1 has an error. The syndrome is (1, 0, 1) from the equation in FIG. 14B, and the error vector is (1, 0, 0, 0, 0, 0, 0) from the syndrome pattern in FIG. 14C. When the result data is obtained from the equation of FIG. 14D, the logical level of bit x1 is inverted to “0110001”, and the error of bit x1 has been corrected.

なお、上記ではユーザーデータが4ビットの場合を例に説明したが、これに限定されない。即ち、ハミング符号によりエラー訂正用データを生成する場合、2ビットのユーザーデータに対してn+1ビットのエラー訂正用データを付加することにより、1ビットまでのエラービットを訂正することが可能である。また、上記ではユーザーデータにエラーがある場合を例に説明したが、エラー訂正用データにエラーがある場合であっても同様の手法で訂正される。即ち、ユーザーデータとエラー訂正用データを合わせたデータの中で、エラー訂正可能な最大のビット数以下であれば正しいデータに訂正される。 In the above, the case where the user data is 4 bits has been described as an example, but the present invention is not limited to this. That is, when error correction data is generated by a Hamming code, up to 1 error bit can be corrected by adding n + 1 bit error correction data to 2 n bits of user data. . In the above description, the case where the user data has an error has been described as an example. However, even when the error correction data has an error, the error correction data is corrected by the same method. In other words, if the error correction data is equal to or less than the maximum number of bits that can be corrected in the data obtained by combining the user data and the error correction data, the data is corrected to correct data.

6.電子機器
図17は、本実施形態の電子機器400の構成例である。本実施形態の電子機器400として、例えばプリンターや、プリンターのインクカートリッジ、発振器、ジャイロセンサー、プロジェクター、テレビション装置、情報処理装置(コンピューター)、携帯型情報端末等の種々の電子機器を想定できる。
6. Electronic Device FIG. 17 is a configuration example of an electronic device 400 according to the present embodiment. As the electronic device 400 of the present embodiment, various electronic devices such as a printer, a printer ink cartridge, an oscillator, a gyro sensor, a projector, a television device, an information processing device (computer), and a portable information terminal can be assumed.

電子機器400は、処理部310(例えばCPU等のプロセッサー、或いはゲートアレイ)、記憶部320(メモリー)、操作部330(操作装置)、インターフェース部340(インターフェース回路、インターフェース装置)、表示部350(ディスプレイ)を含む。   The electronic device 400 includes a processing unit 310 (for example, a processor such as a CPU or a gate array), a storage unit 320 (memory), an operation unit 330 (operation device), an interface unit 340 (interface circuit, interface device), and a display unit 350 ( Display).

表示部350は、例えば液晶表示装置や、或は自発光素子を用いたEL(Electro-Luminescence)表示装置である。操作部330は、ユーザーからの種々の操作を受け付けるユーザーインターフェースである。例えば、ボタンやマウス、キーボード、表示部350に装着されたタッチパネル等である。インターフェース部340は、画像データや制御データの入出力を行うデータインターフェースである。例えばUSB等の有線通信インターフェースや、或は無線LAN等の無線通信インターフェースである。記憶部320は、インターフェース部340から入力されたデータを記憶する。或は、記憶部320は、処理部310のワーキングメモリーとして機能する。不揮発性記憶装置200には、電子機器の動作設定を行うための設定データや、処理部310が行う種々の処理に用いられるデータ等が記憶される。処理部310は、不揮発性記憶装置200に記憶されたデータに基づいて、電子機器の各部の制御処理や種々のデータ処理を行う。   The display unit 350 is, for example, a liquid crystal display device or an EL (Electro-Luminescence) display device using a self-luminous element. The operation unit 330 is a user interface that receives various operations from the user. For example, it is a button, a mouse, a keyboard, a touch panel attached to the display unit 350, or the like. The interface unit 340 is a data interface that inputs and outputs image data and control data. For example, a wired communication interface such as a USB or a wireless communication interface such as a wireless LAN. The storage unit 320 stores data input from the interface unit 340. Alternatively, the storage unit 320 functions as a working memory of the processing unit 310. The non-volatile storage device 200 stores setting data for setting operation of the electronic device, data used for various processes performed by the processing unit 310, and the like. The processing unit 310 performs control processing of various parts of the electronic device and various data processing based on the data stored in the nonvolatile storage device 200.

なお、電子機器400の構成は図17に限定されず、その構成要素の一部を省略したり、他の構成要素を追加したりする等の種々の変形実施が可能である。例えば電子機器が発振器やジャイロセンサーである場合、電子機器は処理部310、不揮発性記憶装置200、アナログ回路(例えば駆動回路、検出回路等)、振動子を含む。そして処理部310、不揮発性記憶装置200、駆動回路が1つの集積回路装置として構成され、アナログ回路に振動子が接続され、集積回路装置と振動子とがパッケージに格納される。   Note that the configuration of the electronic device 400 is not limited to FIG. 17, and various modifications can be made, such as omitting some of the components or adding other components. For example, when the electronic device is an oscillator or a gyro sensor, the electronic device includes the processing unit 310, the nonvolatile storage device 200, an analog circuit (for example, a drive circuit, a detection circuit, and the like), and a vibrator. The processing unit 310, the non-volatile memory device 200, and the drive circuit are configured as one integrated circuit device, a vibrator is connected to the analog circuit, and the integrated circuit device and the vibrator are stored in a package.

なお、上記のように本実施形態について詳細に説明したが、本発明の新規事項および効果から実体的に逸脱しない多くの変形が可能であることは当業者には容易に理解できるであろう。従って、このような変形例はすべて本発明の範囲に含まれるものとする。例えば、明細書又は図面において、少なくとも一度、より広義または同義な異なる用語と共に記載された用語は、明細書又は図面のいかなる箇所においても、その異なる用語に置き換えることができる。また本実施形態及び変形例の全ての組み合わせも、本発明の範囲に含まれる。また不揮発性メモリー、消去及び書き込み回路、読み出し回路、メモリー制御部、不揮発性記憶装置、電子機器の構成・動作等も、本実施形態で説明したものに限定されず、種々の変形実施が可能である。   Although the present embodiment has been described in detail as described above, those skilled in the art can easily understand that many modifications that do not substantially depart from the novel matter and effects of the present invention are possible. Therefore, such modifications are all included in the scope of the present invention. For example, in the specification or the drawings, a term described at least once together with a broader or synonymous different term can be replaced with the different term in any part of the specification or the drawing. In addition, all combinations of the present embodiment and the modifications are also included in the scope of the present invention. The configuration and operation of the nonvolatile memory, the erasing and writing circuit, the reading circuit, the memory control unit, the nonvolatile storage device, and the electronic device are not limited to those described in the present embodiment, and various modifications can be made. is there.

10…不揮発性メモリー、11…ユーザーデータメモリーセルアレイ、
12…エラー訂正用データメモリーセルアレイ、13…メモリーセルアレイ、
14…リファレンスセル、20…消去及び書き込み回路、30…読み出し回路、
31…カレントミラー回路、32…センスアンプ、100…メモリー制御部、
110…制御部、120…ベリファイ判定部、130…ビット比較部、
131…書き込みデータレジスター、132…読み出しデータレジスター、
140…エラー訂正用データ生成部、150…エラー訂正部、
200…不揮発性記憶装置、310…処理部、320…記憶部、330…操作部、
340…インターフェース部、350…表示部、400…電子機器、
IE…リファレンス電流(消去ベリファイ用判定基準)、IR…リファレンス電流、
IW…リファレンス電流(書き込みベリファイ用判定基準)、
p1〜p3…エラー訂正用データのビット、x1〜x4…ユーザーデータのビット
10: nonvolatile memory, 11: user data memory cell array,
12 data memory cell array for error correction, 13 memory cell array
14: reference cell, 20: erase and write circuit, 30: read circuit,
31: current mirror circuit, 32: sense amplifier, 100: memory control unit,
110: control unit, 120: verify determination unit, 130: bit comparison unit,
131: write data register, 132: read data register,
140: an error correction data generation unit; 150: an error correction unit;
200: nonvolatile storage device, 310: processing unit, 320: storage unit, 330: operation unit,
340: interface unit, 350: display unit, 400: electronic device,
IE: reference current (criterion for erasure verification), IR: reference current,
IW: reference current (criterion for write verification),
p1 to p3: bits of error correction data, x1 to x4: bits of user data

Claims (10)

不揮発性メモリーと、
前記不揮発性メモリーへの消去動作、読み出し動作、及び書き込み動作の制御を行うメモリー制御部と、
を含み、
前記メモリー制御部は、
前記書き込み動作において、消去ベリファイを行い、前記消去ベリファイの結果データである消去ベリファイ結果データと書き込みデータとをビット単位で比較するビット比較処理を行い、書き込みベリファイにおけるエラーをエラー訂正処理により訂正可能であるとして許可するか否かの可否決定を、前記ビット比較処理の結果に基づいて行うことを特徴とする不揮発性記憶装置。
A non-volatile memory;
A memory control unit that controls erase operation, read operation, and write operation to the nonvolatile memory,
Including
The memory control unit includes:
In the write operation, an erase verify is performed, and a bit comparison process of comparing the erase verify result data, which is the result data of the erase verify, with the write data in a bit unit is performed, and an error in the write verify can be corrected by an error correction process. A non-volatile storage device characterized in that the determination as to whether or not to permit is made based on the result of the bit comparison process.
請求項1において、
前記メモリー制御部は、
前記消去ベリファイにおいてエラーと判断された場合に、前記ビット比較処理を行うことを特徴とする不揮発性記憶装置。
In claim 1,
The memory control unit includes:
The nonvolatile memory device according to claim 1, wherein the bit comparison process is performed when an error is determined in the erase verify.
請求項1又は2において、
前記メモリー制御部は、
前記ビット比較処理において、前記消去ベリファイ結果データのうちエラーと判定された消去エラービットと、前記消去エラービットに対応する前記書き込みデータの書き込みビットとの比較処理を行うことを特徴とする不揮発性記憶装置。
In claim 1 or 2,
The memory control unit includes:
In the bit comparison process, a comparison process is performed between an erase error bit determined as an error in the erase verify result data and a write bit of the write data corresponding to the erase error bit. apparatus.
請求項3において、
前記メモリー制御部は、
前記ビット比較処理において前記消去エラービットと前記書き込みビットとが同じ第1の論理レベルであると判定された場合、前記書き込みベリファイの結果データである書き込みベリファイ結果データのうちエラーと判定された書き込みエラービットを、前記エラー訂正処理による訂正が可能なビットとして、前記書き込みデータの前記不揮発性メモリーへの書き込みが成功したと判定することを特徴とする不揮発性記憶装置。
In claim 3,
The memory control unit includes:
When it is determined in the bit comparison process that the erase error bit and the write bit are at the same first logical level, a write error determined to be an error among write verify result data that is the write verify result data. A non-volatile memory device, wherein a bit is a bit that can be corrected by the error correction processing, and it is determined that writing of the write data to the non-volatile memory is successful.
請求項4において、
前記メモリー制御部は、
前記ビット比較処理において前記消去エラービットと前記書き込みビットとが同じ前記第1の論理レベルであると判定された場合、前記書き込みベリファイにおけるエラーを許可するか否かを表すエラー訂正可否フラグを、エラーを許可するアクティブに設定し、
前記エラー訂正可否フラグがアクティブである場合、前記書き込みエラービットが前記エラー訂正処理により訂正可能であるか否かを判定し、
前記書き込みエラービットが前記エラー訂正処理により訂正可能であると判定された場合、前記書き込みデータの前記不揮発性メモリーへの書き込みが成功したと判定することを特徴とする不揮発性記憶装置。
In claim 4,
The memory control unit includes:
When it is determined in the bit comparison process that the erase error bit and the write bit are at the same first logical level, an error correction enable / disable flag indicating whether an error in the write verify is permitted is set to an error. Set to Active to allow
If the error correction enable / disable flag is active, determine whether the write error bit is correctable by the error correction process,
When it is determined that the write error bit can be corrected by the error correction processing, it is determined that the write data has been successfully written to the nonvolatile memory.
請求項1乃至5のいずれかにおいて、
前記読み出し動作を行う読み出し回路を含み、
前記読み出し回路は、
前記消去ベリファイでは、消去ベリファイ用判定基準で前記不揮発性メモリーからデータを読み出し、
前記書き込みベリファイでは、前記消去ベリファイ用判定基準とは異なる書き込みベリファイ用判定基準で前記不揮発性メモリーからデータを読み出すことを特徴とする不揮発性記憶装置。
In any one of claims 1 to 5,
Including a read circuit for performing the read operation,
The read circuit,
In the erase verify, data is read from the non-volatile memory based on an erase verify determination criterion,
The nonvolatile memory device according to claim 1, wherein in the write verification, data is read from the nonvolatile memory according to a write verification criterion different from the erase verification criterion.
請求項1乃至6のいずれかにおいて、
前記消去動作及び前記書き込み動作を行う消去及び書き込み回路と、
前記読み出し動作を行う読み出し回路と、
を含み、
前記メモリー制御部は、
前記ビット比較処理を行うビット比較部と、
前記消去及び書き込み回路及び前記読み出し回路の制御と、前記可否決定と、を行う制御部と、
前記読み出し回路により読み出されたデータに対して前記エラー訂正処理を行うエラー訂正部と、
前記エラー訂正処理に用いるエラー訂正用データを生成するエラー訂正用データ生成部と、
を有することを特徴とする不揮発性記憶装置。
In any one of claims 1 to 6,
An erase and write circuit for performing the erase operation and the write operation;
A read circuit for performing the read operation;
Including
The memory control unit includes:
A bit comparison unit that performs the bit comparison process;
A control unit for controlling the erasing and writing circuit and the reading circuit, and determining whether or not the erasing and writing circuit is read, and
An error correction unit that performs the error correction process on the data read by the read circuit;
An error correction data generation unit that generates error correction data used for the error correction processing,
A nonvolatile storage device, comprising:
請求項1乃至7のいずれかに記載された不揮発性記憶装置を含むことを特徴とする集積回路装置。   An integrated circuit device comprising the nonvolatile memory device according to claim 1. 請求項1乃至7のいずれかに記載された不揮発性記憶装置を含むことを特徴とする電子機器。   An electronic apparatus comprising the nonvolatile storage device according to claim 1. 不揮発性メモリーを含む不揮発性記憶装置の制御方法であって、
前記不揮発性メモリーへの書き込み動作において、消去ベリファイを行い、
前記消去ベリファイの結果データである消去ベリファイ結果データと書き込みデータとをビット単位で比較するビット比較処理を行い、
書き込みベリファイにおけるエラーをエラー訂正処理により訂正可能であるとして許可するか否かの可否決定を、前記ビット比較処理の結果に基づいて行うことを特徴とする不揮発性記憶装置の制御方法。
A method for controlling a nonvolatile storage device including a nonvolatile memory,
In the write operation to the nonvolatile memory, erase verify is performed,
Performing a bit comparison process of comparing the erase verify result data, which is the result data of the erase verify, with the write data in bit units;
A method for controlling a nonvolatile memory device, comprising determining whether or not to permit an error in write verification as being correctable by an error correction process based on a result of the bit comparison process.
JP2016064840A 2016-03-29 2016-03-29 Nonvolatile storage device, integrated circuit device, electronic device, and method of controlling nonvolatile storage device Active JP6642188B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016064840A JP6642188B2 (en) 2016-03-29 2016-03-29 Nonvolatile storage device, integrated circuit device, electronic device, and method of controlling nonvolatile storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016064840A JP6642188B2 (en) 2016-03-29 2016-03-29 Nonvolatile storage device, integrated circuit device, electronic device, and method of controlling nonvolatile storage device

Publications (2)

Publication Number Publication Date
JP2017182850A JP2017182850A (en) 2017-10-05
JP6642188B2 true JP6642188B2 (en) 2020-02-05

Family

ID=60007135

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016064840A Active JP6642188B2 (en) 2016-03-29 2016-03-29 Nonvolatile storage device, integrated circuit device, electronic device, and method of controlling nonvolatile storage device

Country Status (1)

Country Link
JP (1) JP6642188B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7099050B2 (en) * 2018-05-29 2022-07-12 セイコーエプソン株式会社 Circuits, electronic devices and mobiles
JP2019207524A (en) * 2018-05-29 2019-12-05 セイコーエプソン株式会社 Circuit device, electrooptical device, electronic apparatus, and mobile body
CN112242177A (en) * 2019-07-16 2021-01-19 北京地平线机器人技术研发有限公司 Memory testing method and device, computer readable storage medium and electronic equipment
CN113707208B (en) * 2020-05-21 2024-05-03 晶豪科技股份有限公司 Method for controlling verification operation for error correction of nonvolatile memory device and nonvolatile memory device
CN115472190A (en) * 2022-09-14 2022-12-13 厦门半导体工业技术研发有限公司 Memory read-write verification method

Also Published As

Publication number Publication date
JP2017182850A (en) 2017-10-05

Similar Documents

Publication Publication Date Title
JP6642188B2 (en) Nonvolatile storage device, integrated circuit device, electronic device, and method of controlling nonvolatile storage device
KR102065665B1 (en) Non-volatile memory device including dummy wordline, memory system and operating method thereof
US8254181B2 (en) Nonvolatile memory device and programming method
US7751238B2 (en) Memory system protected from errors due to read disturbance and reading method thereof
US9239758B2 (en) Semiconductor storage device, method for controlling the same and control program
US8321765B2 (en) Method of reading data in non-volatile memory device
JP5138319B2 (en) Memory system and operation method thereof.
KR100996009B1 (en) Non volatile memory device and method of operating the same
KR100875979B1 (en) Nonvolatile memory device, memory system including it and its read method
KR20140045168A (en) Non-volatile memory device, memory system and operating method thereof
JP2012137994A (en) Memory system and controlling method thereof
JP6164712B1 (en) Flash memory
KR20100137128A (en) Method of programming a nonvolatile memory device, nonvolatile memory device and nonvolatile memory system
US8347183B2 (en) Flash memory device using ECC algorithm and method of operating the same
US9514848B2 (en) Solid state drive and associated error check and correction method
JP2015018451A (en) Memory controller, storage device, and memory control method
KR20100115970A (en) Methods and apparatuses for managing bad cell
US10679707B2 (en) Voltage adjusting method, memory controlling circuit unit and memory storage device
US9405620B2 (en) Data storage device and error correction method thereof
KR20130027138A (en) Method of correcting errors and memory device using the same
JP2013089082A (en) Memory controller, semiconductor storage system and memory control method
KR20110065897A (en) Flash memory device, flash memory system, and method of programming the flash memory device
KR20100088898A (en) Flash memory device, and method of programming and reading the same
TWI493562B (en) Memory with error correction configured to prevent overcorrection
KR20080114208A (en) Copy2 programming method of non volatile memory device with error correction function

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190225

TRDD Decision of grant or rejection written
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20191127

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20191203

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20191216

R150 Certificate of patent or registration of utility model

Ref document number: 6642188

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150