JPH03230227A - Method and device for error detection - Google Patents

Method and device for error detection

Info

Publication number
JPH03230227A
JPH03230227A JP2026716A JP2671690A JPH03230227A JP H03230227 A JPH03230227 A JP H03230227A JP 2026716 A JP2026716 A JP 2026716A JP 2671690 A JP2671690 A JP 2671690A JP H03230227 A JPH03230227 A JP H03230227A
Authority
JP
Japan
Prior art keywords
microinstruction
executed
sent
period
instruction
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
JP2026716A
Other languages
Japanese (ja)
Inventor
Masahiro Morita
森田 将寛
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
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 filed Critical NEC Corp
Priority to JP2026716A priority Critical patent/JPH03230227A/en
Publication of JPH03230227A publication Critical patent/JPH03230227A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To prevent a program from running away by providing a mechanism which monitors the operation of microinstructions through the emulation of the microinstructions by a microprocessor and initiates an interruption when a sequence fault of the microprogram is detected. CONSTITUTION:An microinstruction 5 which is read out of an external memory through a bus control part 4 is decoded by an instruction decoding part 6 to extract a microinstruction 9 and a next-period microinstruction 8 form the microprogram memory and they are sent to a control part 16 and a next-period microinstrument memory storage register 13 in a diagnostic part 11. The microinstruction 9 is sent to a comparing mechanism 14 in the diagnostic part 11 and compared by a comparing mechanism 14 with the next-period microinstruction 8 stored in the next-period microinstruction storage register 13 to diagnose whether or not the microinstruction 9 is an instruction to be executed next. The diagnostic result 12 is sent to an abnormality detecting mechanism 15 in the control part 16 ad if abnormality is detected, an abnormal operation interruption signal 17 is sent out to check its correspondence by an abnormal operation correspondence mechanism 7. Consequently, the program is prevented from running away.

Description

【発明の詳細な説明】 [産業上の利用分野コ 本発明は、エラー検出方法および装置に関し、特にマイ
クロプロセッサのハードウェア上で、マイクロ命令実行
毎に一つ前のマイクロ命令に付加されていた次に実行さ
れるべきマイクロ命令を表わすコードと、これから実行
されるマイクロ命令を比較することにより、常時、動作
確認を行うエラー検出方法および装置に関する。
[Detailed Description of the Invention] [Industrial Field of Application] The present invention relates to an error detection method and device, and particularly to an error detection method and apparatus, in particular, on the hardware of a microprocessor. The present invention relates to an error detection method and apparatus for constantly checking operation by comparing code representing a microinstruction to be executed next with a microinstruction to be executed from now on.

[従来の技術] 従来、プログラムの暴走などのエラーを監視する機構と
しては、プログラム実行中に使用するはずのない不正な
アドレス領域のアクセスを監視づる機構や、命令の実行
結果のデータ形式を確認Jる方式がある。
[Prior Art] Conventionally, mechanisms for monitoring errors such as runaway programs include mechanisms for monitoring access to illegal address areas that are not supposed to be used during program execution, and mechanisms for checking the data format of instruction execution results. There is a J method.

[発明が解決しようとする課題] 上述した従来の不正なアドレス領域のアクセンを監視す
る機構や、命令の実行結果のデータ形♂を確認する機構
では、プログラムの暴走後プロクラムがある程度進んで
からでないとプログラムC暴走を検出することができず
、これがらプログラムが暴走しようとする瞬間を検出す
ることは不買能であった。
[Problems to be Solved by the Invention] The conventional mechanism for monitoring illegal accesses in address areas and the mechanism for checking the data type ♂ of the execution result of an instruction cannot be used until the program has progressed to a certain extent after the program has run out of control. It was not possible to detect the moment when the program was about to run out of control.

[課題を解決するための手段] 本発明のエラー検出方法は、あらかじめ各マイクロ命令
に次に実行されるべきマイクロ命令のオペランドコード
部を付加してマイクロプログラムメモリに格納し、マイ
クロ命令実行毎に一つ前に実行されたマイクロ命令に付
加されていた、次に実行されるべきマイクロ命令のオペ
ランドコードと実行されようとしているマイクロ命令の
オペランドコードを比較し、比較した結果が一致してぃ
ない場合は割込を発生し、常時マイクロ命令が正常に実
行されようとしていることを確認する方法である。
[Means for Solving the Problems] The error detection method of the present invention adds an operand code section of the next microinstruction to be executed to each microinstruction in advance and stores it in a microprogram memory. Compare the operand code of the next microinstruction to be executed that was attached to the previously executed microinstruction with the operand code of the microinstruction that is about to be executed, and the comparison results do not match. This is a method of generating an interrupt and constantly checking that the microinstruction is about to be executed normally.

本発明のエラー検出装置は、あらかじめ各マイクロ命令
に次に実行されるべきマイクロ命令のオペランドフード
を付加して、格納してあるマイクロプログラムメモリと
、マイクロ命令実行毎に一つ前に実行されたマイクロ命
令に付加されていた、次に実行されるべきマイクロ命令
のオペランドフード部と実行されようとしているマイク
ロ命令のオペランドコードを比較する機構と、比較した
結果が一致していない場合は割込を発生する手段とを具
備し、常時マイクロ命令が正常に実行されようとしてい
ることを確認するようにしたことを特徴とする。
The error detection device of the present invention adds the operand food of the next microinstruction to be executed to each microinstruction in advance, and stores the operand food in the microprogram memory and the operand food of the previously executed microinstruction for each execution of the microinstruction. A mechanism that compares the operand code of the next microinstruction to be executed and the operand code of the microinstruction that is about to be executed, which was attached to a microinstruction, and if the comparison results do not match, an interrupt is generated. The present invention is characterized in that it includes a means for generating a microinstruction, and constantly confirms that the microinstruction is about to be executed normally.

C実施例コ 次に本発明について図面を参照して説明する。C Example Next, the present invention will be explained with reference to the drawings.

第1図は本発明の一実施例のエラー検出方法および装置
を適用するマイクロプロセッサを示す。
FIG. 1 shows a microprocessor to which an error detection method and apparatus according to an embodiment of the present invention is applied.

このマイクロプロセッサ22は、外部I10との情報の
やりとりをするアドレスバス1.データバス2.バス制
御信号3およびそれらを制御するバス制御部4.命令解
読部8.命令実行部19.制御部169診断部11がら
構成されており、命令解読部6にはマイクロプログラム
メモυ23を持っている。
This microprocessor 22 has an address bus 1. Data bus 2. Bus control signals 3 and a bus control section 4 that controls them. Instruction decoder 8. Instruction execution unit 19. It consists of a control section 169 and a diagnosis section 11, and the instruction decoding section 6 has a microprogram memo υ23.

次に第1図に従って本実施例の動作を説明する外部メモ
リからバス制御部4を経て読み出されたマクロ命令5は
命令解読部6で解読され、マイクロ命令9と、マイクロ
命令9が実行された後、次に実行される次期マイクロ命
令8がマイクロプログラムメモリから取り出され、それ
ぞれ制御部16と診断部11内の次期マイクロ命令記憶
レジスタ13に送られる。制御部16に送られるマイク
ロ命令9は同時に診断部11の比較機構14にも送られ
、次期マイクロ命令記憶レジスタ13に記憶されている
1つ前の次期マイクロ命令8と比較機構14で比較され
、そのマイクロ命令9が実行されるべき命令であるがど
うかを診断する。比較機構14で比較された診断結果1
2は、制御部16内の異常検出機構15に送られ、異常
を検出した場合は、異常動作割込信号17を出し、異常
動作対応機構7でその対応をとる。但し、分岐命令およ
び割込み発生時では、次に実行されるべきマイクロ命令
が実行されないことがある。したがって分岐命令および
割込み発生時には、次に実行されるマイクロ命令が次期
マイクロ命令8と一致していなくても異常動作割込信号
17が発生しないよう、異常動作割込信号17をマスク
する。
Next, the operation of this embodiment will be explained according to FIG. 1. The macroinstruction 5 read out from the external memory via the bus control unit 4 is decoded by the instruction decoding unit 6, and the microinstruction 9 and the microinstruction 9 are executed. After that, the next microinstruction 8 to be executed next is taken out from the microprogram memory and sent to the next microinstruction storage register 13 in the control unit 16 and diagnostic unit 11, respectively. The microinstruction 9 sent to the control unit 16 is also sent to the comparison mechanism 14 of the diagnosis unit 11 at the same time, and is compared with the previous next microinstruction 8 stored in the next microinstruction storage register 13 by the comparison mechanism 14. It is diagnosed whether the microinstruction 9 is an instruction to be executed. Diagnosis result 1 compared by comparison mechanism 14
2 is sent to the abnormality detection mechanism 15 in the control section 16, and when an abnormality is detected, an abnormal operation interrupt signal 17 is issued, and the abnormal operation response mechanism 7 takes action. However, when a branch instruction or an interrupt occurs, the next microinstruction to be executed may not be executed. Therefore, when a branch instruction and an interrupt occur, the abnormal operation interrupt signal 17 is masked so that the abnormal operation interrupt signal 17 is not generated even if the microinstruction to be executed next does not match the next microinstruction 8.

口発明の効果コ 以上説明したように本発明は、マイクロプロセッサがマ
イクロ命令のエミュレーション中にマイクロ命令の動作
を常時監視し、マイクロプログラムのシーケンス不正を
検出した場合、割込みを起こす機構を持つことにより、
プログラムの暴走を防ぎ、メモリやファイルの破壊など
の重大な障害を防止することができる効果を奏する。
Effects of the Invention As explained above, the present invention has a mechanism in which a microprocessor constantly monitors the operation of microinstructions during emulation of microinstructions, and generates an interrupt when an incorrect sequence of the microprogram is detected. ,
This has the effect of preventing programs from running out of control and preventing serious problems such as memory and file destruction.

図  面  の  簡  単  な  説  間第1図
は本発明の一実施例を適用したマイクロプロセッサのブ
ロック図である。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram of a microprocessor to which an embodiment of the present invention is applied.

1・・・アドレスバス、2・・・データバス、3・・・
バス制御信号、4・・・バス制御部、5・・・マクロ命
令、6・・・命令解読部、7・・・異常動作対応機構、
8・・・次期マイクロ命令、9・・・マイクロ命令、1
1・・・診断部、12・・・診断結果、13・・・次期
マイクロ命令記憶レジスタ、14・・・比較機構、15
・・・異常検出機構、16・・・制御部、17・・・異
常動作割込信号、18・・・制御信号、19・・・命令
実行部、20・・・アドレスバス、21・・・データバ
ス、22・・・マイクロプロセッサ、23・・・マイク
ロプログラムメモリ。
1...address bus, 2...data bus, 3...
Bus control signal, 4... Bus control unit, 5... Macro instruction, 6... Instruction decoding unit, 7... Abnormal operation response mechanism,
8...Next microinstruction, 9...Microinstruction, 1
DESCRIPTION OF SYMBOLS 1...Diagnosis unit, 12...Diagnosis result, 13...Next microinstruction storage register, 14...Comparison mechanism, 15
... Abnormality detection mechanism, 16... Control unit, 17... Abnormal operation interrupt signal, 18... Control signal, 19... Instruction execution unit, 20... Address bus, 21... Data bus, 22... microprocessor, 23... microprogram memory.

Claims (1)

【特許請求の範囲】 1、あらかじめ各マイクロ命令に次に実行されるべきマ
イクロ命令のオペランドコード部を付加してマイクロプ
ログラムメモリに格納し、マイクロ命令実行毎に一つ前
に実行されたマイクロ命令に付加されていた、次に実行
されるべきマイクロ命令のオペランドコードと実行され
ようとしているマイクロ命令のオペランドコードを比較
し、比較した結果が一致していない場合は割込を発生し
、常時マイクロ命令が正常に実行されようとしているこ
とを確認するエラー検出方法。 2、あらかじめ各マイクロ命令に次に実行されるべきマ
イクロ命令のオペランドコードを付加して、格納してあ
るマイクロプログラムメモリと、マイクロ命令実行毎に
一つ前に実行されたマイクロ命令に付加されていた、次
に実行されるべきマイクロ命令のオペランドコード部と
実行されようとしているマイクロ命令のオペランドコー
ドを比較する機構と、比較した結果が一致していない場
合は割込を発生する手段とを具備し、常時マイクロ命令
が正常に実行されようとしていることを確認するように
したことを特徴とするエラー検出装置。
[Scope of Claims] 1. The operand code section of the next microinstruction to be executed is added to each microinstruction in advance and stored in the microprogram memory, and each microinstruction is updated with the previously executed microinstruction. The operand code of the microinstruction to be executed next and the operand code of the microinstruction that is about to be executed are compared, and if the comparison results do not match, an interrupt is generated and the microinstruction An error detection method that verifies that an instruction is attempting to execute successfully. 2. The operand code of the next microinstruction to be executed is added to each microinstruction in advance, and the operand code is added to the stored microprogram memory and to the previously executed microinstruction each time the microinstruction is executed. It also includes a mechanism for comparing the operand code section of the microinstruction to be executed next with the operand code of the microinstruction about to be executed, and means for generating an interrupt if the comparison results do not match. An error detection device characterized in that it always confirms that a microinstruction is about to be executed normally.
JP2026716A 1990-02-05 1990-02-05 Method and device for error detection Pending JPH03230227A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2026716A JPH03230227A (en) 1990-02-05 1990-02-05 Method and device for error detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2026716A JPH03230227A (en) 1990-02-05 1990-02-05 Method and device for error detection

Publications (1)

Publication Number Publication Date
JPH03230227A true JPH03230227A (en) 1991-10-14

Family

ID=12201079

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2026716A Pending JPH03230227A (en) 1990-02-05 1990-02-05 Method and device for error detection

Country Status (1)

Country Link
JP (1) JPH03230227A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5721872A (en) * 1994-09-09 1998-02-24 Nec Corporation Information processing apparatus with write protection function of specific storage area

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5721872A (en) * 1994-09-09 1998-02-24 Nec Corporation Information processing apparatus with write protection function of specific storage area

Similar Documents

Publication Publication Date Title
US4635193A (en) Data processor having selective breakpoint capability with minimal overhead
JPH03230227A (en) Method and device for error detection
JP2786215B2 (en) Restart processing control method
EP0525672A2 (en) Microprocessor with program tracing
JPS5899841A (en) Address controlling system of partially mounted control memory
JPS6146535A (en) Pseudo error setting control system
JPH01166140A (en) Information processor diagnosing system
JPH0769846B2 (en) Error processing circuit verification device
JP2686801B2 (en) Microcomputer program development tool
JPS5936859A (en) Information processing device
JPH05181697A (en) Diagnostic method for information processing system
JPH02150933A (en) Debug controller
JPS59229658A (en) Information processor
JPS61223952A (en) Retry function confirming system of data processor
JPH04120633A (en) Fault diagnostic device for processor
JPH076103A (en) Fault processing system for input/output channel
JPS61170832A (en) Abnormality detecting system of program execution sequence
JPH10320232A (en) Microprogram debugging device
JPS62127944A (en) Information processor
Gossányi et al. Error diagnostics and recovery procedure in a dual-processor computer system
JPS5896353A (en) Malfunction detection device for information processing equipment
JPH01246639A (en) Comparison error detection control circuit
JPH04337847A (en) Program check method
JPH06222804A (en) Digital controller
JPH03244041A (en) Microprogram sequential processing monitor system