JP5982845B2 - Trace control apparatus and trace control method - Google Patents
Trace control apparatus and trace control method Download PDFInfo
- Publication number
- JP5982845B2 JP5982845B2 JP2012025227A JP2012025227A JP5982845B2 JP 5982845 B2 JP5982845 B2 JP 5982845B2 JP 2012025227 A JP2012025227 A JP 2012025227A JP 2012025227 A JP2012025227 A JP 2012025227A JP 5982845 B2 JP5982845 B2 JP 5982845B2
- Authority
- JP
- Japan
- Prior art keywords
- trigger
- trace
- signal
- storage
- timing information
- 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.)
- Active
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Description
本発明は、動作中のLSI(Large Scale Integrated Circuit)に対する入出力信号又はLSIの内部信号をトレースするトレース制御装置及びトレース制御方法に関し、特に、任意の時点からのトレースが可能なトレース制御装置及びトレース制御方法に関する。 The present invention relates to a trace control apparatus and a trace control method for tracing an input / output signal to an LSI (Large Scale Integrated Circuit) in operation or an internal signal of the LSI, and in particular, a trace control apparatus capable of tracing from an arbitrary time point and The present invention relates to a trace control method.
LSIの回路の信号路には不可避的に信号の伝播遅延が発生する。そのため、LSIには、内部信号のタイミングのばらつきが発生し、製造後の評価で動作異常(不具合)を生じる場合がある。また、LSIの製造前に十分な検証を行う期間がなく、製造後の評価で不具合が発見される場合もある。不具合が生じた場合には、その原因を究明するためにLSIの信号動作を観測し、不具合原因を解析する、いわゆるデバッグが必要である。 A signal propagation delay inevitably occurs in the signal path of the LSI circuit. For this reason, the timing variation of the internal signal occurs in the LSI, and an abnormal operation (failure) may occur in the evaluation after manufacturing. In addition, there is no period during which sufficient verification is performed before manufacturing the LSI, and defects may be found in evaluation after manufacturing. When a failure occurs, so-called debugging is required to observe the signal operation of the LSI and analyze the cause of the failure in order to investigate the cause.
LSIのデバックについて図面を参照しながら説明する。図12は、一般的なLSIデバッグシステムの構成を示すブロック図である。システム全体の制御は、外部制御装置21が行う。LSI10は、内部のデバッグ対象回路31からの観測対象信号から、デバッグのために観測される被観測信号を選択する信号選択部81を備える。選択された被観測信号は、LSI10のデバック用観測端子12から外部へ出力される。出力された被観測信号は、外部に接続されるロジックアナライザ22に読み込まれ、デバックが行われる。
LSI debugging will be described with reference to the drawings. FIG. 12 is a block diagram showing a configuration of a general LSI debug system. The
LSIをデバックしたりその障害を解析したりするためには、ロジックアナライザ22でLSI10の内部の状態値を連続して把握することが要求される。さらに、この状態値を解析しながら不具合の原因を解決していくことも必要とされる。
In order to debug the LSI or analyze the failure, it is required that the
LSI10の内部の被観測信号を観測するために、LSI10内部に被観測信号の状態を記憶する「トレースメモリ」が備えられることがある。以降、被観測信号の状態を記憶することを「トレースする」といい、トレースされ記憶されたデータを「トレースデータ」という。
In order to observe the signal under observation inside the
また、トレースメモリの内容を外部に出力したり、被観測信号を直接外部に出力したりするためには、LSI10の通常動作のための端子の他に、専用の出力端子を設ける必要がある。このような専用端子の追加は、LSI10のチップ面積を増加させたり、LSI10のパッケージサイズを拡大させたりするため、製造コストを増加させる。 特許文献1−4には、内蔵するトレースメモリの容量や被観測信号の出力用端子の削減のための各種の技術が開示されている。
Further, in order to output the contents of the trace memory to the outside or to directly output the signal to be observed to the outside, it is necessary to provide a dedicated output terminal in addition to the terminals for the normal operation of the
特許文献2、3には、容量の少ないトレースメモリを用いて、より長時間のプログラムカウンタトレースを実現できるようにする技術が開示されている。
特許文献2の技術では、LSIにトレースメモリを内蔵し、内部のCPU(Central Processing Unit)からの、プログラムの実行開始及び実行停止を知らせるモニタ信号を用いて、トレースの開始及び停止を制御する。
In the technique of
特許文献3の技術では、トレース機能を備えたSoC(System On Chip)内のプロセッサの動作履歴をトレースするときにプロセッサを停止させる。そして、プロセッサの停止期間中にトレース情報が取り出される。この動作を繰り返すことにより、小さな容量のトレースメモリを用いて、長時間のトレースを実現する。
In the technique of
特許文献4には、データキャプチャ部、すなわちトレースメモリの内容を、時分割に外部に出力する内部信号観測装置が開示されている。
特許文献1の技術では、トレースメモリの内蔵によって、LSIのチップ面積が増加するという課題がある。チップ面積の増大を抑えるためにトレースメモリの容量を削減すると、被観測信号の本数やトレース期間が短くなるなどの問題が発生する。
In the technique of
特許文献2の技術では、プログラムの実行中のみのトレースが可能である。しかし、必要な被観測信号をトレースするためには、プログラムの実行期間に応じた容量のトレースメモリを内蔵する必要がある。すなわち、長いプログラムのトレースに対応するためには、大容量のメモリを内蔵する必要がある。
With the technique of
特許文献3の技術では、トレースメモリの内容を読み出すときには、プロセッサを停止させる必要がある。このとき、必然的に、プログラムの動作も停止する。ところが、一般的に、プログラムは任意の位置で停止させることができるとは限らない。例えば、外部に何らかの制御信号や駆動信号を出力しているようなときは、それらの信号を出力した状態で停止させることができない場合がある。なぜなら、それらの信号を入力する機器や素子が、ある動作状態やある駆動状態のまま維持されてしまうからである。このように、特許文献3の技術では、トレースを行う期間やその期間の長さを任意に設定することができない。従って、停止可能な時点までのトレースが可能なように大容量のトレースメモリを内蔵する必要がある。
In the technique of
特許文献4の技術では、トレースメモリの内容を時分割で外部に出力するため、テスト端子の本数の削減には効果がある。しかし、トレースする必要がある情報をすべてトレースメモリに記憶させる必要があるため、トレースメモリの容量の削減には効果はない。
The technology of
以上のように、特許文献1−4の技術には、多数の被観測信号のトレースや長期間のトレースのためには、大容量のトレースメモリを必要とするという課題がある。トレース期間が短くても、短い時間間隔で被観測信号の状態をサンプリングする場合には、同様に大容量のトレースメモリを必要とする。 As described above, the technique disclosed in Patent Documents 1-4 has a problem that a large-capacity trace memory is required for tracing a large number of signals to be observed and for long-term tracing. Even when the trace period is short, when the state of the signal under observation is sampled at a short time interval, a large-capacity trace memory is similarly required.
なお、大容量のトレースメモリは、デバッグ対象のLSI等に内蔵される場合に特に影響が大きい。しかし、大容量のトレースメモリがコストアップにつながるという課題は、トレースメモリをLSI内蔵するか否かにはよらない。
(発明の目的)
発明の目的は、被観測信号に対して、任意の時点からトレースを開始することが可能なトレース制御装置及びトレース制御方法を提供することである。
Note that a large-capacity trace memory is particularly affected when built in an LSI or the like to be debugged. However, the problem that a large-capacity trace memory leads to an increase in cost does not depend on whether or not the trace memory is incorporated in the LSI.
(Object of invention)
An object of the invention is to provide a trace control device and a trace control method capable of starting a trace from an arbitrary point in time for a signal under observation.
本発明のトレース制御装置は、トリガを発生させるための条件を規定するトリガ条件情報を記憶するトリガ情報格納部と入力された被観測信号の状態の記憶であるトレースを開始するタイミングを規定するタイミング情報を記憶するタイミング情報格納部を含むパラメータ設定部と、入力されたトリガ用信号がトリガ発生条件を満たすことを検出したとき、トリガを発生するトリガ発生部と、トリガとトレース開始遅延時間に基づいて、所定の記憶装置への状態の書き込みを制御する記憶制御部と、を備えることを特徴とする。 The trace control device according to the present invention includes a trigger information storage unit that stores trigger condition information that defines a condition for generating a trigger, and a timing that defines timing for starting a trace that is a storage of the state of the input signal to be observed. A parameter setting unit including a timing information storage unit for storing information, a trigger generation unit that generates a trigger when it is detected that the input trigger signal satisfies a trigger generation condition, and the trigger and trace start delay time And a storage control unit that controls writing of a state to a predetermined storage device.
本発明のトレース制御方法は、入力されたトリガ用信号がトリガを発生させるための条件を規定するトリガ発生条件を満たすことを検出したとき、トリガを発生させ、トリガと入力された被観測信号の状態の記憶であるトレースを開始するタイミングを規定するタイミング情報に基づいて、所定の記憶装置へ状態を書き込むことを特徴とする。 The trace control method of the present invention generates a trigger when detecting that the input trigger signal satisfies a trigger generation condition that defines a condition for generating a trigger, and the trigger and the input observed signal are detected. A state is written to a predetermined storage device based on timing information that defines a timing for starting a trace, which is a state storage.
本発明によれば、トレースメモリの容量以上のトレースデータの取得が可能となる。理由は、所定のトリガの発生タイミングを基準に、トレースを開始するタイミングを変更する手段が設けられているので、トレース開始タイミングを変更しながらトレースを繰り返し実行することでトレースデータを分割して取得できるためである。 According to the present invention, it is possible to acquire trace data exceeding the capacity of the trace memory. The reason is that since a means to change the trace start timing is provided based on the occurrence timing of a predetermined trigger, the trace data is divided and acquired by repeatedly executing the trace while changing the trace start timing. This is because it can.
(第1の実施形態)
次に、発明を実施するための実施形態について図面を参照して詳細に説明する。図1は、第1の実施形態の構成を示すブロック図である。第1の実施形態のトレース制御装置1は、パラメータ設定部4とトリガ発生部5とRAM(Random Access Memory)制御部6とRAM7を備える。
(First embodiment)
Next, embodiments for carrying out the invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing the configuration of the first embodiment. The
パラメータ設定部4は、トリガ条件情報を保持するトリガ条件情報格納部4−1と、RAM7への書き込み開始タイミングを指定するタイミング情報を保持するタイミング情報格納部4−2を備える。トリガ条件情報及びタイミング情報は、CPU等の外部制御装置2からの制御信号によって設定される。トリガ条件情報格納部4−1はトリガ条件情報をトリガ発生部5に出力し、タイミング情報格納部4−2はタイミング情報をRAM制御部6に出力する。
The
トリガ発生部5は、トリガ条件情報4−1に従って、デバッグ対象回路3からの被観測信号から観測開始タイミングを検出し、トリガを出力する。そして、トリガ発生部5は、RAM制御部6にトリガを出力する。
The
RAM制御部6は、タイミング情報4−2に従って、トリガ発生部5からのトリガの入力タイミングを基準として、RAM7への書き込みを開始するタイミングを調整する。すなわち、トリガの発生から、RAM7への書き込みを開始するまでの時間を制御する。そして、RAM制御部6は、RAM7へのデータ書き込み及びデータ読み出しのための各種の制御信号を出力する。また、RAM制御部6は、RAM7から読み出したデータRDATAを外部制御装置2へ出力する。
The
RAM7は、RAM7へのトレースデータの書き込みタイミングにおける被観測信号の状態を記憶する。すなわち、RAM7は、デバッグ対象回路3からデータとして入力される被制御信号を、RAM制御部6からの制御信号によって読み込み、記憶する。
The
なお、被観測信号の「状態」とは、被観測信号がデジタル信号である場合は、デジタル値を意味する。この場合のデジタル値は、1ビットのみでなく、多ビットでもよい。あるいは、「状態」はアナログ値であってもよい。この場合は、トレース制御装置1にアナログ−デジタルコンバータを備え、アナログ値をデジタル値に変換した後、トレースすればよい。このように、本発明では、被観測信号がデジタル信号であるかアナログ信号であるかは本質的ではない。
The “state” of the observed signal means a digital value when the observed signal is a digital signal. The digital value in this case may be not only 1 bit but also multiple bits. Alternatively, the “state” may be an analog value. In this case, the
RAM制御部6の内部構成の例を、図2に示す。図2のRAM制御部6は、タイマーカウンタ6−1と比較器6−2とアドレス生成部6−3を備える。
An example of the internal configuration of the
タイマーカウンタ6−1は、トリガ発生部5からのトリガの入力タイミングを基準に、所定のクロックのカウント動作を開始するカウンタで、カウント結果である「カウンタ値」を比較器6−2に出力する。なお、タイマーカウンタ6−1は、実際にカウント動作を行うことができる「起動状態」と、カウント動作を停止した「停止状態」の2つの状態をとる。
The timer counter 6-1 is a counter that starts a predetermined clock counting operation based on the trigger input timing from the
比較器6−2は、パラメータ設定部4からのタイミング情報とタイマーカウンタ6−1からのカウンタ値を比較する。そして、比較器6−2は、タイミング情報とカウンタ値が一致したときに、アドレス生成部6−3に開始パルスを生成する。
The comparator 6-2 compares the timing information from the
アドレス生成部6−3は、RAM7へのデータの書き込み及びRAM7からのデータの読み出しを制御する制御信号を生成する。制御信号には、RAM7のアドレスを指定するアドレス信号、及び書き込み又は読み出しを指示するイネーブル信号等が含まれる。なお、制御信号は、RAM7として使用する実際のメモリ素子のアクセス方式に従って適宜生成すればよい。制御信号の詳細は、本発明の本質部分ではないので、これ以上の説明は省略する。
The address generation unit 6-3 generates a control signal for controlling data writing to the
アドレス生成部6−3は、比較器6−2から開始パルスを入力すると、RAM7に被観測信号の状態を記憶させるために、RAM7へのデータの書き込みのための制御信号を出力する。すなわち、RAM7へのデータの書き込みのためのライトイネーブル信号及びアドレスを出力する。アドレスは、RAM7へデータを書き込むごとに更新される。アドレスの更新のために、アドレス生成部6−3に、アドレスを出力するアドレスカウンタ(図示なし)を備えてもよい。
When the address generator 6-3 receives the start pulse from the comparator 6-2, the address generator 6-3 outputs a control signal for writing data to the
なお、RAM7へのデータの書き込みのサイクルは、任意である。例えば、サイクルは、トレース制御装置1を用いてデバッグを行うユーザによって設定されてもよいし、デバック対象回路3の動作クロックのサイクルと同じであってもよい。
Note that the cycle of writing data to the
また、アドレス生成部6−3は、外部制御装置2から、RAM7のデータの読み出し要求を受けると、RAM7からのデータの読み出しを制御する制御信号を出力する。そして、RAM7から読み出されたデータRDATAを、外部制御装置2へ出力する。
Further, upon receiving a data read request from the
次に、本実施形態の全体の動作について図面を参照して詳細に説明する。図3は、本実施形態におけるトレース制御装置1の動作を示すフローチャートである。
Next, the overall operation of this embodiment will be described in detail with reference to the drawings. FIG. 3 is a flowchart showing the operation of the
初めに、外部制御装置2から、トリガ条件情報及びタイミング情報が、パラメータ設定部4のトリガ条件情報格納部4−1及びタイミング情報格納部4−2にそれぞれ格納される(ステップS1)。外部制御装置2の操作は、トレース制御装置1を用いてデバッグを行うデバッグ作業者によって行われる。
First, trigger condition information and timing information are respectively stored in the trigger condition information storage unit 4-1 and the timing information storage unit 4-2 of the
次に、トレース制御装置1が起動し(ステップS2)、デバッグ対象回路3が起動する(ステップS3)。トレース制御装置1及びデバッグ対象回路3の起動及び停止等の操作も、デバッグ作業者によって行われる。
Next, the
次に、トリガ発生部5は、トリガ条件の充足の有無の検出、すなわち、デバッグ対象回路3から入力される被観測信号の状態とトリガ条件として指定された被観測信号の状態との比較を行い(ステップS4)、トリガを発生させるか否かを判断する(ステップS5)。
Next, the
被観測信号がトリガ条件を満たさない場合は、被観測信号とトリガ条件との比較(ステップS4)に戻る。 If the observed signal does not satisfy the trigger condition, the process returns to the comparison between the observed signal and the trigger condition (step S4).
被観測信号がトリガ条件を満たした場合は、RAM制御部6のタイマーカウンタ6−1が起動状態となる。そして、RAM制御部6の比較器6−2が、カウンタ値とトリガ条件格納部4−1から入力されるタイミング情報を比較する(ステップS6)。
When the observed signal satisfies the trigger condition, the timer counter 6-1 of the
比較の結果、カウンタ値とタイミング情報が一致しない場合は、RAM制御部6にあるタイマーカウンタ6−1がインクリメントされ(ステップS7)、比較処理(ステップS6)へ戻る。
If the counter value does not match the timing information as a result of the comparison, the timer counter 6-1 in the
比較の結果、カウンタ値とタイミング情報が一致すると、RAM制御部6は、アドレス生成部6−3のライトイネーブル信号を有効状態に設定し、RAM7への被観測信号の書き込み、すなわちトレースを開始する(ステップS8)。
If the counter value matches the timing information as a result of the comparison, the
トレースが開始されると、まず、RAM7に空き領域があるかを判断する(ステップS9)。この判断は、アドレスの値が所定範囲内にあるか否かの確認によって行えばよい。あるいは、RAM7への書き込みの回数をカウントするアップダウンカウンタ等を備え、そのカウント値が所定値以下であるか否かの確認によって行ってもよい。
When tracing is started, it is first determined whether or not there is an empty area in the RAM 7 (step S9). This determination may be made by confirming whether the address value is within a predetermined range. Alternatively, an up / down counter or the like for counting the number of times of writing to the
RAM7に空き領域がある場合は、RAM制御部6のアドレス生成部6−3のアドレスカウンタの値をインクリメントし(ステップ10)、被観測信号の書き込みを行う(ステップS8)。
If there is an empty area in the
RAM7に空き領域がない場合は、RAM制御部6のアドレス生成部6−3のライトイネーブル信号を無効状態に設定し、被観測信号の書き込みを終了する(ステップS11)。
If there is no free space in the
トレースが終了した後、デバッグ対象回路3は停止される(ステップS12)。そして、RAM7へ格納した被観測信号の状態を、外部制御装置2から読み出した後、トレース制御装置1が初期化される(ステップS13)。
After the trace is completed, the
トレース制御装置1の初期化後、デバッグ対象の全期間の信号のトレースが完了しているかを判断する(ステップS14)。
After the initialization of the
全期間のトレースが完了していない場合は、タイミング情報格納部4−2に外部制御装置2から、RAM7の容量分のアドレスの数と同じサイクル数を足した値を、タイミング情報として格納し(ステップS15)、デバッグ対象回路3を再起動する(ステップS2)。
If tracing for the entire period is not completed, a value obtained by adding the same number of cycles as the number of addresses corresponding to the capacity of the
デバック対象回路3の再起動後は、ステップS5でトリガが発生された後、設定されたサイクル数分だけ遅延してトレースが再開される。トレースを再開するまでの期間のトレースデータは、前回、RAM7にトレースされている。従って、ステップS15で、前回までにトレースが完了している期間に相当するサイクル数を指定することによって、デバック対象回路3の再起動後は、トレースが完了している期間に続く期間のトレースが開始される。以降、このトレース開始の遅延量を「トレース開始遅延量」という。本実施形態で設定されるトレース開始遅延量は、サイクル数で表現されているが、時間で表現されてもよい。トレース開始遅延量が時間で表現される場合は、タイマーカウンタ6−1のカウント値も時間を意味する必要がある。
After the
全期間のトレースが完了した場合は、処理を終了する。 When tracing for the entire period is completed, the process is terminated.
図4は、第1の実施形態におけるトレース制御装置1の動作を示すタイミングチャートである。
FIG. 4 is a timing chart showing the operation of the
トリガ発生部5でトリガ条件の充足が検出されるとトリガパルスが生成される(T1)。
When the
トリガパルスが生成されると、RAM制御部6のタイマーカウンタ6−1は起動状態となってクロックのカウントを開始し、1クロックごとに1ずつインクリメントされる。ここでのクロックは、RAM7への書き込みサイクルを規定するクロックである。そして、タイミング情報格納部4−2のタイミング情報x(xは1以上の整数。)とタイマーカウンタ6−1のカウント値が一致すると、開始パルスが生成される(T2)。
When the trigger pulse is generated, the timer counter 6-1 of the
開始パルスが生成されると、RAM7へのトレースデータの書き込みを指示するライトイネーブルが有効となる。ライトイネーブルが有効のとき、アドレス生成部6−3のアドレスカウンタは一旦リセットされ、その後、クロックをカウントし、1クロックごとに1ずつインクリメントされる(T3)。アドレスカウンタの出力値は、アドレスとしてRAM7へ出力される。そして、ライトイネーブルが有効である期間中、被観測信号の状態がRAM7に書き込まれる。
When the start pulse is generated, the write enable for instructing the writing of the trace data to the
アドレス生成部6−3のアドレスカウンタがRAM7の容量n(nは1以上の整数)に達すると、ライトイネーブルが無効となる(T4)。
When the address counter of the address generator 6-3 reaches the capacity n (n is an integer of 1 or more) of the
以上のように、本実施形態のトレース制御装置1は、トリガが発生した後、任意に設定されたトレース開始の遅延時間が経過した後、被観測信号のトレースを開始することができる。
As described above, the
そして、遅延時間を変えてトレースを繰り返すことによって、全デバッグ期間の被観測信号をトレースすることができる。なぜなら、デバッグ対象回路3は、再起動後、前回のトリガ発生時点まで、前回の動作とまったく同じ動作をするからである。そのため、前回のトリガ発生時点からさらに所定の時間経過した時点からトレースを行うという操作を繰り返えすことによって、全デバッグ期間をいくつかの区間に分割してトレースを行うことができる。従って、全デバッグ期間の被観測信号を一度にトレースすることができるだけの容量のメモリを備えていなくても、全期間のトレースを行うことができる。
Then, by repeating the trace while changing the delay time, it is possible to trace the observed signal in the entire debug period. This is because the
以上の説明から明らかなように、RAM7、すなわち記憶装置は、トレース制御装置に備えられている必要はない。また、パラメータ設定部4にパラメータを設定する外部制御装置と、RAM7のデータを読み出す外部制御装置は同じである必要はない。また、トリガ発生部5は、必ずしも被観測信号を基にトリガを発生させる必要はない。すなわち、被観測信号とは別の信号を基にトリガを発生させてもよい。
As is clear from the above description, the
図5に、本発明に必須の構成のみを備えるトレース制御装置11のブロック図を示す。トレース制御装置11は、図1のトレース制御装置1からRAM7が除かれており、トレースデータは外部の記憶装置71に書き込まれる。また、記憶制御部60は、記憶装置71のデータの読み出し機能は備えない。記憶装置71のデータの読み出しは、外部制御装置2−2によって行われる。また、パラメータ設定部4へのパラメータ設定は、外部制御装置2−1によって行われる。そして、トリガ発生部5は、外部のトリガ用信号発生回路3−1が出力するトリガ用信号を基にトリガを発生する。
FIG. 5 shows a block diagram of the
トレース制御装置11の基本的な機能は、図1のトレース制御装置1と同じなので、詳細な説明は省略する。
The basic functions of the
なお、本実施形態のトレース制御装置1では、以下の3つのことが前提とされている。すなわち、デバッグ対象回路3は所定のクロックに同期して動作すること、そのクロックのサイクルごとに被観測信号の状態がサンプリングされること、そして、RAM7の1つのアドレスに1つのトレースデータが記憶されることである。しかし、本実施形態は、これらの前提がない場合にも適用可能である。
In the
まず、デバッグ対象回路3はクロックに同期して動作しなくてもよい。必要な時間間隔で被観測信号をサンプリングすればトレースが可能なので、デバッグ対象回路3が何らかのクロックに同期していることは必須条件ではない。デバッグ対象回路3がクロックに同期して動作していない場合は、トレースデータの書き込み可能なRAM7の容量とサンプリング間隔から決まるトレース開始遅延量が、タイミング情報としてタイミング情報格納部4−2に設定されればよい。
First, the
また、被観測信号をサンプリングする時間間隔は特に限定されない。従って、デバッグ対象回路3の同期しているクロックとは異なる間隔で被観測信号をサンプリングして、トレースしてもよい。この場合も、トレースデータの書き込み可能なRAM7の容量とサンプリング間隔から決まるトレース開始遅延量が、タイミング情報としてタイミング情報格納部4−2に設定されればよい。
Further, the time interval for sampling the signal under observation is not particularly limited. Therefore, the observed signal may be sampled and traced at an interval different from the clock synchronized with the
さらに、RAM7の1つのアドレスとサンプリング時刻との対応も、1対1には限定されない。被観測信号の本数が多い場合には、1サンプルごとのトレースデータを複数のワードに分割し、それよりも速いサイクルでRAM7の複数のアドレスに分配して記憶してもよい。この場合も、トレースデータの書き込み可能なRAM7の容量とサンプリング間隔から決まるトレース開始遅延量が、タイミング情報としてタイミング情報格納部4−2に設定されればよい。
(第2の実施形態)
次に、第2の実施形態について図面を参照して詳細に説明する。
Further, the correspondence between one address of the
(Second Embodiment)
Next, a second embodiment will be described in detail with reference to the drawings.
第2の実施形態は、RAM制御部6の内部構成が第1の実施形態と異なる。その他の構成要素については同じであるため説明は省略する。
The second embodiment is different from the first embodiment in the internal configuration of the
第2の実施形態のRAM制御部6の内部構成の例を図6に示す。図6のRAM制御部6は、共通カウンタ6−4と比較器6−2とRAM IF(Interface)部6−5を備える。
An example of the internal configuration of the
共通カウンタ6−4は、トリガ発生部5からのトリガと比較器6−2からの開始パルスの入力タイミングを基準に、カウント動作を開始するカウンタもある。共通カウンタ6−4は、比較器6−2とRAM IF部6−5にカウント値を出力する。
The common counter 6-4 also includes a counter that starts a count operation based on the input timing of the trigger from the
比較器6−2は、タイミング情報とカウンタ値を比較し、これらが一致したとき、共通カウンタ6−4とRAM IF部6−5に開始パルスを出力する。 The comparator 6-2 compares the timing information with the counter value, and outputs a start pulse to the common counter 6-4 and the RAM IF unit 6-5 when they match.
RAM IF部6−5は、RAM7への制御信号を生成する。RAM IF部6−5は、外部制御装置2からのRAMリード制御信号、比較器6−2からの開始パルス、及び共通カウンタ6−4からのカウント値に基づいて生成されるライト制御信号の調停を行う。なお、RAM7からのデータの読み出しの制御は、必ずしも、RAM制御部6に備えられている必要はなく、他の装置から直接RAM7を読み出してもよい。
The RAM IF unit 6-5 generates a control signal to the
次に、本実施形態の全体の動作について図面を参照して詳細に説明する。本実施形態におけるトレース制御装置1のフローチャートは、第1の実施形態と同様であるため説明を省略する。
Next, the overall operation of this embodiment will be described in detail with reference to the drawings. Since the flowchart of the
図7は、本実施形態におけるトレース制御装置1の動作を示すタイミングチャートである。
FIG. 7 is a timing chart showing the operation of the
トリガ発生部5でトリガ条件の充足が検出されるとトリガパルスが生成される(T1)。
When the
トリガパルスが生成されると、RAM制御部6の共通カウンタ6−4がクロックのカウントを開始し、1クロックごとに1ずつインクリメントされる。タイミング情報格納部4−2のタイミング情報x(xは1以上の整数。)とタイマーカウンタ6−1のカウント値が一致すると、開始パルスが生成される(T2)。
When the trigger pulse is generated, the common counter 6-4 of the
開始パルスが生成されると、ライトイネーブルが有効となり、共通カウンタ6−4が初期化され0となる。ライトイネーブルが有効のときに、共通カウンタ6−4がインクリメントされる(T3)。アドレスカウンタの出力値は、アドレスとしてRAM7へ出力される。そして、ライトイネーブルが有効である期間中、被観測信号の状態がRAM7に書き込まれる。
When the start pulse is generated, the write enable becomes valid and the common counter 6-4 is initialized to zero. When the write enable is valid, the common counter 6-4 is incremented (T3). The output value of the address counter is output to the
共通カウンタ6−4のカウント値がRAM7の容量nに達するとライトイネーブルが無効となる(T4)。
When the count value of the common counter 6-4 reaches the capacity n of the
第2の実施形態では、第1の実施形態におけるRAM制御部6のタイマーカウンタ6−1とアドレス生成部6−3のアドレスカウンタを共用する共用カウンタ6−4が使用される。そのため、アドレスカウンタが省略できるので、第1の実施形態と同様の効果を有しつつ、回路規模を少なくする効果がある。
(第3の実施形態)
次に、第3の実施形態について図面を参照して詳細に説明する。
In the second embodiment, a shared counter 6-4 that shares the timer counter 6-1 of the
(Third embodiment)
Next, a third embodiment will be described in detail with reference to the drawings.
図8は、第3の実施形態のトレース制御装置の構成を示すブロック図である。第3の実施形態は、パラメータ設定部4に、タイミング情報格納部4−2のタイミング情報を更新するオフセット制御部4−3備える。そして、RAM制御部6のタイマーカウンタ6−1のカウント値が、パラメータ設定部4に入力される。第3の実施形態の構成に関しては、以上の2点が、第1の実施形態と異なる。その他の構成要素については同じであるため説明は省略する。
FIG. 8 is a block diagram illustrating the configuration of the trace control apparatus according to the third embodiment. In the third embodiment, the
次に、本実施形態の全体の動作について図面を参照して詳細に説明する。本実施形態におけるトレース制御装置1のフローチャートは、第1の実施形態と同様であるため説明を省略する。
Next, the overall operation of this embodiment will be described in detail with reference to the drawings. Since the flowchart of the
ただし、本実施形態の動作は、以下の点で第1の実施形態の動作と異なる。すなわち、本実施形態では、ステップS15のトレース開始タイミングの変更(再設定)は自動的に行われる。具体的には、S14で全期間のトレースの完了が検出される。全期間のトレースが完了したことは、例えば、RAM7への書き込み回数をアドレスカウンタ等を用いてカウントし、そのカウント値が所定の値になったことを持って、トレース完了とすればよい。
However, the operation of this embodiment is different from the operation of the first embodiment in the following points. That is, in this embodiment, the change (reset) of the trace start timing in step S15 is automatically performed. Specifically, the completion of the trace for all periods is detected in S14. The completion of the tracing for the entire period may be determined as the completion of the tracing, for example, by counting the number of times of writing to the
そして、トレースが完了すると、RAM制御部6は、トレース完了信号をオフセット制御部4−3へ出力する。
When the tracing is completed, the
ステップS15で、オフセット制御部4−3は、RAM7の容量分のアドレスの数と同じサイクル数をタイミング情報格納部4−2の値に加算した値を、タイミング情報として格納する。
In step S15, the offset control unit 4-3 stores, as timing information, a value obtained by adding the same number of cycles as the number of addresses corresponding to the capacity of the
以上の第3の実施形態の動作に対して、第1の実施形態では、ステップS15でのタイミング変更は、デバッグ作業者によって行われる。 In contrast to the operation of the third embodiment described above, in the first embodiment, the timing change in step S15 is performed by a debug operator.
図9は、本発明を実施するための第3の実施形態におけるトレース制御装置1の動作を示すタイミングチャートである。
FIG. 9 is a timing chart showing the operation of the
トリガ発生部5でトリガ条件の充足が検出されるとトリガパルスが生成される(T1)。
When the
トリガパルスが生成されると、RAM制御部6のタイマーカウンタ6−1がクロックのカウントを開始し、1クロックごとに1ずつインクリメントされる。タイミング情報格納部4−2のタイミング情報xとタイマーカウンタ6−1のカウント値が一致すると、開始パルスが生成される(T2)。
When the trigger pulse is generated, the timer counter 6-1 of the
開始パルスが生成されると、ライトイネーブルが有効となる。ライトイネーブルが有効のときに、アドレス生成部6−3のアドレスカウンタは一旦リセットされ、その後、クロックをカウントし、1クロックごとに1ずつインクリメントされる(T3)。アドレスカウンタの出力値は、アドレスとしてRAM7へ出力される。そして、ライトイネーブルが有効である期間中、被観測信号の状態がRAM7に書き込まれる。
When the start pulse is generated, the write enable becomes valid. When the write enable is valid, the address counter of the address generator 6-3 is once reset, and then the clock is counted and incremented by 1 every clock (T3). The output value of the address counter is output to the
アドレス生成部6−3のアドレスカウンタがRAM7の容量nに達すると、トレース完了信号が出力され、ライトイネーブルが無効となる(T4)。
When the address counter of the address generator 6-3 reaches the capacity n of the
RAM7への書き込み完了後、オフセット制御部4−3が、次にトレースを取得するためのトレース開始タイミング、すなわち、トレース開始遅延量をタイミング情報格納部4−2に格納する(T5)。格納する値は、オフセット制御部4−3でタイミング情報格納部4−2にRAM7の容量を加算した値を用いても、タイマーカウンタ6−1の値を格納しても構わない。
After completing the writing to the
以上のように、第3の実施形態では、タイミング情報の変更を自動で行うため、CPU等の外部制御装置2からの設定を省略することが可能となる。
(第4の実施形態)
次に、発明を実施するための第4の形態について図面を参照して詳細に説明する。
As described above, since the timing information is automatically changed in the third embodiment, the setting from the
(Fourth embodiment)
Next, a fourth embodiment for carrying out the invention will be described in detail with reference to the drawings.
図10は、第4の実施形態を示すブロック図である。本発明を実施するための第4の実施形態におけるトレース制御装置1では、図1に示された第1の実施形態に対して、信号選択部8、及び信号選択部8を制御するためのパラメータ設定部4の信号選択情報格納部4−4が追加されている。
FIG. 10 is a block diagram showing the fourth embodiment. In the
信号選択部8は、パラメータ設定部4の信号選択情報格納部4−4の指定に従って、観測対象信号の中から、トリガ発生条件の充足の検出に使用する信号、及びRAM7へその状態を格納する被観測信号を選択する。「観測対象信号」とは、全デバッグ操作によって、最終的にトレースされるすべての信号を意味する。本実施形態では、観測対象信号の中からの被観測信号の選択及び選択された被観測信号のトレースを、複数回、繰り返すことによって、すべての観測対象信号のトレースを行う。
The
信号選択部8は、トリガ発生部5とRAM7へ、選択した被観測信号を出力する。その他の構成要素については第1の実施形態と同じであるため説明は省略する。
The
次に、本実施形態の全体の動作について図面を参照して詳細に説明する。図11は、本実施形態におけるトレース制御装置1の動作を示すフローチャートである。第1の実施形態と同様の動作については図3と同一の符号を付し、詳細な説明を省略する。
Next, the overall operation of this embodiment will be described in detail with reference to the drawings. FIG. 11 is a flowchart showing the operation of the
第4の実施形態は、以下の点で第1の実施形態と異なる。デバッグ対象として指定された全期間のトレースデータの取得が完了と判別された場合(ステップS14で「Yes」の場合)に、ステップS16で未取得信号があるかどうかを判別する。そして、未トレースの被観測信号がある場合は、ステップS17で被観測信号を切り替えて再度、トレース制御装置を起動し、処理を繰り返す。なお、ステップS14とステップS16は順番が逆であっても同様の処理が可能である。 The fourth embodiment differs from the first embodiment in the following points. When it is determined that the acquisition of the trace data for the entire period designated as the debug target is completed (in the case of “Yes” in step S14), it is determined in step S16 whether there is an unacquired signal. If there is an untraced signal to be observed, the signal to be observed is switched in step S17, the trace control device is activated again, and the process is repeated. Note that steps S14 and S16 can be processed in the same way even if the order is reversed.
本発明を実施する第4の実施形態におけるトレース制御装置1のタイミングチャートは、第1の実施形態と同様であるため説明を省略する。
The timing chart of the
第4の実施形態では、観測信号が、RAM7のbit幅以上の信号数であった場合であっても、トレースを行う被観測信号を切り替えながら繰り返しトレースを行って、トレースデータを取得することができる。従って、RAM7のbit幅よりも多い本数の被観測信号のトレースデータを取得することが可能である。
In the fourth embodiment, even when the number of observation signals is equal to or greater than the bit width of the
なお、第4の実施形態は、第2、3の実施形態にも適用することが可能である。例えば、信号選択部8は、被観測信号の選択の他、図5におけるトリガ用信号の選択も行ってもよい。その他にも、以上の実施形態は各々他の実施形態と組み合わせることができる。
Note that the fourth embodiment can also be applied to the second and third embodiments. For example, the
以上、これまで述べてきた各実施形態は、本発明の好適な実施形態であり、上記実施形態のみに本発明の範囲を限定するものではなく、本発明の要旨を逸脱しない範囲において種々の変更を施した形態での実施が可能である。 Each of the embodiments described so far is a preferred embodiment of the present invention, and the scope of the present invention is not limited only to the above-described embodiment, and various modifications can be made without departing from the gist of the present invention. It is possible to implement in the form that has been subjected to.
1、11 トレース制御装置
10 LSI
12 デバック用観測端子
2、2−1、2−2、21 外部制御装置
22 ロジックアナライザ
3、31 デバッグ対象回路
3−1 トリガ用信号発生回路
4 パラメータ設定部
4−1 トリガ条件情報格納部
4−2 タイミング情報格納部
4−3 オフセット制御部
4−4 選択信号情報格納部
5 トリガ発生部
6 RAM制御部
6−1 タイマーカウンタ
6−2 比較器
6−3 アドレス生成部
6−4 共通カウンタ
6−5 RAM IF部
60 記憶制御部
7 RAM
71 記憶装置
8、81 信号選択部
1, 11
12
71
Claims (5)
入力されたトリガ用信号が前記トリガを発生させるための条件を満たすことを検出したとき、前記トリガを発生するトリガ発生部と、
前記トリガと前記タイミング情報とに基づいて、所定の記憶装置への前記状態の書き込みを制御する記憶制御部と、
を備え、
前記記憶制御部は、
前記トリガが発生したタイミングから、所定のクロックごとにインクリメントし第2のカウント値を出力する第2のタイマーカウンタと、
前記第2のカウント値と前記タイミング情報を比較する第2の比較器と、
前記第2のカウント値を用いて前記記憶装置へ前記トレースで得られたデータであるトレースデータを書き込むアドレスを示すライトアドレス信号を生成し、前記第2の比較器の比較結果に基づいて前記記憶装置への前記トレースデータの書き込みを指示するライトイネーブル信号を生成する第2のアドレス生成器を含む
ことを特徴とするトレース制御装置。 Trigger information storage unit that stores trigger condition information that defines conditions for generating a trigger, and a delay time from the occurrence of the trigger to the start of a trace that is a storage of the state of the input observed signal a timing information storage section for storing the timing information, a parameter setting section including,
A trigger generation unit for generating the trigger when it is detected that the input trigger signal satisfies the condition for generating the trigger; and
A storage control unit that controls writing of the state to a predetermined storage device based on the trigger and the timing information ;
With
The storage control unit
A second timer counter that increments every predetermined clock and outputs a second count value from the timing when the trigger occurs;
A second comparator for comparing the second count value and the timing information;
Using the second count value, a write address signal indicating an address at which trace data, which is data obtained by the trace, is written to the storage device is generated, and the storage is performed based on a comparison result of the second comparator. A trace control apparatus , comprising: a second address generator for generating a write enable signal instructing writing of the trace data to the apparatus.
を備えることを特徴とする請求項1記載のトレース制御装置。 A signal selection unit that selects the signal to be observed from a signal output from an external debug target circuit, and the trigger signal from a signal output from an external trigger signal generation circuit;
The trace control apparatus according to claim 1, further comprising:
ことを特徴とする請求項1又は2記載のトレース制御装置。 3. The trace control apparatus according to claim 1, wherein the parameter setting unit includes an offset control unit that updates the timing information in accordance with a trace completion signal indicating completion of the trace from the storage control unit.
入力されたトリガ用信号が前記トリガを発生させるための条件を満たすことを検出したとき、前記トリガを発生するトリガ発生部と、
前記トレースで得られたデータであるトレースデータを記憶する記憶部と、
前記トリガと前記タイミング情報とに基づいて、前記記憶部への前記状態の書き込みを制御する記憶制御部と、
を備え、
前記記憶制御部は、
前記トリガが発生したタイミングから、所定のクロックごとにインクリメントし第2のカウント値を出力する第2のタイマーカウンタと、
前記第2のカウント値と前記タイミング情報を比較する第2の比較器と、
前記第2のカウント値を用いて前記記憶部へ前記トレースデータを書き込むアドレスを示すライトアドレス信号を生成し、前記第2の比較器の比較結果に基づいて前記記憶部への前記トレースデータの書き込みを指示するライトイネーブル信号を生成する第2のアドレス生成器を含む
ことを特徴とするトレース制御装置。 Trigger information storage unit that stores trigger condition information that defines conditions for generating a trigger, and a delay time from the occurrence of the trigger to the start of a trace that is a storage of the state of the input observed signal a timing information storage section for storing the timing information, a parameter setting section including,
A trigger generation unit for generating the trigger when it is detected that the input trigger signal satisfies the condition for generating the trigger; and
A storage unit for storing trace data which is data obtained by the trace;
A storage control unit for controlling writing of the state to the storage unit based on the trigger and the timing information ;
Equipped with a,
The storage control unit
A second timer counter that increments every predetermined clock and outputs a second count value from the timing when the trigger occurs;
A second comparator for comparing the second count value and the timing information;
A write address signal indicating an address at which the trace data is written to the storage unit is generated using the second count value, and the trace data is written to the storage unit based on a comparison result of the second comparator A trace control apparatus , comprising: a second address generator for generating a write enable signal for indicating
前記トリガの発生後、入力された被観測信号の状態の記憶であるトレースを開始するまでの遅延時間を規定するタイミング情報に基づいて、所定の記憶装置へ前記状態を書き込む、
手順を含むトレース制御方法であって、
前記記憶装置への前記状態の書き込みは、
前記トリガが発生したタイミングから、所定のクロックごとにインクリメントし第2のカウント値を出力し、
前記第2のカウント値と前記タイミング情報を比較し、
前記第2のカウント値を用いて前記記憶装置へ前記トレースで得られたデータであるトレースデータを書き込むアドレスを示すライトアドレス信号を生成し、前記比較の結果に基づいて前記記憶装置への前記トレースデータの書き込みを指示するライトイネーブル信号を生成する、
手順を含む、ことを特徴とするトレース制御方法。 When it is detected that the input trigger signal satisfies a trigger generation condition that defines a condition for generating a trigger, the trigger is generated,
After the occurrence of the trigger, the state is written to a predetermined storage device based on timing information that defines a delay time until the start of tracing, which is a storage of the state of the input signal to be observed .
A trace control method including a procedure,
Writing the state to the storage device
From the timing at which the trigger occurs, increment every predetermined clock and output a second count value,
Comparing the second count value with the timing information;
Using the second count value, a write address signal indicating an address at which trace data, which is data obtained by the trace, is written to the storage device is generated, and the trace to the storage device is generated based on the comparison result A write enable signal for instructing data writing is generated;
A trace control method comprising a procedure .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012025227A JP5982845B2 (en) | 2012-02-08 | 2012-02-08 | Trace control apparatus and trace control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012025227A JP5982845B2 (en) | 2012-02-08 | 2012-02-08 | Trace control apparatus and trace control method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013161429A JP2013161429A (en) | 2013-08-19 |
JP5982845B2 true JP5982845B2 (en) | 2016-08-31 |
Family
ID=49173581
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012025227A Active JP5982845B2 (en) | 2012-02-08 | 2012-02-08 | Trace control apparatus and trace control method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5982845B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10372576B2 (en) | 2015-05-11 | 2019-08-06 | Mitsubishi Electric Corporation | Simulation reproduction apparatus, simulation reproduction method, and computer readable medium |
JP6305672B2 (en) | 2016-04-12 | 2018-04-04 | 三菱電機株式会社 | Simulation reproduction device and simulation reproduction program |
JP6863727B2 (en) * | 2016-12-13 | 2021-04-21 | Necプラットフォームズ株式会社 | Debug circuit and debug test method |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0424835A (en) * | 1990-05-19 | 1992-01-28 | Iwaki Electron Corp Ltd | Timing delay tracing device |
JPH06168164A (en) * | 1992-08-03 | 1994-06-14 | Nec Eng Ltd | Trace data memory circuit |
-
2012
- 2012-02-08 JP JP2012025227A patent/JP5982845B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2013161429A (en) | 2013-08-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7870438B2 (en) | Method, system and computer program product for sampling computer system performance data | |
JP4171016B2 (en) | Method for circuit testing using LBIST | |
US20080016415A1 (en) | Evaluation system and method | |
JP5982845B2 (en) | Trace control apparatus and trace control method | |
JP2008287319A (en) | Semiconductor device, electronic device and access log acquisition method | |
JPWO2008099657A1 (en) | Semiconductor integrated circuit, debug / trace circuit, and semiconductor integrated circuit operation observation method | |
CN105022706B (en) | Controller circuitry, data-interface block and the method for being used for transmission data | |
JP5986474B2 (en) | Memory failure diagnosis device and memory failure diagnosis method | |
JP2014222384A (en) | Function execution time measuring device, function execution time measuring method, and function execution time measuring program | |
CN108628637B (en) | Apparatus and method for processing data | |
JP2007058450A (en) | Semiconductor integrated circuit | |
JP6463445B1 (en) | In-vehicle control device | |
JP6070220B2 (en) | Devices for electronic equipment | |
US20120240128A1 (en) | Memory Access Performance Diagnosis | |
JP5907558B2 (en) | MULTI-INTERVAL TIMER AND ITS CONTROL DEVICE, CONTROL METHOD, AND CONTROL PROGRAM | |
JP2009230425A (en) | Information processor | |
US10191481B2 (en) | Numerical controller and numerical control system in which the controller is connected by network | |
JP2014142820A (en) | Debug control circuit, debug control method and program | |
CN108541307B (en) | Programmable controller and synchronization control method | |
JP6142182B2 (en) | Integrated circuit device | |
JP2016177564A (en) | Debug control circuit and debug control method | |
JP5673197B2 (en) | Test program and test method | |
JP5008688B2 (en) | Time Element Relay | |
JP6863727B2 (en) | Debug circuit and debug test method | |
JP2006039843A (en) | Ram test circuit, information processing apparatus, and ram testing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150119 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20151228 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160126 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160323 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20160705 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20160718 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5982845 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |