JP2904130B2 - Program malfunction detection development support device and program malfunction detection method - Google Patents

Program malfunction detection development support device and program malfunction detection method

Info

Publication number
JP2904130B2
JP2904130B2 JP8174197A JP17419796A JP2904130B2 JP 2904130 B2 JP2904130 B2 JP 2904130B2 JP 8174197 A JP8174197 A JP 8174197A JP 17419796 A JP17419796 A JP 17419796A JP 2904130 B2 JP2904130 B2 JP 2904130B2
Authority
JP
Japan
Prior art keywords
program
memory
coverage
information
program memory
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.)
Expired - Lifetime
Application number
JP8174197A
Other languages
Japanese (ja)
Other versions
JPH103407A (en
Inventor
道代 加藤
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
Nippon Electric Co 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP8174197A priority Critical patent/JP2904130B2/en
Publication of JPH103407A publication Critical patent/JPH103407A/en
Application granted granted Critical
Publication of JP2904130B2 publication Critical patent/JP2904130B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、マイクロコンピュ
ータのプログラムの実行において、マイクロコンピュー
タのプログラムの誤動作を検出する方法および装置に関
し、特に、マイクロコンピュータのプログラム開発環境
において、マイクロコンピュータのプログラム誤動作を
検出し、プログラムの開発効率を向上させる方法および
装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and an apparatus for detecting a malfunction of a microcomputer program during execution of the microcomputer program, and more particularly to detecting a malfunction of a microcomputer program in a microcomputer program development environment. And a method and apparatus for improving program development efficiency.

【0002】[0002]

【従来の技術】この種の従来のマイクロコンピュータの
プログラム開発環境システムとして、(1)プログラム
メモリの初期化されていない領域を参照することを検出
する2種類の方法、(2)マイクロコンピュータのプロ
グラム開発支援装置においてマイクロコンピュータがデ
ータメモリのデータが不定な(初期化されていない)ア
ドレスを参照することによって誤動作することを検出す
る方法、(3)マイクロコンピュータのプログラム開発
支援装置においてカバレッジメモリのクリア機能、につ
いて以下に順に説明する。
2. Description of the Related Art As conventional program development environment systems for microcomputers of this kind, there are two types of methods for detecting (1) referring to an uninitialized area of a program memory, and (2) a program for a microcomputer. A method in which a microcomputer detects that a data in a data memory malfunctions by referring to an undefined (uninitialized) address in a development support device, and (3) clears a coverage memory in a microcomputer program development support device. The functions will be described in order below.

【0003】(1)まず、プログラムメモリの初期化さ
れていない領域を参照することを検出する2つの方法、
について説明する。
(1) First, there are two methods for detecting a reference to an uninitialized area of a program memory,
Will be described.

【0004】その第1の方法は、マイクロプロセッサが
プログラムを実行するとき、プログラムメモリの中で参
照してもよいアドレスと、参照してはいけないアドレス
との境界値を比較器により常に監視し、参照不可領域を
侵していれば、プログラムの実行をエラーとするもので
ある。例えば特開平1−251240号公報には、中央
処理装置の暴走や不当なプログラムの実行等による不当
領域上でのプログラム走行等の暴走とみなされる状態
を、記憶装置とは別に設けた半導体記憶装置を用いて検
出する方式が提案されている。
In the first method, when a microprocessor executes a program, a comparator constantly monitors a boundary value between an address that can be referred to in a program memory and an address that cannot be referred to by a comparator, If the inaccessible area is violated, the execution of the program is regarded as an error. For example, Japanese Patent Application Laid-Open No. 1-251240 discloses a semiconductor memory device in which a state considered as a runaway such as a program running on an illegal area due to a runaway of a central processing unit or an illegal program is provided separately from the storage device. There has been proposed a method of performing detection by using.

【0005】この方法により、メモリ管理機能を持つマ
イクロプロセッサは、予め定められたサイズのメモリ領
域にロードされたプログラムの存在を把握することがで
きる。
According to this method, a microprocessor having a memory management function can recognize the existence of a program loaded in a memory area of a predetermined size.

【0006】第2の方法は、マイクロプロセッサに、プ
ログラムメモリの各アドレスごとに正規にプログラムが
格納された部分とプログラムが格納されていない部分を
識別できる識別情報を書き込んでおく記憶装置を備え、
マイクロプロセッサがプログラムを実行するとき、正規
にプログラムが格納された部分以外の部分を参照したと
き、プログラムの実行をエラーとする方法である。例え
ば特開平2−141837号公報参照には、主記憶装置
の各番地に対応して冗長な記憶領域を備え、該記憶領域
に、正規にプログラムされた部分とプログラムされてい
ない部分を識別できる識別情報を書き込んでおくと共
に、マイクロプロセッサがアクセスした主記憶装置の番
地に対応する識別情報を参照し、正規のアクセスである
か異常アクセスであるかを識別する識別手段を備え、マ
イクロプロセッサがプログラム実行中、正規にプログラ
ムされた部分以外を参照した時、異常状態と判定する構
成が提案されてる。
In a second method, a microprocessor is provided with a storage device which writes, for each address of a program memory, identification information capable of identifying a portion where a program is properly stored and a portion where a program is not stored.
In this method, when the microprocessor refers to a portion other than the portion where the program is properly stored when executing the program, the execution of the program is regarded as an error. For example, Japanese Patent Application Laid-Open No. 2-141837 discloses that a redundant storage area is provided corresponding to each address of a main storage device, and the storage area can identify a normally programmed part and an unprogrammed part. In addition to writing the information, the microprocessor refers to the identification information corresponding to the address of the main storage device accessed by the microprocessor, and includes identification means for identifying whether the access is authorized access or abnormal access. There has been proposed a configuration in which, when a portion other than a properly programmed portion is referred to, an abnormal state is determined.

【0007】(2)次に、マイクロコンピュータのプロ
グラム開発支援装置において、マイクロコンピュータが
データメモリのデータが不定な(初期化されていない)
アドレスを参照することによって誤動作することを検出
する方法について説明する。
(2) Next, in the microcomputer program development support device, the microcomputer determines that the data in the data memory is indefinite (not initialized).
A method for detecting a malfunction by referring to an address will be described.

【0008】このプログラム開発支援装置は、データメ
モリの読み出し・書き込みの履歴情報を格納するデータ
メモリ用カバレッジメモリを備え、データメモリの各ア
ドレスに対して、プログラムによってデータメモリに何
らかのデータが書き込まれた(初期化された)ことを示
す初期化情報を備え、プログラムの実行を開始した後、
この初期化情報はセットされる。
This program development support device includes a data memory coverage memory for storing read / write history information of a data memory, and for each address of the data memory, some data is written to the data memory by a program. With initialization information indicating that it has been (initialized),
This initialization information is set.

【0009】そして、プログラムを実行中、初期化され
ていないデータメモリのアドレスの内容を読み込むと
き、該アドレスの初期化情報を調べ、データメモリの該
アドレスが初期化されていないものと判定し、プログラ
ムの実行を中止するなどの異常処理を行う。また、この
プログラム開発支援装置は、プログラムの実行直前に初
期化情報をクリアする機能を具備する。
When reading the contents of an address of an uninitialized data memory during execution of a program, the initialization information of the address is examined, and it is determined that the address of the data memory is not initialized. Performs abnormal processing such as stopping program execution. Further, the program development support device has a function of clearing initialization information immediately before execution of a program.

【0010】(3)次に、マイクロコンピュータのプロ
グラム開発支援装置におけるカバレッジメモリのクリア
機能について説明する。
(3) Next, the clearing function of the coverage memory in the microcomputer program development support device will be described.

【0011】マイクロコンピュータのプログラム開発支
援装置は、プログラムの実行履歴情報を格納する読み出
し・書き込み可能なカバレッジメモリを備えている。実
行履歴情報は、プログラムを実行した後に、当該プログ
ラムの実行結果を知るための情報であり、このプログラ
ムの実行履歴情報は、例えばアドレスごとに1回のプロ
グラムの実行中に該アドレスが何回参照されたかを示す
実行回数などを含む。
A microcomputer program development support device includes a readable / writable coverage memory for storing execution history information of a program. The execution history information is information for knowing the execution result of the program after the execution of the program. The execution history information of the program includes, for example, how many times the address refers to during execution of the program once for each address. It includes the number of times of execution indicating whether or not the execution has been performed.

【0012】プログラムのカバレッジメモリに格納され
る実行履歴情報は、1回のプログラムの実行に関する情
報であるため、プログラム開発支援装置は、プログラム
の実行を開始するたびに、このカバレッジメモリをクリ
アする機能手段を具備している。
Since the execution history information stored in the program coverage memory is information relating to one execution of the program, the program development support apparatus has a function of clearing the coverage memory every time the program execution is started. Means.

【0013】[0013]

【発明が解決しようとする課題】上記した、プログラム
メモリの初期化されていない領域を参照することを検出
する従来の2つの方法については、以下に示すような問
題点がある。
The above two conventional methods for detecting a reference to an uninitialized area of the program memory have the following problems.

【0014】マイクロプロセッサがプログラムを実行す
るとき、プログラムメモリの中で参照してもよいアドレ
スと、参照してはいけないアドレスの境界値を比較器に
より常に監視し、参照不可領域を侵していればプログラ
ムの実行をエラーとする第1の方法では、分割される領
域が多くなると、比較に用いられる回路規模が増大し、
一方、回路規模を縮減しようとすると、システムの実行
速度に悪影響を与える(システム性能を低下させる)と
いう問題点を有している。
When the microprocessor executes the program, the comparator always monitors the boundary value between the address which may be referred to in the program memory and the address which should not be referred to, and if it violates the non-referenceable area. In the first method in which the execution of the program is regarded as an error, when the number of divided regions increases, the circuit scale used for comparison increases,
On the other hand, there is a problem that an attempt to reduce the circuit scale has an adverse effect on the execution speed of the system (reduces system performance).

【0015】一般に、プログラムは、複数の領域に分割
されて、プログラムメモリに割り当てられるが、領域の
比較は複雑となり、領域の分割数が多いほど多数の比較
器が必要とされることになる。ところで、比較器を減ら
すために、分割領域の各上限アドレス、下限アドレスを
マルチプレクサによって逐次切り替えて比較する方法も
あるが、比較時間が増える。
Generally, a program is divided into a plurality of areas and assigned to a program memory. However, the comparison of the areas becomes complicated, and the greater the number of divided areas, the more comparators are required. By the way, in order to reduce the number of comparators, there is a method in which each upper limit address and lower limit address of a divided area are sequentially switched by a multiplexer for comparison, but the comparison time increases.

【0016】次に、マイクロプロセッサに、プログラム
メモリの各アドレスごとに正規にプログラムが格納され
た部分とプログラムが格納されていない部分を識別でき
る識別情報を書き込んでおく記憶装置を備え、マイクロ
プロセッサがプログラムを実行するとき、正規にプログ
ラムが格納された部分以外の部分を参照したとき、プロ
グラムの実行をエラーとする第2の方法は、該識別情報
を格納する記憶装置および該識別情報をクリアする装置
を別途用意しなければならない。
Next, the microprocessor is provided with a storage device for writing identification information for identifying a portion where a program is properly stored and a portion where no program is stored for each address of the program memory. When executing a program, when a part other than the part where the program is stored is normally referred to, the second method of causing the execution of the program to be an error is to clear the storage device storing the identification information and the identification information Equipment must be provided separately.

【0017】また、プログラムメモリの各アドレス毎
に、正規にプログラムが格納された部分とプログラムが
格納されていない部分が予め決まっている場合には、識
別情報を格納する記憶装置をROM(読み出し専用メモ
リ)とし、決まった識別情報を一度書き込めば済むが、
プログラム開発のデバッグ段階では、プログラムがプロ
グラムメモリに格納される部分が変化し、識別情報も変
化するので、識別情報が変化するたびに、識別情報の記
憶装置であるROMを取り替えて識別情報を書き込まな
ければならないという問題点を有してる。
If a portion where a program is properly stored and a portion where a program is not stored are predetermined for each address of the program memory, a storage device for storing identification information is stored in a ROM (read only memory). Memory), and it is sufficient to write the fixed identification information once,
At the debugging stage of program development, the part where the program is stored in the program memory changes, and the identification information also changes. Therefore, every time the identification information changes, the identification information storage device is replaced by the ROM and the identification information is written. There is a problem that must be.

【0018】さらに、従来のプログラム開発支援装置に
おいて、メモリの初期化の有無を判定するというデータ
メモリに関する初期化情報の仕組みをプログラムメモリ
に応用すると仮定すると、下記の2つの問題が発生す
る。
Further, if it is assumed that the mechanism of the initialization information relating to the data memory for determining whether or not to initialize the memory is applied to the program memory in the conventional program development support apparatus, the following two problems occur.

【0019】第1に、データメモリの場合、プログラム
の実行中に初期化情報がセットされるが、プログラムメ
モリの場合には、プログラムを実行する前のプログラム
をロードする時点で初期化情報がセットされ、プログラ
ムの実行中は初期化情報を参照するのみでなければなら
ない。
First, in the case of the data memory, the initialization information is set during the execution of the program. In the case of the program memory, the initialization information is set at the time of loading the program before executing the program. During the execution of the program, it must only refer to the initialization information.

【0020】第2に、データメモリの場合、プログラム
の実行を開始するたびに初期化情報はクリアされるが、
プログラムメモリの場合には、初期化情報がセットされ
るのはプログラムをロードするときであり、プログラム
の実行を開始するたびに初期化情報がクリアされるとす
ると、プログラムの実行のたびにプログラムをロードし
なければならなくなる。
Second, in the case of a data memory, the initialization information is cleared each time the execution of a program is started.
In the case of the program memory, the initialization information is set when the program is loaded, and if the initialization information is cleared each time the program execution is started, the program is initialized each time the program is executed. You have to load it.

【0021】次に、マイクロコンピュータのプログラム
開発支援装置におけるカバレッジメモリのクリア機能に
ついて次のような問題点がある。
Next, there is the following problem in the function of clearing the coverage memory in the microcomputer program development support device.

【0022】従来のプログラム開発支援装置にはプログ
ラムのカバレッジメモリに格納されるカバレッジ情報を
クリアする機能がある。プログラムメモリ初期化情報を
カバレッジメモリに付加すると、プログラムメモリ初期
化情報をクリアする機能をあらためて用意する必要がな
くなる。しかし、プログラムのカバレッジ情報はプログ
ラムの実行のたびにクリアされるということは、プログ
ラムメモリ初期化情報もプログラムの実行のたびにクリ
アされるため、プログラムの実行のたびにプログラムを
ロードしてプログラムメモリ初期化情報をセットしなけ
ればならない。
The conventional program development support device has a function of clearing coverage information stored in a program coverage memory. When the program memory initialization information is added to the coverage memory, it is not necessary to newly provide a function for clearing the program memory initialization information. However, the fact that the coverage information of the program is cleared each time the program is executed means that the program memory initialization information is also cleared each time the program is executed. Initialization information must be set.

【0023】従って、本発明は、上記事情に鑑みてなさ
れたものであって、その目的は、未初期化プログラムメ
モリの実行による誤動作を効率よく検出する装置及び方
法を提供することにある。
Accordingly, the present invention has been made in view of the above circumstances, and an object of the present invention is to provide an apparatus and a method for efficiently detecting a malfunction due to execution of an uninitialized program memory.

【0024】[0024]

【課題を解決するための手段】前記目的を達成するた
め、本発明のプログラム開発支援装置は、CPUにて実
行されるプログラムを格納するプログラムメモリと、
記プログラムの実行履歴情報を格納する読み出し及び書
き込み可能なカバレッジメモリであって、前記プログラ
ムメモリの各アドレスに対して、該プログラムが前記プ
ログラムメモリにロードされたか否かを識別するための
プログラムメモリ初期化情報をカバレッジ情報と兼用
て記憶格納するカバレッジメモリと、前記カバレッジメ
モリにおいて、前記プログラムメモリ初期化情報は、プ
ログラムのロード直前にクリアされ、プログラムをロー
ドした直後にセットされ、次のロードまでその値が保持
され、前記カバレッジメモリの読み書きを制御し、前記
プログラムメモリ初期化情報が、実行しようとしたプロ
グラムメモリが初期化されていない旨を示すとき、プロ
グラムの実行を誤動作と判断し、誤動作検出情報を出力
するカバレッジメモリ制御回路と、を含むことを特徴と
する。
Means for Solving the Problems] To achieve the above object, the program development support apparatus of the present invention includes a program memory for storing a program executed by CPU, before
Read and write to store the execution history information of the program
A coverage memory capable inclusive can, the respective addresses of the program memory, a program memory initialization information for the program to identify whether it has been loaded into the program memory combined with a coverage information storage and coverage memory for storing the coverage main
In the memory, the program memory initialization information
Cleared just before loading the program and load the program
Is set immediately after loading, and the value is held until the next load
Is to control the reading and writing of the coverage memory, said program memory initialization information, when a program memory trying to perform is indicating an uninitialized, it is determined that malfunction program execution, outputs the malfunction detection information And a coverage memory control circuit.

【0025】また、本発明のプログラム誤動作検出方法
は、プログラムの実行履歴情報を格納する読み出し及び
書き込み可能なカバレッジメモリに、前記プログラムメ
モリの各アドレスに対して、該プログラムが前記プログ
ラムメモリにロードされたか否かを識別するためのプロ
グラムメモリ初期化情報をカバレッジ情報と兼用して記
憶格納、プログラムをロードする直前に前記カバレッ
ジメモリの前記プログラムメモリ初期化情報をクリア
、プログラムをロードした直後に前記カバレッジメモ
リの前記プログラムメモリ初期化情報をセット、プロ
グラムの次のロードまで前記カバレッジメモリの前記
ログラムメモリ初期化情報を保持、前記CPUがプロ
グラムを実行するとき、前記カバレッジメモリの前記
ログラムメモリ初期化情報の値により、初期化されてい
るプログラムメモリのアドレスを参照したか、初期化さ
れていないプログラムメモリのアドレスを参照したかを
判断する、ことを特徴とする。
Further, according to the program malfunction detecting method of the present invention, it is possible to read and store program execution history information.
In a writable coverage memory, for each address of the program memory, program memory initialization information for identifying whether or not the program has been loaded into the program memory is also stored and stored in combination with the coverage information, It said immediately prior to loading the program coverage
Clears the program memory initialization information of memory
And, the coverage notes immediately after loading the program
Set the program memory initialization information of Li, holds the flop <br/> program memory initialization information of the coverage memory until the next loading of the program, the CPU time to execute the program, the coverage memory the value of the flop <br/> program memory initialization information, or with reference to the address of the program memory it has, determines whether reference to the address of the program memory uninitialized, and characterized in that I do.

【0026】[0026]

【発明の実施の形態】本発明の実施の形態について図面
を参照して以下に説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0027】図1は、本発明の第1の実施の形態に係る
プログラム誤動作検出方法を実現するプログラム開発支
援装置の構成を示す図である。
FIG. 1 is a diagram showing a configuration of a program development support apparatus for realizing a program malfunction detection method according to a first embodiment of the present invention.

【0028】図1を参照すると、ホストコンピュータ6
と接続されるプログラム開発支援装置5は、CPU1
と、プログラムメモリ2と、カバレッジメモリ3と、カ
バレッジメモリ制御装置4と、を備えて構成され、プロ
グラムメモリ2とカバレッジメモリ3は、CPU1とア
ドレスバス10及びデータバス11を介して接続され、
CPU1からはプログラムメモリ2とカバレッジメモリ
制御回路4にR/W(リード/ライト)信号12が供給
される。また、カバレッジメモリ制御装置4はカバレッ
ジメモリ3に対してカバレッジメモリR/W信号54を
出力し、データの授受をカバレッジデータバス56を介
して行い、カバレッジメモリ制御回路4から誤動作検出
信号55が出力される。
Referring to FIG. 1, the host computer 6
The program development support device 5 connected to the
, A program memory 2, a coverage memory 3, and a coverage memory control device 4. The program memory 2 and the coverage memory 3 are connected to the CPU 1 via an address bus 10 and a data bus 11.
An R / W (read / write) signal 12 is supplied from the CPU 1 to the program memory 2 and the coverage memory control circuit 4. Further, the coverage memory control device 4 outputs a coverage memory R / W signal 54 to the coverage memory 3 to exchange data via a coverage data bus 56, and outputs a malfunction detection signal 55 from the coverage memory control circuit 4. Is done.

【0029】図2は、図1のカバレッジメモリ3とカバ
レッジメモリ制御回路4の関係を詳細に示した構成図で
ある。図3は、プログラムメモリ初期化情報のセット方
法である。また、図4は、プログラムメモリ初期化情報
43を用いたプログラム誤動作検出方法のフローチャー
トである。
FIG. 2 is a configuration diagram showing in detail the relationship between the coverage memory 3 and the coverage memory control circuit 4 in FIG. FIG. 3 shows a method for setting the program memory initialization information. FIG. 4 is a flowchart of a program malfunction detection method using the program memory initialization information 43.

【0030】図2において、プログラムメモリ初期化情
報43、プログラムメモリ実行情報42、プログラムメ
モリ読み込み情報41、プログラムメモリ書き込み情報
40は、プログラムメモリ2のひとつのアドレスに対し
てそれぞれ1ビットの情報であり、この値は、カバレッ
ジ情報としてカバレッジメモリ3の中に格納される。
In FIG. 2, the program memory initialization information 43, the program memory execution information 42, the program memory read information 41, and the program memory write information 40 are each 1-bit information for one address of the program memory 2. This value is stored in the coverage memory 3 as coverage information.

【0031】まず、図1、図2および図3を参照して、
本発明の実施の形態における、プログラムメモリ2の初
期化情報のセットの方法を説明する。
First, referring to FIGS. 1, 2 and 3,
A method of setting initialization information of the program memory 2 according to the embodiment of the present invention will be described.

【0032】ホストコンピュータ6からプログラム開発
支援装置5にプログラムをロードする要求が発せられる
(ステップ20)と、まず、カバレッジメモリ制御回路
4は、カバレッジメモリ3に格納されたすべてのプログ
ラムメモリ初期化情報43をクリアする(ステップ2
1)。
When a request to load a program into the program development support device 5 is issued from the host computer 6 (step 20), first, the coverage memory control circuit 4 sends all program memory initialization information stored in the coverage memory 3. Clear 43 (Step 2)
1).

【0033】次に、ホストコンピュータ6が、プログラ
ムをプログラムメモリ2の指定アドレスにロードする
(ステップ22)と、当該アドレスの値はアドレスバス
10に出力される。
Next, when the host computer 6 loads the program to the designated address of the program memory 2 (step 22), the value of the address is output to the address bus 10.

【0034】カバレッジメモリ制御回路4は、このウィ
ンドウ(アドレス領域)にプログラムがロードされたこ
とを、該アドレスのプログラムメモリ初期化情報43と
してカバレッジメモリ3にセットする(ステップ2
3)。
The coverage memory control circuit 4 sets in the coverage memory 3 that the program has been loaded into this window (address area) as the program memory initialization information 43 of the address (step 2).
3).

【0035】最後に、ホストコンピュータ6がプログラ
ムのロードの終了を判断する(ステップ24の判定でY
es)まで、ステップ22のプログラムのロードと、ス
テップ23のプログラムメモリ初期化情報43のセット
を繰り返す。
Finally, the host computer 6 judges the end of the loading of the program (Y in the judgment of step 24).
Until es), the loading of the program in step 22 and the setting of the program memory initialization information 43 in step 23 are repeated.

【0036】これにより、プログラムメモリ2の各アド
レスのうち、プログラムがロードされたアドレスのプロ
グラムメモリ初期化情報43はセットされ、プログラム
がロードされなかったアドレスのプログラムメモリ初期
化情報43はクリアされた状態のままとされる。
As a result, among the addresses of the program memory 2, the program memory initialization information 43 of the address where the program is loaded is set, and the program memory initialization information 43 of the address where the program is not loaded is cleared. It is left in the state.

【0037】次に、図1、図2および図4を参照して、
本発明の実施の形態における、プログラムメモリ初期化
情報43を用いたプログラム誤動作検出方法を説明す
る。
Next, referring to FIG. 1, FIG. 2 and FIG.
A method for detecting a program malfunction using the program memory initialization information 43 according to the embodiment of the present invention will be described.

【0038】ホストコンピュータ6からプログラム開発
支援装置5にプログラムを実行する要求が発せられる
(ステップ30)と、まず、カバレッジメモリ制御回路
4は、CPU1がアドレスバス12に出力したプログラ
ムメモリ2のアドレスに対応するプログラムメモリ初期
化情報43をカバレッジメモリ3から読み込む(ステッ
プ31)。
When a request to execute a program is issued from the host computer 6 to the program development support device 5 (step 30), first, the coverage memory control circuit 4 stores the address of the program memory 2 output from the CPU 1 to the address bus 12 at the address. The corresponding program memory initialization information 43 is read from the coverage memory 3 (step 31).

【0039】次に、カバレッジメモリ制御回路4は、該
プログラムメモリ初期化情報43がセットされているか
クリアされているかを調べ(ステップ32)、該プログ
ラムメモリ初期化情報43がクリアされている場合に
は、プログラムメモリ2の該アドレスにプログラムがロ
ードされていないものと判断し、誤動作検出情報45を
出力する(ステップ36)。
Next, the coverage memory control circuit 4 checks whether the program memory initialization information 43 has been set or cleared (step 32), and if the program memory initialization information 43 has been cleared, Determines that the program is not loaded at the address in the program memory 2, and outputs the malfunction detection information 45 (step 36).

【0040】この情報により、ホストコンピュータ6は
CPU1のプログラムの実行を中止するなどの誤動作に
対する処置を行う。
Based on this information, the host computer 6 takes measures against a malfunction such as stopping the execution of the program of the CPU 1.

【0041】一方、ステップ32において、該プログラ
ムメモリ初期化情報43がセットされている場合には、
カバレッジメモリ制御回路4は、プログラムメモリ2の
該アドレスにプログラムがロードされているものと判断
し、誤動作検出情報45を出力せず、CPU1は、デー
タバスに出力されたプログラムメモリ2の該アドレスの
プログラムを読み込み(ステップ33)、該プログラム
を実行する(ステップ34)。
On the other hand, if the program memory initialization information 43 is set in step 32,
The coverage memory control circuit 4 determines that the program is loaded at the address of the program memory 2 and does not output the malfunction detection information 45, and the CPU 1 sets the address of the address of the program memory 2 output to the data bus. The program is read (step 33), and the program is executed (step 34).

【0042】最後に、ホストコンピュータ6はCPU1
が実行しているプログラムの終了を判断する(ステップ
35)まで、ステップ31のカバレッジメモリ制御回路
4のプログラムメモリ初期化情報43の読み込み処理か
らステップ34のCPU1のプログラムの実行までの処
理を繰り返す。
Finally, the host computer 6 has the CPU 1
Until the end of the program being executed is determined (step 35), the processing from the reading of the program memory initialization information 43 of the coverage memory control circuit 4 in step 31 to the execution of the program of the CPU 1 in step 34 is repeated.

【0043】以上により、プログラムがロードされてい
ないアドレスを参照することによって生じるプログラム
の誤動作を検出する。
As described above, the malfunction of the program caused by referring to the address where the program is not loaded is detected.

【0044】図2を参照して、カバレッジメモリ制御回
路4は、カバレッジ情報をプログラムの実行の直前にク
リアする機能を備えている。
Referring to FIG. 2, coverage memory control circuit 4 has a function of clearing coverage information immediately before execution of a program.

【0045】ここで、4種類のカバレッジ情報、すなわ
ちプログラムメモリ初期化情報43、プログラムメモリ
実行情報42、プログラムメモリ読み込み情報41、及
びプログラムメモリ書き込み情報40を4ビットのデー
タとして扱い、表1に示すように、プログラムメモリ初
期化情報43をカバレッジ情報の最上位ビット(MS
B)に割り当てるものとする。
Here, four types of coverage information, that is, program memory initialization information 43, program memory execution information 42, program memory read information 41, and program memory write information 40 are treated as 4-bit data, and are shown in Table 1. As described above, the program memory initialization information 43 is stored in the most significant bit (MS) of the coverage information.
B).

【0046】[0046]

【表1】 [Table 1]

【0047】カバレッジメモリ3がクリアされるタイミ
ングは、プログラムのロード直前、プログラムの実行直
前およびランダムなクリア要求時である。一方、プログ
ラムメモリ初期化情報43をクリアするタイミングは、
プログラムのロード直前のみでなければならない。
The coverage memory 3 is cleared immediately before loading the program, immediately before executing the program, and at the time of a random clear request. On the other hand, the timing for clearing the program memory initialization information 43 is as follows.
Must be just before loading the program.

【0048】すなわち、カバレッジ情報のクリア機能と
して、プログラムメモリ初期化情報43を保持しつつ、
他の3種類のカバレッジ情報をクリアすることが必要に
なる。
That is, as a function of clearing coverage information, while holding the program memory initialization information 43,
It is necessary to clear the other three types of coverage information.

【0049】この新しいカバレッジ情報のクリア方法
は、プログラムメモリ初期化情報43を“X”、他の3
種類のカバレッジ情報を“YYY”とすると、次のよう
な簡単な論理演算により可能となる。
This new method of clearing the coverage information is performed by setting the program memory initialization information 43 to “X” and the other three
Assuming that the type of coverage information is “YYY”, this can be achieved by the following simple logical operation.

【0050】プログラムメモリ初期化情報43を保持す
る場合、 XYYYb AND 1000b = X000b、 とされ、一方プログラムメモリ初期化情報43を保持し
ない場合には、 XYYYb AND 0000b = 0000b とされる。
When the program memory initialization information 43 is held, XYYYb AND 1000b = X000b, and when the program memory initialization information 43 is not held, XYYYb AND 0000b = 0000b.

【0051】表2は、カバレッジ情報のクリアを指示す
る要求およびプログラムメモリ初期化情報43を保持す
る要求と、カバレッジ情報の変化の関係の一覧を示した
表である。
Table 2 is a table showing a relationship between a request for clearing the coverage information, a request for holding the program memory initialization information 43, and a change in the coverage information.

【0052】[0052]

【表2】 [Table 2]

【0053】図5は、本発明の第2の実施の形態とし
て、カバレッジメモリ3とカバレッジメモリ制御回路4
の関係を詳細に示した図である。また、この実施の形態
における、カバレッジ情報のうちのプログラムメモリ書
き込み情報40を用いたプログラム誤動作検出方法は、
図3及び図4のフローチャートを参照して説明される。
FIG. 5 shows a coverage memory 3 and a coverage memory control circuit 4 according to a second embodiment of the present invention.
FIG. 4 is a diagram showing the relationship in detail. Further, the method of detecting a program malfunction using the program memory write information 40 of the coverage information in the present embodiment is as follows.
This will be described with reference to the flowcharts of FIGS.

【0054】図5を参照して、プログラムメモリ書き込
み情報40は、プログラムメモリ2が初期化された(プ
ログラムメモリ2にプログラムがロードされた)か初期
化されなかったか(ロードされなかったこと)を示す情
報であり、プログラムメモリ2にプログラムがロードさ
れた場合にセットされる。
Referring to FIG. 5, the program memory write information 40 indicates whether the program memory 2 has been initialized (the program has been loaded into the program memory 2) or not (it has not been loaded). This information is set when a program is loaded into the program memory 2.

【0055】このプログラムメモリ書き込み情報40
は、前記第1の実施の形態におけるプログラムメモリ初
期化情報43と同じ意味を持つことから、以下では、プ
ログラムメモリ初期化情報43をプログラムメモリ書き
込み情報40に置き換えて、説明する。
This program memory write information 40
Has the same meaning as the program memory initialization information 43 in the first embodiment, the following description will be made by replacing the program memory initialization information 43 with the program memory write information 40.

【0056】まず、プログラムメモリ書き込み情報40
のセットの方法は、図3に示したプログラムメモリ初期
化情報43のセット方法において、プログラムメモリ初
期化情報43をプログラムメモリ書き込み情報40に置
き換えた場合と同様とされる。これにより、プログラム
メモリ2の各アドレスのうち、プログラムがロードされ
たアドレスのプログラムメモリ書き込み情報40はセッ
トされ、プログラムがロードされなかったアドレスのプ
ログラムメモリ書き込み情報40はクリアされたままと
なる。
First, the program memory write information 40
Is the same as the method of setting the program memory initialization information 43 shown in FIG. 3 except that the program memory initialization information 43 is replaced with the program memory write information 40. As a result, among the addresses of the program memory 2, the program memory write information 40 of the address where the program is loaded is set, and the program memory write information 40 of the address where the program is not loaded remains cleared.

【0057】次に、プログラムメモリ書き込み情報40
を用いたプログラム誤動作検出方法としては、図4に示
したプログラムメモリ初期化情報43のセット方法にお
いて、プログラムメモリ初期化情報43をプログラムメ
モリ書き込み情報40に置き換えた場合と同様とされ
る。
Next, the program memory write information 40
Is the same as the method of setting the program memory initialization information 43 shown in FIG. 4 except that the program memory initialization information 43 is replaced with the program memory write information 40.

【0058】以上により、プログラムがロードされてい
ないアドレスを参照することによって生じるプログラム
の誤動作を検出する。
As described above, the malfunction of the program caused by referring to the address where the program is not loaded is detected.

【0059】図5を参照して、カバレッジ制御回路4
は、カバレッジ情報をクリアする機能を持つ。3種類の
カバレッジ情報(プログラムメモリ実行情報42、プロ
グラムメモリ読み込み情報41、プログラムメモリ書き
込み情報40)を3ビットのデータとして扱い、表3に
示したように、ビットを割り当てるものとする。
Referring to FIG. 5, coverage control circuit 4
Has a function to clear coverage information. It is assumed that three types of coverage information (program memory execution information 42, program memory read information 41, and program memory write information 40) are treated as 3-bit data, and bits are assigned as shown in Table 3.

【0060】[0060]

【表3】 [Table 3]

【0061】プログラムメモリ書き込み情報40を保持
しつつ他の2種類のカバレッジ情報をクリアする方法
は、前記第1の実施の形態で説明した論理演算により可
能となる。
A method of clearing the other two types of coverage information while holding the program memory write information 40 can be performed by the logical operation described in the first embodiment.

【0062】プログラムメモリ書き込み情報40を保持
する場合、 YYXb AND 001b = 00Xb とされ、一方、プログラムメモリ書き込み情報40を保
持しない場合には、 YYXb AND 000b = 000b とされる。
When the program memory write information 40 is held, YYXb AND 001b = 00Xb, and when the program memory write information 40 is not held, YYXb AND 000b = 000b.

【0063】表4は、カバレッジ情報のクリアを指示す
る要求およびプログラムメモリ書き込み情報40を保持
する要求とカバレッジ情報の変化の関係の一覧をまとめ
たものである。
Table 4 summarizes a relationship between a request for clearing coverage information, a request for holding program memory write information 40, and a change in coverage information.

【0064】[0064]

【表4】 [Table 4]

【0065】プログラム開発支援装置には、プログラム
のカバレッジ情報をカバレッジメモリに格納する場合
(モニタモード)と、プログラムのカバレッジ情報をカ
バレッジメモリに格納しない場合(ユーザモード)があ
る。
The program development support apparatus has a case where the coverage information of the program is stored in the coverage memory (monitor mode) and a case where the coverage information of the program is not stored in the coverage memory (user mode).

【0066】従来のユーザモードでは、プログラムメモ
リ初期化情報43もプログラムメモリ書き込み情報40
も存在しないため、誤動作検出を行えないが、ユーザモ
ードにおいてもプログラムメモリ書き込み情報40さえ
用意すれば、本発明による誤動作検出方法を利用するこ
とができる。
In the conventional user mode, the program memory initialization information 43 is
Therefore, the malfunction detection method according to the present invention can be used if only the program memory write information 40 is prepared even in the user mode.

【0067】[0067]

【発明の効果】以上説明したように、本発明によれば、
データメモリの初期化判定方法の処理方法の変更してプ
ログラムメモリに応用し、誤動作検出方法をプログラム
開発支援装置まで範囲を広げることができる。
As described above, according to the present invention,
By changing the processing method of the data memory initialization determination method and applying it to the program memory, the range of the malfunction detection method can be extended to the program development support device.

【0068】また、本発明によれば、プログラムメモリ
初期化情報をカバレッジメモリに格納し、簡単な論理演
算を付加することでカバレッジ情報のクリア機能をプロ
グラムメモリ初期化情報のクリア機能と共用することが
できる。
According to the present invention, the program memory initialization information is stored in the coverage memory, and a simple logical operation is added to share the coverage information clear function with the program memory initialization information clear function. Can be.

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

【図1】本発明の第1の実施の形態を説明するための図
であり、プログラム誤動作検出方法を実現するプログラ
ム開発支援装置の構成を示す図である。
FIG. 1 is a diagram for describing a first embodiment of the present invention, and is a diagram illustrating a configuration of a program development support device that realizes a program malfunction detection method.

【図2】本発明の第1の実施の形態におけるカバレッジ
メモリ3とカバレッジメモリ制御回路4の関係を説明す
るための図である。
FIG. 2 is a diagram for explaining a relationship between a coverage memory 3 and a coverage memory control circuit 4 according to the first embodiment of the present invention.

【図3】本発明の第1の実施の形態におけるプログラム
メモリ初期化情報のセット方法を説明するためのフロー
チャートである。
FIG. 3 is a flowchart illustrating a method for setting program memory initialization information according to the first embodiment of the present invention.

【図4】本発明の第1の実施の形態におけるプログラム
メモリ初期化情報43を用いたプログラム誤動作検出方
法を説明するためのフローチャートである。
FIG. 4 is a flowchart for explaining a program malfunction detection method using program memory initialization information 43 according to the first embodiment of the present invention.

【図5】本発明の第2の実施の形態におけるカバレッジ
メモリ3とカバレッジメモリ制御回路4の関係を説明す
るための図である。
FIG. 5 is a diagram for explaining a relationship between a coverage memory 3 and a coverage memory control circuit 4 according to a second embodiment of the present invention.

【符号の説明】 1 CPU 2 プログラムメモリ 3 カバレッジメモリ 4 カバレッジメモリ制御回路 5 プログラム開発支援装置 6 ホストコンピュータ 10 アドレスバス 11 データバス 12 CPUからのメモリR/W信号 20 プログラムのロード要求 21 プログラムメモリ初期化情報のクリア 22 プログラムのロード 23 プログラムメモリ初期化情報のセット 24 プログラムの終了判断 30 プログラムの実行要求 31 プログラムメモリの初期化情報の読み込み 32 プログラムのロード判断 33 プログラムの読み込み 34 プログラムの実行 35 プログラムの実行の終了判断 36 誤動作検出情報の出力 40 プログラムメモリ書き込み情報 41 プログラムメモリ読み込み情報 42 プログラムメモリ実行情報 43 プログラムメモリ初期化情報 45 誤動作検出情報 50 プログラムメモリ書き込み信号 51 プログラムメモリ読み込み信号 52 プログラムメモリ実行信号 53 プログラムメモリ初期化信号 54 カバレッジメモリR/W信号 55 誤動作検出信号 56 カバレッジデータバス[Description of Signs] 1 CPU 2 Program memory 3 Coverage memory 4 Coverage memory control circuit 5 Program development support device 6 Host computer 10 Address bus 11 Data bus 12 Memory R / W signal from CPU 20 Program load request 21 Program memory initial Clear initialization information 22 Load program 23 Set program memory initialization information 24 Determine program termination 30 Request program execution 31 Read program memory initialization information 32 Determine program load 33 Read program 34 Execute program 35 Program End of execution of execution 36 Output of malfunction detection information 40 Program memory write information 41 Program memory read information 42 Program memory execution information 43 Program Initialized memory 45 the malfunction detection information 50 program memory write signal 51 program memory read signal 52 program memory execution signal 53 program memory initialization signal 54 Coverage memory R / W signal 55 the malfunction detection signal 56 coverage data bus

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】CPUにて実行されるプログラムを格納す
るプログラムメモリと、前記プログラムの実行履歴情報を格納する読み出し及び
書き込み可能なカバレッジメモリであって 、前記プログ
ラムメモリの各アドレスに対して、該プログラムが前記
プログラムメモリにロードされたか否かを識別するため
のプログラムメモリ初期化情報をカバレッジ情報と兼用
して記憶格納するカバレッジメモリと、前記カバレッジメモリにおいて、前記プログラムメモリ
初期化情報は、プログラムのロード直前にクリアされ、
プログラムをロードした直後にセットされ、次のロード
までその値が保持され、 前記カバレッジメモリの読み書きを制御し、前記プログ
ラムメモリ初期化情報が、実行しようとしたプログラム
メモリが初期化されていない旨を示すとき、プログラム
の実行を誤動作と判断し、誤動作検出情報を出力するカ
バレッジメモリ制御回路と、 を含むことを特徴とするマイクロコンピュータのプログ
ラム開発支援装置。
1. A program memory for storing a program to be executed by a CPU, a program memory for storing execution history information of the program,
A writable coverage memory , wherein for each address of the program memory, program memory initialization information for identifying whether or not the program has been loaded into the program memory is also used as coverage information. And a coverage memory for storing and storing the program memory in the coverage memory.
Initialization information is cleared just before loading the program,
Set immediately after loading the program, and
The value is held until, and the reading and writing of the coverage memory is controlled, and when the program memory initialization information indicates that the program memory to be executed has not been initialized, it is determined that the execution of the program is a malfunction, And a coverage memory control circuit for outputting malfunction detection information. A microcomputer program development support device comprising:
【請求項2】プログラムの実行履歴情報を格納する読み
出し及び書き込み可能なカバレッジメモリに、前記プロ
グラムメモリの各アドレスに対して、該プログラムが前
記プログラムメモリにロードされたか否かを識別するた
めのプログラムメモリ初期化情報をカバレッジ情報と
して記憶格納、 プログラムをロードする直前に前記カバレッジメモリの
前記プログラムメモリ初期化情報をクリア、 プログラムをロードした直後に前記カバレッジメモリの
前記プログラムメモリ初期化情報をセット、 プログラムの次のロードまで前記カバレッジメモリの前
プログラムメモリ初期化情報を保持、 前記CPUがプログラムを実行するとき、前記カバレッ
ジメモリの前記プログラムメモリ初期化情報の値によ
り、初期化されているプログラムメモリのアドレスを参
照したか、初期化されていないプログラムメモリのアド
レスを参照したかを判断する、ことを特徴とするプログ
ラム誤動作検出方法。
2. A reading device for storing execution history information of a program.
The out and writable coverage memory for each address of said program memory, and the coverage information program memory initialization information for the program to identify whether it has been loaded into the program memory
Use to store stored, the coverage memory immediately prior to loading the program
Clear the program memory initialization information, of the coverage memory immediately after loading the program
The program memory initialization information is set, and before the next load of the program,
Holding the serial program memory initialization information, when the CPU executes a program, the coverage
Determining whether the address of the initialized program memory or the address of the uninitialized program memory is referred to based on the value of the program memory initialization information of the memory. Detection method.
JP8174197A 1996-06-13 1996-06-13 Program malfunction detection development support device and program malfunction detection method Expired - Lifetime JP2904130B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8174197A JP2904130B2 (en) 1996-06-13 1996-06-13 Program malfunction detection development support device and program malfunction detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8174197A JP2904130B2 (en) 1996-06-13 1996-06-13 Program malfunction detection development support device and program malfunction detection method

Publications (2)

Publication Number Publication Date
JPH103407A JPH103407A (en) 1998-01-06
JP2904130B2 true JP2904130B2 (en) 1999-06-14

Family

ID=15974429

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8174197A Expired - Lifetime JP2904130B2 (en) 1996-06-13 1996-06-13 Program malfunction detection development support device and program malfunction detection method

Country Status (1)

Country Link
JP (1) JP2904130B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0549476B1 (en) * 1991-12-24 1998-09-23 Tokyo Gas Co., Ltd. Surface combustion burner
JP4849606B2 (en) 2006-04-28 2012-01-11 株式会社日立製作所 Control flow error detection method, data processing apparatus, and compiler

Also Published As

Publication number Publication date
JPH103407A (en) 1998-01-06

Similar Documents

Publication Publication Date Title
JP3242890B2 (en) Storage device
KR100316981B1 (en) Microcomputer provided with flash memory and method of storing program into flash memory
US7069373B2 (en) USB endpoint controller flexible memory management
US20010042225A1 (en) Computer system implementing fault detection and isolation using unique identification codes stored in non-volatile memory
JPH0216640A (en) Exclusive system for identifying point with possible defect in digital data processing system
GB2348306A (en) Batch processing of tasks in data processing systems
JPH06223002A (en) Test circuit of microprocessor memory
JP2904130B2 (en) Program malfunction detection development support device and program malfunction detection method
JP3222083B2 (en) Shared memory controller
CN115359834B (en) Disk arbitration region detection method, device, equipment and readable storage medium
US6971003B1 (en) Method and apparatus for minimizing option ROM BIOS code
US7036005B2 (en) Method and apparatus for modifying the contents of revision identification register
US20060230307A1 (en) Methods and systems for conducting processor health-checks
JPS6342294B2 (en)
CN1280731C (en) Methods and apparatus for maintaining coherency in a multi-processor system
JPH0766368B2 (en) Boot processor determination method
US7222202B2 (en) Method for monitoring a set of semaphore registers using a limited-width test bus
US20070179635A1 (en) Method and article of manufacure to persistently deconfigure connected elements
US6314482B1 (en) Method and system for indexing adapters within a data processing system
US7895493B2 (en) Bus failure management method and system
JP2003150458A (en) Fault detector, fault detecting method, program and program recording medium
JPS59112479A (en) High speed access system of cache memory
US7500052B2 (en) Quick drive replacement detection on a live RAID system
JP3060376U (en) Memory device
JPH06309236A (en) Illegal write detecting circuit for memory

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19990223