JP4628521B2 - Method and apparatus for handling interruptible multi-cycle instructions - Google Patents

Method and apparatus for handling interruptible multi-cycle instructions Download PDF

Info

Publication number
JP4628521B2
JP4628521B2 JP2000172537A JP2000172537A JP4628521B2 JP 4628521 B2 JP4628521 B2 JP 4628521B2 JP 2000172537 A JP2000172537 A JP 2000172537A JP 2000172537 A JP2000172537 A JP 2000172537A JP 4628521 B2 JP4628521 B2 JP 4628521B2
Authority
JP
Japan
Prior art keywords
instruction
interrupt
cycle
execution
signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2000172537A
Other languages
Japanese (ja)
Other versions
JP2001022593A (en
Inventor
ウィリアム・シー・モイヤー
ジェフリー・ダブリュー・スコット
マイケル・ディー・フィッツシモンズ
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NXP USA Inc
Original Assignee
NXP USA 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 NXP USA Inc filed Critical NXP USA Inc
Publication of JP2001022593A publication Critical patent/JP2001022593A/en
Application granted granted Critical
Publication of JP4628521B2 publication Critical patent/JP4628521B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3836Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/24Handling requests for interconnection or transfer for access to input/output bus using interrupt
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30007Arrangements for executing specific machine instructions to perform operations on data operands
    • G06F9/3001Arithmetic instructions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3005Arrangements for executing specific machine instructions to perform operations for flow control
    • G06F9/30065Loop control instructions; iterative instructions, e.g. LOOP, REPEAT
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3854Instruction completion, e.g. retiring, committing or graduating
    • G06F9/3858Result writeback, i.e. updating the architectural state or memory
    • G06F9/38585Result writeback, i.e. updating the architectural state or memory with result invalidation, e.g. nullification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3867Concurrent instruction execution, e.g. pipeline or look ahead using instruction pipelines
    • G06F9/3869Implementation aspects, e.g. pipeline latches; pipeline synchronisation and clocking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Executing Machine-Instructions (AREA)
  • Bus Control (AREA)

Description

【0001】
【産業上の利用分野】
本発明は、一般に、データ処理を実行する方法および装置に関し、さらに詳しくは、実行中に割り込みできるマルチサイクル命令を処理する方法および装置に関する。
【0002】
【従来の技術】
割り込みは、データ処理システムにおいて一般に用いられる。例えば、割り込みは、データ処理システムがリアルタイム・イベントに高速に応答できるようにするため、多くのリアルタイム制御用途において特に重要である。データ処理システムが割り込みに応答するのに要する時間は、データ処理システムの割り込みレイテンシ(interrupt latency)である。短い割り込みレイテンシ時間では、割り込みに対して高速に応答できるが、データ処理システムのスループットを低減することがある。長い割り込みレイテンシ時間は、割り込みへの応答を遅くするが、データ処理システムのスループットを向上させることがある。ほとんどのデータ処理システムでは、データ処理システムの通常動作性能を低減せずに、割り込みレイテンシ時間をできるだけ短くすることが望ましい。
【0003】
割り込みレイテンシは、プロセッサ・クロック境界(processor clock boundaries)のタイミングによって一般に影響され、ここで割り込みが一般にサンプリングされる。これらの境界は、一つの命令の完了時および次の命令の開始時に生じる。マルチサイクル命令は、データ処理システムにおけるレイテンシを増加するが、これは、命令完了が多くのサイクルを要し、そのため割り込みがサンプリングされる境界を延期するためである。このような命令の例には、乗算(multiply),除算(divide),多重メモリ・アイテムの移動(m ove multiple items)およびファジー論理命令(fuzzy logic instruction)がある。保留中の割り込み要求(pending interrupt request)に応答する前にこのような命令の実行を完了するのに要する時間は、データ処理システムの割り込みレイテンシを著しく長くすることがある。データ処理システムが割り込みに応答するのに要する最大時間、多くの場合、最長マルチサイクル命令の実行の時間、は、データ処理システムの「最大割り込みレイテンシ時間」を決定する。
【0004】
ほとんどのデータ処理システムでは、データ処理システムが割り込みに応答するのに要する時間を最小限にすることが望ましい。例えば、自動車エンジンを制御するデータ処理システムは、自動車が横滑り(skid)に入ったことをアンチロック・ブレーキング・システムが検出したときに、アンチロック・ブレーキング・システムから割り込み要求を受信する。多くのリアルタイム制御用途では、最大割り込みレイテンシ時間の低減は望ましいだけでなく、特定の用途に対してどのデータ処理システムが選ばれるのかを決定することがある。上記の例では、エンジン制御システムがアンチロック・ブレーキング・システムからの割り込みに十分高速に応答できなければ、より短い割り込みレイテンシ時間を有する別のデータ処理システムが選択・利用されることが多い。
【0005】
【発明が解決しようとする課題】
従って、データ処理システムの通常動作性能を大幅に低減せずに、最大割り込みレイテンシ時間を低減することは、データ処理システム分野において極めて望ましい。ただし、割り込みレイテンシを低減する多くの従来システムは、プロセッサ・スループットも低減する。割り込みレイテンシを低減する必要性は、データ処理システムのデータ・スループットを最大限にする必要性とバランスをとる必要がある。故に、プロセッサ・スループットを最小限に低減あるいは維持しながら、レイテンシを低減または最小限にするために命令を処理する改善された方法および装置が必要とされる。
【0006】
【実施例】
以下の説明および添付の図面において、少なくとも一つの実施例について開示する。
【0007】
以下では、本発明の少なくとも一つの実施例について詳細に説明するが、本発明自体の制限とみなすべきではない。むしろ、任意の数の変形例は、特許請求の範囲において定められる発明の範囲内であるものとする。
【0008】
本明細書における教示に基づき、マルチサイクル命令は、割り込みレイテンシの低減を促進し、かつデータ処理スループットを促進するように、この命令が実行中に割り込み可能となるように処理される。例えば、長い命令の実行は、割り込み要求を処理するために、この長い命令の実行の特定の期間中に割り込むことができる。命令実行中に割り込み期間(interrupt intervals)を利用することは、このような割り込み可能動作中にスループットを最大限につつ、割り込みレイテンシを低減および/または最小限にする。
【0009】
一実施例において、データ処理ユニットは、特定の動作について実行クロックの残りの数を計算(例えば,計数,読出しあるいはそれ以外で判定)する。残りのクロック数が所定の、あるいはプログラム可能な、ポスト閾値または期間よりも小さい場合、命令はほぼ完了であり、この特定の動作の割り込み認識は、次の命令境界まで延期される。命令は、割り込みを処理する前に完了することが許されるので、データはこの割り込みによって損失せず、また割り込みを処理した後に命令を再実行する必要はない。残りのクロック数がポスト閾値期間よりも大きい場合、命令はほとんど完了しておらず、命令の実行中に割り込みは認識される。ポスト閾値期間の前に命令は割り込み可能なので、割り込みレイテンシは、長い命令の長さではなく、ポスト閾値期間の長さに制限できる。従って、割り込みレイテンシおよびプロセッサ再実行オーバヘッドはともに、本明細書における教示に基づき最適化される。
【0010】
図1は、中央処理装置(CPU)回路12,メモリ回路14,タイマ回路16,シリアル回路18,他の回路20およびシステム集積回路22を含むデータ処理システム10を示し、これらの回路すべてはバス24によって互いに双方向結合される。図1に示すように、CPU12については、図3を参照してさらに説明する。CPU12は、一つまたはそれ以上の集積回路端子30を介してデータ処理システム10の外部に結合できる。メモリ14は、一つまたはそれ以上の集積回路端子32を介してデータ処理システム10の外部に結合できる。タイマ16は、一つまたはそれ以上の集積回路端子34を介してデータ処理システム10の外部に結合できる。シリアル回路18は、一つまたはそれ以上の集積回路端子36を介してデータ処理システム10の外部に結合できる。システム集積回路22は、バス26を介してデータ処理システム10の外部に双方向結合される。
【0011】
図2は、データ処理システム10の命令実行フロー200を示す。命令実行フロー200は、順次実効命令(sequentially executing instructions)A,B,C,Dを含む。命令A,Bは、シングル・サイクル命令である。命令Cは、2サイクルのマルチサイクル命令である。命令Dは、Nサイクルのマルチサイクル命令であり、例えば、N>2またはN>>2である。例えば、命令Dは、実行するのに38クロック以上も必要とする浮動小数点除算命令などの反復命令(iterative instruction)でもよい。他のマルチサイクル命令は、実行するのに16以上のクロックを必要とすることが多い。
【0012】
命令実行フロー200は、割り込み認識ポイント211,212,213,214,215,216,217,218を含む、各割り込み認識ポイント210を含む。割り込み認識ポイント210は、データ処理システム10が割り込みを認識・処理できる、命令A〜Dの実行における各ポイントを表す。割り込みが受信されると、データ処理システム10は、割り込みを認識・処理するために割り込み認識ポイントを待つ。割り込みが受信・認識されると、命令フロー200における命令の実行は次の割り込み認識ポイントにて停止(halt)され、割り込み処理ルーチンが選択・実行される。そして、命令の実行は、最後に完全に実行された命令の後に再開される。
【0013】
また、図2は実行期間(execution intervals)220を示す。実行期間220は、初期期間222,割り込み可能期間224およびポスト閾値期間226を含む。初期期間222は、命令Dまたは他の命令が割り込めないセットアップ期間である。命令Dは、割り込まれる前に、初期期間222を完了しなければならない。割り込み可能期間224は、命令Dが割り込み認識ポイント214,215,216,217に示されるように割り込みできる期間である。ポスト閾値期間226は、命令Dが割り込めない期間である。命令Dがポスト閾値期間226に入ると、命令Dは割り込まれる前に実行を完了しなければならない。
【0014】
従って、マルチサイクル命令Dは、データ処理システム10の割り込みレイテンシを低減するため、命令Dが実行している間、割り込み可能期間224中に割り込み可能となるが、マルチサイクル命令Dは、命令Dが完了近くであるポスト閾値期間226中には割り込み可能とならない。ポスト閾値期間226中に命令Dの割り込みを禁止することにより、データ処理システム10のスループットは、割り込みを生じさせる命令Dの終了によって過剰に影響されず、そのため多くの場合ほぼ完了したデータの損失を生じさせる。実行期間222,224,226については、図3ないし図8を参照して以下でさらに説明する。
【0015】
図3は、CPU12の一部を示す。CPU12は、整数CPU300および浮動小数点ユニット(FPU)340を含む。整数CPU300は、オプコード・バス312,オペランド・バス314,結果バス316、ステータス・バス318および制御バス320を介してFPU304に結合される。さらに、整数CPU300は、OK_TO_INTERRUPT信号322およびABORT_B信号324を介してFPU340に結合される。整数CPU300は、データ処理システム10の割り込み要求310を受信すべく結合される。
【0016】
整数CPU300は、プロセッサ・ステータス制御レジスタ(processor status and control register)304および割り込みコントローラ302を含む。プロセッサ・ステータス制御レジスタ304は、割り込みコントローラ302に割り込みイネーブル制御ビットおよび割り込みマスク制御ビットを与えるべく結合された格納位置である。割り込みイネーブル制御ビットは、割り込みがイネーブルされるかどうかを示し、割り込みマスク制御ビットは、受信した割り込みをマスクするかどうかを示す。割り込みコントローラ302は、OK_TO_INTERRUPT信号322および割り込み要求310を受信すべく結合され、かつABORT_B信号324を与えるべく結合された割り込み制御モジュールである。
【0017】
浮動小数点ユニット340は、制御ユニット342を含む。制御ユニット342は、ステート制御ユニット344を含む。ステート制御ユニット344は、ABORT_B信号324を受信すべく結合され、かつOK_TO_INTERRUPT信号322を与えるべく結合される。ステート制御ユニット344については、図4を参照して以下でさらに説明する。
【0018】
動作中、浮動小数点ユニット340は、オプコード・バス312を介して整数CPU300から命令(例えば、命令実行フロー)を受信する。受信した命令に従って、浮動小数点ユニット340は、オペランド・バス314を介して受信したオペランドに対して各演算を実行する。浮動小数点ユニット340は、結果バス316およびステータス・バス318を介して結果情報およびステータス情報をそれぞれ与える。
【0019】
浮動小数点ユニット340によって実行される命令の割り込みを制御するため、整数CPU300と浮動小数点ユニット340との間でハンドシェイク制御(handshake control)が用いられる。ハンドシェイク・プロトコルは、浮動小数点ユニット340が最適な割り込み認識ウィンドウを整数CPU300に指示することを可能にする。浮動小数点ユニット340は、浮動小数点ユニット340が整数CPU300からABORT_B信号324を受信した後の次の割り込み認識ポイントにて、命令実行フローに割り込む。浮動小数点ユニット340は、OK_TO_INTERRUPT信号322をアサート(assert)することにより、浮動小数点ユニット340がABORT_B信号324を受信する準備ができたことを整数CPU300に通知する。例えば、一実施例において、OK_TO_INTERRUPT信号322は、1サイクル命令の実行中およびマルチサイクル命令の割り込み可能期間224中に、浮動小数点ユニット340によってアサートされる。OK_TO_INTERRUPT信号322がアサートされなければ、浮動小数点ユニット340はABORT_B信号324を受信せず、命令実行フローに割り込まない。
【0020】
図4に示すように、ステート制御ユニット344は、デコード論理402,カウンタ404および制御論理406を含む。制御論理406は、比較ブロック410および閾値408を含む。デコード論理402は、オプコード・バス312を介して命令を受信すべく結合されたデコード・モジュールである。デコード論理402は、命令サイクル・カウント414をカウンタ404に与えるべく結合される。さらに、デコード論理402は、命令タイプ信号412を制御論理406に与えるべく結合される。カウンタ404は、命令サイクル・カウント414,クロック422および開始信号420を受信すべく結合されたカウント・モジュールである。カウンタ404は、例えば、反復命令のために一般に用いられる任意のカウンタでもよく、必ずしもデータ処理システム10に対する追加論理ではない。カウンタ404は、バス416を介して比較ブロック410にカウンタ値を与えるべく結合される。比較ブロック410は、バス416を介してカウンタ値信号を受信し、かつバス418を介して閾値408を受信すべく結合される。比較ブロック410は、OK_TO_INTERRUPT信号322を与えるべく結合される。
【0021】
図3および図4ならびに図5の動作525を参照して、ステート制御ユニット344は、命令オプコード・バス312を介して第1命令を受信する。この第1命令は、データ処理システム10が実行できる任意の命令でもよい。第1命令は、主プログラム(primary program)内,サーブルーチン内,割り込み処理ルーチン内または任意の他のコンピュータ・プログラム内の命令でもよい。動作525の後、動作526において、デコード論理402は第1命令をデコードし、バス414を介して命令サイクル・カウントをカウンタ404に与える。動作526の後、動作527において、制御ユニット342は第1命令の実行を開始する。動作527の後、判定515において、整数CPU300は、データ処理システム10に対して外部のデバイス(図示せず)が割り込みを要求しているかどうかを判定し、データ処理システム10に対して内部の回路(例えば、図1の16,18または20)が割り込みを要求しているかどうかを判定する。割り込みコントローラ302は、プロセッサ・ステータス制御レジスタ304から割り込みイネーブル制御ビットを受信し、割り込みがイネーブルされるかどうかを判定する。
【0022】
割り込みがイネーブルされない場合、整数CPU300は割り込み要求を受信せず、第1命令の実行は、動作528において、通常のように割り込みなしで完了する。動作528の後、動作635(図6に図示)において、命令実行は、次の命令のフェッチ,受信,デコードおよび実行に進む。
【0023】
割り込みがイネーブルされる場合、制御は判定515から判定516に遷移する。判定516において、割り込みコントローラ302は割り込み要求を調べて、割り込み要求が受信され、保留中(pending)であるかどうかを判定する。割り込み要求が整数CPU300によって受信されていない場合、第1命令の実行は、動作528,636を参照して説明したように、割り込みなしで完了する。割り込み要求を受信した場合、制御は判定516から判定517に遷移する。
【0024】
判定517において、割り込み要求が受信され、保留中である場合、割り込みコントローラ302はプロセッサ・ステータス制御レジスタ304から割り込みマスク制御ビットを受信し、受信した割り込みがマスクされるかどうかを判定する。割り込みをマスクすることは、データ処理分野において周知である。例えば、受信した割り込みが、割り込みマスク制御ビットによって決定される閾値優先度よりも低い優先レベルを有するために、割り込みがマスクされている場合、第1命令の実行は、動作528,635を参照して説明したように、割り込みなしで完了する。
【0025】
しかし、例えば、受信した割り込み要求が、割り込みマスク制御ビットによって決定される閾値優先度よりも高い優先レベルを有するために、保留中の割り込み要求がマスクされていない場合、割り込み要求は動作529において受け付けられ、整数CPU300は割り込みコントローラ302によって割り込まれる。次に、制御は動作529から判定618に遷移する。
【0026】
図6を参照して、判定618において、浮動小数点ユニット340は、第1命令が多重割り込み期間をサポートするかどうかを判定する。第1命令が多重割り込み期間をサポートしない場合、第1命令の実行は、動作630において、割り込みなしに完了する。次に、動作634において、割り込み要求は、第1命令と次の命令との間の命令境界にて処理される。最後に、動作635において、通常の命令実行は、次の命令のフェッチ,受信,デコードおよび実行に進む。判定618において第1命令が多重割り込み期間をサポートすると判定されると、浮動小数点ユニット340は、判定619において、第1命令の現在実行中のサイクルが割り込み可能期間内であるかどうかを判定する。現在実行中のサイクルが割り込み可能期間内でない場合、浮動小数点ユニット340は、判定620において、第1命令の実行が完了したかどうかを判定する。第1命令の実行が完了していない場合、制御は判定619に遷移し、次の実行クロック・サイクルが割り込み可能期間内であるかどうかを判定する。
【0027】
判定619において、第1命令の現在実行中のサイクルが割り込み可能期間内であると浮動小数点ユニット340が判断した場合、浮動小数点ユニット340はOK_TO_INTERRUPT信号322をアサートする。OK_TO_INTERRUPT信号322がアサートされることに応答して、割り込みコントローラ302(図3)はABORT_B信号324をアサートし、浮動小数点ユニット340は、動作631において、次の割り込み認識ポイント(例えば、次のクロック・サイクルの前)にて第1命令の実行を停止する。従って、割り込みが割り込み可能期間中に受信された場合、第1命令が実行を完了する間は、割り込み処理は延期されず、そのため割り込みレイテンシは低減される。
【0028】
一実施例において、第1命令の部分的結果は破棄され、データ処理システム10は、動作632において割り込みの処理の完了時に第1命令の実行を開始する前のデータ処理システム10の状態に戻される。割り込み要求は、動作633において、第1命令と次の命令との間の命令境界の前に処理される。割り込み要求の処理が完了した後、データ処理システム10は、第1命令の実行が完了していないので、動作526において第1命令を再デコードおよび再実行する。
【0029】
判定620において、第1命令の実行が完了したと浮動小数点ユニット340が判断した場合、動作634において、第1命令と次の命令との間の命令境界にて割り込み要求は処理され、動作635において、命令実行は次の命令のフェッチ,受信,デコードおよび実行に進む。
【0030】
図7を参照して、タイミング図は、データ処理システム10による一例としてのマルチサイクル命令の実行を示す。この特定の例において、マルチサイクル命令は浮動小数点除算演算である。また、この特定の例では、OK_TO_INTERRUPT信号322は、高状態(high state)のときアクティブであり、INSTRUCTION_START_B信号420,INTERRUPT_REQUEST_B信号310,浮動小数点ユニットFPU_IDLE_B信号718およびABORT_B信号324は、低状態(low state)のときアクティブである。
【0031】
時間710において、浮動小数点除算命令の実行が開始される。浮動小数点ユニット340は、バス312を介して浮動小数点除算命令オペレーション・コード(オプコード)を受信し、またバス314を介して有効オペランド(valid operands)を受信する。INSTRUCTION_START_B信号420(図4参照)は、ステート制御ユニット344内で低にアサートされ、FPU_IDLE_B信号718(これはステータス信号318に含まれる)は、浮動小数点ユニット340が第1命令の実行を開始したことを通知するために、高にニゲート(negate)される。この例では、命令セットアップ時間中に第1命令の実行の割り込みを禁止するために、時間710,720における初期期間222中には、OK_TO_INTERRUPT信号322はアサートされない(すなわち、高ではない)。初期期間222の必要性は、もしあれば、実施例に特有のものである。
【0032】
時間720において、割り込みが保留中であることを示すために、INTERRUPT_REQUEST_B信号310は低にアサートされる。時間730において、初期期間220の終了および割り込み可能期間224の開始を示すために、OK_TO_INTERRUPT信号322は高にアサートされる。OK_TO_INTERRUPT信号322がアサートされることに応答し、かつINTERRUPT_REQUEST_B信号B310がすでにアサートされていることに応答して、割り込みコントローラ302は、時間740においてABORT_B信号324をアサートする。ABORT_B信号324が低にアサートされることに応答して、浮動小数点ユニット340は、次の割り込み認識ポイント(例えば、割り込み可能期間中の次のサイクル)にて浮動小数点除算演算に割り込み、また時間740後に低にアサートされるFPU_IDLE_B信号718に示されるように、アイドル状態に戻る。さらに、OK_TO_INTERRUPT信号322は低にニゲートされる。第1命令の割り込みの結果として、結果は結果バス316を介して報告されない。
【0033】
図8を参照して、タイミング図は、データ処理システム10による一例としてのマルチサイクル命令の実行を示す。この特定の例では、マルチサイクル命令は浮動小数点除算演算である。また、この特定の例では、OK_TO_INTERRUPT信号322は高状態のときアクティブであり、FPU_IDEL_B信号718,INTERRUPT_REQUEST_B信号310およびABORT_B信号324は低状態のときアクティブである。
【0034】
時間810において、浮動小数点除算演算が実行されるとき、FPU_IDLE_B信号718は高であり、浮動小数点ユニット340がアイドルでないことを示し、INTERRUPT_REQUEST_B信号310は高であり、保留中の割り込みがないことを示し、OK_TO_INTERRUPT信号322は高であり、除算命令は、除算演算が割り込み可能である割り込み可能期間中であることを示し、ABORT_B信号324は高であり、アクティブでないことを示す。時間820において、割り込みが保留中になると、INTERRUPT_REQUEST_B信号310はアサートされるが、OK_TO_INTERRUPT信号322は低状態に遷移し、命令は完了する前に割り込めないことを示す。従って、ABORT_B信号324はアサートされず、除算演算は時間840にて完了する。結果は、時間840にて除算命令の完了時に、結果バス316を介して生成される。
【0035】
図示の例では、除算演算は極めて完了に近く、その完了の前に除算演算に割り込むことを許さないことにより、浮動小数点ユニット340によって利用される処理時間は無駄にならず、そのため処理スループットは向上する。この特定の例では、除算演算が完了の3クロック・サイクル以内になると、OK_TO_INTERRUPT信号322は低状態に変化する。OK_TO_INTERRUPT信号322のアサートを決定する閾値は、3クロック・サイクルの値を有する。従って、完了する3クロック・サイクル以内である除算命令は、完了前に割り込めないが、完了前に4クロック以上残っている除算命令は割り込むことができる。このように、プロセッサの最大レイテンシは小さな値、例えば、3クロック・サイクル、を有し、これはリアルタイム応答にとって有利であり、プロセッサは改善された処理帯域幅を有する。
【0036】
一実施例において、データ処理システム10は、割り込み可能な命令および割り込み不可能な命令を含む。すなわち、データ処理システム10は、処理環境および/または実行される命令について適切であれば、割り込み認識を命令の途中で生じさせるオプションを許可する。命令が実行途中で割り込まれると、命令の部分的な結果は破棄され、保留中の割り込みが処理される。実質的に完了した命令からのデータの損失を防ぐために、閾値が用いられる。一実施例において、この閾値は、最長の割り込み不可能な命令である、システムの最大レイテンシとなるように選択される。例えば、最長の割り込み不可能な命令が4クロック・サイクルの場合、データ処理システム10の最大レイテンシを増加しないように、閾値4を選ぶことができる。閾値を利用することは、データ処理システム10の最大割り込みレイテンシ時間を増加せずに、実質的に完了した命令からのデータの損失を防ぐ。
【0037】
一実施例において、処理装置によって命令を処理する方法が提供される。この処理装置は、マルチサイクル命令の実行を開始する。マルチサイクル命令の実行中に、閾値は、マルチサイクル命令の完了前に残っているサイクル数を示すカウント値と比較される。
【0038】
一実施例において、装置は処理ユニットを含む。処理ユニットは、割り込み制御モジュールを含む。割り込み制御モジュールは、割り込み要求信号入力と、マルチサイクル命令が、マルチサイクル命令の割り込みがマルチサイクル命令の完了前に許可されるところの割り込み可能期間内であるかどうか示すマルチサイクル命令割り込み信号を受信する第2入力とを有する。
【0039】
一実施例において、データ処理ユニットは実行ユニットを含む。実行ユニットは、マルチサイクル命令を処理すべく構成される。実行ユニットは、デコード論理,カウンタ,閾値および比較ユニットを含む。デコード論理は、命令オペレーション・コードを受信すべく結合される。カウンタは、デコード論理に応答して、命令サイクル・カウントを受信する。比較ユニットは、カウンタと、閾値とに応答する。比較ユニットは、マルチサイクル命令の割り込みが許可されるときに割り込み可能期間を示すマルチサイクル命令割り込み信号を生成する出力を有する。
【0040】
一実施例において、データを処理するためのマルチサイクル命令は、第1および第2実行期間を含む。第1実行期間は、マルチサイクル命令の実行を完了する前に割り込みを許す。第2実行期間は、割り込み前にマルチサイクル命令の完了を示す。
【0041】
一実施例において、装置は信号を含む。この信号は、第1信号値および第2信号値を含む。マルチサイクル命令の実行中に、第1信号値は、完了前にマルチサイクル命令が割り込み可能であるところの第1実行ポイントに、マルチサイクル命令があることを示す。また、マルチサイクル命令の実行中に、第2信号値は、割り込み前にマルチサイクル命令が完了するところの第2実行ポイントに、マルチサイクル命令があることを示す。
【0042】
一実施例において、コンピュータ・プログラム製品は、コンピュータ読出し可能な媒体において符号化される。コンピュータ・プログラム製品は、第1命令を含む。この第1命令は、コンピュータ・システム上で実行可能である。第1命令は、マルチサイクル・オペレーションを実行するためのものである。第1命令は、第1および第2実行期間を含む。第1実行期間は、マルチサイクル命令の実行を完了する前に割り込みを許し、第2実行期間は、割り込み前にマルチサイクル命令の完了を示す。
【0043】
一実施例において、データを処理する装置は、コンピュータ読出し可能な媒体およびマルチサイクル命令を含む。マルチサイクル命令は、コンピュータ読出し可能な媒体上に格納される。マルチサイクル命令は、第1および第2実行期間を含む。第1実行期間は、マルチサイクル命令の実行を完了する前に割り込みを許し、第2実行期間は、割り込み前にマルチサイクル命令の完了を示す。
【0044】
一つまたはそれ以上の実施例について説明してきたが、かかる実施例は本発明を例示するものであり、発明の範囲はそれらに制限されないことが理解される。むしろ、発明の範囲は、特許請求の範囲において定められる。従って、発明の他の実施例は、本明細書で説明した実施例に対するさまざまな修正,追加および/または改善を含む。
【0045】
上記の構成要素,デバイス,動作などは、本明細書において概念的な明瞭さのために例として用いられている。例えば、データ処理ユニット10および/またはCPU12は、単一の集積回路上に形成されたデータ・プロセッサ,シングル・チップ・マイクロコントローラまたはマイクロプロセッサ・ユニットを含むがそれらに制限されない任意の処理ユニットの例として用いられる。データ処理システム10およびその構成要素は、任意の種類の電気回路またはその機能および/または構造を実行および/またはシミュレーションするための任意の種類のユニットまたはモジュール(ソフトウェア,ハードウェア,ファームウェアなど)を利用して実装できる。そのため、本明細書で用いられるように、これらの特定の例は、より一般的なクラスを表すものとする。さらに、一般に、詳細な説明における特定の例の使用は、そのクラスを表すものとし、上記のリストにこのような特定のデバイスを含まないことは、制限が望ましいことを示すものとはみなすべきではない。
【0046】
集積回路端子30,32,34,36,38は、データ処理システム10と電気信号のやり取りを可能にする任意の種類の装置でもよい。例えば、集積回路端子30,32,34,36,38は、集積回路ピン,半田バンプ,ワイヤ導体などでもよい。さらに、バス26は、集積回路端子を介してデータ処理システム10に対して電気信号を導通してもよい。
【0047】
一実施例において、上記の閾値は、特定の値に固定、あるいはハードワイヤ(hard-wired)してもよい。別の実施例では、閾値はユーザ・プログラミング可能あるいはシステム・プログラミング可能でもよく、例えば、システム環境変化またはユーザ条件に基づいて変化できる。一実施例において、閾値は、例えば、イネーブル・フラグを立てることより、任意にイネーブルまたはディセーブルされる。
【0048】
一実施例において、割り込みレイテンシおよびプロセッサ実行オーバヘッドを最適化するためのハンドシェイク・プロトコルは、整数CPU300と浮動小数点ユニット340との間で実装される。別の実施例では、ハンドシェイク・プロトコルは、最適な割り込みウィンドウを示すめ、さまざまな機能ユニットの間で実装される。
【0049】
当業者であれば、論理ブロックの境界は例示的なものに過ぎず、別の実施例ではこれらのブロックを融合したり、あるいはブロックの機能を分解することもできる。例えば、閾値408は浮動小数点ユニット340においてハードワイヤあるいは格納でき、もしくは閾値408は、例えば、CPU300のプロセッサ・ステータス制御レジスタ304内に格納して、浮動小数点ユニット340に送信してもよい。さらに、ステート制御論理は、浮動小数点ユニット340内に配置しても、あるいは、例えば、CPU300および浮動小数点ユニット340が同一マイクロプロセッサ内に集積される場合には、CPU300内に配置してもよい。
【0050】
また、データ処理システム10の別の実施例は、より多くの、より少ない、あるいは異なる回路ブロックを含んでもよい。例えば、データ処理システム10の別の実施例は、メモリ14,タイマ16,シリアル18,または他の回路20を含まなくてもよい。本発明のある実施例では、システム集積回路22を含んでも、含まなくてもよい。ある実施例では、特定の構成要素の複数のインスタンスを合成してもよい。
【0051】
本明細書で説明した機能は、任意の種類のデータ処理システム10によって、あるいはその内部で実行できる。例えば、データ処理システム10は、マイクロプロセッサ(例えば、単一集積回路チップ上で作製された処理ユニット),マイクロコントローラ(例えば、集積されたメモリおよび/またはI/Oデバイスを内蔵するマイクロプロセッサ),コンピュータ・システム基板,組み込み型(embedded)コンピュータ・システムおよび/または汎用コンピュータ・システムを含むが、それらに限定されない任意の処理ユニットでもよく、あるいは任意の処理ユニットを内蔵してもよい。また、回路ブロックは、ソフトウェアのモジュール、またはソフトウェアのモジュールを実行するための汎用回路、もしくはこのような回路ブロックをシミュレーションするためのソフトウェアを含んでも、あるいはそれらに置き換えてもよい。
【0052】
さらに、当業者であれば、例示的な実施例で説明した上記の動作および判定(例えば、図5および図6)の機能間の境界は、一例に過ぎないことが理解されよう。動作は合成してもよく、あるいは本発明に従って、動作の機能を追加動作において分散してもよい。さらに、別の実施例では、特定の動作の複数のインスタンス、または異なる動作の順番を含んでもよい。
【0053】
図5および図6の動作の一部または全ては、命令によって、あるいはモジュール(例えば、ソフトウェア・モジュール)またはモジュールの一部および/またはコンピュータ・システム・ユーザによって実行できる。従って、上記の方法,その動作およびその任意のモジュールは、この方法の動作を実行すべく構成されたコンピュータ・システム上で実行でき、および/またはマシン読出し可能なおよび/またはコンピュータ読出し可能な媒体から実行できる。本方法は、本方法を実行するべくコンピュータ・システムを構築するためのコンピュータ読出し可能な媒体において具現できる。従って、ソフトウェア・モジュールは、モジュールの機能を実行すべくコンピュータ・システムを構築するために、コンピュータ・システム・メモリ内に格納でき、および/またはコンピュータ・システム・メモリに送信できる。
【0054】
本明細書で説明したソフトウェア・モジュール,動作および/または命令は、例えば、メモリ14などのコンピュータ読出し可能な媒体から、データ処理システム10によって受信される。コンピュータ読み出し可能な媒体は、データ処理システム10に永久に、着脱可能に、あるいは遠隔的に結合できる。コンピュータ読出し可能な媒体は、例えば、ディスクおよびテープ保存媒体を含む磁気保存媒体;コンパクト・ディスク媒体(例えば、CD−ROM,CD−Rなど)およびデジタル・ビデオ・ディスク保存媒体などの光保存媒体;フラッシュ・メモリ,EEPROM,EPROM,ROMまたはASIC(特定用途向け集積回路)など、半導体ベースのメモリ・ユニットを含む不揮発性メモリ/保存装置;レジスタ,バッファまたはキャッシュ,メイン・メモリ,RAMなどを含む、揮発性保存媒体;およびコンピュータ・ネットワーク,ポイント・ツー・ポイント通信,搬送波伝送媒体を含む、データ伝送媒体;のうち、任意の数のものを非排他的に含んでもよい。上記の一例としてのコンピュータ読出し可能な媒体は、メモリ14,集積回路端子30,32,34,36,38および/またはバス24,26の形式をとってもよく、あるいはこれらによってアクセス可能であってもよい。UNIX(登録商標)に基づいた実施例では、ソフトウェア・モジュールはファイル内で具現され、これはデバイス,端末,ローカルまたはリモート・ファイル,ソケット,ネットワーク接続,信号または他の通信もしくは状態変化の手段(expedient of communication or state change)でもよい。他の新たなあるいはさまざまな種類のコンピュータ読出し可能な媒体は、本明細書で説明した動作および判定を含むソフトウェア・モジュールを格納および/または送信するために利用できる。
【0055】
一実施例において、データ処理システム10は、パーソナル・コンピュータ・システムなどのコンピュータ・システムである。他の実施例では、異なる種類のコンピュータを含んでもよい。コンピュータ・システムとは、一人のユーザあるいは複数のユーザに独立したコンピューティング能力を与えるべく設計できる情報処理システムのことである。コンピュータ・システムには多くの形式があり、メインフレーム,ミニコンピュータ,ワークステーション,サーバ,パーソナル・コンピュータ,ノートパッド,組み込みシステム(embedded systems)を含むが、それらに限定されない。典型的なコンピュータ・システムは、少なくとも一つの処理ユニットと、関連するメモリと、多数の入出力(I/O)デバイスとを含む。一例としてのI/Oデバイスには、ディスプレイ・モニタ,キーボード,ディスケット・ドライブ,固定ディスク保存装置,プリンタ,モデム,サウンドおよびビデオ・デバイスまたは特殊な通信デバイス,フロッピ・ディスクまたはハード・ディスクおよびCD−ROMドライブなどのコンピュータ読出し可能な媒体が含まれる。このような多くのコンピュータ・システムは、これらの構成要素を互いに接続するためにシステム基板を利用する。コンピュータ・システムは、プログラムに従って情報を処理し、I/Oデバイスを介してその出力を生成する。プログラムとは、特定のアプリケーション・プログラムおよび/またはオペレーティング・システムなど、内部格納された命令のリストである。ソフトウェア・モジュールは、プログラムを含んでもよい。コンピュータ・システムの動作を制御するプログラムは、一般にソフトウェア・アプリケーション、または単純にソフトウェアという。
【0056】
信号は、電圧信号,電流信号,ステータス・ビット、または信号の情報を伝達するための同様な装置または回路効果であっても、あるいはこれらを含んでもよい。本明細書で説明した信号の多くは、1ビットの信号である。他の実施例の対応する信号は、例えば、マルチビット信号のアサートを示す第1ビットまたは信号と、マルチビット信号のニゲートを示す第2ビットまたは信号とを含む、マルチビット信号でもよい。
【0057】
多くの場合、必ずしもそうではないが、本明細書で説明した量(quantities)または動作は、格納,転送,合成,比較またはその他処理可能な電気信号または磁気信号の処理を必要とし、もしくはこれらの形式をとる。主に慣用上および一般的な利用上の理由により、これらの信号をビット,値,要素,シンボル,文字,用語,数字などとして表すことは、時として便利であることがわかっている。ただし、これらおよび同様な用語の全ては、特定の実施例の適切な物理的特徴に関連することを理解されたい。
【0058】
当業者であれば、信号は第1論理ブロックから第2論理ブロックに直接伝送でき、あるいは信号は論理ブロック間で修正(例えば、増幅,減衰,遅延,ラッチ,バッファ,反転,濾波,その他変換など)できることが理解されよう。上記の実施例の信号はあるブロックから次のブロックに伝送されるものとして特徴づけられるが、他の実施例では、信号の情報および/または機能的態様がブロック間で伝送される限り、このように直接伝送される信号の代わりに、修正された信号を含んでもよい。ある程度、第2論理ブロックにて入力される信号は、関連する回路の物理的な制限により(例えば、必然的にある程度の減衰および遅延が存在する)、第1論理ブロックから出力された第1信号から導出された第2信号として概念化できる。従って、本明細書で用いられるように、論理ブロック間で伝送される信号は、結果として第2信号を生じる修正を含むものとし、このような修正は、回路の制限に起因しても、あるいは他の回路要素を通過することに起因するものであり、第1信号の情報および/または最終的な機能的態様を変えるものではない。
【0059】
「アサート(assert)」および「ニゲート(negate)」という用語は、それぞれ信号を論理的に真(true)の状態または論理的に偽(false)の状態にすることを表すときに用いられる。論理的に真の状態が論理レベル1である場合、論理的に偽の状態は論理レベル0であり、またその逆である。本明細書におけるある信号は低(low)にアサートされ(例えば、アクティブ・ロー)、ある信号は高にアサートされる(例えば、アクティブ・ハイ)。他の実施例では、本明細書で開示した極性を逆にしてもよい。
【0060】
「バス(bus)」という用語は、データ,アドレス,制御またはステータスなど、一つまたはそれ以上の種類の情報を転送するために利用できる複数の信号または導体(conductors)を表すために用いられる。他の実施例では、例えば、上記のバスの代わりに、シリアル信号またはシングル・ライン接続を利用してもよい。上記の説明は、本発明の実施例の包括的なリストを提示することを意図するものではない。一例としての実施例およびその変形例を概説することを試みてきたが、他の実施例および/または変形例は、特許請求の範囲に定められる発明の範囲内である。
【図面の簡単な説明】
【図1】データ処理システムを示すブロック図である。
【図2】命令実行タイミング図である。
【図3】図1のデータ処理システムの中央処理装置(CPU)の一部を示すブロック図である。
【図4】図1のデータ処理システムの浮動小数点ユニット(FPU)の一部を示すブロック図である。
【図5】データ処理システムにおいて割り込みレイテンシを制御する方法を示すフロー図である。
【図6】データ処理システムにおいて割り込みレイテンシを制御する方法を示すフロー図である。
【図7】図1のデータ処理システムの動作を示すタイミング図である。
【図8】図1のデータ処理システムの動作を示すタイミング図である。
【符号の説明】
10 データ処理システム
12 中央処理装置(CPU)回路
14 メモリ回路
16 タイマ回路
18 シリアル回路
20 他の回路
22 システム集積回路
24,26 バス
30,32,34,36,38 集積回路端子
200 命令実行フロー
210,211,212,213,214,215,216,217,218 割り込み認識ポイント
220 実行期間
222 初期期間
224 割り込み可能期間
226 ポスト閾値期間
300 整数CPU
302 割り込みコントローラ
304 プロセッサ・ステータス制御レジスタ
310 割り込み要求(INTERRUPT_REQUEST_B信号)
312 オプコード・バス
314 オペランド・バス
316 結果バス
318 ステータス・バス
320 制御バス
322 OK_TO_INTERRUPT信号
324 ABORT_B信号
340 浮動小数点ユニット(FPU)
342 制御ユニット
344 ステート制御ユニット
402 デコード論理
404 カウンタ
406 制御論理
408 閾値
410 比較ブロック
412 命令タイプ信号
414 命令サイクル・カウント
416,418 バス
420 開始信号(INSTRUCTION_START_B信号)
422 クロック
718 FPU_IDLE_B信号
[0001]
[Industrial application fields]
The present invention relates generally to a method and apparatus for performing data processing, and more particularly to a method and apparatus for processing multi-cycle instructions that can be interrupted during execution.
[0002]
[Prior art]
Interrupts are commonly used in data processing systems. For example, interrupts are particularly important in many real-time control applications because they allow the data processing system to respond quickly to real-time events. The time required for the data processing system to respond to an interrupt is the data processing system's interrupt latency. A short interrupt latency time can respond quickly to interrupts, but may reduce the throughput of the data processing system. Long interrupt latency times slow response to interrupts, but may improve the throughput of the data processing system. In most data processing systems, it is desirable to make the interrupt latency time as short as possible without reducing the normal operating performance of the data processing system.
[0003]
Interrupt latency is typically affected by the timing of processor clock boundaries, where interrupts are typically sampled. These boundaries occur at the completion of one instruction and at the beginning of the next instruction. Multi-cycle instructions increase latency in a data processing system because instruction completion takes many cycles and thus defers the boundary at which interrupts are sampled. Examples of such instructions include multiply, divide, move multiple items, and fuzzy logic instructions. The time required to complete execution of such an instruction before responding to a pending interrupt request can significantly increase the interrupt latency of the data processing system. The maximum time required for the data processing system to respond to an interrupt, often the time of execution of the longest multi-cycle instruction, determines the “maximum interrupt latency time” of the data processing system.
[0004]
In most data processing systems, it is desirable to minimize the time it takes for the data processing system to respond to an interrupt. For example, a data processing system that controls an automobile engine receives an interrupt request from the antilock braking system when the antilock braking system detects that the automobile has entered a skid. In many real-time control applications, reducing the maximum interrupt latency time is not only desirable, but may determine which data processing system is chosen for a particular application. In the above example, if the engine control system cannot respond quickly enough to an interrupt from the antilock braking system, another data processing system with a shorter interrupt latency time is often selected and utilized.
[0005]
[Problems to be solved by the invention]
Accordingly, it is highly desirable in the field of data processing systems to reduce the maximum interrupt latency time without significantly reducing the normal operating performance of the data processing system. However, many conventional systems that reduce interrupt latency also reduce processor throughput. The need to reduce interrupt latency must be balanced with the need to maximize data throughput of the data processing system. Therefore, there is a need for an improved method and apparatus for processing instructions to reduce or minimize latency while minimizing or maintaining processor throughput.
[0006]
【Example】
In the following description and in the accompanying drawings, at least one embodiment is disclosed.
[0007]
In the following, at least one embodiment of the invention will be described in detail, but should not be regarded as a limitation of the invention itself. Rather, any number of variations are intended to be within the scope of the invention as defined in the claims.
[0008]
Based on the teachings herein, a multi-cycle instruction is processed so that it can be interrupted during execution to facilitate reducing interrupt latency and to increase data processing throughput. For example, execution of a long instruction can be interrupted during a specific period of execution of this long instruction in order to process an interrupt request. Utilizing interrupt intervals during instruction execution maximizes throughput during such interruptible operations. Shi While reducing and / or minimizing interrupt latency.
[0009]
In one embodiment, the data processing unit calculates (eg, counts, reads or otherwise determines) the remaining number of execution clocks for a particular operation. If the remaining number of clocks is less than a predetermined or programmable post threshold or period, the instruction is nearly complete and this particular behavior is Made Interrupt recognition is postponed until the next instruction boundary. Since the instruction is allowed to complete before servicing the interrupt, no data is lost by this interrupt, and there is no need to re-execute the instruction after servicing the interrupt. If the remaining number of clocks is greater than the post-threshold period, the instruction is almost complete and an interrupt is recognized during execution of the instruction. Since instructions can be interrupted before the post-threshold period, the interrupt latency can be limited to the length of the post-threshold period rather than the length of the long instruction. Thus, both interrupt latency and processor re-execution overhead are optimized based on the teachings herein.
[0010]
FIG. 1 shows a data processing system 10 that includes a central processing unit (CPU) circuit 12, a memory circuit 14, a timer circuit 16, a serial circuit 18, other circuits 20, and a system integrated circuit 22, all of which are bus 24. Are bi-directionally coupled to each other. As shown in FIG. 1, the CPU 12 will be further described with reference to FIG. The CPU 12 can be coupled to the outside of the data processing system 10 via one or more integrated circuit terminals 30. The memory 14 can be coupled external to the data processing system 10 via one or more integrated circuit terminals 32. The timer 16 can be coupled to the outside of the data processing system 10 via one or more integrated circuit terminals 34. The serial circuit 18 can be coupled to the outside of the data processing system 10 via one or more integrated circuit terminals 36. System integrated circuit 22 is bi-directionally coupled to the outside of data processing system 10 via bus 26.
[0011]
FIG. 2 shows an instruction execution flow 200 of the data processing system 10. The instruction execution flow 200 includes sequentially executing instructions A, B, C, and D. Instructions A and B are single cycle instructions. The instruction C is a 2-cycle multicycle instruction. The instruction D is an N-cycle multi-cycle instruction, for example, N> 2 or N >> 2. For example, instruction D may be an iterative instruction such as a floating point divide instruction that requires more than 38 clocks to execute. Other multi-cycle instructions often require 16 or more clocks to execute.
[0012]
The instruction execution flow 200 includes each interrupt recognition point 210 including interrupt recognition points 211, 212, 213, 214, 215, 216, 217, and 218. The interrupt recognition point 210 represents each point in the execution of the instructions A to D at which the data processing system 10 can recognize and process an interrupt. When an interrupt is received, the data processing system 10 waits for an interrupt recognition point to recognize and process the interrupt. When an interrupt is received and recognized, the execution of the instruction in the instruction flow 200 is halted at the next interrupt recognition point, and an interrupt processing routine is selected and executed. Instruction execution is then resumed after the last fully executed instruction.
[0013]
FIG. 2 also shows execution intervals 220. The execution period 220 includes an initial period 222, an interruptible period 224, and a post threshold period 226. The initial period 222 is a setup period during which the instruction D or another instruction cannot be interrupted. Instruction D must complete the initial period 222 before being interrupted. The interruptable period 224 is a period during which the instruction D can be interrupted as indicated by the interrupt recognition points 214, 215, 216, and 217. The post threshold period 226 is a period during which the instruction D cannot be interrupted. When instruction D enters the post-threshold period 226, instruction D must complete execution before being interrupted.
[0014]
Therefore, the multi-cycle instruction D can be interrupted during the interrupt enable period 224 while the instruction D is being executed in order to reduce the interrupt latency of the data processing system 10. Interruption is not enabled during the post-threshold period 226 that is near completion. By disabling instruction D interrupts during the post-threshold period 226, the throughput of the data processing system 10 is not overly affected by the end of the instruction D causing the interrupt, and in many cases results in nearly complete data loss. Cause it to occur. The execution periods 222, 224, and 226 are further described below with reference to FIGS.
[0015]
FIG. 3 shows a part of the CPU 12. The CPU 12 includes an integer CPU 300 and a floating point unit (FPU) 340. Integer CPU 300 is coupled to FPU 304 via opcode bus 312, operand bus 314, result bus 316, status bus 318 and control bus 320. In addition, integer CPU 300 is coupled to FPU 340 via OK_TO_INTERRUPT signal 322 and ABORT_B signal 324. The integer CPU 300 is coupled to receive the interrupt request 310 of the data processing system 10.
[0016]
The integer CPU 300 includes a processor status and control register 304 and an interrupt controller 302. The processor status control register 304 is a storage location coupled to provide the interrupt controller 302 with interrupt enable control bits and interrupt mask control bits. The interrupt enable control bit indicates whether the interrupt is enabled, and the interrupt mask control bit indicates whether the received interrupt is masked. Interrupt controller 302 is an interrupt control module coupled to receive OK_TO_INTERRUPT signal 322 and interrupt request 310 and coupled to provide ABORT_B signal 324.
[0017]
The floating point unit 340 includes a control unit 342. The control unit 342 includes a state control unit 344. State control unit 344 is coupled to receive ABORT_B signal 324 and is coupled to provide OK_TO_INTERRUPT signal 322. The state control unit 344 is further described below with reference to FIG.
[0018]
In operation, floating point unit 340 receives instructions (eg, instruction execution flow) from integer CPU 300 via opcode bus 312. In accordance with the received instructions, floating point unit 340 performs each operation on the operands received via operand bus 314. Floating point unit 340 provides result information and status information via result bus 316 and status bus 318, respectively.
[0019]
Handshake control is used between the integer CPU 300 and the floating point unit 340 to control interrupts of instructions executed by the floating point unit 340. The handshake protocol allows the floating point unit 340 to direct the integer CPU 300 to the optimal interrupt recognition window. The floating point unit 340 interrupts the instruction execution flow at the next interrupt recognition point after the floating point unit 340 receives the ABORT_B signal 324 from the integer CPU 300. Floating point unit 340 notifies integer CPU 300 that floating point unit 340 is ready to receive ABORT_B signal 324 by asserting OK_TO_INTERRUPT signal 322. For example, in one embodiment, the OK_TO_INTERRUPT signal 322 is asserted by the floating point unit 340 during execution of a one cycle instruction and during the interruptible period 224 of a multicycle instruction. If the OK_TO_INTERRUPT signal 322 is not asserted, the floating point unit 340 will not receive the ABORT_B signal 324 and will not interrupt the instruction execution flow.
[0020]
As shown in FIG. 4, state control unit 344 includes decode logic 402, counter 404 and control logic 406. Control logic 406 includes a comparison block 410 and a threshold 408. Decode logic 402 is a decode module coupled to receive instructions via opcode bus 312. Decode logic 402 is coupled to provide instruction cycle count 414 to counter 404. Further, decode logic 402 is coupled to provide instruction type signal 412 to control logic 406. Counter 404 is a count module coupled to receive instruction cycle count 414, clock 422 and start signal 420. Counter 404 may be, for example, any counter commonly used for repetitive instructions and is not necessarily additional logic to data processing system 10. Counter 404 is coupled to provide a counter value to comparison block 410 via bus 416. Compare block 410 is coupled to receive a counter value signal via bus 416 and to receive threshold value 408 via bus 418. Compare block 410 is coupled to provide an OK_TO_INTERRUPT signal 322.
[0021]
With reference to operation 525 of FIGS. 3, 4, and 5, state control unit 344 receives the first instruction via instruction opcode bus 312. This first instruction may be any instruction that can be executed by the data processing system 10. The first instruction may be an instruction in a primary program, in a serve routine, in an interrupt handling routine, or in any other computer program. After operation 525, in operation 526, decode logic 402 decodes the first instruction and provides an instruction cycle count to counter 404 via bus 414. After operation 526, in operation 527, control unit 342 begins executing the first instruction. After operation 527, in decision 515, the integer CPU 300 determines whether an external device (not shown) is requesting an interrupt to the data processing system 10 and internal circuitry for the data processing system 10. It is determined whether (for example, 16, 18 or 20 in FIG. 1) requests an interrupt. The interrupt controller 302 receives the interrupt enable control bit from the processor status control register 304 and determines whether the interrupt is enabled.
[0022]
If the interrupt is not enabled, integer CPU 300 does not receive an interrupt request and execution of the first instruction is completed in operation 528 without interruption as usual. After operation 528, in operation 635 (shown in FIG. 6), instruction execution proceeds to fetch, receive, decode and execute the next instruction.
[0023]
If the interrupt is enabled, control transitions from decision 515 to decision 516. At decision 516, the interrupt controller 302 examines the interrupt request to determine if the interrupt request has been received and is pending. If an interrupt request has not been received by integer CPU 300, execution of the first instruction is completed without interrupt, as described with reference to operations 528 and 636. If an interrupt request is received, control transitions from decision 516 to decision 517.
[0024]
In decision 517, if an interrupt request is received and pending, the interrupt controller 302 receives an interrupt mask control bit from the processor status control register 304 and determines whether the received interrupt is masked. Masking interrupts is well known in the data processing field. For example, if the interrupt is masked because the received interrupt has a priority level lower than the threshold priority determined by the interrupt mask control bit, execution of the first instruction refers to operations 528 and 635. As explained above, it completes without interruption.
[0025]
However, for example, if the pending interrupt request is not masked because the received interrupt request has a priority level higher than the threshold priority determined by the interrupt mask control bit, the interrupt request is accepted in operation 529. The integer CPU 300 is interrupted by the interrupt controller 302. Control then transitions from operation 529 to decision 618.
[0026]
Referring to FIG. 6, at decision 618, the floating point unit 340 determines whether the first instruction supports multiple interrupt periods. If the first instruction does not support multiple interrupt periods, execution of the first instruction is completed without interruption at operation 630. Next, in operation 634, the interrupt request is processed at the instruction boundary between the first instruction and the next instruction. Finally, in operation 635, normal instruction execution proceeds to fetch, receive, decode and execute the next instruction. If it is determined at decision 618 that the first instruction supports multiple interrupt periods, the floating point unit 340 determines at decision 619 whether the currently executing cycle of the first instruction is within an interruptible period. If the currently executing cycle is not within the interruptable period, the floating point unit 340 determines in decision 620 whether execution of the first instruction is complete. If execution of the first instruction is not complete, control transitions to decision 619 to determine whether the next execution clock cycle is within an interruptible period.
[0027]
If the floating point unit 340 determines in decision 619 that the currently executing cycle of the first instruction is within the interruptible period, the floating point unit 340 asserts an OK_TO_INTERRUPT signal 322. In response to the OK_TO_INTERRUPT signal 322 being asserted, the interrupt controller 302 (FIG. 3) asserts the ABORT_B signal 324 and the floating point unit 340 in operation 631 determines the next interrupt recognition point (eg, the next clock Before the cycle), the execution of the first instruction is stopped. Thus, if an interrupt is received during an interrupt enabled period, interrupt processing is not postponed while the first instruction completes execution, thus reducing interrupt latency.
[0028]
In one embodiment, the partial result of the first instruction is discarded and the data processing system 10 is returned to the state of the data processing system 10 prior to starting execution of the first instruction upon completion of processing of the interrupt at operation 632. . The interrupt request is processed in operation 633 before the instruction boundary between the first instruction and the next instruction. After processing of the interrupt request is completed, the data processing system 10 re-decodes and re-executes the first instruction in operation 526 because execution of the first instruction is not completed.
[0029]
If the floating point unit 340 determines that the execution of the first instruction is complete at decision 620, the interrupt request is processed at an instruction boundary between the first instruction and the next instruction at operation 634, and at operation 635. Instruction execution proceeds to fetch, receive, decode and execute the next instruction.
[0030]
With reference to FIG. 7, a timing diagram illustrates the execution of an exemplary multi-cycle instruction by the data processing system 10. In this particular example, the multicycle instruction is a floating point division operation. Also, in this particular example, the OK_TO_INTERRUPT signal 322 is active when in the high state, the INSTRUTION_START_B signal 420, the INTERRUPT_REQUEST_B signal 310, the floating point unit FPU_IDLE_B signal 718 and the ABORT_B signal 324 are in the low state (low state). ) Is active.
[0031]
At time 710, execution of the floating point divide instruction begins. Floating point unit 340 receives floating point divide instruction operation codes (opcodes) via bus 312 and receives valid operands via bus 314. The INSTRUTION_START_B signal 420 (see FIG. 4) is asserted low in the state control unit 344, and the FPU_IDLE_B signal 718 (which is included in the status signal 318) indicates that the floating point unit 340 has started executing the first instruction. To be negated high. In this example, the OK_TO_INTERRUPT signal 322 is not asserted (i.e., not high) during the initial period 222 at times 710 and 720 to inhibit interrupting execution of the first instruction during instruction setup time. The need for the initial period 222, if any, is specific to the embodiment.
[0032]
At time 720, the INTERRUPT_REQUEST_B signal 310 is asserted low to indicate that an interrupt is pending. At time 730, the OK_TO_INTERRUPT signal 322 is asserted high to indicate the end of the initial period 220 and the start of the interruptible period 224. In response to the OK_TO_INTERRUPT signal 322 being asserted and in response to the INTERRUPT_REQUEST_B signal B310 being already asserted, the interrupt controller 302 asserts the ABORT_B signal 324 at time 740. In response to the ABORT_B signal 324 being asserted low, the floating point unit 340 interrupts the floating point divide operation at the next interrupt recognition point (eg, the next cycle during the interrupt enabled period) and also at time 740. The idle state is returned, as indicated by the FPU_IDLE_B signal 718 which is later asserted low. In addition, the OK_TO_INTERRUPT signal 322 is negated low. As a result of the interrupt of the first instruction, the result is not reported via the result bus 316.
[0033]
Referring to FIG. 8, a timing diagram illustrates the execution of an exemplary multi-cycle instruction by data processing system 10. In this particular example, the multicycle instruction is a floating point division operation. Also in this particular example, the OK_TO_INTERRUPT signal 322 is active when high, and the FPU_IDEL_B signal 718, the INTERRUPT_REQUEST_B signal 310, and the ABORT_B signal 324 are active when low.
[0034]
At time 810, when a floating point divide operation is performed, FPU_IDLE_B signal 718 is high, indicating that floating point unit 340 is not idle, and INTERRUPT_REQUEST_B signal 310 is high, indicating that there are no pending interrupts. , OK_TO_INTERRUPT signal 322 is high, indicating that the divide instruction is in an interruptible period during which a divide operation can be interrupted, and that ABORT_B signal 324 is high and not active. At time 820, if an interrupt is pending, the INTERRUPT_REQUEST_B signal 310 is asserted, but the OK_TO_INTERRUPT signal 322 transitions to a low state, indicating that the instruction cannot be interrupted before it completes. Accordingly, the ABORT_B signal 324 is not asserted and the division operation is completed at time 840. The result is generated via the result bus 316 upon completion of the divide instruction at time 840.
[0035]
In the illustrated example, the division operation is very close to completion, and by not allowing the division operation to interrupt prior to completion, the processing time used by the floating point unit 340 is not wasted, thus improving processing throughput. To do. In this particular example, the OK_TO_INTERRUPT signal 322 changes to a low state within 3 clock cycles of completion of the division operation. The threshold that determines the assertion of the OK_TO_INTERRUPT signal 322 has a value of 3 clock cycles. Thus, a divide instruction that is within 3 clock cycles to complete cannot be interrupted before completion, but a divide instruction that remains 4 clocks or more before completion can be interrupted. Thus, the maximum latency of the processor has a small value, eg, 3 clock cycles, which is advantageous for real-time response, and the processor has improved processing bandwidth.
[0036]
In one embodiment, data processing system 10 includes interruptible and non-interruptable instructions. That is, the data processing system 10 allows an option to cause interrupt recognition in the middle of an instruction if appropriate for the processing environment and / or the instruction to be executed. If the instruction is interrupted during execution, the partial result of the instruction is discarded and the pending interrupt is processed. A threshold is used to prevent data loss from substantially completed instructions. In one embodiment, this threshold is chosen to be the maximum latency of the system, which is the longest non-interruptable instruction. For example, if the longest non-interruptable instruction is 4 clock cycles, the threshold 4 can be chosen so as not to increase the maximum latency of the data processing system 10. Utilizing a threshold prevents data loss from instructions that are substantially completed without increasing the maximum interrupt latency time of the data processing system 10.
[0037]
In one embodiment, a method for processing instructions by a processing device is provided. The processing device starts executing a multi-cycle instruction. During execution of a multi-cycle instruction, the threshold is compared with a count value indicating the number of cycles remaining before the completion of the multi-cycle instruction.
[0038]
In one embodiment, the apparatus includes a processing unit. The processing unit includes an interrupt control module. The interrupt control module receives an interrupt request signal input and a multi-cycle instruction interrupt signal indicating whether the multi-cycle instruction is within an interruptible period where multi-cycle instruction interrupts are allowed before completion of the multi-cycle instruction. And a second input.
[0039]
In one embodiment, the data processing unit includes an execution unit. The execution unit is configured to process multi-cycle instructions. The execution unit includes decode logic, a counter, a threshold, and a comparison unit. The decode logic is coupled to receive the instruction operation code. The counter receives the instruction cycle count in response to the decode logic. The comparison unit is responsive to the counter and the threshold value. The comparison unit has an output that generates a multi-cycle instruction interrupt signal indicating an interruptible period when multi-cycle instruction interrupts are permitted.
[0040]
In one embodiment, a multi-cycle instruction for processing data includes first and second execution periods. In the first execution period, an interrupt is allowed before the execution of the multi-cycle instruction is completed. The second execution period indicates completion of the multi-cycle instruction before interruption.
[0041]
In one embodiment, the device includes a signal. This signal includes a first signal value and a second signal value. During execution of a multi-cycle instruction, the first signal value indicates that there is a multi-cycle instruction at the first execution point where the multi-cycle instruction can be interrupted before completion. Also, during execution of a multi-cycle instruction, the second signal value indicates that there is a multi-cycle instruction at the second execution point where the multi-cycle instruction is completed before an interrupt.
[0042]
In one embodiment, the computer program product is encoded on a computer readable medium. The computer program product includes a first instruction. The first instruction can be executed on the computer system. The first instruction is for performing a multi-cycle operation. The first instruction includes first and second execution periods. The first execution period allows an interrupt before completing the execution of the multicycle instruction, and the second execution period indicates the completion of the multicycle instruction before the interrupt.
[0043]
In one embodiment, an apparatus for processing data includes a computer readable medium and multi-cycle instructions. Multi-cycle instructions are stored on a computer readable medium. The multi-cycle instruction includes first and second execution periods. The first execution period allows an interrupt before completing the execution of the multicycle instruction, and the second execution period indicates the completion of the multicycle instruction before the interrupt.
[0044]
While one or more embodiments have been described, it is understood that such embodiments are illustrative of the invention and that the scope of the invention is not limited thereto. Rather, the scope of the invention is defined in the claims. Accordingly, other embodiments of the invention include various modifications, additions and / or improvements to the embodiments described herein.
[0045]
The above components, devices, operations, etc. are used herein as examples for conceptual clarity. For example, data processing unit 10 and / or CPU 12 may be any processing unit example including, but not limited to, a data processor, single chip microcontroller or microprocessor unit formed on a single integrated circuit. Used as The data processing system 10 and its components utilize any type of unit or module (software, hardware, firmware, etc.) for performing and / or simulating any type of electrical circuit or its function and / or structure. Can be implemented. As such, as used herein, these specific examples shall represent more general classes. Furthermore, in general, the use of a specific example in the detailed description shall represent that class, and the absence of such specific devices in the above list should not be considered as an indication that a restriction is desirable. Absent.
[0046]
The integrated circuit terminals 30, 32, 34, 36, 38 may be any type of device that allows the data processing system 10 to exchange electrical signals. For example, the integrated circuit terminals 30, 32, 34, 36, and 38 may be integrated circuit pins, solder bumps, wire conductors, and the like. Further, the bus 26 may conduct electrical signals to the data processing system 10 via integrated circuit terminals.
[0047]
In one embodiment, the above threshold may be fixed at a specific value or hard-wired. In another embodiment, the threshold may be user programmable or system programmable, and may change based on, for example, system environment changes or user conditions. In one embodiment, the threshold is optionally enabled or disabled, for example, by setting an enable flag.
[0048]
In one embodiment, a handshake protocol for optimizing interrupt latency and processor execution overhead is implemented between integer CPU 300 and floating point unit 340. In another embodiment, a handshake protocol is implemented between the various functional units to show the optimal interrupt window.
[0049]
Those skilled in the art will appreciate that the boundaries of the logical blocks are exemplary only, and that in other embodiments, these blocks may be merged or the functions of the blocks may be decomposed. For example, the threshold value 408 can be hardwired or stored in the floating point unit 340, or the threshold value 408 may be stored, for example, in the processor status control register 304 of the CPU 300 and transmitted to the floating point unit 340. Further, the state control logic may be located in the floating point unit 340 or, for example, if the CPU 300 and the floating point unit 340 are integrated in the same microprocessor, in the CPU 300.
[0050]
Also, other embodiments of the data processing system 10 may include more, fewer, or different circuit blocks. For example, another embodiment of the data processing system 10 may not include the memory 14, the timer 16, the serial 18, or other circuitry 20. Some embodiments of the present invention may or may not include the system integrated circuit 22. In some embodiments, multiple instances of a particular component may be combined.
[0051]
The functions described herein may be performed by or within any type of data processing system 10. For example, the data processing system 10 may include a microprocessor (eg, a processing unit fabricated on a single integrated circuit chip), a microcontroller (eg, a microprocessor containing integrated memory and / or I / O devices), It may be any processing unit including, but not limited to, a computer system board, an embedded computer system and / or a general purpose computer system, or may contain any processing unit. The circuit block may include or be replaced by a software module, a general-purpose circuit for executing the software module, or software for simulating such a circuit block.
[0052]
Further, those skilled in the art will appreciate that the boundaries between the functions of the above operations and decisions described in the exemplary embodiments (eg, FIGS. 5 and 6) are only examples. The actions may be synthesized or the functions of the actions may be distributed in additional actions according to the present invention. Furthermore, other embodiments may include multiple instances of a particular operation or a different sequence of operations.
[0053]
Some or all of the operations of FIGS. 5 and 6 can be performed by instructions or by a module (eg, a software module) or part of a module and / or a computer system user. Thus, the above method, its operations and any modules thereof can be executed on a computer system configured to perform the operations of this method and / or from a machine readable and / or computer readable medium. Can be executed. The method can be embodied on a computer readable medium for constructing a computer system to perform the method. Thus, a software module can be stored in and / or transmitted to a computer system memory to build a computer system to perform the functions of the module.
[0054]
The software modules, operations, and / or instructions described herein are received by data processing system 10 from a computer readable medium, such as memory 14, for example. The computer readable medium can be permanently, removably or remotely coupled to the data processing system 10. Computer readable media include, for example, magnetic storage media including disk and tape storage media; optical storage media such as compact disk media (eg, CD-ROM, CD-R, etc.) and digital video disk storage media; Non-volatile memory / storage devices including semiconductor-based memory units such as flash memory, EEPROM, EPROM, ROM or ASIC (application specific integrated circuit); including registers, buffers or caches, main memory, RAM, etc. Any number of volatile storage media; and data transmission media, including computer networks, point-to-point communications, carrier transmission media; may be included non-exclusively. The exemplary computer readable medium may take the form of or be accessible by the memory 14, integrated circuit terminals 30, 32, 34, 36, 38 and / or buses 24, 26. . UNIX (Registered trademark) In an embodiment based on the above, the software module is embodied in a file, which is a device, terminal, local or remote file, socket, network connection, signal or other means of communication or state change. change). Other new or various types of computer readable media may be utilized to store and / or transmit software modules that include the operations and decisions described herein.
[0055]
In one embodiment, data processing system 10 is a computer system such as a personal computer system. In other embodiments, different types of computers may be included. A computer system is an information processing system that can be designed to provide independent computing capabilities to a single user or multiple users. There are many forms of computer systems, including but not limited to mainframes, minicomputers, workstations, servers, personal computers, notepads, and embedded systems. A typical computer system includes at least one processing unit, associated memory, and a number of input / output (I / O) devices. Exemplary I / O devices include display monitors, keyboards, diskette drives, fixed disk storage devices, printers, modems, sound and video devices or special communication devices, floppy disks or hard disks and CD- Computer readable media such as ROM drives are included. Many such computer systems utilize a system board to connect these components together. The computer system processes the information according to the program and generates its output via the I / O device. A program is a list of instructions stored internally, such as a particular application program and / or operating system. The software module may include a program. Programs that control the operation of a computer system are generally referred to as software applications, or simply software.
[0056]
The signal may be or include a voltage signal, current signal, status bit, or similar device or circuit effect for communicating signal information. Many of the signals described herein are 1-bit signals. Corresponding signals in other embodiments may be multi-bit signals including, for example, a first bit or signal indicating assertion of the multi-bit signal and a second bit or signal indicating negation of the multi-bit signal.
[0057]
In many cases, though not necessarily, the quantities or operations described herein require processing of electrical or magnetic signals that can be stored, transferred, combined, compared, or otherwise processed, or these Take the form. It has proven convenient at times, principally for reasons of common usage and general usage, to represent these signals as bits, values, elements, symbols, characters, terms, numbers, or the like. It should be understood, however, that all of these and similar terms relate to the appropriate physical characteristics of a particular embodiment.
[0058]
A person skilled in the art can directly transmit a signal from the first logic block to the second logic block, or modify the signal between logic blocks (eg, amplification, attenuation, delay, latch, buffer, inversion, filtering, other conversions, etc. It will be understood that it is possible. The signals of the above embodiments are characterized as being transmitted from one block to the next, but in other embodiments this is the case as long as the signal information and / or functional aspects are transmitted between the blocks. A modified signal may be included instead of the signal transmitted directly to the. To some extent, the signal input in the second logic block is the first signal output from the first logic block due to physical limitations of the associated circuit (for example, there is necessarily some attenuation and delay). Can be conceptualized as a second signal derived from. Thus, as used herein, signals transmitted between logic blocks shall include modifications that result in a second signal, such modifications may be due to circuit limitations or otherwise. And does not change the information and / or final functional aspects of the first signal.
[0059]
The terms “assert” and “negate” are used to describe putting a signal into a logical true state or a logical false state, respectively. If the logically true state is logical level 1, the logically false state is logical level 0 and vice versa. Certain signals herein are asserted low (eg, active low) and certain signals are asserted high (eg, active high). In other embodiments, the polarity disclosed herein may be reversed.
[0060]
The term “bus” is used to represent a plurality of signals or conductors that can be used to transfer one or more types of information, such as data, address, control, or status. In other embodiments, for example, a serial signal or a single line connection may be used instead of the bus described above. The above description is not intended to present a comprehensive list of embodiments of the present invention. While attempts have been made to outline exemplary embodiments and variations thereof, other embodiments and / or variations are within the scope of the invention as defined in the claims.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a data processing system.
FIG. 2 is a timing diagram of instruction execution.
3 is a block diagram showing a part of a central processing unit (CPU) of the data processing system of FIG. 1. FIG.
4 is a block diagram illustrating a portion of a floating point unit (FPU) of the data processing system of FIG. 1. FIG.
FIG. 5 is a flow diagram illustrating a method for controlling interrupt latency in a data processing system.
FIG. 6 is a flow diagram illustrating a method for controlling interrupt latency in a data processing system.
FIG. 7 is a timing diagram showing the operation of the data processing system of FIG. 1;
FIG. 8 is a timing diagram showing the operation of the data processing system of FIG. 1;
[Explanation of symbols]
10 Data processing system
12 Central processing unit (CPU) circuit
14 Memory circuit
16 Timer circuit
18 Serial circuit
20 Other circuits
22 System integrated circuit
24, 26 bus
30, 32, 34, 36, 38 Integrated circuit terminals
200 Instruction execution flow
210, 211, 212, 213, 214, 215, 216, 217, 218 Interrupt recognition point
220 execution period
222 Initial period
224 Interruptable period
226 Post threshold period
300 integer CPU
302 Interrupt controller
304 processor status control register
310 Interrupt request (INTERRUPT_REQUEST_B signal)
312 Opcode Bus
314 Operand bus
316 result bus
318 Status bus
320 Control bus
322 OK_TO_INTERRUPT signal
324 ABORT_B signal
340 Floating point unit (FPU)
342 Control unit
344 State control unit
402 decode logic
404 counter
406 Control logic
408 threshold
410 Compare block
412 Instruction type signal
414 Instruction cycle count
416, 418 bus
420 Start signal (INSTRUTION_START_B signal)
422 clock
718 FPU_IDLE_B signal

Claims (3)

処理装置によって命令を処理する方法であって:
前記処理装置によって、マルチサイクル命令の実行を開始する段階;
前記処理装置と接続されたステート制御ユニットによって、前記マルチサイクル命令の開始から、前記マルチサイクル命令のセットアップ時間が完了するまでの初期期間(222)の間、前記マルチサイクル命令の割り込みを許可しない段階;
前記ステート制御ユニットによって、前記マルチサイクル命令の実行中、前記初期期間(222)後に、閾値(408)を、前記マルチサイクル命令の完了前に残っているカウント数を示すカウント値(404)と比較する段階;および
前記処理装置によって、前記比較した結果に基づいて前記マルチサイクル命令の割り込みを許可する段階;
によって構成されることを特徴とする方法。
A method for processing an instruction by a processing unit comprising:
Starting execution of a multi-cycle instruction by the processing unit;
The state control unit connected to the processing device does not permit the interruption of the multicycle instruction during the initial period (222) from the start of the multicycle instruction to the completion of the setup time of the multicycle instruction. ;
During execution of the multi-cycle instruction by the state control unit, after the initial period (222), the threshold value (408) is compared with a count value (404) indicating the number of counts remaining before completion of the multi-cycle instruction. And permitting an interrupt of the multi-cycle instruction based on the comparison result by the processing device;
A method characterized by comprising.
装置であって:
割り込み制御モジュール(302)を含む処理ユニット(12)であって、前記割り込み制御モジュールは、割り込み要求信号(310)を受信する第1入力を有し、かつマルチサイクル命令が、前記マルチサイクル命令の完了前に前記マルチサイクル命令の割り込みが許可されるかどうかを示すマルチサイクル命令割り込み信号(322)を受信する第2入力を有する、処理ユニット(12)を備え、
前記処理ユニットは、
前記マルチサイクル命令の開始から前記マルチサイクル命令の割り込みが許可されることを示す前記マルチサイクル命令割り込み信号(322)を受信するまでの前記マルチサイクル命令のセットアップ時間に対応する初期期間(222)の間、前記第2入力で受信された、前記マルチサイクル命令の割り込みが許可されないことを示す前記マルチサイクル命令割り込み信号(322)に応答して、前記マルチサイクル命令の割り込みを実行しないことを特徴とする装置。
The device:
A processing unit (12) comprising an interrupt control module (302), the interrupt control module having a first input for receiving an interrupt request signal (310), and a multi-cycle instruction being a multi-cycle instruction A processing unit (12) having a second input for receiving a multi-cycle instruction interrupt signal (322) indicating whether interruption of the multi-cycle instruction is permitted before completion;
The processing unit is
An initial period (222) corresponding to a setup time of the multi-cycle instruction from the start of the multi-cycle instruction to reception of the multi-cycle instruction interrupt signal (322) indicating that the interrupt of the multi-cycle instruction is permitted During the period, the multi-cycle instruction interrupt is not executed in response to the multi-cycle instruction interrupt signal (322) received at the second input and indicating that the multi-cycle instruction interrupt is not permitted. Device to do.
コンピュータがデータを処理するためのマルチサイクル命令を含むプログラムを記憶したコンピュータ読み取り可能な記録媒体であって:
前記マルチサイクル命令は、
第1実行期間(222)の命令:
第2実行期間(224)の命令;および
第3実行期間の命令;
によって構成され、
前記第1実行期間の命令は、前記マルチサイクル命令の開始から前記マルチサイクル命令のセットアップ時間が完了するまでの初期期間(222)の間、割り込みを許可せず;
前記第2実行期間の命令は、前記マルチサイクル命令のセットアップ時間が完了してから、前記マルチサイクル命令の実行を完了する前に、割り込みを許可し;および
前記第3実行期間の命令は、割り込み前に前記マルチサイクル命令の実行を完了することを特徴とする、コンピュータ読み取り可能な記録媒体
A computer-readable recording medium storing a program including multi-cycle instructions for a computer to process data, comprising:
The multi-cycle instruction is
Instruction for first execution period (222):
An instruction in the second execution period (224); and an instruction in the third execution period;
Composed by
The instruction in the first execution period does not allow an interrupt during an initial period (222) from the start of the multicycle instruction to the completion of the setup time of the multicycle instruction;
The instruction in the second execution period permits an interrupt after the setup time of the multi-cycle instruction is completed and before the execution of the multi-cycle instruction is completed; and the instruction in the third execution period is an interrupt A computer-readable recording medium , wherein execution of the multi-cycle instruction is completed before.
JP2000172537A 1999-06-17 2000-06-08 Method and apparatus for handling interruptible multi-cycle instructions Expired - Fee Related JP4628521B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US335105 1999-06-17
US09/335,105 US6378022B1 (en) 1999-06-17 1999-06-17 Method and apparatus for processing interruptible, multi-cycle instructions

Publications (2)

Publication Number Publication Date
JP2001022593A JP2001022593A (en) 2001-01-26
JP4628521B2 true JP4628521B2 (en) 2011-02-09

Family

ID=23310278

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000172537A Expired - Fee Related JP4628521B2 (en) 1999-06-17 2000-06-08 Method and apparatus for handling interruptible multi-cycle instructions

Country Status (2)

Country Link
US (1) US6378022B1 (en)
JP (1) JP4628521B2 (en)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040100982A1 (en) * 1999-09-30 2004-05-27 Sivaram Balasubramanian Distributed real-time operating system
US6604188B1 (en) * 1999-10-20 2003-08-05 Transmeta Corporation Pipeline replay support for multi-cycle operations wherein all VLIW instructions are flushed upon detection of a multi-cycle atom operation in a VLIW instruction
US6842811B2 (en) * 2000-02-24 2005-01-11 Pts Corporation Methods and apparatus for scalable array processor interrupt detection and response
US7404681B1 (en) * 2000-05-31 2008-07-29 Fsi International, Inc. Coating methods and apparatus for coating
EP1313014B1 (en) * 2001-11-15 2010-03-03 Texas Instruments France Interruptible and re-entrant instruction for cleaning a region of a cache memory
JP3886870B2 (en) 2002-09-06 2007-02-28 株式会社ルネサステクノロジ Data processing device
US20040072450A1 (en) * 2002-10-15 2004-04-15 Collins Jimmy D. Spin-coating methods and apparatuses for spin-coating, including pressure sensor
KR100528476B1 (en) * 2003-07-22 2005-11-15 삼성전자주식회사 Interupt processing circuit of computer system
KR100681199B1 (en) * 2006-01-11 2007-02-09 삼성전자주식회사 Method and apparatus for interrupt handling in coarse grained array
US7925815B1 (en) * 2006-06-29 2011-04-12 David Dunn Modifications to increase computer system security
US8191085B2 (en) 2006-08-29 2012-05-29 Freescale Semiconductor, Inc. Method and apparatus for loading or storing multiple registers in a data processing system
US8006114B2 (en) * 2007-03-09 2011-08-23 Analog Devices, Inc. Software programmable timing architecture
WO2008138053A1 (en) * 2007-05-15 2008-11-20 Fiberbyte Pty Ltd Usb based synchronization and timing system
KR101646768B1 (en) * 2009-02-27 2016-08-09 삼성전자주식회사 Interrupt handling apparatus and method for an equal-model processor and processor including the interrupt handling apparatus
JP5580404B2 (en) * 2010-03-29 2014-08-27 株式会社東芝 Semiconductor device
US10942748B2 (en) * 2015-07-16 2021-03-09 Nxp B.V. Method and system for processing interrupts with shadow units in a microcontroller
US9772963B2 (en) * 2015-07-26 2017-09-26 Nxp Usa, Inc. Interrupt management system for deferring low priority interrupts in real-time system
US10963259B2 (en) * 2019-06-06 2021-03-30 International Business Machines Corporation Accounting for multiple pipeline depths in processor instrumentation

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06131198A (en) * 1992-10-20 1994-05-13 Toshiba Corp Data processor
JPH08278896A (en) * 1995-04-06 1996-10-22 Matsushita Electric Ind Co Ltd Interruption processor

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4504903A (en) * 1979-07-19 1985-03-12 Digital Equipment Corporation Central processor with means for suspending instruction operations
US4312066A (en) * 1979-12-28 1982-01-19 International Business Machines Corporation Diagnostic/debug machine architecture
US5535380A (en) * 1994-12-16 1996-07-09 International Business Machines Corporation System to reduce latency for real time interrupts
US5889973A (en) 1995-03-31 1999-03-30 Motorola, Inc. Method and apparatus for selectively controlling interrupt latency in a data processing system
US5794062A (en) * 1995-04-17 1998-08-11 Ricoh Company Ltd. System and method for dynamically reconfigurable computing using a processing unit having changeable internal hardware organization
EP0927931B1 (en) * 1997-12-31 2007-02-21 Texas Instruments Inc. Interruptable multiple execution unit processing during operations utilizing multiple assignment of registers
US6286346B1 (en) * 1998-04-30 2001-09-11 Medtronic, Inc. Interruptable multiply and/or divide operations for use with an interrupt in a medical device processor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06131198A (en) * 1992-10-20 1994-05-13 Toshiba Corp Data processor
JPH08278896A (en) * 1995-04-06 1996-10-22 Matsushita Electric Ind Co Ltd Interruption processor

Also Published As

Publication number Publication date
JP2001022593A (en) 2001-01-26
US6378022B1 (en) 2002-04-23

Similar Documents

Publication Publication Date Title
JP4628521B2 (en) Method and apparatus for handling interruptible multi-cycle instructions
KR100588790B1 (en) Method and apparatus for acting on subsequent command processing in data processor
JP3787385B2 (en) Method and apparatus for selectively controlling interrupt latency in a data processing system
JP3709040B2 (en) Asynchronous data processor
TW200825705A (en) Method and system for power-state transition controllers
US7028197B2 (en) System and method for electrical power management in a data processing system using registers to reflect current operating conditions
JP2000029737A (en) Processor having real-time outer instruction insertion for debugging functions
EP2783266A1 (en) Microprocessor, and method of managing reset events therefor
US20090113178A1 (en) Microprocessor based on event-processing instruction set and event-processing method using the same
JP2002073527A (en) Dma controller
US6772266B2 (en) Detecting transfer of universal serial bus (USB) host controller information from operating system drivers to basic input output system (BIOS)
JP2004511042A (en) Programmable processor reset
US5813041A (en) Method for accessing memory by activating a programmable chip select signal
US20060161763A1 (en) Microcomputer and encoding system for instruction code and CPU
US6721878B1 (en) Low-latency interrupt handling during memory access delay periods in microprocessors
JP2754825B2 (en) Microprocessor
US5392441A (en) Pump bus to avoid indeterminacy in reading variable bit field
JP2000163310A (en) Microprocessor
US7434223B2 (en) System and method for allowing a current context to change an event sensitivity of a future context
EP0811921A2 (en) Method for accessing memory
JP4451010B2 (en) Programmable controller
US5842041A (en) Computer system employing a control signal indicative of whether address is within address space of devices on processor local bus
US5931930A (en) Processor that indicates system bus ownership in an upgradable multiprocessor computer system
US20090265515A1 (en) Information Processing Apparatus, Information Processing Method, and Computer Program
CN115826731B (en) Sleep control method and device, storage medium and computing equipment

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20041217

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070521

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20070521

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20081120

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100406

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100706

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100727

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100929

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20101019

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: 20101110

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

Free format text: PAYMENT UNTIL: 20131119

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4628521

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

LAPS Cancellation because of no payment of annual fees