JPH01253045A - Logical analyzing circuit - Google Patents
Logical analyzing circuitInfo
- Publication number
- JPH01253045A JPH01253045A JP63081555A JP8155588A JPH01253045A JP H01253045 A JPH01253045 A JP H01253045A JP 63081555 A JP63081555 A JP 63081555A JP 8155588 A JP8155588 A JP 8155588A JP H01253045 A JPH01253045 A JP H01253045A
- Authority
- JP
- Japan
- Prior art keywords
- microprocessor
- instruction address
- instruction
- storage means
- address
- 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
Links
- 238000010586 diagram Methods 0.000 description 6
- 238000000034 method Methods 0.000 description 2
- 239000003795 chemical substances by application Substances 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 239000013256 coordination polymer Substances 0.000 description 1
Abstract
Description
【発明の詳細な説明】
産業上の利用分野
本発明は、マイクロプロセッサを塔載した電子回路のソ
フトウェアを開発する場合等に利用する論理分析回路に
関する。DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a logic analysis circuit used when developing software for an electronic circuit equipped with a microprocessor.
従来の技術
従来、マイクロプロセッサを塔載した電子回路のソフト
ウェアを開発する場合は、予め設定されたトリガ条件で
その前後の動作をマイクロプロセッサの記憶装置に格納
して読み出すことによりトレースし、得られたプログラ
ムの実行過程によりプログラムのバクの原因を解析して
いた。Conventional Technology Traditionally, when developing software for an electronic circuit equipped with a microprocessor, the operations before and after the trigger conditions are traced by storing and reading them in the microprocessor's memory device. The cause of bugs in the program was analyzed based on the execution process of the program.
発明が解決しようとする課題
しかしながら、上記従来のプログラムのバクの原因を解
析する方法では、マイクロプロセッサの記憶装置に格納
するので、異常動作等に対するイベントトリガ解析を行
っても、マイクロプロセッサの記憶装置の容量の範囲内
のトレース情報しか得られないという問題点がある。Problems to be Solved by the Invention However, in the conventional method for analyzing the causes of bugs in programs, the causes of bugs in programs are stored in the microprocessor's storage device. The problem is that trace information can only be obtained within the capacity of .
また、トレース情報を得られる範囲においても、割り込
み処理等の他のプログラム処理により記憶装置の内容が
破壊されている場合には、バグを解析することができな
いという問題点がある。Furthermore, even in the range where trace information can be obtained, if the contents of the storage device have been destroyed by other program processing such as interrupt processing, there is a problem in that bugs cannot be analyzed.
本発明は上記従来の問題点に鑑み、マイクロプロセッサ
の記憶装置に対する書き換え命令実行の履歴を全てトレ
ースすることができる論理分析回路を提供することを目
的とする。SUMMARY OF THE INVENTION In view of the above-mentioned conventional problems, it is an object of the present invention to provide a logic analysis circuit that can trace the entire history of execution of rewriting instructions for a storage device of a microprocessor.
課題を解決するだめの手段
本発明は上記目的を達成するために、マイクロプロセッ
サを塔載した電子回路の記憶装置と同容量の記憶手段を
設け、マイクロプロセッサが命令を実行する場合にその
命令アドレスをこの記憶手段に書き込み、この命令アド
レスが書き替えられた場合にその命令アドレスを読み出
し、設計値と比較することによりプログラムのバグを検
出するようにしたものである。Means for Solving the Problems In order to achieve the above object, the present invention provides a storage means having the same capacity as the storage device of an electronic circuit equipped with a microprocessor, and when the microprocessor executes an instruction, the instruction address is stored. is written in this storage means, and when this instruction address is rewritten, the instruction address is read out and compared with a design value to detect a bug in the program.
作用
本発明は上記構成により、マイクロプロセッサの命令が
記憶手段に逐一記憶されるので、マイクロプロセッサの
記憶装置に対する書き換え命令実行の履歴を全てトレー
スすることができる。According to the present invention, with the above-described configuration, the instructions of the microprocessor are stored one by one in the storage means, so that the entire history of execution of rewriting instructions for the storage device of the microprocessor can be traced.
実施例
以下、図面を参照して本発明の詳細な説明する。第1図
は、本発明に係る論理分析回路の一実施例を示すブロッ
ク図、第2図は、第1図の電子回路の解析対象となるプ
ログラム例を示す説明図、第3図は、第1図の電子回路
の記憶装置の記憶内容を示す説明図である。EXAMPLES Hereinafter, the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of a logic analysis circuit according to the present invention, FIG. 2 is an explanatory diagram showing an example of a program to be analyzed for the electronic circuit of FIG. 1, and FIG. FIG. 2 is an explanatory diagram showing the storage contents of the storage device of the electronic circuit shown in FIG. 1;
第1図において、1は、解析対象となるマイクロプロセ
ッサを塔載した電子回路2のデバノギングを行うマイク
ロプロセッサ(インサーキットエミュレータ)であり、
マイクロプロセッサ1と電子回路2は、データバス10
とアドレスバス11ヲ介して接続される。In FIG. 1, 1 is a microprocessor (in-circuit emulator) that performs devanogging of an electronic circuit 2 equipped with a microprocessor to be analyzed.
The microprocessor 1 and the electronic circuit 2 are connected to a data bus 10
and is connected via an address bus 11.
電子回路2のCPU (不図示)は、−例として第2図
に示すように、各棟割り込み処理プログラム15と、無
線データ処理プログラム16と、有線データ処理プログ
ラム17とその他の処理プログラム18を選択的に実行
し、無線データ処理プログラム16と、有線データ処理
プログラム17とその他の処理プログラム18は、リア
ルタイムモニタ14により処理時間が割り当てられる。The CPU (not shown) of the electronic circuit 2 selects each module's interrupt processing program 15, wireless data processing program 16, wired data processing program 17, and other processing programs 18, as shown in FIG. 2 as an example. The wireless data processing program 16, the wired data processing program 17, and other processing programs 18 are allotted processing times by the real-time monitor 14.
第1図に戻り、3は、電子回路2のマイクロプロセッサ
の記憶装置(不図示)と同容量の記憶エリアを有する記
憶素子である。Returning to FIG. 1, reference numeral 3 denotes a storage element having a storage area of the same capacity as the storage device (not shown) of the microprocessor of the electronic circuit 2.
電子回路2の記憶装置は、第3図に示すように、各種変
数を蓄えるだめのバッファエリア19と、第2図に示す
プログラムのタスクが自由に占有、返却しながら利用す
るためのキューエリア加と、割り込み処理等の場合に前
の状態を保持するだめのスタックエリア21を有する。As shown in FIG. 3, the storage device of the electronic circuit 2 includes a buffer area 19 for storing various variables, and a queue area addition for use while being freely occupied and returned by the program tasks shown in FIG. It also has a stack area 21 for holding the previous state in case of interrupt processing or the like.
スタックエリア21、キューエリア加のデータは、CP
Uが各プログラム15〜18を選択的に実行すると、書
き替えられる。Data in the stack area 21 and queue area are stored in the CP
When U selectively executes each program 15 to 18, it is rewritten.
4は、マイクロプロセッサ1からのオペコードフェッチ
信号S1に同期してアドレスバス11上の信号をランチ
することにより、マイクロプロセッサ1が実行した命令
のアドレスを記憶し、記憶素子3のデータとして出力す
るラッチ、5は、データバス10からのデータ又はアド
レスバス11からの命令アドレスを選択的に切り替え、
アドレス情報として記憶素子3に出力するバス切り替え
回路、6は、バス切り替え回路5からのアドレス情報を
デコードし、記憶素子3に出力するデコーダである。A latch 4 stores the address of an instruction executed by the microprocessor 1 by launching a signal on the address bus 11 in synchronization with the operation code fetch signal S1 from the microprocessor 1, and outputs the address as data in the storage element 3. , 5 selectively switch the data from the data bus 10 or the instruction address from the address bus 11;
A bus switching circuit 6 that outputs address information to the storage element 3 is a decoder that decodes address information from the bus switching circuit 5 and outputs it to the storage element 3.
7は、アドレスバス11上のアドレス情報をデコードす
るデコーダ、8は、記憶素子3から読み出された命令ア
ドレスを一時格納するためのバッファ、9は、データバ
スlO上のデータを記憶し、バス切り替え回路5に出力
するラッチである。7 is a decoder for decoding the address information on the address bus 11; 8 is a buffer for temporarily storing the instruction address read out from the storage element 3; 9 is for storing the data on the data bus IO; This is a latch that outputs to the switching circuit 5.
次に、上記実施例の動作を説明する。Next, the operation of the above embodiment will be explained.
第1図において、先ず、ラッチ4がマイクロプロセッサ
1からのオペコードフェッチ信号S1に同期してアドレ
スバス11上の信号をラッチすることにより、マイクロ
プロセッサ1が実行した命令アドレスを記憶する。In FIG. 1, first, the latch 4 latches the signal on the address bus 11 in synchronization with the operation code fetch signal S1 from the microprocessor 1, thereby storing the instruction address executed by the microprocessor 1.
次いで、マイクロプロセッサ1からの書き込み信号Wに
同期することにより、ラッチ4が記憶する命令アドレス
を記憶素子3に書き込む。Next, in synchronization with the write signal W from the microprocessor 1, the instruction address stored in the latch 4 is written into the storage element 3.
この処理中に記憶素子3のデータが書き替えられると、
マイクロプロセッサ1がプログラムの実行を中断し、こ
の記憶素子3に書き込まれた命令アドレスを読み取り信
号Rにより読み出し、バッファ9を経由して読み取る。If the data in the memory element 3 is rewritten during this process,
The microprocessor 1 interrupts the execution of the program, reads out the instruction address written in the memory element 3 using the read signal R, and reads it via the buffer 9.
したがって、この読み取った命令アドレスと記憶素子3
のアドレス値を比較することによシ、実行した命令アド
レスが記憶素子3の正しいアドレスのエリアに書き込ま
れたか否かを判別することができ、ソフトウェアのバグ
の原因を解析することができる。Therefore, this read instruction address and storage element 3
By comparing the address values of , it is possible to determine whether the executed instruction address has been written to the correct address area of the storage element 3, and the cause of the software bug can be analyzed.
発明の詳細
な説明したように、本発明は、マイクロプロセッサを塔
載した電子回路の記憶装置と同容量の記憶手段を設け、
マイクロプロセッサが命令を実行する場合にその命令ア
ドレスをこの記憶手段に書き込み、この命令アドレスが
書き替えられた場合にその命令アドレスを読み出し、設
計値と比較することによりプログラムのバグを検出する
ようにしだので、マイクロプロセッサの命令が記憶手段
に逐一記憶され、したがって、マイクロプロセッサの記
憶装置に対する書き換え命令実行の履歴を全てトレース
することができる。As described in detail, the present invention provides a storage means having the same capacity as a storage device of an electronic circuit equipped with a microprocessor,
When the microprocessor executes an instruction, the instruction address is written to this storage means, and when this instruction address is rewritten, the instruction address is read out and compared with the design value to detect bugs in the program. Therefore, the instructions of the microprocessor are stored one by one in the storage means, and therefore, the entire history of execution of rewriting instructions for the storage device of the microprocessor can be traced.
第1図は、本発明に係る論理分析回路の一実施例を示す
ブロック図、第2図は、第1図の電子回路の解析対象と
なるプログラム例を示す説明図、第3図は、第1図の電
子回路の記憶装置の記憶内容を示す説明図である。
■・・・マイクロプロセッサ(インサーキノトエミーレ
ータ)、2・・・電子回路(解析対象のマイクロプロセ
ッサ)、3・・・記憶素子。
代理人の氏名 弁理士 中 尾 敏 男 ほか1名第
1 図
第2図
第3図FIG. 1 is a block diagram showing an embodiment of a logic analysis circuit according to the present invention, FIG. 2 is an explanatory diagram showing an example of a program to be analyzed for the electronic circuit of FIG. 1, and FIG. FIG. 2 is an explanatory diagram showing the storage contents of the storage device of the electronic circuit shown in FIG. 1; ■...Microprocessor (insert emulator), 2...Electronic circuit (microprocessor to be analyzed), 3...Storage element. Name of agent: Patent attorney Toshio Nakao and 1 other person
1 Figure 2 Figure 3
Claims (1)
容量の記憶手段と、前記マイクロプロセッサが命令を実
行する場合にその命令アドレスを前記記憶手段に書き込
み、前記記憶手段に書き込まれた命令アドレスが書き替
えられた場合にその命令アドレスを読み出し、設計値と
比較することによりプログラムのバグを検出する手段と
を有する論理分析回路。A storage means having the same capacity as a writing device for an electronic circuit on which a microprocessor is mounted; when the microprocessor executes an instruction, an instruction address thereof is written in the storage means, and the instruction address written in the storage means is written. A logic analysis circuit having means for detecting a bug in a program by reading out the instruction address and comparing it with a design value when the instruction address is changed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP63081555A JPH01253045A (en) | 1988-04-01 | 1988-04-01 | Logical analyzing circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP63081555A JPH01253045A (en) | 1988-04-01 | 1988-04-01 | Logical analyzing circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH01253045A true JPH01253045A (en) | 1989-10-09 |
Family
ID=13749534
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP63081555A Pending JPH01253045A (en) | 1988-04-01 | 1988-04-01 | Logical analyzing circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH01253045A (en) |
-
1988
- 1988-04-01 JP JP63081555A patent/JPH01253045A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4094724B2 (en) | Apparatus and method for identifying exceptions when debugging software | |
US5680599A (en) | Program counter save on reset system and method | |
JPH11110255A (en) | Software debugging device and method | |
EP1125199B1 (en) | Method of debugging a program thread | |
JPH07334211A (en) | Data tracing method for programmable controller | |
JPS60159951A (en) | Tracing system in information processing device | |
JPH01253045A (en) | Logical analyzing circuit | |
JPH03113646A (en) | Trace circuit | |
JPH04328644A (en) | Debug back-up device | |
JP3100013B2 (en) | Program debug device | |
JPH07281924A (en) | Trace device and emulator using the trace device | |
JP2967741B2 (en) | CPU compatibility test equipment | |
JPS61221943A (en) | Arithmetic processor | |
JPS5835648A (en) | Program execution controlling system | |
JPH0795288B2 (en) | Microcomputer | |
JPS60193046A (en) | Detecting system for instruction exception | |
JPH0665941U (en) | Program operating device | |
JPH0628268A (en) | Microprocessor i/o access tracing system | |
JPS63261483A (en) | Data collecting device | |
JPH01161544A (en) | Program tracing system | |
JPH04337847A (en) | Program check method | |
JPS63180139A (en) | Microcomputer for evaluation of program | |
JPS63228237A (en) | Program debugging system | |
JPH0444973B2 (en) | ||
JPH03266139A (en) | Program debugging system |