JP3789320B2 - Vector processing apparatus and overtaking control method using the same - Google Patents
Vector processing apparatus and overtaking control method using the same Download PDFInfo
- Publication number
- JP3789320B2 JP3789320B2 JP2001176946A JP2001176946A JP3789320B2 JP 3789320 B2 JP3789320 B2 JP 3789320B2 JP 2001176946 A JP2001176946 A JP 2001176946A JP 2001176946 A JP2001176946 A JP 2001176946A JP 3789320 B2 JP3789320 B2 JP 3789320B2
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- overtaking
- store
- bit
- load
- 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 - Lifetime
Links
- 238000000034 method Methods 0.000 title claims description 20
- 230000004044 response Effects 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 8
- 230000000694 effects Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 238000003491 array Methods 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
Images
Landscapes
- Advance Control (AREA)
- Complex Calculations (AREA)
- Devices For Executing Special Programs (AREA)
- Memory System (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、ベクトル処理装置及び該装置を用いた追い越し制御方法に関し、特に、メモリアクセス系命令の追い越し制御機能を有するベクトル処理装置及び該装置を用いた追い越し制御方法に関する。
【0002】
【従来の技術】
一般に、命令処理の高速化を目的としたベクトル処理方式においては、メモリアクセス系の命令で先行するストア命令の領域に後続に発行されるロード系の命令のアクセス領域が重なっていない場合、後続のロード系命令のメモリアクセスを先に実行させ、メモリアクセスの高速化を図るというベクトルストア追い越し制御方式が行われている。
【0003】
従来のこの種のベクトルストア命令追い越し制御は、例えば、特開平9−231203号公報に記載されているように、リクエスト受付時にメモリをアクセスするアドレス、及び領域が判明しているようなベクトルストア命令とロード系命令が追い越し制御の対象になっている。
【0004】
【発明が解決しようとする課題】
しかしながら、従来のメモリアクセス系命令の追い越し制御機能を有しているベクトル処理装置においては、次のような課題がある。
【0005】
その一つは、先行命令がリストベクトルストア命令の場合には、追い越し制御処理時にはメモリをアクセスするアドレス領域が不明であるため、後続のロード系命令とのアドレス領域の重なりをチェックすることができないので、後続のロード系命令は先行するリストベクトルストア命令を追い越して処理できないということである。
【0006】
また、例えば、特開昭61−100845号公報に記載されているように、ソフトウェアでメモリアクセス順序の同期処理をPOST命令、およびWAIT命令によって制御するような追い越し制御方式によってメモリアクセスの高速化を図っている場合もある。この場合は、先行ストア系命令と後続ロード系命令の追い越し制御機能をハードウェアで有していないため、ソフトウェアで先行ストア命令と後続ロード命令のアドレス参照関係が認識できない場合は先行ベクトルストア命令と後続ロード系命令の参照アドレス領域が一致していない場合でも追い越しができないということである。
【0007】
本発明は、上記問題点に鑑みてなされたものであって、その主たる目的は、先行ストア系命令と後続ロード系命令の追い越し制御を的確に行い、プログラム処理の高速化を図ることができるベクトル処理装置及び該装置を用いた追い越し制御方法を提供することにある。
【0008】
【問題を解決するための手段】
上記目的を達成するため、本発明のベクトル処理装置は、先行するストア系命令と後続のロード系命令との追い越し制御を行うベクトル処理装置であって、前記ストア系命令及び前記ロード系命令の命令語中に、メモリアクセスのアドレス領域のプログラム上での重なりの有無に応じて所定の値が設定される追い越しビットを設定し、前記ストア系命令がリストベクトルストア命令である場合に、前記追い越しビットを参照して追い越し制御が行われるものである。
【0009】
また、本発明のベクトル処理装置は、先行するストア系命令と後続のロード系命令との追い越し制御を行うベクトル処理装置であって、ソフトウェアが命令語生成時に、前記ストア系命令及び前記ロード系命令のプログラム上でのアドレス領域の重なりの有無に応じて所定の値が設定される追い越しビットを参照して前記後続のロード系命令の追い越し制御を行う第1の追い越し判定手段と、前記ストア系命令及び前記ロード系命令のアドレス領域を計算し、計算した前記アドレス領域の重なりを参照して追い越し制御を行う第2の追い越し判定手段と、を少なくとも有するものである。
【0010】
本発明においては、前記ストア系命令がリストベクトルストア命令の場合は、前記第1の追い越し判定手段によって追い越しの可否が判定され、前記ストア系命令がベクトルストア命令の場合は、前記第2の追い越し判定手段によって追い越しの可否が判定されることが好ましい。
【0011】
また、本発明においては、前記先行ストア命令と前記後続ロード命令の前記アドレス領域のプログラム上での重なりがないことが判明している場合に、前記追い越しビットに”1”が設定され、前記アドレス領域が重なる場合、あるいは重なりが判別できない場合に、前記追い越しビットに”0”が設定され、前記追い越しビットの値が”1”の場合のみ、該追い越しビットに基づく追い越し判定が”追い越し可能”となる構成とすることができる。
【0012】
また、本発明においては、前記ベクトル処理装置に、命令発行部と、該命令発行部から発行されたリクエストを受け付けるリクエスト受付手段と、該リクエスト受付手段で振り分けられたストア系命令とロード系命令とを各々保持するストア系命令保持手段及びロード系命令保持手段と、前記ストア系命令及び前記ロード系命令のアクセス領域を計算するアクセス領域計算手段と、該アクセス領域計算手段の計算結果に基づいてアクセス領域の重なりを判定するアドレス領域判定手段と、前記ストア系命令及び前記ロード系命令に含まれる前記追い越しビットを抽出する追い越しビット判定手段と、前記アドレス領域判定手段及び前記追い越しビット判定手段の判定結果を参照して追い越し判定を行う追い越しチェック判定手段と、を備える構成とすることもできる。
【0013】
また、本発明においては、前記追い越しビットに代えて、前記ストア系命令及び前記ロード系命令の命令語毎に判定テーブルを設け、該判定テーブルを参照して追い越し制御が行われる構成とすることもできる。
【0014】
本発明の追い越し制御方法は、ベクトル処理装置における先行するストア系命令と後続のロード系命令との追い越し制御方法において、前記ストア系命令及び前記ロード系命令におけるメモリアクセスのアドレス領域のプログラム上での重なりを判断するステップと、前記ストア系命令及び前記ロード系命令の命令語中に予め設けられた追い越しビットに、前記アドレス領域の重なりの有無に応じて所定の値を設定するステップと、前記ストア系命令がリストベクトルストア命令の場合に、前記追い越しビットを参照して追い越し判定を行うステップとを少なくとも有するものである。
【0015】
また、本発明の追い越し制御方法は、ベクトル処理装置における先行するストア系命令と後続のロード系命令との追い越し制御方法において、ソフトウェアが命令語生成時に、前記ストア系命令及び前記ロード系命令のプログラム上でのアドレス領域の重なりを判断し、前記命令語中に予め設けられた追い越しビットに、前記アドレス領域の重なりの有無に応じて所定の値を設定するステップと、前記ストア系命令がリストベクトルストア命令の場合に、該追い越しビットを参照して前記後続のロード系命令の追い越し判定を行うステップと、前記ストア系命令がベクトルストア命令の場合に、各々の命令のアドレス領域を計算するステップと、計算した前記アドレス領域の重なりを参照して追い越し判定を行うステップと、を少なくとも有するものである。
【0016】
このように、本発明は上記構成により、先行するリストベクトルストア命令と後続のロード系命令のアドレス領域が重ならない場合に後続ロード系命令を先行して処理することができ、プログラム処理の高速化を図ることができる。
【0017】
【発明の実施の形態】
本発明に係るベクトル処理装置は、その好ましい一実施の形態において、先行するストア系命令と後続に発行されるロード系命令のアクセスするアドレス領域を比較し、アドレス領域が重なっていない場合は後続のロード系命令のメモリアクセスを先に実行する命令追い越し制御手段を備えるベクトル処理装置において、命令語中に追い越しビットを設け、ソフトウェア(コンパイラ)によって命令語を生成する際に先行ストア命令と後続ロード命令のアクセスするアドレス領域がプログラム上重ならないことがわかっている場合に該追い越しビットを1にセットし、両アドレス領域の重なっている場合、あるいは重なりが判別できない場合は該ビットを0にセットし、該ビットを判別し後続ロード系命令の追い越しの可否を判定する追い越しビット判定手段を設けるものである。以下、本発明の一構成例を示す図1を参照して説明する。
【0018】
図1に示すように、命令発行部1から発行されたメモリアクセス系命令はリクエスト受付レジスタ2で受け付け、受け付けた命令がストア系命令の場合はストア命令保持レジスタ3に、また、受け付けた命令がロード系命令の場合はロード命令保持レジスタ4に保持する。アクセス領域計算手段6は、ストア命令保持レジスタ3から送出されるベクトルストア命令と、ロード命令保持レジスタ4から送出されるロード系命令のアドレス領域計算を行う。領域保持手段7、8は、アクセス領域計算手段6により領域計算をおこなったアドレス領域を保持する。この場合、領域保持レジスタ7にはベクトルストア命令のアドレスを、また領域保持レジスタ8にはロード系命令のアドレスを保持する。アドレス領域判定手段9は、領域保持レジスタ7に保持されているベクトルストア命令のアドレス領域と、領域保持レジスタ8に保持されているロード系命令のアドレス領域を比較し、ロード系命令がベクトルストア命令を追い越すことができるかどうかアドレス領域を判定する。
【0019】
また、ストア命令保持レジスタ3に保持された命令の命令語中の追い越し指示ビットを追い越しビット判定手段10に送出し、ロード命令保持レジスタ4に保持されたロード系命令の追い越し指示ビットも追い越しビット判定手段10に送出する。追い越しビット判定手段10は、送出された追い越し指示ビットを比較し、ロード系命令がリストベクトルストア命令を追い越すことができるかどうかを判定する。この命令語中の追い越し指示ビットは、ソフトウェアにより命令語作成の際に設定され、先行リストベクトルストア命令と後続ロード系命令のアドレス領域がプログラム上重ならないことが判明している場合に追い越しビットが有効になる。追い越しチェック判定11は、アドレス領域判定手段9と追い越しビット判定手段10の判定結果から先行するストア系命令を後続のロード系命令が追い越せるかどうかを決定する。
【0020】
一方、命令パイプライン保持手段5は、ロード命令保持レジスタ4から送出されるロード命令を、アクセス領域計算手段6、アドレス領域判定手段9、追い越しビット判定手段10、及び追い越しチェック判定手段11によってアドレス計算や追い越しチェック判定を行っている間、パイプラインで保持する。
【0021】
選択手段12は、リクエスト受付レジスタ2から送出されるロード系命令と、ロード命令保持レジスタ4から送出されるロード系命令と、ストア命令保持レジスタ3から送出されるストア系命令の中から、追い越しチェック判定手段11により追い越しが可能かどうかの制御信号により1つを選択するセレクタである。
【0022】
このようにして、本願発明では、ソフトウェアで先行するリストベクトルストア命令と後続のロード系命令の追い越しの可否を命令語中の追い越しビットで指定し、追い越しビット判定手段10では、追い越しビットを判定して追い越しの可否を決定し、追い越し可能な場合は先行するリストベクトルストア命令を後続のロード系命令が追い越して処理することができるため、ベクトル命令列を高速に処理することができる。
【0023】
【実施例】
上記した本発明の実施の形態についてさらに詳細に説明すべく、本発明の実施例について図1乃至図4を参照して説明する。図1は、本発明の一実施例に係るベクトル処理装置の構成を示すブロック図であり、図2は、命令語の構成を示す図である。また、図3は、各命令におけるアドレス領域の計算方法を説明するための図であり、図4は、本実施例のプログラムソースコードの一例を示す図である。
【0024】
まず、図1を参照して本実施例のベクトル処理装置の各構成要素について説明する。リクエスト受付レジスタ2は、命令発行部1から発行されたメモリアクセス系命令を信号線100を介して受け取る。リクエスト受付レジスタ2で受け付けた命令がストア系命令の場合(この判断回路は図示省略)は、信号線101を介してストア命令保持レジスタ3で保持される。また、リクエスト受付レジスタ2で受け付けた命令がロード系命令の場合は、信号線101を介してロード命令保持レジスタ4に保持されるが、ストア命令保持レジスタ3にストア命令が保持されていない場合は、ロード命令保持レジスタ4には格納せずに後述する選択手段12に命令を送出する。
【0025】
アクセス領域計算手段6は、信号線102を介してストア命令保持レジスタ3から送出されるベクトルストア命令と、信号線103を介してロード命令保持レジスタ4から送出されるロード系命令のメモリアクセスのアドレス領域を計算する。このアドレス領域計算において、アドレス領域の最終アドレスは、図3に示すように、各命令における{先頭アドレス+(ベクトル要素−1)×ベクトル要素間ディスタンス+要素長}で計算される。また、ロード系命令がスカラ命令の場合は、ベクトル要素=1で計算される。
【0026】
つまり、先頭アドレスから最終アドレスまでが各命令におけるアドレス領域となる。ここで、アクセス領域計算手段6は、ストア命令保持レジスタ3から送出された命令がリストベクトルストア命令の場合、アドレス領域計算は行わずに領域計算の結果を“0”にする。
【0027】
領域保持レジスタ7は、アクセス領域計算手段6により領域計算を行ったベクトルストア命令のアドレス領域を信号線104を介して保持する。また、領域保持レジスタ8は、信号線105を介して、後続のベクトルロード命令のアドレス領域を保持する。アドレス領域判定手段9は、信号線106を介して送出される領域保持レジスタ7に保持したベクトルストア命令のアドレス領域と、信号線107を介して送出される領域保持レジスタ8に保持したロード系命令のアドレス領域とを比較し、後続ロード系命令がベクトルストア命令を追い越すことができるかどうかを判定し、追い越しが可能な場合は、信号線108を介して追い越しチェック判定手段11に“1”を送出し、追い越しが不可能な場合は“0”を送出する。また、アドレス領域判定手段9は、領域保持レジスタ7から送出された値が“0”の場合、つまりリストベクトルストア命令の場合は、“0”を追い越しチェック判定手段11に送出する。
【0028】
また、ストア命令保持レジスタ3はレジスタ内の命令語(命令語については後述)中の命令を示すオペコード(OP)と追い越し指示ビットを、信号線109を介して追い越しビット判定手段10に送出し、ロード命令保持レジスタ4はレジスタ内の命令語中の命令を示すオペコード(OP)と追い越し指示ビットを、信号線110を介して追い越しビット判定手段10に送出する。追い越しビット判定手段10は、信号線109、110を介して受け取ったオペコード(OP)と追い越し指示ビットを比較し、後続ロード系命令が先行するストア系命令を追い越せるかどうかを判定し、追い越しが可能な場合は、信号線111を介して追い越しチェック判定手段11に“1”を送出し、追い越しが不可能な場合は“0”を送出する。また、ストア命令保持レジスタ3から送出されたオペコードがベクトルストア命令を示す場合は、追い越しチェック判定手段11には“0”を送出する。
【0029】
追い越しチェック判定手段11は、アドレス領域判定手段9及び追い越しビット判定手段10から送出される追い越し判定結果から、どちらかの判定結果が“1”の場合には先行するストア系命令を後続のロード系命令が追い越せると判定し、両方の判定結果が“0”の場合には後続のロード系命令が追い越せないと判定する。判定結果は信号線112を介して選択手段12に送出される。
【0030】
一方、命令パイプライン保持手段5は、ロード命令保持レジスタ4から送出されるロード命令をアクセス領域計算手段6、アドレス領域判定手段9、追い越しビット判定手段10及び追い越しチェック判定手段11によってアドレス領域計算や追い越しチェック判定を行っている間、パイプラインで保持する。ここではアドレス領域計算、追い越しチェック判定までに4Tかかると仮定し、命令パイプライン保持手段5は4段のレジスタ構成としている。
【0031】
選択手段12は、リクエスト受付レジスタ2から送出されるロード系命令と、ロード保持レジスタ4から命令パイプライン保持手段5を経由して送出されるロード系命令と、ストア命令保持レジスタ3から送出されるストア系命令の中から、追い越しチェック判定手段11からの制御信号112を参照して1つの命令を選択し、信号線113を介して選択されたメモリリクエスト命令を送出する。すなわち、選択手段12は、制御信号が“0”の場合は、追い越し不可を示すためストア系命令を選択し、制御信号が“1”の場合は追い越し可能を示すためロード系命令を選択する。
【0032】
次に、図2を用いて命令語について説明する。図2(a)は、ベクトルロード命令、及びベクトルストア命令の命令語の一部を示している。命令語200は、OP201、追い越し指示ビット202、先頭アドレス203、及びベクトル要素間ディスタンス204などで構成されている。OP201では命令の種類、例えばベクトルロード命令を指定する。追い越し指示ビット202は、ソフトウェア(コンパイラ)が命令語生成時に設定し、命令がロード系命令の場合に、先行するリストベクトルストア命令と該ロード系命令のアドレス領域がプログラム的に重ならないことが判明している場合に追い越し可能であることをフラグとして設定する。例えば、アドレス領域が重ならないことが判明している場合は追い越し指示ビットには“1”を、判明していない場合は追い越し指示ビットには“0”を設定する。
【0033】
また、図2(b)は、リストベクトルストア命令の命令語の一部を示している。命令語210は、OP211、追い越し指示ビット212、メモリをアクセスするアドレスが格納されているベクトルレジスタを示すVR213などで構成されている。追い越し指示ビット212も図2(a)での命令語と同様に、ソフトウェア(コンパイラ)が制御しており、該リストベクトル命令でアクセスするアドレス領域と後続ロード系命令でアクセスするアドレス領域が重ならないことが判明している場合、後続ロード系命令は追い越し可能であることを指定し、アドレス領域が重ならないかどうか判明していない場合は、後続ロード系命令は追い越し不可能であることを指定する。
【0034】
追い越しビット判定手段10は、ストア命令保持レジスタ3内のストア系命令と、ロード命令保持レジスタ4内のロード系命令のオペコード、及び追い越し指示ビットを比較する。ストア命令保持レジスタ3からのストア系命令のオペコードがリストベクトルストア命令を示しており、かつストア系命令とロード系命令の両者の追い越し指示ビットが“1”の場合は、追い越し可能と判断し判定結果として追い越し可能であることを示す“1”を追い越しチェック判定手段11に送出し、両者の追い越し指示ビットのうちどちらか片方でも“0”の場合は、追い越し不可能と判断し判定結果として追い越し不可能であることを示す“0”を追い越しチェック判定手段11に送出する。また、ストア命令保持レジスタ3から送出されたストア系命令のオペコードがベクトルストア命令を示している場合は、追い越し指示ビットの内容に関わらず、判定結果として追い越しチェック判定手段11には“0”を送出する。この場合は、後続ロード系命令の追い越しの可否はアドレス領域判定手段9での判定結果に依存することになる。
【0035】
以上詳細に実施例の構成を述べたが、上記実施例では、追い越される対象となるストア系命令を1個としているが、任意の個数nであってもよい。その場合には、ベクトルストア命令保持レジスタはn個となり、領域保持レジスタも(n+1)個となる。また、命令語中の追い越し指示ビット数もnビット用意する必要がある。
【0036】
また、上記実施例では、ソフトウェアでの追い越し判定結果を命令語中のビットで指示しているが、命令語毎に判定テーブルを用意し、追い越しビット判定手段10は該テーブルの内容にしたがって追い越しの可否の判定をすることも可能である。
【0037】
次に、図4を用いて、ソフトウェア(コンパイラ)での追い越しの可否の判定例を説明する。
【0038】
図4は、フォートランソースコードのDOループの一例である。2行目の左辺の処理:A(L(I))がリストベクトルストア命令で処理されることを意味する。コンパイラはこれらの式を機械語(命令語)レベルに翻訳し、例えば、図4(a)で示されるコードは、図4(c)のような命令列に翻訳される。ここで、図4(c)の(5)のリストベクトルストア命令(VSC)と(6)のベクトルロード命令(VLD)で扱う配列をみてみると、VSC命令でアクセスする配列はAという配列であり、VLD命令でアクセスする配列はDという配列であることがわかる。コンパイラはこの配列をチェックし、この場合は別の配列をアクセスすることから先行するVSC命令と後続のVLD命令のアドレス領域は重ならないことが判明するので、両命令の追い越し指示ビットには“1”を設定する。
【0039】
また、図4(b)で示されるコードの命令列例を図4(d)に示す。この場合、図4(d)の(5)のVSC命令と(6)のVLD命令で扱う配列をみてみると、両者ともAという配列になっていることがわかる。コンパイラはこの配列をチェックし、(6)のVLD命令は(5)のVSC命令よりも先に処理をすることはできないことがわかるので、両命令の追い越し指示ビットには“0”を設定する。
【0040】
このように本実施例のベクトル処理装置及び該装置を用いた追い越し制御方法によれば、アクセス領域計算手段6、アドレス領域判定手段9等により、ベクトルストア命令とロード系命令の追い越し可否を判定すると共に、命令語中に追い越しビットを設け、ソフトウェア上でリストベクトルストア命令と後続のロード系命令の追い越し可否を判定することにより、的確にストア系命令とロード系命令の追い越し制御を行うことができ、プログラムの処理を高速化することができる。
【0041】
【発明の効果】
以上説明したように、本発明のベクトル処理装置及び該装置を用いた追い越し制御方法によれば、以下記載の効果を奏する。
【0042】
本発明の第1の効果は、ソフトウェアで先行するリストベクトルストア命令と後続のベクトルロード命令でアクセスするアドレス領域の重なりをチェックしており、その情報を元に追い越しビット判定手段で後続ロード系命令の追い越しの制御をしているので、先行するリストベクトルストア命令の処理を待たずに後続のロード系命令が追い越して処理でき、プログラムの処理を高速化できるということである。
【0043】
また、本発明の第2の効果は、アクセス領域計算手段、及びアドレス領域判定手段を備えることによってベクトルストア命令とロード系命令のアドレス領域計算と該情報から追い越しの可否を判定しており、ベクトルストア命令とロード系命令の追い越しの判定はソフトウェアでアドレス領域の重なりをチェックしていないので、ソフトウェアでは追い越しの可否が判定できないようなケースでも先行するベクトルストア命令を後続のロード系命令が追い越して処理できるようになり、プログラムの処理を高速化できるということである。
【図面の簡単な説明】
【図1】本発明の一実施例に係るベクトル処理装置の構成を示すブロック図である。
【図2】本発明の一実施例に係る命令語の構成を示す図であり、(a)はベクトルロード/ストア命令語、(b)はリストベクトルストア命令語を示す図である。
【図3】本発明の一実施例に係るアドレス領域の計算方法を説明するための図である。
【図4】本発明の一実施例に係るプログラムのソースコードの一部を示す図である。
【符号の説明】
1 命令発行部
2 リクエスト受付レジスタ
3 ストア命令保持レジスタ
4 ロード命令保持レジスタ
5 命令パイプライン保持手段
6 アクセス領域計算手段
7、8 領域保持レジスタ
9 アドレス領域判定手段
10 追い越しビット判定手段
11 追い越しチェック判定手段
12 選択手段
100〜113 信号線
200 命令語
201 オペコード
202 追い越し指示ビット
203 先頭アドレス
204 要素間ディスタンス
210 命令語
211 オペコード
212 追い越し指示ビット
213 ベクトルレジスタ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a vector processing apparatus and an overtaking control method using the apparatus, and more particularly to a vector processing apparatus having a memory access system instruction overtaking control function and an overtaking control method using the apparatus.
[0002]
[Prior art]
In general, in the vector processing method for the purpose of speeding up the instruction processing, if the access area of the load instruction issued subsequently to the area of the store instruction preceding the memory access instruction does not overlap, A vector store overtaking control system in which memory access of a load instruction is executed first to increase the speed of memory access is performed.
[0003]
This type of conventional vector store instruction overtaking control is, for example, a vector store instruction in which the address and area for accessing the memory at the time of receiving a request are known, as described in JP-A-9-231203. And load instructions are subject to overtaking control.
[0004]
[Problems to be solved by the invention]
However, the conventional vector processing apparatus having the overtaking control function for memory access instructions has the following problems.
[0005]
One is that when the preceding instruction is a list vector store instruction, the address area for accessing the memory is unknown during the overtaking control process, so it is not possible to check the overlap of the address area with the subsequent load instructions. Therefore, the subsequent load system instruction cannot process the preceding list vector store instruction.
[0006]
For example, as described in Japanese Patent Application Laid-Open No. 61-1000084, the memory access speed can be increased by an overtaking control system in which the memory access order synchronization processing is controlled by software using a POST instruction and a WAIT instruction. In some cases. In this case, since the hardware does not have an overtaking control function for the preceding store instruction and the subsequent load instruction, if the software cannot recognize the address reference relationship between the preceding store instruction and the subsequent load instruction, This means that even if the reference address areas of subsequent load instructions do not match, overtaking is not possible.
[0007]
The present invention has been made in view of the above-mentioned problems, and its main purpose is a vector capable of accurately overtaking control of a preceding store instruction and a succeeding load instruction to speed up program processing. It is an object of the present invention to provide a processing apparatus and an overtaking control method using the apparatus.
[0008]
[Means for solving problems]
In order to achieve the above object, a vector processing apparatus according to the present invention is a vector processing apparatus that performs overtaking control of a preceding store system instruction and a subsequent load system instruction, wherein the store system instruction and the load system instruction In the word, an overtaking bit is set in which a predetermined value is set in accordance with the presence or absence of overlapping of the memory access address area on the program, and the overtaking bit is set when the store instruction is a list vector store instruction The overtaking control is performed with reference to FIG.
[0009]
The vector processing device of the present invention is a vector processing device that performs overtaking control of a preceding store system instruction and a subsequent load system instruction, and when the software generates an instruction word, the store system instruction and the load system instruction First overtaking determination means for performing overtaking control of the subsequent load system instruction with reference to an overtaking bit set to a predetermined value according to the presence or absence of overlapping address areas on the program, and the store system instruction And at least second overtaking determination means for calculating an address area of the load-related instruction and performing overtaking control with reference to the overlap of the calculated address areas.
[0010]
In the present invention, when the store system instruction is a list vector store instruction, the first overtaking determination unit determines whether or not overtaking is possible. When the store system instruction is a vector store instruction, the second overtaking is performed. It is preferable to determine whether the overtaking is possible or not by the determining means.
[0011]
In the present invention, when it is found that the preceding store instruction and the subsequent load instruction do not overlap on the program in the address area , the overtaking bit is set to “1”, and the address When the areas overlap or the overlap cannot be determined, the overtaking bit is set to “0”, and the overtaking determination based on the overtaking bit is “overtaking possible” only when the overtaking bit value is “1”. It can be set as the structure which becomes.
[0012]
Further, in the present invention, the vector processing device includes an instruction issuing unit, a request receiving unit that receives a request issued from the instruction issuing unit, a store instruction and a load instruction distributed by the request receiving unit, Store system instruction storage means and load system instruction storage means, access area calculation means for calculating access areas of the store system instructions and load system instructions, and access based on the calculation result of the access area calculation means Determination results of address area determination means for determining overlap of areas, overtaking bit determination means for extracting the overtaking bits included in the store instructions and the load instructions, and determination results of the address area determination means and the overtaking bit determination means And overtaking check determination means for performing overtaking determination with reference to It can also be formed.
[0013]
In the present invention, instead of the overtaking bit, a determination table may be provided for each instruction word of the store system instruction and the load system instruction, and the overtaking control may be performed with reference to the determination table. it can.
[0014]
The overtaking control method according to the present invention is an overtaking control method of a preceding store system instruction and a subsequent load system instruction in a vector processing apparatus, wherein the store system instruction and the load system instruction in a memory access address area on a program Determining an overlap; setting a predetermined value in an overtaking bit provided in advance in an instruction word of the store-related instruction and the load-related instruction according to whether or not the address area overlaps; And a step of determining overtaking by referring to the overtaking bit when the system instruction is a list vector store instruction.
[0015]
Further, the overtaking control method of the present invention is an overtaking control method of a preceding store system instruction and a subsequent load system instruction in the vector processing device, wherein the software stores the store system instruction and the load system instruction when the instruction word is generated. Determining whether the address area overlaps, and setting a predetermined value in an overtaking bit provided in advance in the instruction word in accordance with whether or not the address area overlaps; In the case of a store instruction, referring to the overtaking bit to perform overtaking determination of the subsequent load system instruction; and in the case where the store system instruction is a vector store instruction, calculating an address area of each instruction; And performing the overtaking determination with reference to the calculated overlap of the address areas. Is shall.
[0016]
As described above, according to the present invention, when the address area of the preceding list vector store instruction and the subsequent load system instruction do not overlap with each other, the subsequent load system instruction can be processed in advance, thereby speeding up the program processing. Can be achieved.
[0017]
DETAILED DESCRIPTION OF THE INVENTION
In a preferred embodiment, the vector processing device according to the present invention compares an address area accessed by a preceding store instruction and a load instruction issued subsequently, and if the address areas do not overlap, In a vector processing apparatus having an instruction overtaking control means for executing memory access of a load-related instruction first, an overtaking bit is provided in the instruction word, and when the instruction word is generated by software (compiler), a preceding store instruction and a subsequent load instruction Set the overtaking bit to 1 when it is known that the address area to be accessed does not overlap in the program, and set the bit to 0 when both address areas overlap or the overlap cannot be determined, Override to determine whether the subsequent load instructions can be overtaken by determining the bit It is intended to provide a bit determination unit. A description will be given below with reference to FIG.
[0018]
As shown in FIG. 1, the memory access system instruction issued from the instruction issuing unit 1 is received by the request reception register 2, and when the received instruction is a store system instruction, it is stored in the store instruction holding register 3, and the received instruction is In the case of a load instruction, it is held in the load
[0019]
Further, the overtaking instruction bit in the instruction word of the instruction held in the store instruction holding register 3 is sent to the overtaking
[0020]
On the other hand, the instruction pipeline holding means 5 calculates the address of the load instruction sent from the load
[0021]
The selection means 12 performs an overtaking check from among the load system instruction sent from the request reception register 2, the load system instruction sent from the load
[0022]
In this way, in the present invention, whether or not the list vector store instruction preceded by software and the subsequent load system instruction are to be overtaken is specified by the overtaking bit in the instruction word, and the overtaking
[0023]
【Example】
In order to describe the above-described embodiment of the present invention in more detail, an example of the present invention will be described with reference to FIGS. FIG. 1 is a block diagram showing a configuration of a vector processing apparatus according to an embodiment of the present invention, and FIG. 2 is a diagram showing a configuration of an instruction word. FIG. 3 is a diagram for explaining a method of calculating an address area in each instruction, and FIG. 4 is a diagram illustrating an example of a program source code of the present embodiment.
[0024]
First, each component of the vector processing apparatus of this embodiment will be described with reference to FIG. The request reception register 2 receives a memory access system command issued from the command issuing unit 1 via the
[0025]
The access area calculation means 6 is a memory access address of the vector store instruction sent from the store instruction holding register 3 via the
[0026]
That is, the address area in each instruction is from the first address to the last address. Here, when the instruction sent from the store instruction holding register 3 is a list vector store instruction, the access area calculation means 6 sets the result of the area calculation to “0” without performing the address area calculation.
[0027]
The area holding register 7 holds the address area of the vector store instruction that has been subjected to area calculation by the access area calculation means 6 via the signal line 104. The
[0028]
The store instruction holding register 3 sends an opcode (OP) indicating an instruction in an instruction word in the register (the instruction word will be described later) and an overtaking instruction bit to the overtaking bit determination means 10 via the
[0029]
The overtaking check determination unit 11 determines that the preceding store instruction is the subsequent load system when either determination result is “1” based on the overtaking determination result sent from the address area determination unit 9 and the overtaking
[0030]
On the other hand, the instruction pipeline holding means 5 performs an address area calculation and an access area calculation means 6, an address area determination means 9, an overtaking bit determination means 10 and an overtaking check determination means 11 for the load instruction sent from the load
[0031]
The selection means 12 is sent from the load instruction sent from the request reception register 2, the load instruction sent from the
[0032]
Next, the instruction word will be described with reference to FIG. FIG. 2A shows part of the instruction words of the vector load instruction and the vector store instruction. The instruction word 200 includes an
[0033]
FIG. 2B shows a part of the instruction word of the list vector store instruction. The instruction word 210 includes an
[0034]
The overtaking bit determination means 10 compares the store instruction in the store instruction holding register 3 with the opcode of the load instruction in the load
[0035]
Although the configuration of the embodiment has been described in detail above, in the above-described embodiment, the number of store instructions to be overtaken is one, but any number n may be used. In that case, there are n vector store instruction holding registers and (n + 1) area holding registers. Also, it is necessary to prepare n bits of overtaking instruction bits in the instruction word.
[0036]
In the above embodiment, the overtaking determination result in software is indicated by the bits in the instruction word. However, a determination table is prepared for each instruction word, and the overtaking bit determination means 10 performs overtaking according to the contents of the table. It is also possible to determine whether it is possible.
[0037]
Next, an example of determining whether or not the software (compiler) can pass is described with reference to FIG.
[0038]
FIG. 4 is an example of the DO loop of the Fortran source code. Processing on the left side of the second line: A (L (I)) is processed by a list vector store instruction. The compiler translates these expressions to the machine language (instruction word) level. For example, the code shown in FIG. 4A is translated into an instruction sequence as shown in FIG. Here, looking at the array handled by the list vector store instruction (VSC) of (5) in FIG. 4C and the vector load instruction (VLD) of (6), the array accessed by the VSC instruction is an array of A. It can be seen that the array accessed by the VLD instruction is an array called D. Since the compiler checks this array and in this case accesses another array, it turns out that the address area of the preceding VSC instruction and the succeeding VLD instruction do not overlap. ”Is set.
[0039]
FIG. 4D shows an example of an instruction sequence of the code shown in FIG. In this case, looking at the arrays handled by the VSC instruction (5) and the VLD instruction (6) in FIG. 4D, it can be seen that both are array A. The compiler checks this array and finds that the VLD instruction in (6) cannot be processed before the VSC instruction in (5). Therefore, the overtaking instruction bit of both instructions is set to “0”. .
[0040]
As described above, according to the vector processing apparatus of this embodiment and the overtaking control method using the apparatus, the access area calculation means 6, the address area determination means 9 and the like determine whether or not the vector store instruction and the load system instruction can be overtaken. At the same time, by providing an overtaking bit in the instruction word and determining whether the list vector store instruction and the subsequent load instruction can be overtaken on the software, it is possible to accurately control the overtaking of the store instruction and the load instruction. , Program processing can be speeded up.
[0041]
【The invention's effect】
As described above, according to the vector processing apparatus of the present invention and the overtaking control method using the apparatus, the following effects can be obtained.
[0042]
The first effect of the present invention is to check the overlap of the address area accessed by the list vector store instruction preceded by software and the subsequent vector load instruction by software, and the succeeding load system instruction by the overtaking bit determination means based on the information Since the overtaking control is performed, subsequent load instructions can be overtaken without waiting for the processing of the preceding list vector store instruction, and the processing of the program can be speeded up.
[0043]
In addition, the second effect of the present invention is that the access area calculation means and the address area determination means are provided to determine whether or not the vector store instruction and the load instruction can be overtaken from the address area calculation and the information. The determination of overtaking store instructions and load instructions does not check the overlap of address areas by software, so even if the software cannot determine whether overtaking is possible, subsequent load instructions will overtake the preceding vector store instruction. This means that the program can be processed and the processing speed of the program can be increased.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a vector processing apparatus according to an embodiment of the present invention.
2A and 2B are diagrams showing a configuration of an instruction word according to an embodiment of the present invention, where FIG. 2A is a vector load / store instruction word, and FIG. 2B is a list vector store instruction word;
FIG. 3 is a diagram for explaining a method of calculating an address area according to an embodiment of the present invention.
FIG. 4 is a diagram showing a part of a source code of a program according to an embodiment of the present invention.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 Instruction issue part 2 Request reception register 3 Store
Claims (9)
前記ストア系命令及び前記ロード系命令の命令語中に、メモリアクセスのアドレス領域のプログラム上での重なりの有無に応じて所定の値が設定される追い越しビットを設定し、前記ストア系命令がリストベクトルストア命令である場合に、前記追い越しビットを参照して追い越し制御が行われることを特徴とするベクトル処理装置。A vector processing device that performs overtaking control of a preceding store instruction and a subsequent load instruction,
In the instruction word of the store-related instruction and the load-related instruction, an overtaking bit is set in which a predetermined value is set according to the presence / absence of overlapping of the memory access address area on the program, and the store-related instruction is listed In the case of a vector store instruction, the overtaking control is performed with reference to the overtaking bit.
ソフトウェアが命令語生成時に、前記ストア系命令及び前記ロード系命令のプログラム上でのアドレス領域の重なりの有無に応じて所定の値が設定される追い越しビットを参照して前記後続のロード系命令の追い越し制御を行う第1の追い越し判定手段と、前記ストア系命令及び前記ロード系命令のアドレス領域を計算し、計算した前記アドレス領域の重なりを参照して追い越し制御を行う第2の追い越し判定手段と、を少なくとも有することを特徴とするベクトル処理装置。A vector processing device that performs overtaking control of a preceding store instruction and a subsequent load instruction,
When the software generates an instruction word, it refers to an overtaking bit that is set to a predetermined value according to the presence or absence of overlapping address areas on the program of the store instruction and the load instruction. First overtaking determining means for performing overtaking control; second overtaking determining means for calculating an address area of the store-related instruction and the load-related instruction and performing overtaking control with reference to the overlap of the calculated address areas; , At least a vector processing device.
前記ストア系命令及び前記ロード系命令におけるメモリアクセスのアドレス領域のプログラム上での重なりを判断するステップと、前記ストア系命令及び前記ロード系命令の命令語中に予め設けられた追い越しビットに、前記アドレス領域の重なりの有無に応じて所定の値を設定するステップと、前記ストア系命令がリストベクトルストア命令の場合に、前記追い越しビットを参照して追い越し判定を行うステップとを少なくとも有することを特徴とする追い越し制御方法。In the overtaking control method of the preceding store system instruction and the subsequent load system instruction in the vector processing device,
Determining the overlap of the memory access address area on the program in the store system instruction and the load system instruction, and the overtaking bit provided in advance in the instruction word of the store system instruction and the load system instruction , At least a step of setting a predetermined value in accordance with the presence or absence of overlapping address areas and a step of performing overtaking determination with reference to the overtaking bit when the store-type instruction is a list vector store instruction. And overtaking control method.
ソフトウェアが命令語生成時に、前記ストア系命令及び前記ロード系命令のプログラム上でのアドレス領域の重なりを判断し、前記命令語中に予め設けられた追い越しビットに、前記アドレス領域の重なりの有無に応じて所定の値を設定するステップと、前記ストア系命令がリストベクトルストア命令の場合に、該追い越しビットを参照して前記後続のロード系命令の追い越し判定を行うステップと、前記ストア系命令がベクトルストア命令の場合に、各々の命令のアドレス領域を計算するステップと、計算した前記アドレス領域の重なりを参照して追い越し判定を行うステップと、を少なくとも有することを特徴とする追い越し制御方法。In the overtaking control method of the preceding store system instruction and the subsequent load system instruction in the vector processing device,
When the software generates an instruction word, it judges the overlap of the address area on the program of the store instruction and the load instruction, and the overtaking bit provided in advance in the instruction word indicates whether the address area overlaps. A step of setting a predetermined value in response , a step of performing an overtaking determination of the subsequent load system instruction with reference to the overtaking bit when the store system instruction is a list vector store instruction, and the store system instruction In the case of a vector store instruction, an overtaking control method comprising at least a step of calculating an address area of each instruction and a step of performing overtaking determination with reference to the overlap of the calculated address areas.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001176946A JP3789320B2 (en) | 2001-06-12 | 2001-06-12 | Vector processing apparatus and overtaking control method using the same |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001176946A JP3789320B2 (en) | 2001-06-12 | 2001-06-12 | Vector processing apparatus and overtaking control method using the same |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2002366538A JP2002366538A (en) | 2002-12-20 |
| JP3789320B2 true JP3789320B2 (en) | 2006-06-21 |
Family
ID=19017865
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2001176946A Expired - Lifetime JP3789320B2 (en) | 2001-06-12 | 2001-06-12 | Vector processing apparatus and overtaking control method using the same |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3789320B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2019164704A (en) * | 2018-03-20 | 2019-09-26 | 日本電気株式会社 | compiler |
Families Citing this family (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3988144B2 (en) | 2004-02-23 | 2007-10-10 | 日本電気株式会社 | Vector processing device and overtaking control circuit |
| JP4720915B2 (en) * | 2009-02-26 | 2011-07-13 | 日本電気株式会社 | Apparatus and method for overtaking determination between vector instructions |
| JP5573134B2 (en) * | 2009-12-04 | 2014-08-20 | 日本電気株式会社 | Vector computer and instruction control method for vector computer |
| JP5585304B2 (en) * | 2010-08-25 | 2014-09-10 | 日本電気株式会社 | Data processing apparatus, memory access control method, and memory access control program |
| JP5630281B2 (en) * | 2011-01-19 | 2014-11-26 | 日本電気株式会社 | Vector instruction control circuit and list vector overtaking control method |
| JP5469106B2 (en) * | 2011-02-01 | 2014-04-09 | エヌイーシーコンピュータテクノ株式会社 | Computer system, test apparatus, test method, and test program |
| US9021233B2 (en) * | 2011-09-28 | 2015-04-28 | Arm Limited | Interleaving data accesses issued in response to vector access instructions |
| JP6105307B2 (en) * | 2013-02-07 | 2017-03-29 | Necプラットフォームズ株式会社 | Instruction execution control device, instruction execution control system, instruction execution control method, and instruction execution control program |
| JP7151439B2 (en) | 2018-12-06 | 2022-10-12 | 富士通株式会社 | Arithmetic processing device and method of controlling arithmetic processing device |
-
2001
- 2001-06-12 JP JP2001176946A patent/JP3789320B2/en not_active Expired - Lifetime
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2019164704A (en) * | 2018-03-20 | 2019-09-26 | 日本電気株式会社 | compiler |
| JP7040187B2 (en) | 2018-03-20 | 2022-03-23 | 日本電気株式会社 | compiler |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2002366538A (en) | 2002-12-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2603626B2 (en) | Data processing device | |
| EP0378425A2 (en) | Branch instruction execution apparatus | |
| JP3988144B2 (en) | Vector processing device and overtaking control circuit | |
| JP3789320B2 (en) | Vector processing apparatus and overtaking control method using the same | |
| JPS58222361A (en) | Control system of priority decision for access request in data processing system | |
| US4833598A (en) | I/O interrupt handling mechanism in a multiprocessor system | |
| US20050223204A1 (en) | Data processing apparatus adopting pipeline processing system and data processing method used in the same | |
| US5175827A (en) | Branch history table write control system to prevent looping branch instructions from writing more than once into a branch history table | |
| US5386521A (en) | Instruction prefetching circuit with a next physical address precalculating circuit | |
| JP3698027B2 (en) | Vector collection / spread instruction execution order controller | |
| JPH10269199A (en) | Instruction passing processing circuit | |
| JP3008890B2 (en) | Processing control unit | |
| JP2731740B2 (en) | Parallel computer with communication register | |
| JP3211267B2 (en) | Access control method | |
| JPH09231203A (en) | Vector store passing control circuit | |
| JP3017866B2 (en) | Interrupt processing method | |
| JP2001160025A (en) | Data transfer device | |
| JP3471691B2 (en) | Branch instruction control method in micro instruction | |
| JPH0235525A (en) | Instruction fetch control method | |
| JP3431503B2 (en) | Information processing apparatus and program control method | |
| JP2805786B2 (en) | Information processing device | |
| JPH0348535B2 (en) | ||
| JPH04218806A (en) | Sequence instruction processing circuit for programmable controller | |
| JPH05233280A (en) | Pipeline arithmetic processor | |
| JPS6111882A (en) | Information processor |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20050715 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050727 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050926 |
|
| 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: 20060301 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20060328 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 3789320 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100407 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110407 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120407 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120407 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130407 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130407 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140407 Year of fee payment: 8 |
|
| S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |