JP2009048306A - Parallel processing architecture and parallel processing processor using the same - Google Patents
Parallel processing architecture and parallel processing processor using the same Download PDFInfo
- Publication number
- JP2009048306A JP2009048306A JP2007211904A JP2007211904A JP2009048306A JP 2009048306 A JP2009048306 A JP 2009048306A JP 2007211904 A JP2007211904 A JP 2007211904A JP 2007211904 A JP2007211904 A JP 2007211904A JP 2009048306 A JP2009048306 A JP 2009048306A
- Authority
- JP
- Japan
- Prior art keywords
- processor
- register
- memory
- executed
- data
- 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.)
- Pending
Links
- 238000012545 processing Methods 0.000 title claims abstract description 68
- 238000000034 method Methods 0.000 claims abstract description 499
- 230000008569 process Effects 0.000 claims abstract description 489
- 230000015654 memory Effects 0.000 claims abstract description 128
- 238000004891 communication Methods 0.000 claims abstract description 87
- 238000010276 construction Methods 0.000 claims description 85
- 230000005540 biological transmission Effects 0.000 claims description 4
- 230000004044 response Effects 0.000 claims description 3
- 239000000758 substrate Substances 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 17
- 230000007704 transition Effects 0.000 description 17
- 238000007726 management method Methods 0.000 description 14
- 101100385237 Mus musculus Creg1 gene Proteins 0.000 description 13
- 238000011161 development Methods 0.000 description 5
- 230000007246 mechanism Effects 0.000 description 5
- 238000012546 transfer Methods 0.000 description 5
- FFBHFFJDDLITSX-UHFFFAOYSA-N benzyl N-[2-hydroxy-4-(3-oxomorpholin-4-yl)phenyl]carbamate Chemical compound OC1=C(NC(=O)OCC2=CC=CC=C2)C=CC(=C1)N1CCOCC1=O FFBHFFJDDLITSX-UHFFFAOYSA-N 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 238000013500 data storage Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000001360 synchronised effect Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000007689 inspection Methods 0.000 description 2
- 230000002457 bidirectional effect Effects 0.000 description 1
- 238000013070 change management Methods 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 230000001934 delay Effects 0.000 description 1
- 238000000265 homogenisation Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 238000012536 packaging technology Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000007670 refining Methods 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000003079 width control Methods 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
Abstract
【課題】並列処理プロセッサをFPGAで構成し単体プロセッサ内でプログラムのプロセスを並列処理する。
【解決手段】プロセッサにプロセス管理用レジスタと汎用の内部スタックレジスタとメモリとリンクを設け、実行するプログラムのプロセス識別番号をプロセス管理用レジスタとメモリで管理し、プロセスの識別番号をメモリ上でリンク構造のスケジューリングリストに形成することによりプロセス間を連結し、プロセスの切り替えやプロセス間のチャンネル通信を実行する。
【選択図】図1A parallel processing processor is configured by an FPGA, and a program process is processed in parallel in a single processor.
A processor is provided with a process management register, a general-purpose internal stack register, and a memory, a process identification number of a program to be executed is managed by the process management register and the memory, and the process identification number is linked on the memory. By forming the scheduling list in the structure, the processes are connected to each other, and process switching and channel communication between processes are executed.
[Selection] Figure 1
Description
本発明は、コンピュータシステムの中核となる中央演算処理装置(CPU)に関し、単独で並列処理を行い、さらに複数のCPUと協調またはデータ交換により同期をとりながら並列処理を行う並列処理アーキテクチャおよびそれを用いた並列処理プロセッサに関する。 The present invention relates to a central processing unit (CPU) that is the core of a computer system, and performs a parallel processing by itself, and further performs a parallel processing architecture that performs parallel processing while synchronizing with a plurality of CPUs by cooperation or data exchange. The present invention relates to the parallel processor used.
1980年代後半から1990年代前半にCSP(Communicating Sequential Processes)理論に基づいた並列処理用プロセッサ(トランスピュータ(登録商標))が、英国INMOS社により開発、販売された。このトランスピュータは、複数ネットワーク上で連動して動き、そこで能力を発揮し計算スピードを高めるものであった。しかしその後、このトランスピュータの開発製造販売は中止された。
また、1980年代中頃のVLSI(大規模集積回路)技術では1台のトランスピュータ程度の規模の回路は完全に1個のVLSIチップを占有するほどの場所、空間を占めていたので、トランスピュータのネットワークは巨大なボード(回路基板)で実現されていた。さらに、各インターフェースはチップ間を繋ぐ数本のワイアで実現されていた。
一方、トランスピュータに関する資料はおおまかなアーキテクチャのブロック図しか開示されず、トランスピュータの単体内部に関する並列処理アルゴリズムは公表されていなかった。
In the late 1980s and early 1990s, a processor for parallel processing (Transputer (registered trademark)) based on CSP (Communicating Sequential Processes) theory was developed and sold by UK company INMOS. This transputer worked in conjunction on multiple networks, where it demonstrated its capabilities and increased computation speed. However, the development, production and sales of this transputer were discontinued.
In addition, in the VLSI (Large Scale Integrated Circuit) technology of the mid-1980s, a circuit on the scale of one transputer occupies a place and space that completely occupies one VLSI chip. The network was realized with a huge board (circuit board). In addition, each interface was realized with several wires connecting the chips.
On the other hand, only a rough architecture block diagram is disclosed as a document about the transputer, and a parallel processing algorithm related to the inside of the single unit of the transputer has not been disclosed.
上述したCSP理論ではある計算システム(プログラム)をプロセスの集合として捉え、プロセス間は相互にメッセージ通信を行うことにより同期化をとり、計算が実行される。なお、プロセスとは「ある一定の行動を逐次的に実行し続ける実態」を示す。また、あるプログラムの中で複数プロセスは独自に同時に動作し、各プロセス同士はプロセス内部で実行された入出力操作を介して通信する。そしてこの通信によりプロセス間の同期が計られる。つまりあるプロセスが入力(出力)操作処理の段階に到達すると他方のプロセスが対応する出力(入力)操作段階に至るのを待ち、互いにデータ(メッセージ)通信段階に到達した時点で通信が実行される。入出力の対象となるデータはキュー(待行列;Queue)をとって格納されたりバッファリングされたりすることなくやり取りされる。こうして2プロセス間の処理が揃えられていく。そして、通信終了後は再び独自の処理を続けていく。 In the CSP theory described above, a certain calculation system (program) is regarded as a set of processes, and the processes are synchronized by performing message communication with each other, and the calculation is executed. In addition, the process indicates “the actual situation in which a certain action is continuously executed sequentially”. In addition, a plurality of processes operate independently at the same time in a program, and the processes communicate with each other via input / output operations executed inside the process. This communication enables synchronization between processes. In other words, when one process reaches the input (output) operation processing stage, it waits for the other process to reach the corresponding output (input) operation stage, and communication is executed when they reach each other's data (message) communication stage. . Data to be input / output is exchanged without being stored or buffered in a queue (queue). Thus, the processing between the two processes is aligned. Then, after the communication is completed, the original process is continued again.
上述したCSP理論では、通信を交わす2プロセス、あるいはすべてのプロセスにとってもシェアド(共有)メモリというものは存在せず、チャンネル間通信によってのみデータがプロセス間で共有されていくことになっている。
CSP理論を具現化したプログラミング言語にOccam(オッカム;登録商標)があり、この言語で書かれたプログラムはやはり並列で処理される(走る)プロセスの集合として捉えられる。平行して走る2つのプロセスのデータ交換はチャンネルという概念を用いて行われ、2つのプロセスで共通のチャンネル変数を定義し、これを通してデータ交換、同期化を行っていく。
特許文献1にはスイッチを用いて複数のトランスピュータ間を接続する構成が開示してあり、また特許文献2には外部フレームを用いて画像処理に適用したデータ並列処理方式の例が開示してある。また非特許文献1にはプロセッサのレジスタ構造などが開示されているが、プロセッサ単体の詳細な構造やプロセスを並列に実行するアーキテクチャは開示されていない。
In the CSP theory described above, there is no shared memory for two processes or all processes that communicate with each other, and data is shared between processes only by inter-channel communication.
There is Occam (registered trademark) as a programming language that embodies CSP theory, and a program written in this language is regarded as a set of processes that are processed (running) in parallel. Data exchange between two processes running in parallel is performed using the concept of channel, and a common channel variable is defined in the two processes, and data exchange and synchronization are performed through this.
優れた情報科学理論CSP理論に基づき製作されたトランスピュータは、CSP理論に基づいたプログラム言語Occamのみで機能する。そのため、OccamはCSP理論の研究発展に必要不可欠である。しかしそれを用いて動作するトランスピュータがないために理論発展とそれに伴う実用化に大きな問題が生じていた。
トランスピュータの開発は中止されたが、その後、CSP理論を基礎とした並列処理プロセッサのニーズは強まるばかりであった。またトランスピュータ開発時代におけるVLSIのCMOS(Complementary Metal Oxide Semiconductor)実装技術と現代の技術では大きな違いがあり、物理的規模として同規模のVLSIに当時は1つのプロセッサのみを載せることで一杯だったところにCMOSトランジスタの微細化が進み20基程度のプロセッサが載せられるようになった。20基のプロセッサで並列処理プロセッサを構成するとかなり複雑なネットワークを構成することができ、システムを大きく展開することができる。
そこで、本発明はその従来技術を凌ぐだけでなく、トランスピュータを最新のFPGA(Field Programmable Gate Array)に搭載させて高速に動作する並列処理プロセッサのアーキテクチャを提供することにある。また、複数プロセスを単体プロセッサ内で実行するための多くのハードウェアアルゴリズムも提供することにより、従来のトランスピュータの性能より優れた並列処理プロセッサ(TPCORE)を提供することにある。
A transputer produced based on the excellent information science theory CSP theory functions only in the programming language Occam based on the CSP theory. Therefore, Occam is indispensable for research and development of CSP theory. However, since there is no transputer that operates using it, there has been a big problem in theoretical development and its practical application.
Transputer development was discontinued, but the need for parallel processors based on CSP theory was only growing. In addition, VLSI CMOS (Complementary Metal Oxide Semiconductor) packaging technology in the transputer development era has a big difference with modern technology, and the physical scale of the VLSI was full with only one processor at that time. In addition, CMOS transistors have been miniaturized and about 20 processors can be mounted. When a parallel processor is configured with 20 processors, a fairly complicated network can be configured, and the system can be greatly expanded.
Therefore, the present invention not only surpasses the prior art, but also provides an architecture of a parallel processor that operates at high speed by mounting a transputer in the latest FPGA (Field Programmable Gate Array). Another object of the present invention is to provide a parallel processing processor (TPCORE) superior to the performance of a conventional transputer by providing many hardware algorithms for executing a plurality of processes in a single processor.
本発明の並列処理アーキテクチャは、オッカム言語でプログラムを実行する並列処理プロセッサの並列処理アーキテクチャであって、上記並列プロセッサは、上記プログラムを構成する基本単位で逐次的に実行されるプロセス実行前の初期段階で該プロセスの開始命令が実行されると上記プロセスを生成し、該プロセス待ちのキューが無いときは生成した上記プロセスを実行して該プロセスの終了命令で終了し、または上記プロセスの実行中、チャンネル通信の提起やタイムアウト処理または停止命令が実行されるとアイドリング状態となり相手プロセスのチャンネルの反応(応答)を見るため待機し、上記プロセスを生成した後プロセス待ちが無いとき、上記プロセスの識別番号を上記プロセス待ちのキューの末尾に追加して待機し、待機中に上記プロセス待ちのキュー内で上記プロセスの識別番号が進み待機中の上記プロセスが先頭プロセスになると先頭待機時のプロセスが切り替えられて、該プロセスが実行され、終了命令により終了し、上記初期段階に遷移する。 The parallel processing architecture of the present invention is a parallel processing architecture of a parallel processing processor that executes a program in an Occam language, and the parallel processor is an initial stage prior to process execution that is sequentially executed in basic units constituting the program. When the process start instruction is executed at the stage, the process is generated. When there is no queue waiting for the process, the generated process is executed and terminated by the process end instruction, or the process is being executed. When channel communication submission, timeout processing or stop command is executed, the system enters an idle state and waits to see the response (response) of the other process's channel. Wait by adding the number to the end of the queue waiting for the process, and wait In the queue waiting for the process, when the process identification number advances and the waiting process becomes the leading process, the leading waiting process is switched, the process is executed, terminated by a termination command, and the initial stage Transition to.
本発明の並列処理プロセッサは、ネットワークを形成してオッカム言語で実行する並列処理プロセッサであって、算術演算または論理演算を行うALUと、上記ALUを制御するマイクロコードを格納したマイクロコードROMと、命令または次に実行する命令が格納されているメモリアドレスを格納するレジスタと汎用スタックレジスタを有する内部レジスタと、上記プロセッサで処理するプログラムの基本単位で逐次的に実行されるプロセスの識別番号を保持するワークスペースポインタレジスタと、待機プロセスを管理するためのデータを格納するプロセス管理用レジスタと、上記マイクロコードROMを制御するマイクロコードROMコントローラとを有するプロセッサと、上記プロセッサに接続されてデータを入出力する複数のリンクと、上記プロセッサまたは上記リンクの入出力データを格納するとともにワークスペースが設けられ該ワークスペースに上記プロセスを開始する識別番号と次に実行されるプロセスの識別番号のデータを所定アドレス値だけ離して格納しスケジューリングリストを形成して上記識別番号が連結されるメモリと、上記メモリの入出力データの授受を制御するメモリコントローラとを有する。 The parallel processing processor of the present invention is a parallel processing processor that forms a network and executes in the Occam language, an ALU that performs arithmetic operation or logical operation, a microcode ROM that stores microcode that controls the ALU, Holds the register for storing the memory address where the instruction or the instruction to be executed next is stored, the internal register with the general-purpose stack register, and the identification number of the process executed sequentially in the basic unit of the program processed by the processor A processor having a workspace pointer register, a process management register for storing data for managing a standby process, and a microcode ROM controller for controlling the microcode ROM, and connected to the processor to input data. Multiple outputs And the input / output data of the processor or the link, and a workspace is provided, and the identification number for starting the process and the data of the identification number of the next process to be executed are separated by a predetermined address value in the workspace. And a memory that controls the exchange of input / output data of the memory.
本発明の並列処理アーキテクチャおよびこれを用いた並列処理プロセッサは、プロセッサにプロセス管理用レジスタと汎用の内部レジスタとメモリとリンクブロックを設け、実行するプロセスのプロセス識別番号と次に実行するプロセス番号をプロセス管理用レジスタとメモリに格納し、プロセスの識別番号をメモリに格納しかつリンク構造にされたスケジューリングリストに形成してプロセスの切り替えやプロセス間のチャンネル通信を実行する。 A parallel processing architecture of the present invention and a parallel processing processor using the parallel processing architecture are provided with a process management register, a general-purpose internal register, a memory, and a link block, and a process identification number of a process to be executed and a process number to be executed next are provided. Stored in a process management register and memory, the process identification number is stored in the memory, and formed into a linked scheduling list to execute process switching and channel communication between processes.
本発明の並列処理プロセッサ(TPCOREとも称する)は、従来のトランスピュータの機械語(アセンブリ言語)を理解するとともに、アーキテクチャが全く異なる別のプロセッサを構成することにより、トランスピュータの性能を向上させた。
また、機械語を従来のトランスピュータとコンパチブルにすることにより、以前トランスピュータで開発されたソフトウェアはすべてこのTPCOREで動作し、しかもOccamも機能することができる。したがって本発明の並列処理プロセッサを用いてCSP理論の発展研究もOccamを通して再び可能となる。
The parallel processor (also referred to as TPCORE) of the present invention improves the performance of the transputer by understanding the machine language (assembly language) of the conventional transputer and configuring another processor with a completely different architecture. .
Also, by making the machine language compatible with a conventional transputer, all software previously developed on the transputer can run on this TPCORE, and Occam can also function. Therefore, the development study of the CSP theory using the parallel processor of the present invention can be performed again through Occam.
まず、本発明の並列処理プロセッサの主要部のCPU10(中央演算処理装置)について説明する。
図1にCPU10のブロック構成を示す。CPU10は、数種類のレジスタ(内部レジスタ)と2本のバスと、各種の演算処理を行うALU31(Arithmetic Logic Unit)、TPCORE(50)を制御する制御部などで構成される。
内部レジスタのうち、処理全般にかかわるレジスタは、Wptr14(ワークスペースポインタ)、Iptr15(インストラクション(命令)ポインタレジスタ)、Ireg26(インストラクション(命令)レジスタ)、Oreg25(オペランドレジスタ)、汎用スタックジスタのAreg11,Breg12,Creg13で構成される。
First, the CPU 10 (central processing unit) which is the main part of the parallel processor of the present invention will be described.
FIG. 1 shows a block configuration of the
Among the internal registers, Wptr 14 (workspace pointer), Iptr 15 (instruction (instruction) pointer register), Ireg 26 (instruction (instruction) register), Oreg 25 (operand register), general-purpose stack It is composed of Areg 11 , Breg 12 , and Creg 13 of the register.
Iptr15は32bitのデータ幅を持ち、次に実行する命令が格納されているアドレスを保持するレジスタである。
Ireg26は4bitのデータ幅を持ち、取り出してきた命令の上位4bitがこのレジスタに格納される。格納された値は命令解釈を行う専用ハードウェアに送られ、そこでデコードされ実行する命令が決定する。
Oreg25は32bitのデータ幅を持ち、取り出してきた命令の下位4bitがここに格納され、この格納された値は命令解釈時にIreg26の値とともに用いられる。
汎用スタックレジスタのAreg11,Breg12,Creg13は32bitのデータ幅を持ち、スタック構造を形成している。データの入力、出力に応じて、これらのレジスタ間でPUSH(プッシュ)、POP(ポップ)の動作を行う。
Iptr 15 is a register having a data width of 32 bits and holding an address where an instruction to be executed next is stored.
Ireg 26 has a data width of 4 bits, and the upper 4 bits of the fetched instruction are stored in this register. The stored value is sent to dedicated hardware for instruction interpretation, where the instruction to be decoded and executed is determined.
Oreg 25 has a data width of 32 bits, and the lower 4 bits of the fetched instruction are stored here, and this stored value is used together with the value of Ireg 26 when interpreting the instruction.
The general-purpose stack registers Areg 11 , Breg 12 , and Creg 13 have a data width of 32 bits and form a stack structure. In accordance with data input and output, PUSH (push) and POP (pop) operations are performed between these registers.
プロセスを管理するレジスタとしてWptr14(ワークスペースポインタ)、待機プロセス管理用レジスタとしてFptr16(フォワードポインタ)、Bptr17(バックポインタ)がある。
Wptr14は、現在のプロセスを示す32bitの値(プロセスID(識別番号))をこのレジスタに格納する。Wptr14の下位2bitはプロセスの優先度を示す。プロセスIDは、並列プロセスを1台のTPCORE50で実行するために各プロセスにプロセスIDという32bitの値を任意に付ける。
Fptr16、Bptr17の待機用のプロセス管理用レジスタは、Wptr14が現在のプロセスIDを管理しているのに対して、現在実行されていないプロセス、すなわち待機プロセスのIDを管理する。Fptr16は待機プロセスの先頭のプロセスID、Bptr17は最後尾のプロセスIDを保持する。待機プロセスが3つ以上のときは、この2つのレジスタで管理することはできないので、メモリ(42)を利用したリスト構造でこれらを管理する。
Wptr 14 (workspace pointer) is a register for managing processes, and Fptr 16 (forward pointer) and Bptr 17 (back pointer) are registers for waiting process management.
Wptr 14 stores a 32-bit value (process ID (identification number)) indicating the current process in this register. The lower 2 bits of Wptr 14 indicate the priority of the process. The process ID arbitrarily assigns a 32-bit value called a process ID to each process in order to execute a parallel process with one TPCORE 50.
The process management registers for standby of Fptr 16 and Bptr 17 manage the ID of a process that is not currently executed, that is, the ID of a standby process, while Wptr 14 manages the current process ID. Fptr 16 holds the top process ID of the standby process, and Bptr 17 holds the last process ID. When there are three or more standby processes, they cannot be managed by these two registers, so these are managed by a list structure using the memory (42) .
その他のレジスタとして、cnt21(カウンタレジスタ)とTemp29(テンポラリレジスタ)がある。cnt21は32bitのデータ幅を持ち、繰り返し処理の回数やシフト回数、入出力数を数えるときに用いられる。Temp29は32bitのデータ幅を持ち、ALU31が乗算や除算などを1クロックで演算を実行できないとき一時的に処理結果を保存する。 Other registers include cnt 21 (counter register) and Temp 29 (temporary register). The cnt 21 has a data width of 32 bits and is used when counting the number of repetitions, the number of shifts, and the number of inputs and outputs. Temp 29 has a data width of 32 bits, and temporarily stores a processing result when ALU 31 cannot execute an operation such as multiplication or division in one clock.
ALU31は、TPCORE50内部で算術、論理演算を行う。処理実行時に演算が必要なときは、レジスタのデータや演算用に任意に生成されたデータが個々に送られ演算処理が行われる。
The ALU 31 performs arithmetic and logical operations inside the
マイクロコードROM27(Microcode ROM)はマイクロコードを記憶し、レジスタ間の通信やメモリ42とレジスタ間の通信制御を行い、またALU31の機能も制御する。この他プロセッサの状態遷移も管理する。一つのマイクロコードは68bit幅であり、各bitによりTPCORE50の動作を制御する。マイクロコードの上位56bitがバスやレジスタ、ALU31の制御を行い、下位11bitでプロセッサの動作を制御する。
マイクロコードROMコントローラ24(Microcode ROM Controller)はマイクロコードのアドレスを算出する。アドレス算出メカニズムは2通りあり、マイクロコードの64bit目の値により区別される。この値が“1”のとき、Ireg26やOreg25の値をもとにしてアドレスを算出し、“0”のとき、マイクロコードROM27の出力9〜0bitの値をそのまま次のアドレスとする。
Microcode ROM 27 (Microcode ROM) stores microcode, performs communication between registers, communication control between memory 42 and registers, and also controls the function of ALU 31 . It also manages state transitions of other processors. One microcode is 68 bits wide, and the operation of the
A microcode ROM controller 24 (Microcode ROM Controller) calculates a microcode address. There are two address calculation mechanisms, which are distinguished by the 64-bit value of the microcode. When this value is “1”, an address is calculated based on the values of Ireg 26 and Oreg 25 , and when “0”, the value of output 9 to 0 bits of the microcode ROM 27 is used as the next address as it is. .
次に図2に、TPCORE50のブロック構成図を示す。TPCORE50は上述したCPU10以外にリンク(Link)ブロック45、メモリコントローラ41(Memory controller)、メモリ42(Memory42−a〜42−d)などで構成される。各メモリ42−a〜42−dは8KByte(キロバイト)ブロックのRAMで構成される。リンクブロック45は4個のインターフェース(リンク)で構成され、他のTPCORE50と通信又はデータの交換を行う。
Next, FIG. 2 shows a block diagram of the TPCORE50. In addition to the
メモリ(Memory42)は、1個のTPCORE50につき32KByteの内部メモリが搭載される。このメモリ42はCPU10とリンクブロック45の両方からアクセスされる。これらのアクセス優先権は後述のメモリコントローラ41で管理される。
また、メモリ42はバイトアクセス、ワードアクセスの2通りの方法でアクセスできる。メモリ42からの読出しやメモリ42への書込みのデータ幅が2通りあるので、32KByteのメモリ42は8KByteのメモリ42−a(〜42−d)を4個組み合わせた構成となっている。各メモリ42−a〜42−dはデータ幅が8bit、深さ1024で構成される。
A memory (Memory 42 ) is provided with an internal memory of 32 KB per one
The memory 42 can be accessed by two methods, byte access and word access. Since the data width of the write to read and the memory 42 from the memory 42 There are two, memory 42 of 32KByte has a configuration that combines four memories 42-a (~42-d) of 8KByte. Each of the memories 42-a to 42-d has a data width of 8 bits and a depth of 1024.
リンクブロック45はリンクインターフェースやレジスタなどを含み、TPCORE50に4個の双方向シリアルリンク(リンク;Link)が構成され、これらの4個のリンクの制御はCPU10と独立に管理される。つまり、リンクブロック45はTPCORE50を構成する他の部分と独立して動作する。したがって、リンクブロック45は、CPU10やメモリ42からデータを受け取ると、CPU10の動作と関係なくデータを送受信することができる。
The link block 45 includes a link interface, a register, and the like, and four bidirectional serial links (links) are configured in the
メモリコントローラ41はCPU10からメモリアクセスの要求またはリンクインターフェースからメモリアクセス要求を受ける。そして、このメモリコントローラ41は、FPGAに搭載されたメモリ42の仕様に応じてリクエストを調整する。
メモリコントローラ41は、メモリアクセスの権限とバスデータ幅の変更(バイト(Byte)幅、ワード幅など)について管理する。また、アドレス空間は4GByte(ギガバイト)以上に拡張することができる。
The memory controller 41 receives a memory access request from the
The memory controller 41 manages memory access authority and bus data width change (byte width, word width, etc.). Also, the address space can be expanded to 4 GB (Gigabytes) or more.
次に、メモリアクセス権限について説明する。メモリコントローラ41は1本の制御線でメモリ42の優先度を制御する。例えば、制御信号が“High”(ハイ)レベルのときリンクブロック45がメモリ42を制御し、“Low”(ロー)レベルのときCPU10がメモリ42と接続される。
リンクブロック45にメモリアクセス権限が渡されると、メモリ42はリンク52−a〜52−dを介して他のTPCORE50上にあるメモリ42と直接接続され、所謂DMA(Direct Memory Access)状態となる。そのため、TPCORE50のメッセージパッシング(メッセージ転送)はDMAであるため非常に高速に行われる。
Next, the memory access authority will be described. The memory controller 41 controls the priority of the memory 42 with one control line. For example, the link block 45 controls the memory 42 when the control signal is “High” level, and the
When the memory access authority is passed to the link block 45 , the memory 42 is directly connected to the memory 42 on the
次に、メモリコントローラ41によるバスデータ幅の変更管理方法について説明する。
まずアドレスバスについて説明する。TPCORE50は32bitでアクセスできるメモリ空間(4G)のうち、内部メモリとして割り当てられたアドレス空間について、その他のアドレス空間より速いクロックでアクセスすることができる。また、TPCORE50はFPGAに搭載することを前提とし、回路構成を簡素化することにより、全てのアドレス空間を同等にみなしているので、4GByteのメモリ(メモリ42とそれ以外の不図示のメモリ)が同じクロックサイクルでアクセスできる。
さらに、このTPCORE50はFPGAに搭載され、容量が制限されるので32bit幅のうち下位15bitのみ使用する。この15bitの内、14〜2bitがアドレスとして用いられ、1〜0bitは4個のメモリ42−a〜42−dのうちどれを選ぶかを決定するためにバンクセレクトとして使用される。このアドレスバスのデータ幅の変更例を図3に示す。
Next, a bus data width change management method by the memory controller 41 will be described.
First, the address bus will be described. Of the memory space (4G) that can be accessed in 32 bits, the
Further, since the
次に、メモリコントローラ41によるデータバス幅の変更について説明する。
CPU10やリンク52−a〜52−dは32bitまたは8bitのどちらのデータでもアクセスできるようにしてあるので、これを制御するためマイクロコードROM27からデータ幅を選択する制御信号が出力される。例えば、通信が成立すると、リンク52−a〜52−dが通信するデータは8bitであるので、データ幅はByte幅に制限される
Next, the change of the data bus width by the memory controller 41 will be described.
Since the
メモリ42のワードアクセスについて説明する。各メモリ42−a〜42−dは8bitでしかデータを入出力することができない。しかし、4個のメモリ42−a〜42−dを組み合わせて、ワード(32bit)幅とバイト幅の2通りのデータを出力することができる。
図4にデータバスのデータ幅の変換について示す。
TPCORE50がメモリ42にアクセスし、データバスの幅がワード幅に決定されたとき、4個のメモリ42−a〜42−dから同時にデータが出力され、メモリコントローラ41により4個のメモリ42−a〜42−dを組み合わせることにより32bit幅のデータを形成する。このとき、アドレスバスから出力されるデータは上位13bitのみ使用し、下位2bitのメモリセレクト部分は使用されない。
The word access of the memory 42 will be described. Each of the memories 42-a to 42-d can input / output data only at 8 bits. However, by combining the four memories 42-a to 42-d , two kinds of data of a word (32 bit) width and a byte width can be output.
FIG. 4 shows the conversion of the data bus data width.
When the
メモリ42のバイトアクセスについて説明する
データ幅制御信号によりデータ幅がバイト幅に指定されると、TPCORE50がメモリ42にバイトアドレスバスのデータの下位15bitを用いて、データが格納されているメモリ42−a〜42−dとそのアドレスを決定する。TPCORE50がメモリ42にバイトアクセスすると、1個のメモリ42−a〜42−dだけからバイト幅のデータが出力される。
When the data width is designated in byte-wide by the data width control signal describing byte access memory 42, TPCORE50 by using a lower 15bit data byte address bus to the memory 42, stored data memory 42 a to 42-d and its address are determined. When the
次に、TPCORE50は前提条件として以下の(a−1)メモリ、(a−2)プロセス管理用レジスタ、(a−3)内部レジスタを有し、クロックについては(a−4)に示す。
Next,
(a−1)メモリ42について説明する。
32bit幅(1ワード32bitとする)のメモリ42を用意する。1Byte番地付けとする。例えば0x00000000番地より番地が増えていく方向を正方向,逆を負の方向とする。メモリ量はここでは厳密に定義しないが任意で良い。メモリアクセスとしてはワード単位でプログラムは進んでいくが、チャンネル通信ではバイト単位のデータ転送を行うのでワード、バイトともにアクセスできるようにする必要がある。割り込み発生時各種レジスタ退避のため任意のアドレスに32bit幅で5ワード領域を確保しレジスタ待避専用領域として固定する。それらを退避させるレジスタの名前に対応してCregsaveloc、Bregsaveloc、Aregsaveloc、Iptrsaveloc、Wptrsavelocと便宜的に名付ける(図10参照)。また外部リンク通信用に入力チャンネル4ワード、出力チャンネル4ワードを確保し固定する。それらをLink0Input、・・・、Link3Input、Link0Output、・・・、Link3Outputと便宜的に名付ける。なお、以下の記述においてアドレス(X)とある場合、Xで示されるアドレスへのアクセスを意味する。
(A-1) The memory 42 will be described.
A memory 42 having a width of 32 bits (one word is 32 bits) is prepared. 1 byte addressing. For example, the direction in which the address increases from address 0x00000000 is the positive direction, and the reverse direction is the negative direction. The amount of memory is not strictly defined here, but may be arbitrary. As memory access, the program proceeds in units of words, but in channel communication, data transfer is performed in units of bytes, so that both words and bytes must be accessible. In order to save various registers when an interrupt occurs, a 5-word area with a 32-bit width is secured at an arbitrary address and fixed as a register saving dedicated area. Cregsaveloc, Bregsaveloc, Aregsaveloc, Iptsaveloc, and Wptraveloc are named for convenience (see FIG. 10) corresponding to the names of the registers for saving them. Also, 4 words of input channel and 4 words of output channel are secured and fixed for external link communication. These are named for convenience as Link 0 Input,..., Link 3 Input, Link 0 Output,..., Link 3 Output. In the following description, an address (X) means access to an address indicated by X.
(a―2)プロセス管理用レジスタについて説明する。
プロセッサ(CPU10)内にプロセス管理用レジスタとして32bit幅のレジスタを5つ用意する。Wptr14(現行プロセスのワークスペースポインタを保持)と待機プロセス管理用レジスタとしてFptr16とBptr17を用意する。Fptr16、Bptr17は優先度に応じて独立に2組用意する。なお、表現を簡略化するためここではFptr16、Bptr17のサフィックスを省略し、優先度の記号のみを付記する、例えば、Fptr0,Bptr0を高優先度プロセス用、Fptr1、Bptr1を低優先度プロセス用とする。以後単にFptr16、Bptr17とのみ記された場合優先度に関係なく、同じ優先度内のレジスタ対であることを意味する。
(A-2) The process management register will be described.
Five registers of 32-bit width are prepared as process management registers in the processor (CPU 10). Fptr 16 (holding the workspace pointer of the current process) and Fptr 16 and Bptr 17 are prepared as standby process management registers. Two sets of Fptr 16 and Bptr 17 are prepared independently according to the priority. In order to simplify the expression, the suffixes Fptr 16 and Bptr 17 are omitted here, and only the priority symbols are added. For example, Fptr 0 and Bptr 0 are used for high priority processes, and Fptr 1 and Bptr 1 are used. For low priority processes. Hereinafter, when only Fptr 16 and Bptr 17 are described, it means that the register pair is within the same priority regardless of the priority.
(a−3)内部レジスタについて説明する。
前述したように、命令ポインタ(Iptr15)と呼ばれる32bit幅のレジスタを1つ用意する。次に実行する命令の格納されているメモリアドレスを保持しておく。また同じく32bit幅の汎用スタックレジスタのAreg11、Breg12、Creg13を用意する。任意であるが、いくつか更に内部レジスタを設けなければならない場合がある。この例として、繰り返し操作の回数を保持しておくcnt21(カウンタレジスタ)、一時的なデータ保管用のTemp29(テンポラリレジスタ)などがあるが、以下cnt21が構成されているとする(チャンネル間通信で利用する)。
(A-3) The internal register will be described.
As described above, one 32-bit register called an instruction pointer (Iptr 15 ) is prepared. The memory address where the instruction to be executed next is stored is held. Similarly, 32-bit wide general-purpose stack registers Areg 11 , Breg 12 , and Creg 13 are prepared. Optionally, some additional internal registers may need to be provided. Examples of this include cnt 21 (counter register) that holds the number of repeated operations, Temp 29 (temporary register) for temporary data storage, and the following is assumed that cnt 21 is configured (channel) Used for inter-communication).
(a−4)TPCORE50のクロックについて説明する。
TPCORE50において、クロックは2種類用意し、優先度の高いプロセスで使用されるクロックの周期は1μ(マイクロ)秒、優先度の低いプロセスで使用されるクロックは64μ秒とする。
(A-4) The clock of TPCORE50 will be described.
In the
このように、CPU10を有するTPCORE50は、プロセス管理用レジスタや汎用スタックレジスタとメモリ(RAM)42などのハードウェアを最適化し、また後述するOccam言語で動作するようにすることにより従来のトランスピュータの性能をより向上することができる。
As described above, the
次に、TPCORE50を制御するOccam言語の概要について説明する。
まず、コンストラクションで処理するプロセスについて説明する。ここで、コンストラクションとは代入、出力、プロシジャーコール(サブルーチンに相当する)などの最も基本となるプリミティブ(基本)プロセスの集合体を示す。
プリミティブプロセスとは代入文、入力分、出力分の最小単位を示す。
代入プロセスは、変数に値を代入することを示し、yの値を変数xに代入する場合、x:=yと表される。入力プロセスは、変数に値を入力することを示し、ch(チャンネル)1からの変数xを受ける場合、ch1?xと表される。出力プロセスは、変数から値を出力することを示し、ch1へ変数yを出力する場合、ch1!yと表される。
宣言されたチャンネルは、2つの並列動作するプロセス間に存在する。チャンネルは宣言されるとプログラム実行中に通信する相手が変わることは無いが、送信側と受信側は入れ替わることができる。また、TPCORE50間の入出力はお互い同期を取って行われる。
例えば、上(前)の逐次プロセスにより出力プロセスが実行されたとき、下(後)の逐次プロセスが実行されなかったら、実行されるまで上のプロセスは待ち続け、両方が通信可能となったときに通信が開始する。このようにして通信の同期が取られる。
Next, an outline of the Occam language for controlling the
First, the process processed by the construction will be described. Here, the term “construction” refers to a collection of the most basic primitive (basic) processes such as assignment, output, procedure call (corresponding to a subroutine).
A primitive process is the minimum unit of an assignment statement, input, and output.
The assignment process indicates that a value is assigned to a variable. When a value of y is assigned to a variable x, x: = y is expressed. The input process indicates that a value is input to the variable. When receiving the variable x from ch (channel) 1, ch1? x. The output process indicates that the value is output from the variable. When the variable y is output to ch1, ch1! y.
The declared channel exists between two parallel processes. When a channel is declared, the communicating party does not change during program execution, but the sending side and the receiving side can be switched. Input / output between the
For example, when the output process is executed by the upper (front) sequential process, if the lower (rear) sequential process is not executed, the upper process continues to wait until it is executed, and both can communicate Communication starts. In this way, communication is synchronized.
Occam言語のコンストラクションはSEQ、PAR、ALT、WHILE、IF、CASEの6種類がある。
SEQ(シーケンシャル)コンストラクションは、プログラムの上から順にプロセスを実行するコンストラクションである。PAR(パラレル)コンストラクションは、記述されている順番に関係なくプロセスを並列に実行する。ALT(オルトネィティブ)コンストラクションは、ALTコンストラクションが求めている条件を1番最初に満たされたプロセスを選択し実行する。WHILE(ホワイル)コンストラクションは、これに付随している論理型の変数に基づいてプロセスが繰り返し実行する。IF(イフ)コンストラクションは、ガードが“真”になった最初のプロセスを実行する。CASE(ケース)コンストラクションは、複数のプロセス群の中から一つのプロセスを選択する。
There are six types of construction in the Occam language: SEQ, PAR, ALT, WHILE, IF, and CASE.
The SEQ (sequential) construction is a construction for executing processes in order from the top of the program. The PAR (parallel) construction executes processes in parallel regardless of the order in which they are written. The ALT (orthotropic) construction selects and executes the process that first satisfies the conditions required by the ALT construction. The WHILE construction is repeatedly executed by the process based on a logical type variable attached to the WHILE construction. The IF construction executes the first process in which the guard becomes “true”. The CASE (case) construction selects one process from a plurality of process groups.
以下、SEQ、PAR、ALTの各コンストラクションについてプログラムを参照しながら具体的に説明する。
SEQコンストラクションを用いたプログラム例を以下に示す。
SEQ
Process 1
Process 2
・
・
・
Process n
Hereinafter, each of the SEQ, PAR, and ALT constructions will be specifically described with reference to a program.
A program example using the SEQ construction is shown below.
SEQ
・
・
・
Process n
上述したプログラムにおいて、SEQコンストラクションは、記述されたプロセスをProcess 1から順にProcess 2,Process 3,・・・と逐次実行していく。そして、最後のプロセスProcess nが終了すると、SEQコンストラクション自身が終了する。
In the above-described program, the SEQ construction sequentially executes the described processes from
PARコンストラクションを用いたプログラム例を示す。
PAR
Process 1
Process 2
・
・
・
Process n
The example of a program using PAR construction is shown.
PAR
・
・
・
Process n
PARコンストラクションは、記述されたプロセスを同時に実行して行く。そして全てのプロセスが終了したときPARコンストラクション自身が終了する。並列動作するプロセス同士は、唯一チャンネルを用いて通信することで相互作用を行う。PARコンストラクション内のプロセス一つに対して一つのTPCORE50が割り当てられている場合は、同じPARコンストラクション内のプロセスは同時に実行が開始される。しかし、1台のTPCORE50で実行されるPARコンストラクションは、時分割に管理されて擬似並列的に実行される。この擬似並列動作については後述する。
また、並列に実行されるプロセスに優先度を付けることができ、PARコンストラクションの前にPRIの予約語を追加する。
The PAR construction runs the described process simultaneously. And when all the processes are finished, the PAR construction itself is finished. Processes operating in parallel interact with each other by communicating using a single channel. If one
In addition, priorities can be assigned to processes executed in parallel, and PRI reserved words are added before the PAR construction.
ALTコンストラクションを用いたプログラム例を示す。
ALT
input1
Process1
input2
Process2
・
・
・
inputn
Processn
The example of a program using ALT construction is shown.
ALT
input1
Process1
input2
Process2
・
・
・
inputn
Processn
ALTコンストラクションは、多くのプロセスから実行すべきプロセスを一つ選択する。上述のプログラムにおいて、input1,input2,・・・,inputnは入力ガードを示し、最初にレディ状態になった入力ガード内のプロセスが実効される。そして、選択されたプロセスが実行された後、ALTコンストラクションは終了する。
ALTコンストラクションもまたPARコンストラクションと同様に優先度を付けることができ、PRIの予約語をALTの前に追加する。なお、Occam言語では、上から順に優先度をつけているが、TPCORE50とトランスピュータでは2つの優先度しかない。そのため、プログラムの一番上に記述されたプロセスが優先度は高く、それ以下のプロセスは優先度が低い。
The ALT construction selects one process to be executed from many processes. In the above-described program, input1, input2,..., Inputn indicate input guards, and the processes in the input guards that are in the ready state first are executed. Then, after the selected process is executed, the ALT construction ends.
The ALT construction can also be prioritized in the same way as the PAR construction, adding a PRI reserved word before the ALT. In the Occam language, priorities are given in order from the top, but TPCORE50 and transputer have only two priorities. For this reason, the process described at the top of the program has a high priority, and processes below it have a low priority.
次に、FPGA上でのTPCORE50ネットワークについて説明する。
図5に示すように、TPCORE50は従来のトランスピュータと同様に4つの外部インターフェース52−a〜52−d(またはリンク(Link)とも称する)を備えている。ボックス51がTPCORE50本体を示し、このボックス51の各辺の中央に辺と直交している線はインターフェース52−a〜52−dを示す。
図5に示すように、このインターフェース52−a〜52−dを他のTPCORE50のインターフェース52−a〜52−dとつなぎ合わせTPCORE50ネットワークを構築することができる。
Next, the TPCORE50 network on the FPGA will be described.
As shown in FIG. 5, the
As shown in FIG. 5, the interfaces 52-a to 52-d can be connected to the interfaces 52-a to 52- d of
図6(a)〜(c)に、TPCOREネットワーク100の構成図を示す。TPCOREネットワーク100はTPCORE50のインターフェース52−a〜52−dを介して複数個TPCORE50を接続して、ツリー接続(図6(a))、パイプライン接続(図6(b))、格子接続(図6(c))されて並列処置プロセッサのネットワークを構築する。例えば、グラッフィクスアクセラレータとしては格子接続を、また並列データベース検索システムではツリー接続とすることにより、応用形態によって短時間で容易にネットワークを構成することができる。
また、上述したTPCORE50をFPGAで形成することにより、ネットワークも並列処理を応用するシステムによって自由にそのトポロジーを改編できる。従って、TPCORE50をFPGA上で実現させることのメリットは非常に大きい。
6A to 6C are configuration diagrams of the
In addition, by forming the above-described
次に、外部リンク(Link)を用いた並列処理プロセッサの通信動作について説明する。ここでは説明を分かり易くするため、2個のTPCORE50−1,50−2を用いた通信の例を示す。なお、図7においてLink Interface(リンクインターフェース)を単にリンク(Link1、Link2)とも称する。
図7に示すように、TPCORE50−1,50−2間の通信は、Acknowledge(ACK;アクノレッジ)パケットにより成立する。このACKパケットが送られてこなければ、これを受信するまで送信(Out)側のLink1(リンクインターフェース)45aはアイドリング状態として待機する。
例えば、TPCORE50−1のBreg12が0x80000008という状態でout命令が実行されるとリンクブロック45を構成するLink2(リンクインターフェース)45を通じて外部にデータを出力しようとする。CPU10はスタックレジスタ(Areg11,Breg12,Creg13)の内容やプロセスIDをリンクインターフェースの各レジスタに渡し、Link2に通信処理を委ねる。そして、現在実効していたプロセスを終了して、スケジューリングリストの次の実行を始める。
Next, the communication operation of the parallel processor using the external link (Link) will be described. Here, for easy understanding, an example of communication using two TPCOREs 50-1 and 50-2 is shown. In FIG. 7, the link interface (link interface) is also simply referred to as a link (Link1, Link2).
As shown in FIG. 7, the communication between the TPCOREs 50-1 and 50-2 is established by an Acknowledge (ACK) packet. If this ACK packet is not sent, the link (link interface) 45a on the transmission (Out) side waits in an idling state until it is received.
For example, when an out instruction is executed in a state where Breg 12 of TPCORE 50-1 is 0x80000008, data is to be output to the outside through the Link 2 (link interface) 45 constituting the link block 45 . The
TPCORE50−1は1Byteのデータを送信後、相手側のTPCORE50−2からACKパケットが送られて来るまでアイドリングし、それらを受信すると通信が成立する(図8参照)。通信が成立した後も1Byteずつ送信し、ACKパケットでデータの送受信をお互い確認し合いながらcnt21に格納されたバイト数のデータを通信する。
CPU10とLink145aが同時にメモリ42aにアクセスすることはできないので、この通信が実行されているときはLink145aがメモリ42aを占用する。通信が終了すると、通信前にLink145aに渡したIDをメモリ42aに形成されたスケジューリングリストの最後尾へ追加する。この追加を実行するための制御はマイクロコードにより行われる。また、通信終了と同時にCPU10がアイドリング状態から復帰し、メモリ42,42aの占有権もCPU10に渡される。図9に、TPCORE50−1,TPCORE50−2が各実行中のプロセスを停止してメモリ42の使用権限をLink145a,Link245に渡し、TPCORE50−1とTPCORE50−2間でACKパケットとデータを送出する例を示す。
After transmitting 1-byte data, the TPCORE 50-1 idles until an ACK packet is sent from the TPCORE 50-2 on the other side, and communication is established when these are received (see FIG. 8). Even after the communication is established, data is transmitted one byte at a time, and data of the number of bytes stored in the
Since CPU10 and Link1 45a can not access the memory 42a simultaneously, Link1 45a when this communication is executed to occupy memory 42a. When the communication is completed, the ID passed to Link1 45a before the communication is added to the tail of the scheduling list formed in the memory 42a . Control to perform this addition is performed by microcode. Simultaneously with the end of communication, the
次に、TPCORE50のプロセッサの単体内部における複数のプロセスの並列処理について説明する。なお、TPCORE50は前提条件として上述の(a−1)メモリ、(a−2)プロセス管理用レジスタ、(a−3)内部レジスタを有する。
Next, parallel processing of a plurality of processes inside a single processor of the
まず、TPCORE50のプロセス管理について説明する。
以下レジスタのサフィックスの小文字の時はレジスタを示し、(XX)の記号はそのデータ(アドレス値など)を示す。例えばAreg11はレジスタを示し、(Areg11)はAレジスタに格納された(される)データを示す。
プロセスはWptr14とスケジューリングリストによって管理される。Wptr14は現在のプロセスのID(識別番号)を格納するために用いられ、スケジューリングリストは待機プロセスを保持するために用いられる。
あるプロセスを実行中に新しく別のプロセスが生成されたり、割り込みが発生したりするとそのプロセスIDは待機プロセスとして、スケジューリングリストの最後尾に追加される。このリストは先に格納されたものが先に実行されるQueue(キュー)として取り扱われる。また、このスケジューリングリストはリンクリスト構造で実行されるプロセスの順序を管理する。
First, process management of the
In the following, when the register suffix is lowercase, it indicates a register, and the symbol (XX) indicates the data (address value, etc.). For example, Areg 11 indicates a register, and (Areg 11 ) indicates data stored in (or made to) the A register.
The process is managed by Wptr 14 and the scheduling list. Wptr 14 is used to store the ID (identification number) of the current process, and the scheduling list is used to hold a waiting process.
When another process is created or an interrupt occurs while executing a process, the process ID is added as a standby process to the end of the scheduling list. This list is treated as a queue that is stored first and executed first. The scheduling list manages the order of processes executed in the linked list structure.
(b−1)プロセスID
プロセスを1つの処理の単位とし、このプロセスにプロセスID(32bit)を付与する。このプロセスIDの下位2bitはそのプロセスの優先度を示し、優先度は“High”(下位1bit=0)と“Low”(下位1bit=1)とする。上位30bitはプロセスごとに格納するメモリ42のワークスペース上でのアドレスを示す。なお、プロセスのワークスペースはOccamコンパイラが管理する。
(B-1) Process ID
A process is a unit of processing, and a process ID (32 bits) is assigned to this process. The lower 2 bits of the process ID indicate the priority of the process, and the priorities are “High” (lower 1 bit = 0) and “Low” (lower 1 bit = 1). The upper 30 bits indicate an address on the work space of the memory 42 stored for each process. The process workspace is managed by the Occam compiler.
(b−2)ワークスペース
プロセスごとにRAMで構成されるメモリ42上にワークスペースというメモリ領域を設け、このメモリ領域にプロセスIDが示す値を基準にそこからメモリ負方向に32bitワード単位で数ワード(必ず)用意する。ワークスペースは並列処理されるプロセスが他のプロセスの割り込みにより一時的に中断されるときデータ(各種レジスタ)の保持、チャンネル通信、ALTコンストラクション命令の実行、プロセススケジューリングに利用する。ワークスペース先頭−4番地(プロセスID−4、つまりワークスペースより1ワード目)にプロセス開始(あるいは再開)時のIptr15の値を入れる。
(B-2) Work space A memory area called a work space is provided on the memory 42 composed of RAM for each process, and the memory area is a number in units of 32 bit words in the memory negative direction based on the value indicated by the process ID. Prepare a word (always). The work space is used for holding data (various registers), channel communication, execution of an ALT construction instruction, and process scheduling when a process to be processed in parallel is temporarily interrupted by an interrupt of another process. The value of Iptr 15 at the time of starting (or resuming) the process is entered in the first 4 addresses of the workspace (process ID-4, that is, the first word from the workspace).
図10に、プロセスID(Wptr14)のワークスペースの例を示す。例えば、プロセスIDが示すアドレス(Wptr14)の一つ前のアドレス(Wptr14−1)をアクセスする時は、Wptr14の値をALU31に送り1減らした値をアドレスとしてアクセスする。同様に、アドレス(Wptr14−2)にアクセスする時は、アドレス(Wptr14)から2を引いた値をアドレスとしてアクセスする。 FIG. 10 shows an example of the work space of the process ID (Wptr 14 ). For example, when accessing the address (Wptr 14 -1) immediately before the address (Wptr 14 ) indicated by the process ID, the value of Wptr 14 is sent to the ALU 31 and the value obtained by subtracting 1 is accessed as the address. Similarly, when accessing the address (Wptr 14 -2), a value obtained by subtracting 2 from the address (Wptr 14 ) is accessed as the address.
(b−3)ワークスペース管理
現在実行中のプロセスIDはWptr14に保持する。プロセスを実行中に新たなプロセスが生成された場合、そのプロセスは待機プロセスとしてプロセススケジューリングリストの最後尾に付け加える。このリストは先入先出構造(FIFO)を持つ。プロセスIDの示すそのプロセス独自のアドレス(ワークスペース−8)、即ちアドレス(ワークスペース−2ワード)目にそのプロセスの次に実行されるべきプロセスのワークスペースアドレス(即ちプロセスID)を収納する。もしそれ以降に実行すべきプロセスがない場合は空信号(empty,エンプティフラグ)として例えば0x80000000あるいは0x80000001(それぞれ低い優先度のプロセス用,高い優先度のプロセス用)という値を持たせる。このアドレス(ワークスペース−8)に次に実行させるプロセスIDを持たせることによりリンクリストの型でプロセススケジューリングリストを構成する。待機プロセスの先頭のプロセスIDをFptr16に、最後尾のプロセスIDをBptr17に保持させる。アドレス(Bptr17−8)にはしたがってemptyが格納されている。この構造によるスケジューリングリスト(以下キュー(Queue)とも称する)は2つの優先度(high,low)について独立に保持する。図10に、メモリ42上のプロセスID(Wptr14)のワークスペースの例を示す。アドレス(Wptr14,Wptr14−1,・・・,Wptr14−5)と汎用レジスタとプロセス管理用レジスタに対応する記憶場所の関係について示す。
(B-3) Work space management The currently executing process ID is held in Wptr 14 . If a new process is created while executing a process, it is added as a standby process to the end of the process scheduling list. This list has a first-in first-out structure (FIFO). The process's unique address (workspace-8) indicated by the process ID, that is, the address (workspace-2 words), stores the work space address (ie, process ID) of the process to be executed next to the process. If there is no process to be executed thereafter, an empty signal (empty, empty flag) is given a value of, for example, 0x80000000 or 0x80000001 (for low priority processes and high priority processes, respectively). By giving the process ID to be executed next to this address (workspace-8), a process scheduling list is formed in the form of a linked list. The first process ID of the standby process is stored in Fptr 16 and the last process ID is stored in Bptr 17 . Address (Bptr 17 -8) The thus empty is stored. A scheduling list (hereinafter also referred to as a queue) having this structure is held independently for two priorities (high, low). FIG. 10 shows an example of the work space of the process ID (Wptr 14 ) on the memory 42 . Address (Wptr 14, Wptr 14 -1, ···, Wptr 14 -5) and the relationship between the storage location corresponding to the general-purpose register and process management register shown.
次に、メモリ42上のワークスペースに関する具体例を表1,2に示す。表1は、PARコンストラクションの実行時のワークスペース内容を示し、ワークスペース相対アドレスと格納データの関係を示す。また表2には、ALTコンストラクションの実行時のワークスペースの内容を示す。いずれのコンストラクションにおいても、負方向に所定ワード離れたアドレスにデータが格納される。PARコンストラクションでは所定アドレス離れてプロセス開始時や復帰時に実行されるアドレス、次に実行されるプロセスのID、通信開始時アクセスするメモリ42の先頭アドレスが格納される。また、ALTコンストラクションではアドレスの負方向に所定アドレス離れて、ガード選択状態、プロセス開始時や復帰時に実行されるアドレス、次に実行されるプロセスのID、ALT実行状態が格納される。 Next, specific examples of the work space on the memory 42 are shown in Tables 1 and 2. Table 1 shows the contents of the workspace when executing the PAR construction, and shows the relationship between the workspace relative address and the stored data. Table 2 shows the contents of the workspace when the ALT construction is executed. In any construction, data is stored at an address separated by a predetermined word in the negative direction. In the PAR construction, an address to be executed at the time of starting or returning from a predetermined address, a process ID to be executed next, and a head address of the memory 42 to be accessed at the start of communication are stored. In the ALT construction, the guard selection state, the address executed at the start or return of the process, the ID of the process to be executed next, and the ALT execution state are stored at a predetermined address in the negative direction of the address.
次に、TPCORE50単体における並列プロセス処理について説明する。
図11に、並列で数種類のプロセスが走る環境下でのプロセス状態遷移図を示す。並列処理はプログラムが実行される前のグランドステージ(初期(基本)段階)で、TPCORE50にプロセスを開始するstartp(開始)命令が供給されプログラムが実行されると(ST1)プロセスを生成する(ST2)。そして、キュー(Queue)が空のときは生成したプロセスを実行し(ST3)、endp(終了)命令でプロセスを終了する。また、プロセス(ST3)の実行中、チャンネル通信の提起やタイムアウト処理やstopp命令が実行されると、アイドリング状態となり(ST4)相手方プロセスのチャンネルの反応を見るため待機する(ST5)。
一方、プロセスを生成した後(ST2)キューが空でないとき、プロセスIDをキューの末尾に追加して待機する(ST5)。待機中にキュー内でプロセスIDが進む。待機中のプロセスが先頭プロセスになると先頭待機時のプロセスがチェンジして(切り替えられて)待機中のプロセスが実行され(ST3)、endp命令によりプロセスが終了し、最初のグランドステージに遷移する(ST1)。以後同様な遷移が繰り返される。
Next, parallel process processing in the
FIG. 11 shows a process state transition diagram in an environment where several types of processes run in parallel. The parallel processing is a grand stage (initial (basic) stage) before the program is executed. When a startp instruction to start the process is supplied to the
On the other hand, after the process is generated (ST2), when the queue is not empty, the process ID is added to the end of the queue and waits (ST5). While waiting, the process ID advances in the queue. When the waiting process becomes the leading process, the waiting process is changed (switched), the waiting process is executed (ST3), the process is terminated by the endp instruction, and transitions to the first ground stage ( ST1). Thereafter, the same transition is repeated.
以下、上述した並列プロセスの処理の具体例に説明する。
Occam言語で作成されたプログラムにPARコンストラクションやALTコンストラクションなど新しくプロセスを生成するようなコンストラクションが存在すると、コンパイラは以下の実行をするようにアセンブラコード群を生成する。
(a1)生成するプロセスIDを作る。
(a2)アセンブラ命令startpを用いてプロセスを生成する。
(a3)生成されたプロセスはその優先度に応じたスケジューリングリストへと追加される。
この(a1)〜(a3)の実行は生成するプロセスの数(並列プロセスの数)だけ繰り返えされる。
Hereinafter, a specific example of the processing of the parallel process described above will be described.
If there is a construction that creates a new process, such as a PAR construction or an ALT construction, in the program created in the Occam language, the compiler creates an assembler code group to perform the following execution.
(A1) Create a process ID to be generated.
(A2) A process is generated using the assembler instruction startp.
(A3) The generated process is added to the scheduling list according to its priority.
The execution of (a1) to (a3) is repeated by the number of processes to be generated (the number of parallel processes).
次にプロセスの実行と切り替えについて図1,2を参照しながら説明する。
TPCORE50は、Wptr14の値が示すプロセスを実行する。しかし、実行しているプロセスが実行不可能またはプロセッサ(TPCORE50)がアイドリング状態になった時にプロセスの切り替が起こる。つまりアイドリング状態になった時、再び実行可能状態になるまでその状態を待ち続けるのでなく、別のプロセスを実行することでアイドリング状態を減らしている。
上述したプロセス実行不可能またはアイドリング状態にする要因は以下の例がある。
(b1)プロセスを終了または停止させるようなアセンブラ命令が実行された場合。
(b2)入出力命令を実行したとき、通信する相手が準備できていない場合。
(b3)遅延やタイムアウト処理を行う命令を実行した時、目的の時間が経過していない場合。
このとき、TPCORE50におけるハードウェアのメカニズムは次のようのになる。
(b4)待機プロセスの有無を調べ、無ければアイドリング状態にし、有ればプロセスの切り替え次のステップへ進む。
(b5)Fptr16の値をWptr14へ格納する。それと同時にアドレス(Wptr14−1)に格納されている値をIptr15へ格納する。
(b6)次に待機プロセスのIDをアドレス(Wptr14−2)から取り出し、それをFptr16へ格納する。
(b7)Wptr14へ格納されたプロセスを開始する。
このようなプロセス切り替えを行うハードウェアの状態の遷移はマイクロコードに記述してあり、それによって制御される。また例外的にプロセスが切り換る要因として割り込みがあるが、これについては後述する。
Next, process execution and switching will be described with reference to FIGS.
There are the following examples of the above-mentioned factors that make the process unexecutable or idling.
(B1) An assembler instruction that terminates or stops the process is executed.
(B2) When a communication partner is not ready when an input / output command is executed.
(B3) When a target time is not elapsed when an instruction for delay or timeout processing is executed.
At this time, the hardware mechanism in the
(B4) The presence or absence of a standby process is checked. If there is no standby process, the system is set to an idling state.
(B5) The value of Fptr 16 is stored in Wptr 14 . At the same time, the value stored in the address (Wptr 14 −1) is stored in Iptr 15 .
(B6) Next, the ID of the standby process is extracted from the address (Wptr 14 -2), and stored in Fptr 16 .
(B7) The process stored in Wptr 14 is started.
The transition of the hardware state for performing such process switching is described in microcode and controlled by it. In addition, there is an interrupt as a factor that causes the process to switch exceptionally, which will be described later.
次に、上述したスケジューリングリストについて説明する。
スケジューリングリストはメモリ42上に形成され、リンクリスト構造で実行されるプロセスの順序を管理する。プロセスはプロセス自身ワークスペースを持ち、これを用いてスケジューリングリストを形成する。図12ではプロセスが4個存在しているときのスケジューリングリストの例を示す。なお、図12において煩雑さを避けるため、Wptr14の記号をWptrと略記して、プロセス番号をWptrに付記する。
メモリ42(Memory)上で形成されたスケジューリングリストにおいて、例えば、あるプロセス(プロセス0)のIDがアドレス(Wptr0)であるとき、そのプロセスの次に実行されるプロセスIDはアドレス(Wptr0−2)に格納される。また自らのプロセスが実行され始めるときの命令取得先のアドレス(Iptr15の値)は(Wptr1−1)に格納される。4番目の最後のプロセスID(アドレス(Bptr17))はアドレス(Wptr3)に格納される。図12に示すように、例えば、3番目のプロセスに関するアドレス(Wptr2−2)には次の(4番目の)プロセスIDのWptr3が格納され、プロセス自身が次のプロセスを指し示すリンクリスト構造でプロセスは実行順に待機している。
TPCORE50は、このようなスケジューリングリストにアクセスするためにFptr16とBptr17の2種類のレジスタを用意している。
待機プロセスの先頭のプロセスIDがFptr16、最後尾のプロセスIDがBptr17で記憶される。実行中のプロセスが終了し、次の待機プロセスを開始するときなどは、Fptr16にアクセスし次のプロセスが開始する。また、プロセスが生成したときなどはBptr17を用いてスケジューリングリストの最後尾にアクセスし、このプロセスを追加する。このスケジューリングリストの動作メカニズムやFptr16、Bptr17の制御はマイクロコードにより制御される。
Next, the scheduling list described above will be described.
The scheduling list is formed on the memory 42 and manages the order of processes executed in the linked list structure. A process has its own workspace, which is used to form a scheduling list. FIG. 12 shows an example of a scheduling list when there are four processes. In order to avoid complication in FIG. 12, the symbol Wptr 14 is abbreviated as Wptr, and the process number is appended to Wptr.
In the scheduling list formed on the memory 42 (Memory), for example, when the ID of a certain process (process 0) is an address (Wptr 0 ), the process ID executed next to that process is the address (Wptr 0 − 2). Further, the instruction acquisition destination address (value of Iptr 15 ) when the process of its own begins to be executed is stored in (Wptr 1 −1). The fourth last process ID (address (Bptr 17 )) is stored in the address (Wptr 3 ). As shown in FIG. 12, for example, a link list structure in which Wptr 3 of the next (fourth) process ID is stored in the address (Wptr 2 -2) related to the third process, and the process itself points to the next process. The process is waiting in the order of execution.
The
The first process ID of the standby process is stored as Fptr 16 , and the last process ID is stored as Bptr 17 . When the process being executed is terminated and the next standby process is started, the Fptr 16 is accessed to start the next process. Further, when a process is generated, the last part of the scheduling list is accessed using Bptr 17 and this process is added. The operation mechanism of the scheduling list and the control of Fptr 16 and Bptr 17 are controlled by microcode.
スケジューリングリストは、アドレス(Fptr16)、アドレス(Bptr17)、メモリ(中間プロセス)の3つの要素で構成され、リンクリスト構造で待機プロセスが連結している。
したがって、待機プロセスがメモリ42で保持されるので使用するレジスタの数が減り、ハードウェアのリソースが節約できる。レジスタなどで待機プロセスを保持すると、スケジューリングリストとして用意したレジスタ以上の待機プロセスが生成されたとき、レジスタに空きができるまで、プロセスの生成を禁止したりしなくてはならない。このようなことはハードウェアの構造を複雑にする。しかし、上述したリンクリスト構造では、ほとんど無限に待機プロセスを生成することができ、またハードウェアの構造をシンプルにすることができる。
The scheduling list is composed of three elements: an address (Fptr 16 ), an address (Bptr 17 ), and a memory (intermediate process), and a standby process is linked in a linked list structure.
Therefore, since the waiting process is held in the memory 42 , the number of registers used is reduced, and hardware resources can be saved. If a standby process is held by a register or the like, when a standby process larger than the register prepared as the scheduling list is generated, the generation of the process must be prohibited until the register becomes empty. This complicates the hardware structure. However, with the linked list structure described above, standby processes can be generated almost infinitely, and the hardware structure can be simplified.
次に、TPCORE50におけるPARコンストラクションの実行について具体的に説明する。
(c−1)プロセスの実行
プロセッサ50はIptr15を基にプロセスを実行させるとともにWptr14で示されるワークスペースの各値を1マシン命令実行ごとに(必要があれば)更新する。
(c−2)プロセスの開始
Areg11に開始すべきプロセスのプロセスIDを入れ、またBreg12にプロセスの開始時に実行する命令のアドレスとアドレス(Iptr15)とのオフセットを入れておく(Occamコンパイラで整えられる)。待ちプロセスがなければ(スケジューリングリストにプロセスIDが登録されていないとき;アドレス(Fptr16)=(Bptr17)=empty)、Bptr17にAreg11のデータを格納し、アドレス(ワークスペース−4)にIptr15+4+Breg12を格納する。待ちプロセスがある場合、すなわちアドレス(Fptr16)≠アドレス(Bptr17)の場合、アドレス(Bptr17−8)にAreg11のデータを格納する。
Next, execution of the PAR construction in the
(C-1) Process Execution The
(C-2) Process Start The process ID of the process to be started is entered in Areg 11 , and the address of the instruction to be executed at the start of the process and the offset (Iptr 15 ) are entered in Breg 12 (Occam compiler) ). If there is no waiting process (when the process ID is not registered in the scheduling list; address (Fptr 16 ) = (Bptr 17 ) = empty), the data of Areg 11 is stored in Bptr 17 and the address (workspace-4) Iptr 15 + 4 + Breg 12 is stored. If there is a waiting process, that is, if address (Fptr 16 ) ≠ address (Bptr 17 ), data of Areg 11 is stored at address (Bptr 17 −8).
(c−3)現行プロセスの実行中断・終了
現行プロセスがプロセス終了あるいは停止命令の実行を行ったとき、入出力命令を実行したとき、あるいはチャンネル通信での待機、遅延(ディレイ)やタイムアウト処理を行う命令の実行に入ったとき、プロセスを中断させる(図13のST11a,図14のST21,図15のST11b,図16のST31参照)。
(C-3) Interruption / termination of execution of the current process When the current process executes a process termination or stop command, executes an I / O command, or waits, delays, or timeouts in channel communication When the execution of the instruction to be executed is started, the process is interrupted (see ST11a in FIG. 13, ST21 in FIG. 14, ST11b in FIG. 15, ST31 in FIG. 16).
(c−4)プロセスの切り替え
PARコンストラクションにおけるプロセスの切り替え動作について説明する(図13〜図16と表3〜表6参照)。なお、表3〜6,表8において、煩雑さを避けるため各ポインタレジスタのサフィックスは省略する。
待機プロセスの有無を調べ、待機プロセスが無ければプロセッサ(TPCORE50)そのものがアイドリング状態となる(図16,表3参照)。
(C-4) Process Switching The process switching operation in the PAR construction will be described (see FIGS. 13 to 16 and Tables 3 to 6). In Tables 3 to 6 and Table 8, the suffix of each pointer register is omitted to avoid complexity.
The presence or absence of a waiting process is checked. If there is no waiting process, the processor (TPCORE 50) itself enters an idling state (see FIG. 16, Table 3).
待機プロセスが1個以上ある場合(Fptr16≠Bptr17)プロセスを切り替えるためにFptr16の値をWptr14に格納し、アドレス(Fptr16−4)にある値をIptr15に格納し、アドレス(Fptr16−8)に保持されている次のプロセスのプロセスIDをFptr16に格納するという手続きを踏みプロセスの切り替えを行う(図13と表4のTa1,Ta2、図15と表5のTC1,TC2参照)。
When there are one or more waiting processes (Fptr 16 ≠ Bptr 17 ), the value of Fptr 16 is stored in Wptr 14 in order to switch processes, the value in the address (Fptr 16 -4) is stored in Iptr 15 , and the address ( fptr 16 -8 process ID of the next process, which is held) to switch the process down the procedure of storing the fptr 16 (Ta1 in FIG. 13 and Table 4, Ta2, TC1 of Figure 15 and Table 5, See TC2).
なお待機プロセスが1個のみの場合(Fptr16=Bptr17)、プロセスを切り替えた後、次のプロセスのプロセスIDの代わりにFptr16にemptyを入れておく。なおプロセスを切り替えようとしてFptr16=Bptr17=emptyであった場合、Wptr14=emptyとしてプロセッサ(TPCORE50)はアイドリング状態となる。高優先度のプロセスから復帰して低優先度のプロセスに切り替わる場合、たとえアドレス(Fptr16)=(Bptr17)=emptyと待機プロセスがなくてもワークスペース割り込み保存領域のWptrsavelocにあるアドレス(Wptr14)を持ってきて実行を再開させる(図13と表4のTa3、図15と表5のTC3参照)。そして後述の「割り込みからの復帰」と同じ操作が行われる。
また、高優先度キューが空で中断プロセスは高優先度の場合、待機プロセスが有るとWsavelocをWptr14に格納し、アドレス(Wptr14−4)のデータをIptr15に格納し、待機プロセスを取り出し、実行する(図14と表6参照)。
If there is only one standby process (Fptr 16 = Bptr 17 ), after switching the process, empty is entered in Fptr 16 instead of the process ID of the next process. If Fptr 16 = Bptr 17 = empty in an attempt to switch processes, Wptr 14 = empty and the processor (TPCORE50) enters an idling state. When returning from a high-priority process and switching to a low-priority process, even if address (Fptr 16 ) = (Bptr 17 ) = empty and there is no waiting process, the address (Wptr) in the Wptsaveloc of the workspace interrupt storage area 14 ) and resume execution (see Ta3 in FIG. 13 and Table 4, TC3 in FIG. 15 and Table 5). Then, the same operation as “return from interruption” described later is performed.
Also, if the high priority queue is interrupted process empty high priority, stores Wsaveloc the waiting process is in the Wptr 14, stores the data of the address (Wptr 14 -4) in iptr 15, the waiting process Take out and execute (see FIG. 14 and Table 6).
(c−5)低優先度プロセス実行中の高優先度プロセスの切り替え
低い(low)優先度のプロセス実行中に高い(high)優先度のプロセス(Fptr(16)0=Bptr(17)0)が生成されたり、アイドリング状態から復帰しかつFptr(16)0=Bptr(17)0≠emptyであれば、そのプロセスのみがQueueにある高優先度プロセスの実行が割り込んでくる。この場合、現在実行させているプロセスのWptr14、Iptr15およびスタックレジスタのAreg11、Breg12、Creg13をそのワークスペースの所定の保存領域(Wptrsaveloc、Iptrsaveloc、Aregsaveloc、Bregsaveloc、Cregsaveloc、Wptrsavelocから連続でWptrsaveloc+16まで)に格納させる。そしてWptr14にFptr0(プロセス0のFptr16)、Iptr15にアドレス(Fptr0−4)の内容を格納する。
(C-5) High-priority process switching during low-priority process execution High-priority process (Fptr (16) 0 = Bptr (17) 0 ) during low-priority process execution Is generated, or when returning from the idling state and Fptr (16) 0 = Bptr (17) 0 ≠ empty, execution of the high-priority process in which only that process is in Queue is interrupted. In this case, Wptr 14 , Iptr 15 of the currently executing process, and Areg 11 , Breg 12 , and Creg 13 of the stack register are stored in a predetermined storage area of the workspace (Wptraveloc, Iptsaveveloc, Aregsaveveloc, Bregsaveveloc, Bregsavec To Wptrsaveloc + 16). Then (fptr 16 Process 0) fptr 0 to Wptr 14, it stores the contents of the address (Fptr 0 -4) to iptr 15.
(c−6)割り込みからの復帰
高優先度プロセスのスケジューリングリストが空になりWptrsavelocに割り込み以前のワークスペースアドレスが格納されている場合割り込み復帰を行う。Wptr14、Iptr15、Areg11、Breg12、Creg13をそれぞれ退避先のメモリ42からレジスタに戻す。そしてWptrsaveloc=emptyを格納する。
(C-6) Return from interrupt If the scheduling list of the high priority process is empty and the work space address before the interrupt is stored in Wptsaveloc, the interrupt is returned. Wptr 14 , Iptr 15 , Areg 11 , Breg 12 , and Creg 13 are returned from the save destination memory 42 to the register. Then, Wptrsaveloc = empty is stored.
次に、TPCORE50におけるチャンネル間通信について説明する。
TPCORE50では、“in”や“out”のような通信用アセンブリ命令が実効されたとき、まず通信は同じTPCORE50内のプロセスと通信するか他のTPCORE50と通信するかを調べる。外部リンク(Link)を用いる通信であった場合は、現在のAreg11、Breg12、Creg13、Wptr14の値をリンクインターフェースに渡して通信処理の全権をリンクインターフェースに委ねる。内部通信であった場合は、メモリ42上のチャンネルにアクセスし、そこに格納されているIDを読み取り、その後の実行を行う。内部通信と確認した後、TPCORE50は、すぐに入出力作業を行うのではなく、この通信するチャンネルがすでにALT関連のアセンブラ命令でEnable(イネーブル)状態にされているチャンネルであるかどうか調べる。そしてチャンネルがALTコンストラクション用のチャンネルでなかったら、入出力処理を始める。
Next, communication between channels in the
In the
以下、TPCORE50における内部通信の実行について具体的に説明する。
(d−1)チャンネル
プロセス間の通信に使われるためにメモリ内の任意領域に1語を確保する(Occamコンパイラが用意する)。このアドレスをチャンネルアドレスとする。そのチャンネルアドレスにはプロセスIDあるいは初期値として例えばempty(0x8000000x;X=0,1は優先度を示す)を格納する。
(d−2)チャンネル間通信の開始
チャンネル間通信が要求されるとOccamコンパイラは通信に必要な情報としてAreg11に送受信するデータ数、Breg12にチャンネルアドレス、Creg13に送受信するデータを格納する(している)メモリ領域のアドレスを格納する。通信が開始されるとまずこのチャンネルがALTコンストラクションにより利用されているチャンネルかどうかを調べ、そうでなければ平行して走る当該2プロセス間でチャンネル間の入出力を開始する。
Hereinafter, execution of internal communication in the
(D-1) Channel One word is secured in an arbitrary area in the memory to be used for communication between processes (prepared by the Occam compiler). This address is a channel address. The channel address stores a process ID or, for example, empty (0x8000000x; X = 0, 1 indicates priority) as an initial value.
(D-2) Start of inter-channel communication When inter-channel communication is requested, the Occam compiler stores the number of data transmitted / received to / from Areg 11 as information necessary for communication, the channel address in Breg 12 and the data transmitted / received to Creg 13 Stores the address of the memory area. When communication is started, first, it is checked whether or not this channel is used by the ALT construction. Otherwise, input / output between channels is started between the two processes running in parallel.
(d−3)通信の提起
上述した擬似並列動作ではプロセスは並行して実行されるとなっているが、1プロセッサ(TPCORE50)のみでは一度に1命令しか実行できないので、ある瞬間ではプロセスは1つのみしか実行されていないことになる。したがってチャンネル通信も結局のところ先行プロセスと後発プロセスの間のデータ交換という形をとる。
先行プロセスはスタックレジスタAreg11,Breg12,Creg13に所定のデータが格納され、チャンネル間通信に対応する命令の実行部に至ると、チャンネルアドレスで示されるメモリが空(empty)であればまずワークスペース(アドレス(Wptr14)で示される)より1ワード負のアドレス(Wptr14−4)にチャンネル間通信直後に開始される命令のアドレスを格納し、さらに2ワード負のアドレス(Wptr14)−12にCreg13の値を格納する(即ちデータ格納先アドレス)。そしてチャンネルアドレスに現在のプロセスIDを格納する。そしてこのプロセスをスケジューリングリストからはずし、次に待機しているプロセスを実行させる。つまりFptr16のデータをWptr14に入れてアドレス(Fptr16−4)をIptr15とする。これによりプロセスは入出力待ちによるアイドリング状態となる。待機(後発)プロセスが存在しない時、プロセッサ(TPCORE50)はアイドリング状態となる。
(D-3) Proposal of communication In the above-described pseudo-parallel operation, processes are executed in parallel, but only one instruction (TPCORE50) can execute only one instruction at a time. Only one is executed. Therefore, the channel communication eventually takes the form of data exchange between the preceding process and the subsequent process.
In the preceding process, when predetermined data is stored in the stack registers Areg 11 , Breg 12 , and Creg 13 and the execution unit of the instruction corresponding to the inter-channel communication is reached, if the memory indicated by the channel address is empty (empty), workspace (address (Wptr 14) with indicated are) from one word negative addresses (Wptr 14 -4) to store the address of the instruction to be started immediately after inter-channel communication, two more words negative addresses (Wptr 14) The value of Creg 13 is stored in -12 (ie, data storage destination address). The current process ID is stored in the channel address. Then, this process is removed from the scheduling list, and the next waiting process is executed. That is, the data of Fptr 16 is put in Wptr 14 and the address (Fptr 16 -4) is set to Iptr 15 . As a result, the process enters an idling state by waiting for input / output. When there is no standby (later) process, the processor (TPCORE50) enters an idling state.
(d−4)通信の成立
プロセスが切り替わり、後発プロセスの実行が開始され、その通信開始に対応する命令部に至れば、前述の通信の提起で述べたアルゴリズムを実行する。しかし該当するチャンネルアドレス(アドレス(Breg12)で示される)にはすでに前述の操作で空でない情報(即ち先行プロセスのプロセスID)が書かれてあるので、そのプロセスとの通信が成立することになる。この時点でプロセス待ちのキューが空かどうかチェックする。
空でない場合、Fptr16≠empty、それは通信相手方プロセス以外の他のプロセスが並列して走っている(実効されている)ことを意味するのでアドレス(Breg12−8)に相手方のプロセスIDを入れてプロセスをキューの最後尾につける。
もしキューが空Fptr16=emptyならBptr17に相手方のプロセスIDを格納する。相手方のプロセスIDから相手側のワークスペースの先頭アドレスがわかり、そこから−12番地の場所には相手方のチャンネル通信でデータを保持すべき(あるいは保持している)アドレスが格納されている。これは端的に言うとアドレス(Breg12−12)に格納されているデータである。この操作で先行アドレスのデータ保持アドレスと自(後発)プロセスのデータ保持アドレス(前述したようにCreg13に格納されている)が明らかになる。チャンネルアドレスにプロセスIDが書かれている先行プロセスはこの時点でこの通信が自分にとって入力か出力か記憶していないが、後発プロセスがこの情報を持っている(現行命令を調べてチャンネル入力か出力か判断できる)ので問題なくチャンネル間入出力は行われる(つまりどちらが源でどちらが行き先か一義的に判明する)。この時点でAreg11の値(通信バイト数)分のデータを送信側から受信側に移動させる。Areg11は他目的で使われることが多いので、転送バイト数を記憶させておくために通信開始時にオプショナルな(カウンタ)レジスタのcnt21にその値をコピーしている。
(D-4) Communication establishment When the process is switched and the execution of the subsequent process is started and the command unit corresponding to the start of the communication is reached, the algorithm described in the above communication is executed. However, since the corresponding channel address (indicated by the address (Breg 12 )) has already been written with non-empty information (that is, the process ID of the preceding process) in the above-described operation, communication with that process is established. Become. At this point, check whether the queue waiting for the process is empty.
If not empty, Fptr 16 ≠ empty, it places the process ID of the other party address (Breg 12 -8) this means that running in parallel other processes other than the communication party processes (which is effective) Put the process at the end of the queue.
If the queue is empty Fptr 16 = empty, the partner process ID is stored in Bptr 17 . From the process ID of the other party, the head address of the other party's work space is known, and from that point, the address where data should be held (or held) in the other party's channel communication is stored at the address -12. This is the data that is stored in the address (Breg 12 -12) say plainly. By this operation, the data holding address of the preceding address and the data holding address of the own (later) process (stored in the Creg 13 as described above) are clarified. The preceding process whose process ID is written in the channel address does not remember whether this communication is input or output for itself at this point, but the subsequent process has this information (examine the current command and input or output the channel). Therefore, it is possible to input / output between channels without problems (that is, it is possible to unambiguously determine which is the source and which is the destination). At this time, the data corresponding to the value of Areg 11 (number of communication bytes) is moved from the transmission side to the reception side. Since Areg 11 is often used for other purposes, the value is copied to cnt 21 of an optional (counter) register at the start of communication in order to store the number of transfer bytes.
(d−5)通信の終了
「通信の提起」で記述したように、アイドリング状態にある先行プロセスをスケジューリングリストの最後尾に追加する。Bptr17=アドレス(Breg12)、アドレス(Bptr17−4)には先行プロセスの復帰後の最初に実行される命令のアドレスが格納されている。そして該当チャンネルアドレスをemptyにする。
(D-5) Termination of communication As described in “Proposal of communication”, the preceding process in the idling state is added to the end of the scheduling list. Bptr 17 = address (Breg 12 ) and address (Bptr 17 -4) store the address of the instruction to be executed first after the preceding process returns. Then, the corresponding channel address is set to empty.
図17と表7に2プロセス間の通信の状態遷移図を示す。
2プロセスをプロセスA(先行プロセス)とプロセスB(後発プロセス)とし、まずプロセスAを実行し(ST51)この時にプロセスBは待機中(ST54)とする。プロセスAにおいてチャンネル通信命令が実行されるとスタックレジスタ(Areg11,Breg12,Creg13)に移動データ数、チャンネルアドレス、データ格納先アドレスが格納されて、チャンネル通信が開始する(ST52)。チャンネルアドレスにプロセスAのIDを格納し、プロセスAをキューからはずし、プロセス切り替え処理を行い、プロセスAをアイドリング状態にする(ST53)。プロセスAからプロセスBに切り替えられると、プロセスBはプロセスの実行を開始し、チャンネル通信命令があるとチャンネル通信を実行する(ST56)。チャンネルアドレスのデータを相手先のプロセスIDに格納し、データソースアドレスやデータ数などのプロセスAの通信情報をアクセスする。そして、プロセスBとプロセスA間のデータの移動が行われ(ST57)、一方、プロセスBは動作を終了する(ST58)。そして、プロセスAが待機リストへ復帰し、キュー待ちして待機する(ST59)。プロセスAのIDが先頭になるとプロセスAが再開し(ST60)、中断された処理が行われ、プロセス終了命令でプロセスAが終了する(ST61)。
FIG. 17 and Table 7 show state transition diagrams of communication between the two processes.
The two processes are a process A (preceding process) and a process B (subsequent process). First, the process A is executed (ST51). At this time, the process B is on standby (ST54). When a channel communication command is executed in the process A, the number of movement data, the channel address, and the data storage destination address are stored in the stack registers (Areg 11 , Breg 12 , Creg 13 ), and channel communication is started (ST 52). The ID of process A is stored in the channel address, process A is removed from the queue, process switching processing is performed, and process A is set to the idling state (ST53). When the process A is switched to the process B, the process B starts executing the process, and when there is a channel communication command, executes the channel communication (ST56). The data of the channel address is stored in the process ID of the counterpart, and the process A communication information such as the data source address and the number of data is accessed. Then, data movement between process B and process A is performed (ST57), while process B ends its operation (ST58). Then, the process A returns to the waiting list and waits for the queue (ST59). When the ID of process A comes to the top, process A resumes (ST60), interrupted processing is performed, and process A ends with a process end command (ST61).
次に、ALTコンストラクションについて説明する。
ALTコンストラクションは2つ以上の同形の構造から成り立っている。この構造単位はガードと呼ばれる論理式とチャンネル入力、あるいはチャンネル入力のみで構成される部分とそれに引き続くプロセスである(ガード+プロセス)。
並列で走っている他の複数のプロセスのうちいくつかのプロセスがALT命令プロセスのガードを構成しているどれかのチャンネルと通信を始めようとしたとする。ALT命令はそのうち最初に(論理式が満たされかつ)チャンネル入力があったガード(この過程をガードがはずされると称する)に引き続くプロセスを選択的に実行するメカニズムである。このメカニズムはCSP理論の重要なプログラム方式の一つである。
Next, ALT construction will be described.
An ALT construction consists of two or more isomorphic structures. This structural unit is a logical expression called guard and a channel input, or a part composed of only channel input and a process following it (guard + process).
Suppose that some of the other processes running in parallel try to communicate with any of the channels that constitute the guard of the ALT instruction process. The ALT instruction is a mechanism that selectively executes the process following the first guard (which is a logical expression is satisfied) and a channel input (this process is referred to as the guard being removed). This mechanism is one of the important programming methods of CSP theory.
次に、TPCORE50上でのALTコンストラクションの実行について図18と表8を参照しながら説明する。
(e−1)ALTコンストラクションの内部状態
ALTコンストラクションは「イネーブル(Enable)」、「待機(Wait)」、「レディ(Ready)」の3つの状態とリセット(Reset)状態とを遷移して実現する。これらの状態を32bit幅の値で区別しALTコンストラクション実行時にある特定のメモリ領域(後述のALTプロセスのワークスペース内)にその値が保持される。この値を例えばそれぞれ0x80000001,0x80000002,0x80000003とする。
Next, execution of ALT construction on the
(E-1) Internal State of ALT Construction The ALT construction is realized by transitioning between three states of “Enable”, “Wait”, and “Ready” and a Reset state. . These states are distinguished by a 32-bit width value, and the value is held in a specific memory area (in the workspace of an ALT process described later) when the ALT construction is executed. For example, these values are 0x80000001, 0x80000002, and 0x80000003, respectively.
(e−2)ALTコンストラクションプロセス
図18と表8にALTコンストラクションの状態遷移図を示す。ALTコンストラクションが開始されるとは1つの独立したプロセスが開始されることを示す。メモリ42に独自のワークスペースをもちその先頭アドレスの値をプロセスIDとして設定する。Bptr17にその値が格納される。そしてそのアドレスから負方向3ワード目アドレス(Wptr14−12に状態「イネーブル」を表す0x80000001を入れる(ST81,F1参照)。
(E-2) ALT Construction Process FIG. 18 and Table 8 show state transition diagrams of the ALT construction. Starting an ALT construction indicates that one independent process is started. The memory 42 has its own work space, and the value of the head address is set as the process ID. The value is stored in Bptr 17 . Then add 0x80000001 representing the state "enable" in the negative direction third word addresses (Wptr 14 -12 from the address (ST81, see F1).
(e−3)ガード入力の有無の検査
すべてのガードについて、ガードごとに以下のことを行う。ガードの一部に論理式を使っている場合、OccamコンパイラはALTコンストラクション実行時での論理式の結果値をAreg11に入れるようにする。
ガードの論理式実行においてAreg11が真値をもっていれば、次にチャンネル入力のチャンネルアドレスの値(Breg12に格納されている)を検査する(図18,F2参照)。ここ(Breg12)がemptyでなくすでに他のプロセスIDが書き込まれていたら(即ちチャンネル出力プロセス側からのチャンネル通信の提起が始まっていることを示す)、ALTプロセスは「レディ」状態となり(ST83,F4参照)、Wptr14にレディフラッグを示す0x80000003を格納すると同時にアドレス(Wptr14)に分岐先未決定フラグ(1)を格納する。
この時点でプロセススケジューリングリストにプロセスが存在する場合、リスト先頭で待っているプロセスのワークスペースポインタ(Fptr16)をアドレス(チャンネルアドレス−8)に格納させ、Fptr16=アドレス(チャンネルアドレス)としてALTコンストラクションプロセスと通信するプロセスをリスト先頭に持ってくる(すでにそうなっていればこの部分はスキップ)。
あるいはスケジューリングリストが空であればBptr17にチャネルアドレスを格納するガードのチャンネルが未入力の場合(Areg11の値が偽値であるか、アドレス(Breg12)がALTコンストラクションプロセスのWptr14値であるか)このガードは無視される。ガードの論理式が真でかつアドレス(Breg12)=emptyであればアドレス(Breg12)にALTコンストラクションプロセスのワークスペースアドレス(Wptr14に保持されている)を入れる。(ガード有無の検査については、図18,表8を参照。)
(E-3) Inspection of presence or absence of guard input For all guards, the following is performed for each guard. When a logical expression is used as a part of the guard, the Occam compiler puts the result value of the logical expression at the time of executing the ALT construction into Areg 11 .
If Areg 11 has a true value in the execution of the guard logical expression, the value of the channel address of the channel input (stored in Breg 12 ) is checked (see FIG. 18, F2). If (Breg 12 ) is not empty and another process ID has already been written (that is, the channel output process side has started to propose channel communication), the ALT process enters the “ready” state (ST83). see F4), stores simultaneously storing 0x80000003 indicating the ready flag to Wptr 14 address (branch destination pending flag Wptr 14) (1).
If there is a process in the process scheduling list at this point, the work space pointer (Fptr 16 ) of the process waiting at the top of the list is stored in the address (channel address-8), and ALT is set as Fptr 16 = address (channel address). Brings the process that communicates with the construction process to the top of the list (if this is the case, skip this part).
Alternatively, if the scheduling list is empty, the guard channel for storing the channel address in Bptr 17 is not input (the value of Areg 11 is a false value, or the address (Breg 12 ) is the Wptr 14 value of the ALT construction process. Is this) This guard is ignored. If the logical expression of the guard is true and the address (Breg 12 ) = empty, the work space address of the ALT construction process (held in Wptr 14 ) is entered in the address (Breg 12 ). (Refer to Fig. 18 and Table 8 for the inspection for the presence or absence of guards.)
(e−4)待機状態(Wait)
すべてのチャンネルを入力待ちにした後(即ちガードに使われているチャンネルのチャンネルアドレスにALTプロセスのワークスペースアドレスが書かれたら)、アドレス(Wptr14−12)は「待機」を示す0x80000002を格納し、Wptr14=Fptr16として次に待機しているプロセスに起動をかける(Iptr15にFptr16−4を格納)(ST82,F3参照)。
こうしてまたALTコンストラクションプロセスはスケジューリングリストからはずしておく。ALTコンストラクションプロセスはガードを構成するチャンネルの入力を待つ。
ワークスペースの先頭アドレス(Wptr14)には分岐先未決定フラグ(1)を格納しておく。前述したように、ガード入力の有無の検査中にすでにチャンネル通信要求が感知されればこの状態を経ずに次のレディ状態に遷移する。
(E-4) Standby state (Wait)
After waiting for input all of the channel (ie When the workspace address of ALT process is written in the channel address of the channel being used to guard), address (
Thus again the ALT construction process is removed from the scheduling list. The ALT construction process waits for the input of the channels that make up the guard.
The branch destination undetermined flag (1) is stored in the head address (Wptr 14 ) of the workspace. As described above, if a channel communication request is already detected during the check for the presence of a guard input, the state transitions to the next ready state without passing through this state.
(e−5)レディ状態(Ready)
いずれかのガードを構成する論理式(もしあれば)が真値を持ちそのチャンネルに入力が入ってくれば、ワークスペースがFptr16に格納され、ALTコンストラクションプロセスをスケジュールリストの先頭待機プロセスとする。Areg11に「レディ状態」を示す値0x80000003を入れる。ALTコンストラクションプロセスへチャンネルアクセスを試みようとするプロセスはチャンネルアドレスからALTプロセスのワークスペースを得てそこに収納されている値を調べる。この値が1であるとこのチャンネルアドレスはALTプロセスによって使われているものと判断する(前述の「チャンネル間通信の開始」でのALTコンストラクションでの使用検査法の記述参照)。そしてこのALTコンストラクションプロセスがチャンネル出力側プロセスにより再びスケジューリングリストの先頭(Fptr16)に登録されることになる(ST83とF6参照)。
(E-5) Ready state (Ready)
If the logical expression (if any) that constitutes one of the guards has a true value and an input is input to the channel, the workspace is stored in Fptr 16 and the ALT construction process is the first waiting process in the schedule list. . In Areg 11 , a value 0x80000003 indicating “ready state” is entered. A process attempting to access a channel to the ALT construction process obtains the ALT process workspace from the channel address and examines the value stored therein. If this value is 1, it is determined that this channel address is being used by the ALT process (refer to the description of the usage check method in the ALT construction in the above-mentioned "start of inter-channel communication"). This ALT construction process is registered again at the head (Fptr 16 ) of the scheduling list by the channel output side process (see ST83 and F6).
(e−6)ガードのリセット(Reset)
ALTコンストラクションプロセスの入力ガードにおいて論理式が満たされチャンネルアクセスが認められるのは最初にガードがはずれた1つのみである。このガード以外のガードはすべてリセットさせなければならない。ALTコンストラクションプロセス中、Areg11の値はガードの論理式の結果である。
チャンネル通信が他のプロセスからなされたが論理式が真とならなかった場合はAreg11を偽値にリセットする。論理式は真であったがチャンネル通信が行われなかった場合、当該チャンネルのアドレス(チャンネルアドレス)にemptyを格納する。入力ガードがはずされたチャンネルはアドレス(Wptr14)(ALTコンストラクションプロセスのワークスペースを保持)の内容をみてそこがまだ−1かどうかをチェックする。−1であれば宛先未決定ということなのでアドレス(Wptr14)=アドレス(チャンネルアドレス)として相手方のプロセスIDを格納する。そしてガードのはずれたあとのプロセスのアドレスをIptr15に格納し実行をそこに移す(ST84,F7参照)。
(E-6) Guard reset (Reset)
In the input guard of the ALT construction process, the logical expression is satisfied and channel access is only allowed at the first time when the guard is removed. All other guards must be reset. During the ALT construction process, the value of Areg 11 is the result of the guard formula.
If channel communication is made from another process but the logical expression is not true, Areg 11 is reset to a false value. When the logical expression is true but the channel communication is not performed, “empty” is stored in the address (channel address) of the channel. The channel whose input guard is removed checks the contents of the address (Wptr 14 ) (holding the workspace of the ALT construction process) and checks whether it is still -1. If it is -1, it means that the destination has not been determined, so the process ID of the other party is stored as address (Wptr 14 ) = address (channel address). Then, the address of the process after the removal of the guard is stored in Iptr 15 and the execution is transferred there (see ST84, F7).
以上PARおよびALTコンストラクションの実装方法、1マイクロプロセッサ(プロセッサ)内で複数プロセスとチャンネル通信方法についてのハードウェアアルゴリズムについて述べた。
このように本発明のTPCORE50は複数プロセスの実行を1プロセッサ内部のみでも可能とした。これは、Occamのもつ並列処理コマンド(コンストラクタ)を単体内部で行えるようにハードウェアアルゴリズムを工夫してそれを実装したことによる。
すなわち、
・ 逐次実行(通常のシングル命令の順次実行)(SEQコンストラクション)
・ 並列処理(PARコンストラクション)
・ プロセス間のデータ通信と同期(チャンネルの概念)
・ 多重チャンネル入力処理(ALTコンストラクション)
を工夫したことによる。
In the above, the implementation method of PAR and ALT construction, the hardware algorithm about the multiple processes and channel communication method in one microprocessor (processor) were described.
As described above, the
That is,
-Sequential execution (sequential execution of normal single instructions) (SEQ construction)
・ Parallel processing (PAR construction)
・ Inter-process data communication and synchronization (channel concept)
・ Multi-channel input processing (ALT construction)
By devising.
本発明のFPGAに搭載したTPCORE50はトランスピュータの命令の実行を完全に行えるということを示したが、従来のアーキテクチャとはまったく異なっている。その結果、とくにメモリアクセス方法に、(a)メモリおよび外部インターフェースのアクセスレートとTPCORE動作周波数、(b)メモリアドレス空間の均質化、という相違点が生じ、それらは性能の向上につながっている。
Although it has been shown that the
なお本発明において、OccamはCSP理論に基づいて作られた言語である。本発明のプログラムはいくつかのプロセスが集合して構成されたものを示す。本発明のグランドステージは並列処理中のある1つのプロセスの遷移状態におけるスタート命令が実行される前の基本段階を示す。本発明のプロセスはある一定の行動を逐次的に実行し続ける実態を示す。また、コンストラクションとは代入、出力、プロシジャーコール(サブルーチンに相当する)などの最も基本となるプリミティブプロセスの集合体を示す。チャンネルとは並列に実行されているプロセス間の通信(データ交換)に用いられる概念または手段である。本発明のキューは待ち行列またはスケジューリングリストを示す。本発明のワークスペースはコンストラクション、命令、識別番号、アドレス、データなどを格納するメモリ空間を示す。本発明のスケジューリングリストは実行プロセスや待機プロセスの識別番号をメモリ上に格納して形成したリストを示す。本発明のアイドリングはプロセッサがプログラム実行前の待機状態を示す。 In the present invention, Occam is a language created based on the CSP theory. The program of the present invention shows an assembly of several processes. The ground stage of the present invention indicates a basic stage before a start instruction is executed in the transition state of a process in parallel processing. The process of the present invention shows the actual situation of executing a certain action sequentially. The construction is a collection of the most basic primitive processes such as assignment, output, and procedure call (corresponding to a subroutine). A channel is a concept or means used for communication (data exchange) between processes running in parallel. The queue of the present invention represents a queue or scheduling list. The workspace of the present invention indicates a memory space for storing constructions, instructions, identification numbers, addresses, data, and the like. The scheduling list of the present invention is a list formed by storing the identification numbers of execution processes and standby processes in a memory. The idling of the present invention indicates a standby state before the processor executes the program.
以上述べたように、本発明の並列処理プロセッサは、従来のトランスピュータのアーキテクチャを絞り込み、精査し直して設計することにより、できるだけ本体のゲート数・ロジックセル数を減らしスリム化させコンパクトなプロセッサを実現した。この結果、現在入手できる最大のFPGAで最大18個のTPCOREを1個のFPGAに組み込むことができる。この条件で、ルート部に最大8個のTPCOREを配置した4段のツリー構造、また格子形態だと4×4のメッシュを1個のFPGAに組み込むとができる。 As described above, the parallel processor of the present invention is a compact processor that reduces the number of gates and logic cells of the main unit as much as possible by reducing the number of gates and logic cells as much as possible by refining and designing the conventional transputer architecture. It was realized. As a result, a maximum of 18 TPCOREs can be incorporated into one FPGA with the largest FPGA currently available. Under this condition, a four-stage tree structure in which a maximum of eight TPCOREs are arranged in the root portion, or a 4 × 4 mesh in a lattice form can be incorporated into one FPGA.
また、本発明のTPCOREはFPGAで形成するので、ネットワークを構成する場合、並列処理を応用するシステムによって自由にそのトポロジーを改編できる。したがって、TPCOREをFPGA上で実現させることのメリットは非常に大きくなる。 In addition, since the TPCORE of the present invention is formed by FPGA, when the network is configured, the topology can be freely modified by a system to which parallel processing is applied. Therefore, the merit of realizing TPCORE on FPGA becomes very large.
さらに、本発明のTPCOREのシステムアーキテクチャは、外部インターフェースへのデータ転送レートとメモリのアクセスレートにおいて従来のトランスピュータと異なり、TPCOREの動作周波数と同期する。また、TPCOREではインターフェースの転送レートとクロックは独立している。
さらに、トランスピュータのメモリには階層性がありアクセスの早い内部メモリと遅いメモリがあったが、本発明のTPCOREではメモリをすべて均質化しアクセスレートを4Gバイト空間すべてで同一とした。即ち、同じクロックレートですべてのメモリ空間を均一にアクセスできる。
Furthermore, the system architecture of the TPCORE of the present invention is synchronized with the operating frequency of the TPCORE, unlike the conventional transputer, in terms of the data transfer rate to the external interface and the memory access rate. In TPCORE, the interface transfer rate and clock are independent.
Further, the transputer memory has a hierarchical internal memory and a fast access memory, but in the TPCORE of the present invention, all the memories are homogenized and the access rate is the same in all 4 Gbyte spaces. That is, all memory spaces can be accessed uniformly at the same clock rate.
10…CPU、11…Areg(Aレジスタ)、12…Breg、13…Creg、14…Wptr(ワークスペースポインタ)、15…Iptr、16…Fptr、17…Bptr、21…cnt、22…clk、23…Timeout、24…マイクロコードROMコントローラ、25…Oreg、26…Ireg、27…マイクロコードROM、28…マイクロコントローラ、29…Temp、31…ALU、41…メモリコントローラ、42,42−a〜42−d…メモリ、45…リンクブロック、50,50−1,50−2…TPCORE、52−a〜52−d…リンク(Link)インターフェース、100…TPCOREネットワーク。 10 ... CPU, 11 ... Areg (A register), 12 ... Breg, 13 ... Creg, 14 ... Wptr (workspace pointer), 15 ... Iptr, 16 ... Fptr, 17 ... Bptr, 21 ... cnt, 22 ... clk, 23 ... Timeout, 24 ... Microcode ROM controller, 25 ... Oreg, 26 ... Ireg, 27 ... Microcode ROM, 28 ... Microcontroller, 29 ... Temp, 31 ... ALU, 41 ... Memory controller, 42, 42-a to 42- d ... Memory, 45 ... Link block, 50, 50-1, 50-2 ... TPCORE, 52-a to 52-d ... Link (Link) interface, 100 ... TPCORE network.
Claims (20)
並列処理アーキテクチャ。 A parallel processing architecture of a parallel processor that executes a program in an Occam language, wherein the parallel processor is a start instruction of the process at an initial stage before execution of a process that is sequentially executed in a basic unit constituting the program Is executed, and when there is no queue waiting for the process, the generated process is executed and terminated with an end command of the process, or channel communication is raised or timed out during the execution of the process. When a process or stop command is executed, the system enters an idle state and waits to see the response of the other party's channel. When the process is created and there is no process waiting, the process identification number is placed at the end of the process waiting queue. Add and wait, while waiting for the above process in the queue waiting for the process Parallel processing architectures scan identification number advances, the waiting process is switched processes at the top stand becomes the head process the process is executed to exit the end command, the process proceeds to the initial stages.
請求項1記載の並列処理アーキテクチャ。 The parallel processor has a pointer register and a memory. When executing the process, the parallel processor stores an identification number of the process in the pointer register or a workspace of the memory, and the process stored in the workspace is identified by the identification number. A plurality of processes are linked in a linked structure, and the process indicated by the value of the workspace is executed according to the identification number. When the executing process is not executable or the processor is in an idling state, the process is executed. The parallel processing architecture according to claim 1.
請求項2記載の並列処理アーキテクチャ。 The parallel processor, when executing parallel construction of the process, exchanges the identification number between the pointer register and the workspace, detects a queue of the workspace, and executes a head process of the queue. The parallel processing architecture described.
請求項2記載の並列処理アーキテクチャ。 When the parallel processor performs channel communication between the processes, the process identification number is stored in the workspace of the memory, and the process is switched from the queue of the workspace. The parallel processing architecture according to claim 2.
請求項2記載の並列処理アーキテクチャ。 When the parallel processor executes the alternative construction of the process, it sends and receives the identification number in the pointer register and the workspace, detects the guard value of the process, and detects the first process in which the guard is removed. The parallel processing architecture according to claim 2, wherein the processing is executed.
算術演算または論理演算を行うALUと、上記ALUを制御するマイクロコードを格納したマイクロコードROMと、命令または次に実行する命令が格納されているメモリアドレスを格納するレジスタと汎用スタックレジスタを有する内部レジスタと、上記プロセッサで処理するプログラムの基本単位で逐次的に実行されるプロセスの識別番号を保持するワークスペースポインタレジスタと、待機プロセスを管理するためのデータを格納するプロセス管理用レジスタと、上記マイクロコードROMを制御するマイクロコードROMコントローラとを有するプロセッサと、
上記プロセッサに接続されてデータを入出力する複数のリンクと、
上記プロセッサまたは上記リンクの入出力データを格納するとともにワークスペースが設けられ該ワークスペースに上記プロセスを開始する識別番号と次に実行されるプロセスの識別番号のデータを所定アドレス値だけ離して格納しスケジューリングリストを形成して上記識別番号が連結されるメモリと、
上記メモリの入出力データの授受を制御するメモリコントローラと
を有する
並列処理プロセッサ。 A parallel processor that forms a network and executes in the Occam language,
An internal unit having an ALU that performs arithmetic or logical operations, a microcode ROM that stores microcode that controls the ALU, a register that stores a memory address in which an instruction or an instruction to be executed next is stored, and a general-purpose stack register A register, a workspace pointer register that holds an identification number of a process that is sequentially executed in a basic unit of a program processed by the processor, a process management register that stores data for managing a standby process, and A processor having a microcode ROM controller for controlling the microcode ROM;
A plurality of links connected to the processor for inputting and outputting data;
The input / output data of the processor or the link is stored and a work space is provided, and the data of the identification number for starting the process and the identification number of the next process to be executed are stored in the work space apart by a predetermined address value. A memory that forms a scheduling list to which the identification numbers are concatenated;
A parallel processing processor comprising: a memory controller that controls transmission / reception of input / output data of the memory.
請求項6記載の並列処理プロセッサ。 7. The parallel processing according to claim 6, wherein the process is managed by the workspace pointer register and the scheduling list, the workspace pointer register stores an identification number of a current process, and a standby process is held in the scheduling list. Processor.
請求項6記載の並列処理プロセッサ。 The parallel processing processor according to claim 6, wherein a process indicated by the value of the workspace pointer register is executed, and the executing process is switched when the executing process cannot be executed or when the processor is in an idling state. .
請求項8記載の並列処理プロセッサ。 9. The parallel processing processor according to claim 8, wherein when another process is created or an interrupt occurs while executing the process, the identification number of the process is added to the end of the scheduling list as a waiting process.
請求項6記載の並列処理プロセッサ。 The memory is formed on the same substrate as the processor on the FPGA, and the work space is provided with a memory area on the memory for each process, and a memory address of the memory area is set based on the value indicated by the process identification number in the memory area. The parallel processing processor according to claim 6, wherein several words are provided in a predetermined direction in a negative direction.
請求項6記載の並列処理プロセッサ。 The parallel processing according to claim 6, wherein the work space is used for data holding of each register, channel communication, execution of an alternative construction or process scheduling when the process to be processed in parallel is temporarily interrupted by an interrupt of another process. Processing processor.
請求項6記載の並列処理プロセッサ。 The process management register has first and second pointer registers, the scheduling list is formed by the first process, the last process, and an intermediate process, and the first pointer register holds the identification number of the first process. 7. The parallel processor according to claim 6, wherein the second pointer register holds an identification number of the last process, forms a linked list structure with the identification number, and connects the standby processes.
請求項6記載の並列処理プロセッサ。 The internal register has first and second stack registers, stores the process identification number of the instruction of the parallel construction to be started when executing the parallel construction in the first stack register, and is executed at the start of the process The address and offset are stored in the second stack register. When there is a waiting process, the data of the first stack register is stored at the memory address indicated by the first pointer register. The data of the first stack register is stored in the second pointer register, and the third pointer register for storing the instruction pointer and the data of the second stack register are stored at a predetermined address of the memory. Parallel processor.
請求項13記載の並列処理プロセッサ。 When executing the parallel construction, the processor checks whether there is a standby process, and when there is the standby process, exchanges data between the third pointer register and the first pointer register to switch the process. The parallel processing processor according to claim 13, wherein the idling state is set when there is no data.
請求項6記載の並列処理プロセッサ。 When an interrupt occurs during execution of the process, the processor stores the data of the workspace pointer register, the instruction pointer register, and the internal register in a predetermined area of the workspace, and the workspace pointer register and the instruction The parallel processing processor according to claim 6, wherein data of the first pointer register is stored in the pointer register.
請求項6記載の並列処理プロセッサ。 When the inter-channel communication command is executed, the preceding process stores the command address started immediately after channel communication and the data in the internal register in the workspace if the channel address value is empty. The parallel processing processor according to claim 6, wherein the process is removed from the scheduling list and the next waiting process is executed.
請求項16記載の並列処理プロセッサ。 The processor stores the process identification number of the communication partner in the second pointer register when there is a queue waiting for the process as a result of checking the queue state waiting for the process after the channel communication between the processes is established. The parallel processing processor according to claim 16, wherein an identification number is added to the end of the queue waiting for the process, and when there is no queue waiting for the process, the second pointer register stores the process identification number of the communication partner.
請求項6記載の並列処理プロセッサ。 The ortho-constructive construction of the process is composed of a logical expression constituting a guard and a part and a process composed of only channel inputs or channel inputs, and the result of the logical expression of the guard is a true value and the first for process management. When the process is in a ready state and there is a process in the scheduling list, the first stack register stores a work space pointer of the process waiting at the head of the list, and the process of the ortho construction 7. The parallel processing according to claim 6, wherein when the process that communicates with the process is positioned at the top of the list and there is no data in the scheduling list, the second pointer register stores the value of the second stack register for the process management. Processor.
請求項18記載の並列処理プロセッサ。 After the above-described alternative construction waits for input of all the channels, a value indicating a standby state is stored in the workspace of the memory, and a value of the first pointer register is stored in the workspace pointer register. The parallel processing processor according to claim 18, wherein the parallel processing processor is started.
請求項18記載の並列処理プロセッサ。 In the ortho construction, when input data is supplied to the channel when a logical expression constituting the guard is true, the data of the workspace is stored in the first pointer register and the process of the ortho construction is performed. The parallel processing processor according to claim 18, wherein a value indicating a ready state is stored in the first stack register as a first waiting process of scheduling.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007211904A JP2009048306A (en) | 2007-08-15 | 2007-08-15 | Parallel processing architecture and parallel processing processor using the same |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007211904A JP2009048306A (en) | 2007-08-15 | 2007-08-15 | Parallel processing architecture and parallel processing processor using the same |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2009048306A true JP2009048306A (en) | 2009-03-05 |
Family
ID=40500480
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2007211904A Pending JP2009048306A (en) | 2007-08-15 | 2007-08-15 | Parallel processing architecture and parallel processing processor using the same |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2009048306A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2017134044A (en) * | 2016-01-31 | 2017-08-03 | 国立大学法人 千葉大学 | Signal data processing device |
| JP2019050507A (en) * | 2017-09-11 | 2019-03-28 | 株式会社東芝 | INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING METHOD, AND PROGRAM |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS59133650A (en) * | 1982-11-26 | 1984-08-01 | インモス,リミテツド | Microcomputer, network thereof and operation of same |
| JPS61500387A (en) * | 1983-11-04 | 1986-03-06 | インモス リミテツド | microcomputer |
| JPH0371364A (en) * | 1989-08-11 | 1991-03-27 | Toyo Commun Equip Co Ltd | Processor |
| JPH03102532A (en) * | 1989-09-18 | 1991-04-26 | Fujitsu Ltd | Process execution possibility detecting system |
| JP2002163117A (en) * | 2000-11-24 | 2002-06-07 | Matsushita Electric Ind Co Ltd | Task scheduling device |
| JP2006146390A (en) * | 2004-11-17 | 2006-06-08 | Oki Data Corp | Memory bus converter and information processing system |
-
2007
- 2007-08-15 JP JP2007211904A patent/JP2009048306A/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS59133650A (en) * | 1982-11-26 | 1984-08-01 | インモス,リミテツド | Microcomputer, network thereof and operation of same |
| JPS61500387A (en) * | 1983-11-04 | 1986-03-06 | インモス リミテツド | microcomputer |
| JPH0371364A (en) * | 1989-08-11 | 1991-03-27 | Toyo Commun Equip Co Ltd | Processor |
| JPH03102532A (en) * | 1989-09-18 | 1991-04-26 | Fujitsu Ltd | Process execution possibility detecting system |
| JP2002163117A (en) * | 2000-11-24 | 2002-06-07 | Matsushita Electric Ind Co Ltd | Task scheduling device |
| JP2006146390A (en) * | 2004-11-17 | 2006-06-08 | Oki Data Corp | Memory bus converter and information processing system |
Non-Patent Citations (1)
| Title |
|---|
| JPN7012000291; Makoto TANAKA,Naoya FUKUCHI,Yutaka OOKI, Chikara FUKUNAGA: 'Design of a Transputer Core and its Implementation in an FPGA' Communicating Process Architectures 2004 , 20040905, pp.361-372, IOS Press * |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2017134044A (en) * | 2016-01-31 | 2017-08-03 | 国立大学法人 千葉大学 | Signal data processing device |
| JP2019050507A (en) * | 2017-09-11 | 2019-03-28 | 株式会社東芝 | INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING METHOD, AND PROGRAM |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11675598B2 (en) | Loop execution control for a multi-threaded, self-scheduling reconfigurable computing fabric using a reenter queue | |
| US11868163B2 (en) | Efficient loop execution for a multi-threaded, self-scheduling reconfigurable computing fabric | |
| US9787612B2 (en) | Packet processing in a parallel processing environment | |
| US7076595B1 (en) | Programmable logic device including programmable interface core and central processing unit | |
| CN109697185B (en) | Synchronization in a multi-tile processing array | |
| JP2664662B2 (en) | Method of operating simultaneous processes in computer system and microcomputer | |
| TWI541725B (en) | Method and apparatus for managing resources of a multi-core architecture | |
| US12182048B2 (en) | Multi-threaded, self-scheduling reconfigurable computing fabric | |
| CN102135950B (en) | On-chip heterogeneous multi-core system based on star type interconnection structure, and communication method thereof | |
| EP1059588A1 (en) | Multi-channel dma with request scheduling | |
| CN103019838B (en) | Multi-DSP (Digital Signal Processor) platform based distributed type real-time multiple task operating system | |
| WO2006124730A2 (en) | Mechanism for managing resource locking in a multi-threaded environment | |
| JP2015501056A (en) | Circuit devices, integrated circuit devices, program products and methods that utilize low-latency variable propagation networks for parallel processing of virtual threads across multiple hardware threads (grains of virtual threads across multiple hardware threads) Low latency variable transmission network for generalized parallel processing) | |
| CN102934102A (en) | Multiprocessor system, execution control method and execution control program | |
| CN114579188A (en) | A RISC-V vector memory access processing system and processing method | |
| EP1365321A2 (en) | Multiprocessor system | |
| US11392407B2 (en) | Semiconductor device | |
| US5495619A (en) | Apparatus providing addressable storage locations as virtual links and storing predefined destination information for any messages transmitted on virtual links at these locations | |
| EP3304331A1 (en) | Single-chip multi-processor communication | |
| WO2007114059A1 (en) | Data processing device | |
| CN101770362B (en) | Distributed dynamic process generating unit meeting System C processor | |
| JP2009048306A (en) | Parallel processing architecture and parallel processing processor using the same | |
| EP1936514B1 (en) | Apparatus and method for controlling issue of requests to another operation processing device | |
| CN116635840A (en) | Instruction processing method and processor based on multi-instruction engine | |
| JP2006202271A (en) | Stream processor and information processor |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A711 Effective date: 20100622 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20100622 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20100816 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20111213 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120131 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120402 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20121106 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20130709 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20131009 |
|
| A911 | Transfer of reconsideration by examiner before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20140128 |
|
| A912 | Removal of reconsideration by examiner before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A912 Effective date: 20140404 |