JPS62118446A - Self-diagnosing circuit - Google Patents

Self-diagnosing circuit

Info

Publication number
JPS62118446A
JPS62118446A JP25952285A JP25952285A JPS62118446A JP S62118446 A JPS62118446 A JP S62118446A JP 25952285 A JP25952285 A JP 25952285A JP 25952285 A JP25952285 A JP 25952285A JP S62118446 A JPS62118446 A JP S62118446A
Authority
JP
Japan
Prior art keywords
self
diagnosis
counter
instruction
microinstruction
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
JP25952285A
Other languages
Japanese (ja)
Inventor
Ichiro Shirasaka
白坂 一郎
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 JP25952285A priority Critical patent/JPS62118446A/en
Publication of JPS62118446A publication Critical patent/JPS62118446A/en
Pending legal-status Critical Current

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

PURPOSE:To obtain detailed information by small number of hardware by counting and holding number of times of execution of condition judging instruction only during self-diagnosing and reading the counted value by microinstruction. CONSTITUTION:When a microprogram controlling device makes self-diagnosis, a counter 7 counts pulses from a selector 5 only during self-diagnosis. Thereby, the counter 7 counts the number of times of execution of a condition branching instruction during self-diagnosis. A port 8 reads out the value of the counter 7 by microinstruction, selects the counter by a control signal from a decoder 4 and outputs to an ALU 10. In this way, the extent of progress of self-diagnosis can be known even when loop and subroutine are included in a micro program.

Description

【発明の詳細な説明】 (産業上の利用分針) 本発明は、マイクロプログラム制御装置の自己診断回路
に関する。
DETAILED DESCRIPTION OF THE INVENTION (Industrial Application Minute Hand) The present invention relates to a self-diagnosis circuit for a microprogram control device.

(従来の技術) 従来、この種の自己診断のためのマイクロプログラムに
おいて自己診断の診断結果を表示するためには種々の方
式が採用されていた。
(Prior Art) Conventionally, various methods have been adopted for displaying the results of self-diagnosis in microprograms for this type of self-diagnosis.

上記表示方式の一つには診断の可否のみを表示する第1
の方式があシ、他の一つに診断の単位ごとにマイクロプ
ログラムによりエラ一番号をセットしてゆく第2の方式
があシ、さらに他の一つには自己診断プログラムがパス
したところまでのマイクロプログラム用プログラムカウ
ンタの値にょシェラ−情報を得る@80方式がある。
One of the above display methods is the first one that only displays whether or not the diagnosis is possible.
There is a second method in which an error number is set by a microprogram for each unit of diagnosis, and another method is until the self-diagnosis program passes. There is an @80 method for obtaining sheller information about the value of the program counter for a microprogram.

(発明が解決しようとする問題点) 上述した自己診断回路において、診断結果の可否のみを
表示する第1の方式では故障個所が不明となる。一方、
エラ一番号をセットしてゆく第2の方式では診断の単位
を小さくしてきめ細かなエラ一番号を指定すれば、よシ
詳細な情報を得ることができるが、その丸めにはマイク
ロプログラムメモリ容量の増大を招くとともに、実行速
度の低下を招くため、あまり細かなエラ一番号を付ける
ことは現実的ではない。さらに、プログラムカウンタの
値によりエラー情報を得る第8の方式では診断プログラ
ムのなかにサブルーチンやループを設けると、正確なエ
ラー個所が不明になることがある。
(Problems to be Solved by the Invention) In the self-diagnosis circuit described above, in the first method of displaying only the acceptability of the diagnosis result, the location of the failure becomes unclear. on the other hand,
In the second method of setting error numbers, it is possible to obtain more detailed information by making the unit of diagnosis smaller and specifying more detailed error numbers. It is not realistic to give very detailed error numbers because this will lead to an increase in errors and a decrease in execution speed. Furthermore, in the eighth method of obtaining error information from the value of a program counter, if a subroutine or loop is provided in the diagnostic program, the exact location of the error may become unclear.

以上、診断結果を表示する種々の方式が公知であるが、
いずれも少ないハードウェアで詳細な情報を得ることが
できないという欠点がある。
As mentioned above, various methods for displaying diagnostic results are known, but
Both methods have the disadvantage of not being able to obtain detailed information with a small amount of hardware.

本発明の目的は、マイクロ命令に含まれた条件判断命令
が実行されたことを検出するとともに、マイクロプログ
ラム制御装置が自己診断中であることを表示し、条件判
断命令が実行されたことを示す信号により自己診断中の
みに条件判断命令が実行された回数を計数保持しておき
、この計数値をマイクロ命令で読取ることによって上記
欠点を除去し、少ないハードウェアで詳細な情報を得る
ことができるように構成した自己診断回路を提供するこ
とにある。
An object of the present invention is to detect that a conditional judgment instruction included in a microinstruction has been executed, and also to display that the microprogram control device is undergoing self-diagnosis to indicate that the conditional judgment instruction has been executed. By keeping a count of the number of times a condition judgment instruction is executed only during self-diagnosis using a signal, and reading this count value using a microinstruction, the above drawback can be eliminated and detailed information can be obtained with less hardware. An object of the present invention is to provide a self-diagnosis circuit configured as described above.

(問題点を解決するための手段) 本発明による自己診断回路は、命令デコーダと、セレク
タと、フリップフロッグと、カウンタと、複数のポート
とを具備して構成したものである。
(Means for Solving the Problems) A self-diagnosis circuit according to the present invention includes an instruction decoder, a selector, a flip-flop, a counter, and a plurality of ports.

命令デコーダは、マイクロプログラム制御装置における
条件判断命令を実行するためのものである。
The instruction decoder is for executing condition judgment instructions in the microprogram controller.

セレクタは、条件判断命令が実行されていたことを検出
するためのものである。
The selector is for detecting that a conditional judgment instruction has been executed.

フリップ70ツブは、マイクロプログラム制御装置が自
己診断中であることを表示するためのものである。
The flip 70 knob is for indicating that the microprogram controller is undergoing self-diagnosis.

カウンタはフリップフロップの出力と、セレクタの出力
とにより自己診断中に条件判断命令が実行された回数を
計数する丸めのものである。
The counter is a rounding type that counts the number of times a condition judgment instruction is executed during self-diagnosis based on the output of the flip-flop and the output of the selector.

複数のポートは、カウンタにセットされた値をマイクロ
プログラム制御装置のマイクロ命令により読取るための
ものである。
A plurality of ports are for reading the values set in the counters by microinstructions of the microprogram controller.

(実施例) 次に、本発明について図面を参照して詳細に説明する。(Example) Next, the present invention will be explained in detail with reference to the drawings.

第1図は、本発明による自己診断回路を含むマイクロプ
ログラム制御装置の一部分の一実施例を示すブロック図
である。第1図において、lはプログラムカウンタ、2
はROM、3は命令レジスタ、4は命令テコーダ、5は
セレクタ、6はフリップフロップ、7はカウンタ、8は
第1のポート、9は第2のポート、lOはALU、11
はアキュームレータである。
FIG. 1 is a block diagram illustrating one embodiment of a portion of a microprogram controller including a self-diagnostic circuit according to the present invention. In FIG. 1, l is a program counter, 2
is ROM, 3 is an instruction register, 4 is an instruction encoder, 5 is a selector, 6 is a flip-flop, 7 is a counter, 8 is a first port, 9 is a second port, IO is an ALU, 11
is an accumulator.

第1図において、マイクロ命令はプログラムカウンタ1
によりアドレスされたROM2よシ読出され、命令レジ
スタ3に一時的に格納される。命令デコーダ4は上記マ
イクロ命令をデコードし、各マイクロ命令を実行するた
めの制御信号を発生する。セレクタ5はデコードされた
制御信号よシ条件分岐命令のみを選択し、この命令が実
行されるのと同期したパルスを発生する。フリップフロ
ップ6は自己診断中の状態を保持するためのものであり
、マイクロ命令によりセット/リセットされる。カウン
タ7は、セレクタ5よシのパルスを自己診断中に限って
カウントする。これにより、カランj17は条件分岐命
令が自己診断中に何回実行されたかを計数する。第1の
ポート8はカランタフの値をマイクロ命令により読取る
回路であり、命令デコーダ4からの制御信号により、カ
ランタフの値を選択してALUIOに出力する。第2の
ポート9は、マイクロプログラム制御装置内の他のレジ
スタの値を選択する。アキュームレータ11は、ALU
IOにより演算が行われるときの一時記憶として動作す
る。
In Figure 1, the microinstruction is program counter 1.
The command is read out from the ROM 2 addressed by , and temporarily stored in the instruction register 3 . The instruction decoder 4 decodes the microinstructions and generates control signals for executing each microinstruction. The selector 5 selects only the conditional branch instruction based on the decoded control signal, and generates a pulse synchronized with the execution of this instruction. The flip-flop 6 is used to hold the state during self-diagnosis, and is set/reset by a microinstruction. The counter 7 counts pulses from the selector 5 only during self-diagnosis. Thereby, the callan j17 counts how many times the conditional branch instruction has been executed during the self-diagnosis. The first port 8 is a circuit that reads the value of the carantuff by a microinstruction, and selects the value of the carantuff based on the control signal from the instruction decoder 4 and outputs it to the ALUIO. The second port 9 selects the values of other registers within the microprogram controller. The accumulator 11 is an ALU
It operates as temporary storage when an operation is performed by IO.

次に、本発明による自己診断回路の動作について説明す
る。
Next, the operation of the self-diagnosis circuit according to the present invention will be explained.

マイクロプログラム制御装置が自己診断を行う場合には
、自己診断結果の良否の判定は条件判断マイクロ命令に
より実行される。そこで、この条件判断マイクロ命令が
実行され九ことを自己診断の開始時から計数すれば、自
己診断がどこまで進んだかを知ることができる。これは
、自己診断のためのマイクロプログラム中にループおよ
びサブルーチンがあっても、順次、計数されるため正確
に何処まで自己診断が進んだかを知ることができる。
When the microprogram control device performs self-diagnosis, the determination of whether the self-diagnosis result is good or bad is executed by a condition judgment microinstruction. Therefore, by counting the number of times this condition judgment microinstruction has been executed since the start of the self-diagnosis, it is possible to know how far the self-diagnosis has progressed. This means that even if there are loops and subroutines in the microprogram for self-diagnosis, they are counted sequentially, so it is possible to know exactly how far the self-diagnosis has progressed.

自己診断プログラムの最初で、フリップフロップ6はセ
ットされる。次に、所定の手順でテストを行い、テスト
結果が正しいか否かを条件分岐命令によりチェックする
。上記命令が実行されることにより、セレクタ5よりパ
ルスが発生し、カウンタ7がカウントアツプされる。テ
ストが成功すれば次のテスト?行う。不成功ならば自己
診断は直ちに終了してフリップフロップ6がリセットさ
れる。後に、カランタフの値を第1のポート8よシ読取
ることにより、テストが何処まで進んだかを知ることが
できる。すべてのテストが無事に終了した場合にも、フ
リップフロップ6はリセット式れる。この場合にも、後
にカラ/り7の値を第1のポート8より読取ることによ
りテストがすべて終了したことを知ることができる。
At the beginning of the self-diagnosis program, flip-flop 6 is set. Next, a test is performed according to a predetermined procedure, and whether or not the test result is correct is checked using a conditional branch instruction. By executing the above command, a pulse is generated from the selector 5, and the counter 7 is counted up. If the test is successful, what about the next test? conduct. If unsuccessful, the self-diagnosis ends immediately and the flip-flop 6 is reset. Later, by reading the value of Carantuff on the first port 8, it is possible to know how far the test has progressed. The flip-flop 6 is also reset when all tests are successfully completed. In this case as well, it is possible to know that all tests have been completed by later reading the value of color/ri7 from the first port 8.

(発明の効果) 以上説明したように本発明は、マイクロ命令に含まれた
条件判断命令が実行されたことを検出するとともに、マ
イクロプログラム制御装置が自己診断中であることを表
示し、条件判断命令が実行されたことを示す信号により
自己診断中のみに条件判断命令が実行された回数を計数
保持しておき、この計数値をマイクロ命令で読取ること
により、自己診断マイクロプログラムに特別なルーチy
(i7追加することなしに、詳細な自己診断結果を得る
ことができるという効果がある。さらに、本発明はマイ
クロプログラムメモリ容量の増加、および実行速度の低
下を招くことなく自己診断マイクロプログラムを容易に
作成することができるという効果もある。
(Effects of the Invention) As described above, the present invention detects the execution of a condition judgment instruction included in a microinstruction, displays that the microprogram control device is undergoing self-diagnosis, and detects the execution of a condition judgment instruction included in a microinstruction. By keeping a count of the number of times a condition judgment instruction is executed only during self-diagnosis using a signal indicating that the instruction has been executed, and by reading this count value with a microinstruction, a special routine is added to the self-diagnosis microprogram.
(The effect is that detailed self-diagnosis results can be obtained without adding an i7.Furthermore, the present invention facilitates the self-diagnosis microprogram without increasing the microprogram memory capacity or reducing the execution speed.) Another advantage is that it can be created.

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

第1図は、本発明による自己診断回路を含むマイクロプ
ログラム制御装置の一部分の一実施例を示すブロック図
である。 l・・・プログラムカウンタ 2##−ROM 3・・・命令レジスタ 4・拳・命令デコーダ 5・・−セレクタ 6・・・フリップフロップ ?−・・カウンタ 8.9−拳・ポート 10・・・ALU 11・φ・アキュームレータ
FIG. 1 is a block diagram illustrating one embodiment of a portion of a microprogram controller including a self-diagnostic circuit according to the present invention. l...Program counter 2##-ROM 3...Instruction register 4/fist/instruction decoder 5...-Selector 6...Flip-flop? - Counter 8.9-Fist Port 10 ALU 11 φ Accumulator

Claims (1)

【特許請求の範囲】[Claims] マイクロプログラム制御装置における条件判断命令を実
行するための命令デコーダと、前記条件判断命令が実行
されていたことを検出するためのセレクタと、前記マイ
クロプログラム制御装置が自己診断中であることを表示
するためのフリップフロップと、前記フリップフロップ
の出力と前記セレクタの出力とにより前記自己診断中に
前記条件判断命令が実行された回数を計数するためのカ
ウンタと、前記カウンタにセットされた値を前記マイク
ロプログラム制御装置のマイクロ命令により読取るため
の複数のポートとを具備して構成したことを特徴とする
自己診断回路。
an instruction decoder for executing a condition judgment instruction in a microprogram control device; a selector for detecting that the condition judgment instruction is being executed; and an indication that the microprogram control device is undergoing self-diagnosis. a flip-flop for counting the number of times the condition judgment instruction is executed during the self-diagnosis based on the output of the flip-flop and the output of the selector; A self-diagnosis circuit comprising a plurality of ports for reading by microinstructions of a program control device.
JP25952285A 1985-11-19 1985-11-19 Self-diagnosing circuit Pending JPS62118446A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25952285A JPS62118446A (en) 1985-11-19 1985-11-19 Self-diagnosing circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25952285A JPS62118446A (en) 1985-11-19 1985-11-19 Self-diagnosing circuit

Publications (1)

Publication Number Publication Date
JPS62118446A true JPS62118446A (en) 1987-05-29

Family

ID=17335265

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25952285A Pending JPS62118446A (en) 1985-11-19 1985-11-19 Self-diagnosing circuit

Country Status (1)

Country Link
JP (1) JPS62118446A (en)

Similar Documents

Publication Publication Date Title
US3831148A (en) Nonexecute test apparatus
JPS61229134A (en) Microcomputer
JPS62118446A (en) Self-diagnosing circuit
JPS6114524B2 (en)
JP2668382B2 (en) Pseudo fault generation method for testing microprograms
JPH0296848A (en) Method for measuring execution time of instruction
JPS6269172A (en) Test instrument for integrated circuit
JP2929698B2 (en) Microcomputer
JP3700336B2 (en) Programmable controller
JPS59158453A (en) Program test device
JPS61262940A (en) Microprocessor circuit
SU1310873A1 (en) Device for training operators
JPH02214950A (en) Measurement system for instruction executing time
JPH04131939A (en) Test method for one-chip cpu with built-in rom
JPH0231247A (en) Data processor
JPS6247752A (en) Counter circuit for number of instruction executions of information processor
JPH02127740A (en) Emulator
JPS58159150A (en) Diagnosing device for control storage device
JPH0290240A (en) Microcomputer
JPS59216251A (en) Microprogram controller
JPS59144957A (en) Generating method of flash failure
JPS59221710A (en) Measuring system for arithmetic processing time of sequence program
JPS60142741A (en) Microprogram diagnostic device
JPS59148955A (en) Diagnosing device of timing
JPS59218554A (en) Microprogram control device