JP2004086447A - Microcomputer - Google Patents

Microcomputer Download PDF

Info

Publication number
JP2004086447A
JP2004086447A JP2002245131A JP2002245131A JP2004086447A JP 2004086447 A JP2004086447 A JP 2004086447A JP 2002245131 A JP2002245131 A JP 2002245131A JP 2002245131 A JP2002245131 A JP 2002245131A JP 2004086447 A JP2004086447 A JP 2004086447A
Authority
JP
Japan
Prior art keywords
data transfer
data
emulation
microcomputer
debugging
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002245131A
Other languages
Japanese (ja)
Inventor
Naomiki Mitsuishi
三ッ石 直幹
Koji Yoneyama
米山 浩司
Hiroshi Miyashita
宮下 浩
Atsushi Hirose
廣瀬 敦
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
Renesas Semiconductor Package and Test Solutions Co Ltd
Hitachi Solutions Technology Ltd
Original Assignee
Renesas Technology Corp
Hitachi ULSI Systems Co Ltd
Renesas Northern Japan Semiconductor Inc
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, Hitachi ULSI Systems Co Ltd, Renesas Northern Japan Semiconductor Inc filed Critical Renesas Technology Corp
Priority to JP2002245131A priority Critical patent/JP2004086447A/en
Publication of JP2004086447A publication Critical patent/JP2004086447A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To improve debugging efficiency without complicating the system of a microcomputer and without increasing an interface signal. <P>SOLUTION: By a command of an interface for debugging (UDI), a data transfer unit (DTC) is started up, required data are read and written in a data register of the interface for debugging to allow the data to be outputted from the interface for debugging so that time for stopping the execution of a user program is minimized. The contents of a required memory can be read, and the required data can be rewritten by reversing the direction of data transfer. Thereby, the improvement in usability and efficiency in the debugging of the microcomputer (5) is achieved. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、データ処理装置などのオンチップデバッグ技術に関し、特に、エミュレーション機能を内蔵したマイクロコンピュータなどのシステムLSI、更に、その開発装置に利用して有効な技術に関するものである。
【0002】
【従来の技術】
シングルチップマイクロコンピュータを用いた応用システムの開発を行うために、いわゆる、インサーキットエミュレータと呼ばれるマイクロコンピュータ開発装置が用いられる。マイクロコンピュータ開発装置は、パーソナルコンピュータなどのシステム開発装置と、開発中の応用システム(ユーザシステム)との間に、ケーブル等を介して接続され、その応用システムに装着されるべきシングルチップマイクロコンピュータ(ターゲットマイクロコンピュータ)の機能を代行しつつ、デバッガとしての機能を有し、ソフトウェア或は応用システムの開発を支援するものである。このマイクロコンピュータ開発装置には上記シングルチップマイクロコンピュータに対応したエバリュエーションチップと呼ばれる、評価用のエミュレーション用プロセッサが搭載されている。エミュレーション用プロセッサはシングルチップマイクロコンピュータを包含する機能に、マイクロコンピュータの内部状態を出力したり、マイクロコンピュータの動作を制御したりする専用の機能を追加することにより、マイクロコンピュータ開発装置の開発が容易にされる。マイクロコンピュータ開発装置については、例えば、昭和59年11月30日オーム社発行の『LSIハンドブック』第562頁及び第563頁などに記載され、また、エミュレーション用プロセッサについては、例えば特開昭63−106840号公報などに記載されている。
【0003】
インサーキットエミュレータを用いる場合、かかるインサーキットエミュレータから延設されたケーブルの先端に設けられたコネクタをユーザシステムなどの応用システム上のマイクロコンピュータ用ソケットに接続することが多い。インサーキットエミュレータ内のエミュレーション用プロセッサは上記ケーブルやソケットを介して、応用システムに接続されるため、信号の遅延が大きくなり、信号線路に雑音が生じたり、アナログ信号の精度が低下したりする場合がある。
【0004】
インサーキットエミュレータにおいては、ユーザプログラムの実行を停止させることなく、デバッグ用の機能を利用することが望まれている。これは、マイクロコンピュータが、その入出力機能を利用して、応用システムの制御を行っており、ユーザプログラムの実行を停止させると応用システムの制御が不可能になり、動作の継続が不可能になってしまうためである。
【0005】
上記エミュレーション用プロセッサに、エミュレーション用DMAコントローラを設け、CPUからバス権を獲得して、所要のデータ転送を行う技術が記載された文献の例としては、特開平8−328898号公報がある。この例では、インサーキットエミュレータ上にDMA転送用メモリを用意し、上記エミュレーション用DMAコントローラの制御を行っている。DMA転送用メモリは、2面用意され、アドレスを切り換えて、ホストCPUとのリード/ライトを行うようにしている。
【0006】
このようなDMAコントローラは、転送元アドレス、転送先アドレス、転送カウンタ、制御レジスタなどや、起動要因の選択や受付け論理を各チャネルに持つために、多数のチャネルのデータ転送を行おうとすれば、上記レジスタを多数組設けなければならない。また、専用のDMACを持つことは、DMACの論理に加えて、バス権の授受などの論理をマイクロコンピュータに必要とする。これらは、半導体集積回路装置全体の論理的・物理的規模を増大させてしまう。さらに、規模の増大は製造費用を増大させてしまう。上記例には、既存のDMACをエミュレーション用DMACとして共用することも記載されているが、ユーザの使用制限が生じてしまう。例えば、DMACを用いて、モータ制御や、各種インタフェースとの間のデータ転送などを行うような応用では、DMACのチャネル数は多数必要になり、エミュレーション用DMACに資源を割くことは望ましくない。
【0007】
上記レジスタに配置すべき情報を、記憶密度が高い汎用のRAM(ランダムアクセスメモリ)上に配置し、論理的、物理的規模の増大を防いだデータ転送装置、いわゆるデータトランスファコントローラ(DTC)を内蔵したものについて記載された文献の例としては、特開平1−125944号公報や、特開平7−129537公報などがある。
【0008】
特開平7−129537公報には、さらに、データ転送装置が行うデータ転送のアドレス、データ、転送データ数または転送方法のうちの少なくとも1つ以上の情報を記憶手段に格納可能とし、この少なくとも1つ以上の情報には、データ転送装置の1回の動作で複数組の少なくとも1つ以上の情報によるデータ転送を指定可能な情報を含む例が記載されている。
【0009】
【発明が解決しようとする課題】
エミュレータの機能として、ユーザプログラムの実行時間の測定なども必要とされる。ユーザシステムの処理が、所要の時間内に納まるかを確認したり、処理速度の改善が必要な場合に、処理時間の内訳を調べたりするためである。ユーザプログラムは、C言語などを用いて開発される例が多いから、関数単位の処理時間を計測できることが望ましい。
【0010】
一方、エミュレータの形態として、オンチップデバッグ方式によって、デバッグを行う例が増えている。すなわち、マイクロコンピュータなどの実チップに、デバッグ用の機能およびインタフェースを設けるようにし、それをユーザシステムに実装し、上記デバッグ用のインタフェースを使用して、カードの形態でなるようなカードエミュレータに接続し、このカードエミュレータを、パーソナルコンピュータなどのホストコンピュータのカードスロットに挿入してデバッグが行われる。
【0011】
かかるオンチップデバッグ方式をとれば、マイクロコンピュータはユーザシステムに実装されているから、不所望の遅延を生じたり、雑音を増加させたり、アナログなどの精度を低下させたりする要因がない。また、デバッグ用のインタフェースを切り離せば、そのままユーザシステムとして使用できる。半導体集積回路としても、エミュレーション用プロセッサと、量産用のマイクロコンピュータとを別個に開発する必要がないため、開発効率に優れ、特に、システムLSIなどの少量多品種に適している。また、応用システムを最終製品に組みこんだ後も、動作解析や調整に用いることもできる。そのようなオンチップデバッグ方式において、上記デバッグ用の機能は、デバッグ専用であって、実動作には不要である。従って、マイクロコンピュータの製造費用を低減するために、デバッグ用の論理的・物理的規模を最小限にすることが望ましい。また、エミュレータとのインタフェースはその信号線数なども限定されるから、十分なデバッグ用情報を入出力することは困難とされている。
【0012】
本発明の目的は、マイクロコンピュータのシステムを複雑化せずに、しかもインタフェース信号を増加させずに、デバッグ効率を向上させるための技術を提供することにある。
【0013】
本発明の別の目的は、ユーザシステムの動作中に、マイクロコンピュータの所要のメモリの内容をモニタしたり、書き換えたりするための技術を提供することである。
【0014】
本発明の別の目的は、C言語などを使用したプログラムにおいて、関数毎の処理時間を容易に測定可能にするため技術を提供することである。
【0015】
本発明の上記並びにその他の目的と新規な特徴は本明細書の記述及び添付図面から明らかになるであろう。
【0016】
【課題を解決するための手段】
本願において開示される発明のうち代表的なものの概要を簡単に説明すれば下記の通りである。
【0017】
すなわち、デバッグ用インタフェースと、転送情報をRAMなどのメモリに配置し、この転送情報をリードしてデータ転送を行うデータ転送装置とを含み、上記デバッグ用インタフェースは、データレジスタと、インストラクションレジスタと、インストラクションレジスタの内容を解読する手段を持ち、インストラクションが所定の内容であるとき、上記データ転送装置へ転送要求を発生し、上記データ転送装置は、与えられた転送情報に従い、上記データレジスタと所要のメモリとの間のデータ転送を行うようにする。
【0018】
データ転送装置は、ユーザ機能と兼用にし、この切り換えは、起動要求と同じに与えられるベクタで認識するようにする。
【0019】
バス制御手段は、デバッグ用/ユーザ用にかかわらず、データ転送装置と中央処理装置のバス権を調停する。また、データ転送装置と中央処理装置のバスアクセスの制御を行う。
【0020】
アドレスなど内部バスを監視してブレーク要求を発生したり、内部バスの状態をトレースしたりする手段を設ける場合は、不所望なブレーク要求や不所望なトレースを避けるため、上記デバッグ用データ転送時において内部バスの状態を無視するようにする。
【0021】
また、サブルーチン分岐、サブルーチンリターン、例外処理分岐、例外処理リターンの命令実行時に所定のステータス信号を出力するように、ブレーク処理を行う。
【0022】
さらに、上記信号ないしブレーク処理を示す信号により、カウント可能なパフォーマンスカウンタを内蔵することができる。
【0023】
上記した手段によれば、ユーザデバッグインタフェース回路にデータ転送装置の起動コマンドを追加することにより、少ない信号線数で、かつ、元々のマイクロコンピュータの機能への追加を最小限にし、デバッグ用の機能の増加を最小限にし、中央処理装置の動作を停止する時間を最小限にして、所望のアドレスの内容をリードしたり、ライトしたりすることができる。
【0024】
データ転送装置はユーザ機能と兼用であり、従って、バス権調停もユーザ機能と同一であり、転送要求などもユーザ機能と共通化でき、論理的規模の増加を抑止し、また、マイクロコンピュータのシステムを複雑化させることがない。データ転送装置は、転送情報をメモリ上に配置し、これをエミュレーションコントローラ内に配置可能にし、ユーザ資源への制約をなくすることもできる。
【0025】
アドレスなど内部バスを監視してブレーク要求を発生したり、内部バスの状態をトレースしたりする手段を有する場合は、上記デバッグ用データ転送時には、内部バスの状態を無視するようにし、ユーザのプログラム実行によらない状態、例えばデバッグ用データ転送でブレークが発生したり、トレースに取得されたりする不都合を抑止できる。上記デバッグ用データ転送は、トレースに取得されるようにしても良い。尚、上記デバッグ用データ転送をトレースに取得するか否かを選択可能にしても良い。
【0026】
パフォーマンスカウンタにより、エミュレーション用の信号を増加させることなく、関数毎の実行時間の測定を容易に実現できる。
【0027】
【発明の実施の形態】
図2には、本発明にかかるマイクロコンピュータを含むオンチップデバッガの構成例が示される。
【0028】
オンチップデバッガは、カードエミュレータ2、インタフェースケーブル3、ホストコンピュータ4、ならびにデバッグ機能内蔵のマイクロコンピュータ5を含む。カードエミュレータ2は、例えばPCMCIAカード、あるいはPCIカードなどの形態を採る。ホストコンピュータは、PCMCIAスロット、あるいはPCIスロットなどのPCスロットを搭載したパーソナルコンピュータなどである。また、マイクロコンピュータ5には、デバッグ対象のユーザプログラムを格納するフラッシュメモリなどが設けられており、このデバッグ機能内蔵のマイクロコンピュータ5は、ユーザシステムであるプリント配線基板PCBなどに搭載されている。
【0029】
カードエミュレータは2、ホストコンピュータ4のPCカードスロットに挿入され、該カードエミュレータ2とプリント配線基板PCBとは、所要の通信手段を実現するインタフェースケーブル3を介して接続されている。そして、ホストコンピュータ4に入力されたコマンドなどに呼応して、ユーザプログラムをフラッシュメモリなどにダウンロードするとともに、これをデバッグする。
【0030】
ホストコンピュータ4を、携帯用パーソナルコンピュータなどとすることによって、実使用状態でのデバッグも可能である。例えば、応用システムがディジタルカメラの場合など、屋外でのデバッグや調整も可能になる。
【0031】
図1には、上記マイクロコンピュータの構成例が示される。
【0032】
マイクロコンピュータ5は、特に制限されないが、シングルチップ型であり、全体の制御を司るCPU(中央処理装置)、割込コントローラINT、CPUの処理プログラムなどを格納するメモリであるROM(リードオンリーメモリ)、CPUの作業領域ならびにデータの一時記憶用及びスタック用のメモリとすることができるRAM(ランダムアクセスメモリ)、データ転送装置DTC、バスコントローラBSC、および入出力装置I/Oの機能ブロック乃至はモジュールから構成され、これらはユーザに開放された機能である。上記ROMにはフラッシュメモリを適用することができる。
【0033】
入出力装置I/Oとしては、例えば、タイマ、シリアルコミュニケーションインタフェース(SCI)、A/D変換器、入出力ポート(IOP)、クロック発振器(CPG)などが含まれる。各入出力ポートは、外部割込みの入力、或いはタイマ、SCI、A/D変換器の入出力と兼用されている。すなわち、タイマ、SCI、A/D変換器は、それぞれ入出力信号を有し、入出力ポートと兼用にされた端子介して、外部と入出力される。同様に、アドレスバス、データバス、バス制御信号入出力と兼用にすることもできる。
【0034】
デバッグ機能として、エミュレーション用プログラムの一部が格納されるメモリERAMを備え、エミュレーションに関連するモジュールに対する制御信号を形成するエミュレーション制御回路EMC、アドレスなどの内部バスまたはCPUのプログラムカウンタなどを監視し、エミュレーションの際にユーザが指定したブレークポイントでCPUに対しプログラムの実行停止を要求したりするブレークコントローラEBC、エミュレーション中にバスBUS上の信号を採取するためのトレースバッファTBF、外部からの制御信号や転送クロックを受けたり該転送クロックに同期して、コマンドを入力したり、所要の内容を外部へ出力したりするユーザデバッグインタフェース回路UDI、処理時間の測定を行うパフォーマンスカウンタPCNTなどを含み、これらの機能ブロック乃至はモジュールは、アドレスバスおよびデータバスを含む内部バスBUSを介して互いに接続されている。
【0035】
これらは、公知の半導体製造技術により、1つの半導体基板上に形成されるが、マルチチップモジュールなどとして、複数の半導体集積回路を1つのパッケージに封入した構成をとってもよい。
【0036】
CPUは、命令デコーダやブレーク要求受付機能、ブレーク命令実行機能、ブレークリターン命令実行機能などを含んでいる。また、後述の関数ブレークを指定する信号が活性状態のとき、サブルーチン分岐命令、サブルーチンリターン命令、例外処理、例外処理リターン命令実行後にブレーク例外処理を行うことが可能とされる。
【0037】
ブレーク例外処理を実行すると、特に制限はされないものの、上記エミュレーション制御回路EMC上のメモリERAM上に分岐する。
【0038】
上記エミュレーション制御回路EMCは、所要の制御レジスタなどを有し、所定のブレークモード時のCPUによる制御に従って、デバッグ機能内蔵マイクロコンピュータの制御を行う。上記関数ブレークを指定する信号FCBRKは、CPUに供給される。ユーザプログラムの実行を停止し、デバッグ用プログラムを実行している状態であるブレークモードを示すブレークモード信号BRKMは、ブレークコントローラEBC、パフォーマンスカウンタPCNT、及びトレースバッファTBFに供給される。
【0039】
上記デバッグ用インタフェースUDIは、所定のブレークモード時のCPUによる制御に従って、随時、外部のカードエミュレータとの間のデータ通信を行なう。特に制限されないが、このデータ通信はシリアル通信とされ、エミュレーションのための信号線数を少なくしている。
【0040】
また、本例では、ブレークモード以外のときに関数毎の実行時間を計測することができる。例えばパフォーマンスカウンタPCNTは、48ビットのカウンタが2個設けられており、それぞれ独立に計数すべき状態発生を設定できるように構成されている。
【0041】
バスコントローラBSCは、CPU及びデータ転送装置DTCのバス権要求信号に基づいて、所定のタイミングでバス権調停を行う。このバス権調停結果は、バス権アクノレッジ信号BSACKとして、CPU、データ転送装置DTCそのほかのモジュールに伝達される。バスコントローラBSCは、内蔵メモリ、内部I/Oレジスタ、外部アドレスなどに応じて、所要のバスアクセスの制御を行う。
【0042】
割込みコントローラINTは、上記タイマ、SCI、A/D変換器、外部入力の各割込み信号を入力して、割込み要求信号をCPUに、または、転送要求をデータ転送装置DTCに出力する。
【0043】
CPUに割込要求信号が与えられると、CPUは実行中の処理を中断して、割込み例外処理状態を経て、所定の処理ルーチンに分岐し、所望の処理を行い、割込要因をクリアしたりする。所定の処理ルーチンの最後には、通常復帰命令がおかれ、この命令を実行することによって上記中断した処理を再開する。
【0044】
データ転送装置DTCに転送起動要求が与えられると、データ転送装置DTCはバス権要求信号を活性化し、バス権が獲得できると、所定のアドレスから転送情報をリードし、当該転送情報に基づいてデータ転送を行い、その後、転送情報を元のアドレスに書き戻す。
【0045】
かかるマイクロコンピュータ5にリセット信号RESが与えられると、CPUを始めとし、マイクロコンピュータ5はリセット状態になる。このリセットが解除されると、CPUはエミュレーション制御回路EMC上の所定のアドレスからリセット例外処理を行い、ユーザデバッグインタフェース回路UDI経由でコマンド入力を待つ。この間、そのほかのユーザ機能はリセット状態を継続する。入力されたコマンドに従い、所要の処理を行った後、ユーザプログラムに分岐(復帰)する。この後、ROMなどから命令をリードし、解読して、その解読内容に基づいて、データの処理、或いはRAM、タイマ、SCI、A/D変換器、入出力ポートなどとのデータ転送を行う。すなわち、CPUは、タイマ、SCI、A/D変換器、入出力ポートなどから入力されるデータ或いは機器の状態や指示(スイッチ、ボリュームなど)を参照しつつ、ROMなどに記憶されている命令に基づいて処理を行い、その結果に基づいて、入出力ポート、タイマなどを使用しつつ、外部に信号を出力し、機器の制御を行う。
【0046】
図3にはユーザデバッグインタフェース回路UDIの構成例が示される。
【0047】
ホストインタフェース(カードエミュレータとのインタフェース)として、制御信号入力(リセット、モード、クロック)、データ入力、データ出力を有する。制御信号に従って、データの入出力が行われる。後述のレジスタの選択は、制御信号入力(モード)によって行われる。
【0048】
ユーザデバッグインタフェース回路UDIは、インストラクションレジスタSDIR、ステータスレジスタSDSR、データレジスタSDDRのレジスタを持つ。インストラクションには、リセット要求、リセット要求解除、ブレーク要求、ブレーク要求、DTC起動要求(2種類)などがあり、インストラクションレジスタの内容を解読して、所定の制御信号を発生する。
【0049】
ステータスレジスタSDSRは、SDTRFフラグを含む。SDTRFが論理値“0”にクリアされているときは、CPUなどのマイクロコンピュータ内部からデータレジスタSDDRにライト可能状態であり、SDTRFフラグが論理値“1”にセットされているときは、ホストインタフェースを介してデータレジスタSDDRへの転送可能状態である。
【0050】
また、内部バスに接続され、ブレークモードのとき、CPUからリード/ライト可能である。さらに、データ転送装置DTCのデバッグ用データ転送を示すステータスEDTCに従って、データ転送装置DTCによるデータレジスタSDDRのリード/ライトを可能にしている。
【0051】
図4には、データ転送装置DTCの構成例が示される。
【0052】
上記ユーザデバッグインタフェース回路UDIのDTC起動要求、およびそのほかマイクロコンピュータの上記入出力装置(I/O)の割込み要求は、割込みコントローラに入力される。これらは、対応するDTCイネーブルレジスタ(DTER)によって、CPUへの割込み要求を行うか、DTCへの転送要求を行うかが指定され、それぞれ優先順位を判定し、選択された要因に対応するベクタとともに、割込み要求または転送要求が与えられる。
【0053】
データ転送装置DTCは、DTC転送要求DTCRQとベクタDTVECを取り込む。転送要求が発生すると、DTBRQによって、バスコントローラにバス権を要求し、BSACKによってバス権が受けつけられたことを確認して、所定のベクタから転送情報開始アドレスをリードし、かかる転送情報開始アドレスから転送情報(モード、転送元/先アドレス、カウンタ)をリードして、データ転送装置DTC内に格納し、この転送情報に従って、データ転送を行う。データ転送後、更新された転送情報は元のアドレスに書き戻される。
【0054】
図5には、マイクロコンピュータ5のメモリマップが示される。
【0055】
ユーザ用のDTCのベクタアドレスは、ROM領域に割当てられるが、データ転送装置DTCのデバッグ用ベクタアドレスは、エミュレーション制御回路EMC内、例えばメモリERAMに配置される。
【0056】
転送情報は、ベクタによって示されるアドレスに配置される。通常、ユーザ用のDTC転送情報はRAMに配置される。デバッグ用のDTCの転送情報は、ERAMまたはRAMに配置される。ERAMに配置すれば、ユーザの資源を使用しないので、ユーザに制限を発生することがない。ERAMを使用しない場合、ERAMにエミュレーション用プログラムを、より多く配置することができ、エミュレーションプログラムの実行効率を向上できる。
【0057】
図6には、デバッグ用データ転送における所要の動作タイミングが示される。
【0058】
デバッグ用インタフェースUDIに所定のDTC起動要求コマンドが入力されると、デバッグ用インタフェースUDIが起動要求を発生する。これが割込みコントローラで受けつけられ、優先順位を判定し、所定のタイミングで、データ転送装置DTCに対して、転送要求と、デバッグ用データ転送を示すベクタが与えられる。
【0059】
データ転送装置DTCは転送要求を受けつけると、バス権を要求し、それが受付けられると、ベクタで与えられたアドレスから転送情報をリードする。このとき、デバッグ用データ転送を示すベクタは上位ビット(ビット7〜2)がすべて1であることによって示され、この場合は、上記エミュレーション制御回路EMC内、例えばERAMのアドレス(パラメータなどであるasebaseが先頭アドレスとされる)とされる。この論理記述例を以下に示す。

Figure 2004086447
【0060】
すなわち、ベクタに示されるアドレスから転送情報がリードされ、これに基づいてデータ転送が行われる。デバッグ用データ転送を示すステータス信号EDTCが活性化されると、ステータス信号EDTCと、UDIデータレジスタのリードまたはライトに従って、SDIFが論理値“1”にセットされる。その後、転送情報を元のアドレスに書き戻す。転送情報を書き戻すことにより、同じアドレスの内容を繰返しリードし、変化を監視するような、繰返し利用を可能にでき、また、複数のDTC転送を順次行うことができる。
【0061】
データ転送装置DTCは、ベクタのリード、転送情報のリード、データ転送、転送情報のライトのサイクル(例えば、転送情報を3回リード/ライトする場合、9バスサイクル)の期間バス権を獲得する。CPUがバス権を失うことによって、ユーザプログラムの実行が一時停止されるが、この時間は、ブレーク例外処理や、エミュレーションプログラムが実行される時間に比較して短い。
【0062】
エミュレーションの機能としては以下の通りである。
【0063】
すなわち、ホストインタフェースを介して、インストラクションレジスタ(SDIR)へインストラクションを入力しDTC転送要求を発生させ、所要のデータ転送を行った後、ユーザデバッグインタフェース回路UDIのデータレジスタ(SDDR)を経由して、メモリ(またはI/Oレジスタ)の内容を読み出すことができる。
【0064】
この手順は以下の通りである。
【0065】
まず、エミュレーション用プログラム実行状態で、あからじめ割込みコントローラや、DTCの転送情報の設定を行う。
【0066】
マイクロコンピュータ5のメモリの内容は、以下の手順でリードすることが出きる。
【0067】
(1)所定のシーケンスで、デバッグ用インタフェースUDIのステートマシンが初期化され、SDTRFビットが論理値“1”にセットされる。
【0068】
(2)エミュレータからユーザデバッグインタフェース回路UDIへDTC転送要求コマンドを入力する。シフトレジスタからインストラクションレジスタへデータがコピーされる。
【0069】
(3)エミュレータはSDTRFビットが、論理値“1”であることを確認する。
【0070】
(4)特に制限はされないものの、SDTRFビットをクリアするために、ダミーデータの転送を行う。
【0071】
(5)割込みコントローラINTへのDTC転送要求が行われ、データ転送装置DTCへ転送要求と所定のベクタが与えられ、データ転送装置DTCが起動される。
【0072】
(6)データ転送装置DTCは、予め設定された転送情報に基づきメモリからユーザデバッグインタフェース回路UDIのデータレジスタSDDRへデータ転送を行う。デバッグ用データ転送時には、データ転送装置DTCはデバッグ用データ転送を示すステータス信号EDTCを活性化する。このステータス信号EDTCが活性状態のときは、ブレークコントローラやトレースバッファは、ユーザのプログラムの実行に基づかない、データ転送装置DTCのアドレスやデータを無視し、不所望のブレークやトレースの取得を行わないようにする。ユーザデバッグインタフェース回路UDIは、EDTC信号をモニタし、データレジスタライトなどの所定のタイミングでSDTRFビットを論理値“1”にセットする。
【0073】
(7)次にエミュレータ2はSDTRFビットをモニタし、論理値“1”であることにより、データ転送装置DTCのリードが終了していることを確認し、データを取り込む。マイクロコンピュータ5のメモリの内容を書換える場合、上記に対して以下の点で相違する。
【0074】
(8)エミュレータ2はSDTRFビットが、論理値“1”であることを確認し、SDTRFビットが論理値“1”ならデータレジスタSDDRへデータ転送が可能な為エミュレータから、メモリに書き込みたいデータをデータレジスタSDDRへ転送する。
【0075】
(9)エミュレータ2はSDTRFビットが論理値“1”を観測し、データ転送装置DTCのライト終了を確認する。
【0076】
図7には、デバッグ用データ転送方法が示される。
【0077】
2つのDTC起動コマンドを使用して、上記手順を2回1組で実行し、任意の複数のアドレス(adr1〜4)の情報を取り出して、それをホストコンピュータ4上に表示することができる。
【0078】
カードエミュレータ2は、まず、UDIデータレジスタに第2の転送情報を書き込む。例えば、アドレスadr1からUDIデータレジスタへの転送指示がなされる。
【0079】
DTC起動要求コマンド1を入力して、第1のDTC転送を起動する。第1のDTC転送では、上記UDIデータレジスタ上の第2の転送情報が、第2のDTC転送情報領域に格納される。
【0080】
次に、DTC起動要求コマンド2を入力して、第2のDTC転送を起動する。第2のDTC転送では、指定されたアドレス(adr1)が、UDIデータレジスタに格納される。
【0081】
そして、上記UDIデータレジスタをホストコンピュータ4へ読み出す。これを必要な回数(本例では4回)、指定するアドレスを変えて(adr1〜4)実行すればよい。エミュレータ2からの転送情報は、ホストコンピュータ4の表示装置(モニタ)に、所望のウィンドウなどの所望の配置で表示することができる。
【0082】
2つのDTC転送要求コマンドを持つ代わりに、チェイン転送を用いることもできる。チェイン転送は、例えば特開平7−129537号公報などに記載されている通り、1回の起動要求に対し、連続したアドレスに配置された複数の転送情報に基づいて、データ転送が行われる。第1の転送情報によって、デバッグ用インタフェースUDIのデータレジスタに入力されたデータを、第2の転送情報のアドレスに格納する。その後第2の転送情報に基づき、データ転送を行う。
【0083】
尚、デバッグ用インタフェースUDIのデータレジスタのバイト数や、データ転送装置DTCの転送情報の配置に対応して、種々の変形が可能である。
【0084】
図8にはCPUの関数ブレークに必要な制御論理のブロック構成が示され、図9には関数ブレークの動作タイミングが示される。
【0085】
エミュレーション制御回路EMCの、関数ブレーク許可ビットを論理値“1”にセットすると、関数ブレーク許可信号FCBRKが活性化される。CPUは、サブルーチン分岐命令、サブルーチンリターン命令、ユーザ例外処理(割込みなどを含む)、ユーザ例外処理リターン命令の実行のデコード信号dec_fcbとの論理積で、ブレーク例外処理のオペレーションコードが、インストラクションレジスタに格納され、ブレーク例外処理が実行される。CPUが実行する命令コードをopcodeとして、この論理は以下のように記述できる。
【0086】
Figure 2004086447
【0087】すなわち、命令の実行終了時点で、次の命令のロードを示すload信号が活性状態とされ、このとき、関数ブレーク許可信号FCBRKが活性化され、上記命令実行後であり(dec_fcb)、ブレークモードでなければ(〜brkm)、ブレーク例外処理を示す命令コード‘breakが取込まれる。尚、brkmは、図2のBRKMと等価な信号である。
【0088】
命令コード‘breakを実行することにより、ブレーク例外処理が実現され、このとき、ブレークモード信号brkmが活性化される。これによってパフォーマンスカウンタPCNTは停止される。ブレークモード中のエミュレーション処理で、パフォーマンスカウンタの内容をリードし、前回のパフォーマンスカウンタの値と減算することによって、ユーザプログラムの実行時間を得ることができる。また、サブルーチンリターン命令実行後のエミュレーション処理で、上記実行時間を得ることによって、対応する関数の実行時間を計測することができる。関数が多重に呼び出されたり、割込みなどの例外処理が挿入されたりした場合は、その場合もブレークするから、その時間も計測して、差し引けばよい。
【0089】
図10に、上記CPUの開発環境の概略を示す。
【0090】
使用者は、各種エディタなどを用いて、C言語乃至アセンブリ言語でプログラムを作成する。これは通常、複数のモジュールに分割して作成される。Cコンパイラ101は、使用者の作成したそれぞれのC言語ソースプログラムを入力し、アセンブリ言語ソースプログラム乃至オブジェクトモジュールを出力する。
【0091】
アセンブラ102は、アセンブリ言語ソースプログラムを入力し、オブジェクトモジュールを出力する。
【0092】
リンケージエディタ103は、上記Cコンパイラやアセンブラの生成した、複数のオブジェクトモジュールを入力して、各モジュールの外部参照や相対アドレスなどの解決を行い、1つのプログラムに結合して、ロードモジュールを出力する。
【0093】
ロードモジュールは、シミュレータ/デバッガ104に入力して、パーソナルコンピュータなどのシステム開発装置上で、CPUの動作をシミュレーションし、実行結果を表示し、プログラムの解析や評価を行うことができる。また、エミュレータ105に入力して、上記ユーザデバッグインタフェース回路UDIを介して、ブレークモード状態で、上記マイクロコンピュータ5のフラッシュメモリでなるようなROMに書きこみ、実際の応用システム上などで動作させる、いわゆるインサーキットエミュレーションを行ない、マイクロコンピュータ5全体としての実動作の解析や評価を行うことができる。図2の形態をとることにより、随時フラッシュメモリでなるようなROMの書換えを行うことができ、デバッグないしエミュレーションに好適である。
【0094】
このとき、例えば、関数seqが以下のように使用される。
Figure 2004086447
【0095】
このとき、次のようにコンパイルされる。
Figure 2004086447
【0096】
関数seqは、サブルーチン分岐命令JSRになり、関数の処理はアドレス_seq以降に記述され、その最後には次のようにサブルーチンリターン命令RTSが配置される。
Figure 2004086447
【0097】
関数ブレークを使用することにより、JSR実行からRTS実行までの関数segの処理時間を測定することができる。
【0098】
上記の例によれば、以下の作用効果を得るものである。
【0099】
(1)デバッグ用インタフェースUDIのコマンドにより、データ転送装置DTCを起動して、所要のデータをリードし、デバッグ用インタフェースのデータレジスタにライトして、当該データをデバッグ用インタフェースから出力可能にすることにより、ユーザプログラムの実行を停止する時間を最小限にして、所要のメモリの内容をリードできる。また、データ転送の方向を逆にすることによって、所要のデータを書きかえることができる。これらにより、マイクロコンピュータ5のデバッグにおける使い勝手や効率の向上を実現できる。
【0100】
(2)データ転送装置DTCにおけるアドレスレジスタなどの転送情報をRAMに配置するようにすることにより、ユーザのリソースを使用することを最小限にし、少なくともユーザのデータ転送の資源を制限することなく、上記(1)の作用効果を得ることができる。これはエミュレーション用のメモリERAMを使用することを可能にし、限られたメモリERAMを有効活用することができる。デバッグ初期の段階などで、モニタしたり、書換えたりするメモリの量が多ければ、ユーザRAMを使用し、メモリERAMを、エミュレーション用プログラムに使用できる。デバッグがほぼ完了した状態で、少数のメモリのモニタや調整を行う場合には、メモリERAMを使用して、ユーザ資源に制約を与えることがない。データ転送装置DTCにベクタを与えて、デバッグ用データ転送を識別することにより、使用する要因数の増加が容易にできる。
【0101】
(3)複数のDTC起動要求コマンドないし、データ転送装置DTCのチェイン転送機能を用いて、転送情報を、デバッグ用インタフェースとデータ転送装置DTCを介して入力し、その後、所要のデータ転送を行うことによって、CPUがブレークすることなく、任意のアドレスのリード/ライトを行うことができる。転送情報の入力も、データ転送も同じ手段で行うことができ、資源の有効利用を図ることができる。また、随時、任意のアドレスを指定して、リードしたりライトしたりでき、これを繰返して、複数のアドレスをリードしたりライトしたりできるから、さらに使い勝手や効率の向上を実現できる。
【0102】
(4)データ転送装置DTCは、ユーザと共用することから、起動要求の優先順位の判定や、バス権調停なども共用でき、マイクロコンピュータシステムを複雑にすることがなく、マイクロコンピュータ自体の開発効率を向上できる。第2のデータ転送装置(DMACなど)を追加しても、ユーザ機能としての当該機能を実装すればよく、デバッグ用機能には直接の影響がなく、開発効率や資源の有効利用を損なうことがない。バスコントローラの制御を受け、任意のアドレスに、当該アドレスのバスインタフェースの種類に関係なく、アクセスすることが可能である。
【0103】
(5)デバッグ用インタフェースを用いることにより、少ない信号線数でのエミュレーションを可能にし、実装状態でのエミュレーションを可能にし、量産用のマイクロコンピュータとを別個に開発することを不要にできる。
【0104】
(6)サブルーチン分岐、例外処理実行、これらのリターン命令実行後にブレークする関数ブレーク機能により、関数の実行時間の測定が容易にできる。ブレーク状態でカウントを停止するパフォーマンスカウンタPCNTを用いることにより、エミュレーション用のインタフェース信号を増加させることなく、容易に関数の実行時間を計測できる。
【0105】
(7)CPUにデコード回路を追加することにより、ブレークポイントの設定などが不要である。CPUのデコード回路は、ほかの命令機能のデコードと、論理合成などによって共通化が実現できるから、論理規模の増加を最小限にすることができる。
【0106】
以上本発明者によってなされた発明を具体的に説明したが、本発明はそれに限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。
【0107】
例えば、モジュールの機能や信号入出力は、任意に変更可能である。
【0108】
UDIによるDTC起動要求に対して、DTCイネーブルレジスタを設ける必要はない。これを設ければ、ユーザデバッグインタフェース回路UDIによって、ユーザ割り込みを実行させることもできる。
【0109】
デバッグ用インタフェースUDIを、エミュレーション用プロセッサに設けて、インサーキットエミュレータとしても、本発明の機能を利用することもできる。
【0110】
関数ブレークも、エミュレーション用プロセッサないしインサーキットエミュレータでも利用可能である。
【0111】
データ転送装置の詳細も種々変形が可能である。例えば、制御レジスタや、転送情報の配置・構成、データ転送のモードなどは任意にできる。データ転送のモードとしては、リピートモードやブロック転送モードなどを適用することができる。チェイン転送も第1の転送情報のカウンタの値が0になったときのみ、第2の転送を行うことができる。
【0112】
以上の説明では主として本発明者によってなされた発明をその背景となった利用分野であるカードエミュレータを含むオンチップデバッガに適用した場合について説明したが、それに限定されるものではなく、その他のデバッガに適用することができる。
【0113】
本発明は少なくとも、エミュレーション乃至デバッグ用の機能とインタフェースを有することを条件に適用することができる。
【0114】
【発明の効果】
本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば下記の通りである。
【0115】
すなわち、データ転送装置を起動して、所要のデータをリードし、デバッグ用インタフェースのデータレジスタにライトして、当該データをデバッグ用インタフェースから出力可能にすることにより、ユーザプログラムの実行を停止する時間を最小限にして、所要のメモリの内容をリードできる。また、データ転送の方向を逆にすることによって、所要のデータを書きかえることができる。それにより、マイクロコンピュータのデバッグにおける使い勝手や効率の向上を実現できる。
【図面の簡単な説明】
【図1】本発明にかかるマイクロコンピュータの構成例ブロック図である。
【図2】上記マイクロコンピュータを含むオンチップデバッガの構成例説明図である。
【図3】上記マイクロコンピュータに含まれるデバッグ用インタフェースの構成例ブロック図である。
【図4】上記マイクロコンピュータに含まれるデータ転送装置の構成例ブロック図である。
【図5】上記マイクロコンピュータにおけるメモリマップの説明図である。
【図6】上記オンチップデバッガにおけるデバッグ用データ転送のタイミング図である。
【図7】上記オンチップデバッガにおけるデバッグ用データ転送方法の説明図である。
【図8】上記オンチップデバッガにおけるCPUの関数ブレークに必要な制御論理の構成例ブロック図である。
【図9】上記オンチップデバッガにおける関数ブレークの動作タイミング図である。
【図10】上記マイクロコンピュータに含まれるCPUの開発環境の概略説明図である。
【符号の説明】
2 カードエミュレータ
3 インタフェースケーブル
4 ホストコンピュータ
5 マイクロコンピュータ
CPU 中央処理装置
DTC データ転送装置
BSC バスコントローラ
ROM フラッシュメモリ
RAM ランダムアクセスメモリ
I/O 入出力装置
UDI ユーザデバッグインタフェース回路
TBF トレースバッファ
PCNT パフォーマンスカウンタ
EBC ブレークコントローラ
INT 割込コントローラ
EMC エミュレーション制御回路[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an on-chip debugging technology for a data processing device and the like, and particularly to a system LSI such as a microcomputer having an emulation function and a technology effective when used for a development device thereof.
[0002]
[Prior art]
In order to develop an application system using a single-chip microcomputer, a microcomputer development device called an in-circuit emulator is used. The microcomputer development device is connected between a system development device such as a personal computer and an application system (user system) under development via a cable or the like, and is a single-chip microcomputer ( It has the function of a debugger while acting on behalf of the function of the target microcomputer, and supports the development of software or application systems. This microcomputer development device is equipped with an evaluation emulation processor called an evaluation chip corresponding to the single-chip microcomputer. The emulation processor can easily develop a microcomputer development device by adding functions dedicated to outputting the internal state of the microcomputer and controlling the operation of the microcomputer to the functions including the single-chip microcomputer. To be. A microcomputer development apparatus is described in, for example, pages 562 and 563 of "LSI Handbook" issued by Ohmsha on November 30, 1984, and a processor for emulation is disclosed in, for example, No. 106840, and the like.
[0003]
When an in-circuit emulator is used, a connector provided at the end of a cable extended from the in-circuit emulator is often connected to a microcomputer socket on an application system such as a user system. The emulation processor in the in-circuit emulator is connected to the application system via the above-mentioned cable or socket, so the signal delay will increase, causing noise on the signal line or reducing the accuracy of the analog signal. There is.
[0004]
In an in-circuit emulator, it is desired to use a debugging function without stopping execution of a user program. This is because the microcomputer uses the input / output function to control the application system, and when the execution of the user program is stopped, the control of the application system becomes impossible, and the operation cannot be continued. It is because it becomes.
[0005]
Japanese Patent Application Laid-Open No. H8-328898 is an example of a document that describes a technique in which an emulation DMA controller is provided in the emulation processor, a bus right is acquired from the CPU, and required data transfer is performed. In this example, a DMA transfer memory is prepared on an in-circuit emulator, and the emulation DMA controller is controlled. Two DMA transfer memories are prepared, and the addresses are switched to perform read / write with the host CPU.
[0006]
Such a DMA controller, when having a transfer source address, a transfer destination address, a transfer counter, a control register, and the like, and a selection and an accepting logic of an activation factor in each channel, performs data transfer of a large number of channels. Many sets of the above registers must be provided. In addition, having a dedicated DMAC requires the microcomputer to have logic such as transfer of a bus right in addition to the logic of the DMAC. These increase the logical and physical scale of the entire semiconductor integrated circuit device. In addition, the increase in scale increases manufacturing costs. Although the above example describes that the existing DMAC is shared as the emulation DMAC, the use of the DMAC is restricted. For example, in an application in which a DMAC is used to perform motor control, data transfer between various interfaces, and the like, a large number of DMAC channels are required, and it is not desirable to allocate resources to the emulation DMAC.
[0007]
Information to be arranged in the register is arranged on a general-purpose RAM (random access memory) having a high storage density, and a data transfer device that prevents an increase in logical and physical scales, that is, a so-called data transfer controller (DTC) is incorporated. Examples of documents describing the above-mentioned documents include JP-A-1-125944 and JP-A-7-129537.
[0008]
Japanese Unexamined Patent Application Publication No. 7-129537 further discloses that at least one of address, data, number of transfer data, and transfer method of data transfer performed by a data transfer device can be stored in a storage means. The above information describes an example including information that can designate data transfer by at least one or more pieces of information in one operation of the data transfer apparatus.
[0009]
[Problems to be solved by the invention]
As a function of the emulator, measurement of the execution time of a user program is also required. This is for confirming whether the processing of the user system can be completed within a required time, and for examining the breakdown of the processing time when the processing speed needs to be improved. Since user programs are often developed using C language or the like, it is desirable to be able to measure the processing time in function units.
[0010]
On the other hand, as an emulator, an example in which debugging is performed by an on-chip debugging method is increasing. That is, a real chip such as a microcomputer is provided with a debugging function and an interface, mounted on a user system, and connected to a card emulator in the form of a card using the debugging interface. Then, the card emulator is inserted into a card slot of a host computer such as a personal computer to perform debugging.
[0011]
According to such an on-chip debugging method, since the microcomputer is mounted on the user system, there are no factors that cause an undesired delay, increase noise, or decrease accuracy of analog or the like. Also, if the debug interface is separated, it can be used as it is as a user system. Since it is not necessary to separately develop an emulation processor and a mass-production microcomputer as a semiconductor integrated circuit, the semiconductor integrated circuit is excellent in development efficiency, and is particularly suitable for a small number of products such as a system LSI. Even after the application system is incorporated into the final product, it can be used for motion analysis and adjustment. In such an on-chip debugging system, the function for debugging is dedicated to debugging and is not necessary for actual operation. Therefore, it is desirable to minimize the logical and physical scale for debugging in order to reduce the manufacturing cost of the microcomputer. Also, since the interface with the emulator is limited in the number of signal lines, it is difficult to input and output sufficient debugging information.
[0012]
An object of the present invention is to provide a technique for improving the debugging efficiency without complicating the microcomputer system and increasing the number of interface signals.
[0013]
It is another object of the present invention to provide a technique for monitoring or rewriting the contents of a required memory of a microcomputer during operation of a user system.
[0014]
Another object of the present invention is to provide a technique for making it possible to easily measure the processing time of each function in a program using C language or the like.
[0015]
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.
[0016]
[Means for Solving the Problems]
The outline of a representative invention among the inventions disclosed in the present application will be briefly described as follows.
[0017]
That is, the debugging interface includes a data transfer device that arranges transfer information in a memory such as a RAM and reads the transfer information to perform data transfer. The debug interface includes a data register, an instruction register, Means for decoding the contents of the instruction register, and when the instruction has predetermined contents, issues a transfer request to the data transfer device, and the data transfer device communicates with the data register according to given transfer information. Transfer data to and from memory.
[0018]
The data transfer device is also used as a user function, and this switching is recognized by a vector given in the same manner as the activation request.
[0019]
The bus control means arbitrates the bus rights of the data transfer device and the central processing unit regardless of whether the bus is for debugging or for the user. Further, it controls bus access between the data transfer device and the central processing unit.
[0020]
When providing a means for monitoring the internal bus such as an address to generate a break request or tracing the state of the internal bus, use the above debug data transfer to avoid an undesired break request or an undesired trace. Ignoring the state of the internal bus.
[0021]
Further, a break process is performed so as to output a predetermined status signal when executing a subroutine branch, subroutine return, exception processing branch, or exception processing return instruction.
[0022]
Further, a performance counter that can be counted by the above signal or a signal indicating a break process can be incorporated.
[0023]
According to the above-described means, by adding a start command of the data transfer device to the user debug interface circuit, the number of signal lines is reduced, and addition to the original microcomputer function is minimized, and a function for debugging is provided. Thus, the contents of a desired address can be read or written while minimizing the increase in the number of operations and the time during which the operation of the central processing unit is stopped.
[0024]
The data transfer device is also used for the user function, so that the bus arbitration is the same as the user function, the transfer request and the like can be shared with the user function, the increase in logical scale is suppressed, and the microcomputer system Is not complicated. The data transfer device arranges the transfer information on the memory, enables the transfer information to be arranged in the emulation controller, and eliminates restrictions on user resources.
[0025]
If a means for monitoring the internal bus such as an address to generate a break request or trace the state of the internal bus is provided, the state of the internal bus is ignored during the above-mentioned debugging data transfer, and the user program Inconveniences such as a break occurring in a state not depending on execution, for example, data transfer for debugging, or being acquired in a trace can be suppressed. The debug data transfer may be acquired in a trace. It should be noted that it may be possible to select whether or not to acquire the debug data transfer in a trace.
[0026]
With the performance counter, it is possible to easily measure the execution time of each function without increasing the number of emulation signals.
[0027]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 2 shows a configuration example of an on-chip debugger including a microcomputer according to the present invention.
[0028]
The on-chip debugger includes a card emulator 2, an interface cable 3, a host computer 4, and a microcomputer 5 with a built-in debugging function. The card emulator 2 takes the form of, for example, a PCMCIA card or a PCI card. The host computer is a personal computer equipped with a PC slot such as a PCMCIA slot or a PCI slot. Further, the microcomputer 5 is provided with a flash memory or the like for storing a user program to be debugged, and the microcomputer 5 with a built-in debugging function is mounted on a printed circuit board PCB or the like which is a user system.
[0029]
The card emulator 2 is inserted into a PC card slot of a host computer 4, and the card emulator 2 and the printed wiring board PCB are connected via an interface cable 3 for realizing required communication means. In response to a command or the like input to the host computer 4, the user program is downloaded to a flash memory or the like, and is debugged.
[0030]
When the host computer 4 is a portable personal computer or the like, debugging in an actual use state is also possible. For example, when the application system is a digital camera, debugging and adjustment can be performed outdoors.
[0031]
FIG. 1 shows a configuration example of the microcomputer.
[0032]
Although not particularly limited, the microcomputer 5 is a single-chip type, and a ROM (read only memory) which is a memory for storing a CPU (Central Processing Unit) for controlling the entire control, an interrupt controller INT, a processing program of the CPU, and the like. (Random access memory) that can be used as a work area of the CPU and a memory for temporarily storing and stacking data, a data transfer device DTC, a bus controller BSC, and functional blocks or modules of an input / output device I / O These are functions that are open to the user. A flash memory can be applied to the ROM.
[0033]
The input / output device I / O includes, for example, a timer, a serial communication interface (SCI), an A / D converter, an input / output port (IOP), a clock oscillator (CPG), and the like. Each input / output port is also used as an input of an external interrupt or an input / output of a timer, an SCI, and an A / D converter. That is, the timer, the SCI, and the A / D converter have input / output signals, respectively, and are input / output to / from the outside via the terminal shared with the input / output port. Similarly, it can also be used as an address bus, a data bus, and a bus control signal input / output.
[0034]
As a debugging function, a memory ERAM in which a part of an emulation program is stored is provided, an emulation control circuit EMC that forms a control signal for a module related to emulation, an internal bus such as an address, or a program counter of a CPU is monitored. A break controller EBC that requests the CPU to stop the program execution at a breakpoint specified by the user at the time of emulation, a trace buffer TBF for collecting a signal on the bus BUS during emulation, an external control signal, A user debug interface circuit UDI for receiving a transfer clock or synchronizing with the transfer clock, inputting a command, or outputting required contents to the outside, a performance counter P for measuring a processing time And the like NT, block or these functional modules are connected to each other via an internal bus BUS including an address bus and a data bus.
[0035]
These are formed on one semiconductor substrate by a known semiconductor manufacturing technique. However, a configuration in which a plurality of semiconductor integrated circuits are sealed in one package as a multichip module or the like may be adopted.
[0036]
The CPU includes an instruction decoder, a break request receiving function, a break instruction execution function, a break return instruction execution function, and the like. When a signal for designating a function break, which will be described later, is active, break exception processing can be performed after execution of a subroutine branch instruction, subroutine return instruction, exception processing, and exception processing return instruction.
[0037]
When the break exception processing is executed, the processing branches to the memory ERAM on the emulation control circuit EMC, although there is no particular limitation.
[0038]
The emulation control circuit EMC has a necessary control register and the like, and controls the microcomputer with a built-in debug function according to the control by the CPU in a predetermined break mode. The signal FCBRK designating the function break is supplied to the CPU. The break mode signal BRKM indicating the break mode in which the execution of the user program is stopped and the debug program is being executed is supplied to the break controller EBC, the performance counter PCNT, and the trace buffer TBF.
[0039]
The debug interface UDI performs data communication with an external card emulator at any time according to control by the CPU in a predetermined break mode. Although not particularly limited, this data communication is serial communication, and the number of signal lines for emulation is reduced.
[0040]
In this example, the execution time of each function can be measured in a mode other than the break mode. For example, the performance counter PCNT includes two 48-bit counters, and is configured to be able to independently set the occurrence of a state to be counted.
[0041]
The bus controller BSC performs bus right arbitration at a predetermined timing based on a bus right request signal of the CPU and the data transfer device DTC. This bus arbitration result is transmitted to the CPU, the data transfer device DTC, and other modules as a bus acknowledgment signal BSACK. The bus controller BSC controls required bus access according to the built-in memory, the internal I / O register, the external address, and the like.
[0042]
The interrupt controller INT inputs each of the timer, SCI, A / D converter and external input interrupt signals, and outputs an interrupt request signal to the CPU or a transfer request to the data transfer device DTC.
[0043]
When an interrupt request signal is given to the CPU, the CPU interrupts the processing being executed, branches to a predetermined processing routine through an interrupt exception processing state, performs desired processing, and clears an interrupt factor. I do. At the end of the predetermined processing routine, a normal return instruction is placed, and the interrupted processing is resumed by executing this instruction.
[0044]
When a transfer start request is given to the data transfer device DTC, the data transfer device DTC activates a bus right request signal. When the bus right can be acquired, the data transfer device DTC reads transfer information from a predetermined address and performs data transfer based on the transfer information. After the transfer, the transfer information is written back to the original address.
[0045]
When a reset signal RES is given to the microcomputer 5, the microcomputer 5 including the CPU is reset. When the reset is released, the CPU performs reset exception processing from a predetermined address on the emulation control circuit EMC and waits for a command input via the user debug interface circuit UDI. During this time, other user functions continue in the reset state. After performing required processing in accordance with the input command, branch (return) to the user program. Thereafter, the instruction is read from a ROM or the like, decoded, and based on the decoded content, data processing or data transfer with a RAM, a timer, an SCI, an A / D converter, an input / output port, and the like is performed. That is, the CPU refers to data input from a timer, an SCI, an A / D converter, an input / output port, or the like, or a state or an instruction (switch, volume, etc.) of a device, and transmits an instruction stored in a ROM or the like. Based on the result, a signal is output to the outside using the input / output port, the timer, and the like, and the device is controlled.
[0046]
FIG. 3 shows a configuration example of the user debug interface circuit UDI.
[0047]
The host interface (interface with the card emulator) has a control signal input (reset, mode, clock), a data input, and a data output. Data input / output is performed according to the control signal. Selection of a register described later is performed by a control signal input (mode).
[0048]
The user debug interface circuit UDI has registers of an instruction register SDIR, a status register SDSR, and a data register SDDR. The instruction includes a reset request, a reset request release, a break request, a break request, and a DTC activation request (two types). The instruction decodes the contents of the instruction register and generates a predetermined control signal.
[0049]
Status register SDSR includes an SDTRF flag. When the SDTRF is cleared to the logical value "0", the data register SDDR can be written from the inside of the microcomputer such as the CPU, and when the SDTRF flag is set to the logical value "1", the host interface Through the data register SDDR.
[0050]
It is connected to an internal bus and can be read / written by the CPU in the break mode. Further, the data transfer device DTC can read / write the data register SDDR in accordance with the status EDTC indicating the debug data transfer of the data transfer device DTC.
[0051]
FIG. 4 shows a configuration example of the data transfer device DTC.
[0052]
The DTC activation request of the user debug interface circuit UDI and the interrupt request of the input / output device (I / O) of the microcomputer are input to the interrupt controller. For these, whether to issue an interrupt request to the CPU or a transfer request to the DTC is designated by the corresponding DTC enable register (DTER), the priority is determined for each, and a vector corresponding to the selected factor is determined. , An interrupt request or a transfer request is given.
[0053]
The data transfer device DTC takes in the DTC transfer request DTCRQ and the vector DTVEC. When a transfer request is generated, a bus right is requested to the bus controller by DTBRQ, it is confirmed that the bus right is accepted by BSACK, and a transfer information start address is read from a predetermined vector. The transfer information (mode, transfer source / destination address, counter) is read and stored in the data transfer device DTC, and data transfer is performed according to the transfer information. After the data transfer, the updated transfer information is written back to the original address.
[0054]
FIG. 5 shows a memory map of the microcomputer 5.
[0055]
The vector address of the DTC for the user is allocated to the ROM area, whereas the vector address for debugging of the data transfer device DTC is arranged in the emulation control circuit EMC, for example, in the memory ERAM.
[0056]
The transfer information is arranged at the address indicated by the vector. Usually, the DTC transfer information for the user is arranged in the RAM. The transfer information of the DTC for debugging is arranged in ERAM or RAM. By arranging in the ERAM, the resources of the user are not used, so that there is no restriction on the user. When the ERAM is not used, more emulation programs can be arranged in the ERAM, and the execution efficiency of the emulation program can be improved.
[0057]
FIG. 6 shows the required operation timing in the debug data transfer.
[0058]
When a predetermined DTC start request command is input to the debug interface UDI, the debug interface UDI generates a start request. This is received by the interrupt controller, the priority order is determined, and at a predetermined timing, a transfer request and a vector indicating debug data transfer are given to the data transfer device DTC.
[0059]
When receiving the transfer request, the data transfer device DTC requests the bus right, and when the request is received, reads the transfer information from the address given by the vector. At this time, the vector indicating the debug data transfer is indicated by all the high-order bits (bits 7 to 2) being 1. In this case, the emulation control circuit EMC, for example, the address of ERAM (asebase which is a parameter or the like) Is the start address). An example of this logical description is shown below.
Figure 2004086447
[0060]
That is, transfer information is read from the address indicated by the vector, and data transfer is performed based on this. When the status signal EDTC indicating the debug data transfer is activated, the SDIF is set to the logical value "1" according to the status signal EDTC and the reading or writing of the UDI data register. Thereafter, the transfer information is written back to the original address. By rewriting the transfer information, the contents of the same address can be repeatedly read and the change can be monitored, and a plurality of DTC transfers can be sequentially performed.
[0061]
The data transfer device DTC acquires a bus right during a vector read, transfer information read, data transfer, and transfer information write cycle (for example, 9 bus cycles when transfer information is read / written three times). When the CPU loses the bus right, the execution of the user program is suspended, but this time is shorter than the time during which the break exception handling and the emulation program are executed.
[0062]
The emulation functions are as follows.
[0063]
That is, an instruction is input to an instruction register (SDIR) via a host interface to generate a DTC transfer request, and after performing required data transfer, via a data register (SDDR) of the user debug interface circuit UDI, The contents of the memory (or I / O register) can be read.
[0064]
The procedure is as follows.
[0065]
First, in the execution state of the emulation program, the interrupt controller and the transfer information of the DTC are set in advance.
[0066]
The contents of the memory of the microcomputer 5 can be read by the following procedure.
[0067]
(1) In a predetermined sequence, the state machine of the debug interface UDI is initialized, and the SDTRF bit is set to a logical value “1”.
[0068]
(2) A DTC transfer request command is input from the emulator to the user debug interface circuit UDI. Data is copied from the shift register to the instruction register.
[0069]
(3) The emulator confirms that the SDTRF bit is a logical value “1”.
[0070]
(4) Although there is no particular limitation, dummy data is transferred to clear the SDTRF bit.
[0071]
(5) A DTC transfer request is made to the interrupt controller INT, a transfer request and a predetermined vector are given to the data transfer device DTC, and the data transfer device DTC is activated.
[0072]
(6) The data transfer device DTC transfers data from the memory to the data register SDDR of the user debug interface circuit UDI based on transfer information set in advance. At the time of debugging data transfer, the data transfer device DTC activates a status signal EDTC indicating the debugging data transfer. When the status signal EDTC is in the active state, the break controller and the trace buffer ignore the address and data of the data transfer device DTC, which are not based on the execution of the user's program, and do not acquire an undesired break or trace. To do. The user debug interface circuit UDI monitors the EDTC signal and sets the SDTRF bit to a logical value “1” at a predetermined timing such as a data register write.
[0073]
(7) Next, the emulator 2 monitors the SDTRF bit, confirms that the reading of the data transfer device DTC has been completed by setting the logical value to "1", and takes in the data. When rewriting the contents of the memory of the microcomputer 5, the following points are different from the above.
[0074]
(8) The emulator 2 confirms that the SDTRF bit is a logical value “1”, and if the SDTRF bit is a logical value “1”, data can be transferred to the data register SDDR. Transfer to data register SDDR.
[0075]
(9) The emulator 2 observes the logical value "1" of the SDTRF bit and confirms that the data transfer device DTC has finished writing.
[0076]
FIG. 7 shows a debug data transfer method.
[0077]
By using two DTC start commands, the above procedure can be executed twice in a set, and information of arbitrary plural addresses (adr1 to adr4) can be extracted and displayed on the host computer 4.
[0078]
The card emulator 2 first writes the second transfer information in the UDI data register. For example, a transfer instruction from the address adr1 to the UDI data register is issued.
[0079]
The first DTC transfer request command 1 is input to start the first DTC transfer. In the first DTC transfer, the second transfer information on the UDI data register is stored in the second DTC transfer information area.
[0080]
Next, a DTC start request command 2 is input to start the second DTC transfer. In the second DTC transfer, the specified address (adr1) is stored in the UDI data register.
[0081]
Then, the UDI data register is read out to the host computer 4. This may be performed a required number of times (four times in this example) and changing the designated address (adr1 to adr4). The transfer information from the emulator 2 can be displayed on a display device (monitor) of the host computer 4 in a desired arrangement such as a desired window.
[0082]
Instead of having two DTC transfer request commands, a chain transfer can be used. In chain transfer, as described in, for example, Japanese Patent Application Laid-Open No. 7-129537, data transfer is performed in response to one activation request based on a plurality of transfer information arranged at consecutive addresses. According to the first transfer information, the data input to the data register of the debug interface UDI is stored at the address of the second transfer information. Thereafter, data transfer is performed based on the second transfer information.
[0083]
Note that various modifications are possible according to the number of bytes of the data register of the debug interface UDI and the arrangement of the transfer information of the data transfer device DTC.
[0084]
FIG. 8 shows a block configuration of control logic necessary for a function break of the CPU, and FIG. 9 shows operation timing of the function break.
[0085]
When the function break permission bit of the emulation control circuit EMC is set to the logical value “1”, the function break permission signal FCBRK is activated. The CPU stores the operation code of the break exception processing in the instruction register by the logical product of the decode signal dec_fcb of the execution of the subroutine branch instruction, the subroutine return instruction, the user exception processing (including an interrupt, etc.), and the user exception processing return instruction. Then, break exception handling is executed. This logic can be described as follows, where the instruction code executed by the CPU is opcode.
[0086]
Figure 2004086447
That is, at the end of the execution of the instruction, the load signal indicating the loading of the next instruction is activated. At this time, the function break permission signal FCBRK is activated, and after the execution of the instruction (dec_fcb), If not in the break mode ((brkm), an instruction code 'break indicating break exception handling is taken in. In addition, brkm is a signal equivalent to BRKM of FIG.
[0088]
By executing the instruction code 'break, break exception processing is realized, and at this time, the break mode signal brkm is activated. Thus, the performance counter PCNT is stopped. In the emulation process in the break mode, the execution time of the user program can be obtained by reading the contents of the performance counter and subtracting it from the previous value of the performance counter. Further, by obtaining the above execution time in the emulation processing after execution of the subroutine return instruction, the execution time of the corresponding function can be measured. If a function is called multiple times or an exception process such as an interrupt is inserted, a break occurs in such a case, so that the time may be measured and subtracted.
[0089]
FIG. 10 shows an outline of the development environment of the CPU.
[0090]
The user creates a program in C language or assembly language using various editors or the like. This is usually created by dividing into a plurality of modules. The C compiler 101 inputs each C language source program created by the user and outputs an assembly language source program or an object module.
[0091]
The assembler 102 inputs an assembly language source program and outputs an object module.
[0092]
The linkage editor 103 inputs a plurality of object modules generated by the C compiler or assembler, resolves external references and relative addresses of each module, combines them into one program, and outputs a load module. .
[0093]
The load module can be input to the simulator / debugger 104 to simulate the operation of the CPU on a system development device such as a personal computer, display the execution result, and analyze and evaluate the program. Also, the data is input to the emulator 105 and written in the ROM such as the flash memory of the microcomputer 5 in the break mode state via the user debug interface circuit UDI to be operated on an actual application system or the like. By performing so-called in-circuit emulation, it is possible to analyze and evaluate the actual operation of the microcomputer 5 as a whole. By adopting the form shown in FIG. 2, it is possible to rewrite a ROM such as a flash memory at any time, which is suitable for debugging or emulation.
[0094]
At this time, for example, the function seq is used as follows.
Figure 2004086447
[0095]
At this time, it is compiled as follows.
Figure 2004086447
[0096]
The function seq becomes a subroutine branch instruction JSR, and the processing of the function is described after the address _seq. At the end, a subroutine return instruction RTS is arranged as follows.
Figure 2004086447
[0097]
By using the function break, the processing time of the function seg from JSR execution to RTS execution can be measured.
[0098]
According to the above example, the following operation and effect can be obtained.
[0099]
(1) Activating the data transfer device DTC by a command of the debug interface UDI, reading required data, writing the data in the data register of the debug interface, and enabling the data to be output from the debug interface. Accordingly, the time required to stop the execution of the user program can be minimized, and the required memory contents can be read. Also, by reversing the direction of data transfer, required data can be rewritten. As a result, the usability and efficiency in debugging the microcomputer 5 can be improved.
[0100]
(2) By arranging the transfer information such as the address register in the data transfer device DTC in the RAM, it is possible to minimize the use of the resources of the user and at least without limiting the resources of the data transfer of the user The operation and effect of the above (1) can be obtained. This makes it possible to use the memory ERAM for emulation, and can effectively utilize the limited memory ERAM. If the amount of memory to be monitored or rewritten is large at the initial stage of debugging or the like, the user RAM can be used, and the memory ERAM can be used for an emulation program. When monitoring or adjusting a small number of memories while debugging is almost completed, the use of the memory ERAM does not limit user resources. By providing a vector to the data transfer device DTC to identify the data transfer for debugging, the number of factors to be used can be easily increased.
[0101]
(3) Using a plurality of DTC activation request commands or the chain transfer function of the data transfer device DTC, input transfer information via the debug interface and the data transfer device DTC, and then perform required data transfer. Thus, an arbitrary address can be read / written without breaking the CPU. Input of transfer information and data transfer can be performed by the same means, and effective use of resources can be achieved. Also, an arbitrary address can be designated and read or written at any time, and this can be repeated to read or write a plurality of addresses, thereby further improving usability and efficiency.
[0102]
(4) Since the data transfer device DTC is shared with the user, it can share the determination of the priority of the activation request, arbitrate the bus right, and the like, without complicating the microcomputer system and the development efficiency of the microcomputer itself. Can be improved. Even if a second data transfer device (e.g., DMAC) is added, it is sufficient to implement the function as a user function, and there is no direct effect on the function for debugging, which may impair development efficiency and effective use of resources. Absent. Under the control of the bus controller, an arbitrary address can be accessed regardless of the type of the bus interface of the address.
[0103]
(5) The use of the debugging interface enables emulation with a small number of signal lines, enables emulation in a mounted state, and eliminates the need to separately develop a microcomputer for mass production.
[0104]
(6) The function break function that breaks after subroutine branching, execution of exception processing, and execution of these return instructions facilitates measurement of function execution time. By using the performance counter PCNT that stops counting in the break state, the execution time of the function can be easily measured without increasing the number of emulation interface signals.
[0105]
(7) By adding a decoding circuit to the CPU, it is not necessary to set a breakpoint or the like. Since the decoding circuit of the CPU can be shared by decoding other instruction functions and performing logic synthesis, an increase in logic scale can be minimized.
[0106]
Although the invention made by the present inventors has been specifically described above, the present invention is not limited thereto, and it goes without saying that various modifications can be made without departing from the gist of the invention.
[0107]
For example, the function and signal input / output of the module can be arbitrarily changed.
[0108]
It is not necessary to provide a DTC enable register for a DTC activation request by UDI. If this is provided, the user interrupt can be executed by the user debug interface circuit UDI.
[0109]
By providing the debugging interface UDI in the emulation processor, the functions of the present invention can also be used as an in-circuit emulator.
[0110]
Function breaks are also available on emulation processors or in-circuit emulators.
[0111]
The details of the data transfer device can be variously modified. For example, the arrangement and configuration of the control register, transfer information, data transfer mode, and the like can be arbitrarily set. As a data transfer mode, a repeat mode, a block transfer mode, or the like can be applied. In the chain transfer, the second transfer can be performed only when the value of the counter of the first transfer information becomes zero.
[0112]
In the above description, the case where the invention made by the present inventor is mainly applied to an on-chip debugger including a card emulator, which is a field of application, has been described. However, the present invention is not limited to this. Can be applied.
[0113]
The present invention can be applied on the condition that it has at least a function and an interface for emulation or debugging.
[0114]
【The invention's effect】
The following is a brief description of an effect obtained by a representative one of the inventions disclosed in the present application.
[0115]
That is, the data transfer device is started, required data is read, the data is written to the data register of the debug interface, and the data can be output from the debug interface, thereby stopping the execution of the user program. And the required memory contents can be read. Also, by reversing the direction of data transfer, required data can be rewritten. This makes it possible to improve usability and efficiency in debugging the microcomputer.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration example of a microcomputer according to the present invention.
FIG. 2 is an explanatory diagram of a configuration example of an on-chip debugger including the microcomputer.
FIG. 3 is a block diagram illustrating a configuration example of a debugging interface included in the microcomputer.
FIG. 4 is a block diagram illustrating a configuration example of a data transfer device included in the microcomputer.
FIG. 5 is an explanatory diagram of a memory map in the microcomputer.
FIG. 6 is a timing chart of debug data transfer in the on-chip debugger.
FIG. 7 is an explanatory diagram of a data transfer method for debugging in the on-chip debugger.
FIG. 8 is a block diagram illustrating a configuration example of control logic necessary for a function break of a CPU in the on-chip debugger.
FIG. 9 is an operation timing chart of a function break in the on-chip debugger.
FIG. 10 is a schematic explanatory diagram of a development environment of a CPU included in the microcomputer.
[Explanation of symbols]
2 Card emulator
3 Interface cable
4 Host computer
5 Microcomputer
CPU Central processing unit
DTC data transfer device
BSC bus controller
ROM flash memory
RAM random access memory
I / O input / output device
UDI user debug interface circuit
TBF trace buffer
PCNT performance counter
EBC break controller
INT interrupt controller
EMC emulation control circuit

Claims (5)

デバッグのためのデバッグ用インタフェース手段と、
データ転送を可能とするデータ転送手段と、
バス制御のためのバス制御手段と、
上記データ転送手段、上記データ転送手段、及び上記バス制御手段の動作を制御可能な中央処理装置と、を含み、
上記デバッグ用インタフェース手段は、エミュレータとの入出力を行い、インタフェースによって入力可能なインストラクションレジスタと、その内容を解読して、データ転送要求を発生させる手段と、インタフェースによって入出力可能なデータレジスタと、データ転送の状態を示すステータスレジスタと、を含み、
上記データ転送手段は、上記データ転送要求に呼応して、所要のメモリと上記データレジスタとの間のデータ転送を実行する手段と、上記データ転送の完了によって、上記ステータスレジスタを所定の状態に設定する手段と、を含み、
上記バス制御手段は、上記データ転送手段と上記中央処理装置との間のバス権を調停するとともに、それらのバスアクセスを制御する手段を含むことを特徴とするマイクロコンピュータ。
Debugging interface means for debugging;
Data transfer means for enabling data transfer;
Bus control means for bus control;
A central processing unit capable of controlling the operation of the data transfer unit, the data transfer unit, and the bus control unit,
The debug interface means performs input / output with the emulator, an instruction register inputtable by the interface, a means for decoding the contents thereof, and generating a data transfer request, a data register inputtable / outputtable by the interface, A status register indicating a status of data transfer;
The data transfer means executes a data transfer between a required memory and the data register in response to the data transfer request, and sets the status register to a predetermined state upon completion of the data transfer. Means to
A microcomputer according to claim 1, wherein said bus control means arbitrates a bus right between said data transfer means and said central processing unit, and includes means for controlling access to the buses.
エミュレーション制御のためのエミュレーション制御手段と、
アドレスを監視してブレークを要求するブレーク手段と、アドレス情報を取得するトレース手段とを含み、
上記転送情報を上記エミュレーション手段に格納可能とするとともに、上記データ転送を示すステータス信号を持ち、上記ステータス信号が活性状態のとき、上記ブレーク手段又はトレース手段の少なくとも一方にアドレス情報を無視させる請求項1記載のマイクロコンピュータ。
Emulation control means for emulation control;
A break unit that monitors an address to request a break, and a trace unit that obtains address information,
The transfer information can be stored in the emulation means, and a status signal indicating the data transfer is provided. When the status signal is active, at least one of the break means or the trace means ignores the address information. The microcomputer according to 1.
応用システムに実装された状態で、上記デバッグ用インタフェース手段を介して、エミュレータと接続可能にされるオンチップデバッガを構成する請求項1又は2記載のマイクロコンピュータ。3. The microcomputer according to claim 1, wherein said microcomputer comprises an on-chip debugger which can be connected to an emulator via said debug interface means when mounted on an application system. エミュレーション制御のための所定の制御信号を出力可能なエミュレーション制御手段と、上記エミュレーション制御手段の動作を制御可能な中央処理装置と、を含み、
上記中央処理装置は、サブルーチン分岐命令実行、例外処理実行、及びそれらの復帰命令の実行を検出する手段を含み、上記制御信号が所定の状態のとき、上記検出手段の検出結果に基づいてエミュレーションプログラム実行状態へ遷移することを特徴とするマイクロコンピュータ。
Emulation control means capable of outputting a predetermined control signal for emulation control, and a central processing unit capable of controlling the operation of the emulation control means,
The central processing unit includes means for detecting execution of a subroutine branch instruction, execution of exception processing, and execution of those return instructions. When the control signal is in a predetermined state, an emulation program is executed based on a detection result of the detection means. A microcomputer that transitions to an execution state.
プログラム実行に応じてカウント動作するカウンタと、上記エミュレーションプログラム実行状態では上記カウンタのカウント動作を停止させる手段と、を含む請求項4記載のマイクロコンピュータ。5. The microcomputer according to claim 4, further comprising: a counter that counts in accordance with a program execution; and means for stopping the counting operation of the counter in the emulation program execution state.
JP2002245131A 2002-08-26 2002-08-26 Microcomputer Pending JP2004086447A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002245131A JP2004086447A (en) 2002-08-26 2002-08-26 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002245131A JP2004086447A (en) 2002-08-26 2002-08-26 Microcomputer

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2008209858A Division JP4968799B2 (en) 2008-08-18 2008-08-18 Microcomputer

Publications (1)

Publication Number Publication Date
JP2004086447A true JP2004086447A (en) 2004-03-18

Family

ID=32053416

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002245131A Pending JP2004086447A (en) 2002-08-26 2002-08-26 Microcomputer

Country Status (1)

Country Link
JP (1) JP2004086447A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010225094A (en) * 2009-03-25 2010-10-07 Fujitsu Semiconductor Ltd Integrated circuit, debugging circuit and debugging command control method
JP2013522803A (en) * 2010-03-22 2013-06-13 クアルコム,インコーポレイテッド Direct distributed loading of executable software images from a primary processor to one or more secondary processors in a multiprocessor system
US9058191B2 (en) 2010-03-22 2015-06-16 Qualcomm Incorporated Direct transfer of executable software image to memory allocated by target processor based on transferred image header
DE112020001914T5 (en) 2019-04-10 2022-01-20 Rohm Co., Ltd. SEMICONDUCTOR DEVICE AND TROUBLESHOOTING SYSTEM
CN115293080A (en) * 2022-09-22 2022-11-04 沐曦科技(北京)有限公司 Chip debugging system based on trace file
US11797421B2 (en) 2019-03-12 2023-10-24 Rohm Co., Ltd. Semiconductor apparatus and debug system

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010225094A (en) * 2009-03-25 2010-10-07 Fujitsu Semiconductor Ltd Integrated circuit, debugging circuit and debugging command control method
US8745446B2 (en) 2009-03-25 2014-06-03 Spansion Llc Integrated circuit, debugging circuit, and debugging command control method
US9514070B2 (en) 2009-03-25 2016-12-06 Cypress Semiconductor Corporation Debug control circuit
JP2013522803A (en) * 2010-03-22 2013-06-13 クアルコム,インコーポレイテッド Direct distributed loading of executable software images from a primary processor to one or more secondary processors in a multiprocessor system
KR101412173B1 (en) 2010-03-22 2014-06-25 퀄컴 인코포레이티드 Direct scatter loading of executable software image from a primary processor to one or more secondary processor in a multi―processor system
US8838949B2 (en) 2010-03-22 2014-09-16 Qualcomm Incorporated Direct scatter loading of executable software image from a primary processor to one or more secondary processor in a multi-processor system
US9058191B2 (en) 2010-03-22 2015-06-16 Qualcomm Incorporated Direct transfer of executable software image to memory allocated by target processor based on transferred image header
CN105718419B (en) * 2010-03-22 2019-04-16 高通股份有限公司 Executable software image is directly dispersed in a multi-processor system to be loaded into one or more minor processors from Main Processor Unit
US11797421B2 (en) 2019-03-12 2023-10-24 Rohm Co., Ltd. Semiconductor apparatus and debug system
DE112020001914T5 (en) 2019-04-10 2022-01-20 Rohm Co., Ltd. SEMICONDUCTOR DEVICE AND TROUBLESHOOTING SYSTEM
US11841782B2 (en) 2019-04-10 2023-12-12 Rohm Co., Ltd. Semiconductor device and debugging system
CN115293080A (en) * 2022-09-22 2022-11-04 沐曦科技(北京)有限公司 Chip debugging system based on trace file

Similar Documents

Publication Publication Date Title
KR100439781B1 (en) A data processor, an operation method thereof, a method of executing the debugging operation, and a method of correcting a disadvantage value among the data processor
KR100350568B1 (en) Data processing system and method for performing debug functions
EP0762276B1 (en) Data processor with built-in emulation circuit
EP0762277B1 (en) Data processor with built-in emulation circuit
US6148381A (en) Single-port trace buffer architecture with overflow reduction
US6145123A (en) Trace on/off with breakpoint register
EP0391173B1 (en) Debug peripheral for microcomputers, microprocessors and core processor integrated circuits and system using the same
EP0652516A1 (en) Integrated microprocessor
EP0084431A2 (en) Monitoring computer systems
US20090106604A1 (en) Procedure and device for emulating a programmable unit
JP2003006003A (en) Dma controller and semiconductor integrated circuit
EP0942375B1 (en) Adapter device with a local memory and method for processor emulation
EP0942373B1 (en) Adapter device with a local memory and method for processor emulation
US7428661B2 (en) Test and debug processor and method
US6389498B1 (en) Microprocessor having addressable communication port
EP1782204A2 (en) Emulation and debug interfaces for testing an integrated circuit with an asynchronous microcontroller
EP0762278A1 (en) Data processor with built-in emulation circuit
JP2004086447A (en) Microcomputer
JP4968799B2 (en) Microcomputer
EP0942371A1 (en) Debugging method for a microcomputer
JPH06214819A (en) Information processor and system and method for evaluating the same
JP2001350648A (en) Microcomputer
RU2773696C1 (en) Digital debugging complex
JPS62197831A (en) Data processor
KR100189977B1 (en) Emulator system having trace function and trace method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050812

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080605

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080617

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080818

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090203

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090403

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090602