JP2015138275A - Error correction detection device - Google Patents
Error correction detection device Download PDFInfo
- Publication number
- JP2015138275A JP2015138275A JP2014007730A JP2014007730A JP2015138275A JP 2015138275 A JP2015138275 A JP 2015138275A JP 2014007730 A JP2014007730 A JP 2014007730A JP 2014007730 A JP2014007730 A JP 2014007730A JP 2015138275 A JP2015138275 A JP 2015138275A
- Authority
- JP
- Japan
- Prior art keywords
- user data
- error correction
- data
- correction detection
- parity
- 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.)
- Granted
Links
Images
Abstract
Description
本発明は、ユーザデータに対してパリティデータを適用して当該ユーザデータの誤り訂正検出を行う誤り訂正検出装置に関する。 The present invention relates to an error correction detection apparatus that applies parity data to user data and performs error correction detection of the user data.
従来より、不揮発性のランダムアクセスメモリに対するメモリアクセスのスループット低下を防止するための手法として、アクセス単位に応じてECC(Error Check and Correct)パリティの計算を動的に制御する手法がある。具体的には、ECCパリティが有効であるか無効であるか示すフラグ(バリッドフラグ)を定義し、そのフラグに応じてECCパリティの再計算を定期的に行う手法である。この手法では、ECCパリティの再計算を定期的に行うことで、ユーザデータの部分書き換え時にECCパリティの再計算を行う必要がなくなる。その結果、効率的なメモリアクセスを実現することができる(例えば特許文献1参照)。 Conventionally, as a technique for preventing a decrease in memory access throughput for a nonvolatile random access memory, there is a technique of dynamically controlling ECC (Error Check and Correct) parity calculation in accordance with an access unit. Specifically, this is a method of defining a flag (valid flag) indicating whether the ECC parity is valid or invalid and periodically recalculating the ECC parity according to the flag. In this method, by recalculating ECC parity periodically, it is not necessary to recalculate ECC parity at the time of partial rewriting of user data. As a result, efficient memory access can be realized (see, for example, Patent Document 1).
しかしながら、特許文献1の手法では、定期的なタイマ割り込みをトリガとしてECCパリティの再計算を行うので、ユーザデータの部分書き換え後のタイミングから次のタイマ割り込みのタイミングまでの期間では、ECCパリティが無効となる。その結果、ユーザデータの冗長性の点で性能低下を招くという問題があった。
However, in the method of
本発明は、上記した事情に鑑みてなされたものであり、その目的は、効率的なメモリアクセスとユーザデータの冗長性とのトレードオフを解消することができる誤り訂正検出装置を提供することにある。 The present invention has been made in view of the above circumstances, and an object of the present invention is to provide an error correction detection apparatus capable of eliminating the trade-off between efficient memory access and user data redundancy. is there.
請求項1に記載した発明によれば、不揮発性のランダムアクセスメモリは、それぞれがランダムアクセス可能な複数のメモリセルを有する。パリティデータ生成手段は、メモリセルに格納されているユーザデータに対してECCパリティを計算してパリティデータを生成する。誤り訂正検出手段は、ユーザデータに対してパリティデータを適用して当該ユーザデータの誤り訂正検出を行う。差分データ生成手段は、メモリセルに格納されているユーザデータの部分書き換えが発生したことに応じて、その部分書き換え前のユーザデータと部分書き換え後のユーザデータとの差分を示す差分データを生成する。テーブル保持手段は、差分データ生成手段により生成された差分データを格納可能なテーブルを保持する。 According to the first aspect of the present invention, the nonvolatile random access memory has a plurality of memory cells each capable of random access. The parity data generating means generates parity data by calculating ECC parity for user data stored in the memory cell. The error correction detection means applies parity data to the user data and detects error correction of the user data. The difference data generation means generates difference data indicating a difference between the user data before the partial rewrite and the user data after the partial rewrite in response to the partial rewrite of the user data stored in the memory cell. . The table holding unit holds a table capable of storing the difference data generated by the difference data generating unit.
誤り訂正検出手段は、メモリセルに格納されているユーザデータの部分書き換えが発生する毎に、その部分書き換えによる差分データを、その部分書き換えが発生したアドレスと対応付けてテーブルに格納する。そして、誤り訂正検出手段は、ユーザデータの誤り訂正検出を行う際には、その部分書き換え後のユーザデータに対してテーブルに格納されている差分データを反映し、その差分データを反映したユーザデータに対して部分書き換え前にパリティデータ生成手段により生成されたパリティデータを適用して当該ユーザデータの誤り訂正検出を行う。 Each time the partial rewriting of the user data stored in the memory cell occurs, the error correction detection means stores the difference data by the partial rewriting in the table in association with the address where the partial rewriting occurs. When the error correction detection means performs error correction detection of user data, the difference data stored in the table is reflected on the user data after partial rewriting, and the user data reflecting the difference data is reflected. On the other hand, the parity data generated by the parity data generating means is applied before partial rewriting to detect error correction of the user data.
即ち、ECCパリティを計算した時点のユーザデータからの差分を示す差分データを保持し、その差分データを部分書き換え後のユーザデータに対して常に反映可能とすることで、部分書き換え前のユーザデータを常に生成可能とした。これにより、ユーザデータの部分書き換え時にECCパリティの再計算を行う必要がないので、メモリアクセスを効率良く行うことができる。又、ECCパリティが無効となる期間が発生することもないので、ユーザデータの冗長性による性能低下を防止することができる。その結果、効率的なメモリアクセスとユーザデータの冗長性とのトレードオフを解消することができる。 That is, the difference data indicating the difference from the user data at the time of calculating the ECC parity is held, and the difference data can be always reflected on the user data after the partial rewriting, so that the user data before the partial rewriting can be reflected. Can always be generated. As a result, it is not necessary to recalculate ECC parity at the time of partial rewriting of user data, so that memory access can be performed efficiently. In addition, since a period in which the ECC parity is invalid does not occur, it is possible to prevent performance degradation due to user data redundancy. As a result, the trade-off between efficient memory access and user data redundancy can be eliminated.
(第1の実施形態)
以下、本発明の第1の実施形態について図1から図5を参照して説明する。マイクロコンピュータ(マイコン)1は、誤り訂正検出装置2と、周辺回路12とを有する。誤り訂正検出装置2は、CPU(Central Processing Unit)3と、ROM(Read Only Memory)4と、不揮発性のRAM(Random Access Memory)5(不揮発性のランダムアクセスメモリ)と、ECC(Error Check and Correct)回路6(パリティデータ生成手段)と、メモリデータ監視回路7とを有する。CPU3、ROM4、不揮発性のRAM5、ECC回路6及びメモリデータ監視回路7は、バス8を介して相互接続されている。又、周辺回路12も、上記した誤り訂正検出装置2を構成する各回路と共にバス8に接続されている。
(First embodiment)
Hereinafter, a first embodiment of the present invention will be described with reference to FIGS. The
ROM4は、CPU3が実行する制御プログラムを格納している。CPU3は、ROM4に格納されている制御プログラムを読出して実行することで、マイコン1の動作全体を制御する。不揮発性のRAM5は、それぞれがランダムアクセス可能な複数のメモリセルを有する。複数のメモリセルは、それぞれユーザデータを格納可能である。ECC回路6は、CPU3からECCパリティの計算命令を入力すると、メモリセルに格納されているユーザデータに対してECCパリティを計算してパリティデータを生成し、その生成したパリティデータをユーザデータに付与する。
The
メモリデータ監視回路7は、誤り訂正検出回路9(誤り訂正検出手段)と、差分データ生成回路10(差分データ生成手段)と、テーブル保持回路11(テーブル保持手段)とを有し、RAM5に格納されているユーザデータ及びパリティデータを監視する。誤り訂正検出回路9は、CPU3から誤り訂正検出命令を入力すると、ユーザデータに対してパリティデータを適用して当該ユーザデータの誤り訂正検出を行う。誤り訂正検出とは、ユーザデータの1ビット誤りを検出し且つ訂正すること、又はユーザデータの2ビット以上の誤りを検出することである。差分データ生成回路10は、ユーザデータの部分書き換え(部分更新)が発生する毎に、CPU3から差分データ作成命令を入力すると、部分書き換え前のユーザデータと部分書き換え後のユーザデータとの差分を示す差分データを生成する。
The memory data monitoring circuit 7 includes an error correction detection circuit 9 (error correction detection means), a difference data generation circuit 10 (difference data generation means), and a table holding circuit 11 (table holding means), which are stored in the
テーブル保持回路11は、RAM5の記憶領域の一部を用いて図2に示すテーブルを保持する。テーブル保持回路11は、ユーザデータの部分書き換えが発生する毎に、CPU3からレコード追加命令を入力すると、1レコードを追加する。1レコードは、部分書き換え前のユーザデータと部分書き換え後のユーザデータとの差分を示す差分データ(0b0000)と、その部分書き換えが発生した領域を示すアドレス(0x0000)と、テーブルを初期化した時点から何回目の書き換えであるかを示す書き換え回数(n(nは自然数)、部分書き換えの発生回数)とを含む。又、周辺回路12は、例えばデータをAD変換するAD変換回路、データ通信を制御するデータ通信回路等である。
The
次に、上記した構成の作用について、図3から図5を参照して説明する。CPU3は、本発明に関連し、図3に示す処理を実行する。CPU3は、例えば予め規定されているECCパリティの計算タイミングになると、ECCパリティの計算命令をECC回路6に出力し、メモリセルに格納されている全てのユーザデータに対してECCパリティを計算させてパリティデータを生成させる。そして、CPU3は、その生成されたパリティデータを該当するユーザデータに付与させる(S1)。
Next, the operation of the above configuration will be described with reference to FIGS. The
次いで、CPU3は、図2に示したテーブルを初期化し(S2)、ユーザデータの部分書き換えが発生したか否かを判定する(S3)。ここで、CPU3は、ユーザデータの部分書き換えが発生したと判定すると(S3:YES)、差分データ作成命令を差分データ生成回路10に出力し、部分書き換え前のユーザデータと部分書き換え後のユーザデータとの差分を示す差分データを生成させる。そして、CPU3は、レコード追加命令をテーブル保持回路11に出力し、部分書き換え情報として1レコードをテーブルに追加させる(S4)。具体的には、図4及び図5に示すように、ユーザデータの部分書き換えがアドレス「addr1」で発生すると、CPU3は、その部分書き換え前のユーザデータと部分書き換え後のユーザデータとの差分を示す差分データ「Δd1」、そのアドレス「addr1」、テーブルを初期化した時点からの発生回数「1」を1レコードとしてテーブルに追加させる。その後、ユーザデータの部分書き換えがアドレス「addr2」で発生すると、CPU3は、その部分書き換え前のユーザデータと部分書き換え後のユーザデータとの差分を示す差分データ「Δd2」、そのアドレス「addr2」、テーブルを初期化した時点からの発生回数「2」を1レコードとしてテーブルに追加させる。これ以降、CPU3は、ユーザデータの部分書き換えが発生する毎に同様の処理を繰返して行う。
Next, the
次いで、CPU3は、誤り訂正検出のチェック要求が発生したか否かを判定すると共に(S5)、書き換え回数が予め規定されている第1の所定回数に達したか否かを判定する(S6)。この場合、CPU3は、例えば誤り訂正検出のチェックを行うためのタイマをカウントし、カウント値が予め規定されている第1の所定値に達した否かを判定することで、誤り訂正検出のチェック要求が発生したか否かを判定する。第1の所定値は、メモリアクセスのスループット(効率的なメモリアクセス)及び誤り訂正検出の能力(ユーザデータの冗長性)のうち何れを優先するかにより設定される。即ち、誤り訂正検出の能力よりもメモリアクセスのスループットを優先する場合であれば、誤り訂正検出を行う頻度は相対的に低く設定され、第1の所定値は相対的に大きな値に設定される。一方、メモリアクセスのスループットよりも誤り訂正検出の能力を優先する場合であれば、誤り訂正検出を行う頻度は相対的に高く設定され、第1の所定値は相対的に小さな値に設定される。第1の所定回数も同様であり、誤り訂正検出の能力よりもメモリアクセスのスループットを優先する場合であれば、第1の所定回数は相対的に大きな値に設定される。一方、メモリアクセスのスループットよりも誤り訂正検出の能力を優先する場合であれば、第1の所定回数は相対的に小さな値に設定される。尚、第1の所定回数が「1」に設定された場合には、ユーザデータの部分書き換えが発生する毎に、誤り訂正検出を行うことになり、誤り訂正検出の能力をより高めることができる。
Next, the
CPU3は、誤り訂正検出のチェックを行うためのタイマをカウント値が第1の所定値に達したと判定し、誤り訂正検出のチェック要求が発生したと判定すると(S5:YES)、その時点で部分書き換え情報がテーブルに格納されているか否かを判定する(S7)。CPU3は、部分書き換え情報がテーブルに格納されていると判定すると(S7:YES)、現在のユーザデータ(部分書き換え後のユーザデータ)に対して差分データを反映させる(S8)。即ち、CPU3は、部分書き換え前のユーザデータが「A」、部分書き換え後のユーザデータが「B」であれば、差分データとして「A−B」を計算し、「B+(A−B)=A」を計算させる(差分データを書き戻す)。
When the
そして、CPU3は、誤り訂正検出命令を誤り訂正検出回路9に出力し、その差分データを反映したユーザデータに対して、部分書き換え前にECC回路6により生成させたパリティデータを適用して当該ユーザデータの誤り訂正検出を行わせる(S9)。このとき、CPU3は、ユーザデータの誤り訂正検出を行わせた後に、第1の所定値を初期化する。これ以降、CPU3は、ステップS3に戻り、ステップS3以降を繰返して行う。尚、CPU3は、誤り訂正検出のチェック要求が発生したと判定したが(S5:YES)、部分書き換え情報がテーブルに格納されていないと判定すると(S7:NO)、ユーザデータの誤り訂正検出を行わせることなく、ステップS3に戻り、ステップS3以降を繰返して行う。
Then, the
又、CPU3は、書き換え回数が第1の所定回数に達した判定すると(S6:YES)、この場合も、現在のユーザデータ(部分書き換え後のユーザデータ)に対して差分データを反映させる(S8)。そして、CPU3は、誤り訂正検出命令を誤り訂正検出回路9に出力し、その差分データを反映したユーザデータに対して、部分書き換え前にECC回路6により生成させたパリティデータを適用して当該ユーザデータの誤り訂正検出を行わせる(S9)。このとき、CPU3は、ユーザデータの誤り訂正検出を行わせた後に、第1の所定回数を初期化する。これ以降、CPU3は、ステップS3に戻り、ステップS3以降を繰返して行う。
If the
以上に説明したように第1の実施形態によれば、誤り訂正検出装置2において、ユーザデータの部分書き換えが発生する毎に、その部分書き換えによる差分データを、その部分書き換えが発生したアドレスと対応付けてテーブルに格納する。そして、ユーザデータの誤り訂正検出を行う際には、その部分書き換え後のユーザデータに対して差分データを反映し、その差分データを反映したユーザデータに対して部分書き換え前のパリティデータを適用して当該ユーザデータの誤り訂正検出を行うようにした。即ち、ECCパリティを計算した時点のユーザデータからの差分を示す差分データを保持し、その差分データを部分書き換え後のユーザデータに対して常に反映可能とすることで、部分書き換え前のユーザデータを常に生成可能とした。これにより、ユーザデータの部分書き換え時にECCパリティの再計算を行う必要がないので、メモリアクセスを効率良く行うことができる。又、ECCパリティが無効となる期間が発生することもないので、ユーザデータの冗長性による性能低下を防止することができる。その結果、効率的なメモリアクセスと、ユーザデータの冗長性とのトレードオフを解消することができる。
As described above, according to the first embodiment, each time partial rewriting of user data occurs in the error
又、ユーザデータの誤り訂正検出の要求が発生したこと、又は書き換え回数が第1の所定回数に達したことを条件とし、そのユーザデータの誤り訂正検出を行うようにした。これにより、ユーザデータの誤り訂正検出を行う頻度を、誤り訂正検出の要求や第1の所定回数により調整することができる。即ち、誤り訂正検出の能力よりもメモリアクセスのスループットを優先する場合であれば、誤り訂正検出を行う頻度を相対的に低くするように誤り訂正検出の要求や第1の所定回数を設定すれば良い。一方、メモリアクセスのスループットよりも誤り訂正検出の能力を優先する場合であれば、誤り訂正検出を行う頻度を相対的に高くするように誤り訂正検出の要求や第1の所定回数を設定すれば良い。 Further, the user data error correction detection is performed on condition that a request for error correction detection of user data has occurred or the number of rewrites reaches the first predetermined number of times. Thereby, the frequency of performing error correction detection of user data can be adjusted by the request for error correction detection and the first predetermined number of times. In other words, if priority is given to the memory access throughput over the error correction detection capability, the error correction detection request and the first predetermined number of times may be set so that the frequency of error correction detection is relatively low. good. On the other hand, if priority is given to the error correction detection capability over the memory access throughput, the error correction detection request and the first predetermined number of times may be set so that the frequency of error correction detection is relatively high. good.
尚、以上は、ユーザデータの誤り訂正検出の要求が発生したか否かの判定と、書き換え回数が第1の所定回数に達したか否かの判定とを行うようにしたが、ユーザデータの誤り訂正検出の要求が発生したか否かの判定のみを行うようにしても良い。即ち、ユーザデータの誤り訂正検出の要求が発生したことを、書き換え回数が第1の所定回数に達したことよりも優先しても良い。このように構成すれば、書き換え回数に依存することなく、ユーザデータの誤り訂正検出を行うことができる。 In the above description, it is determined whether or not a request for error correction detection of user data has occurred and whether or not the number of rewrites reaches the first predetermined number. Only a determination as to whether a request for error correction detection has occurred may be made. That is, the request for error correction detection of user data may be prioritized over the number of times of rewriting reaching the first predetermined number. If comprised in this way, error correction detection of user data can be performed without depending on the frequency | count of rewriting.
(第2の実施形態)
次に、本発明の第2の実施形態について、図6を参照して説明する。尚、上記した第1の実施形態と同一部分については説明を省略し、異なる部分について説明する。第2の実施形態は、ユーザデータの誤り訂正検出を行うことに加え、ECCパリティの再計算を行う構成である。
(Second Embodiment)
Next, a second embodiment of the present invention will be described with reference to FIG. In addition, description is abbreviate | omitted about the same part as above-mentioned 1st Embodiment, and a different part is demonstrated. In the second embodiment, in addition to performing error correction detection of user data, ECC parity recalculation is performed.
CPU3は、ユーザデータの部分書き換えが発生したと判定し(S3:YES)、部分書き換え情報として1レコードをテーブルに追加させると(S4)、ECCパリティの再計算の要求が発生したか否かを判定し(S11)、書き換え回数が予め規定されている第2の所定回数に達したか否かを判定する共に(S12)、誤り訂正検出のチェック要求が発生したか否かを判定する(S5)。この場合、CPU3は、例えばECCパリティを再計算させるためのタイマをカウントし、カウント値が予め規定されている第2の所定値に達した否かを判定することで、ECCパリティの再計算の要求が発生したか否かを判定する。第2の所定値は、テーブルのサイズやユーザデータの部分書き換えが発生する頻度により設定される。即ち、テーブルのサイズが相対的に小さかったりユーザデータの部分書き換えが発生する頻度が相対的に高かったりする場合であれば、ECCパリティを再計算させる頻度は相対的に高く設定され、第2の所定値は相対的に小さな値に設定される。一方、テーブルのサイズが相対的に大きかったりユーザデータの部分書き換えが発生する頻度が相対的に低かったりする場合であれば、ECCパリティを再計算させる頻度は相対的に低く設定され、第2の所定値は相対的に大きな値に設定される。第2の所定回数も同様であり、テーブルのサイズが相対的に小さかったりユーザデータの部分書き換えが発生する頻度が相対的に高かったりする場合であれば、第2の所定回数は相対的に小さな値に設定される。一方、テーブルのサイズが相対的に大きかったりユーザデータの部分書き換えが発生する頻度が相対的に低かったりする場合であれば、第2の所定回数は相対的に大きな値に設定される。尚、第2の所定回数が「1」に設定された場合には、ユーザデータの部分書き換えが発生する毎に、ECCパリティの再計算を行うことになり、この場合も、誤り訂正検出の能力をより高めることができる。
The
CPU3は、ECCパリティの再計算を行うためのタイマのカウント値が第2の所定値に達したと判定し、ECCパリティの再計算の要求が発生したと判定すると(S11:YES)、その時点で部分書き換え情報がテーブルに格納されているか否かを判定する(S13)。CPU3は、部分書き換え情報がテーブルに格納されていると判定すると(S13:YES)、ECCパリティの計算命令をECC回路6に出力し、その部分書き換えが発生したユーザデータに対してECCパリティを再計算させてパリティデータを再生成させる。そして、CPU3は、その再生成されたパリティデータを当該部分書き換えが発生したユーザデータに付与させる(S14)。このとき、CPU3は、ECCパリティを再計算させた後に、第2の所定値を初期化する。これ以降、CPU3は、ステップS2に戻り、図2に示したテーブルを初期化した後に、ステップS3以降を繰返して行う。尚、CPU3は、ECCパリティの再計算の要求が発生したと判定したが(S11:YES)、部分書き換え情報がテーブルに格納されていないと判定すると(S13:NO)、ECCパリティを再計算させることなく、ステップS3に戻り、ステップS3以降を繰返して行う。
When the
又、CPU3は、書き換え回数が第2の所定回数に達した判定すると(S12:YES)、この場合も、ECCパリティの計算命令をECC回路6に出力し、その部分書き換えが発生したユーザデータに対してECCパリティを再計算させてパリティデータを再生成させる。そして、CPU3は、その再生成されたパリティデータを当該部分書き換えが発生したユーザデータに付与させる(S14)。このとき、CPU3は、ECCパリティを再計算させた後に、第2の所定回数を初期化する。これ以降、CPU3は、ステップS2に戻り、図2に示したテーブルを初期化した後に、ステップS3以降を繰返して行う。
If the
以上に説明したように第2の実施形態によれば、ユーザデータのうち少なくとも部分書き換えが発生したユーザデータに対してECCパリティを再計算してパリティデータを再生成し、テーブルを初期化するようにした。これにより、効率的なメモリアクセスと、ユーザデータの冗長性とのトレードオフを解消することができることに加え、記憶領域が有限であるテーブルを効率的に利用することができる。 As described above, according to the second embodiment, ECC data is recalculated for user data that has undergone at least partial rewriting among user data, parity data is regenerated, and the table is initialized. I made it. As a result, the trade-off between efficient memory access and user data redundancy can be eliminated, and a table having a finite storage area can be used efficiently.
又、ECCパリティの再計算の要求が発生したこと、又は書き換え回数が第2の所定回数に達したことを条件とし、そのECCパリティの再計算を行うようにした。これにより、ECCパリティの再計算を行う頻度を、ECCパリティの再計算の要求や第2の所定回数により調整することができる。即ち、テーブルのサイズが相対的に小さかったりユーザデータの部分書き換えが発生する頻度が相対的に高かったりする場合であれば、ECCパリティの再計算を行う頻度を相対的に高くするようにECCパリティの再計算の要求や第2の所定回数を設定すれば良い。一方、テーブルのサイズが相対的に大きかったりユーザデータの部分書き換えが発生する頻度が相対的に低かったりする場合であれば、ECCパリティの再計算を行う頻度を相対的に低くするようにECCパリティの再計算の要求や第2の所定回数を設定すれば良い。 Further, the ECC parity is recalculated on the condition that a request for recalculation of the ECC parity occurs or the number of rewrites reaches the second predetermined number of times. Thereby, the frequency of performing ECC parity recalculation can be adjusted by the ECC parity recalculation request or the second predetermined number of times. That is, if the table size is relatively small or the frequency of partial rewriting of user data is relatively high, the ECC parity is set so that the frequency of recalculating the ECC parity is relatively high. The recalculation request and the second predetermined number of times may be set. On the other hand, if the table size is relatively large or the frequency of partial rewriting of user data is relatively low, the ECC parity is set so that the frequency of recalculating ECC parity is relatively low. The recalculation request and the second predetermined number of times may be set.
尚、以上は、ECCパリティの再計算の要求が発生したか否かの判定と、書き換え回数が第2の所定回数に達したか否かの判定とを行うようにしたが、ECCパリティの再計算の要求が発生したか否かの判定のみを行うようにしても良い。即ち、ECCパリティの再計算の要求が発生したことを、書き換え回数が第2の所定回数に達したことよりも優先しても良い。このように構成すれば、書き換え回数に依存することなく、ECCパリティの再計算を行うことができる。 In the above, the determination whether or not the ECC parity recalculation request has occurred and the determination whether or not the number of rewrites reaches the second predetermined number are performed. Only a determination as to whether a calculation request has occurred may be made. That is, the request for recalculation of the ECC parity may be given priority over the fact that the number of rewrites reaches the second predetermined number. With this configuration, the ECC parity can be recalculated without depending on the number of rewrites.
(第3の実施形態)
次に、本発明の第3の実施形態について、図7を参照して説明する。尚、上記した第1の実施形態と同一部分については説明を省略し、異なる部分について説明する。第3の実施形態は、第1の実施形態と第2の実施形態とを組み合わせた構成である。
(Third embodiment)
Next, a third embodiment of the present invention will be described with reference to FIG. In addition, description is abbreviate | omitted about the same part as above-mentioned 1st Embodiment, and a different part is demonstrated. The third embodiment is a combination of the first embodiment and the second embodiment.
CPU3は、ユーザデータの部分書き換えが発生したと判定し(S3:YES)、部分書き換え情報として1レコードをテーブルに追加させると(S4)、ECCパリティの再計算の要求が発生したか否かを判定し(S11)、書き換え回数が第2の所定回数に達したか否かを判定し(S12)、誤り訂正検出のチェック要求が発生したか否かを判定すると共に(S5)、書き換え回数が第1の所定回数に達したか否かを判定する(S6)。
The
CPU3は、ECCパリティの再計算の要求が発生したと判定し(S11:YES)、その時点で部分書き換え情報がテーブルに格納されていると判定すると(S13:YES)、又は書き換え回数が第2の所定回数に達したと判定すると(S12:YES)、ECCパリティの計算命令をECC回路6に出力し、その部分書き換えが発生したユーザデータに対してECCパリティを再計算させてパリティデータを再生成させる。そして、CPU3は、その再生成されたパリティデータを当該部分書き換えが発生したユーザデータに付与させる(S14)。これ以降、CPU3は、ステップS2に戻り、図2に示したテーブルを初期化した後に、ステップS3以降を繰返して行う。
The
又、CPU3は、誤り訂正検出のチェック要求が発生したと判定し(S5:YES)、その時点で部分書き換え情報がテーブルに格納されていると判定すると(S7:YES)、又は書き換え回数が第1の所定回数に達したと判定すると(S6:YES)、現在のユーザデータ(部分書き換え後のユーザデータ)に対して差分データを反映させる(S8)。そして、CPU3は、誤り訂正検出命令を誤り訂正検出回路9に出力し、その差分データを反映したユーザデータに対して、部分書き換え前にECC回路6により生成させたパリティデータを適用して当該ユーザデータの誤り訂正検出を行わせる(S9)。これ以降、CPU3は、ステップS3に戻り、ステップS3以降を繰返して行う。
The
以上に説明したように第3の実施形態によれば、上記した第2の実施形態と同様の作用効果を得ることができる。即ち、効率的なメモリアクセスと、ユーザデータの冗長性とのトレードオフを解消することができることに加え、記憶領域が有限であるテーブルを効率的に利用することができる。 As described above, according to the third embodiment, the same operational effects as those of the second embodiment described above can be obtained. That is, in addition to eliminating the trade-off between efficient memory access and user data redundancy, a table having a finite storage area can be used efficiently.
(その他の実施形態)
本発明は、上記した実施形態にのみ限定されるものではなく、以下のように変形又は拡張することができる。又、複数の変形例を組み合わせても良い。
ECCパリティの計算を行うECC回路を設けることで、ECCパリティの計算を行う処理をハードウェアで実現する構成に限らず、ECCパリティの計算を行うプログラムをCPU3が実行する制御プログラムに組み込みことで、ECCパリティの計算を行う処理をソフトウェアで実現しても良い。
RAM5の記憶領域の一部にテーブルを保持する構成に限らず、RAM5とは別の記憶手段を設け、その別の記憶手段にテーブルを保持しても良い。
(Other embodiments)
The present invention is not limited to the above-described embodiment, and can be modified or expanded as follows. A plurality of modified examples may be combined.
By providing the ECC circuit for calculating the ECC parity, the processing for calculating the ECC parity is not limited to the configuration that implements the hardware, but the program for calculating the ECC parity is incorporated into the control program executed by the
Not only the configuration in which the table is held in a part of the storage area of the
図面中、2は誤り訂正検出装置、5は不揮発性のRAM(不揮発性のランダムアクセスメモリ)、6はECC回路(パリティデータ生成手段)、9は誤り訂正検出回路(誤り訂正検出手段)、10は差分データ生成回路(差分データ生成手段)、11はテーブル保持回路(テーブル保持手段)である。 In the drawing, 2 is an error correction detection device, 5 is a nonvolatile RAM (nonvolatile random access memory), 6 is an ECC circuit (parity data generation means), 9 is an error correction detection circuit (error correction detection means), 10 Is a difference data generation circuit (difference data generation means), and 11 is a table holding circuit (table holding means).
Claims (6)
前記メモリセルに格納されているユーザデータに対してECCパリティを計算してパリティデータを生成するパリティデータ生成手段(6)と、
前記ユーザデータに対して前記パリティデータを適用して当該ユーザデータの誤り訂正検出を行う誤り訂正検出手段(9)と、を備えた誤り訂正検出装置(2)において、
前記メモリセルに格納されているユーザデータの部分書き換えが発生したことに応じて、その部分書き換え前のユーザデータと部分書き換え後のユーザデータとの差分を示す差分データを生成する差分データ生成手段(10)と、
前記差分データ生成手段により生成された差分データを格納可能なテーブルを保持するテーブル保持手段(11)と、を備え、
前記誤り訂正検出手段は、前記ユーザデータの部分書き換えが発生する毎に、その部分書き換えによる前記差分データを、その部分書き換えが発生したアドレスと対応付けて前記テーブルに格納し、ユーザデータの誤り訂正検出を行う際には、その部分書き換え後のユーザデータに対して前記差分データを反映し、その差分データを反映したユーザデータに対して部分書き換え前に前記パリティデータ生成手段により生成されたパリティデータを適用して当該ユーザデータの誤り訂正検出を行うことを特徴とする誤り訂正検出装置。 A non-volatile random access memory (5) each having a plurality of randomly accessible memory cells;
Parity data generating means (6) for calculating ECC parity for user data stored in the memory cell and generating parity data;
In an error correction detection device (2) comprising error correction detection means (9) for applying error correction to the user data by applying the parity data to the user data,
In response to the occurrence of partial rewriting of user data stored in the memory cell, difference data generating means for generating difference data indicating a difference between user data before the partial rewriting and user data after the partial rewriting ( 10) and
Table holding means (11) for holding a table capable of storing the difference data generated by the difference data generating means,
The error correction detection means stores the difference data resulting from the partial rewriting in the table in association with the address at which the partial rewriting occurs every time the user data is partially rewritten, thereby correcting the error of the user data. When performing the detection, the difference data is reflected on the user data after the partial rewriting, and the parity data generated by the parity data generating unit before the partial rewriting is applied to the user data reflecting the difference data. Is applied to perform error correction detection of the user data.
前記誤り訂正検出手段は、前記ユーザデータの誤り訂正検出の要求が発生したこと、及び前記ユーザデータの部分書き換えの発生回数が第1の所定回数に達したことの少なくとも何れかを条件とし、そのユーザデータの誤り訂正検出を行うことを特徴とする誤り訂正検出装置。 In the error correction detection apparatus according to claim 1,
The error correction detection means is conditional on at least one of the occurrence of a request for error correction detection of the user data and the number of occurrences of partial rewriting of the user data reaching a first predetermined number of times. An error correction detection apparatus for performing error correction detection of user data.
前記誤り訂正検出手段は、前記ユーザデータの誤り訂正検出の要求が発生したことを、前記ユーザデータの部分書き換えの発生回数が第1の所定回数に達したことよりも優先し、そのユーザデータの誤り訂正検出を行うことを特徴とする誤り訂正検出装置。 In the error correction detection apparatus according to claim 2,
The error correction detection means prioritizes occurrence of a request for error correction detection of the user data over that the number of occurrences of partial rewriting of the user data has reached a first predetermined number of times, and An error correction detection apparatus that performs error correction detection.
前記パリティデータ生成手段は、前記ユーザデータのうち少なくとも部分書き換えが発生したユーザデータに対してECCパリティを再計算してパリティデータを再生成し、
前記テーブル保持手段は、テーブルを初期化することを特徴とする誤り訂正検出装置。 In the error correction detection apparatus according to any one of claims 1 to 3,
The parity data generation means recalculates ECC parity for user data that has undergone at least partial rewriting of the user data, and regenerates parity data.
The table holding means initializes a table, and an error correction detection apparatus.
前記パリティデータ生成手段は、前記ECCパリティの再計算の要求が発生したこと、及び前記ユーザデータの部分書き換えの発生回数が第2の所定回数に達したことの少なくとも何れかを条件とし、前記ユーザデータのうち少なくとも部分書き換えが発生したユーザデータに対してECCパリティを再計算してパリティデータを再生成することを特徴とする誤り訂正検出装置。 In the error correction detection apparatus according to claim 4,
The parity data generation means is conditioned on at least one of the occurrence of a request for recalculation of the ECC parity and the occurrence of the number of partial rewrites of the user data reaching a second predetermined number of times. An error correction detection apparatus characterized by recalculating ECC parity and regenerating parity data for at least partial rewriting of user data among data.
前記パリティデータ生成手段は、前記ECCパリティの再計算の要求が発生したことを、前記ユーザデータの部分書き換えの発生回数が第2の所定回数に達したことよりも優先し、前記ユーザデータのうち少なくとも部分書き換えが発生したユーザデータに対してECCパリティを再計算してパリティデータを再生成することを特徴とする誤り訂正検出装置。 In the error correction detection apparatus according to claim 5,
The parity data generation means prioritizes the occurrence of the ECC parity recalculation request over the second predetermined number of occurrences of partial rewrite of the user data, An error correction detection apparatus characterized by recalculating ECC parity for user data having undergone at least partial rewriting to regenerate parity data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014007730A JP6135522B2 (en) | 2014-01-20 | 2014-01-20 | Error correction detection device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014007730A JP6135522B2 (en) | 2014-01-20 | 2014-01-20 | Error correction detection device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2015138275A true JP2015138275A (en) | 2015-07-30 |
JP6135522B2 JP6135522B2 (en) | 2017-05-31 |
Family
ID=53769267
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014007730A Active JP6135522B2 (en) | 2014-01-20 | 2014-01-20 | Error correction detection device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6135522B2 (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0887424A (en) * | 1994-09-16 | 1996-04-02 | Toshiba Corp | Electronic computer |
-
2014
- 2014-01-20 JP JP2014007730A patent/JP6135522B2/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0887424A (en) * | 1994-09-16 | 1996-04-02 | Toshiba Corp | Electronic computer |
Also Published As
Publication number | Publication date |
---|---|
JP6135522B2 (en) | 2017-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5529751B2 (en) | Error correction in memory arrays | |
CN110442473B (en) | Nonvolatile data storage method and device, electronic equipment and medium | |
TWI533311B (en) | Flash device and operating method thereof | |
JP2012137994A (en) | Memory system and controlling method thereof | |
KR101557572B1 (en) | Memory circuits, method for accessing a memory and method for repairing a memory | |
US20160328285A1 (en) | Error vector readout from a memory device | |
JP2016118815A (en) | Nonvolatile memory device | |
US10489244B2 (en) | Systems and methods for detecting and correcting memory corruptions in software | |
US10027349B2 (en) | Extended error correction coding data storage | |
US9733870B2 (en) | Error vector readout from a memory device | |
JP2013214212A (en) | Memory controller, semiconductor storage, and decoding method | |
EP2370899B1 (en) | Poison bit error checking code scheme | |
KR20100031402A (en) | Method and apparatus for detecting free page and error correction code decoding method and apparatus using the same | |
JP6135522B2 (en) | Error correction detection device | |
JP4950214B2 (en) | Method for detecting a power outage in a data storage device and method for restoring a data storage device | |
JP6054753B2 (en) | Semiconductor device and data access method | |
JP5446931B2 (en) | Error detection and correction device and memory device | |
JP6193112B2 (en) | Memory access control device, memory access control system, memory access control method, and memory access control program | |
JP2007257628A (en) | Method for error correction and error detection for reading out stored information data and storage control unit therefor | |
JP2008250671A (en) | Information processor and information processing method | |
JP2016122338A (en) | Error correction apparatus | |
CN111352754A (en) | Data storage error detection and correction method and data storage device | |
JP5652720B2 (en) | FPGA system and electronic device | |
JP2010140132A (en) | Memory system and memory controller | |
TWI714248B (en) | Memory controller and data protection method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160310 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20161214 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20170110 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170210 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20170328 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170410 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6135522 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |