JPH04287136A - Debugging system and emulator - Google Patents

Debugging system and emulator

Info

Publication number
JPH04287136A
JPH04287136A JP3075785A JP7578591A JPH04287136A JP H04287136 A JPH04287136 A JP H04287136A JP 3075785 A JP3075785 A JP 3075785A JP 7578591 A JP7578591 A JP 7578591A JP H04287136 A JPH04287136 A JP H04287136A
Authority
JP
Japan
Prior art keywords
user
program
emulator
break
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.)
Withdrawn
Application number
JP3075785A
Other languages
Japanese (ja)
Inventor
Tsutomu Saito
勉 斎藤
Masamitsu Watanabe
渡辺 政光
Toru Kashima
鹿島 徹
Hiroshi Terada
博 寺田
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
Original Assignee
Hitachi Microcomputer System 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 Microcomputer System Ltd filed Critical Hitachi Microcomputer System Ltd
Priority to JP3075785A priority Critical patent/JPH04287136A/en
Publication of JPH04287136A publication Critical patent/JPH04287136A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To offer a technique to debug the software of a target system faithfully and more inexpensively. CONSTITUTION:Since a system program for debugging is integrated in a user program as the object of debugging and such a user program is executed by a user processor 6 mounted at a target system 4, it is not necessary to mount a chip for evaluation to an emulator 1 and therefore, the emulator 1 can be miniaturized and light in weight as well as reducing the price. Further, since a real chip is used in this way, the software can be debugged faithfully.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、本発明はターゲットシ
ステタムのソフトウェアを開発支援するためのデバッグ
方式及びそれに用いられるエミュレータに係り、例えば
半導体集積回路の開発コスト低減や開発期間の短縮など
を目的としたASIC(アプリケーション・スペシフィ
ック・インテグレーテッド・サーキット)をターゲット
プロセッサとするシステムデバッグに適用して有効な技
術に関する。
[Industrial Application Field] The present invention relates to a debugging method for supporting the development of software for a target system and an emulator used therein. The present invention relates to a technique that is effective when applied to system debugging using an ASIC (Application Specific Integrated Circuit) as a target processor.

【0002】0002

【従来の技術】マイクロコンピュータ応用機器(以下単
にターゲットシステムとも記す)の開発において、その
システムデバッグやシステム評価を行うためのエミュレ
ータは、ターゲットシステムに含まれるマイクロコンピ
ュータもしくはマイクロプロセッサ(以下単にターゲッ
トマイクロプロセッサとも記す)の機能を代行しながら
システムデバッグを可能とするものである。そのような
デバッグの容易化を図るため、またターゲットシステム
が存在しない場合でもユーザプログラムのデバッグを可
能とするため、一般には、ターゲットマイクロプロセッ
サと同等のマイクロプロセッサ(評価用チップ若しくは
エバチップと称される)がエミュレータにに搭載され、
このそのようなデバッグ専用プロセッサに、デバッグ対
象とされるユーザプログラムを実行させてターゲットシ
ステムを代行制御する。このとき、システム開発装置の
ようなホストシステムを介してユーザプログラムの内容
を任意に変更したりして、その制御状態をトレースし、
所定のブレークポイントでそのトレース結果を確認可能
にしながらターゲットシステムのソフトウェアデバッグ
を支援する。このようにエミュレータは、ユーザプログ
ラムによって実際にターゲットシステムを動作させなが
らそのソフトウェアデバッグもしくはシステムデバッグ
を支援する。
[Prior Art] In the development of microcomputer application equipment (hereinafter simply referred to as target system), an emulator for performing system debugging and system evaluation is used to develop a microcomputer or microprocessor (hereinafter simply referred to as target microprocessor) included in the target system. It enables system debugging while acting on behalf of the functions of In order to facilitate such debugging, and to enable debugging of user programs even when a target system does not exist, a microprocessor equivalent to the target microprocessor (referred to as an evaluation chip or evaluation chip) is generally used. ) is installed in the emulator,
This debug-dedicated processor executes a user program to be debugged and controls the target system on its behalf. At this time, the content of the user program is arbitrarily changed via a host system such as a system development device, and its control status is traced.
It supports software debugging of the target system while making it possible to check the trace results at predetermined breakpoints. In this way, the emulator supports software debugging or system debugging while actually operating the target system using a user program.

【0003】また、エミュレータは、ユーザプログラム
の実行開始条件やブレークポイント制御条件の設定、さ
らにはユーザプログラムの実行によって得られたトレー
ス情報をホストシステムへ転送したり、ホストシステム
からダウンロードされたユーザプログラムをユーザメモ
リ空間に転送したりするためのデータ転送制御が必要に
なり、そのため、エミュレータはユーザプログラムのほ
かにシステムプログラムも実行しなければならない。特
にシステムプログラムを実行して行うデータ転送制御に
おいては、ユーザメモリ空間にあるデータやユーザプロ
グラムをホストシステムに与えるためにシステムメモリ
空間に転送したり、その逆を行ったりする必要がある。 すなわち、エミュレータ内蔵プロセッサによるデータ転
送制御に際しては、アクセス対象メモリ空間を選択的に
ユーザメモリ空間又はシステムメモリ空間に切り換える
ことが必要になる。
[0003] The emulator also sets execution start conditions and breakpoint control conditions for the user program, transfers trace information obtained by executing the user program to the host system, and transfers the user program downloaded from the host system. Data transfer control is required to transfer data to the user memory space, and therefore the emulator must execute a system program in addition to the user program. Particularly in data transfer control performed by executing a system program, it is necessary to transfer data and user programs in a user memory space to the system memory space in order to provide them to the host system, and vice versa. That is, when controlling data transfer by a processor built in an emulator, it is necessary to selectively switch the memory space to be accessed to the user memory space or the system memory space.

【0004】尚、エミュレータについて記載された文献
の例としては特願昭61−276504号がある。
[0004] An example of a document describing an emulator is Japanese Patent Application No. 61-276504.

【0005】[0005]

【発明が解決しようとする課題】半導体集積回路の開発
コスト低減や開発期間の短縮などを目的としたASIC
は多品種少量のLSIであり、そのようなLSIをター
ゲットとするエミュレータにおいては、品種展開された
LSI毎に専用の評価用チップを形成し、それを搭載し
なければならないから、開発期間が比較的長く、また、
開発費がかかるため高価なものとならざるを得ず、さら
にそのようにして開発されたエミュレータに搭載された
評価用チップは、動作タイミングなどにおいて、実チッ
プとは微妙に異なっているのが通常であるから、ターゲ
ットシステムのエミュレーションが忠実に行われている
か否か疑わしい場合もあることが、本発明者によって見
いだされた。
[Problem to be solved by the invention] ASIC aimed at reducing the development cost and shortening the development period of semiconductor integrated circuits
is a high-mix low-volume LSI, and emulators that target such LSIs require a dedicated evaluation chip to be created and installed for each LSI type, so the development period is relatively short. Long and accurate,
Because of the development costs involved, the evaluation chip installed in the emulator developed in this way is usually slightly different from the actual chip in terms of operating timing, etc. Therefore, the inventor has found that there are cases in which it is doubtful whether the emulation of the target system is being performed faithfully.

【0006】本発明の目的は、ターゲットシステムのソ
フトウェアデバッグを忠実に、またより安価に行い得る
技術を提供することにある。
An object of the present invention is to provide a technique that allows software debugging of a target system to be performed faithfully and at a lower cost.

【0007】本発明の別の目的は、エミュレータを安価
に、短期間で開発できる技術を提供することにある。
Another object of the present invention is to provide a technology that allows emulators to be developed at low cost and in a short period of time.

【0008】本発明の別の目的は、汎用性に優れたエミ
ュレータを提供することにある。
Another object of the present invention is to provide an emulator with excellent versatility.

【0009】本発明の前記並びにその他の目的と新規な
特徴は本明細書の記述及び添付図面から明らかになるで
あろう。
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.

【0010】0010

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

【0011】すなわち、デバッグ対象とされるユーザプ
ログラムとデバッグ用システムプログラムをターゲット
システムに搭載されるべき実チップとしてのユーザプロ
セッサに実行させ、そのときの当該ユーザプロセッサが
入出力すべき情報をエミュレータで監視することにより
上記ユーザプログラムのデバッグを可能とするものであ
る。このとき、上記デバッグ用システムプログラムには
、ユーザプログラムの実行状態が所定のブレーク条件と
一致したときに上記ユーザプロセッサに対してなされる
ブレーク割り込み要求と、ユーザプログラム実行におけ
るユーザシステム上の割り込み要求とを判別するステッ
プと、このステップでの判断に基づいてそれぞれ対応す
る所定の処理ルーチンに移行するステップとを含めるこ
とができる。さらにそのようなソフトウェアデバッグに
好適なものとして、ターゲットシステムのICソケット
に結合可能とされ、且つ、当該ターゲットシステムにユ
ーザプロセッサが結合された状態で、当該プロセッサが
入出力すべき情報を検出可能とするCPUプローブと、
インタフェースケーブルを介して上記CPUプローブに
結合されたユーザインタフェース部と、このユーザイン
タフェース部を介して上記ユーザプロセッサのバス状態
を監視するとともに、当該バス状態が所定のブレーク条
件と一致した場合に上記ユーザプロセッサに対してブレ
ーク割り込みを要求するブレークコントロール回路とを
含んでエミュレータを構成するものである。
That is, the user program to be debugged and the system program for debugging are executed by a user processor as a real chip to be installed in the target system, and the information to be input/output by the user processor at that time is executed by an emulator. By monitoring, the user program can be debugged. At this time, the debugging system program includes a break interrupt request made to the user processor when the execution state of the user program matches a predetermined break condition, and an interrupt request on the user system during user program execution. The process may include a step of determining the following, and a step of proceeding to a corresponding predetermined processing routine based on the determination in this step. Further, as a device suitable for such software debugging, it is possible to connect to an IC socket of a target system, and when a user processor is connected to the target system, it is possible to detect information to be input/output by the processor. A CPU probe to
A user interface section is connected to the CPU probe via an interface cable, and the bus state of the user processor is monitored via this user interface section, and when the bus state matches a predetermined break condition, the user interface section is connected to the CPU probe. The emulator includes a break control circuit that requests a break interrupt to the processor.

【0012】0012

【作用】上記した手段によれば、デバッグ対象とされる
ユーザプログラムにそれのデバッグ用システムプログラ
ムを組み込み、そのようなユーザプログラムを、ターゲ
ットシステムに搭載されたユーザプロセッサに実行させ
ることは、エミュレータへの評価用チップの搭載を不要
とし、そのことが、エミュレータの低価格化、構成の簡
素化を可能とするとともに、エミュレータの汎用性を達
成する。また、ソフトウェアデバッグにおいてそのよう
なエミュレータを使用することがターゲットシステムの
ソフトウェアデバッグをより安価に行い得るように作用
する。そして、上記のようにソフトウェアデバッグにお
いて実チップを利用することが、ターゲットシステムの
ソフトウェアデバッグを忠実に行い得るように作用する
[Operation] According to the above-mentioned means, it is possible to incorporate a debugging system program into a user program to be debugged, and to have the user processor installed in the target system execute such a user program. This eliminates the need to install an evaluation chip, which makes it possible to reduce the price of the emulator, simplify the configuration, and achieve versatility of the emulator. Also, using such an emulator in software debugging allows software debugging of a target system to be performed more inexpensively. The use of a real chip in software debugging as described above allows software debugging of a target system to be performed faithfully.

【0013】[0013]

【実施例】図1には本発明の一実施例であるエミュレー
ションシステムが示される。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 shows an emulation system which is an embodiment of the present invention.

【0014】図1に示されるエミュレーションシステム
は、エミュレータ1とホストシステム2から成り、エミ
ュレータ1は、ユーザインタフェース3を介して所要の
ターゲットシステム4と結合可能にされると共に、シス
テムインタフェース5を介してホストシステム2のホス
トコンピュータ7に結合可能にされている。
The emulation system shown in FIG. 1 consists of an emulator 1 and a host system 2. The emulator 1 can be connected to a desired target system 4 via a user interface 3, and can be connected via a system interface 5. The host computer 7 of the host system 2 can be coupled to the host computer 7 .

【0015】ここで従来のエミュレータには、ターゲッ
トシステム4を制御するためのユーザプロセッサ6と同
等の制御機能を有する評価用チップが搭載され、それに
よってユーザプログラムを実行しながら上記ユーザイン
タフェース3を介してターゲットシステム4を代行制御
すると共に、ユーザプログラムの実行停止時にはシステ
ムプログラムを実行してエミュレータ1の内部を制御す
るよう構成されるが、本実施例エミュレータ1には、そ
のような評価用プロセッサが搭載されていない。すなわ
ち、本実施例では、デバッグ対象とされるユーザプログ
ラムにそれのデバッグ用システムプログラムを組み込み
、そのようなユーザプログラムを、ターゲットシステム
4に搭載されたユーザプロセッサ6に実行させることに
よって、エミュレータ内の評価用チップが省略されてい
る。
[0015] Here, the conventional emulator is equipped with an evaluation chip having the same control function as the user processor 6 for controlling the target system 4, so that it can be used to control the target system 4 through the user interface 3 while executing the user program. The emulator 1 is configured to act on behalf of the target system 4 and control the internals of the emulator 1 by executing a system program when the execution of the user program is stopped.The emulator 1 of this embodiment does not include such an evaluation processor. Not installed. That is, in this embodiment, the system program for debugging is incorporated into the user program to be debugged, and such a user program is executed by the user processor 6 installed in the target system 4, thereby debugging the program in the emulator. Evaluation chip is omitted.

【0016】本実施例エミュレータ1には、共有バス1
2が形成され、この共有バス12には、上記ユーザイン
タフェース3及びシステムインタフェース5のほかに、
ターゲットシステム4に含まれるユーザプロセッサ6が
ユーザプログラムを実行しているときの制御状態などを
監視し、その状態が予め設定されている状態に到達した
ときにユーザプログラムの実行動作(エミュレーション
動作)をブレークするためのブレークコントロール回路
9、上記ユーザプロセッサ6がユーザプログラムを実行
しているときに共有バス12に与えられるデータやアド
レスさらには制御情報を逐次トレースして蓄えるリアル
タイムトレース回路10などが夫々結合される。
The emulator 1 of this embodiment has a shared bus 1.
2 is formed, and this shared bus 12 includes, in addition to the user interface 3 and system interface 5,
The user processor 6 included in the target system 4 monitors the control state while executing the user program, and when the state reaches a preset state, executes the user program execution operation (emulation operation). A break control circuit 9 for breaking, a real-time trace circuit 10 for sequentially tracing and storing data, addresses, and control information given to the shared bus 12 when the user processor 6 is executing a user program are coupled to each other. be done.

【0017】上記システムインタフェース5は、上記共
有メモリ15と、インタフェース回路14とを含む。共
有メモリ15は、ホストコンピュータ7とユーザプロセ
ッサ6とでリード・ライト可能とされる。また、ホスト
コンピュータ7は、インタフェース回路14を介して上
記ブレークコントロール回路9とトレース回路10の制
御(ブレーク及びトレース条件の設定)が可能とされる
。上記ホストシステム2は、汎用目的コンピュータとし
てのホストコンピュータ7を中心に、ホストプログラム
や各種データを格納するためのメインメモリ30、キー
ボードなどの入力装置31、CRTディスプレイ装置な
どの表示装置32、そして磁気ディスク装置のような補
助記憶装置34などを有する。ホストコンピュータ7で
は、エミュレータ1ひいてはターゲットシステム4の制
御を、システムインタフェース5及びユーザインタフェ
ース3を介して可能とするデバッグ用プログラムが動作
される。
The system interface 5 includes the shared memory 15 and an interface circuit 14. The shared memory 15 is readable and writable by the host computer 7 and the user processor 6. Further, the host computer 7 can control the break control circuit 9 and the trace circuit 10 (setting break and trace conditions) via the interface circuit 14. The host system 2 includes a host computer 7 as a general-purpose computer, a main memory 30 for storing host programs and various data, an input device 31 such as a keyboard, a display device 32 such as a CRT display device, and a magnetic It has an auxiliary storage device 34 such as a disk device. The host computer 7 runs a debugging program that allows the emulator 1 and thus the target system 4 to be controlled via the system interface 5 and the user interface 3.

【0018】上記ターゲットシステム4は次のように構
成される。
The target system 4 is configured as follows.

【0019】ターゲットシステム4には、ASICとさ
れるユーザプロセッサ6、ターゲットメモリ8と、その
他種々の必要なハードウェアが搭載される。ターゲット
メモリ8には、ユーザアプリケーションを実現するため
のユーザプログラムの格納領域8A、ユーザデータの格
納領域8B、及びデバッグ用システムプログラムの格納
領域8Cが確保される。ここでデバッグ制御用のシステ
ムプログラムは、従来のエミュレータであれば、エミュ
レータ内に配置されたシステムメモリなどに格納される
のであるが、本実施例では、デバッグ用システムプログ
ラムが組み込まれたユーザプログラムを、ターゲットシ
ステムに搭載されたユーザプロセッサに実行させる関係
で、そのようなシステムプログラムがターゲットメモリ
8の所定の格納領域8Cに格納される。このような構成
により、ユーザプロセッサ6によりユーザプログラムが
実行され、そのときブレークコントロール回路9におい
て予め設定されたブレーク条件が成立した場合に、当該
ブレークコントロール回路9からのブレーク割り込みに
呼応してユーザプログラムの実行からシステムプログラ
ムの実行に移行される。
The target system 4 is equipped with a user processor 6, which is an ASIC, a target memory 8, and various other necessary hardware. The target memory 8 has a storage area 8A for a user program for realizing a user application, a storage area 8B for user data, and a storage area 8C for a debugging system program. In a conventional emulator, the system program for debug control is stored in the system memory located within the emulator, but in this embodiment, the system program for debugging is stored in the user program in which the system program for debugging is embedded. , such a system program is stored in a predetermined storage area 8C of the target memory 8 in order to be executed by a user processor installed in the target system. With this configuration, when a user program is executed by the user processor 6 and a break condition set in advance in the break control circuit 9 is satisfied, the user program is executed in response to a break interrupt from the break control circuit 9. is transferred from execution to system program execution.

【0020】上記エミュレータ1とターゲットシステム
4とは、インタフェースケーブル26によって結合され
、このインタフェースケーブル26の先端部には、図2
に示されるように、ターゲットシステム4にユーザプロ
セッサ6が結合された状態で、当該プロセッサ6のバス
11の状態を検出可能なCPUプローブ24が設けられ
ている。このCPUプローブ24は、それの低面部に、
ユーザプロセッサ6の本来のICソケット22に結合可
能な複数のピン25が設けられ、それによって当該IC
ソケット22に結合可能とされる。そして、このCPU
プローブ24の上面部には、上記ICソケット22と同
等のICソケット23が設けられ、それにユーザプロセ
ッサ6が結合可能とされる。ユーザプロセッサ6の全て
のリードは、CPUプローブ24のピン25を介してI
Cソケット22に導通されるとともに、インタフェース
ケーブル26を介して上記ユーザインタフェース3に導
通される。それによって、ターゲットシステム4にユー
ザプロセッサ6が結合された状態で、当該プロセッサ6
のバス11の状態がブレークコントロール回路9やトレ
ース回路10によって検出可能とされる。
The emulator 1 and the target system 4 are connected by an interface cable 26, and the tip of the interface cable 26 has a cable as shown in FIG.
As shown in FIG. 2, a CPU probe 24 is provided that can detect the state of the bus 11 of the user processor 6 connected to the target system 4. This CPU probe 24 has a
A plurality of pins 25 are provided which can be coupled to the original IC socket 22 of the user processor 6, thereby allowing the IC to
It can be coupled to the socket 22. And this CPU
An IC socket 23 equivalent to the above IC socket 22 is provided on the upper surface of the probe 24, and the user processor 6 can be connected to it. All leads of user processor 6 are connected to I through pin 25 of CPU probe 24.
It is electrically connected to the C socket 22 and also to the user interface 3 via the interface cable 26. Thereby, in a state where the user processor 6 is coupled to the target system 4, the processor 6 is connected to the target system 4.
The state of the bus 11 can be detected by the break control circuit 9 and the trace circuit 10.

【0021】図3には上記ターゲットシステム4におけ
るシステムプログラムの流れ、特に初期状態からエミュ
レーション実行(ユーザプログラム実行)の中断までの
一連の流れが示される。
FIG. 3 shows the flow of the system program in the target system 4, particularly the series of flows from the initial state to the interruption of emulation execution (user program execution).

【0022】リセットスタート(ステップ45)後、タ
ーゲットシステム4では、システムプログラムの実行が
開始されるが、ホストコンピュータ7によって共有メモ
リ15の所定の情報格納エリアとされるパケット(PA
CKET)に所定のコマンド(命令)が書き込まれるま
で待ち状態とされる(ステップ46)。このような状態
において、ホストシステム7側では、デバッグプログラ
ムが起動され、それにより、種々のデバッグコマンドの
実行が可能とされる。例えば、キーボードなどの入力装
置31からメモリダンプのコマンドが入力されると、ホ
ストコンピュータ7によって上記共有メモリ15のPA
CKETに、メモリリードのコマンドが設定される。そ
のようにして上記PACKETにコマンドが設定される
と、それまで待ち状態とされた上記ターゲットシステム
4では、PACKETに設定されたコマンドが、ユーザ
プログラムの実行コマンドであるか否かが判別される(
ステップ46、ステップ47)。例えば上記メモリダン
プ命令は、ユーザプログラムの実行命令ではないから、
上記ステップ47の判別では「N」と判断され、それに
よりターゲットシステム4では、上記PACKETに設
定されたコマンドであるメモリリードが実行される(ス
テップ48)。このメモリリード命令の実行によって、
読出されたデータは、共有メモリ15に書き込まれる。 するとホストコンピュータ7は、そのようにして共有メ
モリ15に書き込まれた情報を編集してCRTディスプ
レイ装置などの表示装置32に表示する。以上の説明で
は、メモリダンプのコマンドが入力装置31から与えら
れた場合を例にしたが、後述する、ユーザプログラムの
実行コマンドを除くその他のデバッグ用コマンドが入力
装置31から与えられた場合も、上記と同様にして、当
該コマンドの実行が可能とされる。
After the reset start (step 45), the target system 4 starts executing the system program, but the host computer 7 stores the packets (PA
A waiting state is entered until a predetermined command (instruction) is written to CKET (step 46). In this state, a debug program is activated on the host system 7 side, thereby making it possible to execute various debug commands. For example, when a memory dump command is input from the input device 31 such as a keyboard, the host computer 7
A memory read command is set in CKET. When a command is set in PACKET in this way, the target system 4, which has been in a waiting state until then, determines whether the command set in PACKET is an execution command of a user program (
Step 46, Step 47). For example, the above memory dump instruction is not a user program execution instruction, so
The determination in step 47 is "N", so that the target system 4 executes the memory read which is the command set in the PACKET (step 48). By executing this memory read instruction,
The read data is written to the shared memory 15. The host computer 7 then edits the information thus written into the shared memory 15 and displays it on the display device 32 such as a CRT display device. In the above explanation, the case where a memory dump command is given from the input device 31 is taken as an example, but the case where other debugging commands other than the user program execution command, which will be described later, is given from the input device 31 is also described. The command can be executed in the same manner as above.

【0023】次に、エミュレーションが実行され、その
実行が中断される場合について説明する。
Next, a case where emulation is executed and the execution is interrupted will be described.

【0024】ブレーク条件は入力装置31から設定する
ことがでる。すなわち入力装置31から所望のブレーク
条件が入力されると、ホストコンピュータ7によってそ
のブレーク条件が、ブレークコントロール回路9に設定
される。そのようにブレーク条件が設定された後、ホス
トコンピュータ7により、共有メモリ15内のPACK
ETに、ユーザプログラムの実行コマンドが設定される
と、それまで待ち状態とされた上記ターゲットシステム
4では、PACKETに設定されたコマンドが、ユーザ
プログラムの実行コマンドであるか否かが判別され(ス
テップ46、ステップ47)、その判別において、それ
がユーザプログラムの実行コマンドである(Y)と判断
された場合には、ユーザプロセッサ6において、ユーザ
プログラムの実行が開始される(ステップ49)。その
ようなユーザプログラム実行において、ブレークコント
ロール回路9は、ユーザインタフェース3を介してプロ
セッサバス11の状態を監視し、当該バス11の状態が
、予め設定されたブレーク条件と一致した場合には、ブ
レークレジスタBFLGに「1」を設定することにより
ブレーク状態に達したことを示すと共に、上記ユーザプ
ロセッサ6に対してブレーク割り込みを要求する。
Break conditions can be set from the input device 31. That is, when a desired break condition is input from the input device 31, the break condition is set in the break control circuit 9 by the host computer 7. After the break condition is set in this way, the host computer 7 stores the PACK in the shared memory 15.
When a user program execution command is set in ET, the target system 4, which has been in a waiting state until then, determines whether the command set in PACKET is a user program execution command (step 46, step 47), if it is determined that the command is a user program execution command (Y), execution of the user program is started in the user processor 6 (step 49). During execution of such a user program, the break control circuit 9 monitors the state of the processor bus 11 via the user interface 3, and if the state of the bus 11 matches a preset break condition, a break control circuit 9 executes a break. Setting the register BFLG to "1" indicates that a break state has been reached and requests the user processor 6 to issue a break interrupt.

【0025】上記ブレーク割り込みがユーザプロセッサ
6に受け付けられると、ユーザプログラムの実行が中断
され、システムプログラムの割り込み処理ルーチンへ移
行される(ステップ41)。この割り込み処理ルーチン
では、上記割り込みが、ブレークコントロール回路9か
らの割り込み要求に係るものなのか、またはユーザプロ
グラム実行におけるユーザシステム上の割り込み(ユー
ザ割り込みという)なのかを判別するため、上記ブレー
クコントロール回路9におけるブレークレジスタBFL
Gの内容がチェックされる。そのようなチェックは、ブ
レークレジスタBFLGに「1」が立てられているか否
かによって可能とされる。すなわち現在システムプログ
ラムを実行中のユーザプロセッサ6により上記ブレーク
コントロール回路9内のブレークレジスタBFLGに「
1」が立てられているか否かの判別が行われ(ステップ
42)、その判別において、ブレークレジスタBFLG
に「1」が立てられている(Y)と判断された場合には
、ブレーク割り込みについての所定のブレーク処理に移
行される(ステップ44)。特に制限されないが、ここ
にいうブレーク処理には、上記ブレーク時の状態を共有
メモリ15に書き込むための処理が含まれる。それによ
ってホストシステム2では、上記共有メモリ15に書き
込まれた情報を読み込み、それを表示装置32に表示す
ることができる。
When the break interrupt is accepted by the user processor 6, the execution of the user program is interrupted and the process proceeds to the interrupt processing routine of the system program (step 41). In this interrupt processing routine, in order to determine whether the above-mentioned interrupt is related to an interrupt request from the break control circuit 9 or an interrupt on the user system during user program execution (referred to as a user interrupt), the above-mentioned break control circuit Break register BFL at 9
The contents of G are checked. Such a check is possible depending on whether "1" is set in the break register BFLG. That is, the user processor 6, which is currently executing the system program, sets the break register BFLG in the break control circuit 9 to "
1" is set (step 42), and in this determination, break register BFLG is set.
If it is determined that ``1'' is set (Y), the process proceeds to a predetermined break process regarding the break interrupt (step 44). Although not particularly limited, the break processing herein includes processing for writing the state at the time of the break into the shared memory 15. Thereby, the host system 2 can read the information written in the shared memory 15 and display it on the display device 32.

【0026】また上記ステップ42の判別において、ブ
レークレジスタBFLGに「1」が立てられていない(
N)と判断された場合には、換言すればそれは、ブレー
クレジスタBFLGに「0」が設定されている場合には
、上記の割り込み要求がブレーク割り込みではなくユー
ザ割り込みとされるから、ユーザプログラムにおける所
定の割り込み処理ルーチンへ移行される(ステップ43
)。
In addition, in the determination at step 42, the break register BFLG is not set to "1" (
In other words, if the break register BFLG is set to "0", the above interrupt request is treated as a user interrupt rather than a break interrupt, so the user program A transition is made to a predetermined interrupt handling routine (step 43).
).

【0027】上記した実施例によれば、以下のような作
用効果を得ることができる。
According to the embodiment described above, the following effects can be obtained.

【0028】(1)デバッグ対象とされるユーザプログ
ラムにそれのデバッグ用システムプログラムを組み込み
、そのようなユーザプログラムを、ターゲットシステム
4に搭載されたユーザプロセッサ6に実行させるように
したので、エミュレータ1への評価用チップの搭載が不
要とされ、それにより、エミュレータ1の小型軽量化が
可能とされるとともに、低価格化が可能とされる。
(1) Since the system program for debugging is incorporated into the user program to be debugged, and such a user program is executed by the user processor 6 installed in the target system 4, the emulator 1 It is not necessary to mount an evaluation chip on the emulator 1, thereby making it possible to make the emulator 1 smaller and lighter, and also to reduce the price.

【0029】(2)上記(1)の作用効果により、特に
、CPUコアを共通として品種展開されるASICをタ
ーゲットとする場合においても、品種毎にそれ専用のエ
ミュレータを提供する必要がなく、同一構成のエミュレ
ータを用いることができるから、エミュレータの汎用性
が達成され、エミュレータの開発期間が大幅に短縮可能
とされ、さらに、ソフトウェアデバッグにおいてそのよ
うに安価なエミュレータを使用することによりターゲッ
トシステムのソフトウェアデバッグをより安価に行うこ
とができる。
(2) Due to the effect of (1) above, even when targeting ASICs that have a common CPU core and are developed in various types, there is no need to provide a dedicated emulator for each type, and the same Since it is possible to use an emulator with various configurations, the versatility of the emulator is achieved, and the development period of the emulator can be significantly shortened.Furthermore, by using such an inexpensive emulator in software debugging, the software of the target system can be improved. Debugging can be done more cheaply.

【0030】(3)上記のようにソフトウェアデバッグ
において、ユーザプロセッサとされる実チップを利用す
ることにより、動作タイミングなどが実際のシステムと
相違がなく、従って、評価チップを用いる場合に比して
ターゲットシステムのソフトウェアデバッグを忠実に行
うことができる。
(3) As mentioned above, by using a real chip as a user processor in software debugging, there is no difference in operation timing etc. from the actual system, and therefore, compared to the case where an evaluation chip is used, Software debugging of the target system can be performed faithfully.

【0031】(4)ターゲットシステム4のICソケッ
ト22に結合可能とされ、且つ、当該ターゲットシステ
ム4にユーザプロセッサ6が結合された状態で、当該プ
ロセッサ6のバス11の状態検出を可能とするCPUプ
ローブ24を用いることにより、ユーザシステム4に特
別な改造を施すことなく、ユーザプロセッサバス11の
状態検出が可能とされる。
(4) A CPU that can be connected to the IC socket 22 of the target system 4 and that can detect the state of the bus 11 of the user processor 6 when the user processor 6 is connected to the target system 4. By using the probe 24, the state of the user processor bus 11 can be detected without making any special modifications to the user system 4.

【0032】(5)ブレーク割り込みがユーザプロセッ
サ6に受け付けられると、ユーザプログラムの実行が中
断され、システムプログラムの割り込み処理ルーチンへ
移行され(ステップ41)、この割り込み処理ルーチン
において、上記割り込みが、ブレークコントロール回路
9からの割り込み要求に係るものなのか、またはユーザ
割り込みなのかが、ブレークコントロール回路9内のブ
レークレジスタBFLGの内容に基づいて判別される。 そのような判別において、ブレークレジスタBFLGに
「1」が立てられている(Y)と判断された場合にのみ
、ブレーク割り込みについての所定のブレーク処理に移
行されるので、ユーザプロセッサ6に、ブレーク割り込
み専用の端子などを設けることなく、ユーザ割り込みと
ブレーク割り込みとの判別が可能とされる。
(5) When the break interrupt is accepted by the user processor 6, the execution of the user program is interrupted and the transition is made to the interrupt handling routine of the system program (step 41). Based on the contents of the break register BFLG in the break control circuit 9, it is determined whether the interrupt request is related to an interrupt request from the control circuit 9 or a user interrupt. In such a determination, only if it is determined that the break register BFLG is set to "1" (Y), the transition is made to the predetermined break processing for the break interrupt. It is possible to distinguish between user interrupts and break interrupts without providing a dedicated terminal.

【0033】以上本発明者によってなされた発明を実施
例に基づいて具体的に説明したが、本発明はそれに限定
されるものではなく、その要旨を逸脱しない範囲におい
て種々変更可能であることは言うまでもない。
Although the invention made by the present inventor has been specifically explained based on examples, it goes without saying that the present invention is not limited thereto and can be modified in various ways without departing from the gist thereof. stomach.

【0034】例えば、ホストシステムに含まれる周辺装
置は上記実施例に限定されるものではなく、適宜のホス
トシステムを利用してエミュレーションシステムを構成
することができる。また、このホストシステムはエンジ
ニアリングワークステーションであってもよい。
For example, the peripheral devices included in the host system are not limited to those in the above embodiments, and an emulation system can be constructed using any appropriate host system. The host system may also be an engineering workstation.

【0035】以上の説明では主として本発明者によって
なされた発明をその背景となった利用分野である、AS
ICをターゲットとするソフトウェアデバッグについて
説明したが、本発明はそれに限定されるものではなく、
マイクロコンピュータを搭載する各種ユーザシステムの
ソフトウェアデバッグに適用することがでる。
[0035] The above explanation mainly describes the invention made by the present inventor, which is the field of application in which it is based.
Although software debugging targeting an IC has been described, the present invention is not limited thereto.
It can be applied to software debugging of various user systems equipped with microcomputers.

【0036】本発明は、少なくともユーザシステムの存
在を条件に適用できる。
The present invention can be applied on the condition that at least a user system exists.

【0037】[0037]

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

【0038】すなわち、デバッグ対象とされるユーザプ
ログラムにそれのデバッグ用システムプログラムを組み
込み、そのようなユーザプログラムを、ターゲットシス
テムに搭載されたユーザプロセッサに実行させるように
したので、エミュレータへの評価用チップの搭載が不要
とされ、それにより、エミュレータの低価格化、構成の
簡素化が可能とされ、エミュレータの汎用性が達成され
る。また、ソフトウェアデバッグにおいてそのようなエ
ミュレータを使用することによりターゲットシステムの
ソフトウェアデバッグをより安価に行うことができる。 そして、上記のようにソフトウェアデバッグにおいて実
チップを利用することにより、ターゲットシステムのソ
フトウェアデバッグを忠実に行うことができる。
That is, since the system program for debugging is incorporated into the user program to be debugged, and such a user program is executed by the user processor installed in the target system, the system program for evaluation by the emulator is It is not necessary to mount a chip, which makes it possible to lower the price of the emulator, simplify the configuration, and achieve versatility of the emulator. Further, by using such an emulator in software debugging, software debugging of a target system can be performed at a lower cost. By using the actual chip in software debugging as described above, software debugging of the target system can be performed faithfully.

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

【図1】図1は本発明の一実施例に係るエミュレーショ
ンシステムの構成ブロック図である。
FIG. 1 is a configuration block diagram of an emulation system according to an embodiment of the present invention.

【図2】図2は図1に示されるエミュレータとターゲッ
トシステムとを結合するためのCPUプローブが示され
る斜視図である。
FIG. 2 is a perspective view showing a CPU probe for coupling the emulator shown in FIG. 1 with a target system.

【図3】図3はエミュレーション動作の流れ図である。FIG. 3 is a flowchart of emulation operation.

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

1  エミュレータ 2  ホストシステム 3  ユーザインタフェース 4  ターゲットシステム 5  システムインタフェース 6  ユーザプロセッサ 7  ホストコンピュータ 8  ターゲットメモリ 9  ブレークコントロール回路 10  トレース回路 11  ユーザプロセッサバス 12  共有バス 14  インタフェース回路 15  共有メモリ 22  CPUソケット 23  CPUソケット 24  CPUプローブ 25  ピン 26  インタフェースケーブル 30  メインメモリ 31  入力装置 32  表示装置 34  補助記憶装置 1 Emulator 2 Host system 3 User interface 4 Target system 5 System interface 6 User processor 7. Host computer 8 Target memory 9 Break control circuit 10 Trace circuit 11 User processor bus 12 Shared bus 14 Interface circuit 15 Shared memory 22 CPU socket 23 CPU socket 24 CPU probe 25 pin 26 Interface cable 30 Main memory 31 Input device 32 Display device 34 Auxiliary storage device

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】  デバッグ用システムプログラムとユー
ザプログラムを、ターゲットシステムに搭載されるべき
実チップとしてのユーザプロセッサに実行させ、そのと
きの当該ユーザプロセッサのバスの状態をエミュレータ
で監視することにより上記ユーザプログラムのデバッグ
を可能とするデバッグ方式。
Claim 1: A system program for debugging and a user program are executed by a user processor as a real chip to be installed in a target system, and the state of the bus of the user processor at that time is monitored by an emulator. A debugging method that allows programs to be debugged.
【請求項2】上記デバッグ用システムプログラムには、
ユーザプログラムの実行状態が所定のブレーク条件と一
致したときに上記ユーザプロセッサに対してなされるブ
レーク割り込み要求と、ユーザプログラム実行における
ユーザシステム上の割り込み要求とを判別するステップ
と、このステップでの判断に基づいてそれぞれ対応する
所定の処理ルーチンに移行するステップとが含まれる請
求項1記載のデバッグ方式。
[Claim 2] The debugging system program includes:
a step of determining a break interrupt request made to the user processor when the execution state of the user program matches a predetermined break condition and an interrupt request on the user system during execution of the user program; and the determination in this step. 2. The debugging method according to claim 1, further comprising the step of transitioning to corresponding predetermined processing routines based on the respective predetermined processing routines.
【請求項3】  ターゲットシステムのICソケットに
結合可能とされ、且つ、当該ターゲットシステムにユー
ザプロセッサが結合された状態で、当該プロセッサが入
出力すべき情報の検出を可能とするCPUプローブと、
インタフェースケーブルを介して上記CPUプローブに
結合されたユーザインタフェースと、このユーザインタ
フェースを介して上記ユーザプロセッサのバス状態を監
視するとともに、当該バス状態が所定のブレーク条件と
一致した場合に上記ユーザプロセッサに対してブレーク
割り込みを要求するブレークコントロール回路とを含む
エミュレータ。
3. A CPU probe that is connectable to an IC socket of a target system and that is capable of detecting information to be input/output by the user processor when the user processor is connected to the target system;
A user interface is connected to the CPU probe via an interface cable, and the bus state of the user processor is monitored through this user interface, and when the bus state matches a predetermined break condition, the user interface is connected to the CPU probe. An emulator that includes a break control circuit that requests a break interrupt.
【請求項4】  上記ブレークコントロール回路からの
割り込み要求によって上記ユーザプロセッサをユーザプ
ログラムの実行状態からシステムプログラムの実行に移
行させるための割込み要因を保持する情報領域を更に有
する請求項3記載のエミュレータ。
4. The emulator according to claim 3, further comprising an information area that holds an interrupt factor for causing the user processor to transition from a user program execution state to a system program execution state in response to an interrupt request from the break control circuit.
JP3075785A 1991-03-15 1991-03-15 Debugging system and emulator Withdrawn JPH04287136A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3075785A JPH04287136A (en) 1991-03-15 1991-03-15 Debugging system and emulator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3075785A JPH04287136A (en) 1991-03-15 1991-03-15 Debugging system and emulator

Publications (1)

Publication Number Publication Date
JPH04287136A true JPH04287136A (en) 1992-10-12

Family

ID=13586216

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3075785A Withdrawn JPH04287136A (en) 1991-03-15 1991-03-15 Debugging system and emulator

Country Status (1)

Country Link
JP (1) JPH04287136A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06314215A (en) * 1993-04-28 1994-11-08 Nec Corp Tool for software evaluation

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06314215A (en) * 1993-04-28 1994-11-08 Nec Corp Tool for software evaluation

Similar Documents

Publication Publication Date Title
US6094730A (en) Hardware-assisted firmware tracing method and apparatus
US5132971A (en) In-circuit emulator
JPH011039A (en) In-circuit emulator
US7437283B2 (en) System for evaluating target board by using evaluation microcomputer in which storage of environment data are powered by evaluation tool
JPH04287136A (en) Debugging system and emulator
JPH06214819A (en) Information processor and system and method for evaluating the same
JPH0477833A (en) Integrated circuit provided with debugging environment
JP2005353020A (en) Simulation system for computer program
JPH0399334A (en) Program down loading type emulator
JP2001084161A (en) Data processor
JPH05173830A (en) Abnormal operation detecting method and emulator
JP2902861B2 (en) Buffer device with trace function
JP3110418B2 (en) In-circuit emulator and control method
JPS63271542A (en) Rom debugger
US7194401B2 (en) Configuration for in-circuit emulation of a program-controlled unit
JP3002282B2 (en) Emulation tester connection device
JPS61112250A (en) Data processing system
JP2954006B2 (en) Emulation device and emulation method
JPH04199336A (en) Microcomputer
JPS6091458A (en) Program debug device of microprocessor
JPH05189267A (en) Operation control system for microprocessor and emulator
JPH0477834A (en) In-circuit emulator
JPH09293000A (en) In-circuit emulator device
JPH03109649A (en) Emulator
JP2003223339A (en) In-circuit emulator

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19980514