JP4641708B2 - Data processing apparatus and processor unit - Google Patents
Data processing apparatus and processor unit Download PDFInfo
- Publication number
- JP4641708B2 JP4641708B2 JP2003048738A JP2003048738A JP4641708B2 JP 4641708 B2 JP4641708 B2 JP 4641708B2 JP 2003048738 A JP2003048738 A JP 2003048738A JP 2003048738 A JP2003048738 A JP 2003048738A JP 4641708 B2 JP4641708 B2 JP 4641708B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- unit
- instruction code
- code data
- next instruction
- 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
Links
- 238000012545 processing Methods 0.000 title claims description 59
- 238000000034 method Methods 0.000 description 7
- 238000001514 detection method Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 238000013461 design Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 3
- 238000012423 maintenance Methods 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 101100075512 Oryza sativa subsp. japonica LSI2 gene Proteins 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000004043 responsiveness Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Landscapes
- Advance Control (AREA)
- Debugging And Monitoring (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
- Microcomputers (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、LSIなどのデータ処理装置およびそれに組み込まれるプロセッサに関するものである。
【0002】
【従来の技術】
大規模なシステムLSIが可能となり、システム全体を単一の半導体チップ上に構築することが可能となりつつある。これに伴って、システムを構成するのに必要不可欠であるプロセッサ(プロセッサユニット)と、目的に応じた性能を最大限に引き出すために専用LSIとして開発されてきた機能とを単一の半導体チップ上に組み込んで1つにしたシステムLSIの開発が行われれている。この大規模システムLSI向けに開発されているプロセッサは、組み込み用途プロセッサ(エンベッデド・プロセッサ)と称されている。
【0003】
【発明が解決しようとする課題】
組み込み用途のプロセッサは、従来の単一チップでCPUを構成するのとは主旨が根本的に異なるものであるが、現状で提供されている組み込み用途のプロセッサは単一チップのCPU用のプロセッサに対して明確に組み込み用途であることが認識されているとは云い難い。
【0004】
エンベッデド・プロセッサの大きな相違点は、オプション機能が豊富である必要があることである。すなわち、従来の単一チップで構成したCPU(または出来上がり品CPU)の場合は、広範囲のユーザのニーズに対応するために、必要とされるであろう機能を予めフル実装させている。これに対し、システムLSIに組み込まれるエンベッデド・プロセッサでは、その都度必要とされる機能のみが要求される。したがって、従来、1つのプロセッサとして提供されていた機能も、オプションモジュール化され、プロセッサユニットと、モジュール化された機能とが1つのシステムLSIに搭載されて所望の機能を備えたプロセッサがシステムLSIの内部に構築されることになる。
【0005】
このような背景にあっては、従来のCPUの場合には内蔵されるのが一般的であったデバッグモジュール(デバッグ機能)も、組み込み用途のプロセッサユニットではオプションとしてシステムLSIに組み込み可能な別ユニットとして提供されることが望ましい。デバッグユニットとは、パーソナルコンピュータなどからプロセッサをブレーク(一時停止)させるためのターゲットとなる命令ポインタデータあるいは命令コードデータを設定し、プロセッサがプログラムを実行中にブレーク条件である命令ポインタデータあるいは命令コードデータを発見した場合にプロセッサユニットの処理を一旦停止させるハードウェアである。そして、プロセッサの内部レジスタの内容を観測したり、内部レジスタに特定の値を注入したりして、デバッグを行なう。
【0006】
デバッグユニットをオプションモジュールとして提供するとなると、デバッグユニットの制御も組み込み型プロセッサとは別に行われることが望ましい。これによってデバッグの信頼性も向上する。たとえば、デバッグユニットを操作するデバッガーソフトをパーソナルコンピュータ上で走行させることができる。従来の出来上がり品CPUであれば、デバッガがあることが前提でソフトウェアが作成されるのに対し、組み込み型プロセッサでは、デバッガを設けるか否かはユーザの仕様となり、デバッガがあることを前提としたソフトウェアの開発は無駄で冗長なものになる可能性があるからである。また、デバッガがないシステムでデバッガがあることを前提としたソフトウェアを稼動させることは、システムエラーの要因ともなりかねず、信頼性が低下する可能性もある。
【0007】
一方、デバッガユニットをプロセッサユニットと独立して稼動させようとすると、ブレーク条件である命令バス(命令ポインタおよび命令コード)の内容に応じてプロセッサユニットをブレークさせるためには、命令ポインタおよび命令コードを生成するフェッチおよびデコード機能をプロセッサユニットと同様にデバッガユニットにも設けておく必要がある。このため、システムLSIにデバッグ機能を持たせようとすると、複雑な構成で、回路規模も比較的大きなデバッグユニットを搭載する必要がある。そして、システムLSI全体としてみると、フェッチおよびデコードするためのハードウェアが二重に保有されたかたちになってしまう。特に、命令長が1語ないし2語といった不定長(または可変長)の命令セットに対応するプロセッサユニットを搭載している場合は、フェッチおよびデコードするために以下の機能が要求されるので、二重に保有されるハードウェア規模も大きくなる。
【0008】
すなわち、命令コードが出力されるデータバスのバス幅が命令長と一致していない場合は、次期命令コードデータがデータ中のどこにいるかが判明せず、また、フェッチしたデータに跨って次期命令コードデータが存在する可能性がある。したがって、ブレークさせる命令ポインタデータと、命令コードを含むデータのフェッチに使用した命令ポインタとが一致するか否かを判断するためには、個々の命令長を監視して次期命令ポインタの位置を決定する機能が必要になる。また、データバス幅が命令長と一致していないと、分岐が発生したときに、分岐先のアドレスがフェッチアドレスと常に一致するとは限らないので、それを調整して次期命令ポインタの位置を決定する機能が必要になる。さらに、データバス幅が命令長と一致していないと、上述したように、フェッチされたデータの中から、次期命令コードデータを選択して整列させたり、前後のデータに跨ぐ次期命令コードデータをアライメントする機能が必要になる。
【0009】
このような機能にかぎらず、次にプロセッサの実行ユニットで実行される次期命令コードを適切にデバッグユニットで判断するには、以下のような機能も必要になる。命令コードの中に、実行に複数の実行サイクルが費やされるマルチサイクル型の命令コードが含まれていると、実行ユニットで次期命令コードが実行されるタイミングが不明となる。このため、命令フェッチから、その命令が実行されるまでのタイミング検出を行なうための機能が必要になる。このマルチサイクル命令処理に対応できるようにするとハードウェアが非常に大規模になる。
【0010】
さらに、分岐が発生すると、それ以前にフェッチされた命令コードであっても実行ユニットが実行していない命令コードは実際には実行されない命令コードであり次期命令コードとはならない。実行されない命令コードに対してデバッグ用のブレーク信号を出力することは無意味なので、分岐が発生するか否かを判別する機能も必要になる。
【0011】
これらの機能をカバーするハードウェアは大規模になるので、システムLSIの小型化および低価格化を考慮すると省きたいハードウェアである。しかも、これらの機能は基本的にプロセッサユニットのフェッチ機能としてプロセッサユニットのハードウェアによりサポートされている機能であり、ハードウェアが重複していることになる。
【0012】
その一方で、デバッグ機能を備えた埋め込み用途のプロセッサと、デバッグ機能を備えていない埋め込み用途のプロセッサの両方を開発することは、さらに重複する部分の大きな投資となる。また、プロセッサの機能を変更したり、向上するときに、デバッグ機能のあるものと、デバッグ機能のないものの両方を同時にバージョンアップすることは大きな負荷であり、大きな重複投資となる。また、デバッグ機能付きのプロセッサ用のソフトウェアと、デバッグ機能なしのプロセッサ用のソフトウェアを2重に開発およびメンテナンスするための投資も必要になる。したがって、これらのディメリットと比較し、デバッグユニットとプロセッサユニットとが多少重複するハードウェアを備えている程度の重複するハードウェアは容認すべきことであると判断することも可能である。
【0013】
しかしながら、本発明においては、デバッグユニットをオプションとして搭載することが可能なシステムLSIにおいて、プロセッサユニットと重複するようなハードウェアをデバッグユニットから省くことができるシステムを提供することを目的としている。それにより、ハードウェアおよびソフトウェアの設計・開発あるいはメンテナンスにおける二重投資を防止すると共に、コンパクトで低コストなシステムLSIを提供可能とすることを本発明の目的としている。
【0014】
【課題を解決するための手段】
本発明においては、組み込み型のプロセッサユニットとして、次期命令ポインタデータと、次期命令コードデータとをプロセッサユニットの外部に出力するインターフェイスを備えたプロセッサユニットを提供する。このプロセッサユニットであれば、システムLSIにデバッグユニットと共に組み込んだときに、デバッグユニットは、ブレーク条件をプロセッサユニットから提供される次期命令ポインタデータおよび/または次期命令コードデータにより判断することが可能となり、重複するハードウェアを省くことができる。その一方で、プロセッサユニット側は、デバッグユニットの有無に関わらず、次期命令ポインタデータと次期命令コードデータを出力するだけなので、ハードウェアおよびソフトウェアともデバッグユニットの有無に左右されずに開発・設計およびメンテナンスを行うことができる。
【0015】
すなわち、本発明においては、命令ポインタデータに基づきフェッチアドレスを出力し、得られたデータから命令コードデータを生成可能なフェッチユニットと、命令コードデータに基づく処理を実行可能な実行ユニットとを有するプロセッサユニットであって、フェッチユニットは、得られたデータをデコードして可変長の命令コードデータを生成するデータアライメント部を含むプロセッサを提供する。このプロセッサは、さらに、フェッチユニットによりデコードされた命令コードデータであって、実行ユニットにおける現在の命令コードデータの次に実行ユニットで実行される次期命令コードデータの次期命令ポインタデータを当該プロセッサユニットから外部に出力する第1の出力手段と、次期命令コードデータを当該プロセッサユニットから外部に出力する第2の出力手段とを有する。このプロセッサユニットであれば、ブレーク条件が成立するとプロセッサユニットに対して一時停止を要求するブレーク信号を供給するブレーク信号出力手段を有するデバッグユニットであって、ブレーク条件として設定されているターゲットの命令ポインタデータと比較する次期命令ポインタデータを当該デバッグユニットの外部から受け入れる第1の入力手段と、ブレーク条件として設定されているターゲットの命令コードデータと比較する次期命令コードデータを当該デバッグユニットの外部から受け入れる第2の入力手段とを有するデバッグユニットと組み合わせて、デバッグユニットを動作させることができる。
【0016】
デバッグユニットの制御方法は、ブレーク条件が成立するとプロセッサユニットに対して一時停止を要求するブレーク信号を供給するブレーク要求工程を有しており、さらに、ブレーク条件として設定されているターゲットの命令ポインタデータと比較する次期命令ポインタデータと、ブレーク条件として設定されているターゲットの命令コードデータと比較する次期命令コードデータとの少なくともいずれかを当該デバッグユニットの外部から受け入れる工程を有する。したがって、デバッグユニットには、プロセッサユニットのフェッチユニットに相当するようなハードウェアは不要となる。
【0017】
このため、本発明のプロセッサユニットとデバッグユニットとを有するデータ処理装置では、フェッチユニットに相当するハードウェアを重複させずにデバッグ機能を搭載できる。また、デバッグユニットはオプションユニットなので、このデバッグユニットを搭載しなくても、本発明のプロセッサユニットを埋め込みプロセッサとしてデータ処理装置、すなわちシステムLSIを形成することができる。
【0018】
プログラムにマルチサイクル型の命令コードが含まれている場合は、次期命令コードデータの実行時期を判断する必要がある。また、分岐の発生に伴う無駄なブレーク信号の発信を防止するためには次期命令コードデータの実行直前でブレーク信号の要否を判断することが望ましい。したがって、次期命令コードデータに基づく処理を開始するタイミングを当該プロセッサユニットから外部に出力する第3の出力手段を有するプロセッサユニットを提供することがさらに好ましい。この次期命令コードデータに基づく処理を開始するタイミングは、実行ユニットにおける現在の命令コードデータに基づく処理を完了したタイミングであり、このタイミングを当該プロセッサユニットから外部に出力しても良い。これに対応して、デバッグユニットにおいても、次期命令コードデータが実行開始されるタイミングを当該デバッグユニットの外部から受け入れる第3の入力手段を設け、ブレーク信号出力手段では、少なくともターゲットの命令ポインタデータおよびターゲットの命令コードデータのいずれかと、次期命令ポインタデータおよび次期命令コードデータのいずれかが一致し、次期命令コードデータが実行開始されるときにブレーク信号を出力すればよい。デバッグユニットの制御方法においては、次期命令コードデータが実行開始されるタイミングを当該デバッグユニットの外部から受け入れる工程を設け、ブレーク要求工程では、少なくともターゲットの命令ポインタデータおよびターゲットの命令コードデータのいずれかと、次期命令ポインタデータおよび次期命令コードデータのいずれかが一致し、次期命令コードデータが実行開始されるときにブレーク信号を出力する。
【0019】
本願の出願人は、専用処理に適した専用回路を備えた専用処理ユニットを有し、プロセッサユニットのフェッチユニットは、命令コードデータとしてプロセッサユニットにおける処理を規定する汎用命令コードデータを実行ユニットに供給し、専用処理ユニットにおける処理を規定する専用命令コードデータを専用処理ユニットに供給するデータ処理装置、すなわちシステムLSIを提案しているが、本発明のプロセッサユニットを、このシステムLSIの埋め込みプロセッサとして用いることにより、低コストでデバッグユニットを追加することが可能となる。
【0020】
【発明の実施の形態】
以下に図面を参照して本発明をさらに詳しく説明する。図1に本発明に係るプロセッサユニットを有するデータ処理装置、すなわちシステムLSI2が搭載されたシステムボード1の概略を示してある。システムボード1に搭載されたシステムLSI2は、VUPUと称される本願の出願人が提案しているアーキテクチャによるLSI(以降ではVUPU)であり、プロセッサユニットあるいは汎用データ処理ユニット(以降ではPU)5と、特定の処理に特化した専用データ処理ユニット(以降ではVU)6とを搭載している。さらに、本例のVUPU2は、PU5のデバッグを行なうデバッグユニット(以降ではDU)7と、DU7に対して信号を入出力するためのユーザインターフェイス9を備えている。ユーザインターフェイス9としては、JTAGバウンダリースキャンテストインターフェイスなどが採用でき、システムボード1に設けられたデバッグインターフェイス3を介してパーソナルコンピュータ4で稼動するデバッガソフトウェア10によりDU7を制御することができる。
【0021】
図2に、VUPU2の概略をブロック図により示してある。VUPU2は、PU5を組み込み型プロセッサとして、PU5を介してVU6をプログラムにより制御するLSIである。PU5は、汎用的な構成のプロセッサユニットであり、実行形式のプログラムコード(マイクロプログラムコード)11aを内蔵したコードRAM11と、このコードRAM11から命令をフェッチし、PU5の実行ユニット(EU)13とVU6とにデコードされた制御信号を提供するフェッチユニット(FU)12を備えている。さらに、PU5は、汎用レジスタ、フラグレジスタおよび演算ユニット(ALU)などから構成される汎用性の高い実行ユニット13を備えており、データRAM14を一時的な記録領域としてデータを入出力しながら汎用処理を実行する。
【0022】
フェッチユニット12は、前の命令あるいはステートレジスタ15の状態、割込み信号などによって決まる命令ポインタからフェッチアドレスを算出して出力し、コードRAM11の所定のアドレスから命令コードを含むデータをフェッチする。さらに、フェッチされたデータをデコードして、コードRAM11から得られたデータから専用命令(VU命令)あるいは汎用命令(一般命令、PU命令)を生成し、専用命令を制御信号(デコーデド・コントロールシグナル:Decoded Control Signal)φvとしてVU6に供給し、デコードした汎用命令を制御信号(デコーデド・コントロール・シグナル:Decoded Control Signal)φpとして実行ユニット13に供給する。実行ユニット13からは実行状態を示すステータス信号(Exec unit Status Signal)φsが返され、実行ユニット13およびVU6の実行結果がステートレジスタ(状態レジスタ)15に反映される。たとえば、実行ユニット13で分岐条件が満足されると、フェッチユニット12ではそれにしたがって分岐先の命令コードをフェッチする。
【0023】
このVUPU2においては、フェッチユニット12に対して、PU2の実行ユニット13とVU6とが同じ階層の処理ユニットである。したがって、フェッチユニット12を実行ユニット13とVU6に共通した命令発行ユニットとし、実行ユニット13をVU6に対比されるPUとしたアーキテクチャであると捉えることも可能である。
【0024】
VU命令φvを実行するVU6は、自己のユニット宛てのVU命令φvを選択してデコードするユニット21と、予め特定のデータ処理を行なうように制御信号をハードウェア的に出力するシーケンサ(FSM(Finite State Machine)、ファイナイトステートマシン)22と、このシーケンサ22からの制御信号に従って特定のデータ処理を行なうようにデザインされたデータパス部23を備えている。また、VU6は、PU5からアクセス可能なレジスタ24を備えており、データパス部23の処理に必要なデータをインターフェイスレジスタ24を介してPU5で制御したり、VU6の内部状態をレジスタ24を介してPU5で参照できるようになっている。さらに、データパス部23で処理された結果はPU5に供給され、PU5ではその結果を利用した処理が行なわれる。
【0025】
コードRAM11には、汎用命令(PU命令)および専用命令(VU命令)を含んだプログラム11aが記憶されており、フェッチユニット12により、VU6には、自己を起動するVU命令を含む制御信号φvが供給され、VU命令デコーダ21がそれを選択して動作する。一方、実行ユニット13には、PU命令がデコードされた制御信号φpだけが供給される。VU命令をデコードした制御信号φvは実行ユニット13には発行されず、その代わりに、実行を伴わないnop命令を示す制御信号が発行され、実行ユニット13ではその処理をスキップする。したがって、実行ユニット13では解釈できないVU命令は実行ユニット13には提供されず、PU5の構成は変えることなく、新たな、あるいは様々なVU命令を含んだプログラム11aをVUPU2で実行することができる。なお、本明細書の幾つかの記載においては、PU命令とそれをデコードした制御信号φpとが同じ意味で用いられ、VU命令とそれをデコードした制御信号φvとが同じ意味で用いられている。
【0026】
したがって、VUPU2においては、VU6がアプリケーションなどによって変更されるものであり、VU6に指示を出す専用命令(VU命令)もアプリケーションによって変わることが多い。一方、PU5は、nop命令が出力されることにより、VU用に特化した命令に対処する必要がなく、基本命令あるいは汎用命令であるPU命令を解釈して実行できる機能があればよい。したがって、PU5は、汎用型の埋め込みプロセッサであると共に、VU6が稼動する汎用性のあるプラットフォームとしての機能を提供する。そして、汎用性のあるPU5と、専用回路を備えたVU6とを組み合わせることにより、PU5を介してプログラムによりVU6も合わせて制御することができる。このため、VUPUアーキテクチャにより、リアルタイム応答性を犠牲にすることなく、設計および開発期間を短縮でき、さらに、その後の変更や修正にも柔軟に対処できるシステムLSIを提供できる。
【0027】
したがって、PU5の汎用性を維持しながら、多くのオプショナルな機能を搭載できることがVUPU2として重要であり、本例のVUPU2では、オプショナルなユニットとしてデバッグユニット(DU)7が搭載されている。図3にPU5とDU7との間で交換される信号を示してある。本例のPU5は、フェッチユニット12でフェッチおよびデコードされて次に実行ユニット13に供給される次期命令コードデータφcを外部出力する配線あるいは接続点(第2の出力手段)32と、その次期命令コードデータφcを示す次期命令ポインタデータφaを外部出力する配線あるいは接続点(第1の出力手段)31を備えている。また、PU5は、次期命令コードデータφcに基づく処理を実行ユニット13で実行開始するタイミングを示す信号φtを外部出力する配線あるいは接続点(第3の出力手段)33を備えている。この次命令の実行を開始するタイミングを示す信号φtは、実行ユニット13において命令完了により次の命令をラッチするタイミングを示す信号である。
【0028】
さらに、PU5は、DU7からブレーク信号φbを受信する配線あるいは接続点34を備えており、DU7からブレーク信号φbを受信すると実行ユニット13における命令コードデータに基づく処理を停止する。
【0029】
接続点31、32、33および34を備えたデバッグ用のインターフェイス8に対応し、DU7には、次期命令ポイントデータφaを受信する接続点(第1の入力手段)61と、次期命令コードデータφcを受信する接続点(第2の入力手段)62と、実行開始のタイミング信号φtを受信する接続点(第3の入力手段)63と、ブレーク信号φbを出力する接続点64とを備えたインターフェイス60が設けられている。DU7のブレーク条件一致検出機能50は、ユーザインターフェイス9を介して設定されたターゲットの命令ポインタデータφtaが受信した次期命令ポイントデータφaと一致し、設定されたターゲットの命令コードデータφtcが受信した次期命令コードデータφcと一致し、さらに、タイミング信号φtから、その次期命令コードデータφcが実行開始される状態になるとブレーク信号φbを出力する。
【0030】
図4に、これらの信号に関するPU5およびDU7のさらに詳しい構成を示してある。PU5のフェッチユニット12は、フェッチおよびデコードされた命令と、実行ユニット13からのステータス信号φsに基づき、次の命令コードを得るためのフェッチアドレスを生成する次命令ポインタ発生部35を備えている。この次命令ポインタ発生部35は、命令ポインタデータを更新して、それからフェッチアドレスを計算する機能に加え、フェッチおよびデコードされた命令が分岐命令のときは、実行ユニット13の結果から分岐条件が成立すれば命令ポインタデータを分岐先のポインタに移行する機能を備えている。この発生部35で生成されたフェッチアドレスはレジスタ36に格納されて、アドレスバス71を介してコードRAM11に供給される。そのフェッチアドレスに対応したデータがデータバス72を介してフェッチデータφdとして得られる。データバス72は、2語長のバス幅を備えているので、得られるデータは常に2語長である。したがって、命令コードが2語長のみではなく、1語長あるいは3語長などの不定長または可変長であると、フェッチデータφdから適切な位置にある命令コードデータφcを切り出したり、複数のフェッチデータφdに跨った命令コードデータφcを生成する必要がある。したがって、データアライメント部37は、フェッチデータφdをデコードして命令コードデータφcを生成する作業を行う。そして、命令コードデータφcが生成されるタイミングになるとリードタイミング信号φrが出力されて、次に実行ユニット13に供給される次期命令コードデータがレジスタ39にラッチされる。同時に、その次期命令コードデータφcをフェッチするために発生部35から出力されている次期命令ポインタデータφaがレジスタ38にラッチされる。
【0031】
これらの次期命令ポインタデータφaおよび次期命令コードデータφcは、実行ユニット13に供給される。実行ユニット13では、内部で実行中の現命令に伴う処理が終了して次命令実行開始タイミング信号φtが出力されると、次期命令ポインタデータφaが現命令ポインタのレジスタ41にラッチされ、次期命令コードデータφcが現命令コードのレジスタ42にラッチされる。これにより、次期命令コードφcに基づく処理が実行ユニット13で開始される。実行ユニット13は、デバッグ機能としてブレーク信号φbを解釈する機能44を備えており、ブレーク信号φbを受信するとデバッグ用のタイミング信号φdtを出力する。セレクタ43は、通常のタイミング信号φtと、デバッグ用のタイミング信号φdtとを選択し、デバッグが開始されるとデバッグ用のタイミング信号φdtで次期命令ポインタφaおよび次期命令コードφcをラッチし、デバッグのタイミングで実行ユニット13を制御可能とする。
【0032】
本例のPU5は、これらのレジスタ38および39にラッチされた次期命令ポインタデータφaおよび次期命令コードデータφcとを外部出力する接続ポイント31および32が予め設けられている。また、通常の次命令実行タイミング信号φtを外部出力する接続ポイント33が予め設けられている。これらの外部出力31、32および33には、単にデータφa、φcおよびφtが出力されているだけであり、これらのデータが外部で利用されてもされなくても、そのこと自体ではPU5の制御に影響を及ぼさない構成となっている。ただし、図4に示したVUPU2では、これらのデータφa、φcおよびφtに基づいてDU7からブレーク信号φbがフィードバックされるので、デバッグモードに移行することができる。すなわち、本例では、PU5とDU7とが機能を協調することにより、フェッチおよびデコードするハードウェアを重複させたり、タイミングを監視する手間やハードウェアを省いてデバッグを行うことができる構成となっている。
【0033】
DU7は、ユーザインターフェイス9を介してパーソナルコンピュータ4からブレーク条件を設定可能な条件設定部51と、その条件とPU5から得られたデータを比較してブレーク信号φbを出力するブレーク検出部55とを備えている。条件設定部51は、ブレークのターゲットとなるブレークアドレス条件φtaがセットされるレジスタ52と、ブレークデータ条件φtcがセットされるレジスタ53とを備えている。ブレーク検出部55は、ブレークアドレス条件φtaと、接続ポイント61を介して得られたPU5の次期命令ポインタデータφaとを比較するコンパレータ56と、ブレークデータ条件φtcと、接続ポイント62を介して得られたPU5の次期命令コードデータφcとを比較するコンパレータ57と、これらの出力結果と接続ポイント63を介して得られたタイミングデータφtとの論理和を演算してブレーク信号φbを出力するアンドゲート58とを備えている。ブレーク信号φbはレジスタ59を経由してPU5に供給される。
【0034】
このように、本例のDU7は、ブレーク条件となるデータを保存するレジスタ群51と、それらのデータとプロセッサ側から得られたデータとを比較してブレーク信号φbを出力する検出部55とを備えた極めて簡易な構成でPU5に対して所望のタイミングでブレーク信号φbを供給することができる。一方、PU5でも、特にDU7を意識した制御を行う必要はなく、所望のブレーク条件が整うとDU7からブレーク信号φbが供給されてデバッグモードに移行する。
【0035】
図5にデバッグに関するPU側の処理とDU側の処理をフローチャートを用いて示してある。まず、PU5では、ステップ81において、フェッチユニット12で実行されるフェッチステージにて、次の命令コード(次期命令コードデータ)を取得するためにデータをフェッチするためのフェッチアドレスを算出し、コードRAM11に対してそのデータの読出をかける。このとき、1語または2語長の可変長命令では、2語長幅のデータバスに対応する2語長幅のデータの先頭アドレスで読出をかける。これにより、ステップ82において、コードRAM11から所望の次期命令コードデータを含んだデータが読み出される。さらに、ステップ83において、フェッチユニット12で実行されるデコードステージにて、フェッチされたデータφdから所望の次期命令コードデータφcをデコードし、その次期命令コードデータφcおよび次期命令ポインタデータφaをレジスタ39および38に格納する。本例のPU5では、このステップ83で、生成された次期命令コードデータφcおよび次期命令ポインタデータφaが自動的にDU7に供給される。
【0036】
次に、実行ユニット13の実行ステージで、現命令に基づく処理が完了するステップ84になると、フェッチユニット12で用意された次期命令コードデータφcと次期命令ポインタデータφaが実行ユニット13に取り込まれる。このとき、本例のPU5では自動的にこれらのデータφaおよびφcを取り込む信号であるタイミング信号φtがDU7に供給される。そして、ステップ85で次期命令コードデータφcに基づく処理を実行する際に、ブレーク信号φbがDU7から供給されると一時的に処理を中断してデバッグモードに入る。したがって、このPU5は、ブレーク信号φbが供給されないかぎり、DU7の有無にかかわらず通常通り、順番に次期命令コードデータφcを取得し、それによる処理を行う。
【0037】
DU7では、ステップ91で、事前に外部ホスト4からブレーク条件であるブレークアドレスφtaおよびブレークデータφtcを外部指定条件として読み込む。PU5でデバッグ対象のプログラムが実行されて、次期命令ポインタデータφaおよび次期命令コードデータφcが供給されると、ステップ92において、次期命令ポインタデータφaおよび次期命令コードデータφcを取得し、それらとブレークアドレスφtaおよびブレークデータφtcとをそれぞれ比較する。ステップ93において、それらが一致すると、ステップ94において、タイミング信号φtが供給されたときにブレーク要求信号φbをPU5に出力する。これにより、PU5では、ステップ85においてブレーク要求信号φbを受けて一時停止する。
【0038】
図6に示したタイミングチャートでは、ブレークデータφtaとしてアドレスA3がセットされ、ブレークデータφtcとして命令C3がセットされているときに、時刻t1に次期命令ポインタデータφaがアドレスA3となり、次期命令コードデータφcがコードC3になるとDU7で一致状態となる。そして、時刻t2に次命令の実行タイミング信号φtが入力されるとブレーク信号φbが生成され、次期命令コードデータφcが実行ユニット13で実行される次のクロックのタイミングである時刻t3にブレーク信号φbがPU5に供給される。その結果、PU5は命令C3を実行する段階で一時停止する。
【0039】
このように、本例のPU5では、次期命令ポインタデータφaの出力端31、次期命令コードデータφcの出力端32および次命令実行開始タイミング信号φtの出力端33を有するインターフェイス8が用意されているので、DU7はPU5から供給されるこれらの信号φa、φcおよびφtを利用してブレーク信号φbを生成しPU5に供給することができる。このため、DU7には、次期命令ポインタデータφa、次期命令コードデータφcおよび次命令実行開始タイミング信号φtを生成するハードウェアは必要なく、1つのLSI2の内部に重複したハードウェアが搭載されるのを防止することができる。
【0040】
次期命令ポインタデータφaおよび次期命令コードデータφcを出力するハードウェアは、上述したように、命令コードが可変長であったり、命令コード長がデータバス幅と一致しない場合は大きなものになる。しかしながら、本例のPU5およびDU7を組み合わせたLSI2では、プロセッサ5の側でデコードされた命令コードデータをDU7が利用できるので、命令コードが可変長であろうとなかろうと、同一構成のDU7を利用してデバッグ機能を付加できる。すなわち、PU5にデータφa、φcおよびφtを出力する機能を付加することにより、DU7では、次期命令ポインタデータφaに対してアドレス一致検出を行うことで、命令長の監視は不要となり、次期命令コードデータφcに対してコード一致検出を行うことでバスのデータをアドレスに合わせて整列するようなデコード処理も不要となる。さらに、分岐制御もPU5の側で行われた結果の命令コードが得られるので、その制御も不要となる。そして、実行ステージの命令完了タイミングは実行ユニット13からのタイミング信号φtで分かるので、命令コードがマルチサイクルであるか否かなどの解析も不要となる。
【0041】
さらに、DU7では、分岐条件が成立したりして、読み捨てられる命令コードを意識するハードウェアも必要ない。PU5では、実行されない命令は実行ステージに渡されることがないので、次期命令コードデータφcと、それを実行ステージでラッチするための次命令実行開始タイミング信号φtとを組み合わせることにより、DU7で実行ステージに渡される命令コードデータを確実にモニタリングできるからである。
【0042】
一方、PU5においては、単に、これらのデータφa、φcおよびφtを出力するポイント31〜33を予め設けてあるだけなので、デバッグ機能の有無を問題にせずにソフトウェアおよびハードウェアを設計、開発およびメンテナンスすることができる。これらの接続ポイント31〜33のハードウェア構成は上記に限定されることはなく、LSI2のPU5のバウンダリにおいて、デバッグユニットなどのオプションユニットに対して信号あるいはデータを伝達できるようになっていれば良い。また、上記の例のデバッグユニットにおいては、次期命令ポインタデータφaと、次期命令コードデータφcの両方を受け取り、それぞれのデータφaおよびφcをブレークアドレスφtaおよびブレークデータφcと比較しているが、次期命令ポインタデータφaあるいは次期命令コードデータφcの少なくともいずれか一方をターゲットとなる値と比較してブレーク信号を出力するようにしても良い。
【0043】
さらに、オプションユニットはデバッグユニットに限定されるものではないが、これらの信号をもっとも有効に活用できるユーザユニットはデバッグユニットである。このようなプロセッサであれば、システムLSIの埋め込み用途のプロセッサ用として、拡張性はあるが単一仕様のプロセッサを設計、開発およびメンテナンスするだけでよく、余分な投資を省くことができる。このため、本発明により、エンベッデド・プロセッサに適したオプション機能の豊富なプロセッサを提供することが可能となり、VUPUアーキテクチャにさらに適したPU5を提供することができる。また、VUPUアーキテクチャに限らず、他のタイプのエンベッデド・プロセッサにも本発明を提供することにより、オプション機能がさらに豊富なプロセッサを提供することができる。典型的なデバッグユニットは、ブレーク条件が成立するとプロセッサユニットに対して一時停止を要求するブレーク信号を供給するブレーク信号出力手段を有するデバッグユニットであって、前記ブレーク条件として設定されているターゲットの命令ポインタデータと比較する次期命令ポインタデータを当該デバッグユニットの外部から受け入れる第1の入力手段と、前記ブレーク条件として設定されているターゲットの命令コードデータと比較する次期命令コードデータを当該デバッグユニットの外部から受け入れる第2の入力手段とを有する。デバッグユニットは、前記次期命令コードデータが実行開始されるタイミングを当該デバッグユニットの外部から受け入れる第3の入力手段を有し、前記ブレーク信号出力手段は、少なくとも前記ターゲットの命令ポインタデータおよび前記ターゲットの命令コードデータのいずれかと、前記次期命令ポインタデータおよび前記次期命令コードデータのいずれかが一致し、前記次期命令コードデータが実行開始されるときに前記ブレーク信号を出力することが望ましい。典型的なデバッグユニットの制御方法は、ブレーク条件として設定されているターゲットの命令ポインタデータと比較する次期命令ポインタデータと、前記ブレーク条件として設定されているターゲットの命令コードデータと比較する次期命令コードデータとの少なくともいずれかを当該デバッグユニットの外部から受け入れる工程と、前記ブレーク条件が成立するとプロセッサユニットに対して一時停止を要求するブレーク信号を供給するブレーク要求工程とを有する。制御方法は、前記次期命令コードデータが実行開始されるタイミングを当該デバッグユニットの外部から受け入れる工程を有し、前記ブレーク要求工程では、少なくとも前記ターゲットの命令ポインタデータおよび前記ターゲットの命令コードデータのいずれかと、前記次期命令ポインタデータおよび前記次期命令コードデータのいずれかが一致し、前記次期命令コードデータが実行開始されるときに前記ブレーク信号を出力することが望ましい。
【0044】
【発明の効果】
以上に説明したように、本発明においては、プロセッサユニットに次期命令ポインタデータおよび次期命令コードデータを外部に出力するインターフェイスを設けることにより、組み込み型プロセッサとオプション化されたデバッグユニットとの間に有効な状態伝達信号線を設置することが可能となる。したがって、プロセッサ本体とデバッグユニットとの機能を協調させることができ、デバッガのハードウェア負担を削減することができる。また、システムLSIを構築したときにハードウェアの重複を防止し、デバッグ機能などのオプション機能を容易に搭載することができる。このため、コンパクトで低コストな多機能型のシステムLSIを提供することができる。
【図面の簡単な説明】
【図1】本発明に係るデータ処理装置を搭載したLSI搭載システムボードの概略を示す図である。
【図2】本発明に係るデータ処理装置の概略を示すブロック図である。
【図3】本例のPUとDUとの間で交換される信号を説明するための図である。
【図4】本例のPUとDUの詳細を示す図である。
【図5】本例のPUとDUとの間で行なわれるデバッグ処理を示すフローチャートである。
【図6】DUでブレーク条件が成立したときにPUの実行ユニットにおける処理が停止される処理を説明するためのタイミングチャートである。
【符号の説明】
1 LSI搭載システムボード
2 データ処理装置(システムLSI)
5 プロセッサユニット(PU)
6 専用データ処理ユニット(VU)
7 デバッグユニット(DU)
8、10 インターフェイス
11 コードRAM
12 フェッチユニット(FU)
13 実行ユニット
31、32、33、34 接続点
55 ブレーク検出部
61、62、62、64 接続点[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a data processing device such as an LSI and a processor incorporated therein.
[0002]
[Prior art]
A large-scale system LSI is possible, and it is becoming possible to construct the entire system on a single semiconductor chip. Along with this, a processor (processor unit) that is indispensable for configuring a system and a function that has been developed as a dedicated LSI in order to maximize the performance according to the purpose are integrated on a single semiconductor chip. Development of a system LSI integrated into a single system is underway. The processor developed for this large-scale system LSI is called an embedded processor (embedded processor).
[0003]
[Problems to be solved by the invention]
An embedded processor is fundamentally different from a conventional single-chip CPU, but currently provided embedded processors are single-chip CPU processors. On the other hand, it is hard to say that it is clearly recognized as an embedded application.
[0004]
The major difference between the embedded processors is that the optional functions need to be rich. That is, in the case of a conventional CPU (or a finished product CPU) configured with a single chip, a function that will be required is fully mounted in advance in order to meet the needs of a wide range of users. On the other hand, the embedded processor incorporated in the system LSI requires only the necessary functions each time. Therefore, the function conventionally provided as one processor is also converted into an optional module. A processor unit and a modularized function are mounted on one system LSI, and a processor having a desired function is a system LSI. Will be built inside.
[0005]
Against this background, a debug module (debug function), which is generally built in the case of a conventional CPU, is also a separate unit that can be incorporated into a system LSI as an option in an embedded processor unit. It is desirable to be provided as The debug unit sets instruction pointer data or instruction code data as a target for causing the processor to break (pause) from a personal computer or the like, and the instruction pointer data or instruction code that is a break condition while the processor is executing a program. This is hardware that temporarily stops the processing of the processor unit when data is found. Then, debugging is performed by observing the contents of the internal register of the processor or injecting a specific value into the internal register.
[0006]
When the debug unit is provided as an optional module, it is desirable that the debug unit is also controlled separately from the embedded processor. This also improves debugging reliability. For example, debugger software for operating the debug unit can be run on a personal computer. In the case of a conventional finished product CPU, software is created on the premise that there is a debugger, whereas in an embedded processor, whether or not a debugger is provided is a user specification, and it is assumed that there is a debugger. Software development can be wasteful and redundant. In addition, running software on the premise that there is a debugger in a system without a debugger may cause a system error, and reliability may be reduced.
[0007]
On the other hand, when trying to operate the debugger unit independently of the processor unit, in order to break the processor unit according to the contents of the instruction bus (instruction pointer and instruction code) which is a break condition, the instruction pointer and instruction code are set. It is necessary to provide the fetch and decode functions to be generated in the debugger unit as well as the processor unit. For this reason, if the system LSI is to have a debugging function, it is necessary to mount a debugging unit having a complicated configuration and a relatively large circuit scale. When viewed as the entire system LSI, the hardware for fetching and decoding is doubled. In particular, when a processor unit corresponding to an instruction set having an indefinite length (or variable length) such as one or two instructions is mounted, the following functions are required for fetching and decoding. The scale of hardware that is heavily owned will also increase.
[0008]
That is, if the bus width of the data bus from which the instruction code is output does not match the instruction length, it is not clear where the next instruction code data is in the data, and the next instruction code straddles the fetched data. Data may exist. Therefore, in order to determine whether the instruction pointer data to be broken matches the instruction pointer used to fetch the data including the instruction code, the position of the next instruction pointer is determined by monitoring the length of each instruction. The function to do is needed. Also, if the data bus width does not match the instruction length, the branch destination address does not always match the fetch address when a branch occurs, so adjust it to determine the position of the next instruction pointer. The function to do is needed. Further, if the data bus width does not match the instruction length, as described above, the next instruction code data is selected from the fetched data and arranged, or the next instruction code data straddling the preceding and succeeding data is changed. A function to align is required.
[0009]
In addition to such functions, the following functions are also required in order for the debug unit to appropriately determine the next instruction code to be executed next in the execution unit of the processor. If the instruction code includes a multi-cycle instruction code that requires a plurality of execution cycles for execution, the timing at which the next instruction code is executed in the execution unit becomes unclear. Therefore, a function for detecting the timing from the instruction fetch until the instruction is executed is required. If the multi-cycle instruction processing can be supported, the hardware becomes very large.
[0010]
Further, when a branch occurs, an instruction code that has not been executed by the execution unit even if the instruction code has been fetched before that is an instruction code that is not actually executed and does not become the next instruction code. Since it is meaningless to output a break signal for debugging an instruction code that is not executed, a function for determining whether or not a branch occurs is also required.
[0011]
Since the hardware that covers these functions becomes large-scale, it is hardware that should be omitted considering the miniaturization and cost reduction of the system LSI. Moreover, these functions are basically functions supported by the processor unit hardware as the fetch function of the processor unit, and the hardware is duplicated.
[0012]
On the other hand, developing both an embedded processor with a debugging function and an embedded processor without a debugging function is a big investment in the overlap. In addition, when changing or improving the function of a processor, it is a heavy load to upgrade both those with a debugging function and those without a debugging function at the same time, which is a large duplication investment. In addition, an investment is required to double develop and maintain software for a processor with a debugging function and software for a processor without a debugging function. Therefore, in comparison with these disadvantages, it is possible to determine that the overlapping hardware to the extent that the debug unit and the processor unit are provided with somewhat overlapping hardware should be acceptable.
[0013]
However, an object of the present invention is to provide a system in which hardware that overlaps with a processor unit can be omitted from a debug unit in a system LSI that can be equipped with a debug unit as an option. Accordingly, it is an object of the present invention to prevent double investment in design / development or maintenance of hardware and software and to provide a compact and low-cost system LSI.
[0014]
[Means for Solving the Problems]
The present invention provides a processor unit having an interface for outputting next instruction pointer data and next instruction code data to the outside of the processor unit as an embedded processor unit. With this processor unit, when incorporated into the system LSI together with the debug unit, the debug unit can determine the break condition from the next instruction pointer data and / or the next instruction code data provided from the processor unit. Duplicate hardware can be eliminated. On the other hand, the processor unit only outputs the next instruction pointer data and the next instruction code data regardless of the presence or absence of the debug unit, so that both hardware and software can be developed and designed regardless of the presence or absence of the debug unit. Maintenance can be performed.
[0015]
That is, in the present invention, a processor having a fetch unit that outputs a fetch address based on instruction pointer data, can generate instruction code data from the obtained data, and an execution unit that can execute processing based on the instruction code data The fetch unit provides a processor including a data alignment unit that decodes obtained data to generate variable-length instruction code data. The processor further includes instruction code data decoded by the fetch unit,Of the current instruction code data in the execution unitNext, first output means for outputting next instruction pointer data of next instruction code data to be executed by the execution unit to the outside from the processor unit, and second output for outputting the next instruction code data to the outside from the processor unit Means. If it is this processor unit, it is a debug unit having a break signal output means for supplying a break signal for requesting a pause to the processor unit when a break condition is satisfied, and is a target instruction pointer set as a break condition First input means for receiving next instruction pointer data to be compared with data from outside the debug unit, and next instruction code data to be compared with target instruction code data set as a break condition from outside the debug unit The debug unit can be operated in combination with the debug unit having the second input means.
[0016]
How to control the debug unitA break request step for supplying a break signal for requesting a pause to the processor unit when a break condition is satisfied, and a next instruction pointer to be compared with target instruction pointer data set as a break condition Receiving from the outside of the debug unit at least one of data and next instruction code data to be compared with target instruction code data set as a break condition. Therefore, the debug unit does not require hardware corresponding to the fetch unit of the processor unit.
[0017]
Therefore, the data processing apparatus having the processor unit and the debug unit according to the present invention can be equipped with a debug function without duplicating hardware corresponding to the fetch unit. Since the debug unit is an optional unit, a data processing device, that is, a system LSI can be formed by using the processor unit of the present invention as an embedded processor without mounting the debug unit.
[0018]
When the program includes a multi-cycle instruction code, it is necessary to determine the execution time of the next instruction code data. Further, in order to prevent the generation of a useless break signal accompanying the occurrence of a branch, it is desirable to determine whether or not a break signal is necessary immediately before execution of the next instruction code data. Therefore, it is further preferable to provide a processor unit having third output means for outputting the timing for starting processing based on the next instruction code data from the processor unit to the outside. The timing for starting the processing based on the next instruction code data is the timing at which the processing based on the current instruction code data in the execution unit is completed, and this timing may be output from the processor unit to the outside. Correspondingly, the debug unit also includes third input means for accepting the timing at which the next instruction code data starts to be executed from the outside of the debug unit. The break signal output means includes at least target instruction pointer data and Any one of the target instruction code data and the next instruction pointer data and the next instruction code data coincide with each other, and a break signal may be output when the next instruction code data is started to be executed. In the control method of the debug unit, a step of accepting the timing at which the next instruction code data starts to be executed is provided from the outside of the debug unit. In the break request process, at least one of the target instruction pointer data and the target instruction code data is set. When the next instruction code data coincides with the next instruction code data and the next instruction code data starts to be executed, a break signal is output.
[0019]
The applicant of the present application has a dedicated processing unit having a dedicated circuit suitable for dedicated processing, and the fetch unit of the processor unit supplies general-purpose instruction code data defining processing in the processor unit as instruction code data to the execution unit. However, a data processing apparatus that supplies dedicated instruction code data defining processing in the dedicated processing unit to the dedicated processing unit, that is, a system LSI has been proposed. The processor unit of the present invention is used as an embedded processor of the system LSI. This makes it possible to add a debug unit at a low cost.
[0020]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, the present invention will be described in more detail with reference to the drawings. FIG. 1 schematically shows a data processing apparatus having a processor unit according to the present invention, that is, a system board 1 on which a
[0021]
FIG. 2 is a block diagram showing an outline of VUPU2. VUPU2 is an LSI that uses PU5 as an embedded processor and controls VU6 by a program via PU5. The PU 5 is a general-purpose processor unit, and includes a
[0022]
The fetch
[0023]
In this VUPU2, with respect to the fetch
[0024]
The VU 6 that executes the VU instruction φv includes a
[0025]
The
[0026]
Therefore, in VUPU2, VU6 is changed by an application or the like, and a dedicated instruction (VU instruction) for giving an instruction to VU6 often changes depending on the application. On the other hand, the PU 5 need only have a function that can interpret and execute a PU instruction that is a basic instruction or a general-purpose instruction without having to deal with an instruction specialized for VU by outputting a nop instruction. Therefore, the PU 5 is a general-purpose embedded processor and provides a function as a versatile platform on which the VU 6 operates. Then, by combining the versatile PU 5 and the VU 6 provided with a dedicated circuit, the VU 6 can also be controlled by a program via the PU 5. Therefore, the VUPU architecture can provide a system LSI that can shorten the design and development period without sacrificing real-time responsiveness, and can flexibly cope with subsequent changes and modifications.
[0027]
Therefore, it is important for the
[0028]
Further, the PU 5 is provided with a wiring or
[0029]
Corresponding to the
[0030]
FIG. 4 shows a more detailed configuration of PU5 and DU7 related to these signals. The fetch
[0031]
These next instruction pointer data φa and next instruction code data φc are supplied to the
[0032]
In the PU 5 of this example, connection points 31 and 32 for outputting the next instruction pointer data φa and the next instruction code data φc latched in the
[0033]
The DU 7 includes a
[0034]
As described above, the DU 7 of this example includes the
[0035]
FIG. 5 shows the processing on the PU side and the processing on the DU side related to debugging using a flowchart. First, the PU 5 calculates a fetch address for fetching data in order to acquire the next instruction code (next instruction code data) at the fetch stage executed by the fetch
[0036]
Next, at the execution stage of the
[0037]
In
[0038]
In the timing chart shown in FIG. 6, when the address A3 is set as the break data φta and the instruction C3 is set as the break data φtc, the next instruction pointer data φa becomes the address A3 at the time t1, and the next instruction code data When φc becomes the code C3, a match is established at DU7. When the next instruction execution timing signal φt is input at time t2, a break signal φb is generated. At time t3, which is the timing of the next clock at which the next instruction code data φc is executed by the
[0039]
Thus, in the PU 5 of this example, the
[0040]
As described above, the hardware that outputs the next instruction pointer data φa and the next instruction code data φc becomes large when the instruction code has a variable length or the instruction code length does not match the data bus width. However, in the
[0041]
Further, the DU 7 does not require hardware that is aware of the instruction code that is discarded because the branch condition is satisfied. In PU5, since an instruction that is not executed is not passed to the execution stage, the next instruction code data φc and the next instruction execution start timing signal φt for latching it in the execution stage are combined in the execution stage in DU7. This is because it is possible to reliably monitor the instruction code data passed to.
[0042]
On the other hand, the PU 5 is simply provided with
[0043]
Furthermore, the option unit is not limited to the debug unit, but the user unit that can utilize these signals most effectively is the debug unit. With such a processor, it is only necessary to design, develop and maintain a single-spec processor for a processor for embedding a system LSI, but can save extra investment. Therefore, according to the present invention, it is possible to provide a processor with abundant optional functions suitable for an embedded processor, and it is possible to provide a PU 5 further suitable for a VUPU architecture. Further, by providing the present invention not only to the VUPU architecture but also to other types of embedded processors, it is possible to provide a processor with more rich optional functions.A typical debug unit is a debug unit having a break signal output means for supplying a break signal for requesting a pause to the processor unit when a break condition is satisfied, and a target instruction set as the break condition First input means for receiving next instruction pointer data to be compared with pointer data from the outside of the debug unit, and next instruction code data to be compared with target instruction code data set as the break condition outside the debug unit Second input means for accepting from. The debug unit has third input means for accepting the timing at which execution of the next instruction code data starts from the outside of the debug unit, and the break signal output means includes at least the instruction pointer data of the target and the target Preferably, any one of the instruction code data, the next instruction pointer data, and the next instruction code data coincide with each other, and the break signal is output when execution of the next instruction code data is started. A typical debug unit control method includes a next instruction pointer data to be compared with target instruction pointer data set as a break condition, and a next instruction code to be compared with target instruction code data set as the break condition. A step of accepting at least one of data from the outside of the debug unit, and a break requesting step of supplying a break signal for requesting the processor unit to pause when the break condition is satisfied. The control method includes a step of accepting a timing at which the next instruction code data starts to be executed from the outside of the debug unit. In the break request step, at least one of the instruction pointer data of the target and the instruction code data of the target Preferably, the break signal is output when the next instruction code data coincides with the next instruction code data and the next instruction code data is started to be executed.
[0044]
【The invention's effect】
As described above, in the present invention, the processor unit is provided with an interface for outputting the next instruction pointer data and the next instruction code data to the outside, so that it is effective between the embedded processor and the optional debug unit. It is possible to install a state transmission signal line. Therefore, the functions of the processor body and the debug unit can be coordinated, and the hardware load on the debugger can be reduced. Further, when a system LSI is constructed, it is possible to prevent duplication of hardware and easily mount optional functions such as a debug function. For this reason, a compact and low-cost multifunctional system LSI can be provided.
[Brief description of the drawings]
FIG. 1 is a diagram showing an outline of an LSI mounting system board on which a data processing apparatus according to the present invention is mounted.
FIG. 2 is a block diagram showing an outline of a data processing apparatus according to the present invention.
FIG. 3 is a diagram for explaining signals exchanged between a PU and a DU in this example;
FIG. 4 is a diagram showing details of PUs and DUs in this example.
FIG. 5 is a flowchart showing debug processing performed between a PU and a DU in this example.
FIG. 6 is a timing chart for explaining processing in which processing in an execution unit of a PU is stopped when a break condition is established in DU.
[Explanation of symbols]
1 System board with LSI
2 Data processing device (system LSI)
5 Processor unit (PU)
6 Dedicated data processing unit (VU)
7 Debug unit (DU)
8, 10 interface
11 Code RAM
12 Fetch unit (FU)
13 execution units
31, 32, 33, 34 Connection point
55 Break detector
61, 62, 62, 64 connection point
Claims (8)
前記フェッチユニットは、前記得られたデータをデコードして可変長の命令コードデータを生成するデータアライメント部を含み、
前記プロセッサユニットは、さらに、前記フェッチユニットによりデコードされた命令コードデータであって、前記実行ユニットにおける現在の命令コードデータの次に前記実行ユニットで実行される次期命令コードデータの次期命令ポインタデータを当該プロセッサユニットから外部に出力する第1の出力手段と、
前記次期命令コードデータを当該プロセッサユニットから外部に出力する第2の出力手段とを備えている、データ処理装置。Data processing having a processor unit that includes a fetch unit that outputs a fetch address based on instruction pointer data, can generate instruction code data from the obtained data, and an execution unit that can execute processing based on the instruction code data A device,
The fetch unit includes a data alignment unit that decodes the obtained data to generate variable-length instruction code data,
The processor unit further includes instruction code data decoded by the fetch unit, the next instruction pointer data of the next instruction code data to be executed by the execution unit next to the current instruction code data in the execution unit. First output means for outputting to the outside from the processor unit;
And a second output means for outputting the next instruction code data from the processor unit to the outside.
このデバッグユニットは、さらに、前記ブレーク条件として設定されているターゲットの命令ポインタデータと比較する前記次期命令ポインタデータを受け入れる第1の入力手段と、
前記ブレーク条件として設定されているターゲットの命令コードデータと比較する前記次期命令コードデータを受け入れる第2の入力手段とを備えているデータ処理装置。In claim 1, further comprising a debug unit having a break signal output means for supplying a break signal for requesting a pause to the processor unit when a break condition is satisfied,
The debug unit further includes first input means for receiving the next instruction pointer data to be compared with target instruction pointer data set as the break condition;
And a second input means for receiving the next instruction code data to be compared with the target instruction code data set as the break condition.
前記デバッグユニットは、さらに、前記開始タイミングを受け入れる第3の入力手段を備えており、さらに、前記ブレーク信号出力手段は、少なくとも前記ターゲットの命令ポインタデータおよび前記ターゲットの命令コードデータのいずれかと、前記次期命令ポインタデータおよび前記次期命令コードデータのいずれかが一致し、前記次期命令コードデータが実行開始されるときに前記ブレーク信号を出力するデータ処理装置。In Claim 2, the processor unit further comprises a third output means for outputting a start timing for starting processing based on the next instruction code data from the processor unit to the outside.
The debug unit further includes third input means for receiving the start timing, and the break signal output means includes at least one of the target instruction pointer data and the target instruction code data, and A data processing apparatus that outputs the break signal when either the next instruction pointer data matches the next instruction code data and the next instruction code data starts execution.
前記デバッグユニットは、さらに、前記完了タイミングを受け入れる第3の入力手段を備えており、さらに、前記ブレーク信号出力手段は、少なくとも前記ターゲットの命令ポインタデータおよび前記ターゲットの命令コードデータのいずれかと、前記次期命令ポインタデータおよび前記次期命令コードデータのいずれかが一致し、前記次期命令コードデータが実行開始されるときに前記ブレーク信号を出力するデータ処理装置。The processor unit according to claim 2, further comprising third output means for outputting, from the processor unit, a completion timing at which the processing based on the current instruction code data in the execution unit is completed,
The debug unit further includes third input means for accepting the completion timing, and the break signal output means includes at least one of the instruction pointer data of the target and the instruction code data of the target, A data processing apparatus that outputs the break signal when either the next instruction pointer data matches the next instruction code data and the next instruction code data starts execution.
前記プロセッサユニットのフェッチユニットは、前記命令コードデータとして前記プロセッサユニットにおける処理を規定する汎用命令コードデータを前記実行ユニットに供給し、前記専用処理ユニットにおける処理を規定する専用命令コードデータを前記専用処理ユニットに供給するデータ処理装置。In any one of Claims 1 thru | or 4, it has a dedicated processing unit provided with the dedicated circuit suitable for dedicated processing further,
The fetch unit of the processor unit supplies, as the instruction code data, general-purpose instruction code data that defines the processing in the processor unit to the execution unit, and the dedicated instruction code data that defines the processing in the dedicated processing unit. Data processing device that supplies the unit.
前記命令コードデータに基づく処理を実行可能な実行ユニットとを有するプロセッサユニットであって、
前記フェッチユニットは、前記得られたデータをデコードして可変長の命令コードデータを生成するデータアライメント部を含み、
当該プロセッサユニットは、さらに、前記フェッチユニットによりデコードされた命令コードデータであって、前記実行ユニットにおける現在の命令コードデータの次に前記実行ユニットで実行される次期命令コードデータの次期命令ポインタデータを当該プロセッサユニットから外部に出力する第1の出力手段と、
前記次期命令コードデータを当該プロセッサユニットから外部に出力する第2の出力手段とを有するプロセッサユニット。A fetch unit that outputs a fetch address based on the instruction pointer data and generates instruction code data from the obtained data;
A processor unit having an execution unit capable of executing processing based on the instruction code data,
The fetch unit includes a data alignment unit that decodes the obtained data to generate variable-length instruction code data,
The processor unit further includes instruction code data decoded by the fetch unit, the next instruction pointer data of the next instruction code data to be executed by the execution unit next to the current instruction code data in the execution unit. First output means for outputting to the outside from the processor unit;
And a second output means for outputting the next instruction code data from the processor unit to the outside.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003048738A JP4641708B2 (en) | 2002-02-26 | 2003-02-26 | Data processing apparatus and processor unit |
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002049981 | 2002-02-26 | ||
| JP2002-49981 | 2002-02-26 | ||
| JP2003048738A JP4641708B2 (en) | 2002-02-26 | 2003-02-26 | Data processing apparatus and processor unit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2003323315A JP2003323315A (en) | 2003-11-14 |
| JP4641708B2 true JP4641708B2 (en) | 2011-03-02 |
Family
ID=29551987
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2003048738A Expired - Fee Related JP4641708B2 (en) | 2002-02-26 | 2003-02-26 | Data processing apparatus and processor unit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4641708B2 (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008071227A (en) * | 2006-09-15 | 2008-03-27 | Nec Electronics Corp | Semiconductor integrated circuit |
| WO2011118351A1 (en) * | 2010-03-25 | 2011-09-29 | Semiconductor Energy Laboratory Co., Ltd. | Semiconductor device |
| CN116257399B (en) * | 2021-12-09 | 2025-12-19 | 瑞昱半导体股份有限公司 | Chip with debugging function and chip debugging method |
-
2003
- 2003-02-26 JP JP2003048738A patent/JP4641708B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2003323315A (en) | 2003-11-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6385742B1 (en) | Microprocessor debugging mechanism employing scan interface | |
| US6055649A (en) | Processor test port with scan chains and data streaming | |
| US6065106A (en) | Resuming normal execution by restoring without refetching instructions in multi-word instruction register interrupted by debug instructions loading and processing | |
| CN103119566B (en) | Removing of data processing equipment is wrong | |
| US5970241A (en) | Maintaining synchronism between a processor pipeline and subsystem pipelines during debugging of a data processing system | |
| US6016555A (en) | Non-intrusive software breakpoints in a processor instruction execution pipeline | |
| US6081885A (en) | Method and apparatus for halting a processor and providing state visibility on a pipeline phase basis | |
| US6591378B1 (en) | Debug controller in a data processor and method therefor | |
| US7533302B2 (en) | Trace and debug method and system for a processor | |
| US5488728A (en) | Microprocessor having a run/stop pin for accessing an idle mode | |
| JP2011243110A (en) | Information processor | |
| JP2001525568A (en) | Instruction decoder | |
| JP2001222446A (en) | Debug system for real time processor | |
| US20010023479A1 (en) | Information processing unit, and exception processing method for specific application-purpose operation instruction | |
| JP2513417B2 (en) | Information processing device | |
| JP4641708B2 (en) | Data processing apparatus and processor unit | |
| JPH11203146A (en) | Microcomputer | |
| US20030163674A1 (en) | Data processing apparatus, processor unit and debugging unit | |
| Kim et al. | AE32000B: a Fully Synthesizable 32‐Bit Embedded Microprocessor Core | |
| EP0849672B1 (en) | Non-intrusive software breakpoints in a processor instructions execution pipeline | |
| JP2002535749A (en) | Processor and method for executing instructions from multiple instruction sources | |
| JP2536726B2 (en) | Microprocessor | |
| EP0854422B1 (en) | A processor test port with scan chains and data streaming | |
| JP3719241B2 (en) | Arithmetic unit | |
| JP2646957B2 (en) | Microprocessor with built-in cache and its trace system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060216 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20071004 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20071016 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20071217 |
|
| A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A711 Effective date: 20080228 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080305 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080520 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20080826 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20081027 |
|
| A911 | Transfer of reconsideration by examiner before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20081030 |
|
| A912 | Removal of reconsideration by examiner before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A912 Effective date: 20090403 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20101130 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 4641708 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131210 Year of fee payment: 3 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| 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 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| LAPS | Cancellation because of no payment of annual fees |