JPH04114241A - Debugging device - Google Patents

Debugging device

Info

Publication number
JPH04114241A
JPH04114241A JP2234740A JP23474090A JPH04114241A JP H04114241 A JPH04114241 A JP H04114241A JP 2234740 A JP2234740 A JP 2234740A JP 23474090 A JP23474090 A JP 23474090A JP H04114241 A JPH04114241 A JP H04114241A
Authority
JP
Japan
Prior art keywords
processor
sub
halt
microcomputer
main processor
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
JP2234740A
Other languages
Japanese (ja)
Inventor
Yoshiro Naito
内藤 芳郎
Tatsuya Suzuki
達也 鈴木
Kenichi Aoki
健一 青木
Yuji Ota
祐二 太田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Microcomputer System Ltd
Hitachi Ltd
Original Assignee
Hitachi Ltd
Hitachi Microcomputer Engineering Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd, Hitachi Microcomputer Engineering Ltd filed Critical Hitachi Ltd
Priority to JP2234740A priority Critical patent/JPH04114241A/en
Publication of JPH04114241A publication Critical patent/JPH04114241A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To enable emulation control to a sub processor as well as a main processor by providing a temporary stop means to temporarily stop the operation of the sub processor and to restart the operation in addition to the function of interruption to the main processor. CONSTITUTION:The first microcomputer is a microcomputer equipped with a sub processor 2 as well as a main processor 1 in the same chip. The first microcomputer is equipped with the temporary stop means to temporarily stop the operation of the sub processor 2 and to restart the operation. Then, the main processor 1 and the sub processor 2 can simultaneously control the operations. Therefore, in the microcomputer building-in the sub processor 2 as well as the main processor 1, the operations of the main processor 1 and the sub processor 2 are easily controlled. Thus, when applying this device to an emulator, the emulation similar to the emulation to the conventional main processor is realized to the sub processor 2 and further, combined debugging is enabled as well.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、複数のプロセッサを有するマイクロコンピュ
ータの開発支援装置におけるプログラムデバッグ機能実
現に有効な技術に関し、特にエミュレータに利用して有
効な技術に関する。
Detailed Description of the Invention [Field of Industrial Application] The present invention relates to a technique effective for realizing a program debugging function in a development support device for a microcomputer having a plurality of processors, and particularly to a technique effective for use in an emulator. .

[従来の技術] マイクロコンピュータ応用機器の開発において、その応
用システムのデバッグやそのシステムの詳細な訂価を行
うため、エミュレータが使用されている。エミュレータ
は対象マイクロコンピュータあるいはそれと同機能のマ
イクロコンピュータを有し、このマイクロコンピュータ
によってユーザプログラムを実行、停止させながらユー
ザシステムを制御することにより、ハードウェア及びソ
フトウェアのデバッグを可能にするものである。
[Prior Art] In the development of microcomputer application equipment, emulators are used to debug the application system and perform detailed revisions of the system. The emulator has a target microcomputer or a microcomputer with the same functions as the target microcomputer, and enables hardware and software debugging by controlling the user system while executing and stopping the user program using the microcomputer.

一般にエミュレータでは、ユーザプログラムをデバッグ
するために、任意のアドレスからの実行、ブレークポイ
ントの設定、レジスタ内容の表示、変更及び実行結果の
トレース機能を有する。また、応用機器(ユーザシステ
ム)にメモリが用意されていない場合に貸し出されるエ
ミュレータメモリが設けられており、ユーザの任意のア
ドレス位置に必要容量を割り付けてユーザプログラムを
ロードしユーザプログラム実行ができる(平成元年61
120日電波新聞社発行、Fマイコン開発のすべて」第
78頁〜第94頁参照)。
In general, emulators have functions for executing programs from arbitrary addresses, setting breakpoints, displaying and changing register contents, and tracing execution results in order to debug user programs. In addition, an emulator memory is provided that is lent out when the application equipment (user system) does not have memory available.The user can allocate the required capacity to any address location of the user's choice, load the user program, and execute the user program ( 1989 61
(Refer to pages 78 to 94 of ``All About F Microcomputer Development,'' published by Dempa Shimbun on the 120th).

また、従来のエミュレータのエミュレーションサポート
対象はマイクロコンピュータ内部のCPUが一般的であ
った。
Furthermore, the emulation support target of conventional emulators has generally been a CPU inside a microcomputer.

[発明が解決しようとする課題] マイクロコンピュータの高集積化に伴いシステムオンチ
ップ化が進んでお+)、CP[J (以下、メインプロ
セッサと称する)の他に内蔵PROMに格納されたプロ
グラムによって動作し、主として周辺装置の制御を司る
サブプロセッサを搭載した1チツプマイクロコンピユー
タの開発が進められている。
[Problem to be solved by the invention] As microcomputers become more highly integrated, systems on a chip are being developed. The development of a one-chip microcomputer equipped with a sub-processor that operates and mainly controls peripheral devices is underway.

一方、このようなマイクロコンピュータに対するエミュ
レータとしては、メインプロセッサに対するデバッグ機
能と同様にサブプロセッサに対するデバッグ機能も用意
する必要がある。ところが、サブプロセッサの動作は内
蔵PROMJ−のプログラム実行であるため、その動作
を外部から制御するのが困難になってきており、サブプ
ロセッサのデバッグはできないのが現状である。
On the other hand, as an emulator for such a microcomputer, it is necessary to provide a debugging function for the sub-processor as well as a debugging function for the main processor. However, since the sub-processor operates by executing a program in the built-in PROMJ, it has become difficult to control its operation from the outside, and it is currently impossible to debug the sub-processor.

本発明の目的は、メインプロセッサの他にサブプロセッ
サに対するエミュレーション制御を可能とすることにあ
る。
An object of the present invention is to enable emulation control for sub-processors in addition to the main processor.

この発明の前記ならびにそのほかの目的と新規な特徴に
ついては、本明細書の記述及び添附図面から明らかにな
るであろう。
The above and other objects and novel features of the present invention will become apparent from the description of this specification and the accompanying drawings.

「課題を解決するための手段] 本願において開示される発明のうち代表的なものの概要
を説明すれば、下記のとおりである。
"Means for Solving the Problems" An overview of typical inventions disclosed in this application is as follows.

すなわち、メインプロセッサへの割込み機能に加えて、
サブプロセッサの動作を一時停止、動作再開をさせる一
時停止手段を設け、メインプロセッサとサブプロセッサ
両方の動作制御を同時に行うことを可能とするものであ
る。
That is, in addition to the ability to interrupt the main processor,
A temporary stop means for temporarily stopping and restarting the operation of the sub-processor is provided, thereby making it possible to control the operation of both the main processor and the sub-processor simultaneously.

[作用] 上記した手段によれば、メインプロセッサの他にサブプ
ロセッサを内蔵するマイクロコンピュータにおいて、メ
インプロセッサとサブプロセッサの動作制御が容易とな
り、これをエミュレータに応用した場合、従来のメイン
プロセッサに対すると同様のエミュレーションがサブプ
ロセッサに対し実現でき、さらに組合せデバッグも可能
となる。
[Operation] According to the above-mentioned means, in a microcomputer that has a built-in sub-processor in addition to the main processor, operation control of the main processor and the sub-processor becomes easy, and when this is applied to an emulator, it is superior to the conventional main processor. Similar emulation can be achieved for sub-processors, and combination debugging is also possible.

[実施例] 以下、本発明をエミュレータに適用した場合の一実施例
を図面を用いて説明する。
[Embodiment] An embodiment in which the present invention is applied to an emulator will be described below with reference to the drawings.

先ず、本発明が適用されたエミュレータ全体の構成を第
2図に示すブロック図に従い説明する。
First, the overall configuration of an emulator to which the present invention is applied will be explained with reference to the block diagram shown in FIG.

すなわちこの実施例のエミュレータは、チップ内部にメ
インプロセッサ1の他にサブプロセッサ2を有し、ター
ゲットマイクロコンピュータの機能を代行するマイクロ
コンピュータ11と、エミュレーションや各種デバッグ
機能を実行するためのエミュレーション制御部12、プ
ログラムの実行やトレースの停止条件を設定し、条件が
成立したときにプログラムもしくはトレースを停止させ
るブレーク制御部13、エミュレーション実行中のバス
上の信号を逐次記憶するトレースメモリ14、応用機器
(ユーザシステム)にメモリが用意されていない場合に
貸し出されるエミュレーションRAM15、親計算機コ
ンソール3oとの間でデータ通信を行うためのシリアル
インタフェースJ6、システム全体のプログラム等を格
納するシステムメモリ17及び各種デバッグ機能を達成
するための制御を司るシステムマイクロプロセッサ18
などからなる。
That is, the emulator of this embodiment has a sub-processor 2 in addition to the main processor 1 inside the chip, a microcomputer 11 that performs the functions of the target microcomputer, and an emulation control unit that executes emulation and various debugging functions. 12. A break control unit 13 that sets program execution and trace stop conditions and stops the program or trace when the conditions are met; a trace memory 14 that sequentially stores signals on the bus during emulation; and application equipment ( An emulation RAM 15 that is lent out when memory is not available in the user system), a serial interface J6 for data communication with the parent computer console 3o, a system memory 17 that stores programs for the entire system, and various debugging functions. A system microprocessor 18 that manages control to achieve
Consists of etc.

そして、上記エミュレータは、その本体がら延長された
ケーブルの先端が、応用機器に設けられたマイクロプロ
セッサ用ソケットに結合されることにより、上記マイク
ロコンピュータ11がターゲットマイクロプロセッサの
機能を代行する。マイクロコンピュータ11がユーザ実
機を代行制御(エミュレーション)するとき、マイクロ
コンピュータ11はシステムマイクロプロセッサ18の
制御から切り離され、また、マイクロコンピュータ11
の制御動作状態が予め定められている状態に到達してブ
レークされるとき、マスクマイクロプロセッサの制御を
受けるようにされる。このような制御状態の切換えがエ
ミュレーション制御部12によって行われる。
In the emulator, the tip of a cable extended from the main body of the emulator is connected to a microprocessor socket provided in an application device, so that the microcomputer 11 acts as a target microprocessor. When the microcomputer 11 performs proxy control (emulation) of the user's actual machine, the microcomputer 11 is separated from the control of the system microprocessor 18;
When the control operating state reaches a predetermined state and is broken, it is placed under the control of the mask microprocessor. Such switching of control states is performed by the emulation control section 12.

なお、特に制限されないが、エミュレーション制御部1
2、ブレーク制御部13、トレースメモリ14、エミュ
レーションRAM15の各回路は、エミュレーション実
行時に使用するエミュレーションバス19を介してマイ
クロコンピュータ11に、またエミュレータ全体の制御
に使用するシステムバス20を介してシステムマイクロ
プロセッサ18に接続されている。各機能の実行は、エ
ミュレータ本体に接続される親計算機側のコンソール3
0によってコントロールされる。
Note that, although not particularly limited, the emulation control unit 1
2. The break control unit 13, trace memory 14, and emulation RAM 15 are connected to the microcomputer 11 via the emulation bus 19 used during emulation execution, and to the system microcomputer 11 via the system bus 20 used to control the entire emulator. The processor 18 is connected to the processor 18 . Each function is executed using the console 3 on the parent computer side connected to the emulator main body.
Controlled by 0.

また、マイクロコンピュータ11からはユーザインタフ
ェース回路21を介してケーブル22が延長され、この
ケーブルの先端に設けられているプラグをマイクロコン
ピュータ応用機器としてのユーザ実機上のマイクロコン
ピュータソケット23に接続させることによって、マイ
クロコンピュータ11はユーザ実機を代行制御する。
Further, a cable 22 is extended from the microcomputer 11 via a user interface circuit 21, and a plug provided at the end of this cable is connected to a microcomputer socket 23 on the user's actual machine as a microcomputer application device. , the microcomputer 11 performs proxy control of the user's actual machine.

第1図には、本発明に係るデバッグ装置のエミユレーシ
ョン用マイクロコンピュータの実施例が示されている。
FIG. 1 shows an embodiment of a microcomputer for emulation of a debugging device according to the present invention.

この実施例のエミユレーション用マイクロコンピュータ
11はメインプロセッサlの他にサブプロセッサ2を同
一チップ内に有するものであって、メインプロセッサ1
及びサブプロセッサ2の機能は特に制限されないが、例
えばメインプロセッサlはバスを使用してシステム制御
を行い、サブプロセッサ2はI10ボートを介して周辺
装置の制御機能を実現する。
The emulation microcomputer 11 of this embodiment has a sub-processor 2 in addition to the main processor 1 on the same chip.
Although the functions of sub-processor 2 and sub-processor 2 are not particularly limited, for example, main processor 1 performs system control using a bus, and sub-processor 2 realizes peripheral device control functions via an I10 port.

第1図において、マイクロコンピュータ11内部には、
メインプロセッサ!、サブプロセッサ2、RAM、RO
M及び周辺I10からなるRAM。
In FIG. 1, inside the microcomputer 11,
Main processor! , subprocessor 2, RAM, RO
RAM consisting of M and peripheral I10.

ROM、I10機能3を有し、これらは内部バス4を介
して互いに接続されている。また、内部バス4は外部イ
ンタフェース5を介して外部メモリへのアクセスが可能
である。上記マイクロコンピュータ11には、ブレーク
制御部12がらのBRK割込み31が入力されるノンマ
スカブル割込みBRK端子6とホールト人力32が入力
されるF(ALT端子7とが設けられている。マイクロ
コンピュータ11はメインプロセッサ1に対するノンマ
スカブル割込みB RK端子6がらの入力とメインプロ
セッサlの例外処理復帰命令を有し、後述するサブプロ
セッサ2に対する動作一時停止のためのホールト機能を
エミュレータ専用機能として有する。なお、本実施例で
は、サブプロセッサ2はメインプロセッサlの最低2ク
ロック1命令実行に比べlクロックで1命令実行という
高速実行を行う。
It has a ROM and an I10 function 3, which are connected to each other via an internal bus 4. Furthermore, the internal bus 4 can access external memory via an external interface 5. The microcomputer 11 is provided with a non-maskable interrupt BRK terminal 6 to which the BRK interrupt 31 from the break control section 12 is input, and an F (ALT terminal 7) to which the halt input 32 is input. It has an input from the non-maskable interrupt BRK terminal 6 to the processor 1 and an exception handling return instruction for the main processor 1, and has a halt function for temporarily halting the operation of the sub-processor 2, which will be described later, as a function exclusive to the emulator. In the example, sub-processor 2 executes one instruction in 1 clocks, which is faster than the main processor 1, which executes 1 instruction in at least 2 clocks.

ホールトの要因としては、この実施例ではHALT端子
7からの入力、メインプロセッサ1によるホールト用レ
ジスタ8への書き込み及びサブプロセッサ2が実行する
命令に付加したHALTビット2aがII I IIで
ある命令の実行の3つが構成されている。サブプロセッ
サ2のHALTビット2aは1ビツトで構成され命令ア
ドレス容量分用意されている。上記各ホールト要因はサ
ブプロセッサホールト制御回路9を介してホールトの制
御を行う。また、HA L T端子7がらの入力及びH
ALTビット2aによりメインプロセッサlに対するノ
ンマスカブル割込み33が発生する。上記BRK端子6
からの入力及びノンマスカブル割込み33はORゲート
1oを介してメインプロセッサ1に入力されている。ま
た、ホールトの解除はメインプロセッサlの例外処理か
らの復帰命令実行信号34により行われる。
In this embodiment, the causes of a halt include an input from the HALT terminal 7, a write to the halt register 8 by the main processor 1, and an instruction whose HALT bit 2a added to the instruction executed by the sub-processor 2 is II II II. The execution consists of three parts. The HALT bit 2a of the sub-processor 2 consists of 1 bit and is prepared for the instruction address capacity. Each of the above-mentioned halt factors performs halt control via the sub-processor halt control circuit 9. In addition, input from HAL T terminal 7 and H
The ALT bit 2a generates a non-maskable interrupt 33 to the main processor l. Above BRK terminal 6
The input from the main processor 1 and the non-maskable interrupt 33 are input to the main processor 1 via an OR gate 1o. Further, the halt state is released by the main processor 1's return instruction execution signal 34 from exception processing.

次に、上記実施例のマイクロコンピュータのメインプロ
セッサに対する割込みとサブプロセッサの動作及びその
停止について説明する。
Next, an explanation will be given of an interrupt to the main processor of the microcomputer of the above embodiment, and the operation and termination of the sub-processor.

マイクロコンピュータ11のメインプロセッサlは、ブ
レーク制御13がらのBRK割込み31によってエミュ
レーションを停止し待ち状態となる。その後、システム
MPU18によりエミュレーション制御部12を介して
エミュレーション実行指示があると、例外処理復帰命令
を実行してエミュレーション再実行が行われる。ここで
、サブプロセッサ2はメインプロセッサ1が停止してい
ても動作可能であり、また、逆にサブプロセッサ2がホ
ールトするとメインプロセッサlは割込みが発生し必ず
停止する。サブプロセッサ2はホールト指示(すなわち
、ブレーク制御部13からのHALT端子7へのホール
ト人力32、メインプロセッサlによるホールト用レジ
スタ8への書き込みあるいはHALTビット2aをII
 I IIにする命令の実行)により動作を一時停止し
、その後システムMPU18による例外処理復帰命令実
行によるエミュレーション再実行まで待ち状態となる。
The main processor 1 of the microcomputer 11 stops emulation by the BRK interrupt 31 from the break control 13 and enters a waiting state. Thereafter, when the system MPU 18 issues an emulation execution instruction via the emulation control unit 12, the exception handling return instruction is executed and the emulation is re-executed. Here, the sub-processor 2 can operate even when the main processor 1 is stopped, and conversely, when the sub-processor 2 is halted, the main processor 1 is always stopped due to an interrupt. The sub-processor 2 receives a halt instruction (that is, a halt command 32 from the break control unit 13 to the HALT terminal 7, a write to the halt register 8 by the main processor 1, or a HALT bit 2a set to II).
The operation is temporarily stopped by execution of an instruction to change to I II), and then the system enters a waiting state until emulation is re-executed by execution of an exception handling return instruction by the system MPU 18.

上記3つのホールト要因のうち最低1つあれば何らかの
形でホールト機能を実現することができる。各ホールト
要因は以下のような特徴を有している。
If at least one of the above three halt factors exists, the halt function can be realized in some way. Each halt factor has the following characteristics.

1)HALT端子7の場合は、マイクロコンピュータ1
1の外からホールト人力32が入ツノされ動作が一時停
止される。具体的には、サブプロセッサホールト制御回
路9でアドレスをみてそのアドレス値が、HAL丁端子
7を介して入力されたホールト入力32によって指定さ
れたある値になったとき、サブプロセッサ2を一時停止
させることができる。
1) In the case of HALT terminal 7, microcomputer 1
Halt human power 32 is input from outside 1 and the operation is temporarily stopped. Specifically, when the sub-processor halt control circuit 9 checks the address and the address value reaches a certain value specified by the halt input 32 input via the HAL terminal 7, the sub-processor 2 is temporarily disabled. It can be stopped.

1i)HALTビット2aの場合は、サブプロセッサ2
が有する所定数の命令(例えば、512命令)分のHA
LTビット2aがあり、ホールトさせたい命令に対応し
たH A L Tビット2aのビットをII l +1
にしておくと対応した命令を実行して一時停止する。ま
た、ホールトの解除は、メインプロセッサ1 (このと
きのメインプロセッサlはBRK割込み31を受けてブ
レークモード状態になっている)にサブプロセッサホー
ルト制御回路9がらエミュレータ専用のリターン−ブレ
ーク命令を与えることによって行われ、メインプロセッ
サlがリターン−ブレーク命令を実行することによって
サブプロセッサ2のホールトも解除される。このHAT
Lビット2aによるホールト要因は、上記HALT端子
7によるホールト要因に比べ以下のような特徴がある。
1i) If HALT bit 2a, subprocessor 2
HA for a predetermined number of instructions (for example, 512 instructions) that has
There is LT bit 2a, and the bit of H A L T bit 2a corresponding to the instruction to be halted is II l +1
If set to , the corresponding command will be executed and then paused. To release the halt, the sub-processor halt control circuit 9 issues a return-break command exclusively for the emulator to the main processor 1 (main processor 1 at this time is in break mode after receiving the BRK interrupt 31). When the main processor 1 executes the return-break instruction, the sub-processor 2 is also released from the halt state. This HAT
The halt factor caused by the L bit 2a has the following characteristics compared to the halt factor caused by the HALT terminal 7 described above.

すなわち、サブプロセッサ2は1つクロックで1命令を
実行する高速処理を行っているため、HALT端子7を
介して外からホールト人力32を指示しても停止させた
い状態よりも少し進んで停止されることとなり、所望の
エミュレーションが行えない場合が生ずることがあるが
、HALTビット2aを設けるものでは対応したビット
をl″にしておけばその対応した命令を実行して確実に
停止させることが可能である。また、HALTビット2
aを設ける場合に、サブプロセッサ2の命令に対応する
ビットを確保すればよく、−また、サブプロセッサ2の
外に付加される回路も少なくて済むという利点もある。
In other words, since the sub-processor 2 performs high-speed processing that executes one instruction with one clock, even if the halt power 32 is instructed from the outside via the HALT terminal 7, it will stop a little further than the desired state. Therefore, the desired emulation may not be possible, but if the HALT bit 2a is provided, by setting the corresponding bit to l'', it is possible to execute the corresponding instruction and stop the program reliably. Also, HALT bit 2
When providing a, it is sufficient to secure bits corresponding to the instructions of the sub-processor 2, and there is also an advantage that fewer circuits are required to be added outside the sub-processor 2.

ただし、HALTビット2aを設けるものでは対応する
命令実行後必ず毎回停止することになるため、命令回数
を指定して実行させる場合には適さない。
However, in the case where the HALT bit 2a is provided, the corresponding instruction is always stopped after execution, so it is not suitable for executing the instruction by specifying the number of times.

かかる回数指定のときは前記HALT端子7へのホール
ト人力32によってホールト機能を実現すればよい。
When specifying such a number of times, the halt function may be realized by the halt manual input 32 to the HALT terminal 7.

m)ホールト用レジスタ8の場合は、メインプロセッサ
1がブレーク状態でサブプロセッサ2は動いている(例
えば、周辺機器を動作させている)状態でサブプロセッ
サ2を止めたいときにメインプロセッサ1がこのホール
ト用レジスタ8を設定することによってサブプロセッサ
2を一時停止させる。ホールト用レジスタ8を用いてホ
ールトするものでは、特にメインプロセッサlがブレー
ク状態でサブプロセッサ2が動いているときにサブプロ
セッサ2を止める場合にハードウェアに負担がかからな
い点で非常に便利である。
m) In the case of the halt register 8, when the main processor 1 is in a break state and the sub-processor 2 is running (for example, operating a peripheral device) and you want to stop the sub-processor 2, the main processor 1 uses this register. By setting the halt register 8, the subprocessor 2 is temporarily stopped. Halting using the halt register 8 is very convenient in that it does not place a burden on the hardware, especially when stopping the sub-processor 2 when the main processor 1 is in a break state and the sub-processor 2 is running.

本実施例では上述した3つのホールト要因を設けている
ため、以下に述べるような種々のエミュレーション動作
制御が可能になる。
In this embodiment, since the above-mentioned three halt factors are provided, various emulation operation controls as described below are possible.

第3図にはエミュレーション動作制御におけるマイクロ
コンピュータ11の状態遷移図が示されている。また、
表1には、第3図の各ステータスにおけるメインプロセ
ッサ及びサブプロセッサの動作状態とその制御手段が示
されている。
FIG. 3 shows a state transition diagram of the microcomputer 11 in emulation operation control. Also,
Table 1 shows the operating states of the main processor and sub-processor and their control means in each status shown in FIG.

第3図及び表1において、エミュレータを起動するシス
テムMPU18によりマイクロコンピュータ11内のメ
インプロセッサ1はブレーク(エミュレーション停止状
態)、サブプロセッサ2はホールト状態となる。本実施
例では、上述したメインプロセッサlへの割込みとサブ
プロセッサ2のホールト機能により第3図に示す9つの
状態(ステータス)■〜■を実現することが可能となる
In FIG. 3 and Table 1, the system MPU 18 that starts the emulator causes the main processor 1 in the microcomputer 11 to break (emulation stopped state) and sub-processor 2 to halt state. In this embodiment, the above-mentioned interrupt to the main processor 1 and the halt function of the sub-processor 2 make it possible to realize the nine states (statuses) 1 to 2 shown in FIG. 3.

表1 例えば、表1ステータス■では、メインプロセッサl及
びサブプロセッサ2が停止している状態からエミュレー
ション実行する状態を表わして6する。この状態はメイ
ンプロセッサlが割込み例外復帰命令を実行することに
より実現される。また、ステータス■では、メインプロ
セッサ1は停止しているがサブプロセッサ2は動いた状
態でメインプロセッサ1を動作させた状態を表わしてい
る。
Table 1 For example, in Table 1 status ■, 6 represents a state where the main processor 1 and sub processor 2 are stopped and emulation is executed. This state is realized by the main processor l executing an interrupt exception return instruction. Furthermore, the status ■ indicates a state in which the main processor 1 is in operation, with the main processor 1 being stopped but the sub processor 2 being in operation.

ステータス■では、メインプロセッサ1及びサブプロセ
ッサ2が両方停止していた場合にサブプロセッサ2だけ
動かすもので、割込み例外復帰命令実行後直ちにBRK
割込み入力によりサブプロセッサ2だけ動いた状態が実
現できる。ステータス■では、メインプロセッサlだけ
l命令実行するもので、割込み例外復帰命令実行後1命
令(このl命令はユーザのプログラムの1命令をいう)
実行してBRK割込み入力によりメインプロセッサ1を
停止する。このときサブプロセッサ2が動いているとス
テータス■の状態となる。なお、指定によりメインプロ
セッサl停止でサブプロセッサ2をホールト入力により
停止させることもできる。
In status ■, if both main processor 1 and sub-processor 2 are stopped, only sub-processor 2 is activated, and BRK is activated immediately after executing the interrupt exception return instruction.
A state in which only subprocessor 2 is running can be realized by interrupt input. In status ■, only the main processor l executes l instructions, and one instruction is executed after the interrupt exception return instruction is executed (this l instruction refers to one instruction of the user's program).
Then, the main processor 1 is stopped by the BRK interrupt input. At this time, if the sub-processor 2 is operating, it will be in the status ■. Note that, by designation, when the main processor 1 is stopped, the sub-processor 2 can also be stopped by a halt input.

ステータス■では、メインプロセッサlは停止したまま
でサブプロセッサ2だけ動かすもので、上記ステータス
■の方法でメインプロセッサ1を停止させ、サブプロセ
ッサ2を1命令実行後ホールト入力により停止させる。
In status (2), the main processor 1 remains stopped and only the sub-processor 2 is operated.The main processor 1 is stopped by the method of the above-mentioned status (2), and the sub-processor 2 is stopped by a halt input after executing one instruction.

ステータス■では、メインプロセッサlがブレーク状態
でサブプロセッサ2が動いているときにホールト用レジ
スタ8を用いてサブプロセッサ2を停止させる状態を表
わしている。ステータス■では、メインプロセッサ1及
びサブプロセッサ2が動いていた状態でBRK入力(ブ
レーク命令)によりメインプロセッサ1のみを停止させ
る。この場合も、指定によりメインプロセッサ1停止で
サブプロセッサ2をホールト入力により停止させること
もできる。ステータス■では、上記HALT端子7、あ
るいは命令HALTビット2aの要因でサブプロセッサ
2を停止させ、また、サブプロセッサホールト制御回路
9からノンマスカブル割込み33を出力することによっ
てメインプロセッサ1を停止させる。
Status ■ represents a state in which the sub-processor 2 is stopped using the halt register 8 when the main processor 1 is in a break state and the sub-processor 2 is running. In status ■, only the main processor 1 is stopped by a BRK input (break instruction) while the main processor 1 and sub-processor 2 are in operation. In this case as well, it is possible to stop the main processor 1 and the sub-processor 2 by inputting a halt, as specified. In status (2), the sub-processor 2 is stopped due to the HALT terminal 7 or the instruction HALT bit 2a, and the main processor 1 is stopped by outputting a non-maskable interrupt 33 from the sub-processor halt control circuit 9.

以上述べたように、例外処理復帰命令実行とBRK割込
み31を使用することによりサブプロセッサ2の状態に
影響を与えることなくメインプロセッサ1のエミュレー
ション実行、停止を行うことができる(■、■、■参照
)。サブプロセッサ2がホールトしている場合のエミュ
レーション実行では、メインプロセッサ1と同時にサブ
プロセッサ2も動作を開始させることができ(■、■参
照)、指定によってはホールト人力32によってサブプ
ロセッサ2を停止させることもできる。なお、サブプロ
セッサ2を常時停止した状態でメインプロセッサlのエ
ミュレーション実行をしたい場合は、メインプロセッサ
lによるサブプロセッサ2内のレジスタ設定により行う
。逆に、サブプロセッサ2のみのエミュレーション実行
も、例外処理復帰命令実行時にBRK割込み31あるい
はHALT入力32を与えることにより行える(■、■
参照)。さらに、メインプロセッサlによるホールト用
レジスタ8への書き込みによりサブプロセッサ2のみエ
ミュレーション時の強制停止を実現する(■参照)。そ
の他、ブレーク制御部13とBRK割込み31.HAL
T及びHA L Tビット2aを使用することにより種
々のブレーク機能を実現できる(■参照)。
As described above, by using the exception handling return instruction execution and the BRK interrupt 31, it is possible to execute and stop emulation of the main processor 1 without affecting the state of the sub-processor 2 (■, ■, reference). When executing emulation when the sub-processor 2 is halted, the sub-processor 2 can also start operating at the same time as the main processor 1 (see ■, ■), and depending on the specification, the sub-processor 2 can be stopped by the halt manual power 32. You can also do that. Note that if it is desired to execute emulation of the main processor 1 while the sub-processor 2 is always stopped, this is done by setting registers in the sub-processor 2 by the main processor 1. Conversely, emulation execution of only the subprocessor 2 can be performed by applying the BRK interrupt 31 or HALT input 32 when executing the exception handling return instruction (■,
reference). Furthermore, by writing to the halt register 8 by the main processor 1, only the sub-processor 2 can be forcibly stopped during emulation (see ■). In addition, the break control unit 13 and the BRK interrupt 31. HAL
By using the T and HAL T bits 2a, various break functions can be realized (see ■).

なお、上記実施例では、HA L Tの方を優先させて
いるが、必ずしもHALTを優先させる必要はない。す
なわち、サブプロセッサ2の方がホールト状態になると
メインプロセッサ1にもサブプロセッサホールト制御回
路9からORゲート10を介してノンマスカブル割込み
32によりブレークを強制的に発生させメインプロセッ
サlを止めるようにしているが、上記実施例ではメイン
プロセッサ1に対する割込み要因として、サブプロセッ
サ2の動作一時停止の条件を付加しない態様であっても
よい。
In addition, in the above embodiment, priority is given to HALT, but it is not necessary to give priority to HALT. That is, when the sub-processor 2 enters the halt state, the sub-processor halt control circuit 9 forcibly generates a break in the non-maskable interrupt 32 via the OR gate 10 in the main processor 1, thereby stopping the main processor 1. However, in the above embodiment, the condition for suspending the operation of the sub-processor 2 may not be added as an interrupt factor to the main processor 1.

また、上記実施例では、」−記サブプロセッサ2に対す
る動作一時停止の解除をメインプロセッサ1の割込み処
理からの復帰命令により行うようにしているが、上述し
たサブプロセッサ2に対するホールト機能を備えたもの
であればかかる解除を行わないものであってもよいこと
は勿論である。
Furthermore, in the above embodiment, the suspension of the operation of the sub-processor 2 is canceled by a return instruction from the interrupt processing of the main processor 1. Of course, if this is the case, such cancellation may not be performed.

以上説明したように1−記実施例では、メインプロセッ
サlに対する割込み機能に加え、サブプロセッサ2の動
作を一時停止(ホールト)、動作再開させる一時停止手
段としてHA L T端子7、HALTビット2a、及
びホールト用レジスタ8を設け、これら3つのホールト
要因によりメインプロセッサ1とサブプロセッサ2両方
の動作制御を同時に行うことを可能にしたので、メイン
プロセッサlに対するデバッグと同時にサブプロセッサ
2に対するデバッグが可能となる。これによって、メイ
ンプロセッサのデバッグ機能と同様のエミュレーション
がサブプロセッサ2に対し実現できるという効果がある
As explained above, in the embodiment 1-1, in addition to the interrupt function for the main processor 1, the HALT terminal 7, HALT bit 2a, and a halt register 8, and it is possible to simultaneously control the operation of both the main processor 1 and the sub-processor 2 using these three halt factors, making it possible to debug the sub-processor 2 at the same time as debugging the main processor 1. Become. This has the effect that emulation similar to the debug function of the main processor can be realized for the sub-processor 2.

以上本発明者によってなされた発明を実施例に基づき具
体的に説明したが、本発明は上記実施例に限定されるも
のではなく、その要旨を逸脱しない範囲で種々変更可能
であることはいうまでもない。例えば、上記実施例では
サブプロセッサ2のボールドによってメインプロセッサ
1割込みを発生させているが、サブプロセッサ2のホー
ルトのみとしてもよい。また、サブプロセッサ2を一時
停止(ホールト)としたが、サブプロセッサ2の動作制
御ができるものであればよい。
Although the invention made by the present inventor has been specifically explained above based on Examples, it goes without saying that the present invention is not limited to the above Examples and can be modified in various ways without departing from the gist thereof. Nor. For example, in the above embodiment, the main processor 1 interrupt is generated by the bold of the sub-processor 2, but only the halt of the sub-processor 2 may be used. Further, although the sub-processor 2 is temporarily stopped (halted), any system that can control the operation of the sub-processor 2 may be used.

また、上記実施例では、サブプロセッサ2の動作を一時
停止させるホールトの要因としてHA LT端子7から
のホールト入力32、メインプロセッサlによるホール
ト用レジスタ8への書き込み及びサブプロセッサ2が実
行する命令に付加したHALTビット2aが1である命
令の実行の3要因を設け、これにより第3図及び表1に
示したような多彩なエミュレーション動作制御を実現し
ているが、サブプロセッサ2の動作を一時停止、再開さ
せるものであれば3つの上記ホールト要因には限定され
ない。また、上記実ホールト要因を3つ全部備えるもの
ではなく、上記3つのホールト要因のうち何れかl・つ
のホールト要因のみ、あるいは任意の2つのホールト要
因のみを有するものでもよいことは言うまでもない。
In the above embodiment, the causes of a halt that temporarily stop the operation of the sub-processor 2 include the halt input 32 from the HA LT terminal 7, the write to the halt register 8 by the main processor 1, and the instruction executed by the sub-processor 2. Three factors are provided for the execution of an instruction with the added HALT bit 2a set to 1, thereby realizing a variety of emulation operation controls as shown in Figure 3 and Table 1. It is not limited to the three above-mentioned halt factors as long as it causes stopping and restarting. Furthermore, it goes without saying that the device does not have to have all three of the above-mentioned actual halt factors, but may have only any one of the three halt factors, or only any two halt factors.

さらに、上記実施例では、メインプロセッサ】の他にサ
ブプロセッサ2が1つあるマルチプロセッサのエミュレ
ータの本発明を適用したが、同一チップ内に複数のプロ
セッサを有するもの(例えば、サブプロセッサが2つあ
るもの)についても同様に本発明を適用することができ
る。また、エミュレーションの対象となるマイクロコン
ピュータはマイクロプロセッサのみならずシングルチッ
プマイコンであってもよい。
Furthermore, in the above embodiment, the present invention is applied to a multiprocessor emulator that has one subprocessor 2 in addition to the main processor, but it is also applicable to a multiprocessor emulator that has a plurality of processors in the same chip (for example, two subprocessors). The present invention can be similarly applied to certain types of devices. Further, the microcomputer to be emulated may be not only a microprocessor but also a single-chip microcomputer.

以上の説明では主として本発明者によってなされた発明
をその背景となった利用分野であるエミュレータに適用
したものについて説明したが、この発明はそれに検定さ
れるものでなく、ロジックアナライザのようなデバッグ
ツールやシミュレータその他エミュレーション機能を有
するデータ処理システムに利用することができる。
The above explanation has mainly been about the application of the invention made by the present inventor to emulators, which is the background field of application. It can be used in simulators, simulators, and other data processing systems with emulation functions.

[発明の効果] 本願において開示される発明のうち代表的なものによっ
て得られる効果を簡単に説明すれば下記のとおりである
[Effects of the Invention] The effects obtained by typical inventions disclosed in this application are briefly explained below.

すなわち、メインプロセッサの他にサブプロセッサを内
蔵するマイクロコンピュータにおいて、メインプロセッ
サとサブプロセッサの動作制御が容易となり、これをエ
ミュレータに応用した場合、従来のCPUデバッグ機能
と同様のエミュレーションがサブプロセッサに対し実現
でき、さらに組合せデバッグも可能となる。
In other words, in a microcomputer that has a built-in subprocessor in addition to the main processor, it is easy to control the operation of the main processor and subprocessor, and when this is applied to an emulator, the same emulation as the conventional CPU debugging function can be applied to the subprocessor. This makes it possible to implement combined debugging.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明に係るエミュレータの要部の一実施例を
示すブロック図、 第2図は本発明が適用されるエミュレータ全体の概要構
成例を示すブロック図、 第3図は本発明に係るエミュレータのエミュレーション
動作制御におけるマイクロコンピュータの状態遷移図で
ある。 ■・・・・メインプロセッサ、2・・・・サブプロセッ
サ、2a・・・・l(A L Tビット(一時停止手段
)、6・・・・BRK端子、7・・・・HA L T端
子(一時停止手段)、8・・・・ホールト用レジスタ(
一時停止手段)、9・・・・サブプロセッサホールト制
御回路、11・・・・エミュレーション対象マイクロコ
ンピュータ、12・・・・エミュレーション制御部、1
3・・・・ブレーク制御部、14・・・ トレースメモ
リ、15・・・エミュレーションRAM、17・・・・
システムメモリ、18・・・・システムマイクロプロセ
ッサ、19・・・・エミュレーションバス、20・・・
・システムバス、21・・・・ユーザインタフェース、
22・・・ケーブル、23・・・・マイクロコンピュー
タソケット、30・・・・親計算機コンソール、31・
・・・B RK割込み、32・・・・ホールト入力、3
3・・・・ノンマスカブル割込み、34・・・・例外処
理からの復帰命令実行信号。 第 図 第 図 エミュータ4亘f万 五旦と−旦
FIG. 1 is a block diagram showing an example of the main part of an emulator according to the present invention, FIG. 2 is a block diagram showing an example of a general configuration of the entire emulator to which the present invention is applied, and FIG. FIG. 3 is a state transition diagram of a microcomputer in emulation operation control of an emulator. ■...Main processor, 2...Sub processor, 2a...l (AL T bit (temporary stop means), 6...BRK terminal, 7...HA L T terminal (temporary stop means), 8... Halt register (
(temporary stop means), 9... Sub-processor halt control circuit, 11... Emulation target microcomputer, 12... Emulation control unit, 1
3... Break control unit, 14... Trace memory, 15... Emulation RAM, 17...
System memory, 18...System microprocessor, 19...Emulation bus, 20...
・System bus, 21...User interface,
22...cable, 23...microcomputer socket, 30...main computer console, 31...
...B RK interrupt, 32 ... Halt input, 3
3...Non-maskable interrupt, 34...Return instruction execution signal from exception handling. Figure Figure Emulator 4 Wataru F Mangodan and -dan

Claims (1)

【特許請求の範囲】 1、デバッグ対象とされる機器のマイクロコンピュータ
の機能を代行する第1のマイクロコンピュータ及びデバ
ッグのための制御を司る第2のマイクロコンピュータを
有するデバッグ装置において、上記第1のマイクロコン
ピュータは、メインプロセッサの他にサブプロセッサを
同一チップ内に有するマイクロコンピュータであって、
上記第1のマイクロコンピュータに上記サブプロセッサ
の動作を一時停止させ、その動作を再開させる一時停止
手段を設け、上記メインプロセッサとサブプロセッサと
を同時に動作制御可能にしたことを特徴とするデバッグ
装置。 2、上記一時停止手段は、上記サブプロセッサに対する
動作の一時停止を、端子入力あるいは特殊命令実行によ
り行うように構成されてなることを特徴とする請求項1
記載のデバッグ装置。 3、上記サブプロセッサに対する動作一時停止の解除を
メインプロセッサの割込み処理からの復帰命令により行
うことを特徴とする請求項1または2記載のデバッグ装
置。
[Scope of Claims] 1. A debugging device having a first microcomputer that performs the functions of a microcomputer of a device to be debugged, and a second microcomputer that controls debugging; A microcomputer is a microcomputer that has a subprocessor in the same chip in addition to a main processor,
A debugging device characterized in that the first microcomputer is provided with a temporary stop means for temporarily stopping the operation of the sub-processor and restarting the operation, so that the operation of the main processor and the sub-processor can be controlled simultaneously. 2. Claim 1, wherein the temporary stopping means is configured to temporarily stop the operation of the subprocessor by inputting a terminal or by executing a special instruction.
Debug equipment as described. 3. The debugging device according to claim 1 or 2, wherein the suspension of operation of the sub-processor is canceled by a return instruction from interrupt processing of the main processor.
JP2234740A 1990-09-05 1990-09-05 Debugging device Pending JPH04114241A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2234740A JPH04114241A (en) 1990-09-05 1990-09-05 Debugging device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2234740A JPH04114241A (en) 1990-09-05 1990-09-05 Debugging device

Publications (1)

Publication Number Publication Date
JPH04114241A true JPH04114241A (en) 1992-04-15

Family

ID=16975618

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2234740A Pending JPH04114241A (en) 1990-09-05 1990-09-05 Debugging device

Country Status (1)

Country Link
JP (1) JPH04114241A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8958594B2 (en) 2011-07-25 2015-02-17 Panasonic Corporation Speaker device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8958594B2 (en) 2011-07-25 2015-02-17 Panasonic Corporation Speaker device

Similar Documents

Publication Publication Date Title
JPH02171934A (en) Virtual machine system
JPH04114241A (en) Debugging device
JPH0477833A (en) Integrated circuit provided with debugging environment
JPH08272770A (en) Microcontroller development system
JPH0565894B2 (en)
JPH02135545A (en) Execution control processing system for debugger
JP2797280B2 (en) Emulation system and emulator
JP3449812B2 (en) Control electronics
JPS61138361A (en) Parallel processing system
JPS63106840A (en) Data processor unit
JPH04288634A (en) One-chip microcomputer
JP2632891B2 (en) System development equipment
JPH0594328A (en) Debugger and emulator
Mateosian et al. Distributed processing with the Z8000 family
Nourse Microsoft Windows network virtual device drivers in PATHWORKS for DOS
JPS63136236A (en) Switching device debugging
JPH01309138A (en) In-circuit emulator
JPS5968066A (en) Debugger starting system
JPS6382525A (en) Microprocessor with tracing function
JPS62293365A (en) Data transfer system
JPH06301569A (en) Emulator for peripheral lsi
JPH04235641A (en) Development support device for microprocessor
JPS61194531A (en) Instruction execution controller
JPH0635760A (en) Buffer device with tracing function
JPH03110659A (en) Data processor