JP3767529B2 - Microprocessor - Google Patents

Microprocessor Download PDF

Info

Publication number
JP3767529B2
JP3767529B2 JP2002220714A JP2002220714A JP3767529B2 JP 3767529 B2 JP3767529 B2 JP 3767529B2 JP 2002220714 A JP2002220714 A JP 2002220714A JP 2002220714 A JP2002220714 A JP 2002220714A JP 3767529 B2 JP3767529 B2 JP 3767529B2
Authority
JP
Japan
Prior art keywords
task
data
stage
microprocessor
memory
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
JP2002220714A
Other languages
Japanese (ja)
Other versions
JP2003150390A (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.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2002220714A priority Critical patent/JP3767529B2/en
Publication of JP2003150390A publication Critical patent/JP2003150390A/en
Application granted granted Critical
Publication of JP3767529B2 publication Critical patent/JP3767529B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、マイクロプロセッサに関し、特に、例えば、時間的オーバヘッドの少ないタスクスイッチングを可能にしたマイクロプロセッサに関する。特に、ソフトウェア無線技術(software radio)のように、復調処理、誤り訂正処理、プロトコル処理のように種々の異なる処理を要求されるプロセッサに好適なマイクロプロセッサに関する。
【0002】
【従来の技術】
近年、電子機器の高度化が進み、電子機器内部に組み込まれるマイクロプロセッサにおいても、さらなる高度化、かつ、効率的な処理が要求されている。すなわち、大量のプログラムを実行する高速なマイクロプロセッサが必要とされている。
【0003】
一般に、組み込みマイクロプロセッサは、リアルタイム処理を要求されることが多く、複雑なプログラムの中でタイミングに制約のある部分を、確実に、かつ、決められた時間内に実行すること、並びに、プログラムを変更した際に処理時間が間に合うか否かを見通し良く予測することが強く望まれる。
【0004】
その一方で、近年の半導体技術の進歩により、以前に較べ、より多くの回路をマイクロプロセッサに使用することが可能となり、高度化、かつ、効率的な処理の要求が満たされるのであれば、多少の回路量の増大は許容される場合が多くなってきた。
【0005】
また、半導体技術の進歩により、回路の集積密度が向上しているため、マイクロプロセッサとは別のチップとされていたメモリなどを同一チップに集積することができ、パッケージのピン数などの制約を受けることにより制限されてきたマイクロプロセッサとメモリ間のバス幅を大幅に広げることが可能となる。従って、バス幅の増大およびバスの複数化に関して、制約が大幅に緩和されている。
【0006】
ところで、マイクロプロセッサにおいてリアルタイム処理を実行する場合、外部周辺回路から、不定期もしくは周期的な割り込み制御信号の入力を受け付け、各種割り込みに応じたプログラム(いわゆる割り込みサービス)を実行することができる。
【0007】
この際、実行していたプログラムと割り込みサービスの間には連続性がないため、マイクロプロセッサの内部状態(例えば、演算回路に使用しているパイプラインフリップフロップなど)を退避させるか、もしくは、実行をストールするかによって、それまで実行していたプログラムの演算結果を割り込みサービスが変更しないようになされている。
【0008】
ここで、従来のマイクロプロセッサの内部の構成について、図1を参照して説明する。
【0009】
プログラムカウンタ1は、次に実行すべき命令(タスク)のアドレスを記憶しておくためのレジスタであり、記憶されている、次に実行すべき命令のアドレスを命令メモリ2に供給する。命令メモリ2は、プログラムカウンタ1から供給されるアドレスに基づいて読み出された命令を演算回路3に供給する。命令キャッシュ7は、命令メモリ2のデータの出し入れの速度が、演算回路3と比較して遅い場合に、アクセス局所性(Access Locality)を利用して擬似的に高速なデータアクセスをなすための緩衝用のメモリである。
【0010】
このマイクロプロセッサは、ステージ11乃至15の5段のパイプラインのRISC(Reduced Instruction Set Computer)プロセッサで構成されているものとする。
【0011】
ステージ11は、命令メモリ2に記憶されている命令(タスク)を読み出し(IF:Instruction Fetch)、記憶素子20に記憶させる。ステージ12は、記憶素子20に記憶されている命令およびレジスタファイル4に格納されているデータを読み出してデコード(ID:Instruction Decode)し、記憶素子21に記憶させる。
【0012】
ステージ13は、記憶素子21に記憶されている命令を読み出して実行し(EX:Execution)、その命令によって演算されたデータを記憶素子22に記憶させる。
【0013】
ステージ14は、記憶素子22に記憶されているデータを読み出し、記憶素子23に記憶させる。ステージ14はまた、演算回路3内の内部状態に関するデータおよびレジスタファイル4の内容をデータメモリ5に書き込ませる(MEM:Memory access)とともに、データメモリ5に書き込まれているデータを読み出し、演算回路3およびレジスタファイル4に復元させる。ステージ15は、記憶素子23に記憶されているデータを読み出し、レジスタファイル4へライトバック(WB:Write Back)する。データメモリ5とステージ14の間には、擬似的に高速なデータアクセスをなすためのデータキャッシュ6が一般的には存在する。
【0014】
図2は、図1に示したマイクロプロセッサにおける、割り込みサービスによるタスク切り替えのタイミング動作を説明する図である。
【0015】
同図に示されるように、時刻T1において、ステージ11は、命令メモリ2に記憶されているタスク1を読み出し、記憶素子20に記憶させる。時刻T2において、ステージ12は、記憶素子20に記憶されているタスク1を読み出し、それをデコードし、記憶素子21に記憶させる。時刻T3において、ステージ13は、記憶素子21に記憶されているタスク1を読み出し、それを実行し、演算結果を記憶素子22に記憶させる。時刻T4において、ステージ14は、記憶素子22に記憶されているデータを読み出し、記憶素子23に記憶させる。時刻T5において、ステージ15は、記憶素子23に記憶されているデータを読み出し、レジスタファイル4へライトバックする。
【0016】
このように、ステージ(例えば、ステージ11)に入力された信号は、クロック時間Tを経過した後、次のステージ(いまの場合、ステージ12)に供給される。その後、このステージ(ステージ11)に次の入力があっても、この信号は、クロック時間Tを経過した後、次のステージ(ステージ12)に供給される。従って、次のステージ(ステージ12)は、前のステージ(ステージ11)の入力の影響を受ける前に、現在の信号を、さらに次のステージ(いまの場合、ステージ13)に供給することができる。
【0017】
時刻T7において、タスク切り替え制御信号(割り込みサービス)が発生されると、マイクロプロセッサは、時刻T8において、次に実行すべき命令(タスク2)のアドレスを命令メモリ2に供給させるようにプログラムカウンタ1のアドレス切り替えを制御する。その後、演算回路3には、パイプラインストールが発生されるため、レジスタ退避命令が発生されるまで待機する。
【0018】
時刻T12において、ステージ15によってデータがレジスタファイル4へライトバックされると(全てのタスク1が吐き出されると)同時に、レジスタ退避命令が発生され、ステージ14からデータメモリ5に、演算回路3内の内部状態に関するデータおよびレジスタファイル4の内容が退避される。
【0019】
ステージ11のデータ退避が終了する時刻T15において、命令メモリ2に記憶されているタスク2が読み出され、タスク2の実行が開始される。それ以降、上述したタスク1と同様の動作が繰り返し実行される。
【0020】
そして、ステージ11のタスク2の実行が終了する時刻T52において、レジスタ復帰命令が発生され、データメモリ5から、タスク1の実行における演算回路3の内部状態およびレジスタファイル4の内容が復元される。ステージ11のデータ復元が終了する時刻T55において、マイクロプロセッサは、次に実行すべき命令(タスク1)のアドレスを命令メモリ2に供給させるようにプログラムカウンタ1のアドレス復帰を制御する。その後、演算回路3には、パイプラインストールが発生され、ステージ15のデータ復元が終了されるまで待機する。時刻T59において、ステージ15のデータ復元が終了されると、タスク1の実行が再開され、上述した動作が繰り返される。
【0021】
このように、割り込みサービスプログラムの実行によりレジスタファイル4の内容が破壊されないように、割り込みサービスを受け付ける前に、実行中の演算回路3の内部状態およびレジスタファイル4の内容が退避される。そして、割り込みサービスから復帰する場合には、退避させていた演算回路3の内部状態およびレジスタファイル4の内容を復元することにより、割り込みサービスによって、それ以前に実行されていたプログラムの演算結果が変更されることを防止している。
【0022】
また、図3に示されるように、2系統のレジスタファイル4−1および4−2を設け、割り込みサービスを実行する際にレジスタファイルを切り替えることによって瞬時にタスクを切り替えることができるようにしたマイクロプロセッサも存在する。なお、図1と対応する部分には同一の符号を付してあり、その説明は適宜省略する。
【0023】
図3の構成においては、一方のレジスタファイル4−1に記憶されているタスクが実行されている状態で割り込みサービスを受け付けたとき、他方のレジスタファイル4−2に記憶されているタスクを瞬時に実行することができるようにスイッチ31および32がレジスタファイル4−1からレジスタファイル4−2を選択するように切り替えられるため、データ退避のためのオーバヘッドが発生しない。
【0024】
図4は、図3に示したマイクロプロセッサにおける、割り込みサービスによるタスク切り替えのタイミング動作を説明する図である。
【0025】
同図に示されるように、時刻T7において、タスク切り替え制御信号(割り込みサービス)が発生されると、マイクロプロセッサは、時刻T8において、次に実行すべき命令(タスク2)のアドレスを命令メモリ2に供給するようにプログラムカウンタ1のアドレス切り替えを制御する。その後、演算回路3には、パイプラインストールが発生され、時刻T12において、ステージ15によってデータがレジスタファイル4−1へライトバックされると(全てのタスクが吐き出されると)同時に、スイッチ31および32がレジスタファイル4−1からレジスタファイル4−2を選択するように切り替えられ、命令メモリ2に記憶されているタスク2が読み出され、実行される。
【0026】
このように、2系統のレジスタファイルを設けることにより、タスク1およびタスク2の切り替えを瞬時に行うことができる。
【0027】
【発明が解決しようとする課題】
しかしながら、図1および図2の例の場合、レジスタファイルの内部状態の退避およびパイプラインストールのために数十クロックを使用しなければならず、割り込みサービスが発生する毎に、比較的大きな時間的オーバヘッドが生じる課題があった。
【0028】
また、図3および図4の例の場合、予め用意したレジスタファイル群(図3の場合、2個)以上の多重割り込みサービスが存在する場合、やはり、図1の例の場合と同様に、レジスタファイル4の内部状態の退避およびパイプラインストールのための時間的オーバヘッドが生じてしまう課題があった。
【0029】
さらに、マイクロプロセッサにおけるメモリ階層構造の中で、最も高速で動作しなければならないレジスタファイルを大量に設けることは、回路規模が大きくなり、かつ、配線が多くなることを意味し、マイクロプロセッサのクロック速度向上の妨げとなる課題があった。
【0030】
本発明はこのような状況に鑑みてなされたものであり、レジスタファイルを大量に設けなくても、時間的オーバヘッドの少ないタスク切り替えを可能にするとともに、ほぼ無制限の割り込み多重化を実現することができるようにするものである。
【0031】
【課題を解決するための手段】
本発明のマイクロプロセッサは、複数のステージから構成され、複数のステージにおいて複数の命令をずらして順次実行することにより、同時に並行してデータを演算する少なくとも1系統の演算手段と、演算手段を構成する複数のステージにおける状態を、複数のタスクに対応させて記憶するために、ステージごとに対応付けて、演算手段の 1 系統に対して少なくとも2系統設けられる記憶手段と、第1のタスクが実行される場合、複数のステージにおけるそれぞれの状態を記憶するものとして、少なくとも2系統設けられる記憶手段のうち、ステージごとにいずれかの記憶手段を選択するように制御する制御手段と、制御手段によって選択された記憶手段を用いて第1のタスクを実行中に、第1のタスクの実行に用いられていない記憶手段で保持されている第2のタスクに関する複数のステージにおける状態を退避する退避手段と、制御手段によって選択された記憶手段を用いて第1のタスクを実行中に、退避手段に退避されている第3のタスクに関する複数のステージにおける状態を、第1のタスクの実行に用いられていない記憶手段に復元する復元手段とを備えることを特徴とする。
【0032】
制御手段には、タスク切り替え制御信号が発生されたとき、現在のタスクの実行に用いられていない記憶手段を新たなタスクの複数のステージにおけるそれぞれの状態を記憶するものとして選択するように制御させることができ、記憶手段の選択のタイミングは、ステージごとに対応付けて設けられているそれぞれの記憶手段で異なるように制御させることができる。
【0033】
制御手段には、外部から割り込み制御信号の入力を受けたとき、現在のタスクの実行に用いられていない記憶手段を新たなタスクの複数のステージにおけるそれぞれの状態を記憶するものとして選択するように制御させることができ、記憶手段の選択のタイミングは、ステージごとに対応付けて設けられているそれぞれの記憶手段で異なるように制御させることができる。
【0034】
退避手段によりデータを退避している途中で割り込み制御信号の入力を受けたとき、制御手段には、退避手段によりデータの退避が終了するまで割り込み制御信号を保留させ、データの退避が終了したとき、現在のタスクの実行に用いられていない記憶手段を新たなタスクの複数のステージにおけるそれぞれの状態を記憶するものとして選択するように制御させることができ、記憶手段の選択のタイミングは、ステージごとに対応付けて設けられているそれぞれの記憶手段で異なるように制御させることができる。
【0035】
復元手段によりデータを復元している途中で割り込み制御信号の入力を受けたとき、制御手段には、データの復元を中止させ、現在のタスクの実行に用いられていない記憶手段を新たなタスクの複数のステージにおけるそれぞれの状態を記憶するものとして選択するように制御させることができ、記憶手段の選択のタイミングは、ステージごとに対応付けて設けられているそれぞれの記憶手段で異なるように制御させることができる。
【0036】
記憶手段は、レジスタファイルをさらに含むものであるとすることができる。
また、記憶手段は、プログラムカウンタをさらに含むものであるとすることができる。
【0037】
退避手段を複数有し、それらを相互に連結させることができる。
【0038】
退避手段をマイクロプロセッサ外部に存在するメモリ及び1系統の演算手段と接続し、退避手段をマイクロプロセッサ外部に存在するメモリキャッシュとして動作させることができる。
退避手段をマイクロプロセッサ外部に存在するメモリ及び1系統の演算手段と接続し、退避手段をマイクロプロセッサ外部に存在するメモリの代用として動作させることができる。
【0039】
本発明のマイクロプロセッサにおいては、複数のステージにおいて複数の命令をずらして順次実行することにより同時に並行して演算された複数のステージごとの状態を複数のタスクに対応させて記憶するために、ステージごとに対応付けて、演算経路の 1 系統に対して少なくとも2系統設けられる記憶経路のうちのいずれかが選択され、選択された記憶経路を用いて第1のタスクを実行中に、第1のタスクの実行に用いられていない記憶経路で保持されている第2のタスクに関する複数のステージにおける状態がメモリに退避され、メモリに退避されている第3のタスクに関する複数のステージにおける状態が、第1のタスクの実行に用いられていない記憶経路に復元される。
【0040】
【発明の実施の形態】
以下、図を参照して、本発明の実施の形態について説明する。
【0041】
図5は、本発明を適用したマイクロプロセッサの内部の構成例を示すブロック図である。なお、従来と対応する部分には同一の符号を付してあり、その説明は適宜省略する。本発明においては、プログラムカウンタ1、レジスタファイル4、並びに、演算回路3内の記憶素子20乃至23を、それぞれ2系統で構成するが、勿論、2以上の複数系統で構成するようにしてもよい。これに対して、ステージ11乃至15は、1系統のみで構成されている。厳密に言うと、命令メモリ2とデータメモリ5は、マイクロプロセッサには含まれず、それ以外の部分をマイクロプロセッサコア(Microprocessor Core)という。
【0042】
タスク切替制御部41は、マイクロプロセッサ内のスイッチ51乃至70を、所定の時間毎に発生されるタスク切り替え制御信号により切り替えるように制御するか、もしくは外部割り込み制御信号の入力により切り替えるように制御する。初期状態において、タスク切替制御部41は、プログラムカウンタ1−1および1−2のうち、プログラムカウンタ1−1を選択するようにスイッチ52を制御し、演算回路3内の2系統のパイプラインのうち、記憶素子20−1,21−1,22−1および23−1をそれぞれ選択するようにスイッチ57乃至60を制御し、レジスタファイル4−1および4−2のうち、レジスタファイル4−1を選択するようにスイッチ68および69をそれぞれ制御する。
【0043】
スイッチ51は、退避用読み出しのためのスイッチ(選択装置)であり、タスク切替制御部41の制御の下、プログラムカウンタ1−1または1−2から供給されるアドレスを第1の退避メモリ42に供給する。スイッチ52は、タスク切替制御部41の制御の下、プログラムカウンタ1−1または1−2から供給されるアドレスを命令メモリ2に供給する。
【0044】
命令メモリ2は、スイッチ52を介してプログラムカウンタ1−1または1−2から供給されるアドレスに基づいて読み出される命令(タスク)を、演算回路3に供給する。
【0045】
演算回路3は、ステージ11乃至15の5段のパイプラインのRISCプロセッサで構成されており、記憶素子が2個ずつ設けられているため、2系統のパイプラインとされている。なお、本発明の実施の形態においては、パイプラインが5段になっている例を示したが、段数は任意であり、より多くても少なくてもよい。
【0046】
ステージ11は、命令メモリ2に記憶されている命令(タスク)を読み出し、記憶素子20−1または20−2に記憶させる。ステージ12は、記憶素子20−1または20−2に記憶されている命令をスイッチ57を介して読み出すとともに、レジスタファイル4−1または4−2に格納されているデータをスイッチ68または69を介して読み出し、それらをデコードし、記憶素子21−1または21−2に記憶させる。
【0047】
ステージ13は、記憶素子21−1または21−2に記憶されている命令をスイッチ58を介して読み出し、読み出した命令を実行し、その命令によって演算されたデータを記憶素子22−1または22−2に記憶させる。
【0048】
ステージ14は、記憶素子22−1または22−2に記憶されているデータをスイッチ59を介して読み出し、記憶素子23−1または23−2に記憶させる。ステージ14はまた、タスクの実行により得られるデータをデータメモリ5に書き込ませるとともに、データメモリ5に書き込まれているデータを読み出し、記憶素子23−1または23−2に記憶させる。
【0049】
ステージ15は、記憶素子23−1または23−2に記憶されているデータをスイッチ60を介して読み出し、レジスタファイル4−1または4−2へライトバックする。
【0050】
スイッチ53は、退避用読み出しのためのスイッチ(選択装置)であり、タスク切替制御部41の制御の下、記憶素子20−1または20−2から読み出される命令(タスク)を第1の退避メモリ42に供給する。スイッチ54は、退避用読み出しのためのスイッチであり、タスク切替制御部41の制御の下、記憶素子21−1または21−2から読み出されるデータを第1の退避メモリ42に供給する。スイッチ55は、退避用読み出しのためのスイッチであり、タスク切替制御部41の制御の下、記憶素子22−1または22−2から読み出されるデータを第1の退避メモリ42に供給する。スイッチ56は、退避用読み出しのためのスイッチであり、タスク切替制御部41の制御の下、記憶素子23−1または23−2から読み出されるデータを第1の退避メモリ42に供給する。
【0051】
スイッチ61は、復元用書き込みのためのスイッチであり、第1の退避メモリ42から供給されるデータ(アドレス)を、プログラムカウンタ1−1または1−2に供給する。スイッチ62は、復元用書き込みのためのスイッチであり、第1の退避メモリ42から供給されるデータ(命令)を、記憶素子20−1または20−2に供給する。スイッチ63は、復元用書き込みのためのスイッチであり、第1の退避メモリ42から供給されるデータを、記憶素子21−1または21−2に供給する。スイッチ64は、復元用書き込みのためのスイッチであり、第1の退避メモリ42から供給されるデータを、記憶素子22−1または22−2に供給する。スイッチ65は、復元用書き込みのためのスイッチであり、第1の退避メモリ42から供給されるデータを、記憶素子23−1または23−2に供給する。
【0052】
スイッチ66は、演算データ書き込みのためのスイッチであり、タスク切替制御部41の制御の下、ステージ15からライトバックされるデータを、レジスタファイル4−1または4−2に供給する。
【0053】
スイッチ67は、復元用書き込みのためのスイッチであり、タスク切替制御部41の制御の下、第1の退避メモリ42から供給されるデータを、レジスタファイル4−1または4−2に供給する。
【0054】
スイッチ68および69は、演算データ読み出しのためのスイッチであり、タスク切替制御部41の制御の下、レジスタファイル4−1または4−2から読み出されるデータをステージ12に供給する。
【0055】
スイッチ70は、退避用読み出しのためのスイッチであり、タスク切替制御部41の制御の下、レジスタファイル4−1または4−2から読み出されるデータを、第1の退避メモリ42に供給する。
【0056】
第1の退避メモリ42は、スイッチ51を介して供給されるプログラムカウンタ1−1または1−2からの退避データ、スイッチ53乃至56を介して供給される演算回路3からの退避データ、並びに、スイッチ70を介して供給されるレジスタファイル4−1または4−2からの退避データを書き込む。書き込まれた退避データは、復元時に読み出される。また、第1の退避メモリ42に加え、第2の退避メモリ43が存在するとさらに好適である。例えば、第1の退避メモリ42は容量(capacity)は小さいが、転送速度が早いメモリ(High Access bandwidth)であり、第2の退避メモリ43は、容量は大きいが転送速度が遅い(Low Access bandwidth)ものとする。その場合は、すぐに処理が必要とされないデータは第2の退避メモリ43にセーブしておく、などの多段階の処理が可能になる。
【0057】
また、マイクロプロセッサの外部に存在する命令メモリ2と、第1の退避メモリ42及び第2の退避メモリ43を接続し、さらにその入出力をステージ11へ双方向接続することにより、第1の退避メモリ42又は第2の退避メモリ43を命令キャッシュ7(図1)として利用することもできる。同様に、マイクロプロセッサの外部に存在するデータメモリ5と、第1の退避メモリ42及び第2の退避メモリ43を接続し、さらにその入出力をステージ14へ双方向接続することにより、第1の退避メモリ42又は第2の退避メモリ43をデータキャッシュ6(図1)として利用することもできる。このように、退避メモリとキャッシュを兼用することにより、実装効率(面積効率)を改善することができる。
【0058】
また、命令メモリ2と第1の退避メモリ42及び第2の退避メモリ43が接続されることで、退避メモリを命令メモリ2として代用することも可能になる。これを上述の例にあてはめると、容量は小さいが転送速度の速い第1の退避メモリ42を命令キャッシュ7として代用し、容量は大きいが転送速度の遅い第2の退避メモリ43を命令メモリ2として代用することも可能である。このような構成にすることで、実装効率(面積効率)を改善することもできる。
【0059】
なお、第2の退避メモリ43は、マイクロプロセッサ内部にあってもよいし、外部にあってもよい。
【0060】
なお、退避データは、多重化して順次書き込まれるか、もしくは、並列に同時に書き込まれる。また同様に、復元するデータも、多重化して読み出されるか、もしくは、並列に同時に読み出される。
【0061】
図6は、図5に示したマイクロプロセッサにおける、割り込みサービスによるタスク切り替えのタイミング動作を説明する図である。ここでは、タスク1、タスク2、およびタスク3の順で実行されるようにスケジュールされているものとし、これらタスク1乃至タスク3のうち、タスク3は、以前に、タスクの実行途中に割り込み入力されたことがあり、第1の退避メモリ42に退避データが存在するものとし、タスク2は、第1の退避メモリ42に退避データが存在せず、タスク2の実行開始時において退避データの復元は必要ないものとして説明する。なお、現在演算に使用されているレジスタファイルを「表」、現在演算に使用していないレジスタファイルを「裏」と適宜称することにする。
【0062】
同図に示されるように、初期状態においてタスク1が実行されており、時刻T7において、タスク切り替え制御信号が発生されると、タスク切替制御部41は、時刻T8において、プログラムカウンタ1−1からプログラムカウンタ1−2を選択するようにスイッチ52を制御する。時刻T9において、タスク切替制御部41は、レジスタファイル4−1からレジスタファイル4−2の経路に切り替えるようにスイッチ68および69を制御する。これにより、レジスタファイル4−1が「表」から「裏」に切り替えられ、レジスタファイル4−2が「裏」から「表」に切り替えられ、命令メモリ2に記憶されているタスク2の実行が開始される。それ以降、タスク1と同様の動作が繰り返し実行される。
【0063】
すなわち、タスク切替制御部41は、時刻T8において、記憶素子20−2を選択するようにスイッチ57を切り替え、時刻T9において、記憶素子21−2を選択するようにスイッチ58を切り替え、時刻T10において、記憶素子22−2を選択するようにスイッチ59を切り替え、時刻T11において、記憶素子23−2を選択するようにスイッチ60を切り替える。このように、各ステージ毎にタスク1の実行からタスク2の実行に切り替えられる。
【0064】
時刻T12において、ステージ15によってデータがレジスタファイル4−1へライトバックされると(全てのタスク1が吐き出されると)同時に、タスク切替制御部41は、レジスタファイル4−2にデータをライトバックするように、スイッチ66を切り替える。これにより、レジスタファイル4−1は「裏」(待機状態)となるため、その時間を利用して、第1の退避メモリ42に、レジスタファイル4−1の内容およびタスク1の実行における演算回路3の内部状態に関するデータを退避させ、次に実行すべきタスクを復元させておく。
【0065】
いまの場合、タスク2の次にタスク3が実行されるようにスケジュールされているため、タスク2の実行中に、タスク1のデータ退避、およびタスク3のデータ復元を行うようにする。
【0066】
具体的には、時刻T13において、タスク切替制御部41によって、スイッチ51、スイッチ53乃至56、並びにスイッチ70が、「裏」となるプログラムカウンタ1−1、演算回路3の記憶素子20−1,21−1,22−1および23−1、並びにレジスタファイル4−1をそれぞれ選択するように切り替えられ、プログラムカウンタ1−1、演算回路3の記憶素子20−1,21−1,22−1および23−1、並びにレジスタファイル4−1に記憶されているデータが第1の退避メモリ42に退避される。そして、時刻T32において、データ退避が終了されると、時刻T34において、第1の退避メモリ42に退避されているタスク3のデータが、「裏」となるプログラムカウンタ1−1、演算回路3の記憶素子20−1,21−1,22−1および23−1、並びにレジスタファイル4−1にそれぞれ書き込まれ、復元される。
【0067】
このように、タスク2の実行中に、「裏」となるプログラムカウンタ1−1、演算回路3の記憶素子20−1,21−1,22−1および23−1、並びにレジスタファイル4−1にタスク3の以前の切り替え時のデータが復元されるため、タスク1からタスク2の切り替えと同様に、瞬時にタスク2からタスク3に切り替えられる。
【0068】
また、タスク3を実行中に、「裏」となるレジスタファイル4−2、プログラムカウンタ1−2、演算回路3の記憶素子20−2,21−2,22−2および23−2に記憶されているタスク2のデータを第1の退避メモリ42に退避させ、次に実行すべきタスク1をそれらに復元することによって、時間的オーバヘッドなしにタスク切り替え(タスクスイッチング)を実行することができる。
【0069】
さらに、第1の退避メモリ42の記憶容量に応じて、複数のタスクを自由に切り替えて実行することも可能となる。
【0070】
以上においては、タスク切り替え制御信号が、適切なタイミングで与えられるものとして説明したが、例えば、自走するカウンタによってタスク切り替え制御信号を生成することによって、各タスクに均等に実行時間を与えることもできる。
【0071】
また、プリロード可能なダウンカウンタを設け、そのダウンカウンタの値が0となるタイミングでタスク切り替え制御信号を発生させるものとし、タスク切り替え制御信号が発生したときにプリロード値をダウンカウンタ内にロードするように構成すれば、予め設定するプリロード値を変更するだけで、タスク切り替えの間隔を可変にすることができる。
【0072】
さらに、ダウンカウンタにロードするプリロード値を保持する複数のレジスタを設け、それらのレジスタをどのような順番でロードするかをプログラムによって設定することにより、柔軟なタスク切り替えを実現することができる。
【0073】
また以上においては、予めタスクスイッチが予測可能である場合について説明したが、外部割込みサービスにおいても、時間的オーバヘッドなしにタスク切り替えを実行することができる。
【0074】
なお、マイクロプロセッサ内に第1の退避メモリ42を設ける場合を例にして説明したが、これに限らず、例えば、図示せぬキャッシュメモリに退避メモリを兼用させるようにしてもよい。
【0075】
図7は、外部割込みサービスによるタスク切り替えのタイミング動作を説明する図である。この例の場合、データ退避およびデータ復元が実行されていないタイミングに割り込みサービスがあるため、通常のタスク切り替えと同様に扱うことができる。
【0076】
同図に示されるように、タスク2の実行中に行われるタスク1のデータ退避が時刻T32に終了し、その後、時刻T33において、外部から割り込み制御信号の入力を受け付けると、タスク切替制御部41は、時刻T34において、プログラムカウンタ1−2からプログラムカウンタ1−1を選択するようにスイッチ52を制御するとともに、演算回路3の記憶素子20−1,21−1,22−1および23−1をそれぞれ選択するようにスイッチ61乃至65を制御する。時刻T35において、タスク切替制御部41は、レジスタファイル4−2からレジスタファイル4−1の経路に切り替えるようにスイッチ68および69を制御する。
【0077】
これにより、第1の退避メモリ42に退避されているタスク3のデータが、プログラムカウンタ1−1、演算回路3の記憶素子20−1,21−1,22−1および23−1、並びにレジスタファイル4−1にそれぞれ復元され、タスク3が実行され、いままで実行されていたタスク2は中断される。すなわち、レジスタファイル4−1の内容、およびタスク1の実行における演算回路3の内部状態に関するデータは既に第1の退避メモリ42に退避されているため、直ちにタスク3の実行を行うことができる。
【0078】
時刻T38において、ステージ15によってデータがレジスタファイル4−1へライトバックされると(全てのタスク2が吐き出されると)同時に、タスク切替制御部41は、タスク3をレジスタファイル4−1にライトバックするように、スイッチ66を切り替える。
【0079】
ステージ11のタスク3の実行が終了する時刻T40において、タスク切替制御部41は、レジスタファイル4−1から4−2の経路に切り替えるようにスイッチ68および69を制御する。これにより、割り込みにより中断されていたタスク2の実行が再開される。
【0080】
時刻T41において、タスク切替制御部41によって、スイッチ61乃至65、およびスイッチ67が、「裏」となるプログラムカウンタ1−1、演算回路3の記憶素子20−1,21−1,22−1および23−1、並びにレジスタファイル4−1をそれぞれ選択するように切り替えられ、第1の退避メモリ42に退避されているデータが、レジスタファイル4−1、プログラムカウンタ1−1、演算回路3の記憶素子20−1,21−1,22−1および23−1に書き込まれ、復元される。
【0081】
このように、現在使用していないプログラムカウンタ1−1、演算回路3の記憶素子20−1,21−1,22−1および23−1、並びにレジスタファイル4−1を、割り込みが入ったタスクの演算用に割り当てることにより、割り込みされ、一時中断されたタスク2の状態を保存する必要がない。すなわち、データ退避およびデータ復元は不要となる。
【0082】
図8は、他の外部割り込みサービスによるタスク切り替えのタイミング動作を説明する図である。この例においては、データ退避中に割り込みサービスがあった場合の動作について説明する。
【0083】
同図に示されるように、タスク2の実行中に行われるデータ退避の途中の時刻T31において、外部から割り込み制御信号の入力を受け付けると、タスク切替制御部41は、その受け付けを一旦保留し、データ退避が終了するまで待機する。
【0084】
そして、時刻T32において、タスク2の実行中に行われるデータ退避が終了されると、時刻T33において、タスク切替制御部41は、保留されている割り込み制御信号の入力を受け付ける。時刻T34において、タスク切替制御部41は、プログラムカウンタ1−2からプログラムカウンタ1−1を選択するようにスイッチ52を制御するとともに、演算回路3の記憶素子20−1,21−1,22−1および23−1をそれぞれ選択するようにスイッチ61乃至65を制御する。時刻T35において、タスク切替制御部41は、レジスタファイル4−2からレジスタファイル4−1の経路に切り替えるようにスイッチ68および69を制御する。
【0085】
これにより、第1の退避メモリ42に退避されているタスク3のデータが、プログラムカウンタ1−1、演算回路3の記憶素子20−1,21−1,22−1および23−1、並びにレジスタファイル4−1にそれぞれ復元され、タスク3が実行され、いままで実行されていたタスク2は中断される。
【0086】
時刻T38において、ステージ15によってデータがレジスタファイル4−2へライトバックされると(全てのタスク2が吐き出されると)同時に、タスク切替制御部41は、タスク3をレジスタファイル4−1にライトバックするように、スイッチ66を切り替える。時刻T39において、タスク切替制御部41によって、スイッチ51、スイッチ53乃至56、並びにスイッチ70が、「裏」となるプログラムカウンタ1−2、演算回路3の記憶素子20−1,21−2,22−2および23−2、並びにレジスタファイル4−2をそれぞれ選択するように切り替えられ、プログラムカウンタ1−2、演算回路3の記憶素子20−2,21−2,22−2および23−2、並びにレジスタファイル4−2に記憶されているデータが第1の退避メモリ42に退避される。
【0087】
このように、データの退避中に割り込みが入る場合には、その退避が終了するまで割り込み制御信号の受け付けを保留にすることによって、確実にデータを退避させることができ、かつ、時間的オーバヘッドなしにタスク切り替えを実行することができる。
【0088】
図9は、他の外部割込みサービスによるタスク切り替えのタイミング動作を説明する図である。この例においては、データ復元中に割り込みサービスがあった場合の動作について説明する。
【0089】
同図に示されるように、タスク2の実行中に行われるデータ復元の途中の時刻T11において、外部から割り込み制御信号の入力を受け付けると、データの復元を中止し、時刻T12において、タスク切替制御部41は、プログラムカウンタ1−2からプログラムカウンタ1−1を選択するようにスイッチ52を制御するとともに、レジスタファイル4−2からレジスタファイル4−1の経路に切り替えるようにスイッチ68および69を制御する。
【0090】
これにより、第1の退避メモリ42に退避されているタスク3のデータが、プログラムカウンタ1−1、演算回路3の記憶素子20−1,21−1,22−1および23−1、並びにレジスタファイル4−1にそれぞれ復元され、タスク3が実行され、いままで実行されていたタスク2は中断される。なお、途中まで復元されていたデータは、割り込まれたタスク3によって上書きされる。
【0091】
時刻T19において、割り込みサービスが終了すると、時刻T20において、タスク切替制御部41は、レジスタファイル4−1からレジスタファイル4−2の経路に切り替えるようにスイッチ68および69を制御する。これにより、中断されていたタスク2が再開され、時刻T20において、割り込みにより中止されたデータの復元が再開される。
【0092】
このように、データの復元中に割り込みが入る場合には、その復元を中止し、割り込みサービスが終了した時点で、復元をやり直すことによって、確実にデータを復元させることができ、かつ、時間的オーバヘッドなしにタスク切り替えを実行することができる。
【0093】
以上のように、演算に使用していない裏のレジスタファイルのデータを第1の退避メモリ42に退避させた後、そこに、次に実行すべきデータを第1の退避メモリ42から復元することにより、ほぼ無制限の割り込みサービスに対して、時間的オーバヘッドなしにタスク切り替えを実現することができる。
【0094】
【発明の効果】
本発明のマイクロプロセッサによれば、複数のステージにおいて複数の命令をずらして順次実行することにより同時に並行して演算された複数のステージごとの状態を複数のタスクに対応させて記憶するために、ステージごとに対応付けて、演算経路の 1 系統に対して少なくとも2系統設けられる記憶経路のうちのいずれかを選択し、選択された記憶経路を用いて第1のタスクを実行中に、第1のタスクの実行に用いられていない記憶経路で保持されている第2のタスクに関する複数のステージにおける状態をメモリに退避し、メモリに退避されている第3のタスクに関する複数のステージにおける状態を、他方の記憶経路に復元するようにしたので、ほぼ無制限の割り込みサービスに対して、時間的オーバヘッドなしにタスク切り替えを実現することができる。オーバヘッドをなくすことにより、ソフトウェア無線などで必要とされる性質の異なる処理(復調、誤り訂正など)の高速切り替えを、効率的に行うことができる。
【図面の簡単な説明】
【図1】従来のマイクロプロセッサの内部の構成例を示す図である。
【図2】図1のマイクロプロセッサにおける、割り込みサービスによるタスク切り替えのタイミング動作を説明する図である。
【図3】従来の他のマイクロプロセッサの内部の構成例を示す図である。
【図4】図2のマイクロプロセッサにおける、割り込みサービスによるタスク切り替えのタイミング動作を説明する図である。
【図5】本発明を適用したマイクロプロセッサの内部の構成例を示すブロック図である。
【図6】図5のマイクロプロセッサにおける、割り込みサービスによるタスク切り替えのタイミング動作を説明する図である。
【図7】図5のマイクロプロセッサにおける、外部割り込みサービスによるタスク切り替えのタイミング動作を説明する図である。
【図8】図5のマイクロプロセッサにおける、他の外部割り込みサービスによるタスク切り替えのタイミング動作を説明する図である。
【図9】図5のマイクロプロセッサにおける、他の外部割り込みサービスによるタスク切り替えのタイミング動作を説明する図である。
【符号の説明】
1−1,1−2 プログラムカウンタ, 2 命令メモリ, 3 演算回路,4−1,4−2 レジスタファイル, 5 データメモリ, 6 データキャッシュ, 7 命令キャッシュ, 11乃至15 ステージ, 20−1,20−2,21−1,21−2,22−1,22−2,23−1,23−2 記憶素子, 41 タスク切替制御部, 42 第1の退避メモリ, 43 第2の退避メモリ, 51乃至70 スイッチ
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a microprocessor, and more particularly to a microprocessor that enables task switching with low temporal overhead, for example. In particular, the present invention relates to a microprocessor suitable for a processor that requires various different processing such as demodulation processing, error correction processing, and protocol processing, such as software radio technology.
[0002]
[Prior art]
In recent years, the advancement of electronic devices has progressed, and further advancement and efficient processing have been demanded for microprocessors incorporated in electronic devices. That is, there is a need for a high-speed microprocessor that executes a large amount of programs.
[0003]
In general, an embedded microprocessor is often required to perform real-time processing. In a complicated program, a timing-constrained part can be executed reliably and within a predetermined time, and a program can be executed. It is strongly desired to predict whether the processing time will be in time when the change is made.
[0004]
On the other hand, with recent advances in semiconductor technology, it is possible to use more circuits in microprocessors than before, and if advanced and efficient processing requirements are met, In many cases, the increase in the circuit amount is allowed.
[0005]
In addition, because of the advancement of semiconductor technology, the integration density of circuits has been improved, so it is possible to integrate memory, etc., which was a separate chip from the microprocessor, on the same chip, which limits the number of pins on the package. The bus width between the microprocessor and the memory, which has been limited by receiving, can be greatly increased. Therefore, the restrictions on the increase in bus width and the number of buses are greatly relaxed.
[0006]
By the way, when executing real-time processing in a microprocessor, it is possible to receive an irregular or periodic input of an interrupt control signal from an external peripheral circuit and execute a program (so-called interrupt service) corresponding to various interrupts.
[0007]
At this time, since there is no continuity between the program being executed and the interrupt service, the internal state of the microprocessor (for example, the pipeline flip-flop used in the arithmetic circuit) is saved or executed. The interrupt service does not change the operation result of the program that has been executed so far, depending on whether the program is stalled.
[0008]
Here, an internal configuration of a conventional microprocessor will be described with reference to FIG.
[0009]
The program counter 1 is a register for storing the address of an instruction (task) to be executed next, and supplies the stored address of the instruction to be executed next to the instruction memory 2. The instruction memory 2 supplies the instruction read out based on the address supplied from the program counter 1 to the arithmetic circuit 3. The instruction cache 7 is a buffer for performing pseudo-high-speed data access using access locality when the data input / output speed of the instruction memory 2 is slower than that of the arithmetic circuit 3. Memory.
[0010]
This microprocessor is assumed to be composed of a 5-stage pipelined RISC (Reduced Instruction Set Computer) processor of stages 11 to 15.
[0011]
The stage 11 reads an instruction (task) stored in the instruction memory 2 (IF: Instruction Fetch) and stores it in the storage element 20. The stage 12 reads out the instruction stored in the storage element 20 and the data stored in the register file 4, decodes (ID: Instruction Decode), and stores it in the storage element 21.
[0012]
The stage 13 reads and executes an instruction stored in the storage element 21 (EX: Execution), and stores data calculated by the instruction in the storage element 22.
[0013]
The stage 14 reads out data stored in the storage element 22 and stores it in the storage element 23. The stage 14 also causes the data relating to the internal state in the arithmetic circuit 3 and the contents of the register file 4 to be written to the data memory 5 (MEM: Memory access), and also reads the data written in the data memory 5 to read out the arithmetic circuit 3 And the register file 4 is restored. The stage 15 reads the data stored in the storage element 23 and writes it back to the register file 4 (WB: Write Back). Between the data memory 5 and the stage 14, there is generally a data cache 6 for performing pseudo high-speed data access.
[0014]
FIG. 2 is a diagram for explaining the task switching timing operation by the interrupt service in the microprocessor shown in FIG.
[0015]
As shown in the figure, at time T 1, the stage 11 reads out the task 1 stored in the instruction memory 2 and stores it in the storage element 20. At time T2, the stage 12 reads the task 1 stored in the storage element 20, decodes it, and stores it in the storage element 21. At time T3, the stage 13 reads the task 1 stored in the storage element 21, executes it, and stores the calculation result in the storage element 22. At time T <b> 4, the stage 14 reads out data stored in the storage element 22 and stores it in the storage element 23. At time T5, the stage 15 reads the data stored in the storage element 23 and writes it back to the register file 4.
[0016]
Thus, the signal input to the stage (for example, the stage 11) is supplied to the next stage (in this case, the stage 12) after the clock time T has elapsed. Thereafter, even if there is a next input in this stage (stage 11), this signal is supplied to the next stage (stage 12) after the clock time T has elapsed. Therefore, the next stage (stage 12) can supply the current signal to the next stage (in this case, stage 13) before being affected by the input of the previous stage (stage 11). .
[0017]
When a task switching control signal (interrupt service) is generated at time T7, the microprocessor counters the program counter 1 to supply the instruction memory 2 with the address of the next instruction (task 2) to be executed at time T8. Control address switching. Thereafter, since pipeline installation is generated in the arithmetic circuit 3, it waits until a register save instruction is generated.
[0018]
At time T12, when data is written back to the register file 4 by the stage 15 (when all tasks 1 are discharged), a register save instruction is generated, and the stage 14 stores the data in the arithmetic circuit 3 in the data memory 5. Data relating to the internal state and the contents of the register file 4 are saved.
[0019]
At time T15 when the data saving of the stage 11 ends, the task 2 stored in the instruction memory 2 is read, and the execution of the task 2 is started. Thereafter, the same operation as the above-described task 1 is repeatedly executed.
[0020]
At time T52 when execution of task 2 in stage 11 ends, a register return instruction is generated, and the internal state of arithmetic circuit 3 and the contents of register file 4 in the execution of task 1 are restored from data memory 5. At time T55 when the data restoration of the stage 11 ends, the microprocessor controls the address return of the program counter 1 so that the instruction memory 2 is supplied with the address of the instruction (task 1) to be executed next. Thereafter, the arithmetic circuit 3 waits until pipeline installation is generated and the data restoration of the stage 15 is completed. When the data restoration of stage 15 is completed at time T59, the execution of task 1 is resumed and the above-described operation is repeated.
[0021]
In this way, the internal state of the arithmetic circuit 3 being executed and the contents of the register file 4 are saved before accepting the interrupt service so that the contents of the register file 4 are not destroyed by the execution of the interrupt service program. When returning from the interrupt service, by restoring the saved internal state of the arithmetic circuit 3 and the contents of the register file 4, the operation result of the program executed before by the interrupt service is changed. Is prevented.
[0022]
Further, as shown in FIG. 3, two register files 4-1 and 4-2 are provided, and the task can be switched instantaneously by switching the register file when executing the interrupt service. There is also a processor. Note that portions corresponding to those in FIG. 1 are denoted by the same reference numerals, and description thereof is omitted as appropriate.
[0023]
In the configuration of FIG. 3, when an interrupt service is received in a state where a task stored in one register file 4-1 is being executed, the task stored in the other register file 4-2 is instantaneously stored. Since the switches 31 and 32 are switched so as to select the register file 4-2 from the register file 4-1 so that they can be executed, the overhead for saving data does not occur.
[0024]
FIG. 4 is a diagram for explaining the task switching timing operation by the interrupt service in the microprocessor shown in FIG.
[0025]
As shown in the figure, when a task switching control signal (interrupt service) is generated at time T7, the microprocessor assigns the address of the next instruction (task 2) to be executed at time T8 to the instruction memory 2. To control the address switching of the program counter 1. Thereafter, pipeline installation occurs in the arithmetic circuit 3, and at time T12, when data is written back to the register file 4-1 by the stage 15 (when all tasks are discharged), the switches 31 and 32 are simultaneously turned on. Switching is made so that the register file 4-2 is selected from the register file 4-1, and the task 2 stored in the instruction memory 2 is read and executed.
[0026]
Thus, by providing two systems of register files, task 1 and task 2 can be switched instantaneously.
[0027]
[Problems to be solved by the invention]
However, in the example of FIGS. 1 and 2, dozens of clocks must be used for saving the internal state of the register file and installing the pipeline, and each time an interrupt service occurs, a relatively large time overhead is generated. There was a problem that occurred.
[0028]
In the case of the example of FIGS. 3 and 4, when there are multiple interrupt services more than the register file group prepared in advance (two in the case of FIG. 3), the register is also registered as in the case of the example of FIG. There has been a problem that a time overhead for saving the internal state of the file 4 and pipeline installation occurs.
[0029]
Furthermore, providing a large number of register files that must operate at the highest speed in the memory hierarchy in the microprocessor means that the circuit scale increases and the wiring increases, and the clock of the microprocessor is increased. There was a problem that hindered speed improvement.
[0030]
The present invention has been made in view of such a situation, and enables task switching with little temporal overhead and realizes almost unlimited interrupt multiplexing without providing a large number of register files. It is something that can be done.
[0031]
[Means for Solving the Problems]
  The microprocessor according to the present invention includes a plurality of stages, and by sequentially executing a plurality of instructions while shifting the plurality of instructions in the plurality of stages, at least one system of arithmetic means for simultaneously calculating data, and arithmetic meansCorresponding to the multiple tasks in the multiple stages that make upTo remember, every stageIn association with 1 For the systemStorage means provided in at least two systems;When the first task is executed, it is assumed that each state in a plurality of stages is stored.Of the storage means provided in at least two systems, for each stageAny storage meansDuring execution of the first task using the control means for controlling to select and the storage means selected by the control means,Storage means not used for execution of first taskOn the second task held inStates in multiple stagesEvacuation means for evacuating,During the execution of the first task using the storage means selected by the control means, it is saved in the saving meansAbout the third taskStates in multiple stagesTheStorage means not used for execution of first taskAnd a restoring means for restoring the data.
[0032]
  When a task switching control signal is generated in the control means,Not used to perform current taskStorage meansAs a memory for each state of multiple stages of a new taskCan be controlled to chooseThe timing of selecting the storage means can be controlled to be different for each storage means provided in association with each stage.The
[0033]
  When the control means receives an interrupt control signal from the outside,Not used to perform current taskStorage meansAs a memory for each state of multiple stages of a new taskCan be controlled to chooseThe timing of selecting the storage means can be controlled to be different for each storage means provided in association with each stage.The
[0034]
  When an interrupt control signal is received while data is being saved by the saving means, the control means holds the interrupt control signal until the saving of data is completed by the saving means, and when saving of the data is completed ,Not used to perform current taskStorage meansAs a memory for each state of multiple stages of a new taskCan be controlled to chooseThe timing of selecting the storage means can be controlled to be different for each storage means provided in association with each stage.The
[0035]
  When receiving the interrupt control signal in the middle of restoring the data by the restoration means, the control means stops the restoration of the data,Not used to perform current taskStorage meansAs a memory for each state of multiple stages of a new taskCan be controlled to chooseThe timing of selecting the storage means can be controlled to be different for each storage means provided in association with each stage.The
[0036]
  The storage means stores the register file.furtherIt can be included.
  Also,The storage means may further include a program counter.
[0037]
There are a plurality of retracting means, and they can be connected to each other.
[0038]
  Memory existing outside the microprocessor for savingas well asMemory that is connected to one system of computing means and the saving means exists outside the microprocessorofIt can be operated as a cache.
  The saving means can be connected to a memory existing outside the microprocessor and one system of calculating means, and the saving means can be operated as a substitute for the memory existing outside the microprocessor.
[0039]
  In the microprocessor according to the present invention, a plurality of instructions are shifted and sequentially executed in a plurality of stages, thereby being simultaneously operated in parallel.Matching the status of multiple stages to multiple tasksTo remember, every stageIn association with 1 For the systemWhile any one of the storage paths provided in at least two systems is selected and the first task is executed using the selected storage paths,Not used to execute the first taskRegarding the second task held in the memory pathStates in multiple stagesIs saved in the memory and the third task saved in the memory isStates in multiple stagesBut,Not used to execute the first taskRestored to the storage path.
[0040]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0041]
FIG. 5 is a block diagram showing an internal configuration example of a microprocessor to which the present invention is applied. In addition, the same code | symbol is attached | subjected to the part corresponding to the past, and the description is abbreviate | omitted suitably. In the present invention, the program counter 1, the register file 4, and the storage elements 20 to 23 in the arithmetic circuit 3 are each constituted by two systems, but of course, it may be constituted by two or more plural systems. . On the other hand, the stages 11 to 15 are composed of only one system. Strictly speaking, the instruction memory 2 and the data memory 5 are not included in the microprocessor, and the other part is referred to as a microprocessor core.
[0042]
The task switching control unit 41 controls the switches 51 to 70 in the microprocessor to be switched by a task switching control signal generated every predetermined time, or to be switched by input of an external interrupt control signal. . In the initial state, the task switching control unit 41 controls the switch 52 so that the program counter 1-1 is selected from the program counters 1-1 and 1-2, and the two pipelines in the arithmetic circuit 3 are controlled. Among them, the switches 57 to 60 are controlled so as to select the memory elements 20-1, 21-1, 22-1 and 23-1, respectively, and the register file 4-1 of the register files 4-1 and 4-2 is selected. The switches 68 and 69 are respectively controlled so as to select.
[0043]
The switch 51 is a switch (selection device) for reading for saving, and the address supplied from the program counter 1-1 or 1-2 is transferred to the first saving memory 42 under the control of the task switching control unit 41. Supply. The switch 52 supplies the instruction memory 2 with the address supplied from the program counter 1-1 or 1-2 under the control of the task switching control unit 41.
[0044]
The instruction memory 2 supplies an instruction (task) read based on the address supplied from the program counter 1-1 or 1-2 via the switch 52 to the arithmetic circuit 3.
[0045]
The arithmetic circuit 3 is composed of a 5-stage pipelined RISC processor of stages 11 to 15 and two storage elements are provided, so that the arithmetic circuit 3 has two pipelines. In the embodiment of the present invention, an example in which the pipeline has five stages is shown, but the number of stages is arbitrary, and may be larger or smaller.
[0046]
The stage 11 reads an instruction (task) stored in the instruction memory 2 and stores it in the storage element 20-1 or 20-2. The stage 12 reads the instruction stored in the storage element 20-1 or 20-2 via the switch 57, and reads the data stored in the register file 4-1 or 4-2 via the switch 68 or 69. Are read out, decoded, and stored in the storage element 21-1 or 21-2.
[0047]
The stage 13 reads the instruction stored in the storage element 21-1 or 21-2 via the switch 58, executes the read instruction, and stores the data calculated by the instruction in the storage element 22-1 or 22- 2 is memorized.
[0048]
The stage 14 reads the data stored in the storage element 22-1 or 22-2 through the switch 59 and stores it in the storage element 23-1 or 23-2. The stage 14 also causes the data obtained by the execution of the task to be written into the data memory 5, reads out the data written in the data memory 5, and stores it in the storage element 23-1 or 23-2.
[0049]
The stage 15 reads the data stored in the storage element 23-1 or 23-2 via the switch 60 and writes it back to the register file 4-1 or 4-2.
[0050]
The switch 53 is a switch (selection device) for reading for saving, and commands (tasks) read from the storage element 20-1 or 20-2 under the control of the task switching control unit 41 are stored in the first saving memory. 42. The switch 54 is a switch for reading for saving, and supplies data read from the storage element 21-1 or 21-2 to the first saving memory 42 under the control of the task switching control unit 41. The switch 55 is a switch for reading for saving, and supplies data read from the storage element 22-1 or 22-2 to the first saving memory 42 under the control of the task switching control unit 41. The switch 56 is a switch for saving reading, and supplies data read from the storage element 23-1 or 23-2 to the first saving memory 42 under the control of the task switching control unit 41.
[0051]
The switch 61 is a switch for restoring writing, and supplies data (address) supplied from the first save memory 42 to the program counter 1-1 or 1-2. The switch 62 is a switch for restoration writing, and supplies data (command) supplied from the first save memory 42 to the storage element 20-1 or 20-2. The switch 63 is a switch for restoration writing, and supplies data supplied from the first save memory 42 to the storage element 21-1 or 21-2. The switch 64 is a switch for writing for restoration, and supplies data supplied from the first save memory 42 to the storage element 22-1 or 22-2. The switch 65 is a switch for restoration writing, and supplies data supplied from the first save memory 42 to the storage element 23-1 or 23-2.
[0052]
The switch 66 is a switch for writing operation data, and supplies data written back from the stage 15 to the register file 4-1 or 4-2 under the control of the task switching control unit 41.
[0053]
The switch 67 is a switch for writing for restoration, and supplies data supplied from the first save memory 42 to the register file 4-1 or 4-2 under the control of the task switching control unit 41.
[0054]
The switches 68 and 69 are switches for reading operation data, and supply data read from the register file 4-1 or 4-2 to the stage 12 under the control of the task switching control unit 41.
[0055]
The switch 70 is a switch for saving reading, and supplies data read from the register file 4-1 or 4-2 to the first saving memory 42 under the control of the task switching control unit 41.
[0056]
The first save memory 42 includes save data from the program counter 1-1 or 1-2 supplied via the switch 51, save data from the arithmetic circuit 3 supplied via the switches 53 to 56, and The save data from the register file 4-1 or 4-2 supplied via the switch 70 is written. The written save data is read at the time of restoration. In addition to the first save memory 42, it is more preferable that the second save memory 43 exists. For example, the first save memory 42 is a memory having a small capacity (capacity) but a fast transfer rate (High Access bandwidth), and the second save memory 43 has a large capacity but a slow transfer rate (Low Access bandwidth). ) In this case, multi-stage processing such as saving data that does not need to be processed immediately in the second save memory 43 becomes possible.
[0057]
In addition, the instruction memory 2 existing outside the microprocessor is connected to the first save memory 42 and the second save memory 43, and the input / output thereof is bidirectionally connected to the stage 11, so that the first save is performed. The memory 42 or the second save memory 43 can also be used as the instruction cache 7 (FIG. 1). Similarly, the data memory 5 existing outside the microprocessor is connected to the first save memory 42 and the second save memory 43, and the input / output thereof is bidirectionally connected to the stage 14, so that the first The save memory 42 or the second save memory 43 can also be used as the data cache 6 (FIG. 1). As described above, the mounting efficiency (area efficiency) can be improved by using both the save memory and the cache.
[0058]
Further, by connecting the instruction memory 2 to the first save memory 42 and the second save memory 43, the save memory can be used as the instruction memory 2. When this is applied to the above-described example, the first save memory 42 having a small capacity but a fast transfer speed is substituted for the instruction cache 7, and the second save memory 43 having a large capacity but a slow transfer speed is designated as the instruction memory 2. It is also possible to substitute. With such a configuration, mounting efficiency (area efficiency) can also be improved.
[0059]
The second save memory 43 may be inside the microprocessor or outside.
[0060]
Note that the save data is multiplexed and sequentially written, or simultaneously written in parallel. Similarly, the data to be restored is multiplexed and read, or is read simultaneously in parallel.
[0061]
FIG. 6 is a diagram for explaining the task switching timing operation by the interrupt service in the microprocessor shown in FIG. Here, it is assumed that tasks 1, 2, and 3 are scheduled to be executed in this order, and among these tasks 1 to 3, task 3 has previously been interrupted during task execution. It is assumed that there is saved data in the first save memory 42, and there is no saved data in the first save memory 42, and task 2 restores the saved data at the start of execution of task 2. Is explained as not necessary. Note that the register file currently used for the calculation is appropriately referred to as “front”, and the register file not currently used for the calculation is appropriately referred to as “back”.
[0062]
As shown in the figure, when task 1 is executed in the initial state and a task switching control signal is generated at time T7, task switching control unit 41 starts from program counter 1-1 at time T8. The switch 52 is controlled to select the program counter 1-2. At time T9, the task switching control unit 41 controls the switches 68 and 69 to switch from the register file 4-1 to the path of the register file 4-2. As a result, the register file 4-1 is switched from “front” to “back”, the register file 4-2 is switched from “back” to “front”, and the task 2 stored in the instruction memory 2 is executed. Be started. Thereafter, the same operation as task 1 is repeatedly executed.
[0063]
That is, the task switching control unit 41 switches the switch 57 to select the storage element 20-2 at time T8, switches the switch 58 to select the storage element 21-2 at time T9, and at time T10. The switch 59 is switched so as to select the storage element 22-2, and the switch 60 is switched so as to select the storage element 23-2 at time T11. As described above, the task 1 is switched to the task 2 for each stage.
[0064]
At time T12, when the data is written back to the register file 4-1 by the stage 15 (when all tasks 1 are discharged), the task switching control unit 41 writes the data back to the register file 4-2. Thus, the switch 66 is switched. As a result, the register file 4-1 becomes “back” (standby state), so that the time is used to store the contents of the register file 4-1 and the operation circuit in the execution of the task 1. 3 is saved, and the task to be executed next is restored.
[0065]
In this case, the task 3 is scheduled to be executed next to the task 2, and therefore the data of the task 1 is saved and the data of the task 3 is restored during the execution of the task 2.
[0066]
Specifically, at time T13, the task switching control unit 41 causes the switch 51, the switches 53 to 56, and the switch 70 to be “back”, the program counter 1-1, the storage element 20-1, 21-1, 21-1 and 23-1 and the register file 4-1 are switched to select the program counter 1-1 and the memory elements 20-1, 21-1, and 2-1 of the arithmetic circuit 3. And 23-1, and the data stored in the register file 4-1, are saved in the first save memory 42. Then, when the data saving is completed at time T32, the data of the task 3 saved in the first saving memory 42 at time T34 is stored in the program counter 1-1 and the arithmetic circuit 3 that become “back”. The data is written and restored in the storage elements 20-1, 21-1, 22-1 and 23-1, and the register file 4-1.
[0067]
As described above, during the execution of the task 2, the “counter” program counter 1-1, the storage elements 20-1, 21-1, 22-1 and 23-1 of the arithmetic circuit 3, and the register file 4-1. Since the data at the time of the previous switching of task 3 is restored, the switching from task 2 to task 3 is instantaneously performed in the same manner as switching from task 1 to task 2.
[0068]
In addition, during the execution of task 3, it is stored in the register file 4-2 that is the "back", the program counter 1-2, and the storage elements 20-2, 21-2, 22-2, and 23-2 of the arithmetic circuit 3. The task switching data (task switching) can be executed without time overhead by saving the data of the task 2 being saved in the first saving memory 42 and restoring the task 1 to be executed next.
[0069]
Furthermore, a plurality of tasks can be freely switched and executed according to the storage capacity of the first save memory 42.
[0070]
In the above description, it has been described that the task switching control signal is given at an appropriate timing. However, for example, by generating the task switching control signal by a self-running counter, it is possible to equally give execution time to each task it can.
[0071]
Also, a preloadable down counter is provided, and a task switching control signal is generated at the timing when the value of the down counter becomes 0, and the preload value is loaded into the down counter when the task switching control signal is generated. With this configuration, the task switching interval can be made variable simply by changing the preload value set in advance.
[0072]
Further, by providing a plurality of registers for holding preload values to be loaded into the down counter and setting in what order these registers are loaded by a program, flexible task switching can be realized.
[0073]
In the above description, the case where the task switch can be predicted in advance has been described. However, even in the external interrupt service, task switching can be executed without time overhead.
[0074]
Although the case where the first save memory 42 is provided in the microprocessor has been described as an example, the present invention is not limited to this. For example, a cache memory (not shown) may be used as the save memory.
[0075]
FIG. 7 is a diagram for explaining the task switching timing operation by the external interrupt service. In the case of this example, since there is an interrupt service at a timing when data saving and data restoration are not executed, it can be handled in the same way as normal task switching.
[0076]
As shown in the figure, when the task 1 data evacuation performed during the execution of task 2 ends at time T32 and then an interrupt control signal input is received from the outside at time T33, the task switching control unit 41 Controls the switch 52 so that the program counter 1-1 is selected from the program counter 1-2 at time T34, and the memory elements 20-1, 21-1, 22-1 and 23-1 of the arithmetic circuit 3 are controlled. The switches 61 to 65 are controlled so as to select each of them. At time T35, the task switching control unit 41 controls the switches 68 and 69 to switch from the register file 4-2 to the path of the register file 4-1.
[0077]
Thereby, the data of the task 3 saved in the first save memory 42 is stored in the program counter 1-1, the storage elements 20-1, 21-1, 22-1 and 23-1, and the register of the arithmetic circuit 3. Each of the files is restored to the file 4-1, the task 3 is executed, and the task 2 that has been executed is interrupted. That is, the contents of the register file 4-1 and the data related to the internal state of the arithmetic circuit 3 in the execution of the task 1 have already been saved in the first save memory 42, so that the task 3 can be executed immediately.
[0078]
At time T38, when data is written back to the register file 4-1 by the stage 15 (when all tasks 2 are discharged), the task switching control unit 41 writes back task 3 to the register file 4-1. As described above, the switch 66 is switched.
[0079]
At the time T40 when the execution of the task 3 of the stage 11 ends, the task switching control unit 41 controls the switches 68 and 69 so as to switch from the register file 4-1 to the path 4-2. As a result, the execution of the task 2 suspended by the interruption is resumed.
[0080]
At time T41, the task switching control unit 41 causes the switches 61 to 65 and the switch 67 to be the “back” program counter 1-1, the storage elements 20-1, 21-1, 22-1 of the arithmetic circuit 3, and 23-1 and the register file 4-1 are selected, and the data saved in the first save memory 42 is stored in the register file 4-1, the program counter 1-1, and the arithmetic circuit 3. It is written and restored in the elements 20-1, 21-1, 22-1 and 23-1.
[0081]
As described above, the program counter 1-1, the storage elements 20-1, 21-1, 22-1 and 23-1, and the register file 4-1 of the arithmetic circuit 3, which are not currently used, are transferred to the interrupted task. Therefore, it is not necessary to save the state of task 2 that has been interrupted and suspended. That is, data saving and data restoration are unnecessary.
[0082]
FIG. 8 is a diagram for explaining a task switching timing operation by another external interrupt service. In this example, an operation when there is an interrupt service during data saving will be described.
[0083]
As shown in the figure, when the input of the interrupt control signal is received from the outside at time T31 in the middle of the data saving performed during the execution of the task 2, the task switching control unit 41 temporarily holds the reception, Wait until data saving is complete.
[0084]
When the data saving performed during the execution of the task 2 is completed at time T32, the task switching control unit 41 receives an input of the interrupt control signal that is suspended at time T33. At time T34, the task switching control unit 41 controls the switch 52 so as to select the program counter 1-1 from the program counter 1-2, and also stores the memory elements 20-1, 21-1, and 22 of the arithmetic circuit 3. The switches 61 to 65 are controlled to select 1 and 23-1. At time T35, the task switching control unit 41 controls the switches 68 and 69 to switch from the register file 4-2 to the path of the register file 4-1.
[0085]
Thereby, the data of the task 3 saved in the first save memory 42 is stored in the program counter 1-1, the storage elements 20-1, 21-1, 22-1 and 23-1, and the register of the arithmetic circuit 3. Each of the files is restored to the file 4-1, the task 3 is executed, and the task 2 that has been executed is interrupted.
[0086]
At time T38, when data is written back to the register file 4-2 by the stage 15 (when all tasks 2 are discharged), the task switching control unit 41 writes back task 3 to the register file 4-1. As described above, the switch 66 is switched. At time T39, the task switching control unit 41 causes the switch 51, the switches 53 to 56, and the switch 70 to be “back”, the program counter 1-2, and the storage elements 20-1, 21-2, and 22 of the arithmetic circuit 3. -2 and 23-2 and the register file 4-2 are selected, respectively, and the program counter 1-2, the storage elements 20-2, 21-2, 22-2 and 23-2 of the arithmetic circuit 3, In addition, the data stored in the register file 4-2 is saved in the first save memory 42.
[0087]
In this way, if an interrupt occurs while saving data, the interrupt control signal reception is suspended until the saving is completed, so that data can be saved reliably and there is no time overhead. Task switching can be executed.
[0088]
FIG. 9 is a diagram for explaining a task switching timing operation by another external interrupt service. In this example, the operation when there is an interrupt service during data restoration will be described.
[0089]
As shown in the figure, when an input of an interrupt control signal is accepted from the outside at time T11 in the middle of data restoration performed during the execution of task 2, the data restoration is stopped, and task switching control is performed at time T12. The unit 41 controls the switch 52 so as to select the program counter 1-1 from the program counter 1-2, and controls the switches 68 and 69 so as to switch the path from the register file 4-2 to the register file 4-1. To do.
[0090]
Thereby, the data of the task 3 saved in the first save memory 42 is stored in the program counter 1-1, the storage elements 20-1, 21-1, 22-1 and 23-1, and the register of the arithmetic circuit 3. Each of the files is restored to the file 4-1, the task 3 is executed, and the task 2 that has been executed is interrupted. Note that the data restored to the middle is overwritten by the interrupted task 3.
[0091]
When the interrupt service ends at time T19, at time T20, the task switching control unit 41 controls the switches 68 and 69 to switch from the register file 4-1 to the path of the register file 4-2. As a result, the suspended task 2 is resumed, and the restoration of the data suspended by the interruption is resumed at time T20.
[0092]
In this way, if an interrupt occurs during data restoration, the restoration is stopped, and when the interruption service ends, the restoration can be performed reliably, and the data can be restored reliably. Task switching can be performed without overhead.
[0093]
As described above, after the data of the back register file that is not used for the operation is saved in the first save memory 42, the data to be executed next is restored from the first save memory 42 there. Thus, task switching can be realized without time overhead for an almost unlimited interrupt service.
[0094]
【The invention's effect】
  According to the microprocessor of the present invention, a plurality of instructions are shifted in a plurality of stages and sequentially executed, thereby being simultaneously operated in parallel.Matching the status of multiple stages to multiple tasksTo remember, every stageIn association with 1 For the systemWhile selecting one of the storage paths provided in at least two systems and executing the first task using the selected storage path,Not used to execute the first taskRegarding the second task held in the memory pathStates in multiple stagesIs saved in the memory, and the third task saved in the memory isStates in multiple stagesIs restored to the other storage path, so that task switching can be realized without time overhead for an almost unlimited interrupt service. By eliminating the overhead, it is possible to efficiently perform high-speed switching of processing having different properties (such as demodulation and error correction) required by software radio.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating an internal configuration example of a conventional microprocessor;
FIG. 2 is a diagram for explaining a task switching timing operation by an interrupt service in the microprocessor of FIG. 1;
FIG. 3 is a diagram illustrating an internal configuration example of another conventional microprocessor;
4 is a diagram for explaining a task switching timing operation by an interrupt service in the microprocessor of FIG. 2; FIG.
FIG. 5 is a block diagram showing an example of the internal configuration of a microprocessor to which the present invention is applied.
6 is a diagram for explaining a task switching timing operation by an interrupt service in the microprocessor of FIG. 5; FIG.
7 is a diagram for explaining a task switching timing operation by an external interrupt service in the microprocessor of FIG. 5; FIG.
8 is a diagram illustrating task switching timing operation by another external interrupt service in the microprocessor of FIG. 5; FIG.
FIG. 9 is a diagram illustrating task switching timing operation by another external interrupt service in the microprocessor of FIG. 5;
[Explanation of symbols]
1-1, 1-2 Program counter, 2 instruction memory, 3 arithmetic circuit, 4-1, 4-2 register file, 5 data memory, 6 data cache, 7 instruction cache, 11 to 15 stages, 20-1, 20 -2, 21-1, 21-2, 22-1, 22-2, 23-1, 23-2 storage element, 41 task switching control unit, 42 first save memory, 43 second save memory, 51 70 switches

Claims (10)

複数のステージから構成され、複数の前記ステージにおいて複数の命令をずらして順次実行することにより、同時に並行してデータを演算する少なくとも1系統の演算手段と、
前記演算手段を構成する複数の前記ステージにおける状態を、複数のタスクに対応させて記憶するために、前記ステージごとに対応付けて、前記演算手段の 1 系統に対して少なくとも2系統設けられる記憶手段と、
第1のタスクが実行される場合、複数の前記ステージにおけるそれぞれの状態を記憶するものとして、少なくとも2系統設けられる前記記憶手段のうち、前記ステージごとにいずれかの前記記憶手段を選択するように制御する制御手段と、
前記制御手段によって選択された前記記憶手段を用いて前記第1のタスクを実行中に、前記第1のタスクの実行に用いられていない前記記憶手段で保持されている第2のタスクに関する複数の前記ステージにおける状態を退避する退避手段と、
前記制御手段によって選択された前記記憶手段を用いて前記第1のタスクを実行中に、前記退避手段に退避されている第3のタスクに関する複数の前記ステージにおける状態を、前記第1のタスクの実行に用いられていない前記記憶手段に復元する復元手段と
を備えることを特徴とするマイクロプロセッサ。
A plurality of stages, and by sequentially executing a plurality of instructions while shifting the plurality of instructions in the plurality of stages, at least one calculation means for calculating data in parallel,
Storage means provided in at least two systems for one system of the computing means in association with each stage in order to store the states in the plurality of stages constituting the computing means in association with a plurality of tasks. When,
If the first task is executed, as storing respective states of the plurality of the stages, of the storage means provided at least two systems, so as to select one of said storage means for each said stage Control means for controlling;
During execution of the first task using said storage means selected by said control means, a plurality of related second task which is held by the first of said storage means is not used for execution of the task Retreating means for retreating the state in the stage ;
While the first task is being executed using the storage means selected by the control means, the states in the plurality of stages related to the third task saved in the saving means are displayed in the first task. A microprocessor comprising: a restoring unit that restores the storage unit that is not used for execution .
前記制御手段は、タスク切り替え制御信号が発生されたとき、現在のタスクの実行に用いられていない前記記憶手段を新たなタスクの複数の前記ステージにおけるそれぞれの状態を記憶するものとして選択するように制御し、前記記憶手段の選択のタイミングは、前記ステージごとに対応付けて設けられているそれぞれの前記記憶手段で異なるように制御する
ことを特徴とする請求項1に記載のマイクロプロセッサ。
When the task switching control signal is generated, the control means selects the storage means that is not used for the execution of the current task as a storage state of each state in the plurality of stages of a new task. 2. The microprocessor according to claim 1 , wherein the timing of selection of the storage means is controlled to be different for each of the storage means provided in association with each stage .
前記制御手段は、外部から割り込み制御信号の入力を受けたとき、現在のタスクの実行に用いられていない前記記憶手段を新たなタスクの複数の前記ステージにおけるそれぞれの状態を記憶するものとして選択するように制御し、前記記憶手段の選択のタイミングは、前記ステージごとに対応付けて設けられているそれぞれの前記記憶手段で異なるように制御する
ことを特徴とする請求項1に記載のマイクロプロセッサ。
When receiving an interrupt control signal from the outside, the control means selects the storage means that is not used for execution of the current task as one for storing the states of the new tasks in the plurality of stages. 2. The microprocessor according to claim 1 , wherein the timing of selecting the storage means is controlled so as to be different for each of the storage means provided in association with each stage .
前記退避手段により前記データを退避している途中で前記割り込み制御信号の入力を受けたとき、前記制御手段は、前記退避手段により前記データの退避が終了するまで前記割り込み制御信号を保留し、前記データの退避が終了したとき、現在のタスクの実行に用いられていない前記記憶手段を新たなタスクの複数の前記ステージにおけるそれぞれの状態を記憶するものとして選択するように制御し、前記記憶手段の選択のタイミングは、前記ステージごとに対応付けて設けられているそれぞれの前記記憶手段で異なるように制御する
ことを特徴とする請求項3に記載のマイクロプロセッサ。
When receiving the input of the interrupt control signal while the data is being saved by the saving means, the control means holds the interrupt control signal until the saving of the data is completed by the saving means, When the saving of data is finished, the storage means that is not used for the execution of the current task is controlled to be selected as the storage state of each state in the plurality of stages of the new task, and the storage means 4. The microprocessor according to claim 3 , wherein the selection timing is controlled so as to be different for each of the storage units provided in association with each stage .
前記復元手段により前記データを復元している途中で前記割り込み制御信号の入力を受けたとき、前記制御手段は、前記データの復元を中止し、現在のタスクの実行に用いられていない前記記憶手段を新たなタスクの複数の前記ステージにおけるそれぞれの状態を記憶するものとして選択するように制御し、前記記憶手段の選択のタイミングは、前記ステージごとに対応付けて設けられているそれぞれの前記記憶手段で異なるように制御する
ことを特徴とする請求項3に記載のマイクロプロセッサ。
When the interrupt control signal is received while the data is being restored by the restoration means, the control means stops the restoration of the data and is not used for execution of the current task. Are selected so as to store the respective states of the new tasks in the plurality of stages , and the storage means is selected in correspondence with the respective storage means provided for each stage. 4. The microprocessor according to claim 3, wherein the microprocessors are controlled differently .
前記記憶手段は、レジスタファイルをさらに含む
ことを特徴とする請求項1に記載のマイクロプロセッサ。
The microprocessor according to claim 1, wherein the storage unit further includes a register file.
前記記憶手段は、プログラムカウンタをさらに含む
ことを特徴とする請求項1に記載のマイクロプロセッサ。
The microprocessor according to claim 1, wherein the storage unit further includes a program counter.
前記退避手段を複数有し、それらが相互に連結されている
ことを特徴とする請求項1に記載のマイクロプロセッサ。
The microprocessor according to claim 1, wherein a plurality of the evacuation units are provided and connected to each other.
前記退避手段をマイクロプロセッサ外部に存在するメモリ及び前記1系統の演算手段と接続し、
前記退避手段を前記マイクロプロセッサ外部に存在するメモリのキャッシュとして動作させる
ことを特徴とする請求項1に記載のマイクロプロセッサ。
Connecting the evacuation means to a memory outside the microprocessor and the one-system arithmetic means;
The microprocessor according to claim 1, wherein the saving unit is operated as a cache of a memory existing outside the microprocessor.
前記退避手段をマイクロプロセッサ外部に存在するメモリ及び前記1系統の演算手段と接続し、
前記退避手段を前記マイクロプロセッサ外部に存在するメモリの代用として動作させる
ことを特徴とする請求項1に記載のマイクロプロセッサ。
Connecting the evacuation means to a memory outside the microprocessor and the one-system arithmetic means;
The microprocessor according to claim 1, wherein the saving unit is operated as a substitute for a memory existing outside the microprocessor.
JP2002220714A 2001-08-28 2002-07-30 Microprocessor Expired - Fee Related JP3767529B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002220714A JP3767529B2 (en) 2001-08-28 2002-07-30 Microprocessor

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2001257968 2001-08-28
JP2001-257968 2001-08-28
JP2002220714A JP3767529B2 (en) 2001-08-28 2002-07-30 Microprocessor

Publications (2)

Publication Number Publication Date
JP2003150390A JP2003150390A (en) 2003-05-23
JP3767529B2 true JP3767529B2 (en) 2006-04-19

Family

ID=26621120

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002220714A Expired - Fee Related JP3767529B2 (en) 2001-08-28 2002-07-30 Microprocessor

Country Status (1)

Country Link
JP (1) JP3767529B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4204522B2 (en) 2004-07-07 2009-01-07 株式会社東芝 Microprocessor
KR100770034B1 (en) 2006-03-02 2007-10-26 삼성전자주식회사 Method and system for providing context switch using multiple register file

Also Published As

Publication number Publication date
JP2003150390A (en) 2003-05-23

Similar Documents

Publication Publication Date Title
US7836291B2 (en) Method, medium, and apparatus with interrupt handling in a reconfigurable array
JP4610593B2 (en) Dual thread processor
KR100280460B1 (en) Data processing device and its multiple thread processing method
JP3573943B2 (en) Apparatus for dispatching instructions for execution by a multithreaded processor
JP3253303B2 (en) Context switching apparatus and method
US20050108711A1 (en) Machine instruction for enhanced control of multiple virtual processor systems
EP1416376A2 (en) Multi-threaded embedded processor having deterministic instruction memory
WO2011155097A1 (en) Instruction issue and control device and method
WO2007002408A2 (en) Computer processor pipeline with shadow registers for context switching, and method
JP2004171573A (en) Coprocessor extension architecture built by using novel splint-instruction transaction model
US11392407B2 (en) Semiconductor device
US7761688B1 (en) Multiple thread in-order issue in-order completion DSP and micro-controller
US7447887B2 (en) Multithread processor
US6675290B1 (en) Processor for improving instruction utilization using multiple parallel processors and computer system equipped with the processor
JP2008152409A (en) Semiconductor integrated circuit
JP5316407B2 (en) Arithmetic processing device and control method of arithmetic processing device
US7340591B1 (en) Providing parallel operand functions using register file and extra path storage
JP3767529B2 (en) Microprocessor
US7191313B2 (en) Microprocessor
US9342312B2 (en) Processor with inter-execution unit instruction issue
JP2004038751A (en) Processor and instruction control method
JP2007200106A (en) Data processor, control method, and program
WO2009026221A2 (en) Stall-free pipelined cache for statically scheduled and dispatched execution
US20040128484A1 (en) Method and apparatus for transparent delayed write-back
US20030014474A1 (en) Alternate zero overhead task change circuit

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040817

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041029

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041227

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050721

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050902

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060123

LAPS Cancellation because of no payment of annual fees