JPS6155706B2 - - Google Patents
Info
- Publication number
- JPS6155706B2 JPS6155706B2 JP9292779A JP9292779A JPS6155706B2 JP S6155706 B2 JPS6155706 B2 JP S6155706B2 JP 9292779 A JP9292779 A JP 9292779A JP 9292779 A JP9292779 A JP 9292779A JP S6155706 B2 JPS6155706 B2 JP S6155706B2
- Authority
- JP
- Japan
- Prior art keywords
- calculation
- fifo
- memory
- data
- time
- 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
Links
- 230000015654 memory Effects 0.000 claims description 56
- 238000012545 processing Methods 0.000 claims description 39
- 238000012546 transfer Methods 0.000 claims description 27
- 238000004364 calculation method Methods 0.000 description 100
- 238000000034 method Methods 0.000 description 39
- 238000010586 diagram Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 6
- 230000008030 elimination Effects 0.000 description 5
- 238000003379 elimination reaction Methods 0.000 description 5
- 230000036961 partial effect Effects 0.000 description 5
- 239000011159 matrix material Substances 0.000 description 4
- 238000006467 substitution reaction Methods 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000002829 reductive effect Effects 0.000 description 3
- 239000012530 fluid Substances 0.000 description 2
- 229940050561 matrix product Drugs 0.000 description 2
- 241000053227 Themus Species 0.000 description 1
- 150000001875 compounds Chemical class 0.000 description 1
- 238000000354 decomposition reaction Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 230000000284 resting effect Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 230000002441 reversible effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Landscapes
- Complex Calculations (AREA)
- Multi Processors (AREA)
Description
本発明は、高速計算のための並列処理計算機で
あつて、簡単な構成で数多くのプロセツサの組み
込みが可能で、しかも高能率なMIMD形の複合計
算機に関するものである。
従来、偏微分方程式のイクスプリシツト差分解
法に典型的に見られる様に、すべての格子点での
計算手順が同一である場合を想定し、各格子点毎
あるいは隣接する幾つかの格子点を集めたブロツ
ク毎の処理を1台づつのプロセツサに担わせると
いう構想に基くマルチコンピユーターあるいはマ
ルチプロセツサが幾つか知られている。そのう
ち、制御装置の一元的管理の下ですべてのプロセ
ツサが完全に同期して同じステツプ数のマイクロ
命令を実行するという2次元アレイプロセツサタ
イプのSIMD形計算機(ILLIACなど)ではか
なり限られた計算法に対して偉力を発揮するがそ
の他の計算法に対しては、離れたプロセツサ間の
データー転送や、それの一元的管理の面で不都合
な接続構成になつていて、あまり能率がよくな
い。次に、すべてのプロセツサ間のデーター転送
が直接的に行える様にするため共有メモリーと共
通バスを設ける方法も幾つか提案され、バス競合
やメモリー競合を時分割バスシステム、クロスバ
ススイツチシステムあるいは多ポートメモリーシ
ステムの形で処理しているが、それぞれ、バスコ
ントロールが複雑で能率が下つたり、ハードウエ
ア量が莫大になつたり、メモリーが高価となる欠
点を持つている。さらに、メモリー競合を避ける
ため、共有メモリー相当分を各プロセツサの私有
メモリー部分に設け、メモリーの更新はブロード
キヤステイング機能によつて行い、計算処理は各
プロセツサが独自で行うというSIMDとMIMDの
混合形計算機(天気予報用のSMS201など)もあ
るが、やはり用途が極く限られてしまう。
本発明は、一つに利用者側からみたとき偏微分
方程式の数値解法におけるADI法や分割作用素法
なども容易に使えるようにするためには一次元配
列構成のプロセツサ群の1台づつのプロセツサが
格子点の各一次元配列の計算を担う方が能率がよ
いこと、また行列演算やFFT計算でも、一次元
配列構成が無駄のない妥当なものであるとの知見
からなされた。もう一つはアーキテクチヤにおい
て、任意のプロセツサ間の直接的なデーター転送
が可能であるようにするために、クロスバタイプ
のネツトワークになるが、そのハードウエア量を
極力小さくするために一元的管理方式でなく、独
自で転送機能をもつバツフアメモリーを介するこ
と、そしてプロセツサ側でも能率向上化のために
DMAチヤネルを設けるという考えに基いてなさ
れた。
本発明の複合計算機では、それぞれが私有メモ
リーを有する1台の主プロセツサと複数N台の従
プロセツサからなる階層的アーキテクチアをとる
構成において並行処理の途中のデーターを従プロ
セツサ間で送受することのためにN行N列の2次
元配列のバツフアメモリーを設け、プロセツサ側
に具えるDMAチヤネルに接続する形をとる。
図面によつて本発明計算機の基本的なバス接続
方法を説明する。第1図及び第1A図は、その基
本形及び機能モデルを示すものであり、主プロセ
ツサをMU、従プロセツサをAU−j(j=0、
1、………、N−1)そして好ましくはFIFO型
のバツフアメモリーをBM−(i、j)(i、j=
0、1、………、N−1)と記す。第1図におい
てMUのデーターバスは、すべてのBM−(i、
j)(i、j=0、1、………、N−1)につな
がり、各AU−jのデーターバスはj行目のBM
−(i、j)(i=0、1………、N−1)および
j列目のBM−(j、k)(k=0、1、………、
N−1)につながつている。
また、BMとしてFIFOを用いる場合には、好
ましい使用例としてこれらすべてのFIFOには出
力側から入力側へ戻す循環用データーバスも具え
られている。各BM−(i、j)でみるとき、第
2図に示されている様に、入力側にはAU−iお
よびAU−jからの2種のデーターバスがそれぞ
れゲートを通してつながり、出力側は、それぞれ
別のゲートを通して、入力側に入つたと同じデー
ターバスに接続されている。ただし、第2図の実
施例においては、MUとAUとのデータのやりと
りもBMを通して行う場合のためのバス、及び
BMとしてFIFOを用いるときの循環用データバ
スも付加してある。循環用データーバスはMUへ
のデーターバスが使用されるのと同時に使用され
るようになつている。そして、循環させる必要が
ないとき、そのバスは切れる様になつている。こ
の循環用バスは逐次計算過程で途中結果をMUに
送つたとき、それと同じデーターが引き続き、
AUでの計算に利用されるような場合にFIFOに
残しておくのが都合よいときに用いられる。
上記のようなパスビルデイングを持つた並列計
算機では、明らかに、MUと任意のAUの間およ
び任意のAU同志の間で直接的なデーター転送が
可能であるから汎用性が著しく拡がる。そのう
え、任意のAU同志間でデーターの相互変換が同
時にできて能率がよい。AU−iとAU−jの間
でデーター交換を行う場合に、AU−iがBM−
(i、j)にデーターを送り、つづいてBM−
(j、i)からデーターを受けとる動作と、AU
−jがBM−(j、i)にデーターを送り、つづ
いてBM−(i、j)からデーターを受けとる動
作が全く並行して行われる。さらに大事な点は、
互いに相手側のプロセツサの進行状況を直接に関
知することなく、間に立つBMにデーターが現れ
ることだけをみていればよい。しかも、そのデー
ターの出現を指示するOUTPUT READY信号を
DMAコントローラが受信する様にしてあるの
で、プロセツサとしてはそのデーターが実際に必
要になるまで他の計算を進めておればよく、非同
期式の利点がよく生かされている。
また、一元的管理方式を排した非同期式である
ために、本来、信号線の数が少くてよいととも
に、共通バスをもたないクロスバタイプのパスビ
ルデイングであるにも拘らず、各BMに外から接
続されるデーターバスはたかだか3種類だけであ
るために、ハードウエア量が比較的に少くてよい
点はプロセツサの台数を増すことに大きく道を拓
くものである。
つぎに、本計算機の並列処理動作の理解を容易
にするため、並列プログラムとその処理の概要を
説明する。この場合、取扱うべき2次元配列デー
タは、それらの格子点座標を(I、J)としたと
き(ただし、I、J=1、2、3………N−1、
N)、文字Uで代表させ、通常はU(I、J)と
して表現されるべき変数である。
第1A図は、第1図に示した従プロセツサ群
AU−0、………AU−(N−1)が、バツフア−
マトリクス〔BM−(i、j)〕を介しての接続構
造により、各バツフアーメモリーBMを前記各格
子点(I、J)に対応させた場合に格子点の各行
(J)を受けもつAU−縦列(実線円の列)と、
格子点の各列(I)を受けもつAU横列(破線円
の横列)として見られるという機能モデルを示し
たものである。ただし、従プロセツサAU及びバ
ツフアーメモリーBMにおける番号又は座標を表
わすi及びjは0からN−1までの整数であり、
格子点座標のI及びJは前記の通り、1からNま
での整数であるため、それぞれ、i=I−1、及
びj=J−1となることに留意すべきである。し
たがつて、2次元配列変数は各格子点(I、J)
について、縦列中のJ(=j+1)番目の従プロ
セツサAUにより、行位置(I=1、2………
N)データを扱うことを意味した
U(I、/J/)
及び、横列中のI(=i+1)番目の従プロセツ
サAUによりJ列のデータを扱うことを意味する
U(/I/、J)
として表わされる。これにより、並列演算はいず
れかの行位置中の全格子点、及びいずれかの列位
置中の全格子点について、各一つの従プロセツサ
により実行される。並列処理プログラムは、例え
ば次の通りである。
PDO 10 J=1、N
DO 20 I=1、N
20U(/I/、J)=U(I+1、/J/)
+U(I−1、/J/)
10 CONTINUE、
ここに、PDOは、PARALLELDO文を示し、
ラベル番号10までの実行文をインデツクスJの動
く範囲に相当するAU−j(j=J−1)の組が
各行位置について並列処理することを指示する。
インデツクスIについてのDO文は指示された従
プロセツサが共通に行う標準的処理である。な
お、上記PDO文中に現れる式の右辺の配列変数
はすべてU(※、/J/)の形のものに限る(た
だし、列位置にあればU(/I/、※)の形とな
る)。これは明快な並列動作を指示するための制
約である。また、左辺には列位置用のU(/
I/、J)が出ているが、このとき、代入用の
“=”操作の中にバツフアメモリを介したデータ
転送が含まれるのである。
上記の代入文では、第1A図の縦列(実線)位
置にあるすべての従プロセツサは、ラベル番号20
の式の右辺の計算結果が出るだびに各従プロセツ
サが対応する行位置のバツフアメモリ(i、j)
群(i=0、1、………、N−1)に書き入れて
いく。指定された縦プロセツサによる上記のよう
なバツフアメモリへの書き込みが済めば、同じく
第1A図の横列(破線図示)位置から見てすべて
の縦プロセツサがそれぞれにつながるバツフアメ
モリの内容を集め、これによつて{U(/I/、
J)}を得るものである。かくして、第1A図の
列位置において、例えば次のようなプログラムに
移ることができる。
PDO 30 I=1、N
DO 40 J=1、N
40U(/I/、J)=U(/I/、J+1)
+U(/I/、J−1)
30 CONTINUE
この例では代入文が転送をともなわないものに
なつている。
本発明の並列処理動作は上記のとおりであり、
以下、本発明の装置構成の実施例につき詳細に説
明する。
実施例
本発明の効果を確認するための試作例を掲げ
る。この実施例では、市販のマイクロコンピユー
タの中で、本発明の試作実施に都合がよいと判断
した8ビツトマイクロプロセツサF8(米フエア
チヤイルド社およびモステツク社)を用いた。全
体構成の概略は第3図に示されている。主プロセ
ツサMUと16台に示されている。主プロセツサ
MUと16台の従プロセツサAU−j(j=0、
1、2、………、F−16進数表示)と16行16列の
2次元配列のバツフアメモリーBM−(i、j)
を構成するFIFO群からなつている。MUは
CPU3850とDMI3852(ダイナミツクメモリーイ
ンターフエイス)と2台のDMA3854(ダイレク
トメモリーアクセス)とPIO3861(ベリフエラル
I/O)と4KバイトROMおよび8KバイトRAM
から成つている。1台のDMAは従プロセツサと
のデーター送受を制御し、もう1台のDMAは
I/Oプロセツサ(この試作品ではF8ソフルウ
エアー開発用ボードSDB−50 MK79019を利用)
とのデーター送受を制御する。PIOはMUが直接
にデーターを入出力するためと、AUからの割り
込み要求を受け入れるために具えられている。ま
た、すべてのAUは同一構成になつていて、それ
ぞれCPU、DMI、DMA(1台)、2KバイトROM
および4KバイトRAMから成つている。そして、
各FIFOメモリーは、64ワード×4ビツト
FIFO3341Aの2ケを並列接続して作られてい
る。この実施例の全体構成の主要部とバス接続の
模様が第3図に示されている。図では、例えば、
FIFO(O、F)には、MUからと、AU−Fから
と、AU−Oからのバスおよび循環用バスが接続
されている様子が読みとれるであろう。
第2図に示した各FIFOメモリーにおけるバス
接続法を実施した回路が第4図に描かれており、
ゲートの開閉の論理が図の中央部に示されてい
る。この論理はプロセツサとFIFOの間の信号線
の開閉にも利用される。FIFO−(i、j)への
データーシフトイン要求(SI REQ)あるいはデ
ーターシフトアウト要求(SO REQ)は関与す
る3台のプロセツサMU,AU−j,AU−iから
くるが、SI REQとSO REQは全く独立に受け入
れられるようになつている。第4図の中央の左側
にSI REQ用、右側にSO REQ用の論理が組んで
あるが、いずれにおいても1つのプロセツサがこ
のFIFOとの間のデーターの送受を行つていると
き、他のプロセツサの要求は受けつけられないよ
うになつている。要求が受け付けられたプロセツ
サにはイソプツトレデイー(IR)あるいはアウ
トプツトレデイー(OR)信号が と
して送られる。FIFOはそのプロセツサからの
XFER信号を受けると同時にデーターを入力する
があるいは出力する。各プロセツサのSI REQお
よびSO REQ信号は、CPU上のポート1(P1)
にラツチさせるデーターから作られる。MUが
FIFO−(i、j)とデーターをやりとりしたい
ときには(P1)7〜0に16進2ケタ数字‘ij’をお
く。AU−jがFIFO−(ij)とデーターをやりと
りしたいときには(P1)4〜0に‘oi’をおく。同
じくAU−jがFIFO−(j、i)とデーターのや
りとりをするときには(P1)4〜0に‘1i’をお
く。このデーターはプロセツサがDMAコントロ
ーラに始動を指示するのに先立つてラツチされな
ければならない。そのデーターによつてSI
FEQ、SO REQ信号を作る論理は第5図に示さ
れている。この図で、点線で囲んだ部分がそれぞ
れ1枚の板の上に乗せられる分である。REQ−
j板とはj行目に並ぶFIFO群(FIFO−(i、
j)(i=0、1、2、………、F)とj列目に
並ぶFIFO群(FIFO−(j、i)(i=0、1、
2………、F))へ送るSI REQとSO FEQ信号
を作る論理を乗せた板である。なおFIFO群その
ものは各行に並ぶものを集めて1枚の板に乗せ
る。
MUと各AU−j間で送受される、その他の信
号はCPU上のポート0(P0)を通して交わされ
る。第6図にその詳細が描かれている。ここで、
MUの(P0)3〜0には信号を交わしたいプロセツ
サAU−jの16進番号‘j’をラツチする。それ
に加えて(P0)6に1をおくときは、AU−jに計
算のスタートを指示するものと約束し、(P0)4に
1をおくときは、再度プログラム読み込みの状態
に戻すことを指示するものと約束する。またMU
が(P0)7に1を受けたときはAU−jから計算終
了の信号が送られたものと解する。つぎに、MU
が(P0)5に1をおくときは、(P0)3〜0の値に拘ら
ず、すべての従プロセツサに同時に同じ指示を与
えることを意味する。一方、U−j側では、
(P0)7に1をおくことはMUを計算終了を知らせ
ることであり、(P0)5に1をおくことはMUに割
り込み要求をすることをになつている。また、
(P0)6に1を受けると計算のスタート指示を得た
と解し、(P0)4に1を受けると、計算を休止し、
再度プログラム読み込み状態に戻る指示を得たと
解するものとする。
参考計算例
この試作実施例を用いる計算例をあげ、単一の
CPUで行う計算(いまの場合、MUだけで行う計
算)との比較により、本発明計算機の効果につい
て述べる。なお、以下で計算時間とは機械語で作
成したプログラムをたどつて算出したものであ
る。
そのまえに、まずこの実施例計算機に組み込ま
れた各プロセツサの基本サイクルと基本ルーチン
処理時間をあげておく。F8 CPUのクロツクは最
大2MHzであつて、このクロツクで作動させると
クロツクサイクルは500nsである。マシンサイク
ルには短いものと長いものとがあつて、それぞれ
2μs(4クロツクサイクル)と3μs(6クロ
ツクサイクル)である。個々の命令サイクルは、
これらのマシンサイクルの組み合せからなり、最
短2μsのものから最長13μsのものまである。
なお、各マシンサイクルの間でCPUがメモリー
の読み書きをしていない残余の時間にRAMのリ
フレツシユやDMA転送を行うので、DMA転送ス
ピードは高速で、ほぼ1マシンサイクルあたり1
バイトの転送が行われる。実際にはリフレツシユ
モードや命令の種類により、巾があつて1バイト
の転送時間の最短2μsから最長5μsである。
さて、浮動小数点演算はすべて4バイト長(指
数部1バイト、仮数部3バイト)で行うものとす
る。浮動小数点演算用のマイクロプログラムは、
すべてのプロセツサの私メモリーROMに入れて
ある。そのうち幾つかのサブルーチンの計算実行
時間をあげておく。浮動加減算は、場合によつて
巾があり、26μs〜1600μsとなるが、通常の場
合を想定すれば、大きめにみて1ms程度とな
る。また浮動乗算(ブース法)は、3.5ms、浮
動除算(引き放し法)は4msになる。浮動小数
点数のレジスター間転送は20μs、メモリー・レ
ジスター間転送は32μsである。また浮動小数点
数1語をFIFOを介して転送するには(FIFOに
停まることがないとき)典型値で20μsかかる
が、これはCPU内でのレジスター間転送と同程
度である。ただしこれらの転送を行うサブルーチ
ンへジヤンプする前の置数等にかかる時間に違い
があつて、レジスター間転送へ行くまえに17μ
s、レジスター・メモリー間転送へ行くには25μ
s、FIFOを介したメモリー・メモリー間転送へ
行くには53μsだけかかる(この場合、DMAコ
ントローラへの指示も含まれる)。
次に、効果と直接に関係ないが、FIFOバツフ
アメモリーを介したデーター転送のソフトウエア
上の便宜をはかつておく。すなわち、FIFOの2
次元配列に対応した専用メモリーをMUおよびす
べてのAUのRAM中に設ける。MUのRAMには、
16×16の2次元配列状のメモリーを確保するもの
とし、しかも各結節点に4ワード(16バイト)分
の容量を用意する(これを深さ4ワードのメモリ
ーと表現し、各ワード分に番号m=0、1、2、
3をつける)。そのために必要な4096バイト用に
バイト番地2000〜2FFFをあてる。そしてFIFO
−(i、j)に対応するのが2ijo〜2ijFの4ワー
ド長である。一方、AU−jのRAMには、これに
直接つながるクロス状配置のFIFO−(i、j)
(i=0、1、………、F)とFIFO−(i、k)
(k=0、1、………、F)に対応して1次元配
列状のメモリーを2つ並びだけ確保するものと
し、しかも各点に深さ8ワード分を用意する(各
ワードに再び番号m=0、1、………、7をつけ
る)。そのために必要な1024バイト用にバイト番
地1COO〜1FFFをあてる。そのうち1COO〜
1DFF番地が横線状配置のFIFO−(i、j)(i
=0、1、………、F)に対応し、1EOO〜
1FFF番地が縦線状配置のFIFO−(i、k)(k
=0、1、………、F)に対応する。そして
FIFO−(i、j)に対応するのが‘1COO+20×
i〜1CIF+20×i’の8ワード長で、FIFO−
(j、k)に対応するのが、‘1EOO+20×k〜
1EIF+20×k’の8ワード長である(第7,
8,9図参照)。以下では、MUの深さをもつた
2次元配列専用メモリーあるいはAUの深さをも
つたクロス状配列専用メモリーにおいて同一の深
さ位置にある(スライスされた)メモリーを表現
するために記号((m=・))を用いることにする。
さらに、AUの場合、クロス状メモリーのうち、
横線上のものに行メモリー、縦線上のものに列メ
モリーを冠して呼ぶことにする。
計算例 1
(行列の積)
16行16列の2つの行列AとBがMU内の専用メ
モリー((m=0))と((m=1))に与えられてい
て、行列の積ABを計算して、結果を((m=0))
に入れるものとする。この計算をAU群によつて
行うために、Aの各行を対応するAUの行メモリ
ー((m=0))へ送る(Aの第j行{a}i=
0、1、………、FをAU−jに送る)。つぎ
に、Bの各列を対応した列を位置するすべての
FIFOに(シリアルに)入れる。(第k列にある
FIFO−(k、i)(i=0、1、………、F)に
はすべて同じくBの第k列の要素がつめられる。
いまの場合、ちようど16ワード分で各FIFOが一
杯になる)。AU−jはk=0、1、………、F
の順に、FIFO−(k、j)のデーターを受けて
は積和
The present invention relates to a parallel processing computer for high-speed calculations, which has a simple configuration, can incorporate a large number of processors, and is highly efficient. Conventionally, as is typically seen in explicit difference decomposition methods for partial differential equations, each grid point or several adjacent grid points are collected, assuming that the calculation procedure at all grid points is the same. Several multicomputers or multiprocessors are known that are based on the concept of having one processor handle processing for each block. Of these, two-dimensional array processor-type SIMD computers (such as ILLIAC), in which all processors completely synchronize and execute microinstructions with the same number of steps under the central control of a control unit, have very limited computation capabilities. However, when it comes to other calculation methods, the connection structure is inconvenient in terms of data transfer between distant processors and centralized management, and it is not very efficient. Next, several methods have been proposed to provide shared memory and a common bus to allow direct data transfer between all processors, and to reduce bus contention and memory contention by time-sharing bus systems, cross-bus switch systems, or multi-processor systems. They are processed in the form of port memory systems, but each has the disadvantages that the bus control is complicated and efficiency is reduced, the amount of hardware is enormous, and the memory is expensive. Furthermore, in order to avoid memory contention, an equivalent amount of shared memory is provided in the private memory area of each processor, memory updates are performed using a broadcasting function, and calculation processing is performed independently by each processor, a combination of SIMD and MIMD. There are shape calculators (such as the SMS201 for weather forecasts), but their uses are extremely limited. From the user's point of view, the present invention is designed to facilitate the use of the ADI method, split operator method, etc. in the numerical solution of partial differential equations. This was done based on the knowledge that it is more efficient to perform calculations for each one-dimensional array of grid points, and that a one-dimensional array configuration is efficient and appropriate for matrix operations and FFT calculations. The other is the architecture, which is a crossbar type network that enables direct data transfer between arbitrary processors, but central management is required to minimize the amount of hardware involved. In order to improve efficiency on the processor side, it is possible to use buffer memory that has its own transfer function instead of using
It was based on the idea of creating a DMA channel. In the compound computer of the present invention, in a hierarchical architecture consisting of one main processor and a plurality of N slave processors, each having its own private memory, it is possible to send and receive data during parallel processing between the slave processors. For this purpose, a two-dimensional buffer memory with N rows and N columns is provided and connected to a DMA channel provided on the processor side. The basic bus connection method of the computer of the present invention will be explained with reference to the drawings. Figures 1 and 1A show its basic form and functional model, where the main processor is MU and the slave processor is AU-j (j=0,
1, ......, N-1) and preferably FIFO type buffer memory as BM-(i, j) (i, j=
0, 1, ......, N-1). In Fig. 1, the MU data bus includes all BM-(i,
j) (i, j = 0, 1, ......, N-1), and the data bus of each AU-j is connected to the j-th BM
- (i, j) (i=0, 1......, N-1) and j-th column BM-(j, k) (k=0, 1,......,
N-1). Furthermore, when using FIFOs as the BM, all of these FIFOs are preferably provided with a circulating data bus returning from the output side to the input side. When looking at each BM-(i, j), as shown in Figure 2, two types of data buses from AU-i and AU-j are connected to the input side through gates, and the output side is , each connected to the same data bus that entered the input side through separate gates. However, in the embodiment shown in Fig. 2, a bus and a
A data bus for circulation when using FIFO as BM is also added. The circular data bus is intended to be used at the same time as the data bus to the MU. And when there is no need for circulation, the bus is designed to turn off. When this circulation bus sends intermediate results to the MU during the sequential calculation process, the same data continues to be sent to the MU.
It is used when it is convenient to leave it in the FIFO, such as when it is used for calculations in AU. Obviously, a parallel computer with the above-mentioned path building allows for direct data transfer between an MU and any AU, and between any AUs, greatly expanding its versatility. Moreover, data can be converted simultaneously between any AU comrades, making it efficient. When exchanging data between AU-i and AU-j, AU-i
Send data to (i, j), then BM-
The operation of receiving data from (j, i) and the AU
-j sends data to BM-(j, i), and then receives data from BM-(i, j), which are performed completely in parallel. More importantly,
Each side does not have to be directly concerned with the progress of the other side's processor; they only have to watch the data appear in the BM that stands between them. Moreover, the OUTPUT READY signal indicating the appearance of the data is
Since the DMA controller receives the data, the processor only has to proceed with other calculations until the data is actually needed, making good use of the advantages of the asynchronous method. In addition, because it is an asynchronous system that eliminates a centralized management system, it inherently requires fewer signal lines, and even though it is a crossbar type path building that does not have a common bus, each BM can be externally connected. Since there are at most three types of data buses connected to each other, the amount of hardware required is relatively small, which opens the door to increasing the number of processors. Next, in order to facilitate understanding of the parallel processing operation of this computer, an overview of the parallel program and its processing will be explained. In this case, the two-dimensional array data to be handled is when the grid point coordinates are (I, J) (I, J = 1, 2, 3...N-1,
N), represented by the letter U, is a variable that should normally be expressed as U(I, J). Figure 1A shows the slave processor group shown in Figure 1.
AU−0,……AU−(N−1) is buffer
When each buffer memory BM is made to correspond to each grid point (I, J) by the connection structure via the matrix [BM-(i, j)], the AU that handles each row (J) of the grid point - columns (rows of solid circles);
This shows a functional model in which each row (I) of grid points can be seen as an AU row (row of broken-line circles). However, i and j representing numbers or coordinates in the slave processor AU and buffer memory BM are integers from 0 to N-1,
It should be noted that since the grid point coordinates I and J are integers from 1 to N as described above, i=I-1 and j=J-1, respectively. Therefore, the two-dimensional array variable has each grid point (I, J)
, the row position (I=1, 2......) is determined by the J (=j+1)th slave processor AU in the column.
N) U(I, /J/) which means handling data, and U(/I/, J which means handling data in column J by the I (=i+1)th slave processor AU in the row) ) is expressed as Thereby, parallel operations are performed by one slave processor for all grid points in any row position and all grid points in any column position. For example, the parallel processing program is as follows. PDO 10 J=1, N DO 20 I=1, N 20U(/I/, J)=U(I+1,/J/) +U(I-1,/J/) 10 CONTINUE, Here, PDO is Indicates the PARALLELDO statement,
It instructs that the executable statements up to label number 10 be processed in parallel for each row position by a set of AU-j (j=J-1) corresponding to the movement range of index J.
The DO statement for index I is a standard process commonly performed by the designated slave processors. All array variables on the right side of the expression that appear in the above PDO statement must be of the form U (*, /J/) (however, if they are in a column position, they will be of the form U (/I/, *)) . This is a constraint that clearly directs parallel operation. Also, on the left side there is a U (/
I/, J), in which the "=" operation for assignment includes data transfer via buffer memory. In the above assignment statement, all slave processors in column (solid line) positions in Figure 1A have label number 20.
Each time the calculation result of the right side of the equation is obtained, each slave processor stores the buffer memory (i, j) at the corresponding row position.
Write into the group (i=0, 1, ......, N-1). Once the specified vertical processor writes to the buffer memory as described above, all the vertical processors collect the contents of the buffer memory connected to each other when viewed from the horizontal row (indicated by the broken line) position in FIG. 1A, and thereby {U(/I/,
J)}. Thus, in the column position of FIG. 1A, one can move to, for example, the following program. PDO 30 I=1, N DO 40 J=1, N 40U (/I/, J) = U (/I/, J+1) +U (/I/, J-1) 30 CONTINUE In this example, the assignment statement is It has become something that does not involve The parallel processing operation of the present invention is as described above,
Hereinafter, embodiments of the device configuration of the present invention will be described in detail. Examples A prototype example will be presented to confirm the effects of the present invention. In this example, an 8-bit microprocessor F8 (manufactured by Fairchild Inc. and Mostek Inc., USA), which was judged to be convenient for implementing the prototype of the present invention among commercially available microcomputers, was used. An outline of the overall configuration is shown in FIG. The main processor MU and 16 units are shown. main processor
MU and 16 slave processors AU-j (j=0,
1, 2, ......, F - hexadecimal representation) and buffer memory BM - (i, j) of a two-dimensional array of 16 rows and 16 columns.
It consists of a group of FIFOs that make up the MU is
CPU3850, DMI3852 (dynamic memory interface), two DMA3854 (direct memory access), PIO3861 (veriferal I/O), 4K byte ROM and 8K byte RAM
It consists of One DMA controls data transmission and reception with the slave processor, and the other DMA is an I/O processor (this prototype uses the F8 software development board SDB-50 MK79019).
Control data transmission and reception with. PIO is provided for MU to directly input/output data and to accept interrupt requests from AU. In addition, all AUs have the same configuration, each with a CPU, DMI, DMA (1 unit), and 2K byte ROM.
and 4K bytes of RAM. and,
Each FIFO memory is 64 words x 4 bits
It is made by connecting two FIFO3341A in parallel. The main parts of the overall configuration and bus connections of this embodiment are shown in FIG. In the figure, for example,
It can be seen that the buses from MU, AU-F, AU-O, and the circulation bus are connected to FIFO (O, F). A circuit implementing the bus connection method for each FIFO memory shown in Figure 2 is depicted in Figure 4.
The logic for opening and closing the gate is shown in the center of the diagram. This logic is also used to open and close signal lines between the processor and FIFO. Data shift-in requests (SI REQ) or data shift-out requests (SO REQ) to FIFO-(i, j) come from the three involved processors MU, AU-j, and AU-i, but SI REQ and SO REQ is becoming accepted quite independently. The logic for SI REQ is organized on the left side of the center of Figure 4, and the logic for SO REQ is organized on the right side. In both cases, when one processor is sending and receiving data to and from this FIFO, the logic requests are no longer being accepted. An isopt ready (IR) or output ready (OR) signal is sent to the processor that accepts the request. The FIFO is
It inputs or outputs data at the same time it receives the XFER signal. Each processor's SI REQ and SO REQ signals are routed to port 1 (P1) on the CPU.
It is created from the data to be latched to. M.U.
When you want to exchange data with FIFO-(i, j) (P1), put a hexadecimal 2-digit number 'ij' between 7 and 0 . When AU-j wants to exchange data with FIFO-(ij) (P1), put 'oi' between 4 and 0 . Similarly, when AU-j exchanges data with FIFO-(j, i), put '1i' in (P1) 4 to 0 . This data must be latched before the processor instructs the DMA controller to start. SI by that data
The logic for creating the FEQ and SO REQ signals is shown in FIG. In this figure, the parts surrounded by dotted lines are each placed on one board. REQ−
The j-board is a group of FIFOs (FIFO-(i,
j) (i = 0, 1, 2, ......, F) and the FIFO group in the jth column (FIFO - (j, i) (i = 0, 1,
2......This is a board that carries the logic to create the SI REQ and SO FEQ signals sent to F)). The FIFO group itself is collected in each row and placed on one board. Other signals sent and received between the MU and each AU-j are exchanged through port 0 (P0) on the CPU. The details are depicted in Figure 6. here,
The hexadecimal number 'j' of the processor AU-j with which you want to exchange signals is latched in (P0) 3 to 0 of the MU. In addition, when we put 1 in (P0) 6 , we promise to instruct AU-j to start calculation, and when we put 1 in (P0) 4 , we instruct it to return to the state of loading the program again. I promise to do it. Also MU
When (P0) receives 1 at 7 , it is understood that a signal indicating the end of calculation has been sent from AU-j. Next, M.U.
When (P0) 5 is set to 1, it means that the same instruction is given to all slave processors at the same time, regardless of the value of (P0) 3 to 0 . On the other hand, on the U-j side,
Placing 1 in (P0) 7 is to notify the MU that calculation has finished, and placing 1 in (P0) 5 is to request an interrupt to the MU. Also,
(P0) If you receive a 1 at 6 , you will understand that you have received an instruction to start calculation, and if you receive a 1 at (P0) 4 , you will stop the calculation.
It is assumed that the instruction to return to the program loading state has been obtained. Reference calculation example Here is a calculation example using this prototype example.
The effects of the computer of the present invention will be described by comparing it with calculations performed by the CPU (in this case, calculations performed only by the MU). Note that the calculation time below is calculated by following a program created in machine language. Before that, the basic cycle and basic routine processing time of each processor incorporated in this embodiment computer will be listed. The maximum clock speed of the F8 CPU is 2MHz, and when operated with this clock, the clock cycle is 500ns. There are short and long machine cycles, 2 μs (4 clock cycles) and 3 μs (6 clock cycles), respectively. Each instruction cycle is
It consists of a combination of these machine cycles, ranging from the shortest 2 μs to the longest 13 μs.
Note that during each machine cycle, the CPU refreshes the RAM and performs DMA transfers during the remaining time when it is not reading or writing memory, so the DMA transfer speed is fast, approximately 1 time per machine cycle.
A transfer of bytes takes place. In reality, the width varies depending on the refresh mode and the type of instruction, and the transfer time for one byte ranges from a minimum of 2 μs to a maximum of 5 μs. Now, assume that all floating point operations are performed with a length of 4 bytes (1 byte for the exponent and 3 bytes for the mantissa). The microprogram for floating point arithmetic is
All processors have it in their memory ROM. The calculation execution time of some of these subroutines will be listed below. Floating addition/subtraction has a width depending on the case, and is 26 μs to 1600 μs, but assuming a normal case, it is about 1 ms at a larger scale. Also, floating multiplication (Booth method) takes 3.5 ms, and floating division (pull-off method) takes 4 ms. Floating point number transfer between registers takes 20 μs, and transfer between memory registers takes 32 μs. Also, it typically takes 20 μs to transfer one word of floating point number through the FIFO (when it is never stopped in the FIFO), which is about the same as a register-to-register transfer within the CPU. However, there is a difference in the time it takes to set the numbers before jumping to the subroutine that performs these transfers, and it takes 17μ before going to the register-to-register transfer.
s, 25μ to go to register/memory transfer
s, it takes only 53 μs to go to the memory-to-memory transfer via the FIFO (in this case, it also includes instructions to the DMA controller). Next, although not directly related to the effect, we will consider the software convenience of data transfer via the FIFO buffer memory. In other words, FIFO 2
Dedicated memory corresponding to the dimensional array is provided in the RAM of the MU and all AUs. MU's RAM contains
A 16 x 16 two-dimensional array of memory is secured, and each node has a capacity of 4 words (16 bytes) (this is expressed as a 4-word deep memory, and each word has a capacity of 4 words (16 bytes)). Number m=0, 1, 2,
(Give 3). Allocate byte addresses 2000 to 2FFF for the 4096 bytes required for this purpose. and FIFO
-(i,j) corresponds to a length of 4 words from 2ijo to 2ijF. On the other hand, the RAM of AU-j has a cross-arranged FIFO-(i, j) directly connected to it.
(i = 0, 1, ......, F) and FIFO - (i, k)
(k = 0, 1, ......, F), two one-dimensional array memories are secured, and a depth of 8 words is prepared at each point (each word is Add number m = 0, 1, ......, 7). Allocate byte addresses 1COO to 1FFF for the 1024 bytes required for this purpose. Of these, 1COO~
1DFF address is FIFO-(i,j)(i
= 0, 1, ......, F), 1EOO ~
FIFO-(i, k) (k
=0, 1, ......, F). and
'1COO+20× corresponds to FIFO−(i,j)
FIFO- with a length of 8 words i~1CIF+20×i'
(j, k) corresponds to '1EOO+20×k~
It is 8 words long (1EIF + 20 x k') (7th,
(See Figures 8 and 9). In the following, the symbol (( We will use m=・)).
Furthermore, in the case of AU, among the cross-shaped memories,
The memory on the horizontal line will be called the row memory, and the memory on the vertical line will be called the column memory. Calculation example 1 (Matrix product) Two 16-by-16-column matrices A and B are given to dedicated memories ((m=0)) and ((m=1)) in the MU, and the matrix product AB Calculate the result ((m=0))
shall be placed in In order to perform this calculation using the AU group, each row of A is sent to the row memory ((m=0)) of the corresponding AU (jth row of A {a}i=
0, 1, ......, F to AU-j). Next, for each column of B, locate all the corresponding columns.
Put it in FIFO (serial). (in the kth column
FIFO-(k, i) (i=0, 1, . . . , F) is filled with the elements of the kth column of B.
In this case, each FIFO is filled with just 16 words.) AU−j is k=0, 1, ......, F
In this order, the data of FIFO-(k, j) is received and
【式】を計算し、その結果を行メ
モリー((m=1))にストアする。この計算はすべ
てのAUが並行して行うことになる。最後に、各
AUの行メモリー((m=1))のすべてをMUの専
用メモリー((m=0))に転送してやればよい。以
上の計算に必要な時間は1.27秒になる。このうち
各AUが16ケの積和を計算する時間が1.20秒であ
り、大部分を占めている。
比較のために、上の計算を並列処理でなくMU
だけで単一処理を行うと、そのときの計算時間は
19.4秒となる。従つて(並列処理時間)/(単一
処理時間)=1/15.3である。16台のAUを用いて
15.3倍のスピードアツプだから能率比は0.95(=
15.3/16)であるといえる。
計算例 2
(連立一次方程式のガウス消去解法)
16元連立一次方程式
を解く問題で、係数行列A={aji}の各行に対応
したAUの行メモリー((m=0))にあらかじめ与
えられているとする。行列Aの第j行{aji}i
=0、………、FはAU−jの行メモリー〓m=
0))に与えられる。そして、方程式の右辺のデー
ター{bj}j=0、1、………、FがMU内のあ
る場所(例えばIBCO〜IBFF番地)に与えられた
とき、方程式を解き、その解{xi}i=0、1、
………、Fを同じ場所にストアするものとする。
この問題をガウス消去法で解くために、まず
{bj}j=0、1、………、Fの各成分bjをそれ
ぞれAU−jの一定の場所(例えばIEOO〜IE03
番地)に転送する。転送後は、AU側だけで計算
されるが、ここでは、消去の際、特別なピボツテ
イングが不要で単純に計算が続くものとして、計
算時間の評価を行う。さて、未知数x0の消去を行
うために係数(a01/a00、a02/a00、……
…、a0F/a00、b0/a00)を
AU−0で計算し、その結果をAU−1からAU−
Fまでのすべてに送る。このとき、AU−j(j
=1、2、………、F)に送るには、FIFO−
(j、0)(j=1、2、………、F)を介すると
よい。それを受けたすべてAUで消去計算を並行
して行う。次に、変数x1の消去のために、係数計
算をAU−1で行い、AU−2からAU−Fまでの
すべてに送る。それを受けたAUで消去計算を並
行して行う。この操作を順次繰り返えしていく。
最後にたどりついた式からAU−FがxFの値を
決めると、この値の代入計算にうつるが、その場
合、xFの値をすべてのAU−E〜AU−0へ順に
転送し、それぞれにおいてxFの代入計算をやつ
てしまう。つづいて、AU−Eで未知数xEを決
め、その値をAU−D〜AU−0へ順に転送し、
それを受けたAUでは直ちにxEの代入計算を済
ませてしまう。このように逐次代入計算を行つて
いくが、その際、既知となつたxj値をすべての
AU−k(k=j−1、j−2、………、0)に
転送している間、その値を得たAU−(j−1)
は直ちにxj-1を決める計算を同時に行うことが
可能である。また得られた解の値をMUに送るこ
とも計算の終つたAUから順次行えばよい。以上
の計算に要する時間は887msである。
一方、同じ問題をMUだけで単一処理する場合
の時間は7277msである。従つて(並行処理時
間)/(単一処理時間)=1/8.2となり、能率比
は0.51(=8.2/16)である。この場合、能率比
が0.51まで落ちこむのは、ガウス消去法のアルゴ
リズムに本来的にシリアルな部分がかなりの割合
を占めるからであつて、止むを得ないことであ
る。
計算例 3
(FFTの計算)
FFTの計算を、本発明の並列処理計算機でど
のように行うかを説明するために必要な範囲で、
もともとのアルゴリズムを述べる。取り扱う離散
的なフーリエ変換を式
で定義する。ただし、ここで簡単のために、N=
2〓(γは自然数)とする。FFTの計算法では
{x0(k)}から{X(n)}を求めるために
{x0(k)}→{x1(k)}→………
→{xl(k)}→………{x〓(k)}
のステツプをを踏む。ここで{xl-1(k)}から
{xl(k)}の計算には、対になつた式の組
を用いる。ここでpの値はインデツクスkをγビ
ツトの2進数字で表示し、つぎにこの2進数字を
γ−lビツト分右シフトし、上位γ−lビツトに
は0を埋め、その後ビツトの順序をひつくり返え
した2進数字のとる値に等しくする。最後に得ら
れた{x〓(k)}から求める{X(n)}を得るた
めには、nの2進数表示のビツト順序をひつくり
返えしたときの値をと表わすとき、X(n)=
x〓()とすればよい。
(※)式の計算は、具体的には
の形で行われる。
このアルゴリズムをMUだけで実行する場合に
は、(※)式に従つてxl(k)とxl(k′)の対毎に計
算を行つていくので、k=0、1、2、………と
順を追つていけば、先に計算済みのものに到るこ
とがあるが、そこはとばして先に行けばよい。例
えばN=16(γ=4)のとき、{x1(k)}を求める
のに、k=0、1、………、7まで計算すれば、
k=8、………、Fに対する計算は既に済んでい
る。
上のアルゴリズムをできるだけ並列処理によつ
てAU群で実行する方法を説明する。まず、途中
で必要になるCOS値、SIN値の数表があらかじめ
用意されている場合について述べる。xl(k)の計
算は、AU−kが担うものとすれば番号の対kと
k′に対応したプロセツサAU−kとAU−k′(※
※)の計算を並行処理させる。実際に、AU−
k′が、xl-1(k′)値をFIFO−(k′、k)に送るの
と同時にAU−kはxl-1(k)をFIFO−(k、k′)に
送る。そしてAU−k′がFIFO−(k、k′)からxl
−1(k)を受けとるのと同時にAU−kはFIFO−
(k′、k)から、xl-1(k′)を受けとる。つづい
て、AU−k′がTRを計算し、その計果をFIFO−
(k′、k)に送るのと同時に、AU−kはTIを計
算し、その結果をFIFO−(k、k′)に送る。そし
てまたそれぞれのプロセツサが対応したFIFOを
介してTIあるいはTRを受けとる。最後に、AU
−k′はxl(k′)の値を決め、AU−kはxl(k)の値
を決める。これらの動作がすべての対(k、k′)
に対して同時に並行的に行われ、そしてl=1、
2、………、γと逐次計算される。
さて、COS値、SIN値を数表で与えておくので
はなく、必要の都度計算する場合には、CORDIC
法を用いると都合がよい。それは、このアルゴリ
ズムがまた一対のAU−kとAU−k′を用いること
によつてうまく計算されるからである(CORDIC
法そのものの計算については後掲の計算例4で述
べる)。
N=16として、16台のAUを用いる場合の計算
時間を掲げておく。
(i) COS値、SIN値の数表をあらかじめ用意して
おく場合
MUだけによる計算では690msである。一
方、MUからAU群にデーターを与え、その後
AU群に計算を行わせ、最終結果をMUにまで
戻す時間は60msとなる。したがつて(並列処
理時間)/(単一処理時間)=1/11.5であ
り、能率比は0.72(=11.5/16)となる。
(ii) COS値、SIN値を必要の都度CORDIC法によ
つて計算する場合
MUだけで行う計算時間は2600msであり、
AU群によつて計算する場合は244msとな
る。したがつて(並列処理時間)/(単一処理
時間)=1/10.66であつて、能率比は0.67(=
10.66/16)となる。
上の結果で、(i)の場合の能率比が0.72ほどまで
になるのは、MUだけで行う計算においてとばす
ということがなされるのに対してAU群による計
算では確かにうまく対毎の計算が行われスピード
アツプになるが、転送にかかる時間分だけ能率を
おとすからである(とばす計算時間は0であ
る)。(ii)の場合には、さらにCORDIC法が完全に
並列化されるアルゴリズムでないことによつても
う少し能率比が落ちてしまうのである。
計算例 4
(CORDIC法によるCOS値、SIN値の計算)
計算例3のFFT計算で必要になつたのはcos
pπ/8、sinpπ/8(0p7)の値であつた。
ここ
ではpを与えたとき、それらの値をCORDIC法に
基いて、2台のAU−kとAU−k′の対が計算する
ものとする。4p7に対しては関係式cos
pπ/8=−cos8−p/8πとsinpπ/8=sin8−
p/8πを利用す
るものとすれば0p3に対して計算されれば
よい。この場合アルゴリズムは次の様になる。
初期値を
x0=0.60725293501………、y0=0、v0=pπ/
8とおき、n=0、1、2、………、16に対して
次の反復計算を行う(完止法)(n=16でとめて
いるのは10進で5桁ぐらいの精度でよしとするか
らである)。
(i) vo〓0ならばxo+1=xo−2-nyo、
yo+1=yo+2-nxo、vo+1=vo−γo、
(ii) vo<0ならばxo+1=xo+2-nyo、
yo+1=yo−2-2xo、vo+1=xo+γo
ただし、ここでγo=arctan2-n(n=0、1、
2、………、16)の値は用意されているとする。
最後に得られるx17とy17をそれぞれcos pπ/8
とsin pπ/8の近似値とするものである。この
アルゴリズムをAU−kとAU−k′の対に実現させ
るとすれば、AU−kに{xo+1を決める計算さ
せ、AU−k′に{yo+1}を決める計算をさせるも
のとする。初期値や{γo}、{vo}の値はいづれ
のAUも保持し、{vo+1}の計算はどちらのAUに
おいても実行するものとする(一方だけで計算し
て他方に転送する方法よりすこしだけスピードが
早いからである)。このとき1つのpに対して計
算時間は47.7msとなる。
一方、上記アルゴリズムを単独のMUだけで計
算するときの時間は60msである。従つて(並列
処理時間)/(単一処理時間)=1/1.2となり、
能率比は0.6(=1.2/2)である。能率比が0.6に
とどまるのは、{vo+1}の計算を2台のプロセツ
サで分業することができないからである。このこ
とが、また計算例3の最後のところに述べたこと
につながるのである。
計算例 5
(ADI法の応例−ナビエ・ストークス方程式の
差分解法)
非圧縮性粘性流体の2次元的流れを記述するナ
ビエ・ストークス方程式を流れ関数Ψと渦度ζを
用いて表現すれば
∂ζ/∂t+∂Ψ/∂y∂ζ/∂x−∂Ψ/∂x∂ζ/
∂y=1/RΔζ
(Rはレイノズル数)
ζ=−ΔΨ
となる。いま、正方形状のくぼみ領域0<x、y
<1内の流れを考えるものとし、
境界条件
Ψ=0
および
∂Ψ/∂x(0、y)=∂Ψ/∂x(1、y)=0、
∂Ψ/∂y(x、0)=0
∂Ψ/∂y(x、1)=U
を与える。そして初期条件は静止状態に対応した
Ψ=0、ζ=0
とする。これは、くぼみの中の流体が開いた一辺
での一様速度Uでどのように駆動されるかをみる
ためのモデルになつている。
上の偏微分方程式系を近似的に解く差分法の中
でADI法の範ちゆうに入るものの一例をあげる。
正方形領域0<x、y<1の各辺を15等分し、格
子間隔h=1/15の網目をつくり、格子点(x
i、yj)=(ih、jh)上の未知関数値をζi、jなどと
表わす。また、時間ステツプ巾をτとし、時刻t
=nτにおける値を、さらに上つき添数でもつて
ζn i、jなどと表わす。差分商に対して次のような
記号を用いる:
Δ1hζi、j=1/h2(ζi+1、j−2ζi、j+ζi-1、j
)、
Δ2hζi、j=1/h2(ζi、j+1−2ζi、j+ζi、j-1
)、
δ1hζi、j=1/2h(ζi+1、j−ζi-1、j)、
δ2hζi、j=1/2h(ζi、j+1−ζi、j-1)、
実際に、計算例として用いる差分アルゴリズム
は次の通りである:J=15としてCalculate [Formula] and store the result in the row memory ((m=1)). This calculation will be performed in parallel by all AUs. Finally, each
It is sufficient to transfer all of the AU's row memory ((m=1)) to the MU's dedicated memory ((m=0)). The time required for the above calculation is 1.27 seconds. Of this, each AU takes 1.20 seconds to calculate the sum of 16 products, which accounts for the majority of the time. For comparison, the above calculation is performed using MU instead of parallel processing.
If a single process is performed with only
It will be 19.4 seconds. Therefore, (parallel processing time)/(single processing time)=1/15.3. Using 16 AUs
Since the speed is increased by 15.3 times, the efficiency ratio is 0.95 (=
15.3/16). Calculation example 2 (Gaussian elimination method for simultaneous linear equations) 16-element simultaneous linear equations Assume that the problem is to solve , and the AU row memory ((m=0)) corresponding to each row of the coefficient matrix A={aji} is given in advance. jth row {aji}i of matrix A
= 0, ......, F is the row memory of AU-j〓m=
0)) is given. Then, when the data on the right side of the equation {bj}j=0, 1, ......, F is given to a certain location in the MU (for example, addresses IBCO to IBFF), solve the equation and find the solution {xi}i =0, 1,
......, F are stored in the same location.
In order to solve this problem using Gaussian elimination, first, {bj}j=0, 1, ......, each component bj of F is fixed at a fixed location in AU−j (for example, IEOO~IE03
address). After transfer, calculations are performed only on the AU side, but here we evaluate the calculation time assuming that no special pivoting is required during deletion and calculations simply continue. Now, in order to eliminate the unknown x 0 , we need the coefficients (a 01 /a 00 , a 02 /a 00 , . . .
..., a 0F /a 00 , b 0 /a 00 ) with AU-0, and convert the result from AU-1 to AU-
Send to all up to F. At this time, AU−j(j
= 1, 2, ......, F), use FIFO-
It is preferable to use (j, 0) (j=1, 2, . . . , F). All AUs that receive it perform elimination calculations in parallel. Next, in order to eliminate the variable x 1 , coefficient calculation is performed in AU-1 and sent to all from AU-2 to AU-F. The AU that receives it performs elimination calculations in parallel. Repeat this operation sequentially.
When AU-F determines the value of x F from the formula arrived at last, it moves on to calculation of substitution of this value, but in that case, the value of x F is transferred to all AU-E to AU-0 in order, and each In this case, we perform the substitution calculation for x F. Next, determine the unknown x E in AU-E, transfer the value to AU-D to AU-0 in order,
Upon receiving this, the AU immediately completes the substitution calculation for x E. In this way, we perform sequential substitution calculations, and at that time, we use the known xj values for all
While transferring to AU-k (k=j-1, j-2, ......, 0), AU-(j-1) that obtained its value
It is possible to immediately perform calculations to determine x j-1 at the same time. In addition, the values of the obtained solutions can be sent to the MUs sequentially starting from the AU where the calculation has been completed. The time required for the above calculation is 887 ms. On the other hand, the time required for single processing of the same problem using only MU is 7277ms. Therefore, (parallel processing time)/(single processing time)=1/8.2, and the efficiency ratio is 0.51 (=8.2/16). In this case, the efficiency ratio drops to 0.51, which is unavoidable because the Gaussian elimination algorithm inherently has a large proportion of serial parts. Calculation example 3 (FFT calculation) To the extent necessary to explain how to perform FFT calculation using the parallel processing computer of the present invention,
The original algorithm will be described. The formula for handling discrete Fourier transforms is Defined by However, here, for simplicity, N=
2〓 (γ is a natural number). In the FFT calculation method, in order to find {X(n)} from {x 0 (k)}, {x 0 (k)} → {x 1 (k)} → ...... → {x l (k)} →……Take the step of {x〓(k)}. Here, to calculate {x l (k)} from {x l-1 (k)}, a set of paired equations is required. Use. Here, the value of p is expressed by expressing the index k as a binary digit of γ bits, then shifting this binary digit to the right by γ-l bits, filling the upper γ-l bits with 0, and then changing the bit order. is equal to the value of the binary digit that is repeated over and over again. In order to obtain {X(n)} from the finally obtained {x〓(k)}, when the value obtained by reversing the bit order of the binary representation of n is expressed as n)=
x〓(). (*) The calculation of formula is specifically It is done in the form of When this algorithm is executed only by MU, calculations are performed for each pair of x l (k) and x l (k') according to formula (*), so k = 0, 1, 2, If you follow the order, you may arrive at something that has already been calculated, but you can just skip that and move on. For example, when N = 16 (γ = 4), to find {x 1 (k)}, if you calculate up to k = 0, 1, 7,
The calculation for k=8,...,F has already been completed. We will explain how to execute the above algorithm on a group of AUs using parallel processing as much as possible. First, we will discuss the case where a numerical table of COS values and SIN values that will be required during the process is prepared in advance. If AU−k is responsible for the calculation of x l (k), then the number pair k and
Processors AU-k and AU-k′ (*
*) calculations are processed in parallel. In fact, AU−
At the same time that k' sends the x l-1 (k') value to FIFO-(k', k), AU-k sends x l-1 (k) to FIFO-(k, k'). And AU−k′ is x l from FIFO−(k, k′)
−1 (k) and at the same time AU−k receives FIFO−
From (k', k), receive x l-1 (k'). Next, AU−k′ calculates TR and sends the result to FIFO−
At the same time as sending to (k', k), AU-k calculates TI and sends the result to FIFO-(k, k'). Each processor also receives TI or TR via its corresponding FIFO. Finally, the AU
-k' determines the value of x l (k'), and AU-k determines the value of x l (k). These operations form all pairs (k, k′)
simultaneously and in parallel, and l=1,
2, . . . , γ are calculated sequentially. Now, if you want to calculate the COS value and SIN value each time you need them, instead of giving them in a numerical table, use the CORDIC
It is convenient to use the law. This is because this algorithm is also successfully computed by using the pair AU−k and AU−k′ (CORDIC
The calculation of the method itself will be described in Calculation Example 4 below). The calculation time when using 16 AUs with N=16 is listed below. (i) When tables of COS and SIN values are prepared in advance Calculation using only MU takes 690ms. On the other hand, the MU gives data to the AU group, and then
The time it takes to have the AU group perform calculations and return the final results to the MU is 60ms. Therefore, (parallel processing time)/(single processing time)=1/11.5, and the efficiency ratio is 0.72 (=11.5/16). (ii) When calculating the COS value and SIN value using the CORDIC method each time it is necessary, the calculation time for MU alone is 2600ms,
When calculating by AU group, it is 244ms. Therefore, (parallel processing time) / (single processing time) = 1/10.66, and the efficiency ratio is 0.67 (=
10.66/16). In the above result, the efficiency ratio in case (i) is about 0.72 because calculations performed only with MUs are skipped, whereas calculations performed with AU groups are performed successfully in pairwise calculations. This is because, although this speeds up, efficiency is reduced by the time required for transfer (the calculation time skipped is 0). In the case of (ii), the efficiency ratio is further reduced because the CORDIC method is not a fully parallelized algorithm. Calculation example 4 (Calculation of COS and SIN values using the CORDIC method) What was required for the FFT calculation in calculation example 3 was cos.
The values were pπ/8 and sinpπ/8 (0p7).
Here, when p is given, it is assumed that a pair of two units, AU-k and AU-k', calculates these values based on the CORDIC method. For 4p7, the relational expression cos
pπ/8=−cos8−p/8π and sinpπ/8=sin8−
If p/8π is used, it is sufficient to calculate for 0p3. In this case, the algorithm is as follows. Initial value x 0 = 0.60725293501……, y 0 = 0, v 0 = pπ/
Every 8, perform the following iterative calculation for n = 0, 1, 2, ......, 16 (complete method) (The number n = 16 is decimal and has an accuracy of about 5 digits. (Because it is good.) (i) If v o 〓0, then x o+1 = x o −2 -n y o , y o+1 = y o +2 -n x o , v o+1 = v o −γ o , (ii) If v o <0, then x o+1 = x o +2 -n y o , y o+1 = y o -2 -2 x o , v o+1 = x o + γ o However, here γ o = arctan2 -n (n=0, 1,
2, ......, 16) are prepared.
The finally obtained x 17 and y 17 are each cos pπ/8
and sin pπ/8. If we were to implement this algorithm for the pair AU−k and AU−k′, we would have AU−k perform calculations to determine {x o+1 , and AU−k′ to perform calculations to determine {y o+1 }. shall be taken as a thing. The initial value and the values of {γ o } and {v o } are maintained in all AUs, and the calculation of {v o+1 } is executed in both AUs (it is assumed that the calculation is performed in only one and then in the other). (This is because it is slightly faster than the transfer method.) At this time, the calculation time for one p is 47.7 ms. On the other hand, the time required to calculate the above algorithm using only a single MU is 60 ms. Therefore, (parallel processing time) / (single processing time) = 1/1.2,
The efficiency ratio is 0.6 (=1.2/2). The efficiency ratio remains at 0.6 because the calculation of {v o+1 } cannot be divided between two processors. This also leads to what was stated at the end of calculation example 3. Calculation example 5 (Example of ADI method - finite difference method of Navier-Stokes equations) If the Navier-Stokes equations that describe the two-dimensional flow of an incompressible viscous fluid are expressed using the flow function Ψ and vorticity ζ, ∂ ζ/∂t+∂Ψ/∂y∂ζ/∂x−∂Ψ/∂x∂ζ/
∂y=1/RΔζ (R is the Reynozzle number) ζ=−ΔΨ. Now, a square hollow area 0<x, y
<1, boundary conditions Ψ=0 and ∂Ψ/∂x(0, y)=∂Ψ/∂x(1, y)=0, ∂Ψ/∂y(x, 0) =0 ∂Ψ/∂y(x, 1)=U. The initial conditions are Ψ=0 and ζ=0, which correspond to the resting state. This is a model to see how the fluid in the cavity is driven at a uniform velocity U on one open side. Here is an example of a finite difference method that approximately solves the above system of partial differential equations that falls within the scope of the ADI method.
Divide each side of the square area 0<x, y<1 into 15 equal parts, create a mesh with grid spacing h=1/15, and divide the grid points (x
The unknown function values on i , yj )=(ih,jh) are expressed as ζi , j , etc. Also, let the time step width be τ, and the time t
The value at =nτ is further expressed as ζ n i , j , etc. using a superscript index. The following symbol is used for the difference quotient: Δ 1h ζ i , j = 1/h 2 (ζ i+1 , j −2ζ i , j +ζ i-1 , j
), Δ 2h ζ i , j = 1/h 2 (ζ i , j+1 −2ζ i , j +ζ i , j-1
), δ 1h ζ i , j = 1/2h (ζ i+1 , j −ζ i-1 , j ), δ 2h ζ i , j = 1/2h (ζ i , j+1 −ζ i , j -1 ), In fact, the difference algorithm used as a calculation example is as follows: With J = 15
【表】【table】
【表】
ここでΨの上つき添数rは内部反復の何回目で
あるかを示し、その反復回数をRo+1、反復のパ
ラメーターをτn+1〓としている。
上記のアルゴリズムをAU群によつて実現する
ために、ζ計算の前半部分(1)の、各jに対応した
値の組[Table] Here, the superscript index r of Ψ indicates the number of internal iterations, the number of iterations is R o+1 , and the iteration parameter is τ n+1 〓. In order to realize the above algorithm using the AU group, the set of values corresponding to each j in the first half of the ζ calculation (1) is
【式】(i=1、2、………、J−
1)を未知数とする連立方程式を解くことを各
AU−jに行わせ、後半部分(2)の、各jに対応し
た値{ζn+1 j、k(k=1、2、………J−1)を
未
知数とする連立方程式を解くこともAU−jに行
わせるものとする。Ψについて解く(3)、(4)でも同
様な分担を行う。
以下では、1回の時間ステツプn+n−1を踏
むのにかかる計算時間を考えるものとする。い
ま、AU−jに着目し、そのメモリーに{ζ
n i、j}、{Ψn i、j}(i=0、1、2、………
、J)
および{ζn j、k}、{Ψn j、k}(k=0、1、
……
…、J)が保持されているとする。そして、各
AU−i(i=1、………、J−1)には{h2Δ2
hζn i、j}、{2hδ2hζn i、j}{2hδ2hΨn i
、j}(j=
1、2、………、J−1)の値も保持されている
とする。なお、各AU−iが{ζn i、j}と{Ψ
n i、j}の値を知つてさえいれば、上記の差の値を
計算することは容易である(これに対して、その
AU−iが同じデーターをもつていても、h2Δ1h
ζn i、j、2hδ1hζn i、jなどは直ちに計算できな
い。
というのはAU−i自身にはζn i±1、jの値は保持
されていないからである)。
さて、手順を述べる。
(i) まずAU−jはすべてのAU−i(i=1、
2、………、J−1)からそれぞれFIFO−
(i、j)を介して{h2Δ2hζn i、j、2hδ2hζ
n i、j、2hδ2hΨn i、j}の値を受けとる。そうす
る
と、[Formula] (i = 1, 2, ......, J- 1)
It is also possible to have AU-j do this and solve the simultaneous equations in the second half (2) where the values corresponding to each j {ζ n+1 j , k (k=1, 2, ......J-1) are unknowns. Let AU-j do it. Similar assignments are made in (3) and (4) when solving for Ψ. In the following, the calculation time required to perform one time step n+n-1 will be considered. Now, we focus on AU−j and write {ζ
n i , j }, {Ψ n i , j } (i=0, 1, 2, ......
, J)
and {ζ n j , k }, {Ψ n j , k } (k=0, 1,
……
..., J) are held. And each
For AU-i (i=1, ......, J-1), {h 2 Δ 2
h ζ n i , j }, {2hδ 2 hζ n i , j }{2hδ 2 hΨ n i
, j } (j=
1, 2, ......, J-1) are also held. Note that each AU-i is {ζ n i , j } and {Ψ
It is easy to calculate the above difference value as long as you know the values of n i , j } (in contrast, its
Even if AU-i has the same data, h 2 Δ 1h
ζ n i , j , 2hδ 1h ζ n i , j etc. cannot be calculated immediately.
This is because AU-i itself does not hold the value of ζ n i±1 , j ). Now, let me explain the steps. (i) First, AU-j is all AU-i (i=1,
2, ......, J-1) respectively FIFO-
(i, j) through {h 2 Δ 2h ζ n i , j , 2hδ 2h ζ
Receive the values of n i , j , 2hδ 2h Ψ n i , j }. Then,
【式】
に関する方程式(1)の係数ならびに右辺の値がす
べて決まる。特に右辺の( )の値(それとA
n i、jとかく)は(2)式を解くときも再び利用され
るのでメモリーに保持しておく。そして
{τ/8h2×2hδ1hΨn i、j}(i=1、2、…
……、
J−1)の値を計算し、ストアしておく。
(ii) AU−jはダブルスウイープ法によつて(1)式
を解き、[Formula] The coefficients of equation (1) and the values on the right-hand side are all determined. In particular, the value of ( ) on the right side (and A
n i , j ) will be used again when solving equation (2), so it is retained in memory. And {τ/8h 2 ×2hδ 1h Ψ n i , j }(i=1, 2,...
..., calculate the value of J-1) and store it. (ii) AU−j solves equation (1) using the double sweep method,
【式】
(i=0、1、………、J)を決める。その
際、逆スウイープの段階で[Formula] Determine (i = 0, 1, ......, J). At that time, at the reverse sweep stage
【式】
がi=J、J−1、J−2、………、0の順に
決まつてくるが、それがすべて済むのを持つの
でなく[Formula] is determined in the order of i = J, J-1, J-2, ......, 0, but it is not possible to have all of them.
【式】 が一つづつ決まる毎に、値の組{【formula】 is determined one by one, the set of values {
【式】τ/8h2
・2hδ1hΨi、j、An i、j}をDMAチヤネルを
通してFIFO−(i、j)に送る。
(iii) 次にAU−jはすべてのFIFO−(j、k)
(k=1、2、………、J−1)からそれぞれ
{[Formula] τ/8h 2 ·2hδ 1h Ψ i , j , A n i , j } is sent to FIFO-(i, j) through the DMA channel. (iii) Then AU−j stores all FIFO−(j, k)
(k=1, 2, ......, J-1) respectively {
【式】τ/8h2
・2hδ1hΨj、k、Aj、k}の値を受けとる。
そうすると、{ζn+1 j、k}(k=0、1、………
、
J)に関する連立方程式(2)の係数および右辺の
値をすべて知つたことになる。そこで再びダブ
ルスウイープ法によつてこの方程式を解く。そ
して値の組{ζn+1 j、k、h2Δ2hΨn j、k}をDM
Aチ
ヤネルを通して各FIFO−(j、k)(k=1、
2、………、J−1)に送る(もちろん、h2Δ
2hΨn j、kはあらかじめ計済算みとしている)。
(iv) さらにAU−jはすべてのFIFO−(i、j)
(i=1、2、………、J−1)からそれぞれ
{ζn+1 i、j、h2Δ2hΨn i、j}の値を受けとる
。既に
保持している{Ψn i、j}とあわせば、方程式(3)
の右辺の( )の値(それをBn+1、0 i、jとかく
)
が決まる。そこで再びダブルスウイープ法によ
つてReceive the value of [Formula] τ/8h 2 ·2hδ 1h Ψ j , k , A j , k }.
Then, {ζ n+1 j , k }(k=0, 1,...
,
This means that we know all the coefficients and values of the right-hand side of simultaneous equation (2) regarding J). Therefore, this equation is solved again using the double sweep method. Then, the set of values {ζ n+1 j , k , h 2 Δ 2h Ψ n j , k } is DM
Each FIFO − (j, k) (k=1,
2, ......, J-1) (of course, h 2 Δ
2h Ψ n j , k is calculated in advance). (iv) Furthermore, AU−j is all FIFO−(i, j)
The values of {ζ n+1 i , j , h 2 Δ 2h Ψ n i , j } are received from (i=1, 2, ......, J-1), respectively. Combined with the already held {Ψ n i , j }, equation (3)
The value of ( ) on the right side of (write it as B n+1 , 0 i , j )
is decided. So, by using the double sweep method again
【式】
(i=0、1、2、………、J)を決める。そ
して、値の組{Bn+1、0 i、j、[Formula] Determine (i=0, 1, 2, ......, J). Then, the set of values {B n+1 , 0 i , j ,
【式】
}を各FIFO−(i、j)(i=1、2、……
…、J−1)に送る。
(v) AU−jはすべてのFIFO−(j、k)(k=
1、2、………、J−1)からそれぞれ{B
n+1、0 j、k、[Formula] } for each FIFO-(i, j) (i=1, 2,...
..., J-1). (v) AU−j is all FIFO−(j, k) (k=
1, 2, ......, J-1) respectively {B
n+1 , 0j , k ,
【式】
}を受けとり、(4)式を解き、{Ψn+1、1 j、k}
を決
める。そして値の組{h2Δ2hΨn+1、1 j、k、Ψ
n+1、1 j、k}をFIFO−(j、k)(k=1、2、
…
……、J−1)に送る。
(vi) 再びAU−jはすべてのFIFO−(i、j)
(i=1、2、………、J−1)からそれぞれ
{h2Δ2hΨn+1、1 i、j、Ψn+1、1 i、j}を
受けとり、方程
式(3)の右並Bn+1、1 i、jを計算し、それを解く
とに
よつて[Formula] }, solve equation (4), {Ψ n+1 , 1 j , k }
decide. and the set of values {h 2 Δ 2h Ψ n+1 , 1 j , k , Ψ
n+1 , 1 j , k } as FIFO-(j, k) (k=1, 2,
…
..., send it to J-1). (vi) Again AU−j is all FIFO−(i, j)
Receive {h 2 Δ 2h Ψ n+1 , 1 i , j , Ψ n+1 , 1 i , j } from (i=1, 2 , ......, J -1), respectively, and right-hand B n+1 of equation (3). , 1 i , j and solve it.
【式】 を決める。そしてまた(Bn+1、1 i、j、Determine [Formula]. And also (B n+1 , 1 i , j ,
【式】
}を各FIFO−(i、j)に送る。
(vii) 以下(v)と同じ動作→(vi)と同じ動作→………→
(v)と同じ動作を繰り返えすことによつて{Ψ
n+1 j、k=Ψn+1、Rn+1 j、k、}を決める
に到る。ただ
し、最後の(v)の動作では値の組{ζn+1 j、k、h2
Δ
2hζn+1 j、k、2hδ2hζn+1 j、k、2hδ2hΨn
+1 j、k、Ψ
o+1j、k}を各々FIFO−(j、k)(k=1、2、
………、J−1)に送ることによつて全体のル
ープの(i)に戻ることができる。
ここに述べた動作を行うために、保持したり、
転送したりするデーターが幾種類かあるが、これ
らをストアするために既述したAU内の専用メモ
リーを利用するのである(第9図参照)。それぞ
れの位置に深さ8ワード分の容量があつて、それ
らに番号m=0、1、2、………、7とつけた。
具体的に各データーをどのワードに割り振るかを
示した例が第10図に示されている。第10図で
は、一つのAU−jが行う反復計算の途中で、ど
の値がFIFOに送られ、FIFOから受けとられる
かについても示されている。第10図でH−Rと
あるのはAU−j内の行メモリーのそれぞれに受
けとられる値の種類を示している。H−Sとある
のは同じ行メモリーのそれぞれからFIFOに送る
値の種類を示している。V−Rとあるのは列メモ
リーのそれぞれに受け入れられる値、V−Sは同
じく列メモリーのそれぞれから送り出す値を示し
ている。上の方からH−R、H−S→V−R、V
−S→H−R、H−S→………→V−R、V−S
の繰り返えし計算でn→n+1の1ステツプが完
了することが示されている。ただし、送り状態
(S)で斜線の引いてない値は単に保持しておく
ことを示し、受けの状態(R)で斜線の引いてな
い値は、既に保持されたままのものであることを
示している。
上のアルゴリズムで1ステツプすすめるために
必要な計算時間は内部反復回数Ro+1を5回とす
るならば3875msになる。同じ計算をMUだけで
行うと、54156msとなる。従つて、(並列処理時
間)/(単一処理時間)=1/13.8であり、能率
比0.99(=13.8/14)となる(いまの場合、実働
のプロセツサAUは14台としている)。これは高
能率比である。それは、実際に並列処理する場
合、FIFOを介する転送にかかる時間が18μs/
1ワードぐらいで、それらを合わせても全体の
0.5%に過ぎず、実質的計算部分の殆んどが並列
処理されていることになるからである。
上の結果は、14台のAUを用いて並列処理した
場合のものであるが、これを一般化して、Q台の
AUを利用して、内部反復回数をRとしたとき、
1ステツプすすめるのに要する計算時間は(74.1
+40.3R)Q+1.0R+15.0ms(R=5なら
275.6Q+20.0ms)となる。MUだけで計算する
場合は(73.1+39.9R)Q2+(16.2+0.2R)Qms
(R=5なら272.6Q2+17.2Qmsと評価される。
これから、Qが大きな値になれば、AU群で行う
ときおよそ(74.1+40.3R)Qms、MUだけで行
うときおよそ(73.1+39.9R)Q2msである(こ
の場合Qとは一辺がQ+1等分された格子点上で
考えていることにあたる)。従つて(並列処理時
間)/(単一処理時間)=1/0.988Q(R=1の
とき)でRも大きくなると=1/0.99Qになる。
従つて能率比はやはり0.99となる。
この例のような非線形偏微分方程式をADI法で
解くとき、各AUが処理する計算が十分に複雑で
あつて、明らかに転送にかかる時間に比して多く
の時間が必要なので能率比が極めて高くなつた印
象を与えるかもしれないが、実は方程式自体が簡
単な形をしたポアソン方程式でも能率比は0.99を
下らないことが次の例でわかる。
計算例 6
(ADI法の応用例−ポアソン方程式の差分解
法)
計算例5で考察したナビエ・ストークス方程式
の後半のΨに対する方程式ΔΨ=−ζがポアソン
方程式に外ならない。従つて前の差分アルゴリズ
ムの後半のΨ計算の内部反復の部分だけを取り出
してみればよい。そうすると、AU群で計算する
場合には、5回反復で2822ms、MUだけで5回
反復するときは39095msである。従つて(並列
処理時間)/(単一処理時間)=1/13.85で、能
率比は0.99(=13.85/14)となる。
計算例 7
(計算例6と同じポアソン方程式を単純反復法
で解く場合)
取り扱うアルゴリズムは
Ψn+1 i、j=Ψr i、j+τ〓/h2(Ψr i+1、j+Ψr i−1、j+Ψr i、j+1+Ψr i、j−1−
4Ψr i、j)+τ〓ζi、j
(r=0、1、2、………)
である。これをAU群で実現するためには次の(i)
(ii)の手順を必要回数だけ繰り返えせばよい。
(i) AU−jがすべてのFIFO−(i、j)(i=
1、2、………、J−1)からそれぞれ値Ψ
r i、j+1+Ψr i、j+1を受けとる。上式の右辺
を計算
し、その結果を{Ψr+1 i、j}として各FIFO−
(i、j)(i=1、2、………、J−1)に送
る。
(ii) 次にAU−jはすべてのFIFO−(j、k)
(k=1、2、…………、J−1)から値Ψ
r+1 j、kを受け、和Ψr+1j、k+1+Ψr+1
j、k−1を求めて、そ
れを各FIFO−(j、k)(k=1、2、……
…、J−1)に送る。
5回反復に要する計算時間は992msである。
一方MUだけで単純反復計算を行うときの計算時
間は5回反復で13469msとなる。従つて(並列
処理時間)/(単一処理時間)=1/13.58であ
り、能率比は0.97(=13.58/14)となる。
参考のために、一般的にQ台のAUでR回反復
した場合の計算時間を評価すると14.1QRmsで
あり、MUだけでやる場合の計算時間13.7Q2Rm
sに比して1/0.97Qとなり、能率比は一般的に
も0.97であることがわかる。
計算例 8
(計算例6と同じポアソン方程式をガウスザイ
デル法で解く場合)
取り扱うアルゴリズムは
Ψr+1 i、j=1/4(Ψr+1 i−1、j+Ψri+1、j+Ψr+1 i、j−1+Ψr i、j+1)+h2ζ、
j
(r=0、1、2、………)
である。これをAU群に実現させる場合、各jに
対する未知数の組{Ψr+1 i、j}(i=1、2、3
、
………、J−1)の計算をAU−jに担当させる
ものとする。そのとき、例えばAU−2がΨr+1 1、2
を求めるたには、既にΨr+1 2、1が計算済みでなけ
れ
ばならない。だから、AU−1がΨr+1 2、1を決めれ
ば、それを先にFIFO−(2、1)を通してAU−
2に送つて後、AU−1はΨr+1 3、1の計算にうつる
が、そのとき同時にAU−2はΨr+1 2、2の計算にう
つるという具合に行つていけば、Ψr+1 i、jの値は
i
+jの低い番号から高い番号の方へ波状的に決ま
つていくことになる。AU−jの動作でみれば、
Ψr+1 i、jの値を決めるために、FIFO−(j、j+
1)を介してΨr i、j+1の値を得、次にFIFO−
(j、j−1)を介してΨr+1 i、j−1を得て、上
式の右
辺を計算した後その値をΨr+1 i、jとしてFIFO−(
j
−1、j)とFIFO−(j+1、j)に送ること
をi=1、2、………、J−1の順に繰り返え
す。これが済めば、つづいて{Ψr+2 i、j}(i=
1、2、………、J−1)の計算に入ることにな
る。以上にみるように、この計算では、FIFOバ
ツフアメモリーをすべて利用する必要がなく、三
重対角線上に並ぶものだけを使つている。
上の計算をQ台のAUでR回の反復を行うと計
算時間は8.6(R+1)Qmsである。同じ計算
をMU上で行えば(7.8Q2+0.05Q)Rmsであ
り、(並列処理時間)/(単一処理時間)=1/
(0.907Q+0.0058)(1+1/R)-1となり、QとRが
少し大きめになれば、≒1/0.907Qとなり、能
率比は0.907になる。
ADI法に比べて能率比が落ちるのは、ガウス・
ザイデル法が本来シリアル的なアルゴリズムで完
全な並列処理ができないからである。
以上、とくに計算例5〜8にみる様に、偏微分
方程式の差分近似方程式を反復解法で解くとき、
本発明計算機は能率比0.9〜0.99という高い性能
をもつことが判明した。中でもADI法の場合、Q
台AUを用いいれば、殆んど無駄なくQ倍の性能
をもつ機械になつていることがわかつた。[Formula] } is sent to each FIFO-(i, j). (vii) Same operation as below (v) → Same operation as (vi) →……→
By repeating the same action as (v), {Ψ
n+1 j , k = Ψ n+1 , Rn+1 j , k , } are determined. However, in the last operation (v), the set of values {ζ n+1 j , k , h 2
Δ
2h ζ n+1 j , k , 2hδ 2h ζ n+1 j , k , 2hδ 2h Ψ n
+1 j , k , Ψ
o+1j , k } respectively as FIFO-(j, k) (k=1, 2,
......, J-1) to return to (i) of the entire loop. To perform the actions described here, hold or
There are several types of data to be transferred, and the dedicated memory in the AU mentioned above is used to store them (see Figure 9). Each position has a capacity of 8 words deep, and numbers m=0, 1, 2, . . . , 7 are assigned to them.
FIG. 10 shows an example specifically showing which word each piece of data is allocated to. FIG. 10 also shows which values are sent to and received from the FIFO during the iterative calculation performed by one AU-j. In FIG. 10, H-R indicates the type of value received in each row memory in AU-j. H-S indicates the type of value sent to the FIFO from each of the same row memories. VR indicates the value accepted into each column memory, and VS indicates the value sent out from each column memory. From the top: H-R, H-S→V-R, V
-S→HR-R, H-S→……→VR, V-S
It is shown that one step of n→n+1 is completed by repeated calculation of . However, values without diagonal lines in the sending state (S) simply indicate that they are to be held, and values without diagonal lines in the receiving state (R) indicate that they are already being held. It shows. The calculation time required for one step in the above algorithm is 3875 ms, assuming that the number of internal iterations R o+1 is 5. If the same calculation is performed using only MU, it will take 54156ms. Therefore, (parallel processing time)/(single processing time) = 1/13.8, and the efficiency ratio is 0.99 (=13.8/14) (in this case, the number of processors AU in actual operation is 14). This is a high efficiency ratio. In actual parallel processing, the transfer time through the FIFO is 18 μs/
It's about one word, and even if you put them together, it's the whole
This is because it is only 0.5%, which means that most of the actual calculation part is processed in parallel. The above results are for parallel processing using 14 AUs, but this can be generalized to Q AUs.
Using AU, when the number of internal iterations is R,
The calculation time required to advance one step is (74.1
+40.3R) Q+1.0R+15.0ms (If R=5
275.6Q+20.0ms). When calculating only with MU, (73.1 + 39.9R) Q 2 + (16.2 + 0.2R) Qms
(If R=5, it will be evaluated as 272.6Q 2 +17.2Qms.
From this, if Q becomes a large value, it will be approximately (74.1 + 40.3R) Qms when using AU groups, and approximately (73.1 + 39.9R) Q 2 ms when using only MUs (in this case, Q means that one side is Q + 1 This corresponds to thinking on an equally divided grid point). Therefore, (parallel processing time)/(single processing time)=1/0.988Q (when R=1), and if R also increases, it becomes =1/0.99Q.
Therefore, the efficiency ratio is still 0.99. When solving a nonlinear partial differential equation like this example using the ADI method, the calculations processed by each AU are sufficiently complex and obviously require a lot of time compared to the time required for transfer, so the efficiency ratio is extremely low. This may give the impression that the equation is high, but the following example shows that the efficiency ratio does not fall below 0.99 even for Poisson's equation, which has a simple equation itself. Calculation example 6 (Application example of ADI method - finite difference method of Poisson equation) The equation ΔΨ=-ζ for Ψ in the second half of the Navier-Stokes equation considered in calculation example 5 is nothing but a Poisson equation. Therefore, it is sufficient to extract only the internal iteration part of the Ψ calculation in the latter half of the previous difference algorithm. Then, when calculating with the AU group, it takes 2822 ms for 5 repetitions, and 39095 ms when repeating MU only 5 times. Therefore, (parallel processing time)/(single processing time)=1/13.85, and the efficiency ratio is 0.99 (=13.85/14). Calculation example 7 (When solving the same Poisson equation as in calculation example 6 using a simple iterative method) The handling algorithm is Ψ n+1 i , j = Ψ r i , j +τ〓/h 2 (Ψ r i+1 , j +Ψ r i−1 , j +Ψ r i , j+1 +Ψ r i , j−1 −
4Ψ r i , j )+τ〓ζ i , j (r=0, 1, 2, ......). In order to achieve this with AU groups, the following (i)
You can repeat step (ii) as many times as necessary. (i) AU−j is all FIFO−(i, j) (i=
1, 2, ......, J-1) respectively, the value Ψ
r i , j+1 +Ψ r i , j+1 is received. Calculate the right side of the above equation and use the result as {Ψ r+1 i , j } for each FIFO−
(i, j) (i=1, 2, ......, J-1). (ii) Then AU−j stores all FIFO−(j, k)
(k=1, 2, ......, J-1) to the value Ψ
Receive r+1 j , k , sum Ψ r+1j , k+1 +Ψ r+1
Find j , k-1 and apply it to each FIFO-(j, k) (k=1, 2,...
..., J-1). The calculation time required for five iterations is 992ms.
On the other hand, when performing simple iterative calculations using only MU, the calculation time is 13469ms for 5 iterations. Therefore, (parallel processing time)/(single processing time)=1/13.58, and the efficiency ratio is 0.97 (=13.58/14). For reference, the calculation time when iterating R times with Q AUs is generally 14.1QRms, and the calculation time when using only MUs is 13.7Q 2 Rm.
s is 1/0.97Q, and it can be seen that the efficiency ratio is generally 0.97. Calculation example 8 (When solving the same Poisson equation as in calculation example 6 using the Gauss-Seidel method) The handling algorithm is Ψ r+1 i , j = 1/4 (Ψ r+1 i-1 , j +Ψ ri+1 , j +Ψ r+1 i , j-1 +Ψ r i , j+1 )+h 2 ζ,
j (r=0, 1, 2, ......). When realizing this in the AU group, the set of unknowns for each j {Ψ r+1 i , j } (i=1, 2, 3
,
......, J-1) shall be calculated by AU-j. At that time, for example, AU-2 is Ψ r+1 1 , 2
To find , Ψ r+1 2 , 1 must already be calculated. Therefore, if AU-1 determines Ψ r+1 2 , 1 , it is first passed through FIFO-(2, 1) to AU-
After sending it to 2, AU-1 goes on to calculate Ψ r+1 3 , 1 , and at the same time AU-2 goes on to calculate Ψ r+1 2 , 2 , and so on, Ψ r+1 i , j The value of is i
+j will be determined in a wave-like manner from the lower number to the higher number. Looking at the operation of AU-j,
In order to determine the values of Ψ r+1 i and j , FIFO−(j, j+
1) to get the value of Ψ r i , j+1 , then FIFO−
After obtaining Ψ r+1 i , j-1 via (j, j-1) and calculating the right side of the above equation, the value is set as Ψ r+1 i , j and then FIFO-(
j
-1, j) and FIFO-(j+1, j) can be repeated in the order of i=1, 2, . . . , J-1. Once this is done, continue with {Ψ r+2 i , j } (i=
1, 2, ......, J-1). As seen above, this calculation does not need to use all of the FIFO buffer memory, but only the ones that line up on the tridiagonal line. If the above calculation is repeated R times with Q AUs, the calculation time is 8.6 (R+1) Qms. If the same calculation is performed on MU, it will take (7.8Q 2 +0.05Q) Rms, and (parallel processing time) / (single processing time) = 1/
(0.907Q+0.0058)(1+1/R) -1 , and if Q and R are slightly larger, it becomes ≈1/0.907Q, and the efficiency ratio becomes 0.907. The reason why the efficiency ratio is lower than that of the ADI method is because of the Gaussian
This is because the Seidel method is originally a serial algorithm and cannot perform complete parallel processing. As shown above, especially in calculation examples 5 to 8, when solving a difference approximation equation of a partial differential equation using an iterative solution method,
It was found that the computer of the present invention has high performance with an efficiency ratio of 0.9 to 0.99. Among them, in the case of ADI method, Q
It turns out that if you use a standalone AU, you can get a machine that has Q times the performance with almost no waste.
第1図は本発明の並列処理計算機の基本的配列
状態の一例を示すブロツク線図、第1A図は第1
図の基本的配列における従プロセツサ群が2次元
配列バツフアーを介して横列及び縦列の機能を有
する態様を示す機能線図、第2図は一つのFIFO
バツフアメモリーにおけるデータバスの接続様式
を示す結線図、第3図は本発明の実施例になる並
列処理計算機の大要図、第4図は第2図に示すバ
ス接続の詳細な実施例回路図、第5図は第4図に
おけるSI REQ、SO REQの信号を作り出すため
の論理回路の実施例を示す図、第6図は主プロセ
ツサと各従プロセツサ間の送受信号の交換を示す
論理回路図、第7図ないし第9図は各プロセツサ
におけるバイトの番地の割当て例を示す図、第1
0図は計算例5のナビエ・ストークス方程式の
ADI解法におけるデーターの割り振りとデーター
の送受様式を示す図である。
MU……主プロセツサ、AU……従プロセツ
サ、FIFO……FIFOシリアルメモリー。
FIG. 1 is a block diagram showing an example of the basic arrangement state of the parallel processing computer of the present invention, and FIG.
A function diagram showing how the slave processor group in the basic arrangement shown in the figure has horizontal and vertical functions via a two-dimensional array buffer.
A wiring diagram showing the connection style of the data bus in the buffer memory, FIG. 3 is a schematic diagram of a parallel processing computer that is an embodiment of the present invention, and FIG. 4 is a detailed example circuit of the bus connection shown in FIG. 2. Figure 5 is a diagram showing an embodiment of a logic circuit for generating the SI REQ and SO REQ signals in Figure 4, and Figure 6 is a logic circuit showing exchange of transmitted and received signals between the main processor and each slave processor. Figures 7 to 9 are diagrams showing examples of byte address assignment in each processor.
Figure 0 shows the Navier-Stokes equation of calculation example 5.
FIG. 3 is a diagram showing data allocation and data transmission/reception format in the ADI solution method. MU...Main processor, AU...Slave processor, FIFO...FIFO serial memory.
Claims (1)
サの1次元配列からなる階層的アーキテクチユア
をとる並列処理計算機において、 主プロセツサMUと各従プロセツサAU間、お
よび任意の2台の従プロセツサ同志間でのデータ
転送のためのN行N列の2次元配列からなるバツ
フアメモリーBM群を備え、 前記従プロセツサAUに番号i=0、1、2、
………、N−1をつけ、前記バツフアメモリー
BMに2次元配列番号(i、j)、i、j=0、
1、………、N−1をつけるとき、番号(i、
j)のメモリーには、番号iおよびjの従プロセ
ツサにつながる2種のデータバスが入力され、出
力側も、その2種のバスにつながる接続様式をも
つことを特徴とする並列処理計算機。[Claims] 1. In a parallel processing computer that has a hierarchical architecture consisting of a one-dimensional array of one main processor and a plurality of N slave processors, between the main processor MU and each slave processor AU, and between any two A buffer memory BM group consisting of a two-dimensional array of N rows and N columns is provided for data transfer between slave processors of the same processor, and the slave processors AU are provided with numbers i=0, 1, 2,
……, attach N-1 and the buffer memory
BM has two-dimensional array number (i, j), i, j = 0,
When adding 1,......,N-1, the number (i,
A parallel processing computer characterized in that two types of data buses connected to slave processors numbered i and j are input to the memory of j), and the output side also has a connection style connected to the two types of buses.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP9292779A JPS5617458A (en) | 1979-07-21 | 1979-07-21 | Parallel processing computer |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP9292779A JPS5617458A (en) | 1979-07-21 | 1979-07-21 | Parallel processing computer |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS5617458A JPS5617458A (en) | 1981-02-19 |
| JPS6155706B2 true JPS6155706B2 (en) | 1986-11-28 |
Family
ID=14068120
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP9292779A Granted JPS5617458A (en) | 1979-07-21 | 1979-07-21 | Parallel processing computer |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS5617458A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20240115530A (en) * | 2023-01-19 | 2024-07-26 | 에스엔시스(주) | A bubble generating device and a ballast water management system using the same |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS60175174A (en) * | 1984-02-21 | 1985-09-09 | Agency Of Ind Science & Technol | Parallel data transfer system |
| FR2736726B1 (en) * | 1989-12-28 | 1997-12-19 | Thomson Csf | EQUIPMENT FOR INTERCEPTION, GONIOMETRY AND LOCATION OF BROADBAND RADIO TRANSMISSIONS |
| US5513364A (en) * | 1993-03-09 | 1996-04-30 | Matsushita Electric Industrial Co., Ltd. | Data transfer device and multiprocessor system |
| JP3675537B2 (en) * | 1995-11-29 | 2005-07-27 | 富士通株式会社 | Memory distributed parallel computer performing fast Fourier transform and method thereof |
-
1979
- 1979-07-21 JP JP9292779A patent/JPS5617458A/en active Granted
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20240115530A (en) * | 2023-01-19 | 2024-07-26 | 에스엔시스(주) | A bubble generating device and a ballast water management system using the same |
Also Published As
| Publication number | Publication date |
|---|---|
| JPS5617458A (en) | 1981-02-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5226171A (en) | Parallel vector processing system for individual and broadcast distribution of operands and control information | |
| US5081573A (en) | Parallel processing system | |
| CN106940815A (en) | A kind of programmable convolutional neural networks Crypto Coprocessor IP Core | |
| CN114041140B (en) | Event-driven pulse convolutional neural network | |
| Kamaleldin et al. | Towards a modular RISC-V based many-core architecture for FPGA accelerators | |
| JPS6211757B2 (en) | ||
| US11494326B1 (en) | Programmable computations in direct memory access engine | |
| CN103049241A (en) | Method for improving computation performance of CPU (Central Processing Unit) +GPU (Graphics Processing Unit) heterogeneous device | |
| JPH0128409B2 (en) | ||
| JPH07117948B2 (en) | Computer equipment | |
| JPH02504682A (en) | Conversion processing circuit | |
| JP2637749B2 (en) | Data processing apparatus and processing method | |
| CN109522125B (en) | Acceleration method and device for matrix product transposition and processor | |
| CN108804380A (en) | The cascade Cycle accurate model of vector calculus hardware accelerator multinuclear | |
| CN110414672B (en) | Convolution operation method, device and system | |
| CN104050148A (en) | FFT accelerator | |
| JPS6155706B2 (en) | ||
| KR100236250B1 (en) | High speed numerical processor | |
| JPH08161282A (en) | Digital array processor dedicated to neural network of multiple data type of multiple instruction word and system constructed using the same | |
| KR102349138B1 (en) | High-speed computer accelerators with pre-programmed functions | |
| CN107506332B (en) | Kalman filter quick implementation method | |
| CN118153494B (en) | Hardware acceleration system for realizing matrix SVD decomposition based on AXI bus | |
| Puşcaşu et al. | Systolic Array Matrix Multiplication Accelerator | |
| JPH07271744A (en) | Parallel computer | |
| JP3212709B2 (en) | Logic simulation device |