JP2001084158A - Microprocessor and emulation system - Google Patents

Microprocessor and emulation system

Info

Publication number
JP2001084158A
JP2001084158A JP25877399A JP25877399A JP2001084158A JP 2001084158 A JP2001084158 A JP 2001084158A JP 25877399 A JP25877399 A JP 25877399A JP 25877399 A JP25877399 A JP 25877399A JP 2001084158 A JP2001084158 A JP 2001084158A
Authority
JP
Japan
Prior art keywords
emulation
central processing
processing unit
instruction
break
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP25877399A
Other languages
Japanese (ja)
Other versions
JP4084912B2 (en
Inventor
Tomoyoshi Ujii
呂圭 氏井
Giichi Aoto
義一 青砥
Hideya Fujita
秀哉 藤田
Hiroyuki Sasaki
宏幸 佐々木
Shigesumi Matsui
重純 松井
Tadashi Hashimoto
忠士 橋本
Hiroshi Kaneko
広 金子
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 Ltd
Original Assignee
Hitachi 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 filed Critical Hitachi Ltd
Priority to JP25877399A priority Critical patent/JP4084912B2/en
Publication of JP2001084158A publication Critical patent/JP2001084158A/en
Application granted granted Critical
Publication of JP4084912B2 publication Critical patent/JP4084912B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To improve the developing efficiency of a user system. SOLUTION: This microprocessor is provided with a control means 216D which asserts a fault signal for realizing the transition of a central processing unit (213) to an instruction waiting state after unstuck, and releases the instruction waiting state of the central processing unit when a request signal for the release of the instruction waiting state is asserted in the instruction waiting state of the central processing unit. The fault signal is asserted by the control means, and when the request signal for the release of the instruction waiting state is asserted in the instruction waiting state of the central processing unit, the instruction waiting state of the central processing unit is released. Thus, it is possible to improve the developing efficiency of the user system by synchronizing different microprocessors, and parallelizing emulation.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、マイクロコンピュ
ータ、さらにはそれにおけるシステムデバッグのための
エミュレーションシステムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer and an emulation system for system debugging in the microcomputer.

【0002】[0002]

【従来の技術】マイクロプロセッサ(マイクロコンピュ
ータ)応用機器の開発において、その応用システムのデ
バッグやそのシステムの詳細な評価を行うため、インサ
ーキットエミュレータが使用されている。インサーキッ
トエミュレータは、ソフトウェア開発用の親計算機と、
開発中のターゲットシステムとの間に接続され、そのタ
ーゲットシステムに含まれるマイクロプロセッサ(ター
ゲットプロセッサ)の機能を代行する一方でデバッガと
しての機能をもち、詳細なシステムデバッグを支援す
る。かかるエミュレータは、その本体から延長されたケ
ーブルの先端が、ターゲットプロセッサ用ソケットなど
の接栓を介してターゲットシステムに結合可能とされ、
さらに、エミュレーション実行中に各種データやステー
タス信号などを実時間でサンプリングし、それをトレー
スメモリ部などに格納する実時間トレース機能やエミュ
レーション動作を実質的に停止させるブレーク機能など
の各種デバッグ機能を備える。
2. Description of the Related Art In the development of microprocessor (microcomputer) application equipment, an in-circuit emulator is used to debug an application system and to evaluate the system in detail. The in-circuit emulator consists of a parent computer for software development,
It is connected to the target system under development and acts as a debugger while taking over the functions of the microprocessor (target processor) included in the target system, and supports detailed system debugging. In such an emulator, the end of a cable extended from the main body can be coupled to a target system via a plug such as a socket for a target processor,
In addition, various debugging functions such as a real-time tracing function that samples various data and status signals in real time during emulation execution and stores them in a trace memory unit, etc., and a break function that substantially stops emulation operation are provided. .

【0003】また、実チップでありながら、ソフトウェ
アの実行状態をリアルタイムにトレースするための機能
や、デバッグのために内蔵RAM(ランダム・アクセス
・メモリ)に対するデータのリード/ライトを可能とす
るオンチップデバッグ機能を備えたマイクロコンピュー
タが提供されている。ここで、実チップとは、ユーザシ
ステムに実際に搭載されるCPUを指し、エミュレーシ
ョンにおける必要情報を外部出力可能に構成されたエミ
ュレーション用チップと区別される。
In addition, an on-chip function for tracing the execution state of software in real time, and for reading / writing data from / in a built-in RAM (random access memory) for debugging, while being a real chip. A microcomputer having a debugging function is provided. Here, the real chip refers to a CPU actually mounted on the user system, and is distinguished from an emulation chip configured to output necessary information in emulation to the outside.

【0004】尚、エミュレータの動作について記載され
た文献の例としては、1989年6月20日に電波新聞
社から発行された「マイコン開発のすべて(第78頁か
ら第95頁)」がある。
As an example of a document describing the operation of the emulator, there is "All about microcomputer development (pages 78 to 95)" issued by Denpa Shimbun on June 20, 1989.

【0005】[0005]

【発明が解決しようとする課題】ユーザシステムによっ
ては、処理能力の向上を図るため、複数のCPU(中央
処理装置)が搭載されることがある。従来のエミュレー
ションにおいては、基本的に一つのCPU毎に1台のエ
ミュレータが必要とされているため、例えば2個のCP
Uが搭載されるユーザシステムにおいては、基本的には
2台のエミュレータが必要とされる。
In some user systems, a plurality of CPUs (central processing units) may be mounted in order to improve the processing capability. In the conventional emulation, basically, one emulator is required for each CPU.
In a user system in which U is mounted, basically two emulators are required.

【0006】しかしながら、2個のCPUが搭載される
ユーザシステムに、2台のエミュレータを繋いだとして
も、2個のCPU相互間の同期がとれていないために、
同時にエミュレーション実行することはできない。つま
り、ユーザシステムに2台のエミュレータを繋いだとし
ても、一方のエミュレーション中は、他方のエミュレー
タにおいてターゲットプログラムの実行が停止される
が、あるいは、一方のエミュレーション中は、他方のC
PUソケットには実チップを装着するようにしていた。
However, even if two emulators are connected to a user system equipped with two CPUs, the two CPUs are not synchronized with each other.
Emulation cannot be performed at the same time. In other words, even if two emulators are connected to the user system, the execution of the target program is stopped in the other emulator during one emulation, or the other C emulator is stopped during the one emulation.
An actual chip was mounted on the PU socket.

【0007】上記のように2個のCPUが搭載されるユ
ーザシステムのエミュレーションにおいては、例え2台
のエミュレータを繋いだとしても、別々にエミュレーシ
ョンしなければならないため、ユーザシステムの開発効
率の向上が妨げられた。
In the emulation of a user system equipped with two CPUs as described above, even if two emulators are connected, the emulation must be performed separately, thereby improving the development efficiency of the user system. Was hindered.

【0008】本発明の目的は、ユーザシステムの開発効
率の向上を図るための技術を提供することにある。
An object of the present invention is to provide a technique for improving the development efficiency of a user system.

【0009】本発明の別の目的は、複数のCPUを有す
るユーザシステムのエミュレーションにおいてターゲッ
トプログラムの同時実行を可能とするための技術を提供
することにある。
Another object of the present invention is to provide a technique for enabling simultaneous execution of target programs in emulation of a user system having a plurality of CPUs.

【0010】本発明の前記並びにその他の目的と新規な
特徴は本明細書の記述及び添付図面から明らかになるで
あろう。
The above and other objects and novel features of the present invention will become apparent from the description of the present specification and the accompanying drawings.

【0011】[0011]

【課題を解決するための手段】本願において開示される
発明のうち代表的なものの概要を簡単に説明すれば下記
の通りである。
The following is a brief description of an outline of a typical invention among the inventions disclosed in the present application.

【0012】すなわち、ユーザプログラム実行中にブレ
ーク条件が成立することにより、ブレークモードに遷移
するためのスタック処理を行い、ブレークモードにおい
てブレークモードから復帰するための復帰命令を実行す
ることでユーザモードへ遷移するためのアンスタック処
理を行う中央処理装置と、上記アンスタック後に、上記
中央処理装置を命令待ち状態に遷移させるためのフォル
ト信号をアサートし、上記中央処理装置の命令待ち状態
で、その命令待ち状態の解除要求信号がアサートされる
ことにより、上記中央処理装置の命令待ち状態を解除す
る制御手段とを含んでマイクロプロセッサを構成する。
That is, when a break condition is satisfied during execution of a user program, stack processing for transitioning to the break mode is performed, and a return instruction for returning from the break mode is executed in the break mode, thereby returning to the user mode. A central processing unit for performing an unstack process for transition, and asserting a fault signal for causing the central processing unit to transition to an instruction waiting state after the unstacking, and in the instruction waiting state of the central processing unit, The microprocessor includes a control unit for releasing the instruction waiting state of the central processing unit when the waiting state release request signal is asserted.

【0013】上記の手段によれば、制御手段は、フォル
ト信号をアサートし、上記中央処理装置の命令待ち状態
で、その命令待ち状態の解除要求信号がアサートされる
ことにより、上記中央処理装置の命令待ち状態を解除す
る。このことが、異なるマイクロプロセッサを同期化さ
せ、エミューションの並列化によりユーザシステムの開
発効率の向上を達成する。
According to the above means, the control means asserts the fault signal, and in the instruction waiting state of the central processing unit, the release request signal of the instruction waiting state is asserted, whereby the central processing unit is controlled. Release the instruction waiting state. This synchronizes different microprocessors and achieves an improvement in user system development efficiency by emulation parallelization.

【0014】また、ユーザプログラム実行中にブレーク
条件が成立することにより、ブレークモードに遷移する
ためのスタック処理を行い、ブレークモードにおいてブ
レークモードから復帰するための復帰命令を実行するこ
とでユーザモードへ遷移するためのアンスタック処理を
行う中央処理装置と、上下関係の判別フラグを記憶する
ための判別フラグ記憶手段と、上記判別フラグ記憶手段
に記憶されている判別フラグの状態が上位を示す場合、
マイクロプロセッサの外部に出力される命令待ち状態の
解除要求信号を上記アンスタック処理後にアサートする
第1制御手段と、上記判別フラグ記憶手段に記憶されて
いる判別フラグの状態が下位を示す場合、上記アンスタ
ック後に、上記中央処理装置を命令待ち状態に遷移させ
るためのフォルト信号をアサートし、上記中央処理装置
の命令待ち状態で、その解除要求信号がアサートされる
ことにより、上記中央処理装置の命令待ち状態を解除す
る第2制御手段とを含んでマイクロプロセッサを構成す
る。
Further, when a break condition is satisfied during execution of the user program, a stack process for transitioning to the break mode is performed, and a return instruction for returning from the break mode is executed in the break mode, thereby returning to the user mode. A central processing unit that performs an unstacking process for transition, a discrimination flag storage unit that stores a discrimination flag of a vertical relation, and a case where the state of the discrimination flag stored in the discrimination flag storage unit indicates a higher order
When the state of the first control means for asserting the instruction-waiting state release request signal output to the outside of the microprocessor after the unstack processing and the state of the discrimination flag stored in the discrimination flag storage means indicate lower, After unstacking, a fault signal for causing the central processing unit to transition to the instruction waiting state is asserted, and in the instruction waiting state of the central processing unit, the release request signal is asserted, whereby the instruction of the central processing unit is asserted. And a second control unit for canceling the waiting state.

【0015】上記の手段によれば、第2制御手段は、フ
ォルト信号をアサートし、上記中央処理装置の命令待ち
状態で、その命令待ち状態の解除要求信号をアサートす
ることにより、上記中央処理装置の命令待ち状態を解除
する。このことが、異なるマイクロプロセッサを同期化
させ、エミューションの並列化によりユーザシステムの
開発効率の向上を達成する。
According to the above-mentioned means, the second control means asserts a fault signal, and in the instruction waiting state of the central processing unit, asserts a signal for requesting release of the instruction waiting state. Cancel the instruction wait state. This synchronizes different microprocessors and achieves an improvement in user system development efficiency by emulation parallelization.

【0016】このとき、外部からのバスリクエスト又は
バス開放要求に応じて、上記中央処理装置を命令実行待
ち状態に遷移させるためのフォルト信号をアサートする
バスコントローラと、上記バスコントローラからのフォ
ルト信号と上記フォルト制御回路からのフォルト信号と
の論理和を得てそれを上記中央処理装置に供給するゲー
ト回路とを設けることができる。
At this time, a bus controller for asserting a fault signal for causing the central processing unit to transition to an instruction execution waiting state in response to a bus request or a bus release request from the outside, and a fault signal from the bus controller. A gate circuit which obtains a logical sum of the fault signal from the fault control circuit and supplies the logical sum to the central processing unit can be provided.

【0017】そしてそのようなマイクロプロセッサと、
エミュレータ本体とを含んでエミュレーションシステム
を構成する。
And such a microprocessor,
An emulation system is configured including the emulator body.

【0018】[0018]

【発明の実施の形態】図5には本発明にかかるエミュレ
ーションシステムの全体的な構成例が示される。
FIG. 5 shows an example of the overall configuration of an emulation system according to the present invention.

【0019】図5に示されるようにこのエミュレーショ
ンシステムは、特に制限されないが、ユーザシステム5
1に搭載された第1エミュレーションプロセッサ511
及び第2エミュレーションプロセッサ512、エミュー
レータ本体52、及び制御コンピュータ53とを含む。
As shown in FIG. 5, this emulation system is not particularly limited, but the user system 5
1st emulation processor 511 mounted on 1
And the second emulation processor 512, the emulator main body 52, and the control computer 53.

【0020】ユーザシステム51は、2個のCPUソケ
ットを有し、それぞれCPUが装着される。第1エミュ
レーションプロセッサ511及び第2エミュレーション
プロセッサ512は、基本的には、当該ユーザシステム
51に本来搭載される実チップと同等の機能を有すると
ともに、内部バス情報の外部出力が可能に構成されたエ
ミュレーション用チップとされる。
The user system 51 has two CPU sockets, each of which is equipped with a CPU. The first emulation processor 511 and the second emulation processor 512 have basically the same functions as the real chip originally mounted on the user system 51, and are configured to enable external output of internal bus information. Chip.

【0021】第1エミュレーションプロセッサ511及
び第2エミュレーションプロセッサ512とも、当該チ
ップをシステムボードに搭載した状態でのデバッグを可
能とするオンチップデバッグ機能を有する。特に、第1
エミュレーションプロセッサ511は、その近傍に設け
られたコネクタ513及びそれに結合されたケーブル5
24を介してエミュレータ本体52に接続されることに
より、上記オンチップデバッグ機能によるデバッグが行
われるようになっている。また、第2エミュレーション
プロセッサ512の外部端子はユーザシステム51のC
PUソケットを介してユーザシステムに結合されるとと
もに、ケーブル525を介してエミュレータ本体52に
結合される。これにより、第2エミュレーションプロセ
ッサ512のエミュレーション情報をエミュレータ本体
52において収集することができる。制御コンピュータ
53は、特に制限されないが、パーソナルコンピュータ
とされ、ケーブル516を介してエミュレータ本体52
に結合されることにより、このエミュレータ本体52と
の間で、エミュレーションに関する各種制御情報や収集
データのやり取りが可能とされる。
Both the first emulation processor 511 and the second emulation processor 512 have an on-chip debugging function that enables debugging while the chip is mounted on a system board. In particular, the first
The emulation processor 511 includes a connector 513 provided in the vicinity thereof and a cable 5 coupled thereto.
By being connected to the emulator main body 52 through the emulator 24, debugging by the above-mentioned on-chip debugging function is performed. The external terminal of the second emulation processor 512 is connected to the C of the user system 51.
It is coupled to the user system via the PU socket and to the emulator main body 52 via the cable 525. Thus, the emulation information of the second emulation processor 512 can be collected in the emulator main body 52. Although not particularly limited, the control computer 53 is a personal computer, and is connected to the emulator main body 52 via a cable 516.
, Exchange of various control information and collected data relating to emulation with the emulator main body 52 is enabled.

【0022】図1には、上記エミュレータ本体52の構
成例が示される。
FIG. 1 shows an example of the configuration of the emulator main body 52.

【0023】図1に示されるように、このエミュレータ
本体52は、特に制限されないが、互いに異なるエミュ
レーション機能として、インサーキットエミュレーショ
ン(ICE)機能と、オンチップデバッグ機能とを有す
る。ICE機能はICE機能ブロックによって実現され
る。このICE機能ブロックは、コントロールCPU1
1、ブレーク回路12、トレース回路13、モニタ回路
14、ファームRAM(ランダム・アクセス・メモリ)
15、パフォーマンス回路16とを含む。そして、オン
チップデバッグ機能は、コントロールCPU11やオン
チップコントローラ17によって実現される。
As shown in FIG. 1, the emulator main body 52 has, although not particularly limited, emulation functions different from each other, such as an in-circuit emulation (ICE) function and an on-chip debugging function. The ICE function is realized by the ICE function block. This ICE function block includes a control CPU 1
1, break circuit 12, trace circuit 13, monitor circuit 14, firmware RAM (random access memory)
15 and a performance circuit 16. The on-chip debugging function is realized by the control CPU 11 and the on-chip controller 17.

【0024】コントロールCPU11は、コントロール
バス23を介してブレーク回路12、トレース回路1
3、モニタ回路14、ファームRAM15、及びパフォ
ーマンス回路16、及びオンチップコントローラ17に
結合され、それらに対して各種情報のやり取りが可能と
される。また、第2エミュレーションプロセッサ512
は、エミュレーションバス24を介してブレーク回路1
2、トレース回路13、モニタ回路14、ファームRA
M15、及びパフォーマンス回路16に結合され、第2
エミュレーションプロセッサ512のエミュレーション
動作における各種情報の収集等が可能とされる。オンチ
ップコントローラ17は、信号線25を介して第1エミ
ュレーションプロセッサ511に結合され、後述する所
定の通信プロトコルに従って各種情報のやり取りが可能
とされる。
The control CPU 11 controls the break circuit 12 and the trace circuit 1 via a control bus 23.
3. It is coupled to the monitor circuit 14, the firmware RAM 15, the performance circuit 16, and the on-chip controller 17 so that various kinds of information can be exchanged therewith. Also, the second emulation processor 512
Is connected to the break circuit 1 via the emulation bus 24.
2, trace circuit 13, monitor circuit 14, firmware RA
M15, and the second
It is possible to collect various information in the emulation operation of the emulation processor 512. The on-chip controller 17 is connected to the first emulation processor 511 via a signal line 25, and can exchange various information according to a predetermined communication protocol described later.

【0025】ブレーク回路12は、エミュレーションバ
ス24の状態を監視してその状態が予め設定されている
状態に到達したときにエミュレーション動作をブレーク
する。トレース回路13は、エミュレーションバス24
に与えられるデータやアドレスさらには制御情報を逐次
トレースして蓄える。モニタ回路14は、制御コンピュ
ータ53からインタフェース21を介してエミュレーシ
ョンバス24をモニタを可能とするために設けられてい
る。ファームRAM15は、第2エミュレーションプロ
セッサ512で実行されるプログラムを格納するために
設けられる。パフォーマンス回路16は、上記トレース
情報に基づいて第2エミュレーションプロセッサ512
の性能測定、例えば実行時間の測定などを行うために設
けられる。
The break circuit 12 monitors the state of the emulation bus 24, and breaks the emulation operation when the state reaches a preset state. The trace circuit 13 includes an emulation bus 24
Are sequentially traced and stored. The monitor circuit 14 is provided to enable the control computer 53 to monitor the emulation bus 24 via the interface 21. The firmware RAM 15 is provided to store a program executed by the second emulation processor 512. The performance circuit 16 performs the second emulation processor 512 based on the trace information.
It is provided to measure performance of, for example, measurement of execution time.

【0026】オンチップコントローラ17は、コントロ
ールCPU11の制御下で、第1エミュレーションプロ
セッサ511のオンチップデバッグを可能とするブロッ
クであり、次のように構成される。
The on-chip controller 17 is a block that enables on-chip debugging of the first emulation processor 511 under the control of the control CPU 11, and is configured as follows.

【0027】図2には上記オンチップコントローラ17
の構成例が示される。
FIG. 2 shows the on-chip controller 17.
Is shown.

【0028】図2に示されるように、上記オンチップコ
ントローラ17は、JTAGにおける各種信号を出力す
るためのJTAGコントローラ170、バスコントロー
ラ176、及びクロック発生回路177を有する。上記
JTAGコントローラ170は、JTAGにおける各種
信号を出力するためのバッファ171〜174及びレジ
スタ175を有する。クロック発生回路177は、基本
周波数のクロック信号を発生させるための発振器と、発
生されたクロックを適宜に分周することにより、元の周
波数とは異なる周波数のクロック信号を生成する分周回
路を含む。このクロック発生回路177から出力された
クロック信号はバッファ174を介することによりTC
Kとして第1エミュレーションプロセッサ511に伝達
される。出力データTDoがバッファ171を介してバ
スコントローラ176に伝達され、また、テストロジッ
クに対して命令やデータをシリアル入力する信号TD
i、テスト動作を制御する信号TMS、テストロジック
に供給されるクロック信号TCK、コントローラを初期
化するためのリセット信号TRSTがそれぞれバッファ
172,173、レジスタ175を介して出力される。
バスコントローラ176は、上記バッファ171,17
2,173、及びレジスタ175と、コントロールバス
23との間での信号のやり取りを可能にする。
As shown in FIG. 2, the on-chip controller 17 has a JTAG controller 170 for outputting various signals in JTAG, a bus controller 176, and a clock generation circuit 177. The JTAG controller 170 has buffers 171 to 174 and a register 175 for outputting various signals in JTAG. Clock generation circuit 177 includes an oscillator for generating a clock signal of a fundamental frequency, and a frequency dividing circuit for generating a clock signal of a frequency different from the original frequency by appropriately dividing the generated clock. . The clock signal output from the clock generation circuit 177 is transmitted to the TC
It is transmitted to the first emulation processor 511 as K. The output data TDo is transmitted to the bus controller 176 via the buffer 171, and a signal TD for serially inputting an instruction or data to the test logic is output.
i, a signal TMS for controlling the test operation, a clock signal TCK supplied to the test logic, and a reset signal TRST for initializing the controller are output via buffers 172 and 173 and a register 175, respectively.
The bus controller 176 includes the buffers 171 and 17
2, 173, and the register 175, and signals can be exchanged between the control bus 23.

【0029】特に制限されないが、第1エミュレーショ
ンプロセッサ511と第2エミュレーションプロセッサ
512とは互いに同一構成とされる。
Although not particularly limited, the first emulation processor 511 and the second emulation processor 512 have the same configuration.

【0030】図3には第1エミュレーションプロセッサ
511(512)の構成例が示される。
FIG. 3 shows a configuration example of the first emulation processor 511 (512).

【0031】図3に示されるように、この第1エミュレ
ーションプロセッサ511(512)は、CPU21
3、RAM212、シリアルデバッグインタフェース2
11、周辺モジュール215、及びエミュレーションバ
スコントローラ216を含む。
As shown in FIG. 3, the first emulation processor 511 (512)
3, RAM 212, serial debug interface 2
11, a peripheral module 215, and an emulation bus controller 216.

【0032】CPU213により所定のプログラムが実
行されるとき、RAM212は、その演算処理の作業領
域として機能される。シリアルデバッグインタフェース
211は、エミュレータ本体52におけるオンチップコ
ントローラ17に結合されることによって、シリアルデ
ータのやり取りを可能とする。
When a predetermined program is executed by the CPU 213, the RAM 212 functions as a work area for the arithmetic processing. The serial debug interface 211 is connected to the on-chip controller 17 in the emulator main body 52 to enable the exchange of serial data.

【0033】バスコントローラ214が設けられ、CP
U213と周辺モジュール215との間のウェイト制御
や、CPU213と外部モジュールとの間のウェイト制
御が行われる。特に制限されないが、上記周辺モジュー
ル215には、外部装置との間のシリアル通信を可能と
するシリアルコミュニケーションインタフェースや、時
間測定のためのタイマー、CPU213の介在なしにデ
バイス間のデータ転送を可能にするダイレクトメモリア
クセスコントローラなどが含まれる。
A bus controller 214 is provided.
Weight control between the U 213 and the peripheral module 215 and weight control between the CPU 213 and the external module are performed. Although not particularly limited, the peripheral module 215 enables a serial communication interface that enables serial communication with an external device, a timer for measuring time, and enables data transfer between devices without the intervention of the CPU 213. It includes a direct memory access controller and the like.

【0034】上記シリアルデバッグインタフェース21
1Dは、通信用モジュール211A、ファームRAM2
11B、ブレーク回路211C、及びトレースバッファ
211Dを含む。通信モジュール211Aは、外部装置
との間でオンチップデバッグのための通信を行う。ファ
ームRAM211Bには、CPU213で実行される各
種プログラムが保持される。ブレーク回路211Cは、
予め設定されたブレーク条件が成立したか否かを判別す
る。トレースバッファ211Dは、CPU213でのプ
ログラム実行状態をトレースする。
The serial debug interface 21
1D is a communication module 211A, a firmware RAM 2
11B, a break circuit 211C, and a trace buffer 211D. The communication module 211A performs communication for on-chip debugging with an external device. Various programs executed by the CPU 213 are stored in the firmware RAM 211B. The break circuit 211C is
It is determined whether a preset break condition has been satisfied. The trace buffer 211D traces a program execution state of the CPU 213.

【0035】また、エミュレーションコントローラ21
6は、内部バス218とエミュレーションバス24とに
結合され、エミュレーションに関する各種制御を行う。
特に制限されないが、エミュレーションコントローラ2
16は、上位/下位レジスタ216A、ブレークスタッ
クレジスタ216B、ブレーク制御回路216C、及び
フォルト制御回路216Dを含む。上位/下位レジスタ
216Aは、それが含まれるエミュレーションプロセッ
サが他のエミュレーションプロセッサとの関係で上位で
あるのか下位であるのかを判別するためのフラグ情報が
保持される。特に制限されないが、図1においては、エ
ミュレーションバス24に結合されるエミュレーション
プロセッサ511が上位とされ、オンチップコントロー
ラ17に結合されるエミュレーションプロセッサ512
が下位とされる。上位と下位との違いは、ブレークモー
ドからユーザモードへの復帰命令の実行によるアンスタ
ック完了後の状態において大きく相違する。これについ
ては後に詳述する。
The emulation controller 21
6 is connected to the internal bus 218 and the emulation bus 24, and performs various controls related to emulation.
Although not particularly limited, the emulation controller 2
16 includes an upper / lower register 216A, a break stack register 216B, a break control circuit 216C, and a fault control circuit 216D. The upper / lower register 216A holds flag information for determining whether the emulation processor containing it is higher or lower in relation to other emulation processors. Although not particularly limited, in FIG. 1, the emulation processor 511 coupled to the emulation bus 24 is ranked higher and the emulation processor 512 coupled to the on-chip controller 17.
Is the lower order. The difference between the upper order and the lower order is largely different in the state after the completion of the unstacking by executing the return instruction from the break mode to the user mode. This will be described later in detail.

【0036】ブレークスタックレジスタ216Bは、ブ
レーク条件が成立してCPU213の状態がユーザモー
ドからブレークモードに移行する際に、そのときのレジ
スタ(EXR,CCR)やプログラムカウンタ(PC)
等の値を保持する。
When the break condition is satisfied and the state of the CPU 213 shifts from the user mode to the break mode, the break stack register 216B stores the register (EXR, CCR) and program counter (PC) at that time.
And so on.

【0037】ブレーク制御回路216Cは、ブレーク制
御信号の入出力制御を行う。ブレーク制御信号には、ブ
レーク割り込み要求信号、ブレークアクノリッジ信号な
どがある。ブレーク割り込みはローアクティブとされ、
それがアクティブにされると、ブレーク制御回路216
CによってCPU213へのブレーク割り込みが行われ
る。このブレーク割り込みにより、ブレーク処理が行わ
れ、そのときのレジスタ(EXR,CCR)やプログラ
ムカウンタ(PC)等の値がブレークスタックレジスタ
216Bに保持される。ブレーク割り込みによりCPU
213がブレークモードに移行すると、ブレーク制御回
路216Cによりブレークアクノリッジ信号がローレベ
ルにされることで、ブレークモードになったことが示さ
れる。ブレークアクノリッジ信号はブレークモード期間
中ローレベルであり、ブレークからの復帰(RTB)命
令のスタック終了後にハイレベルにされる。つまり、ブ
レークモードは、専用の復帰(RTB)命令を実行する
ことにより解除され、それによりブレークモードからユ
ーザモードに遷移される。
The break control circuit 216C controls input / output of a break control signal. The break control signal includes a break interrupt request signal, a break acknowledge signal, and the like. The break interrupt is set to low active,
When it is activated, the break control circuit 216
C causes a break interrupt to the CPU 213. A break process is performed by this break interrupt, and the values of the registers (EXR, CCR) and the program counter (PC) at that time are held in the break stack register 216B. CPU by break interrupt
When 213 shifts to the break mode, the break control circuit 216C sets the break acknowledge signal to low level, indicating that the break mode has been set. The break acknowledge signal is at a low level during the break mode, and is set to a high level after the end of the stack of the return from break (RTB) instruction. That is, the break mode is released by executing a dedicated return (RTB) instruction, and the mode is changed from the break mode to the user mode.

【0038】また、バスコントローラ214から第1フ
ォルト信号FLT1が出力され、エミュレーションコン
トローラ216からは第2フォルト信号FLT2が出力
される。この第1フォルト信号FLT1と第2フォルト
信号FLT2とのオア論理がオアゲート217で得ら
れ、そのオア論理がCPU213に伝達されるようにな
っている。
A first fault signal FLT1 is output from the bus controller 214, and a second fault signal FLT2 is output from the emulation controller 216. The OR logic of the first fault signal FLT1 and the second fault signal FLT2 is obtained by the OR gate 217, and the OR logic is transmitted to the CPU 213.

【0039】上記第1フォルト信号FLT1は、上記バ
スコントローラ214に対して、マイクロプロセッサの
外部からバスリクエストあるいは他のバスマスタからの
バス解放要求があり、バス権調停の結果、バス権を解放
すべき場合には、バスコントローラ214によってハイ
レベルにアサートされる。第1フォルト信号FLT1が
ハイレベルにアサートされることにより、CPU213
は、第1フォルトFLT1がハイレベルにアサートされ
た場合に、内部状態(プログラムカウンタ等の値)を保
持したまま、命令の実行が停止される(フォルト状
態)。これによりバスがCPU213から開放される。
The first fault signal FLT1 has a bus request from the outside of the microprocessor or a bus release request from another bus master to the bus controller 214. As a result of bus arbitration, the bus right should be released. In this case, it is asserted high by the bus controller 214. When the first fault signal FLT1 is asserted to a high level, the CPU 213
When the first fault FLT1 is asserted to the high level, the execution of the instruction is stopped while maintaining the internal state (the value of the program counter or the like) (fault state). This releases the bus from the CPU 213.

【0040】また、上記第2フォルト信号FLT2は、
上位/下位レジスタ216のフラグ状態に応じてフォル
ト制御回路216Dによって制御される。つまり、上位
/下位レジスタ216のフラグ状態がローレベルとさ
れ、当該エミュレーションプロセッサが下位とされる場
合には、ブレークモードからの復帰命令がCPU213
で実行された後にフォルト制御回路216Dによって第
2フォルト信号FLT2がハイレベルにアサートされ
る。これにより、CPU213においては、第1フォル
トFLT1がハイレベルにアサートされた場合と同様
に、内部状態(プログラムカウンタ等の値)を保持した
まま、命令の実行が停止される(フォルト状態)。この
フォルト状態は、エミュレーションコントローラ216
の外部から与えられるフォルト解除要求信号がローレベ
ルにアサートされることにより、第2フォルト信号FL
T2がローレベルにネゲートされまで維持される。つま
り、エミュレーションコントローラ216の外部から与
えられたフォルト解除要求信号がローレベルにアサート
されると、フォルト制御回路216Dは、第2フォルト
信号FLT2をローレベルにネゲートする。これによ
り、CPU213のフォルト状態が解除される。フォル
ト制御回路216Dにおけるこのような制御機能が、本
発明における第2制御手段に対応する。
The second fault signal FLT2 is
It is controlled by the fault control circuit 216D according to the flag state of the upper / lower register 216. That is, when the flag state of the upper / lower register 216 is set to the low level and the emulation processor is set to the lower level, the CPU 213 issues a return instruction from the break mode.
After that, the second fault signal FLT2 is asserted to a high level by the fault control circuit 216D. As a result, in the CPU 213, as in the case where the first fault FLT1 is asserted to the high level, the execution of the instruction is stopped while maintaining the internal state (the value of the program counter or the like) (fault state). This fault condition indicates that the emulation controller 216
Is asserted to a low level, the second fault signal FL
It is maintained until T2 is negated to a low level. That is, when the fault release request signal given from outside the emulation controller 216 is asserted to a low level, the fault control circuit 216D negates the second fault signal FLT2 to a low level. Thereby, the fault state of the CPU 213 is released. Such a control function in the fault control circuit 216D corresponds to the second control means in the present invention.

【0041】それに対して、上位/下位レジスタ216
Aのフラグ状態がハイレベルとされ、当該エミュレーシ
ョンプロセッサが上位とされる場合には、フォルト制御
回路216Dは、第2フォルト信号FLT2をアサート
すること無しに、外部に対して別のCPUに対するフォ
ルト解除要求信号をアサートする。フォルト制御回路2
16Dにおけるこの制御機能が、本発明における第1制
御手段に対応する。
On the other hand, the upper / lower register 216
When the flag state of A is set to the high level and the emulation processor is set to the higher level, the fault control circuit 216D externally releases the fault to another CPU without asserting the second fault signal FLT2. Assert the request signal. Fault control circuit 2
This control function in 16D corresponds to the first control means in the present invention.

【0042】図4には通信用モジュール211Aの構成
例が示される。
FIG. 4 shows a configuration example of the communication module 211A.

【0043】図4に示されるように、通信用モジュール
211Aは、JTAG対応のTAPコントローラ211
A−1、入力レジスタ211A−2、及び出力レジスタ
211A−3を含んで成る。TAPコントローラ211
A−1には、テストロジックに供給されるクロック信号
TCK、コントローラを初期化するためのリセット信号
TRST、及びテスト動作を制御する信号TMSが入力
される。TAPコントローラ211−A1は、入力され
る命令の解析及びそれに基づく入出力制御を行う。入力
レジスタ211A−2及び出力レジスタ211A−3
は、特に制限されないが、32ビット構成のシフトレジ
スタとされ、それぞれシリアル形式で取り込まれた信号
TDi,TDoをシフトする。
As shown in FIG. 4, the communication module 211A is a JTAG-compatible TAP controller 211.
A-1, an input register 211A-2, and an output register 211A-3. TAP controller 211
A-1 receives a clock signal TCK supplied to the test logic, a reset signal TRST for initializing the controller, and a signal TMS for controlling a test operation. The TAP controller 211-A1 analyzes input commands and performs input / output control based on the analysis. Input register 211A-2 and output register 211A-3
Although not particularly limited, is a shift register having a 32-bit configuration, and shifts the signals TDi and TDo fetched in serial form, respectively.

【0044】次に、ブレークモードからユーザモードへ
の復帰について詳述する。
Next, the return from the break mode to the user mode will be described in detail.

【0045】図6には、第1エミュレーションプロセッ
サ511、及び第2エミュレーションプロセッサ512
において、ブレークモードからユーザモードへの復帰ま
での手順が示される。また、図7にはその場合の主要部
の動作タイミングが示される。
FIG. 6 shows a first emulation processor 511 and a second emulation processor 512
5 shows a procedure from the break mode to the return to the user mode. FIG. 7 shows the operation timing of the main part in that case.

【0046】第1エミュレーションプロセッサ511は
下位レベルのプロセッサ、第2エミュレーションプロセ
ッサ512は上位レベルのプロセッサとされる。
The first emulation processor 511 is a lower-level processor, and the second emulation processor 512 is an upper-level processor.

【0047】第1エミュレーションプロセッサ511に
おいて、ファームRAM211Bに保持されているプロ
グラムが実行されている期間において、ブレークモード
からの復帰(RTB)命令が実行されることにより、プ
ログラムカウンタ(PC)などのアンスタックが行われ
る(S711,S721)。このアンスタックにおいて
上位/下位レジスタ216のフラグ状態がチェックされ
る。第1エミュレーションプロセッサ511は下位レベ
ルのプロセッサとされるため、上位/下位レジスタ21
6のフラグ状態はローレベルとされている。これによ
り、第2フォルト信号FLT2がハイレベルにアサート
され、第1エミュレーションプロセッサ511における
CPU213はフォルト(次命令待ち)状態とされる。
つまり、上記ステップS712のプログラムカウンタ
(PC)などのアンスタックが行われにもかかわらず、
ユーザモードにおける最初の命令の実行待ち状態とされ
る。この状態は、上位レベルのプロセッサである第2エ
ミュレーションプロセッサ512からフォルト解除要求
がなされるまで続く。
In the first emulation processor 511, while the program stored in the firmware RAM 211B is being executed, the return (RTB) instruction from the break mode is executed, so that the program counter (PC) and the like are unloaded. Stacking is performed (S711, S721). In this unstack, the flag state of the upper / lower register 216 is checked. Since the first emulation processor 511 is a lower-level processor, the upper / lower register 21
The flag state of No. 6 is at a low level. As a result, the second fault signal FLT2 is asserted to a high level, and the CPU 213 in the first emulation processor 511 is placed in a fault (waiting for the next instruction) state.
That is, despite the unstacking of the program counter (PC) and the like in step S712,
The execution state of the first instruction in the user mode is awaited. This state continues until a fault release request is made from the second emulation processor 512, which is a higher-level processor.

【0048】一方、第2エミュレーションプロセッサ5
12において、ファームRAM15(図1参照)に保持
されているプログラムが実行されている期間において、
ブレークモードからの復帰(RTB)命令が実行される
ことにより、プログラムカウンタ(PC)などのアンス
タックが行われる(S721,S722)。このアンス
タックにおいて上位/下位レジスタ216のフラグ状態
がチェックされる。第2エミュレーションプロセッサ5
12は上位レベルのプロセッサとされるため、上位/下
位レジスタ216のフラグ状態はハイレベルとされてい
る。これにより、エミュレーションコントローラ216
によってフォルト解除要求信号がローレベルにアサート
されることで、第1エミュレーションプロセッサ511
のフォルト状態の解除要求がなされる(S723)。こ
の解除要求後、第2エミュレーションプロセッサ512
はユーザプログラムの実行に遷移する。
On the other hand, the second emulation processor 5
At 12, during the period when the program stored in the firmware RAM 15 (see FIG. 1) is being executed,
By executing the return from break mode (RTB) instruction, unstacking of the program counter (PC) and the like is performed (S721, S722). In this unstack, the flag state of the upper / lower register 216 is checked. Second emulation processor 5
Since 12 is an upper level processor, the flag state of the upper / lower register 216 is at a high level. Thereby, the emulation controller 216
When the fault release request signal is asserted to a low level, the first emulation processor 511
Is issued (S723). After this release request, the second emulation processor 512
Transitions to the execution of the user program.

【0049】ここで、上記ローレベルのフォルト解除要
求信号が第1エミュレーションプロセッサ511に伝達
されると、第1エミュレーションプロセッサ511で
は、エミュレーションコントローラ216内のフォルト
制御回路216Dにより第2フォルト信号FLT2がロ
ーレベルにネゲートされる。これによりフォルト状態が
解除され、CPU213によりユーザプログラムの実行
が開始される。
Here, when the low-level fault release request signal is transmitted to the first emulation processor 511, the first emulation processor 511 sets the second fault signal FLT2 low by the fault control circuit 216D in the emulation controller 216. Negated to level. As a result, the fault state is released, and the CPU 213 starts executing the user program.

【0050】上記の例によれば以下の作用効果を得るこ
とができる。
According to the above example, the following functions and effects can be obtained.

【0051】(1)下位レベルである第1エミュレーシ
ョンプロセッサ511がブレークモードからの復帰(R
TB)命令を実行した後にフォルト状態になり、上位レ
ベルである第2エミュレーションプロセッサ512から
のフォルト解除要求(S723)がなされることで、第
1エミュレーションプロセッサ511のフォルト状態が
解除されることにより、第1エミュレーションプロセッ
サ511と第2エミュレーションプロセッサ512とは
互いに同期される。つまり、ブレークモードにおいて非
同期処理が行われていても、ブレークモードからの復帰
後のユーザプログラムの実行開始時点で第1エミュレー
ションプロセッサ511と第2エミュレーションプロセ
ッサ512とは同期処理が行われる。このため、第1エ
ミュレーションプロセッサ511と第2エミュレーショ
ンプロセッサ512とを同時に実行してエミュレーショ
ンすることができるので、ユーザプログラムの開発効率
の向上を図ることができる。
(1) When the first emulation processor 511 at the lower level returns from the break mode (R
TB) After executing the instruction, a fault state occurs, and a fault release request (S723) is issued from the second emulation processor 512, which is an upper level, so that the fault state of the first emulation processor 511 is released. The first emulation processor 511 and the second emulation processor 512 are synchronized with each other. That is, even if asynchronous processing is performed in the break mode, the first emulation processor 511 and the second emulation processor 512 perform synchronous processing at the time of starting execution of the user program after returning from the break mode. For this reason, since the first emulation processor 511 and the second emulation processor 512 can be simultaneously executed and emulated, the development efficiency of the user program can be improved.

【0052】(2)エミュレータ本体52は、一つでよ
く、ICE用エミュレータ、及びオンチップデバッグ用
エミュレータとして別個に用意する必要が無い。
(2) The emulator main body 52 may be one, and there is no need to separately prepare an emulator for ICE and an emulator for on-chip debugging.

【0053】別の構成例について説明する。Another configuration example will be described.

【0054】図8に示されるように、オンチップデバッ
グ用エミュレータ本体85と、エミュレータ本体86と
を別々に構成しても良い。オンチップデバッグ用エミュ
レータ本体85は、基本的には、図1におけるオンチッ
プコントローラ17、コントロールCPU11、及びイ
ンタフェース21等が含まれるが、ブレーク回路12、
トレース回路13、モニタ回路14、ファームRAM1
5、及びパフォーマンス回路16などのICE機能実現
ブロックは含まれない。エミュレータ本体86には、図
1におけるブレーク回路12、トレース回路13、モニ
タ回路14、ファームRAM15、パフォーマンス回路
16、コントロールCPU11、及びインタフェース2
1などのICE機能実現ブロックが含まれるが、オンチ
ップコントローラ17は含まれない。下位マイクロプロ
セッサ側エミュレータ85には制御コンピュータ81が
接続され、上位マイクロプロセッサ側エミュレータ86
には制御コンピュータ82が接続される。
As shown in FIG. 8, the on-chip debug emulator main body 85 and the emulator main body 86 may be configured separately. The on-chip debug emulator main body 85 basically includes the on-chip controller 17, the control CPU 11, the interface 21 and the like in FIG.
Trace circuit 13, monitor circuit 14, firmware RAM1
5 and the ICE function realization block such as the performance circuit 16 are not included. The emulator main body 86 includes a break circuit 12, a trace circuit 13, a monitor circuit 14, a firmware RAM 15, a performance circuit 16, a control CPU 11, and an interface 2 in FIG.
1, but the on-chip controller 17 is not included. The control computer 81 is connected to the lower microprocessor side emulator 85, and the upper microprocessor side emulator 86.
Is connected to a control computer 82.

【0055】また、図9に示されるように、二つのマイ
クロプロセッサ511,512ともエミュレーションバ
スを介してエミュレーションを行うようにしても良い。
この場合、エミュレータ本体85,86は、それぞれ図
1におけるブレーク回路12、トレース回路13、モニ
タ回路14、ファームRAM15、パフォーマンス回路
16、コントロールCPU11、及びインタフェース2
1などのICE機能実現ブロックが含まれる。
As shown in FIG. 9, the two microprocessors 511 and 512 may perform emulation via an emulation bus.
In this case, the emulator bodies 85 and 86 correspond to the break circuit 12, the trace circuit 13, the monitor circuit 14, the firmware RAM 15, the performance circuit 16, the control CPU 11, and the interface 2 in FIG.
1 and the like.

【0056】図10に示されるように、一つのマイクロ
プロセッサパッケージの中に、図3に示されるマイクロ
プロセッサが二つ設けられる場合がある。かかる場合に
も、本発明を適用することができる。この場合、エミュ
レータ本体52は、二つのマイクロプロセッサに対応し
てICE機能実現ブロックが設けられる。
As shown in FIG. 10, there are cases where two microprocessors shown in FIG. 3 are provided in one microprocessor package. In such a case, the present invention can be applied. In this case, the emulator main body 52 is provided with ICE function realization blocks corresponding to the two microprocessors.

【0057】さらに、図11に示されるように、一つの
マイクロプロセッサパッケージの中に二つのマイクロプ
ロセッサが設けられている場合に、シリアルデバッグイ
ンタフェースによってエミュレータ本体との信号のやり
取りを行うように構成することができる。この場合、エ
ミュレータ本体52においては、オンチップコントロー
ラ17等が2系統設けられる。
Further, as shown in FIG. 11, when two microprocessors are provided in one microprocessor package, signals are exchanged with the emulator main body by a serial debug interface. be able to. In this case, in the emulator main body 52, two systems of the on-chip controller 17 and the like are provided.

【0058】図12に示されるように、第1エミュレー
ションプロセッサ511、第2エミュレーションプロセ
ッサ512と、エミュレータ本体512との接続関係を
切り換可能にしても良い。すなわち、コントロール回路
18を設け、エミュレーションバス24を、第1エミュ
レーションプロセッサ511と第2エミュレーションプ
ロセッサ512との何れに接続するかはコントロール回
路18によって制御される。セレクタ(SEL)19が
設けられ、オンチップコントローラ17が選択的に第1
エミュレーションプロセッサ511や第1エミュレーシ
ョンプロセッサ512に接続される。上記セレクタ19
は、コントロール回路18によって動作制御される。コ
ントロール回路18の制御下で第1エミュレーションプ
ロセッサ511とエミュレーションバス24との間のデ
ータのやり取りが可能とされるとき、第2エミュレーシ
ョンプロセッサ512は、エミュレーションバス24か
ら切り放される。このとき、コントロール回路18の制
御によりセレクタ19を介して第2エミュレーションプ
ロセッサ512がオンチップコントローラ17に結合さ
れることにより、第2エミュレーションプロセッサ51
2におけるオンチップデバッグが可能とされる。同様
に、コントロール回路18の制御下で第2エミュレーシ
ョンプロセッサ512とエミュレーションバス24との
間のデータのやり取りが可能とされるとき、第1エミュ
レーションプロセッサ511は、エミュレーションバス
24から切り放される。このとき、コントロール回路1
8の制御によりセレクタ19を介して第1エミュレーシ
ョンプロセッサ511がオンチップコントローラ17に
結合されることにより、第1エミュレーションプロセッ
サ511におけるオンチップデバッグが可能とされる。
As shown in FIG. 12, the connection relationship between the first emulation processor 511, the second emulation processor 512, and the emulator main body 512 may be made switchable. That is, the control circuit 18 is provided, and to which of the first emulation processor 511 and the second emulation processor 512 the emulation bus 24 is connected is controlled by the control circuit 18. A selector (SEL) 19 is provided, and the on-chip controller 17 selectively
It is connected to the emulation processor 511 and the first emulation processor 512. The above selector 19
Is controlled by the control circuit 18. When data can be exchanged between the first emulation processor 511 and the emulation bus 24 under the control of the control circuit 18, the second emulation processor 512 is disconnected from the emulation bus 24. At this time, the second emulation processor 512 is coupled to the on-chip controller 17 via the selector 19 under the control of the control circuit 18 so that the second emulation processor 51
2 enables on-chip debugging. Similarly, when data can be exchanged between the second emulation processor 512 and the emulation bus 24 under the control of the control circuit 18, the first emulation processor 511 is disconnected from the emulation bus 24. At this time, the control circuit 1
By coupling the first emulation processor 511 to the on-chip controller 17 via the selector 19 under the control of 8, the on-chip debugging in the first emulation processor 511 is enabled.

【0059】3個以上のマイクロプロセッサを有する場
合においても、本発明を適用することができる。つま
り、3個以上のマイクロプロセッサにおける一つを上位
に設定し、その他の全てのマイクロプロセッサを下位に
設定することにより、上記した例の場合と同様の作用効
果を得ることができる。
The present invention can be applied to a case having three or more microprocessors. That is, by setting one of the three or more microprocessors to the higher order and setting all the other microprocessors to the lower order, the same operation and effect as in the above-described example can be obtained.

【0060】また、フォルト状態の解除要求信号はコン
トロールCPU11から発生させるようにしても良い。
図13には、その場合の構成例が示される。この場合、
3個のマイクロプロセッサ511,512,513のす
べてがフォルトされた後に、コントロールCPU11か
ら3個のマイクロプロセッサ511,512,513に
供給されるフォルト解除要求信号がアサートされるよう
に構成することができる。これにより、3個のマイクロ
プロセッサ511,512,513は、同時にフォルト
状態が解除され、ユーザプログラムの同期実行が可能と
される。図14にはこの場合の具体的な構成が示され
る。第3エミュレーションプロセッサ513に対応し
て、それのオンチップデバッグを可能とするためのオン
チップコントローラ141が設けられる。フォルト解除
要求信号は、個々のエミュレーションプロセッサ51
1,512,513ではなく、コントロールCPU11
によって形成される。
The release request signal for the fault state may be generated from the control CPU 11.
FIG. 13 shows a configuration example in that case. in this case,
After all of the three microprocessors 511, 512, and 513 are faulted, a fault release request signal supplied from the control CPU 11 to the three microprocessors 511, 512, and 513 can be configured to be asserted. . As a result, the three microprocessors 511, 512, and 513 are simultaneously released from the fault state, and the synchronous execution of the user program is enabled. FIG. 14 shows a specific configuration in this case. An on-chip controller 141 for enabling on-chip debugging of the third emulation processor 513 is provided. The fault release request signal is sent to each emulation processor 51
Control CPU 11 instead of 1, 512, 513
Formed by

【0061】以上本発明者によってなされた発明を具体
的に説明したが、本発明はそれに限定されるものではな
く、その要旨を逸脱しない範囲で種々変更可能であるこ
とはいうまでもない。
Although the invention made by the present inventor has been specifically described above, the present invention is not limited to this, and it goes without saying that various modifications can be made without departing from the gist of the invention.

【0062】以上の説明では主として本発明者によって
なされた発明をその背景となった利用分野であるマイク
ロプロセッサに適用した場合について各種データ処理装
置に広く適用することができる。
In the above description, mainly the case where the invention made by the present inventor is applied to a microprocessor, which is the field of application as the background, can be widely applied to various data processing devices.

【0063】本発明は、少なくともCPUを含むことを
条件に適用することができる。
The present invention can be applied on condition that at least a CPU is included.

【0064】[0064]

【発明の効果】すなわち、アンスタック後に中央処理装
置を命令待ち状態に遷移させるためのフォルト信号をア
サートし、上記中央処理装置の命令待ち状態で、その命
令待ち状態の解除要求信号がアサートされることによ
り、上記中央処理装置の命令待ち状態を解除する制御手
段とを含んでマイクロプロセッサが構成されることによ
り、中央処理装置の命令待ち状態で、その命令待ち状態
の解除要求信号がアサートされて上記中央処理装置の命
令待ち状態が解除される。それにより、異なるマイクロ
プロセッサを同期化させ、エミューションの並列化によ
りユーザシステムの開発効率の向上を図ることができ
る。
That is, a fault signal for causing the central processing unit to transition to the instruction waiting state after unstacking is asserted, and in the instruction waiting state of the central processing unit, the instruction waiting state release request signal is asserted. Accordingly, the microprocessor is configured to include the control means for canceling the instruction waiting state of the central processing unit, so that the instruction waiting state cancel request signal is asserted in the instruction waiting state of the central processing unit. The instruction waiting state of the central processing unit is released. Thereby, different microprocessors can be synchronized, and the parallelization of emulation can improve the development efficiency of the user system.

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

【図1】本発明にかかるエミュレーションシステムにお
けるエミュレータ本体の構成例ブロック図である。
FIG. 1 is a block diagram illustrating a configuration example of an emulator main body in an emulation system according to the present invention.

【図2】上記エミュレータ本体に含まれるオンチップコ
ントローラ17の構成例ブロック図である。
FIG. 2 is a block diagram illustrating a configuration example of an on-chip controller 17 included in the emulator body.

【図3】上記エミュレーションシステムで使用されるエ
ミュレーションプロセッサの構成例ブロック図である。
FIG. 3 is a block diagram illustrating a configuration example of an emulation processor used in the emulation system.

【図4】上記エミュレーションプロセッサに含まれる通
信用モジュールの構成例ブロック図である。
FIG. 4 is a block diagram illustrating a configuration example of a communication module included in the emulation processor.

【図5】上記エミュレーションシステムの全体的な構成
例説明図である。
FIG. 5 is an explanatory diagram of an overall configuration example of the emulation system.

【図6】上記エミュレーションプロセッサにおけるブレ
ークモードからユーザモードへの復帰までのフローチャ
ートである。
FIG. 6 is a flowchart showing a process from the break mode to the return to the user mode in the emulation processor.

【図7】上記エミュレーションプロセッサにおけるブレ
ークモードからユーザモードへの復帰までのタイミング
図である。
FIG. 7 is a timing chart from the break mode to the return to the user mode in the emulation processor.

【図8】上記エミュレーションシステムの別の構成例説
明図である。
FIG. 8 is an explanatory diagram of another configuration example of the emulation system.

【図9】上記エミュレーションシステムの別の構成例説
明図である。
FIG. 9 is an explanatory diagram of another configuration example of the emulation system.

【図10】上記エミュレーションシステムの別の構成例
説明図である。
FIG. 10 is an explanatory diagram of another configuration example of the emulation system.

【図11】上記エミュレーションシステムの別の構成例
説明図である。
FIG. 11 is an explanatory diagram of another configuration example of the emulation system.

【図12】上記エミュレーションシステムの別の構成例
におけるエミュレータ本体の構成例ブロック図である。
FIG. 12 is a block diagram illustrating a configuration example of an emulator main body in another configuration example of the emulation system.

【図13】上記エミュレーションシステムの別の構成例
説明図である。
FIG. 13 is an explanatory diagram of another configuration example of the emulation system.

【図14】上記エミュレーションシステムの別の構成例
におけるエミュレータ本体の構成例ブロック図である。
FIG. 14 is a block diagram showing a configuration example of an emulator main body in another configuration example of the emulation system.

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

11 コントロールCPU 12 ブレーク回路 13 トレース回路 14 モニタ回路 15 ファームRAM 16 パフォーマンス回路 17 オンチップコントローラ 18 コントロール回路 19 セレクタ 21 インタフェース 23 コントロールバス 24 エミュレーションバス 211 シリアルデバッグインタフェース 211A 通信用モジュール 211B ファームRAM 211C ブレーク回路 211D トレースバッファ 212 RAM 213 CPU 214 バスコントローラ 215 周辺モジュール 216 エミュレーションコントローラ 216A 上位/下位レジスタ 216B ブレークスタックレジスタ 216C ブレーク制御回路 216D フォルト制御回路 217 オアゲート 511 第1エミュレーションプロセッサ 512 第2エミュレーションプロセッサ Reference Signs List 11 control CPU 12 break circuit 13 trace circuit 14 monitor circuit 15 firmware RAM 16 performance circuit 17 on-chip controller 18 control circuit 19 selector 21 interface 23 control bus 24 emulation bus 211 serial debug interface 211A communication module 211B firmware RAM 211C break circuit 211D Trace buffer 212 RAM 213 CPU 214 Bus controller 215 Peripheral module 216 Emulation controller 216A Upper / lower register 216B Break stack register 216C Break control circuit 216D Fault control circuit 217 OR gate 511 First emulation processor 512 Second emulation Activation processor

───────────────────────────────────────────────────── フロントページの続き (72)発明者 藤田 秀哉 東京都小平市上水本町五丁目20番1号 株 式会社日立製作所半導体グループ内 (72)発明者 佐々木 宏幸 東京都小平市上水本町五丁目20番1号 株 式会社日立製作所半導体グループ内 (72)発明者 松井 重純 東京都小平市上水本町五丁目20番1号 株 式会社日立製作所半導体グループ内 (72)発明者 橋本 忠士 東京都小平市上水本町五丁目20番1号 株 式会社日立製作所半導体グループ内 (72)発明者 金子 広 東京都小平市上水本町五丁目20番1号 株 式会社日立製作所半導体グループ内 Fターム(参考) 5B042 HH03 HH25 HH30 LA07 MC03 MC08 5B048 AA11 BB02  ──────────────────────────────────────────────────続 き Continuing on the front page (72) Hideya Fujita, Inventor 5--20-1, Kamimizuhoncho, Kodaira-shi, Tokyo Within the Semiconductor Group, Hitachi, Ltd. 20-1 chome, Hitachi, Ltd., Semiconductor Group (72) Inventor Shigesumi Matsui 5-2-1, Josuihoncho, Kodaira-shi, Tokyo Co., Ltd. Within the Hitachi, Ltd. Semiconductor Group (72) Inventor Tadashi Hashimoto Tokyo Hitachi, Ltd. Semiconductor Group Co., Ltd. (72) Inventor Hiroshi Kaneko 5-2-1, Josuihoncho, Kodaira-shi, Tokyo F-term within Hitachi Semiconductor Group, 5-2-1, Josuihoncho, Kodaira-shi, Tokyo (Reference) 5B042 HH03 HH25 HH30 LA07 MC03 MC08 5B048 AA11 BB02

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 ユーザプログラム実行中にブレーク条件
が成立することにより、ブレークモードに遷移するため
のスタック処理を行い、ブレークモードにおいてブレー
クモードから復帰するための復帰命令を実行することで
ユーザモードへ遷移するためのアンスタック処理を行う
中央処理装置と、 上記アンスタック後に、上記中央処理装置を命令待ち状
態に遷移させるためのフォルト信号をアサートし、上記
中央処理装置の命令待ち状態で、その命令待ち状態の解
除要求信号がアサートされることにより、上記中央処理
装置の命令待ち状態を解除する制御手段と、を含むこと
を特徴とするマイクロプロセッサ。
When a break condition is satisfied during execution of a user program, a stack process for transitioning to the break mode is performed, and a return instruction for returning from the break mode is executed in the break mode to enter the user mode. A central processing unit for performing an unstack process for making a transition; asserting a fault signal for causing the central processing unit to transition to an instruction waiting state after the unstacking; Control means for releasing the instruction waiting state of the central processing unit by asserting the waiting state release request signal.
【請求項2】 ユーザプログラム実行中にブレーク条件
が成立することにより、ブレークモードに遷移するため
のスタック処理を行い、ブレークモードにおいてブレー
クモードから復帰するための復帰命令を実行することで
ユーザモードへ遷移するためのアンスタック処理を行う
中央処理装置と、を有するマイクロプロセッサであっ
て、 上下関係の判別フラグを記憶するための判別フラグ記憶
手段と、 上記判別フラグ記憶手段に記憶されている判別フラグの
状態が上位を示す場合、上記マイクロプロセッサの外部
に出力される命令待ち状態の解除要求信号を上記アンス
タック処理後にアサートする第1制御手段と、上記判別
フラグ記憶手段に記憶されている判別フラグの状態が下
位を示す場合、上記アンスタック後に、上記中央処理装
置を命令待ち状態に遷移させるためのフォルト信号をア
サートし、上記中央処理装置の命令待ち状態で、その解
除要求信号がアサートされることにより、上記中央処理
装置の命令待ち状態を解除する第2制御手段と、を含む
ことを特徴とするマイクロプロセッサ。
2. When a break condition is satisfied during execution of a user program, a stack process for transitioning to the break mode is performed, and a return instruction for returning from the break mode is executed in the break mode to enter the user mode. A central processing unit for performing an unstack process for making a transition, comprising: a determination flag storage unit configured to store a determination flag of a vertical relationship; and a determination flag stored in the determination flag storage unit. If the state of the instruction indicates a higher order, first control means for asserting, after the unstack processing, an instruction waiting state release request signal output to the outside of the microprocessor, and a discrimination flag stored in the discrimination flag storage means If the status indicates lower, after the above unstacking, the central processing unit is ordered. A second control unit for asserting a fault signal for causing a transition to a wait state, and releasing the instruction wait state of the central processing unit by asserting a release request signal in the instruction wait state of the central processing unit; And a microprocessor.
【請求項3】 外部からのバスリクエスト又はバス開放
要求に応じて、上記中央処理装置を命令実行待ち状態に
遷移させるためのフォルト信号をアサートするバスコン
トローラと、 上記バスコントローラからのフォルト信号と、上記フォ
ルト制御回路からのフォルト信号との論理和を得てそれ
を上記中央処理装置に供給するゲート回路と、を含む請
求項2記載のマイクロプロセッサ。
3. A bus controller for asserting a fault signal for causing the central processing unit to transition to an instruction execution wait state in response to a bus request or a bus release request from outside, a fault signal from the bus controller, 3. The microprocessor according to claim 2, further comprising: a gate circuit that obtains a logical sum of a fault signal from the fault control circuit and supplies the logical sum to the central processing unit.
【請求項4】 複数のプロセッサと、ターゲットプログ
ラムを上記プロセッサで実行させることにより当該ター
ゲットプログラムのデバッグを可能とするエミュレータ
本体とを含むエミュレーションシステムにおいて、 上記プロセッサとして、請求項2又は3記載のマイクロ
プロセッサを適用して成ることを特徴とするエミュレー
ションシステム。
4. An emulation system comprising: a plurality of processors; and an emulator main body that enables a target program to be debugged by executing the target program on the processor, wherein the micro processor according to claim 2 or 3 is used as the processor. An emulation system characterized by applying a processor.
【請求項5】 エミュレータ本体は、互いに方式が異な
る複数のエミュレーション機能の実現ブロックと、上記
複数のエミュレーション機能を選択的に上記マイクロプ
ロセッサに割り当てるための選択手段とを含むことを特
徴とするエミュレーションシステム。
5. The emulation system according to claim 1, wherein the emulator main body includes a plurality of emulation function realization blocks having different schemes, and a selection unit for selectively assigning the plurality of emulation functions to the microprocessor. .
JP25877399A 1999-09-13 1999-09-13 Microprocessor system Expired - Fee Related JP4084912B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25877399A JP4084912B2 (en) 1999-09-13 1999-09-13 Microprocessor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25877399A JP4084912B2 (en) 1999-09-13 1999-09-13 Microprocessor system

Publications (2)

Publication Number Publication Date
JP2001084158A true JP2001084158A (en) 2001-03-30
JP4084912B2 JP4084912B2 (en) 2008-04-30

Family

ID=17324891

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25877399A Expired - Fee Related JP4084912B2 (en) 1999-09-13 1999-09-13 Microprocessor system

Country Status (1)

Country Link
JP (1) JP4084912B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009539186A (en) * 2006-05-31 2009-11-12 ケイデンス デザイン システムズ インコーポレイテッド Method and apparatus for synchronizing processors of a hardware emulation system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009539186A (en) * 2006-05-31 2009-11-12 ケイデンス デザイン システムズ インコーポレイテッド Method and apparatus for synchronizing processors of a hardware emulation system

Also Published As

Publication number Publication date
JP4084912B2 (en) 2008-04-30

Similar Documents

Publication Publication Date Title
KR0168656B1 (en) Data processing system
EP1153348B1 (en) On-chip debug system
US7644310B2 (en) Semiconductor IC incorporating a co-debugging function and test system
JP4335999B2 (en) Semiconductor integrated circuit device with built-in processor
EP3369015B1 (en) Methods and circuits for debugging circuit designs
JPH07182204A (en) Integrated microprocessor, computer development system and test method of integrated processor
GB2266606A (en) A microprocessor with an external command mode for diagnosis and debugging
KR20040019451A (en) Embedded controller capable of backing up operating states of a peripheral device in the real time
JPH08212100A (en) Emulation chip for single-chip microcomputer
JP2008507025A (en) Emulation and debug interface for integrated circuit testing
JP3003782B2 (en) Development support equipment
US7231568B2 (en) System debugging device and system debugging method
US6973607B2 (en) Method and apparatus for testing electronic components
JP2001084158A (en) Microprocessor and emulation system
US9581643B1 (en) Methods and circuits for testing partial circuit designs
TWI541646B (en) Debugging system and control method thereof
JP2001249823A (en) Microcomputer development assisting device
JP2011028308A (en) Semiconductor device and software development support device
JP2017010432A (en) IC chip
JP2001350648A (en) Microcomputer
TWI774116B (en) Automatic detection circuit for integrated circuit and automatic detection method for the same
SINHA STUDY OF AMBA PROTOCOL AND VERIFICATION IPs
Ueda et al. Automated system level functional test program generation on ATE from EDA using Functional Test Abstraction
JP2002268911A (en) Development support device for electronic computer
JP2632891B2 (en) System development equipment

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040326

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040329

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20051130

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060404

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060605

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070403

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070604

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20080205

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080218

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110222

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110222

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110222

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110222

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120222

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130222

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140222

Year of fee payment: 6

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees