JPH10143383A - Error detecting and correcting device - Google Patents

Error detecting and correcting device

Info

Publication number
JPH10143383A
JPH10143383A JP8299032A JP29903296A JPH10143383A JP H10143383 A JPH10143383 A JP H10143383A JP 8299032 A JP8299032 A JP 8299032A JP 29903296 A JP29903296 A JP 29903296A JP H10143383 A JPH10143383 A JP H10143383A
Authority
JP
Japan
Prior art keywords
data
parity
error
horizontal
vertical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP8299032A
Other languages
Japanese (ja)
Inventor
Kiyoshi Arai
清 新井
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.)
NIPPON SYST HOUSE KK
Original Assignee
NIPPON SYST HOUSE KK
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 NIPPON SYST HOUSE KK filed Critical NIPPON SYST HOUSE KK
Priority to JP8299032A priority Critical patent/JPH10143383A/en
Publication of JPH10143383A publication Critical patent/JPH10143383A/en
Pending legal-status Critical Current

Links

Landscapes

  • Detection And Correction Of Errors (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

PROBLEM TO BE SOLVED: To improve the reliability of an erroneous data detecting and correcting device. SOLUTION: When single erroneous data exists, the number of noncoincident lines and columns, in which horizontal/vertical parity generated from main data and the horizontal/vertical parity included in redundant data become noncoincident, is one, respectively. On the other hand, when two or more erroneous data exist, the number of the noncoincident line and columns becomes at least two or more. The number of the erroneous data is specified (whether it shows one or two or more) based on a principle, when one erroneous data exists, a position of the corresponding erroneous data is specified and corrected by an intersection between the noncoincident line and the noncoincident columns, and when two or more erroneous data exist, information indicating the fact is outputted.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、誤り検出訂正装置
に係り、特に、パリティデータに基づいて誤データを検
出・訂正する誤り検出訂正装置に関する。
The present invention relates to an error detection and correction device, and more particularly to an error detection and correction device for detecting and correcting erroneous data based on parity data.

【0002】[0002]

【従来の技術】情報処理分野の進歩により、通信分野に
おける通信データの大規模化、メモリ分野におけるメモ
リの大容量化が急速に進んでいる。これにより、データ
の信頼性を確保することが一層重要になってきた。取り
扱うデータ量が増すと、例えば、通信分野では、通信装
置間におけるノイズ等によるデータ破壊、メモリ分野で
は、メモリチップ内におけるα線等によるデータ破壊等
の可能性が増大するからである。
2. Description of the Related Art With the progress of the information processing field, the scale of communication data in the communication field and the capacity of memories in the memory field are rapidly increasing. As a result, it has become even more important to ensure the reliability of data. This is because, when the amount of data to be handled increases, for example, in the communication field, the possibility of data destruction due to noise or the like between communication devices increases, and in the memory field, the possibility of data destruction due to α rays in a memory chip increases.

【0003】そこで、データの信頼性を高めるべく、実
際に使用する主データに対して、誤データの検出・訂正
用の冗長データを付加し、この冗長データに基づいて主
データ中の誤データを検出・訂正する技術、所謂ECC
(error cheking and correcting)の技術が登場した。
Therefore, in order to improve the reliability of data, redundant data for detecting and correcting erroneous data is added to the main data actually used, and erroneous data in the main data is removed based on the redundant data. Technology for detecting and correcting, so-called ECC
(Error cheking and correcting) technology has appeared.

【0004】特開昭63−308795号公報に、EC
C回路の一例が開示されている。このECC回路は、メ
モリにおいて、1ワードのデータを2次元状に仮想的に
配置し、その配置における水平方向及び垂直方向のパリ
ティ(水平・垂直パリティ)を設け、水平・垂直パリテ
ィにより、仮想的な配置における誤データの位置を特定
し、当該誤データの値を反転することにより訂正するも
のである。以下、この方式を水平・垂直パリティ方式
(HVパリティ方式)という。
[0004] JP-A-63-30879 discloses an EC.
An example of the C circuit is disclosed. This ECC circuit virtually arranges one-word data in a memory in a two-dimensional manner, provides horizontal and vertical parities (horizontal and vertical parities) in the arrangement, and uses the horizontal and vertical parities to virtually The position of the erroneous data in the proper arrangement is specified, and the value is corrected by inverting the value of the erroneous data. Hereinafter, this method is referred to as a horizontal / vertical parity method (HV parity method).

【0005】[0005]

【発明が解決しようとする課題】上記の水平・垂直パリ
ティ方式は、誤データが1つしか存在しないことを前提
としている。従って、誤データが2つ以上存在する場合
には、そのことを検出することができず、当該メモリを
利用する側(例えば、CPU)は、誤データが存在しな
いものとして、処理を続行することになる。
The above-mentioned horizontal / vertical parity system is based on the premise that there is only one erroneous data. Therefore, when two or more erroneous data exist, it cannot be detected, and the side using the memory (for example, CPU) determines that there is no erroneous data and continues the processing. become.

【0006】また、上記の水平・垂直パリティ方式は、
水平・垂直パリティ自体に誤りが存在しないことを前提
としている。従って、水平・垂直パリティデータがα線
等により破壊された場合には、適正なデータ訂正ができ
なくなるばかりか、不適正なデータ訂正により正常なデ
ータを破壊することもある。水平・垂直パリティ方式
は、データを2次元状に配置した際の行数と列数との和
に相当する大規模なパリティデータを要するため、水平
・垂直パリティに誤りが存在しないとの前提は、徒にメ
モリ面積を増大させるだけで、データの信頼性の向上に
対する寄与を希薄にする。
The above-mentioned horizontal / vertical parity system is
It is assumed that there is no error in the horizontal / vertical parity itself. Therefore, when the horizontal / vertical parity data is destroyed by α-rays or the like, proper data correction cannot be performed, and normal data may be destroyed by improper data correction. Since the horizontal / vertical parity method requires large-scale parity data corresponding to the sum of the number of rows and the number of columns when data is arranged two-dimensionally, it is assumed that there is no error in the horizontal / vertical parity. However, by merely increasing the memory area, the contribution to the improvement of data reliability is diminished.

【0007】上記の問題点は、メモリのみならず、ボー
ドやシステム上、さらには通信分野においても同様に議
論し得る。
The above problems can be similarly discussed not only in memories but also in boards and systems, and also in the field of communications.

【0008】本発明は、上記問題点に鑑みてなされたも
のであり、その課題は、より信頼性の高い誤データ検出
訂正装置を提供することにある。
SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and has as its object to provide a more reliable erroneous data detection and correction device.

【0009】[0009]

【課題を解決するための手段】上記課題を解決するた
め、本発明に係る誤データ検出訂正装置は、所定ビット
数で構成される主データに対して第1の水平及び垂直パ
リティを付加したパリティ付データにおける前記主デー
タの誤りを検出・訂正する誤データ検出訂正装置におい
て、前記主データより第2の水平及び垂直パリティを生
成する水平・垂直パリティ生成手段と、前記第1の水平
及び垂直パリティと前記第2の水平及び垂直パリティと
に基づいて、前記主データにおける1または2以上の誤
データの存在を検出する誤データ検出手段と、前記検出
手段により1つの誤データの存在が検出された場合に、
前記第1の水平及び垂直パリティと前記第2の水平及び
垂直パリティとに基づいて当該誤データを特定し訂正す
る訂正手段と、前記誤データ検出手段により2つ以上の
誤データの存在が検出された場合に、その旨を示す情報
を出力する出力手段とを備えることを特徴とする。
In order to solve the above-mentioned problems, an erroneous data detection and correction apparatus according to the present invention provides a main data composed of a predetermined number of bits to which a first horizontal and vertical parity are added. An erroneous data detection and correction device for detecting and correcting an error of the main data in attached data, a horizontal / vertical parity generation means for generating a second horizontal and vertical parity from the main data; Error data detecting means for detecting the presence of one or more erroneous data in the main data based on the second horizontal and vertical parity, and the presence of one erroneous data is detected by the detecting means In case,
Correction means for identifying and correcting the erroneous data based on the first horizontal and vertical parities and the second horizontal and vertical parities; and presence of two or more erroneous data detected by the erroneous data detection means. And an output unit for outputting information indicating the fact in a case where the request is issued.

【0010】本発明に係る誤データ検出訂正装置におい
て、前記誤データ検出手段は、前記第1の水平パリティ
と前記第2の水平パリティとを比較し、両者の値が不一
致となる組が2つ以上存在するか否かを判定する第1の
判定手段と、前記第1の垂直パリティと前記第2の垂直
パリティとを比較し、両者の値が不一致となる組が2つ
以上存在するか否かを判定する第2の判定手段とを有
し、前記第1及び第2の判定手段の少なくとも一方によ
り、前記不一致となる組が2つ以上存在すると判定され
た場合に、2以上の誤データが存在するものと判断する
ことが好ましい。
In the erroneous data detection and correction device according to the present invention, the erroneous data detection means compares the first horizontal parity with the second horizontal parity, and finds two sets in which the values of the two do not match. First determining means for determining whether or not there is the above, and comparing the first vertical parity with the second vertical parity, and determining whether there are two or more sets in which the values of the two do not match each other. And a second determination unit for determining whether two or more sets of mismatches exist by at least one of the first and second determination units. Is preferably determined to exist.

【0011】本発明に係る誤データ検出訂正装置におい
て、前記パリティ付データは、前記主データの全体に関
する全体パリティを含み、前記全体パリティに基づいて
前記第1の水平及び垂直パリティにおける誤りの存在を
検出するパリティ誤り検出手段をさらに備えることが好
ましい。
In the erroneous data detection / correction device according to the present invention, the data with parity includes an entire parity of the entire main data, and the presence of an error in the first horizontal and vertical parity is determined based on the entire parity. It is preferable that the apparatus further comprises a parity error detecting means for detecting.

【0012】本発明に係る誤データ検出訂正装置におい
て、前記訂正手段は、前記パリティ誤り検出手段により
前記第1の水平及び垂直パリティに誤りが検出されず、
かつ前記誤データ検出手段により前記主データにおける
1つの誤データの存在が検出された場合に、当該誤デー
タを訂正することが好ましい。
In the erroneous data detection and correction device according to the present invention, the correction means does not detect an error in the first horizontal and vertical parities by the parity error detection means,
Further, when the presence of one erroneous data in the main data is detected by the erroneous data detection means, it is preferable to correct the erroneous data.

【0013】また、上記改題を解決するため、本発明に
係る第2の誤データ検出訂正装置は、所定ビット数で構
成される主データに対して、第1の水平及び垂直パリテ
ィと、前記主データ全体に関する全体パリティとを付加
したパリティ付データにおける前記主データの誤りを検
出・訂正する誤り検出訂正装置において、前記主データ
より第2の水平及び垂直パリティを生成する水平・垂直
パリティ生成手段と、前記第1の水平及び垂直パリティ
と前記第2の水平及び垂直パリティとに基づいて、前記
主データにおける誤データの存在を検知する誤データ検
出手段と、前記全体パリティに基づいて前記第1の水平
及び垂直パリティにおける誤りの存在を検出するパリテ
ィ誤り検出手段と、前記パリティ誤り検出手段により前
記第1の水平及び垂直パリティに誤りが検出されず、か
つ前記誤データ検出手段により前記主データにおける誤
データの存在が検出された場合に、当該誤データを訂正
する訂正手段とを備えることを特徴とする。
In order to solve the above-mentioned problem, the second erroneous data detection / correction device according to the present invention comprises a first horizontal and vertical parity for main data composed of a predetermined number of bits, In an error detection and correction device for detecting and correcting an error of the main data in the data with parity to which the entire parity of the entire data is added, a horizontal / vertical parity generating means for generating a second horizontal and vertical parity from the main data; Erroneous data detecting means for detecting the presence of erroneous data in the main data based on the first horizontal and vertical parities and the second horizontal and vertical parities, and the first data based on the overall parity. Parity error detecting means for detecting the presence of an error in horizontal and vertical parity, and the first horizontal and Error is not detected immediately parity, and if the presence of erroneous data in the main data is detected by the error data detecting means, characterized in that it comprises a correcting means for correcting the erroneous data.

【0014】また、上記改題を解決するため、本発明に
係る第3の誤データ検出訂正装置は、主データに対して
誤データの検査情報を付加した検査情報付データにおけ
る前記主データの誤りを検出・訂正する誤り検出訂正装
置であって、前記検査情報付データは、前記検査情報の
パリティを含み、前記検査情報のパリティに基づいて前
記検査情報における誤りの存在を検出する検査情報誤り
検出手段と、前記検査情報誤り検出手段により前記検査
情報における誤りの存在が検出されない場合に、前記検
査情報に基づいて前記主データにおける誤データを検出
し、訂正する訂正手段とを備えることを特徴とする。
Further, in order to solve the above-mentioned renaming, a third erroneous data detection and correction device according to the present invention provides an apparatus for detecting an error in the main data in data with check information obtained by adding check information of erroneous data to the main data. An error detection and correction device for detecting and correcting, wherein the data with check information includes a parity of the check information, and a check information error detecting means for detecting the presence of an error in the check information based on the parity of the check information. And correcting means for detecting and correcting erroneous data in the main data based on the test information when the presence of an error in the test information is not detected by the test information error detecting means. .

【0015】[0015]

【発明の実施の形態】以下、添付図面を参照しながら本
発明の好適な実施の形態を説明する。
Preferred embodiments of the present invention will be described below with reference to the accompanying drawings.

【0016】<誤データの検出・訂正の原理>図1は、
本発明の実施の形態における水平・垂直パリティ方式を
説明する図である。本実施の形態においては、32ビッ
ト幅のデータD0〜D31を8行4列の2次元空間に仮
想的に配置し、この配置に基づいて水平パリティHPD
0〜HPD7、垂直パリティVPD0〜VPD3、全体
パリティCが付加される。
<Principle of Detection and Correction of Erroneous Data> FIG.
FIG. 3 is a diagram illustrating a horizontal / vertical parity system according to an embodiment of the present invention. In the present embodiment, 32-bit data D0 to D31 are virtually arranged in a two-dimensional space of 8 rows and 4 columns, and a horizontal parity HPD is set based on this arrangement.
0 to HPD7, vertical parity VPD0 to VPD3, and overall parity C are added.

【0017】水平パリティは、水平方向の4個のデータ
のパリティであり、例えば、水平パリティHPD0は、
データD0〜D3に関するパリティである。垂直パリテ
ィは、垂直方向の8個のデータのパリティであり、例え
ば、垂直パリティVPD0は、データD0,D4,D
8,・・・,D24,D28のパリティである。全体パ
リティCは、全データ、すなわちD0〜D31のパリテ
ィである。なお、パリティCは、HPD0〜HPD7或
いはVPD0〜VPD3のパリティでもある。
The horizontal parity is the parity of four data in the horizontal direction. For example, the horizontal parity HPD0 is
This is a parity for the data D0 to D3. The vertical parity is the parity of eight pieces of data in the vertical direction. For example, the vertical parity VPD0 is the data D0, D4, D
8,..., D24, D28. The entire parity C is all data, that is, the parity of D0 to D31. Note that the parity C is also a parity of HPD0 to HPD7 or VPD0 to VPD3.

【0018】本実施の形態において取り扱うデータは、
D0〜D31、HPD0〜HPD7、VPD0〜VPD
3、Cからなる45ビット幅のデータであり、これをパ
リティ付データと呼ぶ。このうち、D0〜D31は、デ
ータの処理装置(例えば、CPU等)により実際に利用
するデータであり、主データと呼ぶ。また、HPD0〜
HPD7、VPD0〜VPD3、Cは、誤データを検出
するためのデータであり、冗長データ或いはパリティデ
ータと呼ぶ。なお、全体パリティCは、パリティ付デー
タのビット幅を小さくするためには付加しないことが望
ましいが、誤データの検出・訂正の信頼性を確保するた
めには付加することが望ましい。
The data handled in this embodiment is:
D0-D31, HPD0-HPD7, VPD0-VPD
This is 45-bit data consisting of 3, C, and is referred to as data with parity. Among them, D0 to D31 are data actually used by a data processing device (for example, a CPU or the like) and are referred to as main data. In addition, HPD0
HPD7, VPD0 to VPD3, and C are data for detecting erroneous data, and are referred to as redundant data or parity data. It is preferable that the overall parity C is not added in order to reduce the bit width of the data with parity, but it is preferable to add it in order to ensure the reliability of detection and correction of erroneous data.

【0019】本実施の形態においては、1)主データに
単一の誤データが存在する場合には、当該誤データを検
出・訂正し、2)主データに2以上の誤データが存在す
る場合には、当該2以上の誤データを検出し、データ処
理装置に通知する。さらに、3)冗長データに誤りがあ
りか否かを調査し、誤りがある場合には、冗長データに
基づく誤データの検出・訂正を実行しない。
In the present embodiment, 1) when a single erroneous data exists in the main data, the erroneous data is detected and corrected, and 2) when two or more erroneous data exist in the main data. , The two or more erroneous data are detected and notified to the data processing device. Further, 3) it is checked whether or not there is an error in the redundant data. If there is an error, the detection and correction of the erroneous data based on the redundant data are not executed.

【0020】以下に、誤データの存在及び誤データの個
数を検出する方法を説明する。
A method for detecting the presence of erroneous data and the number of erroneous data will be described below.

【0021】先ず、図1において、データD14のみが
誤データであるものと仮定する。この場合、データD1
2,D13,D14(誤データ),D15より生成され
る水平パリティHPC3(不図示)と、冗長データに含
まれる水平パリティHPD3とが一致しないことにな
る。また、データD2,D6,D10,D14(誤デー
タ),・・・,D30より生成される垂直パリティVP
C2(不図示)と、冗長データに含まれる垂直パリティ
VPD2とが一致しないことになる。
First, in FIG. 1, it is assumed that only data D14 is erroneous data. In this case, the data D1
2, the horizontal parity HPC3 (not shown) generated from D13, D14 (erroneous data) and D15 does not match the horizontal parity HPD3 included in the redundant data. The vertical parity VP generated from the data D2, D6, D10, D14 (erroneous data),.
C2 (not shown) does not match the vertical parity VPD2 included in the redundant data.

【0022】上記のように、生成した水平パリティと冗
長データに含まれる水平パリティとが一致しない行を不
一致行、生成した垂直パリティと冗長データに含まれる
垂直パリティとが一致しない列を不一致列という。
As described above, a row in which the generated horizontal parity does not match the horizontal parity included in the redundant data is called a non-matching row, and a column in which the generated vertical parity does not match the vertical parity included in the redundant data is called a non-matching column. .

【0023】誤データが1個存在する場合には、不一致
行と不一致列の個数は、夫々1個となる。
If there is one erroneous data, the number of unmatched rows and unmatched columns is one each.

【0024】一方、誤データが2個存在する場合には、
不一致行の個数または不一致列の個数が2個となる。す
なわち、1)同一行上に2個の誤データが存在する場合
(例えば、D12とD14)には、不一致行の個数が0
個、不一致列の個数が2個となり、2)同一列上に2個
の誤データが存在する場合(例えば、D2とD14)に
は、不一致行の個数が2個、不一致列の個数が0個な
り、3)異なる行かつ異なる列に2個の誤データが存在
する場合(例えば、D0とD14)には、不一致行、不
一致列共に2個となる。
On the other hand, when there are two erroneous data,
The number of unmatched rows or the number of unmatched columns is two. That is, 1) when two erroneous data exist on the same row (for example, D12 and D14), the number of unmatched rows is 0.
2) When there are two erroneous data on the same column (for example, D2 and D14), the number of unmatched rows is 2, and the number of unmatched columns is 0. 3) When two erroneous data exist in different rows and different columns (for example, D0 and D14), the number of unmatched rows and unmatched columns is two.

【0025】さらに、誤データが3個存在する場合に
は、不一致行の個数または不一致列の個数が2以上とな
る(双方が共に1以下になることはない)。
Further, when there are three erroneous data, the number of unmatched rows or the number of unmatched columns is 2 or more (both are not less than 1).

【0026】ところが、誤データが4個存在する場合で
あって、誤データが方形状に存在する場合(例えば、D
5,D7,D13,D15)には、不一致行、不一致列
共に0となり、誤データの存在を検出することはできな
い。しかしながら、このような組合わせは、極めて希で
あるし、また冗長データの信頼性も疑わしいため、本実
施の形態においては、このような組合わせを想定しな
い。
However, when there are four erroneous data and the erroneous data exists in a rectangular shape (for example, D
5, D7, D13, D15), both the unmatched row and the unmatched column become 0, and the presence of erroneous data cannot be detected. However, since such a combination is extremely rare and the reliability of redundant data is doubtful, such a combination is not assumed in the present embodiment.

【0027】以上の検討より、誤データの有無、或いは
誤データの個数が1個であるか2以上であるかは、不一
致行の個数及び不一致列の個数を調べることにより判断
することができる。すなわち、1)不一致行及び不一致
列の個数が共に0個であれば、誤データは存在しない、
2)不一致行及び不一致列の個数が共に1個であれば、
1個の誤データが存在する、3)不一致行または不一致
列の個数が2以上であれば、2個以上の誤データが存在
する。
From the above examination, the presence or absence of erroneous data or whether the number of erroneous data is one or two or more can be determined by checking the number of unmatched rows and the number of unmatched columns. That is, 1) if the number of unmatched rows and unmatched columns are both 0, no erroneous data exists;
2) If the number of unmatched rows and unmatched columns are both one,
3) If the number of unmatched rows or unmatched columns is two or more, two or more pieces of erroneous data exist.

【0028】次に、冗長データの誤りの有無を検出する
方法の一例を説明する。ここでは、冗長データを構成す
る水平パリティHPD0〜HPD7及び垂直パリティV
PD0〜VPD3には、夫々2個以上の誤りは存在しな
いものとする。
Next, an example of a method for detecting the presence or absence of an error in redundant data will be described. Here, the horizontal parity HPD0 to HPD7 and the vertical parity V
It is assumed that two or more errors do not exist in PD0 to VPD3.

【0029】水平パリティHPD0〜HPD7における
誤りは、水平パリティHPD0〜HPD7から生成され
るパリティHPDPと、冗長データに含まれる全体パリ
ティCとを比較することにより検出することができる。
前述のように、水平パリティHPD0〜HPD7に誤り
が存在しない場合、全体パリティCと水平パリティHP
D0〜HPD7とは一致するからである。
An error in the horizontal parities HPD0 to HPD7 can be detected by comparing the parity HPDP generated from the horizontal parities HPD0 to HPD7 with the entire parity C included in the redundant data.
As described above, when there is no error in the horizontal parities HPD0 to HPD7, the entire parity C and the horizontal parity HP
This is because D0 to HPD7 match.

【0030】また、同様に垂直パリティVPD0〜VP
D3における誤りは、垂直パリティPVD0〜PVD3か
ら生成されるパリティVPDPと、冗長データに含まれ
る全体パリティCとを比較することにより検出すること
ができる。
Similarly, the vertical parity VPD0 to VP
The error in D3 can be detected by comparing the parity VPDP generated from the vertical parities PVD0 to PVD3 with the entire parity C included in the redundant data.

【0031】<回路構成>図2は、本発明の実施の形態
に係るECC回路の適用例を示す図である。同図の
(a)に示す構成は、メモリ10とCPU20との間に
ECC回路100を備えた一例である。メモリ10とし
ては、例えば、DRAM、SRAM、EEPROM等が
挙げられる。なお、ECC回路100は、メモリ10内
に組み込んで用いても良い。一方、同図の(b)に示す
構成は、通信コントローラ30とCPU20との間にE
CC回路100を備えた一例である。通信コントローラ
は、シリアル通信用のコントローラであっても良いし、
パラレル通信用のコントローラでであっても良い。
<Circuit Configuration> FIG. 2 is a diagram showing an application example of the ECC circuit according to the embodiment of the present invention. The configuration shown in FIG. 1A is an example in which an ECC circuit 100 is provided between the memory 10 and the CPU 20. Examples of the memory 10 include a DRAM, an SRAM, and an EEPROM. The ECC circuit 100 may be incorporated in the memory 10 and used. On the other hand, the configuration shown in FIG.
This is an example including the CC circuit 100. The communication controller may be a controller for serial communication,
A controller for parallel communication may be used.

【0032】同図の(a)及び(b)の実質的な相違点
は、前者がメモリデバイスへの適用例であり、後者がI
Oデバイスへの適用例であるということだけである。従
って、ここでは(a)に示す構成についてのみ説明す
る。
The substantial difference between (a) and (b) of FIG. 3 is that the former is an example of application to a memory device, and the latter is I
It is only an example of application to an O device. Therefore, only the configuration shown in FIG.

【0033】メモリ10とECC回路100は、双方向
のデータバスDM<0:44>で接続され、ECC回路
100とCPU20とは、双方向のデータバスDC<
0:31>で接続されている。メモリ10及びECC回
路100には、CPU20により制御されるリード信号
/RD、ライト信号/WR、アドレス信号ADR、メモ
リ/IOデバイスの選択信号MIO(実施の態様によ
り、例えば、/MREQ、/IOREQ等を利用する)
が接続されている。また、メモリ10には、アドレス信
号ADR、メモリ/IOデバイスの選択信号MIO等を
デコードして得られるチップイネーブル信号も接続され
ている(不図示)。なお、信号に付した”/”は、ロウ
アクティブであることを示す。
The memory 10 and the ECC circuit 100 are connected by a bidirectional data bus DM <0:44>, and the ECC circuit 100 and the CPU 20 are connected by a bidirectional data bus DC <
0:31>. The memory 10 and the ECC circuit 100 include a read signal / RD, a write signal / WR, an address signal ADR, a memory / IO device selection signal MIO (for example, / MREQ, / IOREQ, etc., depending on the embodiment). Use)
Is connected. The memory 10 is also connected with a chip enable signal obtained by decoding an address signal ADR, a memory / IO device selection signal MIO, and the like (not shown). Note that “/” added to the signal indicates that the signal is low active.

【0034】ECC回路100は、メモリ10よりデー
タを読出した際に訂正不能なエラーを発見した場合に、
その旨をCPU20に対して割り込み信号INTを介し
て通知する。
When the ECC circuit 100 finds an uncorrectable error when reading data from the memory 10,
This is notified to the CPU 20 via the interrupt signal INT.

【0035】図3は、ECC回路200の詳細構成を示
す回路図である。デコーダ201は、CPU20から供
給されるリード信号/RD、ライト信号/WR、アドレ
ス信号ADR、選択信号MIOをデコードして、メモリ
10(または通信コントローラ30;以下において同
じ)に対するリード要求を示すリード信号/READ、
ライト要求を示すライト信号/WRITEを生成する。
FIG. 3 is a circuit diagram showing a detailed configuration of the ECC circuit 200. The decoder 201 decodes the read signal / RD, the write signal / WR, the address signal ADR, and the selection signal MIO supplied from the CPU 20, and reads a read signal indicating a read request to the memory 10 (or the communication controller 30; the same applies hereinafter). / READ,
A write signal / WRITE indicating a write request is generated.

【0036】バッファ202及び203は、双方向バッ
ファを構成し、双方向のデータバスDC<0:31>に
接続され、リード信号/READにより入力/出力のモ
ードが切り換えられる。具体的には、リード信号/RE
ADがアクティブ状態の時、すなわち、メモリ10より
データを読出す時は、ECCコア回路200からの出力
データDO<0:31>に基づいてデータバスDC<
0:31>を駆動し、インアクティブ状態の時は、デー
タバスDC<0:31>上の信号を入力する。
The buffers 202 and 203 constitute a bidirectional buffer, are connected to a bidirectional data bus DC <0:31>, and the input / output mode is switched by a read signal / READ. Specifically, the read signal / RE
When AD is in an active state, that is, when data is read from the memory 10, the data bus DC <based on the output data DO <0:31> from the ECC core circuit 200.
0:31>, and in the inactive state, a signal on the data bus DC <0:31> is input.

【0037】バッファ204及び205は、双方向バッ
ファを構成し、双方向のデータバスDM<0:31>に
接続され、ライト信号/WRITEにより入力/出力の
モードが切り換えられる。具体的には、ライト信号/W
RITEがアクティブ状態の時、すなわち、メモリ10
にデータを書込む時は、データバスDC<0:31>を
介してCPU20より入力された信号に基づいてデータ
バスDM<0:31>を駆動する(CPU20からの書
込みデータをそのままメモリ10に供給する)。一方、
ライト信号/WRITEがインアクティブ状態の時は、
データバスDM<0:31>上の信号を入力する。
The buffers 204 and 205 constitute a bidirectional buffer, are connected to a bidirectional data bus DM <0:31>, and the input / output mode is switched by a write signal / WRITE. Specifically, the write signal / W
When RITE is active, that is, when memory 10
When data is written to the memory 10, the data bus DM <0:31> is driven based on a signal input from the CPU 20 via the data bus DC <0:31> (write data from the CPU 20 is directly written into the memory 10). Supply). on the other hand,
When the write signal / WRITE is in the inactive state,
A signal on the data bus DM <0:31> is input.

【0038】マルチプレクサ208は、リード信号/R
EADがインアクティブ状態の時は、CPU20から供
給される書込みデータ(DCI<0:31>)を選択
し、リード信号/READがアクティブ状態の時、すな
わち、メモリ10よりデータを読出す時は、メモリ10
から供給される読出しデータ(DMI<0:31>)を
選択し、ECCコア回路200に供給する。
The multiplexer 208 outputs the read signal / R
When the EAD is in the inactive state, the write data (DCI <0:31>) supplied from the CPU 20 is selected. When the read signal / READ is in the active state, that is, when data is read from the memory 10, Memory 10
, And the read data (DMI <0:31>) is supplied to the ECC core circuit 200.

【0039】バッファ206及び207は、双方向バッ
ファを構成し、双方向のデータバスDM<32:44
>、すなわち、パリティ用のデータバスに接続され、ラ
イト信号により入力/出力のモードが切り換えられる。
具体的には、ライト信号/WRITEがアクティブ状態
の時、すなわち、メモリ10にデータを書込む時は、E
CCコア回路200により生成した水平パリティデータ
HPC<0:7>、垂直パリティVPC<0:3>及び
全体パリティTPを順にDM<32:44>に割当てて
出力する。一方、ライト信号/WRITEがインアクテ
ィブ状態の時は、データバスDM<31:44>上の信
号を入力する。メモリ10からのデータの読み出しの際
には、データバスDM<32:44>上には、メモリ1
0より、水平パリティ、垂直パリティ及び全体パリティ
が出力され、これらのデータは双方向バッファにより取
り込まれ、順に水平パリティデータHPD<0:7>、
垂直パリティデータVPD<0:3>及び全体パリティ
Cとして、ECCコア回路200に供給される。
The buffers 206 and 207 constitute a bidirectional buffer, and the bidirectional data bus DM <32:44
>, That is, connected to the data bus for parity, and the input / output mode is switched by the write signal.
Specifically, when the write signal / WRITE is in the active state, that is, when writing data to the memory 10, E
The horizontal parity data HPC <0: 7>, the vertical parity VPC <0: 3>, and the overall parity TP generated by the CC core circuit 200 are sequentially assigned to DM <32:44> and output. On the other hand, when the write signal / WRITE is in the inactive state, a signal on the data bus DM <31:44> is input. When data is read from the memory 10, the memory 1 is placed on the data bus DM <32:44>.
0, horizontal parity, vertical parity, and overall parity are output. These data are fetched by the bidirectional buffer, and the horizontal parity data HPD <0: 7>,
The vertical parity data VPD <0: 3> and the entire parity C are supplied to the ECC core circuit 200.

【0040】ECCコア回路200は、メモリ10より
供給されるパリティデータに基づいて、誤データを検出
し、当該誤データを訂正可能な場合(単一の誤データが
存在する場合)には、当該誤データを訂正し、訂正不能
な場合(2つ以上の誤データが存在する場合)には、二
重エラー検出信号DEをアクティブレベルにする。割り
込み信号INTは、二重エラー検出信号DEに基づいて
駆動され、二重エラーの発生をCPU20に通知する。
The ECC core circuit 200 detects erroneous data based on the parity data supplied from the memory 10, and when the erroneous data can be corrected (when a single erroneous data exists), When the erroneous data is corrected and cannot be corrected (when there are two or more erroneous data), the double error detection signal DE is set to the active level. The interrupt signal INT is driven based on the double error detection signal DE, and notifies the CPU 20 of the occurrence of the double error.

【0041】図4は、ECCコア回路200の構成例を
示す回路図である。水平パリティ生成回路301は、入
力データDI<0:31>より水平パリティデータHP
C<0:7>を生成する。例えば、HPC<0>は、D
I<0>,DI<1>,DI<2>,DI<3>のパリ
ティデータである。なお、メモリ10への書込み時は、
ここで生成されたHPC<0:7>がデータバスDM<
32:39>を介してメモリ10に供給される。
FIG. 4 is a circuit diagram showing a configuration example of the ECC core circuit 200. The horizontal parity generation circuit 301 converts the horizontal parity data HP from the input data DI <0:31>.
C <0: 7> is generated. For example, HPC <0>
Parity data of I <0>, DI <1>, DI <2>, DI <3>. At the time of writing to the memory 10,
The HPC <0: 7> generated here is the data bus DM <
32:39> to the memory 10.

【0042】垂直パリティ生成回路302は、DI<
0:31>より垂直パリティデータVPC<0:3>を
生成する。例えば、VPCC<0>は、DI<0>,D
I<4>,DI<8>,・・・,DI<28>のパリテ
ィデータである。なお、メモリ10への書込み時は、こ
こで生成されたVPC<0:3>がデータバスDM<4
0:43>を介してメモリ10に供給される。
The vertical parity generation circuit 302 outputs the signal DI <
0:31> to generate vertical parity data VPC <0: 3>. For example, VPCC <0> is DI <0>, D
Parity data of I <4>, DI <8>,..., DI <28>. At the time of writing to memory 10, VPC <0: 3> generated here is connected to data bus DM <4:
0:43> to the memory 10.

【0043】水平パリティ比較回路303は、メモリ1
0からのデータの読出し時において、水平パリティデー
タHPC<0:7>と冗長データに含まれる水平パリテ
ィデータHPD<0:7>(データバスDM<32:3
9>を介して供給される)とをビット毎に比較し、比較
結果として不一致行信号HUM<0:7>を生成する。
The horizontal parity comparison circuit 303 is a memory 1
At the time of reading data from 0, horizontal parity data HPC <0: 7> and horizontal parity data HPD <0: 7> included in redundant data (data bus DM <32: 3).
9>) is generated on a bit-by-bit basis, and a mismatched row signal HUM <0: 7> is generated as a comparison result.

【0044】垂直パリティ比較回路304は、メモリ1
0からのデータの読出し時において、垂直パリティデー
タVPC<0:3>と冗長データに含まれる垂直パリテ
ィデータVPD<0:3>(データバスDM<40:4
3>を介して供給される)とをビット毎に比較し、比較
結果として不一致列信号VUM<0:3>を生成する。
The vertical parity comparison circuit 304 is provided in the memory 1
When data is read from 0, the vertical parity data VPC <0: 3> and the vertical parity data VPD <0: 3> included in the redundant data (data bus DM <40: 4).
3> supplied on a bit-by-bit basis, and a mismatch column signal VUM <0: 3> is generated as a comparison result.

【0045】エラー判定回路306は、メモリ10から
のデータの読出し時において、不一致行信号HUM<
0:7>、不一致列信号VUM<0:3>、冗長データ
に含まれる水平パリティデータHPD<0:7>、垂直
パリティデータVPD<0:3>及び全体パリティデー
タC(データバスDM<44>を介して供給される)に
基づいて、単一の誤データの存在または2個以上の誤デ
ータの存在を検出し、夫々検出信号SEまたは検出信号
DEを介して出力する。
When data is read from memory 10, error determination circuit 306 outputs mismatched row signal HUM <
0: 7>, unmatched column signals VUM <0: 3>, horizontal parity data HPD <0: 7> included in redundant data, vertical parity data VPD <0: 3>, and overall parity data C (data bus DM <44 ), The presence of single erroneous data or the presence of two or more erroneous data is detected and output via the detection signal SE or the detection signal DE, respectively.

【0046】また、エラー判定回路306は、メモリ1
0へのデータの書込み時において、水平パリティ生成回
路301により生成された垂直パリティデータVPC<
0:3>に基づいて、全体パリティTPを生成し、これ
をデータバスDM<44>を介してメモリ10に供給す
る。
The error determination circuit 306 is provided in the memory 1
When writing data to 0, the vertical parity data VPC generated by the horizontal parity generation circuit 301 <
Based on 0: 3>, the entire parity TP is generated and supplied to the memory 10 via the data bus DM <44>.

【0047】エラー位置特定回路305は、単一の誤デ
ータが存在することを検出信号SEにより通知された場
合に、不一致行信号HUM<0:7>及び不一致列信号
VUM<0:3>に基づいて当該誤データの位置を特定
し、その結果をデータ反転信号INV<0:31>を介
してエラー訂正回路307に供給する。
When the detection signal SE notifies that the single erroneous data exists, the error position specifying circuit 305 outputs the unmatched row signal HUM <0: 7> and the unmatched column signal VUM <0: 3>. The position of the erroneous data is specified based on the data, and the result is supplied to the error correction circuit 307 via the data inversion signal INV <0:31>.

【0048】エラー訂正回路307は、メモリ10から
のデータの読出し時において、データ反転信号INV<
0:31>に基づいて、DI<0:31>、すなわち、
データバスDM<0:31>を介して供給されるデータ
を訂正する。
When data is read from memory 10, error correction circuit 307 provides data inversion signal INV <
0:31>, DI <0:31>, ie,
The data supplied via the data bus DM <0:31> is corrected.

【0049】図5は、水平パリティ生成回路301の構
成例を示す回路図である。この構成例は、2段のEOR
回路により、各行に含まれる4個のデータ(例えば、D
I<0>〜DI<4>)のパリティを夫々算出するもの
である。
FIG. 5 is a circuit diagram showing a configuration example of the horizontal parity generation circuit 301. This configuration example is a two-stage EOR
By the circuit, four data (for example, D
I <0> to DI <4>).

【0050】図6は、垂直パリティ生成回路302の構
成例を示す回路図である。この構成例は、3段のEOR
回路により、各列に含まれる8個のデータ(例えば、D
I<0>,DI<4>,DI<8>,・・・,DI<2
8>)のパリティを夫々算出するものである。
FIG. 6 is a circuit diagram showing a configuration example of the vertical parity generation circuit 302. This configuration example is a three-stage EOR
According to the circuit, eight data (for example, D
I <0>, DI <4>, DI <8>,..., DI <2
8>) are calculated.

【0051】図7は、水平パリティ比較回路303の構
成例を示す回路図である。この回路は、水平パリティ生
成回路301により生成された水平パリティデータHP
C<0:7>と冗長データに含まれる水平パリティデー
タHPD<0:7>とを、EOR回路によりビット毎に
比較し、両データが不一致であれば、”1”、一致して
いれば”0”を出力する。
FIG. 7 is a circuit diagram showing a configuration example of the horizontal parity comparison circuit 303. This circuit stores the horizontal parity data HP generated by the horizontal parity generation circuit 301.
C <0: 7> and the horizontal parity data HPD <0: 7> included in the redundant data are compared for each bit by an EOR circuit. If the two data do not match, "1";"0" is output.

【0052】図8は、垂直パリティ比較回路304の構
成例を示す回路図である。この回路は、垂直パリティ生
成回路302により生成された垂直パリティデータVP
C<0:3>と冗長データに含まれる垂直パリティデー
タVPD<0:3>とを、EOR回路によりビット毎に
比較し、両データが不一致であれば、”1”、一致して
いれば”0”を出力する。
FIG. 8 is a circuit diagram showing a configuration example of the vertical parity comparison circuit 304. This circuit stores the vertical parity data VP generated by the vertical parity generation circuit 302.
C <0: 3> and the vertical parity data VPD <0: 3> included in the redundant data are compared bit by bit by an EOR circuit. If the two data do not match, "1";"0" is output.

【0053】図9は、エラー判定回路306の構成例を
示す回路図である。全体パリティ生成回路901は、メ
モリ10に対するデータの書込み時において、VPC<
0:3>に基づいて全体パリティTPを生成する。この
全体パリティTPは、データバスDM<44>を介して
メモリ10に供給される。なお、冗長データ数を削減す
る場合、すなわち、全体パリティを付加しない場合に
は、この全体パリティ生成回路901は、不要である。
FIG. 9 is a circuit diagram showing a configuration example of the error determination circuit 306. When writing data to the memory 10, the whole parity generation circuit 901 generates VPC <
0: 3>, the entire parity TP is generated. The entire parity TP is supplied to the memory 10 via the data bus DM <44>. When the number of redundant data is reduced, that is, when the entire parity is not added, the entire parity generation circuit 901 is unnecessary.

【0054】パリティエラー検出回路901は、メモリ
10からのデータの読出し時において、冗長データに含
まれる水平パリティデータHPD<0:7>、垂直パリ
ティデータVPD<0:3>及び全体パリティCに基づ
いて、水平パリティデータHPD<0:7>及び垂直パ
リティデータVPD<0:3>におけるエラーの存在を
検出し、エラー検出信号PEを介して単一エラー検出回
路903に通知する。
When data is read from the memory 10, the parity error detection circuit 901 is based on the horizontal parity data HPD <0: 7>, the vertical parity data VPD <0: 3>, and the overall parity C included in the redundant data. Then, the presence of an error in the horizontal parity data HPD <0: 7> and the vertical parity data VPD <0: 3> is detected, and the single error detection circuit 903 is notified via the error detection signal PE.

【0055】単一エラー検出回路903は、メモリ10
からのデータの読出し時において、水平パリティデータ
HPD<0:7>及び垂直パリティデータVPD<0:
3>にエラーが存在しない場合に、すなわち、エラー検
出信号PEがロウレベルである場合に、不一致行信号H
UM<0:7>及び不一致列信号VUM<0:3>に基
づいて、単一の誤データの存在を検出し、その結果を単
一エラー検出信号SE上に出力する。
The single error detection circuit 903 is provided in the memory 10
When data is read from the horizontal parity data HPD <0: 7> and the vertical parity data VPD <0:
3>, that is, when the error detection signal PE is at a low level, the unmatched row signal H
Based on UM <0: 7> and mismatched column signal VUM <0: 3>, the presence of a single erroneous data is detected, and the result is output on single error detection signal SE.

【0056】二重エラー検出回路904は、メモリ10
からのデータの読出し時において、不一致行検出信号H
UM<0:7>及び不一致列検出信号VUM<0:3>
に基づいて、2以上の誤データの存在を検出し、その結
果を二重エラー検出信号DE上に出力する。
The double error detection circuit 904 is provided in the memory 10
When data is read from the
UM <0: 7> and mismatched column detection signal VUM <0: 3>
, The presence of two or more erroneous data is detected, and the result is output on a double error detection signal DE.

【0057】図10は、全体パリティ生成回路901の
構成例を示す回路図である。この回路は、2段のEOR
回路により構成され、メモリ10からのデータの読み出
し時において、垂直パリティデータVPC<0>〜VP
C<3>のパリティを算出することにより、データDI
<0>〜DI<31>の全体パリティを算出し、全体パ
リティ信号TP上に出力する。
FIG. 10 is a circuit diagram showing a configuration example of the entire parity generation circuit 901. This circuit is a two-stage EOR
When data is read from the memory 10, the vertical parity data VPC <0> to VP
By calculating the parity of C <3>, the data DI
The overall parity of <0> to DI <31> is calculated and output on the overall parity signal TP.

【0058】図11は、パリティエラー検出回路902
の構成例を示す回路図である。メモリ10からのデータ
の読み出し時において、冗長データに含まれる水平パリ
ティデータHPD<0>〜HPD<7>のパリティHP
DPを算出し、これと冗長データに含まれる全体パリテ
ィCとを比較すると共に、冗長データに含まれる垂直パ
リティデータVPD<0>〜VPD<3>のパリティV
PDPを算出し、これと全体パリティCとを比較する。
水平パリティエラー検出信号HPEDETは、前者の比
較結果を示し、垂直パリティエラー検出信号VPEDE
Tは、後者の比較結果を示す。
FIG. 11 shows a parity error detection circuit 902.
FIG. 3 is a circuit diagram showing a configuration example of the present invention. At the time of reading data from the memory 10, the parity HP of the horizontal parity data HPD <0> to HPD <7> included in the redundant data
DP is calculated, this is compared with the overall parity C included in the redundant data, and the parity V of the vertical parity data VPD <0> to VPD <3> included in the redundant data is calculated.
The PDP is calculated, and this is compared with the overall parity C.
The horizontal parity error detection signal HPEDET indicates the result of the former comparison, and the vertical parity error detection signal VPEDET.
T indicates the latter comparison result.

【0059】パリティエラー検出信号PEは、水平パリ
ティエラー検出信号HPEDETと垂直パリティエラー
検出信号VPEDETとの論理和で与えられる。すなわ
ち、パリティエラー検出信号PEは、水平パリティデー
タHPD<0:7>または垂直パリティデータVPD<
0:3>のいずれかにエラーが存在する場合に、ハイレ
ベルになる。
The parity error detection signal PE is given by the logical sum of the horizontal parity error detection signal HPEDET and the vertical parity error detection signal VPEDET. That is, the parity error detection signal PE includes the horizontal parity data HPD <0: 7> or the vertical parity data VPD <
0: 3> when there is an error.

【0060】図12は、単一エラー検出回路903の構
成例を示す回路図である。単一エラー検出回路903
は、パリティエラーが存在しない場合、すなわち、パリ
ティエラー検出信号PEがローレベルの場合に、不一致
行及び不一致列が夫々1個ずつ存在することを検出す
る。より具体的には、不一致行信号HUM<0>〜HU
M<7>のいずれか1つのみがロウレベルであり、か
つ、不一致列信号VUM<0>〜VUM<3>のいずれ
か1つのみがロウレベルであること調べることにより、
単一の誤データの存在を検出し、その結果を単一エラー
検出信号SE上に出力する。
FIG. 12 is a circuit diagram showing a configuration example of the single error detection circuit 903. Single error detection circuit 903
Detects that there is one unmatched row and one unmatched column when a parity error does not exist, that is, when the parity error detection signal PE is at a low level. More specifically, unmatched row signals HUM <0> to HU
By checking that only one of M <7> is at a low level and only one of mismatched column signals VUM <0> to VUM <3> is at a low level,
The presence of a single erroneous data is detected, and the result is output on a single error detection signal SE.

【0061】図13は、単一エラー検出回路の他の構成
例を示す回路図である。この回路を適用する場合は、メ
モリ10からのデータの読み出し時においても、全体パ
リティ生成回路901により全体パリティTPを生成す
る。
FIG. 13 is a circuit diagram showing another example of the configuration of the single error detection circuit. When this circuit is applied, the whole parity generation circuit 901 generates the whole parity TP even when data is read from the memory 10.

【0062】この構成例においては、全体パリティTP
と、パリティエラー検出回路902において生成される
パリティHPDP、VPDP、冗長データに含まれる全
体パリティCを夫々比較し、比較結果を示す水平パリテ
ィエラー信号HPE、垂直パリティエラー信号VPE及
び全体パリティエラー信号TPEを夫々生成する。そし
て、水平パリティエラー信号HPE、垂直パリティエラ
ー信号VPE及び全体パリティエラー信号TPEの3つ
の信号の全てが不一致であることを示している場合(T
P≠HPDPかつTP≠VPDPかつTP≠C)に、単
一のエラーが存在すると判断する。この場合も、不一致
行及び不一致列が共に1つ存在し、かつ水平・垂直パリ
ティデータにエラーが存在しないことを認識することが
できる。
In this configuration example, the entire parity TP
And the parity HPDP and VPDP generated by the parity error detection circuit 902 and the entire parity C included in the redundant data, respectively, and a horizontal parity error signal HPE, a vertical parity error signal VPE, and a total parity error signal TPE indicating the comparison result are displayed. Are generated respectively. Then, when all three signals of the horizontal parity error signal HPE, the vertical parity error signal VPE, and the total parity error signal TPE indicate that they do not match (T
It is determined that a single error exists in P ≠ HPDP and TP ≠ VPDP and TP ≠ C). Also in this case, it can be recognized that there is one unmatched row and one mismatched column, and that there is no error in the horizontal / vertical parity data.

【0063】図14は、二重エラー検出回路904の構
成例を示す回路図である。前述のように、2以上の誤デ
ータが存在する場合は、不一致行または不一致列の個数
が2以上となる。そこで、不一致行信号HUM<0>〜
HUM<7>の8ビットから2ビットを選択して得られ
る全組合せ(28組)の中で、共にハイレベル(不一致
行であることを示す)となる組合わせが1つでも存在す
るか、或いは、不一致列信号VUM<0>〜VUM<3
>の4ビットから2ビットを選択して得られる全組合わ
せ(6組)の中で、共にハイレベルとなる組合わせが1
つでも存在する場合に、2以上の誤データが存在すると
判断することができる。二重エラー検出回路904は、
2以上の誤データの存在が検出すると、その結果を二重
エラー検出信号DE上に出力する。
FIG. 14 is a circuit diagram showing a configuration example of the double error detection circuit 904. As described above, when there are two or more erroneous data, the number of unmatched rows or unmatched columns is two or more. Therefore, the unmatched row signals HUM <0> to
Among all combinations (28 sets) obtained by selecting 2 bits from 8 bits of HUM <7>, is there any one combination that is at a high level (indicating a mismatched row)? Alternatively, unmatched column signals VUM <0> to VUM <3
Of all combinations (6 sets) obtained by selecting 2 bits from 4 bits of>, 1 combination is at a high level.
If there is at least one, it can be determined that two or more erroneous data exist. The double error detection circuit 904 is
When the presence of two or more erroneous data is detected, the result is output on the double error detection signal DE.

【0064】図15は、単一の誤データが存在する場
合、すなわち単一エラー検出信号SEがハイレベル状態
の場合のエラー位置特定回路305の動作例を示す真理
値表である。単一の誤データの存在が検出された場合に
は、誤データの訂正が可能である。そこで、エラー位置
特定回路305は、パリティ付データを図1の如く配置
した場合において、不一致行信号HUM<0:7>が示
す不一致行及び不一致列信号VUM<0:3>が示す不
一致列の交点を特定することにより、誤データの位置を
特定する。誤データの位置(ビット)は、反転信号IN
V<0:31>により示される。すなわち、反転信号I
NV<0:31>のうち、ハイレベルに駆動されるビッ
トが誤データの位置を示す。なお、単一エラー検出信号
SEがロウレベルの場合は、反転信号INV<0:31
>の全ビットがロウレベルに駆動される。
FIG. 15 is a truth table showing an operation example of the error position specifying circuit 305 when a single erroneous data exists, that is, when the single error detection signal SE is in a high level state. When the presence of a single erroneous data is detected, the erroneous data can be corrected. Therefore, when the data with parity is arranged as shown in FIG. 1, the error position specifying circuit 305 detects the mismatched row and the mismatched column signal VUM <0: 3> indicated by the mismatched row signal HUM <0: 7>. By specifying the intersection, the position of the erroneous data is specified. The position (bit) of the erroneous data is determined by the inverted signal IN
V <0:31>. That is, the inverted signal I
In NV <0:31>, a bit driven to a high level indicates a position of erroneous data. When the single error detection signal SE is at a low level, the inverted signal INV <0:31
> Are driven to low level.

【0065】図16は、エラー訂正回路307の構成例
を示す回路図である。この構成例は、メモリ10からの
データの読出し時において、反転信号INV<0:31
>とDI<0:31>とのビット毎の排他的論理和演算
により誤データを訂正する。すなわち、INV<0:3
1>のうちハイレベルに駆動されたビット(誤データの
ビット)は、DI<0:31>のうち対応するビットの
値を反転させ、これにより、誤データを訂正することが
できる。
FIG. 16 is a circuit diagram showing a configuration example of the error correction circuit 307. In this configuration example, when data is read from the memory 10, the inverted signal INV <0:31
> And DI <0:31> to correct erroneous data by exclusive OR operation for each bit. That is, INV <0: 3
A bit (bit of erroneous data) driven to a high level in 1> inverts the value of a corresponding bit in DI <0:31>, whereby erroneous data can be corrected.

【0066】以上のように、本実施の形態に拠れば、2
以上の誤データの存在を検出して、データ処理装置(例
えば、CPU)に通知することができる。また、水平・
垂直パリティのエラーの有無を全体パリティにより確認
するため、エラー検出・訂正の精度が向上する。従っ
て、システム全体の信頼性を向上させることができる。
As described above, according to the present embodiment, 2
The presence of the above erroneous data can be detected and notified to a data processing device (eg, CPU). In addition, horizontal
Since the presence / absence of a vertical parity error is confirmed by the entire parity, the accuracy of error detection / correction is improved. Therefore, the reliability of the entire system can be improved.

【0067】次に、ECC回路100の動作をテストす
る方法を説明する。図17は、ECC回路100のテス
トシステムの構成例を示すブロック図である。このテス
トシステムは、メモリ10をテスト回路40に置換え、
テスト回路40に対して、CPU20から直接データを
書込めるようにしたものである。
Next, a method of testing the operation of ECC circuit 100 will be described. FIG. 17 is a block diagram illustrating a configuration example of a test system of the ECC circuit 100. This test system replaces the memory 10 with a test circuit 40,
Data can be directly written from the CPU 20 to the test circuit 40.

【0068】テスト回路40は、主データを格納するた
めの主データレジスタ41、冗長データを格納するため
の冗長データレジスタ42及びIO空間のアドレスをデ
コードするためのデコーダ43を備えている。
The test circuit 40 includes a main data register 41 for storing main data, a redundant data register 42 for storing redundant data, and a decoder 43 for decoding an address in the IO space.

【0069】図18は、テスト時のCPU20の動作例
を示すフローチャートである。
FIG. 18 is a flowchart showing an example of the operation of the CPU 20 during a test.

【0070】ECC回路100のテストに際して、CP
U20は、先ず、テスト用主データ及びテスト用冗長デ
ータを生成する(S101、S102)。次いで、CP
U20は、主データレジスタ41のIOアドレスを指定
して、テスト用主データを書き込む(S103)。次い
で、CPU20は、冗長データレジスタ42のIOアド
レスを指定して、テスト用データに対応するテスト用冗
長データを書込む(S104)。
When testing the ECC circuit 100, the CP
U20 first generates test main data and test redundant data (S101, S102). Then, CP
U20 writes the test main data by designating the IO address of the main data register 41 (S103). Next, the CPU 20 specifies the IO address of the redundant data register 42 and writes the test redundant data corresponding to the test data (S104).

【0071】次いで、CPU20は、ECC回路100
を介してテスト回路40よりデータを読出す(S10
5)。テスト回路40は、CPU20より読出し要求を
受けると、主データをデータバスDM<0:31>に割
当て、冗長データをデータバスDM<32:44>に割
当てて、データを出力する。
Next, the CPU 20 executes the ECC circuit 100
Data is read from the test circuit 40 via the
5). When receiving a read request from CPU 20, test circuit 40 assigns main data to data bus DM <0:31>, assigns redundant data to data bus DM <32:44>, and outputs the data.

【0072】次いで、CPU20は、S105において
ECC100を介して供給されたデータの内容と、ステ
ップS103及びS104においてテスト回路に書込ん
だデータの内容とを比較して、ECC回路100の動作
を確認する。ステップS101〜S106のテストは、
主データ及び冗長データの全組合わせに関して行うこと
が好ましい。テスト回路40に書込むデータを更新して
テストを続行する場合には、S101に戻る(S10
7)。
Next, the CPU 20 checks the operation of the ECC circuit 100 by comparing the content of the data supplied via the ECC 100 in S105 with the content of the data written in the test circuit in steps S103 and S104. . The test of steps S101 to S106
Preferably, it is performed for all combinations of main data and redundant data. When updating the data written in the test circuit 40 and continuing the test, the process returns to S101 (S10).
7).

【0073】以上のように、上記のテストシステムに拠
れば、ECC回路100の動作を簡易に評価することが
できる。
As described above, according to the test system described above, the operation of the ECC circuit 100 can be easily evaluated.

【0074】なお、本発明は、上記の特定の実施の形態
に限定されず、種々の変形が可能である。
The present invention is not limited to the above-described specific embodiment, and various modifications are possible.

【0075】[0075]

【発明の効果】本発明に拠れば、誤データ検出訂正装置
の信頼性を向上させることができる。
According to the present invention, the reliability of the erroneous data detection / correction device can be improved.

【0076】[0076]

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の実施の形態における水平・垂直パリテ
ィ方式を説明するための図である。
FIG. 1 is a diagram for describing a horizontal / vertical parity system according to an embodiment of the present invention.

【図2】本発明の実施の形態に係るECC回路の適用例
を示す図である。
FIG. 2 is a diagram illustrating an application example of an ECC circuit according to an embodiment of the present invention.

【図3】ECC回路の詳細構成を示す回路図である。FIG. 3 is a circuit diagram showing a detailed configuration of an ECC circuit.

【図4】ECCコア回路の構成例を示す回路図である。FIG. 4 is a circuit diagram illustrating a configuration example of an ECC core circuit.

【図5】水平パリティ生成回路の構成例を示す回路図で
ある。
FIG. 5 is a circuit diagram illustrating a configuration example of a horizontal parity generation circuit.

【図6】垂直パリティ生成回路の構成例を示す回路図で
ある。
FIG. 6 is a circuit diagram illustrating a configuration example of a vertical parity generation circuit.

【図7】水平パリティ比較回路の構成例を示す回路図で
ある。
FIG. 7 is a circuit diagram illustrating a configuration example of a horizontal parity comparison circuit.

【図8】垂直パリティ比較回路の構成例を示す回路図で
ある。
FIG. 8 is a circuit diagram illustrating a configuration example of a vertical parity comparison circuit.

【図9】エラー判定回路の構成例を示す回路図である。FIG. 9 is a circuit diagram illustrating a configuration example of an error determination circuit.

【図10】全体パリティ生成回路の構成例を示す回路図
である。
FIG. 10 is a circuit diagram illustrating a configuration example of an entire parity generation circuit.

【図11】パリティエラー検出回路の構成例を示す回路
図である。
FIG. 11 is a circuit diagram illustrating a configuration example of a parity error detection circuit.

【図12】単一エラー検出回路の構成例を示す回路図で
ある。
FIG. 12 is a circuit diagram illustrating a configuration example of a single error detection circuit.

【図13】単一エラー検出回路の他の構成例を示す回路
図である。
FIG. 13 is a circuit diagram showing another configuration example of the single error detection circuit.

【図14】二重エラー検出回路の構成例を示す回路図で
ある。
FIG. 14 is a circuit diagram illustrating a configuration example of a double error detection circuit.

【図15】単一エラー検出信号SEがロウレベルの時の
エラー位置特定回路の動作例を示す真理値表である。
FIG. 15 is a truth table showing an operation example of the error position specifying circuit when the single error detection signal SE is at a low level.

【図16】エラー訂正回路の構成例を示す回路図であ
る。
FIG. 16 is a circuit diagram illustrating a configuration example of an error correction circuit.

【図17】ECC回路のテストシステムの一例を示すブ
ロック図である。
FIG. 17 is a block diagram illustrating an example of a test system for an ECC circuit.

【図18】テスト時のCPUの動作例を示すフローチャ
ートである。
FIG. 18 is a flowchart illustrating an operation example of a CPU at the time of a test.

【符号の説明】[Explanation of symbols]

DM<0:31> 主データ用の双方向データバス DM<32:44> 冗長データ用の双方向データバス DC<0:31> 双方向データバス /RD リード信号 /WR ライト信号 ADR アドレス信号 MIO メモリ/IOデバイスの選択信号 /READ リード信号 /WRITE ライト信号 DO<0:31> 出力データ DI<0:31> 入力データ DCI<0:31> 書込みデータ DMI<0:31> 読出しデータ HPC<0:7> 水平パリティデータ(読出し時に生
成) VPC<0:3> 垂直パリティデータ(読出し時に生
成) TP 全体パリティ(読出し時、書込み時に生成) HPD<0:7> 水平パリティデータ(書込み時に生
成) VPD<0:3> 垂直パリティデータ(書込み時に生
成) C 全体パリティ 全体パリティ(メモリに格納された
全体パリティ) SE 単一エラー検出信号 DE 二重エラー検出信号 INT 割り込み信号 HUM<0:7> 不一致行信号 VUM<0:3> 不一致列信号 INV<0:31> 反転信号 HPDP HPD<0:7>のパリティ VPDP VDP<0:3>のパリティ HPEDET 水平パリティエラー検出信号 VPEDET 垂直パリティエラー検出信号 HPE 水平パリティエラー信号 VPE 垂直パリティエラー信号 TPE 全体パリティエラー信号 10 メモリ 20 CPU 30 通信コントローラ 40 テスト回路 41 主データレジスタ 42 冗長データレジスタ 43 デコーダ 100 ECC回路 200 ECCコア回路 201 デコーダ 202〜207 バッファ 208 マルチプレクサ 209〜213 バッファ 301 水平パリティ生成回路 302 垂直パリティ生成回路 303 水平パリティ比較回路 304 垂直パリティ比較回路 305 エラー位置特定回路 306 エラー判定回路 307 エラー訂正回路
DM <0:31> Bidirectional data bus for main data DM <32:44> Bidirectional data bus for redundant data DC <0:31> Bidirectional data bus / RD Read signal / WR Write signal ADR Address signal MIO Memory / IO device selection signal / READ read signal / WRITE write signal DO <0:31> output data DI <0:31> input data DCI <0:31> write data DMI <0:31> read data HPC <0 : 7> Horizontal parity data (generated at the time of reading) VPC <0: 3> Vertical parity data (generated at the time of reading) TP Overall parity (generated at the time of reading and writing) HPD <0: 7> Horizontal parity data (generated at the time of writing) VPD <0: 3> Vertical parity data (generated during writing) C Overall parity Overall parity (Whole parity stored in the memory) SE Single error detection signal DE Double error detection signal INT Interrupt signal HUM <0: 7> Unmatched row signal VUM <0: 3> Unmatched column signal INV <0:31> Inverted signal Parity of HPDP HPD <0: 7> VPDP Parity of VDP <0: 3> HPEDET Horizontal parity error detection signal VPEDT Vertical parity error detection signal HPE Horizontal parity error signal VPE Vertical parity error signal TPE Total parity error signal 10 Memory 20 CPU 30 Communication controller 40 Test circuit 41 Main data register 42 Redundant data register 43 Decoder 100 ECC circuit 200 ECC core circuit 201 Decoder 202 to 207 Buffer 208 Multiplexer 209 to 213 Buffer 3 1 horizontal parity generator 302 vertical parity generation circuit 303 horizontal parity comparison circuit 304 vertical parity comparison circuit 305 error localization circuit 306 error determination circuit 307 the error correction circuit

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 所定ビット数で構成される主データに対
して第1の水平及び垂直パリティを付加したパリティ付
データにおける前記主データの誤りを検出・訂正する誤
データ検出訂正装置であって、 前記主データより第2の水平及び垂直パリティを生成す
る水平・垂直パリティ生成手段と、 前記第1の水平及び垂直パリティと前記第2の水平及び
垂直パリティとに基づいて、前記主データにおける1ま
たは2以上の誤データの存在を検出する誤データ検出手
段と、 前記検出手段により1つの誤データの存在が検出された
場合に、前記第1の水平及び垂直パリティと前記第2の
水平及び垂直パリティとに基づいて当該誤データを特定
し訂正する訂正手段と、 前記誤データ検出手段により2つ以上の誤データの存在
が検出された場合に、その旨を示す情報を出力する出力
手段と、 を備えることを特徴とする誤り検出訂正装置。
1. An erroneous data detection and correction device for detecting and correcting an error in main data in parity-added data obtained by adding a first horizontal and vertical parity to main data composed of a predetermined number of bits, Horizontal / vertical parity generation means for generating a second horizontal and vertical parity from the main data; and 1 or 2 in the main data based on the first horizontal and vertical parity and the second horizontal and vertical parity. Erroneous data detection means for detecting the presence of two or more erroneous data; and, when the detection means detects the presence of one erroneous data, the first horizontal and vertical parity and the second horizontal and vertical parity Correction means for identifying and correcting the erroneous data based on the above, and when the presence of two or more erroneous data is detected by the erroneous data detection means, Error detection and correction apparatus comprising: an output unit for outputting information indicating a.
【請求項2】 前記誤データ検出手段は、 前記第1の水平パリティと前記第2の水平パリティとを
比較し、両者の値が不一致となる組が2つ以上存在する
か否かを判定する第1の判定手段と、 前記第1の垂直パリティと前記第2の垂直パリティとを
比較し、両者の値が不一致となる組が2つ以上存在する
か否かを判定する第2の判定手段と、 を有し、前記第1及び第2の判定手段の少なくとも一方
により、前記不一致となる組が2つ以上存在すると判定
された場合に、2以上の誤データが存在するものと判断
することを特徴とする請求項1に記載の誤り検出訂正装
置。
2. The erroneous data detection means compares the first horizontal parity with the second horizontal parity and determines whether or not there are two or more sets in which the values of the two do not match. A first determination unit, a second determination unit that compares the first vertical parity with the second vertical parity and determines whether there are two or more sets in which the values of the two do not match each other. And when at least one of the first and second determination means determines that there are two or more mismatched sets, it is determined that two or more erroneous data exists. The error detection and correction device according to claim 1, wherein:
【請求項3】 前記パリティ付データは、前記主データ
の全体に関する全体パリティを含み、 前記全体パリティに基づいて前記第1の水平及び垂直パ
リティにおける誤りの存在を検出するパリティ誤り検出
手段をさらに備えることを特徴とする請求項1に記載の
誤り検出訂正装置。
3. The parity-added data includes an entire parity of the entire main data, and further includes a parity error detecting unit that detects presence of an error in the first horizontal and vertical parity based on the entire parity. The error detection and correction device according to claim 1, wherein:
【請求項4】 前記訂正手段は、前記パリティ誤り検出
手段により前記第1の水平及び垂直パリティに誤りが検
出されず、かつ前記誤データ検出手段により前記主デー
タにおける1つの誤データの存在が検出された場合に、
当該誤データを訂正することを特徴とする請求項3に記
載の誤り検出訂正装置。
4. The correcting means detects no error in the first horizontal and vertical parities by the parity error detecting means, and detects the presence of one erroneous data in the main data by the erroneous data detecting means. If done,
4. The error detection and correction device according to claim 3, wherein the error data is corrected.
【請求項5】 所定ビット数で構成される主データに対
して、第1の水平及び垂直パリティと、前記主データ全
体に関する全体パリティとを付加したパリティ付データ
における前記主データの誤りを検出・訂正する誤り検出
訂正装置であって、 前記主データより第2の水平及び垂直パリティを生成す
る水平・垂直パリティ生成手段と、 前記第1の水平及び垂直パリティと前記第2の水平及び
垂直パリティとに基づいて、前記主データにおける誤デ
ータの存在を検知する誤データ検出手段と、 前記全体パリティに基づいて前記第1の水平及び垂直パ
リティにおける誤りの存在を検出するパリティ誤り検出
手段と、 前記パリティ誤り検出手段により前記第1の水平及び垂
直パリティに誤りが検出されず、かつ前記誤データ検出
手段により前記主データにおける誤データの存在が検出
された場合に、当該誤データを訂正する訂正手段と、 を備えることを特徴とする誤り検出訂正装置。
5. Detecting an error of main data in parity-added data obtained by adding a first horizontal and vertical parity and an overall parity of the entire main data to main data composed of a predetermined number of bits. An error detection and correction device for correcting, wherein horizontal and vertical parity generating means for generating a second horizontal and vertical parity from the main data; a first horizontal and vertical parity; a second horizontal and vertical parity; Error data detection means for detecting the presence of erroneous data in the main data based on the parity, parity error detection means for detecting the presence of an error in the first horizontal and vertical parity based on the overall parity, and the parity No error is detected in the first horizontal and vertical parities by the error detection means, and the main data is detected by the erroneous data detection means. If the existence of erroneous data in the chromatography data is detected, the error detection and correction device, characterized in that it comprises a correcting means for correcting the erroneous data.
【請求項6】 主データに対して誤データの検査情報を
付加した検査情報付データにおける前記主データの誤り
を検出・訂正する誤り検出訂正装置であって、前記検査
情報付データは、前記検査情報のパリティを含み、 前記検査情報のパリティに基づいて前記検査情報におけ
る誤りの存在を検出する検査情報誤り検出手段と、 前記検査情報誤り検出手段により前記検査情報における
誤りの存在が検出されない場合に、前記検査情報に基づ
いて前記主データにおける誤データを検出し、訂正する
訂正手段と、 を備えることを特徴とする誤り検出訂正装置。
6. An error detection and correction device for detecting and correcting an error in the main data in data with check information obtained by adding check information of erroneous data to the main data, wherein the data with check information is the test data. Check information error detecting means for detecting the presence of an error in the check information based on the parity of the check information, wherein the check information error detecting means does not detect the presence of an error in the check information. An error detecting and correcting device that detects and corrects erroneous data in the main data based on the inspection information.
JP8299032A 1996-11-11 1996-11-11 Error detecting and correcting device Pending JPH10143383A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8299032A JPH10143383A (en) 1996-11-11 1996-11-11 Error detecting and correcting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8299032A JPH10143383A (en) 1996-11-11 1996-11-11 Error detecting and correcting device

Publications (1)

Publication Number Publication Date
JPH10143383A true JPH10143383A (en) 1998-05-29

Family

ID=17867337

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8299032A Pending JPH10143383A (en) 1996-11-11 1996-11-11 Error detecting and correcting device

Country Status (1)

Country Link
JP (1) JPH10143383A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005234883A (en) * 2004-02-19 2005-09-02 Nec Corp Method for writing/reading out in/from storage device, and data storage system
GB2426085A (en) * 2005-05-10 2006-11-15 Hewlett Packard Development Co Horizontal and vertical error correction coding
US20200348272A1 (en) * 2018-02-02 2020-11-05 Shimadzu Corporation Chromatography system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005234883A (en) * 2004-02-19 2005-09-02 Nec Corp Method for writing/reading out in/from storage device, and data storage system
JP4595342B2 (en) * 2004-02-19 2010-12-08 日本電気株式会社 Data writing / reading method for storage device and data storage system
GB2426085A (en) * 2005-05-10 2006-11-15 Hewlett Packard Development Co Horizontal and vertical error correction coding
GB2426085B (en) * 2005-05-10 2009-12-23 Hewlett Packard Development Co Horizontal and vertical error correction coding (ECC) system and method
US20200348272A1 (en) * 2018-02-02 2020-11-05 Shimadzu Corporation Chromatography system
US11977058B2 (en) * 2018-02-02 2024-05-07 Shimadzu Corporation Chromatography system

Similar Documents

Publication Publication Date Title
US5905858A (en) System for method memory error handling
US6009548A (en) Error correcting code retrofit method and apparatus for multiple memory configurations
JP4071940B2 (en) Shared error correction for memory design
US8245109B2 (en) Error checking and correction (ECC) system and method
EP1206739B1 (en) Methods and apparatus for correcting soft errors in digital data
JPH07191915A (en) Computer system, memory card and its operating method
US7246257B2 (en) Computer system and memory control method thereof
JPS62251949A (en) Error correcting method for memory device
US5369650A (en) Error detection and correction apparatus in a BY-4 RAM Device
JP2606862B2 (en) Single error detection and correction method
JP2004246754A (en) Semiconductor memory and its controller
JPH10143383A (en) Error detecting and correcting device
JP2001290710A (en) Device for detecting data error
US5357529A (en) Error detecting and correcting apparatus and method with transparent test mode
JPH07200419A (en) Bus interface device
JPH08263391A (en) Information processor
JP2513615B2 (en) Storage device with ECC circuit
JP2000099410A (en) Memory control circuit and information processor
JP3071846B2 (en) Parity error detection method and parity error detection circuit
JPH04341998A (en) Memory circuit
JPH06103469B2 (en) Memory control circuit
JPS59110098A (en) Error correcting device of data storage device
JPH0553924A (en) System for testing storage device
JPH02143352A (en) Memory error detection and correction system
JPH05224968A (en) Data check system