JPS61170832A - Abnormality detecting system of program execution sequence - Google Patents

Abnormality detecting system of program execution sequence

Info

Publication number
JPS61170832A
JPS61170832A JP60011612A JP1161285A JPS61170832A JP S61170832 A JPS61170832 A JP S61170832A JP 60011612 A JP60011612 A JP 60011612A JP 1161285 A JP1161285 A JP 1161285A JP S61170832 A JPS61170832 A JP S61170832A
Authority
JP
Japan
Prior art keywords
instruction
value
counter
branch
operand
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
JP60011612A
Other languages
Japanese (ja)
Inventor
Tadashi Kaneko
正 金古
Toru Otsu
徹 大津
Mikio Uehara
幹生 上原
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP60011612A priority Critical patent/JPS61170832A/en
Publication of JPS61170832A publication Critical patent/JPS61170832A/en
Pending 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 detect the abnormality of an execution sequence by a central processor itself by comparing the value of an instruction counter with an operand value of a branch instruction at the fetch of the branch instruction to execute branch processing or abnormality processing. CONSTITUTION:The central processor 1 for detecting the abnormality of an execution sequence of a program is constituted of a control part 2, a program counter 3, an address register 4, an instruction execution part 5, a data register 6, an instruction analyzing part 7, and an instruction register 8 and an instruction counter 9 and a comparison part 10 are added to said units. When the central processor 1 fetches an instruction in the register 8 at a reset time, the instruction execution part 5 is actuated through the instruction analyzing part 7. If the instruction is a branch instruction, an operand is written in the register 8, the value of the counter 9 is compared with that of the register 8 by the comparison part 10, and when both the values coincide with each other, the branch processing is executed. At the time of dissidence, the abnormality is informed to the control part 2 to execute the abnormality processing.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、逐次処理型計算機において、ノイズやソフト
ウェアのバグにより意図したプログラム・シーケンス通
りの処理が実行されない場合、これを検出できるように
したプログラム実行シーケンス異常検出方式に関するも
のである。
[Detailed Description of the Invention] [Industrial Application Field] The present invention makes it possible to detect when the intended program sequence is not executed due to noise or software bugs in a sequential processing computer. This invention relates to a program execution sequence abnormality detection method.

〔従来技術と問題点〕[Prior art and problems]

逐次処理型計算機では、一般にプログラムを先頭から順
番に実行して行く。例外としてジャンプ命令やサブルー
チン・コール命令、リターン命令等があり、これらの命
令を使用して命令を飛ばしたり、繰り返して同じルーチ
ンを実行したりすることが出来る。成るプログラムの実
行シーケンスがノイズやソフトウェアのバグにより狂っ
た場合、中央処理装置の暴走やプログラムの実行不良が
発生する。これを検出できればそこで実行をストップす
る等の対策を講することが出来るが、検出できないと重
大な障害に繋がることもある。また、このような異常が
常に起きれば発見や調査がし易いが、再現性がないため
(例えばノイズが原因で起こる場合)や特別の条件が重
なったときに起こる場合(稀なソフトウェア・バグ)な
どは発見が非常に困難である。従来、このような異常を
検出する手段としてトレース機能等があるが、中央処理
装置自身では実行シーケンスが異常であるか否かを判断
できないので、再現性の少ない異常動作に対しては十分
機能していなかった。
In a sequential processing computer, programs are generally executed sequentially from the beginning. Exceptions include jump instructions, subroutine call instructions, return instructions, etc. These instructions can be used to skip instructions or repeatedly execute the same routine. If the execution sequence of a program is disrupted by noise or software bugs, the central processing unit may run out of control or the program may malfunction. If this can be detected, countermeasures such as stopping execution can be taken, but if this cannot be detected, it may lead to serious failures. In addition, if such abnormalities occur all the time, they are easy to discover and investigate, but if they are not reproducible (for example, caused by noise) or occur under special conditions (rare software bugs). etc. are extremely difficult to discover. Traditionally, trace functions have been used as a means of detecting such abnormalities, but since the central processing unit itself cannot determine whether the execution sequence is abnormal or not, it does not function well for abnormal operations with low reproducibility. It wasn't.

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

本発明は、上記の考察に基づくものであって、中央処理
装置自身で実行シーケンスの異常を検出出来るようにし
たプログラム実行シーケンス異常検出方式を提供するこ
とを目的としている。
The present invention is based on the above consideration, and an object of the present invention is to provide a program execution sequence abnormality detection method that allows the central processing unit itself to detect abnormalities in the execution sequence.

〔目的を達成するための手段〕[Means to achieve the purpose]

そしてそのため本発明のプログラム実行シーケンス異常
検出方式は、逐次処理型計算機におけるプログラム実行
シーケンス異常検出方式であって、命令が実行される毎
に単位量ずつその値が更新される命令カウンタを有する
と共に、メモリの中に、命令数が記入されたオペランド
を持つ分岐命令及び命令数が記入されたオペランドを持
つ合流命令を有するプログラムを格納し、且つ中央処理
装置は、上記分岐命令をフェッチした時、上記命令カウ
ンタの値と当該分岐命令のオペランドの値とを比較し、
両者が一致していたならば上記命令カウンタをクリアし
次いで分岐処理を行い、命令カウンタの値とオペランド
の値が一致しない場合には異常処理を行うように構成さ
れ、上記合流命令をフエ・チした時・上記命令カラ′り
の値が0でな     lければ、上記命令カウンタの
値と合流命令のオペランドの値を比較し、両者が一致し
ていれば上記命令カウンタをクリアして次の命令を実行
し、両者が一致していなければ異常処理を行い、上記命
令カウンタの値が0であれば次の命令を実行するように
構成されていることを特徴とするものである。
Therefore, the program execution sequence abnormality detection method of the present invention is a program execution sequence abnormality detection method for a sequential processing computer, and includes an instruction counter whose value is updated by a unit amount each time an instruction is executed. A program having a branch instruction having an operand in which the number of instructions is written and a confluence instruction having an operand in which the number of instructions is written is stored in the memory, and when the central processing unit fetches the branch instruction, the central processing unit executes the above instruction. Compare the value of the instruction counter and the value of the operand of the branch instruction,
If the two match, the instruction counter is cleared and branch processing is performed, and if the instruction counter value and the operand value do not match, abnormal processing is performed. If the value of the instruction counter is not 0, compare the value of the instruction counter with the operand value of the confluence instruction, and if they match, clear the instruction counter and execute the next instruction. It is characterized in that it is configured to execute an instruction, perform abnormal processing if the two do not match, and execute the next instruction if the value of the instruction counter is 0.

〔発明の実施例〕[Embodiments of the invention]

以下、本発明を図面を参照しつつ説明する。まず、プロ
グラムをシーケンシャルに実行される部分、ジャンプ命
令、サブルーチン・コール命令及びリターン命令に分け
る。第1図及び第2図はシーケンシャルに実行されるプ
ログラム部分の実行異常検出方式を説明する図である。
Hereinafter, the present invention will be explained with reference to the drawings. First, the program is divided into sequentially executed parts, jump instructions, subroutine call instructions, and return instructions. FIGS. 1 and 2 are diagrams illustrating an execution abnormality detection method for sequentially executed program portions.

シーケンシャルに実行される部分の異常の原因は、プロ
グラム・カウンタの誤動作が考えられる。そこで、シー
ケンシャルに実行される部分の命令数と実際に実行され
た命令の数とを比較し、実行シーケンスの異常を検出す
る。これを実現するために、命令カウンタを設け、シー
ケンシャルに実行される部分の先頭に“開始命令”を、
シーケンシャルに実行される部分の後ろに“終了命令”
を配置する。終了命令には、オペランドとしてシーケン
シャルに実行される部分の命令の数を入れておく。中央
処理装置は開始命令をフェッチすると命令カウンタをク
リアし、それから順次1命令を実行する度に命令カウン
タを+1し、終了命令をフェッチするど、命令カウンタ
の値とオペランドの値を比較する。一致していなければ
、実行シーケンスの異常であると判断し、異常処理を行
う。第1図はシーケンシャルに実行される部分が正常に
実行された場合を示す図である。命令AないしFがシー
ケンシャルに実行される部分、であり、命令Aの前に開
始命令が、命令Fの後ろに終了命令が配置されている。
The cause of the abnormality in the sequentially executed portion may be a malfunction of the program counter. Therefore, the number of instructions in the sequentially executed portion is compared with the number of actually executed instructions to detect an abnormality in the execution sequence. To achieve this, an instruction counter is provided, and a "start instruction" is placed at the beginning of the sequentially executed part.
“Termination instruction” after the part that is executed sequentially
Place. The number of instructions to be sequentially executed is stored in the end instruction as an operand. When the central processing unit fetches the start instruction, it clears the instruction counter, then increments the instruction counter by 1 each time it sequentially executes one instruction, and compares the value of the instruction counter with the value of the operand when fetching the end instruction. If they do not match, it is determined that there is an abnormality in the execution sequence, and the abnormality processing is performed. FIG. 1 is a diagram showing a case where the sequentially executed portion is executed normally. This is a part in which instructions A to F are executed sequentially, with a start instruction placed before instruction A, and an end instruction placed after instruction F.

開始命令によって、命令カウンタが0クリアされ、以下
、命令A、B、C・・・が実行される度に命令カウンタ
の値は+1される。終了命令をフェッチすると、中央処
理装置は、命令カウンタの値と終了命令のオペランドの
値を比較する。この場合は、両者が一致するので、命令
Fの次の命令が直ちに実行される。第2図(al及び(
b)はシーケンシャルに実行される部分が正常に実行さ
れなかった場合を示す図である。第2図+8)は命令が
A、 B。
The instruction counter is cleared to 0 by the start instruction, and thereafter, the value of the instruction counter is incremented by 1 each time instructions A, B, C, . . . are executed. Upon fetching the termination instruction, the central processing unit compares the value of the instruction counter with the value of the operand of the termination instruction. In this case, since they match, the instruction following instruction F is immediately executed. Figure 2 (al and (
b) is a diagram showing a case where the sequentially executed portion is not executed normally. In Figure 2 +8), the instructions are A and B.

C・・・、Fと実行されるべき所、命令カウンタのエラ
ーでA、B、C,Fと実行された場合を示す。
It shows the case where C..., F should be executed, and A, B, C, F are executed due to an error in the instruction counter.

この場合には、終了命令のオペランドの値と命令カウン
タの値とは一致しない。第2図(b)は、命令がA、B
、C・・・、Fと実行されるべき所、A、B。
In this case, the operand value of the end instruction and the instruction counter value do not match. In Fig. 2(b), the instructions are A and B.
, C..., F and where to be executed, A, B.

Y、zと実行された場合を示す。この場合も終了命令の
オペランドの値と命令カウンタの値は一致しない。
The cases where Y and z are executed are shown. In this case as well, the operand value of the end instruction and the instruction counter value do not match.

第3図は分岐命令(ジャンプ、サブルーチン・コール、
リターン)の実行シーケンスの異常検出方式を説明する
図である0分岐命令の実行シーケンス異常には次のよう
な原因が考えられる。
Figure 3 shows branch instructions (jump, subroutine call,
The following are possible causes of an abnormality in the execution sequence of a 0 branch instruction.

+8>  ハードウェアの誤動作や番地算出のソフトウ
ェア・バグ等による分岐先番地の異常。
+8> An abnormality in the branch destination address due to hardware malfunction or address calculation software bug.

(bl  本来分岐命令でない命令の分岐命令への化け
(bl An instruction that is not originally a branch instruction becomes a branch instruction.

ジャンプ命令の実行シーケンス異常を検出するために、
分岐は必ず開始命令へ行き、且つ分岐によって合流され
るプログラムでは合流される番地の開始命令の直前に終
了命令を置く。こうすることによって開始命令以外に分
岐した場合、実行シーケンスの異常が検出できる。さら
に実行シーケンス異常によって分岐命令以外から開始命
令に実行が移ってしまった場合、これを検出するために
開始命令をフェッチした時の命令カウンタの値が“0”
であれば異常なし、′0”以外であれば実行シーケンス
異常であると判断する機能を開始命令に付加する。即ち
、分岐が終了命令−分岐命令−開始命令と正常に行われ
た場合、開始命令をフェッチした時の命令カウンタの値
は“0”になっている筈である。但し、終了命令、分岐
命令、開始命令はカウントしない。第3図の実線の矢印
は正常ジャンプを示し、点線の矢印は異常ジャンプを示
す。
In order to detect abnormalities in the execution sequence of jump instructions,
A branch always goes to the start instruction, and in programs that are merged by a branch, the end instruction is placed immediately before the start instruction at the address to be merged. By doing this, an abnormality in the execution sequence can be detected if a branch is made to an instruction other than the start instruction. Furthermore, if execution moves from a non-branch instruction to a start instruction due to an execution sequence error, the value of the instruction counter when the start instruction is fetched to detect this is "0".
A function is added to the start instruction that determines that there is no abnormality if it is, and that there is an abnormality in the execution sequence if it is other than '0'.In other words, if the branch is normally executed from the end instruction to the branch instruction to the start instruction, the start instruction The value of the instruction counter when an instruction is fetched should be "0".However, end instructions, branch instructions, and start instructions are not counted.The solid line arrow in Figure 3 indicates a normal jump, and the dotted line indicates a normal jump. The arrow indicates an abnormal jump.

第4図(a)はサブルーチン・コール命令及びリターン
命令の異常検出方式を説明する図、第4図中)は分岐命
令以外から開始命令に分岐した場合を説明する図である
FIG. 4(a) is a diagram illustrating an abnormality detection method for subroutine call instructions and return instructions, and FIG.

上述した実行シーケンス異常検出命令(開始台    
  I令、終了命令、分岐命令)は単機能のものである
が、分岐命令でシーケンシャルな実行部分は打ち切りに
なり、分岐する場合は分岐先で、分岐しない場合は分岐
命令の次から新たにシーケンシャルな実行部分が開始さ
れると考えられるので、分岐命令に終了命令、開始命令
の機能を持たせることが出来る。また、分岐先では合流
される方のプログラムは、そこでシーケンシャルな実行
部分が打ち切りになり、分岐先の次から新たにシーケン
シャルな実行部分が開始されると考えられるので、分岐
先の終了命令、開始命令の機能を1つにして合流命令と
することが出来る。
The above execution sequence abnormality detection command (starting block)
I instructions, end instructions, branch instructions) have a single function, but the sequential execution part is aborted by a branch instruction, and if a branch is taken, a new sequential execution is executed at the branch destination, and if not branched, a new sequential execution part is executed after the branch instruction. Since the execution part is considered to be started, the branch instruction can have the functions of an end instruction and a start instruction. In addition, in the program that is joined at the branch destination, it is thought that the sequential execution part will be aborted there and a new sequential execution part will start after the branch destination. The functions of the commands can be combined into a merge command.

このように考えると、本発明を実現するための最低必要
な構成は、下記のようになる。
Considering this, the minimum necessary configuration for realizing the present invention is as follows.

(a)  1命令を実行する毎に+1される命令カウン
タを有すること。
(a) It has an instruction counter that is incremented by 1 every time one instruction is executed.

山) リセットにより命令カウンタをクリアする機能を
有すること。
(mountain) Must have a function to clear the instruction counter by resetting it.

(C1第1オペランドとして直前に存在するシーケンシ
ャルな実行部分に含まれる命令の数を持ち、命令カウン
タの値と第1オペランドの値を比較して一致したならば
、命令カウンタをクリアし且つ分岐条件が満足されたな
らば飛び先番地へ飛び、分岐条件が満足されなければ次
の命令を実行し、第1オペランドの値と命令カウンタの
値が一致しなければ、異常処理を行う分岐命令を有する
こと。
(C1 has the number of instructions included in the immediately preceding sequential execution part as the first operand, and if the value of the instruction counter and the value of the first operand match, clear the instruction counter and set the branch condition. It has a branch instruction that jumps to the destination address if the condition is satisfied, executes the next instruction if the branch condition is not satisfied, and performs abnormal processing if the value of the first operand and the value of the instruction counter do not match. thing.

分岐命令とはジャンプ命令、サブルーチン・コール命令
、リターン命令を含む概念である。
A branch instruction is a concept that includes jump instructions, subroutine call instructions, and return instructions.

(d)  オペランドとして直前に存在するシーケンシ
ャルな実行部分に含まれる命令の数を持ち、命令カウン
タの値が“0”であれば何もしないで次の番地に進み、
“O”でなければ命令カウンタの値とオペランドの値を
比較し、一致したならば、命令カウンタをクリアして次
の番地へ進み、一致しなければ、異常処理を行う“合流
命令”を有すること。
(d) It has the number of instructions included in the immediately preceding sequential execution part as an operand, and if the value of the instruction counter is "0", do nothing and proceed to the next address;
If it is not "O", it compares the value of the instruction counter with the value of the operand, and if they match, clear the instruction counter and proceed to the next address; if they do not match, it has a "merging instruction" that performs abnormal processing. thing.

第5図は上記のような本発明の分岐命令及び合流命令を
持つプログラムの1例を示す図である。
FIG. 5 is a diagram showing an example of a program having a branch instruction and a confluence instruction according to the present invention as described above.

第5図において、命令人ないしFはシーケンシャルに実
行される部分であり、命令Fの後に条件付分岐命令が配
置されている。この条件付分岐命令の第1オペランドに
は“6″が記入されている。
In FIG. 5, instructions F are sequentially executed parts, and a conditional branch instruction is placed after instruction F. "6" is written in the first operand of this conditional branch instruction.

命令Gないし■もシーケンシャルに実行される部分であ
る。命令Iの後に条件付分岐命令が配置されている。こ
の条件付分岐命令の後に命令Jが配置され、命令Jの後
にオペランドに“1″が記入された合流命令が配置され
、この後に命令にないしNが配置される。命令にないし
Nはシーケンシャルに実行される部分である。命令Nの
後にオペランドに4″が記入された合流命令が配置され
、この合流命令の後に命令OとPが配置され、命令Pの
後に第1オペランドが“2”の条件付分岐命令が配置さ
れ、この条件付分岐命令の後に命令QないしSが配置さ
れる。
Instructions G to (2) are also executed sequentially. A conditional branch instruction is placed after instruction I. After this conditional branch instruction, instruction J is placed, after instruction J, a confluence instruction with "1" written in the operand is placed, and after this, instructions to N are placed. N to N in the command are parts that are executed sequentially. A confluence instruction with an operand of 4'' is placed after the instruction N, instructions O and P are placed after the confluence instruction, and a conditional branch instruction whose first operand is ``2'' is placed after the instruction P. , instructions Q to S are placed after this conditional branch instruction.

命令AないしFが実行されると、命令カウンタの値は“
6”となり、命令Fの次の分岐命令が実行されると命令
カウンタの値とこの分岐命令の第1オペランドの値が比
較され、この場合は一致するので、命令カウンタの値は
0クリアされ、分岐条件が成立するか否かが調べられる
。この場合は分岐条件は成立しないので命令Gが実行さ
れ、続いて命令H,Iが実行される。命令■が実行され
ると、命令カウンタの値は“3”となる。命令Iの後の
条件付分岐命令が実行されると、命令カウンタの値とこ
の分岐命令の第1オペランドの値が比較される。この場
合も両者は一致するので、命令カウンタは0クリアされ
、分岐条件が成立するか否かが調べられる。この場合は
分岐条件が成立するので、命令Nの次の合流命令がフェ
ッチされる。この場合、命令カウンタの値は“O”であ
るので、この合流命令のオペランドの値と命令カウンタ
の値との比較は行われない。続いて命令O1Pが実行さ
れる。命令Pが実行されると、命令カウンタの値は“2
”となる。命令Pの次に分岐命令が実行されるが、この
ときの命令カウンタの値と分岐命令の第1オペランドの
値は一致するので命令カウンタは0クリアされ、分岐条
件が成立するか否かが調べられる。分岐条件が成立する
と、命令Nの次の合流命令に飛び、以下、同様な処理h
<HD) iL’t1.5>@:l’Fh<tcfLL
ftイht 4 h、   −命令Q、R,Sが実行さ
れる。
When instructions A to F are executed, the value of the instruction counter becomes “
6", and when the next branch instruction after instruction F is executed, the value of the instruction counter is compared with the value of the first operand of this branch instruction. In this case, since they match, the value of the instruction counter is cleared to 0, It is checked whether the branch condition is satisfied or not. In this case, the branch condition is not satisfied, so instruction G is executed, followed by instructions H and I. When instruction ■ is executed, the value of the instruction counter is becomes "3". When the conditional branch instruction after instruction I is executed, the value of the instruction counter and the value of the first operand of this branch instruction are compared. In this case as well, since the two match, The instruction counter is cleared to 0, and it is checked whether the branch condition is met. In this case, the branch condition is met, so the next confluence instruction after instruction N is fetched. In this case, the value of the instruction counter is “ O", the operand value of this confluence instruction is not compared with the instruction counter value. Next, instruction O1P is executed. When instruction P is executed, the instruction counter value becomes "2.
”.A branch instruction is executed next to instruction P, but since the value of the instruction counter at this time and the value of the first operand of the branch instruction match, the instruction counter is cleared to 0 and the branch condition is met. If the branch condition is met, the process jumps to the next confluence instruction of instruction N, and the same process h
<HD) iL't1.5>@:l'Fh<tcfLL
ft 4 h, - Instructions Q, R, and S are executed.

第6図は本発明を実施するための中央処理装置の1実施
例構成を示す図である。第6図において、1は中央処理
装置、2は制御部、3はプログラム・力りンタ、4はア
ドレス・レジスタ、5は命令実行部、6はデータ・レジ
スタ、7は命令解析部、8は命令レジスタ、9は命令カ
ウンタ、lOは比較部をそれぞれ示している。命令カウ
ンタ9及び比較部10が本発明を実現するために追加さ
れた部分である。リセット時、制御部2の指令によって
命令カウンタ9をクリアする。中央処理装置1が命令レ
ジスタ8に命令をフェッチすると、命令解析部7により
命令を解析して命令実行部5に決められた動作をするよ
うに指示する。この時、命令が分岐命令、合流命令以外
であれば命令カウンタ9の値を1つ増加する動作を行う
。命令が分岐命令であれば命令レジスタ8にオペランド
を読み込み、命令カウンタ9の値と命令レジスタ8の値
を比較部IO・で比較し、一致すれば命令カウンタ9を
クリアし、分岐処理を行う。一致しない場合は異常を制
御部2に通知し、制御部2は異常処理を行う。
FIG. 6 is a diagram showing one embodiment of the configuration of a central processing unit for carrying out the present invention. In FIG. 6, 1 is a central processing unit, 2 is a control unit, 3 is a program/printer, 4 is an address register, 5 is an instruction execution unit, 6 is a data register, 7 is an instruction analysis unit, and 8 is a 9 indicates an instruction register, 9 indicates an instruction counter, and 10 indicates a comparison unit. An instruction counter 9 and a comparator 10 are parts added to realize the present invention. At the time of reset, the command counter 9 is cleared by a command from the control section 2. When the central processing unit 1 fetches an instruction into the instruction register 8, the instruction analysis section 7 analyzes the instruction and instructs the instruction execution section 5 to perform a predetermined operation. At this time, if the instruction is other than a branch instruction or a confluence instruction, an operation is performed to increase the value of the instruction counter 9 by one. If the instruction is a branch instruction, the operand is read into the instruction register 8, the value of the instruction counter 9 and the value of the instruction register 8 are compared by the comparison unit IO.If they match, the instruction counter 9 is cleared and branch processing is performed. If they do not match, the abnormality is notified to the control unit 2, and the control unit 2 performs abnormality processing.

命令が合流命令であれば、まず命令カウンタ9の値が“
0”であるか否かを比較部10で検査し、“0”であれ
ば次の命令の実行に移る。もし、“0”でなければ、さ
らに合流命令のオペランドを命令レジスタ8に読み込み
、命令カウンタ9の値と命令レジスタ8の値を比較部1
0で比較し、一致すれば命令カウンタ、9をクリアして
次の命令の実行に移る。一致しない場合は、異常を制御
部2に通知し、制御部2は異常処理を行う。
If the instruction is a merge instruction, first the value of instruction counter 9 is “
The comparator 10 checks whether it is "0", and if it is "0", the next instruction is executed. If it is not "0", the operand of the confluence instruction is further read into the instruction register 8, Comparing unit 1 compares the value of instruction counter 9 and the value of instruction register 8.
They are compared with 0, and if they match, the instruction counter 9 is cleared and the next instruction is executed. If they do not match, the abnormality is notified to the control unit 2, and the control unit 2 performs abnormality processing.

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

以上の説明から明らかなように、本発明によれは、プロ
グラムの実行シーケンスの異常を中央処理装置自身で検
出することが出来る。
As is clear from the above description, according to the present invention, an abnormality in the program execution sequence can be detected by the central processing unit itself.

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

第1図及び第2図はシーケンシャルに実行されるプログ
ラム部分の実行異常検出方式を説明する図、第3図はジ
ャンプ命令の実行シーケンスの異常検出方式を説明する
図、第4図はサブルーチン・コール命令及びリターン命
令の異常検出方式を説明する図、第5図は本発明の分岐
命令及び合流命令を持つプログラムの1例を示す図、第
6図は本発明を実施するための中央処理装置の1実施例
構成を示す図である。 ■・・・中央処理装置、2・・・制御部、3・・・プロ
グラム・カウンタ、4・・・アドレス・レジスタ、5・
・・命令実行部、6・・・データ・レジスタ、7・・・
命令解析部、8・・・命令レジスタ、9・・・命令カウ
ンタ、10・・・比較部。
Figures 1 and 2 are diagrams for explaining the execution abnormality detection method for sequentially executed program parts, Figure 3 is a diagram for explaining the abnormality detection method for the execution sequence of jump instructions, and Figure 4 is for subroutine calls. 5 is a diagram illustrating an abnormality detection method for instructions and return instructions, FIG. 5 is a diagram illustrating an example of a program having a branch instruction and a confluence instruction according to the present invention, and FIG. 6 is a diagram illustrating a central processing unit for implementing the present invention. FIG. 1 is a diagram showing the configuration of a first embodiment. ■...Central processing unit, 2...Control unit, 3...Program counter, 4...Address register, 5...
...Instruction execution unit, 6...Data register, 7...
Instruction analysis section, 8. Instruction register, 9. Instruction counter, 10. Comparison section.

Claims (1)

【特許請求の範囲】[Claims] 逐次処理型計算機におけるプログラム実行シーケンス異
常検出方式であって、命令が実行される毎に単位量ずつ
その値が更新される命令カウンタを有すると共に、メモ
リの中に、命令数が記入されたオペランドを持つ分岐命
令及び命令数が記入されたオペランドを持つ合流命令を
有するプログラムを格納し、且つ中央処理装置は、上記
分岐命令をフェッチした時、上記命令カウンタの値と当
該分岐命令のオペランドの値とを比較し、両者が一致し
ていたならば上記命令カウンタをクリアし次いで分岐処
理を行い、命令カウンタの値とオペランドの値が一致し
ない場合には異常処理を行うように構成され、上記合流
命令をフェッチした時、上記命令カウンタの値が0でな
ければ、上記命令カウンタの値と合流命令のオペランド
の値を比較し、両者が一致していれば上記命令カウンタ
をクリアして次の命令を実行し、両者が一致していなけ
れば異常処理を行い、上記命令カウンタの値が0であれ
ば次の命令を実行するように構成されていることを特徴
とするプログラム実行シーケンス異常検出方式。
This is a program execution sequence abnormality detection method for a sequential processing computer, which has an instruction counter whose value is updated by a unit amount each time an instruction is executed, and an operand in which the number of instructions is written in the memory. A program is stored that has a branch instruction and a confluence instruction having an operand in which the number of instructions is written, and when the central processing unit fetches the branch instruction, the central processing unit fetches the value of the instruction counter and the value of the operand of the branch instruction. If the two match, the instruction counter is cleared and branch processing is performed, and if the instruction counter value and the operand value do not match, abnormal processing is performed. When fetching, if the value of the instruction counter is not 0, compare the value of the instruction counter with the operand value of the confluence instruction, and if they match, clear the instruction counter and execute the next instruction. A program execution sequence abnormality detection system characterized in that the program execution sequence abnormality detection method is configured to perform abnormal processing if the two do not match, and to execute the next instruction if the value of the instruction counter is 0.
JP60011612A 1985-01-24 1985-01-24 Abnormality detecting system of program execution sequence Pending JPS61170832A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60011612A JPS61170832A (en) 1985-01-24 1985-01-24 Abnormality detecting system of program execution sequence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60011612A JPS61170832A (en) 1985-01-24 1985-01-24 Abnormality detecting system of program execution sequence

Publications (1)

Publication Number Publication Date
JPS61170832A true JPS61170832A (en) 1986-08-01

Family

ID=11782731

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60011612A Pending JPS61170832A (en) 1985-01-24 1985-01-24 Abnormality detecting system of program execution sequence

Country Status (1)

Country Link
JP (1) JPS61170832A (en)

Similar Documents

Publication Publication Date Title
US5379301A (en) Microprocessor for debugging programs
US5109381A (en) Apparatus and method for detecting errors in a pipeline data processor
US5551051A (en) Isolated multiprocessing system having tracking circuit for verifyng only that the processor is executing set of entry instructions upon initiation of the system controller program
US5283891A (en) Error information saving apparatus of computer
JPS61170832A (en) Abnormality detecting system of program execution sequence
US20050050524A1 (en) Generating software test information
EP0417916B1 (en) Procedure state descriptor system for digital data processors
US10747647B2 (en) Method, apparatus and system for diagnosing a processor executing a stream of instructions
JP2531791B2 (en) Abnormality handling method when accessing Fetch
JPH05216721A (en) Electronic computer
KR102461532B1 (en) Program Control Flow Graph Build System and Method
EP0525672A2 (en) Microprocessor with program tracing
JP2002116926A (en) Program processor and program processing method
JPH0540668A (en) Program runaway preventing system
JPH0287237A (en) Execute instruction control system
JPS5875256A (en) Monitoring system for execution instruction processing state
JP2786215B2 (en) Restart processing control method
JP3012618B1 (en) Debugging method of inspected program and its debugging method
JPS6298435A (en) Defecting method for abnormality of computer
JPS62182934A (en) Program executing device
JPH11242613A (en) Microprocessor
JPH09152980A (en) Procedure step processing method
JPH03230227A (en) Method and device for error detection
JPH01226031A (en) Control system for pipe line of information processor
JPH01166140A (en) Information processor diagnosing system