JP2002351696A - Debugging device - Google Patents

Debugging device

Info

Publication number
JP2002351696A
JP2002351696A JP2001157107A JP2001157107A JP2002351696A JP 2002351696 A JP2002351696 A JP 2002351696A JP 2001157107 A JP2001157107 A JP 2001157107A JP 2001157107 A JP2001157107 A JP 2001157107A JP 2002351696 A JP2002351696 A JP 2002351696A
Authority
JP
Japan
Prior art keywords
trace
trace data
data
counting
value
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
JP2001157107A
Other languages
Japanese (ja)
Inventor
Seiji Yoshioka
誠治 吉岡
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2001157107A priority Critical patent/JP2002351696A/en
Publication of JP2002351696A publication Critical patent/JP2002351696A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a debugging device preventing overflows in a trace buffer. SOLUTION: A judgment circuit 21 detects a trace event generated in a debugging object 1 and the trace buffer 22 stores the value of internal data 13 as trace data when the trace event is detected by the judgment circuit 21. A trace data selection circuit 23a is provided with a register inside and reads the trace data at a position specified by the register from the trace buffer 22 and outputs them to an ICE(in-circuit emulator) 3. Thus, the ICE acquires only desired trace data by writing the value to the register and the overflows in the trace buffer are prevented.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、CPU(Central
Processing Unit)のデバッグやソフトウェアのデバッ
グに使用されるデバッグ装置に関し、特に、複数のトレ
ース事象の発生によるトレースバッファのオーバフロー
を防止したデバッグ装置に関する。
The present invention relates to a CPU (Central
The present invention relates to a debugging device used for debugging of a processing unit and software, and more particularly to a debugging device that prevents a trace buffer from overflowing due to occurrence of a plurality of trace events.

【0002】[0002]

【従来の技術】近年、パーソナルコンピュータ等の情報
機器や、家電機器等においてCPUが広く使用されてい
る。CPU自体の開発や、そのCPUを搭載した情報機
器、家電機器等の開発において、ハードウェアやソフト
ウェアのデバッグにICE(In-Circuit Emulator)が
使用されている。一般に、デバッグ対象とICEとの間
にデバッグ装置が接続されて、デバッグが行なわれる。
2. Description of the Related Art In recent years, CPUs have been widely used in information devices such as personal computers and home electric appliances. ICE (In-Circuit Emulator) is used for debugging hardware and software in the development of the CPU itself and in the development of information equipment and home appliances equipped with the CPU. Generally, a debugging device is connected between the debug target and the ICE to perform debugging.

【0003】図15は、従来のデバッグ装置を用いたシ
ステムの概略構成を示すブロック図である。このシステ
ムは、デバッグ対象101と、デバッグ装置102と、
ICE103とを含む。図15においては、デバッグ対
象101として、CPU111と内部バス112とを含
んだCPUコアの場合を示している。
FIG. 15 is a block diagram showing a schematic configuration of a system using a conventional debugging device. This system includes a debug target 101, a debug device 102,
ICE103. FIG. 15 shows a case where the debug target 101 is a CPU core including a CPU 111 and an internal bus 112.

【0004】デバッグ装置102は、トレース事象の発
生を判定する判定回路121と、トレースデータが格納
されるトレースバッファ122と、クロック信号126
をカウントするカウンタ123と、カウンタ123の値
に応じてトレースバッファ122から出力されるmビッ
トのトレースデータを選択して出力するセレクタ125
とを含む。
The debug device 102 includes a determination circuit 121 for determining the occurrence of a trace event, a trace buffer 122 for storing trace data, and a clock signal 126.
And a selector 125 that selects and outputs m-bit trace data output from the trace buffer 122 according to the value of the counter 123.
And

【0005】判定回路121は、CPU111から出力
される信号および内部バス112を監視しており、予め
設定されたトレース事象との一致を検出すると、トレー
スバッファ書込み許可信号(以下、WE信号と略す。)
124にハイレベル(以下、Hレベルと呼ぶ。)を出力
する。たとえば、CPU111がプログラムを実行して
いる最中に、所定アドレスからデータを読出したときに
トレース事象を発生させる場合には、そのような条件が
判定回路121に設定される。判定回路121は、設定
された条件と、内部バス112等の状態とが一致するの
を検出すると、WE信号124にHレベルを出力する。
[0005] The determination circuit 121 monitors the signal output from the CPU 111 and the internal bus 112, and upon detecting coincidence with a predetermined trace event, a trace buffer write enable signal (hereinafter abbreviated as WE signal). )
A high level (hereinafter, referred to as an H level) is output to 124. For example, when a trace event occurs when data is read from a predetermined address while CPU 111 is executing a program, such a condition is set in determination circuit 121. When detecting that the set condition matches the state of the internal bus 112 or the like, the determination circuit 121 outputs an H level to the WE signal 124.

【0006】トレースバッファ122は、WE信号12
4がHレベルになると、デバッグ対象101から出力さ
れる内部データ113の値を順次取込む。この内部デー
タ113には、デバッグ対象101内のデータバス、ア
ドレスバス、制御信号、割込み信号等が含まれる。後述
するように、トレースバッファ122は、内部データ1
13の値をN回に分けて取込む。すなわち、トレース事
象が1回発生すると、内部データ113の値をmビット
のデータとしてN回取込む。
[0006] The trace buffer 122 stores the WE signal 12
When 4 goes to the H level, the values of the internal data 113 output from the debug target 101 are sequentially captured. The internal data 113 includes a data bus, an address bus, a control signal, an interrupt signal, and the like in the debug target 101. As described later, the trace buffer 122 stores the internal data 1
The value of 13 is taken in N times. That is, when a trace event occurs once, the value of the internal data 113 is fetched N times as m-bit data.

【0007】WE信号124がHレベルになると、カウ
ンタ123がリセットされる。カウンタ123には、I
CE103がトレースバッファ122に格納されたトレ
ースデータを読出すタイミングに同期して、クロック信
号126が入力される。カウンタ123は、クロック信
号126をカウントして、カウント値をセレクタ125
へ出力する。このクロック信号126は、トレースデー
タの読出しタイミングに同期してICE103によって
生成されても良いし、デバッグ装置102によって生成
されても良い。
When the WE signal 124 goes high, the counter 123 is reset. The counter 123 has I
The clock signal 126 is input in synchronization with the timing at which the CE 103 reads the trace data stored in the trace buffer 122. The counter 123 counts the clock signal 126 and outputs the count value to the selector 125.
Output to The clock signal 126 may be generated by the ICE 103 in synchronization with the timing of reading the trace data, or may be generated by the debug device 102.

【0008】セレクタ125は、カウンタ123から出
力されたカウント値に応じて、トレースバッファ122
から出力されるトレースデータを選択し、ICE103
へ出力する。ICE103は、クロック信号126に同
期してmビットのトレースデータをN回読出すことによ
り、1回のトレース事象に対応したトレースデータの読
出しを行なう。
[0008] The selector 125 operates according to the count value output from the counter 123 to the trace buffer 122.
Select the trace data output from the
Output to The ICE 103 reads m-bit trace data N times in synchronization with the clock signal 126 to read trace data corresponding to one trace event.

【0009】図16は、トレースバッファ122の構成
例を示す図である。このトレースバッファ122は、1
回分のトレース事象に対応したトレースデータを格納で
きる容量、すなわち、mビットのデータをN個だけ格納
する容量を有している。
FIG. 16 is a diagram showing a configuration example of the trace buffer 122. This trace buffer 122
It has a capacity to store trace data corresponding to the number of trace events, that is, a capacity to store N pieces of m-bit data.

【0010】図17は、ICE103がトレースバッフ
ァ122からトレースデータを読出すタイミングを示す
図である。図17に示すように、ICE103は、クロ
ック信号126に同期してセレクタ125から出力され
るトレースデータ(データ1〜データN)をN回読出
し、1回のトレース事象に対応したトレースデータを取
得する。
FIG. 17 is a diagram showing the timing at which the ICE 103 reads trace data from the trace buffer 122. As shown in FIG. 17, the ICE 103 reads the trace data (data 1 to data N) output from the selector 125 N times in synchronization with the clock signal 126 and acquires the trace data corresponding to one trace event. .

【0011】[0011]

【発明が解決しようとする課題】しかし、上述した従来
のデバッグ装置102において、トレース事象が発生し
てトレースバッファ122にそのトレース事象に対応し
たトレースデータが格納され、ICE103がトレース
バッファ122に格納されたトレースデータを全て読出
す前に、別のトレース事象が発生した場合には、カウン
タ123がリセットされるとともに、トレースバッファ
122に別のトレース事象に対応したトレースデータが
順次書込まれる。したがって、トレースバッファ122
においてオーバフローが発生し、カウンタ123のカウ
ント値もリセットされてしまうため、ICE103が最
初のトレース事象に対応したトレースデータを読出すこ
とができなくなるという問題点があった。
However, in the above-described conventional debugging apparatus 102, when a trace event occurs, trace data corresponding to the trace event is stored in the trace buffer 122, and the ICE 103 is stored in the trace buffer 122. If another trace event occurs before all the trace data has been read out, the counter 123 is reset and trace data corresponding to another trace event is sequentially written into the trace buffer 122. Therefore, the trace buffer 122
In this case, an overflow occurs and the count value of the counter 123 is reset, so that the ICE 103 cannot read the trace data corresponding to the first trace event.

【0012】本発明は、上記問題点を解決するためにな
されたものであり、第1の目的は、トレースバッファに
おけるオーバフローの発生を防止することが可能なデバ
ッグ装置を提供することである。
The present invention has been made to solve the above problems, and a first object of the present invention is to provide a debugging device capable of preventing occurrence of overflow in a trace buffer.

【0013】第2の目的は、トレースバッファに格納さ
れたトレースデータの中から、所望のトレースデータの
みを取得することが可能なデバッグ装置を提供すること
である。
A second object is to provide a debugging device capable of acquiring only desired trace data from trace data stored in a trace buffer.

【0014】[0014]

【課題を解決するための手段】請求項1に記載のデバッ
グ装置は、デバッグ対象において発生するトレース事象
を検出するための検出手段と、検出手段によってトレー
ス事象が検出されたときに、内部データの値をトレース
データとして格納するための格納手段と、格納手段によ
って格納されたトレースデータの任意の位置を指定する
ための指定手段と、指定手段によって指定されたトレー
スデータの位置に応じて、格納手段に格納されたトレー
スデータを選択して出力するための選択手段とを含む。
According to a first aspect of the present invention, there is provided a debugging device, comprising: detecting means for detecting a trace event occurring in a debug target; and detecting a trace event when the detecting means detects the trace event. Storage means for storing a value as trace data, designating means for designating an arbitrary position of the trace data stored by the storage means, and storage means according to the position of the trace data designated by the designating means And selecting means for selecting and outputting the trace data stored in the.

【0015】選択手段は、指定手段によって指定された
トレースデータの位置に応じて、格納手段に格納された
トレースデータを選択して出力するので、デバッグ装置
に接続されたICEは所望のトレースデータのみを取得
することが可能となる。
The selection means selects and outputs the trace data stored in the storage means in accordance with the position of the trace data designated by the designation means. Can be obtained.

【0016】請求項2に記載のデバッグ装置は、請求項
1記載のデバッグ装置であって、格納手段は、内部デー
タの値をトレースデータとして格納するための第1の格
納手段と、第1の格納手段に格納されたトレースデータ
を転送して格納するための第2の格納手段とを含み、選
択手段は、指定手段によって指定されたトレースデータ
の位置に応じて、第2の格納手段に格納されたトレース
データを選択して出力する。
According to a second aspect of the present invention, there is provided the debugging device according to the first aspect, wherein the storage means includes a first storage means for storing a value of internal data as trace data; A second storage unit for transferring and storing the trace data stored in the storage unit, wherein the selection unit stores the trace data in the second storage unit according to the position of the trace data specified by the specification unit. The selected trace data is selected and output.

【0017】第2の格納手段は、第1の格納手段に格納
されたトレースデータを転送して格納するので、別のト
レース事象が発生した場合であっても前のトレース事象
に対応したトレースデータが失われることを防止でき、
トレースデータのオーバフローを防止することが可能と
なる。
Since the second storage means transfers and stores the trace data stored in the first storage means, even if another trace event occurs, the trace data corresponding to the previous trace event can be obtained. Can be prevented from being lost,
Trace data can be prevented from overflowing.

【0018】請求項3に記載のデバッグ装置は、請求項
2記載のデバッグ装置であって、選択手段は、第2の格
納手段に格納されたトレースデータの中から任意の1ビ
ットのデータを選択して出力する。
According to a third aspect of the present invention, in the debugging apparatus according to the second aspect, the selecting means selects an arbitrary one-bit data from the trace data stored in the second storing means. And output.

【0019】したがって、デバッグ装置に接続されたI
CEはトレースデータの中から、所望の1ビットのトレ
ースデータを1サイクルで取得することが可能となり、
トレースデータのオーバフローをさらに防止することが
可能となる。
Therefore, I connected to the debug device
The CE can acquire desired 1-bit trace data from the trace data in one cycle.
It is possible to further prevent overflow of trace data.

【0020】請求項4に記載のデバッグ装置は、請求項
1〜3のいずれかに記載のデバッグ装置であって、さら
に格納手段に格納されたトレースデータに演算を行なう
ための演算手段を含む。
A debug device according to a fourth aspect is the debug device according to any one of the first to third aspects, further including an operation unit for performing an operation on the trace data stored in the storage unit.

【0021】演算手段が格納手段に格納されたトレース
データに演算を行なうので、たとえばトレースデータの
所定ビットを全て加算してパリティビットとして出力す
ることにより、ICEはトレースデータの欠落等を検出
することが可能となる。
Since the arithmetic means performs an arithmetic operation on the trace data stored in the storage means, for example, by adding all the predetermined bits of the trace data and outputting the result as parity bits, the ICE can detect missing trace data or the like. Becomes possible.

【0022】請求項5に記載のデバッグ装置は、デバッ
グ対象において発生するトレース事象を検出するための
検出手段と、検出手段によってトレース事象が検出され
たときに、内部データの値をトレースデータとして格納
するための格納手段と、検出手段によって検出されたト
レース事象を計数するための計数手段と、計数手段によ
る計数結果に応じて、格納手段に格納されたトレースデ
ータを選択して出力するための選択手段と、検出手段に
よってトレース事象が検出されたときに、デバッグ対象
に所定アドレスからのプログラムの再実行を要求するた
めの再実行要求手段とを含む。
According to a fifth aspect of the present invention, there is provided a debugging device, comprising: detecting means for detecting a trace event occurring in a debug target; and when the detecting means detects the trace event, storing a value of internal data as trace data. Storage means for performing the counting, a counting means for counting the trace events detected by the detection means, and a selection for selecting and outputting the trace data stored in the storage means in accordance with the counting result by the counting means. And a re-execution requesting means for requesting the debug target to re-execute a program from a predetermined address when a trace event is detected by the detection means.

【0023】再実行要求手段は、検出手段によってトレ
ース事象が検出されたときに、デバッグ対象に所定アド
レスからのプログラムの再実行を要求するので、1回の
トレース事象に対応したトレースデータを複数回に分け
てトレースバッファに格納することが可能となる。
The re-execution requesting unit requests the debug target to re-execute the program from a predetermined address when the detecting unit detects the trace event, so that the trace data corresponding to one trace event is transmitted a plurality of times. And can be stored in the trace buffer.

【0024】請求項6に記載のデバッグ装置は、請求項
5記載のデバッグ装置であって、格納手段は、内部デー
タの値をトレースデータとして格納するための第1の格
納手段と、第1の格納手段に格納されたトレースデータ
を転送して格納するための第2の格納手段とを含み、選
択手段は、計数手段による計数結果に応じて、第2の格
納手段に格納されたトレースデータを選択して出力す
る。
According to a sixth aspect of the present invention, in the debugging apparatus of the fifth aspect, the storage means includes a first storage means for storing a value of internal data as trace data; A second storage unit for transferring and storing the trace data stored in the storage unit, wherein the selection unit converts the trace data stored in the second storage unit in accordance with the counting result by the counting unit. Select and output.

【0025】第2の格納手段は、第1の格納手段に格納
されたトレースデータを転送して格納するので、別のト
レース事象が発生した場合であっても前のトレース事象
に対応したトレースデータが失われることを防止でき、
トレースデータのオーバフローを防止することが可能と
なる。
Since the second storage means transfers and stores the trace data stored in the first storage means, even if another trace event occurs, the trace data corresponding to the previous trace event can be obtained. Can be prevented from being lost,
Trace data can be prevented from overflowing.

【0026】請求項7に記載のデバッグ装置は、デバッ
グ対象において発生するトレース事象を検出するための
第1の検出手段と、第1の検出手段によってトレース事
象が検出されたときに、内部データの値をトレースデー
タとして格納するための格納手段と、格納手段によって
格納されたトレースデータの任意の位置を指定するため
の指定手段と、格納手段に格納されたトレースデータの
読出し回数を計数するための計数手段と、格納手段にお
けるオーバフローを検出するための第2の検出手段と、
第2の検出手段によってオーバフローが検出されていな
い場合には計数手段の計数結果を選択し、第2の検出手
段によってオーバフローが検出された場合には指定手段
によって指定されたトレースデータの位置を選択して出
力するための第1の選択手段と、第1の選択手段からの
出力に応じて、格納手段に格納されたトレースデータを
選択して出力するための第2の選択手段とを含む。
According to a seventh aspect of the present invention, there is provided a debugging device, comprising: first detecting means for detecting a trace event occurring in a debug target; and when the first detecting means detects the trace event, the internal data of the internal data is detected. Storage means for storing a value as trace data; designation means for designating an arbitrary position of the trace data stored by the storage means; and counting means for counting the number of times of reading the trace data stored in the storage means. Counting means, second detection means for detecting overflow in the storage means,
When the overflow is not detected by the second detecting means, the counting result of the counting means is selected. When the overflow is detected by the second detecting means, the position of the trace data specified by the specifying means is selected. And a second selection unit for selecting and outputting the trace data stored in the storage unit according to the output from the first selection unit.

【0027】第2の選択手段は、第1の選択手段からの
出力に応じて、格納手段に格納されたトレースデータを
選択して出力するので、オーバフローが発生した場合で
あってもデバッグ装置に接続されたICEは未だ読出し
ていないトレースデータを任意に指定して読出すことが
可能となる。
The second selecting means selects and outputs the trace data stored in the storing means in accordance with the output from the first selecting means. The connected ICE can arbitrarily designate and read trace data that has not yet been read.

【0028】請求項8に記載のデバッグ装置は、請求項
7記載のデバッグ装置であって、格納手段は、内部デー
タの値をトレースデータとして格納するための第1の格
納手段と、第1の格納手段に格納されたトレースデータ
を転送して格納するための第2の格納手段とを含み、第
2の選択手段は、第1の選択手段からの出力に応じて、
第2の格納手段に格納されたトレースデータを選択して
出力する。
[0028] According to an eighth aspect of the present invention, in the debugging apparatus of the seventh aspect, the storage means includes: first storage means for storing the value of internal data as trace data; Second storage means for transferring and storing the trace data stored in the storage means, wherein the second selection means responds to an output from the first selection means,
The trace data stored in the second storage means is selected and output.

【0029】第2の格納手段は、第1の格納手段に格納
されたトレースデータを転送して格納するので、別のト
レース事象が発生した場合であっても前のトレース事象
に対応したトレースデータが失われることを防止でき、
トレースデータのオーバフローを防止することが可能と
なる。
Since the second storage means transfers and stores the trace data stored in the first storage means, even if another trace event occurs, the trace data corresponding to the previous trace event can be obtained. Can be prevented from being lost,
Trace data can be prevented from overflowing.

【0030】請求項9に記載のデバッグ装置は、デバッ
グ対象において発生するトレース事象を検出するための
検出手段と、検出手段によって検出されたトレース事象
を計数するための第1の計数手段と、第1の計数手段に
よる計数結果が所定値になったときに、内部データの値
をトレースデータとして格納するための格納手段と、格
納手段に格納されたトレースデータの読出し回数を計数
するための第2の計数手段と、第2の計数手段による計
数結果に応じて、格納手段に格納されたトレースデータ
を選択して出力するための選択手段とを含む。
According to a ninth aspect of the present invention, there is provided a debugging device, comprising: detecting means for detecting a trace event occurring in a debug target; first counting means for counting the trace events detected by the detecting means; A storage unit for storing the value of the internal data as trace data when the count result of the first counting unit reaches a predetermined value, and a second unit for counting the number of times the trace data stored in the storage unit is read. And a selection means for selecting and outputting the trace data stored in the storage means according to the counting result by the second counting means.

【0031】格納手段は、第1の計数手段による計数結
果が所定値になったときに、内部データの値をトレース
データとして格納するので、トレース事象が頻繁に発生
する場合であってもトレースデータのオーバフローを防
止することが可能となる。
The storage means stores the value of the internal data as trace data when the result of counting by the first counting means has reached a predetermined value. Therefore, even when trace events frequently occur, the trace data is stored. Can be prevented from overflowing.

【0032】[0032]

【発明の実施の形態】(実施の形態1)図1は、本発明
の実施の形態1におけるデバッグ装置を用いたシステム
の概略構成を示すブロック図である。このシステムは、
デバッグ対象1と、デバッグ装置2aと、ICE3とを
含む。なお、デバッグ対象1として、CPU11と内部
バス12とを含んだCPUコアの場合を示しているが、
これに限定されるものではない。
(Embodiment 1) FIG. 1 is a block diagram showing a schematic configuration of a system using a debugging device according to Embodiment 1 of the present invention. This system is
A debug target 1, a debug device 2 a, and an ICE 3 are included. Note that the case of the CPU core including the CPU 11 and the internal bus 12 is shown as the debug target 1,
It is not limited to this.

【0033】デバッグ装置2aは、トレース事象の発生
を判定する判定回路21と、トレースデータが格納され
るトレースバッファ22と、トレースバッファ22に格
納されたトレースデータを選択し、1ビットのデータと
して出力するトレースデータ選択回路23aとを含む。
The debug device 2a selects a determination circuit 21 for determining the occurrence of a trace event, a trace buffer 22 in which trace data is stored, and trace data stored in the trace buffer 22, and outputs the selected data as 1-bit data. And a trace data selection circuit 23a.

【0034】判定回路21は、CPU11から出力され
る信号および内部バス12を監視しており、予め設定さ
れたトレース事象との一致を検出すると、WE信号24
にHレベルを出力する。たとえば、CPU11がプログ
ラムを実行している最中に、所定の割込みが発生したと
きにトレース事象を発生させる場合には、そのような条
件が判定回路21に設定される。判定回路21は、設定
された条件と、内部バス12等の状態とが一致するのを
検出すると、WE信号24にHレベルを出力する。
The judging circuit 21 monitors the signal output from the CPU 11 and the internal bus 12. When detecting a coincidence with a preset trace event, the WE signal 24
Output the H level. For example, when a trace event is generated when a predetermined interrupt occurs while the CPU 11 is executing a program, such a condition is set in the determination circuit 21. When determining that the set condition matches the state of the internal bus 12 or the like, the determination circuit 21 outputs an H level to the WE signal 24.

【0035】トレースバッファ22は、WE信号24が
Hレベルになると、デバッグ対象1から出力される内部
データ13の値を順次取込む。この内部データ13に
は、デバッグ対象1内のデータバス、アドレスバス、制
御信号、割込み信号等が含まれる。トレースバッファ2
2は、トレース事象が1回発生すると、内部データ13
の値をmビットのデータとしてN回取込む。
When the WE signal 24 goes high, the trace buffer 22 sequentially takes in the value of the internal data 13 output from the debug target 1. The internal data 13 includes a data bus, an address bus, a control signal, an interrupt signal, and the like in the debug target 1. Trace buffer 2
2 indicates that when a trace event occurs once, the internal data 13
Is fetched N times as m-bit data.

【0036】図2は、図1に示すトレースデータ選択回
路23aの詳細を説明するためのブロック図である。こ
のトレースデータ選択回路23aは、m×Nビットの容
量を有する2次トレースバッファ231と、ICE3に
よって任意の値(ビット位置)が設定されるレジスタ2
32と、レジスタ232に設定されたビット位置に対応
する1ビットのデータを選択して出力するセレクタ23
3aとを含む。
FIG. 2 is a block diagram for explaining details of the trace data selection circuit 23a shown in FIG. The trace data selection circuit 23a includes a secondary trace buffer 231 having a capacity of m × N bits and a register 2 in which an arbitrary value (bit position) is set by the ICE3.
And a selector 23 for selecting and outputting 1-bit data corresponding to the bit position set in the register 232
3a.

【0037】2次トレースバッファ231は、トレース
バッファ22と同じm×Nビットの容量を有している
が、図3に示すように、N個のmビットデータが横一列
に並んだ構成を有しており、1回の読出しでm×Nビッ
トのデータが一度に出力されるようになっている。内部
データ13の値がトレースバッファ22に書込まれるタ
イミングに同期して、2次トレースバッファ231にト
レースバッファ22に書込まれた値が順次書込まれる。
The secondary trace buffer 231 has the same capacity of m × N bits as the trace buffer 22, but has a configuration in which N m-bit data are arranged in a horizontal line as shown in FIG. Thus, m × N bits of data are output at one time by one reading. The values written to the trace buffer 22 are sequentially written to the secondary trace buffer 231 in synchronization with the timing at which the value of the internal data 13 is written to the trace buffer 22.

【0038】セレクタ233aは、2次トレースバッフ
ァ231から出力されるm×Nビットのデータの中か
ら、レジスタ232に設定されたビット位置に対応する
1ビットのデータを選択してICE3へ出力する。
The selector 233a selects 1-bit data corresponding to the bit position set in the register 232 from the m × N-bit data output from the secondary trace buffer 231 and outputs it to the ICE3.

【0039】レジスタ232aは、ICE3によって値
が設定される。ICE3は、レジスタ232aに任意の
値を書込むことによって、m×Nビットのデータの中か
ら任意のビット位置の1ビットデータを選択して読出す
ことができる。このように、ICE232は、m×Nビ
ットのデータの中から、任意のビット位置の1ビットデ
ータを1サイクルで読出すことができる。
The value of the register 232a is set by ICE3. The ICE 3 can select and read 1-bit data at an arbitrary bit position from m × N-bit data by writing an arbitrary value to the register 232a. As described above, the ICE 232 can read 1-bit data at an arbitrary bit position from m × N-bit data in one cycle.

【0040】本実施の形態におけるデバッグ装置は、内
部データ13の値の中から1ビットデータ、たとえば、
データバスの所定の1ビットデータや割込み信号の値、
を読出すだけでトレース事象の判定を行なうことができ
る場合に有効である。
The debug device according to the present embodiment provides 1-bit data from the values of internal data 13, for example,
Predetermined 1-bit data of the data bus and the value of the interrupt signal,
Is effective when it is possible to determine the trace event simply by reading out.

【0041】以上説明したように、本実施の形態におけ
るデバッグ装置によれば、トレースバッファ22に内部
データ13の値が書込まれるときに、2次トレースバッ
ファ231にも内部データ13の値を書込み、レジスタ
232に設定された任意のビット位置に対応した1ビッ
トデータをICE3へ出力するようにしたので、ICE
3は1サイクルで所望の1ビットデータを取得すること
が可能となった。したがって、トレース事象が頻繁に発
生する場合であっても、トレースバッファ22において
オーバフローが発生することなく、ICE3は所望のデ
ータを取得することが可能となった。
As described above, according to the debugger of this embodiment, when the value of internal data 13 is written to trace buffer 22, the value of internal data 13 is also written to secondary trace buffer 231. Output 1-bit data corresponding to an arbitrary bit position set in register 232 to ICE3.
No. 3 can acquire desired 1-bit data in one cycle. Therefore, even when trace events occur frequently, the ICE 3 can acquire desired data without causing an overflow in the trace buffer 22.

【0042】(実施の形態2)図4は、本発明の実施の
形態2におけるデバッグ装置を用いたシステムの概略構
成を示すブロック図である。このシステムは、デバッグ
対象1と、デバッグ装置2bと、ICE3とを含む。な
お、デバッグ対象1およびICE3は、実施の形態1に
おいて説明したものと同じであるので、詳細な説明は繰
返さない。
(Embodiment 2) FIG. 4 is a block diagram showing a schematic configuration of a system using a debugging device according to Embodiment 2 of the present invention. This system includes a debug target 1, a debug device 2b, and an ICE3. Since debug target 1 and ICE 3 are the same as those described in the first embodiment, detailed description will not be repeated.

【0043】デバッグ装置2bは、トレース事象の発生
を判定する判定回路21と、トレースデータが格納され
るトレースバッファ22と、トレースバッファ22に格
納されたトレースデータを選択し、mビットのデータと
して出力するトレースデータ選択回路23bとを含む。
なお、判定回路21およびトレースバッファ22は、実
施の形態1において説明したものと同じであるので、詳
細な説明は繰り返さない。
The debug device 2b selects a determination circuit 21 for determining the occurrence of a trace event, a trace buffer 22 for storing trace data, and a trace data stored in the trace buffer 22, and outputs the selected data as m-bit data. And a trace data selection circuit 23b.
Since determination circuit 21 and trace buffer 22 are the same as those described in the first embodiment, detailed description will not be repeated.

【0044】図5は、図4に示すトレースデータ選択回
路23bの詳細を説明するためのブロック図である。こ
のトレースデータ選択回路23bは、m×Nビットの容
量を有する2次トレースバッファ234と、ICE3に
よって任意の値(mビットのデータ位置)が設定される
レジスタ232と、レジスタ232に設定された値に対
応するmビットのデータを選択して出力するセレクタ2
33bとを含む。
FIG. 5 is a block diagram for explaining details of the trace data selection circuit 23b shown in FIG. The trace data selection circuit 23b includes a secondary trace buffer 234 having a capacity of m × N bits, a register 232 in which an arbitrary value (m-bit data position) is set by the ICE 3, and a value set in the register 232. Selector 2 for selecting and outputting m-bit data corresponding to
33b.

【0045】2次トレースバッファ234は、トレース
バッファ22と同じm×Nビットの容量を有しており、
N個のmビットデータの中から任意のmビットデータが
出力される構成を有している。内部データ13の値がト
レースバッファ22に書込まれるタイミングに同期し
て、2次トレースバッファ234にトレースバッファ2
2に書込まれた値が順次書込まれる。
The secondary trace buffer 234 has the same capacity of m × N bits as the trace buffer 22.
Arbitrary m-bit data is output from N m-bit data. The trace buffer 2 is stored in the secondary trace buffer 234 in synchronization with the timing at which the value of the internal data 13 is written to the trace buffer 22.
The values written to 2 are sequentially written.

【0046】セレクタ233bは、2次トレースバッフ
ァ234から出力されるN個のmビットデータの中か
ら、レジスタ232に設定された位置に対応するmビッ
トのデータを選択してICE3へ出力する。
The selector 233b selects m-bit data corresponding to the position set in the register 232 from the N m-bit data output from the secondary trace buffer 234, and outputs the selected data to the ICE3.

【0047】ICE3は、レジスタ232に任意の値を
書込むことによって、N個のmビットデータの中から任
意の位置のmビットデータを選択して読出すことができ
る。このように、ICE3は、N個のmビットのデータ
の中から、任意の位置のmビットデータを1サイクルで
読出すことができる。
The ICE 3 can select and read m-bit data at an arbitrary position from N m-bit data by writing an arbitrary value to the register 232. As described above, the ICE 3 can read m-bit data at an arbitrary position from N m-bit data in one cycle.

【0048】本実施の形態におけるデバッグ装置は、内
部データ13の値の中からmビットデータ、たとえば、
データバスの所定のmビットデータを読出すだけでトレ
ース事象の判定を行なうことができる場合に有効であ
る。
The debugging device according to the present embodiment provides m-bit data, eg,
This is effective when a trace event can be determined only by reading predetermined m-bit data on the data bus.

【0049】以上説明したように、本実施の形態におけ
るデバッグ装置によれば、トレースバッファ22に内部
データ13の値が書込まれるときに、2次トレースバッ
ファ234にも内部データ13の値を書込み、レジスタ
232に設定された任意の位置のmビットデータをIC
E3へ出力するようにしたので、ICE3は1サイクル
で所望のmビットデータを取得することが可能となっ
た。したがって、トレース事象が頻繁に発生する場合で
あっても、トレースバッファ22においてオーバフロー
が発生することなく、ICE3は所望のデータを取得す
ることが可能となった。
As described above, according to the debugging device of the present embodiment, when the value of internal data 13 is written to trace buffer 22, the value of internal data 13 is also written to secondary trace buffer 234. , M-bit data at an arbitrary position set in the register 232
Since the data is output to E3, ICE3 can acquire desired m-bit data in one cycle. Therefore, even when trace events occur frequently, the ICE 3 can acquire desired data without causing an overflow in the trace buffer 22.

【0050】(実施の形態3)図6は、本発明の実施の
形態3におけるデバッグ装置を用いたシステムの概略構
成を示すブロック図である。このシステムは、デバッグ
対象1と、デバッグ装置2cと、ICE3とを含む。な
お、デバッグ対象1およびICE3は、実施の形態1に
おいて説明したものと同じであるので、詳細な説明は繰
返さない。
(Embodiment 3) FIG. 6 is a block diagram showing a schematic configuration of a system using a debugging device according to Embodiment 3 of the present invention. This system includes a debug target 1, a debug device 2c, and an ICE 3. Since debug target 1 and ICE 3 are the same as those described in the first embodiment, detailed description will not be repeated.

【0051】デバッグ装置2cは、トレース事象の発生
を判定する判定回路21と、トレースデータが格納され
るトレースバッファ22と、トレースバッファ22に格
納されたトレースデータを選択し、mビットのデータと
して出力するトレースデータ選択回路23cとを含む。
トレースデータ選択回路23cは、CPU11に対して
リピート信号25を出力し、所定アドレスからのプログ
ラムの再実行を要求しながら処理を行なう。なお、判定
回路21およびトレースバッファ22は、実施の形態1
において説明したものと同じであるので、詳細な説明は
繰り返さない。
The debug device 2c selects a determination circuit 21 for determining the occurrence of a trace event, a trace buffer 22 for storing trace data, and a trace data stored in the trace buffer 22, and outputs the selected data as m-bit data. And a trace data selection circuit 23c.
The trace data selection circuit 23c outputs a repeat signal 25 to the CPU 11 and performs processing while requesting re-execution of a program from a predetermined address. The determination circuit 21 and the trace buffer 22 are the same as those in the first embodiment.
Since they are the same as those described above, detailed description will not be repeated.

【0052】図7は、図6に示すトレースデータ選択回
路23cの詳細を説明するためのブロック図である。こ
のトレースデータ選択回路23cは、m×Nビットの容
量を有する2次トレースバッファ234と、WE信号2
4がHレベルになる回数をカウントするカウンタ235
と、カウンタ235のカウント値に応じて2次トレース
バッファ234に格納されたトレースデータを選択する
セレクタ233と、カウンタ235のカウント値と所定
値Nとを比較する比較回路236と、比較回路236の
出力信号に応じてCPU11にリピート信号を出力する
AND回路237とを含む。
FIG. 7 is a block diagram for explaining details of the trace data selection circuit 23c shown in FIG. The trace data selection circuit 23c includes a secondary trace buffer 234 having a capacity of m × N bits and a WE signal 2
Counter 235 that counts the number of times that 4 goes to H level
A selector 233 for selecting the trace data stored in the secondary trace buffer 234 according to the count value of the counter 235; a comparison circuit 236 for comparing the count value of the counter 235 with a predetermined value N; And an AND circuit 237 for outputting a repeat signal to the CPU 11 in response to the output signal.

【0053】2次トレースバッファ234は、トレース
バッファ22と同じm×Nビットの容量を有しており、
N個のmビットデータの中から任意のmビットデータが
出力される構成を有している。内部データ13の値がト
レースバッファ22に書込まれるタイミングに同期し
て、2次トレースバッファ234にトレースバッファ2
2に書込まれた値が順次書込まれる。
The secondary trace buffer 234 has the same capacity of m × N bits as the trace buffer 22.
Arbitrary m-bit data is output from N m-bit data. The trace buffer 2 is stored in the secondary trace buffer 234 in synchronization with the timing at which the value of the internal data 13 is written to the trace buffer 22.
The values written to 2 are sequentially written.

【0054】比較回路236は、カウンタ235のカウ
ント値と所定値Nとを比較し、カウント値と所定値Nと
が異なる場合にはロウレベル(以下、Lレベルと呼
ぶ。)を出力し、カウント値と所定値Nとが同じ場合に
はHレベルを出力する。
The comparison circuit 236 compares the count value of the counter 235 with a predetermined value N, and outputs a low level (hereinafter referred to as L level) when the count value is different from the predetermined value N, and outputs the count value. And when the predetermined value N is the same, an H level is output.

【0055】カウンタ235は、WE信号がHレベルと
なる回数、すなわちmビットのトレースデータが幾つト
レースバッファ22に格納されたかをカウントしてい
る。カウンタ235のカウント値が所定値Nに達するま
では、WE信号がHレベルになる毎にAND回路237
からHレベルが出力され、CPU11に出力されるリピ
ート信号25がHレベルとなる。
The counter 235 counts the number of times the WE signal goes high, that is, the number of m-bit trace data stored in the trace buffer 22. Until the count value of the counter 235 reaches the predetermined value N, each time the WE signal goes high, the AND circuit 237
Outputs a high level, and the repeat signal 25 output to the CPU 11 goes high.

【0056】カウンタ235のカウント値が所定値Nに
達すると、比較回路236からHレベルが出力され、カ
ウンタ235がリセットされる。カウンタ235がリセ
ットされた後は、新たなトレース事象によるトレースデ
ータの書込みが可能となる。
When the count value of the counter 235 reaches the predetermined value N, the comparator circuit 236 outputs an H level, and the counter 235 is reset. After the counter 235 is reset, writing of trace data by a new trace event becomes possible.

【0057】CPU11は、リピート信号を受けると、
所定アドレスからのプログラムを再実行する。上述した
ように、1回のトレース事象の発生によってm×Nビッ
トのトレースデータをトレースバッファ22に書込む必
要があるが、トレースバッファ22への1回の書込みに
よって、mビットのトレースデータしか書込むことがで
きない。したがって、リピート信号をCPU11へN回
出力して、CPU11に同じ処理をN回繰返し行なわせ
て、m×Nビットのトレースデータを取得するようにし
ている。
When the CPU 11 receives the repeat signal,
Re-execute the program from the predetermined address. As described above, it is necessary to write m × N-bit trace data into the trace buffer 22 by one occurrence of a trace event. However, only one m-bit trace data is written by one write to the trace buffer 22. I can't. Therefore, a repeat signal is output to the CPU 11 N times, and the same process is repeated N times to obtain m × N-bit trace data.

【0058】セレクタ233は、2次トレースバッファ
234から出力されるN個のmビットデータの中から、
カウンタ235のカウント値に対応するmビットのデー
タを選択してICE3へ出力する。ICE3は、このセ
レクタ233から出力されるmビットのデータをN回読
出すことによって、1回のトレース事象に対応したトレ
ースデータを取得することが可能である。
The selector 233 selects one of N m-bit data output from the secondary trace buffer 234 from
The m-bit data corresponding to the count value of the counter 235 is selected and output to the ICE3. The ICE 3 can acquire trace data corresponding to one trace event by reading the m-bit data output from the selector 233 N times.

【0059】以上説明したように、本実施の形態におけ
るデバッグ装置によれば、CPU11に対してリピート
信号をN回出力しながら、トレースバッファ22にトレ
ースデータを書込むようにしたので、異なるトレース事
象によるトレースデータの書込みを防止することがで
き、トレースバッファ22においてオーバフローが発生
することなく、ICE3は所望のトレースデータを取得
することが可能となった。
As described above, according to the debugger of the present embodiment, the trace data is written to the trace buffer 22 while the repeat signal is output to the CPU 11 N times. The ICE 3 can obtain desired trace data without causing an overflow in the trace buffer 22.

【0060】(実施の形態4)図8は、本発明の実施の
形態4におけるデバッグ装置を用いたシステムの概略構
成を示すブロック図である。このシステムは、デバッグ
対象1と、デバッグ装置2dと、ICE3とを含む。な
お、デバッグ対象1およびICE3は、実施の形態1に
おいて説明したものと同じであるので、詳細な説明は繰
返さない。
(Embodiment 4) FIG. 8 is a block diagram showing a schematic configuration of a system using a debugging device according to Embodiment 4 of the present invention. This system includes a debug target 1, a debug device 2d, and an ICE3. Since debug target 1 and ICE 3 are the same as those described in the first embodiment, detailed description will not be repeated.

【0061】デバッグ装置2dは、トレース事象の発生
を判定する判定回路21と、トレースデータが格納され
るトレースバッファ22と、トレースバッファ22に格
納されたトレースデータを選択し、mビットのデータと
して出力するトレースデータ選択回路23dとを含む。
The debug device 2d selects a judgment circuit 21 for judging the occurrence of a trace event, a trace buffer 22 for storing trace data, and a trace data stored in the trace buffer 22, and outputs the selected data as m-bit data. And a trace data selection circuit 23d.

【0062】図9は、図8に示すトレースデータ選択回
路23dの詳細を説明するためのブロック図である。こ
のトレースデータ選択回路23dは、m×Nビットの容
量を有する2次トレースバッファ234と、ICE3に
よって任意の値(mビットのデータ位置)が設定される
レジスタ232と、WE信号24がHレベルになる回数
をカウントするカウンタ235と、カウンタ235のカ
ウント値に応じて2次トレースバッファ234に格納さ
れたトレースデータを選択するセレクタ233と、カウ
ンタ235のカウント値と所定値Nとを比較する比較回
路236と、トレースバッファ22のオーバフローを検
出するオーバフロー検出回路239と、オーバフロー検
出回路239から出力される信号に応じてレジスタ23
2に格納された値またはカウンタ235のカウント値を
選択して出力するセレクタ238と、比較回路236の
出力信号に応じてカウンタ235に入力されるクロック
信号26をマスクするOR回路240と、比較回路23
6の出力信号に応じてカウンタ235にリセット信号を
出力するAND回路241とを含む。
FIG. 9 is a block diagram for explaining details of the trace data selection circuit 23d shown in FIG. The trace data selection circuit 23d includes a secondary trace buffer 234 having a capacity of m × N bits, a register 232 in which an arbitrary value (m-bit data position) is set by the ICE 3, and the WE signal 24 being set to the H level. A counter 235 for counting the number of times, a selector 233 for selecting the trace data stored in the secondary trace buffer 234 according to the count value of the counter 235, and a comparison circuit for comparing the count value of the counter 235 with a predetermined value N 236, an overflow detection circuit 239 for detecting an overflow of the trace buffer 22, and a register 23 according to a signal output from the overflow detection circuit 239.
2, a selector 238 for selecting and outputting the value stored in the counter 2 or the count value of the counter 235, an OR circuit 240 for masking the clock signal 26 input to the counter 235 according to the output signal of the comparator 236, and a comparator 23
6 and an AND circuit 241 that outputs a reset signal to the counter 235 in response to the output signal of the counter 235.

【0063】2次トレースバッファ234は、トレース
バッファ22と同じm×Nビットの容量を有しており、
N個のmビットデータの中から任意のmビットデータが
出力される構成を有している。内部データ13の値がト
レースバッファ22に書込まれるタイミングに同期し
て、2次トレースバッファ234にトレースバッファ2
2に書込まれた値が順次書込まれる。
The secondary trace buffer 234 has the same m × N-bit capacity as the trace buffer 22.
Arbitrary m-bit data is output from N m-bit data. The trace buffer 2 is stored in the secondary trace buffer 234 in synchronization with the timing at which the value of the internal data 13 is written to the trace buffer 22.
The values written to 2 are sequentially written.

【0064】比較回路236は、カウンタ235のカウ
ント値と所定値Nとを比較し、カウント値と所定値Nと
が異なる場合にはLレベルを出力し、カウント値と所定
値Nとが同じ場合にはHレベルを出力する。
The comparison circuit 236 compares the count value of the counter 235 with a predetermined value N, outputs an L level when the count value is different from the predetermined value N, and outputs an L level when the count value is equal to the predetermined value N. Output an H level.

【0065】カウンタ235は、クロック信号26の回
数をカウントしている。比較回路236が、カウンタ2
35のカウント値と所定値Nとが一致することを検出し
てHレベルを出力した後、WE信号24がHレベルにな
るとAND回路241からHレベルが出力されて、カウ
ンタ235がリセットされる。
The counter 235 counts the number of clock signals 26. The comparison circuit 236 is a counter 2
After detecting that the count value of 35 coincides with the predetermined value N and outputting the H level, when the WE signal 24 goes to the H level, the H level is output from the AND circuit 241 and the counter 235 is reset.

【0066】オーバフロー検出回路239は、カウンタ
235のカウント値を参照してオーバフローを検出す
る。オーバフロー検出回路239は、オーバフローを検
出していない場合にはセレクタ238がカウンタ235
のカウント値を選択して出力するように制御を行なう。
また、オーバフロー検出回路239は、オーバフローを
検出した場合にはセレクタ238がレジスタ232に格
納されている値を選択して出力するように制御を行な
う。
The overflow detection circuit 239 detects an overflow by referring to the count value of the counter 235. When the overflow detection circuit 239 detects no overflow, the selector 238 sets the counter 235
Is controlled to select and output the count value of.
The overflow detection circuit 239 controls the selector 238 to select and output a value stored in the register 232 when an overflow is detected.

【0067】セレクタ233は、セレクタ238から出
力される値に応じて2次トレースバッファ234に格納
されたトレースデータを選択してICE3へ出力する。
The selector 233 selects the trace data stored in the secondary trace buffer 234 according to the value output from the selector 238, and outputs the selected data to the ICE3.

【0068】ICE3は、オーバフローが発生していな
い状態においては、クロック信号26に同期してデータ
を読出す。そして、オーバフローが発生した場合には、
レジスタ232に値を書込みながら2次トレースバッフ
ァ234からトレースデータを読出す。このように、オ
ーバフローが発生した場合であっても、レジスタ232
に順次値を書込むことによって、未だ読出していないト
レースデータを順次読出すことができるようになる。
The ICE 3 reads data in synchronization with the clock signal 26 when no overflow occurs. And when an overflow occurs,
The trace data is read from the secondary trace buffer 234 while writing a value to the register 232. In this way, even if an overflow occurs, the register 232
, The trace data which has not been read out can be sequentially read out.

【0069】図10は、図9に示すオーバフロー検出回
路239の詳細を説明するためのブロック図である。こ
のオーバフロー検出回路239は、カウンタ235のカ
ウント値と所定値Nとを比較する比較回路2391と、
比較回路2391から出力される信号に応じてWE信号
23をマスクするAND回路2392と、比較回路12
91から出力される信号を保持して出力する保持回路2
393とを含む。
FIG. 10 is a block diagram for explaining details of overflow detection circuit 239 shown in FIG. The overflow detection circuit 239 includes a comparison circuit 2391 that compares the count value of the counter 235 with a predetermined value N,
An AND circuit 2392 that masks the WE signal 23 in accordance with a signal output from the comparison circuit 2391;
Holding circuit 2 for holding and outputting the signal output from 91
393.

【0070】比較回路2391は、カウンタ235のカ
ウント値と所定値Nとを比較し、カウント値と所定値N
とが異なる場合にはHレベルを出力する。また、比較回
路2391は、カウンタ235のカウント値と所定値N
とが同じ場合にはLレベルを出力する。
The comparison circuit 2391 compares the count value of the counter 235 with a predetermined value N, and compares the count value with the predetermined value N.
If H is different, the H level is output. Further, the comparison circuit 2391 calculates the count value of the counter 235 and the predetermined value N
If L is the same, L level is output.

【0071】AND回路2392は、比較回路2391
から出力される信号がLレベルのときにWE信号24が
Hレベルになる場合、すなわちICE3が2次トレース
バッファ234に格納されたトレースデータを全て読出
す前に別のトレース事象が発生した場合には、オーバフ
ローが発生したと判断して保持回路2393へHレベル
を出力する。また、AND回路2392は、比較回路2
391から出力される信号がHレベルのときにWE信号
がHレベルになる場合、すなわちICE3が2次トレー
スバッファ234に格納されたトレースデータを全て読
出した後に別のトレース事象が発生した場合には、オー
バフローが発生していないと判断して保持回路2393
にLレベルを出力する。
The AND circuit 2392 is provided with a comparison circuit 2391
The WE signal 24 goes high when the signal output from the second is low, that is, when another trace event occurs before the ICE 3 reads out all the trace data stored in the secondary trace buffer 234. Determines that an overflow has occurred, and outputs an H level signal to holding circuit 2393. In addition, the AND circuit 2392 includes the comparison circuit 2
When the WE signal is at the H level when the signal output from the 391 is at the H level, that is, when another trace event occurs after the ICE 3 has read all the trace data stored in the secondary trace buffer 234, , It is determined that no overflow has occurred and the holding circuit 2393
Output the L level.

【0072】保持回路2393は、AND回路2392
から出力される信号の立上がりで、すなわちオーバフロ
ーが発生したときに、比較回路2391の出力(Hレベ
ル)を保持する。ICE3は、この保持回路2393か
ら出力される信号を読出すことによって、オーバフロー
が発生したことを検出する。ICE3は、オーバフロー
が発生したことを検出すると、レジスタ232に値を設
定しながら2次トレースバッファ234に格納されたト
レースデータを順次読出す。
The holding circuit 2393 includes an AND circuit 2392
The output (H level) of comparison circuit 2391 is held at the rise of the signal output from, that is, when an overflow occurs. ICE3 detects that an overflow has occurred by reading the signal output from holding circuit 2393. When detecting that an overflow has occurred, the ICE 3 sequentially reads the trace data stored in the secondary trace buffer 234 while setting a value in the register 232.

【0073】以上説明したように、本実施の形態におけ
るデバッグ装置によれば、オーバフローが発生するまで
はカウンタ235の値に応じて出力されるトレースデー
タを読出し、オーバフローが発生した後はレジスタ23
2に値を順次設定しながらトレースデータを読出すよう
にしたので、別のトレース事象が発生してオーバフロー
が発生した場合であっても、前のトレース事象に対応し
たトレースデータを読出すことができ、オーバフローに
よってトレースデータを読出すことができないという不
具合を防止することが可能となった。
As described above, according to the debugging device of the present embodiment, the trace data output according to the value of counter 235 is read out until the overflow occurs, and register 23 is read after the overflow occurs.
Since the trace data is read while sequentially setting the value to 2, even if another trace event occurs and an overflow occurs, the trace data corresponding to the previous trace event can be read. This makes it possible to prevent a problem that trace data cannot be read due to an overflow.

【0074】(実施の形態5)図11は、本発明の実施
の形態5におけるデバッグ装置を用いたシステムの概略
構成を示すブロック図である。このシステムは、デバッ
グ対象1と、デバッグ装置2eと、ICE3とを含む。
なお、デバッグ対象1およびICE3は、実施の形態1
において説明したものと同じであるので、詳細な説明は
繰返さない。
(Embodiment 5) FIG. 11 is a block diagram showing a schematic configuration of a system using a debugging device according to Embodiment 5 of the present invention. This system includes a debug target 1, a debug device 2e, and an ICE3.
Note that the debug target 1 and the ICE 3 are the same as those in the first embodiment.
, The detailed description will not be repeated.

【0075】デバッグ装置2eは、トレース事象の発生
を判定する判定回路21と、トレースデータが格納され
るトレースバッファ22と、判定回路21から出力され
るWE信号24がHレベルになる数をカウントし、カウ
ント値が所定値になるとWE2信号31を出力するトレ
ースカウント回路27と、トレースカウント回路27か
らWE2信号31が出力されると再度クロック信号26
のカウントを開始するカウンタ29と、カウンタ29の
カウント値に応じてトレースバッファ22に格納された
トレースデータを選択して出力するセレクタ30とを含
む。
The debug device 2e counts the number of times that the determination circuit 21 for determining the occurrence of the trace event, the trace buffer 22 for storing the trace data, and the WE signal 24 output from the determination circuit 21 become H level. When the count value reaches a predetermined value, the trace count circuit 27 outputs the WE2 signal 31. When the trace count circuit 27 outputs the WE2 signal 31,
And a selector 30 for selecting and outputting the trace data stored in the trace buffer 22 in accordance with the count value of the counter 29.

【0076】図12は、図11に示すトレースカウント
回路27の詳細を説明するためのブロック図である。こ
のトレースカウント回路27は、WE信号24がHレベ
ルとなる数をカウントするカウンタ271と、トレース
データを取得するトレース事象の周期が設定されるレジ
スタ272と、カウンタ271のカウント値とレジスタ
272に設定された値とを比較してWE2信号31を出
力する比較回路273とを含む。
FIG. 12 is a block diagram for describing details of trace count circuit 27 shown in FIG. The trace count circuit 27 includes a counter 271 for counting the number of times that the WE signal 24 is at the H level, a register 272 for setting a cycle of a trace event for acquiring trace data, and a count value of the counter 271 and a register 272. And a comparison circuit 273 that compares the calculated value with the output value and outputs the WE2 signal 31.

【0077】ICE3によって、レジスタ272に任意
の値が書込まれる。比較回路273は、カウンタ271
のカウント値とレジスタ272に設定された値とを比較
し、カウント値と設定値とが異なる場合にはLレベルを
出力し、カウント値と設定値とが一致する場合にはHレ
ベルを出力する。カウント値と設定値とが一致するとき
に、WE2信号31にHレベルが出力されるとともに、
カウンタ271がリセットされる。
An arbitrary value is written to register 272 by ICE3. The comparison circuit 273 includes a counter 271
Is compared with the value set in the register 272, and if the count value is different from the set value, the L level is output. If the count value matches the set value, the H level is output. . When the count value matches the set value, an H level is output to the WE2 signal 31,
The counter 271 is reset.

【0078】WE2信号31にHレベルが出力される
と、トレースバッファ22に内部データ13の値が書込
まれるとともに、カウンタ29がリセットされてICE
3によるトレースデータの読出しが開始される。このよ
うに、レジスタ272の設定値毎のトレース事象に対応
したトレースデータがトレースバッファ22に格納され
るようになる。
When the H level is output to the WE2 signal 31, the value of the internal data 13 is written into the trace buffer 22, and the counter 29 is reset to ICE.
3 starts reading trace data. Thus, the trace data corresponding to the trace event for each set value of the register 272 is stored in the trace buffer 22.

【0079】本実施の形態におけるデバッグ装置は、頻
繁に発生するトレース事象のうち所定周期のトレース事
象に対応したトレースデータのみ取得すれば良い場合に
有効である。
The debugging device according to the present embodiment is effective when it is necessary to obtain only trace data corresponding to a trace event of a predetermined cycle among trace events that occur frequently.

【0080】以上説明したように、本実施の形態におけ
るデバッグ装置によれば、レジスタ272の設定値毎の
トレース事象に対応したトレースデータのみがトレース
バッファ22に書込まれるようにしたので、ICE3は
頻繁に発生するトレース事象のうち所定周期のトレース
事象に対応したトレースデータのみ取得することが可能
となった。したがって、トレース事象が頻繁に発生する
場合であっても、トレースバッファ22においてオーバ
フローが発生することなく、ICE3は所望のデータを
取得することが可能となった。
As described above, according to the debugging device of the present embodiment, only the trace data corresponding to the trace event for each set value of the register 272 is written in the trace buffer 22. It is possible to acquire only trace data corresponding to a trace event of a predetermined cycle among trace events occurring frequently. Therefore, even when trace events occur frequently, the ICE 3 can acquire desired data without causing an overflow in the trace buffer 22.

【0081】(実施の形態6)図13は、本発明の実施
の形態6におけるデバッグ装置を用いたシステムの概略
構成を示すブロック図である。このシステムは、デバッ
グ対象1と、デバッグ装置2fと、ICE3とを含む。
なお、デバッグ対象1およびICE3は、実施の形態1
において説明したものと同じであるので、詳細な説明は
繰返さない。
(Sixth Embodiment) FIG. 13 is a block diagram showing a schematic configuration of a system using a debugging device according to a sixth embodiment of the present invention. This system includes a debug target 1, a debug device 2f, and an ICE 3.
Note that the debug target 1 and the ICE 3 are the same as those in the first embodiment.
, The detailed description will not be repeated.

【0082】デバッグ装置2fは、トレース事象の発生
を判定する判定回路21と、トレースデータが格納され
るトレースバッファ22と、トレースバッファ22に格
納されたトレースデータを選択し、mビットのデータと
して出力するトレースデータ選択回路23fとを含む。
なお、判定回路21およびトレースバッファ22は、実
施の形態1において説明したものと同じであるので、詳
細な説明は繰り返さない。
The debug device 2f selects a judgment circuit 21 for judging the occurrence of a trace event, a trace buffer 22 for storing trace data, and a trace data stored in the trace buffer 22, and outputs the selected data as m-bit data. And a trace data selection circuit 23f.
Since determination circuit 21 and trace buffer 22 are the same as those described in the first embodiment, detailed description will not be repeated.

【0083】図14は、図13に示すトレースデータ選
択回路23fの詳細を説明するためのブロック図であ
る。このトレースデータ選択回路23fは、m×Nビッ
トの容量を有する2次トレースバッファ234と、IC
E3によって任意の値が設定されるレジスタ232と、
レジスタ232に設定された値に応じて2次トレースバ
ッファ234に格納されたトレースデータを選択するセ
レクタ233と、2次トレースバッファ234に格納さ
れたトレースデータに対して所定の演算を行なう演算回
路242とを含む。
FIG. 14 is a block diagram for describing details of trace data selection circuit 23f shown in FIG. The trace data selection circuit 23f includes a secondary trace buffer 234 having a capacity of m × N bits,
A register 232 in which an arbitrary value is set by E3;
A selector 233 for selecting the trace data stored in the secondary trace buffer 234 according to the value set in the register 232, and an arithmetic circuit 242 for performing a predetermined operation on the trace data stored in the secondary trace buffer 234 And

【0084】2次トレースバッファ234は、トレース
バッファ22と同じm×Nビットの容量を有しており、
N個のmビットデータの中から任意のmビットデータが
出力される構成を有している。内部データ13の値がト
レースバッファ22に書込まれるタイミングに同期し
て、2次トレースバッファ234にトレースバッファ2
2に書込まれた値が順次書込まれる。
The secondary trace buffer 234 has the same capacity of m × N bits as the trace buffer 22.
Arbitrary m-bit data is output from N m-bit data. The trace buffer 2 is stored in the secondary trace buffer 234 in synchronization with the timing at which the value of the internal data 13 is written to the trace buffer 22.
The values written to 2 are sequentially written.

【0085】レジスタ232は、ICE3によって値が
設定される。ICE3は、レジスタ232に任意の値を
書込むことによって、m×Nビットのデータの中から任
意の位置のmビットデータを選択して読出すことができ
る。セレクタ233は、レジスタ232に設定された値
に応じて、2次トレースバッファ234に格納されたト
レースデータを選択して出力する。
The value of the register 232 is set by ICE3. The ICE 3 can select and read m-bit data at an arbitrary position from m × N-bit data by writing an arbitrary value to the register 232. The selector 233 selects and outputs the trace data stored in the secondary trace buffer 234 according to the value set in the register 232.

【0086】演算回路242は、2次トレースバッファ
234に格納されたトレースデータの演算を行なってI
CE3へ出力する。たとえば、演算回路242は、2次
トレースバッファ234に格納されたトレースデータが
順次読出される際に、トレースデータの所定ビット位置
にある1ビットデータ全て加算し、パリティビットとし
てICE3へ出力する。ICE3は、このパリティビッ
トを取得することにより、N回に分けて読出したmビッ
トデータに欠落がないか否か等を判定することが可能と
なる。なお、演算回路242を備えずに、ICE3がト
レースデータを読出す際に、トレースデータの所定ビッ
トも同時に読出すような構成にし、ICE3側において
演算を行なうようにすれば同様の効果を得ることができ
る。
The operation circuit 242 performs an operation on the trace data stored in the secondary trace buffer 234, and
Output to CE3. For example, when the trace data stored in the secondary trace buffer 234 is sequentially read, the arithmetic circuit 242 adds all the 1-bit data at predetermined bit positions of the trace data and outputs the result to the ICE 3 as parity bits. By acquiring the parity bit, the ICE 3 can determine whether or not the m-bit data read out N times is missing. A similar effect can be obtained if the ICE 3 reads the trace data without the arithmetic circuit 242 so that a predetermined bit of the trace data is read at the same time, and the ICE 3 performs the operation. Can be.

【0087】以上説明したように、本実施の形態におけ
るデバッグ装置によれば、ICE3がレジスタ232に
値を設定してトレースデータを順次読出す際に、演算回
路242がトレースデータを演算するようにしたので、
トレースデータの欠落等を防止することができ、システ
ムの信頼性を高めることが可能となった。
As described above, according to the debugging device of the present embodiment, the arithmetic circuit 242 calculates the trace data when the ICE 3 sets the value in the register 232 and sequentially reads the trace data. Because
Trace data can be prevented from being lost, and the reliability of the system can be improved.

【0088】今回開示された実施の形態は、すべての点
で例示であって制限的なものではないと考えられるべき
である。本発明の範囲は上記した説明ではなくて特許請
求の範囲によって示され、特許請求の範囲と均等の意味
および範囲内でのすべての変更が含まれることが意図さ
れる。
The embodiments disclosed this time are to be considered in all respects as illustrative and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

【0089】[0089]

【発明の効果】請求項1に記載のデバッグ装置によれ
ば、選択手段が指定手段によって指定されたトレースデ
ータの位置に応じて、格納手段に格納されたトレースデ
ータを選択して出力するので、デバッグ装置に接続され
たICEは所望のトレースデータのみを取得することが
可能となった。
According to the first aspect of the present invention, the selecting means selects and outputs the trace data stored in the storage means in accordance with the position of the trace data specified by the specifying means. The ICE connected to the debug device can acquire only desired trace data.

【0090】請求項2に記載のデバッグ装置によれば、
第2の格納手段が第1の格納手段に格納されたトレース
データを転送して格納するので、別のトレース事象が発
生した場合であっても前のトレース事象に対応したトレ
ースデータが失われることを防止でき、トレースデータ
のオーバフローを防止することが可能となった。
According to the debugging device of the second aspect,
Since the second storage means transfers and stores the trace data stored in the first storage means, even if another trace event occurs, the trace data corresponding to the previous trace event is lost. And the overflow of trace data can be prevented.

【0091】請求項3に記載のデバッグ装置によれば、
選択手段が第2の格納手段に格納されたトレースデータ
の中から任意の1ビットのデータを選択して出力するの
で、デバッグ装置に接続されたICEはトレースデータ
の中から、所望の1ビットのトレースデータを1サイク
ルで取得することが可能となり、トレースデータのオー
バフローをさらに防止することが可能となった。
According to the debugging device of the third aspect,
Since the selecting means selects and outputs an arbitrary 1-bit data from the trace data stored in the second storage means, the ICE connected to the debugging device can select a desired 1-bit data from the trace data. Trace data can be acquired in one cycle, and overflow of trace data can be further prevented.

【0092】請求項4に記載のデバッグ装置によれば、
演算手段が格納手段に格納されたトレースデータに演算
を行なうので、たとえばトレースデータの所定ビットを
全て加算してパリティビットとして出力することによ
り、ICEはトレースデータの欠落等を検出することが
可能となった。
According to the debug device of the fourth aspect,
Since the arithmetic means performs an arithmetic operation on the trace data stored in the storage means, for example, by adding all predetermined bits of the trace data and outputting the result as parity bits, the ICE can detect missing trace data and the like. became.

【0093】請求項5に記載のデバッグ装置によれば、
再実行要求手段は、検出手段によってトレース事象が検
出されたときに、デバッグ対象に所定アドレスからのプ
ログラムの再実行を要求するので、1回のトレース事象
に対応したトレースデータを複数回に分けてトレースバ
ッファに格納することが可能となった。
According to the debugging device of the fifth aspect,
The re-execution requesting unit requests the debug target to re-execute the program from a predetermined address when the detecting unit detects the trace event, so that the trace data corresponding to one trace event is divided into a plurality of times. It can be stored in the trace buffer.

【0094】請求項6に記載のデバッグ装置によれば、
第2の格納手段が第1の格納手段に格納されたトレース
データを転送して格納するので、別のトレース事象が発
生した場合であっても前のトレース事象に対応したトレ
ースデータが失われることを防止でき、トレースデータ
のオーバフローを防止することが可能となった。
According to the debugging device of the sixth aspect,
Since the second storage means transfers and stores the trace data stored in the first storage means, even if another trace event occurs, the trace data corresponding to the previous trace event is lost. And the overflow of trace data can be prevented.

【0095】請求項7に記載のデバッグ装置によれば、
第2の選択手段が、第1の選択手段からの出力に応じ
て、格納手段に格納されたトレースデータを選択して出
力するので、オーバフローが発生した場合であってもデ
バッグ装置に接続されたICEは未だ読出していないト
レースデータを任意に指定して読出すことが可能となっ
た。
According to the debugging device of the seventh aspect,
The second selecting means selects and outputs the trace data stored in the storing means in accordance with the output from the first selecting means, so that even if an overflow has occurred, the second selecting means is connected to the debugging device. The ICE can arbitrarily designate and read trace data that has not yet been read.

【0096】請求項8に記載のデバッグ装置によれば、
第2の格納手段が第1の格納手段に格納されたトレース
データを転送して格納するので、別のトレース事象が発
生した場合であっても前のトレース事象に対応したトレ
ースデータが失われることを防止でき、トレースデータ
のオーバフローを防止することが可能となった。
According to the debugging device of the eighth aspect,
Since the second storage means transfers and stores the trace data stored in the first storage means, even if another trace event occurs, the trace data corresponding to the previous trace event is lost. And the overflow of trace data can be prevented.

【0097】請求項9に記載のデバッグ装置によれば、
格納手段が第1の計数手段による計数結果が所定値にな
ったときに、内部データの値をトレースデータとして格
納するので、トレース事象が頻繁に発生する場合であっ
てもトレースデータのオーバフローを防止することが可
能となった。
According to the debug device of the ninth aspect,
The storage unit stores the value of the internal data as trace data when the count result of the first counting unit reaches a predetermined value, so that even if a trace event occurs frequently, the overflow of the trace data is prevented. It became possible to do.

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

【図1】 本発明の実施の形態1におけるデバッグ装置
を用いたシステムの概略構成を示すブロック図である。
FIG. 1 is a block diagram showing a schematic configuration of a system using a debugging device according to a first embodiment of the present invention.

【図2】 図1に示すトレースデータ選択回路23aの
詳細を説明するためのブロック図である。
FIG. 2 is a block diagram for explaining details of a trace data selection circuit 23a shown in FIG. 1;

【図3】 2次トレースバッファ231の構成を説明す
るための図である。
FIG. 3 is a diagram for describing a configuration of a secondary trace buffer 231.

【図4】 本発明の実施の形態2におけるデバッグ装置
を用いたシステムの概略構成を示すブロック図である。
FIG. 4 is a block diagram illustrating a schematic configuration of a system using a debugging device according to a second embodiment of the present invention.

【図5】 図4に示すトレースデータ選択回路23bの
詳細を説明するためのブロック図である。
FIG. 5 is a block diagram for explaining details of a trace data selection circuit 23b shown in FIG. 4;

【図6】 本発明の実施の形態3におけるデバッグ装置
を用いたシステムの概略構成を示すブロック図である。
FIG. 6 is a block diagram illustrating a schematic configuration of a system using a debugging device according to a third embodiment of the present invention.

【図7】 図6に示すトレースデータ選択回路23cの
詳細を説明するためのブロック図である。
FIG. 7 is a block diagram for explaining details of a trace data selection circuit 23c shown in FIG. 6;

【図8】 本発明の実施の形態4におけるデバッグ装置
を用いたシステムの概略構成を示すブロック図である。
FIG. 8 is a block diagram showing a schematic configuration of a system using a debugging device according to a fourth embodiment of the present invention.

【図9】 図8に示すトレースデータ選択回路23dの
詳細を説明するためのブロック図である。
FIG. 9 is a block diagram for explaining details of a trace data selection circuit 23d shown in FIG. 8;

【図10】 図9に示すオーバフロー検出回路239の
詳細を説明するためのブロック図である。
FIG. 10 is a block diagram illustrating details of an overflow detection circuit 239 shown in FIG. 9;

【図11】 本発明の実施の形態5におけるデバッグ装
置を用いたシステムの概略構成を示すブロック図であ
る。
FIG. 11 is a block diagram showing a schematic configuration of a system using a debugging device according to a fifth embodiment of the present invention.

【図12】 図11に示すトレースカウント回路27の
詳細を説明するためのブロック図である。
FIG. 12 is a block diagram for describing details of a trace count circuit 27 shown in FIG. 11;

【図13】 本発明の実施の形態6におけるデバッグ装
置を用いたシステムの概略構成を示すブロック図であ
る。
FIG. 13 is a block diagram showing a schematic configuration of a system using a debugging device according to a sixth embodiment of the present invention.

【図14】 図13に示すトレースデータ選択回路23
fの詳細を説明するためのブロック図である。
14 is a trace data selection circuit 23 shown in FIG.
It is a block diagram for explaining the detail of f.

【図15】 従来のデバッグ装置を用いたシステムの概
略構成を示すブロック図である。
FIG. 15 is a block diagram showing a schematic configuration of a system using a conventional debugging device.

【図16】 トレースバッファ122の構成例を示す図
である。
FIG. 16 is a diagram showing a configuration example of a trace buffer 122.

【図17】 ICE103がトレースバッファ122か
らトレースデータを読出すタイミングを示す図である。
FIG. 17 is a diagram showing the timing at which the ICE 103 reads trace data from the trace buffer 122.

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

1 デバッグ対象、2a〜2f デバッグ装置、3 I
CE、11 CPU、12 内部バス、13 内部デー
タ、21 判定回路、22 トレースバッファ、23a
〜23d,23f トレースデータ選択回路、24 W
E信号、25リピート信号、26 クロック信号、27
トレースカウント回路、29,235,271 カウ
ンタ、30,233a,233b,238 セレクタ、
31WE2信号、231,234 2次トレースバッフ
ァ、232,272 レジスタ、236,273,23
91 比較回路、237,241,2392 AND回
路、239 オーバフロー検出回路、240 OR回
路、2393 保持回路、242 演算回路。
1 debug target, 2a-2f debug device, 3I
CE, 11 CPU, 12 internal bus, 13 internal data, 21 determination circuit, 22 trace buffer, 23a
~ 23d, 23f Trace data selection circuit, 24W
E signal, 25 repeat signal, 26 clock signal, 27
Trace count circuit, 29,235,271 counter, 30,233a, 233b, 238 selector,
31WE2 signal, 231,234 secondary trace buffer, 232,272 register, 236,273,23
91 comparison circuit, 237, 241, 392 AND circuit, 239 overflow detection circuit, 240 OR circuit, 2393 holding circuit, 242 arithmetic circuit.

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 デバッグ対象において発生するトレース
事象を検出するための検出手段と、 前記検出手段によってトレース事象が検出されたとき
に、内部データの値をトレースデータとして格納するた
めの格納手段と、 前記格納手段によって格納されたトレースデータの任意
の位置を指定するための指定手段と、 前記指定手段によって指定されたトレースデータの位置
に応じて、前記格納手段に格納されたトレースデータを
選択して出力するための選択手段とを含むデバッグ装
置。
A detecting means for detecting a trace event occurring in a debug target; a storage means for storing a value of internal data as trace data when the trace event is detected by the detecting means; A designation unit for designating an arbitrary position of the trace data stored by the storage unit; and selecting the trace data stored in the storage unit according to the position of the trace data designated by the designation unit. And a selecting means for outputting.
【請求項2】 前記格納手段は、内部データの値をトレ
ースデータとして格納するための第1の格納手段と、 前記第1の格納手段に格納されたトレースデータを転送
して格納するための第2の格納手段とを含み、 前記選択手段は、前記指定手段によって指定されたトレ
ースデータの位置に応じて、前記第2の格納手段に格納
されたトレースデータを選択して出力する、請求項1記
載のデバッグ装置。
2. The first storage means for storing a value of internal data as trace data, and the second storage means for transferring and storing the trace data stored in the first storage means. 2. The storage device according to claim 1, wherein the selection unit selects and outputs the trace data stored in the second storage unit according to the position of the trace data specified by the specification unit. Debug device as described.
【請求項3】 前記選択手段は、前記第2の格納手段に
格納されたトレースデータの中から任意の1ビットのデ
ータを選択して出力する、請求項2記載のデバッグ装
置。
3. The debugging device according to claim 2, wherein said selection means selects and outputs an arbitrary 1-bit data from the trace data stored in said second storage means.
【請求項4】 前記デバッグ装置はさらに、前記格納手
段に格納されたトレースデータに演算を行なうための演
算手段を含む、請求項1〜3のいずれかに記載のデバッ
グ装置。
4. The debugging device according to claim 1, wherein said debugging device further includes an operation unit for performing an operation on the trace data stored in said storage unit.
【請求項5】 デバッグ対象において発生するトレース
事象を検出するための検出手段と、 前記検出手段によってトレース事象が検出されたとき
に、内部データの値をトレースデータとして格納するた
めの格納手段と、 前記検出手段によって検出されたトレース事象を計数す
るための計数手段と、 前記計数手段による計数結果に応じて、前記格納手段に
格納されたトレースデータを選択して出力するための選
択手段と、 前記検出手段によってトレース事象が検出されたとき
に、前記デバッグ対象に所定アドレスからのプログラム
の再実行を要求するための再実行要求手段とを含むデバ
ッグ装置。
5. Detecting means for detecting a trace event occurring in a debug target, and storage means for storing a value of internal data as trace data when the trace event is detected by the detecting means; Counting means for counting the trace events detected by the detection means; selecting means for selecting and outputting the trace data stored in the storage means in accordance with the counting result by the counting means; And a re-execution requesting means for requesting the debug target to re-execute a program from a predetermined address when a trace event is detected by the detection means.
【請求項6】 前記格納手段は、内部データの値をトレ
ースデータとして格納するための第1の格納手段と、 前記第1の格納手段に格納されたトレースデータを転送
して格納するための第2の格納手段とを含み、 前記選択手段は、前記計数手段による計数結果に応じ
て、前記第2の格納手段に格納されたトレースデータを
選択して出力する、請求項5記載のデバッグ装置。
6. A first storage unit for storing a value of internal data as trace data, and a second storage unit for transferring and storing the trace data stored in the first storage unit. 6. The debugging device according to claim 5, further comprising: a second storage unit, wherein the selection unit selects and outputs the trace data stored in the second storage unit according to a counting result by the counting unit.
【請求項7】 デバッグ対象において発生するトレース
事象を検出するための第1の検出手段と、 前記第1の検出手段によってトレース事象が検出された
ときに、内部データの値をトレースデータとして格納す
るための格納手段と、 前記格納手段によって格納されたトレースデータの任意
の位置を指定するための指定手段と、 前記格納手段に格納されたトレースデータの読出し回数
を計数するための計数手段と、 前記格納手段におけるオーバフローを検出するための第
2の検出手段と、 前記第2の検出手段によってオーバフローが検出されて
いない場合には前記計数手段の計数結果を選択し、前記
第2の検出手段によってオーバフローが検出された場合
には前記指定手段によって指定されたトレースデータの
位置を選択して出力するための第1の選択手段と、 前記第1の選択手段からの出力に応じて、前記格納手段
に格納されたトレースデータを選択して出力するための
第2の選択手段とを含むデバッグ装置。
7. A first detecting means for detecting a trace event occurring in a debug target, and when the trace event is detected by the first detecting means, a value of internal data is stored as trace data. Storage means for specifying the position of the trace data stored by the storage means; specifying means for counting the number of times of reading the trace data stored in the storage means; Second detection means for detecting an overflow in the storage means; and if the overflow is not detected by the second detection means, the counting result of the counting means is selected, and the overflow is detected by the second detection means. Is detected, the position of the trace data designated by the designation means is selected and output. Debugging device comprising a first selection means, in response to an output from said first selecting means, and a second selection means for selecting and outputting trace data stored in the storage unit.
【請求項8】 前記格納手段は、内部データの値をトレ
ースデータとして格納するための第1の格納手段と、 前記第1の格納手段に格納されたトレースデータを転送
して格納するための第2の格納手段とを含み、 前記第2の選択手段は、前記第1の選択手段からの出力
に応じて、前記第2の格納手段に格納されたトレースデ
ータを選択して出力する、請求項7記載のデバッグ装
置。
8. The first storage means for storing the value of internal data as trace data, and the second storage means for transferring and storing the trace data stored in the first storage means. 2. The second selecting means, wherein the second selecting means selects and outputs the trace data stored in the second storing means in accordance with an output from the first selecting means. 7. The debugging device according to 7.
【請求項9】 デバッグ対象において発生するトレース
事象を検出するための検出手段と、 前記検出手段によって検出されたトレース事象を計数す
るための第1の計数手段と、 前記第1の計数手段による計数結果が所定値になったと
きに、内部データの値をトレースデータとして格納する
ための格納手段と、 前記格納手段に格納されたトレースデータの読出し回数
を計数するための第2の計数手段と、 前記第2の計数手段による計数結果に応じて、前記格納
手段に格納されたトレースデータを選択して出力するた
めの選択手段とを含むデバッグ装置。
9. A detecting means for detecting a trace event occurring in a debug target, a first counting means for counting the trace events detected by the detecting means, and a counting by the first counting means Storage means for storing the value of the internal data as trace data when the result has reached a predetermined value; second counting means for counting the number of times of reading the trace data stored in the storage means; Selecting means for selecting and outputting the trace data stored in the storage means in accordance with the counting result by the second counting means.
JP2001157107A 2001-05-25 2001-05-25 Debugging device Withdrawn JP2002351696A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001157107A JP2002351696A (en) 2001-05-25 2001-05-25 Debugging device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001157107A JP2002351696A (en) 2001-05-25 2001-05-25 Debugging device

Publications (1)

Publication Number Publication Date
JP2002351696A true JP2002351696A (en) 2002-12-06

Family

ID=19001020

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001157107A Withdrawn JP2002351696A (en) 2001-05-25 2001-05-25 Debugging device

Country Status (1)

Country Link
JP (1) JP2002351696A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009037574A (en) * 2007-08-04 2009-02-19 Ricoh Co Ltd Semiconductor integrated circuit
WO2017044291A1 (en) * 2015-09-10 2017-03-16 Google Inc. Method and apparatus for generating, capturing, storing, and loading debug information for failed tests scripts

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009037574A (en) * 2007-08-04 2009-02-19 Ricoh Co Ltd Semiconductor integrated circuit
WO2017044291A1 (en) * 2015-09-10 2017-03-16 Google Inc. Method and apparatus for generating, capturing, storing, and loading debug information for failed tests scripts
GB2555338A (en) * 2015-09-10 2018-04-25 Google Llc Method and apparatus for generating, capturing, storing, and loading debug information for failed tests scripts

Similar Documents

Publication Publication Date Title
US6915416B2 (en) Apparatus and method for microcontroller debugging
US6826747B1 (en) System and method for tracing program instructions before and after a trace triggering event within a processor
US20030051122A1 (en) Trace information generation apparatus for generating branch trace information omitting at least part of branch source information and branch destination information on target processing
EP0645705A1 (en) Testing and monitoring of programmed devices
EP0702297B1 (en) A data processor with breakpoint circuit
JP4960364B2 (en) Hardware-assisted device configuration detection
US20080016415A1 (en) Evaluation system and method
JPH07200348A (en) Method and apparatus for compression of program address dataand apparatus for quickening of debugging processing of program
KR20010043286A (en) Non-intrusive performance monitoring
JP2010541067A (en) System and method for monitoring debug events
US8185772B2 (en) Determining execution times of commands
EP0530816A2 (en) Microprocessor with cache memory and trace analyzer therefor
US7096395B2 (en) Efficient word recognizer for a logic analyzer
JP2002351696A (en) Debugging device
JP2974601B2 (en) Microprocessor and debug system
JPH10275092A (en) Trace information output method for microprocessor
WO2006079961A2 (en) Data processing system and method of debugging
US20030204707A1 (en) Real-time tracing microprocessor unit and operating method
JP2006185365A (en) Semiconductor device and debugging method
US6795879B2 (en) Apparatus and method for wait state analysis in a digital signal processing system
JP4044455B2 (en) Debug support device
JP5901252B2 (en) Data processing apparatus, data processing method, and program
JP6052847B2 (en) Transaction processing apparatus and illegal transaction detection method
JP4317672B2 (en) CPU abnormality monitoring device
JP2530040Y2 (en) Full-duplex communication method by serial communication

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