JP3088285B2 - In-circuit emulator - Google Patents

In-circuit emulator

Info

Publication number
JP3088285B2
JP3088285B2 JP08136683A JP13668396A JP3088285B2 JP 3088285 B2 JP3088285 B2 JP 3088285B2 JP 08136683 A JP08136683 A JP 08136683A JP 13668396 A JP13668396 A JP 13668396A JP 3088285 B2 JP3088285 B2 JP 3088285B2
Authority
JP
Japan
Prior art keywords
emulation
circuit
memory
address
interrupt
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.)
Expired - Fee Related
Application number
JP08136683A
Other languages
Japanese (ja)
Other versions
JPH09319607A (en
Inventor
敬治 木場
Original Assignee
日本電気アイシーマイコンシステム株式会社
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 日本電気アイシーマイコンシステム株式会社 filed Critical 日本電気アイシーマイコンシステム株式会社
Priority to JP08136683A priority Critical patent/JP3088285B2/en
Publication of JPH09319607A publication Critical patent/JPH09319607A/en
Application granted granted Critical
Publication of JP3088285B2 publication Critical patent/JP3088285B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【発明の属する技術分野】本発明はインサーキットエミ
ュレータに関し、特にマイクロコンピュータのソフトウ
ェアをデバッグするインサーキットエミュレータに関す
る。
The present invention relates to an in-circuit emulator, and more particularly to an in-circuit emulator for debugging microcomputer software.

【0002】[0002]

【従来の技術】従来より、マイクロコンピュータ応用機
器のデバッグツールとしてインサーキットエミュレータ
が広く用いられている。インサーキットエミュレータは
ユーザの作成した応用プログラムのデバッグを効率よく
行うための装置でユーザシステムの代りとなり応用プロ
グラムを実時間で実行(この状態をエミュレーションと
呼ぶ)でき、ユーザの設定したアドレスのプログラムの
実行後、エミュレーションを一時中断し(この状態をブ
レークと呼ぶ)、その時のレジスタ内容を表示する機能
や、メモリやレジスタの内容の表示や書換等の機能を有
している。
2. Description of the Related Art Conventionally, an in-circuit emulator has been widely used as a debugging tool for microcomputer applied equipment. The in-circuit emulator is a device for efficiently debugging an application program created by a user, and can replace the user system and execute the application program in real time (this state is called emulation). After execution, the emulation is temporarily suspended (this state is called a break), and has a function of displaying the register contents at that time, a function of displaying and rewriting the contents of the memory and the registers, and the like.

【0003】ところが、ユーザプログラムの中の一部の
処理は、ブレーク中でも外部端子経由あるいは他のハー
ドウェアからの要求に応じて定期的に実行する必要があ
る。これらの処理は上記ユーザプログラム中では割込処
理として記述されている。したがって、ブレーク中でも
ユーザ割込処理だけでは受け付けて実行し、この割込処
理が終了すると再度ブレーク状態に戻るというブレーク
中のユーザ割込実行可能なインサーキットエミュレータ
の要求が高まってきている。これに対して従来から幾つ
かの実現方法が検討されてきた。
However, some processing in the user program must be executed periodically even during a break, via an external terminal or in response to a request from other hardware. These processes are described as interrupt processes in the user program. Accordingly, there is an increasing demand for an in-circuit emulator capable of executing a user interrupt during a break, which accepts and executes only the user interrupt process even during a break, and returns to the break state again when the interrupt process ends. On the other hand, several realization methods have been conventionally studied.

【0004】まず、ブレーク中のユーザ割込実行が不可
能である一般的な従来の第1のインサーキットエミュレ
ータをブロックで示す図6(A),(B)を参照する
と、この従来の第1のインサーキットエミュレータは、
エミュレーション処理の全体の制御を行うとともに操作
者の操作のためのパソコン等のホストマシン(図示省
略)とのインターフエースを行う制御部1と、エミュレ
ーションを実行するエミュレーション部2とを備える。
First, referring to FIGS. 6A and 6B showing a block diagram of a general conventional first in-circuit emulator which cannot execute a user interrupt during a break, FIG. The in-circuit emulator of
A control unit 1 controls the entire emulation process and interfaces with a host machine (not shown) such as a personal computer for operation by an operator, and an emulation unit 2 executes emulation.

【0005】エミュレーション部2は、エミュレーショ
ン対象のマイクロコンピュータと同一動作をしエミュレ
ータのデバッグ機能を実行するエバリエーションチップ
(以下エバチップ)31を含むエミュレーション回路3
と、エバチップ31の実行プログラムを格納したオルタ
ネートメモリ21と、デバッグ対象プログラムを格納し
たエミュレーションメモリ22と、エミュレーション回
路3とオルタネートメモリ21,エミュレーションメモ
リ22との間に配置されこれらメモリをエミュレート対
象のCPUのアドレス空間のどこに配置するかを選択す
るためのマッパ回路4とを備える。
The emulation unit 2 operates in the same manner as the microcomputer to be emulated, and includes an emulation chip 3 (hereinafter referred to as an “evaluation chip”) 31 for executing a debugging function of the emulator.
, An alternate memory 21 storing an execution program of the evaluation chip 31, an emulation memory 22 storing a program to be debugged, and an emulation circuit 3, which is arranged between the alternate memory 21 and the emulation memory 22, for emulating these memories. And a mapper circuit 4 for selecting where to place the address space in the CPU address space.

【0006】マッパ回路4は、マッピングレジスタ4
1,42と、アドレス比較器43,44と、インバータ
45とを備える。
The mapper circuit 4 includes a mapping register 4
1, 42, address comparators 43 and 44, and an inverter 45.

【0007】次に、図6を参照して、従来の第1のイン
サーキットエミュレータの動作について説明すると、エ
ミュレーション回路3のエバチップ31は、制御部1か
らの命令に基づきエミュレーション回路3内で生成され
る制御信号SVIの供給に応答してスーパバイザ(S
V)モード信号SVMを発生する。このSVモード信号
SVMは、エミュレータ制御用あるいはデバッグ用の特
殊な割込すなわち特権(スーパバイザ)割込(以下SV
I)が受け付けられてその割込処理中であることを示す
信号である。エバチップ31とオルタネートメモリ2
1,エミュレーションメモリ22の各々との間はマッパ
回路4を経由して、アドレスバスおよびデータバスとに
より接続されている。
Next, the operation of the first conventional in-circuit emulator will be described with reference to FIG. 6. The evaluation chip 31 of the emulation circuit 3 is generated in the emulation circuit 3 based on a command from the control unit 1. In response to the supply of the control signal SVI, the supervisor (S
V) Generate a mode signal SVM. The SV mode signal SVM is a special interrupt for emulator control or debugging, that is, a privilege (supervisor) interrupt (hereinafter referred to as SV
I) is a signal indicating that the interrupt has been accepted and the interrupt processing is being performed. EVA chip 31 and alternate memory 2
1, each of the emulation memories 22 is connected via a mapper circuit 4 to an address bus and a data bus.

【0008】エミュレーションメモリ22は、ユーザが
デバッグしようとしているデバッグ対象プログラムを格
納しており、通常の実行状態すなわちラン状態では、エ
バチップ31はこのメモリを選択しその内容を読出して
実行する。一方、オルタネートメモリ21は、ブレーク
状態でエバチップ31にその内容をダンプさせたりする
ことなどいわゆるエミュレータシステムとしてのデバッ
グ機能を実行させるためのエミュレータ実行プログラム
を格納している。エバチップ31は、制御信号SVIの
供給に応答してブレーク状態となり、SV信号SVMの
供給に応答してオルタネートメモリ21を選択してその
中のプログラムを実行する。
The emulation memory 22 stores a program to be debugged which the user is trying to debug, and in a normal execution state, that is, a run state, the evaluation chip 31 selects this memory, reads out its contents, and executes it. On the other hand, the alternate memory 21 stores an emulator execution program for executing a debugging function as a so-called emulator system such as causing the evaluation chip 31 to dump its contents in a break state. The evaluation chip 31 enters a break state in response to the supply of the control signal SVI, selects the alternate memory 21 in response to the supply of the SV signal SVM, and executes a program therein.

【0009】マッパ回路4の比較器43は、コントロー
ル入力にSVモード信号SVMの供給を受けマッピング
レジスタ41の値とエバチップ31の命令フエッチのア
ドレスAの上位とを比較し一致したときチップセレクト
信号CS1を出力する。例えばアドレスを24とすると
上位側から10を入力する。この比較結果生成されたチ
ップセレクト信号CS1をオルタネートメモリ21のチ
ップセレクト端子CSに供給する。また、SVモード信
号SVMはインバータ45で反転されて比較器44のコ
ントロール入力に供給される。比較器44は、マッピン
グレジスタ42の値とアドレスAの上位との比較結果の
一致によりチップセレクト信号CS2を出力し、エミュ
レーションメモリ22のチップセレクト端子CSに供給
する。また、オルタネートメモリ21,エミュレーショ
ンメモリ22の各々は命令フエッチアドレスAとデータ
の供給を受ける。
The comparator 43 of the mapper circuit 4 receives the supply of the SV mode signal SVM as a control input, compares the value of the mapping register 41 with the upper part of the address A of the instruction fetch of the evaluation chip 31, and when they match, the chip select signal CS1 Is output. For example, if the address is 24, 10 is input from the upper side. The chip select signal CS1 generated as a result of the comparison is supplied to the chip select terminal CS of the alternate memory 21. The SV mode signal SVM is inverted by the inverter 45 and supplied to the control input of the comparator 44. The comparator 44 outputs a chip select signal CS <b> 2 when the value of the mapping register 42 matches the comparison result of the higher order of the address A, and supplies the chip select signal CS <b> 2 to the chip select terminal CS of the emulation memory 22. Each of the alternate memory 21 and the emulation memory 22 stores an instruction fetch address A and a data
D is supplied.

【0010】エミュレーション回路3のエバチップ31
は、通常使用する内部SVモード信号をSVモード信号
SVMとしてそのまま外部に出力する。SVモード信号
SVMが無効すなわち0のときアドレス比較器43は無
効となりその出力CS1は0でオルタネートメモリ21
を選択しない。一方、インバータ45はSVモード信号
SVMを反転しアドレス比較器44を有効化する。これ
によりマッピングレジスタ42の設定値とアドレスAの
上位値とを比較し一致するとチップセレクト信号CS2
が1に変化してエミュレーションメモリ22を選択す
る。逆に、SVモード信号SVMが1の場合も同様にレ
ジスタ41の設定値に対応してオルタネートメモリ21
を選択する。したがって、SVモード信号SVMによる
制御とレジスタ41,42の値の一致不一致で実際のメ
モリを選択する。このようなレジスタとアドレス比較器
を複数有する場合もある。
The evaluation chip 31 of the emulation circuit 3
Directly outputs the normally used internal SV mode signal as the SV mode signal SVM to the outside. When the SV mode signal SVM is invalid, that is, 0, the address comparator 43 is invalid and its output CS1 is 0, and the alternate memory 21
Do not select On the other hand, the inverter 45 inverts the SV mode signal SVM and activates the address comparator 44. As a result, the set value of the mapping register 42 is compared with the upper value of the address A, and if they match, the chip select signal CS2
Changes to 1 to select the emulation memory 22. Conversely, when the SV mode signal SVM is 1, similarly, the alternate memory 21 corresponds to the set value of the register 41.
Select Therefore, an actual memory is selected based on the control by the SV mode signal SVM and the mismatch between the values of the registers 41 and 42. In some cases, a plurality of such registers and address comparators are provided.

【0011】この従来の第1のインサーキットエミュレ
ータは、ブレーク中はSVモード信号SVMが必ず1で
あるので、割込禁止回路313が動作してユーザの割込
要求があってもそれを受け付けることができない。
In the first conventional in-circuit emulator, since the SV mode signal SVM is always 1 during a break, the interrupt prohibition circuit 313 operates to accept a user's interrupt request even if it is issued. Can not.

【0012】特開平1−184545号公報(文献1)
記載のブレーク中のユーザ割込実行可能な従来の第2の
インサーキットエミュレータはエミュレーションを実行
する主要部分であるエミュレーション回路のエバチップ
に特別の操作によるユーザ割込機能を設けることによ
り、ブレーク中のユーザ割込の実行を可能としていた。
JP-A-1-184545 (Reference 1)
The second conventional in-circuit emulator capable of executing a user interrupt during a break described above is provided with a user interrupt function by a special operation in an evaluation chip of an emulation circuit, which is a main part of executing emulation, thereby providing a user interrupt during a break. Execution of interrupt was enabled.

【0013】従来の第2のインサーキットエミュレータ
を図6と共通の構成要素には共通の参照文字/数字を付
して同様にブロックで示す図7(A),(B)を参照す
ると、この従来の第2のインサーキットエミュレータの
従来の第1のインサーキットエミュレータとの相違点
は、エミュレーション部2の代りにユーザ割込を可能と
するため内部SVモード信号に対しユーザ操作により有
効/無効を設定して外部出力SVモード信号SVMを生
成するエバチップ300を有するエミュレーション回路
3Aを備えるエミュレーション部2Aを備えることであ
る。
Referring to FIGS. 7 (A) and 7 (B), which show a second conventional in-circuit emulator in common with FIG. The difference between the conventional second in-circuit emulator and the conventional first in-circuit emulator is that the internal SV mode signal is enabled / disabled by a user operation to enable a user interrupt instead of the emulation unit 2. An emulation section 2A including an emulation circuit 3A having an evaluation chip 300 for setting and generating an external output SV mode signal SVM is provided.

【0014】なお、エミュレーション回路3Aは、第1
の従来の回路と同様のマッパ回路4を備えるが、説明の
便宜上図示省略する。
The emulation circuit 3A has a first
Although the same mapper circuit 4 as the conventional circuit is provided, it is not shown for convenience of explanation.

【0015】この従来の第2のインサーキットエミュレ
ータを特徴ずけるエバチップ300は、後述のスーパバ
イザモード中に割込処理の可能/不可能のいずれか一方
のモードを設定するレジスタ311と、スーパバイザ割
込以外の割込発生時にその割込モード信号を出力するF
F312と、信号値の1の供給に応答して割込を禁止す
る割込禁止回路313とを備える。
The evaluation chip 300, which is characterized by the second conventional in-circuit emulator, includes a register 311 for setting one of the modes of enabling / disabling interrupt processing during a supervisor mode described later; F that outputs the interrupt mode signal when an interrupt other than
F312, and an interrupt prohibition circuit 313 that prohibits an interrupt in response to the supply of a signal value of 1.

【0016】次に、図7を参照して、従来の第2のイン
サーキットエミュレータの動作について説明すると、第
1のインサーキットエミュレータと同様に、エミュレー
ション部2Aのオルタネートメモリ21はチップセレク
トCSにエミュレーション回路3Aからのスーパバイザ
(SV)モード信号SVMの供給を受けている。一方、
エミュレーションメモリ22はチップセレクトCSBに
はSVモード信号SVMの反転信号である反転SV信号
SVMBの供給を受けている。エバチップ300はエミ
ュレーション回路3内で生成される制御信号SVIの供
給を受けており、このエバチップ300とオルタネート
メモリ21,エミュレーションメモリ22の各々との間
はマッパ回路(図示省略)経由でアドレスバスおよびデ
ータバスとにより接続されている。
Next, the operation of the second conventional in-circuit emulator will be described with reference to FIG. 7. Similar to the first in-circuit emulator, the alternate memory 21 of the emulation section 2A stores the emulation in the chip select CS. The circuit is supplied with a supervisor (SV) mode signal SVM from the circuit 3A. on the other hand,
The emulation memory 22 receives an inverted SV signal SVMB, which is an inverted signal of the SV mode signal SVM, for the chip select CSB. The evaluation chip 300 receives the supply of the control signal SVI generated in the emulation circuit 3, and the address bus and the data between the evaluation chip 300 and each of the alternate memory 21 and the emulation memory 22 via a mapper circuit (not shown). It is connected by a bus.

【0017】通常の実行状態すなわちラン状態では、従
来の第1のインサーキットエミュレータと同様にエバチ
ップ300はエミュレーションメモリ22を選択しその
内容を読出して実行する。エバチップ300は、制御信
号SVIの供給に応答してブレーク状態となり、SV信
号SVMの供給に応答してオルタネートメモリ21を選
択してその中のプログラムを実行する。
In a normal execution state, that is, a run state, the evaluation chip 300 selects the emulation memory 22, reads out the contents thereof, and executes the same as in the first conventional in-circuit emulator. The evaluation chip 300 enters a break state in response to the supply of the control signal SVI, selects the alternate memory 21 in response to the supply of the SV signal SVM, and executes a program therein.

【0018】ここまでは、従来の第1のインサーキット
エミュレータと同一機能であるが、この従来の第2のイ
ンサーキットエミュレータでは、オルタネートメモリ2
1,エミュレーション22のどちらかを選択するSV信
号SVMに関して、上述のように特殊なエバチップ30
0を用いていることである。すなわち、このエバチップ
300は、内部のラン,ブレークを示す内部SVモード
信号SVM0をそのままチップ外部に出力しメモリ2
1,22に供給するのではなく、レジスタ311で特別
なモードを設定しているときは割込中にFF312がリ
セットされ、この割込が解除されるまでは出力のSVモ
ード信号SVMに内部SVモード信号SVM0が反映さ
れないようにしている。同時に内部SVモード信号SV
M0が有効でも他の割込が禁止されなくなる。
Up to this point, the function is the same as that of the first conventional in-circuit emulator.
1, the emulation 22 and the special evaluation chip 30 as described above with respect to the SV signal SVM.
0 is used. That is, the evaluation chip 300 outputs the internal SV mode signal SVM0 indicating the internal run and break to the outside of the chip as it is,
When the special mode is set in the register 311 instead of supplying the signals to the FF 312 and the FF 312 during the interrupt, the FF 312 is reset during the interrupt. The mode signal SVM0 is not reflected. At the same time, the internal SV mode signal SV
Even if M0 is valid, other interrupts are not prohibited.

【0019】これにより、SVI中すなわち内部SVモ
ード信号SVM0が有効であってもユーザ割込を受け付
けることが可能となり、その際にこの割込処理が終了す
るまですなわち信号RTIが入力されるまでは、エバ
チップ300はメモリとしてエミュレーションメモリを
選択しユーザ割込処理を実行する。
[0019] Accordingly, even effective SVI in other words the internal SV mode signal SVM0 becomes possible to accept a user interrupt, that is, the signal R E TI until this interrupt processing is completed is entered when the Until then, the evaluation chip 300 selects an emulation memory as a memory and executes a user interrupt process.

【0020】しかし、この第2の従来のインサーキット
エミュレータは、上述のように、ブレーク中のユーザ割
込要求を受付可能とするため特殊なエバチップを提案し
ている。このようなエバチップを準備できたマイクロコ
ンピュータに関しては上記機能を実現可能であるが、既
にエバチップが存在するマイクロコンピュータに関して
は新規にエバチップを作り直す必要があり、通常この種
のチップ開発に要する数千万円オーダの投資が新たに必
要となるという問題がある。
However, the second conventional in-circuit emulator proposes a special evaluation chip as described above in order to be able to accept a user interrupt request during a break. The above function can be realized for a microcomputer having such an evaluation chip prepared.However, for a microcomputer having an evaluation chip, it is necessary to make a new evaluation chip. There is a problem that a new investment on the order of yen is required.

【0021】さらに、ユーザは異なるマイクロコンピュ
ータの使用毎に異なるエミュレータを購入する必要があ
り、また、それに伴ない異なる使用法をマスタする必要
があり、エミュレータの共通化が望まれている。また、
これは同時にエミュレータの供給者側でも、開発製造上
の問題点であり、やはり共通化推進の要因となる。
Further, the user needs to purchase a different emulator for each use of a different microcomputer, and also needs to master different usages in accordance with the use. Therefore, it is desired to use a common emulator. Also,
This is also a problem in the development and manufacturing of the emulator supplier, and is also a factor in promoting commonality.

【0022】エミュレータの共通化に関して第1の問題
点は、マイクロコンピュータの相違であり、これは回避
できない。したがって、従来の第1のインサーキットエ
ミュレータにおける制御部1,エミュレーションメモリ
22,オルタネートメモリ21,マッパ回路4等を共通
とするエミュレータを考えることができる。エミュレー
ション回路3は基本的にエミュレーション対象のマイク
ロコンピュータに依存構成と成らざるを得ないが、その
中でデバッグに使用するトレーサ機能や条件ブレーク等
の機能も共通化が可能である。最後に残るのは、主にエ
バチップを中心とするチップ機能そのもののエミュレー
ト機能となる。したがって、その部分を抜き出して交換
可能とするように基を独立することにより共通化を図
ることが可能である。
The first problem concerning the common use of emulators is the difference between microcomputers, which cannot be avoided. Therefore, it is possible to consider an emulator in which the control unit 1, the emulation memory 22, the alternate memory 21, the mapper circuit 4, and the like in the first conventional in-circuit emulator are common. The emulation circuit 3 basically depends on the microcomputer to be emulated, but the functions such as a tracer function and a condition break used for debugging can be shared. What remains at the end is the emulation function of the chip function itself, mainly the evaluation chip. Therefore, it is possible to achieve common by independent board so as to be replaceable by extracting the part.

【0023】第2の問題点は、チップのラン,ブレーク
制御に関するものであり、第2の従来のインサーキット
エミュレータのように、チップ内で対応したVSモード
信号を外部に出力するよう制御可能なものはブレーク中
のユーザ割込が受付けられて、それ以外のエバチップの
マイクロコンピュータではブレーク中のユーザ割込が受
付けられないというように、共通エミュレータでありな
がら機能が異なってしまう点である。また、既にエバチ
ップが存在する(現存マイクロコンピュータが全部該
当)にもかかわらず、第2の従来のインサーキットエミ
ュレータのような特殊エバチップを全てのマイクロコン
ピュータに関して新規に開発することは、費用,工数的
に実質的に不可能である。しかし、この種の機能は今後
益々望まれいる。
The second problem relates to the control of the run and break of the chip. As in the second conventional in-circuit emulator, it can be controlled to output the corresponding VS mode signal in the chip to the outside. What is different is that although the user interrupt during the break is accepted, the microcomputers of other evaluation chips cannot accept the user interrupt during the break, but the functions are different even though they are common emulators. In addition, despite the fact that an evaluation chip already exists (all existing microcomputers apply), it is costly and time-consuming to newly develop a special evaluation chip such as the second conventional in-circuit emulator for all the microcomputers. Is virtually impossible. However, this type of function is increasingly desired in the future.

【0024】次に、特開平1−309138号公報(文
献2)記載のブレーク中のユーザ割込実行可能な従来の
第3のインサーキットエミュレータは、従来の第2のイ
ンサーキットエミュレータのような特殊なエバチップを
用いることなく既存チップを用い、メモリの切替に特別
な操作を行うことなくユーザの使用するエミュレーショ
ンメモリ上にデバッグに使用するプログラムも配置・使
用することにより、ブレーク中のユーザ割込の実行を可
能としていた。
Next, a third conventional in-circuit emulator capable of executing a user interrupt during a break described in Japanese Patent Application Laid-Open No. 1-309138 (Document 2) is a special in-circuit emulator such as the second conventional in-circuit emulator. By using an existing chip without using a simple evaluation chip and arranging and using a program used for debugging on the emulation memory used by the user without performing any special operation for memory switching, user interrupts during breaks can be prevented. Execution was possible.

【0025】従来の第3のインサーキットエミュレータ
のエミュレーションメモリ22Aのメモリ空間の状況を
模式的に示す図8を参照すると、この従来の第2のイン
サーキットエミュレータのエミュレーションメモリ22
Aは、ユーザプログラム101と、デバッグ用プログラ
ム102とを格納している。
Referring to FIG. 8, which schematically shows the state of the memory space of the emulation memory 22A of the third conventional in-circuit emulator, the emulation memory 22 of the second conventional in-circuit emulator is shown.
A stores a user program 101 and a debugging program 102.

【0026】通常は、ユーザプログラム101を実行し
ており、SVIに相当する割込あるいはデータ領域のデ
ータ授受で制御をデバッグ用のプログラム102に移し
てこれを実行する。このように、ユーザプログラム10
1の実行が停止しデバッグ用プログラム102の実行の
状態がすなわちブレーク状態である。したがって、この
ブレーク状態はメモリの切替がなくSVI状態ではない
ので、ユーザの割込が生ずるとそれが終了するまで再度
ユーザプログラム101を実行することができる。
Normally, the user program 101 is executed, and the control is transferred to the debug program 102 by an interrupt corresponding to SVI or data transfer of the data area, and executed. Thus, the user program 10
1 is stopped and the state of execution of the debugging program 102 is a break state. Therefore, in this break state, since the memory is not switched and the state is not the SVI state, if a user interrupt occurs, the user program 101 can be executed again until the interruption ends.

【0027】しかし、エミュレーションメモリ22Aは
エミュレーション対象のマイクロコンピュータのメモリ
すなわちユーザメモリに対応しているので、デバッグプ
ログラム102の分だけユーザメモリの容量を使用して
いることになり、したがって、このマイクロコンピュー
タの最大メモリ容量を利用できないことになる。
However, since the emulation memory 22A corresponds to the memory of the microcomputer to be emulated, that is, the user memory, the emulation memory 22A uses the capacity of the user memory for the debug program 102. Will not be able to use the maximum memory capacity.

【0028】[0028]

【発明が解決しようとする課題】上述した従来の第1の
インサーキットエミュレータは、ブレーク中には割込禁
止回路が動作することによりユーザの割込要求があって
も受付不可能であるという欠点があった。
The above-mentioned first in-circuit emulator of the prior art has a drawback that the interrupt prohibition circuit operates during a break so that even if there is a user interrupt request, it cannot be accepted. was there.

【0029】ブレーク中のユーザ割込要求を受付可能と
した従来の第2のインサーキットエミュレータは、スー
パバイザ信号処理に関した特殊なエバチップを必要と
し、エミュレータの共通化の阻害要因となるという欠点
があった。また、この種の特殊機能を新たに含めたエバ
チップは高額の開発費と工数を必要とし、既存マイクロ
コンピュータに対応して新規に開発することは実質的に
不可能であるという欠点があった。
The conventional second in-circuit emulator which can accept a user interrupt request during a break requires a special evaluation chip for supervisor signal processing, and has a drawback that it becomes a hindrance to the common emulator. Was. Further, an evaluation chip including such a special function newly requires a large amount of development cost and man-hour, and has a disadvantage that it is practically impossible to newly develop an existing microcomputer.

【0030】既存エバチップを用いてブレーク中のユー
ザ割込要求を受付可能とする従来の第3のインサーキッ
トエミュレータは、ユーザのプログラムメモリ上にデバ
ッグプログラムを配置するので、ユーザの実行させるプ
ログラム領域を削減することになり、したがってユーザ
がそのマイクロコンピュータの最大メモリ容量を利用で
きないという欠点があった。
In the third conventional in-circuit emulator that can accept a user interrupt request during a break by using an existing evaluation chip, a debug program is arranged on the user's program memory, so that the program area to be executed by the user is The disadvantage is that the user cannot utilize the maximum memory capacity of the microcomputer.

【0031】本発明の目的は、ブレーク中のユーザ割込
要求を受付可能とし、スーパバイザ信号処理に関した特
殊なエバチップを必要とすることなく、したがって共通
エミュレータを実現でき、しかもユーザメモリ領域を使
用する必要のないインサーキットエミュレータを提供す
ることにある。
An object of the present invention is to make it possible to accept a user interrupt request during a break, to eliminate the need for a special evaluation chip relating to supervisory signal processing, to realize a common emulator, and to use a user memory area. It is to provide an in-circuit emulator that is unnecessary.

【0032】[0032]

【課題を解決するための手段】本発明のインサーキット
エミュレータは、エミュレーション処理の全体の制御を
行う制御部と、エミュレーション対象のマイクロコンピ
ュータと同一動作をしエミュレータのデバッグ機能を実
行するエバリエーションチップを含むエミュレーション
回路と、前記エバリエーションチップの実行用のデバッ
グプログラムを格納したオルタネートメモリと、デバッ
グ対象のユーザプログラムを格納したエミュレーション
メモリとを有しエミュレーションを実行するエミュレー
ション部とを備え、前記制御部が前記エミュレーション
部に対しエミュレータ制御用の特権割込を発生し、前記
エミュレーション部が前記特権割込の発生に応答して前
記エミュレーションメモリを前記オルタネートメモリに
切換えエミュレーションを実行するインサーキットエミ
ュレータにおいて、前記エミュレーション回路が、前記
デバッグプログラムの実行に対応してセット,リセット
可能なモードフラグを発生するモードフラグ回路を備
え、前記エミュレーション回路と前記オルタネートメモ
リおよび前記エミュレーションメモリとの間に配置され
これらメモリをエミュレート対象のマイクロコンピュー
タのアドレス空間のどこに配置するかを選択するととも
前記特権割込中と前記モードフラグのセット時に前記
オルタネートメモリの存在する範囲のアドレスで前記オ
ルタネートメモリを選択しそれ以外では前記エミュレー
ションメモリを選択するマッパ回路を備え、前記特権割
込に応答して前記ユーザプログラムの実行を中断するブ
レーク状態となったときでも前記特権割込以下の優先度
の低優先度割込発生時にこの低優先度割込の受付けを可
能とすることを特徴とするものである。
An in-circuit emulator according to the present invention comprises a control section for controlling the entire emulation processing, and an evariance chip for performing the same operation as the microcomputer to be emulated and executing the debugging function of the emulator. An emulation circuit that includes an emulation circuit that includes a debug program for executing the evolution chip, an emulation memory that stores a user program to be debugged, and executes an emulation. An emulator control privilege interrupt is generated for the emulation unit, and the emulation unit switches the emulation memory to the alternate memory in response to the generation of the privilege interrupt. In in-circuit emulator for executing ® down, the emulation circuit is set in response to execution of said debug program includes a mode flag circuit generating a resettable mode flag, the alternate notes and the emulation circuit
Memory and the emulation memory.
These memories are emulated by the microcomputer
And where to place it in the address space of the
Wherein in a range of addresses that are present in the alternate memory in the privileged interrupt and when the set of mode flags selected otherwise the alternate memory is provided with a mapper circuit for selecting said emulation memory, responsive to said privileged interrupts The low-priority interrupt can be accepted when a low-priority interrupt having a priority equal to or lower than the privileged interrupt occurs even in a break state in which the execution of the user program is interrupted. It is.

【0033】[0033]

【発明の実施の形態】次に、本発明の実施の形態を図6
と共通の構成要素には共通の参照文字/数字を付して同
様にブロックで示す図1(A),(B)を参照すると、
この図に示す本実施の形態のインサーキットエミュレー
タは、従来の第1の例と共通の制御部1と、ブレーク中
のユーザ割込受付機能を有するエミュレーション部2B
とを備える。
Next, an embodiment of the present invention will be described with reference to FIG.
1 (A) and 1 (B), which are denoted by common reference characters / numerals and are similarly indicated by blocks,
The in-circuit emulator of the present embodiment shown in this figure has a control unit 1 common to the first example of the prior art and an emulation unit 2B having a user interrupt reception function during a break.
And

【0034】エミュレーション部2Bは、従来と共通の
オルタネートメモリ21と、エミュレーションメモリ2
2とに加えて、従来と共通のエバチップ31とエバチッ
プ31の命令実行により値の書換が可能なモードフラグ
Fを発生するモードフラグ回路32とを備えるエミュレ
ーション回路3Bと、従来と共通のマッピングレジスタ
41,42と、アドレス比較器43,44とに加えて、
SVモード信号SVMとモードフラグFとの論理和をと
りこの論理和信号OVをアドレス比較器43のコントロ
ール入力に供給するORゲート46と、インバータ45
の代りにアドレス比較器43の出力のチップセンレクト
信号CS1を反転してアドレス比較器44のコントロー
ル入力に供給するインバータ47とを有し、スーパバイ
ズ割込(SVI)中とモードフラグFのセット時にオル
タネートメモリ21の存在範囲アドレスでこのオルタネ
ートメモリ21を選択しそれ以外ではエミュレーション
メモリ22を選択するマッパ回路4Aを備える。
The emulation section 2B includes an alternate memory 21 common to the conventional one and an emulation memory 2
2 and an emulation circuit 3B having a common evaluation chip 31 and a mode flag circuit 32 for generating a mode flag F whose value can be rewritten by executing an instruction of the evaluation chip 31, and a mapping register 41 common to the conventional technology. , 42 and the address comparators 43, 44,
An OR gate 46 for taking a logical sum of the SV mode signal SVM and the mode flag F and supplying this logical sum signal OV to the control input of the address comparator 43;
Alternatively and an inverter 47 for supplying inverted and the chip sensor recto signal CS1 output to the control input of the address comparator 44 the address comparator 43, Supabai
During interrupt interrupt (SVI) and when mode flag F is set
This alteration is performed using the existence range address of the tonate memory 21.
Select emulator memory 21 and emulation otherwise
A mapper circuit 4A for selecting the memory 22 is provided.

【0035】次に、図1を参照して本実施の形態の動作
について説明すると、まず、従来の第1のインサーキッ
トエミュレータと同様に、エミュレーション回路3Bの
エバチップ31は、スーパバイザ割込(SVI)の受付
・割込処理中であることを示すスーパバイザ(SV)モ
ード信号SVMとして内部SV信号SVM信号をそのま
ま外部に出力する。モードフラグ回路32で生成したモ
ードフラグFはマッパ回路4AのORゲート46に供給
される。ORゲート46はこのモードフラグFとSVモ
ード信号SVMとの供給を受けて生成した論理和信号O
Vをアドレス比較器43のコントロール入力に供給す
る。
Next, the operation of this embodiment will be described with reference to FIG. 1. First, like the first conventional in-circuit emulator, the evaluation chip 31 of the emulation circuit 3B has a supervisor interrupt (SVI). The internal SV signal SVM signal is output to the outside as it is as the supervisor (SV) mode signal SVM indicating that the reception / interruption processing is being performed. The mode flag F generated by the mode flag circuit 32 is supplied to the OR gate 46 of the mapper circuit 4A. The OR gate 46 receives the supply of the mode flag F and the SV mode signal SVM to generate a logical sum signal O.
V is supplied to the control input of the address comparator 43.

【0036】比較器43は、コントロール入力に論理和
OVの供給を受け、従来と同様にマッピングレジスタ4
1の値とエバチップ31の命令フエッチのアドレスAの
上位とを比較し一致したときチップセレクト信号CS1
を出力し、オルタネートメモリ21のチップセレクト端
子CSに供給する。また、インバータ47はチップセレ
クト信号CS1を反転してアドレス比較器44のコント
ロール入力に供給する。比較器44は、マッピングレジ
スタ42の値とアドレスAの上位との比較結果の一致に
よりチップセレクト信号CS2を出力し、エミュレーシ
ョンメモリ22のチップセレクト端子CSに供給する。
また、オルタネートメモリ21,エミュレーションメモ
リ22の各々は命令フエッチアドレスAとデータの供給
を受ける。
The comparator 43 receives the supply of the logical sum OV at the control input, and outputs the same to the mapping register 4 as in the prior art.
1 is compared with the high order address A of the instruction fetch of the evaluation chip 31, and when they match, the chip select signal CS1
And supplies it to the chip select terminal CS of the alternate memory 21. The inverter 47 inverts the chip select signal CS1 and supplies the inverted signal to the control input of the address comparator 44. The comparator 44 outputs a chip select signal CS <b> 2 when the value of the mapping register 42 matches the comparison result of the higher order of the address A, and supplies the chip select signal CS <b> 2 to the chip select terminal CS of the emulation memory 22.
Each of the alternate memory 21 and the emulation memory 22 receives an instruction fetch address A and data.

【0037】まず、SV信号SVMが0であり、モード
フラグ回路32で生成するモードフラグFも0とする。
すると、これら信号SVM,フラグFの各々の値0に応
答してORゲート46の出力する論理和信号OVも0と
なり、アドレス比較器43はインアクティブ状態で出力
のチップセレクト信号CS1も0となる。したがってオ
ルタネートメモリ21はセレクトされない。一方インバ
ータ47はチップセレクト信号CS1の値0を反転し信
号IVの値として1を出力する。この信号IVの値1に
応答してアドレス比較器44はアクティブ状態となりそ
のときのマッピングレジスタ42の設定値とアドレスA
の上位値とを比較し一致するとチップセレクト信号CS
2が1に変化してエミュレーションメモリ22を選択す
る。
First, the SV signal SVM is 0, and the mode flag F generated by the mode flag circuit 32 is also 0.
Then, the OR signal OV output from the OR gate 46 also becomes 0 in response to the respective values 0 of the signal SVM and the flag F, and the output chip select signal CS1 becomes 0 in the inactive state of the address comparator 43. . Therefore, the alternate memory 21 is not selected. On the other hand, the inverter 47 inverts the value 0 of the chip select signal CS1 and outputs 1 as the value of the signal IV. In response to the value 1 of the signal IV, the address comparator 44 becomes active and the set value of the mapping register 42 at that time and the address A
Is compared with the upper value of the chip select signal CS
2 changes to 1 to select the emulation memory 22.

【0038】次に、SV信号SVMが1のとき、また
は、モードフラグFが1の場合は、これら信号SVM,
フラグFのいずれかの値1に応答してORゲート46の
出力論理和信号OVも1となり、アドレス比較器43は
アクティブ状態となり、レジスタ41の設定値に対応し
てチップセレクト信号CS1を1としてオルタネートメ
モリ21を選択する。オルタネートメモリ21を選択し
ているときはエミュレーションメモリ22は非選択とな
るが、オルタネートメモリ21が非選択状態の場合はマ
ッピングレジスタ42の値に応じてエミュレーションメ
モリ22が選択される。
Next, when the SV signal SVM is 1, or when the mode flag F is 1, these signals SVM,
The output OR signal OV of the OR gate 46 also becomes 1 in response to any value 1 of the flag F, the address comparator 43 becomes active, and the chip select signal CS1 is set to 1 in accordance with the set value of the register 41. The alternate memory 21 is selected. When the alternate memory 21 is selected, the emulation memory 22 is not selected, but when the alternate memory 21 is not selected, the emulation memory 22 is selected according to the value of the mapping register 42.

【0039】次に、本実施の形態のインサーキットエミ
ュレータのラン状態からブレーク状態に移行する場合の
手順をフローチャートで示す図2(A)を参照すると、
まず、ラン状態(ステップS1)では、SV信号SVM
は0でモードフラグFも初期値0とすると、上述のよう
に、オルタネートメモリ21は非選択状態であり、マッ
ピングレジスタ42で設定したアドレス範囲のみエミュ
レーションメモリ22を選択する。したがって、ユーザ
のプログラムがマッピングされた範囲で動いている限り
正常にエミュレーションメモリ22上のプログラムを実
行する。
Next, referring to FIG. 2A which is a flowchart showing a procedure for shifting from the run state to the break state of the in-circuit emulator of the present embodiment,
First, in the run state (step S1), the SV signal SVM
Is 0 and the mode flag F is also set to the initial value 0, as described above, the alternate memory 21 is in the non-selected state, and selects the emulation memory 22 only in the address range set by the mapping register 42. Therefore, the program on the emulation memory 22 is normally executed as long as the user's program runs in the mapped range.

【0040】ここで、ブレーク状態とするためSVIが
発生すると、SV信号SVMは1となり上記のように、
マッピングレジスタ41で設定したアドレス範囲でオル
タネートメモリ21を選択する(ステップS2)。オル
タネートメモリ21上のプログラムでは、モードフラグ
Fを1に書換えて、ユーザプログラムの復帰先番地その
他の情報を退避し、続きのデバッグ用のプログラム番地
に復帰先番地を設定してリターンSVIを実行する(ス
テップS3)。
Here, when an SVI occurs to set a break state, the SV signal SVM becomes 1 as described above.
The alternate memory 21 is selected in the address range set by the mapping register 41 (step S2). In the program on the alternate memory 21, the mode flag F is rewritten to 1, the return address of the user program and other information are saved, the return address is set to the subsequent program address for debugging, and the return SVI is executed. (Step S3).

【0041】すると、SV信号SVMが0となるが、モ
ードフラグFが1であるので、マッピングレジスタ41
で設定したアドレス範囲にプログラムの制御が有る限り
優先的にオルタネートメモリ21を選択し、その内容を
実行するので実質的にブレーク状態となる。この状態で
ユーザの割込要求がある場合、SV信号SVは0である
のでこの割込要求は受付けられる(ステップS4)。こ
の結果、ベクタアドレスと割込処理プログラムとがオル
タネートメモリ21と重ならないように設定することに
より、このオルタネートメモリ21のマッピング範囲を
外れたところでは、エミュレーションメモリ22がその
マッピング範囲で有効化する。したがって、このエミュ
レーションメモリ22上のユーザ割込ルーチンが実行さ
れる。割込処理の実行が完了すると、実行プログラムは
再度オルタネートメモリ21に移る。
Then, the SV signal SVM becomes 0, but since the mode flag F is 1, the mapping register 41
As long as there is control of the program in the address range set in step (1), the alternate memory 21 is preferentially selected and its contents are executed. In this state, if there is an interrupt request from the user, this interrupt request is accepted because the SV signal SV is 0 (step S4). As a result, by setting the vector address and the interrupt processing program so that they do not overlap with the alternate memory 21, the emulation memory 22 is enabled in the mapping range of the alternate memory 21 outside the mapping range. Therefore, the user interrupt routine on the emulation memory 22 is executed. When the execution of the interrupt processing is completed, the execution program moves to the alternate memory 21 again.

【0042】この遷移中のメモリ状態を模式的に示す図
3を参照すると、ラン中はエミュレーションメモリ22
を選択し、ブレーク中はオルタネートメモリ21の選択
が優先で、同時にエミュレーションメモリ22もアクセ
ス可能となっている。
Referring to FIG. 3, which schematically shows the memory state during this transition, the emulation memory 22 during the run.
During the break, the selection of the alternate memory 21 has priority, and the emulation memory 22 is also accessible at the same time.

【0043】また、本実施の形態では、従来の第1のイ
ンサーキットエミュレータに比較して実際に追加される
回路がわずかであることがわかる。すなわちマッパ回路
の一部を変更することにより本実施の回路を実現でき
る。
Also, in the present embodiment, it can be seen that the number of circuits actually added is small compared to the conventional first in-circuit emulator. That is, the circuit of this embodiment can be realized by changing a part of the mapper circuit.

【0044】また、本実施の形態のエバチップ31の代
りに従来の第2の回路の特殊機能付エバチップ300を
用いる場合も、このエバチップ300の上記特殊機能を
使うレジスタを有効化しなければエバチップ31と同様
に使用できる。また上記特殊機能を用いる場合には本実
施の形態の上記処理手順を使わずモードフラグFの操作
をしなければ、従来の第2の回路の動作も実現可能であ
る。したがって、本実施の形態のインサーキットエミュ
レータはエバチップに依存することなく共通化を実現で
きる。
Also, in the case where the conventional evaluation chip 300 with the special function of the second circuit is used in place of the evaluation chip 31 of the present embodiment, the evaluation chip 31 and the function of the evaluation chip 300 which use the special function described above must be activated. Can be used as well. When the special function is used, the operation of the conventional second circuit can be realized unless the mode flag F is operated without using the processing procedure of the present embodiment. Therefore, the in-circuit emulator of the present embodiment can realize commonality without depending on the evaluation chip.

【0045】次に、ブレーク状態からラン状態に移行す
る場合の手順をフローチャートで示す図2(B)を参照
すると、まず、ブレーク状態(ステップS5)では、一
度SVIの発生に応答したSV信号SVMの1の状態と
なった後、ランからブレークの処理と逆の処理手順、す
なわちメモリのオルタネートメモリへの切替(ステップ
S6)、退避ユーザプログラムの復帰先等の情報のセッ
ト及びモードラグのリセットしてリターンSVIの実
行(ステップS7)、およびユーザプログラムの続きの
実行(ステップS8)によりラン状態となる。
Next, referring to FIG. 2B which is a flowchart showing the procedure for shifting from the break state to the run state, first, in the break state (step S5), the SV signal SVM once responding to the occurrence of SVI after a 1 state, the processing procedure of processing the opposite break from the run, i.e. switch to alternate memory of the memory (step S6), and sets and mode flag reset information of the return destination, etc. of the saving user program and return execution of SVI (step S7), the and the run-shaped on purpose made by continued execution of the user program (step S8).

【0046】次に、本発明の第2の実施の形態を図1と
共通の構成要素には共通の参照文字/数字を付して同様
にブロックで示す図4(A),(B)を参照すると、こ
の実施の形態の前述の第1の実施の形態との相違点は、
本実施の形態のエミュレーション部2Cが、インバータ
47の代りにSV信号SVMとチップセレクト信号CS
1との否定論理和(NOR)を取りNOR信号NVを生
成するNORゲート48を有するマッパ回路4Bを備え
ることである。
Next, FIGS. 4A and 4B show the second embodiment of the present invention in the same manner as in FIG. For reference, the difference between this embodiment and the first embodiment is as follows.
The emulation unit 2C of the present embodiment replaces the inverter 47 with the SV signal SVM and the chip select signal CS.
That is, a mapper circuit 4B having a NOR gate 48 which takes a NOR (NOR) with 1 and generates a NOR signal NV is provided.

【0047】次に、図4を参照して本実施の形態の動作
について説明すると、まず、第1の実施の形態と同様
に、エバチップ31は、SVIの発生に応答してSVモ
ード信号SVMとしてSV信号SVMを出力する。モー
ドフラグFはマッパ回路4AのORゲート46に供給さ
れる。ORゲート46はこのモードフラグFとSVモー
ド信号SVMとの供給を受けて生成した論理和信号OV
をアドレス比較器43のコントロール入力に供給する。
Next, the operation of the present embodiment will be described with reference to FIG. 4. First, as in the first embodiment, the evaluation chip 31 responds to the occurrence of SVI as the SV mode signal SVM. An SV signal SVM is output. The mode flag F is supplied to the OR gate 46 of the mapper circuit 4A. The OR gate 46 receives the supply of the mode flag F and the SV mode signal SVM to generate a logical sum signal OV.
Is supplied to the control input of the address comparator 43.

【0048】比較器43は、コントロール入力に論理和
OVの供給を受けマッピングレジスタ41の値とエバチ
ップ31の命令フエッチのアドレスAの上位との比較結
果の一致対応のチップセレクト信号CS1を出力し、オ
ルタネートメモリ21のチップセレクト端子CSとNO
Rゲート48とに供給する。
The comparator 43 receives the supply of the logical sum OV at the control input, and outputs a chip select signal CS1 corresponding to the result of the comparison between the value of the mapping register 41 and the upper address A of the instruction fetch of the evaluation chip 31. Chip select terminals CS and NO of alternate memory 21
To the R gate 48.

【0049】NORゲート48はSV信号SVMとチッ
プセレクト信号CS1とのNORを取りNOR信号NV
をアドレス比較器44のコントロール入力に供給する。
NOR信号NVが1のとき比較器44は、マッピングレ
ジスタ42の値とアドレスAの上位との比較結果の一致
によりチップセレクト信号CS2を出力し、エミュレー
ションメモリ22のチップセレクト端子CSに供給す
る。また、オルタネートメモリ21,エミュレーション
メモリ22の各々は命令フエッチアドレスAとデータの
供給を受ける。
The NOR gate 48 takes the NOR of the SV signal SVM and the chip select signal CS1 and takes the NOR signal NV.
To the control input of the address comparator 44.
When the NOR signal NV is 1, the comparator 44 outputs the chip select signal CS2 when the comparison result between the value of the mapping register 42 and the higher order of the address A matches, and supplies the chip select signal CS2 to the chip select terminal CS of the emulation memory 22. Each of the alternate memory 21 and the emulation memory 22 receives an instruction fetch address A and data.

【0050】まず、SV信号SVMおよびモードフラグ
Fの両方共0の場合は、これら信号SVM,フラグFの
各々の値0に応答してORゲート46の論理和信号OV
も0となり、アドレス比較器43の出力のチップセレク
ト信号CS1も0となり、したがってオルタネートメモ
リ21はセレクトされない。一方NORゲート48は信
号SVM,CS1の値0に応答して値1の信号NVを出
力する。この信号NVの値1に応答してアドレス比較器
44はアクティブ状態となりそのときのマッピングレジ
スタ42の設定値とアドレスAの上位値との比較結果の
一致に対応してエミュレーションメモリ22を選択す
る。
First, when both the SV signal SVM and the mode flag F are 0, the OR signal OV of the OR gate 46 is responsive to the value 0 of each of the signal SVM and the flag F.
Is also 0, and the chip select signal CS1 output from the address comparator 43 is also 0, so that the alternate memory 21 is not selected. On the other hand, the NOR gate 48 outputs the signal NV having the value 1 in response to the value 0 of the signals SVM and CS1. In response to the value 1 of the signal NV, the address comparator 44 becomes active, and selects the emulation memory 22 in accordance with the coincidence of the comparison result between the set value of the mapping register 42 and the upper value of the address A at that time.

【0051】次に、SV信号SVMが1のとき、モード
フラグFの値に無関係にORゲート46の出力論理和信
号OVも1となり、NORゲート48の出力信号NVの
値は0となる。したがって、マッピングレジスタ41の
値に応じてオルタネートメモリ21が選択され、エミュ
レーションメモリ22は非選択となる。
Next, when the SV signal SVM is 1, the output OR signal OV of the OR gate 46 also becomes 1 regardless of the value of the mode flag F, and the value of the output signal NV of the NOR gate 48 becomes 0. Therefore, the alternate memory 21 is selected according to the value of the mapping register 41, and the emulation memory 22 is not selected.

【0052】また、モードフラグFが1で信号SVMが
0のときは、ORゲート46の出力論理和信号OVは1
となり、アドレス比較器43はアクティブ状態となり、
レジスタ41の設定値に対応してチップセレクト信号C
S1を1としてオルタネートメモリ21を選択する。オ
ルタネートメモリ21の選択状態のときはNORゲート
48が0となりエミュレーションメモリ22は非選択と
なる。レジスタ41と不一致のためアドレス比較器43
の出力が0のときは、アドレス比較器44がアクティブ
状態となるので、マッピングレジスタ42の値に応じて
エミュレーションメモリ22が選択される。
When the mode flag F is 1 and the signal SVM is 0, the output OR signal OV of the OR gate 46 becomes 1
And the address comparator 43 becomes active,
The chip select signal C corresponding to the set value of the register 41
The alternate memory 21 is selected by setting S1 to 1. When the alternate memory 21 is in the selected state, the NOR gate 48 becomes 0 and the emulation memory 22 is not selected. Address comparator 43 because of mismatch with register 41
Is 0, the address comparator 44 is activated, so that the emulation memory 22 is selected according to the value of the mapping register 42.

【0053】次に、再度図2(A)および本実施の形態
のメモリ状態を模式的に示す図5を参照して、本実施の
形態のインサーキットエミュレータのラン状態からブレ
ーク状態に移行する場合の手順を説明すると、まず、ラ
ン状態(ステップS1)では、SV信号SVM,モード
フラグFの各々の値0とすると、オルタネートメモリ2
1は非選択状態であり、マッピングレジスタ42で設定
したアドレス範囲のみエミュレーションメモリ22を選
択する。したがって、ユーザのプログラムがマッピング
された範囲で動いている限り正常にエミュレーションメ
モリ22上のプログラムを実行する。
Next, referring to FIG. 2A again and FIG. 5 schematically showing the memory state of the present embodiment, the transition from the run state to the break state of the in-circuit emulator of the present embodiment will be described. First, in the run state (step S1), assuming that the values of the SV signal SVM and the mode flag F are 0, the alternate memory 2
1 is a non-selection state, and selects the emulation memory 22 only in the address range set by the mapping register 42. Therefore, the program on the emulation memory 22 is normally executed as long as the user's program runs in the mapped range.

【0054】ここで、ブレーク状態とするためSVIが
発生すると、SV信号SVMは1となり上記のように、
マッピングレジスタ41で設定したアドレス範囲でオル
タネートメモリ21を選択する(ステップS2)。この
ときは、第1の実施の形態と異なりモードフラグFの値
にかかわらずエミュレーションメモリ22は選択できな
い。図5を参照すると、この状態はエミュレーションメ
モリ22の有効状態(A)からオルタネートメモリ21
の有効状態(B)に移行した状態である。次に、オルタ
ネートメモリ21上のプログラムでは、モードフラグF
を1に書換えて、ユーザプログラムの復帰先番地その他
の情報を退避し、続きのデバッグ用のプログラム番地に
復帰先番地を設定してリターンSVIを実行する(ステ
ップS3)。
Here, when an SVI is generated to set a break state, the SV signal SVM becomes 1, and as described above,
The alternate memory 21 is selected in the address range set by the mapping register 41 (step S2). At this time, unlike the first embodiment, the emulation memory 22 cannot be selected regardless of the value of the mode flag F. Referring to FIG. 5, this state is changed from the valid state (A) of the emulation memory 22 to the alternate memory 21.
In the valid state (B). Next, in the program on the alternate memory 21, the mode flag F
To 1 to save the restoring address of the user program and other information, set the restoring address to the subsequent program address for debugging, and execute the return SVI (step S3).

【0055】すると、SV信号SVMが0となるが、モ
ードフラグFが1であるので、マッピングレジスタ41
で設定したアドレス範囲にプログラムの制御が有る限り
優先的にオルタネートメモリ21を選択し、その内容を
実行するので実質的にブレーク状態となる。この状態で
ユーザの割込要求がある場合、SV信号SVは0である
のでこの割込要求は受付けられる(ステップS4)。第
1の実施の形態と同様にベクタアドレス,割込処理プロ
グラム,およびオルタネートメモリとの関係を設定する
ことにより、このオルタネートメモリ21のマッピング
範囲を外れたところでは、エミュレーションメモリ22
がそのマッピング範囲で有効化する。したがって、この
エミュレーションメモリ22上のユーザ割込ルーチンが
実行される。割込処理の実行が完了すると、実行プログ
ラムは再度オルタネートメモリ21に移る。
Then, the SV signal SVM becomes 0, but since the mode flag F is 1, the mapping register 41
As long as there is control of the program in the address range set in step (1), the alternate memory 21 is preferentially selected and its contents are executed. In this state, if there is an interrupt request from the user, this interrupt request is accepted because the SV signal SV is 0 (step S4). By setting the relationship between the vector address, the interrupt processing program, and the alternate memory in the same manner as in the first embodiment, the emulation memory 22 is located outside the mapping range of the alternate memory 21.
Activates in the mapping range. Therefore, the user interrupt routine on the emulation memory 22 is executed. When the execution of the interrupt processing is completed, the execution program moves to the alternate memory 21 again.

【0056】このときのメモリ状態は図5の(C)に示
すように、ブレーク中はオルタネートメモリ21の選択
が優先で、同時にエミュレーションメモリ22もアクセ
ス可能となっている。
At this time, as shown in FIG. 5C, during the break, selection of the alternate memory 21 has priority and the emulation memory 22 can be accessed at the same time.

【0057】[0057]

【発明の効果】以上説明したように、本発明のインサー
キットエミュレータは、エミュレーション回路が、デバ
ッグプログラムの実行に対応してセット,リセット可能
なモードフラグを発生するモードフラグ回路を備え、
ミュレーション回路とオルタネートメモリおよびエミュ
レーションメモリとの間に配置されこれらメモリをエミ
ュレート対象のマイクロコンピュータのアドレス空間の
どこに配置するかを選択するとともに特権割込中と上記
モードフラグのセット時に所定アドレス範囲でオルタネ
ートメモリを選択しそれ以外ではエミュレーションメモ
リを選択するマッパ回路を備え、ブレーク状態となった
ときでもユーザ割込の受付けを可能とすることにより、
ブレーク中のユーザ割込の受付けを可能とするための特
殊なエバチップを開発する必要がなく、多額の費用・工
数の発生要因を除去できるという効果がある。
As described above, according to the present invention, in-circuit emulator according to the present invention, the emulation circuit comprises a set corresponding to the execution of the debugging program, the mode flag circuit generating a resettable mode flag, et
Simulation circuit and alternate memory and emulation
These memories are located between the
Of the address space of the microcomputer to be
Where select alternate memory at a predetermined address range in the time set in the privileged interrupt and the mode flag with select whether to place comprising a mapper circuit for selecting an emulation memory for the rest, the user split even when a break state By accepting
There is no need to develop a special evaluation chip for enabling the acceptance of a user interrupt during a break, and it is possible to eliminate a factor that causes a large amount of cost and man-hour.

【0058】また、ユーザ毎の異なるマイクロコンピュ
ータに対応するエミュレータの共通化の要求に対し、阻
害要因の一つである上記ユーザ割込の受付け可能化に関
してエバチップの相違を吸収することが容易となり、エ
ミュレータの共通化を可能とするという効果がある。
In addition, it is easy to absorb the difference between the evaluation chips with respect to the requirement of accepting the above-mentioned user interrupt, which is one of the hindrance factors, in response to the demand for a common emulator corresponding to different microcomputers for each user. There is an effect that the emulator can be shared.

【0059】さらに、上記ユーザ割込の受付け可能化機
能の実現のためにユーザのプログラムメモリを削減する
ことがなく、ユーザがエミュレーション対象のマイクロ
コンピュータの最大メモリ容量を利用可能とするという
効果がある。
Further, there is an effect that the user can use the maximum memory capacity of the microcomputer to be emulated without reducing the program memory of the user for realizing the function of enabling the acceptance of the user interrupt. .

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

【図1】本発明のインサーキットエミュレータの第1の
実施の形態を示すブロック図である。
FIG. 1 is a block diagram showing a first embodiment of an in-circuit emulator according to the present invention.

【図2】本実施の形態のインサーキットエミュレータに
おける動作の一例を示すフローチャートである。
FIG. 2 is a flowchart illustrating an example of an operation of the in-circuit emulator according to the present embodiment.

【図3】本実施の形態のインサーキットエミュレータに
おけるメモリ状態の一例を示す模式図である。
FIG. 3 is a schematic diagram illustrating an example of a memory state in the in-circuit emulator according to the present embodiment;

【図4】本発明のインサーキットエミュレータの第2の
実施の形態を示すブロック図である。
FIG. 4 is a block diagram showing a second embodiment of the in-circuit emulator according to the present invention.

【図5】本実施の形態のインサーキットエミュレータに
おけるメモリ状態の一例を示す模式図である。
FIG. 5 is a schematic diagram illustrating an example of a memory state in the in-circuit emulator according to the present embodiment;

【図6】従来の第1のインサーキットエミュレータの一
例を示すブロック図である。
FIG. 6 is a block diagram showing an example of a first conventional in-circuit emulator.

【図7】従来の第2のインサーキットエミュレータの一
例を示すブロック図である。
FIG. 7 is a block diagram showing an example of a second conventional in-circuit emulator.

【図8】従来の第3のインサーキットエミュレータにお
けるメモリ状態の一例を示す模式図である。
FIG. 8 is a schematic diagram showing an example of a memory state in a third conventional in-circuit emulator.

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

1 制御部 2,2A,2B,2C エミュレーション部 3,3A,3B エミュレーション回路 4,4A,4B マッパ回路 21 オルタネートメモリ 22 エミュレーションメモリ 31,300 エバチップ 32 モードフラグ回路 41,42 マッピングレジスタ 43,44 アドレス比較回路 45,47 インバータ 46 ORゲート 48 NORゲート 311 レジスタ 312 フリップフロップ 313 割込禁止回路 Reference Signs List 1 control unit 2, 2A, 2B, 2C emulation unit 3, 3A, 3B emulation circuit 4, 4A, 4B mapper circuit 21 alternate memory 22 emulation memory 31, 300 evaluation chip 32 mode flag circuit 41, 42 mapping register 43, 44 address comparison Circuits 45, 47 Inverter 46 OR gate 48 NOR gate 311 Register 312 Flip-flop 313 Interrupt inhibit circuit

フロントページの続き (56)参考文献 特開 平1−184545(JP,A) 特開 平4−139538(JP,A) 特開 昭61−45338(JP,A) 特開 昭61−177552(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 11/22 - 11/34 Continuation of front page (56) References JP-A-1-184545 (JP, A) JP-A-4-139538 (JP, A) JP-A-61-45338 (JP, A) JP-A-61-177552 (JP, A) , A) (58) Field surveyed (Int.Cl. 7 , DB name) G06F 11/22-11/34

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 エミュレーション処理の全体の制御を行
う制御部と、エミュレーション対象のマイクロコンピュ
ータと同一動作をしエミュレータのデバッグ機能を実行
するエバリエーションチップを含むエミュレーション回
路と、前記エバリエーションチップの実行用のデバッグ
プログラムを格納したオルタネートメモリと、デバッグ
対象のユーザプログラムを格納したエミュレーションメ
モリとを有しエミュレーションを実行するエミュレーシ
ョン部とを備え、前記制御部が前記エミュレーション部
に対しエミュレータ制御用の特権割込を発生し、前記エ
ミュレーション部が前記特権割込の発生に応答して前記
エミュレーションメモリを前記オルタネートメモリに切
換えエミュレーションを実行するインサーキットエミュ
レータにおいて、 前記エミュレーション回路が、前記デバッグプログラム
の実行に対応してセット,リセット可能なモードフラグ
を発生するモードフラグ回路を備え、前記エミュレーション回路と前記オルタネートメモリお
よび前記エミュレーションメモリとの間に配置されこれ
らメモリをエミュレート対象のマイクロコンピュータの
アドレス空間のどこに配置するかを選択するとともに
記特権割込中と前記モードフラグのセット時に前記オル
タネートメモリの存在する範囲のアドレスで前記オルタ
ネートメモリを選択しそれ以外では前記エミュレーショ
ンメモリを選択するマッパ回路を備え、 前記特権割込に応答して前記ユーザプログラムの実行を
中断するブレーク状態となったときでも前記特権割込以
下の優先度の低優先度割込発生時にこの低優先度割込の
受付けを可能とすることを特徴とするインサーキットエ
ミュレータ。
An emulation circuit including an emulation chip for performing the same operation as a microcomputer to be emulated and executing a debug function of an emulator, and a control unit for controlling the entire emulation processing. An emulation unit having an alternate memory storing a debug program of the above and an emulation memory storing a user program to be debugged, and performing an emulation, wherein the control unit interrupts the emulation unit with a privilege interrupt for controlling an emulator. Wherein the emulation unit switches the emulation memory to the alternate memory in response to the generation of the privileged interrupt, and executes the emulation. Serial emulation circuit, set to correspond to the execution of said debug program includes a mode flag circuit generating a resettable mode flag, the alternate memory Contact with the emulation circuit
And between the emulation memory and
Memory of the microcomputer to be emulated
A mapper circuit that selects where in the address space to place the memory and selects the alternate memory with an address in the range where the alternate memory is present during the privileged interrupt and when the mode flag is set, and otherwise selects the emulation memory. Receiving a low-priority interrupt when a low-priority interrupt having a priority equal to or lower than the privileged interrupt occurs even in a break state in which execution of the user program is interrupted in response to the privileged interrupt. An in-circuit emulator characterized in that:
【請求項2】 前記マッパ回路が、第1および第2のア
ドレス値の各々をそれぞれ設定した第1および第2のレ
ジスタと、 第1のアドレス制御信号の供給に応答して活性化し前記
第1のアドレス値とアドレスバスの上位ビット値との比
較結果の一致に応答して前記オルタネートメモリ選択用
の第1の一致信号を出力する第1のアドレス比較回路
と、 第1のアドレス制御信号の供給に応答して活性化し前記
第2のアドレス値と前記アドレスバスの上位ビット値と
の比較結果の一致に応答して前記エミュレーションメモ
リ選択用の第2の一致信号を出力する第2のアドレス比
較回路とを備えることを特徴とする請求項2記載のイン
サーキットエミュレータ。
2. The system according to claim 1, wherein said mapper circuit is activated in response to supply of a first address control signal and first and second registers respectively setting first and second address values. A first address comparing circuit for outputting a first match signal for selecting the alternate memory in response to a match between the address value of the address bus and the upper bit value of the address bus; and supplying a first address control signal. A second address comparing circuit which is activated in response to the second address value and outputs a second match signal for selecting the emulation memory in response to a match between the comparison result of the second address value and the upper bit value of the address bus. The in-circuit emulator according to claim 2, comprising:
【請求項3】 前記マッパ回路が、前記低優先度割込対
応の割込モード信号と前記モードフラグとの論理演算を
行い前記第1のアドレス制御信号を生成する第1の論理
ゲートと、 前記第1の一致信号を反転して前記第2のアドレス制御
信号を生成するインバータ回路とを備えることを特徴と
する請求項1又は2記載のインサーキットエミュレー
タ。
3. A first logic gate for performing a logical operation of the low-priority interrupt-corresponding interrupt mode signal and the mode flag to generate the first address control signal; 3. The in-circuit emulator according to claim 1, further comprising an inverter circuit that inverts a first coincidence signal to generate the second address control signal.
【請求項4】 前記マッパ回路が、前記低優先度割込対
応の割込モード信号と前記モードフラグとの論理演算を
行い前記第1のアドレス制御信号を生成する第1の論理
ゲート回路と、 前記割込モード信号と前記第1の一致信号との論理演算
を行い前記第2のアドレス制御信号を生成する第2の論
理ゲート回路とを備えることを特徴とする請求項1又は
記載のインサーキットエミュレータ。
4. A first logic gate circuit for performing a logical operation on the low-priority interrupt-corresponding interrupt mode signal and the mode flag to generate the first address control signal; claim 1 or, characterized in that it comprises a second logic gate circuit for generating the second address control signal performs a logical operation between the said interrupt mode signal first coincidence signal
2. The in-circuit emulator according to 2 .
JP08136683A 1996-05-30 1996-05-30 In-circuit emulator Expired - Fee Related JP3088285B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP08136683A JP3088285B2 (en) 1996-05-30 1996-05-30 In-circuit emulator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP08136683A JP3088285B2 (en) 1996-05-30 1996-05-30 In-circuit emulator

Publications (2)

Publication Number Publication Date
JPH09319607A JPH09319607A (en) 1997-12-12
JP3088285B2 true JP3088285B2 (en) 2000-09-18

Family

ID=15181041

Family Applications (1)

Application Number Title Priority Date Filing Date
JP08136683A Expired - Fee Related JP3088285B2 (en) 1996-05-30 1996-05-30 In-circuit emulator

Country Status (1)

Country Link
JP (1) JP3088285B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2553311B (en) * 2016-08-31 2020-05-20 Advanced Risc Mach Ltd An apparatus and method for controlling assertion of a trigger signal to processing circuitry

Also Published As

Publication number Publication date
JPH09319607A (en) 1997-12-12

Similar Documents

Publication Publication Date Title
US5325512A (en) Circuit emulator
JP2651916B2 (en) In-circuit emulator
US4347565A (en) Address control system for software simulation
US4924382A (en) Debugging microprocessor capable of switching between emulation and monitor without accessing stack area
EP0511674A2 (en) Single chip microcomputer
US5566303A (en) Microcomputer with multiple CPU&#39;S on a single chip with provision for testing and emulation of sub CPU&#39;s
JPH011039A (en) In-circuit emulator
US5832251A (en) Emulation device
JPS6055467A (en) Data processing system for main frame emulation realized by multi-microprocessor
JPH08171500A (en) Computer system
JP2974577B2 (en) Computer system
US4972317A (en) Microprocessor implemented data processing system capable of emulating execution of special instructions not within the established microprocessor instruction set by switching access from a main store portion of a memory
JPH0212486A (en) Ic card
JP3088285B2 (en) In-circuit emulator
US5864694A (en) Emulation system
US6539436B2 (en) Management of interruptions in a computer platform
JP2597409B2 (en) Microcomputer
JP3323341B2 (en) Emulation processor and emulator equipped with it
JP4421148B2 (en) Debug system
JPH04280334A (en) One chip microcomputer
JPH02186448A (en) Integrated circuit with debugging environment
JPH0764937A (en) Microcomputer system and microcomputer used therefor
JPS6220034A (en) Program status word switching control system
JP3006487B2 (en) Emulation device
JP2000029508A (en) Programmable controller

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20000627

LAPS Cancellation because of no payment of annual fees