JP2002073375A - Software operation monitoring method in system that contains microcomputer - Google Patents

Software operation monitoring method in system that contains microcomputer

Info

Publication number
JP2002073375A
JP2002073375A JP2000256575A JP2000256575A JP2002073375A JP 2002073375 A JP2002073375 A JP 2002073375A JP 2000256575 A JP2000256575 A JP 2000256575A JP 2000256575 A JP2000256575 A JP 2000256575A JP 2002073375 A JP2002073375 A JP 2002073375A
Authority
JP
Japan
Prior art keywords
microcomputer
address
monitoring method
address information
software
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
JP2000256575A
Other languages
Japanese (ja)
Inventor
Nobuo Takanashi
信夫 高梨
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.)
Hitachi Kokusai Electric Inc
Original Assignee
Hitachi Kokusai Electric Inc
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 Hitachi Kokusai Electric Inc filed Critical Hitachi Kokusai Electric Inc
Priority to JP2000256575A priority Critical patent/JP2002073375A/en
Publication of JP2002073375A publication Critical patent/JP2002073375A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a software operation monitoring method to detect an incorrect write memory operation due to software defect in a system that contains a microcomputer. SOLUTION: The monitoring of software operation is made by posting the occurrence of incorrect write operation in the address range specified freely to the microcomputer with an interruption and logging the incorrect write locations in a program.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、マイクロコンピュ
ータを有するシステムや電子機器において、信頼性を向
上させる方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for improving reliability in a system or an electronic device having a microcomputer.

【0002】[0002]

【従来の技術】従来のマイクロコンピュータを有するシ
ステムでは、システム自体でCPUの暴走を検出して自
動的にCPUにリセットをかけるWDT(Watch
DogTimer)を使用し、信頼性を高める方法が知
られている。
2. Description of the Related Art In a system having a conventional microcomputer, a WDT (Watch) which detects a runaway of a CPU by itself and automatically resets the CPU.
(DogTimer) is known to increase reliability.

【0003】[0003]

【発明が解決しようとする課題】前述の従来技術には、
以下の欠点がある。
The above-mentioned prior art includes the following:
It has the following disadvantages.

【0004】(1)マイクロコンピュータシステムに組
み込まれたソフトウェアに不具合があり、メモリ上のデ
ータエリアが不正に書き換えられる不備が発生すると、
システムの正常な稼動は保証できないが、CPUの暴走
には至らない状態となり、このときは、WDTは作動し
ない。
[0004] (1) If there is a defect in software incorporated in the microcomputer system and there is a defect that the data area on the memory is illegally rewritten,
Although normal operation of the system cannot be guaranteed, the CPU does not run away, and the WDT does not operate at this time.

【0005】(2)WDTが作動すると、自動的にCP
Uがリセットされるため、ソフトウェアの不具合の痕跡
が残らず、原因追及が困難である。本発明は、上記の
(1)(2)の問題点を解決することを目的とする。
(2) When the WDT is activated, the CP is automatically
Since U is reset, no trace of software failure remains, and it is difficult to find the cause. An object of the present invention is to solve the above problems (1) and (2).

【0006】[0006]

【課題を解決するための手段】本発明は、上記(1)
(2)の問題点を解決するため、次にようにしたもので
ある。第1に、上記(1)の問題については、任意のア
ドレスに対する不正な書込みを検出するため、監視対象
のアドレス範囲(上限値、下限値)をバッファに設定
し、この内容をマイクロコンピュータが動作中に出力す
るアドレス情報と比較して、当該アドレス範囲に対する
書込み発生を検出する。また、アプリケーションプログ
ラムで、当該アドレス範囲に対する書込み動作が意図的
なときは、この情報を出力することにより、不正な書込
み動作との選択ができるようにしたものである。
The present invention relates to the above (1).
In order to solve the problem (2), the following is performed. First, regarding the above problem (1), in order to detect unauthorized writing to an arbitrary address, an address range (upper limit value, lower limit value) to be monitored is set in a buffer, and the contents are operated by a microcomputer. The occurrence of writing to the address range is detected by comparing with the address information to be output. Further, when a write operation to the address range is intentional in an application program, by outputting this information, an illegal write operation can be selected.

【0007】第2に、上記(2)の問題を解決するため
に、不正な書込み動作を検出したときに、CPUに割込
みを発生させる手段を設け、この割込みが発生したとき
に起動されるプログラムを具備し、このプログラム処理
の中で、上記現象が発生したときの命令のアドレスをロ
ギングするようにしたものである。
Second, in order to solve the above problem (2), a means for generating an interrupt to the CPU when an illegal write operation is detected is provided, and a program started when the interrupt is generated is provided. In this program processing, the address of the instruction when the above phenomenon occurs is logged.

【0008】[0008]

【発明の実施の形態】以下、本発明の一実施例を図1〜
図3を参照して説明する。図1において、10はマイク
ロコンピュータであり、任意のアドレス範囲に対する書
込み動作が発生したときに、この動作が意図的に実施さ
れる処理であることを明示するための情報を出力するD
Oポートと、不正な書込み動作を検出したときに、この
通知を受けるための割込み入力部を備える。また、20
はアドレスデコード部で、マイクロコンピュータ10
が、アドレス上限値用ラッチ30アドレス下限値用ラッ
チ40、アドレス比較結果記憶部80に対する設定を行
うための回路である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will now be described with reference to FIGS.
This will be described with reference to FIG. In FIG. 1, reference numeral 10 denotes a microcomputer which outputs information for specifying that this operation is a process intentionally performed when a write operation to an arbitrary address range occurs.
It has an O port and an interrupt input unit for receiving this notification when an illegal write operation is detected. Also, 20
Is an address decoding unit, which is a microcomputer 10
Is a circuit for setting the address upper limit latch 30, the address lower limit latch 40, and the address comparison result storage unit 80.

【0009】次に、30は、アドレス上限値用ラッチで
あり、マイクロコンピュータ10からのデータを設定す
ることができる。40はアドレス下限値用ラッチであ
り、マイクロコンピュータ10からのデータが設定でき
る。さらに、50はデジタルコンパレータであり、アド
レス上限値用ラッチ30の内容と、マイクロコンピュー
タ10がアドレスバス上に出力する内容を比較し、この
結果を出力する。また、60はデジタルコンパレータで
あり、アドレス下限値用ラッチ40の内容とマイクロコ
ンピュータ10がアドレスバス上に出力する内容を比較
し、この結果を出力する。
Reference numeral 30 denotes an address upper limit latch, which can set data from the microcomputer 10. An address lower limit latch 40 can set data from the microcomputer 10. A digital comparator 50 compares the contents of the address upper limit latch 30 with the contents output from the microcomputer 10 on the address bus, and outputs the result. A digital comparator 60 compares the contents of the address lower limit latch 40 with the contents output by the microcomputer 10 on the address bus, and outputs the result.

【0010】次に、70はアドレス情報の比較結果判定
回路であり、マイクロコンピュータ10がアドレスバス
上に出力する内容が以下の条件を満たすとき、パルスを
出力する。
Reference numeral 70 denotes an address information comparison result determination circuit, which outputs a pulse when the content output from the microcomputer 10 on the address bus satisfies the following conditions.

【0011】アドレス下限値≦(アドレスバス上の値)
≦アドレス上限値80はアドレス情報の比較結果判定
と、書込み動作の妥当性を示す情報に基づき不正な書込
み動作を検出し、この情報をマイクロコンピュータ10
へ通知するための回路である。ここで、マイクロコンピ
ュータ10への通知は、レベルトリガによる割込みであ
る。
Address lower limit value ≦ (value on address bus)
.Ltoreq.address upper limit value 80 detects an illegal write operation based on the comparison result of the address information and information indicating the validity of the write operation.
This is a circuit for notifying to. Here, the notification to the microcomputer 10 is an interruption by a level trigger.

【0012】図2に、本実施例を用いるときのアプリケ
ーションプログラムの動作手順について示す。図2に示
すように、アプリケーションプログラムが、モジュール
A、モジュールB、モジュールC等、複数に分割されて
いるとき、モジュールBの処理201が、モジュールA
の使用するメモリエリアにデータの不正書込みを行なう
と、図1に示すハードウェア構成により、マイクロコン
ピュータに不正な書込み発生時の割込みが発生する。
FIG. 2 shows an operation procedure of an application program when this embodiment is used. As shown in FIG. 2, when the application program is divided into a plurality of modules A, B, C, etc., the processing 201 of the module B
When data is illegally written into a memory area used by the microcomputer, an interrupt at the time of occurrence of illegal writing is generated in the microcomputer by the hardware configuration shown in FIG.

【0013】この割込みが発生すると、図3に示すよう
に、割込み処理モジュールにおいて、モジュールBの処
理201の戻り先のアドレスがロギングされ(図3のス
テップ301)、続いて割込み発生がクリアされる(図
3のステップ302)。このように、モジュールBの処
理201の戻り先のアドレスをロギングするようにした
ため、プログラムの不正箇所の特定が可能となる。
When this interrupt occurs, as shown in FIG. 3, in the interrupt processing module, the return address of the process 201 of the module B is logged (step 301 in FIG. 3), and then the occurrence of the interrupt is cleared. (Step 302 in FIG. 3). As described above, since the return address of the process 201 of the module B is logged, it is possible to specify an illegal portion of the program.

【0014】一方、モジュールAでも上記と同じアドレ
ス範囲に書込みを実施するが、処理103で、書込みの
妥当性が設定されているため、割込みは発生しない。以
上の動作により、不正な書込み動作が検出でき、ソフト
ウェアの動作監視が可能である。
On the other hand, the writing is performed in the same address range as that of the module A, but no interruption occurs because the validity of the writing is set in the process 103. With the above operation, an illegal write operation can be detected, and the operation of the software can be monitored.

【0015】[0015]

【発明の効果】以上説明したように、本発明によれば、
マイクロコンピュータを有するシステムにおいて、ソフ
トウェアの不備による不正な書込み動作を検出できるよ
うになり、ソフトウェアのデバッグ作業において、ツー
ルとして活用でき、システム全体としての信頼性を向上
させることができる。
As described above, according to the present invention,
In a system having a microcomputer, an illegal write operation due to a defect in software can be detected, which can be used as a tool in software debugging work, and the reliability of the entire system can be improved.

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

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

【図2】本発明の一実施例の動作手順を示すフローチャ
ートである。
FIG. 2 is a flowchart showing an operation procedure of one embodiment of the present invention.

【図3】本発明の一実施例の割込み手順を示すフローチ
ャートである。
FIG. 3 is a flowchart showing an interrupt procedure according to an embodiment of the present invention.

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

10:マイクロコンピュータ、20:アドレスデコード
回路、30,40:アドレス情報を格納するラッチ回
路、50,60:デジタルコンパレータ、70:アドレ
ス情報の比較結果を判定する組み合せ回路、80:不正
な書込みが発生したときの情報を保持する順序回路。
10: microcomputer, 20: address decode circuit, 30 and 40: latch circuit for storing address information, 50 and 60: digital comparator, 70: combination circuit for judging the comparison result of address information, 80: illegal writing occurs A sequential circuit that holds the information when it is done.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 マイクロコンピュータを有するシステム
において、 アドレス情報の上限値用ラッチと、アドレス情報の下限
値用ラッチと、アドレス情報の比較手段と、比較結果の
有効・無効を指定する手段と、動作状態情報収集するプ
ログラムを備え、 所要のアドレス範囲が不正にアクセスされたときに、割
込みを発生してマイクロコンピュータに通知し、このと
きの動作状態情報を収集するようにしたことを特徴とす
るソフトウェアの動作監視方法。
In a system having a microcomputer, a latch for address information upper limit value, a latch for address information lower limit value, address information comparing means, means for designating validity / invalidity of the comparison result, and operation Software having a program for collecting status information, wherein when a required address range is illegally accessed, an interrupt is generated to notify the microcomputer and the operating status information at this time is collected. Operation monitoring method.
【請求項2】 請求項1記載のソフトウェアの動作監視
方法において、 前記アドレス情報の上限値用ラッチと、アドレス情報の
下限値用ラッチと、アドレス情報比較結果の有効・無効
を指定する手段に対し、マイクロコンピュータから情報
を設定するようにしたことを特徴とするソフトウェアの
動作監視方法。
2. The software operation monitoring method according to claim 1, wherein the latch for the upper limit value of the address information, the latch for the lower limit value of the address information, and means for designating validity / invalidity of the address information comparison result. A software operation monitoring method, wherein information is set from a microcomputer.
JP2000256575A 2000-08-28 2000-08-28 Software operation monitoring method in system that contains microcomputer Pending JP2002073375A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000256575A JP2002073375A (en) 2000-08-28 2000-08-28 Software operation monitoring method in system that contains microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000256575A JP2002073375A (en) 2000-08-28 2000-08-28 Software operation monitoring method in system that contains microcomputer

Publications (1)

Publication Number Publication Date
JP2002073375A true JP2002073375A (en) 2002-03-12

Family

ID=18745165

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000256575A Pending JP2002073375A (en) 2000-08-28 2000-08-28 Software operation monitoring method in system that contains microcomputer

Country Status (1)

Country Link
JP (1) JP2002073375A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011180840A (en) * 2010-03-01 2011-09-15 Toshiba Corp Processor, multiprocessor system, and method of detecting illegal memory access
JP2011237869A (en) * 2010-05-06 2011-11-24 Kyocera Mita Corp Information processor
JP2014186453A (en) * 2013-03-22 2014-10-02 Hitachi Automotive Systems Ltd Vehicle control apparatus

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011180840A (en) * 2010-03-01 2011-09-15 Toshiba Corp Processor, multiprocessor system, and method of detecting illegal memory access
JP2011237869A (en) * 2010-05-06 2011-11-24 Kyocera Mita Corp Information processor
JP2014186453A (en) * 2013-03-22 2014-10-02 Hitachi Automotive Systems Ltd Vehicle control apparatus

Similar Documents

Publication Publication Date Title
EP0664511A2 (en) Microprocessor fault log
US20030140285A1 (en) Processor internal error handling in an SMP server
JP2008009721A (en) Evaluation system and evaluation method thereof
JPH11134258A (en) Method and device for providing access protection in integrated circuit
US20060150033A1 (en) Method for monitoring the execution of a program in a micro-computer
JP2006338445A (en) Abnormality information storage apparatus
JP2002073375A (en) Software operation monitoring method in system that contains microcomputer
JP2004021922A (en) Pseudo memory failure injection device
US7389445B2 (en) Circuit for detecting abnormal operation of memory and integrated circuit and method for detecting abnormal operation
JPH1165898A (en) Maintenance system for electronic computer
JP3154853B2 (en) Illegal memory access detection method
JP2870202B2 (en) Method and apparatus for mutual monitoring between processors
KR100244779B1 (en) An error detector in digital system and an error identifying method therewith
US20020087951A1 (en) Method for debugging in application program and apparatus thereof
US7500154B2 (en) Method and system for generating a console log
JPH0844629A (en) Memory access abnormality monitoring device
JP3722500B2 (en) Power-off detection device for equipment with security mechanism
US5218606A (en) Current-spare switching control system
JP2544536B2 (en) Method for determining the presence or absence of data in memory
US6438644B1 (en) Method to prevent a flash memory from being miswritten
JP3757407B2 (en) Control device
JPS60233743A (en) Fault detecting circuit of computer system
JPH05265864A (en) Memory managing circuit and processor unit with memory managing circuit
JPH10301853A (en) Device writing inhibiting circuit
JP2002278800A (en) Monitor and monitoring method