JPH1115661A - Self-diagnosis method for cpu - Google Patents

Self-diagnosis method for cpu

Info

Publication number
JPH1115661A
JPH1115661A JP9170200A JP17020097A JPH1115661A JP H1115661 A JPH1115661 A JP H1115661A JP 9170200 A JP9170200 A JP 9170200A JP 17020097 A JP17020097 A JP 17020097A JP H1115661 A JPH1115661 A JP H1115661A
Authority
JP
Japan
Prior art keywords
self
cpu
diagnosis
data
stage
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
JP9170200A
Other languages
Japanese (ja)
Inventor
Tomonori Hirai
智則 平井
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP9170200A priority Critical patent/JPH1115661A/en
Publication of JPH1115661A publication Critical patent/JPH1115661A/en
Pending legal-status Critical Current

Links

Landscapes

  • Tests Of Electronic Circuits (AREA)
  • Advance Control (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

PROBLEM TO BE SOLVED: To immediately and precisely detect abnormality in CPU when abnor mality occurs. SOLUTION: The method has a plurality of computing elements 14a and 14b having the same operation functions, and it diagnosis the operation of CPU which sequentially executes a plurality of operation instructions constituted of at least a reading stage, an execution stage and a writing stage in a pipeline system in synchronism with a system clock. The same operation processing is executed on the respective computing elements, operated results obtained in the respective computing elements are compared by self-diagnosis instructions at every prescribed number of operation instructions in an operation instruction string constituted of the plurality of operation instructions. Only when the compared results are not matched, abnormality warning is outputted by using the write stage.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はコンピュータに組込
まれたCPU自体で自己診断を実施するCPUの自己診
断方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a self-diagnosis method for a CPU in which a self-diagnosis is performed by a CPU incorporated in a computer.

【0002】[0002]

【従来の技術】一般に、コンピュータにおいては、図6
に示すように、システムバス1に対してCPU2、RO
M3、RAM4、表示装置5、HDD6等の補助記憶装
置が接続されている。
2. Description of the Related Art Generally, in a computer, FIG.
As shown in FIG.
Auxiliary storage devices such as M3, RAM 4, display device 5, and HDD 6 are connected.

【0003】このようなコンピュータの信頼性を確保す
るため、コンピュータ内にコンピュータ自体の異常を検
出する自己診断機能が組込まれている場合がある。コン
ピュータの異常は、大きく分けてROM3、RAM4、
表示装置5、HDD6等の異常とCPU自体の異常とが
ある。ROM3、RAM4、表示装置5、HDD6等の
異常は、例えばROM3やRAM4等の主記憶装置内に
自己診断用のプログラムを書込み、CPU2でこの自己
診断用のプログラムを実行することによって、各素子に
おける異常の有無を診断できる。
In order to ensure the reliability of such a computer, a self-diagnosis function for detecting an abnormality of the computer itself may be incorporated in the computer. Computer abnormalities are roughly divided into ROM3, RAM4,
There are abnormalities in the display device 5, the HDD 6, etc., and abnormalities in the CPU itself. The abnormality in the ROM 3, the RAM 4, the display device 5, the HDD 6, and the like can be determined by writing a self-diagnosis program in a main storage device such as the ROM 3 or the RAM 4 and executing the self-diagnosis program in the CPU 2, thereby causing a failure in each element. Diagnosis of abnormalities can be made.

【0004】しかし、CPU2自体が異常になった場合
は、自己診断用のプログラムが実行できないので、CP
U2を含む全ての素子の異常の有無を診断できない。こ
のような不都合を解消するために、コンピュータ内に図
6に示す自己診断装置7が組込まれている。
However, if the CPU 2 itself becomes abnormal, a self-diagnosis program cannot be executed.
It is not possible to diagnose whether or not all the elements including U2 are abnormal. In order to solve such inconvenience, a self-diagnosis device 7 shown in FIG. 6 is incorporated in the computer.

【0005】この自己診断装置7内には、ウォッチドッ
グタイマが組込まれており、予め定められた猶予時間T
a経過してもCPU2から信号(データ)が出力されな
い場合は、CPU2に何等かの異常が発生したと判断し
て異常警告出力する。
In this self-diagnosis device 7, a watchdog timer is incorporated, and a predetermined grace time T
If a signal (data) is not output from the CPU 2 even after a elapses, it is determined that some abnormality has occurred in the CPU 2 and an abnormality warning is output.

【0006】[0006]

【発明が解決しようとする課題】しかしながら、図6に
示すように、ウォッチドッグタイマを用いた自己診断装
置7が組込まれたコンピュータにおいても、まだ解消す
べき次のような課題があった。
However, as shown in FIG. 6, a computer incorporating a self-diagnosis device 7 using a watchdog timer still has the following problems to be solved.

【0007】すなわち、前述したウォッチドッグタイマ
の猶予時間Taは一定値に固定されている。この猶予時
間Taを短くするとCPU2に異常が発生した場合は短
時間で異常が発見できる。しかし、この猶予時間Taを
過度に短くすると、CPU2が異常でない場合において
も異常と判断する問題が発生する。逆に、この猶予時間
Taが過度に長いと、CPU2の異常状態が長期間に亘
って検出されない問題が生じる。
That is, the grace period Ta of the watchdog timer is fixed at a constant value. If this delay time Ta is shortened, if an abnormality occurs in the CPU 2, the abnormality can be found in a short time. However, if the delay time Ta is excessively short, there is a problem that the CPU 2 is determined to be abnormal even when the CPU 2 is not abnormal. Conversely, if the delay time Ta is excessively long, a problem arises in that the abnormal state of the CPU 2 is not detected for a long time.

【0008】また、CPU2は継続して信号(データ)
を出力し続けているが、誤った信号(データ)を出力し
続出た場合は、CPU2の異常は全く検出できない。そ
のために、このコンピュータが組込まれた情報処理装置
に重大支障が発生する懸念がある。
The CPU 2 continuously outputs a signal (data)
However, if an erroneous signal (data) is output continuously, no abnormality of the CPU 2 can be detected. Therefore, there is a concern that a serious trouble may occur in the information processing apparatus in which the computer is incorporated.

【0009】本発明はこのような事情に鑑みてなされた
ものであり、CPU内部に自己診断機能を設けることに
よって、短い周期で定期的により確実な自己診断が実施
でき、かつ異常発生時のみ異常警報が出力され、通常の
処理に対する影響を極力抑制した状態で、コンピュータ
全体の信頼性を大幅に向上できるCPUの自己診断方法
を提供することを目的とする。
The present invention has been made in view of such circumstances, and by providing a self-diagnosis function inside a CPU, it is possible to periodically and more reliably perform self-diagnosis in a short cycle, and to perform an abnormality only when an abnormality occurs. An object of the present invention is to provide a CPU self-diagnosis method capable of greatly improving the reliability of the entire computer while outputting an alarm and minimizing the influence on normal processing.

【0010】[0010]

【課題を解決するための手段】本発明は、同一演算機能
を有した複数の演算器を有し、少なくとも読出段階、実
行段階、書込段階から構成された複数の演算命令をシス
テムクロックに同期してパイプライン方式で順次実行し
ていくCPUに適用される。
SUMMARY OF THE INVENTION The present invention has a plurality of operation units having the same operation function, and synchronizes a plurality of operation instructions composed of at least a read stage, an execution stage, and a write stage with a system clock. Then, the present invention is applied to a CPU that sequentially executes in a pipeline manner.

【0011】そして、上記課題を解消するために、本発
明のCPUの自己診断方法においては、複数の各演算命
令からなる演算命令列における所定演算命令数毎に下記
a,b,cの自己診断用命令を実行するようにしてい
る。
In order to solve the above-mentioned problem, in the self-diagnosis method of the CPU according to the present invention, the self-diagnosis of the following a, b, and c is performed for each predetermined number of operation instructions in an operation instruction sequence including a plurality of operation instructions. Instructions for execution.

【0012】a.各演算器に対して同一の演算処理を実
行させ、 b.各演算器で得られた演算結果を比較し、 c.比較結果が不一致の場合のみ書込段階を用いて異常
警報出力する。
A. Causing each arithmetic unit to execute the same arithmetic processing; b. Comparing the operation results obtained by each operation unit; c. Only when the comparison result does not match, an abnormal alarm is output using the writing stage.

【0013】このように構成されたCPUの自己診断方
法の動作原理を説明する。パイプライン方式で複数の演
算命令を順次実行していくCPUにおいては、一般に同
一演算機能を有する複数の演算器が組込まれている。そ
して、複数の演算を同時に実施している。この同一機能
を有する演算器に対して同一の演算処理を実行させた場
合、当然同一の演算結果が得られるはずである。
The principle of operation of the self-diagnosis method for a CPU having the above-described structure will be described. In a CPU that sequentially executes a plurality of operation instructions in a pipeline manner, a plurality of operation units having the same operation function are generally incorporated. Then, a plurality of calculations are performed simultaneously. When the same arithmetic processing is performed on the arithmetic units having the same function, naturally, the same arithmetic result should be obtained.

【0014】したがつて、上述したa,bを実行する演
算命令を通常の業務処理を実行するための演算命令列の
なかに所定間隔で書込むことによって、上述した同一の
演算及び演算結果の比較を容易に実施できる。この場
合、cに示すように、比較結果が不一致の場合のみ書込
段階を用いて異常警報出力する。
Therefore, by writing the arithmetic instructions for executing the above-mentioned a and b at a predetermined interval in the arithmetic instruction sequence for executing the ordinary business processing, the same arithmetic and the result of the arithmetic operation described above are obtained. Comparison can be easily performed. In this case, as shown in c, an abnormal alarm is output using the writing stage only when the comparison results do not match.

【0015】すなわち、異常が検出されなかった場合
は、演算命令を構成する読出段階、実行段階、書込段階
のうちの書込段階にはなにも書込まれていないので、通
常の状態においては、自己診断結果はなにも残らなく、
CPUにおける処理負担が最小限に抑制される。
That is, when no abnormality is detected, nothing is written in the writing stage of the reading stage, the execution stage, and the writing stage constituting the operation instruction. Does not leave any self-diagnosis results,
The processing load on the CPU is minimized.

【0016】また、別の発明は、少なくともレジスタ、
データパス、演算器、データ読出書込ユニットが組込ま
れ、入力されたデータに対して演算器を用いて演算する
CPUの動作を診断するCPUに適用される。
Another invention provides at least a register,
A data path, a computing unit, and a data read / write unit are incorporated, and the present invention is applied to a CPU that diagnoses an operation of a CPU that computes input data using a computing unit.

【0017】そして、この発明のCPUの自己診断方法
においては、レジスタ、データパス、データ読出書込ユ
ニット等のデータの転送及び一時記憶に関する複数の機
能ブロックに対してデータを還流させるためのスキャン
経路を形成し、このスキャン経路へ試験データを還流さ
せて、このスキャン経路を還流した試験データと還流前
の試験データとを比較し、比較結果が不一致の場合のみ
異常警報出力するようにしている。
According to the CPU self-diagnosis method of the present invention, a scan path for returning data to a plurality of functional blocks relating to data transfer and temporary storage such as a register, a data path, and a data read / write unit. Is formed, the test data is returned to the scan path, the test data returned to the scan path is compared with the test data before the return, and an abnormal alarm is output only when the comparison result is inconsistent.

【0018】このように構成されたCPUの自己診断方
法においては、CPU内におけるレジスタ、データパ
ス、データ読出書込ユニット等のデータの転送及び一時
記憶に関する各機能ブロックを各データが通過する場合
は、これらの各機能ブロックが正常な場合は名データそ
のものが変化することはない。
In the self-diagnosis method of the CPU configured as described above, when each data passes through each functional block relating to data transfer and temporary storage such as a register, a data path, and a data read / write unit in the CPU, If these functional blocks are normal, the name data itself does not change.

【0019】したがって、各機能ブロックを一巡するス
キャン経路を形成して、このスキャン経路に試験データ
を還流させて、還流前の試験データと還流後の試験デー
タとを比較して、不一致の場合は、スキャン経路を構成
するいずれかの機能ブロックに異常が生じたと判断でき
る。よって、CPU自体で自己診断できる。
Therefore, a scan path that loops through each functional block is formed, test data is returned to the scan path, and the test data before return and the test data after return are compared. It can be determined that an abnormality has occurred in any of the functional blocks that constitute the scan path. Therefore, self-diagnosis can be performed by the CPU itself.

【0020】[0020]

【発明の実施の形態】以下本発明の各実施形態を図面を
用いて説明する。 (第1実施形態)図1は本発明の第1実施形態の自己診
断方法が適用されるCPUの概略構成を示す模式図であ
る。
Embodiments of the present invention will be described below with reference to the drawings. (First Embodiment) FIG. 1 is a schematic diagram showing a schematic configuration of a CPU to which a self-diagnosis method according to a first embodiment of the present invention is applied.

【0021】レジスタファイル11から出力された各デ
ータd1 ,d2 ,d3 ,d4 は各レジスタ12a,12
b,12c,12dに一旦記憶保持される。各レジスタ
12a〜12dに記憶保持さりれた各データd1 〜d4
は演算指令に従って出力され、各ゲート13a,13
b,13c,13dを介して演算器(ALU)14a,
14bへ入力される。この演算器14a,14bは同一
演算機能を有している。例えばこの実施形態において
は、各演算器14a,14bは共に各レジスタ12a〜
12dの出力の総和を演算する。各演算器14a,14
bから出力された演算結果の各データd5 ,d6 は元の
レジスタファイル11へ書込まれると共に、比較器16
へ入力される。比較器16は自己診断用命令に従って各
演算器14a,14bの演算結果の各データd5 ,d6
を比較して、不一致の場合のみ異常検出警報e1 を出力
する。
The data d 1 , d 2 , d 3 , and d 4 output from the register file 11 are stored in the registers 12a, 12
b, 12c, and 12d. Each data d 1 to d 4 stored and held in each of the registers 12a to 12d
Are output according to the operation command, and the gates 13a, 13
b, 13c, 13d, an arithmetic unit (ALU) 14a,
14b. These computing units 14a and 14b have the same computing function. For example, in this embodiment, each of the arithmetic units 14a and 14b is connected to each of the registers 12a to 12a.
The sum of the outputs of 12d is calculated. Each computing unit 14a, 14
The respective data d 5 and d 6 of the operation result output from b are written into the original register file 11 and the comparator 16
Is input to The comparator 16 outputs the data d 5 and d 6 of the operation results of the operation units 14 a and 14 b in accordance with the self-diagnosis instruction.
Compare the outputs only abnormality detection alarm e 1 not matched.

【0022】このようなハード構成を有するCPUは、
パイプライン方式で複数の演算命令をシステムクロック
に同期して順次実行していく。図2は、パイプライン方
式で順次実行される各演算命令と該当演算命令の実行タ
イミングとプログラムカウンタのカウント値PCとの関
係を示す模式図である。横軸がシステムクロックに対応
する経過時刻tを示し、縦軸はプログラムカウンタのカ
ウント値PCを示している。
The CPU having such a hardware configuration is as follows.
A plurality of operation instructions are sequentially executed in synchronization with a system clock by a pipeline method. FIG. 2 is a schematic diagram showing the relationship between each operation instruction sequentially executed by the pipeline method, the execution timing of the operation instruction, and the count value PC of the program counter. The horizontal axis indicates the elapsed time t corresponding to the system clock, and the vertical axis indicates the count value PC of the program counter.

【0023】図示するように、この実施形態における各
演算命令は、演算対象のデータをレジスタファイル11
または各レジスタ12a〜12dから読出す読出段階
(ステージ)Dと、各演算器14a,14bで該当演算
を実際に実行する2つの実行段階(ステージ)E1 ,E
2 と、演算結果を例えばレジスタファイル11に書込む
書込段階(ステージ)Wとの合計4段階で構成されてい
る。そして、CPUにおける周期T0 のシステムクロッ
クの立上りに同期して各段階(ステージ)が実行され
る。したがって、一つの演算命令は4周期(4T0 )で
実行される。
As shown in the figure, each operation instruction in this embodiment stores data to be operated on in a register file 11.
Alternatively, a reading stage (stage) D for reading from each of the registers 12a to 12d and two execution stages (stages) E 1 and E for actually executing the corresponding operation in each of the arithmetic units 14a and 14b.
2 and a writing stage (stage) W for writing the operation result into the register file 11, for example, in a total of four stages. Then, each stage is executed in synchronization with the rise of the system clock in the period T 0 in the CPU. Therefore, one operation instruction is executed in four cycles (4T 0 ).

【0024】このように構成された複数の演算命令から
なるプログラムはCPU以外の例えばROMやRAM等
の主記憶装置のプロクラムそメモリに記憶保持されてい
る。そして、システムクロックの周期T0 の2倍の周期
(2T0 )で駆動されるプログラムカウンタのカウント
値PCで指定される番地に記憶されている各演算命令1
7が順番に読出されて、CPU内のキューに一旦記憶さ
れた後に、各演算命令17の前記4段階(ステージ)が
前述したシステムクロックに同期して実行される。
The program composed of a plurality of operation instructions configured as described above is stored and held in a program or memory of a main storage device other than the CPU, such as a ROM or a RAM. Each operation instruction 1 stored at the address designated by the count value PC of the program counter driven at a cycle (2T 0 ) twice the cycle T 0 of the system clock
7 are sequentially read and temporarily stored in a queue in the CPU, and then the four stages of each operation instruction 17 are executed in synchronization with the above-described system clock.

【0025】実施形態のCPUのように同一機能を有し
た複数の演算器14a,14bが組込まれている場合
は、同時に2つの演算命令が周期T0 のシステムクロッ
クの各立上りに同期して実行開始される。
[0025] If multiple arithmetic units 14a having the same function as in CPU embodiment, 14b are incorporated, two operation instruction in synchronization with each rising edge of the system clock period T 0 simultaneously executed Be started.

【0026】したがって、図2においては、プログラム
カウンタのカウント値PC=n、(n+1)の2つの演
算命令が同時に開始され、開始から4T0 時間経過のち
に該当2つの演算命令による演算処理が終了する。
[0026] Thus, in FIG. 2, the count value PC = n of the program counter, (n + 1) of two operation instructions are started at the same time, processing is terminated by the appropriate two operation instructions later 4T 0 hours after the start of I do.

【0027】このように、このコンピュータにおける通
常の業務処理を実行するためのプログラムに含まれる演
算(通常)命令17は、2つずつ1周期T0 だけ開始時
刻をずらせながら、順番に実施されていく。そして、各
演算(通常)命令17の演算結果は順次レジスタファイ
ル11へ書込まれる。
As described above, the operation (normal) instructions 17 included in the program for executing the ordinary business processing in this computer are sequentially executed while shifting the start time by one period T 0 every two. Go. Then, the operation result of each operation (normal) instruction 17 is sequentially written to the register file 11.

【0028】そして、この実施形態においては、複数の
演算通常)命令17からなる演算異例列(プログラム)
における所定演算命令数毎に自己診断命令18が挿入さ
れている。
In this embodiment, an unusual operation sequence (program) consisting of a plurality of operation normal) instructions 17
, A self-diagnosis instruction 18 is inserted for each predetermined number of operation instructions.

【0029】この自己診断命令18は、1行または複数
行で構成されている。そして、下記a.b.cの処理
(演算)を実行する命令である。 a.各演算器14a,14bに対して同一の演算処理を
実行する。
The self-diagnosis instruction 18 is composed of one or more lines. Then, a. b. This is an instruction for executing the process (operation) of c. a. The same arithmetic processing is performed on each of the arithmetic units 14a and 14b.

【0030】b.各演算器14a,14bで得られた演
算結果d5 ,d6 を比較する。 c.比較結果d5 ,d6 が不一致の場合のみ書込段階W
を用いて異常警報出力する。
B. The operation results d 5 and d 6 obtained by the operation units 14a and 14b are compared. c. Only when the comparison results d 5 and d 6 do not match, the writing stage W
To output an abnormal alarm.

【0031】このa〜cの処理(演算)を実行する1行
または複数行で形成された各行の命令は、図示するよう
に、演算対象の同一の試験データをレジスタファイルま
たは各レジスタから読出す読出段階(ステージ)Dと、
該当演算を各演算器14a,14bで実行する2つの実
行段階(ステージ)E1 ,E2 のみで構成されている。
また、別の命令は各演算器で得られた演算結果d5 ,d
6 を読出す読出段階(ステージ)Dと、読出した演算結
果d5 ,d6 の比較を実行する2つの実行段階(ステー
ジ)E1 ,E2 のみで構成されている。さらに、別の命
令は比較結果を読出す読出段階(ステージ)Dと比較結
果が不一致の場合のみ異常警報をレジスタファイル11
へ書込む書込段階(ステージ)Wで構成されている。し
たがって、比較結果が一致の場合は書込段階(ステー
ジ)Wは実行されない。
As shown in the figure, the instruction of each line formed of one or more lines for executing the processes (operations) a to c reads the same test data to be operated from a register file or each register as shown in the figure. A reading stage (stage) D;
It is composed of only two execution stages (stages) E 1 and E 2 for executing the corresponding operation in each of the arithmetic units 14a and 14b.
Another instruction is the operation result d 5 , d obtained by each operation unit.
It comprises only a reading stage (stage) D for reading 6 and two execution stages (stages) E 1 and E 2 for comparing the read operation results d 5 and d 6 . Further, another instruction is to output an abnormality alarm to the register file 11 only when the comparison result does not match the reading stage (stage) D for reading the comparison result.
A writing stage (stage) W for writing data to Therefore, if the comparison results match, the writing stage (stage) W is not executed.

【0032】したがって、この自己診断命令18によっ
て、上述したa,b,cの処理が自動的に実行され、各
演算器14a,14bの正常、異常が自動的に判断され
て、異常の場合のみ自己診断結果が記憶されて外部に出
力される。逆に、正常な場合は、比較結果である自己診
断結果は記憶されたり出力されることはない。
Therefore, the self-diagnosis instruction 18 automatically executes the processing of a, b, and c described above, and automatically determines whether each of the arithmetic units 14a and 14b is normal or abnormal. The self-diagnosis result is stored and output to the outside. On the other hand, if normal, the self-diagnosis result, which is the comparison result, is not stored or output.

【0033】このように通常の業務プログラムにおける
通常命令列に対して所定演算命令数毎に自己診断命令1
8を挿入することによって、一定周期でCPU内に組込
まれた演算器14a,14bに対する自己診断が自動的
に実施される。しかも、この自己診断命令18を挿入す
る間隔を変更することによつて、自己診断の実行周期を
任意に調整できる。
As described above, the self-diagnostic instruction 1
By inserting 8, the self-diagnosis for the arithmetic units 14a and 14b incorporated in the CPU at a fixed period is automatically performed. In addition, by changing the interval at which the self-diagnosis command 18 is inserted, the execution cycle of the self-diagnosis can be arbitrarily adjusted.

【0034】したがって、たとえ自己診断の実行周期を
短く設定したとしても、従来のウォッチドッグタイマを
採用した自己診断装置7のように正常状態を異常と判定
することはない。
Therefore, even if the execution cycle of the self-diagnosis is set short, the normal state is not determined to be abnormal as in the self-diagnosis apparatus 7 employing the conventional watchdog timer.

【0035】その結果、自己診断の実行周期を短く設定
することによって、CPUの異常発生を短時間でかつ正
確に検出でき、このCPUが組込まれたコンピュータの
信頼性を大幅に向上できる。
As a result, by setting the execution cycle of the self-diagnosis to be short, the occurrence of an abnormality in the CPU can be accurately detected in a short time, and the reliability of the computer in which the CPU is incorporated can be greatly improved.

【0036】また、診断結果が正常の場合においては、
自己診断結果はなにも残らなく、CPUにおける処理負
担が最小限に抑制される。また、操作者にとっても、正
常な自己診断結果を確認する技術的意味はないので、正
常な自己診断結果を確認する煩わしさから開放される。
When the diagnostic result is normal,
No self-diagnosis result remains, and the processing load on the CPU is minimized. Further, since there is no technical meaning for the operator to confirm the normal self-diagnosis result, the trouble of confirming the normal self-diagnosis result is relieved.

【0037】なお、上述した第1実施形態においては、
自己診断命令18は通常の業務用プログラムの各演算
(通常)命令17相互間に挿入された状態でCPU以外
の主記憶装置に書込まれていると説明した。
In the first embodiment described above,
It has been described that the self-diagnosis command 18 is written in the main storage device other than the CPU while being inserted between the operation (normal) commands 17 of the normal business program.

【0038】しかし、この自己診断命令18をCPU内
の別の専用レジスタに記憶保持して、通常の業務プログ
ラムの各演算(通常)命令17がプログラムカウンタで
順次読出されてCPU内のキューに書込まれる時点で、
この自己診断命令18を所定演算(通常)命令数毎に挿
入することも可能である。
However, the self-diagnosis instruction 18 is stored and held in another dedicated register in the CPU, and each operation (normal) instruction 17 of the ordinary business program is sequentially read out by the program counter and written into a queue in the CPU. At the time
It is also possible to insert the self-diagnosis command 18 for every predetermined number of calculation (normal) commands.

【0039】この場合、図2に示すように、自己診断命
令18はプログラムカウンタのカウント値PCに影響を
与えることはない。 (第2実施形態)図3は本発明の第2実施形態の自己診
断方法が適用されるCPUの概略構成を示す模式図であ
る。
In this case, as shown in FIG. 2, the self-diagnosis instruction 18 does not affect the count value PC of the program counter. (Second Embodiment) FIG. 3 is a schematic diagram showing a schematic configuration of a CPU to which a self-diagnosis method according to a second embodiment of the present invention is applied.

【0040】CPU内には、図1で示すレジスタファイ
ル11、各レジスタ12a〜12d、演算器14a,1
4b、レジスタ15a,15b等のハード構成部材が収
納されている。
In the CPU, the register file 11, the registers 12a to 12d, and the arithmetic units 14a and 14 shown in FIG.
4b, hardware components such as registers 15a and 15b are housed.

【0041】しかし、このCPUをデータの流れの観点
から見ると、このCPUは、レジスタ、データパス、演
算器、データ読出書込ユニット、キャッシュメモリ等の
複数の機能ブロックで構成されていると見なせる。
However, from the viewpoint of data flow, this CPU can be regarded as being composed of a plurality of functional blocks such as a register, a data path, an arithmetic unit, a data read / write unit, and a cache memory. .

【0042】そして、この第2実施形態のCPUの自己
診断方法は、この複数の機能ブロックのうち、データの
転送及び一時記憶等の該当機能ブロックを経由すること
によってもデータが変化しない特性を有する各機能ブロ
ックが正常に動作するか否かを自己診断する。
The self-diagnosis method of the CPU according to the second embodiment has a characteristic that data does not change even when the data passes through a corresponding function block such as data transfer and temporary storage among the plurality of function blocks. A self-diagnosis is made as to whether each functional block operates normally.

【0043】すなわち、図3に示すように、データの転
送及び一時記憶等の該当機能ブロックを経由することに
よってもデータが変化しない、レジスタファイル21、
データパス制御部22aで制御されるデータパス22、
読出書込ユニット23、キャッシュメモリ24と自己診
断制御部25とでスキャン経路26をソフト的に形成す
る。したがって、経由することよって基本的にデータ値
が変化する演算器はこのスキャン経路26に含まれな
い。
That is, as shown in FIG. 3, the data in the register file 21 does not change even through the corresponding function blocks such as data transfer and temporary storage.
A data path 22 controlled by the data path control unit 22a;
The read / write unit 23, the cache memory 24, and the self-diagnosis control unit 25 form a scan path 26 in software. Therefore, an arithmetic unit whose data value basically changes by passing through is not included in the scan path 26.

【0044】自己診断制御部25内には、自己診断命令
を実際に実行する実行部27と、期待値メモリ28と、
処理結果メモリ29と、比較部30とで構成されてい
る。また外部メモリ31内には、自己診断命令とこの自
己診断に使用する試験データとが記憶されている。
In the self-diagnosis control unit 25, an execution unit 27 for actually executing a self-diagnosis instruction, an expected value memory 28,
It comprises a processing result memory 29 and a comparing unit 30. The external memory 31 stores a self-diagnosis command and test data used for the self-diagnosis.

【0045】期待値メモリ28は外部メモリ31から読
取ってスキャン経路26へ還流させる試験データdS
期待値として試験終了まで記憶保持する。処理結果メモ
リ29はスキャン経路26を一巡した試験データdQ
一時記憶する。比較部30は期待値メモリ28の試験デ
ータdS と処理結果メモリ29の試験データdQ とを比
較して、両者が不一致の場合のみ、異常検出警報e2
出力する。
The expected value memory 28 stores the test data d S read from the external memory 31 and returned to the scan path 26 as an expected value until the end of the test. Processing result memory 29 temporarily stores the test data d Q that round the scan path 26. Comparing unit 30 compares the test data d Q test data d S and the processing result memory 29 of the expected value memory 28, if both do not match only, and outputs an abnormality detection alarm e 2.

【0046】このCPUには例えば1個の演算器が組込
まれており、図1に示しCPUと同様に、業務プログラ
ムを構成する複数の演算(通常)命令17をパイプライ
ン方式で周期T0 のシステムクロックの立上りに同期し
て順次実行していく。
This CPU incorporates, for example, one arithmetic unit. Like the CPU shown in FIG. 1, a plurality of arithmetic (normal) instructions 17 constituting a business program are transmitted in a pipeline manner at a period T 0 . It is executed sequentially in synchronization with the rise of the system clock.

【0047】そして、外部から自己診断の割込信号が入
力すると、自己診断制御部24は図5に示す割込処理を
実行する。すなわち、割込信号が入力すると、現在、実
行段階(ステージ)が実行中である演算(通常)命令1
7に対しては、該当演算(通常)命令17に対しては最
後のレジスタファイルに対する書込段階(ステージ)W
までを終了させる(S1)。
Then, when a self-diagnosis interrupt signal is input from the outside, the self-diagnosis control unit 24 executes the interrupt processing shown in FIG. That is, when an interrupt signal is input, the operation (normal) instruction 1 whose execution stage (stage) is currently being executed is
7, the corresponding operation (normal) instruction 17 is written to the last register file in the writing stage (stage) W
(S1).

【0048】次に、読出(ステージ)段階Dが実行中又
は終了済みで、かつ実行段階(ステージ)がまだ開始し
ていない演算(通常)命令17に対しては、該当演算
(通常)命令17のアドレス値(プログラムカウンタの
カウント値PC)を読出し(S2)、そのアドレス値
(プログラムカウンタのカウント値PC)を記憶保持す
る(S3)。その後、この実行段階(ステージ)がまだ
開始していない演算命令(通常命令)17をクリアする
(S4)。
Next, for the operation (normal) instruction 17 in which the reading (stage) stage D is being executed or completed and the execution stage (stage) has not yet started, the corresponding operation (normal) instruction 17 The address value (count value PC of the program counter) is read out (S2), and the address value (count value PC of the program counter) is stored and held (S3). Thereafter, the operation instruction (normal instruction) 17 whose execution stage (stage) has not yet started is cleared (S4).

【0049】以上の準備処理が終了すると、外部メモリ
31から自己診断命令を読出して実行部27で実行す
る。先ず最初に、外部メモリ31から試験データdS
読取って、期待値として期待値メモリ28へ書込む(S
5)。そして、この試験データdS を実行部27からス
キャン経路26へ送出し(S6)、自己診断命令を実行
させる(S7)。すなわち、スキャン経路26の各機能
ブロック21,22,23.24へ動作指令を送出し
て、このスキャン経路26へ送出した試験データdS
還流させる。
When the above preparation processing is completed, the self-diagnosis command is read from the external memory 31 and executed by the execution unit 27. First, the test data d S is read from the external memory 31 and written into the expected value memory 28 as an expected value (S
5). Then, sends the test data d S from the execution unit 27 to the scan path 26 (S6), to execute the self-diagnosis command (S7). That is, an operation command is sent to each of the function blocks 21, 22, 23.24 of the scan path 26, and the test data d S sent to the scan path 26 is returned.

【0050】そして、最終のキャッシュメモリ24から
読出された試験データdQ を読取り(S8)、処理結果
メモリ29へ書込む(S9)。次に、処理結果メモリ2
9に記憶されたスキャン経路26を経由した試験データ
Q と期待値メモリ28に記憶された期待値としてのス
キャン経路26を経由する前の試験データdS とを比較
する(S10)。
[0050] Then, the final read test data d Q read from the cache memory 24 (S8), writes the processing result memory 29 (S9). Next, the processing result memory 2
Comparing the previous test data d S passing through the scan path 26 as the expected value stored in the test data d Q and the expected value memory 28 via a scan path 26 which is stored in the 9 (S10).

【0051】両者が一致する場合は(S11)、このス
キャン経路26を形成するレジスタファイル21、デー
タパス22、読出書込ユニット23、キャッシュメモリ
24の各機能ブロックは正常であると判断する。この場
合、なにも処理をしない。
If they match (S11), it is determined that the function blocks of the register file 21, data path 22, read / write unit 23, and cache memory 24 forming the scan path 26 are normal. In this case, no processing is performed.

【0052】また、不一致の場合(S11)、スキャン
経路26を形成するレジスタファイル21、データパス
22、読出書込ユニット23、キャッシュメモリ24の
うちのいずれか一つ又は複数の機能ブロックが異常であ
ると判断できるので、異常検出警報e2 を出力する(S
12)。
If there is a mismatch (S11), one or more of the function blocks of the register file 21, data path 22, read / write unit 23, and cache memory 24 forming the scan path 26 are abnormal. it can be determined that there is, outputs an abnormality detection alarm e 2 (S
12).

【0053】図5に示すこの割込処理が終了すると、通
常の業務プログラムの各演算(通常)命令17を先に記
憶保持したアドレス位置(プログラムカウント値PC)
から再開する。
When this interrupt processing shown in FIG. 5 is completed, each operation (normal) instruction 17 of the normal business program is stored at the address position (program count value PC).
To resume from.

【0054】このように構成された第2実施形態のCP
Uの自己診断方法においては、図4に示すように、通常
の業務プログラムにおける各演算(通常)命令17をパ
イプライン方式で実行している状態において、外部から
自己診断の割込信号が入力すると、演算(通常)命令1
7の実行を一旦停止して、自己診断命令18aを実行す
る。そして、異常を検出した場合のみ異常検出警報e2
が出力され、正常時にはなにも出力されない。
The CP of the second embodiment configured as described above
In the self-diagnosis method U, as shown in FIG. 4, when an operation (normal) instruction 17 in a normal business program is executed in a pipeline manner, an external self-diagnosis interrupt signal is input. , Operation (normal) instruction 1
7 is temporarily stopped, and the self-diagnosis instruction 18a is executed. Only when an abnormality is detected, an abnormality detection alarm e 2
Is output, and nothing is output during normal operation.

【0055】なお、自己診断を実行するための割込信号
は、例えばタイマ等を用いて一定時間間隔で自動的に発
生される。このように構成されたCPUの自己診断方法
においても、CPUを構成するデータ転送やデータ一時
記憶のための各機能ブロックが一定周期で自動的に自己
診断される。したがって、図1に示した第1実施形態の
自己診断方法とほぼ同様の効果を得ることができる。
The interrupt signal for executing the self-diagnosis is automatically generated at fixed time intervals using, for example, a timer. In the CPU self-diagnosis method configured as described above, each functional block for data transfer and data temporary storage constituting the CPU is automatically self-diagnosed at a constant cycle. Therefore, substantially the same effects as those of the self-diagnosis method of the first embodiment shown in FIG. 1 can be obtained.

【0056】さらに、上述した自己診断方法が適用され
る複数のCPUを組込んで信頼性を向上させるた二重化
計算機システムにおいて、待機系と指定された側のCP
Uで上述した自己診断を実施するように構成することが
できる。この場合、稼働系のCPUは自己診断を実施し
ない。したがって、実祭の教務処理能率を低下させず
に、二重化計算機システム全体の信頼性をさらに向上て
きる、
Further, in a redundant computer system in which a plurality of CPUs to which the above-described self-diagnosis method is applied is incorporated to improve reliability, a CP on a side designated as a standby system is provided.
U can be configured to perform the self-diagnosis described above. In this case, the active CPU does not perform the self-diagnosis. Therefore, the reliability of the entire redundant computer system can be further improved without lowering the efficiency of the educational processing at the festival.

【0057】[0057]

【発明の効果】以上説明したように本発明のCPU自己
診断方法においては、CPU内部に一定周期で自動的に
実行される自己診断機能を設けている。したがって、短
い周期で定期的により確実な自己診断が実施でき、かつ
異常発生時のみ異常警報が出力され、通常の処理に対す
る影響を極力抑制した状態で、コンピュータ全体の信頼
性を大幅に向上できる。
As described above, in the CPU self-diagnosis method of the present invention, a self-diagnosis function which is automatically executed at a constant period is provided inside the CPU. Therefore, a more reliable self-diagnosis can be periodically performed in a short cycle, and an abnormality alarm is output only when an abnormality occurs, so that the reliability of the entire computer can be significantly improved while the influence on normal processing is minimized.

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

【図1】 本発明の第1実施形態の自己診断方法が採用
されたCPUの概略構成を示す模式図
FIG. 1 is a schematic diagram showing a schematic configuration of a CPU employing a self-diagnosis method according to a first embodiment of the present invention;

【図2】 同第1実施形態のCPUにおける各演算命令
のパイプライン処理を示す模式図
FIG. 2 is a schematic diagram showing pipeline processing of each operation instruction in the CPU according to the first embodiment;

【図3】 本発明の第2実施形態の自己診断方法が採用
されたCPUの概略構成を示す模式図
FIG. 3 is a schematic diagram illustrating a schematic configuration of a CPU employing a self-diagnosis method according to a second embodiment of the present invention;

【図4】 同第2実施形態のCPUにおける各演算命令
のパイプライン処理を示す模式図
FIG. 4 is a schematic diagram showing pipeline processing of each operation instruction in the CPU according to the second embodiment;

【図5】 同第2実施形態の自己診断方法の動作を示す
流れ図
FIG. 5 is a flowchart showing the operation of the self-diagnosis method according to the second embodiment.

【図6】 従来の自己診断装置が組込まれたコンピュー
タの概略構成図
FIG. 6 is a schematic configuration diagram of a computer in which a conventional self-diagnosis device is incorporated.

【符号の説明】[Explanation of symbols]

11,21…レジスタファイル 12a〜12d,15a,15b…レジスタ 14a,14b…演算器 16…比較器 17…演算(通常)命令 18,18a…自己診断命令 22…データパス 23…読出書込部 24…キャッシュメモリ 25…自己診断制御部 26…スキャン経路 27…実行部 28…期待値メモリ 29…処理結果メモリ 30…比較部 31…外部メモリ 11, 21 ... register file 12a to 12d, 15a, 15b ... register 14a, 14b ... arithmetic unit 16 ... comparator 17 ... operation (normal) instruction 18, 18a ... self-diagnosis instruction 22 ... data path 23 ... read / write unit 24 ... Cache memory 25 ... Self-diagnosis control unit 26 ... Scan path 27 ... Execution unit 28 ... Expected value memory 29 ... Processing result memory 30 ... Comparison unit 31 ... External memory

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 同一演算機能を有した複数の演算器を有
し、少なくとも読出段階、実行段階、書込段階から構成
された複数の演算命令をシステムクロックに同期してパ
イプライン方式で順次実行していくCPUの動作を診断
するCPUの自己診断方法において、 前記複数の各演算命令からなる演算命令列における所定
演算命令数毎に下記a,b,cの自己診断用命令を実行
するCPUの自己診断方法。 a.前記各演算器に対して同一の演算処理を実行させ、 b.各演算器で得られた演算結果を比較し、 c.比較結果が不一致の場合のみ前記書込段階を用いて
異常警報出力する。
1. A plurality of operation units having the same operation function, and sequentially execute a plurality of operation instructions composed of at least a read stage, an execution stage, and a write stage in a pipeline system in synchronization with a system clock. A self-diagnosis method of a CPU for diagnosing the operation of a CPU that performs a self-diagnosis instruction of the following a, b, and c for each predetermined number of operation instructions in an operation instruction sequence including the plurality of operation instructions. Self-diagnosis method. a. Causing each of the arithmetic units to execute the same arithmetic processing; b. Comparing the operation results obtained by each operation unit; c. Only when the comparison result is inconsistent, an abnormal alarm is output using the writing step.
【請求項2】 少なくともレジスタ、データパス、演算
器、データ読出書込ユニットが組込まれ、入力されたデ
ータに対して前記演算器を用いて演算するCPUの動作
を診断するCPUの自己診断方法において、 前記レジスタ、データパス、データ読出書込ユニット等
のデータの転送及び一時記憶に関する複数の機能ブロッ
クに対してデータを還流させるためのスキャン経路を形
成し、 このスキャン経路へ試験データを還流させて、 このスキャン経路を還流した試験データと還流前の試験
データとを比較し、 比較結果が不一致の場合のみ異常警報出力するCPUの
自己診断方法。
2. A self-diagnosis method for a CPU in which at least a register, a data path, a computing unit, and a data read / write unit are incorporated and which diagnoses an operation of the CPU which performs an operation on inputted data by using the computing unit. Forming a scan path for returning data to a plurality of functional blocks relating to data transfer and temporary storage of the register, data path, data read / write unit, etc., and returning test data to the scan path; A self-diagnosis method for a CPU that compares test data returned through the scan path with test data before the return, and outputs an abnormal alarm only when the comparison result does not match.
JP9170200A 1997-06-26 1997-06-26 Self-diagnosis method for cpu Pending JPH1115661A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9170200A JPH1115661A (en) 1997-06-26 1997-06-26 Self-diagnosis method for cpu

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9170200A JPH1115661A (en) 1997-06-26 1997-06-26 Self-diagnosis method for cpu

Publications (1)

Publication Number Publication Date
JPH1115661A true JPH1115661A (en) 1999-01-22

Family

ID=15900533

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9170200A Pending JPH1115661A (en) 1997-06-26 1997-06-26 Self-diagnosis method for cpu

Country Status (1)

Country Link
JP (1) JPH1115661A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008515064A (en) * 2004-09-29 2008-05-08 インテル・コーポレーション Executing checker instructions in a redundant multithreaded environment
JP2009037499A (en) * 2007-08-03 2009-02-19 Furuno Electric Co Ltd Onboard automatic toll collection device, and onboard system using the same
JP2012208662A (en) * 2011-03-29 2012-10-25 Toyota Motor Corp Multi-thread processor
JP2018206375A (en) * 2017-06-07 2018-12-27 エイアールエム リミテッド Programmable instruction buffering
JP2020165802A (en) * 2019-03-29 2020-10-08 株式会社エヌエスアイテクス Semiconductor device and method for testing semiconductor device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008515064A (en) * 2004-09-29 2008-05-08 インテル・コーポレーション Executing checker instructions in a redundant multithreaded environment
JP4691105B2 (en) * 2004-09-29 2011-06-01 インテル・コーポレーション Executing checker instructions in a redundant multithreaded environment
JP2009037499A (en) * 2007-08-03 2009-02-19 Furuno Electric Co Ltd Onboard automatic toll collection device, and onboard system using the same
JP2012208662A (en) * 2011-03-29 2012-10-25 Toyota Motor Corp Multi-thread processor
JP2018206375A (en) * 2017-06-07 2018-12-27 エイアールエム リミテッド Programmable instruction buffering
US11579889B2 (en) 2017-06-07 2023-02-14 Arm Limited Programmable instruction buffering for accumulating a burst of instructions
JP2020165802A (en) * 2019-03-29 2020-10-08 株式会社エヌエスアイテクス Semiconductor device and method for testing semiconductor device

Similar Documents

Publication Publication Date Title
EP0461792B1 (en) Master/slave checking system
JPH052654A (en) Method and circuit for detecting fault of microcomputer
JPH1115661A (en) Self-diagnosis method for cpu
JPH07141176A (en) Command retrial control system
JPS6324440A (en) System managing apparatus for multiplex processor system
KR19990057809A (en) Error prevention system
JP2679575B2 (en) I / O channel fault handling system
JP3109573B2 (en) Fault LSI detection method
JP2000311155A (en) Multiprocessor system and electronic equipment
JP2808985B2 (en) Information processing device and debug device
JPS6170645A (en) Data collecting device for analysis of trouble cause
JPS6146535A (en) Pseudo error setting control system
JPH06214831A (en) Abnormality detector for central processing unit
JPS6061839A (en) Fault diagnostic processing system of logical device
JP2924732B2 (en) Self-diagnosis method for information processing device
JPS60195649A (en) Error reporting system of microprogram-controlled type data processor
JPH07219609A (en) Information processor
JPH07230432A (en) Calculating device
JPH0341528A (en) Diagnostic device in computer
JPS6074052A (en) History memory control system
JPH01258143A (en) Microcomputer monitoring system
JPH0769846B2 (en) Error processing circuit verification device
JPS61177548A (en) Retrying control system
JPH0498326A (en) Microprocessor
JPS60258653A (en) Information processor