JPS6027952A - Program address malfunction detection system - Google Patents

Program address malfunction detection system

Info

Publication number
JPS6027952A
JPS6027952A JP58137034A JP13703483A JPS6027952A JP S6027952 A JPS6027952 A JP S6027952A JP 58137034 A JP58137034 A JP 58137034A JP 13703483 A JP13703483 A JP 13703483A JP S6027952 A JPS6027952 A JP S6027952A
Authority
JP
Japan
Prior art keywords
index
program
module
register
contents
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.)
Granted
Application number
JP58137034A
Other languages
Japanese (ja)
Other versions
JPS6355087B2 (en
Inventor
Koji Mita
浩司 三田
Yukio Maehashi
幸男 前橋
Shigetatsu Katori
香取 重達
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp, Nippon Electric Co Ltd filed Critical NEC Corp
Priority to JP58137034A priority Critical patent/JPS6027952A/en
Publication of JPS6027952A publication Critical patent/JPS6027952A/en
Publication of JPS6355087B2 publication Critical patent/JPS6355087B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/28Error detection; Error correction; Monitoring by checking the correct order of processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To monitor address malfunction and to attain a normal return by dividing a program into modules and providing a characteristic index and an index confirming instruction, storing the characteristic index by instruction execution, and detecting the instruction execution and comparing a generated index. CONSTITUTION:The program is executed successively, an index 1 is written in an index register 11 by the index write instruction of the 1st module, and an output significance signal 15 is sent to an incrementer 14 to add one to the contents of the index counter 12. As modules are executed successively, the register 11 and counter 12 are increased equally, one by one, and their contents are compared with each other by an index comparator 13, but they are equal in contents, so a dissidence signal 16 is not sent out. If a jump to a wrong module is caused owing to malfunction, the index is different, so the comparator 13 outputs the signal 16, allowing a CPU17 to perform error processing. An index counter initializing instruction is executed at a head part at the time of branching, returning, or repetition to write the value obtained by subtracting one from the index in the counter 12, and the index is increased by one in the ending, so the indexes become equal. When the signal 16 is received by the CPU17, the contents of the counter 12 are read out and a return to a normal loop is attained.

Description

【発明の詳細な説明】 〔発明の属する技術分野〕 本発明は、情報処理装置におけるプログラムアドレス誤
動作検出方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Technical field to which the invention pertains] The present invention relates to a program address malfunction detection method in an information processing device.

〔従来技術〕[Prior art]

プログラムの実行や周辺装置の制御を行う情報処理装置
においては、プログラムを所定の順序通シ実行する事が
重要である。もしも定められていない飛び越しや繰返し
などのプログラムアドレスの誤動作が生じたならば、情
報処理装置はその誤動作を検出し、対応動作を行い套装
がある。
In an information processing device that executes programs and controls peripheral devices, it is important to execute programs in a predetermined order. If a program address malfunction such as an unspecified jump or repetition occurs, the information processing device detects the malfunction and takes a corresponding action.

従来のプログラムアドレス誤動作検出機構とは、プログ
ラムを分割可能な単位ルーチンのモジュールに分け、各
モジュールの入口と出口にそのモジュールに固有な指標
をおき、この2つの指標をチェックしながら処理を進め
る事によシ、そのモジュール以外への暴走を検出しよう
というものである。
The conventional program address malfunction detection mechanism divides a program into modules of unit routines that can be divided, places a unique index at the entrance and exit of each module, and proceeds with processing while checking these two indexes. The purpose is to detect runaway behavior outside of that module.

第1図は従来のアドレス誤動作検出回路の一例の回路図
である。
FIG. 1 is a circuit diagram of an example of a conventional address malfunction detection circuit.

第1図において、指標発生器1は第1の指標発生命令に
よって実行中のモジュールに固有の指標を指標レジスタ
2の出力し、指標レジスタ2はこの指標を一時保持する
。指標発生器1は第2の指標発生命令によって、実行中
のモジュールに固有な指標を指標比較器3に出力する。
In FIG. 1, an index generator 1 outputs an index unique to the module being executed by a first index generation instruction to an index register 2, and the index register 2 temporarily holds this index. The index generator 1 outputs an index specific to the module being executed to the index comparator 3 in response to the second index generation command.

指標比較器3は指標レジスタ2内の指標と指標発生器1
で発生した指標を比較し、両者が等しくない場合は不一
致信号5をCPU4に出力する。
Index comparator 3 compares the index in index register 2 with index generator 1
The indices generated in are compared, and if the two are not equal, a mismatch signal 5 is output to the CPU 4.

プログラムの桐成は第2図に示すように、分割可能な単
位ルーチンのモジュールに分けられ、各モジュールの最
初V(は第1の指標発生回路、最後にii第2の指標発
生命令がある。同一モジュールにある第1の指標発生命
令と第2の指標発生回路は、指標発生器1に対し、同一
の指標を出力させる。今、モジュール駄、の第1の指標
発生命令が実行されると、指標発生器1鉱モジユールM
、に固有な第1の指標を発生し、これを指標レジスタ2
が保持する。そのまま所定のルートでプロゲラ ・ムが
進みそのモジュールの最後で第2の指標発生命令が実行
されると、指標発生器1は第2の指標を発生し、指標比
較器3でこの第2の指標と指標レジスタ2に保持されて
いた第1の指標との比較を行う。比較の結果、第1の指
標と第2の指標が不一致であれは、指標比較器3は不一
致信号5をCPU4に対し出力する。CPU4は不一致
信号5の入力によシ、プログラムアドレスの誤動作を検
知し、エラー処理動作を行う。
As shown in FIG. 2, the program Kirinari is divided into modules of divisible unit routines, and each module has a first index generation circuit at the beginning of each module, and a second index generation instruction at the end. The first index generation command and the second index generation circuit in the same module cause the index generator 1 to output the same index.Now, when the first index generation command in the module is executed, , indicator generator 1 ore module M
, and stores it in index register 2.
holds. When the program continues along the predetermined route and the second index generation command is executed at the end of the module, the index generator 1 generates the second index, and the index comparator 3 reads this second index. and the first index held in the index register 2. As a result of the comparison, if the first index and the second index do not match, the index comparator 3 outputs a mismatch signal 5 to the CPU 4. Upon receiving the mismatch signal 5, the CPU 4 detects a malfunction in the program address and performs an error processing operation.

プログラムが所定のルートに従って実行されていれば第
1の指標と第2の指標ともモジュールM2に固有のもの
でアシ、等しい。ところが、もしもプログラムアドレス
の誤動作が生じ、モジュールM、の実行途中で矢印で示
すようにモジュー、嘲、の実行に飛んでしまったとする
と、第2の指標発生命令はモジュールM3の指標発生命
令が実行される。この時、指標発生器1はモジュールM
1に固有な指標を発生し、この第2の指標と指標レジス
タ2に保持妊れていたモジュールM、に固有な第1の指
標はそれぞれ異なる値であるから、指標比較器3Fi不
一致信号5をCP U 4 K対して出力1、、CPU
4はこれを受けてプログラムアドレスの娯′動作を検知
する。
If the program is executed according to a predetermined route, the first index and the second index are unique to module M2 and are equal. However, if a malfunction occurs in the program address and the execution jumps to module M, as shown by the arrow, during the execution of module M, the second index generation instruction will be executed by the index generation instruction of module M3. be done. At this time, the index generator 1 is the module M
Since this second index and the first index unique to the module M held in the index register 2 have different values, the index comparator 3Fi generates a mismatch signal 5. Output 1 for CPU 4K, CPU
4 receives this and detects the operation of the program address.

しかしながら、上述の従来の検出方式にはいくつかの欠
点がある。
However, the conventional detection schemes described above have several drawbacks.

絹−r(、同一プログラムモジュール内でその実行が所
犀のルートに従っ°Cいる事は利足できるが、谷モジュ
ールが所だの順番に従って実行されているかは検出でき
7Lい。例えば、ちょうど1つのモジュール全てを5体
び越して実行する↓うな誤動イ「や、同一モジ、−ルを
繰り返し実行ずSような誤動1乍t:J全く検出できな
い。
Although it is advantageous that within the same program module its execution follows the specified route, it is impossible to detect whether the valley modules are executed according to the specified order. For example, just Executing one module by skipping all 5 modules ↓ An error like this: ``No, I don't run the same module over and over again. I can't detect it at all.

第二に、相棒発生命令の実行が容易であるため、アドレ
スの誤動作b1にも指標発生イ1j令が実行きれてしl
う6」゛舵性かるる。そのため、アドレスの誤動作&C
もかかわらず正しい指標が書込iれる危険性が丙く、そ
うなると誤動作を検出できない。っまシ、アドレス誤動
作という非常事態を検出する確実性に乏はしい。
Second, since the partner generation instruction is easy to execute, the index generation i1j instruction can be executed even if the address malfunctions b1.
U6” ゛Rudder characteristics. Therefore, address malfunction &C
However, there is a high risk that the correct index will be written, and if this happens, malfunctions will not be detected. Unfortunately, there is little certainty in detecting an emergency situation such as an address malfunction.

第三に、アドレスの誤動作を検出した場合も、その誤動
作が発生したモジ−−ルを確認する方法がなく、アドレ
スの誤動作が発生する以前のプログラムモジュールに戻
シ再試行を行う事が不可能である。
Third, even if an address malfunction is detected, there is no way to confirm the module where the malfunction occurred, and it is impossible to return to the program module before the address malfunction and retry. It is.

〔発明の目的〕[Purpose of the invention]

本発明の目的は、上記欠点を除去し、プログラムアドレ
ス全体に亘シアドレス誤動作を確実に監視し、暴走を検
知した場合には正規のルート復帰させる事ができるプロ
グラムアドレス誤動作検出方式を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a program address malfunction detection method that can eliminate the above-mentioned drawbacks, reliably monitor the entire program address for serial address malfunction, and restore the normal route when runaway is detected. It is in.

〔発明の構成〕[Structure of the invention]

本発明の第1の発明は、プログラムを分割可能な単位の
モジュールに分割し、前記モジュール毎に実行順に対応
した固有の指標と、指標情報として前記固有の指標を備
えた指標確認命令を設け、前記指標確認命令の実行によ
シ前記指標確認命令内の前記指標情報としての前記固有
指標を第1の指標として保持する第1の指標記憶手段と
、前記指標確認命令の実行を検知して第2の指標を発生
する指標発生回路と、前記第2の指標を保持する第2の
指標記憶手段と、前記第1の指標記憶手段内の実際に実
行された前記モジュールの固有指標に対応する一IJ記
第1の指標と、前記第2の指標記憶手段内の前記プログ
ラムの構成上実行されるべき前記モジュールの固有指標
に対応する前記第2の指標とを比較する事によシ、前記
プログラムのアドレス誤動作を検出する指標比較手段と
を會んで構成される。
A first aspect of the present invention is to divide a program into divisible units of modules, provide each module with a unique index corresponding to the order of execution, and an index confirmation instruction having the unique index as index information, A first index storage means that stores the unique index as the index information in the index confirmation command as a first index upon execution of the index confirmation command; an index generation circuit that generates a second index, a second index storage means that holds the second index, and one index storage means that corresponds to the unique index of the actually executed module in the first index storage means. By comparing the first index of IJ and the second index corresponding to the unique index of the module to be executed due to the configuration of the program in the second index storage means, the program and index comparison means for detecting address malfunctions.

本発明の第2の発明は、プログラムを分割可能な単位モ
ジュールに分割し、前記モジュール毎に実行順に対応し
た固有の指標と、指標情報として前記固有の指標を備え
た第1の指標確認命令と第2の指標確認命令を設け、前
記第1の指標確認命令の実行によシ前記第lの指標確認
命令内の指標情報を保持する第1の補助レジスタと、前
記第2の指標確認命令の実行によシ前記第2の指標確認
命令内の指標情報を保持する第2の補助レジスタと、前
記第1の補助レジスタの内容と前記第2の補助レジスタ
の内容によシ第1の判定信号を出力する第1の条件判定
回路と、前記第1の条件判定回路から出力される前記第
1の判定信号を受けて前記第1の指標確認命令内の指標
情報と前記第2の指標確認命令内の指標情報から前記モ
ジュールの固有指標を第1の指標として保持する第1の
指標記憶手段と、前記第1の判定信号を受けて前記第1
の指標記憶手段の前記第1の指標の保持を検知して第2
の指標を発生する指標発生回路と、前記第2の指標を保
持する第2の指標記憶手段と、第1の指標書換え命令に
よって薔き込み動作が行なわれる第3の補助レジスチと
、第2の指標書き換え命令によって書込み動作が行なわ
れる。第4の補助レジスタ七、前記第3の補助レジスタ
の内容と前記第4の補助レジスタの内容によシ第2の判
定信号を出力する第2の条件判定回路と、前記第20判
足信号を受けて前記第3の補助レジスタの内容と前記第
4の補助レジスタの内容により前記第2の指標記憶手段
の内容をf換える手段と、前記第1の指標記憶手段内の
実際に実行された前記モジュールの固有指標に対応する
前記第1の指標と、前記第2の指標記憶手段内の前記プ
ログラムの構成上実行されるべき前記モジュールの固有
指標に対応する前記第2の指標を比較する事によシ前記
プログラムのアドレス誤動作を検出する指標比較手段と
を含んで構成される。
A second aspect of the present invention is to divide a program into divisible unit modules, and provide a unique index corresponding to the execution order for each module, and a first index confirmation instruction having the unique index as index information. A second index confirmation instruction is provided, and upon execution of the first index confirmation instruction, a first auxiliary register that holds index information in the first index confirmation instruction; a second auxiliary register that holds index information in the second index confirmation instruction upon execution; and a first determination signal that is determined depending on the contents of the first auxiliary register and the second auxiliary register. and a first condition determination circuit that outputs the index information in the first index confirmation command and the second index confirmation command upon receiving the first determination signal output from the first condition determination circuit. a first index storage means for storing a unique index of the module as a first index from index information in the module;
detecting that the first index is held in the index storage means and storing the second index.
an index generation circuit that generates an index of A write operation is performed by an index rewrite command. a fourth auxiliary register 7, a second condition determination circuit that outputs a second determination signal depending on the contents of the third auxiliary register and the fourth auxiliary register; means for changing the contents of the second index storage means according to the contents of the third auxiliary register and the fourth auxiliary register; Comparing the first index corresponding to the unique index of the module and the second index corresponding to the unique index of the module to be executed due to the configuration of the program in the second index storage means. and index comparison means for detecting address malfunctions in the program.

〔実施例の説明〕[Explanation of Examples]

まず、本発明の実施例に使用するプログラムの構成につ
いて説明する。
First, the configuration of a program used in an embodiment of the present invention will be explained.

第3図は本発明の実施例に使用するプログラムの第1の
構成例を説明するための70−チャートである。
FIG. 3 is a 70-chart for explaining a first configuration example of a program used in the embodiment of the present invention.

プロクラムを分割可能な単位ルーチンのモジュールM1
〜M、′〜Mnに分け、それぞれ実行順に対応して各モ
ジュール間南に1. 2. 3.・・・、i、・・・・
・・と番号を付け、これをそのモジュールの指標とする
。各モジュールの最後部には指標確認命令として指標書
込み命令を置く。
Module M1 of a unit routine that can divide the program
~M, '~Mn, and 1. to the south between each module corresponding to the execution order. 2. 3. ..., i, ...
..., and use this as the index of that module. An index write command is placed at the end of each module as an index confirmation command.

第4崗は本発明の実施例に使用するプログラムの第2の
構成例を説明するためのフローチャートである。
The fourth diagram is a flowchart for explaining a second configuration example of a program used in the embodiment of the present invention.

この構成例は、プログラム・モジュールの間に繰返しル
ープがある場合の例である。この場合、前に実行したモ
ジュールへ分岐するルートに指標カウンタ初期化命令(
指標カウンタの値をiにする命令)を置く。
This configuration example is an example where there is a repeat loop between program modules. In this case, the index counter initialization instruction (
(instruction to set the value of the index counter to i) is placed.

第5図は本発明の実施例に使用するプログラムの第3の
構成例を説明するための70−チャートである。
FIG. 5 is a 70-chart for explaining a third configuration example of a program used in the embodiment of the present invention.

この構成例は、プログラム・モジュールの間に条件分岐
がある場合の例である。この場合、各分岐間の実行ルー
トごとに先頭から順番に、例えばi、 i+1. j+
2.・・・−・・;j、 j+1. j+2゜・・・、
、−;に、lc+1. k+2.・・・・・・;のよう
にモジュールに番号を付けて、これをそのモジュールの
指標とする。分岐した各ルートの最初のモジュールの先
頭部と、合流した実行ルートの最初のモジュールの先頭
部には、指標カウンタの初期化命令22が置かれる。
This configuration example is an example where there is a conditional branch between program modules. In this case, for each execution route between each branch, for example, i, i+1, . j+
2.・・・−・・;j, j+1. j+2゜...
, -; to lc+1. k+2. Assign a number to the module, such as ...;, and use this as the index of that module. An index counter initialization instruction 22 is placed at the beginning of the first module of each branched route and at the beginning of the first module of the merged execution route.

次に、本発明の実施例について説明する。Next, examples of the present invention will be described.

第6図は本絹1の発明の一実施例のブロック図である。FIG. 6 is a block diagram of an embodiment of the present silk 1 invention.

この実施例は、第3図乃至第5図で説明したプログラム
、卵ちモジュールに分割され、固有指標を豊込む命令(
指標m、g命令)が設けられているプログラムを実行し
たとき、指標確認命令としての指標書込み命令21の実
行によシ指標書込み命令内の指標情報としての固有指標
を第1の指標として保持する第1の指標記憶手段として
の指標レジスタ11と、指標書込み命令の実行を検知し
て第2の指標を光生する指標発生回路としてのインクリ
メンタ14と、第2の指標を保持する第2の指標記憶手
段としての指標カウンタ12と、指標レジスタ11内の
実際に実行されたプログラム・モジュールの固有指標に
対応する第1の指標と。
This embodiment is divided into the program explained in FIGS.
When a program in which indexes m and g instructions are provided is executed, the index writing command 21 as an index confirmation command is executed, and the unique index as index information in the index writing command is held as the first index. An index register 11 as a first index storage means, an incrementer 14 as an index generation circuit that detects execution of an index write command and generates a second index, and a second index that holds the second index. An index counter 12 as a storage means and a first index corresponding to the unique index of the actually executed program module in the index register 11.

指標カウンタ12内のプログラムの構成上実行されるべ
きモジュールの固有指標に対応する第2の指標とを比軟
する事により、前記プログラムのアドレス誤動作音検出
する指標比較手段としての指標比教器13とを含んで構
成される。
An index comparing device 13 serves as an index comparing means for detecting address malfunction sounds of the program by comparing a unique index of a module to be executed in the index counter 12 with a second index corresponding to the unique index of the module to be executed based on the configuration of the program. It consists of:

更に詳しく説明すると、指標レジスタ11は指標書込み
命令によって指標が書込まれるレジスタである。指標レ
ジスタ11に指標の書込みが行われると誉込み■効信号
15が、インクリメンタ14に対して出力される。指標
レジスタ11は指標を保持するレジスタでアシ、指標カ
ウンタ12は指標レジスタIIK保持された指標の数を
計数するカウンタであシ、その内容は命令によって読め
ず事ができる。指標比較器13は、指標レジスタ11と
指標カウンタ12の内容を比較し、異なった値でれば不
一致信号16をCPUI 7に対して出力する。
More specifically, the index register 11 is a register into which an index is written by an index write command. When the index is written to the index register 11, a write-in effect signal 15 is output to the incrementer 14. Index register 11 is a register that holds indices, and index counter 12 is a counter that counts the number of indices held in index register IIK, the contents of which cannot be read or changed by commands. The index comparator 13 compares the contents of the index register 11 and the index counter 12, and outputs a mismatch signal 16 to the CPU 7 if the values are different.

次に、この実施例の動作について説明する。Next, the operation of this embodiment will be explained.

まず、第3図に示したような、プログラム・モジュール
間に条件分岐や、繰返しループを含まないプログラムの
実行ルートをチェックする場合について説明する1、 第7図は第6図に示す指標レジスタと指標カウンタに格
納される指標及び計数3.の格納状態を説明する図であ
る。
First, we will explain the case of checking the execution route of a program that does not include conditional branches or repeat loops between program modules, as shown in Figure 3.1 Figure 7 shows the index register and the index register shown in Figure 6. Indices and counts stored in the indicator counter3. It is a figure explaining the storage state of.

プログラム耐笑行する前の初期状態では、指標レジスタ
11、指標カウンタ12とも内容は0”でめる。グログ
ラムが順次笑イ1され、)獲初のモジュールが終了する
と、モジュールの最佼都に4うる指標書込み命令により
、指標レジスタ11には指標″′1″が書込まれる。こ
の時、指標レジスタ11から出力されfC−*込み有効
信号15はインクリメンタJ4に送ら扛、インクリメン
タ14は指標カウンタ12の内容に1を加える。これは
指標レジスタIJの同郷に等しい。以下、モジュールを
順次実行していく参によシ、指標レジスタ11と指憚カ
ウンタ12の内容は等しく1づつ増加していく。
In the initial state before program execution, the index register 11 and index counter 12 both contain 0. The index "'1" is written in the index register 11 by the index write command 4. At this time, the fC-* writing valid signal 15 output from the index register 11 is sent to the incrementer J4, and the incrementer 14 Add 1 to the contents of the index counter 12. This is equal to the same value as the index register IJ.Hereafter, as we execute the modules one after another, the contents of the index register 11 and the index counter 12 are equally incremented by 1. To go.

指標レジスタ11の内容と指標カウンタ12の内容は書
換えがあるんひに指標比較器13で比軟される。プログ
ラムが所定のルートに従って、各モジュールが順番に実
行されていれば、実行を終ったモジュールの番号を保持
する指標レジスタ11の内容と、実際に実行したモジュ
ールの指標書込み命令の数を示す指標カウンタ12の内
容とけ等しい。このため指標比較器]3は不一致信号1
6を出力しない。
The contents of the index register 11 and the contents of the index counter 12 are compared by an index comparator 13 whenever rewriting is performed. If the program follows a predetermined route and each module is executed in order, the contents of the index register 11 that holds the number of the module that has finished execution, and the index counter that indicates the number of index write instructions of the module that has actually been executed. The contents of 12 are equal. Therefore, index comparator] 3 is a mismatch signal 1
6 is not output.

プログラムアドレス誤動作の発生によシモジュールMi
の実行途中からモジュールMjの実行へ飛んでしまった
場合には、モジュールMj の最後部において指標書込
み命令が実行され、指標レジスタ11には指標”j″が
格納される。一方、この時点まで実行したモジュールの
指標書込み命令の数はi個であるから、指標カウンタ1
2の内容はi”となる。このため指標比較器13は両者
を比較し、不一致信号16をCPU17に対して出力し
、これによ、9CPU17はプログラムアドレスに誤動
作があつた事を検知する。
Due to the occurrence of program address malfunction, the module Mi
If execution jumps to module Mj from the middle of execution, an index write command is executed at the end of module Mj, and index "j" is stored in index register 11. On the other hand, since the number of index write instructions of the module executed up to this point is i, the index counter 1
The content of 2 is i''. Therefore, the index comparator 13 compares the two and outputs a mismatch signal 16 to the CPU 17, whereby the CPU 17 detects that a malfunction has occurred in the program address.

以上述べたアドレス誤動作検出の基本動作を基にして、
次に第5図に示したように途中で分岐するプログラムと
、第4図に示したように繰返しループを持つプログラム
における実行ルートのチェック機構に2いて述べる。
Based on the basic operation of address malfunction detection described above,
Next, a mechanism for checking the execution route in a program that branches midway as shown in FIG. 5 and a program having a repeat loop as shown in FIG. 4 will be described.

分岐して、または合流して最初に実行されるプログラム
・モジュールの先頭部において、前述した指標カウンタ
初期化命令22を実行し、指標カウンタ12には分岐し
たグログラム・モジュールの指標から1引いた値を書込
む。プログラムが順次実行され、このモジュールの実行
が終了すると、指標1込み命令21によって指標レジス
タ11にはこの最初のモジュールの指標値が書込まれ、
指標カウンタ12の値は1つ増加し、その結果指標の値
に等しくなる。これによυ以下は、プログラム・モジュ
ール間に分岐を含まない場合のプログラムアドレス誤動
作検出機構と同様にして、実行ルートがチェックされる
。第5図に示すように、各指標カウンタ初期化命令によ
る指標カウンタ12の初期値を異なったものにするなら
ば、並行する実行ルートの途中で1つのルートから他の
ルートへ分岐する誤動作を検出する事ができる。
At the beginning of the first program module to be executed after branching or merging, the index counter initialization instruction 22 described above is executed, and the index counter 12 is filled with a value subtracted by 1 from the index of the branched program module. Write. The program is executed sequentially, and when the execution of this module is completed, the index value of this first module is written to the index register 11 by the index 1 insert instruction 21,
The value of the index counter 12 increases by one, so that it becomes equal to the value of the index. As a result, from υ onwards, the execution route is checked in the same way as the program address malfunction detection mechanism when there are no branches between program modules. As shown in FIG. 5, if the initial value of the index counter 12 is set differently by each index counter initialization instruction, a malfunction that branches from one route to another route in the middle of parallel execution routes will be detected. I can do that.

次に、第4図に示したように、繰返しループがある場合
、以前実行したモジュールを再実行するために、分岐す
る際に指標カウンタの初期化命令を実行し、指標カウン
タ12に再実行するプログラムモジュールの指標値から
1引いた値を書込む。
Next, as shown in FIG. 4, if there is a repeat loop, in order to re-execute the previously executed module, an index counter initialization instruction is executed when branching, and the index counter 12 is re-executed. Write the value minus 1 from the index value of the program module.

再実行された最初のプログラムモジュールの実行が終了
すると、分岐の場合と同様の過程で指標レジスタ11に
は指標値が書込まれ、指標カウンタ12は指標値に等し
い値となっている。これによシ、モジュールの繰返しル
ープを含まない場合のプログラムアドレス誤動作検出+
A構と同様にして実行ルートがチェックされる。
When the execution of the first re-executed program module is completed, the index value is written to the index register 11 in the same process as in the case of branching, and the index counter 12 has a value equal to the index value. This allows detection of program address malfunctions when module repeat loops are not included.
The execution route is checked in the same way as in structure A.

次に正規のルートへ復帰するだめの機構について説明す
る。不一致信号15を受けだCPU17は、ただちにア
ドレス誤動作の処理に移る。この処理においてCPUI
 7は指標カウンタ12の内容をデータバス18を通し
て読出す。これはプログラムアドレス誤動作が起らなけ
れば本来実行されていれずのモジュールの番号である。
Next, the mechanism for returning to the normal route will be explained. Upon receiving the mismatch signal 15, the CPU 17 immediately proceeds to address malfunction processing. In this process, the CPU
7 reads out the contents of the index counter 12 through the data bus 18. This is the number of a module that would not normally have been executed if a program address malfunction had not occurred.

モジュールの番号はモジュールの先頭アドレスと1対1
の対応関係にあるから、CPU17は本来実行すべきモ
ジュールの先頭アドレスを読出して、正常な実行ルート
へ復帰する事ができる。
The module number is one-to-one with the module's start address.
Because of this correspondence relationship, the CPU 17 can read the start address of the module that should originally be executed and return to the normal execution route.

次に、第2の究明について説明する。Next, the second investigation will be explained.

ます、本絹2の発明の実施例に使用するプログラムの構
成について説明する。
First, the structure of the program used in the embodiment of the invention of Honkinu 2 will be explained.

第8図は本絹2の発明の実施例に使用するプログラムの
指標書込み命令の構成を示す図、第9図は本絹2の発明
の実施例に使用するプログラムの指標カウンタ初期化命
令の構成を示す図である。
FIG. 8 is a diagram showing the configuration of an index write command of a program used in an embodiment of the invention of Honkinu 2, and FIG. 9 is a diagram showing the configuration of an index counter initialization instruction of a program used in an embodiment of the invention of Honkinu 2. FIG.

プログラムは、第3図に示したように、単位ルーチンの
モジュール分割し、それぞれの実行順に各モジュール固
有の番号1. 2. 3・・・で、・・・・・・を付し
、指標とする。第8図に示すように、・各モジュールΔ
11 の最後部にFi続けて第1の指標書込み命令41
と第2の指標書込み命令42を置く。
As shown in FIG. 3, the program is divided into modules of unit routines, and each module has a unique number 1. 2. 3. Attach ... and use it as an index. As shown in Figure 8, each module Δ
11 followed by the first index write command 41 at the end of Fi.
and the second index write command 42 are placed.

第5図に示したように、プログラム・モジュールの間に
条件分岐がある場合には、分岐した各モジュールMi、
へ4j、 Mkの先頭部と、合流した実行ルートの最初
のモジュールM/の先頭部には、第9図に示すように(
第9図にはこれらのモジュールをモジュルMkで代表さ
せて示しである)、第1の指標カウンタ初期化命令43
と第2の指標カウンタ初期化命令44を置く。
As shown in FIG. 5, when there is a conditional branch between program modules, each branched module Mi,
At the beginning of Mk and the beginning of the first module M/ of the merged execution route, as shown in
In FIG. 9, these modules are represented by module Mk), and the first index counter initialization instruction 43
and a second index counter initialization instruction 44.

次に、第2の発明の実施例について説明する。Next, an embodiment of the second invention will be described.

第1O図は本絹2の発明の一実施例のブロック図である
FIG. 1O is a block diagram of an embodiment of the present silk 2 invention.

この実施例は第3図、第5図、第8図、第9図で説明し
たプログラム、即ちモジュールに分割され、第1の指標
書込み命令(第1の指標確認命令)と第2の指標書込み
命令(第2の指標確認命令)と、条件分岐がある場合は
第1及び第2の指標カウンタ初期化命令が設けられてい
るプログラムを実行したとき、第1の指標確認命令とし
ての第1の指標書込み命令41の実行によシこの第1の
指標書込み命令41内の指標情報を保持する第1の補助
レジスタ60と、第2の指標確認命令としての第2の指
標書込み命令42の実行によシこの第2の指標書込み命
令42内の指標情報を保持する第2の補助レジスタ61
と、第1の補助レジスタ60の内容と第2の補助レジス
タ62の内容によシ第1の判定信号を出力する第1の条
件判定回路としての第1比戦器62と、この第1比戦器
62から出力される第1の判定信号を受けてmlの指標
書込み命令41内の指標情報と第2の指標書込み命令4
2内の指標情報からモジュールの固有指標を第1の指標
として保持する第1の指標記憶手段としての指標レジス
タ51と、第1の判定信号を受りて指標レジスタ51の
Mlの指標の保持を恢知して第2の指標を発生する指標
発生回路としてのインクリメンタ54と、第2の指標を
保持する第2の指標記憶手段としての指標カウンタ52
と、第1の指標書換え命令にとしての第1の指標カウン
タ初期化命情43によって曹込み動作か行なわれる第3
の補助レジスタ64と、第2の指標書換え扁令としての
第2の指標カウンタ初ルj化命令44によって畳込み動
作が行なわれる第4の補助レジスタ65と、第3の補助
レジスタ64の内容と第4の補助レジスタ65の内容に
ょシ第2の判定信号を出力する第2の条件判定回路とし
ての8142比較器66と、これから出力される第2の
判定信号を受りて第3の補助レジスタ64の内容と第4
の補助レジスタ65の内容にょシ指標カウンタ52の内
容を書換える手段としての第2ゲート67と、指標レジ
スタ51内の実際に実行されたプログラム・モジュール
の固南指標に対応する前記第1の指標と、指標カウンタ
52内の前記プログラムの構成上実行されるべきモジュ
ールの固有指標に対応する第2の指標を比軟する挙によ
シ前記プログラムのアドレス誤動作を検出する指標比較
手段としての指標比軟器53とを含んで構成される。
This embodiment is divided into the programs explained in FIGS. 3, 5, 8, and 9, that is, modules, and includes a first index write command (first index confirmation command) and a second index write command. When executing a program that includes an instruction (second index confirmation instruction) and, if there is a conditional branch, first and second index counter initialization instructions, the first A first auxiliary register 60 for holding the index information in the first index write instruction 41 for execution of the index write instruction 41, and a first auxiliary register 60 for holding index information in the first index write instruction 41, and for execution of the second index write instruction 42 as a second index confirmation instruction. A second auxiliary register 61 that holds index information in the second index write instruction 42
a first ratio device 62 as a first condition determination circuit that outputs a first determination signal depending on the contents of the first auxiliary register 60 and the second auxiliary register 62; In response to the first judgment signal output from the weapon 62, the index information in the index write command 41 of ml and the second index write command 4
An index register 51 as a first index storage means that stores the unique index of the module as a first index from the index information in index information in the index register 51, and retains the index of Ml in the index register 51 upon receiving the first determination signal. An incrementer 54 as an index generation circuit that generates a second index based on the knowledge, and an index counter 52 as a second index storage means that holds the second index.
Then, a third subtraction operation is performed according to the first index counter initialization instruction 43 as a first index rewrite command.
The contents of the auxiliary register 64, the fourth auxiliary register 65 in which the convolution operation is performed by the second index counter initialization instruction 44 as the second index rewriting instruction, and the contents of the third auxiliary register 64. The contents of the fourth auxiliary register 65 include an 8142 comparator 66 as a second condition judgment circuit which outputs a second judgment signal, and a third auxiliary register which receives the second judgment signal outputted from the 8142 comparator 66. 64 contents and 4th
a second gate 67 as means for rewriting the contents of the index counter 52 according to the contents of the auxiliary register 65; and the first index corresponding to the fixed index of the actually executed program module in the index register 51. and a second index corresponding to the unique index of the module to be executed based on the configuration of the program in the index counter 52. An index ratio as an index comparison means for detecting address malfunction of the program. Softener 53.

更に詳しく説明すると、第1の補助レジスタ60は、第
1の指標書込み昔令41によって指標の論理値の反転値
iが書込まれ、′ig2の補助レジスタ61は第2の指
標書込み命令42によって指標iが書込まれるレジスタ
である。第1比戦器62は第1の補助レジスタ6oと第
2の補助レジスタ61の内容を比較し、両者が互いに反
転値である時書込み有効信号55を第lゲート63とイ
ンクリメタ54に対して出力する。指標レジスタ51は
指標を保持するレジスタであシ、指標カウンタ52は指
標レジスタ51に保持された指標の数を計数するカウン
タであシ、その内容は命令によって読出す事ができる。
To explain in more detail, the first auxiliary register 60 is written with the inverted logical value i of the index by the first index write command 41, and the auxiliary register 61 of 'ig2 is written by the second index write command 42. This is the register into which index i is written. The first ratio device 62 compares the contents of the first auxiliary register 6o and the second auxiliary register 61, and outputs a write valid signal 55 to the l-th gate 63 and the incrementer 54 when both are inverted values. do. The index register 51 is a register that holds indices, and the index counter 52 is a counter that counts the number of indices held in the index register 51, the contents of which can be read by a command.

第3の補助レジスタ64は第1の指標カウンタ私期化命
令43によシ指標カウンタの初期値の反転値が書込まれ
、第4補助レジスタ65は第2の指標カウンタ初期化命
令44によシ指標カウンタの初期値が書込まれるレジス
タである。第2比較器66は第3の補助レジスタ64と
第4の補助レジスタ65の内容を比較し、両者が互いに
反転値である時、初期化有効信号68を第2グー)67
に対して出力する。指標比較器53は指標レジスタ51
と指標カウンタ52の内容を比軟し、異なった値であれ
ば不一致信号56をCPU57に対し出力する。
The third auxiliary register 64 is written with the inverted value of the initial value of the index counter by the first index counter privatization instruction 43, and the fourth auxiliary register 65 is written by the second index counter initialization instruction 44. This is a register into which the initial value of the index counter is written. The second comparator 66 compares the contents of the third auxiliary register 64 and the fourth auxiliary register 65, and when the contents of the third auxiliary register 64 and the fourth auxiliary register 65 are inverted, the initialization valid signal 68 is set to the second value (67).
Output for. The index comparator 53 is the index register 51
The content of the index counter 52 is compared with the content of the index counter 52, and if the values are different, a mismatch signal 56 is outputted to the CPU 57.

次に、この実施例の動作について説明する。Next, the operation of this embodiment will be explained.

まず、指標記憶手段としての指標レジスタ51と指標カ
ウンタ52への書込みについて説明する。
First, writing to the index register 51 and index counter 52 as index storage means will be explained.

プログラムアドレスをチェックするだめの指標の記憶手
段の内容が容易に41!:候え可能であると、アドレス
誤動作時に指標記憶手段内のデータが書換えられてしま
う危険性がめシ、そうするとアドレス誤動作を正確に検
出できないおそれがある。
The content of the storage means of the index to check the program address is easily 41! If this is possible, there is a risk that the data in the index storage means will be rewritten when an address malfunction occurs, and if this happens, there is a risk that the address malfunction cannot be detected accurately.

そのため本発明では二重に書込み命令を設ける事によシ
、指標内容の曹換えエラーを防止している。
Therefore, in the present invention, an error in changing index contents is prevented by providing a double write command.

指標レジスタへの書込み動作の場合、第8図に示すよう
に、プログラム・モジュールへの最後部において、まず
第1の補助レジスタ60への指標書込み命令41が実行
され、指標の反転値iが60に書込まれる。続いて第2
の補助レジスタ61への書込み命令42が実行され、指
標iが第2の補助レジスタ61に書込まれる。第1比較
器62はこの両方の値が正確にこの順番に続いて畳込ま
れ、かつ反転値どうしであるならば、その時に限シ書込
み有効信号55を第lゲート63に対して出力する。第
1ゲート63はこの信号を受けとるとゲートを関き、第
2の補助レジスタ61内の指標を指標レジスタ51に格
納する。指標カウンタ52への畳込み動作の場合も同様
でるる。
In the case of a write operation to the index register, as shown in FIG. written to. Then the second
The write instruction 42 to the second auxiliary register 61 is executed, and the index i is written to the second auxiliary register 61. The first comparator 62 outputs the write enable signal 55 to the first gate 63 only if both values are convolved exactly in this order and are inverted values. When the first gate 63 receives this signal, it closes its gate and stores the index in the second auxiliary register 61 in the index register 51. The same applies to the convolution operation to the index counter 52.

第5図に示すように、プログラムの分岐点あるいは合流
点にあるプログラムモジュールの先頭部において、第9
図に示すように、まず第1の指標カウンタ初期化命令4
3によって第3の補助レジスタ64への蓄込みが実行さ
れ、指標カウンタの初期値の反転値が第3の補助レジス
タ64に書込まれる。続いて第2の指標カウンタ初期化
命令材によって、第4の補助レジスタ65への書込みが
実行され、指標カウンタの初期値が第4の補助レジスタ
65に書込−!!′t′Lる。第2比収器66はこの両
方の値が正確にこの順番に書込まれ、かつ反転値どうし
であるならば、その時に限シ初期化有効情号68を第2
ゲート67に対して出力する。第2ゲート67はこの(
g号を受けとるとゲートを開き、第4の補助レジスタ6
5内の指標カウンタ初期値ケ指標カウンタ52に格納す
る。
As shown in Figure 5, at the beginning of the program module at the branch point or confluence of the program,
As shown in the figure, first, the first index counter initialization instruction 4
3, storage into the third auxiliary register 64 is executed, and the inverted value of the initial value of the index counter is written into the third auxiliary register 64. Subsequently, writing to the fourth auxiliary register 65 is executed by the second index counter initialization instruction material, and the initial value of the index counter is written to the fourth auxiliary register 65 -! ! 't'Lru. If both values are written in exactly this order and they are inverted values, then the second ratio collector 66 transfers the initialization valid information 68 to the second value.
Output to gate 67. The second gate 67 is this (
Upon receiving number g, the gate will be opened and the fourth auxiliary register 6 will be opened.
The initial value of the index counter in 5 is stored in the index counter 52.

次に、指標レジスタ51内に保持された指標を用い、第
3図にあるようなプログラム・モジュール間に条件分岐
や繰返しループを含まないプログラムの実行ルートをチ
ェックする機構について、第7図を参照しながら説明す
る。
Next, see FIG. 7 for a mechanism for checking the execution route of a program that does not include conditional branches or repeat loops between program modules as shown in FIG. 3, using the index held in the index register 51. I will explain while doing so.

プログラムを実行する別の初期状態では指標レジスタ5
1、指標カウンタ52とも内容は′0”でりる。プログ
ラムが順次実行され成功のモジュルが終了すると、前述
した指標書込み命令によシ、指標レジスタ51には指標
″′1”が書込まれる。
In another initial state when the program is executed, the index register 5
1. The contents of both the index counters 52 and 52 are '0'. When the program is executed sequentially and a successful module is completed, the index '1' is written to the index register 51 by the above-mentioned index write command. .

この時、第1比較器62から出力された書込み有効信号
55はインクリメンタ54にも送られ、インクリメンタ
54は指標カウンタ52の内容に1を加える。これは指
標レジスタ51の内容に等しい。以下モジュールをノー
次実行して行く事により、指標レジスタ51と指標カウ
ンタ52の内容は等しく1づつ増加していく。
At this time, the write valid signal 55 output from the first comparator 62 is also sent to the incrementer 54, and the incrementer 54 adds 1 to the contents of the index counter 52. This is equivalent to the contents of index register 51. Thereafter, by successively executing the module, the contents of the index register 51 and the index counter 52 are equally incremented by one.

指標レジスタ51の内容と指標カウンタ52の内容は書
換えがあるたびに指標比較′a53で比較される。プロ
グラムが所定のルートに従って1各モジユールが順番に
実行されていれば、実行を終ったモジュールの番号を保
狩する指標レジスタ51の内容と、実際に実行したモジ
ュールの指標命令の数を示す指標カウンタ52の内容と
は等しい。
The contents of the index register 51 and the contents of the index counter 52 are compared at index comparison 'a53 every time there is rewriting. If the program executes each module in sequence according to a predetermined route, the contents of the index register 51 that stores the number of the module that has finished execution, and the index counter that indicates the number of index instructions of the module that has actually been executed. The contents of 52 are the same.

このため指標比較器53は不一致信号56を出力しない
Therefore, the index comparator 53 does not output the mismatch signal 56.

プログラムアドレス誤動作の発生によシ、モジュールM
iの実行途中からモジュールMjの実行へ飛んでしまっ
た場合には、モジュールMjの最後部において第1.第
2の指標書込み命令41゜42が実行され、指標レジス
タ51には指標IT+が格納される。一方、この時点ま
で実行したモジュールの第1.第2の指標確認命令の数
はi個であるから、指標カウンタの内容はlit″とな
る。
To prevent program address malfunction, module M
If the execution jumps from the middle of execution of module Mj to the execution of module Mj, the first . The second index write commands 41 and 42 are executed, and the index IT+ is stored in the index register 51. On the other hand, the first module of the module executed up to this point. Since the number of second index confirmation commands is i, the content of the index counter is "lit".

このため指標比軟器53は両者を比較し、不一致情号5
6をCPU57に出力し、これによシ、CPUはプログ
ジムアドレスに誤動作のあった事を検知する。
Therefore, the index ratio softener 53 compares the two, and detects the discrepancy information 5.
6 is output to the CPU 57, and the CPU detects that there is a malfunction in the program address.

以上述べたアドレス誤動作検出の基本動作を基にして、
次に第5図に示したように途中で分岐するグログラムと
、第4図に示したように繰返しループケ持つプロクラム
における実行ルートのチェック機構について説明する。
Based on the basic operation of address malfunction detection described above,
Next, a mechanism for checking the execution route in a program that branches midway as shown in FIG. 5 and in a program having a repeating loop as shown in FIG. 4 will be explained.

分岐して、筐たけ合流して最初に実行するモジュルの先
頭部において前述した第】の指標カウンタ初期化命令4
3と第2の指標カウンタ初期化命令44を実行し、指標
カウンタ52には分岐したプログラム・モジュールの指
標から1を引いた値を曹込む。プログラムがJ胆次実行
されこのモジュールの実行が終了すると、前述した指標
書込み命令によって指標レジスタ51にはこの最初のモ
ジュールの指標値が書込まれ、指標カウンタ52の値は
1つ増加しその結果指標の値に等しくなる。
The index counter initialization instruction 4 mentioned above is executed at the beginning of the module that is branched, merged, and executed first.
3 and the second index counter initialization instruction 44 are executed, and a value obtained by subtracting 1 from the index of the branched program module is stored in the index counter 52. When the program is executed J times and the execution of this module is completed, the index value of this first module is written to the index register 51 by the index write instruction described above, and the value of the index counter 52 is increased by one. equal to the value of the index.

これによシ、以下はプログラムモジュール間に分岐を含
まない場合のプログラムアドレス誤動作チェ72機桁と
同様にして実行ルートがチェックされる。第5図に示す
ように、各指標カウンタ初期化命令による指標カウンタ
52の初期値を異なったものにするならば、並行する実
行ルートの途中で1つのルート刀・ら他のルートへ分岐
する誤動作を検出する事ができる。繰返しループがある
場合。
Accordingly, the execution route is checked in the same manner as the program address malfunction check in the case where there are no branches between program modules. As shown in FIG. 5, if the initial values of the index counters 52 are set differently by each index counter initialization command, a malfunction will occur that will cause branching from one route to another route in the middle of parallel execution routes. can be detected. If you have a repeating loop.

以前実行したモジュールを再実行するために分岐する際
に指標カウンタ初期化命令を実行し、指標カウンタ52
に再実行するプログラム・モジュールの指標1回から1
を引いた値を1−き込む。再実行された最初のプロクラ
ム・モジュールの実行が終了すると、分限の場合と同様
の過程で指標レジスタ51には指標値が畜き込まれ、指
標カウンタ52は指標値に等しい値となっている。これ
によシ、モジュールの繰返しループを含まない場合のプ
ログラムアドレス誤動作検出機構と同様にして実行ルー
トがチェヨクされる。7 次に、正規のルートへ後部するだめの機構について説明
する。不一致信号56を受けたCPU57は、ただちに
アドレス誤動作の処理に移る。この処理においてCPU
57は指標カウンタ52の内容のデータバス58を通じ
て胱出す。これは、プログラムアドレス誤動作が起らな
けれは本来実行ネれているはずのモジュールの番号であ
る。モジュールの番号はモジュールの先頭アドレスと1
対1の対応関係にあるから、CPU57は本来実行すべ
きモジュールの先頭アドレスを読出して、正常な実行ル
ートへ復帰する事ができる。
When branching to re-execute a previously executed module, an index counter initialization instruction is executed, and the index counter 52 is
Index of program modules to be re-executed from 1 to 1
Subtract the value by 1. When the execution of the first re-executed program module is completed, the index value is stored in the index register 51 in the same process as in the case of the minute limit, and the index counter 52 has a value equal to the index value. As a result, the execution route is checked in the same manner as the program address malfunction detection mechanism when the module does not include a repeating loop. 7 Next, we will explain the mechanism that prevents you from returning to the regular route. Upon receiving the mismatch signal 56, the CPU 57 immediately proceeds to address malfunction processing. In this process, the CPU
57 outputs the contents of index counter 52 through data bus 58 . This is the number of the module that would normally have been executed if no program address malfunction had occurred. The module number is the start address of the module and 1
Since there is a one-to-one correspondence relationship, the CPU 57 can read the start address of the module to be executed and return to the normal execution route.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明はプログラムの所定の順査
に従った実行を、プログラム全体に亘シ(lI+、笑に
監視する牛ができる効果を有する。しかも、ちり走が起
きた場合、これを検出して正規のルートへ復起する事が
可能である。このため情報処理装置におけるプログラム
アドレスの誤動作検出方式として有用なもので必シ、特
に、プロセス制御等、使用環境がきひしく、かつ処理順
序が厳密に定められる分野での応用においてその実用効
果がある。
As explained above, the present invention has the advantage of being able to monitor the execution of a program in accordance with a predetermined sequence throughout the entire program. It is possible to detect and restore to the normal route.For this reason, it is useful as a method for detecting program address malfunctions in information processing equipment, and is especially useful in environments where the usage environment is severe, such as in process control, etc. It has practical effects in applications in fields where the processing order is strictly defined.

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

第1図は従来のアドレス誤動作検出回路の一例の回路図
、第2図は従来のアドレス誤動作検出を行えるように構
成したグログラムの一例のフローチャート、第3図乃至
第5図は本発明の実施例に使用するプログラムの第1乃
至第3の構成例を説明するだめのフローチャート、第6
図は本紀1の発明の一実施例のブロック図、第7図は第
6図に示す指標レジスタと指標カウンタに格納される指
数及び計数値の格納状態を説明する図、第8図は本紀2
の発明の実施例に使用するプログラムの指標書込み命令
の構成を示す図、第9図は本紀2の発明の実施例に使用
する指標カウンタ初期化命令の構成を示す図、第10図
は本紀2の発明の一実施例のブロック図である。 1・・・・・・指標発生器、2・・・・・・指標レジス
タ、3・・・・・・指標比較器、11・・・・・・指標
レジスタ、12・・・・・・指標カウンタ、13・・・
・・・指標比較器、14・・・・・・インクリメンタ、
15・・・・・・書込み有効信号、16・・・・・・不
一致信号、17・・・・・・CPU、18・・・・・・
データバス、19・・・・・・アドレスバス、21・・
・・・・指標書込み命令、22・・・・・・指標カウン
タ初期化命令、41・・・・・・第1の指標書込み命令
、42・・・・・・第2の指標書込み命令、43・・・
・・・第1の指標カウンタ初期化命令、44・・・・・
・第2の指標カウンタ初期化命令、51・・・・・・指
標レジスタ、52・・・・・・指標カウンタ、53・・
・・・・指標比較器、54・・・・・・インクリメンタ
155・・・・・・書込み有効信号、56・・・・・・
不一致信号、57・・・・・・CPU、58・・・用デ
ータバス、59・川・・アドレスバス、60・・・・・
・第1の補助レジスタ、61・・・・・・第2の補助レ
ジスタ、62・・・・・・第1比較器、63・・・・・
・第1ゲート、64・・川・第3の補助レジスタ、65
・・・・・・第4の補助レジスタ、66・・・・・・第
2比較器、67・・・・・・第2ゲート、68・・・・
・・初期化有効信号 13図 萬 4 図 筋 5 図 筋 6 図 孝、掴」丈飢、 [ロア■)丁7丁1 詣享紫しシスタ
[]7丁Σ口ロー n )i、’i、 力’+ :、り
↓ 箭l七ジュール実イ1イt[口)]7丁ゴT冨LZ「[
し] 指P!bジスタロ■不汗ロア■玉■口 ノ粁釦・
ルク ↓ 貨ζZしニー験村才麦 [Σ0006)l) 10 1
纜しシスタ[羽]7[丁羽]70王Σ1「=1し運「ア
I 丁旨ルトウシダ! ¥田%ES−ルア打稜[ヨコ]コT羽111Z丁K「ロ
コロ 詣r宋1ノジスク[■7T7[ロア]7T石[l
 丁8棟刀→ンダ身ら 7 し] 萬 〃 口 ↓ 銘 q 図
FIG. 1 is a circuit diagram of an example of a conventional address malfunction detection circuit, FIG. 2 is a flowchart of an example of a program configured to perform conventional address malfunction detection, and FIGS. 3 to 5 are embodiments of the present invention. 6th flowchart for explaining the first to third configuration examples of the program used for
The figure is a block diagram of one embodiment of the invention of this publication, FIG. 7 is a diagram explaining the storage state of the index and count value stored in the index register and index counter shown in FIG. 6, and FIG.
FIG. 9 is a diagram showing the configuration of the index counter initialization instruction used in the embodiment of the invention of this Eki 2, and FIG. 1 is a block diagram of an embodiment of the invention; FIG. 1... Index generator, 2... Index register, 3... Index comparator, 11... Index register, 12... Index Counter, 13...
...Indicator comparator, 14...Incrementer,
15...Write valid signal, 16...Disagreement signal, 17...CPU, 18...
Data bus, 19...Address bus, 21...
... Index write command, 22 ... Index counter initialization command, 41 ... First index write command, 42 ... Second index write command, 43 ...
...First index counter initialization instruction, 44...
- Second index counter initialization instruction, 51... Index register, 52... Index counter, 53...
...Indicator comparator, 54...Incrementer 155...Write valid signal, 56...
Mismatch signal, 57... CPU, 58... data bus, 59... address bus, 60...
・First auxiliary register, 61... Second auxiliary register, 62... First comparator, 63...
- 1st gate, 64... River - 3rd auxiliary register, 65
...Fourth auxiliary register, 66... Second comparator, 67... Second gate, 68...
...Initialization valid signal 13 Figure 萬 4 Figure line 5 Figure line 6 Tuko, grab 'Jiki, [Roa ■) Ding 7 Ding 1 Prayer purple sister [] 7 Ding Σ mouth low n) i, 'i , 力'+ :, ri↓ 箭l7joules                                
] Finger P! b Jistaro ■ Non-sweat Roa ■ Ball ■ Mouth Nokabuton・
↓ Money ζZ Shiney Kenmura Saimu [Σ0006)l) 10 1
Shinshi Sista [Feather] 7 [Chobe Feather] 70 King Σ1 ``=1 Shi Luck ``A I Ding Shirutoushida! [■7T7 [Loa] 7T stone [l
8 mung sword → Nanda body 7 shi] 〃 口↓ Inscription q Diagram

Claims (1)

【特許請求の範囲】[Claims] 1.プログラムを分割可能な単位のモジュールに分割し
、前記モジュール毎に実行順に対応した固有の指標と、
指標情報として前記固有の指標を備えた指標確認命令を
設け、前記指標確認命令の実行によシ前記指標確認命令
内の前記指標情報としての前記固有指標を第1の指標と
して保持する第1の指標記憶手段と、前記指標確認命令
の実行を検知して第2の指標を発生する指標発生回路と
、前記第2の指標を保持する第2の指標記憶手段と、前
記第1の指標記憶手段内の実際−実行された前記モジュ
ールの固有指標に対応する前記第1の指標と、前記第2
の指標記憶手段内の前記プログラムの構成上実行される
べき前記モジュールの固有指標に対応する前記第2の指
標とを比較する事によシ、前記プログラムのアドレス誤
動作を検出する指標比較手段とを含むことを特徴とする
プログラムアドレス誤動作検出方式。 2、プログラムを分割可能な単位モジュールに分割し、
前記モジュール毎に実行順に対応した固有の指標と、指
標情報として前記固有の指標を備えた第1の指標確認命
令と第2の指標確認命令を設け、前記第1の指標確認命
令の実行によシ前記第1の指標確認命令内の指標情報を
保持する第1の補助レジスタと、前記第2の指標確認命
令の実行によシ前記第2の指標確認命令内の指標情報を
保持する第2の補助レジスタと、前記第1の補助レジス
タの内容と前記第2の補助レジスタの内容によシ第1の
判定信号を出力する第1の条件判定回路と、前記第1の
条件判定回路から出力される前記第1の判定信号を受け
て前記第1の指標確認命令内の指標情報と前記第2の指
標確認命令内の指標情報から前記モジュールの固有指標
を第1の指標として保持する第1の指標記憶手段と、前
記第1の判定信号を受けて前記第1の指標記憶手段の前
記第1の指標の保持を検知して第2の指標を発生する指
標発生回路と、前記第2の指標を保持する第2の指標記
憶手段と、第1の指標書換え命令によって書込み動作が
行なわれる第3の補助レジスタと、第2の指標書換え命
令によって書込み動作が行なわれる第4の補助レジスチ
と、前記第3の補助レジスタの内容と前記−第4の補助
レジスタの内容によシ彫2の判定信号を出力する第2の
条件判定回路と、前記第2の判定信号を受けて前記第3
の補助レジスタの内容と前記第4の補助レジスタの内容
によシ前記第2の指標記憶手段の内容を書換える手段と
、前記第1の指標記憶手段内の実際に実行された前記モ
ジュールの固有指標に対応する前記第1の指標と、前記
第2の指標記憶手段内の前記プログラムの構成上実行さ
れるべき前記モジュールの固有指標に対応する前記第2
の指標を比較する事によシ前記プログラムのアドレス誤
動作を検出する指標比較手段とを含むことを特徴とする
プログラムアドレス誤動作検出方式。
1. Divide the program into divisible units of modules, and provide a unique index corresponding to the execution order for each module;
An index confirmation command including the unique index as index information is provided, and upon execution of the index confirmation command, a first index that holds the unique index as the index information in the index confirmation command as a first index is provided. an index storage means, an index generation circuit that detects execution of the index confirmation command and generates a second index, a second index storage means that holds the second index, and the first index storage means. the first index corresponding to the specific index of the actual-executed module within; and the second index.
index comparison means for detecting an address malfunction of the program by comparing the index with the second index corresponding to the unique index of the module to be executed based on the configuration of the program in the index storage means of the program; A program address malfunction detection method characterized by comprising: 2. Divide the program into divisible unit modules,
A unique index corresponding to the execution order for each module, and a first index confirmation command and a second index confirmation command each having the unique index as index information are provided, and the execution of the first index confirmation command A first auxiliary register that holds index information in the first index check instruction; and a second auxiliary register that holds index information in the second index check instruction upon execution of the second index check instruction. an auxiliary register; a first condition determination circuit that outputs a first determination signal depending on the contents of the first auxiliary register and the second auxiliary register; and an output from the first condition determination circuit. a first determination signal that receives the first determination signal and holds the unique index of the module as a first index from the index information in the first index confirmation command and the index information in the second index confirmation command; an index storage means, an index generation circuit that receives the first determination signal, detects retention of the first index in the first index storage means, and generates a second index; a second index storage means for holding an index; a third auxiliary register in which a write operation is performed in response to a first index rewrite instruction; and a fourth auxiliary register in which a write operation is performed in response to a second index rewrite instruction; a second condition determining circuit that outputs a second determination signal based on the contents of the third auxiliary register and the fourth auxiliary register;
means for rewriting the contents of the second index storage means according to the contents of the auxiliary register and the contents of the fourth auxiliary register; the first index corresponding to the index; and the second index corresponding to the unique index of the module to be executed due to the configuration of the program in the second index storage means.
and index comparison means for detecting address malfunctions in the program by comparing indices of the program address malfunctions.
JP58137034A 1983-07-27 1983-07-27 Program address malfunction detection system Granted JPS6027952A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58137034A JPS6027952A (en) 1983-07-27 1983-07-27 Program address malfunction detection system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58137034A JPS6027952A (en) 1983-07-27 1983-07-27 Program address malfunction detection system

Publications (2)

Publication Number Publication Date
JPS6027952A true JPS6027952A (en) 1985-02-13
JPS6355087B2 JPS6355087B2 (en) 1988-11-01

Family

ID=15189299

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58137034A Granted JPS6027952A (en) 1983-07-27 1983-07-27 Program address malfunction detection system

Country Status (1)

Country Link
JP (1) JPS6027952A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5287336A (en) * 1976-01-16 1977-07-21 Toshiba Corp Erroneous operation detecting circuit for program addressing
JPS5418641A (en) * 1977-07-13 1979-02-10 Hitachi Ltd Program runaway preventing method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5287336A (en) * 1976-01-16 1977-07-21 Toshiba Corp Erroneous operation detecting circuit for program addressing
JPS5418641A (en) * 1977-07-13 1979-02-10 Hitachi Ltd Program runaway preventing method

Also Published As

Publication number Publication date
JPS6355087B2 (en) 1988-11-01

Similar Documents

Publication Publication Date Title
US4429368A (en) Microprogram-testing apparatus
US3673573A (en) Computer with program tracing facility
CA1218748A (en) Method and apparatus for self-testing of floating point accelerator processors
JPS62173696A (en) Information memorizing/reading system
JPS62182954A (en) Data processing apparatus and method containing memory with coincidence circuit
JPS6027952A (en) Program address malfunction detection system
JPS603045A (en) Detector for program address malfunction
US4410988A (en) Out of cycle error correction apparatus
JPS63193237A (en) Semiconductor integrated circuit device
US11403108B2 (en) Exception handling
US11263017B2 (en) Exception register delay
US20230315612A1 (en) In-circuit emulator device
JPH01125633A (en) System for debugging multi-processing system
JPS60142747A (en) Instruction execution control system
JPS5939777B2 (en) control storage
JPS58154043A (en) Information processor
JPH0335327A (en) Majority decision fault processor
JPS60175148A (en) Instruction prefetching device
US20060041791A1 (en) Hardware assist for microcode tracing
JPS58103047A (en) Instruction tracing device
SU926724A2 (en) Storage testing device
JPH02284248A (en) Memory contents checking method
JPS58215799A (en) System for verifying control storage
JPS608962A (en) Temporary fault detecting system of storage information
JPS5936853A (en) Operation processor