[go: up one dir, main page]

JP3569338B2 - Parallel processor - Google Patents

Parallel processor Download PDF

Info

Publication number
JP3569338B2
JP3569338B2 JP03652595A JP3652595A JP3569338B2 JP 3569338 B2 JP3569338 B2 JP 3569338B2 JP 03652595 A JP03652595 A JP 03652595A JP 3652595 A JP3652595 A JP 3652595A JP 3569338 B2 JP3569338 B2 JP 3569338B2
Authority
JP
Japan
Prior art keywords
instruction
basic
word
register
instructions
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
JP03652595A
Other languages
Japanese (ja)
Other versions
JPH08234978A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP03652595A priority Critical patent/JP3569338B2/en
Publication of JPH08234978A publication Critical patent/JPH08234978A/en
Application granted granted Critical
Publication of JP3569338B2 publication Critical patent/JP3569338B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Advance Control (AREA)

Description

【0001】
【産業上の利用分野】
本発明は,複数の基本命令を一命令として並列処理する並列処理プロセッサに関する。
【0002】
計算機システムでは,パイプライン処理等で複数命令を並列処理し,高速化を計っている。
従来は複数命令をまとめて固定長の一命令にし,複数命令を並列処理する長形式命令語方式がとられているが,可変長でないため,基本命令の数が少ない場合にはキャッシュメモリに保持したときのヒット率の低下をまねいていた。また,スーパースカラ方式等で命令並列度に応じて並列処理することも行われているが,並列度が大きくなるのに応じてレジスタ数を増大させる必要がある。
【0003】
本発明は,並列処理が可能な一連の基本命令を認識し,それを可変長の一命令として扱うことにより効率よく命令の並列処理を行うことができる並列処理プロセッサを提供する。
【0004】
【従来の技術】
図7は従来の長形式命令語の実行方法を示す。
図7において,
200は命令語であって,Nビットの基本命令をM個もつ固定長の長形式命令語であり,M=6の場合を示す。図7では1タイミングで並列処理する基本命令1,基本命令2、基本命令3を含み,NOP1,NOP2,NOP3(NOPは何も処理をしないことを指示する無操作命令である)を持たせ固定長の長形式命令語としたものである。
【0005】
201はデコーダであって,デコーダ1,デコーダ2,デコーダ3,デコーダ4,デコーダ5,デコーダ6を持つものである。命令語200の各基本命令語に対応して設けられ,それぞれの基本命令をデコードするものである。
【0006】
202は演算器であって,演算器1,演算器2,演算器3,演算器4,演算器5,演算器6を持ち,それぞれ デコーダ1,デコーダ2,デコーダ3,デコーダ4,デコーダ5,デコーダ6でデコードされた命令を演算処理するものである。
【0007】
203はレジスタであって,レジスタ1,レジスタ2,レジスタ3,レジスタ4,レジスタ5,レジスタ6を持ち,それぞれ演算器1,演算器2,演算器3,演算器4,演算器5,演算器6の演算結果を保持するものである。各レジスタは複数本の個別のレジスタを複数本備え,レジスタ空間を構成している。例えば,レジスタ1で1レジスタ空間を構成し,128ビットの個別レジスタを64本備える等である。
【0008】
図7の構成の動作を説明する。
命令語200のNビットの基本命令1,基本命令2,基本命令3,NOP1,NOP2,NOP3は同じタイミングでそれぞれ並列にデコーダ1,デコーダ2,デコーダ3,デコーダ4,デコーダ5,デコーダ6に入力され,それぞれ,演算器1,演算器2,演算器3,演算器4,演算器5,演算器6に入力される。
【0009】
そして,基本命令1,基本命令2,基本命令3はそれぞれの演算器で演算処理され,演算結果はそれぞれレジスタ1,レジスタ2,レジスタ3に保持される。NOP1,NOP2,NOP3はそれぞれ処理を行わない指示であるので,演算されることはない。
【0010】
図8は従来の長形式命令語の生成方法の説明図である。
図8において,
210は命令語生成プログラムであって,8個の基本命令語の固定長の長形式命令語を生成するプログラムである。
【0011】
221は命令語生成プログラム210の第1行の記述で生成された命令語である。
222は命令語生成プログラム210の第2行の記述で生成された命令語である。
【0012】
223は命令語生成プログラム210の第3行の記述で生成された命令語である。
224は命令語生成プログラム210の第4行の記述で生成された命令語である。
【0013】
225は命令語生成プログラム210の第5行の記述で生成された命令語である。
226は命令語生成プログラム210の第6行の記述で生成された命令語である。
【0014】
227は命令語生成プログラム210の第7行の記述で生成された命令語である。
命令語生成プログラム210の第1行の記述「add & sub」の記述により,第1番目の基本命令語が「add」,第2番目の基本命令語が「sub」,第3番目〜第8番目の基本命令語がNOP(無操作命令)の長形式命令語221が生成される。
【0015】
同様に,命令語生成プログラム210の第2行の記述「load & store」の記述により,第1番目の基本命令語が「load」,第2番目の基本命令語が「store」,第3番目〜第8番目の基本命令語がNOP(無操作命令)の長形式命令語222が生成される。
【0016】
命令語223のように基本命令語が「load」命令のみで6個続くような場合にも,命令語生成プログラム210は第3行のように「load」命令を繰り返して記述する。
【0017】
同様に,命令語生成プログラム210の第5行,第6行,第7行の記述により,長形式命令語224,225,226,227が生成される。
【0018】
【発明が解決しようとする課題】
従来の長形式命令語による複数命令の並列処理方法は,固定長であったため,並列処理する基本命令数が所定の数に達しない場合には,NOP命令を付加して所定の長さにする必要があった。そのため,命令並列度の低いプログラムに対しては,NOPが多くなり,メモリの使用効率を悪化させ,キャッシュメモリのヒット率の低下,命令フェッチ機構の負荷の増大等をまねいていた。
【0019】
一方,スーパースカラ方式では命令実行時の並列度に応じて,同時に実行される命令の長さが任意に変更されるので,効率の悪化は生じないが,並列度に応じて,必要なレジスタ数をどのようにして増加させるかが大きな課題とされている。
【0020】
本発明は,長形式命令語を可変長として処理することができるようにして限られた数レジスタで効率良く並列処理することのできる並列処理プロセッサおよび並列実行方法を提供することを目的とする。
【0021】
【課題を解決するための手段】
本発明は,複数の基本命令をまとめて一命令語として並列処理する並列処理プロセッサにおいて,基本命令は同一タイミングで処理することの可否を指定する命令継続指定ビットを設けたものとし,複数の基本命令を基本命令毎に格納する命令バッファと,該命令バッファの基本命令をそれぞれに演算する演算部と,それぞれの演算部の演算結果を格納するレジスタ,該命令継続指定ビットの値を判別して基本命令のうち同一タイミングで処理を行ってはならない基本命令の演算部への入力を抑止する命令抑止部とを備え,前記命令抑止部は同一タイミングで処理をしてはならないことを指示された基本命令より後の基本命令の演算部への入力は抑止し,それ以前の同一タイミングで演算できる引き続く基本命令を一命令語とみなし,同一タイミングで演算部に入力して並列処理するものであり,
前記一命令語にM個の前記基本命令が含まれるとした時,Mビットからなる命令拡張制御レジスタと,M個の基本命令のうち有効な基本命令の位置を表すマスクパターンを該命令拡張制御レジスタにセットし,該命令拡張制御レジスタを参照して命令語を生成する命令語生成部とを備え,入力された基本命令に対して,該マスクパターンを参照し,有効であることを示すマスクパターンに対応する位置に該基本命令をセットし,有効でないことを示すマスクパターンに対応する位置に無操作命令もしくはなにも命令を与えないことによりM個の基本命令をもつ命令語を生成する構成をもつ。
【0022】
図1は本発明の基本構成を示す。
図1 (a)において,
1は並列処理プロセッサである。
【0023】
2は命令語であって,複数の基本命令を含むものである。図1は基本命令が6個で一命令を構成する場合を例として説明する。
2’は命令バッファであって,命令語2の各基本命令を入力して保持するものである。
3は命令抑止部であって,抑止器1,抑止器2,抑止器3,抑止器4,抑止器5,抑止器6,・・・,抑止器Mを持つものである。各抑止器は命令語2のそれぞれに対応する位置の基本命令を命令バッファ2’より入力し,命令語の各基本命令の持つ命令継続指定ビットに従って,同一タイミングで実行することのできない基本命令の実行を抑止するものである。命令継続指定ビットは例えば,0であれば同一タイミングで実行するものとし,1は同一タイミングで実行できる一連の基本命令の終了を示すものである。
【0024】
4はデコーダ部であって,各抑止器に対応するデコーダ1,デコーダ2,デコーダ3,デコーダ4,デコーダ5,デコーダ6,・・・,デコーダMを持ち,それぞれに対応する抑止器の判定結果に応じて入力される命令語2の基本命令をデコードするものである。
【0025】
5は演算部であって,演算器1,演算器2,演算器3,演算器4,演算器5,演算器6,・・・,演算器Mを持ち,各演算器はそれぞれに対応するデコーダの演算結果を入力するものである。
【0026】
6はレジスタ部であって,レジスタ空間1,レジスタ空間2,レジスタ空間3,レジスタ空間4,レジスタ空間5,レジスタ空間6,・・・,レジスタ空間Mを持ち,各レジスタ空間はそれぞれに対応する演算器の演算結果を保持するものである。
【0027】
命令語2において,
10,11は命令継続指定ビットである。
【0028】
【作用】
図1 (a)の動作を説明する。
命令抑止部3の各抑止器(1〜M)はそれぞれに対応する位置の基本命令を入力する。各抑止器は,入力したそれぞれの基本命令の命令継続抑止ビットの値を判定する。例えば,値が0であれば同一タイミングで並列処理する命令であるとし,値が1であればその後に続く基本命令はデコーダへの入力を抑止する(命令継続抑止ビットの値1の基本命令までデコーダに入力する)。
【0029】
そこで,デコーダ部4は,それぞれのデコーダに入力された基本命令をデコードし,それぞれに接続される演算器(1〜M)に基本命令を入力する。演算部5はそれぞれの演算器(1〜M)において入力された命令を演算処理する。レジスタ部6はそれぞれに接続されている演算器の演算結果を対応するレジスタに格納する。
【0030】
図1 (b)は本発明で並列処理する命令語の長さと同じタイミングで並列処理できる基本命令数とレジスタ空間数の関係についての説明図である。
図1 (b)は,レジスタ空間数がM個であるとする。また,命令語に含まれる基本命令語の長さはNビットであり,命令語に含まれる基本命令数はP個であるとする。
【0031】
値0の命令継続ビットが引き続く基本命令列とその一連の命令継続ビットに続いて現れる値1の命令継続ビットの基本命令まで一命令語とみなし,最大M個(P=1,2,・・・,M)まで,同一タイミングで処理することができる。即ち,並列できる1命令語の長さはP=1,2,・・・,Mの場合のM組が可能である。
【0032】
図2は本発明の動作例である。
図2 (a)は動作例であり,図2 (b)はレジスタ空間の説明図である。
図2 (a)において,
21は命令語1であって,基本命令1,基本命令2,基本命令3,基本命令4,基本命令5を持つものである。基本命令1の命令継続ビットは0,基本命令2の命令継続ビットは1であって,基本命令1と基本命令2は前回に処理されたものである。
【0033】
22は命令語2であって,命令語1に続く命令であって,基本命令1,基本命令2,基本命令3,基本命令4,基本命令5,基本命令6を持つものである。
命令語1(21)の基本命令1から基本命令5および命令語2(22)の基本命令1から基本命令4まで命令継続ビットは0であり,命令語2(22)の基本命令5で命令継続ビットが1になるので,命令語1(21)の基本命令3から基本命令2(22)の基本命令5までが今回の処理の対象になる。命令語2(22)の基本命令6より後の命令は次回に処理される。
【0034】
29は命令バッファであって,命令語の基本命令を入力して保持するものである。
30は命令抑止部であって,抑止器1〜抑止器8を備えるものである。
【0035】
31はデコーダ部であって,デコーダ1〜デコーダ8を備えるものである。
32は演算部であって,演算器1〜演算器8を備えるものである。
33はレジスタ部であって,レジスタ空間1〜レジスタ空間8を備えるものである。
【0036】
図2 (a)において,命令語1(21)の基本命令2までが,前回のタイミングで処理されている。今回のタイミングで命令抑止部30の各抑止器はそれぞれ対応する基本命令を入力する。抑止器1は命令語1(21)の基本命令3,抑止器2は基本命令4,抑止器3は基本命令語5,および,抑止器4は次の命令語2(22)の基本命令1,抑止器5は基本命令2,抑止器6は基本命令3,抑止器7は基本命令4,抑止器8は基本命令5を入力する。そこで,それぞれの抑止器は命令継続ビットを判定し,命令継続ビットが0の引き続く基本命令および命令継続ビットが1になる命令語2(22)の基本命令6までの基本命令を抑止することなくそれぞれに接続されるデコーダに転送する。図2 (a)は抑止されない基本命令数とレジスタ空間数は同じであるが,例えば,命令語2(22)の基本命令4の命令継続ビットが1であるとすれば,その基本命令4までがデコーダに転送される。
【0037】
デコーダ部31の各デコーダはそれぞれに入力された基本命令をデコードし,演算部32の各演算器はそれぞれの命令を演算処理し,レジスタ部33のレジスタ空間はそれぞれに接続される演算器の演算結果を保持する。
【0038】
図2 (b)はレジスタ空間の説明図である。
40はレジスタ空間1であって,個別レジスタ45を複数個(例えば64個)もつものである。
【0039】
41はレジスタ空間2である。
42はレジスタ空間Mである。
45は個別レジスタであって,例えば128ビットのレジスタである。
【0040】
図2 (b)は1レジスタ空間に例えば128ビットの個別レジスタを64本もつことを表している。
なお,上記の説明において,命令バッファ中の命令継続ビットがすべて0の場合には,命令形式の例外が検出され,オペレーティングシステムに対して,命令の先頭アドレスが通知される。オペレーティングシステムは,この「ハードウェアの許容範囲を越える長い命令語」を適当な長さに分割して再実行する。あるいは命令バッファに保持した基本命令を順次シミュレートすることにより各基本命令語を実行する。
【0041】
本発明によれば,固定長の長形式命令語であっても,可変長命令語として扱うことができる。そして,同じタイミングで並列処理できる基本命令が少ない場合には,次の命令語で同じタイミングで処理できる基本命令を並列処理できる。そのため,並列処理の実行速度が速くなるとともに,命令語を固定長にするために付加するNOP命令等が少なくなりメモリの利用効率を向上させることができる。
【0042】
【実施例】
図3は本発明の実施例構成を示す。
図3において,
51は現命令語である。
【0043】
A0は基本命令であって,命令継続指定ビットが0のものである。
A1は基本命令であって,命令継続指定ビットが0のものである。
A2は基本命令であって,命令継続指定ビットが0のものである。
【0044】
A3は基本命令であって,命令継続指定ビットが0のものである。
A4は基本命令であって,命令継続指定ビットが0のものである。
A5は基本命令であって,命令継続指定ビットが1のものである。
【0045】
52は次命令語である。
B0は基本命令であって,命令継続指定ビットが0のものである。
B1は基本命令であって,命令継続指定ビットが0のものである。
【0046】
55は並列処理プロセッサである。
58は命令バッファであって,8個のバッファ(60,61,62,63,64,65,66,67)を備えるものである。図3は,それぞれのバッファに基本命令(A0),基本命令(A1),基本命令(A2),基本命令(A3),基本命令(A4),基本命令(A5),基本命令(B0),基本命令(B1)を格納した状態を示す。
【0047】
71は命令継続指定ビット検出器であって,バッファ60の基本命令(A0)の命令継続指定ビット(0)を入力して,その値を検出するものである。
72は命令継続指定ビット検出器であって,バッファ61,62の基本命令(A0,A1)の命令継続指定ビットを入力して,その値を検出するものである。
【0048】
73は命令継続指定ビット検出器であって,バッファ60,61,62の基本命令(A0,A1,A2)の命令継続指定ビットを入力して,その値を検出するものである。
【0049】
74は命令継続指定ビット検出器であって,バッファ60,61,62,63の基本命令(A0,A1,A2,A3)の命令継続指定ビットを入力して,その値を検出するものである。
【0050】
75は命令継続指定ビット検出器であって,バッファ60,61,62,63,64の基本命令(A0,A1,A2,A3,A4)の命令継続指定ビットを入力して,その値を検出するものである。
【0051】
76は命令継続指定ビット検出器であって,バッファ60,61,62,63,64,65の基本命令(A0,A1,A2,A3,A4,A5)の命令継続指定ビットを入力して,その値を検出するものである。
【0052】
77は命令継続指定ビット検出器であって,バッファ60,61,62,63,64,65,66の基本命令(A0,A1,A2,A3,A4,A5,B0)の命令継続指定ビットを入力して,その値を検出するものである。
【0053】
80は命令抑止部であって,抑止器81〜87を備え,各命令継続指定ビット検出器(71〜77)の検出値に応じて入力した基本命令の通過もしくは抑止を行うものである。
【0054】
81は抑止器1であって,バッファ61の基本命令(A1)を入力し,命令継続指定ビット検出器71の検出値に応じて入力した基本命令(A1)の通過もしくは抑止を行うものである。
【0055】
82は抑止器2であって,バッファ62の基本命令(A2)を入力し,命令継続指定ビット検出器72の検出値に応じて入力した基本命令(A2)の通過もしくは抑止を行うものである。
【0056】
83は抑止器3であって,バッファ63の基本命令(A3)を入力し,命令継続指定ビット検出器73の検出値に応じて入力した基本命令(A3)の通過もしくは抑止を行うものである。
【0057】
84は抑止器4であって,バッファ64の基本命令(A4)を入力し,命令継続指定ビット検出器74の検出値に応じて入力した基本命令(A4)の通過もしくは抑止を行うものである。
【0058】
85は抑止器5であって,バッファ65の基本命令(A5)を入力し,命令継続指定ビット検出器75の検出値に応じて入力した基本命令(A5)の通過もしくは抑止を行うものである。
【0059】
86は抑止器6であって,バッファ66の基本命令(B0)を入力し,命令継続指定ビット検出器76の検出値に応じて入力した基本命令(B0)の通過もしくは抑止を行うものである。
【0060】
87は抑止器7であって,バッファ67の基本命令(B1)を入力し,命令継続指定ビット検出器77の検出値に応じて入力した基本命令(B1)の通過もしくは抑止を行うものである。
【0061】
90はデコーダ部であって,デコーダ1,デコーダ2,デコーダ3,デコーダ4,デコーダ5,デコーダ6,デコーダ7,デコーダ8を備えるものである。
100は演算部であって,演算器1,演算器2,演算器3,演算器4,演算器5,演算器6,演算器7,演算器8を備えるものである。
【0062】
110は レジスタ部であって,レジスタ空間1,レジスタ空間2,レジスタ空間3,レジスタ空間4,レジスタ空間5,レジスタ空間6,レジスタ空間7,レジスタ空間8を備えるものである。
【0063】
図3の構成の動作を説明する。
命令バッファ58の各バッファ(60,61,62,63,64,65,66,67)はそれぞれ,基本命令A0,A1,A2,A3,A4,A5,B0,B1を入力する。
【0064】
基本命令A0は直接デコーダ1に入力される。
命令継続指定ビット検出器71は基本命令A0の命令継続指定ビット(0) を入力する。そして,抑止器は命令継続指定ビット検出器71の検出結果と基本命令A1を入力する。命令継続指定ビットが0なので抑止器81は基本命令A1を通過させてデコーダ2に入力する。
【0065】
命令継続指定ビット検出器72は基本命令A0,A1の命令継続指定ビット(0) を入力する。そして,抑止器82は基本命令A2および命令継続指定ビット検出器72の検出結果を入力する。命令継続指定ビットが全て0なので抑止器82は基本命令A2を通過させてデコーダ3に入力する。
【0066】
命令継続指定ビット検出器73は基本命令A0,A1,A2の命令継続指定ビット(0) を入力する。そして,抑止器83は基本命令A3と命令継続指定ビット検出器73の検出結果を入力する。命令継続指定ビットが全て0なので基本命令A3を通過させてデコーダ4に入力する。
【0067】
命令継続指定ビット検出器74は基本命令A0,A1,A2,A3の命令継続指定ビット(0) を入力する。そして,抑止器84は基本命令A4と命令継続指定ビット検出器74の検出結果を入力する。抑止器84は命令継続指定ビットが全て0なので基本命令A4を通過させてデコーダ5に入力する。
【0068】
命令継続指定ビット検出器75は基本命令A0,A1,A2,A3,A4の命令継続指定ビット(0) を入力する。そして,抑止器85は基本命令A5と命令継続指定ビット検出器75の検出結果を入力する。抑止器85は命令継続指定ビットが全て0なので基本命令A5を通過させてデコーダ6に入力する。
【0069】
命令継続指定ビット検出器76は基本命令A0,A1,A2,A3,A4の命令継続指定ビット(0) と基本命令A5の命令継続指定ビット(1) を入力する。そして,抑止器86は基本命令B0と命令継続指定ビット検出器76の検出結果を入力する。抑止器86は命令継続指定ビットに1があるので基本命令B0の通過を抑止する。
【0070】
命令継続指定ビット検出器77は基本命令A0,A1,A2,A3,A4の命令継続指定ビット(0) と基本命令A5の命令継続指定ビット(1) と基本命令B0の命令継続指定ビット(0) を入力する。そして,抑止器87は基本命令B1と命令継続指定ビット検出器77の検出結果を入力する。抑止器87は命令継続指定ビットに1があるので基本命令B1の通過を抑止する。
【0071】
デコーダ1,デコーダ2,デコーダ3,デコーダ4,デコーダ5,ダコーダ6はそれぞれに入力された基本命令(A0,A1,A2,A3,A4,A5)をデコードする。各デコーダでデコードされた基本命令はそれぞれに接続される演算器に入力され,演算される。そして,演算結果はそれぞれの演算器(1〜6)に接続されるレジスタ空間(1〜6)に保持される。
【0072】
図4は本発明の実施例1であって,レジスタ間でデータ転送を行う場合の構成を示す。
図4において,
120は長形式命令語であって,Nビットの基本命令語121がP個(P=1,2,・・・・,M(最大レジスタ空間数))で構成され,それぞれに命令継続指定ビットを持つものである。
【0073】
121は基本命令語である。
130はデコーダ部であって,デコーダ1,デコーダ2,デコーダ3,デコーダ4,デコーダ5,デコーダ6により構成されるものである。
【0074】
131は演算部であって,演算器1,演算器2,演算器3,演算器4,演算器5,演算器6により構成されるものである。
132はレジスタ部であって,レジスタ空間1,レジスタ空間2,レジスタ空間3,レジスタ空間4,レジスタ空間5,レジスタ空間6により構成されるものである。
【0075】
133はバッファレジスタであって,前段のレジスタ空間のバッファレジスタのデータを複写して保持し,演算器1の指示によりレジスタ空間1に入力するものである。
【0076】
134はバッファレジスタであって,演算器1の指示によりレジスタ空間1のデータを受け取り,保持するものである。
135はバッファレジスタであって,バッファレジスタ134のデータを複写して保持し,演算器2の指示によりレジスタ空間2に入力するものである。
【0077】
136はバッファレジスタであって,演算器2の指示によりレジスタ空間2のデータを受け取り,保持するものである。
137はバッファレジスタであって,バッファレジスタ136のデータを複写して保持し,演算器3の指示によりレジスタ空間3に入力するものである。
【0078】
138はバッファレジスタであって,演算器3の指示によりレジスタ空間3のデータを受け取り,保持するものである。
139はバッファレジスタであって,バッファレジスタ138のデータを複写して保持し,演算器4の指示によりレジスタ空間4に入力するものである。
【0079】
140はバッファレジスタであって,演算器4の指示によりレジスタ空間4のデータを受け取り,保持するものである。
141はバッファレジスタであって,バッファレジスタ140のデータを複写して保持し,演算器5の指示によりレジスタ空間5に入力するものである。
【0080】
142はバッファレジスタであって,演算器5の指示によりレジスタ空間5のデータを受け取り,保持するものである。
143はバッファレジスタであって,バッファレジスタ142のデータを複写して保持し,演算器6の指示によりレジスタ空間6に入力するものである。
【0081】
144はバッファレジスタであって,演算器6の指示によりレジスタ空間6のデータを受け取り,保持するものである。バッファレジスタ144のデータは後段のバッファレジスタに複写される。
【0082】
146は長形式命令語であって,その基本命令1はバッファレジスタ (a)134にレジスタ空間1の内容を保持させるストア命令(store Reg→a)を含むものである。
【0083】
147は長形式命令語であって,その基本命令2はバッファレジスタ (b)135の内容をレジスタ空間2にロードする命令(Load b→Reg)を含むものである。
【0084】
レジスタ空間の間でデータ転送を行う場合には,まずデータを送信するレジスタ空間に対応する基本命令に,次のような操作を行う。レジスタ空間1からレジスタ空間2に転送する場合を例として説明する。
【0085】
まず,長形式命令語146の基本命令1にバッファレジスタa(バッファレジスタ134)にレジスタ空間1の内容をストアする命令(store Reg→a)をセットし(基本命令1へのセットは転送プログラムの記述に従ってコンパイラによりなされる),バッファレジスタ(a) にレジスタ空間1の内容を保持させる。次にデータを受け取るレジスタ空間2に対応する基本命令2にバッファレジスタbの内容をレジスタ空間2にロードする命令(load Reg→b)をセットし(基本命令2へのセットは,転送プログラムに従ってコンパイラによりなされる),バッファレジスタbの内容をレジスタ空間2にロードする。
【0086】
図5は本発明の実施例2である。
図5において,
150はフェッチした命令語(I)であり,基本命令となるものである。
【0087】
151は命令拡張制御レジスタ設定の基本命令語であって,命令拡張制御レジスタ152に命令語における基本命令語の繰り返しパターンを表すマスクパターンを設定するものである。
【0088】
152は命令拡張制御レジスタであって,基本命令Iを繰り返す長形式命令語において,基本命令Iのある位置を表すビットと基本命令Iでない命令であることを識別するビットにより構成されるマスクパターンを持つものである。
【0089】
153は命令語生成部であって,フェッチした基本命令語(I)150と命令拡張制御レジスタ152のマスクパターンにより命令語154を生成するものである。
【0090】
154は実行される長形式の命令語である。
本実施例2では,命令語の最大サイズをM(基本命令がM個)とした時,基本命令語の位置(1,2,・・・,M)に1ビットずつ対応させたMビットの命令拡張制御レジスタ設定の基本命令語151を設ける。そして,命令語に繰り返される基本命令語I(150)をフェッチした場合には,フェッチした命令Iを基本命令とするか,あるいはNOPもしくはなにも命令をセットしないかを表すビットパターンを命令拡張制御レジスタにセットしておく。受け取った基本命令語が命令拡張制御レジスタ152のマスクパターンに従うものであるかないかは,例えば,フェッチした命令語が一命令語のみの場合には,マスクパターンに従って繰り返される基本命令であると判定する。そして,その命令Iをフェッチすると,命令拡張制御レジスタ設定の基本命令語151を参照し,命令拡張制御レジスタ152のビット位置Kの値が0であれば位置Kに対応する基本命令語をNOPとする。パターンの途中から最後まで値0が続く場合には基本命令をなにもセットしなくて良い(図6参照)。また位置Kの値が1であれば基本命令をIと見なすことにより,長形式の命令語154を実行する。
【0091】
図6は本発明の実施例2の命令語生成方法の説明図である。
図6において,
160は命令語生成プログラムである。
【0092】
第1行「setlen 0011111100」は命令拡張制御レジスタにマスクパターン「11111100」を設定する基本命令語である。
第2行は基本命令語が「add & sub」の基本命令語「add」と基本命令語「sub」の2個の基本命令語により構成される命令語171を生成する記述である。
【0093】
第3行「load & store」は基本命令語「load」と基本命令語「store」の2個の基本命令語により構成される命令語172を生成する記述である。
【0094】
第4行の「load」は基本命令語が「load」のみであり,それが6個繰り返される命令語173を生成する記述である。
第4行の「load」は基本命令語が「load」のみであり,それが6個繰り返される命令語173を生成する記述である。
【0095】
第5行の「add」は基本命令語が「add」のみであり,それが6個繰り返される命令語174を生成する記述である。
第6行の「mult」は基本命令語が「mult」のみであり,それが6個繰り返される命令語175を生成する記述である。
【0096】
第7行の「store」は基本命令語が「store」のみであり,それが6個繰り返される命令語176を生成する記述である。
第8行「branch & nop」は基本命令語「branch」と基本命令語が「nop」の2個の基本命令語により構成される命令語を作成するものである。
【0097】
図5を参照し,図6の本発明の実施例2の命令語生成方法について説明する。
命令拡張制御レジスタ設定の基本命令語151(図6の命令語生成プログラム160の第1行の命令)を入力し,命令拡張制御レジスタにその命令で与えられているマスクパターン(11111100)を設定する(図5のマスクパターン(11011111)とはマスクパターンが異なる)。
【0098】
第2行目の命令語のプログラムの記述「add & sub」は2基本命令の記述なので,マスクパターンに従う命令語生成はせずに,命令語171を生成する。
【0099】
第3行目も同様にプログラムの記述「load & store」が2基本命令の記述なので,マスクパターンにはよらずに命令語172を生成する。
第4行「load」の記述に従ってフェッチした命令語が1基本命令のみであるので,命令語生成部153は命令拡張制御レジスタ152を参照し,マスクパターンに従って基本命令語「load」を6個繰り返す命令語173を生成する。
【0100】
第5行の記述に従って,同様にフェッチした命令語も1基本命令「add」のみであるので,命令拡張制御レジスタ152のマスクパターンに従って,命令語生成部153が命令語174を生成する。
【0101】
第6行の記述に従ってフェッチした命令語も基本命令「mult」のみであるので,命令拡張制御レジスタ152のマスクパターンが参照されて命令語生成部153により命令語175が生成される。
【0102】
第7行の記述に従って,フェッチした命令語「store」も1基本命令だけなので命令拡張制御レジスタ152のマスクパターンが参照されて命令語176が生成される。
【0103】
第8行は「branch」命令のみで良いのであるが,基本命令語が「branch」命令1語であると,命令拡張制御レジスタが参照され「branch」命令を6個繰り返す命令語が生成されるので,それを防ぐために基本命令語に「nop」を付与して2個の基本命令の記述とし,命令語177を生成する。
【0104】
なお,本発明では,図6の各命令語のように命令語の基本命令から後に基本命令が続かない場合にはなにも基本命令を加える必要はい。
本実施例の命令語生成プログラム160を図8の従来の命令語生成プログラム210と比較すると,従来の命令語生成プログラム210では合計で29個の基本命令語の記述を必要とするのに対して,本発明では合計で11個の基本命令の記述て良い。また,従来の命令語では,多数のNOP命令を付け加えて固定長の命令語とする必要があるのに対して,本発明では,図6のようにその必要がないので,メモリの使用効率が大幅に向上する。またキャッシュメモリ等におけるヒット率が高くなる。
【0105】
【発明の効果】
本発明によれば,固定長の長形式命令語であっても,可変長命令語として扱うことができる。そして,同じタイミングで並列処理できる基本命令が少ない場合には,次の命令語で同じタイミングで処理できる基本命令を並列処理できる。そのため,並列処理の実行速度が速くなるとともに,命令語を固定長にするために付加するNOP命令等が少なくなりメモリの利用効率を大幅に向上させることができる。また,キャッシュメモリにおけるヒット率も高くなる。
【図面の簡単な説明】
【図1】本発明の基本構成を示す図である。
【図2】本発明の動作例を示す図である。
【図3】本発明の実施例構成を示す図である。
【図4】本発明の実施例1を示す図である。
【図5】本発明の実施例2を示す図である。
【図6】本発明の実施例2の命令語生成方法を示す図である。
【図7】従来の長形式命令語の実行方法を示す図である。
【図8】従来の長形式命令語の生成方法を示す図である。
【符号の説明】
1:並列処理プロセッサ
2:命令語
2’:命令バッファ
3:命令抑止部
4:デコーダ
5:演算部
6:レジスタ部
10,11:命令継続指定ビット
[0001]
[Industrial applications]
The present invention relates to a parallel processor that processes a plurality of basic instructions in parallel as one instruction.
[0002]
In computer systems, multiple instructions are processed in parallel by pipeline processing or the like to achieve higher speed.
Conventionally, long instructions have been used to combine multiple instructions into one fixed-length instruction and process the instructions in parallel. However, since the instructions are not variable in length, they are stored in cache memory when the number of basic instructions is small. This caused the hit rate to drop. Although parallel processing is also performed according to the degree of instruction parallelism using a superscalar method or the like, the number of registers needs to be increased as the degree of parallelism increases.
[0003]
The present invention provides a parallel processor capable of recognizing a series of basic instructions capable of parallel processing and treating them as one variable-length instruction so that the instructions can be efficiently processed in parallel.
[0004]
[Prior art]
FIG. 7 shows a conventional long-form instruction word execution method.
In FIG.
An instruction word 200 is a fixed-length, long-form instruction word having M N-bit basic instructions, and shows a case where M = 6. FIG. 7 includes basic instructions 1, 2, and 3 that are processed in parallel at one timing, and has NOP1, NOP2, and NOP3 (NOP is a no-operation instruction indicating that no processing is performed) and is fixed. It is a long long instruction word.
[0005]
A decoder 201 has a decoder 1, a decoder 2, a decoder 3, a decoder 4, a decoder 5, and a decoder 6. It is provided corresponding to each basic instruction word of the instruction word 200, and decodes each basic instruction word.
[0006]
An arithmetic unit 202 has arithmetic units 1, arithmetic units 2, arithmetic units 3, arithmetic units 4, arithmetic units 5, arithmetic units 5, and arithmetic units 6, and has a decoder 1, a decoder 2, a decoder 3, a decoder 4, a decoder 4, and a decoder 5, respectively. This is for processing the instruction decoded by the decoder 6.
[0007]
Reference numeral 203 denotes a register, which has a register 1, a register 2, a register 3, a register 4, a register 5, and a register 6, and has a computing unit 1, a computing unit 2, a computing unit 3, a computing unit 4, a computing unit 5, and a computing unit, respectively. 6 is held. Each register includes a plurality of individual registers and forms a register space. For example, one register space is constituted by the register 1 and 64 individual registers of 128 bits are provided.
[0008]
The operation of the configuration of FIG. 7 will be described.
The N-bit basic instruction 1, basic instruction 2, basic instruction 3, NOP1, NOP2, and NOP3 of the instruction word 200 are input to the decoder 1, decoder 2, decoder 3, decoder 4, decoder 5, decoder 5, and decoder 6 in parallel at the same timing. Then, they are input to the arithmetic unit 1, the arithmetic unit 2, the arithmetic unit 3, the arithmetic unit 4, the arithmetic unit 5, and the arithmetic unit 6, respectively.
[0009]
The basic instruction 1, the basic instruction 2, and the basic instruction 3 are processed by the respective arithmetic units, and the calculation results are held in the registers 1, 2, and 3, respectively. NOP1, NOP2, and NOP3 are instructions that do not perform processing, and are not calculated.
[0010]
FIG. 8 is an explanatory diagram of a conventional long-form instruction word generation method.
In FIG.
An instruction word generation program 210 is a program that generates a fixed-length long-length instruction word of eight basic instruction words.
[0011]
Reference numeral 221 denotes a command generated by the description on the first line of the command generation program 210.
Reference numeral 222 denotes a command generated by the description on the second line of the command generation program 210.
[0012]
Reference numeral 223 denotes a command generated by the description on the third line of the command generation program 210.
Reference numeral 224 denotes a command generated by the description on the fourth line of the command generation program 210.
[0013]
Reference numeral 225 denotes a command generated by the description on the fifth line of the command generation program 210.
Reference numeral 226 denotes a command generated by the description on the sixth line of the command generation program 210.
[0014]
Reference numeral 227 denotes a command generated by the description on the seventh line of the command generation program 210.
According to the description “add & sub” on the first line of the instruction word generation program 210, the first basic instruction word is “add”, the second basic instruction word is “sub”, and the third to eighth eighth instruction words are “sub”. A long form command 221 is generated as the second basic command is NOP (no operation command).
[0015]
Similarly, according to the description “load & store” on the second line of the instruction word generation program 210, the first basic instruction word is “load”, the second basic instruction word is “store”, and the third basic instruction word is “store”. The long-form command 222 is generated as the eighth basic command is NOP (no operation command).
[0016]
Even in the case where six basic instruction words are continued only by the "load" instruction like the instruction word 223, the instruction word generation program 210 repeatedly describes the "load" instruction as shown in the third line.
[0017]
Similarly, long-form command words 224, 225, 226, and 227 are generated based on the descriptions in the fifth, sixth, and seventh lines of the command word generation program 210.
[0018]
[Problems to be solved by the invention]
Since the conventional parallel processing method for a plurality of instructions using long-form instruction words has a fixed length, if the number of basic instructions to be processed in parallel does not reach a predetermined number, a predetermined length is added by adding a NOP instruction. Needed. Therefore, for a program with a low degree of instruction parallelism, the NOP increases, thereby deteriorating the memory use efficiency, reducing the hit rate of the cache memory, and increasing the load of the instruction fetch mechanism.
[0019]
On the other hand, in the superscalar method, the length of instructions executed at the same time is arbitrarily changed according to the degree of parallelism at the time of instruction execution, so there is no decrease in efficiency. However, the number of registers required according to the degree of parallelism How to increase the number is a major issue.
[0020]
SUMMARY OF THE INVENTION It is an object of the present invention to provide a parallel processor and a parallel execution method capable of processing a long-form instruction word as a variable length and efficiently performing parallel processing with a limited number of registers.
[0021]
[Means for Solving the Problems]
The present invention relates to a parallel processing processor for processing a plurality of basic instructions in parallel as one instruction word, wherein the basic instructions are provided with an instruction continuation designation bit for specifying whether or not the basic instructions can be processed at the same timing. An instruction buffer for storing instructions for each basic instruction, arithmetic units for calculating the basic instructions of the instruction buffer, a register for storing the arithmetic result of each arithmetic unit, and a value of the instruction continuation designation bit are determined. An instruction suppressing unit for suppressing the input of the basic instruction which is not to be processed at the same timing among the basic instructions to the operation unit; and the instruction suppressing unit is instructed not to perform the processing at the same timing. The input of the basic instruction after the basic instruction to the operation unit is suppressed, and the subsequent basic instructions that can be operated at the same timing before that are regarded as one instruction word, and Is intended to parallel processing by input to the arithmetic unit in timing,
Assuming that the one instruction word includes the M basic instructions, an instruction extension control register consisting of M bits and a mask pattern indicating a position of a valid basic instruction among the M basic instructions are stored in the instruction extension control register. An instruction word generation unit for setting an instruction basic control register to generate an instruction word with reference to the instruction extension control register; An instruction word having M basic instructions is generated by setting the basic instruction at a position corresponding to the pattern and giving no operation instruction or no instruction at a position corresponding to the mask pattern indicating that the instruction is invalid. Has a configuration.
[0022]
FIG. 1 shows the basic configuration of the present invention.
In FIG. 1 (a),
1 is a parallel processing processor.
[0023]
Reference numeral 2 denotes an instruction word, which includes a plurality of basic instructions. FIG. 1 illustrates an example in which six basic instructions constitute one instruction.
2 'is an instruction buffer for inputting and holding each basic instruction of the instruction word 2.
Reference numeral 3 denotes an instruction suppressing unit having an inhibitor 1, an inhibitor 2, an inhibitor 3, an inhibitor 4, an inhibitor 5, an inhibitor 6,... Each suppressor inputs a basic instruction at a position corresponding to each of the instruction words 2 from the instruction buffer 2 ′, and according to the instruction continuation designation bits of each basic instruction of the instruction word, the basic instructions that cannot be executed at the same timing. Execution is deterred. For example, if the instruction continuation designation bit is 0, it is executed at the same timing, and 1 indicates the end of a series of basic instructions that can be executed at the same timing.
[0024]
Reference numeral 4 denotes a decoder unit having decoders 1, 2 and 3, decoder 4, decoder 5, decoder 6,..., And decoder M corresponding to each of the suppressors, and a determination result of the corresponding suppressor. Is to decode the basic instruction of the instruction word 2 input according to.
[0025]
Reference numeral 5 denotes an operation unit, which has an operation unit 1, an operation unit 2, an operation unit 3, an operation unit 4, an operation unit 5, an operation unit 6, ..., an operation unit M, and each operation unit corresponds to each operation unit. This is for inputting the operation result of the decoder.
[0026]
Reference numeral 6 denotes a register section, which has a register space 1, a register space 2, a register space 3, a register space 4, a register space 5, a register space 6, ..., a register space M, and each register space corresponds to each. It holds the operation result of the operation unit.
[0027]
In command word 2,
10 and 11 are instruction continuation designation bits.
[0028]
[Action]
The operation of FIG. 1A will be described.
Each of the suppressors (1 to M) of the command suppressing unit 3 inputs a basic command at a corresponding position. Each inhibitor determines the value of the instruction continuation inhibition bit of each input basic instruction. For example, if the value is 0, it is assumed that the instructions are processed in parallel at the same timing. If the value is 1, the subsequent basic instruction inhibits the input to the decoder (up to the basic instruction having an instruction continuation inhibition bit value of 1). Input to the decoder).
[0029]
Therefore, the decoder unit 4 decodes the basic instructions input to the respective decoders and inputs the basic instructions to the arithmetic units (1 to M) connected to the respective decoders. The operation unit 5 performs an operation process on the instruction input in each of the operation units (1 to M). The register unit 6 stores the operation results of the operation units connected to the respective registers in the corresponding registers.
[0030]
FIG. 1B is a diagram illustrating the relationship between the number of basic instructions and the number of register spaces that can be processed in parallel at the same timing as the length of instruction words to be processed in parallel in the present invention.
FIG. 1B assumes that the number of register spaces is M. It is also assumed that the length of the basic instruction word included in the instruction word is N bits, and the number of basic instructions included in the instruction word is P.
[0031]
A basic instruction sequence followed by an instruction continuation bit having a value of 0 and a basic instruction having an instruction continuation bit having a value of 1 appearing after the series of instruction continuation bits are regarded as one instruction word, and a maximum of M (P = 1, 2,. , M) can be processed at the same timing. That is, the length of one instruction word that can be parallelized is M in the case of P = 1, 2,..., M.
[0032]
FIG. 2 is an operation example of the present invention.
FIG. 2A is an operation example, and FIG. 2B is an explanatory diagram of a register space.
In FIG. 2 (a),
An instruction word 21 has a basic instruction 1, a basic instruction 2, a basic instruction 3, a basic instruction 4, and a basic instruction 5. The instruction continuation bit of the basic instruction 1 is 0, and the instruction continuation bit of the basic instruction 2 is 1, and the basic instructions 1 and 2 have been processed last time.
[0033]
Reference numeral 22 denotes an instruction word 2, which is an instruction following the instruction word 1, and has a basic instruction 1, a basic instruction 2, a basic instruction 3, a basic instruction 4, a basic instruction 5, and a basic instruction 6.
The instruction continuation bit from the basic instruction 1 to the basic instruction 5 of the instruction word 1 (21) and the basic instruction 1 to the basic instruction 4 of the instruction word 2 (22) is 0. Since the continuation bit becomes 1, the processing from the basic instruction 3 of the instruction word 1 (21) to the basic instruction 5 of the basic instruction 2 (22) is subjected to the current processing. The instruction after the basic instruction 6 of the instruction word 2 (22) is processed next time.
[0034]
Reference numeral 29 denotes an instruction buffer for inputting and holding a basic instruction of an instruction word.
Reference numeral 30 denotes an instruction suppressing unit, which includes the suppressors 1 to 8.
[0035]
A decoder unit 31 includes decoders 1 to 8.
Reference numeral 32 denotes an operation unit, which includes operation units 1 to 8.
A register unit 33 includes register spaces 1 to 8.
[0036]
In FIG. 2A, up to the basic instruction 2 of the instruction word 1 (21) is processed at the previous timing. At this timing, each suppressor of the command suppressing unit 30 inputs a corresponding basic command. The suppressor 1 is the basic instruction of the instruction word 1 (21) 3, the suppressor 2 is the basic instruction 4, the suppressor 3 is the basic instruction word 5, and the suppressor 4 is the basic instruction 1 of the next instruction word 2 (22). , The suppressor 5 receives the basic instruction 2, the suppressor 6 receives the basic instruction 3, the suppressor 7 receives the basic instruction 4, and the suppressor 8 receives the basic instruction 5. Therefore, each suppressor determines the instruction continuation bit, and does not suppress the basic instruction up to the basic instruction 6 of the instruction word 2 (22) where the instruction continuation bit is 0 and the subsequent basic instruction and the instruction continuation bit is 1. Transfer to the decoder connected to each. In FIG. 2A, the number of uninhibited basic instructions and the number of register spaces are the same. For example, if the instruction continuation bit of the basic instruction 4 of the instruction word 2 (22) is 1, up to the basic instruction 4 Is transferred to the decoder.
[0037]
Each decoder of the decoder unit 31 decodes a basic instruction input thereto, each arithmetic unit of the arithmetic unit 32 performs an arithmetic operation on each instruction, and the register space of the register unit 33 stores the arithmetic operations of the arithmetic units connected to the respective units. Hold the result.
[0038]
FIG. 2B is an explanatory diagram of the register space.
Reference numeral 40 denotes a register space 1, which has a plurality of (for example, 64) individual registers 45.
[0039]
41 is a register space 2.
42 is a register space M.
An individual register 45 is, for example, a 128-bit register.
[0040]
FIG. 2B shows that one register space has 64 individual registers of, for example, 128 bits.
In the above description, if all the instruction continuation bits in the instruction buffer are 0, an exception of the instruction format is detected, and the start address of the instruction is notified to the operating system. The operating system divides this "long instruction word exceeding the allowable range of hardware" into an appropriate length and re-executes it. Alternatively, each basic instruction word is executed by sequentially simulating the basic instructions held in the instruction buffer.
[0041]
According to the present invention, a fixed-length long instruction word can be handled as a variable-length instruction word. When there are few basic instructions that can be processed in parallel at the same timing, the basic instructions that can be processed at the same timing with the next instruction word can be processed in parallel. Therefore, the execution speed of the parallel processing is increased, and the number of NOP instructions and the like added to make the instruction words have a fixed length is reduced, so that the memory use efficiency can be improved.
[0042]
【Example】
FIG. 3 shows an embodiment of the present invention.
In FIG.
51 is the current instruction word.
[0043]
A0 is a basic instruction whose instruction continuation designation bit is 0.
A1 is a basic instruction whose instruction continuation designation bit is 0.
A2 is a basic instruction whose instruction continuation designation bit is 0.
[0044]
A3 is a basic instruction whose instruction continuation designation bit is 0.
A4 is a basic instruction whose instruction continuation designation bit is 0.
A5 is a basic instruction whose instruction continuation designation bit is 1.
[0045]
52 is a next instruction word.
B0 is a basic instruction whose instruction continuation designation bit is 0.
B1 is a basic instruction whose instruction continuation designation bit is 0.
[0046]
55 is a parallel processing processor.
An instruction buffer 58 has eight buffers (60, 61, 62, 63, 64, 65, 66, 67). FIG. 3 shows a basic instruction (A0), a basic instruction (A1), a basic instruction (A2), a basic instruction (A3), a basic instruction (A4), a basic instruction (A5), a basic instruction (B0), This shows a state where the basic instruction (B1) is stored.
[0047]
Reference numeral 71 denotes an instruction continuation designation bit detector which inputs the instruction continuation designation bit (0) of the basic instruction (A0) in the buffer 60 and detects its value.
Reference numeral 72 denotes an instruction continuation designation bit detector which inputs the instruction continuation designation bits of the basic instructions (A0, A1) of the buffers 61 and 62 and detects the value thereof.
[0048]
An instruction continuation designation bit detector 73 inputs the instruction continuation designation bits of the basic instructions (A0, A1, A2) of the buffers 60, 61, and 62 and detects the value.
[0049]
An instruction continuation designation bit detector 74 inputs the instruction continuation designation bits of the basic instructions (A0, A1, A2, A3) of the buffers 60, 61, 62, and 63 and detects the value thereof. .
[0050]
Reference numeral 75 denotes an instruction continuation designation bit detector, which inputs the instruction continuation designation bits of the basic instructions (A0, A1, A2, A3, A4) of the buffers 60, 61, 62, 63, and 64 and detects the value thereof. Is what you do.
[0051]
Reference numeral 76 denotes an instruction continuation designation bit detector, which inputs instruction continuation designation bits of the basic instructions (A0, A1, A2, A3, A4, A5) of the buffers 60, 61, 62, 63, 64, and 65. That value is detected.
[0052]
Reference numeral 77 denotes an instruction continuation designation bit detector which detects the instruction continuation designation bits of the basic instructions (A0, A1, A2, A3, A4, A5, B0) of the buffers 60, 61, 62, 63, 64, 65, 66. Input and detect the value.
[0053]
Reference numeral 80 denotes an instruction suppression unit which includes inhibitors 81 to 87, and passes or inhibits a basic instruction input according to the detection value of each instruction continuation designation bit detector (71 to 77).
[0054]
Reference numeral 81 denotes a suppressor 1, which receives the basic instruction (A1) of the buffer 61 and passes or suppresses the input basic instruction (A1) according to the detection value of the instruction continuation designation bit detector 71. .
[0055]
Reference numeral 82 denotes a suppressor 2, which inputs the basic instruction (A2) of the buffer 62 and passes or suppresses the input basic instruction (A2) according to the detection value of the instruction continuation designation bit detector 72. .
[0056]
Reference numeral 83 denotes a suppressor 3, which inputs the basic instruction (A3) of the buffer 63 and passes or inhibits the input basic instruction (A3) according to the detection value of the instruction continuation designation bit detector 73. .
[0057]
Reference numeral 84 denotes the suppressor 4, which inputs the basic instruction (A4) of the buffer 64 and passes or inhibits the input basic instruction (A4) according to the detection value of the instruction continuation designation bit detector 74. .
[0058]
Reference numeral 85 denotes a suppressor 5, which inputs the basic instruction (A5) of the buffer 65 and passes or inhibits the input basic instruction (A5) according to the detection value of the instruction continuation designation bit detector 75. .
[0059]
Reference numeral 86 denotes the suppressor 6, which inputs the basic instruction (B0) of the buffer 66 and passes or inhibits the input basic instruction (B0) according to the detection value of the instruction continuation designation bit detector 76. .
[0060]
Reference numeral 87 denotes a suppressor 7, which inputs the basic instruction (B1) of the buffer 67 and passes or inhibits the input basic instruction (B1) according to the detection value of the instruction continuation designation bit detector 77. .
[0061]
Reference numeral 90 denotes a decoder unit which includes a decoder 1, a decoder 2, a decoder 3, a decoder 4, a decoder 5, a decoder 6, a decoder 7, and a decoder 8.
An operation unit 100 includes an operation unit 1, an operation unit 2, an operation unit 3, an operation unit 4, an operation unit 5, an operation unit 6, an operation unit 7, and an operation unit 8.
[0062]
Reference numeral 110 denotes a register unit having a register space 1, a register space 2, a register space 3, a register space 4, a register space 5, a register space 6, a register space 7, and a register space 8.
[0063]
The operation of the configuration of FIG. 3 will be described.
Each buffer (60, 61, 62, 63, 64, 65, 66, 67) of the instruction buffer 58 inputs a basic instruction A0, A1, A2, A3, A4, A5, B0, B1.
[0064]
The basic instruction A0 is directly input to the decoder 1.
The instruction continuation designation bit detector 71 receives the instruction continuation designation bit (0) of the basic instruction A0. Then, the suppressor inputs the detection result of the instruction continuation designation bit detector 71 and the basic instruction A1. Since the instruction continuation designation bit is 0, the suppressor 81 passes the basic instruction A1 and inputs it to the decoder 2.
[0065]
The instruction continuation designation bit detector 72 inputs the instruction continuation designation bit (0) of the basic instructions A0 and A1. Then, the suppressor 82 receives the detection result of the basic instruction A2 and the instruction continuation designation bit detector 72. Since the instruction continuation designation bits are all 0, the suppressor 82 passes the basic instruction A2 and inputs it to the decoder 3.
[0066]
The instruction continuation designation bit detector 73 inputs the instruction continuation designation bit (0) of the basic instructions A0, A1, A2. Then, the suppressor 83 inputs the detection result of the basic instruction A3 and the instruction continuation designation bit detector 73. Since the instruction continuation designation bits are all 0, the instruction is passed to the decoder 4 through the basic instruction A3.
[0067]
The instruction continuation designation bit detector 74 inputs the instruction continuation designation bit (0) of the basic instructions A0, A1, A2, A3. Then, the suppressor 84 inputs the detection result of the basic instruction A4 and the instruction continuation designation bit detector 74. The suppressor 84 passes the basic instruction A4 and inputs it to the decoder 5 because the instruction continuation designation bit is all 0s.
[0068]
The instruction continuation designation bit detector 75 inputs the instruction continuation designation bit (0) of the basic instructions A0, A1, A2, A3, and A4. Then, the suppressor 85 inputs the detection result of the basic instruction A5 and the instruction continuation designation bit detector 75. The suppressor 85 passes the basic instruction A5 and inputs the instruction to the decoder 6 because the instruction continuation designation bit is all 0s.
[0069]
The instruction continuation designation bit detector 76 receives the instruction continuation designation bit (0) of the basic instructions A0, A1, A2, A3, and A4 and the instruction continuation designation bit (1) of the basic instruction A5. Then, the suppressor 86 inputs the detection result of the basic instruction B0 and the instruction continuation designation bit detector 76. The suppressor 86 suppresses the passage of the basic instruction B0 because the instruction continuation designation bit has "1".
[0070]
The instruction continuation designation bit detector 77 includes an instruction continuation designation bit (0) for the basic instructions A0, A1, A2, A3, and A4, an instruction continuation designation bit (1) for the basic instruction A5, and an instruction continuation designation bit (0) for the basic instruction B0. ). Then, the suppressor 87 inputs the detection result of the basic instruction B1 and the instruction continuation designation bit detector 77. The suppressor 87 suppresses the passage of the basic instruction B1 because the instruction continuation designation bit has 1 in it.
[0071]
The decoder 1, decoder 2, decoder 3, decoder 4, decoder 5, and decoder 6 decode the basic instructions (A0, A1, A2, A3, A4, A5) respectively input. The basic instructions decoded by the respective decoders are input to arithmetic units connected to the respective instructions and operated. Then, the operation results are held in register spaces (1 to 6) connected to the respective operation units (1 to 6).
[0072]
FIG. 4 shows a first embodiment of the present invention, in which data is transferred between registers.
In FIG.
Reference numeral 120 denotes a long format instruction word, which is composed of P basic instruction words 121 of N bits (P = 1, 2,..., M (maximum number of register spaces)), each of which has an instruction continuation designation bit. With
[0073]
121 is a basic instruction word.
Reference numeral 130 denotes a decoder unit, which includes a decoder 1, a decoder 2, a decoder 3, a decoder 4, a decoder 5, and a decoder 6.
[0074]
Reference numeral 131 denotes an operation unit, which includes an operation unit 1, an operation unit 2, an operation unit 3, an operation unit 4, an operation unit 5, and an operation unit 6.
Reference numeral 132 denotes a register unit, which includes a register space 1, a register space 2, a register space 3, a register space 4, a register space 5, and a register space 6.
[0075]
Reference numeral 133 denotes a buffer register which copies and holds the data in the buffer register in the register space of the preceding stage, and inputs the data to the register space 1 according to an instruction from the arithmetic unit 1.
[0076]
Reference numeral 134 denotes a buffer register which receives and holds data in the register space 1 according to an instruction from the arithmetic unit 1.
Reference numeral 135 denotes a buffer register for copying and holding data in the buffer register 134 and inputting the data to the register space 2 according to an instruction from the arithmetic unit 2.
[0077]
A buffer register 136 receives and holds data in the register space 2 according to an instruction from the arithmetic unit 2.
A buffer register 137 copies and holds the data in the buffer register 136, and inputs the data to the register space 3 according to an instruction from the arithmetic unit 3.
[0078]
A buffer register 138 receives and holds data in the register space 3 in accordance with an instruction from the arithmetic unit 3.
Reference numeral 139 denotes a buffer register which copies and holds the data in the buffer register 138 and inputs the data to the register space 4 according to an instruction from the arithmetic unit 4.
[0079]
Reference numeral 140 denotes a buffer register which receives and holds data in the register space 4 according to an instruction from the arithmetic unit 4.
141 is a buffer register for copying and holding data in the buffer register 140 and inputting it to the register space 5 according to an instruction from the arithmetic unit 5.
[0080]
Reference numeral 142 denotes a buffer register which receives and holds data in the register space 5 according to an instruction from the arithmetic unit 5.
A buffer register 143 copies and holds the data in the buffer register 142 and inputs the data to the register space 6 according to an instruction from the arithmetic unit 6.
[0081]
Reference numeral 144 denotes a buffer register which receives and holds data in the register space 6 according to an instruction from the arithmetic unit 6. The data in the buffer register 144 is copied to a buffer register at a subsequent stage.
[0082]
Reference numeral 146 denotes a long-form instruction word, and its basic instruction 1 includes a store instruction (store Reg → a) that causes the buffer register (a) 134 to hold the contents of the register space 1.
[0083]
147 is a long instruction word, and its basic instruction 2 includes an instruction (Load b → Reg) for loading the contents of the buffer register (b) 135 into the register space 2.
[0084]
When performing data transfer between register spaces, first, the following operation is performed on a basic instruction corresponding to the register space for transmitting data. The case of transferring data from the register space 1 to the register space 2 will be described as an example.
[0085]
First, an instruction (store Reg → a) for storing the contents of the register space 1 in the buffer register a (buffer register 134) is set as the basic instruction 1 of the long-form instruction word 146 (the basic instruction 1 is set in the transfer program). The contents of the register space 1 are held in the buffer register (a). Next, an instruction (load Reg → b) for loading the contents of the buffer register b into the register space 2 is set in the basic instruction 2 corresponding to the register space 2 for receiving data. The contents of the buffer register b are loaded into the register space 2.
[0086]
FIG. 5 shows a second embodiment of the present invention.
In FIG.
Reference numeral 150 denotes a fetched instruction word (I), which is a basic instruction.
[0087]
Reference numeral 151 denotes a basic instruction word for setting an instruction extension control register, which sets a mask pattern representing a repetition pattern of the basic instruction word in the instruction word in the instruction extension control register 152.
[0088]
An instruction extension control register 152 is a long-form instruction word that repeats the basic instruction I, and includes a mask pattern composed of a bit representing a position of the basic instruction I and a bit identifying a non-basic instruction I. Have.
[0089]
Reference numeral 153 denotes an instruction generation unit which generates the instruction 154 based on the fetched basic instruction (I) 150 and the mask pattern of the instruction extension control register 152.
[0090]
Reference numeral 154 denotes a long-form instruction word to be executed.
In the second embodiment, when the maximum size of the instruction word is M (M basic instructions), M bits of M bits corresponding to the position (1, 2,..., M) of the basic instruction word one by one. A basic instruction word 151 for setting an instruction extension control register is provided. When a basic instruction word I (150) repeated as an instruction word is fetched, a bit pattern indicating whether the fetched instruction I is a basic instruction, NOP or no instruction is set is extended. Set in the control register. Whether the received basic instruction word follows the mask pattern of the instruction extension control register 152 or not is determined, for example, when the fetched instruction word is only one instruction word, the basic instruction is repeated according to the mask pattern. . Then, when the instruction I is fetched, the basic instruction word 151 of the instruction extension control register setting is referred to, and if the value of the bit position K of the instruction extension control register 152 is 0, the basic instruction word corresponding to the position K is NOP. I do. If the value 0 continues from the middle to the end of the pattern, no basic instruction needs to be set (see FIG. 6). If the value of the position K is 1, the long instruction word 154 is executed by regarding the basic instruction as I.
[0091]
FIG. 6 is an explanatory diagram of a command word generating method according to the second embodiment of the present invention.
In FIG.
160 is a command word generation program.
[0092]
The first line “setlen 0011111100” is a basic instruction word for setting a mask pattern “11111100” in the instruction extension control register.
The second line is a description for generating a command 171 composed of two basic commands, a basic command “add” having a basic command “add & sub” and a basic command “sub”.
[0093]
The third line “load & store” is a description for generating a command 172 composed of two basic commands, a basic command “load” and a basic command “store”.
[0094]
“Load” in the fourth line is a description for generating an instruction word 173 in which the basic instruction word is only “load” and six of which are repeated.
“Load” in the fourth line is a description for generating an instruction word 173 in which the basic instruction word is only “load” and six of which are repeated.
[0095]
“Add” on the fifth line is a description for generating an instruction word 174 in which the basic instruction word is only “add” and six of which are repeated.
“Multit” in the sixth line is a description for generating an instruction word 175 in which the basic instruction word is only “mult” and six of them are repeated.
[0096]
“Store” in the seventh line is a description for generating a command word 176 in which the basic command word is only “store” and which is repeated six times.
The eighth line "branch &nop" is for creating a command composed of the basic command "branch" and two basic commands "nop".
[0097]
Referring to FIG. 5, a description will be given of an instruction word generation method according to the second embodiment of the present invention in FIG.
The basic instruction word 151 (the instruction on the first line of the instruction word generation program 160 in FIG. 6) of the instruction extension control register setting is input, and the mask pattern (11111100) given by the instruction is set in the instruction extension control register. (The mask pattern is different from the mask pattern (11011111) in FIG. 5).
[0098]
Since the program description “add & sub” of the instruction word in the second line is a description of two basic instructions, the instruction word 171 is generated without generating the instruction word according to the mask pattern.
[0099]
Similarly, in the third line, the description "load &store" of the program is a description of two basic instructions, so that the instruction word 172 is generated without depending on the mask pattern.
Since the instruction word fetched according to the description of the fourth line “load” is only one basic instruction, the instruction word generation unit 153 refers to the instruction extension control register 152 and repeats six basic instruction words “load” according to the mask pattern. An instruction 173 is generated.
[0100]
According to the description in the fifth row, the instruction word similarly fetched is only one basic instruction “add”. Therefore, the instruction word generation unit 153 generates the instruction word 174 according to the mask pattern of the instruction extension control register 152.
[0101]
Since the instruction word fetched according to the description in the sixth row is only the basic instruction “multi”, the instruction word generation unit 153 generates the instruction word 175 by referring to the mask pattern of the instruction extension control register 152.
[0102]
According to the description on the seventh line, the fetched instruction word “store” is also only one basic instruction, so that the instruction word 176 is generated by referring to the mask pattern of the instruction extension control register 152.
[0103]
In the eighth line, only the "branch" instruction is sufficient. However, if the basic instruction word is one "branch" instruction, the instruction extension control register is referred to, and an instruction word for repeating six "branch" instructions is generated. Therefore, in order to prevent this, "nop" is added to the basic instruction word to describe two basic instructions, and the instruction word 177 is generated.
[0104]
In the present invention, it is not necessary to add any basic instruction when no basic instruction follows the basic instruction of the instruction word as in each instruction word in FIG.
Comparing the instruction word generation program 160 of this embodiment with the conventional instruction word generation program 210 of FIG. 8, the conventional instruction word generation program 210 requires a total of 29 basic instruction words to be described. In the present invention, a total of 11 basic instructions may be described. In addition, in the conventional instruction word, it is necessary to add a large number of NOP instructions to form a fixed-length instruction word, whereas in the present invention, this is not necessary as shown in FIG. Significantly improved. Also, the hit rate in a cache memory or the like increases.
[0105]
【The invention's effect】
According to the present invention, a fixed-length long instruction word can be handled as a variable-length instruction word. When there are few basic instructions that can be processed in parallel at the same timing, the basic instructions that can be processed at the same timing with the next instruction word can be processed in parallel. As a result, the execution speed of the parallel processing is increased, and the number of NOP instructions and the like added to make the instruction words have a fixed length is reduced, so that the memory utilization efficiency can be greatly improved. Also, the hit rate in the cache memory is increased.
[Brief description of the drawings]
FIG. 1 is a diagram showing a basic configuration of the present invention.
FIG. 2 is a diagram showing an operation example of the present invention.
FIG. 3 is a diagram showing a configuration of an embodiment of the present invention.
FIG. 4 is a diagram showing a first embodiment of the present invention.
FIG. 5 is a diagram showing a second embodiment of the present invention.
FIG. 6 is a diagram illustrating an instruction word generation method according to a second embodiment of the present invention.
FIG. 7 is a diagram illustrating a conventional long-form instruction word execution method.
FIG. 8 is a diagram showing a conventional method for generating a long-form instruction word.
[Explanation of symbols]
1: Parallel processor
2: Command word
2 ': Instruction buffer
3: Command suppression section
4: Decoder
5: Operation unit
6: Register section
10, 11: Instruction continuation specification bit

Claims (1)

複数の基本命令をまとめて一命令語として並列処理する並列処理プロセッサにおいて,
基本命令は同一タイミングで処理することの可否を指定する命令継続指定ビットを設けたものとし,
複数の基本命令を基本命令毎に格納する命令バッファと,該命令バッファの基本命令をそれぞれに演算する演算部と,それぞれの演算部の演算結果を格納するレジスタ,該命令継続指定ビットの値を判別して基本命令のうち同一タイミングで処理を行ってはならない基本命令の演算部への入力を抑止する命令抑止部とを備え,
前記命令抑止部は同一タイミングで処理をしてはならないことを指示された基本命令より後の基本命令の演算部への入力は抑止し,それ以前の同一タイミングで演算できる引き続く基本命令を一命令語とみなし,同一タイミングで演算部に入力して並列処理するものであり,
前記一命令語にM個の前記基本命令が含まれるとした時,Mビットからなる命令拡張制御レジスタと,M個の基本命令のうち有効な基本命令の位置を表すマスクパターンを該命令拡張制御レジスタにセットし,該命令拡張制御レジスタを参照して命令語を生成する命令語生成部とを備え,
入力された基本命令に対して,該マスクパターンを参照し,有効であることを示すマスクパターンに対応する位置に該基本命令をセットし,有効でないことを示すマスクパターンに対応する位置に無操作命令もしくはなにも命令を与えないことによりM個の基本命令をもつ命令語を生成することを特徴とする並列処理プロセッサ。
In a parallel processor that collectively processes multiple basic instructions as one instruction word,
The basic instruction shall have an instruction continuation specification bit for specifying whether it can be processed at the same timing.
An instruction buffer for storing a plurality of basic instructions for each basic instruction, an operation unit for operating each of the basic instructions in the instruction buffer, a register for storing the operation result of each operation unit, and a value of the instruction continuation designation bit. An instruction inhibiting unit for discriminating and inhibiting the input of the basic instruction that should not be processed at the same timing among the basic instructions to the arithmetic unit;
The instruction inhibiting unit inhibits the input of the basic instruction after the basic instruction instructed not to be processed at the same timing to the arithmetic unit, and outputs one basic instruction that can be operated at the same timing before that instruction. Are considered as words and input to the arithmetic unit at the same time for parallel processing.
Assuming that the one instruction word includes M basic instructions, an instruction extension control register consisting of M bits and a mask pattern indicating a position of a valid basic instruction among the M basic instructions are stored in the instruction extension control register. An instruction word generation unit that sets the instruction word in a register and generates an instruction word by referring to the instruction extension control register;
Referring to the input basic instruction, the mask pattern is referred to, the basic instruction is set at a position corresponding to the mask pattern indicating validity, and no operation is performed at a position corresponding to the mask pattern indicating invalidity. A parallel processor which generates an instruction word having M basic instructions by giving no instruction or any instruction.
JP03652595A 1995-02-24 1995-02-24 Parallel processor Expired - Fee Related JP3569338B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP03652595A JP3569338B2 (en) 1995-02-24 1995-02-24 Parallel processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03652595A JP3569338B2 (en) 1995-02-24 1995-02-24 Parallel processor

Publications (2)

Publication Number Publication Date
JPH08234978A JPH08234978A (en) 1996-09-13
JP3569338B2 true JP3569338B2 (en) 2004-09-22

Family

ID=12472224

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03652595A Expired - Fee Related JP3569338B2 (en) 1995-02-24 1995-02-24 Parallel processor

Country Status (1)

Country Link
JP (1) JP3569338B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3730455B2 (en) 1999-10-01 2006-01-05 富士通株式会社 Information processing apparatus and information processing method

Also Published As

Publication number Publication date
JPH08234978A (en) 1996-09-13

Similar Documents

Publication Publication Date Title
US6823448B2 (en) Exception handling using an exception pipeline in a pipelined processor
JP3842474B2 (en) Data processing device
GB2553783A (en) Vector multiply-add instruction
JP2012529096A (en) Data processing apparatus and method for handling vector instructions
TWI764966B (en) A data processing apparatus and method for controlling vector memory accesses
JP2620511B2 (en) Data processor
US11714641B2 (en) Vector generating instruction for generating a vector comprising a sequence of elements that wraps as required
US6275903B1 (en) Stack cache miss handling
JP3749233B2 (en) Instruction execution method and apparatus in pipeline
JP3834145B2 (en) Data processing apparatus having a microprocessor having a nestable delay branch instruction and a method of operating the microprocessor
JP3569338B2 (en) Parallel processor
JP5786719B2 (en) Vector processor
US6170050B1 (en) Length decoder for variable length data
CN111984313A (en) Vector bit transposition
JP6340887B2 (en) Arithmetic processing device and control method of arithmetic processing device
CN112579168B (en) Instruction execution unit, processor and signal processing method
JP2783285B2 (en) Information processing device
WO2002029554A2 (en) Register move operations
JP3475861B2 (en) Data processing device
US5729729A (en) System for fast trap generation by creation of possible trap masks from early trap indicators and selecting one mask using late trap indicators
JP2904624B2 (en) Parallel processing unit
JPH0619705A (en) Pipeline control method
JPH0496132A (en) Electronic computer
JPH02211533A (en) Computer apparatus for performing selective execution of instruction following branch instruction
JPH06314196A (en) Information processing method and device

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040109

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20040109

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20040203

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040405

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20040518

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040618

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20090625

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100625

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110625

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120625

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20120625

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130625

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees