JPH05298135A - Processing system for cpu - Google Patents

Processing system for cpu

Info

Publication number
JPH05298135A
JPH05298135A JP4099073A JP9907392A JPH05298135A JP H05298135 A JPH05298135 A JP H05298135A JP 4099073 A JP4099073 A JP 4099073A JP 9907392 A JP9907392 A JP 9907392A JP H05298135 A JPH05298135 A JP H05298135A
Authority
JP
Japan
Prior art keywords
program
register
time
work block
block
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.)
Withdrawn
Application number
JP4099073A
Other languages
Japanese (ja)
Inventor
Kazuhisa Hosoya
和久 細谷
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 Aerospace Systems Ltd
Original Assignee
NEC Aerospace Systems Ltd
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 Aerospace Systems Ltd filed Critical NEC Aerospace Systems Ltd
Priority to JP4099073A priority Critical patent/JPH05298135A/en
Publication of JPH05298135A publication Critical patent/JPH05298135A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Retry When Errors Occur (AREA)

Abstract

PURPOSE:To use a temporarily saved program again at the time of run-away by providing a history area to store the temporarily saved program for each block every time the processing of a working block is completed. CONSTITUTION:This system is provided with a register 2 to update the program for each block and to temporarily store it, program storage part 4A storing a basic program, and storage part 4 equipped with history areas 49 and 4, to successively store execution programs. In this case, after the arithmetic result or the values of program counter remaining in the respective registers of a CPU 1 are temporarily saved in the history areas 4B and 4C after the processing of the preceding working block is completed, they are read out to the register 2 again and used as the program of the next working block. After the lapse of prescribed time, the register 2 is reset. At the time of runaway, the register 2 is forcedly reset after the lapse of time as the destruction of the program counter, and data already stored in the history areas are read out to the register again.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、CPUの処理方式に関
し、特にCPUのレジスタに登録されたプログラムによ
り処理実行中において、プログラムが暴走した場合に
は、この暴走を自己復帰させることができるCPUの処
理方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a CPU processing system, and more particularly, to a CPU capable of self-recovering the runaway when the program runs out during execution of processing by a program registered in a register of the CPU. Regarding the processing method of.

【0002】[0002]

【従来の技術】従来、この種のCPUの処理方式は、図
4に示すように、プログラムを一時記憶するレジスタ1
2およびプログラムの作業手順により作業ブロックごと
の処理を行うプロセッサ13を備えたCPU11と、プ
ログラムを外部記憶しレジスタ12に読み込ませる記憶
部14と、作業ブロックの処理終了ごとのリセット時間
を監視しているウォッチドッグタイマ15とから構成さ
れている。次に従来例の動作を図5(a),(b)のの
動作フローにより説明する。
2. Description of the Related Art Conventionally, as shown in FIG. 4, a CPU processing system of this type has a register 1 for temporarily storing a program.
2 and a CPU 11 having a processor 13 that performs processing for each work block according to the work procedure of the program, a storage unit 14 that externally stores the program and reads the program into a register 12, and a reset time for each end of the work block processing is monitored. It is composed of a watchdog timer 15 that is present. Next, the operation of the conventional example will be described with reference to the operation flow of FIGS.

【0003】図5(a)は暴走のない正常動作フロー、
(b)は暴走時のフローである。前提として、ウォッチ
ドッグタイマを100msecとする。図5(a)にお
いて、作業ブロックa,b,cを処理時間が100ms
ec以内である様に分割し、プログラムを実行する。各
作業ブロックの開始と同時にタイマのカウント・ダウン
が始まる。正常動作時は、各作業ブロック終了後にタイ
マの値をリセットし、再び100msecに設定し、作
業ブロックb実行中に暴走が発生した場合、100ms
ec以内には処理は終了しなくなるので、タイマは10
0msecをカウントしタイムアップする。タイムアッ
プしたら、ウォッチドッグタイマはCPUのReset
端子に対してアラーム信号を出力し、それを受けたCP
UはIPレジスタを0にする。IPレジスタが0になれ
ば、プログラムの実行はプログラムの先頭から再開され
る。つまり、作業ブロックaがプログラムの先頭である
とすれば、作業ブロックaから処理が実行され、ウォッ
チドッグタイマも100msecからカウンタダウンを
始める。
FIG. 5A shows a normal operation flow without runaway,
(B) is a flow at the time of runaway. As a premise, the watchdog timer is 100 msec. In FIG. 5A, the work blocks a, b, and c have a processing time of 100 ms.
Divide so that it is within ec and execute the program. The timer starts counting down at the same time as the start of each work block. During normal operation, the value of the timer is reset after the end of each work block and is set to 100 msec again. If a runaway occurs during the execution of work block b, 100 ms is set.
Since the processing will not end within ec, the timer will be 10
Count 0 msec and time up. When the time is up, the watchdog timer will reset the CPU
CP that outputs an alarm signal to the terminal and receives it
U sets the IP register to 0. When the IP register becomes 0, the program execution is restarted from the beginning of the program. That is, assuming that the work block a is the head of the program, the process is executed from the work block a, and the watchdog timer also starts the countdown from 100 msec.

【0004】[0004]

【発明が解決しようとする課題】この従来のCPU処理
方式のウォッチドッグタイマでは、プログラムの誤りに
よる暴走であるかどうかは特に関知していないので、暴
走した作業ブロックを再度処理を実行させても暴走しな
いという保障が得られない欠点がある。また、各作業ブ
ロックを実行するプログラムをその都度履歴として記憶
していないので、プログラムのミスによる暴走かどうか
判定できない欠点もあった。
Since the watchdog timer of the conventional CPU processing system does not particularly know whether or not a runaway is caused by a program error, even if the runaway work block is re-executed. It has the drawback that it cannot guarantee that it will not run away. In addition, since the program that executes each work block is not stored as a history each time, there is a drawback that it is not possible to determine whether or not the program is out of control due to a mistake in the program.

【0005】[0005]

【課題を解決するための手段】本発明のCPUの処理方
式は作業ブロックの処理終了ごとに使用されたプログラ
ムを一時退避させ、この退避させたプログラムを再度次
の作業ブロックのために読み出して一時記憶する手段
と、前記一時退避させたプログラムを各作業ブロックご
とに記憶する2個の履歴エリアを有する。
According to the CPU processing method of the present invention, a program used each time the processing of a work block is completed is temporarily saved, and the saved program is read again for the next work block and temporarily saved. It has a means for storing and two history areas for storing the temporarily saved program for each work block.

【0006】[0006]

【実施例】次に本発明について図面を参照して説明す
る。図1は本発明の一実施例のブロック図、図2は本実
施例の正常動作時の動作フロー、図3は本実施例の暴走
時の動作フローである。図1の実施例は後述する作業ブ
ロックごとにプログラムを更新して一時記憶するレジス
タ2、および従来と同様のプロセッサ13を有するCP
U1と、基となるプログラムを記憶しているプログラム
記憶部4Aおよび後述する前の作業ブロックの実行プロ
グラムを順次記憶して行く履歴エリア4B,4Cを有す
る記憶部4とから構成される。
The present invention will be described below with reference to the drawings. 1 is a block diagram of an embodiment of the present invention, FIG. 2 is an operation flow of the present embodiment during normal operation, and FIG. 3 is an operation flow of the present embodiment during runaway. In the embodiment shown in FIG. 1, a CP having a register 2 for updating and temporarily storing a program for each work block, which will be described later, and a processor 13 similar to the conventional one.
U1 and a program storage unit 4A that stores a base program and a storage unit 4 that has history areas 4B and 4C that sequentially store the execution programs of the previous work blocks described later.

【0007】次に本実施例の動作を図2,図3により説
明する。図2の正常動作手順のフローは下記のようなス
テップとなる。
Next, the operation of this embodiment will be described with reference to FIGS. The flow of the normal operation procedure of FIG. 2 is as follows.

【0008】ステップ21,前の作業ブロックのプログ
ラムをレジスタ2から履歴エリア1に格納する。
Step 21, the program of the previous work block is stored in the history area 1 from the register 2.

【0009】ステップ22,履歴エリア1に登録した時
にフラグを立てるようにする。
In step 22, a flag is set when registering in the history area 1.

【0010】ステップ23,リセット後立っているフラ
グを確認し、履歴エリア1から格納したプログラムデー
タをレジスタ2に戻し、このプログラムで作業ブロック
aの処理を実行する。
Step 23: After the reset, the flag set up is confirmed, the program data stored from the history area 1 is returned to the register 2, and the processing of the work block a is executed by this program.

【0011】ステップ24,作業ブロックaを実行した
プログラムをレジスタから履歴エリア2に書き込む。
Step 24, the program that executed the work block a is written in the history area 2 from the register.

【0012】ステップ25,履歴エリア2に登録した時
フラグをたおす。
Step 25: The flag is set when registered in the history area 2.

【0013】ステップ26,リセット後たおれているフ
ラグを確認し、履歴エリア2から格納したプログラムデ
ータをレジスタ2に戻し、このプログラムで作業ブロッ
クbの処理を実行する。
Step 26: After checking the flag that has been reset, the program data stored from the history area 2 is returned to the register 2, and the processing of the work block b is executed by this program.

【0014】このように作業ブロックごとに前の作業ブ
ロック処理終了後にCPU内の各レジスタに残っている
演算結果やプログラムカウンタの値を履歴エリアに一時
退避させた後に、再度レジスタに読み出して次の作業ブ
ロックのプログラムとして利用して行く。又、レジスタ
は各ステップごとに所定時間(例えば100ms)経過
するとリセットがかけられる。
Thus, for each work block, after the previous work block processing is completed, the calculation result and the value of the program counter remaining in each register in the CPU are temporarily saved in the history area, and then read again in the register to read the next data. Use it as a work block program. The register is reset at each step after a predetermined time (for example, 100 ms) has elapsed.

【0015】次に図3の暴走時の動作フローは、次のよ
うなステップとなる。ここでステップ21からステップ
23までは前述のステップと同様である。ここで本実施
例では暴走が例えばプログラムカウンタの破壊として時
間経過して行き100ms経過すると、強制的にレジス
タ2にリセットがかけられる。レジスタ2では既に格納
されている履歴エリア1のプログラムデータを再度レジ
スタ2に読み出し(ステップ23A)、作業ブロックa
の処理を再実行する。このように前の作業ブロックのプ
ログラムを履歴エリアに順次記憶して、履歴として残し
ておくとともに、次の作業ブロックの処理に利用して行
く。
Next, the operation flow at the time of runaway in FIG. 3 is as follows. Here, steps 21 to 23 are the same as the above-mentioned steps. In this embodiment, the register 2 is forcibly reset when a runaway time elapses, for example, when the program counter is destroyed for 100 ms. The program data of the history area 1 already stored in the register 2 is read again into the register 2 (step 23A), and the work block a
Re-execute the process of. In this way, the program of the previous work block is sequentially stored in the history area and left as a history, and is used for the processing of the next work block.

【0016】[0016]

【発明の効果】上述したように本発明は各作業ブロック
ごとのプログラムを記憶する履歴エリアを設けた記憶部
と、作業ブロックごとに履歴エリアから読み出したプロ
グラムを使用するレジスタとを備えることにより、暴走
時に一時退避したプログラムを再使用できる効果があ
る。
As described above, the present invention is provided with the storage unit having the history area for storing the program for each work block and the register for using the program read from the history area for each work block. This has the effect of reusing the program that was temporarily saved during a runaway.

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

【図1】本発明の一実施例のブロック図である。FIG. 1 is a block diagram of an embodiment of the present invention.

【図2】本実施例の正常動作時のフローである。FIG. 2 is a flowchart of a normal operation of this embodiment.

【図3】本実施例の異常動作時のフローである。FIG. 3 is a flow chart of an abnormal operation of the present embodiment.

【図4】従来例のブロック図である。FIG. 4 is a block diagram of a conventional example.

【図5】従来例の動作を説明するフローである。FIG. 5 is a flowchart illustrating an operation of a conventional example.

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

1,11 CPU 2,12 レジスタ 4,14 記憶部 4A プログラム記憶部 4B,4C 履歴エリア 13 プロセッサ 15 ウォッチドッグタイマ 1, 11 CPU 2, 12 Register 4, 14 Storage unit 4A Program storage unit 4B, 4C History area 13 Processor 15 Watchdog timer

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 作業ブロックの処理終了ごとに使用され
たプログラムを一時退避させ、この退避させたプログラ
ムを再度次の作業ブロックのために読み出して一時記憶
する手段と、前記一時退避させたプログラムを各作業ブ
ロックごとに記憶する2個の履歴エリアを有する記憶手
段とを有することを特徴とするCPUの処理方式。
1. A means for temporarily saving a program used each time a work block is processed, reading the saved program again for a next work block, and temporarily storing the program, and the temporarily saved program. A processing method of a CPU, comprising: a storage unit having two history areas for storing each work block.
【請求項2】 前記一時記憶する手段であるレジスタが
各作業ブロックの正常処理時間を保持する周期で強制的
に外部からリセットをかけられることを特徴とする請求
項1記載のCPUの処理方式。
2. The CPU processing method according to claim 1, wherein the register, which is means for temporarily storing, is forcibly reset from the outside at a cycle in which a normal processing time of each work block is held.
JP4099073A 1992-04-20 1992-04-20 Processing system for cpu Withdrawn JPH05298135A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4099073A JPH05298135A (en) 1992-04-20 1992-04-20 Processing system for cpu

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4099073A JPH05298135A (en) 1992-04-20 1992-04-20 Processing system for cpu

Publications (1)

Publication Number Publication Date
JPH05298135A true JPH05298135A (en) 1993-11-12

Family

ID=14237739

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4099073A Withdrawn JPH05298135A (en) 1992-04-20 1992-04-20 Processing system for cpu

Country Status (1)

Country Link
JP (1) JPH05298135A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013109652A (en) * 2011-11-22 2013-06-06 Le Tekku:Kk Compiler, control method of program module generated by compiler, and control device which achieves control method
JP2015534191A (en) * 2012-10-04 2015-11-26 クアルコム,インコーポレイテッド Method for proactively restarting software and increasing mean time between failures in a multi-subsystem mobile communication device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013109652A (en) * 2011-11-22 2013-06-06 Le Tekku:Kk Compiler, control method of program module generated by compiler, and control device which achieves control method
JP2015534191A (en) * 2012-10-04 2015-11-26 クアルコム,インコーポレイテッド Method for proactively restarting software and increasing mean time between failures in a multi-subsystem mobile communication device

Similar Documents

Publication Publication Date Title
JPS6226732B2 (en)
JPH05298135A (en) Processing system for cpu
JPS6240735B2 (en)
JPH0443301B2 (en)
JPH04288625A (en) Microcomputer
JPS6128144A (en) Executing device of tracing
JPH03292545A (en) Detection/recovery device for program loop
JP2002351700A (en) Computer system and program
JP2695775B2 (en) How to recover from computer system malfunction
JPS58158747A (en) Programable controller
JPH0758465B2 (en) Pipeline processing type information processing device
JP2731386B2 (en) Control device
JPS63150732A (en) Program running supervisory equipment
JPH01211048A (en) Measuring system for executing instruction number of program
JPH02231634A (en) Method for maintaining interchangeability of software
JPH0413728B2 (en)
JPH01106237A (en) Program debugging system
JPH0213334B2 (en)
JPH0782460B2 (en) How to check the recording medium
JPS6084650A (en) Peripheral controller
JPH07182251A (en) Microprocessor
JPH02304634A (en) Processor system
JPH05151105A (en) Fault monitoring circuit
JPH03278242A (en) Test program evaluation system
JPH0325674A (en) Information processor

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19990706