JPH0542016B2 - - Google Patents

Info

Publication number
JPH0542016B2
JPH0542016B2 JP87158806A JP15880687A JPH0542016B2 JP H0542016 B2 JPH0542016 B2 JP H0542016B2 JP 87158806 A JP87158806 A JP 87158806A JP 15880687 A JP15880687 A JP 15880687A JP H0542016 B2 JPH0542016 B2 JP H0542016B2
Authority
JP
Japan
Prior art keywords
modulo
input
circuit
value
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
JP87158806A
Other languages
Japanese (ja)
Other versions
JPS63145545A (en
Inventor
Teru Ishizuka
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
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Publication of JPS63145545A publication Critical patent/JPS63145545A/en
Publication of JPH0542016B2 publication Critical patent/JPH0542016B2/ja
Granted legal-status Critical Current

Links

Description

【発明の詳細な説明】[Detailed description of the invention]

〔産業上の利用分野〕 本発明はデータ処理装置に関し、特に演算回路
等のチエツクに用いられるモジユロW回路に関す
る。 〔従来の技術〕 モジユロW回路は、主に演算回路等のチエツク
回路として従来より頻繁に使用されているチエツ
ク回路の1つである。ところで、モジユラスWと
しては、W=2w−1(例えば、3、7、15、…)
がしばしば用いられる。この理由は、モジユロ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〕を対応させる。 第9図に従来のモジユロ3回路の一例を示す。
第9図を参照して、演算装置9000は第1入力
データと第2入力データとを入力すると、それぞ
れ第1入力オペランドレジスタ9001、第2入
力オペランドレジスタ9002に格納し、演算回
路9011によつて、第1入力オペランドと第2
入力オペランドとの間の演算を実行し、その結果
を演算結果レジスタ9003に格納し、その後出
力する。 この演算装置9000に用いられるモジユロ3
回路は、モジユロ3期待値生成回路9012と、
モジユロ3期待値レジスタ9004と、モジユロ
3一致チエツク回路9013と、エラー表示フラ
グ9005とで構成される。 モジユロ3期待値生成回路9012は第1入力
オペランドレジスタ9001と第2入力オペラン
ドレジスタ9002とからそれぞれデータパス9
01,902を通して第1入力オペランドと第2
入力オペランドとを入力する。モジユロ3期待値
生成回路9012は演算回路9011に対応した
モジユロ3演算を実行し、演算結果のモジユロ3
の期待値を生成して、データパス912を通して
モジユロ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チエツク
回路においては、第9図で説明したよりも詳細に
チエツクを実行している。つまり、演算回路の最
終結果だけでなく、中間結果に対しても同様な一
致チエツクが実行されている。この場合の中間結
果のモジユロ3期待値はデータパス921を通つ
て演算回路に入力される。 第10図は演算装置内の演算回路の一部であつ
て、その中間結果に対してモジユロ3チエツクを
実行する場合の一例を示す図である。 第10図を参照して、演算回路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を出力し、図示のようにXは演算回路811
と、第1入力モジユロ3生成回路812とに入力
され、Yは演算回路811と第2入力モジユロ3
生成回路813とに入力される。 演算回路811はデータパス81を通してX
を、信号線82を通してYを入力するとXとYと
の間で演算を実行し、その演算結果Zをデータパ
ス91を通して、演算結果出力レジスタ803に
出力する。 演算結果出力レジスタ803はデータパス91
を通してZを入力し、格納した後、データパス8
3を通してZを出力する。Zは、演算結果800
0の出力となると共に演算結果モジユロ3生成回
路816の入力となる。 第1入力モジユロ3生成回路812はデータパ
ス81を通して上記のXを入力すると、そのモジ
ユロ3値を生成し、データパス92を通して出力
し、一致回路814と第1モジユロ3保持レジス
タ804の入力とする。 第2入力モジユロ3生成回路813はデータパ
ス82を通して上記のYを入力すると、そのモジ
ユロ3値を生成し、データパス93を通して出力
し、一致回路815と、第2モジユロ3保持レジ
スタ805の入力とする。 第1モジユロ3保持レジスタ804と、第2モ
ジユロ3保持レジスタ805は、それぞれデータ
パス92,93を通して上記のX、Yのモジユロ
3値を入力し、格納した後、それぞれデータパス
84,85を通してモジユロ3演算回路817の
入力とする。 モジユロ3演算回路817はデータパス84を
通してXのモジユロ3値を、またデータパス85
を通してYのモジユロ3値を入力し、演算回路8
11の演算に対応したモジユロ3演算を実行し、
前記演算結果Zのモジユロ3の期待値を生成す
る。そして、この期待値をデータパス97を通し
て出力し、一致回路818の1入力とする。 演算回路モジユロ3生成回路816はデータパ
ス83を通して演算結果Zを入力すると、Zのモ
ジユロ3値を生成し、データパス96を通して一
致回路818とモジユロ3出力レジスタ806の
入力とする。 モジユロ3出力レジスタ806はデータパス9
6を通してZのモジユロ3値を入力し、格納した
後データパス86を通してZのモジユロ3値Cを
出力する。Cは演算回路8000の1出力とし
て、後段のモジユロ3チエツク回路の入力等に用
いられる。 一致回路814はデータパス92を通して、上
記のXのモジユロ3値を入力すると共に、Xのモ
ジユロ3期待値Aを入力し、Xのモジユロ3値
と、その期待値Aが一致しているか否かをチエツ
クし、一致していないときはエラー報告をデータ
パス94を通してEIF(エラー表示フラグ)80
8に出力する。 一致回路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出力として出力する。 〔発明が解決しようとする問題点〕 第9図及び第10図に示すように従来のモジユ
ロ3回路では、モジユロ3が「データの示す数値
を3で割つた余り。」であるという数字的理由か
ら、モジユロ3の値として3、つまり2進データ
〔1、1〕は考慮されていないが、本来データ処
理装置で用いられるモジユロ3回路は、回路の故
障を検出するためのチエツク回路に用いられてい
るのであるから、故障によつてモジユロ3の値が
〔1、1〕となるケースも考慮すべきである。 例えば第10図において、第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〕、…、An=〔ao1、…、
aow〕が入力とし、該n個の入力A1、A2、…、
An間でのモジユロW(W=2w−1)演算の結果を
D=〔d1、…、dw〕としたとき、前記入力A1
A2、…、Anのうちの1つ以上が〔1、…、1〕
のときは、C=〔1、…、1〕、その他のときはC
=〔d1、…、dw〕となるwビツトデータC=〔c1
…、cw〕を出力するモジユロW演算回路と、該w
ビツトデータCと他のm(mは2以上の整数)個
のwビツトデータB1=〔b11、…、b1w〕、B2
〔b21、…、b2w〕、…、Bm=〔bn1、…、bnw〕とを
入力とし、該m+1個の入力が全て同じ値のとき
はE=〔c1、…、cw〕、前記m+1個の入力のいず
れかが異なる値のとき、またはいずれかの値が
〔1、…、1〕のときはE=〔1、…、1〕となる
wビツトデータE=〔e1、…、ew〕を出力するモ
ジユロW一致回路と、前記モジユロW演算回路及
びモジユロW一致回路の入出力部および中間結果
のモジユロW値の伝達パス上にあつて、該モジユ
ロW値F=〔f1、…、fw〕とストローブ信号とを
入力とし、出力G=〔1、…、1〕の状態でスト
ローブ信号を入力するとG=〔1、…、1〕、その
他の状態でストーロブ信号を入力すると、G=
〔f1、…、fw〕となるwビツトデータG=〔g1
…、gw〕を前記入力F=〔f1、…、fw〕の1スト
ローブ後のモジユロw値として出力するモジユロ
3レジスタとを備え、前記n個の入力データA1
A2、…、An間の演算結果Dと、前記m個の入力
データB1、B2、…、Bmとの全てが一致し、かつ
入力データのなかに〔1、…、1〕の値がないと
きは、wビツトデータE=D=〔d1、…、dw〕を
出力し、その他のときはE=〔1、…、1〕を保
持し出力すると共に、前記モジユロWレジスタの
保持値によつて〔1、…、1〕の伝達経路を検出
するようにしたことを特徴とするモジユロW回路
が得られる。 また本発明では上記のモジユロWレジスタに
は、入力F=〔1、…、1〕または出力G=〔1、
…、1〕の状態でストローブ信号を入力するとl
=1、その他の状態でストローブ信号を入力する
とl=0となる1ビツトデータlを出力する機能
が付加され、前記n個の入力データA1、A2、…、
An間の演算結果Dと、前記m個の入力データ
B1、B2、…、Bmとの全てが一致し、かつ、入力
データのなかに〔1、…、1〕の値がないとき
は、wビツトデータE=D=〔d1、…、dw〕を出
力し、その他のときはE=〔1、…、1〕を保持
し、該wビツトデータEと、1ビツトデータlを
用いてエラー報告とを出力すると共に、前記モジ
ユロWレジスタの保持値によつて〔1、…、1〕
の伝達経路を検出するようにしたことを特徴とす
るモジユロW回路が得られる。 〔実施例〕 次に本発明について図面を参照して説明する。
なお、ここでは、モジユロW回路の一例としてモ
ジユロ3回路について説明する。 第1図は本発明の実施例であり、本発明のモジ
ユロ3回路をチエツク回路として使用した演算回
路のブロツク図である。 第1図を参照して、演算回路6000は、2個
の2進データX、Yと、それぞれのモジユロ3期
待値A、Bとを入力とし、XとYとの間の演算結
果Zと、Zのモジユロ3値Cとを出力する。 第1入力レジスタ701と第2入力レジスタ7
02は、それぞれXとYとを入力し、格納した
後、それぞれデータパス71,72を通してX、
Yを出力し、図示のように演算回路601と、第
1モジユロ3生成回路602と第2入力モジユロ
3生成回路603の1入力とする。 演算回路601はデータパス71を通してXを
データパス72を通してYを入力すると、XとY
との間で演算を実行し、その演算結果Zをデータ
パス61を通し、演算結果出力レジスタ703に
出力する。 演算結果出力レジスタ703はデータパス61
を通してZを入力し、格納した後、データパス7
3を通してZを出力する。Zは演算回路6000
の出力になると共に、演算結果モジユロ3生成回
路606の入力とされる。 第1入力モジユロ3生成回路602はデータパ
ス71を通して上記Xを入力すると、そのモジユ
ロ3値を生成し、データパス62を通して出力
し、第1入力モジユロ3一致回路604の1入力
とする。 第2入力モジユロ3生成回路603はデータパ
ス72を通して上記Yを入力すると、そのモジユ
ロ3値を生成し、データパス63を通して出力
し、第2入力モジユロ3一致回路605の1入力
とする。 演算結果モジユロ3生成回路606はデータパ
ス73を通して上記Zを入力すると、そのモジユ
ロ3値を生成し、データパス66を通して出力
し、演算結果モジユロ3一致回路608の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の入力とする。 第2入力モジユロ3一致回路605はデータパ
ス63を通して上記Yのモジユロ3値を入力する
と共に、Yのモジユロ3期待値Bを入力し上記第
1入力モジユロ3一致回路604と同様に一致チ
エツクを実行し、Yのモジユロ3値あるいは
〔1、1〕をデータパス65を通して出力し、第
2モジユロ3保持レジスタ705の入力とする。 第1モジユロ3保持レジスタ704はデータパ
ス64を通して、第1入力モジユロ3一致回路6
04の出力モジユロ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一致回路608の1入力と
する。 演算結果モジユロ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は、演算回路600
0の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出力レジスタ7
06からデータパス76を通つて、モジユロ3値
として、C=〔1、1〕が出力される。 また第2の例として、第2入力モジユロ3一致
回路605により、Yのモジユロ3値とその期待
値Bが一致しない時は〔1、1〕がデータパス6
5を通して出力され、第2モジユロ3保持レジス
タ705からデータパス75を通り、モジユロ3
演算回路607からデータパス67を通り、演算
結果モジユロ3一致回路608からデータパス6
8を通り、モジユロ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・Y)・
(X+Y+Z−R)となる2個の2進数P、Qを
出力すると共に、その演算回路に対して、X、
Y、Z、R、S、Tのそれぞれのモジユロ3の値
A、B、C、D、E、Fを入力し、L=□−(A□+
B□+C□−D)、M=(A□+B□−E□・F)□・
(A□+B
□+C□−D)となる2個のモジユロ3の値L、Mを
出力する。 加算回路201は上記X、Yを入力すると、X
+Yを生成し、データパス1を通して出力し、加
算回路204と減算回路205の1入力とすると
共に、加算回路201内のモジユロ3回路は、X
とYのモジユロ3値A、Bを入力し、X+Yのモ
ジユロ3期待値を生成し、加算結果のチエツクを
して、故障が検出された時は〔1、1〕を、それ
以外の時は、X+Yのモジユロ3値A□+Bを、デ
ータパス21を通して出力し、加算回路204と
減算回路205の1入力とする。 減算回路202は前記Z、Rを入力するとZ−
Rを生成し、データパスZを通して出力すると共
に、Z、Rのモジユロ3値C、Dを入力しZ−R
の結果のチエツクをして、〔1、1〕またはC□−
Dをデータパス22を通して出力し、加算回路2
04の1入力とする。 乗算回路203は、上記S、Tを入力すると
S・T(=S×T)を生成し、データパス3を通
して出力すると共に、S、Tのモジユロ3値E、
Fを入力し、S・Tの結果のチエツクをして、
〔1、1〕またはE□・Fをデータパス23を通し
て出力し、演算回路205の1入力とする。 加算回路204はデータパス1を通してX+Y
を、データパス2を通してZ−Rを入力し、X+
Y+Z−Rを生成し、データパス4を通して出力
すると共に、データパス21を通してX+Yのモ
ジユロ3値A□+Bを、データパス22を通してZ
−Rのモジユロ3値C□−Dを入力し、X+Y+Z
−Rの結果のチエツクをして、A□+B□+C□−Dを
データパス24を通して出力する。ここでもし、
加算回路204内で故障が検出された場合、ある
いは加算回路204の入力以前に〔1、1〕とな
つている場合(A□+BまたはC□−Dが〔1、1〕
の場合)には、A□+B□+C□−D=〔1、1〕をデ
ータパス24を通して出力し、この出力を反転回
路206、乗算回路207の1入力とする。 減算回路205はデータパス1を通してX+Y
を、データパス3を通してS・Tを入力し、X+
Y−S・Tを生成し、データパス5を通して出力
すると共に、データパス21を通してA□+Bを、
データパス23を通してE□・Fを入力し、X+Y
−STのチエツクをして、A□+B□−E□・Fをデー
タパス25を通して出力し、乗算回路207の1
入力とする。データパス25上のモジユロ3値も
それより前段に故障が発生していた場合には
〔1、1〕となる。 反転回路206はデータパス4を通してX+Y
+Z−Rを入力すると、−(X+Y+Z−R)を生
成し、データパス6を通して出力すると共に、デ
ータパス24を通してA□+B□+C□−Dを入力し、
−(X+Y+Z−R)のチエツクをして□−(A□+
B□+C□−D)をデータパス26を通して出力す
る。データパス26上のモジユロ3値もそれより
前段に故障が発生していた場合には〔1、1〕と
なる。 乗算回路207はデータパス4を通してX+Y
+Z−Rを、データパス5を通してX+Y−S・
Tを入力すると(X+Y+Z−R)(X+Y−
S・T)を生成し、データパス7を通して出力す
ると共に、データパス24を通してA□+B□+C□−
Dを、データパス25を通してA□+B□−E□・Fを
入力すると、(X+Y+Z−R)(X+Y−S・
T)をチエツクし、(A□+B□+C□−D)□・(A
□+
B□−E□・F)をデータパス27を通して出力す
る。データパス27上のモジユロ3値も、それよ
り前段に故障が発生していた場合には、〔1、1〕
となる。 反転回路206の出力P=−(X+Y+Z−R)
とそのモジユロ3値L=□−(A□+B□+C□−D)

よび乗算回路207の出力Q=(X+Y+Z−R)
(X+Y−S・T)とそのモジユロ3値M=(A□+
B□+C□−D)□・(A□+B□−E□・F)は演算
回路7
000の出力となり、後段の回路に入力される。 ここで、例えば前記加算回路203内に故障が
発生して、データパス23上のモジユロ3値が
〔1、1〕となつた場合、このモジユロ3値は、
減算回路205を経て、データパス25を通り、
乗算回路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〕、その他の状態でストローブ信号を入力する
[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, the modulus W is W=2 w -1 (for example, 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 (hereinafter, W=2 2 -1=3 will be considered as a representative of W=2 w -1). For the three values 0, 1, and 2 of modulus 3, there are four values that can be expressed with 2-bit data: [0, 0], [0, 1], [1, 0], [1,
Define three values of [1]. for example,
0 corresponds to [0, 0], 1 corresponds to [0, 1], and 2 corresponds to [1, 0]. FIG. 9 shows an example of a conventional three-modulo circuit.
Referring to FIG. 9, when the arithmetic unit 9000 receives first input data and second input data, they are stored in a first input operand register 9001 and a second input operand register 9002, respectively, and are processed by an arithmetic circuit 9011. , the first input operand and the second
It executes an operation with the input operand, stores the result in the operation result register 9003, and then outputs it. Modulo 3 used in this arithmetic device 9000
The circuit includes a modulo 3 expected value generation circuit 9012,
It is composed of a modulo 3 expected value register 9004, a modulo 3 coincidence check circuit 9013, and an error display flag 9005. Modulo 3 expected value generation circuit 9012 connects data path 9 to first input operand register 9001 and second input operand register 9002, respectively.
01,902 through the first input operand and the second
Enter the input operand. The modulo 3 expected value generation circuit 9012 executes the modulo 3 calculation corresponding to the calculation circuit 9011, and modulo 3 of the calculation result.
The expected value of is generated and output to the modulo 3 expected value register 9004 through the data path 912. 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 coincidence 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. and its value and the modulus 3
Checks whether the expected values match, and if they do not match, reports an error to the data path 913.
It is output to the error display flag 9005 through. Error display flag (hereinafter referred to as EIF) 9005
When the error report is inputted through the data path 913, it is stored and holds the value until the release signal is inputted thereafter, and outputs the error report through the data path 905. Although a failure in the arithmetic unit 9000 is detected and reported through the above-described operation, the modulo 3 check circuit generally executes the check in more detail than that described in FIG. 9. In other words, a similar consistency check is performed not only on the final result of the arithmetic circuit, but also on intermediate results. The modulo 3 expected value of the intermediate result in this case is input to the arithmetic circuit through the data path 921. FIG. 10 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. Referring to FIG. 10, an arithmetic circuit 8000 inputs two binary data X, Y and their respective modulo ternary values A, B, and calculates the 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 respectively, X and Y are input through data paths 81 and 82 respectively.
Y is output, and as shown in the figure, X is an arithmetic circuit 811.
is input to the first input modulo 3 generation circuit 812, and Y is input to the arithmetic circuit 811 and the second input modulo 3 generation circuit 812.
The signal is input to the generation circuit 813. The arithmetic circuit 811 connects X through the data path 81.
When Y is input through the signal line 82, an operation is performed between X and Y, and the operation result Z is output to the operation result output register 803 through the data path 91. Operation result output register 803 is connected to data path 91
After entering and storing Z through data path 8
Output Z through 3. Z is the calculation result 800
It becomes an output of 0 and also becomes an input to the calculation result modulo 3 generation circuit 816. When the first input modulo 3 generation circuit 812 receives the above-mentioned X through the data path 81, it generates its modulo 3 value, outputs it through the data path 92, and inputs it to the matching circuit 814 and the first modulo 3 holding register 804. . When the second input modulo 3 generation circuit 813 receives the above Y through the data path 82, it generates its modulo 3 value, outputs it through the data path 93, and inputs it to the matching circuit 815 and the second modulo 3 holding register 805. do. The first modulo 3 holding register 804 and the second modulo 3 holding register 805 input and store the above-mentioned modulo three values of X and Y through data paths 92 and 93, respectively. 3 is input to the arithmetic circuit 817. The modulo 3 arithmetic circuit 817 receives the modulo 3 value of X through the data path 84 and the data path 85.
input the modulo three values of Y through the arithmetic circuit 8.
Execute modulo 3 operation corresponding to 11 operations,
An expected value of modulo 3 of the calculation result Z is generated. Then, this expected value is outputted through the data path 97 and is used as one input of the matching circuit 818. When the arithmetic circuit modulo 3 generation circuit 816 receives the arithmetic result Z through the data path 83, it generates a modulo 3 value of Z and inputs it through the data path 96 to the matching circuit 818 and the modulo 3 output register 806. Modulo 3 output register 806 is data path 9
The modulo ternary value of Z is input through 6, and after being stored, the modulo ternary value C of Z is outputted through the 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. The matching circuit 814 inputs the above-mentioned modulo 3 values of X through the data path 92, and also inputs the modulo 3 expected value A of X, and determines whether the modulo 3 values of X and the expected value A match. If they do not match, an error report is sent to the EIF (error display flag) 80 through the data path 94.
Output to 8. The matching circuit 815 compares the modulo 3 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 receive an error report through data paths 98, 94, and 95, they store it, hold the value until a release signal is input, and send the value to OR circuit 810. Output. 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] As shown in FIGS. 9 and 10, in the conventional modulo 3 circuit, the numerical reason is that modulo 3 is "the remainder when the numerical value indicated by the data is divided by 3." Therefore, the value of modulo 3 is 3, that is, binary data [1, 1] is not considered, but the modulo 3 circuit originally used in data processing equipment is used as a check circuit to detect circuit failure. Therefore, the case where the value of modulo 3 becomes [1, 1] due to a failure should also be considered. For example, in FIG. 10, 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 [1, 1] input is undefined, and the outputs of the match circuit 814, modulo 3 arithmetic circuit 817, match circuit 818, etc. have no logical meaning and are independent of the circuit configuration. Dependent. 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, the calculation result may be incorrect due to a failure in the arithmetic circuit. In this case, if the value of modulo 3 is the same as the output for [1, 1] above, the fault will not be detected, and the detection rate of the check circuit will not only drop significantly, but also When the error display flag lights up in the check circuit, it may cause an error in pointing out the failure location. In addition, when a part of the arithmetic circuit is implemented using an LSI, etc., the output and flip-flop values in response to the input of a certain test pattern are usually used to evaluate the failure detection of the LSI, etc.
Verify logic gates and logic patterns inside LSI etc. 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]
A logic description is also required for the input, and since the logic completely depends on the circuit configuration, the description becomes even more complex and 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,
It is necessary to generate expected values for each part of the arithmetic circuit and set error display flags for each part, which results in a large increase in the amount of hardware, and when multiple error display flags light up, it is possible that the cause is the same failure. It is difficult to determine whether this is caused by Generally, in conventional modulo W circuits, binary values [1,...,1] are not considered, so
It is difficult to improve the fault detection rate and division power as a modular W circuit, and furthermore, when verifying check circuits due to the recent trend toward LSI, the meaningless logical descriptions [1,...,1] are difficult to improve design efficiency. There is a drawback that it is a hindrance. [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 ],…, An = [a o1 ,…,
a ow ] is the input, and the n inputs A 1 , A 2 , ...,
When the result of the modulo W (W=2 w −1) operation between An is D=[d 1 , ..., d w ], the input A 1 ,
One or more of A 2 , ..., An is [1, ..., 1]
When , C=[1,...,1], otherwise C
= [d 1 , ..., d w ] w bit data C = [c 1 ,
..., c w ], and a modulo W calculation circuit that outputs the w
Bit data C and other m (m is an integer of 2 or more) w bit data B 1 = [b 11 ,..., b 1w ], B 2 =
[b 21 , ..., b 2w ], ..., Bm = [b n1 , ..., b nw ] as inputs, and when the m+1 inputs are all the same value, E = [c 1 , ..., c w ], when any of the m+1 inputs has a different value, or when any value is [1, ..., 1], E = [1, ..., 1], w bit data E = [e 1 , ..., e w ], the input/output section of the modulo W calculation circuit and the modulo W matching circuit, and the transmission path of the modulo W value of the intermediate result, the modulo W value F = [f 1 , ..., f w ] and a strobe signal are input, and when the strobe signal is input with the output G = [1, ..., 1], G = [1, ..., 1], and in other states. When a strobe signal is input, G=
w bit data G = [g 1 , f w ] [f 1 ,..., f w ]
..., g w ] as a modulo w value after one strobe of the input F = [f 1 , ..., f w ], and the n input data A 1 ,
The calculation result D between A 2 , ..., An matches all of the m input data B 1 , B 2 , ..., Bm, and the values of [1, ..., 1] are included in the input data. When there is no bit data, w bit data E=D=[d 1 ,..., d w ] is output, and in other cases, E=[1,..., 1] is held and output, and the modulus W register is A modulo W circuit is obtained, which is characterized in that the transmission path of [1, . . . , 1] is detected based on the held values. In addition, in the present invention, the above-mentioned modulo W register has input F=[1,...,1] or output G=[1,...,1].
..., 1], when a strobe signal is input, l
= 1, and when a strobe signal is input in any other state, a function is added to output 1-bit data l such that l = 0, and the n input data A 1 , A 2 , . . .
The calculation result D between An and the m input data
When all of B 1 , B 2 , ..., Bm match, and there is no value of [1, ..., 1] in the input data, w bit data E = D = [d 1 , ..., d w ], and otherwise holds E=[1,...,1], outputs an error report using the w bit data E and 1 bit data l, and outputs the modulo W register Depending on the retained value of [1,...,1]
A modulo W circuit is obtained, which is characterized in that it detects the transmission path of . [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 shows an 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. 1, an arithmetic circuit 6000 inputs two binary data X, Y and their respective modulo 3 expected values A, B, and calculates an arithmetic result Z between X and Y, The modulo 3-value C of Z is output. First input register 701 and second input register 7
02 inputs and stores X and Y, respectively, and then outputs X and Y through data paths 71 and 72, respectively.
Y is output and is used as one input of an arithmetic circuit 601, a first modulo 3 generating circuit 602, and a second input modulo 3 generating circuit 603 as shown in the figure. When X is input through the data path 71 and Y is input through the data path 72, the arithmetic circuit 601 inputs X and Y.
The calculation result Z is output to the calculation result output register 703 through the data path 61. The calculation result output register 703 is connected to the data path 61
After entering and storing Z through data path 7
Output Z through 3. Z is arithmetic circuit 6000
It becomes the output of the calculation result modulo 3 generation circuit 606 as well as the input of the calculation result modulo 3 generation circuit 606. When the first input modulo 3 generation circuit 602 receives the above-mentioned X through the data path 71, it generates its modulo 3 value, outputs it through the data path 62, and uses it as one input of the first input modulo 3 matching circuit 604. When the second input modulo 3 generation circuit 603 receives the above Y through the data path 72, it generates its modulo 3 value, outputs it through the data path 63, and uses it as one input of the second input modulo 3 matching circuit 605. When the calculation result modulo 3 generation circuit 606 receives the above-mentioned Z through the data path 73, it generates its modulo 3 value, outputs it through the data path 66, and uses it as one input of the calculation result modulo 3 matching circuit 608. The first input modulo 3 matching circuit 604 inputs the above modulo 3 value of X through the data path 62, and also inputs the modulo 3 expected value A of If they match, the modulo 3 values of X are output as they are, and when either the modulo 3 values of X and the expected value A are [1, 1], or When the expected values A do not match,
Outputs [1, 1]. This output modulo 3 value is input to the first modulo 3 holding register 704 through the data path 64. The second input modulo 3 matching circuit 605 inputs the above modulo 3 value of Y through the data path 63, inputs the expected modulo 3 value B of Y, and executes a match check in the same manner as the first input modulo 3 matching circuit 604. Then, the modulo 3 value of Y or [1, 1] is outputted through the data path 65 and input to the second modulo 3 holding register 705. The first modulo 3 holding register 704 is connected to the first input modulo 3 match circuit 6 through the data path 64.
After inputting the output modulo 3 values of 04 and storing them using the strobe signal, they are outputted through the data path 74 and used as one input of the modulo 3 arithmetic circuit 607.
However, if the value held in this register before the strobe signal is input is [1, 1], [1, 1] will be retained even after the strobe signal is input, and the output modulus of this register will be set to 3 regardless of the strobe signal. The value is [1,
1] and does not change. The second modulo 3 holding register 705 is connected to the second input modulo 3 match circuit 6 through the data path 65.
The output modulo 3 value of 05 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 the strobe signal is input is [1, 1], [1, 1] is held as in the first modulo 3 holding register 704,
Output does not change. The modulo 3 calculation circuit 607 inputs the output modulo 3 values of the first modulo 3 holding register 704 through the data path 74 and inputs the output modulo 3 values of the second modulo 3 holding register 705 through the data path 75, 3
When the value is [1, 1], [1, 1] is output as is, and when both are not [1, 1], the modulo 3 operation corresponding to the arithmetic circuit 601 is performed between the two modulo 3 values. Execute and output the result.
The output of the modulo 3 arithmetic circuit 607 is passed through the data path 67 as the modulo 3 expected value of the arithmetic result Z and is inputted to the arithmetic result modulo 3 matching circuit 608 . When the calculation result modulo 3 matching circuit 608 inputs the modulo 3 value of the calculation result Z through the data path 66 and also inputs the modulo 3 expected value of Z through the data path 67, the first input modulo 3 matching circuit 604 and the second In the same manner as the input modulo 3 matching circuit 605, a match check is performed between the modulo 3 value of Z and its expected value, and when they match, the modulo 3 value of Z is output as is, and the modulo 3 value of Z is When either of the expected values is [1, 1], or when the modulo 3 value of Z and the expected value do not match, [1, 1] is output. and,
The output modulo 3 value passes through the data path 68 and becomes an input to the modulo 3 output register 706. The modulo 3 output register 706 inputs the output modulo 3 value of the operation result modulo 3 matching circuit 608 through the data path 68, stores it in accordance with the strobe signal, and outputs it through the data path 76. This output modulo 3-value C is output by the arithmetic circuit 600.
It is used as an input to the subsequent stage modulo 3 circuit as a 1 output of 0. However, if the value held in this register before inputting the strobe signal is [1, 1], the first and second modulo 3 holding registers 704, 705
Similarly, [1, 1] is held and the output does not change. In the arithmetic circuit 6000, for example, a failure occurs in the output of the first modulo 3 holding register 704,
When the modulo 3 value on the data path 74 becomes [1, 1], the invalid value [1, 1] as the value of modulo 3 passes through the data path 74 and modulo 3
After passing through the arithmetic circuit 607 and the data path 67,
The calculation result modulo 3 matching circuit 608 passes through the data path 68, and then the modulo 3 output register 7.
06 through the data path 76, C=[1,1] is output as a modulo ternary value. As a second example, if the second input modulo 3 matching circuit 605 does not match the modulo 3 value of Y and its expected value B, [1, 1] is set to 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 arithmetic result modulo 3 matching circuit 608 to the data path 6.
8 and from the modulo 3 output register 706 through the data path 76 as a modulo 3 value C=
[1, 1] is output. Furthermore, if the calculation result Z is an abnormal value due to a failure of the calculation circuit 601, the modulo 3 value is inputted from the data path 66 to the calculation result modulo 3 matching circuit 608, and the expected value on the data path 67 is inputted. A match check is executed, and when there is no match, the value [1, 1] is sent to the modulus 3 through the data path 68.
C=[1,1] is output from the output register 706 through the data path 76 as a modulo ternary value. The same applies to the case where the input expected value A = [1, 1], and the data paths 64, 74, 67, 68, 76,
The upper modulo 3 value becomes [1, 1], and the modulo 3 value C=[1, 1] is output. As described above, when a failure occurs in the arithmetic circuit 6000 or when the input data is invalid, the output modulo 3-value C becomes the invalid value [1, 1] as the value of modulo 3, and the arithmetic circuit 6000 It is possible to transmit the fact that a failure has occurred in the stage before the output C of the circuit to the modulo 3 circuit in the succeeding stage. Also, after a failure is reported using this modulo 3 value C = [1, 1], how is the incorrect modulo 3 value [1, 1] used to find out in which part of the entire circuit the failure occurred? If you check whether the problem has spread, it is easy to find the location of the failure. FIG. 2 is a block diagram showing a second embodiment of the present invention, which is an example in which various arithmetic circuits similar to the arithmetic circuit 6000 of FIG. It is included in the circuit block in a configuration corresponding to the arithmetic circuit. In addition, in the following explanation, □+ is modulo 3 addition,
□- indicates modulo 3 subtraction or inversion, and □• indicates modulo 3 multiplication. Referring to FIG. 2, an arithmetic circuit 7000 inputs P
=-(X+Y+Z-R), Q=(X+Y-S・Y)・
It outputs two binary numbers P and Q that are (X+Y+Z-R), and also outputs X, Q to the arithmetic circuit.
Input the modulo 3 values A, B, C, D, E, and F for Y, Z, R, S, and T, and calculate L=□−(A□+
B□+C□-D), M=(A□+B□-E□・F)□・
(A□+B
□+C□-D) Two modulo 3 values L and M are output. When the adder circuit 201 inputs the above X and Y,
+Y is generated, outputted through data path 1, and used as one input of addition circuit 204 and subtraction circuit 205, and the modulo 3 circuit in addition circuit 201 generates
Input the modulo 3 values A and B of and Y, generate the modulo 3 expected value of . When the subtraction circuit 202 inputs the Z and R, the subtraction circuit 202 calculates Z-
Generate R and output it through data path Z, and input modulo 3 values C and D of Z and R to Z-R.
Check the result and select [1, 1] or C□-
D is output through the data path 22 and added to the adder circuit 2.
04 is one input. When the multiplication circuit 203 inputs the above S and T, it generates S·T (=S×T), outputs it through the data path 3, and modulo ternary value E of S and T,
Enter F, check the results of S and T,
[1, 1] or E□·F is output through the data path 23 and is used as one input of the arithmetic circuit 205. Adder circuit 204 outputs X+Y through data path 1.
, input Z-R through data path 2, and input X+
It generates Y+Z-R and outputs it through the data path 4, and also outputs the modulo 3 values of X+Y A□+B through the data path 21 and Z through the data path 22.
Input the modulo 3-value C□-D of -R, and enter X+Y+Z
Check the result of -R and output A□+B□+C□-D through the data path 24. Here too,
If a failure is detected in the adder circuit 204, or if the value is [1, 1] before the input to the adder circuit 204 (A□+B or C□-D is [1, 1])
), A□+B□+C□-D=[1, 1] is output through the data path 24, and this output is used as one input of the inversion circuit 206 and the multiplication circuit 207. The subtraction circuit 205 receives X+Y through data path 1.
, input S・T through data path 3, and press X+
It generates Y-S・T and outputs it through the data path 5, and also outputs A□+B through the data path 21.
Input E□・F through data path 23, and
-ST is checked, A□+B□-E□・F is output through the data path 25, and the multiplier circuit 207
Use as input. The modulo 3 values on the data path 25 will also be [1, 1] if a failure has occurred in the previous stage. The inverting circuit 206 connects X+Y through the data path 4.
When +Z-R is input, -(X+Y+Z-R) is generated and output through the data path 6, and at the same time, A□+B□+C□-D is input through the data path 24,
-(X+Y+Z-R) and □-(A□+
B□+C□-D) is output through the data path 26. The modulo 3 values on the data path 26 will also be [1, 1] if a failure has occurred in the previous stage. The multiplier circuit 207 outputs X+Y through the data path 4.
+Z-R through data path 5 to X+Y-S.
If you input T, (X+Y+Z-R)(X+Y-
S・T) and outputs it through the data path 7, and also outputs it through the data path 24 as A□+B□+C□-
When inputting D and A□+B□-E□・F through the data path 25, (X+Y+Z-R) (X+Y-S・
T) and (A□+B□+C□-D)□・(A
□+
B□-E□・F) is output through the data path 27. The modulo 3 values on the data path 27 will also be set to [1, 1] if a failure has occurred in the previous stage.
becomes. Output of inversion circuit 206 P=-(X+Y+Z-R)
and its modulus 3-value L=□-(A□+B□+C□-D)
and output Q of multiplication circuit 207 = (X+Y+Z-R)
(X+Y-S・T) and its modulus 3-value M=(A□+
B□+C□-D)□・(A□+B□-E□・F) is the arithmetic circuit 7
It becomes an output of 000 and is input to the subsequent circuit. Here, for example, if a failure occurs in the adder circuit 203 and the modulo 3 values on the data path 23 become [1, 1], this modulo 3 value becomes
After passing through the subtraction circuit 205 and passing through the data path 25,
M=
It is output as [1, 1]. M = [1, 1] is invalid data, and it is clearly shown that a failure has occurred somewhere up to M, and by following the path of [1, 1], the cause can be found in the multiplier circuit 203.
It is also easy to point out that. As a second example, when input D = [1, 1], the modulo ternary invalid data [1, 1] passes through the subtraction circuit 202, the data path 22, the addition circuit 204, and then the data path 24. , passes through the inversion circuit 206, passes through the data path 26, and L=[1,
1], and the data path 24
The signal then passes through the multiplication circuit 207 and the data path 27, and is output as M=[1, 1]. L=M
= [1, 1] is invalid data, it clearly indicates that a failure has occurred somewhere up to L or M, and by following the path of [1, 1], the cause can be determined by calculation. It turns out that the cause is not in the circuit 7000 but in a previous stage, and that the reason why L and M become [1, 1] is due to the same cause. Since the conventional modulo 3 circuit case [1, 1] has not been taken into consideration, if a failure like the one described above occurs in the middle of the circuit, the values of L and M may vary depending on other inputs, circuit configuration, etc. Therefore, it is difficult to determine whether or not the data is fraudulent, and there are cases where it is not detected. Furthermore, when pointing out a failure location, it is difficult to judge the value of incorrect data in the middle, so the resolution becomes extremely low. On the other hand, in the case of this embodiment, the invalid data is [1, 1]
Since it is easy to judge based on the value, the failure detection rate is high, and since all the values of the paths that the value [1, 1] passed through are [1, 1], the value of [1, 1] It is easier to find the faulty location that is causing the problem, and the resolution is also higher. Also, unlike the conventional modulo 3 circuit, [1, 1] is taken into account as input, and the output [1, 1] is also a logically meaningful value, so when realized with LSI etc., it is only used for logic verification. Furthermore, there is no need to write a theoretically meaningless [1, 1] description, and design efficiency is not hindered. FIG. 3 is a block diagram showing a third embodiment of the present invention, and FIG.
If you input a strobe signal when the input modulo 3 values or output modulo 3 values are [1, 1], it will be [1], and if you input the strobe signal in any other state.

〔0〕となる1ビツトデータを出力する機能を
加えたモジエロ3レジスタ504,505,50
6を使用し、さらに論理和回路507を追加した
例である。 第3図を参照して、第1モジユロ3保持レジス
タ504は、データパス64を通し、第1入力モ
ジユロ3一致回路604の出力モジユロ3値を入
力し、ストローブ信号によつて格納後、データパ
ス74を通して出力し、モジユロ3演算回路60
7の1入力とする。ただし、ストローブ信号入力
前の本レジスタ内の保持値が〔1、1〕のとき、
またはデータパス64を通して入力するモジユロ
3値が〔1、1〕のときは、ストローブ信号入力
後も〔1、1〕が保持され、ストローブ信号に関
らず、本レジスタの出力モジユロ3値は〔1、
1〕を保ち、変化しないと共に、エラー報告の1
ビツトデータl1=1がデータパス54を通して出
力され、論理和回路507の1入力となる。 第2モジユロ3保持レジスタ505は、データ
パス65を通し、第2モジユロ3一致回路605
の出力モジユロ3値を入力し、ストローブ信号に
よつて格納後、データパス75を通して出力し、
モジユロ3演算回路607の1入力とする。ただ
しストローブ入力前の本レジスタ内の保持値が
〔1、1〕のとき、または入力モジユロ3値が
〔1、1〕のときは、前記第1モジユロ3保持レ
ジスタ504と同様にして、〔1、1〕が保持さ
れ変化しないと共に、エラー報告の1ビツトデー
タl2=1がデータパス55を通して出力され、論
理和回路507の1入力となる。 モジユロ3出力レジスタ506は、演算結果モ
ジユロ3一致回路608の出力モジユロ3値をデ
ータパス68を通して入力し、ストローブ信号に
よつて格納後、データパス76を通して出力す
る。この出力モジユロ3値Cは、演算回路500
0の1出力として後段のモジユロ3回路の入力等
に用いられる。ただし、ストローブ信号入力前の
本レジスタ内の保持値が〔1、1〕のとき、また
は入力モジユロ3値が〔1、1〕のときは、第
1、第2モジユロ3保持レジスタ504,505
と同様にして、〔1、1〕が保持され変化しない
と共に、エラー報告の1ビツトデータl3=1がデ
ータパス56を通して出力され、論理和回路50
7の1入力となる。 論理和回路507は、データパス54を通して
l1を、データパス55を通してl2を、データパス
56を通してl3を入力すると、l1とl2とl3の論理和
Eを生成し出力する。l1、l2、l3はそれぞれのモ
ジユロ3レジスタの保持値が〔1、1〕のとき、
つまり故障を検出したときに1となる1ビツトデ
ータであるから、論理和E=1は演算回路500
0内で故障を検出した事を示すことになる。 演算回路5000内の他の回路は、第1図の演
算回路6000と同等であるので説明は省略す
る。 第4図は、本発明に使用されるモジユロ3演算
回路の真理値表を示す図であり、第4図aは加算
回路、bは減算回路、cは乗算回路、dは反転回
路に対応し、それぞれモジユロ3加算、モジユロ
3減算、モジユロ3乗算、モジユロ3反転回路の
真理値表を示す図である。ただし、一は任意の値
を示す。 第4図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〕の時は第4図aの真理値表よ
りC=〔0、0〕となる。 以上は従来のモジユロ3回路と同等であるが、
本回路の特徴は、モジユロ3の値として〔1、
1〕を考慮した事にある。もし、2進数Xよりモ
ジユロ3の値A=〔a1、a2〕を生成する回路の故
障によつてA=〔1、1〕となつた場合、第4図
aの真理値表に示す様に、期待値C=〔c1、c2〕=
〔1、1〕となる。2進数Y側の故障についても
同様である。つまり期待値Cが〔1、1〕となる
のは3ケース存在し、1はA=〔1、1〕の場合、
他の1つはB=〔1、1〕の場合、そしてモジユ
ロ3加算回路自体の故障によつてC=〔1、1〕
となる場合である。 第5図は、本発明に使用されるモジユロ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を出力す
る。 第6図は第4図の真理値表で示した論理で構成
されたモジユロ3演算回路302と、第5図の真
理値表で示した論理で構成されたモジユロ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生成回路301は和の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
一致回路302自体に故障が発生してM=〔1、
1〕となつた場合、演算回路部またはモジユロ3
演算回路302に故障が発生してD≠Cとなつた
場合、これらのいずれの場合にも出力M=〔1、
1〕となり、出力M以前の回路に故障が発生した
事を検出し、故障を示すモジユロ3の値〔1、
1〕を後段のチエツク回路に出力する事になる。
後段のチエツク回路では、〔1、1〕以外の値を
入力した時は正常なデータ、〔1、1〕の時は故
障が検出されている事を判別する事ができる。 第7図a及びbはそれぞれ本発明に使用される
モジユロ3レジスタの真理値表を示す図及びブロ
ツク図である。 第7図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〕から、エラー報告信号を生
成すれば本回路はエラー表示フラグとしての役割
も兼ねることになる。 第8図a及びbはそれぞれ第7図のモジユロ3
レジスタ501に、エラー報告等に用いることの
できるビツトデータfを出力する機能を追加した
モジユロ3レジスタの真理値表を示す図及びブロ
ツク図である。 第8図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〕が入力された事を意味するのでそのま
まエラー報告信号として用いる事ができる。その
他の動作は第7図a及びbにおいて説明したモジ
ユロ3レジスタ501と同等なので説明は省略す
る。 なお、上述の実施例では、W=3、即ち、モジ
ユロ3回路について説明したが、W=2w−1(w
は2以上の整数)の場合、についても同様に構成
できる。 〔発明の効果〕 以上説明した様に本発明では、モジユロWの値
として、不正なデータ〔1、…、1〕を考慮し、
〔1、…、1〕を故障検出時のモジユロWの値と
することによつてチエツク回路自体の〔1、…、
1〕の故障も検出できると共に、後段のチエツク
回路の前段の故障検出を伝達する事ができ、さら
に〔1、…、1〕の伝達経路をたどる事によつて
故障箇所を判別し易いため、チエツク回路全体の
故障の検出率、分解能を向上させ、さらにLSI化
等に適した構成にできるという効果がある。
Mosiello 3 registers 504, 505, 50 with the added function of outputting 1-bit data that becomes [0]
6 is used, and an OR circuit 507 is further 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 data path 64, stores it by the strobe signal, and then 74, and modulo 3 arithmetic circuit 60
7, 1 input. However, when the value held in this register before inputting the strobe signal is [1, 1],
Or, when the modulo 3 value input through the data path 64 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. 1,
1] and does not change, and error report 1
Bit data l 1 =1 is output through the data path 54 and becomes one input of the OR circuit 507 . The second modulo 3 holding register 505 is connected to the second modulo 3 matching circuit 605 through the data path 65.
The output modulo 3 values are inputted, stored by the strobe signal, and outputted through the data path 75.
It is assumed to be one input of the modulo 3 arithmetic circuit 607. However, when the value held in this register before the strobe input is [1, 1], or when the input modulo 3 value is [1, 1], the value is set to [1, 1] in the same way as the first modulo 3 holding register 504. . The modulo 3 output register 506 inputs the output modulo 3 value of the operation result modulo 3 matching circuit 608 through the data path 68, stores it in accordance with the strobe signal, and outputs it through the data path 76. This output modulo 3-value C is output by the arithmetic circuit 500.
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 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, 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 the OR circuit 50
This is one input of 7. 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 means that the arithmetic circuit 500
This indicates that a failure was detected within 0. The other circuits in the arithmetic circuit 5000 are the same as the arithmetic circuit 6000 in FIG. 1, so their explanation will be omitted. FIG. 4 is a diagram showing a truth table of a modulo-3 arithmetic circuit used in the present invention, in which a corresponds to an addition circuit, b corresponds to a subtraction circuit, c corresponds to a multiplication circuit, and d corresponds to an inversion circuit. , respectively. However, 1 indicates an arbitrary value. An example of the adder circuit shown in FIG. 4a will be explained. In the check circuit of an adder circuit that calculates the sum Z of two arbitrary binary numbers X and Y , the modulo 3 value of the input binary number Let B = [b 1 , b 2 ], then the binary number X
An expected value C=[c 1 , c 2 ] as the modulo 3 value of the addition result Z of and Y is prepared. For example, A=[0,
1], B=[1, 0], then C=[0, 0] from the truth table in FIG. 4a. 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 A = [1, 1] due to a failure in the circuit that generates the modulo 3 value A = [a 1 , a 2 ] from the binary number X, the truth table in Figure 4a shows , the expected value C=[c 1 , c 2 ]=
It becomes [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], and 1 is when A = [1, 1].
The other case is when B = [1, 1] and C = [1, 1] due to a failure of the modulo-3 adder circuit itself.
This is the case. FIG. 5 is a diagram showing a truth table of the 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 ]=[1, 1], 2-bit data C is output. FIG. 6 shows a check circuit including a modulo-3 arithmetic circuit 302 configured with the logic shown in the truth table of FIG. 4 and a modulo-3 matching circuit 303 configured with the logic shown in the truth table of FIG. FIG. 3 is a block diagram of the circuit. 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 modulo ternary value of Y B = [b 1 , b 2 ]
= [1, 0] and 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 one input of the modulo 3 matching circuit 303 . When the modulo 3 generation circuit 301 inputs the binary sum Z, the modulo 3 value of Z = [d 1 , d 2 ] =
It generates [1, 0] and inputs 1 to the modulo 3 matching circuit 303 through the data path 31. 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 302 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], it is detected that a failure has occurred in the circuit before output M, and the value of modulo 3 [1,
1] is output to the subsequent check circuit.
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]. FIGS. 7a and 7b are a truth table and a block diagram, respectively, of a modulo-3 register used in the present invention. Referring to FIGS. 7a and 7b, 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, D = [0, 1], and when the strobe signal is input, the output E changes from [1, 0] to [0, 1]. do. 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], the state of [1, 1] will be maintained 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 incorrect data [1, 1] of this circuit, this circuit will also serve as an error display flag. Figures 8a and b are the modulus 3 of Figure 7, respectively.
5 is a diagram and a block diagram showing a truth table of a modulo 3 register in which a function of outputting bit data f that can be used for error reporting etc. is added to the register 501. FIG. Referring to FIGS. 8a and 8b, modulo 3 register 502 inputs 2-bit data D=[d 1 , d 2 ] and strobe signal STB, and according to the logical configuration shown in the truth table, modulo 3 register 502 outputs 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 thereafter maintains the state of f = 1 with output E = [1, 1]. . 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 with reference to FIGS. 7a and 7b, 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), it can be constructed in the same way. [Effects of the Invention] As explained above, in the present invention, invalid data [1,...,1] is considered as the value of modulo W, and
By setting [1,...,1] to the value of modulo W at the time of fault detection, [1,...,1] of the check circuit itself
1] can be detected, and the fault detection in the previous stage can be transmitted to the subsequent check circuit, and furthermore, by following the transmission path of [1,..., 1], it is easy to determine the failure location. This has the effect of improving the fault detection rate and resolution of the entire check circuit, and also making it suitable for LSI implementation.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明のモジユロ3回路をチエツク回
路として使用した演算回路の一例を示すブロツク
図、第2図は第1図の演算回路と同等な各種演算
回路を複数個、複数段使用した演算回路の一例を
示すブロツク図、第3図は第1図の第1の実施例
に、他の機能を追加した演算回路の一例を示すブ
ロツク図、第4図は本発明に使用されるモジユロ
3演算回路の真理値表を示す図、第5図は本発明
に使用されるモジユロ3一致回路の真理値表を示
す図、第6図は第4図の真理値表で示した論理構
成のモジユロ3演算回路と、第5図の真理値表で
示した論理構成のモジユロ3一致回路とを含むチ
エツク回路の例を示すブロツク図、第7図a及び
bはそれぞれ本発明に使用されるモジユロ3レジ
スタの真理値表を示す図及びブロツク図、第8図
a及びbはそれぞれ第7図に示すモジユロ3レジ
スタに他の機能を追加したモジユロ3レジスタの
真理値表を示す図及びブロツク図、第9図は、従
来のモジユロ3チエツク回路の一例を示すブロツ
ク図、第10図は、演算装置内の演算回路の一部
であり、その中間結果に対するモジユロ3チエツ
ク回路の一例を示すブロツク図である。 604,605,608,303……モジユロ
3一致回路、704,705,706,504,
505,506,501,502,804,80
5,806……モジユロ3保持レジスタ、60
2,603,606,301,812,813,
816……モジユロ3生成回路、607,30
2,817……モジユロ3演算回路、601,8
11,5000,6000,7000,8000
……演算回路、701,702,801,802
……入力レジスタ、703,803……演算結果
レジスタ、814,815,818……一致回
路、807,808,809,EIF(エラー表示
フラグ),201,204……加算回路、202,
205……減算回路、203,207……乗算回
路、206……反転回路、9001,9002…
…入力オペランドレジスタ、9003……演算結
果レジスタ、9011……演算回路、9012…
…モジユロ3期待値生成回路、9004……モジ
ユロ3期待値レジスタ、9013……モジユロ3
一致チエツク回路、9005……エラー表示フラ
グ、9000……演算装置。
Fig. 1 is a block diagram showing an example of an arithmetic circuit using the modulo 3 circuit of the present invention as a check circuit, and Fig. 2 is an arithmetic circuit using multiple stages of various arithmetic circuits equivalent to the arithmetic circuit of Fig. 1. FIG. 3 is a block diagram showing an example of an arithmetic circuit in which other functions are added to the first embodiment shown in FIG. 1. FIG. FIG. 5 is a diagram showing the truth table of the arithmetic circuit, FIG. 5 is a diagram showing the truth table of the modulo 3 coincidence circuit used in the present invention, and FIG. 6 is a diagram showing the truth table of the logical configuration shown in the truth table of FIG. 4. A block diagram showing an example of a check circuit including a 3-arithmetic circuit and a modulo-3 matching circuit having the logical configuration shown in the truth table of FIG. FIGS. 8a and 8a and b are a diagram and a block diagram showing a truth table of a register, respectively, and FIGS. FIG. 9 is a block diagram showing an example of a conventional modulo 3 check circuit, and FIG. 10 is a block diagram showing an example of a modulo 3 check circuit for intermediate results, which is part of an arithmetic circuit in an arithmetic unit. . 604, 605, 608, 303... Modulo 3 coincidence circuit, 704, 705, 706, 504,
505, 506, 501, 502, 804, 80
5,806...Module 3 holding register, 60
2,603,606,301,812,813,
816... Modulo 3 generation circuit, 607,30
2,817... Modulo 3 arithmetic circuit, 601,8
11,5000,6000,7000,8000
... Arithmetic circuit, 701, 702, 801, 802
... Input register, 703, 803 ... Operation result register, 814, 815, 818 ... Matching circuit, 807, 808, 809, EIF (error display flag), 201, 204 ... Addition circuit, 202,
205... Subtraction circuit, 203, 207... Multiplication circuit, 206... Inversion circuit, 9001, 9002...
...Input operand register, 9003...Arithmetic result register, 9011...Arithmetic circuit, 9012...
...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)

【特許請求の範囲】 1 n(nは2以上の整数)個のw(wは2以上の
整数)ビツトデータA1=〔a11、…、a1w〕、A2
〔a21、…、a2w〕、…、An=〔ao1、…、aow〕が入
力され、該n個の入力A1、A2、…、An間でのモ
ジユロW(W=2w−1)演算の結果をD=〔d1
…、dw〕としたとき、前記入力A1、A2、…、An
のうちの1つ以上が〔1、…、1〕のときはC=
〔1、…、1〕、その他のときはC=〔d1、…、dw
となるwビツトデータC=〔c1、…、cw〕を出力
するモジユロW演算回路と、該wビツトデータC
と他のm(mは2以上の整数)個のwビツトデー
タB1=〔b11、…、b1w〕、B2=〔b21、…、b2w〕、
…、Bm=〔bn1、…、bnw〕とを入力とし、該m
+1個の入力が全て同じ値のときはE=〔C1
…、Cw〕、前記m+1個の入力データのいずれか
が異なる値のとき、またはいずれかの値が〔1、
…、1〕のときはE=〔1、…、1〕となるwビ
ツトデータE=〔e1、…、ew〕を出力するモジユ
ロW一致回路と、前記モジユロW演算回路及びモ
ジユロW一致回路の入出力部および中間結果のモ
ジユロW値の伝達パス上にあつて、該モジユロW
値F=〔f1、…、fw〕とストローブ信号とを入力
とし、出力G=〔1、…、1〕の状態でストロー
ブ信号の入力すると、G=〔1、…、1〕、その他
の状態でストローブ信号を入力すると、G=〔f1
…、fw〕となるWビツトデータG=〔g1、…、gw
を前記入力F=〔f1、…、fw〕の1ストローブ後
のモジユロW値として出力するモジユロWレジス
タとを備え、前記n個の入力データA1、A2、…、
An間の演算結果Dと、前記m個の入力データ
B1、B2、…、Bmとの全てが一致し、かつこれら
入力データのなかに〔1、…、1〕の値がないと
きは、wビツトデータE=D=〔d1、…、dw〕を
出力し、その他のときはE=〔1、…、1〕を保
持し、出力すると共に、前記モジユロWレジスタ
の保持値によつて、〔1、…、1〕の伝達経路を
検出するようにしたことを特徴とするモジユロW
回路。 2 n(nは2以上の整数)個のw(wは2以上の
整数)ビツトデータA1=〔a11、…、a1w〕、A2
〔a21、…、a2w〕、…、An=〔ao1、…、aow〕が入
力され、該n個の入力A1、A2、…、An間でのモ
ジユロW(W=2w−1)演算の結果をD=〔d1
…、dw〕としたとき、前記入力A1、A2、…、An
のうちの1つ以上が〔1、…、1〕のときはC=
〔1、…、1〕、その他のときはC=〔d1、…、dw
となるwビツトデータC=〔c1、…、cw〕を出力
するモジユロW演算回路と、該wビツトデータC
と他のm(mは2以上の整数)個のwビツトデー
タB1=〔b11、…、b1w〕、B2=〔b21、…、b2w〕、
…、Bm=〔bn1、…、bnw〕とを入力とし、該m
+1個の入力が全て同じ値のときはE=〔c1、…、
cw〕、前記m+1個の入力データのいずれかが異
なる値のとき、またはいずれかの値が〔1、…、
1〕のときはE=〔1、…、1〕となるwビツト
データE=〔e1、…、ew〕を出力するモジユロW
一致回路と、前記モジユロW演算回路及びモジユ
ロW一致回路の入出力部および中間結果のモジユ
ロW値の伝達パス上にあつて、該モジユロW値F
=〔f1、…、fw〕とストローブ信号とを入力とし、
出力G=〔1、…、1〕の状態でストローブ信号
を入力すると、G=〔1、…、1〕、その他の状態
でストローブ信号を入力すると、G=〔f1、…、
fw〕となるWビツトデータG=〔g1、…、gw〕を
前記入力F=〔f1、…、fw〕の1ストローブ後の
モジユロW値として出力し、さらに、前記入力F
=〔1、…、1〕またはG=〔1、…、1〕の状態
でストローブ信号を入力すると、l=1、その他
の状態でストローブ信号を入力するとl=0とな
る1ビツトデータlを出力するモジユロWレジス
タとを備え、前記n個の入力データA1、A2、…、
An間の演算結果Dと、前記m個の入力データ
B1、B2、…、Bmとの全てが一致し、かつ、入力
データのなかに〔1、…、1〕の値がないとき
は、WビツトデータE=D=〔d1、…、dw〕を出
力し、その他のときは、E=〔1、…、1〕を保
持し、該wビツトデータEと前記1ビツトデータ
lを用いてエラー報告とを出力すると共に、前記
モジユロ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 ], ... , An = [a o1 , ... , a ow ] are input, and the modulo W (W = 2 w −1) The result of the operation is D=[d 1 ,
…, d w ], the inputs A 1 , A 2 , …, An
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 the w-bit data C
and other m (m is an integer of 2 or more) w-bit data B 1 = [b 11 , ..., b 1w ], B 2 = [b 21 , ..., b 2w ],
..., Bm = [b n1 , ..., b nw ] as input, and the m
When +1 inputs all have the same value, E=[C 1 ,
..., C w ], when any of the m+1 input data has a different value, or when any of the values is [1,
..., 1], E = [1, ..., 1]. A modulo W matching circuit that outputs w bit data E = [e 1 , ..., e w ], the modulo W arithmetic circuit and the modulo W matching circuit. On the transmission path of the modulo W value of the input/output part of the circuit and the intermediate result, the modulo W value is
If the value F = [f 1 , ..., f w ] and a strobe signal are input, and the strobe signal is input with the output G = [1, ..., 1], then G = [1, ..., 1], etc. When a strobe signal is input in the state of , G=[f 1 ,
..., f w ], W bit data G = [g 1 , ..., g w ]
a modulo W register that outputs the modulo W value after one strobe of the input F=[f 1 , ..., f w ], and the n input data A 1 , A 2 , ...,
The calculation result D between An and the m input data
When all of B 1 , B 2 , ..., Bm match and there is no value of [1, ..., 1] in these input data, w bit data E=D=[d 1 , ..., d w ], and at other times, E=[1,...,1] is held and output, and the transmission path of [1,...,1] is determined by the value held in the modulo W register. Modulo W characterized by detecting
circuit. 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 ], ... , An = [a o1 , ... , a ow ] are input, and the modulo W (W = 2 w −1) The result of the operation is D=[d 1 ,
…, d w ], the inputs A 1 , A 2 , …, An
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 the w-bit data C
and other m (m is an integer of 2 or more) w-bit data B 1 = [b 11 , ..., b 1w ], B 2 = [b 21 , ..., b 2w ],
..., Bm = [b n1 , ..., b nw ] as input, and the m
When +1 inputs all have the same value, E=[c 1 ,...,
c w ], when any of the m+1 input data has different values, or when any of the values is [1,...,
1], the modulus W outputs w bit data E=[e 1 ,..., e w ], where E=[ 1 ,..., 1 ].
On the transmission path of the matching circuit, the input/output section of the modulo W calculation circuit and the modulo W matching circuit, and the modulo W value of the intermediate result, the modulo W value F
= [f 1 , ..., f w ] and the strobe signal are input,
If a strobe signal is input in the state of output G = [1,..., 1], G = [1,..., 1], and if a strobe signal is input in any other state, G = [f 1 ,...,
The W bit data G = [g 1 , ..., g w ] that becomes f w ] is output as the modulo W value after one strobe of the input F = [f 1 , ..., f w ], and
If a strobe signal is input in the state of = [1,...,1] or G = [1,...,1], l = 1, and if the strobe signal is input in any other state, l = 0, which is 1-bit data l. and a modulo W register to output the n input data A 1 , A 2 , . . .
The calculation result D between An and the m input data
When all of B 1 , B 2 , ..., Bm match, and there is no value of [1, ..., 1] in the input data, W bit data E=D=[d 1 , ..., d w ], and in other cases, holds E=[1,...,1], outputs an error report using the w bit data E and the 1-bit data l, and outputs the modulus W. Depending on the value held in the register [1, 1]
A modulo W circuit is characterized in that it detects a transmission path of.
JP62158806A 1986-07-03 1987-06-27 Modulo-w circuit Granted JPS63145545A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP15500786 1986-07-03
JP61-155007 1986-07-03

Publications (2)

Publication Number Publication Date
JPS63145545A JPS63145545A (en) 1988-06-17
JPH0542016B2 true JPH0542016B2 (en) 1993-06-25

Family

ID=15596651

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62158806A Granted JPS63145545A (en) 1986-07-03 1987-06-27 Modulo-w circuit

Country Status (1)

Country Link
JP (1) JPS63145545A (en)

Also Published As

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

Similar Documents

Publication Publication Date Title
KR20130094249A (en) System and method for signature-based redundancy comparison
Kumar et al. On-line detection of faults in carry-select adders
JPS63200249A (en) Pseudo fault generating system for cache memory device
US3699322A (en) Self-checking combinational logic counter circuit
JPH0542016B2 (en)
US3559168A (en) Self-checking error checker for kappa-out-of-nu coded data
JPH0542015B2 (en)
US6027243A (en) Parity check circuit
JPH0542017B2 (en)
JPS63145542A (en) Modulo-w circuit
US5629945A (en) Electronic arithmetic unit with multiple error detection
JPH0583933B2 (en)
JPH03189736A (en) Fault detecting system for selection circuit
JPS63145547A (en) Modulo-w circuit
JPH01169544A (en) Modulo n circuit
SU1112366A1 (en) Signature analyzer
JPS63145540A (en) Modulo-w circuit
JPS63145543A (en) Modulo-w circuit
JPH04141745A (en) Semiconductor integrated circuit device
JPS61228366A (en) System for checking erroneous operation of lsi
Pagey et al. Application of byte error detecting codes to the design of self-checking circuits
JPS6355477A (en) Operation testing circuit
JPH05322994A (en) Semiconductor device
JPH0298218A (en) Data compression circuit
Stroud Merging BIST and Concurrent Fault Detection