JP2000003290A - In-circuit emulator - Google Patents

In-circuit emulator

Info

Publication number
JP2000003290A
JP2000003290A JP10164025A JP16402598A JP2000003290A JP 2000003290 A JP2000003290 A JP 2000003290A JP 10164025 A JP10164025 A JP 10164025A JP 16402598 A JP16402598 A JP 16402598A JP 2000003290 A JP2000003290 A JP 2000003290A
Authority
JP
Japan
Prior art keywords
user
interrupt
monitor mode
signal
emulator
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.)
Pending
Application number
JP10164025A
Other languages
Japanese (ja)
Inventor
Katsuto Tono
勝人 東野
Tsutomu Mikami
勉 三上
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP10164025A priority Critical patent/JP2000003290A/en
Publication of JP2000003290A publication Critical patent/JP2000003290A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

PROBLEM TO BE SOLVED: To continue debug even when a target system runs away due to the generation of the abnormality of a user interrupting program when accepting user interruption in a monitor mode in an in-circuit emulator. SOLUTION: This in-circuit emulator is newly provided with an interruption control circuit 5. A break signal to be transmitted to a microprocessor 6 can be selected from among plural kinds of brake signals 104 and 105, and when a 'monitor mode' is obtained from the low level break signal 104, a user interrupting signal 107 can be accepted. When an abnormal operation is generated in the user interruption processing, the 'monitor mode' is obtained from the break signal 105 for preferentially obtaining the monitor mode, and debug can be continued. Thus, it is possible to respond to the user interrupting signal 107 of a target system 3 in a real time even in the break state, and even when any abnormal operation is generated in the user interruption processing, the debug can be continued.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、インサーキットエ
ミュレータに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an in-circuit emulator.

【0002】[0002]

【従来の技術】従来のインサーキットエミュレータとし
ては、たとえば特開平7−152598号公報に開示さ
れたものが知られている。このインサーキットエミュレ
ータは、エミュレータ制御回路と、マイクロプロセッサ
と、復帰命令検出回路と、フラグと、割り込み検出回路
と、OR回路とを備え、ホスト装置とターゲットシステ
ムに接続されている。
2. Description of the Related Art As a conventional in-circuit emulator, for example, one disclosed in Japanese Patent Application Laid-Open No. 7-152598 is known. This in-circuit emulator includes an emulator control circuit, a microprocessor, a return instruction detecting circuit, a flag, an interrupt detecting circuit, and an OR circuit, and is connected to a host device and a target system.

【0003】以下、図5と図6を参照しながら従来のイ
ンサーキットエミュレータの一例について説明する。図
5は従来のインサーキットエミュレータの一例のブロッ
ク図である。
Hereinafter, an example of a conventional in-circuit emulator will be described with reference to FIGS. FIG. 5 is a block diagram of an example of a conventional in-circuit emulator.

【0004】従来のインサーキットエミュレータ51は、
エミュレータ制御回路52と、マイクロプロセッサ53と、
復帰命令検出回路61と、フラグ62と、割り込み検出回路
63と、論理和(OR)回路64とを備えて構成され、ホス
ト装置1とターゲットシステム3に接続されている。
A conventional in-circuit emulator 51 is
An emulator control circuit 52, a microprocessor 53,
Return instruction detection circuit 61, flag 62, interrupt detection circuit
63 and a logical sum (OR) circuit 64, and are connected to the host device 1 and the target system 3.

【0005】マイクロプロセッサ53は、メインバス154
に接続され、ターゲットシステム3のプロセッサの動作
を代行する機能に加えて、下記の機能を備えている。 1.ユーザのプログラムを実行している「ユーザモー
ド」からインサーキットエミュレータの機能を実現する
プログラムを実行している「モニタモード」へ遷移する
際に必要となる専用のすべてのユーザ割り込みより優先
する特権ブレーク信号153をOR回路64より入力する機
能。 2.ターゲットシステム3からのユーザ割り込み信号15
5を入力する機能。
The microprocessor 53 includes a main bus 154
And has the following function in addition to the function of acting on behalf of the processor of the target system 3. 1. Privilege break that takes precedence over all dedicated user interrupts required when transitioning from “user mode” executing a user program to “monitor mode” executing a program that implements the function of the in-circuit emulator The function of inputting the signal 153 from the OR circuit 64. 2. User interrupt signal 15 from target system 3
Ability to enter 5.

【0006】また上記エミュレータ制御回路52は、ホス
ト制御バス151により接続され、さらにメインバス154に
接続され、下記の機能を少なくとも備えている。 1.ターゲットシステム3の動作の監視を行う機能。 2.ターゲットシステム3のユーザプログラムをデバッ
グするための機能。 3.ホスト装置1からの動作指示を受ける機能およびホ
スト装置1へ動作結果などを伝える機能(コマンド・デ
ータのインターフェイス機能)。 4.マイクロプロセッサ53に対して「モニタモード」に
遷移するためのブレーク信号152をOR回路64へ出力す
る機能。
The emulator control circuit 52 is connected to a host control bus 151 and further connected to a main bus 154, and has at least the following functions. 1. A function for monitoring the operation of the target system 3. 2. Function for debugging the user program of the target system 3. 3. A function of receiving an operation instruction from the host device 1 and a function of transmitting an operation result to the host device 1 (command / data interface function). 4. A function of outputting a break signal 152 for the microprocessor 53 to transition to the “monitor mode” to the OR circuit 64.

【0007】また復帰命令検出回路61は、メインバス15
4に接続され、マイクロプロセッサ53のユーザ割り込み
動作からの復帰命令を検出するための回路であり、メイ
ンバス154に当該復帰命令が現れると、OR回路64を介
してマイクロプロセッサ53に対してブレーク信号(復帰
命令検出信号)156を出力する機能を有している。
The return instruction detecting circuit 61 is connected to the main bus 15
4, a circuit for detecting a return instruction from the user interrupt operation of the microprocessor 53. When the return instruction appears on the main bus 154, a break signal is sent to the microprocessor 53 via the OR circuit 64. (Return command detection signal) 156 is output.

【0008】またフラグ62は、メインバス154に接続さ
れ、「モニタモード」への遷移する際に如何なる手順を
介して遷移したかを記憶するメモリであり、マイクロプ
ロセッサ53からの書き込み/読み出し動作が可能であ
る。
The flag 62 is a memory connected to the main bus 154 for storing the procedure through which the transition to the "monitor mode" is made. The write / read operation from the microprocessor 53 is performed by the flag 62. It is possible.

【0009】また割り込み検出回路63は、ターゲットシ
ステム3から出力されるユーザの割り込み信号155を検
出し、ホスト装置1へ出力するための回路である。また
ホスト装置1は、インサーキットエミュレータ51の入出
力装置であり、エミュレータ制御回路52に対して動作指
示を与える機能と、それに対する動作結果などを受ける
機能を備えており、これらの動作信号はホスト制御バス
151を介して入出力される。
The interrupt detection circuit 63 is a circuit for detecting a user's interrupt signal 155 output from the target system 3 and outputting it to the host device 1. The host device 1 is an input / output device of the in-circuit emulator 51. The host device 1 has a function of giving an operation instruction to the emulator control circuit 52 and a function of receiving an operation result for the emulator control circuit 52. Control bus
Input / output via 151.

【0010】またターゲットシステム3は、インサーキ
ットエミュレータ51におけるデバックの対象となるプロ
グラム・データを記憶したメモリ装置、I/Oなどを備
えた一般的なコンピュータシステムであり、リアルタイ
ム制御に必要なユーザー割り込み信号155を出力する機
能を備えている。
The target system 3 is a general computer system having a memory device and an I / O for storing program data to be debugged in the in-circuit emulator 51, and has a user interrupt required for real-time control. It has a function of outputting a signal 155.

【0011】次に、上記構成の従来のインサーキットエ
ミュレータ51の動作を説明する。ホスト装置1からエミ
ュレータ制御回路52へブレーク要求が通知されると、ま
たはエミュレータ制御回路52がターゲットシステム3の
動作の監視中に「モニタモード」に遷移する事象を検出
すると、エミュレータ制御回路52はOR回路64を介して
マイクロプロセッサ53へブレーク信号152を伝達する。
Next, the operation of the conventional in-circuit emulator 51 having the above configuration will be described. When a break request is notified from the host device 1 to the emulator control circuit 52, or when the emulator control circuit 52 detects an event of transition to the “monitor mode” while monitoring the operation of the target system 3, the emulator control circuit 52 performs OR operation. A break signal 152 is transmitted to the microprocessor 53 via the circuit 64.

【0012】すると、マイクロプロセッサ53は、フラグ
62をチェックし、通常の「ユーザモード」から「モニタ
モード」への遷移であるとフラグ62をセットし、ターゲ
ットシステム3のプログラム空間へのリターンアドレス
をセーブする。そして、マイクロプロセッサ53は、ホス
ト装置1よりエミュレータ制御回路52を介して入力する
コマンド処理(インサーキットエミュレータ機能を実現
するためのコマンド処理)を実行する。
Then, the microprocessor 53 sets the flag
62 is checked, the flag 62 is set as a transition from the normal "user mode" to the "monitor mode", and the return address to the program space of the target system 3 is saved. Then, the microprocessor 53 executes command processing (command processing for realizing the in-circuit emulator function) input from the host device 1 via the emulator control circuit 52.

【0013】またターゲットシステム3よりユーザ割り
込み信号155が出力され、割り込み検出回路63から出力
される信号157がアクティブになると、ホスト装置1は
ユーザ割り込みに対応するターゲットシステム3のプロ
グラム空間の割り込み処理に強制的に分岐するコマンド
をエミュレータ制御回路52を介してマイクロプロセッサ
53へ出力し、マイクロプロセッサ53は、ターゲットシス
テム空間の割り込み処理を実行する。この割り込み処理
が終了し、復帰命令検出回路61により割込み処理の終了
(復帰命令)が検出されると、ブレーク信号156が出力
され、OR回路64を介してブレーク信号153としてマイ
クロプロセッサ53に入力される。ただし、ブレーク信号
153がアクティブである場合、マイクロプロセッサ53は
モニタモードの処理を最初から実行する。また、このと
き、フラグ62がセットされているので、ユーザモードに
復帰するためのリターンアドレスをセーブしない。
When the user interrupt signal 155 is output from the target system 3 and the signal 157 output from the interrupt detection circuit 63 becomes active, the host device 1 executes the interrupt processing in the program space of the target system 3 corresponding to the user interrupt. The microprocessor forcibly branches the command via the emulator control circuit 52.
53, and the microprocessor 53 executes an interrupt process in the target system space. When this interrupt processing is completed and the end of the interrupt processing (return instruction) is detected by the return instruction detection circuit 61, a break signal 156 is output and input to the microprocessor 53 as a break signal 153 via the OR circuit 64. You. However, the break signal
When 153 is active, the microprocessor 53 executes the monitor mode processing from the beginning. At this time, since the flag 62 is set, the return address for returning to the user mode is not saved.

【0014】その後、マイクロプロセッサ53は、上記エ
ミュレータ機能を実現するためのコマンド処理から処理
を繰り返すが、「モニタモード」から「ユーザモード」
に遷移するコマンドが、ホスト装置1からエミュレータ
制御回路52を介して通知されるとフラグ62をリセット
し、「ユーザモード」に復帰するためのリターンアドレ
スを読み出し、そのアドレスへ分岐する。
Thereafter, the microprocessor 53 repeats the processing from the command processing for realizing the emulator function, but from the "monitor mode" to the "user mode".
Is notified from the host device 1 via the emulator control circuit 52, the flag 62 is reset, a return address for returning to the "user mode" is read, and the process branches to that address.

【0015】このような構成により、モータ制御などの
リアルタイム制御が必要なターゲットシステム3に対し
て、モニタモード中でもユーザ割り込みを受け付けるこ
とを可能とし、ユーザ割り込みが処理されないことによ
るターゲットシステム3の暴走を防ぐことを可能として
いる。
With such a configuration, it is possible to accept a user interrupt even in the monitor mode for the target system 3 that requires real-time control such as motor control, and the runaway of the target system 3 due to the fact that the user interrupt is not processed. It is possible to prevent.

【0016】従来の「モニタモード」中の一連の動作
を、図6を参照しながら説明する。 (ステップ−301)モニタモードになるとインサーキッ
トエミュレータの機能を実現するためのコマンド処理が
行われる。 (ステップ−302)次にターゲットシステム3からのユ
ーザ割り込みがあるかどうか判断する。ユーザ割り込み
がないときは、ステップ−301へ戻り、コマンド処理か
ら処理を繰り返す。 (ステップ−303)ステップ−302において、ユーザ割り
込みがあると判断すると、処理がユーザ割り込み処理に
移る。そして、ユーザ割り込み処理が終了すると、ステ
ップ−301へ戻り、再びコマンド処理から繰り返す。
A series of operations in the conventional "monitor mode" will be described with reference to FIG. (Step-301) When the monitor mode is entered, command processing for realizing the function of the in-circuit emulator is performed. (Step-302) Next, it is determined whether or not there is a user interrupt from the target system 3. If there is no user interrupt, the process returns to step -301 to repeat the processing from the command processing. (Step-303) If it is determined in step-302 that there is a user interrupt, the process proceeds to a user interrupt process. When the user interrupt process ends, the process returns to step -301 and repeats from the command process again.

【0017】[0017]

【発明が解決しようとする課題】しかし、このような従
来のインサーキットエミュレータ51では、「モニタモー
ド」中にユーザ割り込みを受け付けることを可能とした
ため、ユーザ割り込み処理中にプログラムの不備により
ターゲットシステム3が暴走した際、特権ブレーク信号
153により一時的に「モニタモード」に戻ったとして
も、再び不備のあるユーザ割り込み処理に強制的に移る
ため、デバッグを続行することが不可能であった。
However, in such a conventional in-circuit emulator 51, it is possible to accept a user interrupt during the "monitor mode". Breaks out, privilege break signal
Even if the system temporarily returns to the “monitor mode” due to 153, it is impossible to continue debugging because the process is forcibly shifted to a defective user interrupt process again.

【0018】本発明は、このようなインサーキットエミ
ュレータにおいて、モニタモード中にユーザ割り込みを
受け付け、ユーザ割り込みプログラムに不備がありター
ゲットシステムが暴走した場合にもデバッグを続行でき
ることを目的とする。
It is an object of the present invention to allow such an in-circuit emulator to accept a user interrupt during the monitor mode and continue debugging even if the user interrupt program is defective and the target system runs away.

【0019】[0019]

【課題を解決するための手段】本発明のインサーキット
エミュレータにおいては、少なくともモニターモードへ
遷移するブレーク信号とその選択信号を発生するエミュ
レータ制御回路と、前記エミュレータ制御回路からのブ
レーク信号を受け付けると、前記モニタモードへ遷移す
るための複数種類のブレーク信号の中から、前記エミュ
レータ制御回路からの選択信号に応じて1つのブレーク
信号を選択し、出力する割り込み制御回路と、前記割り
込み制御回路から受け付けたブレーク信号が、ユーザ割
り込みが可能な信号のとき、前記モニタモード中にター
ゲットシステムからのユーザ割り込みを受け付け、前記
割り込み制御回路から受け付けたブレーク信号が、ユー
ザ割り込みよりモニタモードを優先する信号のとき、前
記ターゲットシステムからのユーザ割り込みよりモニタ
モードを優先するマイクロプロセッサとを備えた構成と
したものである。
According to an in-circuit emulator of the present invention, at least a break signal for transition to a monitor mode and an emulator control circuit for generating a selection signal therefor, and a break signal from the emulator control circuit are received. An interrupt control circuit that selects and outputs one break signal according to a selection signal from the emulator control circuit from among a plurality of types of break signals for transitioning to the monitor mode, and an interrupt control circuit that receives the break signal from the interrupt control circuit When the break signal is a signal that allows a user interrupt, a user interrupt from the target system is received during the monitor mode, and when the break signal received from the interrupt control circuit is a signal that prioritizes the monitor mode over the user interrupt, The target system Is obtained by a configuration in which a priority microprocessor monitor mode from the user interrupt from the beam.

【0020】この本発明によれば、モニタモード中にユ
ーザ割り込みを受け付け、ユーザ割り込みプログラムに
不備がありターゲットシステムが暴走した場合にもデバ
ッグを続行できる。
According to the present invention, a user interrupt is accepted during the monitor mode, and debugging can be continued even if the user interrupt program is defective and the target system runs away.

【0021】[0021]

【発明の実施の形態】本発明の請求項1に記載の発明
は、少なくともモニターモードへ遷移するブレーク信号
とその選択信号を発生するエミュレータ制御回路と、前
記エミュレータ制御回路からのブレーク信号を受け付け
ると、前記モニタモードへ遷移するための複数種類のブ
レーク信号の中から、前記エミュレータ制御回路からの
選択信号に応じて1つのブレーク信号を選択し、出力す
る割り込み制御回路と、前記割り込み制御回路から受け
付けたブレーク信号が、ユーザ割り込みが可能な信号の
とき、前記モニタモード中にターゲットシステムからの
ユーザ割り込みを受け付け、前記割り込み制御回路から
受け付けたブレーク信号が、ユーザ割り込みよりモニタ
モードを優先する信号のとき、前記ターゲットシステム
からのユーザ割り込みよりモニタモードを優先するマイ
クロプロセッサとを備えたこととしたものであり、モニ
タモード中においてブレーク信号がユーザ割り込みが可
能な信号のとき、ユーザ割り込みを受け付けることを可
能とし、ユーザ割り込み処理の不備によりターゲットシ
ステムが暴走した場合には、ブレーク信号をユーザ割り
込みよりモニタモードを優先する信号とすることによ
り、ユーザ割り込みよりインサーキットエミュレータの
機能を実現するコマンド処理が優先され不備のあるユー
ザ割り込みが実行されないため、デバッグを続行できる
という作用を有する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention according to claim 1 of the present invention provides an emulator control circuit for generating at least a break signal for transition to a monitor mode and a selection signal therefor, and receiving a break signal from the emulator control circuit. An interrupt control circuit for selecting and outputting one break signal from a plurality of types of break signals for transitioning to the monitor mode in accordance with a selection signal from the emulator control circuit, and receiving from the interrupt control circuit When the break signal is a signal that allows a user interrupt, a user interrupt from the target system is received during the monitor mode, and the break signal received from the interrupt control circuit is a signal that prioritizes the monitor mode over the user interrupt. , User interrupt from the target system And a microprocessor that prioritizes the monitor mode. In the monitor mode, when the break signal is a signal that allows a user interrupt, the user interrupt can be accepted. If the target system goes out of control, the break signal is set to a signal that prioritizes the monitor mode over the user interrupt, so that the command processing that realizes the function of the in-circuit emulator has priority over the user interrupt, and the defective user interrupt is not executed Therefore, there is an effect that debugging can be continued.

【0022】以下、本発明の実施の形態を、図面に基づ
いて説明する。図1は、本発明の実施の形態におけるイ
ンサーキットエミュレータのブロック図である。
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram of an in-circuit emulator according to an embodiment of the present invention.

【0023】本発明のインサーキットエミュレータ2
は、エミュレータ制御回路4と、割り込み制御回路5
と、マイクロプロセッサ6を備えて構成され、ホスト装
置1とターゲットシステム3に接続されている。
In-circuit emulator 2 of the present invention
Are the emulator control circuit 4 and the interrupt control circuit 5
And a microprocessor 6, and are connected to the host device 1 and the target system 3.

【0024】マイクロプロセッサ6は、メインバス106
に接続され、ターゲットシステム3のプロセッサの動作
を代行する機能に加えて、下記の機能を備えている。 1.「ユーザモード」から「モニタモード」へ遷移する
際に必要となる専用の複数種類のブレーク信号104,105
を入力する機能。 2.ターゲットシステム3からのユーザ割り込み信号10
7を入力する機能。
The microprocessor 6 has a main bus 106
And has the following function in addition to the function of acting on behalf of the processor of the target system 3. 1. Multiple types of dedicated break signals 104 and 105 required when transitioning from “user mode” to “monitor mode”
The ability to enter. 2. User interrupt signal 10 from target system 3
Function to enter 7.

【0025】またエミュレータ制御回路4は、ホスト制
御バス101に接続され、さらにメインバス106に接続さ
れ、少なくとも下記の機能を備えている。 1.ターゲットシステム3の動作の監視を行う機能。 2.ターゲットシステム3のユーザプログラムをデバッ
グするための機能。 3.ホスト装置1からの動作指示を受ける機能およびホ
スト装置1へ動作結果などを伝える機能(コマンド・デ
ータのインターフェイス機能)。 4.ホスト装置1からのブレーク要求を受ける機能。 5.割り込み制御回路5に対して「モニタモード」に遷
移するためのブレーク信号102を出力する機能。 6.割り込み制御回路5において出力するブレーク信号
の種類を選択するための選択信号103を出力する機能。
The emulator control circuit 4 is connected to the host control bus 101 and further connected to the main bus 106, and has at least the following functions. 1. A function for monitoring the operation of the target system 3. 2. Function for debugging the user program of the target system 3. 3. A function of receiving an operation instruction from the host device 1 and a function of transmitting an operation result to the host device 1 (command / data interface function). 4. Function for receiving a break request from the host device 1. 5. A function of outputting a break signal 102 for transitioning to the “monitor mode” to the interrupt control circuit 5. 6. A function of outputting a selection signal 103 for selecting a type of a break signal to be output in the interrupt control circuit 5;

【0026】また割り込み制御回路5は、図2に示すよ
うに、セレクタ11を備えており、エミュレータ制御回路
4からの選択信号103を受けて、エミュレータ制御回路
4からのブレーク出力102をどのようなレベルのブレー
ク信号(複数種類のブレーク信号)104,105として出力
するか選択し、マイクロプロセッサ6に対して出力する
機能を備えている。
As shown in FIG. 2, the interrupt control circuit 5 includes a selector 11, which receives a selection signal 103 from the emulator control circuit 4 and outputs a break output 102 from the emulator control circuit 4 It has a function of selecting whether to output as level break signals (a plurality of types of break signals) 104 and 105 and outputting the signals to the microprocessor 6.

【0027】またホスト装置1は、インサーキットエミ
ュレータ2の入出力装置であり、エミュレータ制御回路
4に接続され、エミュレータ制御回路4に対して動作指
示を与える機能と、それに対する動作結果などを受ける
機能を有している。
The host device 1 is an input / output device of the in-circuit emulator 2, is connected to the emulator control circuit 4, and has a function of giving an operation instruction to the emulator control circuit 4 and a function of receiving an operation result for the function. have.

【0028】またターゲットシステム3は、インサーキ
ットエミュレータ2におけるデバックの対象となるプロ
グラム・データを記憶したメモリ装置、I/Oなどを備
えた一般的なコンピュータシステムであり、リアルタイ
ム制御に必要なユーザー割り込み信号107を出力する機
能を備えている。
The target system 3 is a general computer system including a memory device and an I / O in which program data to be debugged in the in-circuit emulator 2 is stored, and a user interrupt required for real-time control. A function of outputting the signal 107 is provided.

【0029】図3は本発明の実施の形態のマイクロプロ
セッサ6内にある割り込みコントローラの入出力を示す
ブロック図である。マイクロプロセッサ内の割り込みコ
ントローラ12は、複数のブレーク信号104,105を受け付
け、マイコンコア13に対して割り込み要求108を出力す
る機能と、ブレーク信号のレベルに応じて、ターゲット
システム空間のユーザ割り込みを受け付けるレベルを設
定する機能を有している。
FIG. 3 is a block diagram showing input / output of an interrupt controller in the microprocessor 6 according to the embodiment of the present invention. The interrupt controller 12 in the microprocessor receives a plurality of break signals 104 and 105, outputs an interrupt request 108 to the microcomputer core 13, and receives a user interrupt in the target system space according to the level of the break signal. It has a function to set the level.

【0030】上記構成のインサーキットエミュレータ2
の動作について説明する。「ユーザモード」から「モニ
タモード」へ遷移する際に、ホスト装置1からブレーク
要求がホスト制御バス101を介してエミュレータ制御回
路4に通知される。
The in-circuit emulator 2 having the above configuration
Will be described. When a transition is made from the “user mode” to the “monitor mode”, a break request is notified from the host device 1 to the emulator control circuit 4 via the host control bus 101.

【0031】エミュレータ制御回路4は、このブレーク
要求を入力すると、ブレーク信号102を割り込み制御回
路5へ出力する。これを受けて割り込み制御回路5で
は、マイクロプロセッサ6に対して複数種類のブレーク
信号104,105の中からの選択信号103により選択されて
いるブレーク信号をマイクロプロセッサ6へ出力する。
When the break request is input, the emulator control circuit 4 outputs a break signal 102 to the interrupt control circuit 5. In response to this, the interrupt control circuit 5 outputs the break signal selected by the selection signal 103 from the plurality of types of break signals 104 and 105 to the microprocessor 6.

【0032】本実施の形態では、割り込み制御回路5が
エミュレータ制御回路4からのブレーク信号102を受け
てマイクロプロセッサ6に対して、ユーザ割り込みレベ
ルより「モニタモード」を優先する特権ブレーク信号10
4、または特権ブレーク信号104よりレベルの低い低レベ
ルブレーク信号105を出力する場合を一例として説明す
る。
In this embodiment, the interrupt control circuit 5 receives the break signal 102 from the emulator control circuit 4 and instructs the microprocessor 6 the privileged break signal 10 which gives priority to the "monitor mode" over the user interrupt level.
A case where a low-level break signal 105 whose level is lower than the level 4 or the privilege break signal 104 is output will be described as an example.

【0033】マイクロプロセッサ6は、特権ブレーク信
号104、または低レベルブレーク信号105を受け付けて
「モニタモード」に遷移すると、ターゲットシステム3
の空間のユーザプログラムのリターンアドレスをセーブ
するなどの一般的な「ユーザモード」から「モニタモー
ド」への遷移処理を行う。
When the microprocessor 6 receives the privileged break signal 104 or the low-level break signal 105 and transits to the “monitor mode”, the target system 3
The transition process from the general "user mode" to the "monitor mode" is performed, such as saving the return address of the user program in the space.

【0034】低レベルブレーク信号105を用いて遷移し
た場合には、従来のインサーキットエミュレータ動作に
加えてマイクロプロセッサ6は、ターゲットシステム空
間の低レベルブレーク信号105よりレベルの高いユーザ
割り込みを受け付けることが可能である。これにより、
「モニタモード」中においてもモータ制御のようなリア
ルタイム制御を必要とするターゲットシステム3に対し
てユーザ割り込み107を受け付けることが可能となる。
なお、特権ブレーク信号104を用いて遷移した場合に
は、一般的なインサーキットエミュレータと同様に「モ
ニタモード」中において全てのユーザ割り込み107より
「モニタモード」を優先させることが可能である。
When a transition is made using the low-level break signal 105, the microprocessor 6 can accept a user interrupt having a higher level than the low-level break signal 105 in the target system space in addition to the conventional in-circuit emulator operation. It is possible. This allows
Even during the “monitor mode”, the user interrupt 107 can be accepted for the target system 3 requiring real-time control such as motor control.
When the transition is made using the privilege break signal 104, the "monitor mode" can be prioritized over all the user interrupts 107 in the "monitor mode" as in a general in-circuit emulator.

【0035】以下、低レベルブレーク信号105によりユ
ーザモードからモニタモードへ遷移し、なおかつユーザ
割り込み107が低レベルブレーク信号よりレベルが高い
場合について説明する。
The case where the low-level break signal 105 causes a transition from the user mode to the monitor mode and the level of the user interrupt 107 is higher than the low-level break signal will be described below.

【0036】ユーザ割り込み信号107が低レベルブレー
ク信号よりレベルが高い場合、マイクロプロセッサ6が
ユーザ割り込み信号107を受け付け、マイクロプロセッ
サ6がユーザ割り込みプログラムを処理している時、ユ
ーザ割り込みプログラムに不備があると、ターゲットシ
ステム3が暴走することがある。
When the level of the user interrupt signal 107 is higher than that of the low-level break signal, the microprocessor 6 accepts the user interrupt signal 107, and when the microprocessor 6 is processing the user interrupt program, the user interrupt program is defective. Then, the target system 3 may run away.

【0037】暴走した場合には、ターゲットシステム3
を監視しているエミュレータ制御回路4は、特権ブレー
ク信号104を選択してマイクロプロセッサ6に入力し、
「モニタモード」へ遷移させ、すべてのユーザ割り込み
信号107より「モニタモード」を優先させる。これによ
り不備のあるユーザ割り込みプログラムを実行せず、デ
バッグ作業を続行することできる。
In case of runaway, the target system 3
The emulator control circuit 4 that monitors the program selects the privileged break signal 104 and inputs it to the microprocessor 6,
A transition is made to “monitor mode”, and “monitor mode” is prioritized over all user interrupt signals 107. Thus, the debugging work can be continued without executing the defective user interrupt program.

【0038】本発明の実施の形態の低レベルブレーク信
号により「モニタモード」となった時のモニタモード中
の一連の動作を、図4を参照しながら説明する。 ステップ−201 低レベルブレーク信号によりモニタモードになると、イ
ンサーキットエミュレータ機能を実現するためのコマン
ド処理が実行される。 ステップ−202 次に、ターゲットシステム3からのユーザ割り込みがあ
るかないかを判断する。ユーザ割り込みがなければ、ス
テップ−201へ戻り、コマンド処理を繰り返す。 ステップ−203 ユーザ割り込みがあると、ユーザ割り込み優先かどうか
を判断する。低レベルブレーク信号よりレベルの低いユ
ーザ割り込みの場合、ユーザ割り込みは優先されないの
でステップ−201へ戻り、コマンド処理からの処理を繰
り返す。 ステップ−204 低レベルブレーク信号よりレベルの高いユーザ割り込み
の場合、ユーザ割り込みが優先されるのでユーザ割り込
み処理を実行する。なお、ユーザ割り込みはコマンド処
理中にも受け付けることが可能である。 ステップ−205 次に、ユーザ割り込み処理にバグがあるかどうか判断
し、ユーザ割り込み処理に不備がなければ、再びステッ
プ−201へ戻り、インサーキットエミュレータ機能を実
現するためのコマンド処理から処理を繰り返す。 ステップ−206 ユーザ割り込み処理に不備があった場合、発明が解決し
ようとする課題に記したようにターゲットシステムが暴
走してしまうことがある。 ステップ−207 次に、特権ブレーク信号104の有無を判断し、特権ブレ
ーク信号104が有るとモニタモードへ遷移し、ステップ
−201へ戻り、コマンド処理に処理が移り、コマンド処
理がすべてのユーザ割り込みより優先される。以後、不
備のあるユーザ割り込み処理(ステップ−204)が実行
されないのでターゲットシステム3の暴走をインサーキ
ットエミュレータ2側から解除することができ、デバッ
グを続行することが可能となる。特権ブレーク信号が無
いとき、ターゲット暴走(ステップ−206)のままであ
る。
A series of operations in the monitor mode when the "monitor mode" is set by the low-level break signal according to the embodiment of the present invention will be described with reference to FIG. Step-201 When the monitor mode is set by the low-level break signal, command processing for realizing the in-circuit emulator function is executed. Step-202 Next, it is determined whether or not there is a user interrupt from the target system 3. If there is no user interruption, the process returns to step -201 and repeats the command processing. Step-203 If there is a user interrupt, it is determined whether or not the user interrupt is prioritized. In the case of a user interrupt having a lower level than the low-level break signal, the user interrupt is not given priority, so the process returns to step -201 to repeat the processing from the command processing. Step-204 In the case of a user interrupt having a higher level than the low-level break signal, the user interrupt is prioritized, so that the user interrupt processing is executed. Note that a user interrupt can be accepted even during command processing. Step-205 Next, it is determined whether there is a bug in the user interrupt processing. If there is no defect in the user interrupt processing, the process returns to step-201 again, and the processing is repeated from the command processing for realizing the in-circuit emulator function. Step-206 If the user interrupt processing is defective, the target system may run away as described in the problem to be solved by the invention. Step-207 Next, the presence / absence of the privilege break signal 104 is determined. If the privilege break signal 104 is present, the mode transits to the monitor mode, returns to step-201, and the process proceeds to the command processing. have priority. Thereafter, since the defective user interrupt processing (step-204) is not executed, the runaway of the target system 3 can be released from the in-circuit emulator 2 side, and the debugging can be continued. When there is no privilege break signal, target runaway (step-206) remains.

【0039】このように、インサーキットエミュレータ
2に割り込み制御回路5を加え、「モニタモード」へ遷
移するためのブレーク信号を複数種類設けることによ
り、「モニタモード」中にターゲットシステム3の空間
のユーザ割り込みを受け付けることが可能となり、さら
に受け付けたユーザ割り込みにおいて、プログラムの不
備によりターゲットシステム3が暴走した場合には特権
ブレーク信号104で「モニタモード」とすることによ
り、ターゲットシステム3からのユーザ割り込みより
「モニタモード」を優先でき、デバッグを続行すること
ができる。
As described above, by adding the interrupt control circuit 5 to the in-circuit emulator 2 and providing a plurality of types of break signals for transitioning to the "monitor mode", the user in the space of the target system 3 can be operated during the "monitor mode". Interrupts can be accepted, and if the target system 3 runs away due to a program defect in the accepted user interrupt, the privileged break signal 104 sets the monitor mode to “monitor mode”. "Monitor mode" can be prioritized, and debugging can be continued.

【0040】なお、上記実施の形態では「モニタモー
ド」へ遷移するためのブレーク信号として特権ブレーク
信号104と低レベルブレーク信号105を用いて説明した
が、本発明はブレーク信号としてユーザ割り込みよりレ
ベルの低いブレーク信号とレベルの高いブレーク信号を
用いるなどの組み合わせでもよく、また、2つ以上のブ
レーク信号を設けてもよい。
In the above embodiment, the privilege break signal 104 and the low-level break signal 105 are used as break signals for transitioning to the "monitor mode". A combination of using a low break signal and a high level break signal may be used, or two or more break signals may be provided.

【0041】[0041]

【発明の効果】以上のように本発明によれば、インサー
キットエミュレータに割り込み制御回路を加え、モニタ
モードへ遷移するためのブレーク信号を複数種類設ける
ことにより、モニタモード中にターゲットシステム空間
のユーザ割り込みを受け付けることを可能とし、さらに
受け付けたユーザ割り込みにおいて、プログラムの不備
によりターゲットシステムが暴走した場合には、ユーザ
割り込みレベルよりモニタモードを優先するブレーク信
号でモニタモードとすることで、ターゲットシステムか
らのユーザ割り込みよりモニタモードを優先し、デバッ
グを続行することができるという有利な効果が得られ
る。
As described above, according to the present invention, the interrupt control circuit is added to the in-circuit emulator, and a plurality of types of break signals for transitioning to the monitor mode are provided. Interrupts can be accepted, and if the target system runs away due to a program defect in the accepted user interrupt, the monitor mode is set by a break signal that gives priority to the monitor mode over the user interrupt level. This has the advantageous effect that the monitor mode is prioritized over the user interrupt and debugging can be continued.

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

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

【図2】同インサーキットエミュレータの割り込み制御
回路の内部ブロック図である。
FIG. 2 is an internal block diagram of an interrupt control circuit of the in-circuit emulator.

【図3】同インサーキットエミュレータのマイクロプロ
セッサ内にある割り込みコントローラの入出力を示すブ
ロック図である。
FIG. 3 is a block diagram showing input / output of an interrupt controller in a microprocessor of the in-circuit emulator.

【図4】同インサーキットエミュレータの低レベルブレ
ーク信号によりモニタモードとなった時のモニタモード
中の一連の動作を示した図である。
FIG. 4 is a diagram showing a series of operations during a monitor mode when the monitor mode is set by a low-level break signal of the in-circuit emulator;

【図5】従来のインサーキットエミュレータのブロック
図である。
FIG. 5 is a block diagram of a conventional in-circuit emulator.

【図6】従来のインサーキットエミュレータのモニタモ
ード中の一連の動作を示した図である。
FIG. 6 is a diagram showing a series of operations during a monitor mode of a conventional in-circuit emulator.

【符号の説明】 1 ホスト装置 2 インサーキットエミュレータ 3 ターゲットシステム 4 エミュレータ制御回路 5 割り込み制御回路 6 マイクロプロセッサ 11 セレクタ 12 割り込みコントローラ 13 マイコンコア 101 ホスト制御バス 102 ブレーク信号 103 選択信号 104 特権ブレーク信号 105 低レベルブレーク信号 106 メインバス 107 ユーザー割り込み信号[Description of Signs] 1 Host device 2 In-circuit emulator 3 Target system 4 Emulator control circuit 5 Interrupt control circuit 6 Microprocessor 11 Selector 12 Interrupt controller 13 Microcomputer core 101 Host control bus 102 Break signal 103 Select signal 104 Privileged break signal 105 Low Level break signal 106 Main bus 107 User interrupt signal

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 少なくともモニターモードへ遷移するブ
レーク信号とその選択信号を発生するエミュレータ制御
回路と、 前記エミュレータ制御回路よりブレーク信号を受け付け
ると、前記モニタモードへ遷移するための複数種類のブ
レーク信号の中から、前記エミュレータ制御回路からの
選択信号に応じて1つのブレーク信号を選択し、出力す
る割り込み制御回路と、 前記割り込み制御回路から受け付けたブレーク信号が、
ユーザ割り込みが可能な信号のとき、前記モニタモード
中にターゲットシステムからのユーザ割り込みを受け付
け、前記割り込み制御回路から受け付けたブレーク信号
が、ユーザ割り込みよりモニタモードを優先する信号の
とき、前記ターゲットシステムからのユーザ割り込みよ
りモニタモードを優先するマイクロプロセッサとを備え
たことを特徴とするインサーキットエミュレータ。
An emulator control circuit for generating at least a break signal for transition to a monitor mode and a selection signal thereof; and a plurality of types of break signals for transitioning to the monitor mode when a break signal is received from the emulator control circuit. An interrupt control circuit that selects and outputs one break signal according to a selection signal from the emulator control circuit, and a break signal received from the interrupt control circuit,
When a signal that allows a user interrupt is received, a user interrupt from the target system is received during the monitor mode, and when the break signal received from the interrupt control circuit is a signal that prioritizes the monitor mode over the user interrupt, And a microprocessor which gives priority to the monitor mode over user interrupts.
JP10164025A 1998-06-12 1998-06-12 In-circuit emulator Pending JP2000003290A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10164025A JP2000003290A (en) 1998-06-12 1998-06-12 In-circuit emulator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10164025A JP2000003290A (en) 1998-06-12 1998-06-12 In-circuit emulator

Publications (1)

Publication Number Publication Date
JP2000003290A true JP2000003290A (en) 2000-01-07

Family

ID=15785376

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10164025A Pending JP2000003290A (en) 1998-06-12 1998-06-12 In-circuit emulator

Country Status (1)

Country Link
JP (1) JP2000003290A (en)

Similar Documents

Publication Publication Date Title
US5455936A (en) Debugger operable with only background monitor
JPH02297228A (en) Fault information storing system
US20100153786A1 (en) Processor, multiprocessor, and debugging method
US6175913B1 (en) Data processing unit with debug capabilities using a memory protection unit
EP0638864B1 (en) Development support system for microcomputer with internal cache
US20020120801A1 (en) Technique for capturing information
US5257269A (en) Error controller for use in debugging microprocessor
JP2000003290A (en) In-circuit emulator
CA1204876A (en) System for processing machine check interruption
JPH07152598A (en) Incircuit emulator
JPS59123933A (en) Address comparison system
JP2653412B2 (en) How to set breakpoints
JP2570108B2 (en) Software debugging method
JPH0219937A (en) Electronic computer system
JPH06202879A (en) Interrupt processing method
JPH10187480A (en) Emulator
JPH0212531A (en) Interruption control system for virtual computer
JPH05250222A (en) Cpu monitoring device
JPH0395638A (en) Debugging device
JPH09319592A (en) Microcomputer
JP2000040015A (en) In-circuit emulator
JPH09212382A (en) Personal computer
JPH0764822A (en) Microcomputer
JPH09293000A (en) In-circuit emulator device
JPH04242815A (en) Computer