JPS5844261B2 - Subroutine operation failure detection device - Google Patents
Subroutine operation failure detection deviceInfo
- Publication number
- JPS5844261B2 JPS5844261B2 JP52125845A JP12584577A JPS5844261B2 JP S5844261 B2 JPS5844261 B2 JP S5844261B2 JP 52125845 A JP52125845 A JP 52125845A JP 12584577 A JP12584577 A JP 12584577A JP S5844261 B2 JPS5844261 B2 JP S5844261B2
- Authority
- JP
- Japan
- Prior art keywords
- subroutine
- signal
- circuit
- output
- counter
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired
Links
Landscapes
- Executing Machine-Instructions (AREA)
- Debugging And Monitoring (AREA)
Description
【発明の詳細な説明】
本発明はマイクロプログラムによって制御される情報処
理装置において、サブルーチン動作時の障害を検出する
装置に関する。DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a device for detecting a failure during subroutine operation in an information processing device controlled by a microprogram.
マイクロプログラムによって制御される情報処理装置、
例えば入出力制御装置等において、サブルーチン命令実
行中にそのサブルーチンの多重度がプログラム作成上の
誤りあるいはマイクロプロセッサのハード上の誤動作等
により許容多重度を越えた場合、もしくはサブルーチン
実行中でないのにリターン命令が発生した場合、これを
検出し誤ま・りの表示をすることはソフトウェアで検出
システムを構成することにより実現可能であり、大型の
コンピュータシステムにおいては、これが従来より実際
に行われていた。an information processing device controlled by a microprogram;
For example, in an input/output control device, if the multiplicity of the subroutine exceeds the permissible multiplicity due to an error in programming or a malfunction in the microprocessor hardware while executing a subroutine instruction, or if the subroutine returns even though the subroutine is not being executed. When a command occurs, it is possible to detect it and display an error message by configuring a detection system using software, and this has traditionally been done in large computer systems. .
しかしながら、マイクロプログラムによって制御する装
置において、このような検出ソフトウェアを実現するこ
とはソフトウェアの負担が大きくなる点で、問題があっ
た。However, in a device controlled by a microprogram, there is a problem in that implementing such detection software increases the burden on the software.
従って、本発明は上述の如きサブルーチン動作時の障害
をハードウェア的に検出する簡単な構成の装置を提供す
ることを目的としている。Therefore, it is an object of the present invention to provide a device with a simple configuration for detecting failures during subroutine operation as described above using hardware.
この目的を遠戚する本発明の特徴は、マイクロプログラ
ムによって制御される情報処理装置のサブルーチン動作
時の障害を検出する装置であって、サブルーチン実行中
であることを表わす信号発生手段と、該信号の反転信号
とリターン命令信号との論理積を出力する手段と、該論
理積出力に応じてエラー信号を発生する手段とを備えた
ことにある。A feature of the present invention that is distantly related to this object is a device for detecting a failure during subroutine operation of an information processing device controlled by a microprogram, the device comprising a signal generating means indicating that the subroutine is being executed; and a return command signal, and means for generating an error signal in response to the AND output.
以下図面を用いて本発明の詳細な説明する。The present invention will be described in detail below using the drawings.
第1図はサブルーチンジャンプ及びリターン動作を説明
する図である。FIG. 1 is a diagram illustrating subroutine jump and return operations.
この図に示すように、メインルーチン実行中にサブルー
チンジャンプ命令(SSJ)が発生すると最初のサブル
ーチンSROにジャンプしてこれが実行され、このサブ
ルーチンSRO実行中にSSJ命令が発生すると次のサ
ブルーチンSR1にジャンプし、さらにこのサブルーチ
ンSR1でSSJ命令が発生すると次のサブルーチンS
R2ヘジャンプするというように多重度が増加して行く
。As shown in this figure, when a subroutine jump instruction (SSJ) occurs while the main routine is being executed, it jumps to the first subroutine SRO and executes it, and when an SSJ instruction occurs while this subroutine SRO is executing, it jumps to the next subroutine SR1. Furthermore, when an SSJ instruction occurs in this subroutine SR1, the next subroutine S
The multiplicity increases by jumping to R2.
第1図の場合、多重度は8回まで許容されており、これ
が9回になると禁止多重度領域に入り、問題が生じる。In the case of FIG. 1, the multiplicity is allowed up to 8 times, and when it reaches 9 times, it enters the prohibited multiplicity region and a problem occurs.
また、各サブルーチンにおいてリターン命令(RTRN
)が発生するとその前のサブルーチンあるいはメインル
ーチンに戻り多重度が減少して行く。Also, in each subroutine, a return instruction (RTRN
) occurs, the process returns to the previous subroutine or main routine and the multiplicity decreases.
第2図は本発明の一実施例におけるサブルーチンカウン
タ部分のブロック図を表わしている。FIG. 2 shows a block diagram of a subroutine counter portion in one embodiment of the present invention.
この図において、1はサブルーチンカウンタであり、サ
ブルーチンの多重度を計数するアップダウンカウンタで
ある。In this figure, 1 is a subroutine counter, which is an up/down counter that counts the multiplicity of subroutines.
このカウンタ1は4ビツトの出力5UBO,5UBI
、5UB2.5UB3を有しており、これらの出力畔一
般にはサブルーチンの戻り先アドレスを記!しておくバ
ッファのアドレス指示用に用いられるが本実施例ではさ
らに4ビツトの否定入力端子を備えたアンド回路2に印
加される。This counter 1 has 4-bit outputs 5UBO and 5UBI.
, 5UB2.5UB3, and the return address of the subroutine is generally written on these output ports. In this embodiment, the signal is applied to an AND circuit 2 having a 4-bit negative input terminal.
アンド回路2の出力はサブルーチンカウンタ1の4ビツ
トの出力が全て“0“の場合即ち最初のサブルーチンS
ROの実行中に“1“となり、この出力は5UBALL
O信号として後述する障害検出回路のアンド回路11(
第3図)に印加される。The output of the AND circuit 2 is when the 4-bit output of the subroutine counter 1 is all “0”, that is, the first subroutine S
It becomes “1” while RO is running, and this output is 5UBALL.
AND circuit 11 (described later) of the fault detection circuit as the O signal
(Fig. 3).
この信号5UBALLOを否定回路3により反転した信
号米5UBALLOはナンド回路4の一方の入力端子に
印加される。The signal 5UBALLO obtained by inverting this signal 5UBALLO by the NOT circuit 3 is applied to one input terminal of the NAND circuit 4.
ナンド回路4の他方の入力端子には各サブルーチンのリ
ターン命令が発生した場合にそのデコード信号、即ち、
DCDRTRN信号が印加される。The other input terminal of the NAND circuit 4 receives the decoded signal when a return command of each subroutine is generated, that is,
A DCDRTRN signal is applied.
従ってナンド回路4の出力は最初のサブルーチンS、
ROを除いた各サブルーチンにおけるリターン命令毎に
“0“となり、その他の場合は全て“1“となる。Therefore, the output of the NAND circuit 4 is the first subroutine S,
It becomes "0" for each return instruction in each subroutine except RO, and becomes "1" in all other cases.
このナンド回路4の出力は否定入力端子を有するオア回
路5を通ることによって反転され、アンド回路6の一つ
の入力端子に印加される。The output of this NAND circuit 4 is inverted by passing through an OR circuit 5 having a negative input terminal, and is applied to one input terminal of an AND circuit 6.
また、オア回路5には、SSJ命令が発生した場合にこ
れをデコードし反転した米DCD SSJ信号が印加
される。Furthermore, when an SSJ command is generated, the OR circuit 5 is applied with a DCD SSJ signal which is decoded and inverted.
この信号はオア回路50入力部で反転された後アンド回
路6の上記入力端子に印加される。This signal is inverted at the input section of the OR circuit 50 and then applied to the input terminal of the AND circuit 6.
アント回路6の他の3つの入力端子には、1動作サイク
ル中に2回印加されるクロックパルスCLK、各動作サ
イクルの後半を表わすタイミング信号Tx、及びプログ
ラムの流れがサブルーチン領域内にあることを表わす信
号FTSSJがそれぞれ印加されるように構成されてい
る。The other three input terminals of the antenna circuit 6 are a clock pulse CLK that is applied twice during one operation cycle, a timing signal Tx that represents the second half of each operation cycle, and a signal that indicates that the program flow is within a subroutine area. The configuration is such that a signal representing FTSSJ is applied to each of them.
そしてアンド回路6の出力端子はサブルーチンカウンタ
1のクロック端子に接続されている。The output terminal of the AND circuit 6 is connected to the clock terminal of the subroutine counter 1.
また、サブルーチンカウンタ1のカウントアツプダウン
切替制御端子(U/D )にはDCDRTRN信号が印
加されるように構成されており、該信号が“1“の場合
はカウントダウン、′O“の場合はカウントアツプ動作
をそれぞれ行うように設定されている。In addition, the DCDRTRN signal is applied to the count up/down switching control terminal (U/D) of subroutine counter 1, and when the signal is "1", the countdown is performed, and when it is 'O', the countdown is performed. It is set to perform the up operation respectively.
次にこのサブルーチンカウンタ1のカウント動作を説明
する。Next, the counting operation of this subroutine counter 1 will be explained.
メインルーチンにおいてSSJ命令が発生するとプログ
ラムはサブルーチンSROにジャンプするが、この場合
、FTSSJ信号が後述する如く“0“であるため、ア
ンド回路6による論理積出力は“0“となる。When the SSJ instruction occurs in the main routine, the program jumps to the subroutine SRO, but in this case, since the FTSSJ signal is "0" as described later, the logical AND output from the AND circuit 6 becomes "0".
従ってカウンタ1にクロックCLKが印加されないため
、その出力は初期設定値(o、o、o、o)のままとな
る。Therefore, since the clock CLK is not applied to the counter 1, its output remains at the initial setting value (o, o, o, o).
サブルーチンSROにおいてSSJ命令が発生するとプ
ログラムはサブルーチンSR1にジャンプする。When an SSJ instruction occurs in subroutine SRO, the program jumps to subroutine SR1.
この場合は後述するようにFTSSJ信号が“1”とな
っているため、第4図に示す如くクロックCLK、タイ
ミング信号Tx、FTSSJ信号、及びDCDS8J信
号の論理積出力が“1“となり、クロックCLKがカウ
ンタ1に印加される。In this case, as described later, the FTSSJ signal is "1", so the AND output of the clock CLK, timing signal Tx, FTSSJ signal, and DCDS8J signal becomes "1" as shown in FIG. is applied to counter 1.
その結果カウンタ1はカウントアツプされ、その出力が
(0,0,0,1)となる。As a result, counter 1 is counted up and its output becomes (0, 0, 0, 1).
以下、SSJ命令に応じてカウンタ1は順次カウントア
ツプされる。Thereafter, the counter 1 is sequentially counted up in response to the SSJ command.
サブルーチン実行中にリターン命令が発生すると実行し
ているサブルーチンがSROではない場合には米5UB
ALLO信号が“1“であるため、ナンド回路4がオン
となってDCDRTRN信号がアンド回路6に印加され
、クロックCLKがカウンタ1に印加される(第4図参
照)。When a return instruction occurs during subroutine execution, if the subroutine being executed is not SRO, 5UB
Since the ALLO signal is "1", the NAND circuit 4 is turned on, the DCDRTRN signal is applied to the AND circuit 6, and the clock CLK is applied to the counter 1 (see FIG. 4).
この場合、切替制御端子U/DにもDCRTRN信号が
印加されるため、カウンタ1はこのクロックCLKに応
じてカウントダウンする。In this case, since the DCRTRN signal is also applied to the switching control terminal U/D, the counter 1 counts down in accordance with this clock CLK.
サブルーチンSROでリターン命令が発生した場合、プ
ログラムはメインルーチンに戻るが、この場合、米5U
BALLO信号が“O“のため、カウンタ1は計数動作
を行わない。If a return instruction occurs in subroutine SRO, the program returns to the main routine, but in this case, US 5U
Since the BALLO signal is "O", the counter 1 does not perform a counting operation.
なお、第4図において、AはクロックCLK、Bはサブ
ルーチンカウンタ1の内容、CはSSJ命令及びRTR
N命令のデコード信号、Dはタイミング信号Txをそれ
ぞれ表わしている。In FIG. 4, A is the clock CLK, B is the content of subroutine counter 1, and C is the SSJ instruction and RTR.
The decode signal of the N instruction and D represent the timing signal Tx, respectively.
第3図は本実施例の障害検出回路部分を示すブロック図
である。FIG. 3 is a block diagram showing the failure detection circuit portion of this embodiment.
この図において、T及び8はクロックドRSフリップフ
ロップであり、フリップフロップ7はFTSSJ信号及
び米FTSSJ信号を形成するために用いられ、フリッ
プフロップ8は障害発生を表わすエラー信号を形成する
ために用いられる。In this figure, T and 8 are clocked RS flip-flops, flip-flop 7 is used to form the FTSSJ signal and US FTSSJ signal, and flip-flop 8 is used to form the error signal indicating the occurrence of a fault. It will be done.
フリップフロップ7及び8のクロック端子にはそれぞれ
アンド回路9及び10が接続されており、これらのアン
ド回路9及び10にはクロックCLK及びタイミング信
号Txが共に印加されるように構成されている。AND circuits 9 and 10 are connected to the clock terminals of flip-flops 7 and 8, respectively, and are configured so that clock CLK and timing signal Tx are both applied to these AND circuits 9 and 10.
フリップフロップ7のセット入力端子、リセット入力端
子はそれぞれアンド回路11,120出力端子に接続さ
れている。A set input terminal and a reset input terminal of the flip-flop 7 are connected to AND circuits 11 and 120 output terminals, respectively.
アンド回路110入力端子にはDCDSSJ信号及び5
UBALLO信号が印加されるように構成されており、
アンド回路120入力端子にはDCDRTRNCD上び
5UBALLO信号が印加されるように構成されている
。The AND circuit 110 input terminal includes the DCDSSJ signal and the 5
It is configured so that the UBALLO signal is applied,
The input terminal of the AND circuit 120 is configured to receive the DCDRTRNCD and 5UBALLO signals.
フリップフロップ7のQ出力端子はアンド回路13の一
方の入力端子に接続されており、アンド回路13の他方
の入力端子にはDCDRTRNCD上印加されるように
構成されている。The Q output terminal of the flip-flop 7 is connected to one input terminal of the AND circuit 13, and is configured to be applied to the other input terminal of the AND circuit 13 on DCDRTRNCD.
アンド回路13の出力端子はオア回路14を介してフリ
ップフロップ80セツト入力端子に接続されている。The output terminal of the AND circuit 13 is connected to the set input terminal of the flip-flop 80 via an OR circuit 14.
オア回路14の他方の入力端子には第2図に関連して説
明したサブルーチンカウンタ1の最上位ビット信号5U
B3が印加されるように構成されている。The other input terminal of the OR circuit 14 is connected to the most significant bit signal 5U of the subroutine counter 1 described in connection with FIG.
B3 is applied.
フリップフロップ8のQ出力はエラー信号として用いら
れる。The Q output of flip-flop 8 is used as an error signal.
次に第3図の回路の動作を説明する。Next, the operation of the circuit shown in FIG. 3 will be explained.
フリップフロップ7はDCDSSJ信号と5UBALL
O信号との論理積出力が“1“の場合にセットされる。Flip-flop 7 has DCDSSJ signal and 5UBALL
It is set when the AND output with the O signal is "1".
即ち、メインルーチンより最初のサブルーチンSROに
ジャンプした場合にセットされる。That is, it is set when jumping from the main routine to the first subroutine SRO.
またフリップフロップ7はDCDRTRNCD上5UB
ALLO信号との論理積出力が“1“の場合にリセット
される。Also, flip-flop 7 is 5UB on DCDRTRNCD.
It is reset when the AND output with the ALLO signal is "1".
即ち、最初のサブルーチンSROよりメインルーチンに
リターンする場合にリセットされる。That is, it is reset when returning to the main routine from the first subroutine SRO.
従ってフリップフロップ7のQ出力部ちFTSSJ信号
はサブルーチン領域でプログラムが実行されている場合
に“1“となる。Therefore, the Q output portion of the flip-flop 7, ie, the FTSSJ signal, becomes "1" when the program is being executed in the subroutine area.
また逆にQ出力部ち米FTSSJ信号はサブルーチン領
域において”0“となる。Conversely, the Q output section FTSSJ signal becomes "0" in the subroutine area.
フリップフロップ8は米FTSSJ信号とDCDRTR
NCD上の論理積出力が“1“となった場合にセットさ
れる。Flip-flop 8 is the US FTSSJ signal and DCDRTR
It is set when the AND output on the NCD becomes "1".
即ち、サブルーチン領域でプログラムが実行されていな
いのにリターン命令が発生した場合にフリップフロップ
8がセットされそのQ出力がエラー信号となる。That is, when a return instruction occurs even though no program is being executed in the subroutine area, the flip-flop 8 is set and its Q output becomes an error signal.
また、フリップフロップ8は5UB3信号が“1“とな
った場合、即ち、サブルーチンカウンタ1の出力が(1
,0,0,O)以上となった場合にセットされエラー信
号が発生する。Furthermore, when the 5UB3 signal becomes "1", the flip-flop 8 outputs the output of the subroutine counter 1 (1).
, 0, 0, O) or more, it is set and an error signal is generated.
以上説明したように本発明の障害検出装置は、サブルー
チン実行中であることを表わす信号発生手段と、その信
号とリターン命令信号との論理積を出力する手段と、そ
の論理積出力に応じてエラー信号を発生する手段と、サ
ブルーチンカウンタの最上位ビット出力に応じてエラー
信号を発生する手段とを備えているため、サブルーチン
領域でプログラムが実行されていないのにリターン命令
が発生した場合にエラー信号を発生することが簡単なハ
ードウェアで実現できる。As explained above, the fault detection device of the present invention includes a signal generating means indicating that a subroutine is being executed, a means for outputting a logical product of the signal and a return command signal, and an error detecting device according to the logical product output. Since it is equipped with a means for generating a signal and a means for generating an error signal according to the most significant bit output of the subroutine counter, an error signal is generated when a return instruction is generated even though no program is being executed in the subroutine area. can be realized with simple hardware.
また、本実施例においてはエラー信号の発生条件にサブ
ルーチンカウンタの最上位ビット信号が論理和として入
るので、サブルーチンの多重度が許容値8を越えたこと
もチェックできる。Further, in this embodiment, since the most significant bit signal of the subroutine counter is entered as a logical sum in the error signal generation condition, it is also possible to check whether the multiplicity of the subroutine exceeds the allowable value 8.
従ってソフトウェアの負担を軽減することができる利点
を有している。Therefore, it has the advantage of being able to reduce the burden on software.
第1図はサブルーチンジャンプ及びリターン動作の説明
図、第2図及び第3図は本発明の一実施例のブロック図
、第4図は上記実施例の動作を説明する波形図である。
1・・・・・・サブルーチンカウンタ、2,5,6,9
゜10.11,12,13・・・・・・アンド回路、3
・・・・・・否定回路、4・・・・・・ナンド回路、7
.8・・・・・・フリップフロップ、14・・・・・・
オア回路。FIG. 1 is an explanatory diagram of subroutine jump and return operations, FIGS. 2 and 3 are block diagrams of an embodiment of the present invention, and FIG. 4 is a waveform diagram illustrating the operation of the above embodiment. 1... Subroutine counter, 2, 5, 6, 9
゜10.11,12,13...AND circuit, 3
...Negation circuit, 4...Nand circuit, 7
.. 8...Flip-flop, 14...
OR circuit.
Claims (1)
置のサブルーチン動作時の障害を検出する装置であって
、サブルーチン実行中であることを表わす信号発生手段
と、該信号の反転信号とリターン命令信号との論理積を
出力する手段と、該論理積出力に応じてエラー信号を発
生する手段とを備えたことを特徴とするサブルーチン動
作障害検出装置。1 A device for detecting a failure during subroutine operation of an information processing device controlled by a microprogram, comprising a signal generating means indicating that the subroutine is being executed, and an AND of an inverted signal of the signal and a return command signal. What is claimed is: 1. A subroutine operation failure detection device comprising: means for outputting a logical product; and means for generating an error signal in response to the AND output.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP52125845A JPS5844261B2 (en) | 1977-10-21 | 1977-10-21 | Subroutine operation failure detection device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP52125845A JPS5844261B2 (en) | 1977-10-21 | 1977-10-21 | Subroutine operation failure detection device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS5459848A JPS5459848A (en) | 1979-05-14 |
| JPS5844261B2 true JPS5844261B2 (en) | 1983-10-01 |
Family
ID=14920357
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP52125845A Expired JPS5844261B2 (en) | 1977-10-21 | 1977-10-21 | Subroutine operation failure detection device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS5844261B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US4398244A (en) * | 1980-05-07 | 1983-08-09 | Fairchild Camera & Instrument Corporation | Interruptible microprogram sequencing unit and microprogrammed apparatus utilizing same |
| JPS59153248A (en) * | 1983-02-21 | 1984-09-01 | Omron Tateisi Electronics Co | Debugging device |
-
1977
- 1977-10-21 JP JP52125845A patent/JPS5844261B2/en not_active Expired
Also Published As
| Publication number | Publication date |
|---|---|
| JPS5459848A (en) | 1979-05-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6145103A (en) | Emulator support mode for disabling and reconfiguring timeouts of a watchdog timer | |
| JPS59114652A (en) | Watchdog timer circuit | |
| US4573117A (en) | Method and apparatus in a data processor for selectively disabling a power-down instruction | |
| JPS5844261B2 (en) | Subroutine operation failure detection device | |
| US5388253A (en) | Processing system having device for testing the correct execution of instructions | |
| RU2039372C1 (en) | Redundant computer system | |
| JP2614931B2 (en) | Interrupt control circuit | |
| JP2668382B2 (en) | Pseudo fault generation method for testing microprograms | |
| JPH0465407B2 (en) | ||
| JPS6059608B2 (en) | multiprocessor | |
| JP2665043B2 (en) | CPU runaway detection circuit | |
| JPH03134742A (en) | Debug device | |
| JP3001526B1 (en) | Interrupt processing circuit and interrupt debugging method | |
| SU1221655A1 (en) | Device for checking microprocessor system | |
| JPH07104802B2 (en) | Information processing equipment | |
| JPH04162150A (en) | Watchdog timer control circuit | |
| JPH0346853B2 (en) | ||
| JPS5935250A (en) | Program controller | |
| JPS63184139A (en) | Automatic diagnosing system for parity circuit | |
| JPS61267840A (en) | Pseudo trouble generating circuit | |
| JPH0375909B2 (en) | ||
| JPS6027958A (en) | RAS circuit | |
| JPH0436420B2 (en) | ||
| JPH04332056A (en) | Microcomputer | |
| JPH05324398A (en) | Microprocessor |