JPH04127241A - Parity generation/check circuit - Google Patents

Parity generation/check circuit

Info

Publication number
JPH04127241A
JPH04127241A JP2337262A JP33726290A JPH04127241A JP H04127241 A JPH04127241 A JP H04127241A JP 2337262 A JP2337262 A JP 2337262A JP 33726290 A JP33726290 A JP 33726290A JP H04127241 A JPH04127241 A JP H04127241A
Authority
JP
Japan
Prior art keywords
parity
data
memory
circuit
check
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2337262A
Other languages
Japanese (ja)
Inventor
Teruaki Aoki
照明 青木
Toshiyuki Matsuzaki
松崎 敏之
Hiroyuki Hayama
葉山 宏幸
Mitsuo Imai
光雄 今井
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.)
Hitachi Cable Ltd
Original Assignee
Hitachi Cable 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 Hitachi Cable Ltd filed Critical Hitachi Cable Ltd
Priority to JP2337262A priority Critical patent/JPH04127241A/en
Publication of JPH04127241A publication Critical patent/JPH04127241A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To check the normal operations of a parity memory and a parity generation/check circuit by setting a parity generation rule used when the data are written in a data memory and a parity check rule used when the data are read out of the data memory so that both rules are different from each other. CONSTITUTION:An RS flip-flop 305 and an EX-OR circuit 306 are provided so that the switch is attained between the even and odd parities. The circuit 306 gives directly the SIGMA0 output of a check circuit 301 to a parity error state holding circuit 302 and a gate circuit 304 when a parity inverting signal 101 is kept at 'L'. Then the circuit 306 inverts the output 303 when the signal 101 is kept at 'H'. Then a parity generation rule used when the data are written in a data memory and a parity check rule used when the data are read out of the data memory are set so that both rules are different from each other. Thus the operations of a parity memory and a parity generation/check circuit can be confirmed with higher reliability.

Description

【発明の詳細な説明】 [産業上の利用分野コ 本発明は、マイクロコンピュータシステムのパリティ生
成/チェック回路に係り、特にパリティ生成/チェック
回路自身とパリティ用メモリの動作チェックが可能なパ
リティ生成/チェック回路に関するものである。
Detailed Description of the Invention [Field of Industrial Application] The present invention relates to a parity generation/check circuit for a microcomputer system, and particularly to a parity generation/check circuit that can check the operation of the parity generation/check circuit itself and the parity memory. This concerns a check circuit.

[従来の技術] 一般に、マイクロコンピュータシステムでは、パリティ
チェックによるデータの誤り検出が行なわれている。
[Prior Art] Generally, in microcomputer systems, data errors are detected by parity checking.

第4図に、このような誤り検出が行なわれる従来のマイ
クロコンピュータシステムの構成例を示す。
FIG. 4 shows an example of the configuration of a conventional microcomputer system in which such error detection is performed.

本システムは、演算処理を行うマイクロコンピュータ(
以下マイコンと略す)201と、マイコン201の演算
処理用データを格納する読出しおよび書込み可能なデー
タ用メモリ202と、メモリ選択信号207を生成する
アドレス・デコーダ203と、パリティ用データ209
を格納する読出しおよび書込み可能なパリティ用メモリ
204と、パリティ用データ209の生成およびパリテ
イ・チェックを行うパリティ生成/チェック回路205
とから主に構成される。
This system uses a microcomputer (
(hereinafter abbreviated as microcomputer) 201, a readable and writable data memory 202 that stores data for arithmetic processing by the microcomputer 201, an address decoder 203 that generates a memory selection signal 207, and parity data 209.
a readable and writable parity memory 204 that stores parity data 209 and a parity generation/check circuit 205 that generates parity data 209 and performs a parity check.
It mainly consists of.

先ず、上記システムにおいて、マイコン201がデータ
用メモリ202にデータを書き込む時の手順について説
明する。
First, the procedure when the microcomputer 201 writes data to the data memory 202 in the above system will be explained.

■マイコン201は書き込み先のアドレスをアドレス・
バス206に出力する。
■The microcomputer 201 sets the write destination address to
Output to bus 206.

■アドレス・デコーダ203はアドレス・バス206上
の信号からメモリ選択信号207を生成し、これをデー
タ用メモリ202とパリティ用メモリ204に与える。
(2) The address decoder 203 generates a memory selection signal 207 from the signal on the address bus 206 and supplies it to the data memory 202 and the parity memory 204.

■マイコン201はデータ用メモリ202に書き込むデ
ータをデータ・バス208に出力する。
(2) The microcomputer 201 outputs data to be written to the data memory 202 to the data bus 208.

■パリティ生成/チェック回路205はデータ・バス2
08上の信号からパリティ用データ209を生成してパ
リティ用メモリ204に与える。
■Parity generation/check circuit 205 is data bus 2
Parity data 209 is generated from the signal on 08 and provided to parity memory 204.

■マイコン201はメモリ・ライ゛ト信号本210(*
は負論理の信号線を示す。)を出力し、メモリ選択信号
207に応じてデータ用メモリ202にデータ書き込み
、パリティ用メモリ204にパリティ用データ209を
書き込む。
■The microcomputer 201 has a memory write signal book 210 (*
indicates a negative logic signal line. ), writes data to the data memory 202 and writes parity data 209 to the parity memory 204 in accordance with the memory selection signal 207.

次に本システムにおいて、マイコン201がデータ用メ
モリ202からデータを読み出す時の手1@について説
明する。
Next, a description will be given of procedure 1 when the microcomputer 201 reads data from the data memory 202 in this system.

■マイコン201はデータを読み出す先のアドレスをア
ドレス・バス206に出力する。
(2) The microcomputer 201 outputs the address from which data is to be read to the address bus 206.

■アドレス・デコーダ203はアドレス・バス206上
の信号からメモリ選択信号207を生成し、これをデー
タ用メモリ202とパリティ用メモリ204に与える。
(2) The address decoder 203 generates a memory selection signal 207 from the signal on the address bus 206 and supplies it to the data memory 202 and the parity memory 204.

■マイコン201はメモリ・リード信号211を出力し
、メモリ選択信号207に応じてデータ用メモリ202
からデータを読み出し、またパリティ用メモリ204よ
りパリティ用データ209を読み出す。
■The microcomputer 201 outputs a memory read signal 211 and selects the data memory 202 according to the memory selection signal 207.
The parity data 209 is read from the parity memory 204.

■パリティ生成/チェック回路205はデータ・バス2
08上のデータとパリティ用データ209とを用いてパ
リテイ・チェックを行い、異常が発生した時にはパリテ
ィ・エラー検出信号212をマイコン201に与える。
■Parity generation/check circuit 205 is data bus 2
A parity check is performed using the data on 08 and parity data 209, and when an abnormality occurs, a parity error detection signal 212 is given to the microcomputer 201.

この信号線は通常マイコン201の割り込み入力端子に
接続されている。
This signal line is normally connected to an interrupt input terminal of the microcomputer 201.

第5図は、8ビツト・マイコンを使用する時のパリティ
生成/チェック回路205の内部構成例を示したもので
ある。この回路は、パリティ・ビットの生成およびパリ
テイ・チェックを行う検査回路301とパリティ・エラ
ー状態保持回路302とから主に構成されている。
FIG. 5 shows an example of the internal configuration of the parity generation/check circuit 205 when an 8-bit microcomputer is used. This circuit mainly includes a check circuit 301 that generates parity bits and performs parity checks, and a parity error state holding circuit 302.

検査回路301は、A−I入力におけるH”の数が偶数
個の時ΣO比出力01が“L”となり、A〜1入力にお
ける“H”の数が奇数個の時ΣO比出力01が“H”と
なる。A−1人力の内、A〜H入力は8ビツトデータ・
バス208から与えらえる。残りの1入力はメモリ・ラ
イト信号零210及びパリティ用データ209を入力と
するAND回路300から与えられる。
In the test circuit 301, the ΣO ratio output 01 becomes "L" when the number of "H"s at the A-I input is an even number, and the ΣO ratio output 01 becomes "L" when the number of "H"s at the A-1 input is an odd number. A-1, inputs A to H are 8-bit data.
from bus 208. The remaining one input is given from an AND circuit 300 which receives the memory write signal zero 210 and the parity data 209 as inputs.

パリティ・エラー状態保持回路302は、リード信号2
11が入力されたとき検査回路301のΣO出力301
をパリティ・エラー検出信号212として、次のメモリ
・リード信号211が入力されるまで保持するD型フリ
ップ・プロップ回路である。
The parity error state holding circuit 302 receives the read signal 2
11 is input, the ΣO output 301 of the inspection circuit 301
This is a D-type flip-flop circuit that holds the parity error detection signal 212 as a parity error detection signal 212 until the next memory read signal 211 is input.

ゲート回路304は、リード信号211が入力されたと
き閉じて、検査回路301のΣ0出力301がパリティ
用データ209としてパリティ用メモリ204(笛4図
)に与えられるのを阻止する。
The gate circuit 304 closes when the read signal 211 is input, and prevents the Σ0 output 301 of the test circuit 301 from being applied as the parity data 209 to the parity memory 204 (Figure 4).

逆にメモリ・リード信号211が入力されないとき開い
て、ΣO出力303をパリティ用データ209としてパ
リティ用メモリ204及びAND回路300・に与える
Conversely, when the memory read signal 211 is not input, it is opened and the ΣO output 303 is provided as the parity data 209 to the parity memory 204 and the AND circuit 300.

さて、次に第6図と第7図を用いて、上記バリティ生成
/チェック回路によるデータ用メモリシ02の動作チェ
ックを行なうための書込み・読Hし動作を説明する。
Now, with reference to FIGS. 6 and 7, the write/read operations for checking the operation of the data memory 02 by the parity generation/check circuit will be described.

マイコン201がデータ用メモリ202にデータを書き
込む時は、検査回路301のA−H入すに書き込みデー
タが人力され、またメモリ・ライト信号零210はライ
ト時に“L″になるためにI入力はL”になる。そのた
め、第6図に示すように、A−H人力における“H″の
数が偶数個の時には、ΣO出力303は“L″になり、
パリティ用メモリ2040指定アドレスには“0″がパ
リティ用データ209として書き込まれる。その反対に
A−H入力におけるHjtの数が奇数個の時には、Σ0
出力303は“6H゛になり、パリティ用データ204
の当該アドレスには′1′′が書き込まれる。
When the microcomputer 201 writes data to the data memory 202, the write data is input manually to the A-H inputs of the test circuit 301, and since the memory write signal 210 becomes "L" at the time of writing, the I input is Therefore, as shown in FIG. 6, when the number of "H" in A-H manual power is an even number, the ΣO output 303 becomes "L",
“0” is written to the specified address of the parity memory 2040 as the parity data 209. On the other hand, when the number of Hjt at the A-H input is an odd number, Σ0
The output 303 becomes “6H” and the parity data 204
``1'' is written to the corresponding address.

これに対して、マイコン201がデータ用メモリ202
からデータを読み出す時には、検査回路301のA−)
(入力に読出しデータが入力されるまた、読出しの時に
はメモリ・ライト信号零210は“H91であるため、
検査回路301のI入力にはパリティ用メモリ204か
ら読み出したパリティ用データ209がそのまま入力さ
れる。
In contrast, the microcomputer 201 uses the data memory 202
When reading data from A-) of the inspection circuit 301
(Read data is input to the input, and the memory write signal zero 210 is “H91” at the time of reading, so
The parity data 209 read from the parity memory 204 is input as is to the I input of the test circuit 301 .

このとき、データ用メモリ202が正常であり、第7図
上欄に示すようにA−H入力における“H??の数が偶
数個ならば、パリティ用データ209は“O”すなわち
“L”であり、その反対に奇数個ならば、パリティ用デ
ータ209は“l〃すなわちjjH”であるため、Σ0
出力303はいずれの場合であっても“L ttになり
、その結果パリティ・エラー状態保持回路302の出力
であるパリティ・エラー検出信号212も“L”になる
At this time, if the data memory 202 is normal and the number of "H??" in the A-H input is an even number as shown in the upper column of FIG. 7, the parity data 209 is "O", that is, "L". On the contrary, if the number is odd, the parity data 209 is "l", that is, jjH, so Σ0
In either case, the output 303 becomes "L tt", and as a result, the parity error detection signal 212, which is the output of the parity error state holding circuit 302, also becomes "L".

仮にデータ用メモリ202に異常が発生して、データ・
ビットの値が奇数個変化している番地のデータを読み出
した時には、第7図下欄に示すように、A−H入力は正
常値が偶数個であれば奇数個となり、正常値が奇数個で
あれば偶数個となるので、Σ0出力303はいずれの場
合であっても“H”になる。その結果メモリ・リード信
号211の立上がりによってパリティ・エラー検出信号
212も“H”になり、パリティ・エラーがマイコン2
01に通知される。
Suppose that an abnormality occurs in the data memory 202 and the data
When reading data at an address where an odd number of bit values have changed, as shown in the bottom column of Figure 7, if the A-H input has an even number of normal values, it will be an odd number; If so, the number is even, so the Σ0 output 303 becomes "H" in any case. As a result, the rise of the memory read signal 211 causes the parity error detection signal 212 to also become "H", and the parity error is detected by the microcomputer 2.
01 will be notified.

[発明が解決しようとする課題] ところで、従来のパリティ生成/チェック回路方式によ
り、パリティ用メモリ及びパリティ生成/チェック回路
自身が正常に動作しているかどうかを調へるには、デー
タ用メモリの任意の番地にデータを書き込み、同じ番地
からデータを読み出してパリティ・エラーが発生してい
ないことを確認するという間接チェック方法によってい
た。
[Problems to be Solved by the Invention] By the way, in order to check whether the parity memory and the parity generation/check circuit themselves are operating normally using the conventional parity generation/check circuit method, it is necessary to check whether the parity memory and the parity generation/check circuit themselves are operating normally. An indirect check method was used in which data was written to an arbitrary address and data was read from the same address to confirm that no parity errors had occurred.

しかし、この方法では、パリティ・エラーが発生したと
きに、データ用メモリまたはパリティ用メモリもしくは
パリティ生成/チェック回路のいずれかが異常であるこ
とを知ることはできても、パリティ生成/チェック回路
自身が正常に動作しているかどうか、またパリティ用メ
モリに正しいパリティ用データが書き込まれているかど
うかを知ることができない。一定入方に対する回路出力
のチェックはできても、入力変化に対する回路出力変化
をチェックできないばかりか、パリティ用メモリの入力
変化に対する出方変化もチェックできないためである。
However, with this method, when a parity error occurs, it is possible to know that either the data memory, the parity memory, or the parity generation/check circuit is abnormal, but the parity generation/check circuit itself It is impossible to know whether the parity is operating normally or whether the correct parity data is written in the parity memory. This is because although it is possible to check the circuit output with respect to a constant input direction, it is not only impossible to check the circuit output change with respect to the input change, but also the output direction change with respect to the input change of the parity memory cannot be checked.

本発明の目的は、前記した問題点を解消し、パリティ用
メモリ及びパリティ生成/チェック回路が正常に動作し
ているかどうかを調べることが可能なパリティ生成/チ
ェック回路を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to solve the above problems and provide a parity generation/check circuit capable of checking whether a parity memory and a parity generation/check circuit are operating normally.

[課題を解決するための手段] 第1の発明の要旨は、パリティ生成・チェックの時に、
偶数パリティと奇数パリティを選択可能にする回路を付
加したことにある。ここで、偶数パリティはデータ中の
°°H″の数が偶数の時パリティ用データが12′にな
る場合を、奇数パリティはデータ中のH″の数が奇数の
時パリティ用データが“1″になる場合をいうものとす
る。
[Means for solving the problem] The gist of the first invention is that when generating and checking parity,
The reason lies in the addition of a circuit that allows selection of even parity and odd parity. Here, even parity means that when the number of °°H'' in the data is even, the parity data becomes 12', and odd parity means that when the number of H'' in the data is odd, the parity data becomes 12'. ''.

即ち、第1の発明のパリティ生成/チェック回路は、マ
イクロコンピュータからデータ用メモリにデータを書き
込む時にパリティを生成してパリティ用メモリに書き込
み、データ用メモリからデータを読み出す時に読み出し
たデータとパリティとのパリティチェックを行なってデ
ータ用メモリの動作チェックを行なうパリティ生成/チ
ェック回路において、データ用メモリにデータを書き込
む時のパリティ生成規則と、データを読み出す時のパリ
テイ・チェック規則とを互いに異なるように設定可能に
したものである。
That is, the parity generation/check circuit of the first invention generates parity and writes it to the parity memory when writing data from the microcomputer to the data memory, and compares the read data and parity when reading data from the data memory. In the parity generation/check circuit that performs a parity check to check the operation of the data memory, the parity generation rule when writing data to the data memory and the parity check rule when reading data are set to be different from each other. It is configurable.

第2の発明の要旨は、データ用メモリにのみデータを書
き込み、パリティ用メモリにはデータを書き込まないよ
うにするための選択回路を付加したことにある。
The gist of the second invention lies in the addition of a selection circuit for writing data only into the data memory and not writing data into the parity memory.

即ち、第2の発明のパリティ生成/チェック回路は、マ
イクロコンピュータからデータ用メモリにデータを書き
込む時にパリティを生成してパリティ用メモリに書き込
み、データ用メモリからデータを読み出す時に読み出し
たデータとパリティと、q)パリティチェックを行なっ
てデータ用メモリの・動作チェックを行なうパリティ生
成/チェック回路において、データ用メモリにデータを
書き込む時に、パリティ用メモリへのパリティの書き込
みを禁止できるようにしたものである。
That is, the parity generation/check circuit of the second invention generates parity and writes it to the parity memory when writing data from the microcomputer to the data memory, and compares the read data and parity when reading data from the data memory. , q) In a parity generation/check circuit that performs a parity check to check the operation of the data memory, it is possible to prohibit writing of parity to the parity memory when writing data to the data memory. .

[作用コ 第1の発明において、例えば、データ用メモリの動作チ
ェックを行なうときは、データ用メモリにデータを書き
込むときのパリティ生成規則と、データを読み出すとき
のパリテイ・チェック規則とは同じに設定する。この場
合において、データ用メモリが正常なとき、パリティ・
エラーは検出されず、というある出力結果が得られてデ
ータ用メモリの正常動作の確認がなされたとする。
[Operation] In the first invention, for example, when checking the operation of the data memory, the parity generation rule when writing data to the data memory and the parity check rule when reading data are set to be the same. do. In this case, when the data memory is normal, the parity
Assume that a certain output result indicating that no error is detected is obtained, and the normal operation of the data memory is confirmed.

次に、このデータ用メモリの正常動作の確認後、さらに
パリティ用メモリ及びパリティ生成/チェック回路の動
作チェックを行なう場合を考える。
Next, consider the case where, after confirming the normal operation of the data memory, the operation of the parity memory and parity generation/check circuit is further checked.

この場合、データ用メモリにデータを書き込むときのパ
リティ生成規則と、データを読み出すときのパリテイ・
チェック規則とを互に異なるように設定する。
In this case, the parity generation rules when writing data to data memory and the parity generation rules when reading data are
Set the check rules to be different from each other.

すると、パリティ用メモリ及びパリティ生成/チェック
回路が正常な場合は、データ用メモリの動作チェックの
時とは逆の出力結果が得られることになる。従って、パ
リティ用メモリ及びパリティ生成/チェック回路の正常
動作を確認できる。
Then, if the parity memory and the parity generation/check circuit are normal, an output result opposite to that obtained when checking the operation of the data memory will be obtained. Therefore, it is possible to confirm the normal operation of the parity memory and the parity generation/check circuit.

これに対して、パリティ用メモリ及びパリティ生成/チ
ェック回路が異常な場合は、データ用メモリの動作チェ
ックの時と同じ出力結果が得られることになる。従って
、パリティ用メモリ及びパリティ生成/チェック回路の
異常を確認することができる。
On the other hand, if the parity memory and the parity generation/check circuit are abnormal, the same output result as when checking the operation of the data memory will be obtained. Therefore, abnormalities in the parity memory and parity generation/check circuit can be confirmed.

第2の発明において、例えば、データ用メモリの動作チ
ェックを行なうどきは、まず、パリティ用メモリにパリ
ティを書込む状態に設定する。データ用メモリの任意の
アドレスにデータを書き込み、同時にパリティ用メモリ
にパリティを書込む。
In the second invention, for example, when checking the operation of the data memory, first the parity memory is set to a state where parity is written. Write data to any address in the data memory and write parity to the parity memory at the same time.

データ用メモリの同じアドレスからデータを読み出す。Read data from the same address in data memory.

このとき、パリティ・エラーは検出されないのでデータ
用メモリの正常動作の確認がなされる。
At this time, since no parity error is detected, normal operation of the data memory is confirmed.

次に、パリティ用メモリにパリティを書込む状態に設定
する。データの中の“H”のビットの個数が偶数個にな
るようなデータをデータ用メモリの任意の番地に書き込
む。このとき、パリティ用メモリの番地には“0”が書
き込まれる。パリティ用メモリへのパリティの書き込み
を禁止する状態に設定する。
Next, the parity memory is set to write parity. Data such that the number of "H" bits in the data is an even number is written to an arbitrary address in the data memory. At this time, "0" is written to the address of the parity memory. Set the state to prohibit writing of parity to the parity memory.

その後、データの中の′H′′のビットの個数が奇数個
になるようなデータを再びデータ用メモリの同じ番地に
書き込む。しかしパリティ用メモリにはパリティは書き
込まれない。データ用メモリの同じ番地からデータを読
み出すと、データ用メモリの中の“Hl+の個数は奇数
であるが、パリティ用メモリには“′0パが書き込まれ
ているために、パリティ用メモリ及びパリティ生成/チ
ェック回路が正常ならばパリティ・エラーが発生する。
Thereafter, data such that the number of 'H'' bits in the data is an odd number is written again to the same address in the data memory. However, parity is not written to the parity memory. When data is read from the same address in the data memory, the number of "Hl+" in the data memory is an odd number, but since "'0pa" is written in the parity memory, both the parity memory and parity If the generation/check circuit is normal, a parity error will occur.

これに対して、パリティ用メモリ及びパリティ生成/チ
ェック回路が異常ならばパリティ・エラーが発生しない
。従ってパリティ用メモリ及びパリティ生成/チェック
回路の異常を確認することができる。なお、最初の書込
時にデータ中の“H”のビット数が奇数個で、再度書込
みする時に偶数個にするようにしても同じ結果が得られ
る。
On the other hand, if the parity memory and the parity generation/check circuit are abnormal, no parity error will occur. Therefore, abnormalities in the parity memory and parity generation/check circuit can be confirmed. Note that the same result can be obtained even if the number of "H" bits in the data is an odd number during the first write and an even number when the data is written again.

[実施例コ 以下、本発明の実施例を第1図〜第4図及び第8図〜第
9図を用いて説明する。
[Example 7] Examples of the present invention will be described below with reference to FIGS. 1 to 4 and 8 to 9.

第1実施例 第1図に第1実施例によるパリティ生成/チェック回路
を示す。従来の回路方式と異なる点は、偶数パリティと
奇数パリティの切替えが可能になるように、RSフリッ
プ・フロップ30δとEX−OR回路306を付加した
点にある。
First Embodiment FIG. 1 shows a parity generation/check circuit according to a first embodiment. The difference from the conventional circuit system is that an RS flip-flop 30δ and an EX-OR circuit 306 are added to enable switching between even parity and odd parity.

EX−OR回路306は、検査回路301とパリティ・
エラー状態保持回路302との間に介挿され、一方の人
力であるパリティ反転信号101がL IIの時、検査
回路301のΣ0出力303をそのままパリティ・エラ
ー状態保持回路302及びゲート回路304に与え、逆
にパリティ反転信号101が“H”の時、ΣO出力30
3を反転する。
The EX-OR circuit 306 connects the inspection circuit 301 and parity.
It is inserted between the error state holding circuit 302, and when the parity inversion signal 101, which is one human input, is L II, the Σ0 output 303 of the inspection circuit 301 is given as it is to the parity/error state holding circuit 302 and the gate circuit 304. , conversely, when the parity inversion signal 101 is “H”, the ΣO output 30
Invert 3.

RSフリップ・フロップ305は、上記EX−OR回路
3060人力に与えるパリティ反転信号101を出力し
、パリティ反転要求信号水102が“L jlの時セッ
トされて“H11のパリティ反転信号101を出力し、
パリティ反転解除信号零103が“°L”の時リセット
されて“H”のパリティ反転信号101を出力する。な
お、パリティ反転要求信号*102とパリティ反転解除
信号零103は、データ用メモリ202又はパリティ用
メモリ204のアドレス空間内部の適当な番地をマイコ
ン201からアクセスすることによって発生させる。
The RS flip-flop 305 outputs a parity inversion signal 101 to be applied to the EX-OR circuit 3060, is set when the parity inversion request signal 102 is "L jl", and outputs a parity inversion signal 101 of "H11".
When the parity inversion release signal 103 is "°L", it is reset and outputs the parity inversion signal 101 of "H". The parity inversion request signal *102 and the parity inversion release signal 103 are generated by accessing an appropriate address within the address space of the data memory 202 or the parity memory 204 from the microcomputer 201.

さて、上記のように構成された本回路の動作を説明する
Now, the operation of this circuit configured as described above will be explained.

まず本システムが立ち上がった直後には、パリティ反転
信号101は“L″であり、この時は、従来の回路と同
様の動作をする。即ち、データ用メモリ202の動作確
認を既述したように行なう。
Immediately after this system starts up, the parity inversion signal 101 is "L", and at this time, it operates in the same way as the conventional circuit. That is, the operation of the data memory 202 is checked as described above.

次に、パリティ用メモリ204およびパリティ生成/チ
ェック回路205の動作確認を行う時には、以下のよう
にする。
Next, when confirming the operation of the parity memory 204 and the parity generation/check circuit 205, the following procedure is performed.

先ず、マイクロコンピュータ201がデータ用メモリ2
02にデータを書き込むとき、パリティ反転要求信号水
102を発生させて、パリティ反転信号101を# L
 99から“Httにする。するとEX−OR回路30
3により検査回路301のΣ0出力303が反転するた
め、第2図に示すように、データ・バス208上のデー
タの中で“H”が偶数個ある時は(A〜H入力が偶数の
時)、パリティ用データ209に“1″が書き込まれる
。反対に“HIIが奇数個ある時には、パリティ用デー
タ209にl 01′が書き込まれる。即ち、第2図を
第6図と比較すればより明瞭となるが、検査回路301
の入力条件は同じでもパリティ用データ209の値が逆
転していることが分る。
First, the microcomputer 201 uses the data memory 2
When writing data to 02, the parity inversion request signal 102 is generated and the parity inversion signal 101 is set to #L.
99 to "Htt. Then, EX-OR circuit 30
3 inverts the Σ0 output 303 of the test circuit 301, so as shown in FIG. ), “1” is written in the parity data 209. On the other hand, when there is an odd number of HIIs, l01' is written in the parity data 209.In other words, as will become clearer when comparing FIG. 2 with FIG.
It can be seen that even though the input conditions are the same, the values of the parity data 209 are reversed.

次に、パリティ反転解除信号*103を発生させて、パ
リティ反転信号101を“j L +”にする。
Next, a parity inversion release signal *103 is generated to set the parity inversion signal 101 to "j L +".

この状態で先程データを書き込んだデータ用メモリ20
2のアドレスの内容を読み出すと、検査回路30】及び
パリティ用メモリ204が正常であるとしlた場合、第
3図に示すように検査回路301のA−H入力および■
入力の“H”の合計は、A−H入力における“H′′の
数が偶数、奇数によらず、いずれも奇数になるために、
ΣO出力303は4E”になる。従って、リード信号2
11の立上がりによってパリティ・エラー検出信号21
2も“H”になり、マイコン201に割り込みが入る。
In this state, the data memory 20 into which the data was written earlier
When the contents of the address 2 are read out, assuming that the inspection circuit 30 and the parity memory 204 are normal, the A-H inputs of the inspection circuit 301 and
The total number of "H" inputs is an odd number, regardless of whether the number of "H'' in the A-H inputs is even or odd.
The ΣO output 303 becomes 4E". Therefore, the read signal 2
11 rises, the parity error detection signal 21
2 also becomes “H” and an interrupt is generated to the microcomputer 201.

割り込みが入ることによって、マイコン201はパリテ
ィ生成/チェック回路205が正常に動作することを確
認できる。
By receiving an interrupt, the microcomputer 201 can confirm that the parity generation/check circuit 205 operates normally.

仮にパリティ用メモリ204に異常が発生して、パリテ
ィ用データ209の値が反転した番地を読み出した時に
は、パリティ・エラー検出信号212が“L”となり、
マイコン201に割込みが入らなくなるため、パリティ
用メモリ204に異常が発生したことを確認できる。
If an abnormality occurs in the parity memory 204 and an address where the value of the parity data 209 is inverted is read, the parity error detection signal 212 becomes "L".
Since no interrupts are sent to the microcomputer 201, it can be confirmed that an abnormality has occurred in the parity memory 204.

また、検査回路301自体に異常が発生した場合も、パ
リティ・エラー検出信号212が“L”となり、マイコ
ン201に割込みが入らなくなるため、その異常を確認
できる。
Further, even if an abnormality occurs in the test circuit 301 itself, the parity error detection signal 212 becomes "L" and no interrupt is generated in the microcomputer 201, so that the abnormality can be confirmed.

このようにパリティ用メモリ204及び検査回路30自
身の動作確認ができるのは、パリティ非反転時(パリテ
ィ反転信号が°“L tt時)に行なわれるデータ用メ
モリのチェックを前提とし、しかもパリティ用メモリ及
び検査回路の動作確認をするときは、パリティ反転信号
を“′H″とすることにより、データ用メモリのチェッ
ク時のパリティを反転させているからである。
In this way, the operation of the parity memory 204 and the inspection circuit 30 itself can be checked on the premise that the data memory is checked when the parity is not inverted (when the parity inversion signal is "L"). This is because when checking the operation of the memory and test circuit, the parity inversion signal is set to "H" to invert the parity when checking the data memory.

なお、第1図に示す実施例では、パリティ反転信号を任
意の時に出せるので、データ用メモリにデータを書き込
む時と読み出す時の両方ともにパリティの切替えが可能
であるが、書き込みの時は、偶数パリティ(または奇数
パリティ)に固定しておき、読み出すときは奇数パリテ
ィ(また偶数パリティ)に切替え可能にすることもてき
る。または反対に書き込みの時のパリティを切替え可能
にしておき、読み出すときのパリティを固定することも
可能である。
In the embodiment shown in FIG. 1, the parity inversion signal can be output at any time, so it is possible to switch the parity both when writing and reading data to the data memory. It is also possible to fix the parity (or odd parity) and switch to odd parity (or even parity) when reading. Alternatively, it is also possible to make the parity switchable when writing and fix the parity when reading.

第2実施例 第8図に第2実施例によるパリティ生成/チェック回路
を示す。従来の回路方式と異なる点は、パリティ用メモ
リ204(第4図)へのパリティ用データ209の書き
込みを禁止できるように、RSフリップ・フロップ80
5とOR回路806とをメモリ・ライト信号零系に付加
した点である。
Second Embodiment FIG. 8 shows a parity generation/check circuit according to a second embodiment. The difference from the conventional circuit system is that an RS flip-flop 80 is used to inhibit writing of parity data 209 to parity memory 204 (FIG. 4).
5 and an OR circuit 806 are added to the memory write signal zero system.

また、第1実施例と異なる点は、第5図に示す従来のパ
リティ生成/チェック回路は変更を加えずそのままで、
パリティ生成/チェック回路系外の信号に変更を加える
ようにした点である。
Also, the difference from the first embodiment is that the conventional parity generation/check circuit shown in FIG. 5 remains unchanged;
The point is that changes are made to signals outside the parity generation/check circuit system.

OR回路806は、マイコン2o1(第4図)とパリテ
ィ用メモリ204との間に置かれ、パリティ書込禁止信
号801 が“L jjのとき、マイコン201のメモ
リ・ライト信号*21oをそのままパリティ用メモリ・
ライト信号81oとしてパリティ用メモリ204に与え
、逆にパリティ書込禁止信号801が“H”のとき、マ
イコン201のメモリ・ライト信号零210をパリティ
用メモリ204に与えない。
The OR circuit 806 is placed between the microcomputer 2o1 (FIG. 4) and the parity memory 204, and when the parity write inhibit signal 801 is "L jj", the OR circuit 806 directly uses the memory write signal *21o of the microcomputer 201 for parity. memory·
It is given to the parity memory 204 as a write signal 81o, and conversely, when the parity write inhibit signal 801 is "H", the memory write signal zero 210 of the microcomputer 201 is not given to the parity memory 204.

RSフリップ・フロップ805は、上記OR回路806
の一方の入力に与えるパリティ書込禁止信号801を出
力し、パリティ書込禁止要求信号*802が“L”の時
にセットされて“′Hパのパリティ書込禁止信号801
を出力し、パリティ書込禁止解除信号*803がL″の
時にリセットされて“L P+のパリティ書込禁止信号
801を出力する。
The RS flip-flop 805 is connected to the above OR circuit 806.
It outputs a parity write inhibit signal 801 to be given to one input of the
When the parity write prohibition release signal *803 is L'', it is reset and outputs the parity write prohibition signal 801 of "LP+".

なお、パリティ書込禁止要求信号零802とパリティ書
込禁止解除信号零803は、アドレス空間内部の適当な
番地をマイコン201がアクセスすることによって発生
させる。
The parity write inhibit request signal zero 802 and the parity write inhibit release signal zero 803 are generated by the microcomputer 201 accessing appropriate addresses within the address space.

さて、上記のように構成された本回路の動作を以下に説
明する。
Now, the operation of this circuit configured as described above will be explained below.

まず第4図に示すマイクロコンピュータシステムを立上
げる。システムが立上がった直後には、第8図に示すパ
リティ書込禁止信号801は“ILj”であり、このと
きはメモリ・ライト信号零210がそのままパリティ用
メモリ・ライト信号零810としてパリティ用メモリ2
04に入力されるので、従来の回路と同様の動作をする
First, the microcomputer system shown in FIG. 4 is started up. Immediately after the system is started up, the parity write inhibit signal 801 shown in FIG. 2
04, so it operates in the same way as a conventional circuit.

次にデータ用メモリ202(第4図)の任意の番地にデ
ータを書き込む。この時には、データの中の“H″のビ
ットの個数が奇数個になるデータを書き込む。するとパ
リティ用メモリ204の対応する番地には、“′l”が
書き込まれる(第9図上欄)。
Next, data is written to an arbitrary address in the data memory 202 (FIG. 4). At this time, data is written in which the number of "H" bits in the data is an odd number. Then, "'l" is written into the corresponding address of the parity memory 204 (upper column of FIG. 9).

その次に、マイコン201はパリティ書込禁止要求信号
*802を発生させて、パリティ書込禁止信号801を
“L T9から“′H″に変化させる。
Next, the microcomputer 201 generates a parity write inhibit request signal *802, and changes the parity write inhibit signal 801 from "LT9" to "'H".

するとマイコン201がメモリ・ライト信号零210を
“L ++に変化させても、パリティ用メモリ204へ
のパリティ用メモリ・ライト信号*810は“H”のま
まであるため、パリティ用メモリ204にパリティ用デ
ータ209を書き込むことはできない。続けて、先程デ
ータを書き込んだ番地と同じ番地に、今度はデータの中
の“H”のビットの個数が偶数個になるデータを書き込
む。しかしパリティ用メモリ204の値は変化せず“l
”′のままである(第9図下欄)。
Then, even if the microcomputer 201 changes the memory write signal 210 to "L++", the parity memory write signal *810 to the parity memory 204 remains "H", so the parity memory 204 is changed to "L++". The parity data 209 cannot be written.Next, write data in which the number of "H" bits in the data is an even number to the same address where the data was written earlier. The value of “l” remains unchanged.
It remains as ``'' (lower column of Figure 9).

しかる後、マイコン201が同じ番地からデータを読み
出す。この時、パリティ用メモリ204には“1″が書
き込まれているためにAND回路300(第8図)の出
力は“H”になる。すると、データ用メモリ202の“
H”の個数は偶数個であるために、ΣO出力303はH
”になる。その結果メモリ・リード信号零211の立上
がりによってパリティ・エラー検出信号212も“H″
になり、パリティ・エラーがマイコン201に通知され
る(第3図上欄参照)。これにより、マイコン201に
割込みが人力され、マイコン201はパリティ生成/チ
ェック回路205が正常に動作することを確認できる。
After that, the microcomputer 201 reads data from the same address. At this time, since "1" has been written in the parity memory 204, the output of the AND circuit 300 (FIG. 8) becomes "H". Then, “
Since the number of H” is an even number, the ΣO output 303 is H
”.As a result, the rise of the memory read signal 211 causes the parity error detection signal 212 to also become “H”.
Then, the parity error is notified to the microcomputer 201 (see the upper column of FIG. 3). As a result, an interrupt is manually input to the microcomputer 201, and the microcomputer 201 can confirm that the parity generation/check circuit 205 operates normally.

仮にパリティ用メモリ204に異常が発生して、パリテ
ィ用データ209の値が反転した番地を読み出した時に
は、パリティ・エラー検出信号212が“L”になり、
マイコン201に割込みが入らなくなるため、パリティ
用メモリ204に異常が発生したことを確認できる。
If an abnormality occurs in the parity memory 204 and an address where the value of the parity data 209 is inverted is read, the parity error detection signal 212 becomes "L".
Since no interrupts are sent to the microcomputer 201, it can be confirmed that an abnormality has occurred in the parity memory 204.

また、検査回路301自身に異常が発生した場合も、パ
リティ・エラーが′L”になり、マイコン201に割込
みが入らなくなるため、その異常を検出できる。
Further, even if an abnormality occurs in the test circuit 301 itself, the parity error becomes 'L' and no interrupt is generated in the microcomputer 201, so that the abnormality can be detected.

このようにパリティ用メモリ及びパリティ生成/チェッ
ク回路自身の動作確認ができるのは、パリティ用メモリ
の書き込みを制御してパリティ用メモリの内容をパリテ
ィ・エラーが発生するように設定できるからである。
The reason why it is possible to check the operation of the parity memory and the parity generation/check circuit itself in this way is because writing to the parity memory can be controlled to set the contents of the parity memory so that a parity error occurs.

[発明の効果コ 本発明によれば次のような効果を発揮する。[Effects of invention According to the present invention, the following effects are achieved.

(1)請求項1に記載のパリティ生成/チェック回路に
よれば、データ用メモリにデータを書き込む時のパリテ
ィ生成規則と、データを読み出す時のパリテイ・チェッ
ク規則とを互いに異なるように設定可能にしたので、パ
リティ用メモリとパリティ生成/チェック回路の動作確
認をより確実に行うことができる。
(1) According to the parity generation/check circuit according to claim 1, the parity generation rule when writing data to the data memory and the parity check rule when reading data can be set to be different from each other. Therefore, the operation of the parity memory and the parity generation/check circuit can be confirmed more reliably.

(2)請求項2に記載のパリティ生成/チエ・ツク回路
によれば、パリティ用メモリへのパリティの書込を制御
できるために、パリティ用メモリとパリティ生成/チェ
ック回路の動作確認をより確実に行うことができる。
(2) According to the parity generation/check circuit according to claim 2, since the writing of parity to the parity memory can be controlled, the operation of the parity memory and the parity generation/check circuit can be confirmed more reliably. can be done.

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

第1図は第1実施例によるパリティ生成/チェック回路
の内部構成を示すブロック図、第2図は第1実施例のパ
リティ用メモリ及びパリティ生成/チェック回路動作チ
ェックの書き込み時を示す説明図、第3図は同じく読出
し時を示す説明図、第4図は本実施例と従来例とに共通
したマイクロコンピュータシステムの内部構成例を示す
ブロック図、第5図は従来例によるパリティ生成/チェ
ック回路の内部構成を示すブロック図、第6図は従来例
のデータ用メモリ動作チェックの書き込み時を示す説明
図、第7図は同じく読出し時を示す説明図、第8図は第
2実施例によりパリティ生成/チェック回路の内部構成
を示すブロック図、第9図は第2実施例のパリティ用メ
モリ及びパリティ生成/チェック回路の動作チェックの
書込時を示す説明図である。 101・・・パリティ反転信号、102・・・パリティ
反転要求信号零、103・・・パリティ反転解除信号*
、201・・・マイクロコンピュータ、202・・・デ
ータ用メモリ、203・・・アドレス・デコーダ、20
4・・・パリティ用メモリ、205・・・パリティ生成
/チェック回路、206・・・アドレス・バス、207
はメモリ選択信号、208・・・データ・バス、209
・・・パリティ用データ、210・・・ライト信号零、
211・・・リード信号、301・・・パリティ生成/
チェック用の検査回路、302・・・パリティ・エラー
状態保持回路、303・・・検査回路りのΣO比出力3
05・・・RSフリップ・フロップ、306・・・EX
−OR回路、801・・・パリティ書込禁止信号、80
2・・・パリティ書込禁止要求信号零、803・・・パ
リティ書込禁止解除信号零、805・・・RSフリップ
・フロップ、806・・・OR回路、810・・・パリ
ティ用メモリ・ライト信号零である。 島 第1実施例によるパリティ生成カ1フク回路の内部構成
第1図 第1実施例のへ°リテ(用メモリ及びパリティ生成フチ
11グ回路の動作チI)9の書込時第2図 第1実施例のA″+1ティ用メモサメモリ″+1ティ生
成j生成フチ119回路fllnk出時本実施例と従来
とに共通したマイクαコンt”z−タンステムの内部構
成例第4図 第2実施例のへ°リティ用メモリ及びへ°リティ生がび
チ11り回路の動作チェックの書込時第9図
FIG. 1 is a block diagram showing the internal configuration of the parity generation/check circuit according to the first embodiment, and FIG. 2 is an explanatory diagram showing the parity memory and parity generation/check circuit operation check of the first embodiment at the time of writing. FIG. 3 is an explanatory diagram also showing the reading operation, FIG. 4 is a block diagram showing an example of the internal configuration of a microcomputer system common to this embodiment and the conventional example, and FIG. 5 is a parity generation/check circuit according to the conventional example. FIG. 6 is an explanatory diagram showing the writing time of data memory operation check in the conventional example, FIG. 7 is an explanatory diagram also showing the reading time, and FIG. 8 is a parity diagram according to the second embodiment. FIG. 9 is a block diagram showing the internal configuration of the generation/check circuit. FIG. 9 is an explanatory diagram showing the operation check of the parity memory and the parity generation/check circuit of the second embodiment at the time of writing. 101... Parity inversion signal, 102... Parity inversion request signal zero, 103... Parity inversion release signal *
, 201... Microcomputer, 202... Data memory, 203... Address decoder, 20
4...Memory for parity, 205...Parity generation/check circuit, 206...Address bus, 207
is a memory selection signal, 208...data bus, 209
...Parity data, 210...Write signal zero,
211... Read signal, 301... Parity generation/
Inspection circuit for checking, 302... Parity/error state holding circuit, 303... ΣO ratio output 3 of inspection circuit
05...RS flip-flop, 306...EX
-OR circuit, 801...Parity write inhibit signal, 80
2... Parity write inhibit request signal zero, 803... Parity write inhibit release signal zero, 805... RS flip-flop, 806... OR circuit, 810... Memory write signal for parity It is zero. FIG. 1 Internal structure of the parity generation circuit according to the first embodiment. FIG. Example of the internal configuration of the microphone α controller t"z-tan stem common to this embodiment and the conventional example. FIG. Figure 9 When writing the operation check of the memory for the property and the property generation circuit 11

Claims (2)

【特許請求の範囲】[Claims] (1)マイクロコンピュータからデータ用メモリにデー
タを書き込む時にパリテイを生成してパリテイ用メモリ
に書き込み、データ用メモリからデータを読み出す時に
読み出したデータとパリテイとのパリテイチェックを行
なってデータ用メモリの動作チェックを行なうパリテイ
生成/チェック回路において、 データ用メモリにデータを書き込む時のパリテイ生成規
則と、データを読み出す時のパリテイ・チェック規則と
を互いに異なるように設定可能にしたことを特徴とする
パリテイ生成/チェック回路。
(1) When writing data from the microcomputer to the data memory, parity is generated and written to the parity memory, and when reading data from the data memory, a parity check is performed between the read data and the parity. In a parity generation/check circuit that performs an operation check, a parity generation rule when writing data to a data memory and a parity check rule when reading data can be set to be different from each other. Generation/check circuit.
(2)マイクロコンピュータからデータ用メモリにデー
タを書き込む時にパリテイを生成してパリテイ用メモリ
に書き込み、データ用メモリからデータを読み出す時に
読み出したデータとパリテイとのパリテイチェックを行
なつてデータ用メモリの動作チェックを行なうパリテイ
生成/チェック回路において、 データ用メモリにデータを書き込む時に、パリテイ用メ
モリへのパリテイの書き込みを禁止できるようにしたこ
とを特徴とするパリテイ生成/チェック回路。
(2) When writing data from the microcomputer to the data memory, parity is generated and written to the parity memory, and when reading data from the data memory, a parity check is performed between the read data and the parity. What is claimed is: 1. A parity generation/check circuit for checking the operation of a parity generation/check circuit, wherein writing of parity to the parity memory can be prohibited when writing data to the data memory.
JP2337262A 1990-06-14 1990-11-30 Parity generation/check circuit Pending JPH04127241A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2337262A JPH04127241A (en) 1990-06-14 1990-11-30 Parity generation/check circuit

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP15628690 1990-06-14
JP2-156286 1990-06-14
JP2337262A JPH04127241A (en) 1990-06-14 1990-11-30 Parity generation/check circuit

Publications (1)

Publication Number Publication Date
JPH04127241A true JPH04127241A (en) 1992-04-28

Family

ID=26484090

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2337262A Pending JPH04127241A (en) 1990-06-14 1990-11-30 Parity generation/check circuit

Country Status (1)

Country Link
JP (1) JPH04127241A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006031434A (en) * 2004-07-16 2006-02-02 Yamaha Corp Semiconductor integrated circuit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006031434A (en) * 2004-07-16 2006-02-02 Yamaha Corp Semiconductor integrated circuit

Similar Documents

Publication Publication Date Title
JPS63200249A (en) Pseudo fault generating system for cache memory device
JPH04127241A (en) Parity generation/check circuit
JPH05165734A (en) Fixed fault diagnostic device for main storage device
JPH02270200A (en) Semiconductor memory
JP4292477B2 (en) Duplex processor unit
JPH06309185A (en) Information processor
JPH08221282A (en) Parity generation and check circuit
JPH02302855A (en) Memory control system
JP2022142201A (en) Information processing apparatus, information processing system, information processing method, and program
JPS58175200A (en) Checking system of storage system
JPS60549A (en) Memory testing system
JPH01309421A (en) Error correction system
JPS63753A (en) Test system for memory error checking and correcting circuit
JPH05128013A (en) Contents display system for parity memory
JPS6079450A (en) Correction system for storage device error
JPH06324894A (en) Error correction circuit for computer
JPH0443447A (en) Rom diagnosis device
WO1985002925A1 (en) Computer controlled systems
JPH0561777A (en) Memory control circuit
JPS63171492A (en) Memory selector
JPH02187843A (en) Data holding type memory device
JPS63285655A (en) Duplex storage device
JPS62140152A (en) Memory diagnosing system
JPH02273847A (en) Address control circuit
JPS6267942A (en) Fault detection circuit