JP2000163281A - In-circuit emulator - Google Patents

In-circuit emulator

Info

Publication number
JP2000163281A
JP2000163281A JP10334101A JP33410198A JP2000163281A JP 2000163281 A JP2000163281 A JP 2000163281A JP 10334101 A JP10334101 A JP 10334101A JP 33410198 A JP33410198 A JP 33410198A JP 2000163281 A JP2000163281 A JP 2000163281A
Authority
JP
Japan
Prior art keywords
instruction
signal
access
instruction code
code
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.)
Granted
Application number
JP10334101A
Other languages
Japanese (ja)
Other versions
JP3001547B1 (en
Inventor
Yoshio Takakura
良夫 高倉
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 IC Microcomputer Systems Co Ltd
Original Assignee
NEC IC Microcomputer Systems Co 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 NEC IC Microcomputer Systems Co Ltd filed Critical NEC IC Microcomputer Systems Co Ltd
Priority to JP10334101A priority Critical patent/JP3001547B1/en
Application granted granted Critical
Publication of JP3001547B1 publication Critical patent/JP3001547B1/en
Publication of JP2000163281A publication Critical patent/JP2000163281A/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide an inexpensive in-circuit emulator capable of easily corelating an instruction with access. SOLUTION: A selector 108 receives access data from a data aligner 104 and an instruction code from an instruction holding circuit 105 as inputs and outputs only the access data based on a select signal from an access data switching control circuit 109 or multiplexes a part of the instruction code to the access data and outputs it when access width is smaller than maximum data width. A selector 107 outputs only the instruction code from the circuit 105 based on the select signal from an instruction code switching control circuit 106 or multiplexes a part of an instruction code from an instruction aligner 102 to the instruction code and outputs it when an instruction whose instruction length is longer than a prescribed value is carried out.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明はインサーキットエミ
ュレータに係り、特にマイクロコンピュータを搭載した
システムのハードウェア及びソフトウェアのデバッグに
使用するインサーキットエミュレータに関する。
[0001] 1. Field of the Invention [0002] The present invention relates to an in-circuit emulator, and more particularly to an in-circuit emulator used for debugging hardware and software of a system equipped with a microcomputer.

【0002】[0002]

【従来の技術】通常、インサーキットエミュレータ(以
降、IEと称す)は、マイクロコンピュータをエミュレ
ーションするCPU(以降E−CPUと称す)を実装し
ている。このE−CPUは、マイクロコンピュータのプ
ログラム実行を止めたり、任意のアドレスから開始させ
たり、CPUの内部の動作状態を端子から出力する機能
を有している。
2. Description of the Related Art Generally, an in-circuit emulator (hereinafter, referred to as IE) has a CPU (hereinafter, referred to as E-CPU) for emulating a microcomputer. The E-CPU has functions of stopping the execution of the program of the microcomputer, starting the program from an arbitrary address, and outputting the operation state inside the CPU from a terminal.

【0003】最近のマイクロコンピュータは、命令実行
速度を上げるため、命令を読込み、命令キューに貯めて
から命令を実行する。この構造を採用したマイクロコン
ピュータは、命令に起因したメモリアクセスサイクルを
発生した時には、命令キューに入っている次の命令を実
行している。
In order to increase the instruction execution speed, recent microcomputers read an instruction, store it in an instruction queue, and then execute the instruction. When a memory access cycle caused by an instruction occurs, the microcomputer employing this structure executes the next instruction in the instruction queue.

【0004】つまり、命令実行終了後、ある時間経過し
てからメモリアクセスサイクルを発生するので、マイク
ロコンピュータの命令実行は、メモリアクセスを起こし
た命令より先に進んでいる。このため、マイクロコンピ
ュータが実行した実行履歴を残すメモリ(以降、トレー
スメモリと称す)に残されたE−CPUの実行結果で
は、命令とアクセスサイクルの同期が取れないことにな
る。
That is, since a memory access cycle occurs after a certain time has elapsed after the execution of the instruction, the instruction execution of the microcomputer has advanced before the instruction which caused the memory access. For this reason, according to the execution result of the E-CPU left in a memory (hereinafter, referred to as a trace memory) that stores an execution history executed by the microcomputer, the instruction and the access cycle cannot be synchronized.

【0005】このため、IEの制御ソフト(以降、デバ
ッガと称す。)は、トレース内容から命令とメモリアク
セスサイクルの関係を予想し、関連付けを行っている
が、関連付けを行うのに時間がかかったり、関連付けが
ずれたりすることがある。また、特定のライトサイクル
だけ履歴に残したい時に使用するサンプリングトレース
をした時は、ライトサイクルだけ履歴に残り、ライトサ
イクルを起こした命令の関連付けができないことにな
り、デバッグ効率が落ちることになる。
For this reason, IE control software (hereinafter, referred to as a debugger) predicts the relationship between an instruction and a memory access cycle from the trace contents and performs the association. However, it takes time to perform the association. , The association may be shifted. Further, when a sampling trace is used when it is desired to keep a specific write cycle in the history, the history remains only in the write cycle, and the instruction that caused the write cycle cannot be associated, and the debugging efficiency is reduced.

【0006】この問題を解決するため、従来より、フェ
ッチのアドレスを保持しておき、バスサイクル毎に独立
したトレースメモリに書き込んでおく手段を有するエミ
ュレータが知られている(特開平3−125232号公
報)。この従来のエミュレータは、図6の構成図に示す
ように、トレースメモリ202、アドレスラッチ回路2
03及びアドレス制御部204からなるトレース回路2
01を有している。また、トレース回路201はエミュ
レーションメモリ部205などと共にマスタバス207
を通じてマスタマイクロプロセッサ(MMCU)209
により制御される。
In order to solve this problem, an emulator having means for holding a fetch address and writing it to an independent trace memory for each bus cycle has been known (Japanese Patent Laid-Open No. 3-125232). Gazette). This conventional emulator includes a trace memory 202 and an address latch circuit 2 as shown in FIG.
Circuit 2 consisting of address circuit 03 and address control unit 204
01. Further, the trace circuit 201 is connected to the master bus 207 together with the emulation memory unit 205 and the like.
Through the master microprocessor (MMCU) 209
Is controlled by

【0007】トレース回路201は、スレーブマイクロ
プロセッサ(SMCU)208におけるプログラムカウ
ンタからスレーブバス206を介して順次出力される一
連の命令アドレスをその他のトレース情報とは独立させ
てバスサイクル毎に保持するための命令アドレス保持領
域を有するため、トレース結果よりバグを発見すること
により、誤ったデータを書き込んだ命令のアドレスを直
ちに知ることができ、これによりソースリスト上の命令
と対応させることができるので、プログラム修正を速や
かに行うことができる。
The trace circuit 201 holds a series of instruction addresses sequentially output from the program counter of the slave microprocessor (SMCU) 208 via the slave bus 206 independently of other trace information for each bus cycle. Because of the instruction address holding area, by finding a bug from the trace result, it is possible to immediately know the address of the instruction that wrote the erroneous data, thereby making it possible to correspond to the instruction on the source list. The program can be modified quickly.

【0008】[0008]

【発明が解決しようとする課題】しかるに、上記の従来
のインサーキットエミュレータは、フェッチした命令を
逐次処理することしかできないため、複数の命令を同時
に実行したり、先に実行できる命令は実行順序を入れ替
えて実行する複雑な処理をしている最近のマイクロコン
ピュータでは、命令とメモリアクセスの関連付けが困難
であるという問題がある。
However, the above-mentioned conventional in-circuit emulator can only sequentially process fetched instructions, so that a plurality of instructions can be executed at the same time, and an instruction that can be executed first is executed in the order of execution. In recent microcomputers that perform complicated processes that are interchanged and executed, there is a problem that it is difficult to associate instructions with memory accesses.

【0009】また、従来のインサーキットエミュレータ
では、アドレス専用のトレースメモリ202が必要であ
るため、高速のエミュレータにおいてコストアップの最
大要因である高速メモリを多く必要とし、高価であると
いう問題がある。
In addition, the conventional in-circuit emulator requires the trace memory 202 dedicated to the address, so that a high-speed emulator requires a large number of high-speed memories, which is the largest factor in cost increase, and is expensive.

【0010】本発明は上記の点に鑑みなされたもので、
マイクロコンピュータが実行した命令コード、データを
分割して、トレースメモリに記録する機能を有し、特
に、命令コードの一部を、連続した関連のある命令コー
ドに毎回付加してトレースメモリに書き込む機能、及
び、関連したアクセスサイクルに命令コードの一部を付
加してトレースメモリに書き込む機能を有することによ
り、命令とメモリアクセスの関連付けを簡単に行うこと
ができる安価なインサーキットエミュレータを提供する
ことを目的とする。
[0010] The present invention has been made in view of the above points,
It has a function of dividing the instruction code and data executed by the microcomputer and recording the divided instruction code in the trace memory, and in particular, a function of adding a part of the instruction code to the continuous related instruction code each time and writing the same in the trace memory. And to provide an inexpensive in-circuit emulator that has a function of adding a part of an instruction code to a related access cycle and writing the instruction code to a trace memory to easily associate an instruction with a memory access. Aim.

【0011】[0011]

【課題を解決するための手段】上記の目的を達成するた
め、本発明はマイクロコンピュータを搭載したシステム
のハードウェア及びソフトウェアのデバッグに使用する
インサーキットエミュレータにおいて、少なくとも命令
実行された命令アドレスと、命令実行された命令コード
と、アクセスのサイズとリードライトの方向とを示すス
テータス信号と、メモリアクセスした時のアクセスデー
タと、メモリアクセスした時のアクセスアドレスと、命
令アクセスデータ及びアクセスアドレスが有効であるこ
とを示す第1のストローブ信号と、命令実行タイミング
を示す第2のストローブ信号とを出力するエミュレーシ
ョンCPUと、エミュレーションCPUが出力するアク
セスデータ及びアクセスアドレスを、第1のストローブ
信号に基づいて保持するデータアライナと、エミュレー
ションCPUが出力する命令アドレス及び第1の命令コ
ードを、第2のストローブ信号に基づいて保持する命令
アライナと、エミュレーションCPUが出力する第1及
び第2のストローブ信号とステータス信号を入力として
受け、タイミング信号を出力するタイミング制御回路
と、タイミング制御回路の出力タイミング信号とを用い
て、命令アライナで保持した第1の命令コードをアクセ
スサイクルに合わせるために保持して第2の命令コード
として出力するパイプライン構造を持った命令保持回路
と、データアライナからのアクセスデータと命令保持回
路からの第2の命令コードとを入力として受け、第1の
セレクト信号に基づき、アクセスデータのみ又はアクセ
スデータに第2の命令コードの一部をマルチプレクスし
て出力する第1のセレクタと、第1のストローブ信号及
びタイミング制御回路からのタイミング信号を受け、第
1のセレクト信号を生成して第1のセレクタへ出力する
第1の切換制御回路とを有する構成としたものである。
In order to achieve the above object, the present invention provides an in-circuit emulator used for debugging hardware and software of a system equipped with a microcomputer. The instruction code executed, the status signal indicating the access size and the read / write direction, the access data at the time of memory access, the access address at the time of memory access, the instruction access data and the access address are valid. An emulation CPU that outputs a first strobe signal indicating that there is a signal and a second strobe signal that indicates instruction execution timing, and stores access data and access addresses output by the emulation CPU based on the first strobe signal. A data aligner, an instruction aligner for holding an instruction address and a first instruction code output from the emulation CPU based on a second strobe signal, and first and second strobe signals and a status signal output from the emulation CPU. And using a timing control circuit that receives the first instruction code as an input and outputs a timing signal and an output timing signal of the timing control circuit to hold the first instruction code held by the instruction aligner in order to match the first access code with the access cycle. An instruction holding circuit having a pipeline structure for outputting as an instruction code, an access data from a data aligner and a second instruction code from the instruction holding circuit are received as inputs, and only access data is received based on a first select signal. Or a part of the second instruction code in the access data A first selector for multiplexing and outputting, a first switching control circuit for receiving the first strobe signal and a timing signal from the timing control circuit, generating a first select signal, and outputting the first select signal to the first selector; It has the structure which has.

【0012】この発明では、アクセス幅が最大データ幅
よりも小さい場合、アクセスデータに第2の命令コード
の一部をマルチプレクスして出力するようにしているた
め、アクセスと命令コードの対応付けが可能となる。
According to the present invention, when the access width is smaller than the maximum data width, a part of the second instruction code is multiplexed and output to the access data. It becomes possible.

【0013】また、本発明は、上記の第1のセレクタ及
び第1の切換制御回路に代えて、又はこれに加えて、命
令アライナで保持した第1の命令コードの命令長を判別
して制御信号を出力する命令デコーダと、エミュレーシ
ョンCPUが出力する第1及び第2のストローブ信号と
ステータス信号を入力として受け、タイミング信号を出
力するタイミング制御回路と、命令デコーダで生成され
た制御信号とタイミング制御回路の出力タイミング信号
とを用いて、命令アライナで保持した第1の命令コード
をアクセスサイクルに合わせるために保持して第2の命
令コードとして出力するパイプライン構造を持った命令
保持回路と、命令アライナからの第1の命令コードと命
令保持回路からの第2の命令コードとを入力として受
け、第2のセレクト信号に基づき、第2の命令コードの
み又は第2の命令コードに第1の命令コードの一部をマ
ルチプレクスして出力する第2のセレクタと、命令デコ
ーダからの命令長の判別信号と第2のストローブ信号及
びタイミング制御回路からのタイミング信号を受け、第
2のセレクト信号を生成して第2のセレクタへ出力する
第2の切換制御回路とを有する構成としたものである。
According to the present invention, the first selector and the first switching control circuit are replaced with or in addition to the first selector and the first switching control circuit, and the control is performed by determining the instruction length of the first instruction code held by the instruction aligner. An instruction decoder for outputting a signal, a first and second strobe signal output from the emulation CPU and a status signal as inputs, a timing control circuit for outputting a timing signal, a control signal generated by the instruction decoder and a timing control An instruction holding circuit having a pipeline structure for holding a first instruction code held by an instruction aligner in accordance with an access cycle and outputting it as a second instruction code by using an output timing signal of the circuit; Receiving a first instruction code from the aligner and a second instruction code from the instruction holding circuit as inputs, A second instruction code alone or a part of the first instruction code multiplexed and output as the second instruction code, and a second instruction code from the instruction decoder. And a second switching control circuit for receiving a strobe signal of the above and a timing signal from the timing control circuit, generating a second select signal, and outputting the generated second select signal to the second selector.

【0014】この発明では、命令長が所定値よりも長い
命令を実行した時、第1の命令コードの一部を分割した
第2の命令コードにマルチプレクスして出力することが
できる。
According to the present invention, when an instruction having an instruction length longer than a predetermined value is executed, a part of the first instruction code can be multiplexed into a second instruction code which is divided and output.

【0015】[0015]

【発明の実施の形態】次に、本発明の一実施の形態につ
いて、図面と共に説明する。図1は本発明になるインサ
ーキットエミュレータの一実施の形態の構成図を示す。
同図において、E−CPU101はマイクロコンピュー
タをエミュレーションする中央処理装置(CPU)であ
る。命令アライナ102はE−CPU101が出力した
命令アドレスと命令コードを揃え、保持しておく回路で
ある。タイミング制御回路103はE−CPU101が
出力した命令実行タイミングを示すストローブ信号、ア
クセスサイズ、リードライト方向を示すステータス信号
をもとに、命令保持のタイミング信号、アクセスサイズ
信号、トレースメモリ110への書き込みストローブ信
号を生成する回路である。
Next, an embodiment of the present invention will be described with reference to the drawings. FIG. 1 shows a configuration diagram of an embodiment of an in-circuit emulator according to the present invention.
In FIG. 1, an E-CPU 101 is a central processing unit (CPU) for emulating a microcomputer. The instruction aligner 102 is a circuit that aligns and holds the instruction address and the instruction code output from the E-CPU 101. The timing control circuit 103 outputs a timing signal for holding an instruction, an access size signal, and writing to the trace memory 110 based on a strobe signal indicating an instruction execution timing, an access size, and a status signal indicating a read / write direction output from the E-CPU 101. This is a circuit that generates a strobe signal.

【0016】データアライナ104は、E−CPU10
1が出力したアクセスデータ、アクセスアドレスを保持
しておく回路である。命令デコーダ111は、保持した
命令コードを判別し、制御信号を生成する回路である。
命令保持回路105は、命令デコーダ111で生成され
る制御信号とタイミング制御回路103が生成した信号
を使って、命令アライナ102で保持した命令コード
を、アクセスサイクルや長い命令に合わせるために、保
持しておく回路である。
The data aligner 104 includes the E-CPU 10
1 is a circuit for holding the access data and the access address output by 1. The instruction decoder 111 is a circuit that determines a stored instruction code and generates a control signal.
The instruction holding circuit 105 holds the instruction code held by the instruction aligner 102 using the control signal generated by the instruction decoder 111 and the signal generated by the timing control circuit 103 in order to match the instruction code with an access cycle or a long instruction. Circuit.

【0017】命令コード切換制御回路106とアクセス
データ切換制御回路109は、タイミング制御回路10
3が出力する制御信号と、命令デコーダ111が出力す
る制御信号を使い、トレースメモリ110に出力するデ
ータを切換える切換タイミング信号を生成する回路であ
る。セレクタ107及びセレクタ108は切換えタイミ
ング信号を使い、命令コードの一部をトレースメモリ1
10に出力する回路である。
The instruction code switching control circuit 106 and the access data switching control circuit 109
3 is a circuit that uses the control signal output from the instruction decoder 3 and the control signal output from the instruction decoder 111 to generate a switching timing signal for switching data output to the trace memory 110. The selector 107 and the selector 108 use the switching timing signal to store a part of the instruction code in the trace memory 1.
10 is a circuit for outputting the signal.

【0018】I_codeはE−CPU101が実行し
た命令コード、I_adrは命令コードの置かれていた
アドレス、fstbは前記命令コードと命令コードのア
ドレスの出力が有効であるタイミングを示す信号、A_
dataはメモリアクセスした時のデータ、A_adr
はメモリアクセスした時のアドレス、tastbはA_
data、A_adrが有効であるタイミングを示す信
号、ClockはE−CPU101が動作するクロッ
ク、Acc_statはアクセスサイズ、リードライト
方向を示すステータス信号であり、これらの信号はE−
CPU101から出力される。
I_code is the instruction code executed by the E-CPU 101, I_adr is the address where the instruction code is located, fstb is a signal indicating the timing at which the output of the instruction code and the address of the instruction code is valid, A_code
data is data at the time of memory access, A_adr
Is the address at the time of memory access, and tasb is A_
data and A_adr are signals indicating valid timing, Clock is a clock for operating the E-CPU 101, Acc_stat is a status signal indicating access size and read / write direction, and these signals are E-
Output from the CPU 101.

【0019】long_instは、タイミング制御回
路103が出力する命令長の長い命令を示す信号、Ac
c_instは、命令デコーダ111が命令保持回路1
05へ出力するメモリアクセスを伴う命令を示す信号、
Code_latchは、命令保持回路105でのラッ
チタイミングを示す信号である。また、codeは、命
令アライナ102で保持した命令コード、hld_co
deは命令保持回路105で保持した命令コード、da
taはデータアライナ104で保持したアクセスデー
タ、Acc_sizeは、タイミング制御回路103が
出力するアクセス幅を示す信号、code_sel1は
アクセスデータを出力するか、命令コードの一部を出力
するかを切換えるために、アクセスデータ切換制御回路
109が出力する信号、code_sel2は命令アラ
イナ102で出力する命令コードをそのまま出力する
か、命令コードの一部を出力するかを切換えるために、
命令コード切換制御回路106が出力する信号である。
Long_inst is a signal indicating a long instruction length instruction output from the timing control circuit 103, Ac
c_inst indicates that the instruction decoder 111
05, a signal indicating an instruction accompanied by a memory access,
Code_latch is a signal indicating a latch timing in the instruction holding circuit 105. Code is the instruction code held by the instruction aligner 102, hld_co
de is the instruction code held by the instruction holding circuit 105, da
ta is the access data held by the data aligner 104, Acc_size is a signal indicating the access width output from the timing control circuit 103, and code_sel1 is to switch between outputting the access data and outputting a part of the instruction code. A signal output from the access data switching control circuit 109, code_sel2, is used to switch between outputting the instruction code output from the instruction aligner 102 as it is or outputting a part of the instruction code.
This is a signal output from the instruction code switching control circuit 106.

【0020】更に、trwrzは、タイミング制御回路
103が出力する、トレースメモリ110への書き込み
信号、accadrは、トレースメモリ110ヘ書き込
む、データアライナ104からのメモリアクセスアドレ
ス、accdatは、トレースメモリ110ヘ書き込
む、セレクタ108からのメモリアクセスデータ、In
st_adrは、トレースメモリ110へ書き込む、命
令アライナ102からの命令実行アドレス、Inst_
codeは、トレースメモリ110ヘ書き込む、セレク
タ107からの命令コードである。
Further, trwrz is a write signal to the trace memory 110 output by the timing control circuit 103, accadr is a write to the trace memory 110, a memory access address from the data aligner 104, and accdat is a write to the trace memory 110. , Memory access data from selector 108, In
st_adr is an instruction execution address from the instruction aligner 102 to be written into the trace memory 110, Inst_adr
"code" is an instruction code from the selector 107 to be written into the trace memory 110.

【0021】次に、図1の実施の形態のデータセレクト
動作について、図2のトレースデータ記録内容1(デー
タセレクト)及び図3のデータセレクタの一例のタイミ
ング図を併せ参照して説明する。まず、セレクタ108
が切換わるタイミングについて説明する。E−CPU1
01は、I_adrに命令a、b、c及びdの実行アド
レスである100番地、102番地、106番地及び1
0c番地を出力する。また、E−CPU100は、命令
実行アドレスI_adr(100番地、102番地、1
06番地及び10c番地)のタイミングでaabb、c
cddeeff、gghh、iijjという命令コード
I_codeを出力し、有効タイミングを示すタイミン
グ信号fstbをアクティブにする。
Next, the data select operation of the embodiment of FIG. 1 will be described with reference to the trace data recording contents 1 (data select) of FIG. 2 and the timing chart of an example of the data selector of FIG. First, the selector 108
Will be described. E-CPU1
01 is an execution address of the instructions a, b, c and d in the I_adr, ie, addresses 100, 102, 106 and 1
Output address 0c. Further, the E-CPU 100 calculates the instruction execution address I_adr (address 100, address 102, 1
Aabb, c at the timing of addresses 06 and 10c)
It outputs instruction codes I_code called cddeeff, gghh, and ijj, and activates a timing signal fstb indicating valid timing.

【0022】命令アライナ102は、E−CPU101
から出力された命令実行アドレスI_adrを保持して
書き込みアドレスInst_adrをトレースメモリ1
10へ出力すると共に、E−CPU101から出力され
た命令コードI_codeを保持して命令コードcod
eとして出力する。この例では、E−CPU101はI
nst_adrにアドレス100番地、102番地、1
06番地及び10c番地を出力し、アドレス100番
地、102番地、106番地及び10c番地のタイミン
グで図2及び図3に示すように、aabb、ccdde
eff、gghh、iijjをcodeに出力してい
る。
The instruction aligner 102 is an E-CPU 101
Holds the instruction execution address I_adr output from the memory and writes the write address Inst_adr to the trace memory 1
10 while holding the instruction code I_code output from the E-CPU 101 and storing the instruction code cod
Output as e. In this example, the E-CPU 101
The address 100, the address 102, and the address 1
The addresses 06 and 10c are output, and at the timing of addresses 100, 102, 106 and 10c, as shown in FIGS. 2 and 3, aabb, ccdde
eff, gghh, and ijj are output to code.

【0023】以降、命令a、命令bがアクセスを伴う命
令であるとして説明をする。命令デコーダ111は命令
アライナ102からの命令コードcodeをデコードし
て、図3に示すように、アクセスを伴う命令a及びbの
タイミングで出力信号Acc_instをアクティブ
(図3の例ではハイレベル)にする。命令保持回路10
5は、入力信号Acc_instがアクティブの期間
に、命令アライナ102からの命令コードcodeを保
持する。また、命令保持回路105は、アクセス命令が
連続しても問題が発生しないように数段のパイプライン
を有している。
Hereinafter, description will be made assuming that the instructions a and b are instructions accompanied by access. The instruction decoder 111 decodes the instruction code “code” from the instruction aligner 102 and, as shown in FIG. 3, activates the output signal Acc_inst (at the high level in the example of FIG. 3) at the timing of the instructions “a” and “b” accompanied by the access. . Instruction holding circuit 10
5 holds the instruction code from the instruction aligner 102 while the input signal Acc_inst is active. The instruction holding circuit 105 has a pipeline of several stages so that no problem occurs even if the access instructions continue.

【0024】アクセスAが、命令aで発生したメモリア
クセスサイクルであるとすると、命令aのメモリアクセ
スサイクルは、図3に示すように命令aが実行された次
のクロックで発生している。E−CPU101はこのタ
イミングでメモリアクセスしたときのデータA_dat
aとして「11223344」を、またアクセスサイ
ズ、リードライト方向を示すステータス信号Acc_s
tatとして32ビットのリードを示す信号を出力す
る。
Assuming that the access A is a memory access cycle generated by the instruction a, the memory access cycle of the instruction a occurs at the clock following the execution of the instruction a as shown in FIG. The E-CPU 101 sets the data A_dat when the memory is accessed at this timing.
“11223344” as a, and a status signal Acc_s indicating the access size and the read / write direction
A signal indicating a 32-bit read is output as tat.

【0025】タイミング制御回路103は、上記のステ
ータス信号Acc_statの情報からアクセス幅を示
すAcc_sizeを生成し、アクセスAの時には、3
2ビット、アクセスBの時には16ビットを示す信号を
出力する。データアライナ104はA_data、A_
adrの値を、E−CPU101からの図3に示すタイ
ミング信号tastbのタイミングで保持し、アクセス
データdataとメモリアクセスアドレスaccadr
として出力する。ここでは、アクセスデータdataは
「11223344」、メモリアクセスアドレスacc
adrは「1000」である。
The timing control circuit 103 generates Acc_size indicating the access width from the information of the status signal Acc_stat.
At the time of access B, a signal indicating 16 bits is output. A_data, A_data
The value of adr is held at the timing of the timing signal tasb shown in FIG. 3 from the E-CPU 101, and the access data data and the memory access address accadr are held.
Output as Here, the access data data is “11223344” and the memory access address acc
adr is “1000”.

【0026】ここでアクセスAは32ビットアクセスで
あるので、命令コードをアクセスデータにマルチプレク
スして出力すると、アクセスデータが正しくトレースメ
モリ110に残らなくなる。そこで、この実施の形態で
は図3のタイミング図に示すように、クロックCloc
kに同期して動作するアクセスデータ切換制御回路10
9で生成されたアクセスデータ切換制御信号Code_
sel1がセレクタ108に入力されて、データアライ
ナ104から取り出されてセレクタ108に入力される
アクセスデータdataを選択させ、メモリアクセスデ
ータaccdatとしてトレースメモリ110へ出力さ
せる。
Here, since the access A is a 32-bit access, if the instruction code is multiplexed with the access data and outputted, the access data does not remain in the trace memory 110 correctly. Therefore, in this embodiment, as shown in the timing chart of FIG.
access data switching control circuit 10 operating in synchronization with k
9, the access data switching control signal Code_
sel1 is input to the selector 108, and the access data data extracted from the data aligner 104 and input to the selector 108 is selected and output to the trace memory 110 as memory access data accdat.

【0027】アクセスBは1004番地への16ビット
ライトになっている。実際にライトサイクルが発生する
のは、命令cの実行タイミングと同時である。アクセス
データが16ビットの場合は、命令コードの一部をアク
セスデータにマルチプレクスして出力することが可能で
ある。そこで、この実施の形態では、アクセスデータ切
換制御回路109で生成されたアクセスデータ切換制御
信号Code_sel1がセレクタ108に入力され
て、命令保持回路105から取り出されてセレクタ10
8に入力される、図3に示す命令コードhld_cod
eを選択させ、このhld_codeをメモリアクセス
データaccdatとしてトレースメモリ110へ出力
させる。
Access B is a 16-bit write to address 1004. The write cycle actually occurs at the same time as the execution timing of the instruction c. When the access data is 16 bits, a part of the instruction code can be multiplexed into the access data and output. Therefore, in this embodiment, the access data switching control signal Code_sel1 generated by the access data switching control circuit 109 is input to the selector 108, extracted from the instruction holding circuit 105, and
8, the instruction code hld_cod shown in FIG.
e is selected, and this hld_code is output to the trace memory 110 as the memory access data accdat.

【0028】このようにして、トレースメモリ110
は、タイミング制御回路103からの書き込み信号tr
wrzのタイミングで、図2及び図3に示すように、3
2ビットアクセスAの場合は、セレクタ108により選
択された32ビットのメモリアクセスデータaccda
ta「11223344」を書き込み、16ビットアク
セスBの場合は、セレクタ108により選択された16
ビットのメモリアクセスデータ「5566」に命令コー
ドhld_code「ccddeeff」中の一部の命
令コード16ビット「ccdd」が付加されたaccd
ataを書き込む。
In this way, the trace memory 110
Is a write signal tr from the timing control circuit 103.
At the timing of wrz, as shown in FIGS.
In the case of 2-bit access A, the 32-bit memory access data accda selected by the selector 108
ta “11223344” is written, and in the case of 16-bit access B, 16
Accd in which 16-bit instruction code “ccdd” of a part of instruction code hld_code “ccddeeff” is added to bit memory access data “5566”
Write data.

【0029】以上、説明した通り、この実施の形態では
アクセス幅が最大データ幅より小さい場合、命令コード
の一部をアクセスデータに出力しトレースメモリ110
に残すことで、アクセスと命令コードの対応付けが可能
となり、命令コードからアクセスを起こした命令を見つ
けることが簡単にできる。また、アドレス専用のメモリ
も必要としない。
As described above, in this embodiment, when the access width is smaller than the maximum data width, a part of the instruction code is output as the access data and the trace memory 110 is output.
, The access can be associated with the instruction code, and the instruction that caused the access can be easily found from the instruction code. Also, no dedicated memory for addresses is required.

【0030】次に、図1の実施の形態の命令セレクト動
作について、図4のトレースデータ記録内容2(命令セ
レクト)及び図5の命令セレクトの一例のタイミング図
を併せ参照して説明する。
Next, the instruction select operation of the embodiment of FIG. 1 will be described with reference to the trace data recording content 2 (instruction select) of FIG. 4 and the timing chart of an example of the instruction select of FIG.

【0031】この例では図4に示すように、200番地
の命令e、204番地の命令f、20c番地の命令gと
3つの命令が実行され、更に命令fはf−1、f−2、
f−3からなるものとする。すなわち、命令fは12バ
イト長という長い命令になっており、実行時間も3クロ
ック(各クロックの命令f−1、f−2、f−3)と長
くなっているものとする。
In this example, as shown in FIG. 4, an instruction e at address 200, an instruction f at address 204, an instruction g at address 20c, and three instructions are executed. Further, the instruction f is executed at f-1, f-2,
f-3. That is, it is assumed that the instruction f is a long instruction having a length of 12 bytes and the execution time is as long as 3 clocks (instructions f-1, f-2, and f-3 for each clock).

【0032】E−CPU101が出力する、命令実行が
行われたことを示すタイミング信号fstbは、図5の
タイミング図に示すように、命令eと、命令fの最初の
命令コードと命令gが実行される各タイミングでアクテ
ィブになる。図1の命令アライナ102はアドレスI_
adr、命令コードI_codeを、タイミング信号f
stbのアクティブタイミングでラッチし、命令実行ア
ドレスInst_adr、命令コードcodeを出力す
る。
As shown in the timing diagram of FIG. 5, the timing signal fstb output from the E-CPU 101 and indicating that the instruction has been executed is composed of the instruction e, the first instruction code of the instruction f, and the instruction g. It becomes active at each timing. The instruction aligner 102 in FIG.
adr, instruction code I_code, and timing signal f
It latches at the active timing of stb, and outputs an instruction execution address Inst_adr and an instruction code.

【0033】命令デコーダ111は、長い命令であると
命令長の長い命令を示す信号long_instを図5
に示すように、命令fの2番目の命令コードf−2のタ
イミングでアクティブにする。long_instがア
クティブの時に、命令保持回路105は命令コードco
deをラッチしておく。
If the instruction is a long instruction, the instruction decoder 111 outputs a signal long_inst indicating that the instruction has a long instruction length as shown in FIG.
As shown in (2), it is activated at the timing of the second instruction code f-2 of the instruction f. When the long_inst is active, the instruction holding circuit 105
de is latched.

【0034】命令コード切換制御回路106は、タイミ
ング信号fstbを1クロック遅らせたタイミング信号
とlong_inst信号を入力として受け、命令アラ
イナ102で出力する命令コードをそのまま出力する
か、命令コードの一部を出力するかを切り換える切換信
号Code_sel2を生成する。切換信号Code_
sel2がアクティブの時、セレクタ107は命令保持
回路105からの命令コードhld_codeを選択
し、命令コードhld_codeをトレースメモリ11
0に命令コードInst_codeとして出力する。
The instruction code switching control circuit 106 receives as input the timing signal obtained by delaying the timing signal fstb by one clock and the long_inst signal, and outputs the instruction code output by the instruction aligner 102 as it is, or outputs a part of the instruction code. A switching signal Code_sel2 for switching whether to perform switching is generated. Switching signal Code_
When sel2 is active, the selector 107 selects the instruction code hld_code from the instruction holding circuit 105 and stores the instruction code hld_code in the trace memory 11.
0 is output as the instruction code Inst_code.

【0035】切換信号Code_sel2がインアクテ
ィブの時、セレクタ107は命令アライナ102からの
命令コードcodeを選択し、その命令コードcode
をトレースメモリ110へ書き込み用命令コードIns
t_codeとして出力する。
When the switching signal Code_sel2 is inactive, the selector 107 selects an instruction code from the instruction aligner 102, and selects the instruction code.
Instruction code Ins for writing to the trace memory 110
Output as t_code.

【0036】これにより、I_codeが図5に示すよ
うに、命令長の長い命令fの命令f−1のとき「ijk
lmnop」、命令f−2のとき「qrst」、命令f
−3のとき「uvwx」と分割されている場合、セレク
タ107からトレースメモリ110へ出力される命令コ
ードInst_codeは、図4で「命令コード」とし
て、また図5に示すように、最初の命令f−1のときは
入力I_codeと同じ「ijklmnop」であるの
に対し、命令f−2の実行タイミングでは「ijklq
rst」を、命令f−3の実行タイミングでは「ijk
luvwx」を出力する。
As a result, as shown in FIG. 5, when the I_code is the instruction f-1 of the instruction f having a long instruction length, "ijk
lmnop ”, instruction“ qrst ”for instruction f-2, instruction f
In the case of -3, the instruction code Inst_code output from the selector 107 to the trace memory 110 is “instruction code” in FIG. 4 and, as shown in FIG. When it is −1, it is “ijjklmnop” which is the same as the input I_code, whereas “ijjklq” is executed at the execution timing of the instruction f-2.
rst ”and“ ijk ”at the execution timing of the instruction f-3.
luvwx ”is output.

【0037】すなわち、この実施の形態では、命令長が
長い命令fを実行した時、命令コードの一部「ijk
l」を、分割した命令コード「qrst」及び「uvw
x」の上位側にマルチプレクスされてトレースメモリ1
10へ出力される。これにより、命令長の長い命令の途
中であることが分かり、デバッガでの処理が簡単にな
る。また、命令長幅のメモリも不要になる。
That is, in this embodiment, when the instruction f having a long instruction length is executed, a part of the instruction code “ijk” is executed.
l ”is obtained by dividing the divided instruction codes“ qrst ”and“ uvw
x ”is multiplexed on the upper side of the trace memory 1
It is output to 10. As a result, it is found that the instruction is in the middle of an instruction having a long instruction length, and the processing by the debugger is simplified. Further, a memory having an instruction length is not required.

【0038】[0038]

【発明の効果】以上説明したように、本発明によれば、
アクセス幅が最大データ幅よりも小さい場合、アクセス
データに命令コードの一部をマルチプレクスして出力す
ることにより、アクセスと命令コードの対応付けが可能
であるため、命令コードからアクセスを起こした命令を
見つけることが簡単にできる。
As described above, according to the present invention,
If the access width is smaller than the maximum data width, the access data can be associated with the instruction code by multiplexing and outputting a part of the instruction code to the access data. You can easily find it.

【0039】また、本発明によれば、命令長が所定値よ
りも長い命令を実行した時、第1の命令コードの一部を
分割した第2の命令コードにマルチプレクスして出力す
るようにしたため、命令長の長い命令の途中であること
が分かり、デバッガでの処理を簡単にできる。
According to the present invention, when an instruction having an instruction length longer than a predetermined value is executed, a part of the first instruction code is multiplexed into a second instruction code, which is output. As a result, it is known that the instruction is in the middle of an instruction having a long instruction length, and the processing by the debugger can be simplified.

【0040】更に、本発明によれば、アドレス専用のメ
モリや命令長幅のメモリも不要にできるので、エミュレ
ータのコストダウンを実現できる。
Further, according to the present invention, it is possible to eliminate the need for a memory dedicated to addresses and a memory having an instruction length, thereby realizing cost reduction of the emulator.

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

【図1】本発明の一実施の形態の構成図である。FIG. 1 is a configuration diagram of an embodiment of the present invention.

【図2】図1中のトレースデータ記録内容(データセレ
クト)の一例を示す図である。
FIG. 2 is a diagram showing an example of trace data recording contents (data select) in FIG. 1;

【図3】図1中のデータセレクトの一例のタイミング図
である。
FIG. 3 is a timing chart of an example of a data select in FIG. 1;

【図4】図1中のトレースデータ記録内容(命令セレク
ト)の一例を示す図である。
FIG. 4 is a diagram showing an example of trace data recorded contents (instruction select) in FIG. 1;

【図5】図1中の命令セレクトの一例のタイミング図で
ある。
FIG. 5 is a timing chart of an example of an instruction select in FIG. 1;

【図6】従来の一例の構成図である。FIG. 6 is a configuration diagram of a conventional example.

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

101 E−CPU 102 命令アライナ 103 タイミング制御回路 104 データアライナ 105 命令保持回路 106 命令コード切換制御回路 107 セレクタ2 108 セレクタ1 109 アクセスデータ切換制御回路 110 トレースメモリ 111 命令デコーダ I_code E−CPUが実行した命令コード I_adr 命令コードの置かれていたアドレス fstb 前記命令コードと命令コードのアドレスの出
力が有効であるタイミング信号 A_data メモリアクセスした時のデータ A_adr メモリアクセスした時のアドレス tastb A_data、A_adrが有効であるタ
イミングを示す信号 Clock E−CPUが動作するクロック Acc_stat アクセスサイズ、リードライト方向
を示すステータス信号 long_inst 命令長の長い命令を示す信号 Acc_inst メモリアクセスを伴う命令を示す信
号 Code_latch 命令保持回路でのラッチタイミ
ングを示す信号 code 命令アライナで保持した命令コード hld_code 命令保持回路で保持した命令コード data データアライナで保持したアクセスデータ Acc_size アクセス幅を示す信号 Code_sell アクセスデータを出力するか、命
令コードの一部を出力するかの切換信号 Code_sel2 命令アライナで出力する命令コー
ドをそのまま出力するか、命令コードの一部を出力する
かを切換える信号 trwrz トレースメモリへの書き込み信号 accadr トレースメモリへ書き込むメモリアクセ
スアドレス accdat トレースメモリへ書き込むメモリアクセ
スデータ Inst_adr トレースメモリへ書き込む命令実行
アドレス Inst_code トレースメモリヘ書き込む命令コ
ード d1_fstb fstbの1クロック遅れた信号
101 E-CPU 102 Instruction Aligner 103 Timing Control Circuit 104 Data Aligner 105 Instruction Holding Circuit 106 Instruction Code Switching Control Circuit 107 Selector 2 108 Selector 1 109 Access Data Switching Control Circuit 110 Trace Memory 111 Instruction Decoder I_code Instruction Executed by E-CPU Code I_adr Address where the instruction code is placed fstb Timing signal that the output of the instruction code and the address of the instruction code is valid Clock indicating clock E_CPU operates Acc_stat Status signal indicating access size and read / write direction ng_inst A signal indicating an instruction with a long instruction length Acc_inst A signal indicating an instruction involving memory access Code_latch A signal indicating a latch timing in the instruction holding circuit code An instruction code held in the instruction aligner hld_code An instruction code held in the instruction holding circuit data A data aligner Retained access data Acc_size Signal indicating access width Code_cell Switching signal for outputting access data or outputting a part of instruction code Code_sel2 Instruction code output by instruction aligner is output as it is, or part of instruction code is output. Signal for switching whether to output trwrz Write signal to trace memory accadr Memory access address to write to trace memory accdat Write to trace memory 1 clock delayed signal of the instruction code D1_fstb FSTB write instruction execution address Inst_code trace memory f is written to the non-memory access data Inst_adr trace memory

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 マイクロコンピュータを搭載したシステ
ムのハードウェア及びソフトウェアのデバッグに使用す
るインサーキットエミュレータにおいて、 少なくとも命令実行された命令アドレスと、命令実行さ
れた命令コードと、アクセスのサイズとリードライトの
方向とを示すステータス信号と、メモリアクセスした時
のアクセスデータと、メモリアクセスした時のアクセス
アドレスと、前記命令アクセスデータ及びアクセスアド
レスが有効であることを示す第1のストローブ信号と、
命令実行タイミングを示す第2のストローブ信号とを出
力するエミュレーションCPUと、 前記エミュレーションCPUが出力する前記アクセスデ
ータ及びアクセスアドレスを、前記第1のストローブ信
号に基づいて保持するデータアライナと、 前記エミュレーションCPUが出力する前記命令アドレ
ス及び命令コードを、前記第2のストローブ信号に基づ
いて保持する命令アライナと、 前記エミュレーションCPUが出力する前記第1及び第
2のストローブ信号とステータス信号を入力として受
け、タイミング信号を出力するタイミング制御回路と、 前記タイミング制御回路の出力タイミング信号とを用い
て、前記命令アライナで保持した命令コードをアクセス
サイクルに合わせるために保持しておくパイプライン構
造を持った命令保持回路と、 前記データアライナからのアクセスデータと前記命令保
持回路からの命令コードとを入力として受け、第1のセ
レクト信号に基づき、前記アクセスデータのみ又は前記
アクセスデータに前記命令コードの一部をマルチプレク
スして出力する第1のセレクタと、 前記第1のストローブ信号及び前記タイミング制御回路
からのタイミング信号を受け、前記第1のセレクト信号
を生成して前記第1のセレクタへ出力する第1の切換制
御回路とを有することを特徴とするインサーキットエミ
ュレータ。
1. An in-circuit emulator used for debugging hardware and software of a system equipped with a microcomputer, comprising: an instruction address at which an instruction is executed; an instruction code executed; A status signal indicating the direction, access data at the time of memory access, an access address at the time of memory access, a first strobe signal indicating that the instruction access data and the access address are valid,
An emulation CPU that outputs a second strobe signal indicating an instruction execution timing; a data aligner that holds the access data and an access address output by the emulation CPU based on the first strobe signal; An instruction aligner that holds the instruction address and the instruction code output by the emulator based on the second strobe signal; and receives the first and second strobe signals and the status signal output by the emulation CPU as inputs, An instruction holding circuit having a pipeline structure for holding an instruction code held by the instruction aligner in accordance with an access cycle by using a timing control circuit for outputting a signal and an output timing signal of the timing control circuit; A circuit, receiving, as inputs, access data from the data aligner and an instruction code from the instruction holding circuit, and multiplying the access data only or a part of the instruction code in the access data based on a first select signal. A first selector for multiplexing and outputting, a first selector for receiving the first strobe signal and a timing signal from the timing control circuit, generating the first select signal, and outputting the first select signal to the first selector; An in-circuit emulator comprising a switching control circuit.
【請求項2】 前記第1の切換制御回路は、前記タイミ
ング信号がアクセス幅が最大データ幅より小さいことを
示しているか否か判断し、最大データ幅のときは前記第
1のセレクタにより前記アクセスデータのみを選択さ
せ、前記最大データ幅より小さいときは前記第1のセレ
クタにより前記アクセスデータに前記命令コードの一部
をマルチプレクスして選択させることを特徴とする請求
項1記載のインサーキットエミュレータ。
2. The first switching control circuit determines whether or not the timing signal indicates that an access width is smaller than a maximum data width, and when the access width is the maximum data width, the first selector controls the access by the first selector. 2. The in-circuit emulator according to claim 1, wherein only the data is selected, and when the data width is smaller than the maximum data width, the first selector causes the access data to multiplex and select a part of the instruction code. .
【請求項3】 マイクロコンピュータを搭載したシステ
ムのハードウェア及びソフトウェアのデバッグに使用す
るインサーキットエミュレータにおいて、 少なくとも命令実行された命令アドレスと、命令実行さ
れた第1の命令コードと、アクセスのサイズとリードラ
イトの方向とを示すステータス信号と、前記命令アクセ
スデータ及びアクセスアドレスが有効であることを示す
第1のストローブ信号と、命令実行タイミングを示す第
2のストローブ信号とを出力するエミュレーションCP
Uと、 前記エミュレーションCPUが出力する前記命令アドレ
ス及び第1の命令コードを、前記第2のストローブ信号
に基づいて保持する命令アライナと、 前記命令アライナで保持した第1の命令コードの命令長
を判別して制御信号を出力する命令デコーダと、 前記エミュレーションCPUが出力する前記第1及び第
2のストローブ信号とステータス信号を入力として受
け、タイミング信号を出力するタイミング制御回路と、 前記命令デコーダで生成された前記制御信号と前記タイ
ミング制御回路の出力タイミング信号とを用いて、命令
アライナで保持した第1の命令コードをアクセスサイク
ルに合わせるために保持して第2の命令コードとして出
力するパイプライン構造を持った命令保持回路と、 前記命令アライナからの第1の命令コードと前記命令保
持回路からの第2の命令コードとを入力として受け、第
2のセレクト信号に基づき、前記第2の命令コードのみ
又は前記第2の命令コードに前記第1の命令コードの一
部をマルチプレクスして出力する第2のセレクタと、 前記命令デコーダからの命令長の判別信号と前記第2の
ストローブ信号及び前記タイミング制御回路からのタイ
ミング信号を受け、前記第2のセレクト信号を生成して
前記第2のセレクタへ出力する第2の切換制御回路とを
有することを特徴とするインサーキットエミュレータ。
3. An in-circuit emulator used for debugging hardware and software of a system equipped with a microcomputer, wherein at least an instruction address at which an instruction is executed, a first instruction code at which an instruction is executed, an access size, An emulation CP that outputs a status signal indicating a read / write direction, a first strobe signal indicating that the instruction access data and the access address are valid, and a second strobe signal indicating an instruction execution timing.
U, an instruction aligner that holds the instruction address and the first instruction code output by the emulation CPU based on the second strobe signal, and an instruction length of the first instruction code held by the instruction aligner. An instruction decoder that determines and outputs a control signal; a timing control circuit that receives as input the first and second strobe signals and a status signal output by the emulation CPU and outputs a timing signal; A pipeline structure for holding a first instruction code held by an instruction aligner in accordance with an access cycle and outputting it as a second instruction code using the control signal and the output timing signal of the timing control circuit. And a first instruction code from the instruction aligner. And a second instruction code from the instruction holding circuit as inputs, and based on a second select signal, the second instruction code alone or the second instruction code is added to the first instruction code. A second selector that multiplexes and outputs a second selector signal; a second selector that receives an instruction length determination signal from the instruction decoder, the second strobe signal, and a timing signal from the timing control circuit; And a second switching control circuit for generating and outputting the generated switching signal to the second selector.
【請求項4】 前記第2の切換制御回路は、前記命令デ
コーダからの命令長の判別信号が所定値より長いことを
示しているときは、前記第2のセレクタにより前記第2
の命令コードのみを選択させ、前記命令長が前記所定値
より短いときは前記第2のセレクタにより前記第2の命
令コードに前記第1の命令コードの一部をマルチプレク
スして選択させることを特徴とする請求項3記載のイン
サーキットエミュレータ。
4. The second switching control circuit, when the instruction length discrimination signal from the instruction decoder indicates that the instruction length is longer than a predetermined value, the second selector controls the second selector to control the second selector.
And when the instruction length is shorter than the predetermined value, causing the second instruction code to multiplex and select a part of the first instruction code by the second selector. The in-circuit emulator according to claim 3, wherein:
【請求項5】 マイクロコンピュータを搭載したシステ
ムのハードウェア及びソフトウェアのデバッグに使用す
るインサーキットエミュレータにおいて、 少なくとも命令実行された命令アドレスと、命令実行さ
れた命令コードと、アクセスのサイズとリードライトの
方向とを示すステータス信号と、メモリアクセスした時
のアクセスデータと、メモリアクセスした時のアクセス
アドレスと、前記命令アクセスデータ及びアクセスアド
レスが有効であることを示す第1のストローブ信号と、
命令実行タイミングを示す第2のストローブ信号とを出
力するエミュレーションCPUと、 前記エミュレーションCPUが出力する前記アクセスデ
ータ及びアクセスアドレスを、前記第1のストローブ信
号に基づいて保持するデータアライナと、 前記エミュレーションCPUが出力する前記命令アドレ
ス及び第1の命令コードを、前記第2のストローブ信号
に基づいて保持する命令アライナと、 前記命令アライナで保持した第1の命令コードの命令長
を判別して制御信号を出力する命令デコーダと、 前記エミュレーションCPUが出力する前記第1及び第
2のストローブ信号とステータス信号を入力として受
け、タイミング信号を出力するタイミング制御回路と、 前記命令デコーダで生成された前記制御信号と前記タイ
ミング制御回路の出力タイミング信号とを用いて、前記
命令アライナで保持した第1の命令コードをアクセスサ
イクルに合わせるために保持して、第2の命令コードと
して出力するパイプライン構造を持った命令保持回路
と、 前記データアライナからのアクセスデータと前記命令保
持回路からの第2の命令コードとを入力として受け、第
1のセレクト信号に基づき、前記アクセスデータのみ又
は前記アクセスデータに前記第2の命令コードの一部を
マルチプレクスして出力する第1のセレクタと、 前記命令アライナからの第1の命令コードと前記命令保
持回路からの第2の命令コードとを入力として受け、第
2のセレクト信号に基づき、前記第2の命令コードのみ
又は前記第2の命令コードに前記第1の命令コードの一
部をマルチプレクスして出力する第2のセレクタと、 前記第1のストローブ信号及び前記タイミング制御回路
からのタイミング信号を受け、前記第1のセレクト信号
を生成して前記第1のセレクタへ出力する第1の切換制
御回路と、 前記命令デコーダからの命令長の判別信号と前記第2の
ストローブ信号及び前記タイミング制御回路からのタイ
ミング信号を受け、前記第2のセレクト信号を生成して
前記第2のセレクタへ出力する第2の切換制御回路とを
有することを特徴とするインサーキットエミュレータ。
5. An in-circuit emulator used for debugging hardware and software of a system equipped with a microcomputer, comprising: at least an instruction address at which an instruction is executed; an instruction code at which an instruction is executed; A status signal indicating the direction, access data at the time of memory access, an access address at the time of memory access, a first strobe signal indicating that the instruction access data and the access address are valid,
An emulation CPU that outputs a second strobe signal indicating an instruction execution timing; a data aligner that holds the access data and an access address output by the emulation CPU based on the first strobe signal; And an instruction aligner for holding the instruction address and the first instruction code output by the instruction aligner based on the second strobe signal; and determining a control signal by determining an instruction length of the first instruction code held by the instruction aligner. An instruction decoder that outputs, a timing control circuit that receives the first and second strobe signals and the status signal output by the emulation CPU as inputs, and outputs a timing signal; and the control signal generated by the instruction decoder. The timing control circuit An instruction holding circuit having a pipeline structure for holding the first instruction code held by the instruction aligner in accordance with an access cycle and outputting the second instruction code as a second instruction code, using a power timing signal; An access data from a data aligner and a second instruction code from the instruction holding circuit are received as inputs, and only the access data or a part of the second instruction code is added to the access data based on a first select signal. A first selector that multiplexes and outputs a first instruction code from the instruction aligner and a second instruction code from the instruction holding circuit, and based on a second select signal, A second instruction code for multiplexing only the second instruction code or a part of the first instruction code to the second instruction code and outputting the result; A first switching control circuit that receives the first strobe signal and a timing signal from the timing control circuit, generates the first select signal, and outputs the first select signal to the first selector; A second switching control circuit for receiving the instruction length discrimination signal, the second strobe signal, and the timing signal from the timing control circuit, generating the second select signal, and outputting the second select signal to the second selector An in-circuit emulator comprising:
【請求項6】 前記第1の切換制御回路は、前記タイミ
ング信号がアクセス幅が最大データ幅より小さいことを
示しているか否か判断し、最大データ幅のときは前記第
1のセレクタにより前記アクセスデータのみを選択さ
せ、前記最大データ幅より小さいときは前記第1のセレ
クタにより前記アクセスデータに前記第2の命令コード
の一部をマルチプレクスして選択させ、前記第2の切換
制御回路は、前記命令デコーダからの命令長の判別信号
が所定値より長いことを示しているときは、前記第2の
セレクタにより前記第2の命令コードのみを選択させ、
前記命令長が前記所定値より短いときは前記第2のセレ
クタにより前記第2の命令コードに前記第1の命令コー
ドの一部をマルチプレクスして選択させることを特徴と
する請求項5記載のインサーキットエミュレータ。
6. The first switching control circuit determines whether or not the timing signal indicates that an access width is smaller than a maximum data width. When the timing signal has a maximum data width, the first selector controls the access by the first selector. Only the data is selected, and when smaller than the maximum data width, the first selector causes the access data to multiplex and select a part of the second instruction code, and the second switching control circuit includes: When the instruction length determination signal from the instruction decoder indicates that the instruction length is longer than a predetermined value, the second selector selects only the second instruction code,
6. The method according to claim 5, wherein when the instruction length is shorter than the predetermined value, the second selector causes the second instruction code to multiplex and select a part of the first instruction code. In-circuit emulator.
JP10334101A 1998-11-25 1998-11-25 In-circuit emulator Expired - Fee Related JP3001547B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10334101A JP3001547B1 (en) 1998-11-25 1998-11-25 In-circuit emulator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10334101A JP3001547B1 (en) 1998-11-25 1998-11-25 In-circuit emulator

Publications (2)

Publication Number Publication Date
JP3001547B1 JP3001547B1 (en) 2000-01-24
JP2000163281A true JP2000163281A (en) 2000-06-16

Family

ID=18273546

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10334101A Expired - Fee Related JP3001547B1 (en) 1998-11-25 1998-11-25 In-circuit emulator

Country Status (1)

Country Link
JP (1) JP3001547B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7562199B2 (en) 2005-09-30 2009-07-14 Kabushiki Kaisha Toshiba Method, apparatus and program for management of access history, storage unit, and information processing apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7562199B2 (en) 2005-09-30 2009-07-14 Kabushiki Kaisha Toshiba Method, apparatus and program for management of access history, storage unit, and information processing apparatus

Also Published As

Publication number Publication date
JP3001547B1 (en) 2000-01-24

Similar Documents

Publication Publication Date Title
US4987537A (en) Computer capable of accessing a memory by supplying an address having a length shorter than that of a required address for the memory
US4780819A (en) Emulator system utilizing a program counter and a latch coupled to an emulator memory for reducing fletch line of instructions stored in the emulator memory
JP2002323995A (en) Trace circuit
US4747045A (en) Information processing apparatus having an instruction prefetch circuit
KR20020041276A (en) Trace control circuit
KR920007253B1 (en) Controlling apparatus for micro-program
US5930470A (en) Debugging system and debugging method
JP3001547B1 (en) In-circuit emulator
JP2000029508A (en) Programmable controller
JP2883465B2 (en) Electronic computer
JP2586646B2 (en) Microcomputer
US5109516A (en) Sequence controller for controlling next operating state with a short sequence
JP2721610B2 (en) Programmable controller
JP3366235B2 (en) Data read control device
JPS6259829B2 (en)
JP2721611B2 (en) Programmable controller
JP2701799B2 (en) Microcomputer
JP2770420B2 (en) Micro program control method
JPS63123137A (en) Address coincidence signal generating system
JPS62248043A (en) Memory switching circuit for fetching microcomputer instruction
JPH09325935A (en) Bus switching circuit
JPS62168235A (en) Data processor
JPS6218933B2 (en)
JPH1055289A (en) Debugging information generating circuit and information processor using the same
JPS59106048A (en) Microprocessor system

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees