JP4084912B2 - Microprocessor system - Google Patents

Microprocessor system Download PDF

Info

Publication number
JP4084912B2
JP4084912B2 JP25877399A JP25877399A JP4084912B2 JP 4084912 B2 JP4084912 B2 JP 4084912B2 JP 25877399 A JP25877399 A JP 25877399A JP 25877399 A JP25877399 A JP 25877399A JP 4084912 B2 JP4084912 B2 JP 4084912B2
Authority
JP
Japan
Prior art keywords
break
emulation
microprocessor
mode
control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP25877399A
Other languages
Japanese (ja)
Other versions
JP2001084158A (en
Inventor
呂圭 氏井
義一 青砥
秀哉 藤田
宏幸 佐々木
重純 松井
忠士 橋本
広 金子
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.)
Renesas Technology Corp
Original Assignee
Renesas Technology Corp
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 Renesas Technology Corp filed Critical Renesas Technology Corp
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

Images

Description

【0001】
【発明の属する技術分野】
本発明は、マイクロコンピュータ、さらにはそれにおけるシステムデバッグのためのエミュレーションシステムに関する。
【0002】
【従来の技術】
マイクロプロセッサ(マイクロコンピュータ)応用機器の開発において、その応用システムのデバッグやそのシステムの詳細な評価を行うため、インサーキットエミュレータが使用されている。インサーキットエミュレータは、ソフトウェア開発用の親計算機と、開発中のターゲットシステムとの間に接続され、そのターゲットシステムに含まれるマイクロプロセッサ(ターゲットプロセッサ)の機能を代行する一方でデバッガとしての機能をもち、詳細なシステムデバッグを支援する。かかるエミュレータは、その本体から延長されたケーブルの先端が、ターゲットプロセッサ用ソケットなどの接栓を介してターゲットシステムに結合可能とされ、さらに、エミュレーション実行中に各種データやステータス信号などを実時間でサンプリングし、それをトレースメモリ部などに格納する実時間トレース機能やエミュレーション動作を実質的に停止させるブレーク機能などの各種デバッグ機能を備える。
【0003】
また、実チップでありながら、ソフトウェアの実行状態をリアルタイムにトレースするための機能や、デバッグのために内蔵RAM(ランダム・アクセス・メモリ)に対するデータのリード/ライトを可能とするオンチップデバッグ機能を備えたマイクロコンピュータが提供されている。ここで、実チップとは、ユーザシステムに実際に搭載されるCPUを指し、エミュレーションにおける必要情報を外部出力可能に構成されたエミュレーション用チップと区別される。
【0004】
尚、エミュレータの動作について記載された文献の例としては、1989年6月20日に電波新聞社から発行された「マイコン開発のすべて(第78頁から第95頁)」がある。
【0005】
【発明が解決しようとする課題】
ユーザシステムによっては、処理能力の向上を図るため、複数のCPU(中央処理装置)が搭載されることがある。従来のエミュレーションにおいては、基本的に一つのCPU毎に1台のエミュレータが必要とされているため、例えば2個のCPUが搭載されるユーザシステムにおいては、基本的には2台のエミュレータが必要とされる。
【0006】
しかしながら、2個のCPUが搭載されるユーザシステムに、2台のエミュレータを繋いだとしても、2個のCPU相互間の同期がとれていないために、同時にエミュレーション実行することはできない。つまり、ユーザシステムに2台のエミュレータを繋いだとしても、一方のエミュレーション中は、他方のエミュレータにおいてターゲットプログラムの実行が停止されるが、あるいは、一方のエミュレーション中は、他方のCPUソケットには実チップを装着するようにしていた。
【0007】
上記のように2個のCPUが搭載されるユーザシステムのエミュレーションにおいては、例え2台のエミュレータを繋いだとしても、別々にエミュレーションしなければならないため、ユーザシステムの開発効率の向上が妨げられた。
【0008】
本発明の目的は、ユーザシステムの開発効率の向上を図るための技術を提供することにある。
【0009】
本発明の別の目的は、複数のCPUを有するユーザシステムのエミュレーションにおいてターゲットプログラムの同時実行を可能とするための技術を提供することにある。
【0010】
本発明の前記並びにその他の目的と新規な特徴は本明細書の記述及び添付図面から明らかになるであろう。
【0011】
【課題を解決するための手段】
本願において開示される発明のうち代表的なものの概要を簡単に説明すれば下記の通りである。
【0012】
すなわち、ユーザプログラム実行中にブレーク条件が成立することにより、ブレークモードに遷移するためのスタック処理を行い、ブレークモードにおいてブレークモードから復帰するための復帰命令を実行することでユーザモードへ遷移するためのアンスタック処理を行う中央処理装置と、上記アンスタック後に、上記中央処理装置を命令待ち状態に遷移させるためのフォルト信号をアサートし、上記中央処理装置の命令待ち状態で、その命令待ち状態の解除要求信号がアサートされることにより、上記中央処理装置の命令待ち状態を解除する制御手段とを含んでマイクロプロセッサを構成する。
【0013】
上記の手段によれば、制御手段は、フォルト信号をアサートし、上記中央処理装置の命令待ち状態で、その命令待ち状態の解除要求信号がアサートされることにより、上記中央処理装置の命令待ち状態を解除する。このことが、異なるマイクロプロセッサを同期化させ、エミューションの並列化によりユーザシステムの開発効率の向上を達成する。
【0014】
また、ユーザプログラム実行中にブレーク条件が成立することにより、ブレークモードに遷移するためのスタック処理を行い、ブレークモードにおいてブレークモードから復帰するための復帰命令を実行することでユーザモードへ遷移するためのアンスタック処理を行う中央処理装置と、上下関係の判別フラグを記憶するための判別フラグ記憶手段と、上記判別フラグ記憶手段に記憶されている判別フラグの状態が上位を示す場合、マイクロプロセッサの外部に出力される命令待ち状態の解除要求信号を上記アンスタック処理後にアサートする第1制御手段と、上記判別フラグ記憶手段に記憶されている判別フラグの状態が下位を示す場合、上記アンスタック後に、上記中央処理装置を命令待ち状態に遷移させるためのフォルト信号をアサートし、上記中央処理装置の命令待ち状態で、その解除要求信号がアサートされることにより、上記中央処理装置の命令待ち状態を解除する第2制御手段とを含んでマイクロプロセッサを構成する。
【0015】
上記の手段によれば、第2制御手段は、フォルト信号をアサートし、上記中央処理装置の命令待ち状態で、その命令待ち状態の解除要求信号をアサートすることにより、上記中央処理装置の命令待ち状態を解除する。このことが、異なるマイクロプロセッサを同期化させ、エミューションの並列化によりユーザシステムの開発効率の向上を達成する。
【0016】
このとき、外部からのバスリクエスト又はバス開放要求に応じて、上記中央処理装置を命令実行待ち状態に遷移させるためのフォルト信号をアサートするバスコントローラと、上記バスコントローラからのフォルト信号と上記フォルト制御回路からのフォルト信号との論理和を得てそれを上記中央処理装置に供給するゲート回路とを設けることができる。
【0017】
そしてそのようなマイクロプロセッサと、エミュレータ本体とを含んでエミュレーションシステムを構成する。
【0018】
【発明の実施の形態】
図5には本発明にかかるエミュレーションシステムの全体的な構成例が示される。
【0019】
図5に示されるようにこのエミュレーションシステムは、特に制限されないが、ユーザシステム51に搭載された第1エミュレーションプロセッサ511及び第2エミュレーションプロセッサ512、エミューレータ本体52、及び制御コンピュータ53とを含む。
【0020】
ユーザシステム51は、2個のCPUソケットを有し、それぞれCPUが装着される。第1エミュレーションプロセッサ511及び第2エミュレーションプロセッサ512は、基本的には、当該ユーザシステム51に本来搭載される実チップと同等の機能を有するとともに、内部バス情報の外部出力が可能に構成されたエミュレーション用チップとされる。
【0021】
第1エミュレーションプロセッサ511及び第2エミュレーションプロセッサ512とも、当該チップをシステムボードに搭載した状態でのデバッグを可能とするオンチップデバッグ機能を有する。特に、第1エミュレーションプロセッサ511は、その近傍に設けられたコネクタ513及びそれに結合されたケーブル524を介してエミュレータ本体52に接続されることにより、上記オンチップデバッグ機能によるデバッグが行われるようになっている。また、第2エミュレーションプロセッサ512の外部端子はユーザシステム51のCPUソケットを介してユーザシステムに結合されるとともに、ケーブル525を介してエミュレータ本体52に結合される。これにより、第2エミュレーションプロセッサ512のエミュレーション情報をエミュレータ本体52において収集することができる。制御コンピュータ53は、特に制限されないが、パーソナルコンピュータとされ、ケーブル516を介してエミュレータ本体52に結合されることにより、このエミュレータ本体52との間で、エミュレーションに関する各種制御情報や収集データのやり取りが可能とされる。
【0022】
図1には、上記エミュレータ本体52の構成例が示される。
【0023】
図1に示されるように、このエミュレータ本体52は、特に制限されないが、互いに異なるエミュレーション機能として、インサーキットエミュレーション(ICE)機能と、オンチップデバッグ機能とを有する。ICE機能はICE機能ブロックによって実現される。このICE機能ブロックは、コントロールCPU11、ブレーク回路12、トレース回路13、モニタ回路14、ファームRAM(ランダム・アクセス・メモリ)15、パフォーマンス回路16とを含む。そして、オンチップデバッグ機能は、コントロールCPU11やオンチップコントローラ17によって実現される。
【0024】
コントロールCPU11は、コントロールバス23を介してブレーク回路12、トレース回路13、モニタ回路14、ファームRAM15、及びパフォーマンス回路16、及びオンチップコントローラ17に結合され、それらに対して各種情報のやり取りが可能とされる。また、第2エミュレーションプロセッサ512は、エミュレーションバス24を介してブレーク回路12、トレース回路13、モニタ回路14、ファームRAM15、及びパフォーマンス回路16に結合され、第2エミュレーションプロセッサ512のエミュレーション動作における各種情報の収集等が可能とされる。オンチップコントローラ17は、信号線25を介して第1エミュレーションプロセッサ511に結合され、後述する所定の通信プロトコルに従って各種情報のやり取りが可能とされる。
【0025】
ブレーク回路12は、エミュレーションバス24の状態を監視してその状態が予め設定されている状態に到達したときにエミュレーション動作をブレークする。トレース回路13は、エミュレーションバス24に与えられるデータやアドレスさらには制御情報を逐次トレースして蓄える。モニタ回路14は、制御コンピュータ53からインタフェース21を介してエミュレーションバス24をモニタを可能とするために設けられている。ファームRAM15は、第2エミュレーションプロセッサ512で実行されるプログラムを格納するために設けられる。パフォーマンス回路16は、上記トレース情報に基づいて第2エミュレーションプロセッサ512の性能測定、例えば実行時間の測定などを行うために設けられる。
【0026】
オンチップコントローラ17は、コントロールCPU11の制御下で、第1エミュレーションプロセッサ511のオンチップデバッグを可能とするブロックであり、次のように構成される。
【0027】
図2には上記オンチップコントローラ17の構成例が示される。
【0028】
図2に示されるように、上記オンチップコントローラ17は、JTAGにおける各種信号を出力するためのJTAGコントローラ170、バスコントローラ176、及びクロック発生回路177を有する。上記JTAGコントローラ170は、JTAGにおける各種信号を出力するためのバッファ171〜174及びレジスタ175を有する。クロック発生回路177は、基本周波数のクロック信号を発生させるための発振器と、発生されたクロックを適宜に分周することにより、元の周波数とは異なる周波数のクロック信号を生成する分周回路を含む。このクロック発生回路177から出力されたクロック信号はバッファ174を介することによりTCKとして第1エミュレーションプロセッサ511に伝達される。出力データTDoがバッファ171を介してバスコントローラ176に伝達され、また、テストロジックに対して命令やデータをシリアル入力する信号TDi、テスト動作を制御する信号TMS、テストロジックに供給されるクロック信号TCK、コントローラを初期化するためのリセット信号TRSTがそれぞれバッファ172,173、レジスタ175を介して出力される。バスコントローラ176は、上記バッファ171,172,173、及びレジスタ175と、コントロールバス23との間での信号のやり取りを可能にする。
【0029】
特に制限されないが、第1エミュレーションプロセッサ511と第2エミュレーションプロセッサ512とは互いに同一構成とされる。
【0030】
図3には第1エミュレーションプロセッサ511(512)の構成例が示される。
【0031】
図3に示されるように、この第1エミュレーションプロセッサ511(512)は、CPU213、RAM212、シリアルデバッグインタフェース211、周辺モジュール215、及びエミュレーションバスコントローラ216を含む。
【0032】
CPU213により所定のプログラムが実行されるとき、RAM212は、その演算処理の作業領域として機能される。シリアルデバッグインタフェース211は、エミュレータ本体52におけるオンチップコントローラ17に結合されることによって、シリアルデータのやり取りを可能とする。
【0033】
バスコントローラ214が設けられ、CPU213と周辺モジュール215との間のウェイト制御や、CPU213と外部モジュールとの間のウェイト制御が行われる。特に制限されないが、上記周辺モジュール215には、外部装置との間のシリアル通信を可能とするシリアルコミュニケーションインタフェースや、時間測定のためのタイマー、CPU213の介在なしにデバイス間のデータ転送を可能にするダイレクトメモリアクセスコントローラなどが含まれる。
【0034】
上記シリアルデバッグインタフェース211Dは、通信用モジュール211A、ファームRAM211B、ブレーク回路211C、及びトレースバッファ211Dを含む。通信モジュール211Aは、外部装置との間でオンチップデバッグのための通信を行う。ファームRAM211Bには、CPU213で実行される各種プログラムが保持される。ブレーク回路211Cは、予め設定されたブレーク条件が成立したか否かを判別する。トレースバッファ211Dは、CPU213でのプログラム実行状態をトレースする。
【0035】
また、エミュレーションコントローラ216は、内部バス218とエミュレーションバス24とに結合され、エミュレーションに関する各種制御を行う。特に制限されないが、エミュレーションコントローラ216は、上位/下位レジスタ216A、ブレークスタックレジスタ216B、ブレーク制御回路216C、及びフォルト制御回路216Dを含む。上位/下位レジスタ216Aは、それが含まれるエミュレーションプロセッサが他のエミュレーションプロセッサとの関係で上位であるのか下位であるのかを判別するためのフラグ情報が保持される。特に制限されないが、図1においては、エミュレーションバス24に結合されるエミュレーションプロセッサ511が上位とされ、オンチップコントローラ17に結合されるエミュレーションプロセッサ512が下位とされる。上位と下位との違いは、ブレークモードからユーザモードへの復帰命令の実行によるアンスタック完了後の状態において大きく相違する。これについては後に詳述する。
【0036】
ブレークスタックレジスタ216Bは、ブレーク条件が成立してCPU213の状態がユーザモードからブレークモードに移行する際に、そのときのレジスタ(EXR,CCR)やプログラムカウンタ(PC)等の値を保持する。
【0037】
ブレーク制御回路216Cは、ブレーク制御信号の入出力制御を行う。ブレーク制御信号には、ブレーク割り込み要求信号、ブレークアクノリッジ信号などがある。ブレーク割り込みはローアクティブとされ、それがアクティブにされると、ブレーク制御回路216CによってCPU213へのブレーク割り込みが行われる。このブレーク割り込みにより、ブレーク処理が行われ、そのときのレジスタ(EXR,CCR)やプログラムカウンタ(PC)等の値がブレークスタックレジスタ216Bに保持される。ブレーク割り込みによりCPU213がブレークモードに移行すると、ブレーク制御回路216Cによりブレークアクノリッジ信号がローレベルにされることで、ブレークモードになったことが示される。ブレークアクノリッジ信号はブレークモード期間中ローレベルであり、ブレークからの復帰(RTB)命令のスタック終了後にハイレベルにされる。つまり、ブレークモードは、専用の復帰(RTB)命令を実行することにより解除され、それによりブレークモードからユーザモードに遷移される。
【0038】
また、バスコントローラ214から第1フォルト信号FLT1が出力され、エミュレーションコントローラ216からは第2フォルト信号FLT2が出力される。この第1フォルト信号FLT1と第2フォルト信号FLT2とのオア論理がオアゲート217で得られ、そのオア論理がCPU213に伝達されるようになっている。
【0039】
上記第1フォルト信号FLT1は、上記バスコントローラ214に対して、マイクロプロセッサの外部からバスリクエストあるいは他のバスマスタからのバス解放要求があり、バス権調停の結果、バス権を解放すべき場合には、バスコントローラ214によってハイレベルにアサートされる。第1フォルト信号FLT1がハイレベルにアサートされることにより、CPU213は、第1フォルトFLT1がハイレベルにアサートされた場合に、内部状態(プログラムカウンタ等の値)を保持したまま、命令の実行が停止される(フォルト状態)。これによりバスがCPU213から開放される。
【0040】
また、上記第2フォルト信号FLT2は、上位/下位レジスタ216Aのフラグ状態に応じてフォルト制御回路216Dによって制御される。つまり、上位/下位レジスタ216のフラグ状態がローレベルとされ、当該エミュレーションプロセッサが下位とされる場合には、ブレークモードからの復帰命令がCPU213で実行された後にフォルト制御回路216Dによって第2フォルト信号FLT2がハイレベルにアサートされる。これにより、CPU213においては、第1フォルトFLT1がハイレベルにアサートされた場合と同様に、内部状態(プログラムカウンタ等の値)を保持したまま、命令の実行が停止される(フォルト状態)。このフォルト状態は、エミュレーションコントローラ216の外部から与えられるフォルト解除要求信号がローレベルにアサートされることにより、第2フォルト信号FLT2がローレベルにネゲートされまで維持される。つまり、エミュレーションコントローラ216の外部から与えられたフォルト解除要求信号がローレベルにアサートされると、フォルト制御回路216Dは、第2フォルト信号FLT2をローレベルにネゲートする。これにより、CPU213のフォルト状態が解除される。フォルト制御回路216Dにおけるこのような制御機能が、本発明における第2制御手段に対応する。
【0041】
それに対して、上位/下位レジスタ216Aのフラグ状態がハイレベルとされ、当該エミュレーションプロセッサが上位とされる場合には、フォルト制御回路216Dは、第2フォルト信号FLT2をアサートすること無しに、外部に対して別のCPUに対するフォルト解除要求信号をアサートする。フォルト制御回路216Dにおけるこの制御機能が、本発明における第1制御手段に対応する。
【0042】
図4には通信用モジュール211Aの構成例が示される。
【0043】
図4に示されるように、通信用モジュール211Aは、JTAG対応のTAPコントローラ211A−1、入力レジスタ211A−2、及び出力レジスタ211A−3を含んで成る。TAPコントローラ211A−1には、テストロジックに供給されるクロック信号TCK、コントローラを初期化するためのリセット信号TRST、及びテスト動作を制御する信号TMSが入力される。TAPコントローラ211−A1は、入力される命令の解析及びそれに基づく入出力制御を行う。入力レジスタ211A−2及び出力レジスタ211A−3は、特に制限されないが、32ビット構成のシフトレジスタとされ、それぞれシリアル形式で取り込まれた信号TDi,TDoをシフトする。
【0044】
次に、ブレークモードからユーザモードへの復帰について詳述する。
【0045】
図6には、第1エミュレーションプロセッサ511、及び第2エミュレーションプロセッサ512において、ブレークモードからユーザモードへの復帰までの手順が示される。また、図7にはその場合の主要部の動作タイミングが示される。
【0046】
第1エミュレーションプロセッサ511は下位レベルのプロセッサ、第2エミュレーションプロセッサ512は上位レベルのプロセッサとされる。
【0047】
第1エミュレーションプロセッサ511において、ファームRAM211Bに保持されているプログラムが実行されている期間において、ブレークモードからの復帰(RTB)命令が実行されることにより、プログラムカウンタ(PC)などのアンスタックが行われる(S711,S721)。このアンスタックにおいて上位/下位レジスタ216のフラグ状態がチェックされる。第1エミュレーションプロセッサ511は下位レベルのプロセッサとされるため、上位/下位レジスタ216のフラグ状態はローレベルとされている。これにより、第2フォルト信号FLT2がハイレベルにアサートされ、第1エミュレーションプロセッサ511におけるCPU213はフォルト(次命令待ち)状態とされる。つまり、上記ステップS712のプログラムカウンタ(PC)などのアンスタックが行われにもかかわらず、ユーザモードにおける最初の命令の実行待ち状態とされる。この状態は、上位レベルのプロセッサである第2エミュレーションプロセッサ512からフォルト解除要求がなされるまで続く。
【0048】
一方、第2エミュレーションプロセッサ512において、ファームRAM15(図1参照)に保持されているプログラムが実行されている期間において、ブレークモードからの復帰(RTB)命令が実行されることにより、プログラムカウンタ(PC)などのアンスタックが行われる(S721,S722)。このアンスタックにおいて上位/下位レジスタ216のフラグ状態がチェックされる。第2エミュレーションプロセッサ512は上位レベルのプロセッサとされるため、上位/下位レジスタ216のフラグ状態はハイレベルとされている。これにより、エミュレーションコントローラ216によってフォルト解除要求信号がローレベルにアサートされることで、第1エミュレーションプロセッサ511のフォルト状態の解除要求がなされる(S723)。この解除要求後、第2エミュレーションプロセッサ512はユーザプログラムの実行に遷移する。
【0049】
ここで、上記ローレベルのフォルト解除要求信号が第1エミュレーションプロセッサ511に伝達されると、第1エミュレーションプロセッサ511では、エミュレーションコントローラ216内のフォルト制御回路216Dにより第2フォルト信号FLT2がローレベルにネゲートされる。これによりフォルト状態が解除され、CPU213によりユーザプログラムの実行が開始される。
【0050】
上記の例によれば以下の作用効果を得ることができる。
【0051】
(1)下位レベルである第1エミュレーションプロセッサ511がブレークモードからの復帰(RTB)命令を実行した後にフォルト状態になり、上位レベルである第2エミュレーションプロセッサ512からのフォルト解除要求(S723)がなされることで、第1エミュレーションプロセッサ511のフォルト状態が解除されることにより、第1エミュレーションプロセッサ511と第2エミュレーションプロセッサ512とは互いに同期される。つまり、ブレークモードにおいて非同期処理が行われていても、ブレークモードからの復帰後のユーザプログラムの実行開始時点で第1エミュレーションプロセッサ511と第2エミュレーションプロセッサ512とは同期処理が行われる。このため、第1エミュレーションプロセッサ511と第2エミュレーションプロセッサ512とを同時に実行してエミュレーションすることができるので、ユーザプログラムの開発効率の向上を図ることができる。
【0052】
(2)エミュレータ本体52は、一つでよく、ICE用エミュレータ、及びオンチップデバッグ用エミュレータとして別個に用意する必要が無い。
【0053】
別の構成例について説明する。
【0054】
図8に示されるように、オンチップデバッグ用エミュレータ本体85と、エミュレータ本体86とを別々に構成しても良い。オンチップデバッグ用エミュレータ本体85は、基本的には、図1におけるオンチップコントローラ17、コントロールCPU11、及びインタフェース21等が含まれるが、ブレーク回路12、トレース回路13、モニタ回路14、ファームRAM15、及びパフォーマンス回路16などのICE機能実現ブロックは含まれない。エミュレータ本体86には、図1におけるブレーク回路12、トレース回路13、モニタ回路14、ファームRAM15、パフォーマンス回路16、コントロールCPU11、及びインタフェース21などのICE機能実現ブロックが含まれるが、オンチップコントローラ17は含まれない。下位マイクロプロセッサ側エミュレータ85には制御コンピュータ81が接続され、上位マイクロプロセッサ側エミュレータ86には制御コンピュータ82が接続される。
【0055】
また、図9に示されるように、二つのマイクロプロセッサ511,512ともエミュレーションバスを介してエミュレーションを行うようにしても良い。この場合、エミュレータ本体85,86は、それぞれ図1におけるブレーク回路12、トレース回路13、モニタ回路14、ファームRAM15、パフォーマンス回路16、コントロールCPU11、及びインタフェース21などのICE機能実現ブロックが含まれる。
【0056】
図10に示されるように、一つのマイクロプロセッサパッケージの中に、図3に示されるマイクロプロセッサが二つ設けられる場合がある。かかる場合にも、本発明を適用することができる。この場合、エミュレータ本体52は、二つのマイクロプロセッサに対応してICE機能実現ブロックが設けられる。
【0057】
さらに、図11に示されるように、一つのマイクロプロセッサパッケージの中に二つのマイクロプロセッサが設けられている場合に、シリアルデバッグインタフェースによってエミュレータ本体との信号のやり取りを行うように構成することができる。この場合、エミュレータ本体52においては、オンチップコントローラ17等が2系統設けられる。
【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エミュレーションプロセッサ512におけるオンチップデバッグが可能とされる。同様に、コントロール回路18の制御下で第2エミュレーションプロセッサ512とエミュレーションバス24との間のデータのやり取りが可能とされるとき、第1エミュレーションプロセッサ511は、エミュレーションバス24から切り放される。このとき、コントロール回路18の制御によりセレクタ19を介して第1エミュレーションプロセッサ511がオンチップコントローラ17に結合されることにより、第1エミュレーションプロセッサ511におけるオンチップデバッグが可能とされる。
【0059】
3個以上のマイクロプロセッサを有する場合においても、本発明を適用することができる。つまり、3個以上のマイクロプロセッサにおける一つを上位に設定し、その他の全てのマイクロプロセッサを下位に設定することにより、上記した例の場合と同様の作用効果を得ることができる。
【0060】
また、フォルト状態の解除要求信号はコントロールCPU11から発生させるようにしても良い。図13には、その場合の構成例が示される。この場合、3個のマイクロプロセッサ511,512,513のすべてがフォルトされた後に、コントロールCPU11から3個のマイクロプロセッサ511,512,513に供給されるフォルト解除要求信号がアサートされるように構成することができる。これにより、3個のマイクロプロセッサ511,512,513は、同時にフォルト状態が解除され、ユーザプログラムの同期実行が可能とされる。図14にはこの場合の具体的な構成が示される。第3エミュレーションプロセッサ513に対応して、それのオンチップデバッグを可能とするためのオンチップコントローラ141が設けられる。フォルト解除要求信号は、個々のエミュレーションプロセッサ511,512,513ではなく、コントロールCPU11によって形成される。
【0061】
以上本発明者によってなされた発明を具体的に説明したが、本発明はそれに限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。
【0062】
以上の説明では主として本発明者によってなされた発明をその背景となった利用分野であるマイクロプロセッサに適用した場合について各種データ処理装置に広く適用することができる。
【0063】
本発明は、少なくともCPUを含むことを条件に適用することができる。
【0064】
【発明の効果】
すなわち、アンスタック後に中央処理装置を命令待ち状態に遷移させるためのフォルト信号をアサートし、上記中央処理装置の命令待ち状態で、その命令待ち状態の解除要求信号がアサートされることにより、上記中央処理装置の命令待ち状態を解除する制御手段とを含んでマイクロプロセッサが構成されることにより、中央処理装置の命令待ち状態で、その命令待ち状態の解除要求信号がアサートされて上記中央処理装置の命令待ち状態が解除される。それにより、異なるマイクロプロセッサを同期化させ、エミューションの並列化によりユーザシステムの開発効率の向上を図ることができる。
【図面の簡単な説明】
【図1】本発明にかかるエミュレーションシステムにおけるエミュレータ本体の構成例ブロック図である。
【図2】上記エミュレータ本体に含まれるオンチップコントローラ17の構成例ブロック図である。
【図3】上記エミュレーションシステムで使用されるエミュレーションプロセッサの構成例ブロック図である。
【図4】上記エミュレーションプロセッサに含まれる通信用モジュールの構成例ブロック図である。
【図5】上記エミュレーションシステムの全体的な構成例説明図である。
【図6】上記エミュレーションプロセッサにおけるブレークモードからユーザモードへの復帰までのフローチャートである。
【図7】上記エミュレーションプロセッサにおけるブレークモードからユーザモードへの復帰までのタイミング図である。
【図8】上記エミュレーションシステムの別の構成例説明図である。
【図9】上記エミュレーションシステムの別の構成例説明図である。
【図10】上記エミュレーションシステムの別の構成例説明図である。
【図11】上記エミュレーションシステムの別の構成例説明図である。
【図12】上記エミュレーションシステムの別の構成例におけるエミュレータ本体の構成例ブロック図である。
【図13】上記エミュレーションシステムの別の構成例説明図である。
【図14】上記エミュレーションシステムの別の構成例におけるエミュレータ本体の構成例ブロック図である。
【符号の説明】
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エミュレーションプロセッサ
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a microcomputer and an emulation system for system debugging in the microcomputer.
[0002]
[Prior art]
In developing a microprocessor (microcomputer) application device, an in-circuit emulator is used for debugging the application system and performing detailed evaluation of the system. The in-circuit emulator is connected between the parent computer for software development and the target system under development, and functions as a debugger while acting as a function of the microprocessor (target processor) included in the target system. Assist detailed system debugging. In such an emulator, the end of the cable extended from the main unit can be connected to the target system via a plug such as a socket for the target processor, and various data and status signals can be transmitted in real time during emulation. Various debugging functions such as a real-time trace function for sampling and storing it in a trace memory unit and a break function for substantially stopping the emulation operation are provided.
[0003]
In addition, even though it is a real chip, it has a function for tracing the execution state of software in real time, and an on-chip debug function that enables data read / write to the internal RAM (random access memory) for debugging. A provided microcomputer is provided. Here, the actual chip refers to a CPU that is actually mounted on the user system, and is distinguished from an emulation chip configured to be able to output necessary information for emulation.
[0004]
An example of a document describing the operation of the emulator is “All about microcomputer development (pages 78 to 95)” issued by Denpa Shimbun on June 20, 1989.
[0005]
[Problems to be solved by the invention]
Depending on the user system, a plurality of CPUs (central processing units) may be mounted in order to improve the processing capability. In conventional emulation, one emulator is basically required for each CPU. For example, in a user system equipped with two CPUs, two emulators are basically required. It is said.
[0006]
However, even if two emulators are connected to a user system on which two CPUs are mounted, since the two CPUs are not synchronized with each other, emulation cannot be executed simultaneously. 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 CPU socket is actually running during one emulation. I was trying to wear a tip.
[0007]
As described above, in the emulation of a user system equipped with two CPUs, even if two emulators are connected, they must be emulated separately, which hinders the improvement of the development efficiency of the user system. .
[0008]
An object of the present invention is to provide a technique for improving the development efficiency of a user system.
[0009]
Another object of the present invention is to provide a technique for enabling simultaneous execution of a target program 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 be apparent from the description of this specification and the accompanying drawings.
[0011]
[Means for Solving the Problems]
The following is a brief description of an outline of typical inventions disclosed in the present application.
[0012]
That is, when a break condition is satisfied during execution of the user program, stack processing for transition to break mode is performed, and transition to user mode is performed by executing a return instruction for returning from break mode in break mode A central processing unit that performs the unstacking process, and after the unstacking, asserts a fault signal for causing the central processing unit to transition to the instruction waiting state, and in the instruction waiting state of the central processing unit, When the release request signal is asserted, the microprocessor includes a control means for releasing the instruction waiting state of the central processing unit.
[0013]
According to the above means, the control means asserts a fault signal, and in the instruction waiting state of the central processing unit, the instruction waiting state release request signal is asserted, whereby the central processing unit waits for an instruction. Is released. This synchronizes the different microprocessors and improves the development efficiency of the user system by parallelizing the emulation.
[0014]
In addition, when a break condition is satisfied during execution of the user program, stack processing is performed to enter the break mode, and the user enters the user mode by executing a return instruction for returning from the break mode in the break mode. If the state of the determination flag stored in the determination flag storage means and the determination flag storage means for storing the determination flag of the upper and lower relations indicates higher order, First control means for asserting an instruction waiting state release request signal output to the outside after the unstack processing, and when the state of the determination flag stored in the determination flag storage means indicates a lower order, after the unstacking Assert a fault signal for transitioning the central processing unit to the instruction waiting state. And, in the instruction waiting state of the central processing unit, by the release request signal is asserted, configuring the microprocessor and a second control means for canceling the instruction waiting state of the central processing unit.
[0015]
According to the above means, the second control means asserts a fault signal and waits for an instruction of the central processing unit by asserting a release request signal for the instruction waiting state in an instruction waiting state of the central processing unit. Release the state. This synchronizes the different microprocessors and improves the development efficiency of the user system by parallelizing the emulation.
[0016]
At this time, in response to a bus request or a bus release request from the outside, a bus controller that asserts a fault signal for causing the central processing unit to transition to an instruction execution waiting state, a fault signal from the bus controller, and the fault control A gate circuit may be provided that obtains a logical sum with a fault signal from the circuit and supplies it to the central processing unit.
[0017]
An emulation system is configured including such a microprocessor and an emulator body.
[0018]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 5 shows an overall configuration example of an emulation system according to the present invention.
[0019]
As shown in FIG. 5, the emulation system includes a first emulation processor 511 and a second emulation processor 512, an emulator main body 52, and a control computer 53 mounted on the user system 51, although not particularly limited.
[0020]
The user system 51 has two CPU sockets, each with a CPU. The first emulation processor 511 and the second emulation processor 512 basically have functions equivalent to those of an actual chip originally mounted on the user system 51 and are configured to be capable of outputting internal bus information externally. Chip.
[0021]
Both the first emulation processor 511 and the second emulation processor 512 have an on-chip debugging function that enables debugging with the chip mounted on the system board. In particular, the first emulation processor 511 is connected to the emulator main body 52 via a connector 513 provided in the vicinity thereof and a cable 524 coupled thereto, whereby debugging by the on-chip debugging function is performed. ing. The external terminal of the second emulation processor 512 is coupled to the user system via the CPU socket of the user system 51 and coupled to the emulator main body 52 via the cable 525. Thereby, the emulation information of the second emulation processor 512 can be collected in the emulator main body 52. Although the control computer 53 is not particularly limited, it is a personal computer and is connected to the emulator main body 52 via the cable 516 so that various control information and collected data related to emulation can be exchanged with the emulator main body 52. It is possible.
[0022]
FIG. 1 shows a configuration example of the emulator main body 52.
[0023]
As shown in FIG. 1, the emulator main body 52 has an in-circuit emulation (ICE) function and an on-chip debug function as different emulation functions, although not particularly limited. The ICE function is realized by the ICE function block. The ICE function block includes a control CPU 11, a break circuit 12, a trace circuit 13, a monitor circuit 14, a 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]
The control CPU 11 is coupled to the break circuit 12, the trace circuit 13, the monitor circuit 14, the firmware RAM 15, the performance circuit 16, and the on-chip controller 17 via the control bus 23, and can exchange various information with them. Is done. The second emulation processor 512 is coupled to the break circuit 12, the trace circuit 13, the monitor circuit 14, the firmware RAM 15, and the performance circuit 16 via the emulation bus 24, and stores various information in the emulation operation of the second emulation processor 512. Collection is possible. The on-chip controller 17 is coupled to the first emulation processor 511 via the signal line 25, and can exchange various information according to a predetermined communication protocol described later.
[0025]
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 sequentially traces and stores data, addresses, and control information given to the emulation bus 24. The monitor circuit 14 is provided to enable the emulation bus 24 to be monitored from the control computer 53 via the interface 21. The firmware RAM 15 is provided for storing a program executed by the second emulation processor 512. The performance circuit 16 is provided for measuring the performance of the second emulation processor 512 based on the trace information, for example, measuring the execution time.
[0026]
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]
FIG. 2 shows a configuration example of the on-chip controller 17.
[0028]
As shown in FIG. 2, the on-chip controller 17 includes a JTAG controller 170 for outputting various signals in the JTAG, a bus controller 176, and a clock generation circuit 177. The JTAG controller 170 includes buffers 171 to 174 and a register 175 for outputting various signals in JTAG. The clock generation circuit 177 includes an oscillator for generating a clock signal having a basic frequency, and a frequency dividing circuit for generating a clock signal having 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 first emulation processor 511 as TCK through the buffer 174. The output data TDo is transmitted to the bus controller 176 via the buffer 171, and a signal TDi for serially inputting a command and data to the test logic, a signal TMS for controlling the test operation, and a clock signal TCK supplied to the test logic A reset signal TRST for initializing the controller is output via the buffers 172 and 173 and the register 175, respectively. The bus controller 176 enables the exchange of signals between the buffers 171, 172, 173 and the register 175 and the control bus 23.
[0029]
Although not particularly limited, the first emulation processor 511 and the second emulation processor 512 have the same configuration.
[0030]
FIG. 3 shows a configuration example of the first emulation processor 511 (512).
[0031]
As illustrated in FIG. 3, the first emulation processor 511 (512) includes a CPU 213, a RAM 212, a serial debug interface 211, a peripheral module 215, and an emulation bus controller 216.
[0032]
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 serial data exchange.
[0033]
A bus controller 214 is provided, and wait control between the CPU 213 and the peripheral module 215 and wait control between the CPU 213 and the external module are performed. Although not particularly limited, the peripheral module 215 enables serial communication with an external device, a timer for time measurement, and data transfer between devices without intervention of the CPU 213. Includes direct memory access controllers.
[0034]
The serial debug interface 211D includes a communication module 211A, a firmware RAM 211B, 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 held in the firmware RAM 211B. The break circuit 211C determines whether or not a preset break condition is satisfied. The trace buffer 211D traces the program execution state in the CPU 213.
[0035]
The emulation controller 216 is coupled to the internal bus 218 and the emulation bus 24 and performs various controls relating to emulation. Although not particularly limited, the emulation controller 216 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 including the upper / lower register 216A 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 the upper level, and the emulation processor 512 coupled to the on-chip controller 17 is the lower level. The difference between the upper level and the lower level is greatly different in a state after completion of unstacking by execution of a return instruction from the break mode to the user mode. This will be described in detail later.
[0036]
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 holds the values of the registers (EXR, CCR), the program counter (PC), and the like at that time.
[0037]
The break control circuit 216C performs input / output control of the break control signal. The break control signal includes a break interrupt request signal and a break acknowledge signal. The break interrupt is made low active, and when it is activated, a break interrupt to the CPU 213 is performed by the break control circuit 216C. Break processing is performed by this break interrupt, and the values of the registers (EXR, CCR) and program counter (PC) at that time are held in the break stack register 216B. When the CPU 213 shifts to the break mode due to the break interrupt, the break control circuit 216C sets the break acknowledge signal to the low level, indicating that the break mode has been entered. The break acknowledge signal is at a low level during the break mode, and is set to a high level after the return from break (RTB) instruction is completed. In other words, the break mode is canceled by executing a dedicated return (RTB) instruction, thereby transitioning from the break mode to the user mode.
[0038]
The bus controller 214 outputs a first fault signal FLT1, and the emulation controller 216 outputs a second fault signal FLT2. 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]
The first fault signal FLT1 is issued when there is a bus request from the outside of the microprocessor or a bus release request from another bus master to the bus controller 214, and the bus right is to be released as a result of the bus right arbitration. , And asserted high by the bus controller 214. When the first fault signal FLT1 is asserted to a high level, the CPU 213 can execute an instruction while maintaining the internal state (a value of a program counter or the like) when the first fault FLT1 is asserted to a high level. Stopped (fault condition). As a result, the bus is released from the CPU 213.
[0040]
Also, the second fault signal FLT2 is an upper / lower register. 216A It is controlled by the fault control circuit 216D according to the flag state. 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 fault control circuit 216D executes the second fault signal after the CPU 213 executes the return instruction from the break mode. FLT2 is asserted high. As a result, in the CPU 213, the execution of the instruction is stopped (fault state) while maintaining the internal state (the value of the program counter or the like), as in the case where the first fault FLT1 is asserted to the high level. This fault state is maintained until the second fault signal FLT2 is negated to the low level by asserting the fault release request signal supplied from the outside of the emulation controller 216 to the low level. That is, when the fault release request signal given from the outside of the emulation controller 216 is asserted to the low level, the fault control circuit 216D negates the second fault signal FLT2 to the low level. As a result, 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]
On the other hand, when the flag state of the upper / lower register 216A is set to the high level and the emulation processor is set to the upper level, the fault control circuit 216D externally outputs the signal without asserting the second fault signal FLT2. In contrast, a fault release request signal for another CPU is asserted. This control function in the fault control circuit 216D corresponds to the first control means in the present invention.
[0042]
FIG. 4 shows a configuration example of the communication module 211A.
[0043]
As shown in FIG. 4, the communication module 211A includes a JTAG-compatible TAP controller 211A-1, an input register 211A-2, and an output register 211A-3. A clock signal TCK supplied to the test logic, a reset signal TRST for initializing the controller, and a signal TMS for controlling the test operation are input to the TAP controller 211A-1. The TAP controller 211-A1 analyzes an input command and performs input / output control based on the analysis. The input register 211A-2 and the output register 211A-3 are not particularly limited, but are 32-bit shift registers, which respectively shift the signals TDi and TDo captured in the serial format.
[0044]
Next, the return from the break mode to the user mode will be described in detail.
[0045]
FIG. 6 shows a procedure from the break mode to the return to the user mode in the first emulation processor 511 and the second emulation processor 512. FIG. 7 shows the operation timing of the main part in that case.
[0046]
The first emulation processor 511 is a lower level processor, and the second emulation processor 512 is an upper level processor.
[0047]
In the first emulation processor 511, an unstack such as a program counter (PC) is executed by executing a return from break mode (RTB) instruction during a period in which a program held in the firmware RAM 211B is being executed. (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 flag state of the upper / lower register 216 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 enters a fault (waiting for the next instruction) state. That is, despite the unstacking of the program counter (PC) or the like in step S712, the first instruction execution waiting state in the user mode is set. This state continues until a fault release request is made from the second emulation processor 512, which is a higher-level processor.
[0048]
On the other hand, in the second emulation processor 512, the program counter (PC) is executed by executing the return from break mode (RTB) instruction during the period in which the program held in the firmware RAM 15 (see FIG. 1) is being executed. ) And the like are performed (S721, S722). In this unstack, the flag state of the upper / lower register 216 is checked. Since the second emulation processor 512 is an upper level processor, the flag state of the upper / lower register 216 is set to the high level. As a result, the emulation controller 216 asserts the fault release request signal to a low level, thereby making a request to release the fault state of the first emulation processor 511 (S723). After this cancellation request, the second emulation processor 512 shifts to execution of the user program.
[0049]
When the low level fault release request signal is transmitted to the first emulation processor 511, the first emulation processor 511 negates the second fault signal FLT2 to the low level by the fault control circuit 216D in the emulation controller 216. Is done. 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 effects can be obtained.
[0051]
(1) After the first emulation processor 511 at the lower level executes a return from break mode (RTB) instruction, the fault state is entered, and a fault release request (S723) is made from the second emulation processor 512 at the higher level. Thus, the first emulation processor 511 and the second emulation processor 512 are synchronized with each other by releasing the fault state of the first emulation processor 511. That is, even if asynchronous processing is performed in the break mode, the first emulation processor 511 and the second emulation processor 512 are synchronized at the time of starting execution of the user program after returning from the break mode. Therefore, the first emulation processor 511 and the second emulation processor 512 can be executed and emulated at the same time, so that the development efficiency of the user program can be improved.
[0052]
(2) One emulator main body 52 is sufficient, and there is no need to prepare separately as an ICE emulator and an on-chip debugging emulator.
[0053]
Another configuration example will be described.
[0054]
As shown in FIG. 8, the on-chip debugging emulator main body 85 and the emulator main body 86 may be configured separately. The emulator main body 85 for on-chip debugging basically includes the on-chip controller 17, the control CPU 11, the interface 21, and the like in FIG. 1, but the break circuit 12, the trace circuit 13, the monitor circuit 14, the farm RAM 15, ICE function implementation blocks such as the performance circuit 16 are not included. The emulator main body 86 includes ICE function implementation blocks such as 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 21 in FIG. Not included. A control computer 81 is connected to the lower microprocessor-side emulator 85, and a control computer 82 is connected to the upper microprocessor-side emulator 86.
[0055]
Further, as shown in FIG. 9, the two microprocessors 511 and 512 may perform emulation via the emulation bus. In this case, the emulator main bodies 85 and 86 include ICE function implementation blocks such as 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 21 in FIG.
[0056]
As shown in FIG. 10, two microprocessors shown in FIG. 3 may be provided in one microprocessor package. Even in such a case, the present invention can be applied. In this case, the emulator main body 52 is provided with an ICE function realizing block corresponding to two microprocessors.
[0057]
Furthermore, as shown in FIG. 11, when two microprocessors are provided in one microprocessor package, the serial debug interface can be used to exchange signals with the emulator main body. . In this case, the emulator main body 52 is provided with two on-chip controllers 17 and the like.
[0058]
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 switched. That is, the control circuit 18 is provided, and the control circuit 18 controls which of the first emulation processor 511 and the second emulation processor 512 the emulation bus 24 is connected to. A selector (SEL) 19 is provided, and the on-chip controller 17 is selectively connected to the first emulation processor 511 and the first emulation processor 512. The operation of the selector 19 is controlled by the control circuit 18. When data exchange between the first emulation processor 511 and the emulation bus 24 is enabled 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, thereby enabling on-chip debugging in the second emulation processor 512. Similarly, when data exchange between the second emulation processor 512 and the emulation bus 24 is enabled under the control of the control circuit 18, the first emulation processor 511 is disconnected from the emulation bus 24. At this time, the first emulation processor 511 is coupled to the on-chip controller 17 via the selector 19 under the control of the control circuit 18, thereby enabling on-chip debugging in the first emulation processor 511.
[0059]
The present invention can be applied even in the case of having three or more microprocessors. That is, by setting one of the three or more microprocessors at the upper level and setting all the other microprocessors at the lower level, the same operation and effect as in the above example can be obtained.
[0060]
Further, the fault state release request signal 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, the fault release request signal supplied from the control CPU 11 to the three microprocessors 511, 512 and 513 is asserted. be able to. As a result, the three microprocessors 511, 512, and 513 are simultaneously released from the fault state, and the user program can be synchronously executed. 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 generated not by the individual emulation processors 511, 512, 513 but by the control CPU 11.
[0061]
Although the invention made by the present inventor has been specifically described above, the present invention is not limited thereto, and it goes without saying that various changes can be made without departing from the scope of the invention.
[0062]
In the above description, the case where the invention made mainly by the present inventor is applied to the microprocessor which is the field of use behind it can be widely applied to various data processing apparatuses.
[0063]
The present invention can be applied on condition that at least a CPU is included.
[0064]
【The invention's effect】
That is, after unstacking, a fault signal for transitioning the central processing unit to the instruction waiting state is asserted, and the instruction waiting state release request signal is asserted in the central processing unit instruction waiting state. And a control means for releasing the instruction waiting state of the processing unit, so that in the instruction waiting state of the central processing unit, the instruction waiting state release request signal is asserted and the central processing unit The instruction wait state is released. Thereby, it is possible to synchronize different microprocessors and improve the development efficiency of the user system by parallelizing the emulation.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration example of an emulator main body in an emulation system according to the present invention.
FIG. 2 is a block diagram illustrating a configuration example of an on-chip controller 17 included in the emulator main body.
FIG. 3 is a block diagram illustrating a configuration example of an emulation processor used in the emulation system.
FIG. 4 is a block diagram illustrating a configuration example of a communication module included in the emulation processor.
FIG. 5 is an explanatory diagram of an overall configuration example of the emulation system.
FIG. 6 is a flowchart from the break mode to the return to the user mode in the emulation processor.
FIG. 7 is a timing chart from the break mode to the return to the user mode in the emulation processor.
FIG. 8 is an explanatory diagram of another configuration example of the emulation system.
FIG. 9 is an explanatory diagram of another configuration example of the emulation system.
FIG. 10 is an explanatory diagram of another configuration example of the emulation system.
FIG. 11 is an explanatory diagram of another configuration example of the emulation system.
FIG. 12 is a block diagram illustrating a configuration example of an emulator main body in another configuration example of the emulation system.
FIG. 13 is an explanatory diagram of another configuration example of the emulation system.
FIG. 14 is a block diagram illustrating a configuration example of an emulator main body in another configuration example of the emulation system.
[Explanation of symbols]
11 Control CPU
12 Break circuit
13 Trace circuit
14 Monitor circuit
15 Farm 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 Farm RAM
211C break circuit
211D Trace buffer
212 RAM
213 CPU
214 Bus controller
215 Peripheral module
216 emulation controller
216A High / low register
216B Break stack register
216C break control circuit
216D Fault control circuit
217 or gate
511 First emulation processor
512 Second emulation processor

Claims (5)

一つのパッケージ内に、それぞれオンチップデバックを実行可能な第1及び第2のマイクロプロセッサが搭載されて成るマイクロプロセッサシステムであって、
1のマイクロプロセッサは、ユーザプログラムを実行可能な第1の中央処理装置と、予め設定されているブレーク条件が成立したことを判別してブレーク制御を行う第1ブレーク制御回路とを有し、
前記第2のマイクロプロセッサは、ユーザプログラムを実行可能な第2の中央処理装置と、予め設定されているブレーク条件が成立したことを判別してブレーク制御を行う第2ブレーク制御回路とを有し、
前記第1ブレーク制御回路及び第2ブレーク制御回路は、前記ブレーク条件が成立してブレークモードに移行したとき、ブレークモードを示す制御信号を出力可能とされ、
前記第1のマイクロプロセッサ及び前記第2のマイクロプロセッサは、一方のマイクロプロセッサがブレークモードからの復帰の際に命令待ち状態になり、他方のマイクロプロセッサのブレークモードからの復帰の際に当該他方のマイクロプロセッサから出力される所定の信号に応じて前記一方のマイクロプロセッサの命令待ち状態が解除されることにより、ブレークモードからの復帰後のユーザプログラム実行開始時点での同期処理が可能とされて成ることを特徴とするマイクロプロセッサシステム。
A microprocessor system in which first and second microprocessors each capable of executing on-chip debugging are mounted in one package,
The first microprocessor comprises a first and a central processing unit capable of executing a user program, a first break control circuit for break control to determine that the break condition is satisfied, which is set in advance ,
The second microprocessor includes a second central processing unit capable of executing a user program, and a second break control circuit that performs break control by determining that a preset break condition is satisfied. ,
The first break control circuit and the second break control circuit can output a control signal indicating the break mode when the break condition is satisfied and the break mode is entered ,
The first microprocessor and the second microprocessor are in an instruction waiting state when one of the microprocessors returns from the break mode, and when the other microprocessor returns from the break mode, the other microprocessor The instruction waiting state of one of the microprocessors is canceled in response to a predetermined signal output from the microprocessor, thereby enabling synchronization processing at the start of user program execution after returning from the break mode. A microprocessor system characterized by that.
前記第1及び第2のマイクロプロセッサは、前記ブレークモードに移行したとき、メモリに格納される所定のプログラムを実行することを特徴とする請求項記載のマイクロプロセッサシステム。It said first and second microprocessors when a transition to the break mode, the microprocessor system of claim 1, wherein executing a predetermined program stored in the memory. 前記マイクロプロセッサシステムは、一台のエミュレータを接続可能であって、
前記エミュレータは、前記ブレークモードに移行したときエミュレーション動作を制御することが可能であることを特徴とする請求項記載のマイクロプロセッサシステム。
The microprocessor system can be connected to one emulator,
3. The microprocessor system according to claim 2 , wherein the emulator can control an emulation operation when the break mode is entered.
前記第1及び第2の中央処理装置は、所定の命令を実行することで、前記ユーザモードへ移行するための復帰処理を行うことが可能であることを特徴とする請求項記載のマイクロプロセッサシステム。4. The microprocessor according to claim 3, wherein the first and second central processing units can perform a return process for shifting to the user mode by executing a predetermined instruction. system. 前記第1及び第2の中央処理装置は、ブレークモードからの復帰の際に復帰命令を実行したとき、前記ブレークモードに移行するときに保持していたプログラムカウンタの値をアンスタックすることを特徴とする請求項記載のマイクロプロセッサシステム。The first and second central processing units unstack the value of the program counter held when shifting to the break mode when a return instruction is executed upon return from break mode. The microprocessor system according to claim 4 .
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 JP2001084158A (en) 2001-03-30
JP4084912B2 true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8027828B2 (en) * 2006-05-31 2011-09-27 Cadence Design Systems, Inc. Method and apparatus for synchronizing processors in a hardware emulation system

Also Published As

Publication number Publication date
JP2001084158A (en) 2001-03-30

Similar Documents

Publication Publication Date Title
JP4335999B2 (en) Semiconductor integrated circuit device with built-in processor
JP2651916B2 (en) In-circuit emulator
JP5536297B2 (en) Semiconductor integrated circuit and semiconductor integrated circuit test system supporting co-debugging function
JPH02287635A (en) Debugging peripheral equipment for microcomputer,microprocessor and core processor integrated circuit
JPH07182204A (en) Integrated microprocessor, computer development system and test method of integrated processor
US20210133065A1 (en) Processor with debug pipeline
US20170115348A1 (en) Methods and circuits for debugging circuit designs
JP2008507025A (en) Emulation and debug interface for integrated circuit testing
JP3003782B2 (en) Development support equipment
CN209765501U (en) JTAG-based multiprocessor simulation debugging device
JP4084912B2 (en) Microprocessor system
US7774190B1 (en) Sleep and stall in an in-circuit emulation system
US9581643B1 (en) Methods and circuits for testing partial circuit designs
JP2001249823A (en) Microcomputer development assisting device
JP4600134B2 (en) Multiprocessor system
JP2004094451A (en) On-chip jtag interface circuit and system lsi
JP2004164113A (en) Resetting circuit and resetting method for multiple cpu
JP2001350648A (en) Microcomputer
TWI774116B (en) Automatic detection circuit for integrated circuit and automatic detection method for the same
CN207946806U (en) A kind of debugger and debugging apparatus
KR20070035570A (en) Emulation and debug interfaces for integrated circuit testing
JP2001084161A (en) Data processor
JP2010231818A (en) Debugging system
JP2632891B2 (en) System development equipment
Sharma et al. Design of Generic Debug Infrastructure of SoC

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