[go: up one dir, main page]

JPH02170243A - Self-diagnostic system for microprocessor - Google Patents

Self-diagnostic system for microprocessor

Info

Publication number
JPH02170243A
JPH02170243A JP63325301A JP32530188A JPH02170243A JP H02170243 A JPH02170243 A JP H02170243A JP 63325301 A JP63325301 A JP 63325301A JP 32530188 A JP32530188 A JP 32530188A JP H02170243 A JPH02170243 A JP H02170243A
Authority
JP
Japan
Prior art keywords
step number
microprocessor
instruction
count value
macro 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
JP63325301A
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 JP63325301A priority Critical patent/JPH02170243A/en
Publication of JPH02170243A publication Critical patent/JPH02170243A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

PURPOSE:To detect the abnormal actions by preparing a step number setting mechanism, a set value register, a step number counter and an interruption production means and always monitoring the executing state of a microprocessor with all macroinstructions. CONSTITUTION:The number of steps are set based on the type of a macroinstruction when a step number setting mechanism 13 decomposes the macroinstruction into a microinstruction and executes this microinstruction. A set value register 7 holds the number of steps set by the mechanism 13, and the step number count value is counted up every time a step number counter 10 decomposes a macroinstruction into a microinstruction and executes it. Then an interruption production means 21 compares the step number count value counted up by the counter 10 with the set number of steps held by the register 7 when the execution of the macroinstruction is through. When both values do not coincide an interruption is produced based on the result of this comparison. Thus an abnormal action is detected.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はマイクロプロセッサの自己診断方式に関し、特
にマイクロ命令に分解してマクロ命令を実行するマイク
ロプロセッサにおいてマクロ命令の実行状態を監視する
マイクロプロセッサの自己診断方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a self-diagnosis method for a microprocessor, and particularly to a microprocessor that decomposes the macro instruction into micro instructions and executes the macro instruction, and monitors the execution status of the macro instruction. Regarding self-diagnosis method.

〔従来の技術〕[Conventional technology]

従来、この種のマイクロプロセッサの自己診断方式、特
にマイクロプロセッサの実行時間を監視する方式として
は、特定の重要なマクロ命令(リード命令やライト命令
等)の実行が何らかの原因で中断されたためにあらかし
め定められている限界時間を超えたときにその旨を示す
割込みを発行するタイムアウト険出方式が行われていた
Conventionally, self-diagnosis methods for this type of microprocessor, especially methods for monitoring the execution time of a microprocessor, have been used to detect problems caused by interruptions in the execution of specific important macro instructions (read instructions, write instructions, etc.) for some reason. A timeout system has been used in which an interrupt is issued to indicate when a predetermined limit time has been exceeded.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述した従来のマイクロプロセッサの自己診断方式(タ
イムアウト検出方式)では、特定のマクロ命令の実行が
何らかの原因で中断されたためにあらかじめ定められて
いる限界時間を超えたときにのみ割込みが発行されるの
で、特定のマクロ命令の実行が何らかの原因で中断され
て実行不能になっている状態等を検出することはできる
が、マクロ命令の実行は中断することなく行われている
が正常動作に比較してその実行速度が速くなったり遅く
なったりするという異常動作(このような異常動作はマ
イクロプログラム(マイクロ命令の集合)のシーケンス
不正やマイクロプログラムの動作不正等のエラー要因に
よって生じる)を検出することができないという欠点が
ある。
In the conventional microprocessor self-diagnosis method (timeout detection method) described above, an interrupt is issued only when execution of a specific macro instruction is interrupted for some reason and exceeds a predetermined time limit. Although it is possible to detect a situation where the execution of a specific macro instruction is interrupted for some reason and becomes impossible to execute, it is possible to detect a situation where the execution of a specific macro instruction is interrupted for some reason, but it is possible to detect a situation where the execution of a specific macro instruction is being performed without interruption, but compared to normal operation. It is possible to detect abnormal behavior in which the execution speed becomes faster or slower (such abnormal behavior is caused by error factors such as incorrect sequence of the microprogram (a collection of microinstructions) or incorrect operation of the microprogram). The drawback is that it cannot be done.

本発明の目的は、上述の点に鑑み、正常動作に比較して
その実行速度が速くなったり遅くなったりする場合の異
常動作を検出することができるマイクロプロセッサの自
己診断方式を徒供することにある。
In view of the above-mentioned points, an object of the present invention is to provide a self-diagnosis method for a microprocessor that can detect abnormal operation when its execution speed is faster or slower than normal operation. be.

〔課題を解決するための手段〕[Means to solve the problem]

本発明のマイクロプロセッサの自己診断方式は、マイク
ロプログラムにより制御されるプロセッサでありマイク
ロ命令に分解してマクロ命令を実行するマイクロプロセ
ッサにおいて、マクロ命令をマイクロ命令に分解して実
行する際のステップ数設定値を当該マクロ命令の命令タ
イプ等に基づき設定するステップ数設定機構と、このス
テップ数設定機構により設定されたステップ数設定値を
保持する設定値レジスタと、当該マクロ命令をマイクロ
命令に分解して実行している際にマイクロ命令を実行す
る毎にステップ数カウント値をカウント値をカウントア
ップ゛するステップ数カウンタと、当該マクロ命令の実
行が終了した際に前記ステップ数カウンタによりカウン
ト値をカウントアップされているステップ数カウント値
と前記設定値レジスタに保持されているステップ数設定
値とを比較して両者が一致していない場合に両者の大小
関係に基づく割込みを発行する割込み発行手段とを有す
る。
The microprocessor self-diagnosis method of the present invention is a microprocessor that is controlled by a microprogram and that decomposes macro instructions into micro instructions and executes them. A step number setting mechanism that sets a setting value based on the instruction type of the macro instruction, a setting value register that holds the step number setting value set by this step number setting mechanism, and a setting value register that disassembles the macro instruction into micro instructions. A step number counter that increments a step number count value each time a microinstruction is executed while the macroinstruction is being executed, and the step number counter counts the count value when the execution of the macroinstruction is completed. an interrupt issuing means that compares the updated step number count value with the step number set value held in the set value register and issues an interrupt based on the magnitude relationship between the two if the two do not match; have

〔作用〕[Effect]

本発明のマイクロプロセッサの自己診断方式では、ステ
ップ数設定機構がマクロ命令をマイクロ命令に分解して
実行する際のステップ数設定値を当該マクロ命令の命令
タイプ等に基づき設定し、設定値レジスタがステップ数
設定機構により設定されたステップ数設定値を保持し、
ステップ数カウンタが当該マクロ命令をマイクロ命令に
分解して実行している際にマイクロ命令を実行する毎に
ステップ数カウント値をカウントアンプし、割込み発行
手段が当該マクロ命令の実行が終了した際にステップ数
カウンタによりカウント値をカウントアップされている
ステ、ブ数カウント値と設定値レジスタに保持されてい
るステップ数設定値とを比較して両者が一致していない
場合に両者の大小関係に基づく割込みを発行する。
In the microprocessor self-diagnosis method of the present invention, the step number setting mechanism sets the step number setting value when a macro instruction is broken down into micro instructions and executed based on the instruction type of the macro instruction, and the setting value register is set. Holds the step number setting value set by the step number setting mechanism,
The step number counter counts and amplifies the step number count value every time a microinstruction is executed while the macroinstruction is broken down into microinstructions and executed, and the interrupt issuing means interrupts the step count value when the execution of the macroinstruction is completed. Compare the step number count value counted up by the step number counter with the step number setting value held in the setting value register, and if the two do not match, based on the magnitude relationship between the two. Issue an interrupt.

〔実施例〕〔Example〕

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

第1図は、本発明のマイクロプロセッサの自己診断方式
の一実施例が実現されるマイクロプロセッサ(マイクロ
プロセッサl)の構成を示すブロック図である。このマ
イクロプロセッサlは、命令解読部2と、制御部3と、
命令実行部4と、バス制御部5と、診断部6とを含んで
構成されている。
FIG. 1 is a block diagram showing the configuration of a microprocessor (microprocessor l) in which an embodiment of the microprocessor self-diagnosis method of the present invention is implemented. This microprocessor l includes an instruction decoding section 2, a control section 3,
It is configured to include an instruction execution section 4, a bus control section 5, and a diagnosis section 6.

命令解読部2は、異常動作対応機構12と、ステップ数
設定機構13とを含んで構成されている。
The instruction decoder 2 includes an abnormal operation response mechanism 12 and a step number setting mechanism 13.

制御部3は、ステップ数カウンタlOと、異常検出機構
11とを含んで構成されている。
The control unit 3 includes a step number counter lO and an abnormality detection mechanism 11.

診断部6は、設定値レジスタ7と、比較機構8と、カウ
ント値レジスタ9とを含んで構成されている。
The diagnostic section 6 includes a set value register 7, a comparison mechanism 8, and a count value register 9.

診断部6内の比較機構8および制御部3内の異常検出機
構11により割込み発行手段が実現される。
The comparison mechanism 8 in the diagnosis section 6 and the abnormality detection mechanism 11 in the control section 3 realize an interrupt issuing means.

次に、このように構成された本実施例のマイクロプロセ
ッサの自己診断方式の動作について説明する。
Next, the operation of the microprocessor self-diagnosis system of this embodiment configured as described above will be explained.

マイクロプロセッサ1は、バス制御部5によって外部の
メモリ (図示せず)や入出力装置(図示せず)と情f
i!(制御信号14.アドレス24およびデータ25)
の交換を行っている。
The microprocessor 1 communicates with external memory (not shown) and input/output devices (not shown) via the bus control unit 5.
i! (Control signal 14. Address 24 and data 25)
are being exchanged.

命令解読部2は、外部のメモリからハス制御部5を介し
て読み込まれたマクロ命令15を解読する(マクロ命令
15の命令タイプ等が調べられ、マクロ命令15がマイ
クロ命令17に分解される)。
The instruction decoding unit 2 decodes the macro instruction 15 read from an external memory via the Hass control unit 5 (the instruction type of the macro instruction 15 is checked, and the macro instruction 15 is decomposed into micro instructions 17). .

マイクロプロセッサl内の命令解読部2内のステップ数
設定機構13は、この解読に基づいて、マクロ命令15
が分解されたマイクロ命令17を制御部3に送付し、マ
クロ命令15の命令タイプ等によって決マるマイクロプ
ログラムのステップ数の設定値(マクロ命令15が分解
されたマイクロ命令17の数)であるステップ数設定4
a16を診断部6内の設定値レジスタ7に送付する。
Based on this decoding, the step number setting mechanism 13 in the instruction decoding unit 2 in the microprocessor l sets the macro instruction 15.
sends the disassembled microinstruction 17 to the control unit 3, and the set value of the number of microprogram steps (the number of microinstructions 17 in which the macroinstruction 15 is disassembled) is determined by the instruction type of the macroinstruction 15. Step number setting 4
a16 is sent to the setting value register 7 in the diagnostic section 6.

マイクロ命令17を受けた制御n部3は、命令実行部4
にマイクロ命令17に基づく制御信号18を送付する。
The control unit 3 that has received the microinstruction 17 executes the instruction execution unit 4
A control signal 18 based on the microinstruction 17 is sent to the microinstruction 17 .

同時に、制御部3内のステップ数カウンタ10が実行さ
れたマイクロ命令17の数(ステップ数カウント値22
)のカウント値をカウントアップを行う。
At the same time, the step number counter 10 in the control unit 3 indicates the number of executed microinstructions 17 (step number count value 22).
) is counted up.

制御信号18を受けた命令実行部4は、各マイクロ命令
の実行を行う。
The instruction execution unit 4 that receives the control signal 18 executes each microinstruction.

この場合に、外部のメモリ等とのデータ交換が必要な場
合には、アドレス24となるアドレス19をバス制御部
5に送付してデータ25に基づくデータ20の入出力を
行う、このときに、メモリアクセス等に起因してウェイ
トがかかる(待ち状態になる)とマイクロ命令17は待
ち状態となるので、ステップ数カウンタlOはその待ち
状態と同期してカウントアンプを停止する。
In this case, if it is necessary to exchange data with an external memory, etc., address 19, which becomes address 24, is sent to bus control unit 5, and data 20 is input/output based on data 25. At this time, When the microinstruction 17 is placed in a wait state due to a memory access or the like, the microinstruction 17 enters a wait state, so the step number counter IO stops the count amplifier in synchronization with the wait state.

マクロ命令15の実行(マクロ命令15がマイクロ命令
17に分解されて行われる実行)が終了すると、制御部
3内のステップ数カウンタ10はその時点のステップ数
カウント値22を診断部6内のカウント値レジスタ9に
送付する。
When the execution of the macro instruction 15 (the execution performed by decomposing the macro instruction 15 into micro instructions 17) is completed, the step number counter 10 in the control unit 3 uses the step number count value 22 at that time as the count in the diagnostic unit 6. Send to value register 9.

診断部6内の比較機構8は、設定値レジスタ7に保持さ
れているステップ数設定値16とカウント値レジスタ9
に保持されているステップ数カウント値22とを比較し
、両者が等しいか否および等しくない場合はどちらが大
きいか否か(大小関係)等を示す診断結果23を制御部
3内の異常検出機構11に送付する。
A comparison mechanism 8 in the diagnosis section 6 compares the step number setting value 16 held in the setting value register 7 and the count value register 9.
The abnormality detection mechanism 11 in the control unit 3 compares the step number count value 22 held in the control unit 3 with the diagnostic result 23 indicating whether the two are equal or not, and if not equal, which one is larger or smaller (size relationship). Send to.

診断結果23を受けた異常検出機構11は、診断結果2
3に基づいて実行ステップ数の不足(設定値レジスタ7
中のステップ数設定(116がカウント値レジスタ9中
のステップ数カウント値22よりも大きい状態)や実行
ステップ数の超過(設定値レジスタ7中のステップ数設
定値16がカウント値レジスタ9中のステップ数カウン
ト値22よりも小さい状態)等の異常動作を検出した場
合には、異常動作割込み信号21を命令解読部2内の異
常動作対応機構12に発行する。
Upon receiving the diagnosis result 23, the abnormality detection mechanism 11 detects the diagnosis result 2.
Insufficient number of execution steps based on 3 (setting value register 7
The step number setting (116 is larger than the step number count value 22 in the count value register 9) or the execution step number exceeds (the step number setting value 16 in the setting value register 7 is the step number in the count value register 9) When an abnormal operation such as a state smaller than the count value 22 is detected, an abnormal operation interrupt signal 21 is issued to the abnormal operation handling mechanism 12 in the instruction decoder 2.

異常動作対応機構12は、異常動作割込み信号21に基
づいて、実行ステップ数の不足や実行ステップ数の超過
等の異常動作に対する対応策をとる。
Based on the abnormal operation interrupt signal 21, the abnormal operation response mechanism 12 takes countermeasures against abnormal operations such as a shortage in the number of executed steps or an excess of the number of executed steps.

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

以上説明したように本発明は、ステップ数設定機構、設
定値レジスタ、ステップ数カウンタおよび割込み発行手
段を設けてマイクロプロセッサの実行状態を全てのマク
ロ命令について常時監視することにより、マイクロプロ
グラムのシーケンス不正やマイクロプログラムの動作不
正等でマクロ命令の実行速度が早くなったり遅くなった
りする場合の異常動作を検出して割込み(異常動作割込
み信号)を発行することを可能にし、シーケンス不正に
よってマイクロプログラムが暴走したり動作不正によっ
て(例えば、リード命令をライト命令とする誤動作を行
うことによって)メモリ破壊やファイル破壊等の重大な
障害を引き起こす軍警を未然に防ぐことができるという
効果がある。
As explained above, the present invention provides a step number setting mechanism, a set value register, a step number counter, and an interrupt issuing means to constantly monitor the execution state of a microprocessor for all macro instructions, thereby preventing irregularities in the sequence of microprograms. It is possible to detect an abnormal operation in which the execution speed of a macro instruction becomes faster or slower due to an incorrect operation of a microprogram, etc., and to issue an interrupt (abnormal operation interrupt signal). This has the effect of preventing military and police forces from causing serious troubles such as memory and file destruction due to runaway or malfunction (for example, by malfunctioning a read command as a write command).

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

第1図は本発明の一実施例が実現されるマイクロプロセ
ッサの構成を示すブロック図である。 図において、 1・・・マイクロプロセッサ、 2・・・命令解読部、 3・・・制御部、 4・・・命令実行部、 5・・・バス制御部、 6・・・診断部、 7・・・設定値レジスタ、 8・・・比較機構、 9・・・カウント値レジスタ、 lO・・・ステップ数カウンタ、 11・ ・ 12・ ・ 13・ ・ ・ 14、 18 15・ ・ ・ 16・ ・ 17・ ・ ・ 19.24・ 20.25・ 21 ・ ・ ・ 22・ ・ ・ 23・ ・ ・ 異常検出機構、 異常動作対応機構、 ステップ数設定機構、 制御信号、 マクロ命令、 ステップ数設定値、 マイクロ命令、 アドレス、 データ、 異常動作割込み信号、 ステップ数カウント値、 診断結果である。
FIG. 1 is a block diagram showing the configuration of a microprocessor in which an embodiment of the present invention is implemented. In the figure, 1... Microprocessor, 2... Instruction decoding section, 3... Control section, 4... Instruction execution section, 5... Bus control section, 6... Diagnosis section, 7. ...Set value register, 8.Comparison mechanism, 9.Count value register, lO..Step number counter, 11. . 12. .13. .. 14, 18 15.. 16. .・ ・ ・ 19.24・ 20.25・ 21 ・ ・ ・ 22・ ・ 23・ ・ ・ Abnormality detection mechanism, abnormal operation response mechanism, step number setting mechanism, control signal, macro instruction, step number setting value, micro instruction , address, data, abnormal operation interrupt signal, step count value, and diagnostic results.

Claims (1)

【特許請求の範囲】 マイクロプログラムにより制御されるプロセッサであり
マイクロ命令に分解してマクロ命令を実行するマイクロ
プロセッサにおいて、 マクロ命令をマイクロ命令に分解して実行する際のステ
ップ数設定値を当該マクロ命令の命令タイプ等に基づき
設定するステップ数設定機構と、このステップ数設定機
構により設定されたステップ数設定値を保持する設定値
レジスタと、当該マクロ命令をマイクロ命令に分解して
実行している際にマイクロ命令を実行する毎にステップ
数カウント値をカウントアップするステップ数カウンタ
と、 当該マクロ命令の実行が終了した際に前記ステップ数カ
ウンタによりカウントアップされているステップ数カウ
ント値と前記設定値レジスタに保持されているステップ
数設定値とを比較して両者が一致していない場合に両者
の大小関係に基づく割込みを発行する割込み発行手段と を有することを特徴とするマイクロプロセッサの自己診
断方式。
[Scope of Claims] In a microprocessor that is controlled by a microprogram and executes a macro instruction by breaking it down into micro instructions, the number of steps set when the macro instruction is broken down into micro instructions and executed is defined as the macro instruction. A step number setting mechanism that sets the number of steps based on the instruction type of the instruction, a setting value register that holds the step number setting value set by this step number setting mechanism, and a macro instruction that is broken down into micro instructions and executed. a step number counter that increments a step number count value each time a microinstruction is executed; and a step number count value that is incremented by the step number counter when execution of the macro instruction is completed, and the set value. A self-diagnosis method for a microprocessor, comprising an interrupt issuing means that compares a step number setting value held in a register and, if the two do not match, issues an interrupt based on the magnitude relationship between the two. .
JP63325301A 1988-12-23 1988-12-23 Self-diagnostic system for microprocessor Pending JPH02170243A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63325301A JPH02170243A (en) 1988-12-23 1988-12-23 Self-diagnostic system for microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63325301A JPH02170243A (en) 1988-12-23 1988-12-23 Self-diagnostic system for microprocessor

Publications (1)

Publication Number Publication Date
JPH02170243A true JPH02170243A (en) 1990-07-02

Family

ID=18175287

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63325301A Pending JPH02170243A (en) 1988-12-23 1988-12-23 Self-diagnostic system for microprocessor

Country Status (1)

Country Link
JP (1) JPH02170243A (en)

Similar Documents

Publication Publication Date Title
US20020116670A1 (en) Failure supervising method and apparatus
JPH02170243A (en) Self-diagnostic system for microprocessor
JPH01140350A (en) Circuit for detecting runway of program in microcomputer
JPS622685Y2 (en)
JPH01154257A (en) Mutual monitor processing system
JPH01154258A (en) Malfunction detecting device using watchdog timer
JP2842748B2 (en) Monitoring and control method for information processing equipment
JPS61249152A (en) Program runaway processing method
CN114356636A (en) A method and circuit for preventing CPU debugging from running out of control
JP2746184B2 (en) Fault logging system
JPS6298435A (en) Defecting method for abnormality of computer
JPS6162947A (en) Method for preventing runaway of computer
JPH03246638A (en) Program runaway detection method
JPH0583851U (en) Information processing equipment
JPH0496832A (en) Fault information gathering device
JPH0149975B2 (en)
JPH0293738A (en) Interrupt processing method
JPS61241848A (en) Fault detecting circuit for electronic computer
JPS6010666B2 (en) Computer system monitoring method
JPS63280345A (en) Program error detection method
JPS5896353A (en) Malfunction detection device for information processing equipment
JPS63191246A (en) Processing progress control system
JPH01189739A (en) information gathering device
JPH01200441A (en) Mutual monitoring method among plural processors
JPH01243132A (en) System for processing trouble