JPH0695913A - Debugging device - Google Patents

Debugging device

Info

Publication number
JPH0695913A
JPH0695913A JP4266547A JP26654792A JPH0695913A JP H0695913 A JPH0695913 A JP H0695913A JP 4266547 A JP4266547 A JP 4266547A JP 26654792 A JP26654792 A JP 26654792A JP H0695913 A JPH0695913 A JP H0695913A
Authority
JP
Japan
Prior art keywords
microprocessor
circuit
trace
data
sampling
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
JP4266547A
Other languages
Japanese (ja)
Inventor
Koji Katagata
浩二 片方
Atsushi Furuido
敦 古井戸
Hideyuki Usuha
英幸 薄葉
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 Microcomputer System Ltd
Hitachi Ltd
Original Assignee
Hitachi Microcomputer System Ltd
Hitachi 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 Hitachi Microcomputer System Ltd, Hitachi Ltd filed Critical Hitachi Microcomputer System Ltd
Priority to JP4266547A priority Critical patent/JPH0695913A/en
Publication of JPH0695913A publication Critical patent/JPH0695913A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To improve the debugging efficiency of a defect with low reproducibility like malfunction due to a noise or the like. CONSTITUTION:This debugging device is provided with a comparing memory 24 and a comparator 26 for comparing data stored in the memory 24 with a signal on a slave bus at real time. The 1st I/O signal specified by a tracing condition or the like is stored in the memory 24 and the contents previously stored in the memory 24 are compared with the 2nd tracing information or after in each cycle, so that the debugging efficiency of a defect with low reproducibility can be improved.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、デバッグ対象とされる
プログラムのデバッグを可能とするデバッグ装置に関
し、例えばインサーキット・エミュレータに適用して有
効な技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a debugging device capable of debugging a program to be debugged, and more particularly to a technique effectively applied to an in-circuit emulator.

【0002】[0002]

【従来の技術】マイクロプロセッサ応用機器の開発にお
いて、その応用システムのデバッグやそのシステムの詳
細な評価を行うため、インサーキット・エミュレータが
使用されている。インサーキット・エミュレータは、ソ
フトウェア開発用の親計算機(ホストコンピュータ)な
どのシステム開発装置と、開発中の応用機器との間に接
続され、その応用機器に含まれるマイクロプロセッサ
(ターゲットマイクロプロセッサ)の機能を代行する一
方でデバッガとしての機能を持ち、詳細なシステムデバ
ッグを支援する。このようなインサーキット・エミュレ
ータにおいては、応用機器側のハードウェアおよびソフ
トウェアの評価を可能とする手段として、ターゲットマ
イクロプロセッサのプログラム実行を停止させるブレー
ク機能の他に、ターゲットマイクロプロセッサのプログ
ラム実行結果をターゲットマイクロプロセッサのマシン
サイクル単位に記憶し参照する機能すなわちトレース機
能を備えたものがある。
2. Description of the Related Art In developing a microprocessor application device, an in-circuit emulator is used for debugging the application system and performing detailed evaluation of the system. The in-circuit emulator is connected between a system development device such as a parent computer (host computer) for software development and an application device under development, and functions of a microprocessor (target microprocessor) included in the application device. While acting as a substitute, it has a function as a debugger and supports detailed system debugging. In such an in-circuit emulator, the break function that stops the program execution of the target microprocessor and the program execution result of the target microprocessor are available as a means to enable evaluation of the hardware and software on the application device side. Some have a function of storing and referring to each machine cycle of the target microprocessor, that is, a trace function.

【0003】ところで、従来のエミュレータ・システム
では、上記ブレーク機能を実現するため、ブレーク条件
設定用レジスタとコンパレータとを設け、予め条件設定
用レジスタにエミュレーション用マイクロプロセッサの
アドレス信号やデータ信号、コントロール信号その他任
意の信号状態の組合せをブレーク条件として設定し、条
件が一致したところでプログラムの実行を停止させるよ
うにしている。
In a conventional emulator system, a break condition setting register and a comparator are provided in order to realize the break function, and the address signal, data signal, and control signal of the emulation microprocessor are previously provided in the condition setting register. Any other combination of signal states is set as a break condition, and the program execution is stopped when the conditions are matched.

【0004】なお、インサーキット・エミュレータにつ
いて記載された文献の例としては、昭和63年10月1
日に日立マイクロコンピュータエンジニアリング株式会
社より発行された「日立マイコン技法(第2巻、第2
号、P21〜P27)」がある。
Incidentally, as an example of a document describing the in-circuit emulator, there is an example of October 1, 1988.
"Hitachi Microcomputer Techniques (Vol. 2, 2
No., P21-P27) ".

【0005】[0005]

【発明が解決しようとする課題】しかしながら、上記ト
レース機能を駆使したシステムデバッグにおいてプログ
ラムの実行を記憶し、それを参照しても、デバッグ対象
となる応用機器の不良現象がある程度明確にならなけれ
ば、デバッグのためのブレーク条件の設定をが行うこと
ができない。また、ノイズ等による誤動作や、タイミン
グ不良などのように再現性の低い不良については、いつ
不良が発生するのか予測できないため、不良発生時のサ
ンプリングデータを記録することが困難である。そのた
めノイズ等による誤動作、タイミング不良等再現性の低
い不良等に対するデバッグ効率が悪く、結果的に、デバ
ッグのために多大な時間を費やしてしまう。
However, if the execution of the program is stored and referred to in the system debug that makes full use of the trace function, the defect phenomenon of the application device to be debugged cannot be clarified to some extent. , Break conditions for debugging cannot be set. Further, it is difficult to record sampling data at the time of occurrence of a malfunction due to noise or the like, or a defect with low reproducibility such as a timing defect because it cannot be predicted when the defect will occur. Therefore, the debugging efficiency for malfunctions due to noise or the like, defects with low reproducibility such as timing defects, etc. is poor, and as a result, a great amount of time is spent for debugging.

【0006】本発明の目的は、ノイズ等による誤動作等
のように、再現性の低い不良に対するデバッグ効率を向
上させることにある。
An object of the present invention is to improve the debugging efficiency for a defect having low reproducibility such as a malfunction due to noise or the like.

【0007】本発明の前記並びにその他の目的と新規な
特徴は本明細書の記述及び添付図面から明らかになるで
あろう。
The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.

【0008】[0008]

【課題を解決するための手段】本願において開示される
発明のうち代表的なものの概要を簡単に説明すれば下記
の通りである。
The outline of the representative one of the inventions disclosed in the present application will be briefly described as follows.

【0009】すなわち、プロセッサによるターゲットプ
ログラム実行中に、ターゲットプログラム実行過程の情
報をサンプリングするためのサンプリング手段と、この
サンプリング手段によってサンプリングされたデータを
保持する記憶手段と、この記憶手段に格納されたデータ
とその後のターゲットプログラム実行過程のサンプリン
グデータとを比較するための比較手段とを含んでデバッ
グ装置を構成するものである。上記記憶手段に、上記タ
ーゲットプログラム実行中に予め指定しておいた範囲の
第1回目のサンプリングデータが期待値として格納され
るとき、上記比較手段は、2回目以降のプログラム実行
過程のサンプリングデータと上記記憶手段のデータとを
比較するように構成することができる。また、上記比較
回路の比較結果に基づいて、上記プロセッサのエミュレ
ーション動作を停止させるためのブレーク制御回路を含
めることができる。
That is, during execution of the target program by the processor, sampling means for sampling the information of the target program execution process, storage means for holding the data sampled by this sampling means, and storage means stored in this storage means. The debug device is configured to include a comparison means for comparing the data with the sampling data in the subsequent target program execution process. When the storage means stores the first sampling data in a range designated in advance during execution of the target program as an expected value, the comparing means stores the sampling data in the second and subsequent program execution steps. It may be arranged to compare with the data of the storage means. A break control circuit for stopping the emulation operation of the processor based on the comparison result of the comparison circuit can be included.

【0010】[0010]

【作用】上記した手段によれば、上記比較手段によって
サンプリングデータと、記憶手段の記憶内容とを比較す
ることは、予めブレーク条件を設定しなくとも代行マイ
クロプロセッサによってプログラムを繰り返し実行させ
たときにサンプリングデータの不一致の検出を可能と
し、このことが、再現性の低い不良に対するデバッグ効
率の向上を達成する。
According to the above-mentioned means, the comparison of the sampling data by the comparing means with the contents stored in the storing means is performed when the program is repeatedly executed by the proxy microprocessor without setting break conditions in advance. It enables detection of inconsistencies in sampling data, which achieves improved debug efficiency for defects with low repeatability.

【0011】[0011]

【実施例】先ず、本発明に係るデバッグ装置を一例とし
て図3に示すようなインサーキット・エミュレータに適
用した場合の代行用マイクロプロセッサと制御用マイク
ロプロセッサとの関係について簡単に説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS First, the relationship between a proxy microprocessor and a control microprocessor when the debug device according to the present invention is applied to an in-circuit emulator as shown in FIG. 3 will be briefly described.

【0012】図2に示されるように、インサーキット・
エミュレータ2は、親計算機1と、応用機器3との間に
配置される。インサーキット・エミュレータ2と親計算
機1とはシリアル回線バスラインによって結合され、イ
ンサーキット・エミュレータ2と応用機器3とはインタ
フェースケーブル4によって結合される。
As shown in FIG. 2, the in-circuit
The emulator 2 is arranged between the parent computer 1 and the application device 3. The in-circuit emulator 2 and the parent computer 1 are connected by a serial line bus line, and the in-circuit emulator 2 and the application device 3 are connected by an interface cable 4.

【0013】図3には上記インサーキット・エミュレー
タ2の比較的詳細な構成が示される。
FIG. 3 shows a relatively detailed structure of the in-circuit emulator 2.

【0014】図3において、11はマイクロプロセッサ
応用機器(ユーザ実機)に含まれるターゲットマイクロ
プロセッサの機能を代行してその応用機器の動作制御す
なわちエミュレーションを行うための代行用マイクロプ
ロセッサであり、16は各種デバッグ機能を達成するた
めの制御を司る制御用マイクロプロセッサである。
In FIG. 3, reference numeral 11 denotes a substitute microprocessor for performing the function control of the target microprocessor included in the microprocessor application device (user's actual device) and performing the operation control of the application device, that is, the emulation. It is a control microprocessor that controls the various debug functions.

【0015】代行用マイクロプロセッサ11が応用機器
上のターゲットマイクロプロセッサの機能を代行制御
(エミュレーション)するとき、代行用マイクロプロセ
ッサ11は制御用マイクロプロセッサ16の制御から切
り離され、また、代行用マイクロプロセッサ11の制御
動作状態が予め定められている状態に到達してブレーク
されるとき、制御用マイクロプロセッサ16の制御を受
けることになる。このような制御状態の切換えがエミュ
レーション制御部12によって行われる。
When the proxy microprocessor 11 performs proxy control (emulation) of the function of the target microprocessor on the application device, the proxy microprocessor 11 is separated from the control of the control microprocessor 16 and also the proxy microprocessor. When the control operation state 11 reaches a predetermined state and breaks, the control microprocessor 16 is controlled. The switching of the control state is performed by the emulation control unit 12.

【0016】上記エミュレータ本体2には、このエミュ
レーション制御部12、ブレーク制御部13、トレース
メモリ部14、代行メモリ部15などが含まれ、エミュ
レーション機能やブレーク機能、トレース機能等のデバ
ッグ機能が備えられている。尚、特に制限されないが、
エミュレーション制御部12、ブレーク制御部13、ト
レースメモリ部14、代行メモリ部15の各回路は、ス
レーブバス21を介して代行用マイクロプロセッサ11
に、またマスタバス22を介して制御用マイクロプロセ
ッサ16に接続されている。各機能の実行は、エミュレ
ータ本体2に接続される親計算機1によってコントロー
ルされる。
The emulator main body 2 includes the emulation control unit 12, the break control unit 13, the trace memory unit 14, the substitute memory unit 15, and the like, and is provided with a debug function such as an emulation function, a break function, and a trace function. ing. Although not particularly limited,
Each circuit of the emulation control unit 12, the break control unit 13, the trace memory unit 14, and the proxy memory unit 15 includes a proxy microprocessor 11 via a slave bus 21.
And to the control microprocessor 16 via the master bus 22. Execution of each function is controlled by the parent computer 1 connected to the emulator main body 2.

【0017】エミュレータ本体2内には、制御用マイク
ロプロセッサ16が親計算機1との間でデータ通信を行
うためのシリアルインタフェース回路17が設けられて
いる。また、代行用マイクロプロセッサ11からはイン
タフェース回路18を介してインタフェースケーブル4
が延長され、このインタフェースケーブル4の先端に設
けられているプラグがマイクロプロセッサ応用機器とし
てのユーザ実機上のMCUソケット5に接続されること
によって、代行用マイクロプロセッサ11によるユーザ
実機の代行制御が可能とされる。
A serial interface circuit 17 is provided in the emulator main body 2 for the control microprocessor 16 to perform data communication with the parent computer 1. Further, from the substitute microprocessor 11 through the interface circuit 18, the interface cable 4
Is extended and the plug provided at the tip of the interface cable 4 is connected to the MCU socket 5 on the user's actual machine as a microprocessor application device, so that the substitute microprocessor 11 can perform the proxy control of the actual user's machine. It is said that

【0018】図1には本発明を適用したインサーキット
・エミュレータの詳細な構成が示される。
FIG. 1 shows a detailed configuration of an in-circuit emulator to which the present invention is applied.

【0019】この実施例のインサーキット・エミュレー
タ2におけるトレース機能は、特に制限されないが、代
行用マイクロプロセッサ11が上記代行制御中のスレー
ブバス21(アドレスバス、スレーブデータバス、スレ
ーブコントロールバスを含む)上の信号、その他任意の
信号を代行用マイクロプロセッサ11のシステムクロッ
クSMEに同期してサンプリングし、このサンプリング
された信号をトレースバスTBを介してトレースメモリ
部14内のメモリに書込むことにより実行される。
The tracing function in the in-circuit emulator 2 of this embodiment is not particularly limited, but the slave bus 21 (including the address bus, slave data bus, slave control bus) under the proxy control of the proxy microprocessor 11 is described. Execution is performed by sampling the above signal and other arbitrary signals in synchronization with the system clock SME of the substitute microprocessor 11, and writing the sampled signal in the memory in the trace memory unit 14 via the trace bus TB. To be done.

【0020】トレース回路14’は、図示されないが、
サンプリングデータを格納するRAM(ランダム・アク
セス・メモリ)と、制御用マイクロプロセッサ16の制
御から切り離されたエミュレーション時にトレースメモ
リのアドレスを順次発生するアドレスカウンタ、およ
び、プログラム実行中のトレース状態をリアルタイムに
出力する回路等を備え、ブレーク制御部13は、ブレー
ク条件やトレース開始、終了等の条件を設定するための
複数のレジスタと、このレジスタの内容とスレーブバス
上の信号すなわちトレース情報とを比較する比較手段と
してのコンパレータを備えている。尚、図3の回路では
図1のトレース回路14’にサンプリング回路23を含
ませたものをトレースメモリ部14としている。
The trace circuit 14 'is not shown,
A RAM (random access memory) that stores sampling data, an address counter that sequentially generates addresses of the trace memory during emulation separated from the control of the control microprocessor 16, and a trace state during program execution in real time. The break control unit 13 is provided with a circuit for outputting, and the break control unit 13 compares a plurality of registers for setting break conditions and conditions such as trace start and end with the contents of these registers and signals on the slave bus, that is, trace information. A comparator is provided as a comparison means. In the circuit of FIG. 3, the trace memory unit 14 includes the trace circuit 14 ′ of FIG. 1 and the sampling circuit 23.

【0021】この実施例のインサーキット・エミュレー
タ2では、ラッチもしくはレジスタからなるサンプリン
グ回路23によってスレーブバス21上からサンプリン
グされたトレース情報を格納するトレース回路14’の
他に、サンプリングされた情報を転送可能な比較用メモ
リ24と、この比較用メモリ24を代行用マイクロプロ
セッサ11の動作と同期してアクセスするためのアドレ
スカウンタ25と、比較用メモリ24に格納された情報
と上記サンプリング回路23によって実時間でサンプリ
ングされている情報とを比較し、それらが不一致の場合
に、検出信号をアサートするコンパレータ26とが設け
られている。そして、この検出信号がトリガ信号TRG
としてブレーク制御部13に供給され、ユーザ実機の代
行制御を停止させることができるようになっている。
In the in-circuit emulator 2 of this embodiment, the sampled information is transferred in addition to the trace circuit 14 'which stores the trace information sampled from the slave bus 21 by the sampling circuit 23 composed of a latch or a register. A possible comparison memory 24, an address counter 25 for accessing the comparison memory 24 in synchronism with the operation of the substitute microprocessor 11, an information stored in the comparison memory 24 and the sampling circuit 23 A comparator 26 is provided which compares the information sampled in time and asserts a detect signal if they do not match. Then, this detection signal is the trigger signal TRG.
Is supplied to the break control section 13 so that the proxy control of the user's actual machine can be stopped.

【0022】比較用メモリ24へのトレース情報の転送
は、代行用マイクロプロセッサ11の実行中に行われ
る。そのため、比較用メモリ24のアドレス入力端子
は、システムックロックSMEに同期した上記アドレス
カウンタ25に接続されており、データ入出力端子はバ
ッファB2を介して上記コンパレータ26に接続されて
いる。そして、上記トレース回路14’からの指令によ
って比較モードを設定するためのデコーダ27と同期化
用のレジスタ28、29とが設けられている。つまり、
トレース回路14’から出力される状態制御信号30に
より、コンパレータ26による比較を開始させることが
できる。
The transfer of the trace information to the comparison memory 24 is performed during execution of the proxy microprocessor 11. Therefore, the address input terminal of the comparison memory 24 is connected to the address counter 25 synchronized with the system clock SME, and the data input / output terminal is connected to the comparator 26 via the buffer B2. Further, a decoder 27 for setting the comparison mode by the instruction from the trace circuit 14 'and synchronization registers 28, 29 are provided. That is,
The comparison by the comparator 26 can be started by the state control signal 30 output from the trace circuit 14 '.

【0023】図1の実施例のインサーキット・エミュレ
ータ2は大きく分けて、代行用マイクロプロセッサ11
とサンプリング回路23とアドレスカウンタ25とより
なる第1制御回路40、制御用マイクロプロセッサ16
やデコーダ27等よりなる第2制御回路50、比較用メ
モリ24とバッファB1、2、3とコンパレータ26よ
りなるトリガ発生回路60、レジスタ28、29からな
る同期回路70の4つの回路部分で構成されている。
The in-circuit emulator 2 of the embodiment shown in FIG. 1 is roughly classified into a substitute microprocessor 11
A first control circuit 40 including a sampling circuit 23, an address counter 25, and a control microprocessor 16
And a decoder 27 and the like, a second control circuit 50, a comparison memory 24, buffers B1, 2, 3 and a trigger generation circuit 60 including a comparator 26, and a synchronizing circuit 70 including registers 28 and 29. ing.

【0024】上記第1制御回路40は、ターゲットマイ
クロプロセッサの代行動作を行う代行用マイクロプロセ
ッサ11のシステムクロックSMEに同期して、自分自
身のスレーブアドレス信号SMADDや、スレーブデー
タ信号SMDAT、スレーブコントロール信号SMCN
T、その他ユーザ実機上からプローブ19(図3に記
載)によって抽出される任意の信号PROBEをサイク
ル単位でサンプルしてトレースバスTB上に出力する。
The first control circuit 40 synchronizes with the system clock SME of the substitute microprocessor 11 which performs the substitute operation of the target microprocessor, and its own slave address signal SMADD, slave data signal SMDAT, and slave control signal. SMCN
T, other arbitrary signal PROBE extracted by the probe 19 (shown in FIG. 3) from the actual user machine is sampled in cycle units and output on the trace bus TB.

【0025】上記第2制御回路50は、制御用マイクロ
プロセッサ16から各回路の制御のためアドレス信号M
MADD、データ信号MMDAT、コントロール信号M
MCNTを出力する機能を有する。また、プログラム実
行中のトレース状態(指定範囲のトレース開始、終了、
第1回目又は2回目以降のトレース等)を示す状態制御
信号を発生させるとともに、それをデコーダ27によっ
て解読して制御信号S1、S2を形成し、それを同期回
路70のレジスタ28、29へ供給する。
The second control circuit 50 controls the address signal M from the control microprocessor 16 for controlling each circuit.
MADD, data signal MMDAT, control signal M
It has the function of outputting MCNT. Also, trace status during program execution (trace start, end,
A state control signal indicating the first or second or subsequent traces) is generated and decoded by the decoder 27 to form control signals S1 and S2, which are supplied to the registers 28 and 29 of the synchronization circuit 70. To do.

【0026】トリガ発生回路60は、比較用データを書
込んでおくための比較用メモリ24を有し、比較用メモ
リ24の読み書きを制御するためバッファB1、B2、
B3を有する。バッファB1、B2、B3の制御は、同
期回路70にて生成されたモード信号MODE1、2に
よって行われる。先ず、モード信号MODE1がアサー
トされると、バッファB1が開放された状態となり、代
行用マイクロプロセッサ11のシステムクロックSME
により、サイクル単位にカウントされるアドレスカウン
タ25の出力がアドレス入力として比較用メモリ24に
供給され、比較用メモリ24へ第1回目のサンプリング
データが書込まれる。次に、モード信号MODE2がア
サートされると、バッファB2が開放された状態とな
り、代行用マイクロプロセッサ11のシステムクロック
SMEにより、サイクル単位にカウントされるアドレス
カウンタ25の出力がアドレス入力として比較用メモリ
24に供給され、バッファB2からその比較用メモリ2
4の連続した内容が順番に取り出されてコンパレータ2
6に供給される。このコンパレータ26の他方の入力端
子には、第1制御回路40にてサンプリングされた信号
がバッファB3を介して入力されるため、このコンパレ
ータ26によってトレース情報の比較がサイクル単位に
行われる。ターゲットプログラムの実行が正常である場
合には、コンパレータ26での比較対象とされる両信号
は常に一致する。しかし、動作異常の場合には、両信号
は不一致となるから、それがコンパレータ26で判別さ
れることによって、動作異常の判別が可能とされる。コ
ンパレータ26での比較において、両信号が不一致であ
ると判断された場合には、トリガ信号TRGがアサート
されることにより、エミュレーション動作を停止するた
めのブレークが可能とされる。
The trigger generation circuit 60 has a comparison memory 24 for writing comparison data, and buffers B1, B2, for controlling reading / writing of the comparison memory 24.
With B3. The buffers B1, B2, B3 are controlled by the mode signals MODE1, MODE2 generated by the synchronization circuit 70. First, when the mode signal MODE1 is asserted, the buffer B1 is opened, and the system clock SME of the proxy microprocessor 11 is changed.
As a result, the output of the address counter 25, which is counted in cycle units, is supplied as an address input to the comparison memory 24, and the first sampling data is written in the comparison memory 24. Next, when the mode signal MODE2 is asserted, the buffer B2 is opened, and the output of the address counter 25, which is counted in cycle units by the system clock SME of the proxy microprocessor 11, is used as an address input for comparison memory. 24 to the comparison memory 2 from the buffer B2.
4 consecutive contents are taken out in order and the comparator 2
6 is supplied. Since the signal sampled by the first control circuit 40 is input to the other input terminal of the comparator 26 via the buffer B3, the comparator 26 compares the trace information in cycle units. When the execution of the target program is normal, both signals to be compared by the comparator 26 always match. However, in the case of an abnormal operation, the two signals do not match with each other, and the comparator 26 determines that the abnormal operation is possible. When it is determined in the comparison by the comparator 26 that the two signals do not match, the trigger signal TRG is asserted to enable the break for stopping the emulation operation.

【0027】尚、上記実施例のエミュレータでは、イン
タフェース回路が省略されているが、図3と同様に代行
用マイクロプロセッサ11にはインタフェース回路18
を介してケーブル4が、またマスタバス22にはシリア
ルインタフェース回路17がそれぞれ接続される。 上
記実施例のエミュレータにおいては、トレース回路1
4’に書込まれた情報を制御用マイクロプロセッサ16
の制御のもとで参照することによって、代行用マイクロ
プロセッサ11の代行制御中のトレース情報を知ること
ができる
Although the interface circuit is omitted in the emulator of the above embodiment, the interface circuit 18 is provided in the proxy microprocessor 11 as in FIG.
The cable 4 is connected to the master bus 22 via the cable, and the serial interface circuit 17 is connected to the master bus 22. In the emulator of the above embodiment, the trace circuit 1
The information written in 4'is controlled by the microprocessor 16
The trace information under the proxy control of the proxy microprocessor 11 can be known by referring under the control of

【0028】上記実施例によれば以下の作用効果が得ら
れる。
According to the above embodiment, the following operational effects can be obtained.

【0029】(1)トレース用メモリとは別個に比較用
メモリ24と、該メモリに格納されたデータとスレーブ
バス上の信号とをリアルタイムで比較するコンパレータ
26とを、代行マイクロプロセッサ11を有するエミュ
レータ内に設け、先ず、代行マイクロプロセッサ11で
プログラムを実行させ、トレース条件等で指定した第1
回目の入出力信号(アドレス信号、データ信号、コント
ロール信号、その他任意の信号)を比較用メモリ24に
格納しておいて、トレース条件等で指定した2回目以降
のトレース情報(代行マイクロプロセッサ11の各入出
力信号)と、先に比較用メモリ24に格納しておいた内
容とを毎サイクルごとに比較して、一致しなかった場合
にブレークのためのトリガ信号をアサートさせるように
したので、予めブレーク条件を設定しなくてもよい。
(1) An emulator having a substitute memory 11 and a comparison memory 24, which is separate from the trace memory, and a comparator 26, which compares the data stored in the memory with the signal on the slave bus in real time. First, the program is executed by the proxy microprocessor 11, and the first condition is specified by the trace condition.
The second input / output signal (address signal, data signal, control signal, or any other signal) is stored in the comparison memory 24, and the trace information for the second and subsequent times specified by the trace condition or the like (the proxy microprocessor 11 Since each input / output signal) is compared with the contents previously stored in the comparison memory 24 every cycle, and if they do not match, the trigger signal for break is asserted. It is not necessary to set break conditions in advance.

【0030】(2)代行マイクロプロセッサ11によっ
てプログラムを繰り返し実行させたときに入出力信号の
不一致が生じるとコンパレータ26から不一致信号が出
力されるので、その信号をトリガ信号としてブレーク処
理、トレースの停止処理等の処理を起動させることによ
り、再現性の低い異常動作の検出が可能となるので、そ
れによって例えばノイズ等によるハードウェアの誤動
作、変数参照時の誤りによるソフトウェアの誤動作の検
出が可能になる。
(2) When the proxy microprocessor 11 repeatedly executes the program, if the input / output signals do not match, the comparator 26 outputs a mismatch signal, so that the signal is used as a trigger signal for break processing and tracing stop. By activating processing such as processing, it is possible to detect abnormal operation with low reproducibility, so that it is possible to detect hardware malfunction due to noise etc. or software malfunction due to error when referencing variables. .

【0031】(3)また、誤動作発生まではブレークさ
れないため、トレースメモリの容量不足などにより誤動
作発生時のトレースデータが記録されていないなどの不
具合が無くなり、確実に誤動作発生状態を記憶し参照す
ることができるため、誤動作要因の解析を容易に行うこ
とができ、プログラムデバッグの効率向上を図る上で、
極めて有効とされる。
(3) Further, since the break is not made until the malfunction occurs, the malfunction such as the trace data when the malfunction occurs is not recorded due to the insufficient capacity of the trace memory is eliminated, and the malfunction occurrence state is surely stored and referred to. Therefore, it is possible to easily analyze the cause of malfunction and improve the efficiency of program debugging.
It is extremely effective.

【0032】(4)トレースデータの期待値を外部記憶
装置に保存しておき、ターゲットプログラムの実行終了
後にトレース内容と、この外部記憶装置内の期待値とを
比較する方式や、トレースRAMを2系統設け、それに
第1回目のトレース内容、第2回目のトレース内容をそ
れぞれ記憶するようにしてターゲットプログラムの実行
終了後に当該RAMの記憶内容を比較する方式が考えら
れるが、その場合には、どうしてもエミュレーション動
作を停止しなければ、トレース結果の比較が行えない。
そに対して、上記実施例では、第2回目以降のエミュレ
ーション動作においてリアルタイムにトレースデータの
比較が可能とされるから、デバッグ効率向上のために、
極めて有効とされる。
(4) The expected value of the trace data is stored in the external storage device, and after the execution of the target program is completed, the trace content is compared with the expected value in this external storage device, or the trace RAM is It is conceivable that a system may be provided, and the contents of the first trace and the contents of the second trace may be stored therein and the contents stored in the RAM are compared after the end of execution of the target program. The trace results cannot be compared unless the emulation operation is stopped.
On the other hand, in the above embodiment, since the trace data can be compared in real time in the second and subsequent emulation operations, in order to improve the debugging efficiency,
It is extremely effective.

【0033】以上本発明者によってなされた発明を実施
例に基づいて具体的に説明したが、本発明はそれに限定
されるものではなく、その要旨を逸脱しない範囲におい
て種々変更可能であることは言うまでもない。
The invention made by the present inventor has been specifically described based on the embodiments, but the present invention is not limited thereto, and needless to say, various modifications can be made without departing from the scope of the invention. Yes.

【0034】例えば、システムクロックのサイクル単位
で比較を行なっているがこのクロックを変えることで比
較処理の分解能を変えることができる。また、トレース
データ中で比較対象としたくないデータをマスクするこ
とにより、すなわち、コンパレータ26での比較を部分
的に行うようにしてもよいし、トレースデータの相違部
がコンパレータ26で複数回検出された時点でブレーク
するようにしてもよい。さらに、トレースメモリ内から
前回のトレース情報を読出し、それをコンパレータ26
に供給してスレーブバス上からサンプリングされた信号
と比較するようにしてもよい。
For example, although the comparison is made in the cycle of the system clock, the resolution of the comparison process can be changed by changing this clock. Further, the data in the trace data that is not desired to be compared may be masked, that is, the comparison in the comparator 26 may be partially performed, or a different portion of the trace data may be detected in the comparator 26 multiple times. You may make it break at the time. Furthermore, the previous trace information is read out from the trace memory and is read by the comparator 26.
May be supplied to the slave bus and compared with the signal sampled from the slave bus.

【0035】以上の説明では主として本発明者によって
なされた発明をその背景となった利用分野であるシステ
ム開発装置に使用されるインサーキットエミュレータに
適用したものについて説明したが、この発明はそれに限
定されるものでなく、ロジックアナライザのようなデバ
ッグツールその他エミュレーション機能を有するデータ
処理システムに利用することができる。
In the above description, the invention mainly made by the present inventor was applied to the in-circuit emulator used in the system development apparatus which is the field of application of the background, but the present invention is not limited thereto. However, it can be used for a data processing system having a debug tool such as a logic analyzer and an emulation function.

【0036】本発明は、少なくともターゲットプログラ
ムのデバッグを行うことを条件に適用することができ
る。
The present invention can be applied under the condition that at least the target program is debugged.

【0037】[0037]

【発明の効果】本願において開示される発明のうち代表
的なものによって得られる効果を簡単に説明すれば下記
の通りである。
The effects obtained by the typical ones of the inventions disclosed in the present application will be briefly described as follows.

【0038】すなわち、予めブレーク条件を設定しなく
とも代行マイクロプロセッサによってプログラムを繰り
返し実行させたときにサンプリングデータの不一致が生
じるとコンパレータから不一致信号が出力されるので、
その信号をトリガ信号としてブレーク処理を停止させる
ことができ、それによって再現性の低い不良の検出が可
能とされるので、デバッグの効率の向上を図ることがで
きる。
That is, even if the break condition is not set in advance, if the proxy microprocessor repeatedly executes the program, if the mismatch of the sampling data occurs, the mismatch signal is output from the comparator.
The break process can be stopped by using the signal as a trigger signal, and the defect with low reproducibility can be detected by the signal, so that the debugging efficiency can be improved.

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

【図1】本発明の一実施例であるインサーキット・エミ
ュレータの詳細な構成ブロック図である。
FIG. 1 is a detailed configuration block diagram of an in-circuit emulator that is an embodiment of the present invention.

【図2】上記インサーキット・エミュレータが適用され
るシステム開発装置の全体の構ブロック図である。
FIG. 2 is an overall structural block diagram of a system development device to which the in-circuit emulator is applied.

【図3】上記インサーキット・エミュレータの比較的詳
細な構成ブロック図である。
FIG. 3 is a relatively detailed configuration block diagram of the in-circuit emulator.

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

1 親計算機 2 インサーキット・エミュレータ 3 応用機器 4 インタフェースケーブル 5 ソケット 11 代行用マイクロプロセッサ 12 エミュレーション制御部 13 ブレーク制御部 14 トレースメモリ部 14’ トレース回路 15 代行メモリ部 16 制御用マイクロプロセッサ 17 シリアルインタフェース 18 インタフェース部 19 プローブ 21 スレーブバス 22 マスタバス 23 サンプリング回路 24 比較用メモリ 25 アドレスカウンタ 26 コンパレータ 27 デコーダ 28 レジスタ 29 レジスタ 40 第1制御回路 50 第2制御回路 60 トリガ発生回路 70 同期回路 1 Parent Computer 2 In-Circuit Emulator 3 Application Equipment 4 Interface Cable 5 Socket 11 Proxy Microprocessor 12 Emulation Control Block 13 Break Control Block 14 Trace Memory Block 14 'Trace Circuit 15 Proxy Memory Block 16 Control Microprocessor 17 Serial Interface 18 Interface unit 19 Probe 21 Slave bus 22 Master bus 23 Sampling circuit 24 Comparison memory 25 Address counter 26 Comparator 27 Decoder 28 Register 29 Register 40 First control circuit 50 Second control circuit 60 Trigger generation circuit 70 Synchronous circuit

───────────────────────────────────────────────────── フロントページの続き (72)発明者 薄葉 英幸 東京都小平市上水本町5丁目20番1号 株 式会社日立製作所武蔵工場内 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Hideyuki Usoba 5-20-1, Kamimizuhonmachi, Kodaira-shi, Tokyo Hitachi, Ltd. Musashi factory

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 ターゲットシステムに搭載されるマイク
ロプロセッサと同等のプロセッサにソフトウェアデバッ
グ対象とされるターゲットプログラムを実行させながら
その実行過程の情報を収集することにより、上記ターゲ
ットシステム上で動作するソフトウェアの開発支援を可
能とするデバッグ装置において、上記プロセッサによる
ターゲットプログラム実行中に、ターゲットプログラム
実行過程の情報をサンプリングするためのサンプリング
手段と、このサンプリング手段によってサンプリングさ
れたデータを保持する記憶手段と、この記憶手段に格納
されたデータとその後のターゲットプログラム実行過程
のサンプリングデータとを比較するための比較手段とを
含むことを特徴とするデバッグ装置。
1. A software equivalent to a microprocessor installed in a target system, which executes a target program to be software-debugged while collecting information on an execution process of the target program, thereby executing a software operation on the target system. In a debug device capable of supporting development, sampling means for sampling information of a target program execution process during execution of a target program by the processor, storage means for holding data sampled by the sampling means, and A debug device comprising: a comparison unit for comparing the data stored in the storage unit with the sampling data in the subsequent target program execution process.
【請求項2】 上記記憶手段には、上記ターゲットプロ
グラム実行中に予め指定しておいた範囲の第1回目のサ
ンプリングデータが期待値として格納され、上記比較手
段は、2回目以降のプログラム実行過程のサンプリング
データと上記記憶手段のデータとを比較する請求項1記
載のデバッグ装置。
2. The storage means stores the first sampling data in a range designated in advance during execution of the target program as an expected value, and the comparing means stores the second and subsequent program execution processes. 2. The debugging device according to claim 1, wherein the sampling data of the above is compared with the data of the storage means.
【請求項3】 上記比較手段の比較結果に基づいて、上
記プロセッサのエミュレーション動作を停止させるため
のブレーク制御回路を含む請求項1又は2項記載のデバ
ッグ装置。
3. The debug device according to claim 1, further comprising a break control circuit for stopping an emulation operation of the processor based on a comparison result of the comparison means.
JP4266547A 1992-09-09 1992-09-09 Debugging device Withdrawn JPH0695913A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4266547A JPH0695913A (en) 1992-09-09 1992-09-09 Debugging device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4266547A JPH0695913A (en) 1992-09-09 1992-09-09 Debugging device

Publications (1)

Publication Number Publication Date
JPH0695913A true JPH0695913A (en) 1994-04-08

Family

ID=17432372

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4266547A Withdrawn JPH0695913A (en) 1992-09-09 1992-09-09 Debugging device

Country Status (1)

Country Link
JP (1) JPH0695913A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7185248B2 (en) 2002-09-04 2007-02-27 Oki Electric Industry Co., Ltd. Failure analysis system and failure analysis method of logic LSI

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7185248B2 (en) 2002-09-04 2007-02-27 Oki Electric Industry Co., Ltd. Failure analysis system and failure analysis method of logic LSI

Similar Documents

Publication Publication Date Title
EP0528585B1 (en) Data processing system with internal instruction cache
US4782461A (en) Logical grouping of facilities within a computer development system
US6598178B1 (en) Peripheral breakpoint signaler
US6598150B2 (en) Asynchronously accessing the program counter values of a data processing system by applying an independent clock on the latching and scan-chain circuits
US5930470A (en) Debugging system and debugging method
EP3572943B1 (en) Semiconductor device and debug method
JPH0695913A (en) Debugging device
US5991899A (en) Method and apparatus for a real-time diagnostic tool using a non-intrusive trace technique
JPS6142186Y2 (en)
JPH01306933A (en) Debugging device
JP4484417B2 (en) Debug system
JPH0581087A (en) Processor monitoring system
JPS62164140A (en) Testing of data processing system
JPH11102306A (en) Emulator
JPH1165897A (en) Microprocessor with debugger built-in
JPH0573347A (en) Emulation device
JP2002236594A (en) Emulation system and emulator
JPH06266575A (en) Emulator
JPH05108550A (en) Central processing unit
JPH0512063A (en) Logic circuit design device
JPH0736735A (en) Debugging device
JPS6237748A (en) Triagger signal generating system by firmware
JPH07152603A (en) Debugging device
JPH096685A (en) Memory device and its error test method
JP2001318802A (en) In-circuit emulator

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: 19991130