JPH0542017B2 - - Google Patents
Info
- Publication number
- JPH0542017B2 JPH0542017B2 JP87158807A JP15880787A JPH0542017B2 JP H0542017 B2 JPH0542017 B2 JP H0542017B2 JP 87158807 A JP87158807 A JP 87158807A JP 15880787 A JP15880787 A JP 15880787A JP H0542017 B2 JPH0542017 B2 JP H0542017B2
- Authority
- JP
- Japan
- Prior art keywords
- modulo
- value
- input
- circuit
- 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
Links
- 230000005540 biological transmission Effects 0.000 claims description 7
- 238000010586 diagram Methods 0.000 description 22
- 238000001514 detection method Methods 0.000 description 8
- 230000002159 abnormal effect Effects 0.000 description 4
- 238000000034 method Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 230000000717 retained effect Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
Description
〔産業上の利用分野〕
本発明はデータ処理装置に関し、特に演算回路
等のチエツクに用いられるモジユロW回路に関す
る。
〔従来の技術〕
モジユロW回路は、主に演算回路等のチエツク
回路として、従来より頻繁に使用されているチエ
ツク回路の1つである。ところで、モジユラスW
としてはW=2w−1(例えば、3、7、15、…)
がしばしば用いられる。この理由は、モジユロW
の値をwビツトで表現できるから、他のモジユラ
スに比べて低コストで実現できるからである(以
下、W=2w−1の代表としてW=22−1=3を考
える。wは2以上の整数)。モジユロ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入力オペランドレジスタ900
1、第2入力オペランドレジスタ9002に格納
し、演算回路9011によつて、第1入力オペラ
ンドと第2入力オペランドとの間の演算を実行
し、その結果を演算結果レジスタ9003に格納
し、その後出力する。
この演算装置9000におけるモジユロ3回路
は、モジユロ3期待値生成回路9012と、モジ
ユロ3期待値レジスタ9004と、モジユロ3一
致チエツク9013と、エラー表示フラグ900
5とで構成される。
モジユロ3期待値生成回路9012は第1入力
オペランドレジスタ9001と第2入力オペラン
ドレジスタ9002とから、それぞれデータパス
901,902を通して第1入力オペランドと第
2入力オペランドとを入力すると、演算回路90
11に対応したモジユロ3演算を実行し、演算結
果のモジユロ3の期待値を生成してデータパス9
12を通してモジユロ3期待値レジスタ9004
に出力する。
モジユロ3期待値レジスタ9004はモジユロ
3期待値生成回路9012の出力であるモジユロ
3期待値をデータパス912を通して入力し、格
納した後、データパス904を通してモジユロ3
一致チエツク回路9013に出力する。
モジユロ3一致チエツク回路9013は演算結
果レジスタ9003よりデータパス903を通し
て演算結果を入力すると共に、モジユロ3期待値
レジスタ9004よりデータパス904を通して
モジユロ3期待値を入力すると、演算結果のモジ
ユロ3を生成し、この値と、モジユロ3期待値が
一致しているか否かをチエツクし、一致していな
いときはエラー報告をデータパス913を通して
エラー表示フラグ9005に出力する。
エラー表示フラグ(以下EIFと呼ぶ)9005
はデータパス913を通してエラー報告を入力す
るとそれを格納し、以後解除信号を入力するまで
その値を保持すると共に、エラー報告をデータパ
ス905を通し、出力する。
上述した動作により、演算装置9000の故障
が検出され、報告されるが一般的にモジユロ3チ
エツク回路においては、第10図で説明したより
も詳細にチエツクを実行している。つまり、演算
回路の最終結果だけでなく、中間結果に対しても
同様な一致チエツクが実行されている。この場合
の中間結果のモジユロ3期待値はデータパス92
1を通つて演算回路に入力される。
第11図は、演算装置内の演算回路の一部であ
つて、その中間結果に対してモジユロ3チエツク
を実行する場合の一例を示す図である。
第11図を参照して、演算回路8000は2個
の2進データX、Yとそれぞれのモジユロ3値
A、Bとを入力し、XとYとの間の演算結果Z
と、Zのモジユロ3値Cと、モジユロ3チエツク
の結果によるエラー報告Eとを出力する。
第1入力レジスタ801と第2入力レジスタ8
02とはそれぞれXとYとを入力し、格納した
後、それぞれデータパス81,82を通してX、
Yを出力し、図示のように演算回路811と、第
1入力モジユロ3生成回路812と第2入力モジ
ユロ3生成回路813の1入力とする。
演算回路811は、データパス81を通してX
を、データパス82を通してYを入力するとXと
Yとの間で演算を実行し、その演算結果Zをデー
タパス91を通し、演算結果出力レジスタ803
に出力する。
演算結果出力レジスタ803はデータパス91
を通してZを入力し格納した後、データパス83
を通してZを出力する。Zは演算結果8000の
出力となると共に、演算結果モジユロ3生成回路
816の1入力となる。
第1入力モジユロ3生成回路812はデータパ
ス81を通してXを入力すると、そのモジユロ3
値を生成し、データパス92を通して出力し、一
致回路814と、第1モジユロ3保持レジスタ8
04の入力とする。
第2入力モジユロ3生成回路813はデータパ
ス82を通してYを入力すると、そのモジユロ3
値を生成しデータパス93を通して出力し、一致
回路815と、第2モジユロ3保持レジスタ80
5の入力とする。
第1モジユロ3保持レジスタ804と第2モジ
ユロ3保持レジスタ805は、それぞれデータパ
ス92,93を通してX、Yのモジユロ3値を入
力し、格納した後、それぞれデータパス84,8
5を通してモジユロ3演算回路817に入力され
る。
モジユロ3演算回路817はデータパス84を
通してXのモジユロ3値を、データパス85を通
してYのモジユロ3値を入力し、演算回路811
の演算に対応したモジユロ3演算を実行し、演算
結果Zのモジユロ3の期待値を生成し、データパ
ス97を通して出力し、一致回路818の1入力
とする。
演算回路モジユロ3生成回路816はデータパ
ス83を通して演算結果Zを入力するとZのモジ
ユロ3値を生成しデータパス96を通して一致回
路818と、モジユロ3出力レジスタ806の1
入力とする。
モジユロ3出力レジスタ806はデータパス9
6を通してZのモジユロ3値を入力し、格納し
た、後データパス86を通してZのモジユロ3値
Cを出力する。Cは演算回路8000の1出力と
して、後段のモジユロ3チエツク回路の入力等に
用いられる。
一致回路814は、データパス92を通して、
Xのモジユロ3値を入力すると共に、Xのモジユ
ロ3期待値Aを入力し、Xのモジユロ3値と、そ
の期待値Aが一致しているか否かをチエツクし、
一致していないときはエラー報告をデータパス9
4を通してEIF(エラー表示フラグ)808に出
力する。
一致回路815は、データパス93より入力さ
れるYのモジユロ3値と、その期待値Bとを比較
し、その結果をデータパス95を通してEIF80
9に出力する。
さらに、一致回路818はデータパス96より
入力されるZのモジユロ3値と、データパス97
より入力される期待値とを比較し、その結果をデ
ータパス98を通してEIF807に出力する。
EIF807,808、及び809は、それぞれ
データパス98,94、及び95を通してエラー
報告を入力すると、それを格納し、以後解除信号
を入力するまでその値を保持すると共に、その値
を論理和回路810に出力する。
論理和回路810は、EIF807,808、及
び809のいずれかよりエラー報告を入力する
と、故障発生を示すエラー報告Eを演算回路80
00の1出力として出力する。
〔発明が解決しようとする問題点〕
第10図及び第11図に示す従来のモジユロ3
回路では、モジユロ3が「データの示す数値を3
で割つた余り。」であるという数字的理由から、
モジユロ3の値として3つまり2進データ〔1、
1〕は考慮されていないが、本来データ処理装置
で用いられるモジユロ3回路は回路の故障を検出
するためのチエツク回路に用いられているのであ
るから、故障によつてモジユロ3の値が〔1、
1〕となるケースも考慮すべきである。
例えば第11図において、第1入力モジユロ3
生成回路812の故障によりデータパス92のパ
ス上に2進データ〔1、1〕が出力された場合、
従来のモジユロ3回路は〔1、1〕の入力に対す
る出力は不定とされ、一致回路814、モジユロ
3演算回路817、一致回路818等の出力は、
論理的な意味を持たず、その回路構成に依存す
る。
従つてモジユロ3回路自体の故障によつて
〔1、1〕のパターンが生じた場合、その故障を
検出する事は紺なであり、さらに演算回路上の故
障によつて演算結果が不正となつた場合もそのモ
ジユロ3の値が、上記〔1、1〕に対する出力と
同じ値の場合には、その故障は検出されず、その
チエツク回路の検出率は著しく低下するばかりで
なく、それより下段のチエツク回路において、エ
ラー表示フラグが点灯した時にはその故障箇所の
指摘に誤りを生ずる要因となる。
また演算回路の一部をLSI等で実現する様な場
合そのLSI等単体の故障検出のための評価には、
通常ある種のテストパターンの入力に対する出力
およびフリツプフロツプ内の値を用いて、LSI等
内の論理ゲートや論理パターンの検証をする。
LSI内にモジユロ3回路を含む場合には、テスト
入力として〔1、1〕のケースを含まないと、そ
の検出率が向上しないため、演算回路全体として
は論理的に全く無意味とされる〔1、1〕の入力
に対しても論理の記述が必要となりその論理は前
述のように回路構成に完全に依存するため、非常
に複雑で容易に理解しがたい記述となつてしま
う。
一方モジユロ3を用いたチエツク方式として
は、前述の様にモジユロ3の期待値と、実際の演
算結果から生成されるモジユロ3の値とを一致チ
エツクするため、検出率を向上させるためには演
算回路各部の期待値を生成し、その個々にエラー
フラグを設定する必要があり、ハードウエア量の
増加が大きいと共に、その中の複数のエラーフラ
グが点灯した時には、その原因が同じ故障による
ものか否かの判別が困難である。
一般に、従来のモジユロW回路では2進値
〔1、…、1〕に対する考慮がされていないため、
モジユロW回路としての故障の検出率、分割能の
向上が困難であり、さらに近年のLSI化に伴うチ
エツク回路の検証の際、無意味な〔1、…、1〕
の論理記述が設計効率向上の妨げとなつていると
いう欠点がある。
〔問題点を解決するための手段〕
本発明では、n(nは2以上の整数)個のw(w
は2以上の整数)ビツトデータA1=〔a11、…、
a1w〕、A2=〔a21、…、a2w〕…、Ao=〔ao1、…、
aow〕が入力とし、該n個の入力A1、A2、…、
Ao間でのモジユロW演算の結果をD=〔d1、…、
dw〕としたとき、前記入力A1、A2、…、Aoのう
ちの1つ以上が〔1、…、1〕のときはC=〔1、
…、1〕、その他のときはC=〔d1、…、dw〕とな
るwビツトデータC=〔c1、…、cw〕を出力する
モジユロW演算回路と、NビツトのデータZのう
ち、MビツトのデータZ1を入力とし、該データZ1
のモジユロW値E=〔e1、…、ew〕を生成し出力
する第1モジユロW生成回路と、前記データZの
うち、前記データZ1を除いたN−Mビツトのデー
タZ2を入力とし、該データZ2のモジユロW値F=
〔f1、…、fw〕を生成し出力する第2モジユロW
生成回路と、前記モジユロW演算回路の出力CK
〔c1、…、cw〕と、前記第2モジユロW生成回路
の出力F=〔f1、…、fw〕とを入力とし、該入力
CとFとの差C−FのモジユロW値をG=〔g1、
…、gw〕としたとき、前記入力C、Fのうちの
1つ以上が〔1、…、1〕のときはH=〔1、…、
1〕その他のときはH=〔g1、…、gw〕となるw
ビツトデータH=〔h1、…、hw〕を出力するモジ
ユロW減算回路と、該モジユロW減算回路の出力
H=〔h1、…、hw〕と、前記第1モジユロW生成
回路の出力E=〔e1、…、ew〕とを入力とし、H
=EのときはK=〔e1、…、ew〕、H≠Eまたは
H、Eのうちの1つ以上が〔1、…、1〕のとき
はK=〔1、…、1〕となるwビツトデータK=
〔k1、…、kw〕を出力するモジユロW一致回路と
を備え、前記n個の入力データA1、A2、…、Ao
間の演算結果Dから前記モジユロW値Fを差し引
いた結果Gと、前記モジユロW値Eとが一致し、
かつ、入力データのなかに〔1、…、1〕の値が
ないときは、K=E=〔e1,…,ew〕、その他のと
きはK=〔1,…,1〕となるwビツトデータK
=〔k1、…、kw〕を出力するようにしたことを特
徴とするモジユロW回路が得られる。
本発明ではさらに、モジユロW値の伝達パス上
にあつて、該モジユロW値L=〔l1、…、lw〕と、
ストローブ信号とを入力とし、出力P=〔1、…、
1〕の状態でストローブ信号を入力するとP=
〔1、…、1〕、その他の状態でストローブ信号を
入力するとP=〔l1、…、lw〕となるWビツトデ
ータP=〔p1、…、pw〕を、前記入力L=〔l1、
…、lw〕の1ストローブ後のモジユロW値として
出力するモジユロWレジスタを備えており、前記
n個の入力データA1、A2、…、Ao間の演算結果
Dから前記モジユロW値Fを差し引いた結果G
と、前記モジユロW値Eとが一致し、かつ、入力
データのなかに〔1、…、1〕の値がないとき
は、wビツトデータK=E=〔e1、…、ew〕を出
力し、その他のときはK=〔1、…、1〕を保持
し、出力すると共に、前記モジユロWレジスタの
保持値によつて、〔1、…、1〕の伝達経路を検
出するようにしたことを特徴とするモジユロW回
路が得られる。
また本発明では上記のモジユロWレジスタに
は、前記入力L=〔1、…、1〕またはP=〔1、
…、1〕の状態でストローブ信号を入力するとq
=1、その他の状態でストローブ信号を入力する
とq=0となる1ビツトデータqを出力する機能
が付加され、前記n個の入力データA1、A2、…、
Ao間の演算結果Dから前記モジユロW値Fを差
し引いた結果Gと、前記モジユロW値Eとが一致
し、かつ、入力データのなかに〔1、…、1〕の
値がないときはwビツトデータK=E=〔e1、…、
ew〕を出力し、その他のときはK=〔1、…、1〕
を保持し、該wビツトデーKEと前記1ビツトデ
ータqによつて、エラー報告とを出力すると共に
前記モジユロWレジスタの保持値によつて〔1、
…、1〕の伝達経路を検出するようにしたことを
特徴とするモジユロW回路が得られる。
〔実施例〕
次に本発明について図面を参照して説明する。
なお、ここでは、モジユロW回路の一例としてモ
ジユロ3回路について説明する。
第1図は、本発明の第1の実施例を示すブロツ
ク図である。
第1図を参照して、モジユロ3回路1000
は、NビツトのデータZと、2個の2ビツトデー
タA、Bとを入力とし、ZのNビツトのうちのM
ビツト(M<N)のデータZ1のモジユロ3値Kを
出力する。
第1モジユロ3生成回路101は、Nビツトの
入力データZのうちのMビツトのデータZ1を入力
すると、Z1のモジユロ3値E=〔e1、e2〕を生成
し、データパス11を通して出力し、モジユロ3
一致回路105の1入力とする。
第2モジユロ3生成回路102は、Nビツトの
入力データZのうちのデータZ1を除いたN−Mビ
ツトのデータZ2を入力すると、Z2のモジユロ3値
F=〔f1、f2〕を生成し、データパス12を通し
て出力し、モジユロ3減算回路104の1入力と
する。
モジユロ3演算回路103は、2個の2ビツト
データA、Bとを入力し、A、B間でモジユロ3
演算を実行し、その結果のモジユロ3値をD=
〔d1、d2〕とすると、C=D=〔d1、d2〕となる2
ビツトデータC=〔c1、c2〕を出力する。ただし
入力A、Bのうちの1つ以上が〔1、1〕のとき
はC=〔1、1〕を出力する。出力Cは、データ
パス13を通つてモジユロ3減算回路104の1
入力となる。
モジユロ3減算回路104は、データパス12
を通してモジユロ3値Fを、データパス13を通
してモジユロ3値Cを入力すると、C−Fのモジ
ユロ3減算を実行し、その結果のモジユロ3値を
G=〔g1、g2〕とすると、H=G=〔g1、g2〕とな
る2ビツトデータH=〔h1、h2〕を出力する。た
だし、入力C、Fのうちの1以上が〔1、1〕の
ときはH=〔1、1〕を出力する。出力Hはデー
タパス14を通つてモジユロ3一致回路105の
1入力となる。
モジユロ3一致回路105はデータパス11を
通してモジユロ3値Eを、データパス14を通し
てモジユロ3値Hを入力すると、EとHの一致チ
エツクを実行し、H=EのときはK=E=〔e1、
e2〕となる2ビツトデータKを出力する。ただ
し、H≠Eまたは入力H、Eのうちの1つ以上が
〔1、1〕のときはK=〔1、1〕を出力する。出
力Kはデータパス15を通つてモジユロ3回路1
000の出力となる。
モジユロ3回路1000において、例えば第2
モジユロ3回路102の故障によつてデータパス
12上にモジユロ3の値として〔1、1〕が発生
すると、この〔1、1〕の値はモジユロ3減算回
路104を経て、データパス14を通りモジユロ
3一致回路105を経て、データパス15を通
り、モジユロ3値K=〔1、1〕を出力する。
また、第2の例として、入力A=〔1、1〕の
時は、〔1、1〕の値はモジユロ3演算回路10
3を経て、データパス13を通り、モジユロ3減
算回路104を経て、データパス14を通り、モ
ジユロ3一致回路105を経てデータパス15を
通り、モジユロ3値K=〔1、1〕を出力する。
さらに第3の例として、モジユロ3回路100
0を、Nビツトの2進数XとYとの和Zの上位M
ビツトデータZ1を求める加算回路のチエツク回路
として使用し、XとYのそれぞれのモジユロ3値
をA、Bとすると、モジユロ3演算回路103
は、AとBとの間でモジユロ3加算を実行し、A
□+Bのモジユロ3値をD=〔d1、d2〕とすると、
C=D=〔d1、d2〕となる2ビツトデータC=
〔c1、c2〕をデータパス13を通して出力し、モ
ジユロ3減算回路の1入力とする。一方、加算結
果のNビツトのデータZのうち、下位N−Mビツ
トのデータZ2が第2モジユロ3生成回路102に
入力され、Z2のモジユロ3値F=〔f1、f2〕がデ
ータパス12を通つてモジユロ3減算回路の1入
力となる。モジユロ3減算回路ではC−Fのモジ
ユロ3値をG=〔g1、g2〕とすると、H=G=
〔g1、g2〕となる2ビツトデータHをデータパス
14を通して出力し、モジユロ3一致回路の1入
力とする。第1モジユロ3生成回路の加算結果の
NビツトのデータZのうち上位Mビツトのデータ
Z1を入力し、Z1のモジユロ3値Eを生成しデータ
パス11を通して出力し、モジユロ3一致回路1
05の1入力とする。ここでZのモジユロ3値=
Z1のモジユロ3値+Z2のモジユロ3値=Xのモジ
ユロ3値+Yのモジユロ3値というモジユロ3演
算における等式が成立するから、□+をモジユロ3
加算、□−をモジユロ3減算とすると、Z1のモジユ
ロ3値E=A□+B□−F=C□−F=Hのはずであ
る。従つてモジユロ3一致回路の出力K=E=
〔e1、e2〕となる。しかし、XとYの加算回路の
故障またはモジユロ3回路自体の故障によりH≠
EまたはH、Eのうちの1つ以上が〔1、1〕と
なつた時は、出力K=〔1、1〕となる。
以上述べた様に、モジユロ3回路1000内の
故障、または入力モジユロ3値の異常、またはチ
エツク対象の演算回路の故障の時は、出力モジユ
ロ3値Kは、モジユロ3の値としては不正な値
〔1、1〕となり、モジユロ3回路1000の出
力Kより、前段で故障が発生していることを後段
のモジユロ3回路に伝達する事ができる。
第2図は本発明の第2の実施例であり、本発明
のモジユロ3回路をチエツク回路として使用した
演算回路のブロツク図である。
第2図を参照して、演算回路2000は、2個
の2進データX、Yと、それぞれのモジユロ3値
A、Bとを入力とし、XとYとの間の演算結果Z
のうちの1部のデータZ1と、Z1のモジユロ3値C
とを出力する。
第1入力レジスタ701と、第2入力レジスタ
702は、それぞれXとYとを入力し、格納した
後、それぞれデータパス71,72を通してX、
Yを出力し、図示のように演算回路601と、第
1入力モジユロ3生成回路602と、第2入力モ
ジユロ3回路603の1入力とする。
演算回路601は、データパス71を通してX
を、データパス72を通してYを入力すると、X
とYとの間で演算を実行し、その演算結果Zをデ
ータパス61を通し、演算結果出力レジスタ70
3に出力する。
演算結果出力レジスタ703は、データパス6
1を通してZを入力し、格納した後、データパス
731を通してZの1部のデータZ1を、データパ
ス732を通して残りのデータZ2を出力する。Z1
は演算回路2000の出力となると共に、第1結
果モジユロ3生成回路201の1入力となり、Z2
は第2結果モジユロ3生成回路202の1入力と
なる。
第1入力モジユロ3生成回路602は、データ
パス71を通してXを入力すると、そのモジユロ
3値を生成し、データパス62を通して出力し、
第1入力モジユロ3一致回路604の1入力とす
る。
第2入力モジユロ3生成回路603は、データ
パス72を通してYを入力すると、そのモジユロ
3値を生成し、データパス63を通して出力し、
第2入力モジユロ3一致回路605の1入力とす
る。
第1結果モジユロ3生成回路201は、データ
パス731を通してZ1を入力すると、そのモジユ
ロ3値を生成し、データパス21を通して出力
し、第1結果モジユロ3一致回路204の1入力
とする。
第2結果モジユロ3生成回路202はデータパ
ス732を通してZ2を入力すると、そのモジユロ
3値を生成し、データパス22を通して出力し、
モジユロ3減算回路203の1入力とする。
第1入力モジユロ3一致回路604はデータパ
ス62を通してXのモジユロ3値を入力すると共
に、Xのモジユロ3期待値Aを入力し、Xのモジ
ユロ3値と、この期待値Aが一致しているか否か
をチエツクし、一致している時はXのモジユロ3
値をそのまま出力し、Xのモジユロ3値と期待値
Aとのいずれかが〔1、1〕の時、あるいはXの
モジユロ3値と期待値Aが一致していない時は
〔1、1〕を出力し、出力されたモジユロ3値は
データパス64を通して第1モジユロ3保持レジ
スタ704の1入力とする。
第2入力モジユロ3一致回路605はデータパ
ス63を通してYのモジユロ3値を入力すると共
に、Yのモジユロ3期待値Bを入力し、第1入力
モジユロ3一致回路604と同様に一致チエツク
を実行し、Yのモジユロ3値あるいは〔1、1〕
を、データパス65を通して出力し、第2モジユ
ロ3保持レジスタ705の1入力とする。
第1モジユロ3保持レジスタ704は、データ
パス64を通して、第1入力モジユロ3一致回路
604の出力モジユロ3値を入力し、ストローブ
信号によつて格納後、データパス74を通して出
力し、モジユロ3演算回路607の1入力とす
る。ただし、ストローブ信号入力前の本レジスタ
内の保持値が〔1、1〕のときはストローブ信号
入力後も〔1、1〕が保持され、ストローブ信号
に拘らず、本レジスタの出力モジユロ3値は
〔1、1〕を保ち、変化しない。
第2モジユロ3保持レジスタ705は、データ
パス65を通し、第2入力モジユロ3一致回路6
05の出力モジユロ3値を入力し、ストローブ信
号によつて格納後、データパス75を通して出力
し、モジユロ3演算回路607の1入力となる。
ただし、ストローブ信号入力前の本レジスタ内
の保持値が〔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減算回路203の1入力とする。
モジユロ3減算回路203はデータパス22を
通して前記演算結果Zの一部Z2のモジユロ3値を
入力すると共に、データパス67を通してZのモ
ジユロ3期待値を入力とし、いずれかのモジユロ
3値が〔1、1〕のときは〔1、1〕をそのまま
出力し、両方共に〔1、1〕でない時には、Z−
Z2のモジユロ3値を生成して出力する。
モジユロ3減算回路203の出力は、演算結果
の一部Z1のモジユロ3期待値としてデータパス2
3を通して第1結果モジユール3一致回路204
の1入力となる。
第1結果モジユロ3一致回路204は、データ
パス21を通して演算結果Zの一部Z1のモジユロ
3値を入力すると共に、データパス23を通して
Z1のモジユロ3期待値を入力すると、第1入力モ
ジユロ3一致回路604、および第2入力モジユ
ロ3一致回路605と同様に、Z1のモジユロ3値
と、その期待値との一致チエツクを実行し、一致
している時はZ1のモジユロ3値をそのまま出力
し、Z1のモジユロ3値と期待値とのいずれかが
〔1、1〕の時、あるいはZ1のモジユロ3値とそ
の期待値が一致していない時は〔1、1〕を出力
し、出力されたモジユロ3値は、データパス24
を通してモジユロ3出力レジスタ706の入力と
なる。
モジユロ3出力レジスタ706は第1結果モジ
ユロ3一致回路204の出力モジユロ3値をデー
タパス68を通して入力し、ストローブ信号によ
つて格納後、データパス76を通して出力する。
この出力モジユロ3値は、演算回路2000の1
出力として後段のモジユロ3回路の入力等に用い
られる。
ただし、ストローブ信号入力前の本レジスタ内
の保持値が〔1、1〕の時は、第1、第2モジユ
ロ3保持レジスタ704,705と同様に、〔1、
1〕が保持され、出力は変化しない。
演算回路2000において、例えば第1モジユ
ロ3保持レジスタ704の出力に故障が生じ、デ
ータパス74上のモジユロ3値が〔1、1〕とな
つた場合、モジユロ3の値として不正な値〔1、
1〕は、データパス74を通り、モジユロ3演算
回路607を経て、データパス67を通り、モジ
ユロ3減算回路203を経て、データパス23を
通り、第1結果モジユロ3一致回路204を経
て、データパス24を通りモジユロ3出力レジス
タ706を経て、データパス76を通つて、モジ
ユロ3値C=〔1、1〕を出力する。
また第2の例として第2入力モジユロ3一致回
路605によりYのモジユロ3値と、その期待値
Bが一致しない時は、〔1、1〕がデータパス6
5を通して出力され、第2モジユロ3保持レジス
タ705からデータパス75を通り、モジユロ3
演算回路607からデータパス67を通り、モジ
ユロ3減算回路203から、データパス23を通
り、第1結果モジユロ3一致回路204からデー
タパス24を通り、モジユロ3出力レジスタ70
6からデータパス76を通つてモジユロ3値C=
〔1、1〕を出力する。
さらに演算回路601の故障によつて演算結果
Zが異常な値のときは、データパス21,22上
のモジユロ3値はいずれかのモジユロ3値が異常
となる。データパス22上のモジユロ3値が異常
な値のときは、モジユロ3減算回路203を経て
データパス23を通り、Z1のモジユロ3期待値と
しては異常な値が第1結果モジユロ3一致回路2
04に入力され、データパス21からのZ1のモジ
ユロ3値と一致チエツクが実行され、一致しない
時の値〔1、1〕がデータパス24を通つて出力
され、モジユロ3出力レジスタ706からデータ
パス76を通つて、モジユロ3値C=〔1、1〕
を出力する。
入力の期待値A=〔1、1〕の場合も同様であ
り、データパス64,74,67,23,24、
及び76上のモジユロ3値は〔1、1〕となり、
モジユロ3値C=〔1、1〕を出力する。
以上述べた様に、演算回路2000内に故障が
生じた時または入力データが不正の時には、出力
モジユロ3値Cはモジユロ3の値として不正な値
〔1、1〕となり、演算回路2000の出力Cよ
り前段で故障が生じた事を後段のモジユロ3回路
に伝達する事ができる。
またこのモジユロ3値C=〔1、1〕によつて、
故障が報告された後回路全体のどの部分で故障が
生じたかを知るために、不正なモジユロ3値
〔1、1〕がどのように伝搬してきたかを調べれ
ば、故障箇所を指摘することが容易である。
第3図は本発明の第3の実施例を示すブロツク
図であり、第2図の演算回路2000内の3個の
モジユロ3レジスタ704,705,706に入
力モジユロ3値または出力モジユロ3値が〔1、
1〕の状態でストローブ信号を入力すると〔1〕、
その他の状態でストローブ信号を入力すると
[Industrial Application Field] The present invention relates to a data processing device, and particularly to a modulo W circuit used for checking an arithmetic circuit or the like. [Prior Art] A modulo W circuit is one of the check circuits that has been frequently used in the past, mainly as a check circuit for arithmetic circuits and the like. By the way, Modulus W
as W=2 w −1 (e.g. 3, 7, 15,…)
is often used. The reason for this is Mojiyuro W
This is because the value of can be expressed in w bits, so it can be realized at a lower cost than other moduli (Hereafter, we will consider W = 2 2 - 1 = 3 as a representative of W = 2 w - 1. w is 2 (integer greater than or equal to). For the three values of modulus 3, 0, 1, and 2, there are four values that can be expressed with 2-bit data: [0, 0], [0, 1],
Define three values among [1, 0] and [1, 1]. For example, 0 corresponds to [0, 0], 1 corresponds to [0, 1], and 2 corresponds to [1, 0]. FIG. 10 shows an example of a conventional three-modulo circuit. Referring to FIG. 10, arithmetic device 9000:
When the first input data and the second input data are input, the respective first input operand registers 900
1. Store in the second input operand register 9002, execute the calculation between the first input operand and the second input operand by the calculation circuit 9011, store the result in the calculation result register 9003, and then output do. The modulo 3 circuit in this arithmetic unit 9000 includes a modulo 3 expected value generation circuit 9012, a modulo 3 expected value register 9004, a modulo 3 coincidence check 9013, and an error display flag 900.
It consists of 5. When a first input operand and a second input operand are input from a first input operand register 9001 and a second input operand register 9002 through data paths 901 and 902, respectively, the modulo-3 expected value generation circuit 9012 generates an arithmetic operation circuit 9012.
Execute the modulo 3 operation corresponding to 11, generate the expected value of modulo 3 of the calculation result, and send it to the data path 9.
Modulo 3 expected value register 9004 through 12
Output to. The modulo 3 expected value register 9004 inputs the modulo 3 expected value which is the output of the modulo 3 expected value generation circuit 9012 through the data path 912 and stores it.
Output to match check circuit 9013. The modulo 3 match check circuit 9013 inputs the calculation result from the calculation result register 9003 through the data path 903, and also inputs the expected modulo 3 value from the modulo 3 expected value register 9004 through the data path 904, and generates the calculation result modulo 3. , checks whether or not this value matches the modulo 3 expected value. If they do not match, an error report is output to the error display flag 9005 through the data path 913. Error display flag (hereinafter referred to as EIF) 9005
When the error report is input through the data path 913, it is stored, and the value is held until the release signal is input thereafter, and the error report is output through the data path 905. Through the above-described operation, a failure in the arithmetic unit 9000 is detected and reported, but the check is generally executed in more detail than that described in FIG. 10 in the modulo 3 check circuit. In other words, a similar consistency check is performed not only on the final result of the arithmetic circuit, but also on intermediate results. In this case, the modulo 3 expected value of the intermediate result is data path 92
1 and is input to the arithmetic circuit. FIG. 11 is a part of an arithmetic circuit in an arithmetic device, and is a diagram showing an example of a case where a modulo 3 check is executed on an intermediate result thereof. Referring to FIG. 11, an arithmetic circuit 8000 inputs two binary data X, Y and their respective modulo ternary values A, B, and calculates an arithmetic result Z between X and Y.
, the modulo 3 value C of Z, and an error report E based on the result of the modulo 3 check. First input register 801 and second input register 8
02 means that after inputting and storing X and Y, X and Y are input through data paths 81 and 82, respectively.
Y is output and is used as one input of an arithmetic circuit 811, a first input modulo 3 generation circuit 812, and a second input modulo 3 generation circuit 813 as shown. The arithmetic circuit 811 receives X through the data path 81.
When Y is input through the data path 82, an operation is performed between X and Y, and the operation result Z is passed through the data path 91 and output to the operation result output register 803.
Output to. Operation result output register 803 is connected to data path 91
After inputting and storing Z through the data path 83
Outputs Z through. Z becomes the output of the calculation result 8000 and one input of the calculation result modulo 3 generation circuit 816. When X is input through the data path 81, the first input modulo 3 generation circuit 812 generates the modulo 3
A value is generated and output through data path 92 to match circuit 814 and first modulo 3 holding register 8.
04 input. When Y is input through the data path 82, the second input modulo 3 generation circuit 813 generates the modulo 3
A value is generated and output through data path 93 to match circuit 815 and second modulo 3 holding register 80.
5 input. The first modulo 3 holding register 804 and the second modulo 3 holding register 805 input and store the modulo 3 values of X and Y through data paths 92 and 93, respectively.
5 to the modulo 3 arithmetic circuit 817. The modulo 3 arithmetic circuit 817 inputs the modulo 3 values of X through the data path 84 and the modulo 3 values of Y through the data path 85.
A modulo 3 operation corresponding to the operation is executed to generate a modulo 3 expected value of the operation result Z, output through the data path 97, and used as one input of the matching circuit 818. When the arithmetic circuit modulo 3 generation circuit 816 inputs the calculation result Z through the data path 83, it generates a modulo 3 value of Z and outputs it through the data path 96 to the coincidence circuit 818 and the modulo 3 output register 806.
Use as input. Modulo 3 output register 806 is data path 9
The modulo ternary value of Z is input through 6, and the stored modulo ternary value C of Z is outputted through the rear data path 86. C is used as one output of the arithmetic circuit 8000, and is used as an input to a modulo 3 check circuit in the subsequent stage. Matching circuit 814, through data path 92,
Input the modulo 3 value of X and the expected modulo 3 value A of X, and check whether the modulo 3 value of X and the expected value A match.
If they do not match, report an error to data path 9.
4 to the EIF (error display flag) 808. The matching circuit 815 compares the modulo three values of Y input from the data path 93 with its expected value B, and sends the result through the data path 95 to the EIF 80.
Output to 9. Furthermore, the matching circuit 818 receives the modulo 3 values of Z input from the data path 96 and the data path 97.
The EIF 807 outputs the result through the data path 98. When EIFs 807, 808, and 809 input an error report through data paths 98, 94, and 95, respectively, they store it and hold the value until a release signal is input. Output to. When the OR circuit 810 receives an error report from any of the EIFs 807, 808, and 809, the OR circuit 810 sends the error report E indicating the occurrence of a failure to the arithmetic circuit 80.
Output as 1 output of 00. [Problems to be solved by the invention] Conventional modulus 3 shown in FIGS. 10 and 11
In the circuit, Modulo 3 is used to convert the numerical value indicated by the data into 3
The remainder after dividing by. ”For the numerical reason,
The value of modulo 3 is 3, that is, binary data [1,
1] is not taken into account, but since the modulo 3 circuit originally used in data processing equipment is used as a check circuit to detect circuit failure, the value of modulo 3 may change due to a failure. ,
1] should also be considered. For example, in FIG. 11, the first input modulus 3
When binary data [1, 1] is output on the data path 92 due to a failure in the generation circuit 812,
In the conventional modulo 3 circuit, the output for the input [1, 1] is undefined, and the outputs of the matching circuit 814, modulo 3 arithmetic circuit 817, matching circuit 818, etc. are as follows.
It has no logical meaning and depends on its circuit configuration. Therefore, if the [1, 1] pattern occurs due to a failure in the modulo 3 circuit itself, it is difficult to detect the failure, and furthermore, a failure in the arithmetic circuit may cause the calculation result to be incorrect. Even in this case, if the value of modulo 3 is the same as the output for [1, 1] above, the failure will not be detected, and the detection rate of the check circuit will not only drop significantly, but also In the check circuit, when the error display flag lights up, it becomes a factor that causes an error in pointing out the failure location. In addition, when a part of the arithmetic circuit is realized by LSI etc., evaluation for failure detection of the LSI etc.
Normally, logic gates and logic patterns in LSIs are verified using outputs and flip-flop values in response to inputs of certain test patterns.
When a modulo-3 circuit is included in an LSI, the detection rate will not improve unless the case [1, 1] is included as a test input, so the arithmetic circuit as a whole is considered to be completely meaningless logically. 1, 1] is also required, and the logic completely depends on the circuit configuration as described above, resulting in a very complex description that is difficult to understand. On the other hand, in the check method using modulo 3, as mentioned above, the expected value of modulo 3 and the value of modulo 3 generated from the actual calculation result are checked for agreement, so in order to improve the detection rate, calculation It is necessary to generate expected values for each part of the circuit and set error flags for each part, which increases the amount of hardware significantly, and when multiple error flags light up, it is difficult to determine whether the cause is due to the same failure. It is difficult to determine whether or not. Generally, in conventional modulo W circuits, binary values [1,...,1] are not considered, so
It is difficult to improve the failure detection rate and dividing power as a modular W circuit, and furthermore, when verifying check circuits associated with recent LSI technology, it is meaningless [1,...,1]
The disadvantage is that the logical description of the method is an impediment to improving design efficiency. [Means for solving the problem] In the present invention, n (n is an integer of 2 or more) w (w
is an integer greater than or equal to 2) bit data A 1 = [a 11 ,...,
a 1w ], A 2 = [a 21 ,…, a 2w ]…, A o = [a o1 ,…,
a ow ] is the input, and the n inputs A 1 , A 2 , ...,
The result of the modulo W operation between A o is D = [d 1 , ...,
d w ], when one or more of the inputs A 1 , A 2 , ..., A o is [1, ..., 1], C = [1,
..., 1], and in other cases C=[d 1 , ..., d w ]. A modulo W calculation circuit outputs w-bit data C = [c 1 , ..., c w ], and N-bit data Z. Among them, M-bit data Z 1 is input, and the data Z 1
A first modulo W generation circuit that generates and outputs a modulo W value E = [e 1 , ..., e w ], and N-M bit data Z 2 of the data Z excluding the data Z 1 . As input, the modulus W value F= of the data Z 2
A second modulus W that generates and outputs [f 1 ,..., f w ]
Output CK of the generation circuit and the modulo W calculation circuit
[c 1 , ..., c w ] and the output F = [f 1 , ..., f w ] of the second modulo W generation circuit are input, and the modulus W of the difference C - F between the inputs C and F is The value is G=[g 1 ,
..., g w ], when one or more of the inputs C and F are [1, ..., 1], H = [1, ...,
1] In other cases, H = [g 1 , ..., g w ].
A modulo W subtraction circuit that outputs bit data H=[h 1 ,..., h w ], an output H=[h 1 ,..., h w ] of the modulo W subtraction circuit, and an output of the first modulo W generation circuit. The output E = [e 1 , ..., e w ] is input, and H
= E, then K = [e 1 , ..., e w ], H≠E or H, and when one or more of E is [1, ..., 1], K = [1, ..., 1] w bit data K=
a modulo W matching circuit that outputs [k 1 , ..., k w ], and the n input data A 1 , A 2 , ..., A o
The result G obtained by subtracting the modulus W value F from the calculation result D between and the modulus W value E matches,
And when there is no value of [1,...,1] in the input data, K=E=[e 1 ,..., e w ], otherwise K=[1,...,1] w bit data K
A modulo W circuit is obtained, which is characterized in that it outputs =[k 1 , . . . , k w ]. In the present invention, furthermore, on the transmission path of the modulo W value, the modulo W value L=[l 1 , ..., l w ],
Strobe signal is input, output P=[1,...,
1], when a strobe signal is input, P=
[1,...,1], and when the strobe signal is input in other states, P=[l 1 ,..., l w ] becomes W bit data P=[p 1 ,..., p w ], and the input L= [l 1 ,
..., l w ] is provided with a modulo W register that outputs the modulo W value after one strobe of The result of subtracting F is G
and the modulo W value E match, and when there is no value of [1,...,1] in the input data, w bit data K=E=[e 1 ,..., e w ]. At other times, K=[1,...,1] is held and outputted, and the transmission path of [1,...,1] is detected based on the value held in the modulo W register. A modulo W circuit is obtained which is characterized by the following. Further, in the present invention, the input L=[1,...,1] or P=[1,...,1] or P=[1,
..., 1], when a strobe signal is input, q
= 1, and when a strobe signal is input in any other state, a function is added to output 1-bit data q such that q = 0, and the n input data A 1 , A 2 , . . .
When the result G obtained by subtracting the modulo W value F from the calculation result D between A and o matches the modulo W value E, and there is no value of [1,...,1] in the input data. w bit data K=E=[e 1 ,...,
e w ], otherwise K=[1,...,1]
is held, and outputs an error report using the w bit data KE and the 1 bit data q, and also outputs [1,
. . , 1] is obtained. [Example] Next, the present invention will be described with reference to the drawings.
Here, a modulo 3 circuit will be described as an example of a modulo W circuit. FIG. 1 is a block diagram showing a first embodiment of the present invention. Referring to FIG. 1, the modulus 3 circuit 1000
inputs N-bit data Z and two 2-bit data A and B, and inputs M of the N bits of Z.
Outputs modulo 3-value K of bit (M<N) data Z1 . When the first modulo 3 generation circuit 101 receives the M-bit data Z 1 of the N-bit input data Z, it generates the modulo 3 value E=[e 1 , e 2 ] of Z 1 , and the data path 11 output through Modulo 3
It is assumed to be one input of the matching circuit 105. When the second modulo 3 generation circuit 102 receives N−M bit data Z 2 obtained by excluding data Z 1 from the N bit input data Z, the modulo 3 value of Z 2 F=[f 1 , f 2 ] is generated and output through the data path 12, and is used as one input of the modulo-3 subtraction circuit 104. The modulo 3 arithmetic circuit 103 inputs two pieces of 2-bit data A and B, and modulo 3 is input between A and B.
Execute the calculation and set the resulting modulo 3 value as D=
If [d 1 , d 2 ], then C=D=[d 1 , d 2 ]2
Output bit data C=[c 1 , c 2 ]. However, when one or more of inputs A and B are [1, 1], C=[1, 1] is output. Output C passes through data path 13 to one of modulo-3 subtraction circuits 104.
It becomes input. The modulo 3 subtraction circuit 104 is connected to the data path 12
When the modulo 3 value F is input through the data path 13 and the modulo 3 value C is input through the data path 13, a modulo 3 subtraction of C-F is executed, and the resulting modulo 3 value is G = [g 1 , g 2 ], then H Outputs 2-bit data H=[h 1 , h 2 ] such that =G=[g 1 , g 2 ]. However, when one or more of inputs C and F is [1, 1], H=[1, 1] is output. The output H passes through the data path 14 and becomes one input of the modulo 3 matching circuit 105. When the modulo 3-value matching circuit 105 receives the modulo 3-value E through the data path 11 and the modulo 3-value H through the data path 14, it executes a match check between E and H, and when H=E, K=E=[e 1 ,
e 2 ], 2-bit data K is output. However, when H≠E or one or more of the inputs H and E are [1, 1], K=[1, 1] is output. Output K passes through data path 15 to modulo 3 circuit 1
The output will be 000. In the modulo 3 circuit 1000, for example, the second
When [1, 1] occurs as a modulo 3 value on the data path 12 due to a failure in the modulo 3 circuit 102, this value of [1, 1] passes through the modulo 3 subtraction circuit 104 and then through the data path 14. After passing through the modulo 3 matching circuit 105 and the data path 15, the modulo 3 value K=[1, 1] is output. Also, as a second example, when input A = [1, 1], the value of [1, 1] is the modulo 3 arithmetic circuit 10
3, passes through the data path 13, passes through the modulo 3 subtraction circuit 104, passes through the data path 14, passes through the modulo 3 matching circuit 105, and passes through the data path 15, and outputs the modulo 3 value K=[1, 1]. . Furthermore, as a third example, the modulus 3 circuit 100
0 as the upper M of the sum Z of N-bit binary numbers X and Y
It is used as a check circuit for an adder circuit that obtains bit data Z1 , and if the modulo 3 values of X and Y are A and B, then the modulo 3 arithmetic circuit 103
performs modulo 3 addition between A and B, and A
If the modulus 3 values of □+B are D=[d 1 , d 2 ], then
2-bit data C= where C=D=[d 1 , d 2 ]
[c 1 , c 2 ] are output through the data path 13 and are used as one input of the modulo-3 subtraction circuit. On the other hand, among the N-bit data Z resulting from the addition, the lower N-M bit data Z2 is input to the second modulo 3 generation circuit 102, and the modulo 3 value F=[f 1 , f 2 ] of Z 2 is It passes through the data path 12 and becomes one input of the modulo-3 subtraction circuit. In the modulo 3 subtraction circuit, if the modulo 3 value of C-F is G = [g 1 , g 2 ], then H = G =
The 2-bit data H of [g 1 , g 2 ] is output through the data path 14 and is used as one input of the modulo 3 matching circuit. The data of the upper M bits of the N-bit data Z of the addition result of the first modulo 3 generation circuit
Z 1 is input, a modulo 3 value E of Z 1 is generated, outputted through the data path 11, and modulo 3 matching circuit 1
1 input of 05. Here, the modulus 3 value of Z =
The equation in the modulo 3 operation holds true: modulo 3 values of Z 1 + modulo 3 values of Z 2 = modulo 3 values of X + modulo 3 values of Y, so □+ is modulo 3
If addition and □- are modulo 3 subtraction, then the modulo 3 value of Z1 should be E=A□+B□-F=C□-F=H. Therefore, the output of the modulo 3 coincidence circuit K=E=
[e 1 , e 2 ]. However, due to a failure in the X and Y adder circuit or a failure in the modulo 3 circuit itself, H≠
When one or more of E, H, and E becomes [1, 1], the output K becomes [1, 1]. As described above, when there is a failure in the modulo 3 circuit 1000, an abnormality in the input modulo 3 values, or a failure in the arithmetic circuit to be checked, the output modulo 3 value K is an incorrect value as the value of the modulo 3. [1, 1], and from the output K of the modulo 3 circuit 1000, the fact that a failure has occurred in the previous stage can be transmitted to the subsequent modulo 3 circuit. FIG. 2 shows a second embodiment of the present invention, and is a block diagram of an arithmetic circuit using the modulo 3 circuit of the present invention as a check circuit. Referring to FIG. 2, an arithmetic circuit 2000 inputs two binary data X, Y and their respective modulo ternary values A, B, and calculates an arithmetic result Z between X and Y.
One part of the data Z 1 and the modulus ternary C of Z 1
Outputs . The first input register 701 and the second input register 702 input and store X and Y, respectively, and then pass the X and Y through data paths 71 and 72, respectively.
Y is outputted and is used as one input of an arithmetic circuit 601, a first input modulo 3 generation circuit 602, and a second input modulo 3 circuit 603 as shown in the figure. The arithmetic circuit 601 connects
When inputting Y through the data path 72,
and Y, and pass the operation result Z through the data path 61 to the operation result output register 70.
Output to 3. The calculation result output register 703 is connected to the data path 6
After inputting and storing Z through data path 731 and storing it, part of the data Z 1 of Z is output through data path 731 and the remaining data Z 2 is output through data path 732 . Z 1
becomes the output of the arithmetic circuit 2000 and becomes one input of the first result modulo 3 generation circuit 201, and Z 2
becomes one input of the second result modulo 3 generation circuit 202. When the first input modulo 3 generation circuit 602 receives X through the data path 71, it generates its modulo 3 value and outputs it through the data path 62,
The first input is assumed to be one input of the modulo 3 matching circuit 604. When the second input modulo 3 generation circuit 603 receives Y through the data path 72, it generates its modulo 3 value and outputs it through the data path 63,
The second input is set as one input of the modulo 3 matching circuit 605. When the first result modulo 3 generation circuit 201 receives Z 1 through the data path 731, it generates its modulo 3 value, outputs it through the data path 21, and uses it as one input of the first result modulo 3 matching circuit 204. When the second result modulo 3 generation circuit 202 receives Z 2 through the data path 732, it generates its modulo 3 value and outputs it through the data path 22,
It is assumed to be one input of the modulo 3 subtraction circuit 203. The first input modulo 3 matching circuit 604 inputs the modulo 3 value of X through the data path 62 and also inputs the modulo 3 expected value A of X, and checks whether the modulo 3 value of X and this expected value A match. Check if it is not, and if it matches, modulus 3 of X
Outputs the value as is, and when either the modulo 3 values of X and the expected value A are [1, 1], or when the modulo 3 values of X and the expected value A do not match, it is [1, 1]. The output modulo 3 value is inputted to the first modulo 3 holding register 704 through the data path 64. The second input modulo 3 matching circuit 605 inputs the modulo 3 value of Y through the data path 63 and also inputs the expected modulo 3 value B of Y, and executes a matching check in the same manner as the first input modulo 3 matching circuit 604. , modulo ternary value of Y or [1, 1]
is output through the data path 65 and becomes one input of the second modulo 3 holding register 705. The first modulo 3 holding register 704 inputs the output modulo 3 value of the first input modulo 3 matching circuit 604 through the data path 64, stores it in accordance with the strobe signal, outputs it through the data path 74, and outputs it through the data path 74 to the modulo 3 arithmetic circuit. 607 is assumed to be one input. However, if the value held in this register before inputting the strobe signal is [1, 1], [1, 1] will be retained even after inputting the strobe signal, and regardless of the strobe signal, the output modulo 3 value of this register will be Keep [1, 1] and do not change. The second modulo 3 holding register 705 is connected to the second input modulo 3 matching circuit 6 through the data path 65.
After inputting the output modulo 3 values of 05 and storing them using the strobe signal, they are outputted through the data path 75 and become one input of the modulo 3 arithmetic circuit 607. However, if the value held in this register before inputting the strobe signal is [1, 1], the first modulus 3
Similar to the holding register 704, [1, 1] is held and the output does not change. The modulo 3 arithmetic circuit 607 is a first modulo 3
The output modulo 3 values of the holding register 704 are input through the data path 74, and the output modulo 3 values of the second modulo 3 holding register 705 are input through the data path 75, so that any of the modulo 3 values is [1, 1]. In this case, [1, 1] is output as is, and when both are not [1, 1], a modulo 3 operation corresponding to the arithmetic circuit 601 is executed between the two modulo 3 values, and the result is output. do. The output of the modulo 3 calculation circuit 607 is the calculation result Z
The modulo-3 expected value of is inputted to the modulo-3 subtraction circuit 203 through the data path 67. The modulo 3 subtraction circuit 203 inputs the modulo 3 value of part Z 2 of the calculation result Z through the data path 22, and also inputs the modulo 3 expected value of Z through the data path 67, so that any modulo 3 value is [ 1, 1], outputs [1, 1] as is, and when both are not [1, 1], Z-
Generate and output modulo 3 values of Z 2 . The output of the modulo-3 subtraction circuit 203 is the modulo-3 expected value of a part of the operation result Z1 , which is output to the data path 2.
3 through the first result module 3 matching circuit 204
This is one input. The first result modulo 3 matching circuit 204 inputs the modulo 3 value of part Z1 of the operation result Z through the data path 21, and also inputs the modulo 3 value of part Z1 of the calculation result Z through the data path 23.
When the expected modulo 3 value of Z 1 is input, the first input modulo 3 matching circuit 604 and the second input modulo 3 matching circuit 605 execute a match check between the modulo 3 value of Z 1 and its expected value. When they match, the modulo 3 values of Z 1 are output as they are, and when either the modulo 3 values of Z 1 and the expected value are [1, 1], or the modulo 3 values of Z 1 and their When the expected values do not match, [1, 1] is output, and the output modulo 3 values are sent to the data path 24.
It becomes the input of the modulo 3 output register 706 through the input signal. The modulo 3 output register 706 inputs the output modulo 3 value of the first result modulo 3 matching circuit 204 through the data path 68 and outputs it through the data path 76 after being stored by the strobe signal.
This output modulo 3 value is 1 of the arithmetic circuit 2000.
It is used as an output for the input of the subsequent modulo 3 circuit. However, when the value held in this register before the input of the strobe signal is [1, 1], the value is [1,
1] is held and the output does not change. In the arithmetic circuit 2000, for example, if a failure occurs in the output of the first modulo 3 holding register 704 and the modulo 3 value on the data path 74 becomes [1, 1], the incorrect value [1, 1] is used as the modulo 3 value.
1] passes through the data path 74, passes through the modulo 3 arithmetic circuit 607, passes through the data path 67, passes through the modulo 3 subtraction circuit 203, passes through the data path 23, passes through the first result modulo 3 matching circuit 204, and then the data It passes through the path 24, the modulo 3 output register 706, and the data path 76 to output the modulo 3 value C=[1,1]. As a second example, when the modulo 3 value of Y and its expected value B do not match by the second input modulo 3 matching circuit 605, [1, 1] is determined by the data path 6.
5 through the data path 75 from the second modulo 3 holding register 705 to the modulo 3
From the arithmetic circuit 607 through the data path 67, from the modulo 3 subtraction circuit 203 through the data path 23, from the first result modulo 3 matching circuit 204 through the data path 24, and from the modulo 3 output register 70.
6 through data path 76 to modulo ternary C=
Outputs [1, 1]. Further, when the calculation result Z is an abnormal value due to a failure of the calculation circuit 601, one of the modulo 3 values on the data paths 21 and 22 becomes abnormal. When the modulo 3 value on the data path 22 is an abnormal value, it passes through the data path 23 via the modulo 3 subtraction circuit 203, and the abnormal value is the first result modulo 3 matching circuit 2 as the modulo 3 expected value of Z1 .
04, a match check is executed with the modulo 3 value of Z 1 from the data path 21, and when they do not match, the value [1, 1] is outputted through the data path 24, and the data is output from the modulo 3 output register 706. Through path 76, modulo ternary C=[1,1]
Output. The same applies to the case where the input expected value A = [1, 1], and the data paths 64, 74, 67, 23, 24,
And the modulus 3 value on 76 is [1, 1],
Outputs modulo 3-value C=[1, 1]. As mentioned above, when a failure occurs in the arithmetic circuit 2000 or when the input data is invalid, the output modulo 3 value C becomes an invalid value [1, 1] as the value of the modulo 3, and the output of the arithmetic circuit 2000 The fact that a failure has occurred in the stage before C can be transmitted to the modulo 3 circuits in the rear stage. Also, with this modulo 3-value C = [1, 1],
After a failure is reported, in order to find out in which part of the entire circuit the failure occurred, it is easy to pinpoint the failure location by examining how the invalid modulo ternary value [1, 1] has been propagated. It is. FIG. 3 is a block diagram showing a third embodiment of the present invention, in which input modulo 3 values or output modulo 3 values are input to three modulo 3 registers 704, 705, 706 in the arithmetic circuit 2000 of FIG. [1,
When a strobe signal is input in the state of [1],
If a strobe signal is input in other conditions,
〔0〕となる1ビツトデータを出力する機能を加
え、さらに論理和回路507を追加した例を示す
ブロツク図である。
第3図を参照して、第1モジユロ3保持レジス
タ504は、信号線64を通して、第1入力モジ
ユロ3一致回路604の出力モジユロ3値を入力
し、ストローブ信号によつて格納後、データパス
74を通して出力し、モジユロ3演算回路607
の1入力とする。
ただしストローブ信号入力前の本レジスタ内の
保持率が〔1、1〕のとき、またはデータパス6
4を通して入力するモジユロ3値が〔1、1〕の
ときは、ストローブ信号入力後も〔1、1〕が保
持され、ストローブ信号に拘らず本レジスタの出
力モジユロ3値は〔1、1〕を保ち、変化しない
と共にエラー報告の1ビツトデータl1=1がデー
タパス54を通して出力され、論理和回路507
の1入力となる。
第2モジユロ3保持レジスタ505は、データ
パス65を通して、第2モジユロ3一致回路60
5の出力モジユロ3値を入力し、ストローブ信号
によつて格納後、データパス75を通して出力
し、モジユロ3演算回路607の1入力とする。
ただしストローブ入力前の本レジスタ内の保持
値が〔1、1〕のとき、または入力モジユロ3値
が〔1、1〕のときは、第1モジユロ3保持レジ
スタ504と同様に〔1、1〕が保持され変化し
ないと共に、エラー報告の1ビツトデータl2=1
がデータパス55を通して出力され、論理和回路
507の1入力となる。
モジユロ3出力レジスタ506は第1結果モジ
ユロ3一致回路608の出力モジユロ3値を信号
線68を通して入力し、ストローブ信号によつて
格納後、データパス76を通して出力する。この
出力モジユロ3値Cは演算回路3000の1出力
として、後段のモジユロ3回路の入力等に用いら
れる。
ただし、ストローブ信号入力前の本レジスタ内
の保持値が〔1、1〕のとき、または入力モジユ
ロ3値が〔1、1〕のときは、第1、第2モジユ
ロ3保持レジスタ504,505と同様に〔1、
1〕が保持され、変化しないと共にエラー報告の
1ビツトデータl3=1がデータパス56を通して
出力され、論理和回路507の1入力となる。
論理和回路507は、データパス54を通して
l1を、データパス55を通してl2を、データパス
56を通してl3を入力すると、l1とl2とl3の論理和
Eを生成し出力する。l1、l2、l3はそれぞれのモ
ジユロ3レジスタの保持値が〔1、1〕のとき、
つまり故障を検出したときに1となる1ビツトデ
ータであるから、論理和E=1は演算回路300
0内で故障を検出した事を示すことになる。
演算回路3000内の他の回路は、第2図の演
算回路2000と同等であるので説明は省略す
る。
第4図は本発明の第4の実施例を示すブロツク
図である。第4図を参照して、演算回路4000
は2個の2進データX、Yとそれぞれのモジユロ
3値A、Bとを入力とし、XとYとの間の演算結
果Zと、Zの1部のデータZ1のモジユロ3値C
と、残りのデータZ2のモジユロ3値Dとを出力す
る。
本実施例では演算結果のデータZを、後段の回
路において、Z1とZ2との2個のデータとして別別
に扱う様な場合に適したモジユロ3回路の例を示
す。
モジユロ3値C、Dを生成する回路より前段の
回路、すなわち、第1、第2入力レジスタ70
1,702、演算回路601、演算結果出力レジ
スタ703、第1、第2入力モジユロ3生成回路
602,603、第1、第2モジユロ3一致回路
604,605、第1、第2モジユロ3保持レジ
スタ704,705は第2図の演算回路2000
と同等なので説明は省略する。
第1結果モジユロ3生成回路401はデータパ
ス731を通して演算結果Zの一部のデータZ1を
入力すると、そのモジユロ3値を生成し、データ
パス41を通して出力し、第1結果モジユロ3一
致回路405と第2結果モジユロ3減算回路40
4との1入力とする。
第2結果モジユロ3生成回路402は、データ
パス732を通して演算結果Zのうち、データZ1
を除いた残りのデータZ2を入力すると、そのモジ
ユロ3値を生成し、データパス42を通して出力
し、第2結果モジユロ3一致回路406と、第1
結果モジユロ3減算回路403との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を
通して第1結果モジユロ3減算回路403と第2
結果モジユロ3減算回路404との1入力とす
る。
第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の1入力となる。
第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入力となる。
第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
値をデータパス43を通してその期待値を入力す
ると、一致チエツクを実行し、一致している時は
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は、演算回路400
0の1出力として後段のモジユロ3回路の入力等
に用いられる。
ただしストローブ信号入力前の本レジスタ内の
保持値が〔1、1〕の時は、〔1、1〕が保持さ
れ、出力は変化しない。
第2モジユロ3出力レジスタ408は第1結果
モジユロ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〕がどのように
伝搬してきたかを調べれば故障箇所を指摘する事
が容易であるという点において、第2図の演算回
路2000と同様であるので説明を省略する。
第5図は、本発明に使用されるモジユロ3演算
回路の例を示す真理値表である。第5図aは加算
回路、bは減算回路、cは乗算回路、dは反転回
路に対応し、それぞれモジユロ3加算、モジユロ
3減算、モジユロ3乗算、モジユロ3反転回路の
真理値表である。ただし、一は任意の値を示す。
ここで第5図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〕の時は第5図aの真理値表よ
りC=〔0、0〕となる。
以上は従来のモジユロ3回路と同等であるが、
本回路の特徴は、モジユロ3の値として〔1、
1〕を考慮した事にある。
もし、2進数Xよりモジユロ3の値A=〔a1、
a2〕を生成する回路の故障によつてA=〔1、1〕
となつた場合、第5図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はXのモジユロ3値A=〔a1、a2〕=
〔0、0〕とYのモジユロ3値B=〔b1、b2〕=
〔1、0〕とを入力し、AとBとの和C=A□+B
=〔c1、c2〕=〔1、0〕をモジユロ3期待値とし
て生成し、データパス32を通して、モジユロ3
一致回路303の1入力とする。
モジユロ3生成回路307は和の2進数Zを入
力するとZのモジユロ3の値D=〔d1、d2〕=〔1、
0〕を生成しデータパス31を通してモジユロ3
一致回路303の1と入力する。
モジユロ3一致回路303はデータパス31を
通して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演算回路302に故障が発
生してC=〔1、1〕となつた場合、モジユロ3
一致回路303自体に故障が発生してM=〔1、
1〕となつた場合、演算回路部またはモジユロ3
演算回路302に故障が発生してD≠Cとなつた
場合、のいずれの場合にも出力M=〔1、1〕と
なり、出力M以前の回路に故障が発生した事を検
出し、故障を示すモジユロ3の値〔1、1〕を後
段のチエツク回路に出力する事になる。後段のチ
エツク回路では〔1、1〕以外の値を入力した時
は正常なデータ、〔1、1〕の時は故障が検出さ
れている事を判別する事ができる。
第8図a及びbは本発明に使用されるモジユロ
3レジスタの真理値表及びブロツク図である。
第8図a及びbを参照して、モジユロ3レジス
タ501は2ビツトデータD=〔d1、d2〕とスト
ローブ信号STBを入力とし、真理値表で示す論
理構成により、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図a及びbは、第8図のモジユロ3レジス
タ501に、エラー報告等に用いることのできる
ビツトデータfを出力する機能を追加したモジユ
ロ3レジスタの真理値表及びブロツク図である。
第9図a及びbを参照してモジユロ3レジスタ
502は、2ビツトデータD=〔d1、d2〕とスト
ローブ信号STBを入力とし、真理値表で示す論
理構成により、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と同等なので、説明は省略する。
なお、上述の実施例では、W=3、即ち、モジ
ユロ3回路について説明したが、W=2w−1(w
は2以上の整数)の場合についても同様に構成で
きる。
〔発明の効果〕
以上説明した様に本発明ではモジユロWの値と
して不正なデータ〔1、…、1〕を考慮し、〔1、
…、1〕を故障検出時のモジユロWの値とするこ
とによつて、チエツク回路自体の〔1、…、1〕
の故障も検出できると共に、後段のチエツク回路
の前段の故障検出を伝達する事ができ、さらに
〔1、…、1〕の伝達経路をたどる事によつて、
故障箇所を判別し易いため、チエツク回路全体の
検出率、分解能を向上させ、さらにLSI化等に適
した構成にできるという効果がある。FIG. 7 is a block diagram showing an example in which a function to output 1-bit data of [0] and an OR circuit 507 are added. Referring to FIG. 3, the first modulo 3 holding register 504 inputs the output modulo 3 value of the first input modulo 3 matching circuit 604 through the signal line 64, stores it by the strobe signal, and then transfers the output modulo 3 value to the data path 74. output through the modulo 3 arithmetic circuit 607
1 input. However, when the retention rate in this register before strobe signal input is [1, 1], or when data path 6
When the modulo 3 value input through 4 is [1, 1], [1, 1] is held even after the strobe signal is input, and the output modulo 3 value of this register is [1, 1] regardless of the strobe signal. The 1-bit data l 1 =1 for error reporting and not changing is output through the data path 54 and output to the OR circuit 507.
This is one input. The second modulo 3 holding register 505 is connected to the second modulo 3 match circuit 60 through the data path 65.
The output modulo 3 value of 5 is inputted, stored by a strobe signal, and then outputted through the data path 75 and used as one 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], the value is [1, 1] as in the first modulo 3 holding register 504. is retained and does not change, and the 1-bit error report data l 2 = 1
is output through the data path 55 and becomes one input of the OR circuit 507. The modulo 3 output register 506 inputs the output modulo 3 value of the first result modulo 3 matching circuit 608 through the signal line 68 and outputs it through the data path 76 after being stored by the strobe signal. This output modulo 3-value C is used as one output of the arithmetic circuit 3000 as an input to a subsequent stage modulo 3-value circuit. However, when the value held in this register before the strobe signal is input is [1, 1], or when the input modulo 3 value is [1, 1], the first and second modulo 3 holding registers 504 and 505 Similarly [1,
1] is held and does not change, and the error report 1-bit data l 3 =1 is output through the data path 56 and becomes one input of the OR circuit 507. The OR circuit 507 connects the
When l 1 is input, l 2 is input through the data path 55, and l 3 is input through the data path 56, the logical sum E of l 1 , l 2, and l 3 is generated and output. l 1 , l 2 , l 3 are when the values held in their respective modulo 3 registers are [1, 1],
In other words, since it is 1-bit data that becomes 1 when a failure is detected, the logical sum E=1 is calculated by the arithmetic circuit 300.
This indicates that a failure was detected within 0. The other circuits in the arithmetic circuit 3000 are the same as the arithmetic circuit 2000 in FIG. 2, so their explanation will be omitted. FIG. 4 is a block diagram showing a fourth embodiment of the present invention. Referring to FIG. 4, an arithmetic circuit 4000
takes two binary data X, Y and their respective modulo ternary values A, B as input, and calculates the calculation result Z between X and Y and the modulo ternary value C of a part of data Z 1 of Z.
and the modulo ternary value D of the remaining data Z2 . In this embodiment, an example of a modulo 3 circuit suitable for a case where data Z resulting from an operation is handled separately as two pieces of data Z 1 and Z 2 in a subsequent circuit is shown. The circuit before the circuit that generates the modulo ternary values C and D, that is, the first and second input registers 70
1,702, arithmetic circuit 601, arithmetic result output register 703, first and second input modulo 3 generation circuits 602, 603, first and second modulo 3 matching circuits 604, 605, first and second modulo 3 holding registers 704 and 705 are the arithmetic circuits 2000 in FIG.
Since it is equivalent to , the explanation will be omitted. When the first result modulo 3 generation circuit 401 receives part of the data Z 1 of the operation result Z through the data path 731, it generates its modulo 3 values, outputs them through the data path 41, and outputs them through the data path 41. and second result modulo 3 subtraction circuit 40
4 and 1 input. The second result modulo 3 generation circuit 402 generates data Z 1 out of the operation result Z through the data path 732.
When the remaining data Z 2 except for is input, its modulo 3 value is generated, outputted through the data path 42, and sent to the second result modulo 3 matching circuit 406 and the first
It is assumed to be one input to the result modulo 3 subtraction circuit 403. The modulo 3 arithmetic circuit 607 is a first modulo 3
The output modulo 3 values of the holding register 704 are input through the data path 74, and the output modulo 3 values of the second modulo 3 holding register 705 are input through the data path 75, so that any of the modulo 3 values is [1, 1]. In this case, [1, 1] is output as is, and if both are not [1, 1], a modulo 3 operation corresponding to the arithmetic circuit 601 is executed between the two modulo 3 values, and the result is output. do. The output of the modulo 3 arithmetic circuit 607 is passed through the data path 67 to the first result modulo 3 subtraction circuit 403 and the second result modulo 3 subtraction circuit 403 as the modulo 3 expected value of the calculation result Z.
It is assumed to be one input to the result modulo 3 subtraction circuit 404. The first result modulo 3 subtraction circuit 403 inputs the modulo 3 value of part Z 2 of the calculation result Z through the data path 42, receives the expected modulo 3 value of Z through the data path 67, and calculates any modulo 3 value. When the values are [1, 1], [1, 1] is output as is, and when both are not [1, 1], a modulo 3 value of Z-Z 2 is generated and output. The output of the first result modulo 3 subtraction circuit 403 is
The part of the calculation result Z 1 becomes one input of the first result modulo 3 matching circuit 405 through the data path 43 as a modulo 3 expected value. The second result modulo 3 subtraction circuit 404 modulo 3 of part Z1 of the operation result Z through the data path 41.
While inputting the value, Z
The expected value of modulo 3 is input, and if any of the modulo 3 values is [1, 1], it outputs [1, 1] as is, and when both are not [1, 1],
Generate and output modulo 3 values of Z-Z 1 . The output of the second result modulo 3 subtraction circuit 404 is the expected modulo 3 value of part Z 2 of the calculation result,
Through the signal line 44, it becomes one input of the second result modulo 3 matching circuit 406. When the first result modulo 3 matching circuit 405 inputs the expected modulo 3 value of part Z1 of the operation result Z through the data path 41 through the data path 43, the first result modulo 3 matching circuit 405 executes a matching check and determines whether they match. When the modulo 3 value of Z 1 is output as is, either the modulo 3 value of Z 1 and the expected value are [1, 1], or the modulo 3 value of Z 1 and the expected value match. If not, it outputs [1, 1], and the output modulo 3 value is sent to data path 45.
It becomes an input to the first modulo 3 output register 407 through the input signal. The second result modulo 3 matching circuit 406 modulo 3 of part Z2 of the operation result Z through the data path 42.
When the expected value is input through the data path 43, a match check is executed, and if it matches,
Output the modulus 3 values of Z 2 as is, and when either the modulus 3 values of Z 2 or the expected value is [1, 1],
Alternatively, when the modulo 3 value of Z 2 and its expected value do not match, [1, 1] is output, and the outputted modulo 3 value is input to the second modulo 3 output register 408 through the data path 46. Become. The first modulo 3 output register 407 inputs the output modulo 3 value of the first result modulo 3 matching circuit 405 through the data path 45, stores it in accordance with the strobe signal, and outputs it through the data path 47. This output modulo 3-value C is calculated by the arithmetic circuit 400.
It is used as an input to the subsequent stage modulo 3 circuit as a 1 output of 0. However, when the value held in this register before the input of the strobe signal 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 first result modulo 3 matching circuit 406 through the data path 46 and outputs it through the data path 48 after being stored by the strobe signal. This modulo 3-value D is calculated by the arithmetic circuit 4000.
It is used as an input for the subsequent stage modulo 3 circuit as one output. However, when the value held in this register before the input of the strobe signal 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-value C,
D is an invalid value for modulus 3 [1, 1]
Therefore, the fact that a failure has occurred in the stage before the output C or D of the arithmetic circuit 4000 can be transmitted to the subsequent stage modulo three circuits, and the failure can be detected by the modulo three values C or D = [1, 1]. After being reported, in order to find out in which part of the entire circuit the failure occurred, it is easy to pinpoint the failure location by investigating how the incorrect modulo ternary value [1, 1] has been propagated. In this respect, it is similar to the arithmetic circuit 2000 in FIG. 2, so a description thereof will be omitted. FIG. 5 is a truth table showing an example of a modulo-3 arithmetic circuit used in the present invention. FIG. 5a corresponds to an adder circuit, b a subtracter circuit, c a multiplier circuit, and d an inverter circuit, which are truth tables for modulo-3 addition, modulo-3 subtraction, modulo-3 multiplication, and modulo-3 inversion circuits, respectively. However, 1 indicates an arbitrary value. An example of the adder circuit shown in FIG. 5a will now be described. In the check circuit of an adder circuit that calculates the sum Z of two arbitrary binary numbers X and Y, the value of modulo 3 of the input binary number Assuming that the values are B=[b 1 , b 2 ], an expected value C=[c 1 , c 2 ] as the modulo 3 value of the addition result Z of the binary numbers X and Y is prepared. For example, A=[0,
1], B=[1, 0], then C=[0, 0] from the truth table of FIG. 5a. The above is equivalent to the conventional modulo 3 circuit, but
The feature of this circuit is that the value of modulo 3 is [1,
1] was taken into consideration. If the value of modulo 3 is A = [a 1 ,
A = [1, 1] due to a failure in the circuit that generates a 2 ]
In this case, as shown in the truth table in Figure 5a,
Expected value C=[c 1 , c 2 ]=[1, 1]. The same applies to failures on the binary Y side. In other words, there are three cases in which the expected value C is [1, 1]; 1 is when A = [1, 1], and the other is when B =
[1, 1], and a case where C=[1, 1] due to a failure of the modulo-3 addition circuit itself. FIG. 6 is a diagram showing a truth table of a modulo-3 matching circuit used in the present invention. When two 2-bit data A=[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 when A or B = [1, 1], C = [c 1 , c 2 ]
Outputs 2-bit data C such that =[1, 1]. FIG. 7 shows a check circuit including a modulo-3 arithmetic circuit 302 configured with the logic shown in the truth table of FIG. 5 and a modulo-3 matching circuit 303 configured with the logic shown in the truth table of FIG. FIG. For example, two binary data X = [0, 1, 1, 0]
By adding Y=[0, 1, 0, 1], X and Y
In the case of a check circuit of an adder circuit that outputs the sum Z=X+Y [1, 0, 1, 1], the modulo 3 arithmetic circuit 302 outputs the modulo 3 value of X A=[a 1 , a 2 ]=
[0, 0] and Y modulo ternary value B = [b 1 , b 2 ] =
Input [1, 0], sum of A and B C=A□+B
= [c 1 , c 2 ] = [1, 0] is generated as a modulo 3 expected value, and is passed through the data path 32 as a modulo 3
It is assumed to be one input of the matching circuit 303. When the modulo 3 generation circuit 307 inputs the sum binary number Z, the modulo 3 value of Z = [d 1 , d 2 ] = [1,
0] is generated and sent to the modulus 3 through the data path 31.
Input 1 in the matching circuit 303. When the modulo 3 matching circuit 303 inputs the modulo 3 value D of Z through the data path 31 and its expected value C through the data path 32, when D=C, M=[m 1 , m 2 ]=[d 1 , d 2 ], when D≠C,
and when D or C=[1, 1], M=[m 1 ,
2-bit data M with m 2 ]=[1, 1] is output. Here, if a failure occurs in the modulo 3 generating circuit 301 and D = [1, 1], and if the input A or B of the modulo 3 arithmetic circuit 302 becomes [1, 1], the modulo 3 arithmetic circuit If a failure occurs in 302 and C = [1, 1], modulus 3
A failure occurs in the coincidence circuit 303 itself, and M=[1,
1], the arithmetic circuit section or modulo 3
If a failure occurs in the arithmetic circuit 302 and D≠C, the output M = [1, 1] in either case, it is detected that a failure has occurred in the circuit before the output M, and the failure is detected. The value of modulo 3 [1, 1] shown will be output to the check circuit at the subsequent stage. The check circuit at the latter stage can determine that the data is normal when a value other than [1, 1] is input, and that a failure has been detected when it is [1, 1]. Figures 8a and 8b are truth tables and block diagrams of modulo 3 registers used in the present invention. Referring to FIGS. 8a and 8b, modulo 3 register 501 inputs 2-bit data D=[d 1 , d 2 ] and strobe signal STB, and according to the logic configuration shown in the truth table, 2-bit data E= [e 1 , e 2 ] is output. For example, when the output E = [1, 0] before the strobe signal is input, when the strobe signal is input with D = [0, 1], the output E changes from [1, 0] to [0, 1]. . Similarly, in this state D=
When a strobe signal is input at [0, 0], the output E changes from [0, 1] to [0, 0]. However, when the original state of the output E is [1, 1], it will remain in the [1, 1] state regardless of the value of D. Therefore, when D = [1, 1] or E = [1, 1], the output E after strobe input is fixed to [1, 1], and [1, 1] is originally invalid data as the value of modulo 3. Therefore, it is detected that a failure has occurred in the circuit before this circuit. Furthermore, if an error report signal is generated from the invalid data [1, 1] of this circuit, this circuit will also serve as an error display flag. FIGS. 9a and 9b are a truth table and a block diagram of a modulo 3 register in which a function for outputting bit data f that can be used for error reporting, etc. is added to the modulo 3 register 501 of FIG. 8. Referring to FIGS. 9a and 9b, the modulo 3 register 502 inputs the 2-bit data D=[d 1 , d 2 ] and the strobe signal STB, and according to the logical configuration shown in the truth table, the 2-bit data E= [e 1 , e 2 ] and 1-bit data f are output. 1-bit data f becomes "1" when a strobe signal is input in the state of input D = [1, 1], and then output E
=[1, 1] and the state of f=1 is maintained. Since this 1-bit data f=1 means that invalid data [1, 1] has been 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 explained in FIG. 8, so the explanation will be omitted. In the above embodiment, W=3, that is, a modulo 3 circuit was explained, but W=2 w −1(w
is an integer greater than or equal to 2). [Effect of the invention] As explained above, in the present invention, invalid data [1,..., 1] is considered as the value of modulo W, and [1, ..., 1] is
..., 1] as the value of modulo W at the time of fault detection, [1, ..., 1] of the check circuit itself
In addition to being able to detect failures in the circuit, it is also possible to transmit the failure detection in the previous stage to the check circuit in the subsequent stage, and by following the transmission path of [1,...,1],
Since it is easy to identify the fault location, the detection rate and resolution of the entire check circuit can be improved, and the structure can be made suitable for LSI implementation.
第1図は本発明の一実施例を示すブロツク図、
第2図は本発明のモジユロ3回路をチエツク回路
として使用した演算回路の一例を示すブロツク
図、第3図は演算回路の他の例を示すブロツク
図、第4図は演算回路のさらに他の例を示すブロ
ツク図、第5図は本発明に使用されるモジユロ3
演算回路の真理値表示す図、第6図は本発明に使
用されるモジユロ3一致回路の真理値表を示す
図、第7図はモジユロ3演算回路とモジユロ3一
致回路とを含むチエツク回路の一例を示すブロツ
ク図、第8図a及びbはそれぞれ本発明に使用さ
れるモジユロ3レジスタの真理値表を示す図及び
ブロツク図、第9図a及びbはそれぞれモジユロ
3レジスタの他の例である真理値表を示す図及び
ブロツク図、第10図は従来のモジユロ3チエツ
ク回路の一例を示すブロツク図、第11図は演算
装置内の一部であり、その中間結果に対するモジ
ユロ3チエツク回路の一例を示すブロツク図であ
る。
101,102,602,603,201,2
02,401,402,301,812,81
3,816……モジユロ3生成回路、103,6
07,302,817……モジユロ3演算回路、
104,203,403,404……モジユロ3
減算回路、105,604,605,204,4
05,406,303……モジユロ3一致回路、
1000……モジユロ3回路、704,705,
706,504,505,506,407,40
8,501,502,804,805,806…
…モジユロ3レジスタ、701,702,80
1,802……入力レジスタ、601,811…
…演算回路、703,803……演算結果出力レ
ジスタ、507,810……論理和回路、200
0,3000,4000,8000……演算回
路、814,815,818……一致回路、80
7,808,809……EIF、9001,900
2……入力オペランドレジスタ、9003……演
算結果レジスタ、9011……演算回路、901
2……モジユロ3期待値生成回路、9004……
モジユロ3期待値レジスタ、9013……モジユ
ロ3一致チエツク回路、9005……エラー表示
フラグ、9000……演算装置。
FIG. 1 is a block diagram showing one embodiment of the present invention;
Fig. 2 is a block diagram showing an example of an arithmetic circuit using the modular 3 circuit of the present invention as a check circuit, Fig. 3 is a block diagram showing another example of the arithmetic circuit, and Fig. 4 is a block diagram showing yet another example of the arithmetic circuit. A block diagram showing an example, FIG. 5 shows a module 3 used in the present invention.
FIG. 6 is a diagram showing the truth value display of the arithmetic circuit; FIG. 6 is a diagram showing the truth value table of the modulo-3 matching circuit used in the present invention; FIG. 7 is a diagram showing the truth value table of the modulo-3 matching circuit used in the present invention; A block diagram showing an example, FIGS. 8a and 8b are a diagram and a block diagram showing a truth table of a modulo 3 register used in the present invention, respectively, and FIGS. 9a and b are another example of a modulo 3 register, respectively. Fig. 10 is a block diagram showing an example of a conventional modulo 3 check circuit; Fig. 11 is a part of an arithmetic unit; FIG. 2 is a block diagram showing an example. 101, 102, 602, 603, 201, 2
02,401,402,301,812,81
3,816... Modulo 3 generation circuit, 103,6
07,302,817... Modulo 3 arithmetic circuit,
104, 203, 403, 404...Mojiyuro 3
Subtraction circuit, 105, 604, 605, 204, 4
05,406,303...modulo 3 matching circuit,
1000...Modulo 3 circuit, 704,705,
706,504,505,506,407,40
8,501,502,804,805,806...
...Module 3 register, 701, 702, 80
1,802...Input register, 601,811...
... Arithmetic circuit, 703, 803... Arithmetic result output register, 507, 810... OR circuit, 200
0,3000,4000,8000... Arithmetic circuit, 814,815,818... Matching circuit, 80
7,808,809...EIF, 9001,900
2...Input operand register, 9003...Arithmetic result register, 9011...Arithmetic circuit, 901
2... Modulo 3 expected value generation circuit, 9004...
Modulo 3 expected value register, 9013... Modulo 3 coincidence check circuit, 9005... Error display flag, 9000... Arithmetic unit.
Claims (1)
整数)ビツトデータA1=〔a11、…、a1w〕、A2=
〔a21、…、a2w〕、…、Ao=〔ao1、…、aow〕を入
力とし、該n個の入力A1、A2、…、Ao間でのモ
ジユロW(W=2w−1)演算の結果をD=〔d1、
…、dw〕としたとき、前記入力A1、A2、…、Ao
のうちの1つ以上が〔1、…、1〕のときはC=
〔1、…、1〕、その他のときはC=〔d1、…、dw〕
となるwビツトデータC=〔c1、…、cw〕を出力
するモジユロW演算回路と、NビツトのデータZ
のうち、MビツトのデータZ1を入力とし該データ
Z1のモジユロW値E=〔e1、…、ew〕を生成し出
力する第1モジユロW生成回路と、前記データZ
のうち、前記データZ1を除いたN−Mビツトのデ
ータZ2を入力とし、該データZ2のモジユロW値F
=〔f1、…、fw〕を生成し出力する第2モジユロ
W生成回路と、前記モジユロW演算回路の出力C
=〔c1、…、cw〕と、前記第2モジユロW生成回
路の出力F=〔f1、…、fw〕とを入力とし、該入
力CとFとの差C−FのモジユロW値をG=〔g1、
…、gw〕としたとき、前記入力C、Fのうちの
1つ以上が〔1、…、1〕のときはH=〔1、…、
1〕、その他のときはH=〔g1、…、gw〕となるw
ビツトデータH=〔h1、…、hw〕を出力するモジ
ユロW減算回路と、該モジユロW減算回路の出力
H=〔h1、…、hw〕と、前記第1モジユロW生成
回路の出力E=〔e1、…、ew〕とを入力とし、H
=EのときはK=〔e1、…、ew〕、H≠Eまたは
H、Eのうちの1つ以上が〔1、…、1〕のとき
はK=〔1、…、1〕となるwビツトデータK=
〔k1、…、kw〕を出力するモジユロW一致回路と
を備え、前記n個の入力データA1、A2、…、Ao
間の演算結果Dから、前記モジユロW値Fを差し
引いた結果Gと、前記モジユロW値Eとが一致
し、かつ入力データのなかに〔1、…、1〕の値
がないときは、K=E=〔e1,…,ew〕、その他の
ときはK=〔1,…,1〕なるwビツトデータK
=〔k1、…、kw〕を出力するようにしたことを特
徴とするモジユロW回路。 2 n(nは2以上の整数)個のw(wは2以上の
整数)ビツトデータA1=〔a11、…、a1w〕、A2=
〔a21、…、a2w〕、…、Ao=〔ao1、…、aow〕を入
力とし、該n個の入力A1、A2、…、Ao間でのモ
ジユロW(W=2w−1)演算の結果をD=〔d1、
…、dw〕としたとき、前記入力A1、A2、…、Ao
のうちの1つ以上が〔1、…、1〕のときはC=
〔1、…、1〕、その他のときはC=〔d1、…、dw〕
となるwビツトデータC=〔c1、…、cw〕を出力
するモジユロW演算回路と、NビツトのデータZ
のうち、MビツトのデータZ1を入力とし、該デー
タZ1のモジユロW値E=〔e1、…、ew〕を生成し
出力する第1モジユロW生成回路と、前記データ
Zのうち、前記データZ1を除いたN−Mビツトの
データZ2を入力とし、該データZ2のモジユロW値
F=〔f1、…、fw〕を生成し出力する第2モジユ
ロW生成回路と、前記モジユロW演算回路の出力
C=〔c1、…、cw〕と、前記第2モジユロW生成
回路の出力F=〔f1、…、fw〕とを入力とし、該
入力CとFとの差C−FのモジユロW値をG=
〔g1、…、gw〕としたとき、前記入力C、Fのう
ちの1つ以上が〔1、…、1〕のときはH=〔1、
…、1〕その他のときはH=〔g1、…、gw〕とな
るwビツトデータH=〔h1、…、hw〕を出力する
モジユロW減算回路と、該モジユロW減算回路の
出力H=〔h1、…、hw〕と、前記第1モジユロW
生成回路の出力E=〔e1、…、ew〕とを入力とし、
H=EのときはK=〔e1、…、ew〕、H≠Eまたは
H、Eのうちの1つ以上が〔1、…、1〕のとき
はK=〔1、…、1〕となるwビツトデータK=
〔k1、…、k2〕を出力するモジユロW一致回路と、
モジユロW値の伝達パス上にあつて、該モジユロ
W値L=〔l1、…、lw〕と、ストローブ信号とを
入力とし、出力P=〔1、…、1〕の状態でスト
ローブ信号を入力するとP=〔1、…、1〕、その
他の状態でストローブ信号を入力するとP=〔l1、
…、lw〕となるwビツトデータP=〔p1、…、pw〕
を前記入力L=〔l1、…、lw〕の1ストローブ後
のモジユロW値として出力するモジユロWレジス
タとを備え、前記n個の入力データA1、A2、…、
Ao間の演算結果Dから、前記モジユロW値Fを
差し引いた結果Gと、前記モジユロW値Eとが一
致し、かつ入力データのなかに〔1、…、1〕の
値がないときは、wビツトデータK=E=〔e1、
…、ew〕を出力し、その他のときはK=〔1、…、
1〕を保持し、出力すると共に前記モジユロWレ
ジスタの保持値によつて〔1、…、1〕の伝達経
路を検出するようにしたことを特徴とするモジユ
ロW回路。 3 n(nは2以上の整数)個のw(wは2以上の
整数)ビツトデータA1=〔a11、…、a1w〕、A2=
〔a21、…、a2w〕、…、Ao=〔ao1、…、aow〕を入
力とし、該n個の入力A1、A2、…、Ao間でのモ
ジユロW(W=2w−1)演算の結果をD=〔d1、
…、dw〕としたとき、前記入力A1、A2、…、Ao
のうちの1つ以上が〔1、…、1〕のときはC=
〔1、…、1〕、その他のときはC=〔d1、…、dw〕
となるwビツトデータC=〔c1、…、cw〕を出力
するモジユロW演算回路と、NビツトのデータZ
のうち、MビツトのデータZ1を入力とし、該デー
タZ1のモジユロW値E=〔e1、…、ew〕を生成し
出力する第1モジユロW生成回路と、前記データ
Zのうち、前記データZ1を除いたN−Mビツトの
データZ2を入力とし、該データZ2のモジユロW値
F=〔f1、…、fw〕を生成し出力する第2モジユ
ロW生成回路と、前記モジユロW演算回路の出力
C=〔c1、…、cw〕と、前記第2モジユロW生成
回路の出力F=〔f1、…、fw〕とを入力とし、該
入力CとFとの差C−FのモジユロW値をG=
〔g1、…、gw〕としたとき、前記入力C、Fのう
ちの1つ以上が〔1、…、1〕のときはH=〔1、
…、1〕、その他のときはH=〔g1、…、gw〕とな
るwビツトデータH=〔h1、…、hw〕を出力する
モジユロW減算回路と、該モジユロW減算回路の
出力H=〔h1、…、hw〕と、前記第1モジユロW
生成回路の出力E=〔e1、…、ew〕とを入力とし、
H=EのときはK=〔e1、…、ew〕、H≠Eまたは
H、Eのうちの1つ以上が〔1、…、1〕のとき
はK=〔1、…、1〕となるwビツトデータK=
〔k1、…、kw〕を出力するモジユロW一致回路
と、モジユロW値の伝達パス上にあつて、該モジ
ユロW値L=〔l1、…、lw〕と、ストローブ信号
とを入力とし、出力P=〔1、…、1〕の状態で
ストローブ信号を入力するとP=〔1、…、1〕、
その他の状態でストローブ信号を入力するとP=
〔l1、…、lw〕となるwビツトデータP=〔p1、…、
pw〕を、前記入力L=〔l1、…、lw〕の1ストロ
ーブ後のモジユロW値として出力するとともに前
記入力L=〔1、…、1〕またはp=〔1,…,
1〕の状態でストローブ信号を入力するとq=
1、その他の状態でストローブ信号を入力すると
q=0となる1ビツトデータqを出力するモジユ
ロWレジスタとを備え、前記n個の入力データ
A1、A2、…、Ao間の演算結果Dから前記モジユ
ロW値Fを差し引いた結果Gと、前記モジユロW
値Eとが一致し、かつ入力データのなかに〔1、
…、1〕の値がないときはwビツトデータK=E
=〔e1、…、ew〕を出力し、その他のときはK=
〔1、…、1〕を保持し、該wビツトデータKと
前記1ビツトデータqとによつてエラー報告とを
出力すると共に、前記モジユロWレジスタの保持
値によつて、〔1、…、1〕の伝達経路を検出す
るようにしたことを特徴とするモジユロW回路。[Claims] 1 n (n is an integer of 2 or more) w (w is an integer of 2 or more) bit data A 1 = [a 11 , ..., a 1w ], A 2 =
[a 21 , ..., a 2w ], ..., A o = [ a o1 , ..., a ow ] as inputs, and the modulus W (W =2 w −1) The result of the operation is D=[d 1 ,
…, d w ], the inputs A 1 , A 2 , …, A o
If one or more of them is [1,...,1], C=
[1,...,1], otherwise C=[d 1 ,..., d w ]
A modulo W arithmetic circuit that outputs w-bit data C=[c 1 ,...,c w ] and N-bit data Z
Among them, M-bit data Z1 is input and the data is
a first modulo W generation circuit that generates and outputs a modulo W value E=[e 1 ,..., e w ] of Z 1 ;
Among them, input the N-M bit data Z2 excluding the data Z1 , and calculate the modulo W value F of the data Z2 .
A second modulo W generation circuit that generates and outputs = [f 1 , ..., f w ] and an output C of the modulo W calculation circuit
= [c 1 , ..., c w ] and the output F = [f 1 , ..., f w ] of the second modulo W generation circuit are input, and the modulo of the difference C - F between the inputs C and F is The W value is G=[g 1 ,
..., g w ], when one or more of the inputs C and F are [1, ..., 1], H = [1, ...,
1], otherwise H = [g 1 , ..., g w ].
A modulo W subtraction circuit that outputs bit data H=[h 1 ,..., h w ], an output H=[h 1 ,..., h w ] of the modulo W subtraction circuit, and an output of the first modulo W generation circuit. The output E = [e 1 , ..., e w ] is input, and H
= E, then K = [e 1 , ..., e w ], H≠E or H, and when one or more of E is [1, ..., 1], K = [1, ..., 1] w bit data K=
a modulo W matching circuit that outputs [k 1 , ..., k w ], and the n input data A 1 , A 2 , ..., A o
When the result G obtained by subtracting the modulus W value F from the calculation result D between the two matches the modulus W value E, and there is no value of [1,...,1] in the input data, K = E = [e 1 ,..., e w ], otherwise K = [1,..., 1], w bit data K
A modulo W circuit characterized in that it outputs = [k 1 ,..., k w ]. 2 n (n is an integer of 2 or more) w (w is an integer of 2 or more) bit data A 1 = [a 11 ,..., a 1w ], A 2 =
[a 21 , ..., a 2w ], ..., A o = [ a o1 , ..., a ow ] as inputs, and the modulus W (W =2 w −1) The result of the operation is D=[d 1 ,
…, d w ], the inputs A 1 , A 2 , …, A o
If one or more of them is [1,...,1], C=
[1,...,1], otherwise C=[d 1 ,..., d w ]
A modulo W arithmetic circuit that outputs w-bit data C=[c 1 ,...,c w ] and N-bit data Z
Among them, a first modulo W generation circuit receives M-bit data Z 1 as input and generates and outputs a modulo W value E=[e 1 , ..., e w ] of the data Z 1 ; , a second modulo W generation circuit which takes as input N-M bit data Z 2 excluding the data Z 1 and generates and outputs a modulo W value F=[f 1 , . . . , f w ] of the data Z 2. , the output C = [c 1 , ..., c w ] of the modulo W calculation circuit, and the output F = [f 1 , ..., f w ] of the second modulo W generation circuit, and the input C The modulus W value of the difference C-F between and F is G=
When [g 1 , ..., g w ], when one or more of the inputs C and F are [1, ..., 1], H = [1,
..., 1] In other cases, a modulo W subtraction circuit outputs w-bit data H=[h 1 , ..., h w ] such that H=[g 1 , ..., g w ]; Output H=[h 1 ,..., h w ] and the first modulus W
The output E = [e 1 , ..., e w ] of the generation circuit is input,
When H=E, K=[e 1 , ..., e w ]; when H≠E or H, one or more of E is [1, ..., 1], K = [1, ..., 1] ], w bit data K=
a modulo W matching circuit that outputs [k 1 ,..., k 2 ];
On the transmission path of the modulo W value, input the modulo W value L = [l 1 , ..., l w ] and the strobe signal, and output the strobe signal in the state of P = [1, ..., 1]. If you input strobe signal in other conditions, P = [l 1 ,
..., l w ], w bit data P = [p 1 , ..., p w ]
a modulo W register that outputs as a modulo W value after one strobe of the input L=[l 1 , . . . , l w ], and the n input data A 1 , A 2 , .
When the result G obtained by subtracting the modulus W value F from the calculation result D between A and o matches the modulus W value E, and there is no value of [1,...,1] in the input data, , w bit data K=E=[e 1 ,
..., e w ], and in other cases K=[1, ...,
1], the modulo W circuit holds and outputs the modulo W circuit, and detects the transmission path of [1, . . . , 1] based on the value held in the modulo W register. 3 n (n is an integer of 2 or more) w (w is an integer of 2 or more) bit data A 1 = [a 11 ,..., a 1w ], A 2 =
[a 21 , ..., a 2w ], ..., A o = [ a o1 , ..., a ow ] as inputs, and the modulus W (W =2 w −1) The result of the operation is D=[d 1 ,
…, d w ], the inputs A 1 , A 2 , …, A o
If one or more of them is [1,...,1], C=
[1,...,1], otherwise C=[d 1 ,..., d w ]
A modulo W arithmetic circuit that outputs w-bit data C=[c 1 ,...,c w ] and N-bit data Z
Among them, a first modulo W generation circuit receives M-bit data Z 1 as input and generates and outputs a modulo W value E=[e 1 , ..., e w ] of the data Z 1 ; , a second modulo W generation circuit which takes as input N-M bit data Z 2 excluding the data Z 1 and generates and outputs a modulo W value F=[f 1 , . . . , f w ] of the data Z 2. , the output C = [c 1 , ..., c w ] of the modulo W calculation circuit, and the output F = [f 1 , ..., f w ] of the second modulo W generation circuit, and the input C The modulus W value of the difference C-F between and F is G=
When [g 1 , ..., g w ], when one or more of the inputs C and F are [1, ..., 1], H = [1,
..., 1], and a modulo W subtraction circuit that outputs w-bit data H=[h 1 , ..., h w ] such that H=[g 1 , ..., g w ] in other cases, and the modulo W subtraction circuit. output H = [h 1 ,..., h w ], and the first modulus W
The output E = [e 1 , ..., e w ] of the generation circuit is input,
When H=E, K=[e 1 , ..., e w ]; when H≠E or H, one or more of E is [1, ..., 1], K = [1, ..., 1] ], w bit data K=
A modulo W matching circuit that outputs [k 1 , ..., k w ], the modulo W value L = [l 1 , ..., l w ] and a strobe signal are connected on the transmission path of the modulo W value. When inputting a strobe signal with the output P=[1,...,1], P=[1,...,1],
When a strobe signal is input in other conditions, P=
w bit data P = [p 1 , ..., l w ] [l 1 , ..., l w ]
p w ] as the modulo W value after one strobe of the input L = [l 1 , ..., l w ], and the input L = [1, ..., 1] or p = [1, ...,
1], when a strobe signal is input, q=
1. A modulo W register that outputs 1-bit data q such that q=0 when a strobe signal is input in any other state, and the n input data
The result G obtained by subtracting the modulus W value F from the calculation result D between A 1 , A 2 , ..., A o , and the modulus W
The value E matches, and the input data contains [1,
..., 1], w bit data K=E
= [e 1 , ..., e w ], and in other cases K =
[1, . . . , 1] are held, and an error report is output using the w bit data K and the 1 bit data q, and at the same time, according to the value held in the modulo W register, [1, . . . 1) A modulo W circuit characterized by detecting the transmission path.
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61-155008 | 1986-07-03 | ||
| JP15500886 | 1986-07-03 |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS63145546A JPS63145546A (en) | 1988-06-17 |
| JPH0542017B2 true JPH0542017B2 (en) | 1993-06-25 |
Family
ID=15596672
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP62158807A Granted JPS63145546A (en) | 1986-07-03 | 1987-06-27 | Modulo-w circuit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS63145546A (en) |
-
1987
- 1987-06-27 JP JP62158807A patent/JPS63145546A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS63145546A (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 | |
| Vasudevan et al. | Self-checking carry-select adder design based on two-rail encoding | |
| KR102009047B1 (en) | System and method for signature-based redundancy comparison | |
| Efanov et al. | Conditions for detecting a logical element fault in a combination device under concurrent checking based on Berger’s code | |
| US3596074A (en) | Serial by character multifunctional modular unit | |
| Vasudevan et al. | A technique for modular design of self-checking carry-select adder | |
| JPH0542017B2 (en) | ||
| JPH0563823B2 (en) | ||
| JPH0542015B2 (en) | ||
| JPH0542016B2 (en) | ||
| JP5638131B2 (en) | Data interface with intrinsic safety error detector | |
| JPH0786840B2 (en) | Modulo W circuit | |
| US5629945A (en) | Electronic arithmetic unit with multiple error detection | |
| JPS63145542A (en) | Modulo-w circuit | |
| Piestrak | Design of self-testing checkers for m-out-of-n codes using parallel counters | |
| JP5104690B2 (en) | Fault detection circuit | |
| JPH03132829A (en) | Parity inspection system | |
| JP3730877B2 (en) | Error reporting method and method | |
| Drozd et al. | Augmented Checkability of LUT-oriented Circuits in FPGA-based Components of Safety-Related Systems. | |
| JPS63145540A (en) | Modulo-w circuit | |
| Tarnick et al. | Embedded Self-testing checkers for low-cost arithmetic codes | |
| Pagey et al. | Application of byte error detecting codes to the design of self-checking circuits | |
| JPH03189736A (en) | Fault detecting system for selection circuit | |
| JPH01169544A (en) | Modulo n circuit | |
| JPH05282171A (en) | Counter |