JP5982845B2 - Trace control apparatus and trace control method - Google Patents

Trace control apparatus and trace control method Download PDF

Info

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
Application number
JP2012025227A
Other languages
Japanese (ja)
Other versions
JP2013161429A (en
Inventor
輝久 小嶋
輝久 小嶋
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2012025227A priority Critical patent/JP5982845B2/en
Publication of JP2013161429A publication Critical patent/JP2013161429A/en
Application granted granted Critical
Publication of JP5982845B2 publication Critical patent/JP5982845B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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 external control device 21 controls the entire system. The LSI 10 includes a signal selection unit 81 that selects an observed signal to be observed for debugging from the observation target signal from the internal debug target circuit 31. The selected signal to be observed is output from the debugging observation terminal 12 of the LSI 10 to the outside. The output signal to be observed is read into the logic analyzer 22 connected to the outside and debugged.

LSIをデバックしたりその障害を解析したりするためには、ロジックアナライザ22でLSI10の内部の状態値を連続して把握することが要求される。さらに、この状態値を解析しながら不具合の原因を解決していくことも必要とされる。   In order to debug the LSI or analyze the failure, it is required that the logic analyzer 22 continuously grasps the internal state value of the LSI 10. Furthermore, it is necessary to solve the cause of the problem while analyzing the state value.

LSI10の内部の被観測信号を観測するために、LSI10内部に被観測信号の状態を記憶する「トレースメモリ」が備えられることがある。以降、被観測信号の状態を記憶することを「トレースする」といい、トレースされ記憶されたデータを「トレースデータ」という。   In order to observe the signal under observation inside the LSI 10, a “trace memory” that stores the state of the signal under observation may be provided inside the LSI 10. Hereinafter, storing the state of the observed signal is referred to as “trace”, and the traced and stored data is referred to as “trace data”.

また、トレースメモリの内容を外部に出力したり、被観測信号を直接外部に出力したりするためには、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 LSI 10. Such addition of the dedicated terminals increases the manufacturing cost because the chip area of the LSI 10 is increased or the package size of the LSI 10 is increased. Patent Documents 1-4 disclose various techniques for reducing the capacity of a built-in trace memory and output terminals for signals to be observed.

特開平08−63374号公報 (第4−5頁、図1)JP 08-63374 A (page 4-5, FIG. 1) 特開2008−71227号公報 (第4−7頁、図1)JP 2008-71227 A (page 4-7, FIG. 1) 特開2009−48474号公報 (第5−7頁、図1)JP 2009-48474 A (Page 5-7, FIG. 1) 特開2001−142733号公報 (第3頁、図1−2) 特許文献1には、トレースメモリを内蔵するトレース機能内蔵型LSIが開示されている。特許文献1のトレース機能内蔵型LSIは、デバッグ対象の内部回路からの信号をトレースメモリへトレースし、内部回路からのエラー検出信号によってトレースを停止する。そして、外部の制御装置から、トレースデータが読み出される。Japanese Patent Laid-Open No. 2001-142733 (Page 3, FIG. 1-2) Patent Document 1 discloses a LSI with a built-in trace function and a built-in trace memory. The LSI with a built-in trace function disclosed in Patent Document 1 traces a signal from an internal circuit to be debugged to a trace memory, and stops tracing by an error detection signal from the internal circuit. Then, the trace data is read from the external control device.

特許文献2、3には、容量の少ないトレースメモリを用いて、より長時間のプログラムカウンタトレースを実現できるようにする技術が開示されている。   Patent Documents 2 and 3 disclose techniques for realizing a longer program counter trace by using a trace memory having a small capacity.

特許文献2の技術では、LSIにトレースメモリを内蔵し、内部のCPU(Central Processing Unit)からの、プログラムの実行開始及び実行停止を知らせるモニタ信号を用いて、トレースの開始及び停止を制御する。   In the technique of Patent Document 2, a trace memory is built in an LSI, and the start and stop of trace are controlled using a monitor signal from an internal CPU (Central Processing Unit) that notifies the start and stop of program execution.

特許文献3の技術では、トレース機能を備えたSoC(System On Chip)内のプロセッサの動作履歴をトレースするときにプロセッサを停止させる。そして、プロセッサの停止期間中にトレース情報が取り出される。この動作を繰り返すことにより、小さな容量のトレースメモリを用いて、長時間のトレースを実現する。   In the technique of Patent Document 3, the processor is stopped when tracing the operation history of the processor in a SoC (System On Chip) having a trace function. Then, the trace information is extracted during the processor stop period. By repeating this operation, a long-time trace is realized using a trace memory having a small capacity.

特許文献4には、データキャプチャ部、すなわちトレースメモリの内容を、時分割に外部に出力する内部信号観測装置が開示されている。   Patent Document 4 discloses an internal signal observation device that outputs the contents of a data capture unit, that is, a trace memory to the outside in a time division manner.

特許文献1の技術では、トレースメモリの内蔵によって、LSIのチップ面積が増加するという課題がある。チップ面積の増大を抑えるためにトレースメモリの容量を削減すると、被観測信号の本数やトレース期間が短くなるなどの問題が発生する。   In the technique of Patent Document 1, there is a problem that the chip area of the LSI increases due to the built-in trace memory. If the capacity of the trace memory is reduced in order to suppress an increase in the chip area, problems such as the number of signals to be observed and the trace period are shortened.

特許文献2の技術では、プログラムの実行中のみのトレースが可能である。しかし、必要な被観測信号をトレースするためには、プログラムの実行期間に応じた容量のトレースメモリを内蔵する必要がある。すなわち、長いプログラムのトレースに対応するためには、大容量のメモリを内蔵する必要がある。   With the technique of Patent Document 2, tracing is possible only during execution of a program. However, in order to trace a necessary signal to be observed, it is necessary to incorporate a trace memory having a capacity corresponding to the execution period of the program. That is, a large-capacity memory needs to be built in to cope with a long program trace.

特許文献3の技術では、トレースメモリの内容を読み出すときには、プロセッサを停止させる必要がある。このとき、必然的に、プログラムの動作も停止する。ところが、一般的に、プログラムは任意の位置で停止させることができるとは限らない。例えば、外部に何らかの制御信号や駆動信号を出力しているようなときは、それらの信号を出力した状態で停止させることができない場合がある。なぜなら、それらの信号を入力する機器や素子が、ある動作状態やある駆動状態のまま維持されてしまうからである。このように、特許文献3の技術では、トレースを行う期間やその期間の長さを任意に設定することができない。従って、停止可能な時点までのトレースが可能なように大容量のトレースメモリを内蔵する必要がある。   In the technique of Patent Document 3, it is necessary to stop the processor when reading the contents of the trace memory. At this time, the operation of the program is inevitably stopped. However, in general, a program cannot always be stopped at an arbitrary position. For example, when some control signal or drive signal is output to the outside, it may not be possible to stop in a state where those signals are output. This is because devices and elements that input those signals are maintained in a certain operating state or a certain driving state. As described above, in the technique of Patent Document 3, it is not possible to arbitrarily set the trace period and the length of the period. Therefore, it is necessary to incorporate a large-capacity trace memory so that tracing can be performed up to the point where stopping is possible.

特許文献4の技術では、トレースメモリの内容を時分割で外部に出力するため、テスト端子の本数の削減には効果がある。しかし、トレースする必要がある情報をすべてトレースメモリに記憶させる必要があるため、トレースメモリの容量の削減には効果はない。   The technology of Patent Document 4 is effective in reducing the number of test terminals because the contents of the trace memory are output to the outside in a time division manner. However, since all the information that needs to be traced must be stored in the trace memory, there is no effect in reducing the capacity of the trace memory.

以上のように、特許文献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の実施形態のトレース制御装置の構成を示すブロック図である。It is a block diagram which shows the structure of the trace control apparatus of 1st Embodiment which concerns on this invention. 本発明に係る第1の実施形態のトレース制御装置のRAM制御部の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the RAM control part of the trace control apparatus of 1st Embodiment which concerns on this invention. 本発明に係る第1の実施形態のトレース制御装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the trace control apparatus of 1st Embodiment which concerns on this invention. 本発明に係る第1の実施形態のトレース制御装置の動作を示すタイミングチャートである。It is a timing chart which shows operation | movement of the trace control apparatus of 1st Embodiment which concerns on this invention. 本発明に係るトレース制御装置の必須構成を示すブロック図である。It is a block diagram which shows the essential structure of the trace control apparatus which concerns on this invention. 本発明に係る第2の実施形態のトレース制御装置のRAM制御部の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the RAM control part of the trace control apparatus of 2nd Embodiment which concerns on this invention. 本発明に係る第2の実施形態のトレース制御装置の動作を示すタイミングチャートである。It is a timing chart which shows operation | movement of the trace control apparatus of 2nd Embodiment which concerns on this invention. 本発明に係る第3の実施形態のトレース制御装置の構成を示すブロック図である。It is a block diagram which shows the structure of the trace control apparatus of 3rd Embodiment which concerns on this invention. 本発明に係る第3の実施形態のトレース制御装置の動作を示すタイミングチャートである。It is a timing chart which shows operation | movement of the trace control apparatus of 3rd Embodiment which concerns on this invention. 本発明に係る第4の実施形態のトレース制御装置の構成を示すブロック図である。It is a block diagram which shows the structure of the trace control apparatus of 4th Embodiment which concerns on this invention. 本発明に係る第4の実施形態のトレース制御装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the trace control apparatus of 4th Embodiment which concerns on this invention. 一般的なLSIデバッグシステムの構成を示すブロック図である。It is a block diagram which shows the structure of a general LSI debug system.

(第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 trace control device 1 according to the first embodiment includes a parameter setting unit 4, a trigger generation unit 5, a RAM (Random Access Memory) control unit 6, and a RAM 7.

パラメータ設定部4は、トリガ条件情報を保持するトリガ条件情報格納部4−1と、RAM7への書き込み開始タイミングを指定するタイミング情報を保持するタイミング情報格納部4−2を備える。トリガ条件情報及びタイミング情報は、CPU等の外部制御装置2からの制御信号によって設定される。トリガ条件情報格納部4−1はトリガ条件情報をトリガ発生部5に出力し、タイミング情報格納部4−2はタイミング情報をRAM制御部6に出力する。   The parameter setting unit 4 includes a trigger condition information storage unit 4-1 that holds trigger condition information, and a timing information storage unit 4-2 that holds timing information that specifies the timing for starting writing to the RAM 7. The trigger condition information and the timing information are set by a control signal from the external control device 2 such as a CPU. The trigger condition information storage unit 4-1 outputs trigger condition information to the trigger generation unit 5, and the timing information storage unit 4-2 outputs timing information to the RAM control unit 6.

トリガ発生部5は、トリガ条件情報4−1に従って、デバッグ対象回路3からの被観測信号から観測開始タイミングを検出し、トリガを出力する。そして、トリガ発生部5は、RAM制御部6にトリガを出力する。   The trigger generation unit 5 detects the observation start timing from the observed signal from the debug target circuit 3 according to the trigger condition information 4-1, and outputs a trigger. Then, the trigger generation unit 5 outputs a trigger to the RAM control unit 6.

RAM制御部6は、タイミング情報4−2に従って、トリガ発生部5からのトリガの入力タイミングを基準として、RAM7への書き込みを開始するタイミングを調整する。すなわち、トリガの発生から、RAM7への書き込みを開始するまでの時間を制御する。そして、RAM制御部6は、RAM7へのデータ書き込み及びデータ読み出しのための各種の制御信号を出力する。また、RAM制御部6は、RAM7から読み出したデータRDATAを外部制御装置2へ出力する。   The RAM control unit 6 adjusts the timing for starting writing to the RAM 7 based on the trigger input timing from the trigger generation unit 5 according to the timing information 4-2. That is, the time from the generation of the trigger to the start of writing to the RAM 7 is controlled. The RAM control unit 6 outputs various control signals for writing data into and reading data from the RAM 7. Further, the RAM control unit 6 outputs the data RDATA read from the RAM 7 to the external control device 2.

RAM7は、RAM7へのトレースデータの書き込みタイミングにおける被観測信号の状態を記憶する。すなわち、RAM7は、デバッグ対象回路3からデータとして入力される被制御信号を、RAM制御部6からの制御信号によって読み込み、記憶する。   The RAM 7 stores the state of the signal under observation at the timing of writing the trace data to the RAM 7. That is, the RAM 7 reads and stores the controlled signal input as data from the debug target circuit 3 by the control signal from the RAM control unit 6.

なお、被観測信号の「状態」とは、被観測信号がデジタル信号である場合は、デジタル値を意味する。この場合のデジタル値は、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 trace control device 1 may be provided with an analog-to-digital converter, and an analog value may be converted into a digital value and then traced. Thus, in the present invention, it is not essential whether the signal under observation is a digital signal or an analog signal.

RAM制御部6の内部構成の例を、図2に示す。図2のRAM制御部6は、タイマーカウンタ6−1と比較器6−2とアドレス生成部6−3を備える。   An example of the internal configuration of the RAM control unit 6 is shown in FIG. The RAM control unit 6 in FIG. 2 includes a timer counter 6-1, a comparator 6-2, and an address generation unit 6-3.

タイマーカウンタ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 trigger generation unit 5, and outputs a “counter value” as a count result to the comparator 6-2. . Note that the timer counter 6-1 takes two states, a “starting state” in which the counting operation can be actually performed and a “stopping state” in which the counting operation is stopped.

比較器6−2は、パラメータ設定部4からのタイミング情報とタイマーカウンタ6−1からのカウンタ値を比較する。そして、比較器6−2は、タイミング情報とカウンタ値が一致したときに、アドレス生成部6−3に開始パルスを生成する。   The comparator 6-2 compares the timing information from the parameter setting unit 4 and the counter value from the timer counter 6-1. The comparator 6-2 generates a start pulse in the address generator 6-3 when the timing information matches the counter value.

アドレス生成部6−3は、RAM7へのデータの書き込み及びRAM7からのデータの読み出しを制御する制御信号を生成する。制御信号には、RAM7のアドレスを指定するアドレス信号、及び書き込み又は読み出しを指示するイネーブル信号等が含まれる。なお、制御信号は、RAM7として使用する実際のメモリ素子のアクセス方式に従って適宜生成すればよい。制御信号の詳細は、本発明の本質部分ではないので、これ以上の説明は省略する。   The address generation unit 6-3 generates a control signal for controlling data writing to the RAM 7 and data reading from the RAM 7. The control signal includes an address signal for designating the address of the RAM 7 and an enable signal for instructing writing or reading. The control signal may be generated as appropriate according to the access method of the actual memory element used as the RAM 7. The details of the control signal are not an essential part of the present invention, so further explanation is omitted.

アドレス生成部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 RAM 7 in order to store the state of the observed signal in the RAM 7. That is, a write enable signal and an address for writing data to the RAM 7 are output. The address is updated every time data is written to the RAM 7. In order to update the address, the address generation unit 6-3 may include an address counter (not shown) that outputs an address.

なお、RAM7へのデータの書き込みのサイクルは、任意である。例えば、サイクルは、トレース制御装置1を用いてデバッグを行うユーザによって設定されてもよいし、デバック対象回路3の動作クロックのサイクルと同じであってもよい。   Note that the cycle of writing data to the RAM 7 is arbitrary. For example, the cycle may be set by a user who performs debugging using the trace control device 1 or may be the same as the cycle of the operation clock of the debug target circuit 3.

また、アドレス生成部6−3は、外部制御装置2から、RAM7のデータの読み出し要求を受けると、RAM7からのデータの読み出しを制御する制御信号を出力する。そして、RAM7から読み出されたデータRDATAを、外部制御装置2へ出力する。   Further, upon receiving a data read request from the external control device 2 from the external control device 2, the address generation unit 6-3 outputs a control signal for controlling the data read from the RAM 7. Then, the data RDATA read from the RAM 7 is output to the external control device 2.

次に、本実施形態の全体の動作について図面を参照して詳細に説明する。図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 trace control device 1 in the present embodiment.

初めに、外部制御装置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 parameter setting unit 4 from the external control device 2 (step S1). The operation of the external control device 2 is performed by a debug operator who performs debugging using the trace control device 1.

次に、トレース制御装置1が起動し(ステップS2)、デバッグ対象回路3が起動する(ステップS3)。トレース制御装置1及びデバッグ対象回路3の起動及び停止等の操作も、デバッグ作業者によって行われる。   Next, the trace control device 1 is activated (step S2), and the debug target circuit 3 is activated (step S3). Operations such as starting and stopping of the trace control device 1 and the debug target circuit 3 are also performed by the debug operator.

次に、トリガ発生部5は、トリガ条件の充足の有無の検出、すなわち、デバッグ対象回路3から入力される被観測信号の状態とトリガ条件として指定された被観測信号の状態との比較を行い(ステップS4)、トリガを発生させるか否かを判断する(ステップS5)。   Next, the trigger generation unit 5 detects whether or not the trigger condition is satisfied, that is, compares the state of the observed signal input from the debug target circuit 3 with the state of the observed signal specified as the trigger condition. (Step S4), it is determined whether or not to generate a trigger (Step S5).

被観測信号がトリガ条件を満たさない場合は、被観測信号とトリガ条件との比較(ステップ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 control unit 6 is activated. Then, the comparator 6-2 of the RAM control unit 6 compares the counter value with the timing information input from the trigger condition storage unit 4-1 (step S6).

比較の結果、カウンタ値とタイミング情報が一致しない場合は、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 control unit 6 is incremented (step S7), and the process returns to the comparison process (step S6).

比較の結果、カウンタ値とタイミング情報が一致すると、RAM制御部6は、アドレス生成部6−3のライトイネーブル信号を有効状態に設定し、RAM7への被観測信号の書き込み、すなわちトレースを開始する(ステップS8)。   If the counter value matches the timing information as a result of the comparison, the RAM control unit 6 sets the write enable signal of the address generation unit 6-3 to a valid state, and starts writing the signal to be observed to the RAM 7, that is, tracing. (Step S8).

トレースが開始されると、まず、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 RAM 7 may be provided, and confirmation may be performed by checking whether or not the count value is equal to or less than a predetermined value.

RAM7に空き領域がある場合は、RAM制御部6のアドレス生成部6−3のアドレスカウンタの値をインクリメントし(ステップ10)、被観測信号の書き込みを行う(ステップS8)。   If there is an empty area in the RAM 7, the value of the address counter of the address generator 6-3 of the RAM controller 6 is incremented (step 10), and the observed signal is written (step S8).

RAM7に空き領域がない場合は、RAM制御部6のアドレス生成部6−3のライトイネーブル信号を無効状態に設定し、被観測信号の書き込みを終了する(ステップS11)。   If there is no free space in the RAM 7, the write enable signal of the address generator 6-3 of the RAM controller 6 is set to an invalid state, and the writing of the observed signal is terminated (step S11).

トレースが終了した後、デバッグ対象回路3は停止される(ステップS12)。そして、RAM7へ格納した被観測信号の状態を、外部制御装置2から読み出した後、トレース制御装置1が初期化される(ステップS13)。   After the trace is completed, the debug target circuit 3 is stopped (step S12). Then, after reading the state of the signal under observation stored in the RAM 7 from the external control device 2, the trace control device 1 is initialized (step S13).

トレース制御装置1の初期化後、デバッグ対象の全期間の信号のトレースが完了しているかを判断する(ステップS14)。   After the initialization of the trace control device 1, it is determined whether or not the trace of the signal for the entire debug target period has been completed (step S14).

全期間のトレースが完了していない場合は、タイミング情報格納部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 RAM 7 is stored in the timing information storage unit 4-2 from the external control device 2 as timing information ( Step S15), the debug target circuit 3 is restarted (Step S2).

デバック対象回路3の再起動後は、ステップS5でトリガが発生された後、設定されたサイクル数分だけ遅延してトレースが再開される。トレースを再開するまでの期間のトレースデータは、前回、RAM7にトレースされている。従って、ステップS15で、前回までにトレースが完了している期間に相当するサイクル数を指定することによって、デバック対象回路3の再起動後は、トレースが完了している期間に続く期間のトレースが開始される。以降、このトレース開始の遅延量を「トレース開始遅延量」という。本実施形態で設定されるトレース開始遅延量は、サイクル数で表現されているが、時間で表現されてもよい。トレース開始遅延量が時間で表現される場合は、タイマーカウンタ6−1のカウント値も時間を意味する必要がある。   After the debug target circuit 3 is restarted, a trigger is generated in step S5, and then tracing is resumed with a delay of the set number of cycles. Trace data for a period until the trace is restarted was previously traced in the RAM 7. Therefore, in step S15, by specifying the number of cycles corresponding to the period in which the trace has been completed up to the previous time, after the debug target circuit 3 is restarted, the trace in the period following the period in which the trace has been completed is performed. Be started. Hereinafter, the trace start delay amount is referred to as “trace start delay amount”. The trace start delay amount set in this embodiment is expressed by the number of cycles, but may be expressed by time. When the trace start delay amount is expressed in time, the count value of the timer counter 6-1 also needs to mean time.

全期間のトレースが完了した場合は、処理を終了する。   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 trace control device 1 in the first embodiment.

トリガ発生部5でトリガ条件の充足が検出されるとトリガパルスが生成される(T1)。   When the trigger generator 5 detects that the trigger condition is satisfied, a trigger pulse is generated (T1).

トリガパルスが生成されると、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 RAM controller 6 is activated and starts counting clocks, and is incremented by 1 every clock. The clock here is a clock that defines a write cycle to the RAM 7. When the timing information x (x is an integer equal to or greater than 1) in the timing information storage unit 4-2 matches the count value of the timer counter 6-1, a start pulse is generated (T2).

開始パルスが生成されると、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 RAM 7 becomes effective. 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 RAM 7 as an address. Then, the state of the observed signal is written into the RAM 7 during the period when the write enable is valid.

アドレス生成部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 RAM 7, the write enable is invalidated (T4).

以上のように、本実施形態のトレース制御装置1は、トリガが発生した後、任意に設定されたトレース開始の遅延時間が経過した後、被観測信号のトレースを開始することができる。   As described above, the trace control device 1 according to the present embodiment can start tracing the signal under observation after a trigger has occurred and a delay time for starting the trace that has been arbitrarily set has elapsed.

そして、遅延時間を変えてトレースを繰り返すことによって、全デバッグ期間の被観測信号をトレースすることができる。なぜなら、デバッグ対象回路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 debug target circuit 3 performs exactly the same operation as the previous operation after the restart until the previous trigger occurrence time. Therefore, by repeating the operation of tracing from a time point when a predetermined time has passed since the last trigger occurrence time, the entire debug period can be divided into several sections for tracing. Therefore, even if a memory having a capacity sufficient to trace the signal under observation for the entire debug period at a time is not provided, the trace for the entire period can be performed.

以上の説明から明らかなように、RAM7、すなわち記憶装置は、トレース制御装置に備えられている必要はない。また、パラメータ設定部4にパラメータを設定する外部制御装置と、RAM7のデータを読み出す外部制御装置は同じである必要はない。また、トリガ発生部5は、必ずしも被観測信号を基にトリガを発生させる必要はない。すなわち、被観測信号とは別の信号を基にトリガを発生させてもよい。   As is clear from the above description, the RAM 7, that is, the storage device, does not need to be provided in the trace control device. Further, the external control device that sets parameters in the parameter setting unit 4 and the external control device that reads data in the RAM 7 do not have to be the same. Further, the trigger generator 5 does not necessarily have to generate a trigger based on the signal to be observed. That is, the trigger may be generated based on a signal different from the signal to be observed.

図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 trace control device 11 having only the configuration essential to the present invention. The trace control device 11 is obtained by removing the RAM 7 from the trace control device 1 in FIG. 1, and the trace data is written in the external storage device 71. Further, the storage control unit 60 does not have a data read function of the storage device 71. Reading of data from the storage device 71 is performed by the external control device 2-2. Further, parameter setting to the parameter setting unit 4 is performed by the external control device 2-1. The trigger generation unit 5 generates a trigger based on the trigger signal output from the external trigger signal generation circuit 3-1.

トレース制御装置11の基本的な機能は、図1のトレース制御装置1と同じなので、詳細な説明は省略する。   The basic functions of the trace control device 11 are the same as those of the trace control device 1 of FIG.

なお、本実施形態のトレース制御装置1では、以下の3つのことが前提とされている。すなわち、デバッグ対象回路3は所定のクロックに同期して動作すること、そのクロックのサイクルごとに被観測信号の状態がサンプリングされること、そして、RAM7の1つのアドレスに1つのトレースデータが記憶されることである。しかし、本実施形態は、これらの前提がない場合にも適用可能である。   In the trace control device 1 of the present embodiment, the following three assumptions are assumed. That is, the debug target circuit 3 operates in synchronization with a predetermined clock, the state of the observed signal is sampled every cycle of the clock, and one trace data is stored in one address of the RAM 7. Is Rukoto. However, the present embodiment can also be applied when these assumptions are not made.

まず、デバッグ対象回路3はクロックに同期して動作しなくてもよい。必要な時間間隔で被観測信号をサンプリングすればトレースが可能なので、デバッグ対象回路3が何らかのクロックに同期していることは必須条件ではない。デバッグ対象回路3がクロックに同期して動作していない場合は、トレースデータの書き込み可能なRAM7の容量とサンプリング間隔から決まるトレース開始遅延量が、タイミング情報としてタイミング情報格納部4−2に設定されればよい。   First, the debug target circuit 3 may not operate in synchronization with the clock. Since the trace is possible if the observed signal is sampled at a necessary time interval, it is not an essential condition that the debug target circuit 3 is synchronized with any clock. When the debug target circuit 3 is not operating in synchronization with the clock, the trace start delay amount determined from the capacity of the RAM 7 into which the trace data can be written and the sampling interval is set in the timing information storage unit 4-2 as timing information. Just do it.

また、被観測信号をサンプリングする時間間隔は特に限定されない。従って、デバッグ対象回路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 debug target circuit 3. Also in this case, the trace start delay amount determined from the capacity of the RAM 7 into which the trace data can be written and the sampling interval may be set in the timing information storage unit 4-2 as timing information.

さらに、RAM7の1つのアドレスとサンプリング時刻との対応も、1対1には限定されない。被観測信号の本数が多い場合には、1サンプルごとのトレースデータを複数のワードに分割し、それよりも速いサイクルでRAM7の複数のアドレスに分配して記憶してもよい。この場合も、トレースデータの書き込み可能なRAM7の容量とサンプリング間隔から決まるトレース開始遅延量が、タイミング情報としてタイミング情報格納部4−2に設定されればよい。
(第2の実施形態)
次に、第2の実施形態について図面を参照して詳細に説明する。
Further, the correspondence between one address of the RAM 7 and the sampling time is not limited to one to one. When the number of signals to be observed is large, the trace data for each sample may be divided into a plurality of words and distributed and stored in a plurality of addresses in the RAM 7 in a cycle faster than that. Also in this case, the trace start delay amount determined from the capacity of the RAM 7 into which the trace data can be written and the sampling interval may be set in the timing information storage unit 4-2 as timing information.
(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 RAM control unit 6. Since other components are the same, description thereof is omitted.

第2の実施形態のRAM制御部6の内部構成の例を図6に示す。図6のRAM制御部6は、共通カウンタ6−4と比較器6−2とRAM IF(Interface)部6−5を備える。   An example of the internal configuration of the RAM control unit 6 of the second embodiment is shown in FIG. The RAM control unit 6 of FIG. 6 includes a common counter 6-4, a comparator 6-2, and a RAM IF (Interface) unit 6-5.

共通カウンタ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 trigger generator 5 and the start pulse from the comparator 6-2. The common counter 6-4 outputs the count value to the comparator 6-2 and the RAM IF unit 6-5.

比較器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 RAM 7. The RAM IF unit 6-5 arbitrates a write control signal generated based on the RAM read control signal from the external control device 2, the start pulse from the comparator 6-2, and the count value from the common counter 6-4. I do. Note that the control of reading data from the RAM 7 is not necessarily provided in the RAM control unit 6, and the RAM 7 may be directly read from another device.

次に、本実施形態の全体の動作について図面を参照して詳細に説明する。本実施形態におけるトレース制御装置1のフローチャートは、第1の実施形態と同様であるため説明を省略する。   Next, the overall operation of this embodiment will be described in detail with reference to the drawings. Since the flowchart of the trace control device 1 in the present embodiment is the same as that in the first embodiment, description thereof is omitted.

図7は、本実施形態におけるトレース制御装置1の動作を示すタイミングチャートである。   FIG. 7 is a timing chart showing the operation of the trace control device 1 in the present embodiment.

トリガ発生部5でトリガ条件の充足が検出されるとトリガパルスが生成される(T1)。   When the trigger generator 5 detects that the trigger condition is satisfied, a trigger pulse is generated (T1).

トリガパルスが生成されると、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 RAM control unit 6 starts counting the clock and is incremented by 1 every clock. When the timing information x (x is an integer equal to or greater than 1) in the timing information storage unit 4-2 matches the count value of the timer counter 6-1, a start pulse is generated (T2).

開始パルスが生成されると、ライトイネーブルが有効となり、共通カウンタ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 RAM 7 as an address. Then, the state of the observed signal is written into the RAM 7 during the period when the write enable is valid.

共通カウンタ6−4のカウント値がRAM7の容量nに達するとライトイネーブルが無効となる(T4)。   When the count value of the common counter 6-4 reaches the capacity n of the RAM 7, the write enable becomes invalid (T4).

第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 RAM controller 6 and the address counter of the address generator 6-3 in the first embodiment is used. Therefore, since the address counter can be omitted, the circuit scale can be reduced while having the same effect as the first embodiment.
(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 parameter setting unit 4 includes an offset control unit 4-3 that updates timing information in the timing information storage unit 4-2. Then, the count value of the timer counter 6-1 of the RAM control unit 6 is input to the parameter setting unit 4. Regarding the configuration of the third embodiment, the above two points are different from those of the first embodiment. Since other components are the same, description thereof is omitted.

次に、本実施形態の全体の動作について図面を参照して詳細に説明する。本実施形態におけるトレース制御装置1のフローチャートは、第1の実施形態と同様であるため説明を省略する。   Next, the overall operation of this embodiment will be described in detail with reference to the drawings. Since the flowchart of the trace control device 1 in the present embodiment is the same as that in the first embodiment, description thereof is omitted.

ただし、本実施形態の動作は、以下の点で第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 7 using an address counter or the like and the count value has reached a predetermined value.

そして、トレースが完了すると、RAM制御部6は、トレース完了信号をオフセット制御部4−3へ出力する。   When the tracing is completed, the RAM control unit 6 outputs a trace completion signal to the offset control unit 4-3.

ステップ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 RAM 7 to the value of the timing information storage unit 4-2.

以上の第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 trace control device 1 in the third embodiment for carrying out the present invention.

トリガ発生部5でトリガ条件の充足が検出されるとトリガパルスが生成される(T1)。   When the trigger generator 5 detects that the trigger condition is satisfied, a trigger pulse is generated (T1).

トリガパルスが生成されると、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 RAM control unit 6 starts counting the clock and is incremented by 1 every clock. When the timing information x in the timing information storage unit 4-2 matches the count value of the timer counter 6-1, a start pulse is generated (T2).

開始パルスが生成されると、ライトイネーブルが有効となる。ライトイネーブルが有効のときに、アドレス生成部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 RAM 7 as an address. Then, the state of the observed signal is written into the RAM 7 during the period when the write enable is valid.

アドレス生成部6−3のアドレスカウンタがRAM7の容量nに達すると、トレース完了信号が出力され、ライトイネーブルが無効となる(T4)。   When the address counter of the address generator 6-3 reaches the capacity n of the RAM 7, a trace completion signal is output, and the write enable becomes invalid (T4).

RAM7への書き込み完了後、オフセット制御部4−3が、次にトレースを取得するためのトレース開始タイミング、すなわち、トレース開始遅延量をタイミング情報格納部4−2に格納する(T5)。格納する値は、オフセット制御部4−3でタイミング情報格納部4−2にRAM7の容量を加算した値を用いても、タイマーカウンタ6−1の値を格納しても構わない。   After completing the writing to the RAM 7, the offset control unit 4-3 stores the trace start timing for acquiring the trace next time, that is, the trace start delay amount in the timing information storage unit 4-2 (T5). As a value to be stored, a value obtained by adding the capacity of the RAM 7 to the timing information storage unit 4-2 by the offset control unit 4-3 may be used, or a value of the timer counter 6-1 may be stored.

以上のように、第3の実施形態では、タイミング情報の変更を自動で行うため、CPU等の外部制御装置2からの設定を省略することが可能となる。
(第4の実施形態)
次に、発明を実施するための第4の形態について図面を参照して詳細に説明する。
As described above, since the timing information is automatically changed in the third embodiment, the setting from the external control device 2 such as a CPU can be omitted.
(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 trace control device 1 according to the fourth embodiment for carrying out the present invention, the signal selection unit 8 and the parameters for controlling the signal selection unit 8 with respect to the first embodiment shown in FIG. A signal selection information storage unit 4-4 of the setting unit 4 is added.

信号選択部8は、パラメータ設定部4の信号選択情報格納部4−4の指定に従って、観測対象信号の中から、トリガ発生条件の充足の検出に使用する信号、及びRAM7へその状態を格納する被観測信号を選択する。「観測対象信号」とは、全デバッグ操作によって、最終的にトレースされるすべての信号を意味する。本実施形態では、観測対象信号の中からの被観測信号の選択及び選択された被観測信号のトレースを、複数回、繰り返すことによって、すべての観測対象信号のトレースを行う。   The signal selection unit 8 stores a signal used for detection of satisfaction of the trigger generation condition from the observation target signal and the state thereof in the RAM 7 in accordance with the designation of the signal selection information storage unit 4-4 of the parameter setting unit 4. Select the signal to be observed. “Observed signal” means all signals finally traced by all debugging operations. In this embodiment, tracing of all the signals to be observed is performed by repeating selection of the signals to be observed from the signals to be observed and tracing of the selected signals to be observed a plurality of times.

信号選択部8は、トリガ発生部5とRAM7へ、選択した被観測信号を出力する。その他の構成要素については第1の実施形態と同じであるため説明は省略する。   The signal selection unit 8 outputs the selected observed signal to the trigger generation unit 5 and the RAM 7. Since other components are the same as those in the first embodiment, description thereof is omitted.

次に、本実施形態の全体の動作について図面を参照して詳細に説明する。図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 trace control device 1 in the present embodiment. About the operation | movement similar to 1st Embodiment, the code | symbol same as FIG. 3 is attached | subjected and detailed description is abbreviate | omitted.

第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 trace control device 1 according to the fourth embodiment that implements the present invention is the same as that of the first embodiment, and thus the description thereof is omitted.

第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 RAM 7, the trace data can be obtained by repeatedly performing the trace while switching the observed signal to be traced. it can. Accordingly, it is possible to acquire a larger number of observed signal trace data than the bit width of the RAM 7.

なお、第4の実施形態は、第2、3の実施形態にも適用することが可能である。例えば、信号選択部8は、被観測信号の選択の他、図5におけるトリガ用信号の選択も行ってもよい。その他にも、以上の実施形態は各々他の実施形態と組み合わせることができる。   Note that the fourth embodiment can also be applied to the second and third embodiments. For example, the signal selection unit 8 may select the trigger signal in FIG. 5 in addition to the selection of the signal to be observed. In addition, each of the above embodiments can be combined with other embodiments.

以上、これまで述べてきた各実施形態は、本発明の好適な実施形態であり、上記実施形態のみに本発明の範囲を限定するものではなく、本発明の要旨を逸脱しない範囲において種々の変更を施した形態での実施が可能である。   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 Trace control device 10 LSI
12 Debugging observation terminal 2, 2-1, 2-2, 21 External control device 22 Logic analyzer 3, 31 Debug target circuit 3-1 Trigger signal generation circuit 4 Parameter setting unit 4-1 Trigger condition information storage unit 4- 2 Timing information storage unit 4-3 Offset control unit 4-4 Selection signal information storage unit 5 Trigger generation unit 6 RAM control unit 6-1 Timer counter 6-2 Comparator 6-3 Address generation unit 6-4 Common counter 6 5 RAM IF unit 60 Storage control unit 7 RAM
71 Storage Device 8, 81 Signal Selection Unit

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 .
JP2012025227A 2012-02-08 2012-02-08 Trace control apparatus and trace control method Active JP5982845B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

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