JPH0322042A - Mircoprocessor control system - Google Patents

Mircoprocessor control system

Info

Publication number
JPH0322042A
JPH0322042A JP1155622A JP15562289A JPH0322042A JP H0322042 A JPH0322042 A JP H0322042A JP 1155622 A JP1155622 A JP 1155622A JP 15562289 A JP15562289 A JP 15562289A JP H0322042 A JPH0322042 A JP H0322042A
Authority
JP
Japan
Prior art keywords
runaway
program
register
address
counter
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
JP1155622A
Other languages
Japanese (ja)
Inventor
Masako Takagi
高木 政子
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 JP1155622A priority Critical patent/JPH0322042A/en
Publication of JPH0322042A publication Critical patent/JPH0322042A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To easily find misprogramming by storing a specific address and deciding that the runaway state occurs when the instruction in this specific address is not executed within a certain time. CONSTITUTION:If the time elapses without input of a reset signal, and the counted value of a counter 5 reaches the upper limit value held in an upper limit value register 9 it decided, that the runaway state occurs, then an interrupt signal 11 of a CPU 2 from a comparator 10 is outputted. When the interrupt signal 11 is inputted, the CPU 2 interrupts execution of a program. It is considered that the cause of runaway exists in a program range between the specific address outputted from an address register 1 at the time of resetting the counter 5 and that outputted from the register 1 when it is decided that the runaway occurs. Thus, only this range is checked at the time of searching the cause of runaway.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明はマイクロプロセッサの制御方式に関し.特にプ
ログラムの暴走状態の検出を行なう制御方式に関する。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a control system for a microprocessor. In particular, the present invention relates to a control method for detecting a runaway state of a program.

〔従来の技術〕[Conventional technology]

従来.マイクロプロセッサがプログラム実行時に暴走状
態となった場合,一旦.ユーザがそのプログラムの実行
を中断し,デバック機構を使用して,そのプログラムの
最初から順々に暴走の原因を探している。
Conventional. If the microprocessor goes out of control when executing a program, The user interrupts execution of the program and uses a debugging mechanism to step through the program from the beginning to find the cause of the runaway.

[発明が解決しようとする課題] しかしながら,上述した従来の制御方式では,暴走の状
態となった場合には,プログラムの最初の命令から順番
に暴走の原因を探していかなければならず,手間がかか
り.原因を見つけるのが困難であるという欠点がある。
[Problems to be Solved by the Invention] However, in the conventional control system described above, when a runaway occurs, the cause of the runaway must be searched for in order from the first instruction of the program, which is time-consuming. It takes a while. The disadvantage is that it is difficult to find the cause.

本発明は,マイクロプロセッサがプログラム実行中に暴
走状態になったことを検出し.プログラムの実行を中止
するマイクロプロセッサの制御方式の提供を目的とする
The present invention detects when a microprocessor goes into a runaway state while executing a program. The purpose is to provide a microprocessor control method that stops program execution.

[課題を解決するための手段] 本発明は,ユーザが指定する特定アドレスを記憶する記
憶手段と,該記憶手段に記憶された前記特定アドレスと
プロセッサが出力するアドレスとを比較する比較手段と
,予め定められた時間毎にカウント数が更新され,前記
比較手段からの一致信号によってリセットされるカウン
タと,該カウンタのカウント数が予め定められた上限値
に達すると前記プロセッサに対し割り込みを発生する手
段とを有することを特徴とする。
[Means for Solving the Problems] The present invention comprises: storage means for storing a specific address specified by a user; comparison means for comparing the specific address stored in the storage means with an address output by a processor; A counter whose count is updated at predetermined time intervals and reset by a match signal from the comparison means, and which generates an interrupt to the processor when the count of the counter reaches a predetermined upper limit. It is characterized by having a means.

[作用] 本発明では.アドレスレジスタに特定アドレスを複数記
憶させておき.マイクロプロセッサにおいて所定時間内
にその特定アドレスの命令の実行が行なわれない場合に
暴走していると判断してプログラムの実行を中止する。
[Operation] In the present invention. Store multiple specific addresses in the address register. If the microprocessor does not execute the instruction at the specific address within a predetermined time, it determines that the program is running out of control and stops executing the program.

[実施例] 以下に,本発明の実施例について図面を参照して説明す
る。
[Examples] Examples of the present invention will be described below with reference to the drawings.

ml図は本発明の一実施例を示す構成図である。ml diagram is a configuration diagram showing one embodiment of the present invention.

第1図を参照すると,本発明のマイクロプロセッサ制御
方式はユーザが指定した特定番地を記憶するアドレスレ
ジスタ1と,CPU2と,比較器4及び10と,カウン
タ5と,加算する定数を持つ定数レジスタ6と,ユーザ
が指定した上限値を保持する上限値レジスタつとで構成
されている。
Referring to FIG. 1, the microprocessor control system of the present invention includes an address register 1 that stores a specific address specified by the user, a CPU 2, comparators 4 and 10, a counter 5, and a constant register that holds a constant to be added. 6, and an upper limit value register that holds the upper limit value specified by the user.

アドレスレジスタ1にはユーザが指定した特定アドレス
が複数記憶されている。これら複数の特定アドレスは,
プログラムの大きさや実行に要する時間に基づき定めれ
ば良い。
Address register 1 stores a plurality of specific addresses specified by the user. These multiple specific addresses are
It may be determined based on the size of the program and the time required for execution.

上限値レジスタ9にはカウンタ5のカウント数の上限を
指定する上限値が保持されている。この上限値はアドレ
スレジスタ1に保持されている特定アドレスのプログラ
ムが実行されるまでの時間にカウンタ5がカウントする
カウント数より大きくしておく。
The upper limit value register 9 holds an upper limit value that specifies the upper limit of the count number of the counter 5. This upper limit value is set larger than the number of counts counted by the counter 5 during the time until the program at the specific address held in the address register 1 is executed.

次に動作について説明する。Next, the operation will be explained.

レジスタ1は複数の特定アドレスの中で次に実行される
べきプログラムの特定アドレスを比較器4へ入力してい
る。またCPU2は現在実行中のプログラムのアドレス
3を比較器4へ人力している。
Register 1 inputs to comparator 4 a specific address of a program to be executed next among a plurality of specific addresses. The CPU 2 also inputs the address 3 of the program currently being executed to the comparator 4.

比較器4では,アドレスレジスタ1から入力されるアド
レス3とCPU2から人力されるアドレスとを比較し,
2つのアドレスが一致したときにカウンタ5ヘリセット
信号8を出力する。
The comparator 4 compares the address 3 input from the address register 1 with the address input manually from the CPU 2,
When the two addresses match, a counter 5 reset signal 8 is output.

カウンタ5は,そのカウント数に加算器7によって一定
時間経過毎に定数レジスタ6に保持されている定数が加
えられたカウント数を比較器10へ出力している。カウ
ンタ5では比較器4からリセット信号8が入力されると
,そのカウント数をリセットする。リセット信号8が入
力されることなく時間が経過し,カウンタ5のカウント
数が上限値レジスタ9に保持されている上限値に等しく
なると暴走しているものと判定され,比較器10からC
PU2の割込信号が出力される。
The counter 5 outputs to the comparator 10 a count number obtained by adding a constant held in the constant register 6 by an adder 7 every predetermined period of time to the count number. When the reset signal 8 is input from the comparator 4, the counter 5 resets its count number. When time passes without the reset signal 8 being input and the count number of the counter 5 becomes equal to the upper limit value held in the upper limit value register 9, it is determined that the runaway has occurred, and the comparator 10 outputs C
The interrupt signal of PU2 is output.

CPU2は割込信号11が入力するとプログラムの実行
を中断する。このようにして,暴走が生じると自動的に
プログラムの実行が中断されるので,S走の原因がメモ
リやプログラムの破壊によるものであった場合にはその
被害を小さく抑えることができる。また,a走の原因は
,前回.カウンタ5をリセットしたときにアドレスレジ
スタが出力していた特定アドレスから,暴走と判定され
たときにレジスタ1から出力されていた特定アドレスま
でのプログラムの中にあると考えられる。
When the CPU 2 receives the interrupt signal 11, it interrupts the execution of the program. In this way, when a runaway occurs, program execution is automatically interrupted, so if the cause of the S run is memory or program corruption, the damage can be kept to a minimum. Also, the cause of the a run is the previous one. This is considered to be in the program from the specific address that was output from the address register when the counter 5 was reset to the specific address that was output from the register 1 when the runaway was determined.

従って.′4走の原因を知ろうとする時にはこの範囲の
みを検査すれば良い。
Therefore. 'When trying to find out the cause of 4-run, it is only necessary to examine this area.

[発明の効果] 以上説明したように本発明は,特定アドレスを記憶して
おき,一定時間内にその特定アドレスの命令が実行され
ないと,暴走状態であると判定することにより.プログ
ラム中のプログラムミスの存在する範囲を限定できるの
でそのプログラムミスを容易に発見でき,プログラムの
デバックに要する時間を短縮できるという効果がある。
[Effects of the Invention] As explained above, the present invention stores a specific address and determines that a runaway condition exists if the instruction at that specific address is not executed within a certain period of time. Since the range in which a program error exists in a program can be limited, the program error can be easily discovered and the time required to debug the program can be reduced.

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

第1図は本発明の実施例を示す構成図である。 1・・・アドレスレジスタ,2・・・CPU,3・・・
CPUの出力するアドレス.4・・・比較器,5・・・
カウンタ.6・・・定数レジスタ,7・・・加算器,8
・・・リセット信号,9・・・上限値レジスタ,10・
・・比較器,1 1 ・・・割り込み信号。
FIG. 1 is a block diagram showing an embodiment of the present invention. 1...Address register, 2...CPU, 3...
Address output by CPU. 4... Comparator, 5...
counter. 6...Constant register, 7...Adder, 8
... Reset signal, 9 ... Upper limit value register, 10.
... Comparator, 1 1 ... Interrupt signal.

Claims (1)

【特許請求の範囲】[Claims] 1、ユーザが指定する特定アドレスを記憶する記憶手段
と、前記特定アドレスとプロセッサの出力するアドレス
とを比較する比較手段と、予め定められた時間毎にカウ
ント数が更新され前記比較手段からの一致信号によって
リセット可能なカウンタと、前記カウンタのカウント数
が予め定められた上限値に達すると前記プロセッサに対
し割り込みを発生する手段を有することを特徴とするマ
イクロプロセッサの制御方式。
1. A storage means for storing a specific address specified by a user, a comparison means for comparing the specific address with an address output by the processor, and a count number updated at every predetermined time and a match from the comparison means. A control system for a microprocessor, comprising: a counter that can be reset by a signal; and means for generating an interrupt to the processor when the count of the counter reaches a predetermined upper limit.
JP1155622A 1989-06-20 1989-06-20 Mircoprocessor control system Pending JPH0322042A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1155622A JPH0322042A (en) 1989-06-20 1989-06-20 Mircoprocessor control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1155622A JPH0322042A (en) 1989-06-20 1989-06-20 Mircoprocessor control system

Publications (1)

Publication Number Publication Date
JPH0322042A true JPH0322042A (en) 1991-01-30

Family

ID=15610030

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1155622A Pending JPH0322042A (en) 1989-06-20 1989-06-20 Mircoprocessor control system

Country Status (1)

Country Link
JP (1) JPH0322042A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06222960A (en) * 1993-01-27 1994-08-12 Nec Corp Cpu reset circuit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06222960A (en) * 1993-01-27 1994-08-12 Nec Corp Cpu reset circuit

Similar Documents

Publication Publication Date Title
US20070239917A1 (en) Interrupt routing within multiple-processor system
US20070234017A1 (en) Selective instruction breakpoint generation
JPH04223532A (en) Improved processor
US4652997A (en) Method and apparatus for minimizing overhead when executing nested do loops
JPH07105023A (en) Method and apparatus for detection of spurious interrupt at inside of data processing system
US20200394062A1 (en) Capability liveness of containerized services
JPH0322042A (en) Mircoprocessor control system
JP2653412B2 (en) How to set breakpoints
JPS62106552A (en) Loop detector
US20160239404A1 (en) Apparatus and method for controlling debugging of program instructions including a transaction
KR920003909B1 (en) Debugging supporting circuit
JPH03241438A (en) Program debug supporting device
KR960018893A (en) Controller with Watchdog Timer
JPH03158936A (en) Testing method for program
JPH01226031A (en) Control system for pipe line of information processor
JP2002251299A (en) Program tracing device
JPH04242832A (en) Information processor
JPH03208132A (en) Single chip microcomputer
JPS62254236A (en) Detector for exceptional phenomenon
JPS6270947A (en) Control system for debug interruption
JPH02284238A (en) Program debugging device
JPH0251742A (en) Preventing system for program runaway
JPH03282635A (en) Break controller and trace controller for prefetch type processor
JPS638841A (en) Interruption accepting system
JPS599936B2 (en) data monitoring device