JPH0786840B2 - Modulo W circuit - Google Patents

Modulo W circuit

Info

Publication number
JPH0786840B2
JPH0786840B2 JP62158808A JP15880887A JPH0786840B2 JP H0786840 B2 JPH0786840 B2 JP H0786840B2 JP 62158808 A JP62158808 A JP 62158808A JP 15880887 A JP15880887 A JP 15880887A JP H0786840 B2 JPH0786840 B2 JP H0786840B2
Authority
JP
Japan
Prior art keywords
modulo
circuit
value
input
output
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.)
Expired - Lifetime
Application number
JP62158808A
Other languages
Japanese (ja)
Other versions
JPS63145547A (en
Inventor
輝 石塚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Publication of JPS63145547A publication Critical patent/JPS63145547A/en
Publication of JPH0786840B2 publication Critical patent/JPH0786840B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Detection And Correction Of Errors (AREA)

Description

【発明の詳細な説明】Detailed Description of the Invention

〔産業上の利用分野〕 本発明はデータ処理装置に関し,特に演算回路等のチェ
ックに用いられるモジュロW回路に関する。 〔従来の技術〕 モジュロW回路は,演算回路等のチェック回路として従
来より頻繁に使用されているチェック回路の1つであ
る。 又,モジュラスのWとしてはW=2W−1(例えば,3,7,1
5,…)がしばしば用いられる。なぜなら,モジュロWの
値をwビットで表現できるため,他のモジュラスに比べ
低コストで実現できるからである。 以下,W=2W−1の代表として,W=22−1=3を考える。
モジュロ3の3通りの値0,1,2に対し,2ビットデータで
表現する事ができる4通りの値〔0,0〕,〔0,1〕,〔1,
0〕〔1,1〕のうちの3通りの値を定義づける。例えば,0
に対し〔0,0〕,1に対し〔0,1〕,2に対し〔1,0〕を対応
させる。 第10図に従来より用いられているモジュロ3回路の一例
を示す。第10図において,演算装置9000は,第1入力デ
ータと第2入力データとを入力すると,それぞれ第1入
力オペランドレジスタ9001,第2入力オペランドレジス
タ9002に格納し,演算回路9011によって,第1入力オペ
ランドと第2入力オペランドとの間の演算を実行し,そ
の結果を演算結果レジスタ9003に格納し,その後出力す
る。 この演算装置9000におけるモジュロ3回路は,モジュロ
3期待値生成回路9012と,モジュロ3期待値レジスタ90
04と,モジュロ3一致チェック回路9013と,エラー表示
フラグ9005とで構成される。 モジュロ3期待値生成回路9012は,第1入力オペランド
レジスタ9001と第2入力オペランドレジスタ9002とか
ら,それぞれデータパス901,902を通して第1入力オペ
ランドと第2入力オペランドとを入力すると,演算回路
9011に対応したモジュロ3演算を実行し,演算結果のモ
ジュロ3の期待値を生成して,データパス912を通して
モジュロ3期待値レジスタ9004に出力する。 モジュロ3期待値レジスタ9004は,モジュロ3期待値生
成回路9012の出力であるモジュロ3期待値をデータパス
912を通して入力し,格納した後データパス904を通して
モジュロ3一致チェック回路9013に出力する。 モジュロ3一致チェック回路9013は,演算結果レジスタ
9003よりデータパス903を通して演算結果を入力すると
共に,モジュロ3期待値レジスタ9004よりデータパス90
4を通してモジュロ3期待値を入力すると,演算結果の
モジュロ3を生成し,その値と,モジュロ3期待値が一
致しているか否かをチェックし,一致していないとき
は,エラー報告をデータパス913を通してエラー表示フ
ラグ9005に出力する。 エラー表示フラグ(以後FIFと呼ぶ)9005は,データパ
ス913を通してエラー報告を入力すると,それを格納
し,以後解除信号を入力するまで,その値を保持すると
共に,エラー報告をデータパス905を通し出力する。 上述した様な動作により,演算装置9000の故障は検出さ
れ報告されるが,一般的なモジュロ3回路においては,
第10図で示したよりも詳細にチェックを実行しているの
が普通である。つまり,演算回路の最終結果だけなく,
中間結果に対しても同様な一致チェックが実行されてい
る。この場合の中間結果のモジュロ3期待値はデータパ
ス921を通って演算回路に入力される。 第11図は,演算装置内の演算回路の一部であって,その
中間結果に対してモジュロ3チェックを実行するときの
一例を示す図である。 第11図において,演算回路8000は2個の2進データX,Y
とそれぞれのモジュロ3値A,Bとを入力とし,2進データ
XとYとの間の演算結果Zと,演算結果Zのモジュロ3
値Cと,モジュロ3チェックの結果によるエラー報告E
とを出力とする。 第1入力レジスタ801と第2入力レジスタ802は,それぞ
れ2進データXとYとを入力し格納した後,それぞれデ
ータパス81,82を通して2進データX,Yを出力し,図示の
ように2進データX,Yは演算回路811に入力し,2進データ
X及びYはそれぞれ第1入力モジュロ3生成回路812及
び第2入力モジュロ3生成回路813の入力となる。 演算回路811は,データパス81を通して2進データX
を,データパス82を通して2進データYを入力すると2
進データXとYとの間で演算を実行し,その演算結果Z
をデータパス91を通し演算結果出力レジスタ803に出力
する。 演算結果出力レジスタ803は,データパス91を通して演
算結果Zを入力し格納した後,データパス83を通して演
算結果Zを出力する。演算結果Zは演算回路8000の出力
となると共に,演算結果モジュロ3生成回路816の入力
となる。 第1入力モジュロ3生成回路812は,データパス81を通
して2進データXを入力すると,そのモジュロ3値を生
成し,データパス92を通して出力し,モジュロ3値を一
致回路814と第1モジュロ3保持レジスタ804の入力とす
る。 第2入力モジュロ3生成回路813は,データパス82を通
して2進データYを入力すると,そのモジュロ3値を生
成し,データパス93を通して出力し,モジュロ3値を一
致回路815と第2モジュロ3保持レジスタ805の入力とす
る。 第1モジュロ3保持レジスタ804と第2モジュロ3保持
レジスタ805は,それぞれデータパス92,93を通して2進
データX,Yのモジュロ3値を入力し格納した後,それぞ
れデータパス84,85を通してモジュロ3演算回路817の入
力とする。 モジュロ3演算回路817は,データパス84を通して2進
データXのモジュロ3値を,データパス85を通して2進
データYのモジュロ3値を入力し,演算回路811の演算
に対応したモジュロ3演算を実行し,演算結果Zのモジ
ュロ3の期待値を生成し,データパス97を通して出力
し,一致回路818の入力とする。 演算結果モジュロ3生成回路816は,データパス83を通
して演算結果Zを入力すると,演算結果Zのモジュロ3
値を生成し,データパス96を通して一致回路818とモジ
ュロ3出力レジスタ806の入力とする。 モジュロ3出力レジスタ806は,データパス96を通して
演算結果Zのモジュロ3値を入力し格納した後,データ
パス86を通して演算結果Zのモジュロ3値Cを出力す
る。演算結果Zのモジュロ3値Cは演算回路8000の1出
力として,後段のモジュロ3回路(図示せず)の入力等
に用いられる。 一致回路814は,データパス92を通して2進データXの
モジュロ3値を入力すると共に,2進データXのモジュロ
3期待値Aを入力し,2進データXのモジュロ3値とその
期待値Aが一致しているか否かをチェックし,一致して
いないときはエラー報告をデータパス94を通してFIF
(エラー表示フラグ)808に出力する。 一致回路815も同様に,データパス93より入力される2
進データYのモジュロ3値とその期待値Bとを比較し,
その結果をデータパス95を通してFIF809に出力する。 一致回路818も同様にデータパス96より入力される演算
結果Zのモジュロ3値とデータパス97より入力される期
待値とを比較し,その結果をデータパス98を通してFIF8
07に出力する。 FIF807,808,809は,それぞれデータパス98,94,95を通し
てエラー報告を入力すると,それを格納し,以後解除信
号を入力するまでその値を保持すると共に,その値を論
理和回路810に出力する。 論理和回路810は,FIF807,808,809のいずれかよりエラー
報告を入力すると,故障発生を示すエラー報告Eを演算
回路8000の1出力として出力する。 〔発明が解決しようとする問題点〕 第10図及び第11図において,従来のモジュル3回路で
は,モジュロ3が「データの示す数値を3で割った余
り。」であるという数学的理由から,モジュロ3の値と
して3つまり2進データ〔1,1〕は考慮されていない。
しかしながら,本来データ処理装置で用いられるモジュ
ロ3回路は,回路の故障を検出するためのチェック回路
に用いられているのであるから,故障によってモジュロ
3の値が〔1,1〕となるケースも考慮すべきである。 例えば第11図において,第1入力モジュロ3生成回路81
2の故障により,データパス92のパス上に〔1,1〕が出力
された場合,従来のモジュロ3回路〔1,1〕の入力に対
する出力は不定とされ,一致回路814,モジュロ3演算回
路817,一致回路818等の出力は,論理的な意味を持た
ず,その回路構成に依存する。 従って,モジュロ3回路自体の故障によって,〔1,1〕
のパターンが生じた場合,その故障を検出する事は困難
であり,さらに演算回路上の故障によって演算結果が不
正となった場合も,そのモジュロ3の値が,上記〔1,
1〕に対する出力と同じ値の場合には,その故障は検出
されず,そのチェック回路の検出率は著しく低下するば
かりでなく,それより下段のチェック回路においてエラ
ー表示フラグが点灯した時には,その故障箇所の指摘に
誤りを生ずる要因となる。 また演算回路の一部をLSI等で実現する様な場合,そのL
SI等単体の故障検出のための評価には,通常ある種のテ
ストパターンの入力に対する出力およびフリップフロッ
プ内の値に用いて,LSI等内の論理ゲートや論理パターン
の検証をする。 LSI内にモジュロ3回路を含む場合には,テスト入力と
して〔1,1〕のケースを含まないと,その検出率が向上
しないため,演算回路全体としては論理的に全く無意味
とされる〔1,1〕の入力に対しても論理の記述が必要と
なり,その論理は回路構成に完全に依存するため,非常
に複雑で容易に理解しがたい記述となってしまう。 一方モジュロ3を用いたチェック回路としては,前述の
様にモジュロ3の期待値と,実際の演算結果から生成さ
れるモジュロ3の値とを一致チェックする。そのため,
検出率を向上させるためには,演算回路各部の期待値を
生成し,その個々にエラーフラグを設定する必要があ
り,ハードウェア量の増加が大きいと共に,その中の複
数のエラーフラグが点灯した時には,その原因が同じ故
障によるものか否かの判別が困難である。 一般に,従来のモジュロW回路では,全ビット“1"に対
する考慮がされていないため,モジュロW回路としての
故障の検出率,分解能の向上が困難であり,さらに近年
のLSI化に伴うチェック回路の検証の際,無意味な全ビ
ット“1"の論理記述が設計効率向上の妨げとなっている
という欠点がある。換言すると,従来のモジュロW回路
は,チェック回路設計が容易である反面,パリティ・チ
ェック等の他のチェック回路に比較し,エラー発生の際
の検出率及びエラー検出の際のエラー箇所指摘のための
分解能が低いという欠点がある。 〔問題点を解決するための手段〕 本発明は、wビットの入力、wビットの出力を有するモ
ジュロW回路であって、wビット(w≧2)で表現する
ことができる2w通りの2進値のうち、全ビットが“1"を
除くW(=2W−1)通りの2進値のうち1通りのコード
は、故障が検出されたことを示すエラーコードとして定
義され、全ビットが“1"を含む残りのW(=2W−1)通
りの2進値は、モジュロWのW通りのコードとして定義
され、故障が発生又は故障を検出したエラーコードを生
成した際には、そのエラーコードを伝搬させることを特
徴とするモジュロW回路であって、n個のwビットデー
タA1=[a11,a12…,a1w],A2=[a21,a22…,a2w],…,
An=[an1,an2,…,anw]の入力のうちの1つ以上が前記
エラーコードを示しているとき、wビットデータC=
[c1,c2,…,cw]として前記エラーコードを出力する。 〔実施例〕 次に本発明の実施例について図面を参照して説明する。 なお,以下の説明では,W=3の場合,すなわちモジュロ
3回路について述べる。 第1図は本発明の実施例であり,本発明のモジュロ3回
路を使用した演算回路のブロック図である。 第1図において,演算回路6000は,2個の2進データX,Y
と,それぞれのモジュロ3期待値A,Bとを入力とし,2進
データXとYとの間の演算結果Zと,演算結果Zのモジ
ュロ3値Cとを出力する。 第1入力レジスタ701と第2入力レジスタ702は,それぞ
れ2進データXとYとを入力し格納した後,それぞれデ
ータパス17,72を通して2進データX,Yを出力し,図示の
ように2進データX,Yは演算回路601に入力し,2進データ
X及びYはそれぞれ第1入力モジュロ3生成回路602及
び第2入力モジュロ3生成回路603の入力となる。 演算回路601は,データパス71を通して2進データX
を,データパス72を通して2進データYを入力すると,2
進データXとYとの間で演算を実行し,その演算結果Z
をデータパス61を通し,演算結果出力レジスタ703に出
力する。 演算結果出力レジスタ703は,データパス61を通して演
算結果Zを入力し格納した後,データパス73を通して演
算結果Zを出力する。演算結果Zは演算回路6000の出力
になると共に,演算結果モジュロ3生成回路606の入力
となる。 第1入力モジュロ3生成回路602は,データパス71を通
して2進データXを入力すると,そのモジュロ3値を生
成し,データパス62を通して出力し,モジュロ3値を第
1入力モジュロ3一致回路604の入力とする。 第2入力モジュロ3生成回路603は,データパス72を通
して2進データYを入力すると,そのモジュロ3値を生
成し,データパス63を通して出力し,モジュロ3値を第
2入力モジュロ3一致回路605の入力とする。 演算結果モジュロ3生成回路606は,データパス73を通
して演算結果Zを入力すると,そのモジュロ3値を生成
し,データパス66を通して出力し,モジュロ3値を演算
結果モジュロ3一致回路608の入力とする。 第1入力モジュロ3一致回路604は,データパス62を通
して2進データXのモジュロ3値を入力すると共に,2進
データXのモジュロ3期待値Aを入力し,2進データXの
モジュロ3値とその期待値Aが一致しているか否かをチ
ェックし,一致している時は,2進データXのモジュロ3
値をそのまま出力し,2進データXのモジュロ3値と期待
値Aとのいずれかが〔1,1〕の時,あるいは2進データ
Xのモジュロ3値の期待値Aが一致していない時は,
〔1,1〕を出力し,出力されたモジュロ3値はデータパ
ス64を通して第1モジュロ3保持レジスタ704の入力と
なる。 第2入力モジュロ3一致回路605は,データパス63を通
して2進データYのモジュロ3値を入力すると共に,2進
データYのモジュロ3期待値Bを入力し,第1入力モジ
ュロ3一致回路604と同様に一致チェックを実行し,2進
データYのモジュロ3値あるいは〔1,1〕を,データパ
ス65を通して出力し,第2モジュロ3保持レジスタ705
の入力とする。 第1モジュロ3保持レジスタ704は,データパス64を通
し第1入力モジュロ3一致回路604の出力モジュロ3値
を入力し,ストローブ信号によって格納後,データパス
74を通して出力し,モジュロ3演算回路607の入力とす
る。ただし,ストローブ信号入力前の本レジスタ内の保
持値が〔1,1〕)のときは,ストローブ信号入力後も
〔1,1〕が保持され,ストローブ信号に拘らず本レジス
タの出力モジュロ3値は〔1,1〕を保ち,変化しない。 第2モジュロ3保持レジスタ705は,データパス65を通
し第2入力モジュロ3一致回路605の出力モジュロ3値
を入力し,ストローブ信号によって格納後,データパス
75を通して出力し,モジュロ3演算回路607の別の入力
とする。ただし,ストローブ信号入力前の本レジスタ内
の保持値が〔1,1〕のときは,第1モジュロ3保持レジ
スタ704と同様に〔1,1〕が保持され,出力は変化しな
い。 モジュロ3演算回路607は,第1モジュロ3保持レジス
タ704の出力モジュロ3値をデータパス74を通して入力
とすると共に第2モジュロ3保持レジスタ705の出力モ
ジュロ3値をデータパス75を通して入力とし,いずれか
のモジュロ3値が〔1,1〕の時は〔1,1〕をそのまま出力
し,両方共に〔1,1〕でない時には,その2個のモジュ
ロ3値間で,演算回路601に対応したモジュロ3演算を
実行し,その結果を出力する。モジュロ3演算回路607
の出力は、演算結果Zのモジュロ3期待値とし,データ
パス67を通して演算結果モジュロ3一致回路608の入力
とする。 演算結果モジュロ3一致回路608は,データパス66を通
して演算結果Zのモジュロ3値を入力すると共に,デー
タパス67を通して演算結果Zのモジュロ3期待値を入力
すると,第1入力モジュロ3一致回路604および第2入
力モジュロ3一致回路605と同様に,演算結果Zのモジ
ュロ3値とその期待値との一致チェックを実行し,一致
している時は演算結果Zのモジュロ3値をそのまま出力
し,演算結果Zのモジュロ3値と期待値とのいずれかが
〔1,1〕の時,あるいは演算結果Zのモジュロ3値と期
待値が一致していない時は〔1,1〕を出力し,出力され
たモジュロ3値は,データパス68を通してモジュロ3出
力レジスタ706の入力となる。 モジュロ3出力レジスタ706は,演算結果モジュロ3一
致回路608の出力モジュロ3値をデータパス68を通して
入力し,ストローブ信号によって格納後,データパス76
を通して出力する。この出力モジュロ3値Cは,演算回
路6000の1出力として,後段のモジュロ3回路(図示せ
ず)の入力等に用いられる。ただし,ストローブ信号入
力前の本レジスタ内の保持値が〔1,1〕のときは,第1
及び第2モジュロ3保持レジスタ704及び705と同様に、
〔1,1〕が保持され,出力は変化しない。 演算回路6000において,例えば,第1モジュロ3保持レ
ジスタ704の出力に故障が生じ,データパス74上のモジ
ュロ3値が〔1,1〕となった場合,モジュロ3の値とし
て不正な値〔1,1〕は,データパス74を通りモジュロ3
演算回路607を経て,データパス67を通,演算結果モジ
ュロ3一致回路608からデータパス68を通り,モジュロ
3出力レジスタ706からデータパス76を通って,モジュ
ロ3値C=〔1,1〕を出力する。 また第2の例として,第2入力モジュロ3一致回路605
により,2進データYのモジュロ3値とその期待値Bが一
致しない時は,〔1,1〕がデータパス65を通して出力さ
れ,第2モジュロ3保持レジスタ705からデータパス75
を通り,モジュロ3演算回路607からデータパス67を通
り,演算結果モジュロ3一致回路608からデータパス68
を通り,モジュロ3出力レジスタ706からデータパス76
を通ってモジュロ3値C=〔1,1〕を出力する。 さらに,演算回路601の故障によって,演算結果Zが異
常な値のときは,そのモジュロ3値は,データパス66か
ら演算結果モジュロ3一致回路608に入力され,データ
パス67上の期待値との一致チェックが実行され,一致し
ない時の値〔1,1〕がデータパス68を通ってモジュロ3
出力レジスタ706からデータパス76を通ってモジュロ3
値C=〔1,1〕を出力する。 入力の期待値A=〔1,1〕の場合も同様であり,データ
パス64,74,67,68,76上のモジュロ3値は〔1,1〕とな
り,モジュロ3値C=〔1,1〕を出力する。 以上述べた様に,演算回路6000内に故障が生じた時,ま
たは入力データが不正の時には,出力モジュロ3値C
は,モジュロ3の値としては不正な値〔1,1〕となり,
演算回路6000の出力Cより前段で故障が生じた事を,後
段のモジュロ3回路に伝達する事ができる。 また,このモジュロ3値C=〔1,1〕によって,故障が
報告された後,回路全体のどの部分で故障が生じたかを
知るために,不正なモジュロ3値〔1,1〕がどのように
伝搬してきたかを調べれば,故障箇所を調べることが容
易である。 第2図は本発明の第2の実施例を示すブロック図であ
り,第1図の演算回路6000と同等な各種演算回路を組み
合わせた例であって,本発明に基づくモジュロ3回路
は,各演算回路ブロック内に,その演算回路に対応した
構成で含まれている。 以下の説明において, はモシュロ3加算, はモジュロ3減算または反転,及び はモジュロ3乗算を示す。 第2図において,演算回路7000は,6個の2進数X,Y,Z,R,
S,Tの入力に対し,P=−(X+Y+Z−R),Q=(X+
Y−S・T)・(X+Y+Z−R)となる2個の2進数
P,Qを出力すると共に,その演算回路に対応して,X,Y,Z,
R,S,Tのそれぞれのモジュロ3の値A,B,C,D,E,Fを入力
し, となる2個のモシュロ3の値L,Mを出力する。 加算回路201は,2進数X,Yを入力すると,加算結果X+Y
を生成し,データパス1を通して出力し,加算回路204
と減算回路205の入力とすると共に,加算回路201内のモ
ジュロ3回路は,2進数XとYのモジュロ3値A,Bを入力
し,加算結果X+Yのモジュロ3期待値を生成し,加算
結果のチェックをして,故障が検出された時は〔1,1〕
を,それ以外の時は加算結果X+Yのモジュロ3値 を,データパス21を通して出力し,加算回路204と減算
回路205の入力とする。 減算回路202は,2進数Z,Rを入力すると,減算経過Z−R
を生成し,データパス2を通して出力すると共に,2進数
Z,Rのモジュロ3値C,Dを入力し,減算結果Z−Rの結果
のチェックをして〔1,1〕または減算結果Z−Rのモジ
ュロ3値 をデータパス22を通して出力し,加算回路204の入力と
する。 乗算回路203は,2進数S,Tを入力すると,乗算結果S・T
(=S×T)を生成し,データパス3を通して出力する
と共に,2進数S,Tのモジュロ3値E,Fを入力し,乗算結果
S・Tの結果のチェックをして,〔1,1〕または乗算結
果S・Tのモジュロ3値 をデータパス23を通して出力し,加算回路205の入力と
する。 加算回路204は,データパス1を通して2進数X+Y
を,データパス2を通して2進数Z−Rを入力し,加算
結果X+Y+Z−Rを生成し,データパス4を通して出
力すると共に,データパス21を通して2進数X+Yのモ
ジュロ3値 を,データパス22を通して2進数Z−Rのモジュロ3値 を入力し,加算結果X+Y+Z−Rの結果のチェックを
して,そのモジュロ3値 をデータパス24を通して出力する。ここでもし,加算回
路204内で故障が検出された場合,あるいは加算回路204
の入力以前に〔1,1〕となっている場合( が〔1,1〕の場合)には, をデータパス24を通して出力し,この出力を反転回転20
6,乗算回路207の入力とする。 減算回路205は,データパス1を通して2進数X+Y
を,データパス3を通して2進数S・Tを入力し,減算
結果X+Y−S・Tを生成し,データパス5を通して出
力すると共に,データパス21を通してモジュロ3値 を,データパス23を通してモジュロ3値 を入力し,減算結果X+Y−S・Tのチェックをして,
そのモジュロ3値 をデータパス25を通して出力し,乗算回路207の入力と
する。データパス25上のモジュロ3値もそれより前段に
故障が発生していた場合には〔1,1〕となる。 反転回路206は,データパス4を通して2進数X+Y+
Z−Rを入力すると,反転結果−(X+Y+Z−R)を
生成し,データパス6を通して出力すると共に,データ
パス24を通してモジュロ3値 を入力し,反転結果−(X+Y+Z−R)のチェックを
して,そのモジュロ3値 をデータパス26を通して出力する。データパス26上のモ
ジュロ3値もそれより前段に故障が発生していた場合に
は〔1,1〕となる。 乗算回路207は,データパス4を通して2進数X+Y+
Z−Rを,データパス5を通して2進数X+Y−S・T
を入力すると,乗算結果(X+Y+Z−R)・(X+Y
−S・T)を生成し,データパス7を通して出力すると
共に,データパス24を通してモジュロ3値 を,データパス25を通してモジュロ3値 を入力すると,乗算結果(X+Y+Z−R)・(X+Y
−S・T)のチェックをし,そのモジュロ3値 をデータパス27を通して出力する。データパス27上のモ
ジュロ3値も,それより前段に故障が発生していた場合
には,〔1,1〕となる。 反転回路206の出力P=−(X+Y+Z−R)とそのモ
ジュロ3値 ,および乗算回路207の出力Q=(X+Y+Z−R)・
(X+Y−S・T)とそのモジュロ3値 は,演算回路7000の出力となり,後段の回路に入力され
る。 ここで,例えば,乗算回路203内に故障が発生して,デ
ータパス23上のモジュロ3値が〔1,1〕となった場合,
このモジュロ3値は,減算回路205を経て,データパス2
5を通り,乗算回路207を経て,データパス27を通り,M=
〔1,1〕となって出力される。M=〔1,1〕は不正データ
であり,Mに至るまでのどこかに故障が発生した事が明示
され,かつ〔1,1〕の経路をたどることによってその原
因が乗算回路203であることを指摘する事も容易であ
る。 第2の例として,入力D=〔1,1〕の場合,モジュロ3
値の不正データ〔1,1〕は,減算回路202を経て,データ
パス22を通り,加算回路204を経てデータパス24を通
り,反転回路206を経てデータパス26を通り,L=〔1,1〕
となって出力されると共に,データパス24から乗算回路
207を経て,データパス27を通り,M(1,1〕となって出力
される。L=M=〔1,1〕は不正データであり,Lまたは
Mに至るまでのどこかに故障が発生した事が明示され,
かつ〔1,1〕の経路をたどることによって,その原因が
演算回路7000ではなく,それより前段に原因があり,Lと
Mが〔1,1〕となる原因は同一の原因によるものである
ことが判明する。 従来のモジュロ3回路の場合,〔1,1〕に対する考慮が
されていないため,回路の途中に上述した様な故障が生
じた場合,L,Mの値は,他の入力及び回路構成等に依存す
るため,不正データか否かの判断が困難であり,検出さ
れない場合も生じてくる。また,故障箇所を指摘する際
も途中の不正データの値の判断が困難なために,その分
解能は非常に低くなってしまう。 一方,本実施例の場合,不正データは〔1,1〕という値
で判断することが容易なため,故障の検出率も高く,か
つ〔1,1〕の値が通ったパスの値は全て〔1,1〕であるか
ら,その〔1,1〕の値の原因となっている故障箇所もさ
がしやすく分解能も高くなる。 また,従来のモジュロ3回路と異なり,入力として〔1,
1〕を考慮し,かつ出力の〔1,1〕も論理的に意味のある
値のため,LSI等で実現した場合,その論理検証のためだ
けに,論理的に無意味な〔1,1〕の記述をする必要もな
く,設計効率に支障をきたさない。 第3図は本発明の第3の実施例を示すブロック図であ
り,第1図の演算回路6000内の3個のモジュロ3レジス
タ704,705,706に,入力モジュロ3値または出力モジュ
ロ3値が〔1,1〕の状態でストローブ信号を入力すると
〔1〕,その他の状態でストローブ信号を入力すると
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing device, and particularly to a checker for an arithmetic circuit or the like.
The present invention relates to a modulo W circuit used in a clock. [Prior Art] Modulo W circuits are used as check circuits for arithmetic circuits and the like.
One of the more frequently used check circuits
It Also, as the modulus W, W = 2 W -1 (for example, 3,7,1
5, ...) is often used. Because of modulo W
The value can be expressed in w bits, so compared to other modulus
This is because it can be realized at low cost. Below, W = 2 W As a representative of -1, W = 2 2 Consider -1 = 3.
2-bit data for three values 0, 1, 2 of modulo 3
Four values that can be expressed [0,0], [0,1], [1,
0] Define three values among [1,1]. For example, 0
For [0,0], for 1 for [0,1], for 2 for [1,0]
Let Fig. 10 shows an example of a modulo 3 circuit conventionally used
Indicates. In FIG. 10, the arithmetic unit 9000 is the first input device.
Input the data and the second input data
Input operand register 9001, second input operand register
Stored in the computer 9002, and the first input operation is performed by the arithmetic circuit 9011.
The operation between the land and the second input operand,
The result of is stored in the operation result register 9003 and then output.
It The modulo 3 circuit in this arithmetic unit 9000 is modulo
3 expected value generation circuit 9012 and modulo 3 expected value register 90
04, modulo 3 match check circuit 9013, and error display
It is composed of a flag 9005. The modulo-3 expected value generation circuit 9012 has the first input operand
Register 9001 and second input operand register 9002
1st input operation through the data paths 901 and 902, respectively.
When the land and the second input operand are input, the arithmetic circuit
The modulo 3 operation corresponding to 9011 is executed and the operation result
Generate expected values for Juro 3 and through datapath 912
Output to the modulo 3 expected value register 9004. The modulo 3 expected value register 9004 is used to generate the modulo 3 expected value
Data path of expected value of modulo 3 which is output of synthesis circuit 9012
Input through 912, store and then through data path 904
Output to the modulo 3 match check circuit 9013. Modulo 3 match check circuit 9013 is the operation result register
If you input the calculation result from data path 903 from 9003
Data path 90 from modulo 3 expected value register 9004
Input the expected value modulo 3 through 4, and
Modulo 3 is generated and its value and modulo 3 expected value are equal.
Check whether or not they match, and if they do not match
Reports the error report through the datapath 913.
Output to lag 9005. The error display flag (hereinafter referred to as FIF) 9005 is a data
Input error report via switch 913 and store it
If the value is held until the release signal is input,
Both output an error report through the data path 905. By the operation as described above, the failure of the arithmetic unit 9000 is detected.
However, in a general modulo 3 circuit,
Performing checks in more detail than shown in Figure 10
Is normal. In other words, not only the final result of the arithmetic circuit,
A similar match check is also performed on the intermediate results.
It In this case, the intermediate result modulo 3 expected value is the data
It is input to the arithmetic circuit through the switch 921. FIG. 11 shows a part of the arithmetic circuit in the arithmetic unit.
When performing a modulo 3 check on intermediate results
It is a figure which shows an example. In FIG. 11, the arithmetic circuit 8000 shows two binary data X and Y.
And the respective modulo 3 values A and B are input, and binary data
Calculation result Z between X and Y, and modulo 3 of calculation result Z
Error report E with value C and modulo 3 check result
And are output. The first input register 801 and the second input register 802 are respectively
After inputting and storing the binary data X and Y,
Output binary data X and Y through data paths 81 and 82, and
Input the binary data X and Y into the arithmetic circuit 811
X and Y are the first input modulo 3 generation circuit 812 and
And the second input modulo 3 generation circuit 813. The arithmetic circuit 811 passes the binary data X through the data path 81.
, And when the binary data Y is input through the data path 82, 2
The operation is executed between the binary data X and Y, and the operation result Z
To the operation result output register 803 through the data path 91
To do. The operation result output register 803 plays through the data path 91.
After inputting and storing the calculation result Z, play through the data path 83
The calculation result Z is output. Calculation result Z is the output of calculation circuit 8000
And the input of the calculation result modulo 3 generation circuit 816
Becomes The first input modulo 3 generation circuit 812 passes through the data path 81.
And input the binary data X, the modulo 3 value is generated.
Generated and output through the data path 92 to obtain the modulo 3 value.
Input to the matching circuit 814 and the first modulo 3 holding register 804.
It The second input modulo 3 generation circuit 813 passes through the data path 82.
And input the binary data Y, the modulo 3 value is generated.
Generated and output through the data path 93 to obtain the modulo 3 value.
Input to the input circuit 815 and the second modulo-3 holding register 805.
It 1st modulo 3 holding register 804 and 2nd modulo 3 holding
The register 805 is binary through the data paths 92 and 93, respectively.
After inputting and storing modulo 3 values of data X and Y,
Input of modulo 3 arithmetic circuit 817 through data paths 84 and 85
Use as power. The modulo 3 arithmetic circuit 817 is binary through the data path 84.
Binary modulo 3 value of data X through data path 85
Input the modulo 3 value of the data Y and calculate the calculation circuit 811
Modulo 3 operation corresponding to
Generate expected value of Euro 3 and output through data path 97
Then, the coincidence circuit 818 is input. The calculation result modulo 3 generation circuit 816 passes through the data path 83.
And input the operation result Z, the modulo 3 of the operation result Z
Generates a value and passes it through the datapath 96 to the matching circuit 818
It is used as an input of the output unit 806 of the Euro 3 output. Modulo 3 output register 806 is routed through datapath 96
After inputting and storing the modulo 3 value of the operation result Z, the data
Output modulo-3 value C of operation result Z through path 86
It The modulo 3-value C of the operation result Z is one output of the operation circuit 8000.
As a force, input of the modulo 3 circuit (not shown) in the latter stage, etc.
Used for. The matching circuit 814 outputs the binary data X through the data path 92.
Input modulo 3 value and modulo binary data X
3 Input expected value A, modulo 3 value of binary data X and its
Check if the expected value A matches,
FIF through datapath 94 if not
(Error display flag) Output to 808. The matching circuit 815 is also input from the data path 93
Compare the modulo-3 value of the base data Y and its expected value B,
The result is output to the FIF809 via the data path 95. Similarly, the matching circuit 818 is also an operation input from the data path 96.
Result Z input modulo 3 value and data path 97
Compared with the waiting value and the result is passed through the data path 98 to FIF8
Output to 07. FIF807,808,809 through data path 98,94,95 respectively
If you enter an error report with
Hold that value until you enter the
Output to the Riwa circuit 810. The OR circuit 810 gives an error from one of FIF807, 808, and 809.
When a report is input, an error report E indicating failure occurrence is calculated
Output as one output of the circuit 8000. [Problems to be Solved by the Invention] In FIGS. 10 and 11, the conventional modular 3 circuit is used.
Modulo 3 is the remainder of dividing the numerical value indicated by the data by 3.
Ri. For the mathematical reason that it is
Then, 3 or binary data [1,1] is not considered.
However, the module originally used in the data processing device is
(B) Circuit 3 is a check circuit for detecting circuit failures.
Since it is used for
The case where the value of 3 is [1,1] should also be considered. For example, in FIG. 11, the first input modulo 3 generation circuit 81
[1,1] is output on the path of data path 92 due to the failure of 2.
, The input of the conventional modulo 3 circuit [1,1]
Output is indefinite, the coincidence circuit 814, modulo 3 operation times
The outputs of the path 817, the matching circuit 818, etc. have a logical meaning.
No, it depends on the circuit configuration. Therefore, due to the failure of the modulo 3 circuit itself, [1,1]
It is difficult to detect the failure when the pattern of
In addition, the calculation result is incorrect due to a failure in the calculation circuit.
Even when it becomes positive, the value of modulo 3 is [1,
If the same value as the output for [1], the failure is detected.
If the detection rate of the check circuit drops significantly,
Not in the scale, but in the check circuit below it
-When the display flag lights up, the failure location can be pointed out.
It becomes a factor that causes an error. If a part of the arithmetic circuit is realized by LSI, etc.
A certain type of test is usually used for evaluation for failure detection of a single unit such as SI.
Output and flip-flop for input of strike pattern
Logic gates and logic patterns in LSI etc.
To verify. If the modulo 3 circuit is included in the LSI,
Then, if the case of [1,1] is not included, the detection rate is improved.
Not logically meaningless as a whole arithmetic circuit
It is necessary to describe the logic even for the input of [1,1]
And its logic depends entirely on the circuit configuration.
The description is complicated and difficult to understand. On the other hand, as a check circuit using modulo 3,
Generated from the expected value of modulo 3 and the actual calculation result
The value of modulo 3 is checked for a match. for that reason,
In order to improve the detection rate, the expected value of each part of the arithmetic circuit
You have to create and set an error flag for each of them.
Therefore, as the amount of hardware increases significantly,
When several error flags light up, the cause is the same.
It is difficult to determine whether it is due to an obstacle. Generally, in the conventional modulo W circuit, all bits are "1".
As a modulo W circuit,
It is difficult to improve the fault coverage and resolution, and in recent years
When verifying the check circuit associated with the LSI implementation of
The logical description of "1" is an obstacle to improving design efficiency
There is a drawback that. In other words, the conventional modulo W circuit
While the check circuit design is easy, the parity check
When an error occurs by comparing with other check circuits such as
Error detection rate for error detection and error detection
It has the drawback of low resolution. [Means for Solving the Problems] The present invention is a model having a w-bit input and a w-bit output.
Juro W circuit expressed by w bits (w ≧ 2)
Can 2 w All binary bits are "1"
Exclude W (= 2 W -1) One code of binary values
Is defined as an error code indicating that a failure has been detected.
Is defined, and the remaining W (= 2) in which all bits include "1" W -1)
The binary value of R is defined as the W code of modulo W
Error code generated when a failure occurs or is detected.
When it is done, it is special to propagate the error code.
Is a modulo W circuit that is a characteristic
Type A 1 = [A 11 , a 12 …, A 1w ], A 2 = [A twenty one , a twenty two …, A 2w ], ...,
A n = [A n1 , a n2 , ..., a nw ] One or more of the
When an error code is shown, w bit data C =
[C 1 , c 2 , ..., c w ], The error code is output. [Embodiment] Next, an embodiment of the present invention will be described with reference to the drawings. In the following explanation, when W = 3, that is, modulo
Three circuits will be described. FIG. 1 shows an embodiment of the present invention.
It is a block diagram of an arithmetic circuit using a path. In FIG. 1, the arithmetic circuit 6000 has two binary data X and Y.
And the respective modulo 3 expected values A and B are input, and binary
The calculation result Z between the data X and Y, and the calculation result Z
Outputs a three-valued C value. The first input register 701 and the second input register 702 are respectively
After inputting and storing the binary data X and Y,
Output binary data X, Y through data path 17,72,
Input the binary data X and Y into the arithmetic circuit 601
X and Y are the first input modulo 3 generation circuit 602 and
And the second input modulo 3 generation circuit 603. The arithmetic circuit 601 receives the binary data X through the data path 71.
Input binary data Y through the data path 72,
The operation is executed between the binary data X and Y, and the operation result Z
To the operation result output register 703 through the data path 61.
Force The calculation result output register 703 plays through the data path 61.
After inputting and storing the calculation result Z, play through the data path 73.
The calculation result Z is output. Calculation result Z is the output of calculation circuit 6000
And the input of the calculation result modulo 3 generation circuit 606
Becomes The first input modulo 3 generation circuit 602 passes through the data path 71.
And input the binary data X, the modulo 3 value is generated.
Generated, output through data path 62, and modulo 3 value
1-input Modulo-3 coincidence circuit 604 is input. The second input modulo 3 generation circuit 603 passes through the data path 72.
And input the binary data Y, the modulo 3 value is generated.
Generated, output through data path 63, modulo 3 value
It is input to the 2-input modulo 3-coincidence circuit 605. The calculation result modulo 3 generation circuit 606 passes through the data path 73.
Then, input the operation result Z and generate its modulo 3 value
Output through data path 66 and calculate modulo 3 value
The result is input to the modulo 3 match circuit 608. The first input modulo 3-coincidence circuit 604 passes through the data path 62.
And input the modulo 3 value of binary data X, and
Input the modulo 3 expected value A of data X, and enter the binary data X
Check whether the modulo 3 value and its expected value A match.
Check, and when they match, modulo 3 of binary data X
Output the value as it is and expect it to be the modulo 3 value of binary data X
When either the value A is [1,1], or binary data
When the expected value A of the modulo 3 value of X does not match,
[1,1] is output, and the output modulo 3-value is the data
The input of the first modulo 3 holding register 704
Become. The second input modulo 3 match circuit 605 is connected to the data path 63.
And input the modulo 3 value of the binary data Y, and
Input the modulo 3 expected value B of data Y, and enter the first input
Performs a match check in the same way as the Euro 3 match circuit 604, and outputs a binary
Data modulo 3 value or [1,1]
Output through the bus 65 and the second modulo 3 holding register 705
And input. The first modulo 3 holding register 704 passes through the data path 64.
Output 1 modulo 3 match circuit 604 output modulo 3 value
Input and store by strobe signal, then data path
Output through 74 and input to modulo 3 arithmetic circuit 607
It However, the storage in this register before strobe signal input
If the holding value is [1,1]), even after the strobe signal is input
[1,1] is held, and this register does not depend on the strobe signal.
The output modulo 3 value of the data remains [1,1] and does not change. The second modulo 3 holding register 705 passes through the data path 65.
The output modulo 3 value of the second input modulo 3 match circuit 605
Input and store by strobe signal, then data path
Output through 75 and another input of modulo 3 arithmetic circuit 607
And However, in this register before strobe signal input
If the holding value of [1,1] is, the first modulo 3 holding register
[1,1] is held as in the case of the starter 704, and the output does not change.
Yes. The modulo 3 arithmetic circuit 607 is a first modulo 3 holding register.
Input the modulo 3 value of the data 704 through the data path 74
And the output mode of the second modulo 3 holding register 705.
Juro 3 values are input through data path 75, and either
When the modulo 3 value of is [1,1], output [1,1] as it is
However, when both are not [1,1], the two modules
B Modulo 3 operation corresponding to the operation circuit 601
Execute and output the result. Modulo 3 arithmetic circuit 607
The output of is the expected value modulo 3 of the operation result Z, and the data
Input of calculation result modulo 3 match circuit 608 through path 67
And The calculation result modulo 3 match circuit 608 passes through the data path 66.
And input the modulo 3 value of the operation result Z,
Input the expected value of modulo 3 of calculation result Z through tapas 67
Then, the first input modulo 3 match circuit 604 and the second input
As with the force modulo 3 match circuit 605, the calculation result Z
Performs a match check between the three-point value and its expected value, and matches
Outputs the modulo 3 value of the operation result Z as it is
If either the modulo 3 value of the operation result Z or the expected value is
When [1,1], or modulo 3 value and period of operation result Z
If the wait values do not match, [1,1] is output and
The modulo 3 value is output modulo 3 through data path 68.
The input to the force register 706. The modulo 3 output register 706 stores the arithmetic result modulo 3
Output modulo 3 value of matching circuit 608 through data path 68
Data path 76 after input and storage by strobe signal
Output through. This output modulo 3-value C is calculated
As one output of the path 6000, a modulo 3 circuit in the subsequent stage (not shown)
It is used for inputting etc.). However, with strobe signal
If the value held in this register before input is [1,1], the first
And the second modulo 3 holding registers 704 and 705,
[1,1] is held and output does not change. In the arithmetic circuit 6000, for example, the first modulo 3 holding level
A failure occurs in the output of the register 704, causing a failure on the data path 74.
When the three-valued value becomes [1,1], it is regarded as the value of modulo-3
And the incorrect value [1,1] passes through the data path 74 and modulo 3
After passing through the calculation circuit 607 and the data path 67, the calculation result module
From the Euro 3 match circuit 608 through the data path 68 to the modulo
3 Output register 706 through data path 76
(B) Three-valued C = [1,1] is output. As a second example, the second input modulo-3 coincidence circuit 605
The binary modulo 3 value of Y and its expected value B
If not, [1,1] will be output through the data path 65.
From the second modulo 3 holding register 705 to the data path 75
Through the modulo 3 arithmetic circuit 607 and the data path 67.
From the calculation result modulo 3 match circuit 608 to the data path 68
Through the modulo 3 output register 706 to the data path 76
To output a modulo three value C = [1,1]. Furthermore, the calculation result Z may differ due to a failure of the calculation circuit 601.
If it is a normal value, the modulo 3 value is
The calculation result is input to the modulo 3 match circuit 608 and the data
A match check with the expected value on path 67 is performed and there is a match.
The value [1,1] when there is no modulo 3 through the data path 68
Modulo 3 from output register 706 through datapath 76
The value C = [1,1] is output. The same is true when the input expected value A = [1,1], and the data
The modulo 3 value on the paths 64,74,67,68,76 is [1,1].
Output modulo 3-value C = [1,1]. As described above, when a failure occurs in the arithmetic circuit 6000,
Or when the input data is invalid, output modulo 3-value C
Is an illegal value [1,1] for the modulo 3 value,
After the output circuit C of the output circuit 6000,
Can be transmitted to the modulo 3 circuit of the stage. In addition, this modulo 3-value C = [1,1]
After being reported, which part of the entire circuit the failure occurred
To know how an illegal modulo 3 value [1,1] is
If you check whether it has propagated, it is easy to find the point of failure.
It's easy. FIG. 2 is a block diagram showing a second embodiment of the present invention.
, Various operational circuits equivalent to the operational circuit 6000 in FIG.
A combined example, modulo 3 circuit according to the invention
Corresponds to the arithmetic circuit in each arithmetic circuit block.
Included in the configuration. In the following explanation, Is a moshulo 3 addition, Is modulo 3 subtraction or inversion, and Indicates modulo 3 multiplication. In FIG. 2, the arithmetic circuit 7000 has six binary numbers X, Y, Z, R,
For S and T inputs, P =-(X + Y + Z-R), Q = (X +
2 binary numbers Y-S-T)-(X + Y + Z-R)
In addition to outputting P and Q, X, Y, Z, and
Input modulo 3 values A, B, C, D, E, F of R, S, T respectively
Then It outputs the two L, M values of the Moshulo 3 which are When the adder circuit 201 inputs binary numbers X and Y, the addition result X + Y
Is generated and output through the data path 1, and the adder circuit 204
And the input of the subtraction circuit 205, and
Juro 3 circuit inputs modulo 3 values A and B of binary numbers X and Y
Then, the modulo 3 expected value of the addition result X + Y is generated and added.
When the result is checked and a failure is detected, [1,1]
Otherwise, the addition result X + Y modulo 3 value Is output through the data path 21 and subtracted by the adder circuit 204
As input to circuit 205. When the subtraction circuit 202 inputs binary numbers Z and R, the subtraction process Z-R
Is generated and output through data path 2, and a binary number
Input modulo 3-values C and D of Z and R, subtraction result Z-R result
Check [1,1] or subtraction result Z-R
Three-value Is output through the data path 22 and is input to the adder circuit 204.
To do. The multiplication circuit 203 receives the binary numbers S and T and outputs the multiplication result S · T.
Generate (= S × T) and output through data path 3
And the modulo three values E and F of binary numbers S and T are input, and the multiplication result
Check the result of S ・ T and check [1,1] or multiplication result.
Fruit S · T modulo 3 value Is output through the data path 23, and the
To do. The adder circuit 204 uses the binary number X + Y through the data path 1.
, Input binary Z-R through data path 2 and add
Generate the result X + Y + Z-R and output through data path 4.
The data path 21 and the binary number X + Y
Juro 3-value Through the data path 22 to the binary Z-R modulo 3-value Enter, and check the result of addition result X + Y + Z-R
And its modulo 3 value Is output through the data path 24. Here again, addition times
If a fault is detected in the path 204, or the adder circuit 204
If [1,1] is entered before input of ( Is [1,1]), Is output through the data path 24 and this output is rotated in reverse 20
6, Input to multiplication circuit 207. The subtraction circuit 205 uses the binary number X + Y through the data path 1.
Input binary number S · T through data path 3 and subtract
Result X + Y-S · T is generated and output through data path 5.
Power and modulo three values through data path 21 Through the data path 23 modulo 3-value Enter, check the subtraction result X + Y−S · T,
Its modulo 3 value Is output through the data path 25 and is input to the multiplication circuit 207.
To do. The modulo 3 value on the data path 25 also precedes it
If a failure has occurred, it is [1,1]. The inverting circuit 206 uses the binary number X + Y + through the data path 4.
If you input Z-R, the inversion result-(X + Y + Z-R)
Generate and output through data path 6 and data
Modulo-3 through pass 24 Enter and check the inversion result- (X + Y + Z-R)
And its modulo 3 value Is output through the data path 26. Model on data path 26
If there is a failure in the Juro 3 value before that
Becomes [1,1]. The multiplication circuit 207 outputs a binary number X + Y + through the data path 4.
Z-R is a binary number X + Y-S · T through the data path 5.
If you enter, the multiplication result (X + Y + Z−R) · (X + Y
-ST) is generated and output through the data path 7.
Both are modulo 3-valued through data path 24 Through the data path 25 modulo 3 values If you enter, the multiplication result (X + Y + Z−R) · (X + Y
-S / T) is checked, and its modulo 3 value Are output through the data path 27. Model on data path 27
If the Juro 3 value also has a failure in the previous stage
Becomes [1,1]. The output P =-(X + Y + Z-R) of the inverting circuit 206 and its output
Juro 3-value , And the output of the multiplication circuit 207 Q = (X + Y + Z−R) ·
(X + Y-S ・ T) and its modulo 3 value Becomes the output of the arithmetic circuit 7000 and is input to the circuit in the subsequent stage.
It Here, for example, when a failure occurs in the multiplication circuit 203,
If the modulo 3 value on data path 23 is [1,1],
This modulo 3-value is passed through the subtraction circuit 205 and the data path 2
5 through the multiplication circuit 207, then through data path 27, M =
It is output as [1,1]. M = [1,1] is invalid data
It is clear that a failure occurred somewhere up to M.
And by tracing the route [1,1]
It is easy to point out that the cause is the multiplication circuit 203.
It As a second example, when input D = [1,1], modulo 3
The invalid data [1,1] of the value passes through the subtraction circuit 202,
Passes through the data path 24 through the adder circuit 204 through the path 22.
And passes through the data path 26 via the inverting circuit 206 and L = [1,1]
Is output as well as the multiplication circuit from the data path 24.
Outputs as M (1, 1) via data path 27 via 207
To be done. L = M = [1,1] is invalid data, and L or
It is clearly stated that a failure has occurred somewhere before reaching M,
And by tracing the route of [1,1], the cause is
The cause is not in the arithmetic circuit 7000, but in the preceding stage.
The cause that M becomes [1,1] is due to the same cause.
It turns out. In the case of the conventional modulo 3 circuit, the consideration for [1,1] is
Since it has not been performed, the above-mentioned failure may occur in the middle of the circuit.
In this case, the values of L and M depend on other inputs and circuit configuration.
Therefore, it is difficult to determine whether the data is invalid and
There may be cases where it is not possible. In addition, when pointing out the failure point
However, because it is difficult to determine the value of incorrect data in the middle,
The resolution is very low. On the other hand, in the case of this embodiment, the invalid data is the value [1,1].
Since it is easy to judge with, the failure detection rate is high.
Are all the values of the path that passed the value of [1,1] are [1,1]?
The fault location causing the value of [1,1].
It is easy to remove and the resolution is high. Also, unlike the conventional modulo 3 circuit, [1,
1] is considered, and the output [1,1] is also logically meaningful
Because it is a value, if it is realized by LSI etc., it is for the logic verification.
However, it is not necessary to make a logically meaningless description of [1,1].
And does not hinder the design efficiency. FIG. 3 is a block diagram showing a third embodiment of the present invention.
, Three modulo-3 registers in the arithmetic circuit 6000 of FIG.
Input 704, 705, 706 to input modulo 3-value or output modulo
(B) When the strobe signal is input when the 3-value is [1,1]
[1] If the strobe signal is input in other states

〔0〕となる1ビットデータを出力する機能を加えたそ
れぞれ,モジュロ3レジスタ504,505,506を使用し,さ
らに論理和回路507を追加した例である。 第3図において,第1モジュロ3保持レジスタ504は,
データパス64を通し,第1入力モジュロ3一致回路604
の出力モジュロ3値を入力し,ストローブ信号によって
格納後,データパス74を通して出力し,モジュロ3演算
回路607の入力とする。ただし,ストローブ信号入力前
の本レジスタ内の保持値が〔1,1〕のとき,またはデー
タパス64を通して入力するモジュロ3値が〔1,1〕のと
きは,ストローブ信号入力後も〔1,1〕が保持され,ス
トローブ信号に拘らず,本レジスタの出力モジュロ3値
は〔1,1〕を保ち,変化しないと共に,エラー報告の1
ビットデータl1=1がデータパス54を通して出力され,
論理和回路507の入力となる。 第2モジュロ3保持レジスタ505は,データパス65を通
し,第2モジュロ3一致回路605の出力モジュロ3値を
入力し,ストローブ信号によって格納後,データパス75
を通して出力し,モジュロ3演算回路607の別の入力と
する。ただし,ストローブ入力前の本レジスタ内の保持
値が,〔1,1〕のとき,または入力モジュロ3値が〔1,
1〕のときは,第1モジュロ3保持レジスタ504と同様
に,〔1,1〕が保持され変化しないと共に,エラー報告
の1ビットデータl2=1がデータパス55を通して出力さ
れ,論理和回路507の別の入力となる。 モジュロ3出力レジスタ506は,演算結果モジュロ3一
致回路608の出力モジュロ3値を,データパス68を通し
て入力し,ストローブ信号によって格納後,データパス
76を通して出力する。この出力モジュロ3値Cは,演算
回路5000の1出力として,後段のモジュロ3回路(図示
せず)の入力等に用いられる。ただし,ストローブ信号
入力前の本レジスタ内の保持値が〔1,1〕のとき,また
は入力モジュロ3値が〔1,1〕のときは,第1及び第2
モジュロ3保持レジスタ504及び505と同様に,〔1,1〕
が保持され変化しないと共に,エラー報告の1ビットデ
ータl3=1がデータパス56を通して出力され,論理和回
路507の入力となる。 論理和回路507は,データパス54を通してl1を,データ
パス55を通してl2を,データパス56を通してl3を入力す
ると,l1とl2とl3の論理和Eを生成し,出力する。l1,
l2,l3はそれぞれのモジュロ3レジスタの保持値が〔1,
1〕のとき,つまり故障を検出したときに1となる1ビ
ットデータであるから,論理和E=1は,演算回路5000
内で故障を検出した事を示すことになる。 演算回路5000内の他の回路は,第1図の演算回路6000と
同等であるので,説明は省略する。 第4図は,本発明の第4の実施例を示すブロック図であ
る。第4図において,演算回路4000は,2個の2進データ
X,Yとそれぞれのモジュロ3値A,Bとを入力とし,2進デー
タXとYとの間の演算結果Zと,演算結果Zの1部のデ
ータZ1のモジュロ3値Cと,残りのデータZ2のモジュロ
3値Dとを出力する。本実施例は,演算結果のデータZ
を,後段の回路において,Z1とZ2との2個のデータとし
て別々に扱う様な場合に適したモジュロ3回路の例を示
す。 モジュロ3値C,Dを生成する回路より前段の回路,すな
わち,第1及び第2入力レジスタ701及び702,演算回路6
01,演算結果出力レジスタ703,第1及び第2入力モジュ
ロ3生成回路602及び603,第1及び第2モジュロ3一致
回路604及び605,及び第1及び第2モジュロ3保持レジ
スタ704及び705は,第1図の演算回路6000と同等なので
説明は省略する。 第1結果モジュロ3生成回路401は,データパス731を通
して演算結果Zの一部のデータZ1を入力すると,そのモ
ジュロ3値を生成し,データパス41を通して出力し,第
1結果モジュロ3一致回路405と第2結果モジュロ3減
算回路404との入力とする。 第2結果モジュロ3生成回路402は,データパス732を通
して演算結果Zのうち,データZ1を除いた残りのデータ
Z2を入力すると,そのモジュロ3値を生成し,データパ
ス42を通して出力し,第2結果モジュロ3一致回路406
と第1結果モジュロ3減算回路403との入力とする。 モジュロ3演算回路607は,第1モジュロ3保持レジス
タ704の出力モジュロ3値をデータパス74を通して入力
とすると共に,第2モジュロ3保持レジスタ705の出力
モジュロ3値をデータパス75を通して入力とし,いずれ
かのモジュロ3値が〔1,1〕の時は〔1,1〕をそのまま出
力し,両方共に〔1,1〕でない時は,その2個のモジュ
ロ3値間で演算回路601に対応したモジュロ3演算を実
行し,その結果を出力する。モジュロ3演算回路607の
出力は,演算結果Zのモジュロ3期待値として,データ
パス67を通して第1結果モジュロ3減算回路403と第2
結果モジュロ3減算回路404との別の入力となる。 第1結果モジュロ3減算回路403は,データパス42を通
して演算結果Zの一部Z2のモジュロ3値を入力すると共
に,データパス67を通して演算結果Zのモジュロ3期待
値を入力とし,いずれかのモジュロ3値が〔1,1〕のと
きは〔1,1〕をそのまま出力し,両方共に〔1,1〕でない
時にはZ−Z2のモジュロ3値を生成して出力する。第1
モジュロ3減算回路403の出力は,演算結果の一部Z1の
モジュロ3期待値としてデータパス43を通して第1結果
モジュロ3一致回路405の入力となる。 第2モジュロ3減算回路404は,データパス41を通して
演算結果Zの一部Z1のモジュロ3値を入力すると共に,
データパス67を通して演算結果Zのモジュロ3期待値を
入力とし,いずれかのモジュロ3値が〔1,1〕のときは
〔1,1〕をそのまま出力し,両方共に〔1,1〕でない時に
はZ−Z1のモジュロ3値を生成して出力する。第2モジ
ュロ3減算回路404の出力は,演算結果の一部Z2のモジ
ュロ3期待値として,データパス44を通して,第2結果
モジュロ3一致回路406の入力となる。 第1結果モジュロ3一致回路405は,データパス41を通
して演算結果Zの一部Z1のモジュロ3値を,データパス
43を通してそのモジュロ3期待値を入力すると,一致チ
ェックを実行し,一致している時はZ1のモジュロ3値を
そのまま出力し,Z1のモジュロ3値と期待値とのいずれ
かが〔1,1〕の時,あるいはZ1のモジュロ3値とその期
待値が一致していない時は〔1,1〕を出力し,出力され
たモジュロ3値はデータパス45を通して第1モジュロ3
出力レジスタ407の入力となる。 第2結果モジュロ3一致回路406は,データパス42を通
して演算結果Zの一部Z2のモジュロ3値を,データパス
44を通してその期待値を入力すると,一致チェックを実
行し,一致している時はZ2のモジュロ3値をそのまま出
力し,Z2のモジュロ3値と期待値とのいずれかが〔1,1〕
の時,あるいは,Z2のモジュロ3値とその期待値が一致
していない時は〔1,1〕を出力し,出力されたモジュロ
3値は,データパス46を通して第2モジュロ3出力レジ
スタ408の入力となる。 第1モジュロ3出力レジスタ407は,第1結果モジュロ
3一致回路405の出力モジュロ3値を,データパス45を
通して入力し,ストローブ信号によって格納後,データ
パス47を通して出力する。この出力モジュロ3値Cは,
演算回路4000の1出力として後段のモジュロ3回路の入
力等に用いられる。ただし,ストローブ信号入力前の本
レジスタ内の保持値が〔1,1〕の時は,〔1,1〕が保持さ
れ,出力は変化しない。 第2モジュロ3出力レジスタ408は,第2結果モジュロ
3一致回路406の出力モジュロ3値を,データパス46を
通して入力し,ストローブ信号によって格納後,データ
パス48を通して出力する。このモジュロ3値Dは,演算
回路4000の1出力として後段のモジュロ3回路の入力等
に用いられる。ただし,ストローブ信号入力前の本レジ
スタ内の保持値が〔1,1〕の時は,〔1,1〕が保持され,
出力は変化しない。 演算回路4000内に故障が生じた時,または入力データが
不正の時には,出力モジュロ3値C,Dはモジュロ3の値
としては不正な値〔1,1〕となり,演算回路4000の出力
CまたはDより前段で故障が生じた事を,後段のモジュ
ロ3回路に伝達する事ができる。またモジュロ3値Cま
たはD=〔1,1〕によって故障が報告された後,回路全
体のどの部分で故障が生じたかを知るために,不正なモ
ジュロ3値〔1,1〕がどのように伝搬してきたかを調べ
れば,故障箇所を指摘する事が容易であるという点にお
いて,第1図の演算回路6000と同等であるので説明は省
略する。 第5図は,本発明に使用されるモジュロ3演算回路の例
を示す真理値表である。(a)は加算回路,(b)は減
算回路,(c)は乗算回路,(d)は反転回路に対応し
た,それぞれモジュロ3加算,モジュロ3減算,モジュ
ロ3乗算,モジュロ3反転回路の真理値表である。図中
の一は,任意の値を示す。 (a)の加算回路の例について説明する。任意の2個の
2進数XとYの和Zを求める加算回路のチェック回路に
おいて,入力2進数Xのモジュロ3の値をA=〔a1,
a2〕,入力2進数Yのモジュロ3の値をB=〔b1,b2
とすると,2進数XとYの加算結果Zのモジュロ3の値と
しての期待値C=〔c1,c2〕を準備する。例えばA=
〔0,1〕,B=〔1,0〕の時は(a)の真理値表よりC=
〔0,0〕となる。 以上は従来のモジュロ3回路と同等であるが,本回路の
特徴は,モジュロ3の値として〔1,1〕を考慮した事に
ある。もし,2進数Xよりモジュロ3の値A=〔a1,a2
を生成する回路の故障によって,A=〔1,1〕となった場
合,(a)の真理値表に示す様に,期待値C=〔c1,
c2〕=〔1,1〕となる。2進数Y側の故障についても同
様である。つまり,期待値Cが〔1,1〕となるのは3ケ
ース存在し,1つは前記A=〔1,1〕の場合,他の1つは
B=〔1,1〕の場合,そしてモジュロ3加算回路自体の
故障によってC=(1,1〕となる場合である。 第6図は,本発明に使用されるモジュロ3一致回路の例
を示す真理値表である。2個の2ビットデータA=
〔a1,a2〕とB=〔b1,b2〕がA=Bのとき,C=〔c1,
c2〕=〔a1,a2〕,A≠BのときおよびAまたはB=〔1,
1〕のときC=〔c1,c2〕=〔1,1〕となる2ビットデー
タCを出力する。 第7図は,第5図の真理値表で示した論理で構成された
モジュロ3演算回路302と,第6図の真理値表で示た論
理で構成されたモシュロ3一致回路303を含む,チェッ
ク回路のブロック図である。 例えば,2個の2進データX=〔0,1,1,0〕とY=〔0,1,
0,1〕の加算により、XとYとの和Z=X+Y=〔1,0,
1,1〕を出力する加算回路のチェック回路の場合,モジ
ュロ3演算回路302は,2進データXのモジュロ3値A=
〔a1,a2〕=〔0,0〕と2進データYのモジュロ3値B=
〔b1,b2〕=〔1,0〕とを入力し,AとBとのモジュロ3和 をモジュロ3期待値として生成し,データパス32を通し
て,モジュロ3一致回路303の1入力とする。 モジュロ3生成回路301は,2進データXとYの和の2進
数Zを入力すると,2進数Zのモジュロ3の値D=〔d1,d
2〕=〔1,0〕を生成し,データパス31を通してモジュロ
3一致回路303の別の入力とする。 モジュロ3一致回路303は,データパス31を通して2進
数Zのモジュロ3値Dを,データパス32を通して,その
期待値Cを入力すると,D=CのときはM=〔m1,m2〕=
〔d1,d2〕,D≠Cのとき,およびDまたはC=〔1,1〕の
ときはM=〔m1,m2〕=〔1,1〕となる2ビットデータM
を出力する。 ここで,モジュロ3生成回路301に故障が発生してD=
〔1,1〕となった場合,モジュロ3演算回路302の入力A
またはB=〔1,1〕となった場合,モジュロ3演算回路3
02に故障が発生してC=〔1,1〕となった場合,モジュ
ロ3一致回路303自体に故障が発生してM=〔1,1〕とな
った場合,演算回路部またはモジュロ3演算回路302に
故障が発生してD≠Cとなった場合,のいずれの場合に
も出力M=〔1,1〕となり,出力M以前の回路に故障が
発生した事を検出し,故障を示すモジュロ3の値〔1,
1〕を後段のチェック回路に出力する事になる。後段の
チェック回路では,〔1,1〕以外の値を入力した時は正
常なデータ〔1,1〕の時は故障が検出されている事を判
別する事ができる。 第8図は本発明に使用されるモジュロ3レジスタの例を
示す(a)真理値表と(b)ブロック図である。 第8図において,モジュロ3レジスタ501は,2ビットデ
ータD=〔d1,d2〕とストローブ信号STBを入力とし,
(a)真理値表で示す論理構成により,2ビットデータE
=〔e1,e2〕が出力される。例えば,ストローブ入力前
の出力E=〔1,0〕の時D=〔0,1〕でストローブ信号が
入力されると,出力Eは,〔1,0〕から〔0,1〕に変化す
る。同様にこの状態でD=〔0,0〕でストローブ信号が
入力されると,出力Eは〔0,1〕から〔0,0〕に変化す
る。但し,出力Eの元の状態が〔1,1〕の時は,Dの値に
拘らず〔1,1〕の状態を保つことになる。従って,D=
〔1,1〕またはE=〔1,1〕の場合のストローブ入力後の
出力Eは〔1,1〕に固定され,本来モジュロ3の値とし
て〔1,1〕は不正データであるから,本回路以前の回路
に故障が発生している事を検出した事になる。また本回
路の不正データ〔1,1〕から,エラー報告信号を生成す
れば本回路はエラー表示フラグとしての役割も兼ねるこ
とになる。 第9図は,第8図のモジュロ3レジスタ501に,エラー
報告等に用いることのできるビットデータfを出力する
機能を追加したモジュロ3レジスタの例を示す(a)真
理値表と(b)ブロック図である。 第9図において,モジュロ3レジスタ502は,2ビットデ
ータD=〔d1,d2〕とストローブ信号STBを入力とし,
(a)真理値表で示す論理構成により,2ビットデータE
=〔e1,e2〕と1ビットデータfが出力される。1ビッ
トデータfは,入力D=〔1,1〕の状態でストローブ信
号が入力されると1となり,その後は出力E=〔1,1〕
と共に,f=1の状態を保つことになる。この1ビットデ
ータf=1は,不正データ〔1,1〕が入力された事を意
味するので,そのままエラー報告信号として用いる事が
できる。その他の動作は,第8図において説明したモジ
ュロ3レジスタ501と同等なので,説明は省略する。 なお,上述した実施例では,モシュロ3回路について述
べているが,本発明はこれに限定せず,モジュロW(=
2W−1)回路にも同様に適用できるのは勿論である。 〔発明の効果〕 以上説明した様に,本発明はモジュロWの値として不正
なエラーコードを考慮し,エラーコードを故障検出時の
モジュロWの値とすることによって,チェック回路自体
のエラーコードの故障も検出できると共に,後段のチェ
ック回路に,前段の故障検出を伝達する事ができる。さ
らにエラーコードの伝達経路をたどる事によって,故障
箇所を判別し易いため,チェック回路全体の故障の検出
率,分解能を向上させ,さらにLSI化等に適した構成に
できるという効果がある。
In this example, modulo 3 registers 504, 505, and 506 are used, each having a function of outputting 1-bit data of [0], and an OR circuit 507 is added. In FIG. 3, the first modulo-3 holding register 504 is
Through the data path 64, the first input modulo 3 match circuit 604
The output modulo 3 value is input, stored by the strobe signal, output through the data path 74, and input to the modulo 3 arithmetic circuit 607. However, if the value held in this register before the strobe signal is input is [1,1], or if the modulo-3 value that is input through the data path 64 is [1,1], the value [1,1] will remain even after the strobe signal is input. 1] is held, the output modulo 3 value of this register remains [1,1] regardless of the strobe signal, it does not change, and error report 1
Bit data l 1 = 1 is output through the data path 54,
It becomes the input of the logical sum circuit 507. The second modulo 3 holding register 505 inputs the output modulo 3 value of the second modulo 3 coincidence circuit 605 through the data path 65, stores it by the strobe signal, and then stores it in the data path 75.
Is output through and is used as another input of the modulo 3 arithmetic circuit 607. However, when the value held in this register before strobe input is [1,1], or when the input modulo 3 value is [1,1].
In the case of 1], as in the case of the first modulo 3 holding register 504, [1,1] is held and does not change, and 1-bit data l 2 = 1 of the error report is output through the data path 55, and the OR circuit It becomes another input of 507. The modulo 3 output register 506 inputs the output modulo 3 value of the operation result modulo 3 coincidence circuit 608 through the data path 68, stores it by the strobe signal, and then stores it in the data path.
Output through 76. The output modulo three value C is used as one output of the arithmetic circuit 5000 for input to a modulo three circuit (not shown) in the subsequent stage. However, if the value held in this register before the strobe signal is input is [1,1], or if the input modulo 3 value is [1,1], the first and second
Similar to the modulo 3 holding registers 504 and 505, [1,1]
Is held and does not change, and 1-bit data l 3 = 1 of the error report is output through the data path 56 and is input to the logical sum circuit 507. When the logical sum circuit 507 inputs l 1 through the data path 54, l 2 through the data path 55, and l 3 through the data path 56, the logical sum circuit 507 generates and outputs a logical sum E of l 1 , l 2 and l 3. . l 1 ,
l 2 and l 3 have the values held in their modulo 3 registers as [1,
1], that is, 1-bit data which becomes 1 when a failure is detected, the logical sum E = 1 is calculated by the arithmetic circuit 5000.
It means that the failure is detected in the inside. The other circuits in the arithmetic circuit 5000 are the same as the arithmetic circuit 6000 in FIG. FIG. 4 is a block diagram showing a fourth embodiment of the present invention. In FIG. 4, the arithmetic circuit 4000 has two binary data.
X, Y and the respective modulo 3-values A, B are input, the operation result Z between the binary data X and Y, the modulo 3-value C of a part of the data Z1 of the operation result Z, and the remaining The modulo 3 value D of the data Z2 is output. In this embodiment, the calculation result data Z
The following is an example of a modulo 3 circuit suitable for the case where the latter circuit handles two data of Z1 and Z2 separately. A circuit preceding the circuit for generating modulo three values C and D, that is, the first and second input registers 701 and 702, the arithmetic circuit 6
01, the operation result output register 703, the first and second input modulo 3 generation circuits 602 and 603, the first and second modulo 3 coincidence circuits 604 and 605, and the first and second modulo 3 holding registers 704 and 705, Since it is the same as the arithmetic circuit 6000 of FIG. 1, description thereof will be omitted. The first result modulo 3 generation circuit 401, when a part of the data Z1 of the operation result Z is input through the data path 731, generates the modulo 3 value and outputs it through the data path 41, and the first result modulo 3 coincidence circuit 405. And the second result modulo 3 subtraction circuit 404. The second result modulo 3 generation circuit 402 outputs the remaining data, excluding the data Z1, of the calculation result Z through the data path 732.
When Z2 is input, its modulo 3 value is generated and output through the data path 42, and the second result modulo 3 coincidence circuit 406
And the first result modulo 3 subtraction circuit 403. The modulo 3 arithmetic circuit 607 inputs the output modulo 3 value of the first modulo 3 holding register 704 through the data path 74, and the output modulo 3 value of the second modulo 3 holding register 705 through the data path 75. When the modulo 3 value is [1,1], [1,1] is output as it is. When both are not [1,1], the arithmetic circuit 601 corresponds between the two modulo 3 values. Executes modulo 3 operation and outputs the result. The output of the modulo-3 arithmetic circuit 607 is used as the modulo-3 expected value of the arithmetic result Z through the data path 67 and the first result modulo-3 subtraction circuit 403 and the second result.
The result is another input to the modulo-3 subtraction circuit 404. The first result modulo-3 subtraction circuit 403 inputs the modulo-3 value of a part Z2 of the operation result Z through the data path 42, and inputs the modulo-3 expected value of the operation result Z through the data path 67 to input either modulo-3 When the three values are [1,1], [1,1] is output as it is, and when neither is [1,1], a modulo three value of ZZ2 is generated and output. First
The output of the modulo-3 subtraction circuit 403 becomes the input of the first result modulo-3 coincidence circuit 405 through the data path 43 as the modulo-3 expected value of a part Z1 of the operation result. The second modulo-3 subtraction circuit 404 inputs the modulo-3 value of a part Z1 of the operation result Z through the data path 41, and
When the modulo 3 expected value of the operation result Z is input through the data path 67, [1,1] is output as it is when any modulo 3 value is [1,1], and when both are not [1,1] Generates and outputs the modulo 3 value of Z-Z1. The output of the second modulo-3 subtraction circuit 404 becomes the input of the second result modulo-3 coincidence circuit 406 through the data path 44 as the modulo-3 expected value of a part Z2 of the calculation result. The first result modulo 3 match circuit 405 passes the modulo 3 value of a part Z1 of the operation result Z through the data path 41 to the data path.
When the modulo 3 expected value is input via 43, a match check is executed, and when the modulo 3 expected value of Z1 is output as it is, one of the modulo 3 value of Z1 and the expected value is [1,1 ], Or when the modulo 3 value of Z1 and its expected value do not match, [1,1] is output, and the output modulo 3 value passes through the data path 45 to the first modulo 3
It becomes the input of the output register 407. The second result modulo 3 match circuit 406 passes the modulo 3 value of a part Z2 of the operation result Z through the data path 42 to the data path.
When the expected value is entered through 44, a match check is executed, and if they match, the modulo 3 value of Z2 is output as is, and either the modulo 3 value of Z2 or the expected value is [1,1].
, Or when the modulo 3 value of Z2 and its expected value do not match, [1,1] is output, and the output modulo 3 value is stored in the second modulo 3 output register 408 through the data path 46. It becomes an input. The first modulo-3 output register 407 inputs the output modulo-3 value of the first result modulo-3 coincidence circuit 405 through the data path 45, stores it by the strobe signal, and then outputs it through the data path 47. This output modulo 3-value C is
It is used as one output of the arithmetic circuit 4000 for inputting the modulo 3 circuit in the subsequent stage. However, when the value held in this register before the strobe signal is input is [1,1], [1,1] is held and the output does not change. The second modulo-3 output register 408 inputs the output modulo-3 value of the second result modulo-3 coincidence circuit 406 through the data path 46, stores it by the strobe signal, and then outputs it through the data path 48. This modulo three value D is used as one output of the arithmetic circuit 4000 for input to the modulo three circuit in the subsequent stage. However, when the value held in this register before the strobe signal is input is [1,1], [1,1] is held and
The output does not change. When a failure occurs in the arithmetic circuit 4000, or when the input data is invalid, the output modulo 3 values C and D become an invalid value [1,1] as the value of modulo 3, and the output C of the arithmetic circuit 4000 or The fact that a failure has occurred at the stage before D can be transmitted to the modulo 3 circuit at the rear stage. Also, after a fault has been reported with a modulo 3-value C or D = [1,1], how can the incorrect modulo 3-value [1,1] be used to know in which part of the circuit the fault has occurred? It is the same as the arithmetic circuit 6000 in FIG. 1 in that it is easy to point out the failure point by checking whether it has propagated. FIG. 5 is a truth table showing an example of the modulo 3 arithmetic circuit used in the present invention. (A) is an addition circuit, (b) is a subtraction circuit, (c) is a multiplication circuit, and (d) is an inversion circuit. The truth of modulo 3 addition, modulo 3 subtraction, modulo 3 multiplication, and modulo 3 inversion circuit, respectively. It is a value table. One in the figure indicates an arbitrary value. An example of the adder circuit in (a) will be described. In the check circuit of the adder circuit for obtaining the sum Z of any two binary numbers X and Y, the value of the modulo 3 of the input binary number X is A = [a 1 ,
a 2 ], the value of the modulo 3 of the input binary number Y is B = [b 1 , b 2 ].
Then, the expected value C = [c 1 , c 2 ] as the value of the modulo 3 of the addition result Z of the binary numbers X and Y is prepared. For example, A =
When [0,1], B = [1,0], C = from the truth table in (a)
It becomes [0,0]. The above is the same as the conventional modulo 3 circuit, but the feature of this circuit is that [1,1] is considered as the value of modulo 3. If the binary number X is modulo 3, the value A = [a 1 , a 2 ]
If A = [1,1] due to the failure of the circuit that generates the expected value C = [c 1 ,
c 2 ] = [1,1]. The same applies to the failure on the binary Y side. That is, there are three cases in which the expected value C becomes [1,1], one in the case of A = [1,1], the other in the case of B = [1,1], and This is the case where C = (1,1] due to a failure of the modulo-3 addition circuit itself, Fig. 6 is a truth table showing an example of the modulo-3 coincidence circuit used in the present invention. Bit data A =
When [a 1 , a 2 ] and B = [b 1 , b 2 ] are A = B, C = [c 1 ,
c 2 ] = [a 1 , a 2 ], when A ≠ B and A or B = [1,
In the case of 1], the 2-bit data C for which C = [c 1 , c 2 ] = [1,1] is output. FIG. 7 includes a modulo-3 arithmetic circuit 302 configured by the logic shown in the truth table of FIG. 5 and a mosculo-3 coincidence circuit 303 configured by the logic shown in the truth table of FIG. It is a block diagram of a check circuit. For example, two binary data X = [0,1,1,0] and Y = [0,1,
0,1], the sum of X and Y Z = X + Y = [1,0,
In the case of the check circuit of the adder circuit that outputs [1, 1], the modulo-3 arithmetic circuit 302 determines the modulo-3 value A = of the binary data X.
[A 1 , a 2 ] = [0,0] and the modulo 3 value of binary data Y B =
Input [b 1 , b 2 ] = [1,0] and add modulo 3 of A and B Is generated as a modulo 3 expected value, and is input to the modulo 3 coincidence circuit 303 through the data path 32. When the binary number Z, which is the sum of binary data X and Y, is input, the modulo 3 generation circuit 301 receives the modulo 3 value D = [d 1 , d of the binary number Z.
2 ] = [1,0] is generated and is used as another input of the modulo 3 coincidence circuit 303 through the data path 31. When the modulo 3 coincidence circuit 303 inputs the modulo 3 value D of the binary number Z through the data path 31 and the expected value C through the data path 32, when D = C, M = [m 1 , m 2 ] =
2-bit data M such that M = [m 1 , m 2 ] = [1,1] when [d 1 , d 2 ], D ≠ C and when D or C = [1,1]
Is output. Here, if a failure occurs in the modulo 3 generation circuit 301 and D =
When it becomes [1,1], input A of modulo 3 arithmetic circuit 302
Or when B = [1,1], modulo 3 arithmetic circuit 3
When a failure occurs in 02 and C = [1,1], and when a failure occurs in the modulo-3 coincidence circuit 303 itself and M = [1,1], the arithmetic circuit unit or the modulo-3 operation is performed. When a failure occurs in the circuit 302 and D ≠ C, the output becomes M = [1,1] in any of the cases, and it is detected that the failure occurs in the circuit before the output M, and the failure is indicated. Modulo 3 value [1,
1] will be output to the check circuit in the subsequent stage. In the check circuit in the subsequent stage, when a value other than [1,1] is input, it is possible to determine that a failure has been detected when the data is normal [1,1]. FIG. 8 is (a) a truth table and (b) a block diagram showing an example of a modulo 3 register used in the present invention. In FIG. 8, the modulo 3 register 501 receives 2-bit data D = [d 1 , d 2 ] and strobe signal STB as inputs,
(A) 2-bit data E with the logical configuration shown in the truth table
= [E 1 , e 2 ] is output. For example, when the strobe signal is input with D = [0,1] when the output E = [1,0] before strobe input, the output E changes from [1,0] to [0,1]. . Similarly, when a strobe signal is input with D = [0,0] in this state, the output E changes from [0,1] to [0,0]. However, when the original state of the output E is [1,1], the state of [1,1] is maintained regardless of the value of D. Therefore, D =
The output E after strobe input in the case of [1,1] or E = [1,1] is fixed to [1,1], and the original modulo 3 value [1,1] is invalid data. It means that the failure of the circuit before this circuit is detected. If an error report signal is generated from the illegal data [1,1] of this circuit, this circuit also serves as an error display flag. FIG. 9 shows an example of a modulo 3 register in which a function of outputting bit data f that can be used for error reporting is added to the modulo 3 register 501 of FIG. 8 (a) truth table and (b) It is a block diagram. In FIG. 9, the modulo 3 register 502 receives 2-bit data D = [d 1 , d 2 ] and strobe signal STB as inputs,
(A) 2-bit data E with the logical configuration shown in the truth table
= [E 1 , e 2 ] and 1-bit data f are output. The 1-bit data f becomes 1 when the strobe signal is input with the input D = [1,1], and then the output E = [1,1].
At the same time, the state of f = 1 will be maintained. Since the 1-bit data f = 1 means that the illegal data [1,1] is input, it can be used as it is as an error report signal. The other operations are the same as those of the modulo 3 register 501 described with reference to FIG. In addition, in the above-mentioned embodiment, although the moshulo 3 circuit is described, the present invention is not limited to this, and modulo W (=
Of course, the same can be applied to the 2 W -1) circuit. [Effects of the Invention] As described above, the present invention considers an incorrect error code as the value of modulo W, and sets the error code as the value of modulo W at the time of detecting a failure, so that the error code of the check circuit itself is A failure can be detected and the failure detection of the previous stage can be transmitted to the check circuit of the subsequent stage. Furthermore, by following the error code transmission path, it is easy to identify the failure location, so there is the effect that the failure detection rate and resolution of the entire check circuit can be improved, and that a configuration suitable for LSI implementation can be achieved.

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

第1図は本発明のモジュロ3回路を使用した演算回路の
一例を示すブロック図,第2図は第1図の演算回路と同
等な各種演算回路を複数個,複数段使用した演算回路の
一例を示すブロック図,第3図は第1図の第1の実施例
に機能を追加した演算回路の一例を示すブロック図,第
4図は第1図の第1の実施例を応用した第4の実施例を
示すブロック図,第5図は本発明に使用されるモジュロ
3演算回路の例を示す真理値表,第6図は本発明に使用
されるモジュロ3一致回路の例を示す真理値表,第7図
は第5図の真理値表で示した論理構成のモジュロ3演算
回路と第6図の真理値表で示した論理構成のモジュロ3
一致回路とを含むチェック回路の例を示すブロック図,
第8図は本発明に使用されるモジュロ3レジスタの例を
示す真理値表とブロック図,第9図は第8図のモジュロ
3レジスタに機能を追加したモジュロ3レジスタの例を
示す真理値表とブロック図,第10図は従来から用いられ
ているモジュロ3回路の一例を示すブロック図,第11図
は演算装置内の演算回路の一部であり,その中間結果に
対するモジュロ3回路の一例を示すブロック図である。 602,603,606,401,402,301……モジュロ3生成回路,604,
605,608,405,406,303……モジュロ3一致回路,704,705,
706,504,505,506,407,408,501,502……モジュロ3レジ
スタ,607,302……モジュロ3演算回路,701,702……入力
レジスタ,601……演算回路,201,204……加算回路,202,2
05……減算回路,203,207……乗算回路,206……反転回
路,507……論理和回路,703……演算結果出力レジスタ,4
000,5000,6000,7000……演算回路,403,404……モジュロ
3減算回路。
FIG. 1 is a block diagram showing an example of an arithmetic circuit using a modulo 3 circuit of the present invention, and FIG. 2 is an example of an arithmetic circuit using a plurality of various arithmetic circuits equivalent to the arithmetic circuit of FIG. FIG. 3 is a block diagram showing an example of an arithmetic circuit in which a function is added to the first embodiment shown in FIG. 1, and FIG. 4 is a fourth embodiment applying the first embodiment shown in FIG. FIG. 5 is a truth table showing an example of a modulo 3 arithmetic circuit used in the present invention, and FIG. 6 is a truth value showing an example of a modulo 3 coincidence circuit used in the present invention. Table and FIG. 7 are modulo 3 of the logic configuration shown in the truth table of FIG. 5 and modulo 3 of the logic configuration shown in the truth table of FIG.
A block diagram showing an example of a check circuit including a matching circuit,
FIG. 8 is a truth table and a block diagram showing an example of a modulo 3 register used in the present invention, and FIG. 9 is a truth table showing an example of a modulo 3 register in which a function is added to the modulo 3 register of FIG. And a block diagram, FIG. 10 is a block diagram showing an example of a modulo 3 circuit conventionally used, and FIG. 11 is a part of an arithmetic circuit in an arithmetic unit, and an example of a modulo 3 circuit for an intermediate result thereof. It is a block diagram shown. 602,603,606,401,402,301 …… Modulo 3 generation circuit, 604,
605,608,405,406,303 ... Modulo 3 matching circuit, 704,705,
706, 504, 505, 506, 407, 408, 501, 502 ... Modulo 3 register, 607, 302 ... Modulo 3 arithmetic circuit, 701, 702 ... Input register, 601 ... Arithmetic circuit, 201, 204 ... Addition circuit, 202, 2
05 …… Subtraction circuit, 203, 207 …… Multiplication circuit, 206 …… Inversion circuit, 507 …… OR circuit, 703 …… Operation result output register, 4
000, 5000, 6000, 7000 ... Arithmetic circuit, 403, 404 ... Modulo-3 subtraction circuit.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】wビットの入力、wビットの出力を有する
モジュロW回路であって、wビット(w≧2)で表現す
ることができる2w通りの2進値のうち、全ビットが“1"
を除くW(=2w−1)通りの2進値のうち1通りのコー
ドは、故障が検出されたことを示すエラーコードとして
定義され、全ビットが“1"を含む残りのW(=2w−1)
通りの2進値は、モジュロWのW通りのコードとして定
義され、故障が発生又は故障を検出してエラーコードを
生成した際には、そのエラーコードを伝搬させることを
特徴とするモジュロW回路であって、n個のwビットデ
ータA1=[a11,a12…,a1w],A2=[a21,a22…,a2w],
…,An=[an1,an2,…,anw]の入力のうちの1つ以上が
前記エラーコードを示しているとき、wビットデータC
=[c1,c2,…,cw]として前記エラーコードを出力する
ことを特徴とするモジュロW回路。
1. A modulo W circuit having a w-bit input and a w-bit output, wherein all 2 w of binary values represented by w bits (w ≧ 2) are “. 1 "
One of the W (= 2 w -1) binary values except for is defined as an error code indicating that a failure has been detected, and the remaining W (= all the bits include "1" (= 2 w -1)
A binary value is defined as W modulo W codes, and when a fault occurs or a fault is detected and an error code is generated, the error code is propagated. And n pieces of w-bit data A 1 = [a 11 ,, a 12 ..., a 1w ], A 2 = [a 21 , a 22 ..., a 2w ],
,, A n = [a n1 , a n2 , ..., a nw ] When at least one of the inputs indicates the error code, w bit data C
A modulo W circuit which outputs the error code as = [c 1 , c 2 , ..., C w ].
JP62158808A 1986-07-03 1987-06-27 Modulo W circuit Expired - Lifetime JPH0786840B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP15500986 1986-07-03
JP61-155009 1986-07-03

Publications (2)

Publication Number Publication Date
JPS63145547A JPS63145547A (en) 1988-06-17
JPH0786840B2 true JPH0786840B2 (en) 1995-09-20

Family

ID=15596693

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62158808A Expired - Lifetime JPH0786840B2 (en) 1986-07-03 1987-06-27 Modulo W circuit

Country Status (1)

Country Link
JP (1) JPH0786840B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7376890B2 (en) 2004-05-27 2008-05-20 International Business Machines Corporation Method and system for checking rotate, shift and sign extension functions using a modulo function
JP4869911B2 (en) * 2006-12-26 2012-02-08 エヌイーシーコンピュータテクノ株式会社 Logic BIST circuit and modulo circuit

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5718741B2 (en) * 1972-10-25 1982-04-19
JPS5359308A (en) * 1976-11-09 1978-05-29 Fujitsu Ltd Information recording control system
JPS5616241A (en) * 1979-07-19 1981-02-17 Hitachi Ltd Processing unit

Also Published As

Publication number Publication date
JPS63145547A (en) 1988-06-17

Similar Documents

Publication Publication Date Title
Lo et al. An SFS Berger check prediction ALU and its application to self-checking processor designs
Hayes Transition count testing of combinational logic circuits
US4635261A (en) On chip test system for configurable gate arrays
US7353470B2 (en) Variable clocked scan test improvements
JPH0786840B2 (en) Modulo W circuit
Hsieh et al. DR-scan: Dual-rail asynchronous scan DfT and ATPG
US5467292A (en) Logical operation method employing parallel arithmetic unit
JPH0542016B2 (en)
JP3137034B2 (en) Address trap comparison circuit for easy failure verification
US12578386B2 (en) Scan chain control
JPH0542015B2 (en)
JPH0542017B2 (en)
US20020013919A1 (en) Integrated circuit that is robust against circuit errors
Dorr Self-checking combinational logic binary counters
JPH0583933B2 (en)
JPH05282171A (en) Counter
JP2806459B2 (en) A logic simulation device that can evaluate flip-flops
Greblicki et al. Design of totally self-checking code-disjoint synchronous sequential circuits
JPH06201779A (en) Test circuit
Busaba et al. An Approach for Self‐Checking Realization of Interacting Finite State Machines
Kamiura et al. Design and fault diagnosis of cellular arrays realizing multiple‐valued logic functions
Geurkov On the Theory and Design of Polynomial Division Circuits
Göessel et al. Principles of Concurrent Checking
Yu et al. Testable on-the-fly carry-save multiplier by alternating input data
JPH03189736A (en) Fault detecting system for selection circuit