[go: up one dir, main page]

JPH07281924A - Trace device and emulator equipped with the same - Google Patents

Trace device and emulator equipped with the same

Info

Publication number
JPH07281924A
JPH07281924A JP6092948A JP9294894A JPH07281924A JP H07281924 A JPH07281924 A JP H07281924A JP 6092948 A JP6092948 A JP 6092948A JP 9294894 A JP9294894 A JP 9294894A JP H07281924 A JPH07281924 A JP H07281924A
Authority
JP
Japan
Prior art keywords
bus
information
latch
bus information
trace
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP6092948A
Other languages
Japanese (ja)
Inventor
Satoshi Masuda
訓 増田
Giichi Aoto
義一 青砥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP6092948A priority Critical patent/JPH07281924A/en
Priority to KR1019950006890A priority patent/KR950033821A/en
Publication of JPH07281924A publication Critical patent/JPH07281924A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/28Error detection; Error correction; Monitoring by checking the correct order of processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

(57)【要約】 【目的】 データアクセス時のバス情報とその直前のプ
ログラムフェッチのバス情報、命令実行の流れが変化さ
れる直前/直後のプログラムフェッチのバス情報を取得
できるトレース装置を提供する。 【構成】 ラッチ回路110,111の夫々は命令フェ
ッチサイクル毎にバス情報をラッチし、該ラッチ動作が
排他的に制御されることにより2バスサイクル数のバス
情報を保持する。排他的ラッチ動作のきっかけは分岐信
号205によって検出される命令実行の流れの変化され
る状態とプログラムフェッチ信号206で検出されるデ
ータアクセス状態の夫々に呼応され、排他的ラッチ動作
の完了後にラッチされたバス情報が並列的にトレースメ
モリ100に書込まれる。
(57) [Abstract] [Purpose] To provide a trace device capable of acquiring bus information at the time of data access, bus information of program fetch immediately before that, and bus information of program fetch immediately before / after the instruction execution flow is changed. . [Structure] Each of the latch circuits 110 and 111 latches bus information for each instruction fetch cycle, and holds the bus information of two bus cycles by exclusively controlling the latch operation. The trigger of the exclusive latch operation is in response to the changed state of the instruction execution flow detected by the branch signal 205 and the data access state detected by the program fetch signal 206, and is latched after the exclusive latch operation is completed. Bus information is written in parallel to the trace memory 100.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、システムデバッグやソ
フトウェアデバッグなどのためにデータプロセッサのバ
ス情報をトレースするトレース技術に係り、例えばエミ
ュレータに適用して有効な技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a trace technique for tracing bus information of a data processor for system debugging and software debugging, and more particularly to a technique effective when applied to an emulator.

【0002】[0002]

【従来の技術】システムデバッグやソフトウェアデバッ
グにおいてデータプロセッサによる命令実行軌跡を取得
するトレース技術は、例えばデータプロセッサ(CPU
はもとよりマイクロプロセッサやマイクロコンピュータ
などCPUを備えて命令を実行するデータ処理装置を意
味する)のバス情報(アドレスバス、データバス及びコ
ントロールバスの各種情報)をバスサイクル毎にトレー
スメモリに格納し、命令実行を中断した後に、その格納
されたバス情報を解析し、バスサイクル毎にデータ値や
命令語に逆変換して表示し、プログラムの実行軌跡を辿
れるようにするものである。
2. Description of the Related Art A trace technique for acquiring an instruction execution locus by a data processor in system debugging or software debugging is, for example, a data processor (CPU).
Of course, the bus information (various information of the address bus, the data bus, and the control bus) of a data processing device that has a CPU such as a microprocessor or a microcomputer and executes instructions is stored in a trace memory every bus cycle, After the instruction execution is interrupted, the stored bus information is analyzed, the data value and the instruction word are inversely converted and displayed for each bus cycle, and the execution locus of the program can be traced.

【0003】トレース回路によってトレースすべきバス
情報は、データプロセッサのアクセスに伴ってアドレス
バス、データバス及びコントロールバスなどに現れる各
種情報であり、それらはアクセス毎に変化される。した
がって、データプロセッサの動作速度が速くなればそれ
に従ってバス情報の変化サイクルも短くなり、その全て
をトレースメモリに格納しようとすれば、バスサイクル
よりもメモリサイクルの短い高速且つ大容量のトレース
メモリが必要になる。
Bus information to be traced by the trace circuit is various information appearing on an address bus, a data bus, a control bus, etc. in association with an access of the data processor, and these are changed for each access. Therefore, if the operation speed of the data processor becomes faster, the change cycle of the bus information becomes shorter accordingly, and if all of it is to be stored in the trace memory, a high-speed and large-capacity trace memory having a memory cycle shorter than the bus cycle is required. You will need it.

【0004】そこで、少ないトレースメモリ容量で長時
間のプログラム実行軌跡を取得できるようにするため、
特開昭63−129432号公報には、分岐命令や割込
み受け付けといった命令実行の流れを変化させる処理が
行われた場合のみその分岐元のアドレスと分岐先のアド
レスのみをトレースメモリに書込む技術が提案され、同
様の技術が特開平4−42331号にも提案されてい
る。また、特開平3−241437号公報には、CPU
のアドレス情報のみをトレースメモリに格納し、後から
その動作プログラムと比較して、CPUが実際に動作し
たプログラムの実行軌跡を判定する技術が提案されてい
る。
Therefore, in order to obtain a program execution locus for a long time with a small trace memory capacity,
Japanese Patent Application Laid-Open No. 63-129432 discloses a technique of writing only a branch source address and a branch destination address into a trace memory only when a process for changing a flow of instruction execution such as a branch instruction or interrupt acceptance is performed. It has been proposed and a similar technique is also proposed in Japanese Patent Laid-Open No. 4-42331. In addition, Japanese Patent Laid-Open No. 3-241437 discloses a CPU
A technique has been proposed in which only the address information of (1) is stored in the trace memory, and later compared with the operating program to determine the execution locus of the program in which the CPU actually operated.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、従来技
術は命令アドレスのみに着目するだけであり、デバッグ
に必要な情報を少ないメモリ容量で能率的に取得する点
については考慮されていない。即ち、トレースで取得し
た限られた情報に基づいてプログラムの実行軌跡を解析
するには、データリード/ライト時のバス情報とその直
前のプログラムフェッチのバス情報、そして分岐命令や
割込み受け付けといった命令実行の流れが変化される直
前/直後のプログラムフェッチのバス情報を取得しなけ
ればならないことを本発明者は見い出した。前者の情報
は、命令実行に伴うオペランド取得など実際のデータア
クセスの状況を把握するために少なくとも必要であり、
後者の情報は、命令実行の流れが変化された場合にもプ
ログラムの流れを追うために必要とされる。
However, the prior art only focuses on the instruction address, and does not consider efficiently obtaining the information necessary for debugging with a small memory capacity. That is, in order to analyze the program execution locus based on the limited information acquired by the trace, the bus information at the time of data read / write, the bus information of the program fetch immediately before that, and the instruction execution such as branch instruction and interrupt acceptance The present inventor has found that the bus information of the program fetch immediately before / after the flow of is changed must be acquired. The former information is at least necessary to understand the actual data access status such as operand acquisition accompanying instruction execution,
The latter information is needed to follow the program flow even if the instruction execution flow is changed.

【0006】さらに、上述のように所定のバス情報だけ
をトレースメモリに格納していく場合、前後のバス情報
を連続して取得するには、やはりメモリサイクルがバス
サイクルよりも短い高速アクセスメモリを利用しなけれ
ばならない。動作速度の高速なCPUに対しては非常に
高速且つ高価な記憶装置と制御回路が必要とされる事態
には変りない。
Further, when only the predetermined bus information is stored in the trace memory as described above, in order to continuously obtain the preceding and following bus information, the high-speed access memory whose memory cycle is shorter than the bus cycle is required. You have to use it. It is still the case that a very high-speed and expensive storage device and control circuit are required for a high-speed CPU.

【0007】本発明の目的は、データアクセス時のバス
情報とその直前のプログラムフェッチのバス情報、そし
て分岐命令や割込み受け付けといった命令実行の流れが
変化される直前/直後のプログラムフェッチのバス情報
を取得できるトレース装置を提供することにある。本発
明の別の目的は、上記バス情報をその変化速度よりも低
速のトレースメモリを使って取得できるトレース装置を
提供することにある。本発明の更に別の目的は、そのよ
うなトレース装置を搭載したエミュレータを提供するこ
とにある。
An object of the present invention is to provide bus information at the time of data access, bus information for program fetch immediately before that, and bus information for program fetch immediately before / after the flow of instruction execution such as branch instruction or interrupt acceptance is changed. It is to provide a trace device that can be acquired. Another object of the present invention is to provide a trace device that can acquire the bus information by using a trace memory that is slower than its changing speed. Still another object of the present invention is to provide an emulator equipped with such a tracing device.

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

【0009】[0009]

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

【0010】(a)トレース装置は、データプロセッサ
のバス情報を複数バスサイクル分一時的に貯えるバッフ
ァ手段と、バッファ手段の入力に接続されるトレースメ
モリと、上記バス情報を参照しながらトレースメモリに
格納すべきバス情報を選択制御する書込み制御手段とを
備える。上記書込み制御手段は、命令実行の流れを変化
させる処理をデータプロセッサが実行する第1の状態
と、命令フェッチ以外のデータアクセスが行われる第2
の状態とを検出し、上記第1の状態の後に実行順序が変
化された最初の命令フェッチのバス情報とその直前の命
令フェッチのバス情報とを含むバス情報に対してバッフ
ァ手段からトレースメモリへの並列的な書込みを許容
し、上記第2の状態に呼応して当該データアクセスのバ
スサイクルとその直前の命令フェッチサイクルとを含む
連続するバスサイクルのバス情報に対してバッファ手段
からトレースメモリへの並列的な書込みを許容する書込
み制御信号を生成するようにする。
(A) The trace device stores the bus information of the data processor temporarily for a plurality of bus cycles, the trace memory connected to the input of the buffer means, and the trace memory while referring to the bus information. Write control means for selectively controlling bus information to be stored. The write control means has a first state in which the data processor executes processing for changing the flow of instruction execution, and a second state in which data access other than instruction fetch is performed.
From the buffer means to the trace memory for the bus information including the bus information of the first instruction fetch whose execution order is changed after the first state and the bus information of the instruction fetch immediately before that. From the buffer means to the trace memory for bus information of consecutive bus cycles including the bus cycle of the data access and the instruction fetch cycle immediately before that in response to the second state. To generate a write control signal that allows parallel writing.

【0011】(b)バッファ手段を簡単に構成するに
は、データプロセッサのバス情報を夫々が並列的に受
け、夫々の出力が上記トレースメモリのデータ入力端子
に接続される複数個のラッチ回路によってバッファ手段
を構成する。このとき、上記書込み制御手段は、上記複
数個のラッチ回路に対して命令フェッチのバスサイクル
毎に並列的なラッチ動作を許容した後上記第1の状態と
第2の状態の夫々に呼応して排他的なラッチ動作によっ
てラッチ回路に上記バス情報をラッチさせるラッチ制御
信号を生成し、ラッチ制御信号による排他的なラッチ動
作の完了後に当該ラッチされたバス情報を上記書込み制
御信号にてトレースメモリに書込みを許容するようにす
る。上記書込み制御手段には、書込み制御信号が書込み
を許容するとき順次更新された書込みアドレス信号を生
成する機能を追加し、また、上記トレースメモリを書込
み順序と同じ順序で読出し制御する読出し制御手段を設
けることができる。
(B) In order to simply construct the buffer means, the bus information of the data processor is received in parallel by the plurality of latch circuits whose outputs are connected to the data input terminals of the trace memory. It constitutes a buffer means. At this time, the write control means allows the plurality of latch circuits to perform a parallel latch operation for each bus cycle of instruction fetch, and then responds to each of the first state and the second state. A latch control signal that causes the latch circuit to latch the bus information by the exclusive latch operation is generated, and after the exclusive latch operation by the latch control signal is completed, the latched bus information is written to the trace memory by the write control signal. Allow writing. The write control means is provided with a function of generating a sequentially updated write address signal when the write control signal permits writing, and a read control means for performing read control of the trace memory in the same order as the write order. Can be provided.

【0012】(c)上記手段において書込み制御手段を
簡単に構成する更に具体的な態様としてトレース装置
は、データプロセッサのバス情報を格納するためのトレ
ースメモリと、上記データプロセッサのバス情報を夫々
が並列的に受けると共に夫々の出力が上記トレースメモ
リのデータ入力端子に接続される2個のラッチ回路と、
命令実行の流れを変化させる処理を上記データプロセッ
サが実行する状態を示す分岐信号のような第1の情報、
そして現在のバスサイクルが命令フェッチであるかその
他のデータアクセスであるかを識別可能とするプログラ
ムフェッチ信号、リード信号及びライト信号のような第
2の情報とを参照しながらラッチ回路のラッチ制御信号
とトレースメモリに対する書込み制御信号とを生成して
トレースメモリに格納すべきバス情報を選択制御する書
込み制御手段とを備える。このとき上記書込み制御手段
は、上記2個のラッチ回路に対して命令フェッチサイク
ル毎に並列的にラッチ動作を許容した後上記第1の情報
によって命令実行の流れを変化させる命令の実行を検出
した時に次の命令フェッチサイクルの終了まで一方のラ
ッチ回路のラッチ動作を禁止することによって2個のラ
ッチ回路に夫々前後の命令フェッチのバス情報をラッチ
させ、また、第2の情報によってデータアクセスを検出
したときに当該データアクセスサイクルにおいて一方の
ラッチ回路のラッチ動作を禁止することによって2個の
ラッチ回路に当該データアクセスのバス情報とその前の
命令フェッチのバス情報とをラッチさせるラッチ制御信
号を生成し、ラッチ制御信号による排他的なラッチ動作
の完了後に当該ラッチされたバス情報を上記書込み制御
信号にてトレースメモリに書込み許容するものとする。
(C) As a more specific mode of simplifying the write control means in the above means, the trace device has a trace memory for storing bus information of the data processor and a bus information of the data processor, respectively. Two latch circuits which receive in parallel and each output of which is connected to the data input terminal of the trace memory;
First information such as a branch signal indicating a state in which the data processor executes a process that changes the flow of instruction execution,
Then, the latch control signal of the latch circuit is referred to while referring to the second information such as a program fetch signal, a read signal, and a write signal that can identify whether the current bus cycle is an instruction fetch or another data access. And write control means for generating a write control signal for the trace memory and selectively controlling bus information to be stored in the trace memory. At this time, the write control means detects the execution of an instruction that changes the instruction execution flow according to the first information after allowing the two latch circuits to perform a latch operation in parallel for each instruction fetch cycle. Sometimes, the latch operation of one latch circuit is prohibited until the end of the next instruction fetch cycle, so that the two latch circuits respectively latch the bus information of the preceding and following instruction fetches, and the data access is detected by the second information. At this time, a latch control signal is generated for prohibiting the latch operation of one latch circuit in the data access cycle to cause the two latch circuits to latch the bus information for the data access and the bus information for the previous instruction fetch. After the exclusive latch operation by the latch control signal is completed, the latched bus information is I shall write acceptable trace memory with the write control signal.

【0013】(d)エミュレータに搭載された上記トレ
ース装置は、ターゲットシステムを代行制御するための
エミュレーション用データプロセッサのバス情報が供給
されるエミュレーションバス接続される。
(D) The trace device mounted on the emulator is connected to the emulation bus to which the bus information of the emulation data processor for controlling the target system is supplied.

【0014】[0014]

【作用】上記した手段(a)によれば、複数バスサイク
ル分のバス情報を一時的に蓄積可能なバッファ手段は、
上記第1の状態及び第2の状態の何れが発生しても、そ
の前後の命令フェッチのバス情報を一時的に保持するか
ら、書込み制御手段は、上記第1の状態を検出すること
により、分岐命令や割込み受け付けといった命令実行の
流れが変化される直前/直後の命令フェッチのバス情報
の取得を実現し、命令実行の流れが変化された場合にも
プログラムの流れを追えるようにする。同様に書込み制
御手段は、第2の状態を検出することにより、データア
クセス時のバス情報とその直前の命令フェッチのバス情
報の取得を実現し、プログラムの実行軌跡の解析に当た
り、命令実行に伴うオペランド取得など実際のデータア
クセスの状況を把握可能にする。これらによって、ソフ
トウェアデバッグ若しくはシステムデバッグに必要な情
報を少ないメモリ容量で能率的に取得することを達成す
る。
According to the above-mentioned means (a), the buffer means capable of temporarily storing the bus information for a plurality of bus cycles is:
Regardless of whether the first state or the second state occurs, the bus information of the instruction fetches before and after the first state is temporarily held. Therefore, the write control unit detects the first state, The acquisition of bus information for instruction fetch immediately before / after a change in instruction execution flow such as a branch instruction or interrupt acceptance is realized so that the program flow can be followed even if the instruction execution flow is changed. Similarly, the write control unit realizes the acquisition of the bus information at the time of data access and the bus information of the instruction fetch immediately before that by detecting the second state, and in the analysis of the execution locus of the program, the instruction execution is accompanied. Make it possible to grasp the actual data access status such as operand acquisition. As a result, it is possible to efficiently obtain the information necessary for software debugging or system debugging with a small memory capacity.

【0015】上記した手段(b)によれば、複数個のラ
ッチ回路の夫々は命令フェッチサイクル毎にバス情報を
ラッチし、そのラッチ動作が排他的に制御されることに
より全体としてその個数分のバスサイクル数のバス情報
を保持する。排他的なラッチ動作のきっかけは上記第1
の状態と第2の状態の夫々に呼応され、排他的ラッチ動
作の完了後に当該ラッチされたバス情報は全て並列的に
トレースメモリに書込まれる。このことは、トレースメ
モリのアクセス速度がバスサイクルよりも低速であって
も複数のバス情報の書込みを可能にする。トレースメモ
リの書込みサイクルにおいて、上記バス情報をラッチ回
路に保持させておくには、その期間中ラッチ回路のラッ
チ動作を停止させておけばよく、また、トレースメモリ
に書込みデータの入力ラッチ回路が設けられている場合
にはその必要もない。ラッチ回路の個数は連続して取得
すべきバス情報のバスサイクル数に従って決定され、上
記した手段(c)は最低限の2バスサイクル数の場合で
ある。
According to the above-mentioned means (b), each of the plurality of latch circuits latches the bus information at every instruction fetch cycle, and the latch operation is exclusively controlled, so that the number of the latch circuits as a whole is increased. Holds bus information about the number of bus cycles. The trigger for the exclusive latch operation is the first one above.
And the second state, all of the latched bus information is written in parallel to the trace memory after the completion of the exclusive latch operation. This enables writing of a plurality of pieces of bus information even if the access speed of the trace memory is lower than the bus cycle. In the write cycle of the trace memory, in order to hold the above bus information in the latch circuit, the latch operation of the latch circuit may be stopped during that period, and the trace memory is provided with an input latch circuit for write data. If so, it is not necessary. The number of latch circuits is determined according to the number of bus cycles of bus information to be continuously acquired, and the above-mentioned means (c) is the case of the minimum number of two bus cycles.

【0016】上記した手段(c)によれば、2個のラッ
チ回路に対する排他的なラッチ動作のきっかけとして利
用する情報、すなわち、分岐信号のような第1の情報、
そしてプログラムフェッチ信号、リード信号及びライト
信号のような第2の情報は、データプロセッサが出力す
るバス情報に含まれる情報であるから、これを直接利用
して2個のラッチ回路の排他的ラッチ動作制御を行う書
込み制御手段の論理構成を著しく簡素化する。
According to the above-mentioned means (c), the information used as the trigger of the exclusive latch operation for the two latch circuits, that is, the first information such as the branch signal,
The second information such as the program fetch signal, the read signal, and the write signal is the information included in the bus information output by the data processor, and thus the second information is directly used to perform the exclusive latch operation of the two latch circuits. The logic configuration of the write control means for controlling is significantly simplified.

【0017】[0017]

【実施例】図1には本発明の一実施例に係るトレース装
置が示される。図において1はトレース装置、2はコン
ピュータシステム、3はデコード部、4は補助記憶装
置、5は表示装置である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT FIG. 1 shows a trace device according to an embodiment of the present invention. In the figure, 1 is a trace device, 2 is a computer system, 3 is a decoding unit, 4 is an auxiliary storage device, and 5 is a display device.

【0018】コンピュータシステム2にはバス200に
接続されたCPU201と記憶装置202が代表的に示
される。記憶装置202はCPU201の動作プログラ
ムやプログラムの実行に必要な各種データが格納される
と共に、CPU201の作業領域とされる記憶手段の総
称と理解されたい。補助記憶装置4にはCPU201が
実行すべき動作プログラムに対応されるソースプログラ
ムやオブジェクトプログラムが格納されている。尚、上
記記憶装置202に格納される動作プログラムは補助記
憶装置4のオブジェクトプログラムがダウンロードされ
てもよい。
In the computer system 2, a CPU 201 and a storage device 202 connected to the bus 200 are typically shown. The storage device 202 is to be understood as a general term for storage means that stores an operation program of the CPU 201 and various data necessary for execution of the program and serves as a work area of the CPU 201. The auxiliary storage device 4 stores a source program and an object program corresponding to the operation program to be executed by the CPU 201. The object program stored in the auxiliary storage device 4 may be downloaded as the operation program stored in the storage device 202.

【0019】上記バス200は夫々図示しないアドレス
バス、データバス、及びコントロールバスを含む。それ
らのバス200でやりとりされる情報がバス情報であ
る。当該バス情報の中にはCPU201が夫々出力する
リード信号203、ライト信号204、分岐信号20
5、及びプログラムフェッチ信号206を含む。リード
信号203はCPU201が外部から情報を読み込むこ
とを指示する信号、ライト信号204はCPU201が
外部に情報を書込むことを指示する信号である。上記分
岐信号205は分岐命令や割込み受け付けといった命令
実行の流れが変化されることを外部に通知するための信
号であり命令実行の流れを変化させる処理を実際にCP
U201が行うときに(分岐命令の実行や割込みを受け
付ける処理の実行)アクティブレベルに変化される信
号、上記プログラムフェッチ信号206は命令フェッチ
のためのバスサイクルであることを示す信号である。
The bus 200 includes an address bus, a data bus, and a control bus (not shown). The information exchanged on these buses 200 is bus information. In the bus information, the read signal 203, the write signal 204, and the branch signal 20 output by the CPU 201 are included.
5 and a program fetch signal 206. The read signal 203 is a signal instructing the CPU 201 to read information from the outside, and the write signal 204 is a signal instructing the CPU 201 to write information to the outside. The branch signal 205 is a signal for notifying externally that the flow of instruction execution such as branch instruction or interrupt acceptance is changed, and the process for changing the flow of instruction execution is actually CP.
A signal that is changed to an active level when the U 201 performs (execution of a branch instruction or execution of processing for accepting an interrupt), and the program fetch signal 206 is a signal that indicates a bus cycle for instruction fetch.

【0020】トレース装置1は、上記リード信号20
3、ライト信号204、分岐信号205、及びプログラ
ムフェッチ信号206の状態に従ってCPU201のバ
ス200に現れるバス情報を選択的にバスサイクル単位
に記憶していく。その詳細は後述する。
The trace device 1 uses the read signal 20 described above.
3, the bus information appearing on the bus 200 of the CPU 201 is selectively stored in bus cycle units according to the states of the write signal 204, the branch signal 205, and the program fetch signal 206. The details will be described later.

【0021】デコード部3はトレース装置1から読出さ
れた情報をデコード/編集し、表示装置5に送り出す。
例えば、このデコード部3は、トレース装置1から読出
された情報を順次受け取って、それがプログラムフェッ
チに関する情報か命令以外のデータアクセスに関する情
報かの判別を行ない、それに従って当該バス情報を編集
し、その内容を順番に表示装置5に表示する。プログラ
ムフェッチについては逆アセンブルして表示するか、別
途、コンパイラなどの言語処理プログラムで出力された
オブジェクトプログラムを取り込み、オブジェクトプロ
グラムに含まれるソースプログラムのファイル名情報及
びソース行毎のアドレス情報から、プログラムフェッチ
アドレスに対応するソースプログラムファイル内のソー
ス行を取り出し、編集をして表示することができる。
The decoding unit 3 decodes / edits the information read from the trace device 1 and sends it to the display device 5.
For example, the decoding unit 3 sequentially receives the information read from the trace device 1, determines whether the information is information related to program fetch or data access other than an instruction, and edits the bus information according to the information. The contents are displayed on the display device 5 in order. The program fetch is displayed by disassembling or separately capturing the object program output by a language processing program such as a compiler and using the file name information of the source program included in the object program and the address information for each source line The source line in the source program file corresponding to the fetch address can be fetched, edited, and displayed.

【0022】上記トレース装置1は、トレースメモリ1
00、ラッチ回路110,111、書込み制御回路12
0、及び読出し制御回路130から成る。トレースメモ
リ100はCPU201のバス情報を格納するためのメ
モリである。ラッチ回路110,111はCPU201
のバス情報をその複数バスサイクルに亘って貯えること
ができるバッファ手段であり、上記CPU201のバス
情報を夫々が並列的に受けると共に夫々の出力が上記ト
レースメモリ100のデータ入力端子に接続される。書
込み制御回路120はCPU201が出力するリード信
号203、ライト信号204、分岐信号205、及びプ
ログラムフェッチ信号206を参照しながらラッチ回路
110,111のラッチ制御信号121,122とトレ
ースメモリ100に対する書込み制御信号123及び書
込みアドレス信号124とを生成して、トレースメモリ
100に格納すべきバス情報を選択制御する。読出し制
御回路130はトレースメモリ100を書込み順序と同
じ順序で読出し制御する読出し制御信号131及び読出
しアドレス信号132を生成する。
The trace device 1 comprises a trace memory 1
00, latch circuits 110 and 111, write control circuit 12
0, and a read control circuit 130. The trace memory 100 is a memory for storing bus information of the CPU 201. The latch circuits 110 and 111 are the CPU 201.
Of bus information of the CPU 201 are received in parallel, and their outputs are connected to the data input terminal of the trace memory 100. The write control circuit 120 refers to the read signal 203, the write signal 204, the branch signal 205, and the program fetch signal 206 output from the CPU 201, and the latch control signals 121 and 122 of the latch circuits 110 and 111 and the write control signal for the trace memory 100. 123 and the write address signal 124 are generated to selectively control the bus information to be stored in the trace memory 100. The read control circuit 130 generates a read control signal 131 and a read address signal 132 for controlling the read of the trace memory 100 in the same order as the write order.

【0023】上記書込み制御回路120は、上記ラッチ
制御信号121,122によって2個のラッチ回路11
0,111に対しCPU201の命令フェッチサイクル
毎に並列的なラッチ動作を許容する。その後、上記分岐
信号205によってプログラムの実行順序が次の命令フ
ェッチサイクルで変化されることを検出したとき当該次
の命令フェッチサイクルの終了まで一方のラッチ回路1
10のラッチ動作を禁止することにより、2個のラッチ
回路110,111に夫々前後の命令フェッチのバス情
報をラッチさせ、また、プログラムフェッチ信号20
6、リード信号203、ライト信号204によって命令
以外のデータアクセスを検出したときに当該バスサイク
ルにおいて一方のラッチ回路110のラッチ動作を禁止
することによって2個のラッチ回路110,111に当
該データアクセスのバス情報とその直前の命令フェッチ
のバス情報とをラッチさせる。そして、ラッチ制御信号
121,122による排他的なラッチ動作の完了後、書
込み制御回路120はトレースメモリ100に書込み制
御信号123と書込みアドレス信号124を与え、ラッ
チ回路110,111にラッチされた2バスサイクル分
のバス情報を一括的に又は連続的にトレースメモリ10
0に書込むための制御を実行する。本実施例に従えば、
トレースメモリ100に対する書込み動作中には双方の
ラッチ回路110,111のラッチ動作が禁止される。
ラッチ動作の禁止期間は、トレースメモリ100のメモ
リサイクル以上とされるところのCPU201の複数の
バスサイクル期間とされ、予じめ決定されている。トレ
ースメモリ100のデータ入力段に別のデータラッチ回
路を設けておけばそのようなラッチ動作の禁止は行われ
なくてもよい。
The write control circuit 120 uses the latch control signals 121 and 122 to generate two latch circuits 11.
For 0 and 111, parallel latch operation is permitted for each instruction fetch cycle of the CPU 201. After that, when it is detected by the branch signal 205 that the program execution order is changed in the next instruction fetch cycle, one latch circuit 1 until the end of the next instruction fetch cycle.
By prohibiting the latch operation of 10, the two latch circuits 110 and 111 are made to latch the bus information of the preceding and following instruction fetches respectively, and the program fetch signal 20
6, when the data access other than the instruction is detected by the read signal 203 and the write signal 204, the latch operation of one of the latch circuits 110 is prohibited in the bus cycle, so that the two latch circuits 110 and 111 can be accessed. The bus information and the bus information of the instruction fetch immediately before that are latched. Then, after the exclusive latch operation by the latch control signals 121 and 122 is completed, the write control circuit 120 gives the write control signal 123 and the write address signal 124 to the trace memory 100, and the two buses latched by the latch circuits 110 and 111. Cycle information of the bus for one cycle is collectively or continuously provided.
Perform control to write to 0. According to this embodiment,
During the write operation to the trace memory 100, the latch operation of both latch circuits 110 and 111 is prohibited.
The inhibition period of the latch operation is a plurality of bus cycle periods of the CPU 201, which is equal to or longer than the memory cycle of the trace memory 100, and is determined in advance. If another data latch circuit is provided in the data input stage of the trace memory 100, such a latch operation need not be prohibited.

【0024】ラッチ制御信号121,122によるラッ
チタイミングは全てのバス情報がバス200上で確定さ
れるタイミングとされ、例えば、リードサイクルにおい
てはリード信号203のアクティブレベル(例えばロー
レベル)への変化タイミングに同期して所定時間遅延さ
れた後に行われ、ライトサイクルにおいてはライト信号
204のアクティブレベル(例えばローレベル)への変
化タイミングに同期して所定時間遅延された後に行われ
る。
The latch timing by the latch control signals 121 and 122 is the timing at which all the bus information is fixed on the bus 200. For example, in the read cycle, the change timing of the read signal 203 to the active level (for example, low level). It is performed after being delayed for a predetermined time in synchronism with, and in the write cycle, after being delayed for a predetermined time in synchronization with the change timing of the write signal 204 to the active level (for example, low level).

【0025】図2にはトレースメモリ100に対する書
込み動作の一例タイミングチャートが示される。同図に
示されるバスサイクル1からバスサイクル7はプログラ
ムフェッチ(命令フェッチとも記す)のサイクルとさ
れ、バスサイクル8はデータライトのバスサイクルとさ
れる。命令は単一バスサイクルでフェッチ可能な語長に
限定されず、複数バスサイクルを要するものであっても
よい。この例に従えば、バスサイクル3は分岐命令によ
って分岐された処理ルーチンの先頭命令アドレス(11
00番地)に対する命令フェッチサイクルとされてい
る。分岐信号205は、分岐命令が実行されるときには
アクティブなローレベルにされる。例えば、分岐命令が
複数語から成り、既にフェッチされたその先頭語がデコ
ードされた状態で最終語がフェッチされるとするなら、
当該最終語のフェッチに並行して分岐信号205がアク
ティブにされる。また、既にプリフェッチされた分岐命
令がパイプラインステージの命令デコード段で処理され
ているとき、これに並行して別の命令のプリフェッチが
バスサイクル2で起動される場合にはそれに並行して分
岐信号205がアクティブにされる。
FIG. 2 shows a timing chart of an example of the write operation to the trace memory 100. The bus cycles 1 to 7 shown in the figure are program fetch (also referred to as instruction fetch) cycles, and the bus cycle 8 is a data write bus cycle. The instruction is not limited to a word length that can be fetched in a single bus cycle, and may require a plurality of bus cycles. According to this example, the bus cycle 3 is the start instruction address (11) of the processing routine branched by the branch instruction.
This is an instruction fetch cycle for address 00). The branch signal 205 is set to an active low level when the branch instruction is executed. For example, if the branch instruction consists of multiple words and the last word is fetched with the first word already fetched being decoded,
The branch signal 205 is activated in parallel with the fetch of the final word. Further, when a prefetched branch instruction is being processed in the instruction decode stage of the pipeline stage, if a prefetch of another instruction is activated in the bus cycle 2 in parallel with this, a branch signal is issued in parallel with it. 205 is activated.

【0026】図2には上記ラッチ制御信号121,12
2は示されていない。その代わりにラッチ回路110の
取込許可信号121Pとラッチ回路111の取込許可信
号122Pとが示されている。それら取込許可信号12
1P,122Pは書込み制御回路120の内部制御信号
と理解されたい。書込み制御回路120は、書込み許可
信号121P,122Pがアクティブレベル(例えばロ
ーレベル)であるときリード信号203やライト信号2
04に同期して全てのバス情報が確定するタイミング
(リード信号203やライト信号204のアクティブレ
ベルへの変化から所定時間遅延されたタイミング)に同
期してラッチ制御信号121,122をクロック的に変
化させる。これによってラッチ回路110,111はラ
ッチ動作を実行する。
FIG. 2 shows the latch control signals 121 and 12 described above.
2 is not shown. Instead, a fetch permission signal 121P of the latch circuit 110 and a fetch permission signal 122P of the latch circuit 111 are shown. Those acquisition permission signals 12
It should be understood that 1P and 122P are internal control signals of the write control circuit 120. The write control circuit 120 reads the read signal 203 and the write signal 2 when the write enable signals 121P and 122P are at the active level (for example, low level).
The latch control signals 121 and 122 are changed in clock in synchronization with the timing at which all the bus information is determined in synchronization with 04 (the timing delayed from the change of the read signal 203 or the write signal 204 to the active level for a predetermined time). Let As a result, the latch circuits 110 and 111 perform the latch operation.

【0027】図2に従えば、書込み制御回路120は分
岐信号205がローレベルからハイレベルにされたのを
検出すると(バスサイクル2)、次のバスサイクル3か
らたとえば4サイクル分ラッチ回路110の取込許可信
号121Pをインアクティブなハイレベルに制御してラ
ッチ回路111のラッチ動作だけを許可する。その後、
書込み制御回路120は取込許可信号121Pのインア
クティブなレベルへの変化に応答し、ラッチ回路111
の取込許可信号122Pもインアクティブなハイレベル
に制御してラッチ回路110と共にラッチ回路111も
バスサイクル6までの間ラッチ動作を禁止させる。ま
た、書込み制御回路120はプログラムフェッチ信号2
06がインアクティブなハイレベルにされたのを検出す
ると(バスサイクル8)、上記同様に当該バスサイクル
からたとえば4サイクル分ラッチ回路110の取込許可
信号121Pをインアクティブなハイレベルに制御して
ラッチ回路111のラッチ動作だけを許可する。その
後、書込み制御回路120はラッチ回路111の取込許
可信号122Pもインアクティブなハイレベルに制御し
てラッチ回路110と共にラッチ回路111のラッチ動
作を禁止する。
According to FIG. 2, when the write control circuit 120 detects that the branch signal 205 has been changed from the low level to the high level (bus cycle 2), the latch circuit 110 for the next bus cycle 3 for, for example, 4 cycles. The capture permission signal 121P is controlled to an inactive high level to permit only the latch operation of the latch circuit 111. afterwards,
The write control circuit 120 responds to the change of the capture enable signal 121P to the inactive level, and responds to the latch circuit 111.
The latch enable signal 122P is also controlled to an inactive high level, and the latch circuit 110 and the latch circuit 111 inhibit the latch operation until the bus cycle 6. In addition, the write control circuit 120 uses the program fetch signal 2
When it is detected that 06 is set to the inactive high level (bus cycle 8), the fetch enable signal 121P of the latch circuit 110 is controlled to the inactive high level for four cycles from the bus cycle in the same manner as described above. Only the latch operation of the latch circuit 111 is permitted. After that, the write control circuit 120 also controls the capture enable signal 122P of the latch circuit 111 to be an inactive high level to inhibit the latch operation of the latch circuit 111 together with the latch circuit 110.

【0028】このように、バスサイクル2,3とバスサ
イクル7,8では排他的なラッチ動作が行われる。これ
によって、バスサイクル4の開始時点においてラッチ回
路110にはバスサイクル2における命令フェッチの全
てのバス情報が保持され、ラッチ回路111には分岐先
ルーチンの先頭命令のフェッチに関する全てのバス情報
が保持される。書込み制御回路120はラッチ回路11
1のラッチ動作が禁止されるバスサイクル4からバスサ
イクル6の期間にトレースメモリ100に書込み制御信
号123と更新された書込みアドレス信号124を供給
し、ラッチ回路110,111に保持された全てのバス
情報をその期間に並列的にトレースメモリに書込み制御
する。同様に、バスサイクル8の終了時点において、ラ
ッチ回路111にはデータライトに関する全てのバス情
報が保持され、ラッチ回路110にはその直前の命令フ
ェッチ即ちバスサイクル7における命令フェッチの全て
のバス情報が保持される。その後、書込み制御回路12
0はラッチ回路110及び111の双方のラッチ動作が
禁止される期間にトレースメモリ100に書込み制御信
号123と更新された書込みアドレス信号124を供給
し、ラッチ回路110,111に保持された全てのバス
情報をその期間に並列的にトレースメモリに書込み制御
する。図2の例に従えば、トレースメモリ100はCP
U201のバスサイクルに対して3倍の書込みサイクル
を持つような低速メモリであっても、連続する2バスサ
イクル分のバス情報をトレースメモリ100に格納でき
る。
In this way, the exclusive latch operation is performed in the bus cycles 2 and 3 and the bus cycles 7 and 8. As a result, at the start of the bus cycle 4, the latch circuit 110 holds all the bus information about the instruction fetch in the bus cycle 2, and the latch circuit 111 holds all the bus information about the fetch of the first instruction of the branch destination routine. To be done. The write control circuit 120 is the latch circuit 11
The write control signal 123 and the updated write address signal 124 are supplied to the trace memory 100 during the period from the bus cycle 4 to the bus cycle 6 in which the latch operation of 1 is prohibited, and all the buses held by the latch circuits 110 and 111. Information is controlled to be written in the trace memory in parallel during the period. Similarly, at the end of the bus cycle 8, the latch circuit 111 holds all the bus information related to the data write, and the latch circuit 110 holds the immediately preceding instruction fetch, that is, all the bus information of the instruction fetch in the bus cycle 7. Retained. After that, the write control circuit 12
0 supplies the write control signal 123 and the updated write address signal 124 to the trace memory 100 during the period in which the latch operation of both the latch circuits 110 and 111 is prohibited, and all the buses held by the latch circuits 110 and 111. Information is controlled to be written in the trace memory in parallel during the period. According to the example of FIG. 2, the trace memory 100 has a CP
Even a low-speed memory having a write cycle three times as large as the bus cycle of U201 can store bus information for two consecutive bus cycles in the trace memory 100.

【0029】図3には書込み制御回路120による制御
態様(モード)の全体が分類して示される。図3のno
の欄に記載された数字は図2に示されるno.2〜n
o.4、no.6、no.7に対応される。
In FIG. 3, the entire control modes (modes) by the write control circuit 120 are classified and shown. No in FIG.
The numbers described in the columns of No. are shown in FIG. 2 to n
o. 4, no. 6, no. Corresponding to 7.

【0030】図3のno.2に示されるように双方のラ
ッチ回路110,111のラッチ動作はプログラムフェ
ッチの場合に許可される。
No. 1 in FIG. As shown in FIG. 2, the latch operation of both latch circuits 110 and 111 is permitted in the case of program fetch.

【0031】図3のno.3で示されるようにプログラ
ムフェッチではないデータのリード/ライトでは、プロ
グラムフェッチではないため一方のラッチ回路110の
ラッチ動作が禁止され、ラッチ回路111にバス情報が
ラッチされる。次いで、双方のラッチ回路110,11
1の取込許可信号121P,122Pがオフ(off)
状態即ちインアクティブにされ、その期間にラッチ回路
110,111の保持データがトレースメモリ100に
書込まれる。書込み後に双方の取込許可信号121P,
122Pがオン(on)状態即ちアクティブに戻され
る。
No. 1 in FIG. As indicated by 3, the read / write of data that is not a program fetch prohibits the latch operation of one latch circuit 110 because it is not a program fetch, and the latch circuit 111 latches the bus information. Then, both latch circuits 110, 11
1 take-in permission signals 121P and 122P are off (off)
The state is made inactive, that is, the data held in the latch circuits 110 and 111 is written in the trace memory 100 during that period. After writing, both capture enable signals 121P,
122P is returned to the on state or active.

【0032】図3のno.4で示されるように分岐命令
が実行されると共にプログラムフェッチが行われるサイ
クルでは、分岐信号205とプログラムフェッチ信号2
06がアクティブにされ、双方のラッチ回路110,1
11は当該プログラムフェッチのバス情報をラッチし、
その後でラッチ回路110の取込許可信号121Pがイ
ンアクティブなオフ状態にされる。分岐命令が実行され
ると共にプログラムフェッチが行われるサイクルは、例
えば当該バスサイクルでフェッチされた命令それ自体が
分岐命令の最終語であってその先頭語が実行される場合
と、プリフェッチ或はパイプライン的な命令実行によっ
て既にフェッチされている分岐命令が実行される場合と
がある。
No. 1 in FIG. In the cycle in which the branch instruction is executed and the program fetch is performed as indicated by 4, the branch signal 205 and the program fetch signal 2
06 is activated and both latch circuits 110, 1
11 latches the bus information of the program fetch,
After that, the acquisition permission signal 121P of the latch circuit 110 is set to the inactive off state. The cycle in which the branch instruction is executed and the program is fetched is, for example, a case where the instruction itself fetched in the bus cycle is the last word of the branch instruction and the first word thereof is executed, prefetch or pipeline. In some cases, a branch instruction that has already been fetched may be executed by executing a specific instruction.

【0033】図3のno.5には分岐命令が実行される
と共にプログラムフェッチではないデータのリード/ラ
イトが行われるサイクルについて示される。このような
サイクルは既にプリフェッチされた分岐命令が実行され
るときに別のパイプラインステージのデータリード/ラ
イトアクセスが先に行われるような場合である。分岐先
の命令のフェッチサイクルはその後で起動されることに
なる。no.5の状態は、no.3とno.4の状態が
競合するような状態であるが、その後の分岐先の命令フ
ェッチサイクルのバス情報を優先的にトレース可能にす
るものである。すなわち、この状態において、分岐信号
205はアクティブにされるがプログラムフェッチ信号
206がインアクティブにされ、一方のラッチ回路11
0はラッチ動作が禁止され、ラッチ回路111のみラッ
チ動作される。その後、一方のラッチ回路110の取込
許可信号121Pはオフ状態に維持される。すなわち、
それ以前にラッチされた命令フェッチのバス情報をラッ
チ回路110に維持させ、分岐先の命令フェッチサイク
ルのバス情報を後からラッチ回路111にラッチ可能に
するためである。
No. 1 in FIG. 5 shows a cycle in which a branch instruction is executed and data is read / written other than program fetch. Such a cycle is a case where the data read / write access of another pipeline stage is performed first when the prefetched branch instruction is executed. The fetch cycle of the branch destination instruction will be activated after that. no. The state of No. 5 is no. 3 and no. Although the states of 4 are in conflict with each other, the bus information of the instruction fetch cycle of the subsequent branch destination is preferentially traceable. That is, in this state, the branch signal 205 is made active, but the program fetch signal 206 is made inactive, so that one latch circuit 11
For 0, the latch operation is prohibited, and only the latch circuit 111 is latched. After that, the acquisition permission signal 121P of the one latch circuit 110 is maintained in the off state. That is,
This is to allow the latch circuit 110 to maintain the bus information of the instruction fetch that was latched before that, and to allow the latch circuit 111 to later latch the bus information of the instruction fetch cycle of the branch destination.

【0034】図3のno.6はno.4又はno.5の
後にプログラムフェッチのバスサイクルが発生したとき
の処理である。この場合には、ラッチ回路111に当該
バス情報がラッチされる。次いで、双方のラッチ回路1
10,111の取込許可信号121P,122Pがオフ
(off)状態にされ、その期間にラッチ回路110,
111の保持データがトレースメモリ100に書込まれ
る。書込み後に双方の取込許可信号121P,122P
がオン状態に戻される。
No. 1 in FIG. 6 is no. 4 or no. This is processing when a bus cycle of program fetch occurs after 5. In this case, the bus information is latched in the latch circuit 111. Then, both latch circuits 1
The capture enable signals 121P and 122P of 10, 111 are turned off, and the latch circuit 110,
The held data of 111 is written in the trace memory 100. After writing, both capture enable signals 121P and 122P
Is turned back on.

【0035】上記以外の態様はトレースメモリ100へ
の書込み動作中である。書込み動作中に仮にno.3,
no.4、no.5の状態が発生した場合にはそれに対
応されるトレース動作は行われないが、そのような状態
が頻繁に連続しない限りプログラムを参照することによ
ってその状態を補間すれば、プログラムの実行軌跡を追
うことに実質的な支障はない。
In the modes other than the above, the writing operation to the trace memory 100 is in progress. If no. Three
no. 4, no. When the state 5 occurs, the trace operation corresponding to the state 5 is not performed, but if such a state does not continue frequently, if the state is interpolated by referring to the program, the execution trajectory of the program is followed. There is no practical problem.

【0036】図3に示されるような処理を繰り返し実行
することにより、CPU201が実行したプログラム動
作のうち、データリード/ライトを行なった直前の命令
フェッチのバス情報とそのデータリード/ライトのバス
情報、そして、プログラムの実行順序が変化した直前の
プログラムフェッチのバス情報とその直後の命令フェッ
チのバス情報が、プログラムの実行順序にしたがってト
レースメモリ100に蓄積される。なお、データリード
/ライトと分岐が重なった場合は図3のno.5で示さ
れるように分岐の処理に関するバス情報のトレースが優
先されることになる。尚、図3のno.1は、ラッチ回
路110,111の取込許可信号121P,122Pが
オン状態にされる初期状態を示している。
By repeatedly executing the processing shown in FIG. 3, among the program operations executed by the CPU 201, the bus information of the instruction fetch immediately before the data read / write and the bus information of the data read / write are executed. The bus information of the program fetch immediately before the execution order of the program is changed and the bus information of the instruction fetch immediately after that are accumulated in the trace memory 100 according to the execution order of the program. If the data read / write and the branch overlap, no. As indicated by 5, the trace of the bus information regarding the processing of the branch has priority. Incidentally, no. Reference numeral 1 denotes an initial state in which the latch enable signals 121P and 122P of the latch circuits 110 and 111 are turned on.

【0037】次に、トレースメモリ100に蓄積したバ
ス情報の読み出し動作と、その情報をデコードしてCP
U201の実行結果として編集し、表示する処理につい
て説明する。
Next, the read operation of the bus information accumulated in the trace memory 100 and the decoding of the information are performed to CP.
A process of editing and displaying the execution result of U201 will be described.

【0038】上記読出し制御回路130は上記バス情報
の読み出し制御信号131と読出しアドレス信号132
生成し、トレースメモリ100からバス情報を書込み順
と同一の順序で読出す。読み出されたバス情報はデコー
ド部3に供給される。デコード部3は、その情報がプロ
グラムフェッチに関するバス情報かデータリード/ライ
トのようなバスアクセスに関するバス情報かの判別を行
い、それに従って当該バス情報を編集し、その内容を順
番に表示装置5に表示する。プログラムフェッチについ
ては逆アセンブルして表示するか、別途、コンパイラな
どの言語処理プログラムで出力されたオブジェクトプロ
グラムを補助記憶装置4から取り込み、オブジェクトプ
ログラムに含まれるソースプログラムのファイル名情報
及びソース行毎のアドレス情報から、プログラムフェッ
チアドレスに対応するソースプログラムファイル内のソ
ース行を取り出し、編集をして表示する。トレース情報
には分岐直前の命令フェッチアドレスと分岐直後の命令
フェッチアドレスが取得できているため、分岐直後から
分岐直前までの範囲のソース行を表示することによりト
レースメモリに取得できていない部分のソースプログラ
ム行を表示できる。データリード/ライトについては有
効な制御信号を編集して表示する。図1の表示装置5に
おける表示例において、記号*の付された行はソースコ
ードの記述行であり、その下には命令アドレスとオブジ
ェクトコードが表示されている。
The read control circuit 130 reads the bus information read control signal 131 and read address signal 132.
It is generated and the bus information is read from the trace memory 100 in the same order as the writing order. The read bus information is supplied to the decoding unit 3. The decoding unit 3 determines whether the information is bus information related to program fetch or bus access such as data read / write, edits the bus information according to the information, and sequentially displays the contents on the display device 5. indicate. The program fetch is displayed by disassembling, or a separate object program output by a language processing program such as a compiler is fetched from the auxiliary storage device 4, and the file name information and the source line of the source program included in the object program are stored. The source line in the source program file corresponding to the program fetch address is fetched from the address information, edited, and displayed. Because the instruction fetch address immediately before the branch and the instruction fetch address immediately after the branch can be acquired in the trace information, the source line that is not acquired in the trace memory can be displayed by displaying the source lines in the range immediately after the branch to immediately before the branch. Can display program lines. For data read / write, a valid control signal is edited and displayed. In the display example on the display device 5 of FIG. 1, the line marked with * is the description line of the source code, and the instruction address and the object code are displayed below it.

【0039】図4には上記トレース装置1を適用したエ
ミュレータが示される。同図に示されるエミュレータ6
は、親計算機のようなホストシステム7と、デバッグ対
象とされる組込み機器としてのマイクロコンピュータシ
ステム(ターゲットシステムとも記す)8との間に接続
され、そのターゲットシステム8を本来制御すべきター
ゲットマイクロコンピュータの機能を代行する一方でデ
バッガとしての機能を持ち、詳細なシステム評価やプロ
グラムデバッグを支援する。ホストシステム7とエミュ
レータ6とは例えばシリアル回線71などによって結合
される。ターゲットシステム8とエミュレータ6はイン
タフェースケーブル81によって接続される。すなわ
ち、インタフェースケーブル81の先端が、ターゲット
システム8のターゲットマイクロコンピュータ用ソケッ
ト80に結合されることにより、エミュレータ6がター
ゲットシステム8を代行制御する。上記エミュレータ6
及びホストシステム7がデバッグツールを構成する。
FIG. 4 shows an emulator to which the tracing device 1 is applied. Emulator 6 shown in FIG.
Is connected between a host system 7 such as a parent computer and a microcomputer system (also referred to as a target system) 8 as an embedded device to be debugged, and a target microcomputer that should originally control the target system 8. While substituting the function of, it has a function as a debugger and supports detailed system evaluation and program debugging. The host system 7 and the emulator 6 are connected by a serial line 71 or the like, for example. The target system 8 and the emulator 6 are connected by an interface cable 81. That is, the tip of the interface cable 81 is coupled to the target microcomputer socket 80 of the target system 8 so that the emulator 6 controls the target system 8 on its behalf. Emulator 6
And the host system 7 constitutes a debug tool.

【0040】上記エミュレータ6は、特に制限されない
が、ターゲットシステム8を本来制御すべきターゲット
マイクロコンピュータの機能を代行するためのエミュレ
ーション用データプロセッサ60と、エミュレーション
のための条件設定などエミュレータ全体の制御を司るた
めのコントロール用データプロセッサ61を備える。エ
ミュレーション用データプロセッサ60は、エミュレー
ションバス62に結合され、コントロール用データプロ
セッサ61はコントロールバス63に結合され、双方の
バス62,63には、エミュレーション制御回路64、
ブレーク制御回路65、トレース装置1、代行メモリ回
路67が夫々接続される。エミュレーション用データプ
ロセッサ60は、ターゲットシステム8のために開発さ
れ若しくは開発途上のターゲットプログラムを実行して
ターゲットシステム8を代行制御する途上において、タ
ーゲットシステム8との間でやりとりされるアドレス並
びにデータなどの各種バス情報や制御信号などはエミュ
レーションバス62にも与えられる。このようにして与
えられた情報は、上述のようにしてエミュレーション用
データプロセッサ60のバスサイクルに従って、本発明
に従うトレース装置1にトレースされる。また、ブレ−
ク制御回路65は、たとえばエミュレーション用データ
プロセッサによるターゲットプログラムの実行を所望の
命令アドレスで中断させるため、上記所望の命令アドレ
スをブレークアドレス情報(ブレーク条件)として格納
している。エミュレーションバス62の状態をブレーク
制御回路65が監視して、ターゲットプログラムの実行
が予め設定されているブレークアドレス(ブレーク条
件)に到達したときにエミュレーション動作を停止させ
るための制御を実行する。上記代行メモリ回路67は、
ターゲットシステム8に未だ用意されていないメモリを
補うための記憶領域や、ターゲットプログラムの格納領
域として利用される。ブレーク制御回路65に対するブ
レーク条件の設定や、トレース装置1に対するトレース
開始アドレスの設定などの各種条件設定や初期設定はコ
ントロールバス63を介してコントロール用データプロ
セッサ61が行う。上記ブレーク制御回路65によって
エミュレーション動作が停止されている状態において、
トレース装置1が保有するトレース情報はコントロール
バス63に読出され、読出された情報はコントロール用
プロセッサ61がホストインタフェース68を通じホス
トシステム7に転送する。ホストシステム7は転送され
たトレース情報を表示したりその解析を行ったりしてデ
バッグを支援する。この実施例において、図1に示され
るデコード部3、補助記憶装置4、及び表示装置5はホ
ストシステム7に設けられている。また、読出し制御回
路130はコントロールデータプロセッサ61によって
実現してもよい。
The emulator 6 is not particularly limited, but controls the entire emulator such as the emulation data processor 60 for substituting the function of the target microcomputer which should originally control the target system 8 and the condition setting for emulation. A control data processor 61 for controlling is provided. The emulation data processor 60 is coupled to an emulation bus 62, the control data processor 61 is coupled to a control bus 63, and both buses 62 and 63 have an emulation control circuit 64,
The break control circuit 65, the trace device 1, and the proxy memory circuit 67 are connected to each other. The emulation data processor 60 stores addresses and data exchanged with the target system 8 while executing the target program developed for the target system 8 or executing the target program to control the target system 8 on behalf of the target system 8. Various bus information and control signals are also given to the emulation bus 62. The information thus provided is traced by the tracing device 1 according to the present invention in accordance with the bus cycle of the emulation data processor 60 as described above. In addition,
The control circuit 65 stores the desired instruction address as break address information (break condition) in order to suspend the execution of the target program by the emulation data processor at the desired instruction address, for example. The break control circuit 65 monitors the state of the emulation bus 62, and executes control for stopping the emulation operation when the execution of the target program reaches a preset break address (break condition). The proxy memory circuit 67 is
It is used as a storage area for supplementing a memory not yet prepared in the target system 8 and a storage area for the target program. The control data processor 61 carries out setting of various conditions such as setting of break conditions for the break control circuit 65 and setting of a trace start address for the trace device 1 and initial setting via the control bus 63. When the emulation operation is stopped by the break control circuit 65,
The trace information held by the trace device 1 is read to the control bus 63, and the read information is transferred by the control processor 61 to the host system 7 through the host interface 68. The host system 7 supports debugging by displaying the transferred trace information and analyzing it. In this embodiment, the decoding unit 3, the auxiliary storage device 4, and the display device 5 shown in FIG. 1 are provided in the host system 7. The read control circuit 130 may be realized by the control data processor 61.

【0041】上記実施例によれば以下の作用効果があ
る。 (1)複数バスサイクル分のバス情報を一時的に蓄積可
能な一対のラッチ回路110,111を備えるから、書
込み制御回路120は、分岐信号205に基づいて分岐
命令や割込み受け付けといった命令実行の流れが変化さ
れる直前/直後の命令フェッチのバス情報を一対のラッ
チ回路110,111に取込んで並列的にトレースメモ
リ100への書込みを実現し、命令実行の流れが変化さ
れた場合にもプログラムの流れを追えるようにすること
ができる。同様に書込み制御回路120は、プログラム
フェッチ信号206などに基づいて、データアクセス時
のバス情報とその直前の命令フェッチのバス情報を一対
のラッチ回路110,111に取込んでトレースメモリ
100への書込みを実現し、プログラムの実行軌跡の解
析に当たり、命令実行に伴うオペランド取得など実際の
データアクセスの状況を把握できるようにする。これら
によって、ソフトウェアデバッグ若しくはシステムデバ
ッグに必要な情報を少ないメモリ容量で能率的に取得す
ることを達成する。分岐命令や割込み受け付けといった
命令実行の流れが変化される直前/直後の命令フェッチ
のバス情報を一対のラッチ回路110,111に取込ん
だとき、分岐先に先頭の命令フェッチに関するバス情報
は確実に取得されるので、その直前の命令フェッチに関
するバス情報が分岐命令でなくても、ソースプログラム
若しくはオブジェクトプログラムの記述と共にパイプラ
イン段数やプリフェッチ段数などを参照することによっ
て該当する分岐命令を追うことができる。同様にデータ
アクセス時のバス情報とその直前の命令フェッチのバス
情報を一対のラッチ回路110,111に取込んだと
き、当該データアクセスを実行させた命令がその直前の
命令フェッチサイクルでフェッチされていなくても、ソ
ースプログラム若しくはオブジェクトプログラムの記述
と共にパイプライン段数やプリフェッチ段数などを参照
することによって当該直前の命令フェッチのバス情報か
ら該当するデータアクセスを起動した命令を特定でき
る。
According to the above embodiment, there are the following effects. (1) Since the write control circuit 120 is provided with the pair of latch circuits 110 and 111 capable of temporarily storing bus information for a plurality of bus cycles, the write control circuit 120 executes an instruction flow such as a branch instruction or interrupt acceptance based on the branch signal 205. Is fetched into the pair of latch circuits 110 and 111 immediately before / after the change of the instruction, and writing to the trace memory 100 is realized in parallel, and the program is executed even when the instruction execution flow is changed. Can be followed. Similarly, the write control circuit 120 fetches the bus information at the time of data access and the bus information of the instruction fetch immediately before that into the pair of latch circuits 110 and 111 based on the program fetch signal 206 and the like, and writes it to the trace memory 100. In order to analyze the execution locus of the program, it is possible to grasp the actual data access status such as operand acquisition associated with instruction execution. As a result, it is possible to efficiently obtain the information necessary for software debugging or system debugging with a small memory capacity. When the bus information of the instruction fetch just before / after the change of the instruction execution flow such as the branch instruction or the interrupt acceptance is fetched into the pair of latch circuits 110 and 111, the bus information regarding the first instruction fetch at the branch destination is surely obtained. Even if the bus information related to the instruction fetch immediately before that is not a branch instruction, the branch instruction can be tracked by referring to the source program or object program description and the pipeline stage number or prefetch stage number, etc. . Similarly, when the bus information at the time of data access and the bus information of the instruction fetch immediately before that are fetched into the pair of latch circuits 110 and 111, the instruction that caused the data access is fetched in the instruction fetch cycle immediately before that. Even if the instruction does not exist, the instruction that started the corresponding data access can be specified from the bus information of the instruction fetch immediately before by referring to the number of pipeline stages or the number of prefetch stages along with the description of the source program or the object program.

【0042】(2)上記ラッチ回路110,111の夫
々は命令フェッチサイクル毎にバス情報をラッチし、そ
のラッチ動作が排他的に制御されることにより全体とし
て2バスサイクル数のバス情報を保持する。排他的なラ
ッチ動作のきっかけは分岐命令の実行や割込み受け付け
といった命令実行の流れが変化される第1の状態と命令
フェッチ以外のデータアクセスが行われる第2の状態の
夫々に呼応され、排他的ラッチ動作の完了後に当該ラッ
チされたバス情報は全て並列的にトレースメモリ100
に書込まれる。したがって、トレースメモリ100のア
クセス速度がバスサイクルよりも低速であっても複数の
バス情報を書込みすることができる。
(2) Each of the latch circuits 110 and 111 latches the bus information for each instruction fetch cycle, and the latch operation is exclusively controlled to hold the bus information of two bus cycles as a whole. . The exclusive latch operation is triggered in response to each of the first state in which the flow of instruction execution such as branch instruction execution and interrupt acceptance is changed and the second state in which data access other than instruction fetch is performed, and the exclusive latch operation is performed. After the completion of the latch operation, all the bus information latched is parallel to the trace memory 100.
Written in. Therefore, a plurality of pieces of bus information can be written even if the access speed of the trace memory 100 is slower than the bus cycle.

【0043】(3)2個のラッチ回路110,111に
対する排他的なラッチ動作のきっかとして利用される情
報、即ち、分岐命令の実行や割込み受け付け処理の実行
に同期してアクティブレベルにされる分岐信号205の
ような第1の情報、そしてプログラムフェッチ信号20
6、リード信号203及びライト信号204のような第
2の情報は、CPU201が出力するバス情報に含まれ
る情報であるから、これを直接利用して2個のラッチ回
路110,111の排他的ラッチ動作制御を行う書込み
制御回路120の論理構成を著しく簡素化できる。すな
わち、双方のラッチ回路110,111のラッチ動作が
命令フェッチサイクルで許容された後、分岐信号205
によって示される第1の状態が検出された後のバスサイ
クルではその直後の命令フェッチサイクルが終了される
までラッチ回路110のラッチ動作を禁止し、また、プ
ログラムフェッチ信号206などによって示されるデー
タアクセスサイクルではラッチ回路110のラッチ動作
を禁止して、夫々のラッチ回路にプログラムのデバッグ
に重要な情報であるデータリード/ライト時のバス情報
とその直前のプログラムフェッチのバス情報、及びプロ
グラムの実行順序が変化する直前/直後のプログラムフ
ェッチのバス情報をラッチできる。
(3) Information used as a trigger for exclusive latch operation for the two latch circuits 110 and 111, that is, set to an active level in synchronization with execution of a branch instruction or execution of interrupt acceptance processing. First information, such as branch signal 205, and program fetch signal 20
6, the second information such as the read signal 203 and the write signal 204 is the information included in the bus information output by the CPU 201, and thus is directly used to exclusively latch the two latch circuits 110 and 111. The logical configuration of the write control circuit 120 that controls the operation can be significantly simplified. That is, after the latch operation of both latch circuits 110 and 111 is permitted in the instruction fetch cycle, the branch signal 205
In the bus cycle after the detection of the first state indicated by, the latch operation of the latch circuit 110 is prohibited until the instruction fetch cycle immediately after that is detected, and the data access cycle indicated by the program fetch signal 206 or the like. Then, the latch operation of the latch circuit 110 is prohibited, and the bus information at the time of data read / write, which is important information for debugging the program, the bus information of the program fetch immediately before that, and the execution order of the program are stored in each latch circuit. The bus information of the program fetch immediately before / after the change can be latched.

【0044】(4)トレースメモリ100への書込み動
作中において、書込み制御回路120はその期間中ラッ
チ回路のラッチ動作を禁止して上記バス情報が書換えら
れるのを阻止するから、トレースメモリには書込みデー
タの入力ラッチ回路などを特別に設けなくてもよい。
(4) During the write operation to the trace memory 100, the write control circuit 120 inhibits the latch operation of the latch circuit during that period to prevent the bus information from being rewritten, so the write operation to the trace memory is performed. A data input latch circuit or the like need not be specially provided.

【0045】(5)上記により、プログラムのデバッグ
に重要な情報であるデータリード/ライト時のバス情報
とその直前のプログラムフェッチのバス情報及びプログ
ラムの実行順序が変化する直前/直後のプログラムフェ
ッチのバス情報のみをバス情報が変化する速度以下の書
き込み速度でトレースメモリ100に格納していくこと
ができるので、CPU201の動作速度が高速であって
も非常に高速/高価なトレースメモリに代えて低速/廉
価なトレースメモリを利用できる。
(5) As described above, the bus information at the time of data read / write, which is important information for program debugging, the bus information of the program fetch immediately before that, and the program information immediately before / after the program execution order changes. Since only the bus information can be stored in the trace memory 100 at a writing speed that is less than or equal to the speed at which the bus information changes, even if the CPU 201 operates at a high speed, it can be replaced with a very high speed / expensive trace memory and a low speed. / Inexpensive trace memory can be used.

【0046】(6)トレース装置1を適用したエミュレ
ータ6は高速なデータプロセッサを応用したターゲット
システムのデバッグを可能にできる。また、そのような
エミュレータのコストを低減することができる。
(6) The emulator 6 to which the trace device 1 is applied can enable debugging of a target system to which a high speed data processor is applied. Also, the cost of such an emulator can be reduced.

【0047】以上本発明者によってなされた発明を実施
例に基づいて具体的に説明したが、本発明はそれに限定
されるものではなく、その要旨を逸脱しない範囲におい
て種々変更可能であることは言うまでもない。例えば、
第1の状態の検出はCPUが出力する分岐信号を利用す
る場合に限定されず、命令フェッチアドレスの不連続状
態によって検出してもよい。また、第2の状態はCPU
が出力するプログラムフェッチ信号によって行う場合に
限定されず、アドレスバス上のアドレスを命令メモリに
割当てられたアドレスと比較して検出するようにしても
よい。また、ラッチ回路は2段に限定される3段以上で
あってもよいが、その分制御は複雑になる。また、ラッ
チ回路のようなバッファ手段はフリップフロップのよう
なスタティックなラッチ回路で構成する場合に限定され
ない。
Although the invention made by the present inventor has been specifically described based on the embodiments, the present invention is not limited thereto, and needless to say, various modifications can be made without departing from the scope of the invention. Yes. For example,
The detection of the first state is not limited to the case of using the branch signal output from the CPU, but may be detected by the discontinuous state of the instruction fetch address. The second state is the CPU
However, the address on the address bus may be detected by comparing it with the address assigned to the instruction memory. Further, the latch circuit may have three or more stages, which is limited to two stages, but the control becomes complicated accordingly. Further, the buffer means such as the latch circuit is not limited to the case where it is configured by a static latch circuit such as a flip-flop.

【0048】本発明はバスのトレース装置、エミュレー
タ、そしてバスアナライザなどにも適用することができ
る。
The present invention can be applied to a bus trace device, an emulator, a bus analyzer and the like.

【0049】[0049]

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

【0050】すなわち、データアクセス時のバス情報と
その直前のプログラムフェッチのバス情報、そして分岐
命令や割込み受け付けといった命令実行の流れが変化さ
れる直前/直後のプログラムフェッチのバス情報を取得
できる。上記バス情報をその変化速度よりも低速のトレ
ースメモリを使って取得でき、トレース装置のコストを
低減できる。2個のラッチ回路に対する排他的なラッチ
動作のきっかとして利用する情報、即ち、分岐命令の実
行や割込み受け付け処理の実行に同期してアクティブレ
ベルにされる分岐信号のような第1の情報、そしてプロ
グラムフェッチ信号のような第2の情報は、データプロ
セッサが出力するバス情報に含まれる情報であるから、
これを直接利用して2個のラッチ回路の排他的ラッチ動
作制御を行う書込み制御手段の論理構成を著しく簡素化
できる。トレースメモリへの書込み動作中において、書
込み制御手段はその期間中ラッチ回路のラッチ動作を禁
止して上記バス情報が書換えられるのを阻止するから、
トレースメモリには書込みデータの入力ラッチ回路など
を特別に設けなくてもよい。トレース装置を適用したエ
ミュレータは高速なデータプロセッサを応用したターゲ
ットシステムのデバッグを可能にできる。また、そのよ
うなエミュレータのコストを低減することができる。
That is, the bus information at the time of data access, the bus information of the program fetch immediately before that, and the bus information of the program fetch immediately before / after the flow of instruction execution such as branch instruction and interrupt acceptance are changed can be acquired. The bus information can be obtained by using the trace memory which is slower than the changing speed, and the cost of the trace device can be reduced. Information used as a trigger for an exclusive latch operation for two latch circuits, that is, first information such as a branch signal that is set to an active level in synchronization with execution of a branch instruction or execution of interrupt acceptance processing, The second information such as the program fetch signal is the information included in the bus information output by the data processor,
By directly utilizing this, the logical configuration of the write control means for controlling the exclusive latch operation of the two latch circuits can be remarkably simplified. During the write operation to the trace memory, the write control means prohibits the latch operation of the latch circuit during that period to prevent the bus information from being rewritten.
It is not necessary to specially provide a write data input latch circuit or the like in the trace memory. An emulator that uses a trace device can enable debugging of a target system that uses a high-speed data processor. Also, the cost of such an emulator can be reduced.

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

【図1】本発明の一実施例に係るトレース装置のブロッ
ク図である。
FIG. 1 is a block diagram of a trace device according to an embodiment of the present invention.

【図2】トレースメモリに対する書込み動作の一例タイ
ミングチャートである。
FIG. 2 is a timing chart of an example of a write operation to a trace memory.

【図3】書込み制御回路による制御態様の全体を分類し
て示す説明図である。
FIG. 3 is an explanatory diagram showing classified control modes by the write control circuit.

【図4】図1のトレース装置を適用したエミュレータの
一実施例ブロック図である。
4 is a block diagram of an embodiment of an emulator to which the trace device of FIG. 1 is applied.

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

1 トレース装置 100 トレースメモリ 110,111 ラッチ回路 120 書込み制御回路 121,122 ラッチ制御信号 121P,122P 取込許可信号 123 書込み制御信号 124 書込みアドレス信号 130 読出し制御回路 131 読出し制御信号 132 読出しアドレス信号 2 コンピュータシステム 200 バス 201 CPU 202 記憶装置 203 リード信号 204 ライト信号 205 分岐信号 206 プログラムフェッチ信号 3 デコード部 6 エミュレータ 60 エミュレーション用データプロセッサ 62 エミュレーションバス 1 Trace device 100 Trace memory 110,111 Latch circuit 120 Write control circuit 121,122 Latch control signal 121P, 122P Acquisition permission signal 123 Write control signal 124 Write address signal 130 Read control circuit 131 Read control signal 132 Read address signal 2 Computer System 200 Bus 201 CPU 202 Storage device 203 Read signal 204 Write signal 205 Branch signal 206 Program fetch signal 3 Decoding section 6 Emulator 60 Emulation data processor 62 Emulation bus

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 データプロセッサのバス情報を複数バス
サイクル分一時的に蓄積可能なバッファ手段と、該バッ
ファ手段に入力が接続されたトレースメモリと、上記バ
ス情報を参照しながらトレースメモリに格納すべきバス
情報を選択制御する書込み制御手段とを備え、 上記書込み制御手段は、命令実行の流れを変化させる処
理をデータプロセッサが実行する第1の状態と、命令フ
ェッチ以外のデータアクセスが行われる第2の状態とを
検出し、上記第1の状態の後に実行順序が変化された最
初の命令フェッチのバス情報とその直前の命令フェッチ
のバス情報とを含むバス情報に対してバッファ手段から
トレースメモリへの並列的な書込みを許容し、上記第2
の状態に呼応して当該データアクセスのバスサイクルと
その直前の命令フェッチサイクルとを含むバスサイクル
のバス情報に対してバッファ手段からトレースメモリへ
の並列的な書込みを許容する書込み制御信号を生成する
ものであることを特徴とするトレース装置。
1. A buffer means capable of temporarily storing bus information of a data processor for a plurality of bus cycles, a trace memory having an input connected to the buffer means, and a trace memory for storing the trace information while referring to the bus information. Write control means for selectively controlling bus information to be used, wherein the write control means has a first state in which the data processor executes processing for changing the flow of instruction execution, and a data access other than instruction fetch. 2 state is detected, and the bus information including the bus information of the first instruction fetch whose execution order is changed after the first state and the bus information of the instruction fetch immediately before the first state is traced from the buffer means to the trace memory. Parallel writing to the
In response to the above state, a write control signal that allows parallel writing from the buffer means to the trace memory is generated for the bus information of the bus cycle including the bus cycle of the data access and the instruction fetch cycle immediately before that. A tracing device characterized by being a thing.
【請求項2】 上記バッファ手段は、データプロセッサ
のバス情報を夫々が並列的に受け、夫々の出力が上記ト
レースメモリのデータ入力端子に接続される複数個のラ
ッチ回路から成り、 上記書込み制御手段は、上記複数個のラッチ回路に対し
て命令フェッチのバスサイクル毎に並列的なラッチ動作
を許容した後上記第1の状態と第2の状態の夫々に呼応
して複数個のラッチ回路を排他的にラッチ動作させて上
記バス情報をラッチさせるラッチ制御信号を生成し、ラ
ッチ制御信号による排他的なラッチ動作の完了後に当該
ラッチされたバス情報を上記書込み制御信号にてトレー
スメモリに書込み許容するものであることを特徴とする
請求項1記載のトレース装置。
2. The buffer means comprises a plurality of latch circuits, each of which receives bus information of a data processor in parallel, each output of which is connected to a data input terminal of the trace memory, and the write control means. Excludes a plurality of latch circuits in response to each of the first state and the second state after allowing a parallel latch operation for each bus cycle of instruction fetch for the plurality of latch circuits. A latch control signal for latching the bus information by latching the bus information, and after the exclusive latch operation by the latch control signal is completed, the latched bus information is allowed to be written in the trace memory by the write control signal. The tracing apparatus according to claim 1, wherein the tracing apparatus is a thing.
【請求項3】 データプロセッサのバス情報を格納する
ためのトレースメモリと、 上記データプロセッサのバス情報を夫々が並列的に受け
ると共に夫々の出力が上記トレースメモリのデータ入力
端子に接続される2個のラッチ回路と、 命令実行の流れを変化させる処理をデータプロセッサが
実行する状態を示す第1の情報と、現在のバスサイクル
が命令フェッチであるかその他のデータアクセスである
かを識別可能とする第2の情報とを参照しながらラッチ
回路のラッチ制御信号とトレースメモリに対する書込み
制御信号とを生成してトレースメモリに格納すべきバス
情報を選択制御する書込み制御手段とを備え、 上記書込み制御手段は、上記2個のラッチ回路に対して
命令フェッチサイクル毎に並列的にラッチ動作を許容し
た後上記第1の情報によって命令実行の流れを変化させ
る命令の実行を検出したときに次の命令フェッチサイク
ルの終了まで一方のラッチ回路のラッチ動作を禁止する
ことによって2個のラッチ回路に夫々前後の命令フェッ
チのバス情報をラッチさせ、また、第2の情報によって
データアクセスを検出したときに当該データアクセスサ
イクルにおいて一方のラッチ回路のラッチ動作を禁止す
ることによって2個のラッチ回路に当該データアクセス
のバス情報とその直前の命令フェッチのバス情報とをラ
ッチさせるラッチ制御信号を生成し、ラッチ制御信号に
よる排他的なラッチ動作の完了後に当該ラッチされたバ
ス情報を上記書込み制御信号にてトレースメモリに書込
み許容するものであることを特徴とするトレース装置。
3. A trace memory for storing bus information of a data processor, and two trace memories each of which receives the bus information of the data processor in parallel and each output of which is connected to a data input terminal of the trace memory. And the first information indicating the state in which the data processor executes the processing that changes the flow of instruction execution, and whether the current bus cycle is instruction fetch or other data access can be identified. Write control means for generating a latch control signal of the latch circuit and a write control signal for the trace memory while referring to the second information, and selectively controlling bus information to be stored in the trace memory. Allows the two latch circuits to perform a latch operation in parallel every instruction fetch cycle, and then When the execution of an instruction that changes the flow of instruction execution is detected by the information, the latch operation of one latch circuit is prohibited until the end of the next instruction fetch cycle, so that the two latch circuits are provided with a bus for fetching instructions before and after, respectively. Information is latched, and when the data access is detected by the second information, the latch operation of one of the latch circuits is prohibited in the data access cycle, so that the bus information of the data access and the bus information of that A latch control signal for latching the bus information of the immediately preceding instruction fetch is generated, and after the exclusive latch operation by the latch control signal is completed, the latched bus information is allowed to be written in the trace memory by the write control signal. A tracing device characterized by:
【請求項4】 上記書込み制御手段は、書込み制御信号
によるトレースメモリへのバス情報の書込み許容から完
了までの複数バスサイクルに亘って全てのラッチ回路の
ラッチ動作を禁止した後に並列的なラッチ動作を再開さ
せるものであることを特徴とする請求項2又は3記載の
トレース装置。
4. The write control means inhibits the latch operation of all the latch circuits over a plurality of bus cycles from the write permission of the bus information to the trace memory by the write control signal to the completion thereof, and then the parallel latch operation. The trace device according to claim 2, wherein the trace device is restarted.
【請求項5】 上記書込み制御手段は、書込み制御信号
が書込みを許容するとき順次更新された書込みアドレス
信号を生成するものであることを特徴とする請求項1乃
至4の何れか1項記載のトレース装置。
5. The write control means according to claim 1, wherein when the write control signal permits writing, the write control signal generates a sequentially updated write address signal. Trace device.
【請求項6】 ターゲットシステムを代行制御するため
のエミュレーション用データプロセッサのバス情報が供
給されるエミュレーションバスと、エミュレーションバ
スに接続された請求項1乃至5の何れか1項記載のトレ
ース装置と、を備えて成るものであることを特徴とする
エミュレータ。
6. An emulation bus to which bus information of an emulation data processor for controlling the target system is supplied, and a trace device according to claim 1, which is connected to the emulation bus. An emulator characterized by comprising:
JP6092948A 1994-04-05 1994-04-05 Trace device and emulator equipped with the same Withdrawn JPH07281924A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP6092948A JPH07281924A (en) 1994-04-05 1994-04-05 Trace device and emulator equipped with the same
KR1019950006890A KR950033821A (en) 1994-04-05 1995-03-29 Trace device and emulator using it

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6092948A JPH07281924A (en) 1994-04-05 1994-04-05 Trace device and emulator equipped with the same

Publications (1)

Publication Number Publication Date
JPH07281924A true JPH07281924A (en) 1995-10-27

Family

ID=14068697

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6092948A Withdrawn JPH07281924A (en) 1994-04-05 1994-04-05 Trace device and emulator equipped with the same

Country Status (2)

Country Link
JP (1) JPH07281924A (en)
KR (1) KR950033821A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001222446A (en) * 2000-02-07 2001-08-17 Motorola Inc Debug system for real time processor

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10030988A1 (en) * 2000-06-30 2002-01-10 Bosch Gmbh Robert Electronic system for developing software and a method for intervening in internal data of the software

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001222446A (en) * 2000-02-07 2001-08-17 Motorola Inc Debug system for real time processor

Also Published As

Publication number Publication date
KR950033821A (en) 1995-12-26

Similar Documents

Publication Publication Date Title
JP4094724B2 (en) Apparatus and method for identifying exceptions when debugging software
US6708326B1 (en) Method, system and program product comprising breakpoint handling mechanism for debugging and/or monitoring a computer instruction sequence
JP2003131902A (en) Software debugger, system level debugger, debugging method, and debugging program
JPH11110255A (en) Software debugging device and method
US8108840B2 (en) Method for enhancing debugger performance of hardware assisted breakpoints
US5963741A (en) Information processor which rewrites instructions in program to dynamically change program structure and method therefor
KR20010085997A (en) Thread-oriented debugging
JP3260083B2 (en) Debug system and debugging method
US6615368B1 (en) System and method for debugging highly integrated data processors
JPH07281924A (en) Trace device and emulator equipped with the same
JPH06202902A (en) Buffer storage test method and device
JP2760228B2 (en) Microprocessor with built-in cache memory and its trace analyzer
KR950001057B1 (en) MICRO PROCESSOR
JPH07200352A (en) Data processor, program translation method, and debugging tool
JPH02181236A (en) Debug device
JPH0795288B2 (en) Microcomputer
JP3098501B2 (en) Source step execution method and apparatus
JP3130421B2 (en) Program analysis method and apparatus
JP2000057012A (en) Trace device
JP2000222243A (en) Device and method for debugging
JPS59158449A (en) Debugging device
JP2007213415A (en) Memory device
JPH04328644A (en) Debug back-up device
JPH0784827A (en) Trace device
JP2000148535A (en) Processor and in-circuit emulator using the same

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20010605