JPH08137762A - Parity check system - Google Patents

Parity check system

Info

Publication number
JPH08137762A
JPH08137762A JP6300236A JP30023694A JPH08137762A JP H08137762 A JPH08137762 A JP H08137762A JP 6300236 A JP6300236 A JP 6300236A JP 30023694 A JP30023694 A JP 30023694A JP H08137762 A JPH08137762 A JP H08137762A
Authority
JP
Japan
Prior art keywords
parity
memory
bit
address
selector
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
JP6300236A
Other languages
Japanese (ja)
Inventor
Hajime Kawachi
河内  肇
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP6300236A priority Critical patent/JPH08137762A/en
Publication of JPH08137762A publication Critical patent/JPH08137762A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE: To use the storage capacity of ROM without waste by executing parity check with a parity outputted from a selector and data outputted from a program memory in a parity arithmetic part. CONSTITUTION: The part of a remaining address, which is a part except a part inputted to a parity memory 2, is inputted to a selector 3. A part of a bit string outputted from the parity memory 2 is outputted to the selector 3 as the parity corresponding to data stored in a program memory 1. Parity check is executed in the parity arithmetic part 4 with the parity outputted from the selector 3 and data outputted from the program memory 1. Thus, the storage capacity of ROM can be used without waste when ROM is used as the parity memory 2.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、リードオンリメモリに
格納されたプログラム等をチェックするパリティチェッ
ク方式に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a parity check system for checking a program or the like stored in a read only memory.

【0002】[0002]

【従来の技術】一般に、リードオンリメモリ(ROM)
にプログラムを格納する場合、経年変化等によりいくつ
かのビット値が変化してしまうこともあるため、定期的
に内容をチェックすることが行なわれている。このため
の方式としてサムチェック方式とパリティチェック方式
とがある。サムチェック方式では、ROMに格納された
データをバイト又はワードごとに0番地から最後の1つ
前までの番地(m−1)まで足した合計を最後の番地m
に格納しておく。そして、任意の時間にプログラムで0
番地から(m−1)番地までの足し算を実行し、その結
果とm番地に予め格納されている合計値とを照合する。
2. Description of the Related Art Generally, read only memory (ROM)
When the program is stored in, some bit values may change due to aging, etc., so that the contents are regularly checked. As a method for this, there are a sum check method and a parity check method. In the sum check method, the sum of the data stored in the ROM for each byte or word from address 0 to the last address (m-1) is added to the final address m.
Stored in. And at any time, programmatically 0
The addition from the address to the address (m-1) is executed, and the result is compared with the total value stored in the address m in advance.

【0003】一方、パリティチェック方式では、ROM
に格納されたデータのバイト又はワードごとにパリティ
演算を行なってパリティを求め、このパリティをパリテ
ィ用のROMに格納しておく。そして、ROMからのデ
ータの読み出し時に読み出したデータに対してパリティ
演算を行ない、演算結果を予め格納されているパリティ
と比較してチェックを行なう。
On the other hand, in the parity check method, the ROM
Parity is calculated for each byte or word of the data stored in, and the parity is stored in the ROM for parity. Then, when the data is read from the ROM, a parity operation is performed on the read data, and the operation result is compared with the previously stored parity to perform a check.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、上述し
た従来の技術には、次のような課題があった。即ち、R
OMの監視をサムチェックで行なう場合、これをプログ
ラムにより行なうことになる。従って、サムチェックを
実施している間は、他のプログラムは実行できなくな
り、本来のプログラムの実行に影響を与えてしまう可能
性がある。また、常に監視することは事実上不可能であ
り、ある時間間隔で本来のプログラムの実行の合間をぬ
って行なうことになる。一方、ROMの監視をパリティ
チェックで行なう場合、一般的にROM等のメモリの構
成はn×8ビット又はn×16ビットの構成のものが多
く、n×1ビットの構成のものは少ない。このため、通
常は、パリティメモリとしてn×1ビットのROMの代
わりにn×8ビットのROMが使用され、その場合、パ
リティを格納するのに使用されるのは各8ビットのうち
の各1ビットのみであり、記憶容量の大部分が無駄とな
ってしまう。また、コスト及び実装スペースの点でも不
利となる。
However, the above-mentioned conventional techniques have the following problems. That is, R
When the OM is monitored by the sum check, this is performed by the program. Therefore, while the sum check is being performed, another program cannot be executed, which may affect the execution of the original program. In addition, it is virtually impossible to always monitor, and the program is executed at intervals of a certain time interval between executions of the original program. On the other hand, when the monitoring of the ROM is performed by the parity check, the memory such as the ROM generally has a structure of n × 8 bits or n × 16 bits, and has a small structure of n × 1 bits. For this reason, an n × 8 bit ROM is usually used as the parity memory instead of the n × 1 bit ROM, in which case only one of each 8 bits is used to store the parity. Only bits, so most of the storage capacity is wasted. In addition, it is disadvantageous in terms of cost and mounting space.

【0005】[0005]

【課題を解決するための手段】本発明のパリティチェッ
ク方式は、上述した課題を解決するため、以下の点を特
徴とするものである。 (1) プログラムメモリと、当該プログラムメモリに入力さ
れるアドレスの一部を入力するパリティメモリを備え
る。 当該パリティメモリに入力される部分以外の残りのア
ドレスの部分をセレクタ入力として入力し、当該パリテ
ィメモリから出力されるビット列の一部をプログラムメ
モリに格納されたデータに対応するパリティとして出力
するセレクタを備える。 当該セレクタから出力されるパリティとプログラムメ
モリから出力されるデータとによりパリティチェックを
行なうパリティ演算部を備える。
The parity check method of the present invention is characterized by the following points in order to solve the above-mentioned problems. (1) A program memory and a parity memory for inputting a part of the address input to the program memory are provided. A selector that inputs the remaining address part other than the part input to the parity memory as a selector input and outputs a part of the bit string output from the parity memory as the parity corresponding to the data stored in the program memory. Prepare A parity operation unit is provided for performing a parity check with the parity output from the selector and the data output from the program memory.

【0006】(2)(1)において、パリティメモリ
は、プログラムメモリへのアドレスの一部を入力するこ
とにより、8ビットのビット列を出力し、セレクタは、
プログラムメモリへのアドレスのうちの3ビットをセレ
クタ入力として入力し、パリティメモリが出力する8ビ
ットのビット列のうちの1ビットをパリティビットとし
てパリティ演算部に出力する。
(2) In (1), the parity memory outputs an 8-bit bit string by inputting a part of the address to the program memory, and the selector:
Three bits of the address to the program memory are input as selector inputs, and one bit of the 8-bit bit string output from the parity memory is output as a parity bit to the parity operation unit.

【0007】[0007]

【作用】[Action]

(1)プロセッサからのアドレスAx〜A0がプログラ
ムメモリに入力されると、それに対応した2y ビットの
データD2y-1〜D0が読み出される。一方、アドレスA
x〜A0の上位部分Ax〜Ayがパリティメモリに入力
されると、それに対応した2y ビットのデータDp2y-1〜
Dp0が読み出される。そして、アドレスAx〜A0の下
位部分Ay-1 〜A0がセレクタのセレクト入力に供給さ
れる。セレクタでは、セレクト入力に応じてデータDp2y
-1〜Dp0のいずれかのビットを出力する。パリティ演算
部では、このビットとデータD2y-1〜D0とを入力し、
データD2y-1〜D0から演算により求めたパリティとこ
のビットのパリティとを照合する。これにより、データ
D2y-1〜D0の有効性が確認される。この結果、n×2
yビット構成のROMの容量を無駄なく使用することが
できる。
(1) When the addresses Ax to A0 from the processor are input to the program memory, the 2 y- bit data D2 y -1 to D0 corresponding to the addresses are read out. On the other hand, address A
When the upper part Ax to Ay of x to A0 is input to the parity memory, the corresponding 2 y- bit data Dp2 y -1 to
Dp0 is read. Then, the lower parts Ay-1 to A0 of the addresses Ax to A0 are supplied to the select input of the selector. In the selector, the data Dp2 y
Outputs any bit from -1 to Dp0. In the parity operation unit, this bit and the data D2 y -1 to D0 are input,
The parity obtained by calculation from the data D2 y -1 to D0 is collated with the parity of this bit. This confirms the validity of the data D2 y -1 to D0. As a result, n × 2
The capacity of the ROM having the y- bit configuration can be used without waste.

【0008】(2)(1)において、特にy=3とし、
n×8ビット構成のROMをパリティメモリとして用い
るようにした結果、最も普及したROMを使用すること
ができるとともに、セレクタを8対1のものとし、構成
の複雑化を抑えることができる。
(2) In (1), particularly y = 3,
As a result of using the ROM having the n × 8 bit structure as the parity memory, the most popular ROM can be used, and the selector can be set to 8: 1 to suppress the complication of the structure.

【0009】[0009]

【実施例】以下、本発明の実施例を図面を参照して詳細
に説明する。図1は、本発明のパリティチェック方式の
一実施例のブロック図である。図示の装置は、プログラ
ムメモリ1、パリティメモリ2、セレクタ3、パリティ
演算部4から成る。プログラムメモリ1は、ROMから
成り、例えば、n×8ビットの構成である。即ち、xビ
ットのアドレスの入力により、8ビットごとにデータを
出力する。パリティメモリ2は、ROMから成り、プロ
グラムメモリ1と同様にn×8ビットの構成であるが、
その容量はプログラムメモリ1の1/8である。そし
て、このパリティメモリ2は、プログラムメモリ1に入
力されるxビットのアドレスのうちの上位n−3ビット
をアドレス入力とする。このパリティメモリ2には、以
下のようにしてパリティが格納されている。
Embodiments of the present invention will now be described in detail with reference to the drawings. FIG. 1 is a block diagram of an embodiment of the parity check method of the present invention. The illustrated apparatus includes a program memory 1, a parity memory 2, a selector 3, and a parity calculation unit 4. The program memory 1 is composed of a ROM and has a structure of, for example, n × 8 bits. That is, by inputting an x-bit address, data is output every 8 bits. The parity memory 2 is composed of a ROM and has a structure of n × 8 bits like the program memory 1,
Its capacity is 1/8 of the program memory 1. The parity memory 2 uses the upper n-3 bits of the x-bit address input to the program memory 1 as an address input. Parities are stored in the parity memory 2 as follows.

【0010】図2に示すように、プログラムメモリ1の
0番地の8ビットデータに対するパリティは、パリティ
メモリ2の0番地の“ビット0”に格納されている。ま
た、プログラムメモリ1の1番地の8ビットデータに対
するパリティは、パリティメモリ2の0番地の“ビット
1”に格納されている。そして、プログラムメモリ1の
2番地の8ビットデータに対するパリティは、パリティ
メモリ2の0番地の“ビット2”に格納されている。こ
のように、プログラムメモリ1に格納されたデータ(プ
ログラム)に対応するパリティが、パリティメモリ2の
下位アドレスの“ビット0”から順に各ビットを隙間な
くうめていくように格納されている。
As shown in FIG. 2, the parity for the 8-bit data at the address 0 in the program memory 1 is stored in the "bit 0" at the address 0 in the parity memory 2. The parity for the 8-bit data at address 1 in the program memory 1 is stored in the “bit 1” at address 0 in the parity memory 2. The parity for the 8-bit data at the address 2 in the program memory 1 is stored in the “bit 2” at the address 0 in the parity memory 2. In this way, the parity corresponding to the data (program) stored in the program memory 1 is stored so as to fill each bit in order from “bit 0” of the lower address of the parity memory 2 without a gap.

【0011】セレクタ3は、8対1の構成であり、8ビ
ットのビット列のうちのセレクト入力に応じた1ビット
を選択する。即ち、図3に示すように、セレクタ3のセ
レクト入力には、プログラムメモリ1に入力されるxビ
ットのアドレスのうちの下位3ビットA2A1A0が接
続される。そして、パリティメモリ2から出力される8
ビットのうちの1ビットをプログラムメモリ1から読み
出されるデータに対応するパリティとして出力する。パ
リティ演算部4は、プログラムメモリ1から出力される
データに対するパリティ演算を行ない、その演算結果と
セレクタ3から出力されるパリティとを照合することに
よりパリティチェックを行なう。
The selector 3 has an 8-to-1 configuration and selects 1 bit in accordance with the select input of the 8-bit bit string. That is, as shown in FIG. 3, the select input of the selector 3 is connected to the lower 3 bits A2A1A0 of the x-bit address input to the program memory 1. Then, 8 output from the parity memory 2
One of the bits is output as the parity corresponding to the data read from the program memory 1. The parity operation unit 4 performs a parity operation on the data output from the program memory 1 and performs a parity check by comparing the operation result with the parity output from the selector 3.

【0012】次に、上述した装置の動作を説明する。プ
ロセッサ5からアドレスバスを介してアドレスAx〜A
0が送られる。このアドレスAx〜A0がプログラムメ
モリ1に入力されると、それに対応した8ビットのデー
タD7〜D0が読み出される。例えば、アドレス“00
1011”がプログラムメモリ1に入力され、データ
“10001101”が出力され、パリティ演算部4に
入力されるとする。この場合のパリティを偶数パリティ
とすると、パリティ演算の結果は“1”となる。一方、
アドレスAx〜A0の上位部分Ax〜A3がパリティメ
モリ2に入力されると、それに対応した8ビットのデー
タDp7〜Dp0が読み出される。例えば、アドレス上位部
“001”がパリティメモリ2に入力され、データ(パ
リティ列)“01011000”が出力され、セレクタ
3に入力されるとする。
Next, the operation of the above-mentioned device will be described. Addresses Ax to A from the processor 5 via the address bus
0 is sent. When the addresses Ax to A0 are input to the program memory 1, 8-bit data D7 to D0 corresponding to the addresses are read. For example, the address "00
1011 ”is input to the program memory 1, data“ 10001101 ”is output, and is input to the parity calculation unit 4. If the parity in this case is even parity, the result of the parity calculation is“ 1 ”. on the other hand,
When the higher order parts Ax to A3 of the addresses Ax to A0 are input to the parity memory 2, 8-bit data Dp7 to Dp0 corresponding thereto are read out. For example, it is assumed that the upper address part "001" is input to the parity memory 2 and the data (parity column) "01011000" is output and input to the selector 3.

【0013】そして、アドレスAx〜A0の下位部分A
2〜A0がセレクタ3のセレクト入力に供給される。例
えば、アドレス下位部“011”がセレクト入力に供給
される。これにより、セレクタ3に入力された“010
11000”のうち、一番右を“ビット0”として“ビ
ット3”の位置の“1”が選択される。そして、このビ
ット値がパリティ演算部4で演算された値と照合され
る。このビット値は、パリティ演算部4で演算された値
“1”と等しいので、パリティチェックの結果、プログ
ラムメモリ1のアドレス“001011”から読み出さ
れたデータ“10001101”の有効性が確認され
る。
The lower part A of the addresses Ax to A0
2 to A0 are supplied to the select input of the selector 3. For example, the lower address part "011" is supplied to the select input. As a result, “010
In 11000 ”, the rightmost one is selected as“ bit 0 ”, and“ 1 ”at the position of“ bit 3 ”is selected, and this bit value is collated with the value calculated by the parity calculator 4. Since the bit value is equal to the value “1” calculated by the parity calculator 4, the validity of the data “10001101” read from the address “001011” of the program memory 1 is confirmed as a result of the parity check.

【0014】このようにして、n×8ビット構成のRO
Mの容量を無駄なく使用してパリティチェックを行なう
ことができる。従って、コストの低減及び装置の小型化
を図りつつ、プログラムを実行するプロセッサとは別個
のパリティ演算部4によりプログラムの実行と平行して
常時プログラムメモリ1を監視することができる。尚、
本発明は上述した実施例に限定されるものではなく、種
々の変形が可能であることはもちろんである。例えば、
プログラムメモリ1やパリティメモリ2は、n×8ビッ
トの構成に限らず、n×16ビット等の構成とし、セレ
クタ3を16対1の構成としてもよい。また、セレクト
入力はプログラムメモリ1のアドレスの下位3ビットで
なく、上位3ビットとし、残りのアドレス部分をパリテ
ィメモリ2のアドレス入力とするようにしてもよい。更
に、パリティは1ビットに限らず、2ビット以上のパリ
ティでもよい。
In this way, the RO of n × 8 bit structure
The parity check can be performed using the capacity of M without waste. Therefore, it is possible to constantly monitor the program memory 1 in parallel with the execution of the program by the parity operation unit 4 separate from the processor that executes the program while reducing the cost and downsizing the device. still,
The present invention is not limited to the embodiments described above, and it goes without saying that various modifications are possible. For example,
The program memory 1 and the parity memory 2 are not limited to the configuration of n × 8 bits, but may have a configuration of n × 16 bits or the like, and the selector 3 may have a 16: 1 configuration. Further, the select input may be not the lower 3 bits of the address of the program memory 1 but the upper 3 bits, and the remaining address portion may be the address input of the parity memory 2. Further, the parity is not limited to 1 bit and may be a parity of 2 bits or more.

【0015】[0015]

【発明の効果】以上説明したように、本発明のパリティ
チェック方式によれば、プログラムメモリのアドレスの
一部をセレクト入力とするセレクタを設けるようにした
ので、パリティメモリとしてn×1ビットのROMの代
わりに入手しやすい任意の構成のROMを使用した場合
も、そのROMの記憶容量を無駄なく活用することがで
き、コスト及び実装スペースの点でも有利となる。
As described above, according to the parity check method of the present invention, the selector for providing a part of the address of the program memory as the select input is provided. Therefore, the n × 1 bit ROM is used as the parity memory. Even if a readily available ROM having an arbitrary configuration is used instead of, the storage capacity of the ROM can be utilized without waste, which is advantageous in terms of cost and mounting space.

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

【図1】本発明のパリティチェック方式の一実施例のブ
ロック図である。
FIG. 1 is a block diagram of an embodiment of a parity check method of the present invention.

【図2】パリティメモリ2へのパリティの格納順序の説
明図である。
FIG. 2 is an explanatory diagram of a parity storage order in a parity memory 2.

【図3】本発明に係る装置のパリティチェック時の動作
の説明図である。
FIG. 3 is an explanatory diagram of an operation at the time of parity check of the device according to the present invention.

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

1 プログラムメモリ 2 パリティメモリ 3 セレクタ 4 パリティ演算部 5 プロセッサ 1 Program Memory 2 Parity Memory 3 Selector 4 Parity Arithmetic Unit 5 Processor

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 プログラムメモリと、 当該プログラムメモリに入力されるアドレスの一部を入
力するパリティメモリと、 当該パリティメモリに入力される部分以外の残りのアド
レスの部分をセレクタ入力として入力し、当該パリティ
メモリから出力されるビット列の一部を前記プログラム
メモリに格納されたデータに対応するパリティとして出
力するセレクタと、 当該セレクタから出力されるパリティと前記プログラム
メモリから出力されるデータとによりパリティチェック
を行なうパリティ演算部とから成ることを特徴とするパ
リティチェック方式。
1. A program memory, a parity memory for inputting a part of an address input to the program memory, and a remaining address part other than a part input to the parity memory are input as selector inputs, A parity check is performed by a selector that outputs a part of the bit string output from the parity memory as the parity corresponding to the data stored in the program memory, and the parity output from the selector and the data output from the program memory. A parity check system characterized by comprising a parity operation unit for performing.
【請求項2】 前記パリティメモリは、前記プログラム
メモリへのアドレスの一部を入力することにより、8ビ
ットのビット列を出力し、前記セレクタは、前記プログ
ラムメモリへのアドレスのうちの3ビットをセレクタ入
力として入力し、前記パリティメモリが出力する8ビッ
トのビット列のうちの1ビットをパリティビットとして
前記パリティ演算部に出力することを特徴とする請求項
1記載のパリティチェック方式。
2. The parity memory outputs a bit string of 8 bits by inputting a part of the address to the program memory, and the selector selects 3 bits of the address to the program memory. 2. The parity check method according to claim 1, wherein 1 bit of an 8-bit bit string input as an input and output by the parity memory is output as the parity bit to the parity operation unit.
JP6300236A 1994-11-09 1994-11-09 Parity check system Pending JPH08137762A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6300236A JPH08137762A (en) 1994-11-09 1994-11-09 Parity check system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6300236A JPH08137762A (en) 1994-11-09 1994-11-09 Parity check system

Publications (1)

Publication Number Publication Date
JPH08137762A true JPH08137762A (en) 1996-05-31

Family

ID=17882355

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6300236A Pending JPH08137762A (en) 1994-11-09 1994-11-09 Parity check system

Country Status (1)

Country Link
JP (1) JPH08137762A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7216239B2 (en) 2001-08-14 2007-05-08 Nissan Motor Co., Ltd. Counterfeit detecting program, method, and apparatus of digital data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7216239B2 (en) 2001-08-14 2007-05-08 Nissan Motor Co., Ltd. Counterfeit detecting program, method, and apparatus of digital data

Similar Documents

Publication Publication Date Title
KR970071301A (en) Data processing system and method
JPH1040122A (en) Computer
JP2606862B2 (en) Single error detection and correction method
JPH08137762A (en) Parity check system
JPH10240522A (en) Arithmetic unit
JPH0821009B2 (en) CHANNEL CONTROLLER INITIALIZATION METHOD AND SYSTEM FOR THE INITIALIZATION
JPH0355918B2 (en)
JP2704062B2 (en) Information processing device
JP3196094B2 (en) Memory monitoring device
JP2690910B2 (en) Control storage device
JPH0233173B2 (en)
JP3441262B2 (en) Data processing device
JP3098414B2 (en) Load module storage method
JPH064336A (en) Information processor
JPH05324316A (en) Microprocessor
JPH06131899A (en) Semiconductor storage
JPH06259250A (en) Information processor
JPH0855024A (en) Instruction decoder circuit
JPH0226252B2 (en)
JPH0347536B2 (en)
JPH05108496A (en) Patrol control system
JPH07200416A (en) Memory system
JPH07219857A (en) Memory fault detection/error correction system
JPH08212143A (en) Parity control system
JPH05158737A (en) Data memory reading device