JP2010146102A - Arithmetic processor and storage area allocation method - Google Patents

Arithmetic processor and storage area allocation method Download PDF

Info

Publication number
JP2010146102A
JP2010146102A JP2008319993A JP2008319993A JP2010146102A JP 2010146102 A JP2010146102 A JP 2010146102A JP 2008319993 A JP2008319993 A JP 2008319993A JP 2008319993 A JP2008319993 A JP 2008319993A JP 2010146102 A JP2010146102 A JP 2010146102A
Authority
JP
Japan
Prior art keywords
memory
arithmetic
storage area
circuit
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
Application number
JP2008319993A
Other languages
Japanese (ja)
Inventor
Makoto Kosone
真 小曽根
Kazuhisa Iizuka
和久 飯塚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP2008319993A priority Critical patent/JP2010146102A/en
Publication of JP2010146102A publication Critical patent/JP2010146102A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Memory System (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide memory configuration technology contributing to reduction in circuit scale. <P>SOLUTION: The processor 10 includes a plurality of arithmetic units 12a-12d performing arithmetic processing. First selection circuits 110a-110c each configure an address space to each arithmetic unit 12a-12d by use of at least one RAM 100a-100f. Each of the RAMs 100a-100f is not connected to all the arithmetic units 12a-12d, but connected only to a part thereof. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、演算処理に対してメモリを構成する技術に関し、特に機能の変更が可能な演算処理装置においてメモリを構成する技術に関する。   The present invention relates to a technique for configuring a memory for arithmetic processing, and more particularly to a technique for configuring a memory in an arithmetic processing device capable of changing functions.

近年、ALU(Arithmetic Logic Unit)と呼ばれる基本演算機能を1つ以上持つ演算ユニットを備えた処理装置(プロセッサ)の開発が進められている(たとえば特許文献1参照)。この演算ユニットは、複数のALUを含むALU列と、ALU列の間に設けられた接続部を備えて構成される。処理装置においては、ALUアレイに対してコマンドデータが設定されることにより、ALU回路の演算機能と、前後段のALU列を接続する接続部が制御され、全体として所期の演算処理が実現される。コマンドデータは、一般にC言語等の高級プログラム言語で記述されたソースプログラムからデータフローグラフ(DFG:Data Flow Graph)を作成し、その情報をもとに作成される。   In recent years, development of processing devices (processors) including an arithmetic unit having one or more basic arithmetic functions called ALU (Arithmetic Logic Unit) has been promoted (see, for example, Patent Document 1). This arithmetic unit is configured to include an ALU column including a plurality of ALUs and a connection portion provided between the ALU columns. In the processing device, by setting command data to the ALU array, the arithmetic function of the ALU circuit and the connection part connecting the preceding and succeeding ALU columns are controlled, and the expected arithmetic processing is realized as a whole. The The command data is generally created based on the data flow graph (DFG: Data Flow Graph) created from a source program written in a high-level program language such as C language.

複数の演算ユニットをもつ処理装置では、実現したい演算処理によって各演算ユニットの必要とするメモリ量が異なるため、メモリ構成を可変にできることが望ましい。そのため、メモリ再構成回路を備えた半導体装置を提案するものがある(たとえば特許文献2参照)。
特開2006−40254号公報 特開2006−18452号公報
In a processing apparatus having a plurality of arithmetic units, it is desirable that the memory configuration can be made variable because the amount of memory required for each arithmetic unit differs depending on the arithmetic processing desired to be realized. For this reason, some semiconductor devices including a memory reconfigurable circuit are proposed (see, for example, Patent Document 2).
JP 2006-40254 A Japanese Patent Laid-Open No. 2006-18452

しかしながら、特許文献2に開示された半導体装置では、すべての演算ユニットがすべてのRAMを用いて、必要とする容量のメモリを構成する。そのため、メモリ再構成に必要なスイッチや配線が多くなり、半導体装置全体の回路規模が増大している。   However, in the semiconductor device disclosed in Patent Document 2, all the arithmetic units use all the RAMs to form a memory having a necessary capacity. For this reason, more switches and wirings are required for memory reconfiguration, and the circuit scale of the entire semiconductor device is increasing.

本発明はこうした状況に鑑みてなされたもので、その目的は、回路規模の縮小化に貢献するメモリ構成技術を提供することにある。   The present invention has been made in view of such circumstances, and an object thereof is to provide a memory configuration technique that contributes to a reduction in circuit scale.

上記課題を解決するために、本発明のある態様の演算処理装置は、機能の変更が可能な演算処理装置であって、演算処理を行なう複数の演算ユニットと、複数の記憶領域と、各演算ユニットに対して、少なくとも1つの記憶領域を用いてアドレス空間を構成する記憶領域構成回路とを備える。少なくとも1つの記憶領域は、複数の演算ユニットの一部にのみ接続されている。   In order to solve the above problems, an arithmetic processing device according to an aspect of the present invention is an arithmetic processing device capable of changing a function, and includes a plurality of arithmetic units that perform arithmetic processing, a plurality of storage areas, and each arithmetic operation. The unit includes a storage area configuration circuit that forms an address space using at least one storage area. At least one storage area is connected to only some of the plurality of arithmetic units.

本発明の別の態様もまた、演算処理装置である。この装置は、機能の変更が可能な演算処理装置であって、複数の独立した演算処理を行なう少なくとも1つの演算ユニットと、複数の記憶領域と、各演算処理に対して、少なくとも1つの記憶領域を用いてアドレス空間を構成する記憶領域構成回路とを備える。少なくとも1つの記憶領域は、複数の演算処理の一部にのみ利用されるように演算ユニットに接続されている。   Another embodiment of the present invention is also an arithmetic processing device. This apparatus is an arithmetic processing unit capable of changing functions, and includes at least one arithmetic unit that performs a plurality of independent arithmetic processes, a plurality of storage areas, and at least one storage area for each arithmetic process. And a storage area configuration circuit that configures an address space. At least one storage area is connected to the arithmetic unit so as to be used only for a part of the plurality of arithmetic processes.

本発明のさらに別の態様は、記憶領域割当方法である。この方法は、複数の演算処理を実行することができ、かつ演算処理に対する記憶領域を構成可能な記憶領域構成回路を備えた演算処理装置に対して、各演算処理に割り当てる記憶領域を定める記憶領域割当方法であって、各演算処理が保持しなければならないデータ量に応じて、各演算処理が使用可能な記憶領域を割り当てる。   Yet another aspect of the present invention is a storage area allocation method. In this method, a storage area for determining a storage area to be assigned to each arithmetic process is provided for an arithmetic processing apparatus having a storage area configuration circuit capable of executing a plurality of arithmetic processes and having a storage area for the arithmetic process. According to the allocation method, a storage area that can be used by each arithmetic processing is allocated according to the amount of data that each arithmetic processing must hold.

なお、以上の構成要素の任意の組み合わせ、本発明の表現を方法、装置、システム、コンピュータプログラムとして表現したものもまた、本発明の態様として有効である。   It should be noted that any combination of the above components and the expression of the present invention expressed as a method, apparatus, system, and computer program are also effective as an aspect of the present invention.

本発明によれば、効率的なメモリ構成技術を提供することができる。   According to the present invention, an efficient memory configuration technique can be provided.

図1は、実施の形態に係る処理装置10の基本構成図である。処理装置10は、集積回路装置26、コンパイル部30、データフローグラフ処理部31、設定データ生成部32および記憶部34を備える。処理装置10は、機能の変更が可能な演算処理装置として構成される。   FIG. 1 is a basic configuration diagram of a processing apparatus 10 according to an embodiment. The processing device 10 includes an integrated circuit device 26, a compilation unit 30, a data flow graph processing unit 31, a setting data generation unit 32, and a storage unit 34. The processing device 10 is configured as an arithmetic processing device capable of changing functions.

集積回路装置26は1チップとして構成され、演算ユニット12、設定部14、制御部18、内部状態保持回路20、第1フィードバック経路24、メインメモリ27および第2フィードバック経路29を備える。演算ユニット12は複数の演算器で構成され、設定を変更することにより、機能の変更を可能とするリコンフィギュラブル回路である。演算ユニット12は組合せ回路または順序回路等の論理回路として構成される。第1フィードバック経路24および第2フィードバック経路29は、フィードバックパスとして機能し、演算ユニット12の出力を、演算ユニット12の入力に接続する。   The integrated circuit device 26 is configured as one chip, and includes an arithmetic unit 12, a setting unit 14, a control unit 18, an internal state holding circuit 20, a first feedback path 24, a main memory 27, and a second feedback path 29. The arithmetic unit 12 is a reconfigurable circuit that includes a plurality of arithmetic units and that can change the function by changing the setting. The arithmetic unit 12 is configured as a logic circuit such as a combinational circuit or a sequential circuit. The first feedback path 24 and the second feedback path 29 function as a feedback path, and connect the output of the arithmetic unit 12 to the input of the arithmetic unit 12.

演算ユニット12は、それぞれが複数の演算機能を選択的に実行可能な論理回路の多段配列と、前段の論理回路の出力と後段の論理回路の入力の接続関係を設定可能な接続部とを備える。構造的には、複数の論理回路列の間に、論理回路列間の接続用結線を設定する接続部が設けられる。演算ユニット12は、複数段に配列された各論理回路の機能、および論理回路間の接続を任意に設定することで、機能の変更を可能とする。   The arithmetic unit 12 includes a multi-stage array of logic circuits each capable of selectively executing a plurality of arithmetic functions, and a connection unit capable of setting a connection relationship between the output of the preceding logic circuit and the input of the succeeding logic circuit. . Structurally, a connection part for setting connection lines between logic circuit strings is provided between the plurality of logic circuit strings. The arithmetic unit 12 can change the function by arbitrarily setting the function of each logic circuit arranged in a plurality of stages and the connection between the logic circuits.

演算ユニット12は、パイプライン構成を有し、複数のスレッドを同時に実行することができる。スレッドは、演算ユニット12に実行させる処理単位であり、各スレッドの処理は、それ自体で完結する。複数のスレッドは、互いに独立して実行され、スレッド同士の間でデータの受け渡しがあるものであってもよい。処理装置10は、複数種類の回路のコンフィギュレーションを演算ユニット12上で同時に実現できる。   The arithmetic unit 12 has a pipeline configuration and can execute a plurality of threads simultaneously. A thread is a processing unit to be executed by the arithmetic unit 12, and the processing of each thread is completed by itself. The plurality of threads may be executed independently of each other, and there may be data passing between the threads. The processing apparatus 10 can simultaneously implement a plurality of types of circuit configurations on the arithmetic unit 12.

設定部14は、第1回路設定部14a、第2回路設定部14b、第3回路設定部14c、および第4回路設定部14dを有し、演算ユニット12に所期の回路を構成するための設定データ40を供給する。各回路設定部14a〜14dは、プログラムカウンタのカウント値に基づいて、保持するデータを出力するコマンドメモリとして構成されてもよい。この場合、制御部18がシーケンサとして機能してプログラムカウンタの出力を制御し、設定データ40がコマンドメモリから出力されるコマンドデータとなる。   The setting unit 14 includes a first circuit setting unit 14a, a second circuit setting unit 14b, a third circuit setting unit 14c, and a fourth circuit setting unit 14d, and is used to configure an expected circuit in the arithmetic unit 12. Setting data 40 is supplied. Each of the circuit setting units 14a to 14d may be configured as a command memory that outputs data to be held based on the count value of the program counter. In this case, the control unit 18 functions as a sequencer to control the output of the program counter, and the setting data 40 becomes command data output from the command memory.

ここでは演算ユニット12が、4段のALU列で構成されたALUアレイであることを前提とする。具体的に、第1回路設定部14a、第2回路設定部14b、第3回路設定部14cおよび第4回路設定部14dは、それぞれ異なるスレッドを実行するための設定データ40を、演算ユニット12のパイプラインにおいて、各段における接続部およびALU列で構成されるリコンフィギュラブルユニットに所定の順序で供給する。これにより、ALUアレイの各段には、それぞれ異なる種類の回路の一部が構成されることになり、マルチスレッド処理機能が実現される。   Here, it is assumed that the arithmetic unit 12 is an ALU array composed of four stages of ALU columns. Specifically, the first circuit setting unit 14a, the second circuit setting unit 14b, the third circuit setting unit 14c, and the fourth circuit setting unit 14d receive setting data 40 for executing different threads, respectively. In the pipeline, the data is supplied in a predetermined order to a reconfigurable unit composed of a connection portion and an ALU row in each stage. As a result, a part of a different type of circuit is configured in each stage of the ALU array, and a multithread processing function is realized.

内部状態保持回路20は、例えばデータフリップフロップ(DFF)などの順序回路として構成され、演算ユニット12の出力を受け付ける。内部状態保持回路20は第1フィードバック経路24に接続されており、演算ユニット12の出力を直接演算ユニット12の入力にフィードバックさせる。なお第1フィードバック経路24は、演算ユニット12の最下段の出力のみを最上段に入力するように構成されてもよい。   The internal state holding circuit 20 is configured as a sequential circuit such as a data flip-flop (DFF), for example, and receives the output of the arithmetic unit 12. The internal state holding circuit 20 is connected to the first feedback path 24 and feeds back the output of the arithmetic unit 12 directly to the input of the arithmetic unit 12. Note that the first feedback path 24 may be configured to input only the lowermost output of the arithmetic unit 12 to the uppermost stage.

メインメモリ27は、演算ユニット12から出力される出力データを格納するためのRAMにより構成される。メインメモリ27は、演算ユニット12の出力データを一時的に保持し、演算ユニット12に戻す機能をもつ。メインメモリ27は、制御部18からのチップイネーブル(CE)信号およびアドレス信号に基づいて、データの書込/読出を行う。メインメモリ27は第2フィードバック経路29に接続されており、制御部18からの読出指示に基づいて、所期のタイミングでデータを演算ユニット12の入力にフィードバックさせる。なお、設定部14がコマンドメモリとして構成されている場合、コマンドメモリから供給されるコマンドデータで、メインメモリ27のデータの書込/読出を行ってもよい。   The main memory 27 is configured by a RAM for storing output data output from the arithmetic unit 12. The main memory 27 has a function of temporarily holding output data of the arithmetic unit 12 and returning it to the arithmetic unit 12. The main memory 27 writes / reads data based on a chip enable (CE) signal and an address signal from the control unit 18. The main memory 27 is connected to the second feedback path 29 and feeds back data to the input of the arithmetic unit 12 at a predetermined timing based on a read instruction from the control unit 18. When the setting unit 14 is configured as a command memory, the data in the main memory 27 may be written / read using command data supplied from the command memory.

処理装置10においては、演算ユニット12の出力を演算ユニット12の入力にフィードバックする経路が、第1フィードバック経路24および第2フィードバック経路29の2系統存在する。第1フィードバック経路24は、メインメモリ27を介さないために、演算ユニット12の出力データを高速にフィードバック処理することが可能である。一方、第2フィードバック経路29は、制御部18からの指示により所期のタイミングでデータ信号を演算ユニット12に供給することができる。このように、第1フィードバック経路24または第2フィードバック経路29は、演算ユニット12上に再構成する回路に応じて適宜使い分けられる。   In the processing apparatus 10, there are two paths for feeding back the output of the arithmetic unit 12 to the input of the arithmetic unit 12, a first feedback path 24 and a second feedback path 29. Since the first feedback path 24 does not go through the main memory 27, the output data of the arithmetic unit 12 can be fed back at high speed. On the other hand, the second feedback path 29 can supply a data signal to the arithmetic unit 12 at an expected timing according to an instruction from the control unit 18. As described above, the first feedback path 24 or the second feedback path 29 is appropriately used depending on the circuit to be reconfigured on the arithmetic unit 12.

演算ユニット12は、機能の変更が可能な論理回路を有して構成される。複数の論理回路は、マトリックス状に配置された構造をとってもよい。各論理回路の機能と、論理回路間の接続関係は、設定部14により供給される設定データ40に基づいて設定される。また、論理回路内において、基本演算素子同士を接続する組合せ用結線も、設定データ40に基づいて設定される。設定データ40は、以下の手順で生成される。   The arithmetic unit 12 includes a logic circuit whose function can be changed. The plurality of logic circuits may have a structure arranged in a matrix. The function of each logic circuit and the connection relationship between the logic circuits are set based on setting data 40 supplied by the setting unit 14. In the logic circuit, the combination connection for connecting the basic arithmetic elements to each other is also set based on the setting data 40. The setting data 40 is generated by the following procedure.

集積回路装置26により実現されるべきプログラム36が、記憶部34に保持されている。プログラム36は、回路における処理の動作を記述した動作記述を示し、信号処理回路または信号処理アルゴリズムなどをC言語などの高級言語で記述したものである。コンパイル部30は、記憶部34に格納されたプログラム36をコンパイルし、データフローグラフ(DFG)38に変換して記憶部34に格納する。データフローグラフ38は、回路における演算間の実行順序の依存関係を表現し、入力変数および定数の演算の流れをグラフ構造で示したものである。一般に、データフローグラフ38は、上から下に向かって演算が進むように作成される。   A program 36 to be realized by the integrated circuit device 26 is held in the storage unit 34. The program 36 shows an operation description describing the operation of processing in the circuit, and describes a signal processing circuit or a signal processing algorithm in a high-level language such as C language. The compiling unit 30 compiles the program 36 stored in the storage unit 34, converts it into a data flow graph (DFG) 38, and stores it in the storage unit 34. The data flow graph 38 expresses the dependency of execution order between operations in a circuit, and shows the flow of operations of input variables and constants in a graph structure. In general, the data flow graph 38 is created so that the calculation proceeds from top to bottom.

データフローグラフ処理部31は、コンパイル部30により生成されたデータフローグラフ38から、所定の規則を有するデータフローの一群を探索する。このデータフローの一群は、演算ノード間に所定の接続関係を有するノードの集合であって、予め記憶部34において登録されている。データフローグラフ処理部31は、所定のデータフローの一群を探索して、その一群を構成するノード数よりも少ない数のノードに置換する。   The data flow graph processing unit 31 searches the data flow graph 38 generated by the compiling unit 30 for a group of data flows having a predetermined rule. A group of data flows is a set of nodes having a predetermined connection relationship between operation nodes, and is registered in the storage unit 34 in advance. The data flow graph processing unit 31 searches for a group of predetermined data flows and replaces them with a number of nodes smaller than the number of nodes constituting the group.

なお、データフローの一群から置換されたノードは、演算ユニット12の論理回路で処理可能なノードである必要がある。これに対応して、論理回路は、置換されたノードを処理するために、自身のもつ複数の基本演算素子を所定の順序で組み合わせるための組合せ用結線を有して構成される。これにより、論理回路は基本演算素子の数を増やすことなく、組合せ用結線をもつことで、複数の基本演算素子により実行される新たな演算機能をもつことができる。言い換えると、論理回路における複数の基本演算素子の可能な組合せに応じて、所定の規則を有するデータフローの一群を予め登録し、データフローグラフ処理部31が、1つの論理回路において実行可能なデータフローの一群を探索して、1つのノードに置換することが可能となる。   The node replaced from the group of data flows needs to be a node that can be processed by the logic circuit of the arithmetic unit 12. Correspondingly, the logic circuit is configured to have a combination connection for combining a plurality of basic arithmetic elements of its own in a predetermined order in order to process the replaced node. As a result, the logic circuit can have a new arithmetic function executed by a plurality of basic arithmetic elements by having the combination connection without increasing the number of basic arithmetic elements. In other words, a group of data flows having a predetermined rule is registered in advance according to possible combinations of a plurality of basic arithmetic elements in the logic circuit, and the data flow graph processing unit 31 can execute data in one logic circuit. A group of flows can be searched and replaced with one node.

設定データ生成部32は、データフローグラフ処理部31により処理されたデータフローグラフ38から設定データ40を生成する。設定データ40は、データフローグラフ38を演算ユニット12にマッピングするためのデータであり、演算ユニット12における論理回路の機能や論理回路間の接続関係を定める。   The setting data generation unit 32 generates setting data 40 from the data flow graph 38 processed by the data flow graph processing unit 31. The setting data 40 is data for mapping the data flow graph 38 to the arithmetic unit 12 and defines the function of the logic circuit in the arithmetic unit 12 and the connection relationship between the logic circuits.

なお設定データ生成部32は、コンパイル部30により生成されたメモリ(RAM)と演算ユニット12またはスレッドなどの演算処理単位との関係をもとに、メモリと演算ユニット12との接続関係、およびメモリアクセスに関する制御を定める設定データ40も生成する。この設定データ40は、メインメモリ27の再構成に利用される。   Note that the setting data generating unit 32 is based on the relationship between the memory (RAM) generated by the compiling unit 30 and the arithmetic processing unit such as the arithmetic unit 12 or the thread, and the connection relationship between the memory and the arithmetic unit 12 and the memory. Setting data 40 that defines control related to access is also generated. This setting data 40 is used for reconfiguration of the main memory 27.

図2は、演算ユニット12の構成を示す。演算ユニット12は、複数の演算機能を選択的に実行可能な論理回路50より構成される論理回路列を複数備える。具体的に、演算ユニット12は、論理回路列の多段配列と、各段に設けられた接続部52を備えて構成される。接続部52は、前段の論理回路の出力と後段の論理回路の入力の任意の接続関係あるいは予め定められた接続関係の組合せの中から選択された接続関係を設定することができる。また接続部52は、前段の論理回路の出力信号を保持することができる。演算ユニット12では、論理回路の多段配列構造により、上段から下段に向かって演算が進められる。   FIG. 2 shows the configuration of the arithmetic unit 12. The arithmetic unit 12 is provided with a plurality of logic circuit arrays each including a logic circuit 50 that can selectively execute a plurality of arithmetic functions. Specifically, the arithmetic unit 12 includes a multi-stage arrangement of logic circuit arrays and a connection unit 52 provided at each stage. The connection unit 52 can set an arbitrary connection relationship between the output of the preceding logic circuit and the input of the subsequent logic circuit, or a connection relationship selected from a predetermined combination of connection relationships. The connection unit 52 can hold the output signal of the preceding logic circuit. In the arithmetic unit 12, the operation proceeds from the upper stage to the lower stage due to the multi-stage arrangement structure of the logic circuits.

演算ユニット12は、論理回路50としてALU(Arithmetic Logic Unit)を有している。ALUは、複数種類の多ビット演算を選択的に実行可能な算術論理回路であって、論理和、論理積、ビットシフトなどの複数種類の多ビット演算を設定により選択的に実行できる。各ALUは、複数の演算機能を設定するためのセレクタを有して構成されている。図示の例では、ALUが、2つの入力端子と1つの出力端子を有して構成される。なおALUは、3つ以上の入力端子を有してもよく、また2つ以上の出力端子を有してもよい。   The arithmetic unit 12 has an ALU (Arithmetic Logic Unit) as the logic circuit 50. The ALU is an arithmetic logic circuit capable of selectively executing a plurality of types of multi-bit operations, and can selectively execute a plurality of types of multi-bit operations such as logical sum, logical product, and bit shift by setting. Each ALU has a selector for setting a plurality of arithmetic functions. In the illustrated example, the ALU is configured to have two input terminals and one output terminal. The ALU may have three or more input terminals, and may have two or more output terminals.

図示のように、演算ユニット12は、縦方向にX個、横方向にY個のALUが配置されたX段Y列のALUアレイとして構成される。図2は、4段のALU列53を有するALUアレイを示し、接続部52a、ALU列53a、接続部52b、ALU列53b、接続部52c、ALU列53c、接続部52d、ALU列53d、接続部52eが、この順に接続されている。接続部52と後段のALU列53はリコンフィギュラブルユニットを構成し、リコンフィギュラブルユニットにおいて接続部52は、外部から入力される変数や定数を、後段のALU列53における所期のALUに供給する機能を有している。また接続部52は、前段のALUの演算結果を外部に直接出力することもできる。なおALUアレイは、複数のALUの物理的配置がアレイ状である必要はなく、ALU間の接続関係がアレイ状に構成されていればよい。   As shown in the figure, the arithmetic unit 12 is configured as an ALU array of X stages and Y columns in which X ALUs in the vertical direction and Y ALUs in the horizontal direction are arranged. FIG. 2 shows an ALU array having four stages of ALU columns 53. The connection unit 52a, the ALU column 53a, the connection unit 52b, the ALU column 53b, the connection unit 52c, the ALU column 53c, the connection unit 52d, the ALU column 53d, and the connection The parts 52e are connected in this order. The connection unit 52 and the subsequent ALU column 53 constitute a reconfigurable unit. In the reconfigurable unit, the connection unit 52 supplies variables and constants input from the outside to the intended ALU in the subsequent ALU column 53. It has a function to do. The connection unit 52 can also directly output the calculation result of the preceding ALU to the outside. In the ALU array, the physical arrangement of the plurality of ALUs does not need to be in an array, and the connection relationship between the ALUs may be configured in an array.

ALU11、ALU12、・・・、ALU1Yから構成される第1段のALU列53aには、接続部52aを介して変数や定数が入力され、設定された所定の演算がなされる。演算結果の出力は、接続部52bに設定された接続にしたがって、ALU21、ALU22、・・・、ALU2Yから構成される第2段のALU列53bに入力される。接続部52bにおいては、ALU列53aの出力とALU列53bの入力の間で任意の接続関係、あるいは予め定められた接続関係の組合せの中から選択された接続関係を実現できるように結線が構成されており、設定により所期の結線が有効となる。以下、最終段である接続部52eまで同様の構成である。各接続部52はDFF回路としての機能を有し、最終段の接続部52eは、図1に示す内部状態保持回路20として機能してもよい。   Variables and constants are input to the first-stage ALU column 53a composed of ALU11, ALU12,..., ALU1Y via the connection unit 52a, and a predetermined calculation is performed. The output of the calculation result is input to the second-stage ALU column 53b composed of the ALU 21, ALU 22,..., ALU 2Y according to the connection set in the connection unit 52b. In the connection unit 52b, the connection is configured so that an arbitrary connection relationship between the output of the ALU column 53a and the input of the ALU column 53b or a connection relationship selected from a predetermined combination of connection relationships can be realized. The desired connection is enabled by setting. Hereinafter, the configuration is the same up to the connection portion 52e which is the final stage. Each connection unit 52 may function as a DFF circuit, and the final-stage connection unit 52e may function as the internal state holding circuit 20 illustrated in FIG.

回路のコンフィギュレーションは1クロックで行われる。具体的に、設定部14が1クロックごとに設定データを演算ユニット12にマッピングする。なお図1では、設定部14が4つの第1回路設定部14a〜第4回路設定部14dを有しているが、図2に示すように演算ユニット12が、5つの接続部52および4つのALU列53で構成される場合は、各接続部52および各ALU列53に設定データ40を供給するために、設定部14は、9つの回路設定部を有して構成されてもよい。   Circuit configuration is performed in one clock. Specifically, the setting unit 14 maps the setting data to the arithmetic unit 12 every clock. In FIG. 1, the setting unit 14 includes four first circuit setting units 14 a to 14 d. However, as illustrated in FIG. 2, the arithmetic unit 12 includes five connection units 52 and four circuit setting units 14. When configured with the ALU column 53, the setting unit 14 may include nine circuit setting units in order to supply the setting data 40 to each connection unit 52 and each ALU column 53.

各ALU列53の出力は、後段の接続部52に保持される。複数スレッドの実行中、接続部52のDFF回路は、前段の論理回路から出力されるデータを保持し、次のクロックで、前段の論理回路が実行していたスレッドと同一のスレッドを実行する後段の論理回路に、保持したデータを供給する。このように、1つのスレッドの処理は、クロックごとに1つ後段のALU列53において実行されることになる。最終段で処理されると、また最上段のALU列からクロックごとに1段ずつ下がっていく。これにより、マルチスレッド処理を実行でき、効率的な回路コンフィギュレーションを実現できる。   The output of each ALU column 53 is held in the subsequent connection unit 52. During the execution of a plurality of threads, the DFF circuit of the connection unit 52 holds the data output from the preceding logic circuit and executes the same thread as the thread executed by the preceding logic circuit at the next clock. The held data is supplied to the logic circuit. As described above, the processing of one thread is executed in the ALU row 53 at the next stage for each clock. When processing is performed in the final stage, it is lowered one stage at a time from the uppermost ALU column. Thereby, multi-thread processing can be executed, and an efficient circuit configuration can be realized.

図3は、マルチスレッド処理を説明するための説明図である。第Tクロックで、ALU列53aがスレッド1を、ALU列53bがスレッド4を、ALU列53cがスレッド3を、ALU列53dがスレッド2をそれぞれ処理する。次の第(T+1)クロックで、ALU列53aがスレッド2を、ALU列53bがスレッド1を、ALU列53cがスレッド4を、ALU列53dがスレッド3をそれぞれ処理する。このように、各スレッドが、1クロックごとに後段のALU列53により処理されることで、マルチスレッド処理が実行される。   FIG. 3 is an explanatory diagram for explaining multithread processing. At the T-th clock, the ALU column 53a processes the thread 1, the ALU column 53b processes the thread 4, the ALU column 53c processes the thread 3, and the ALU column 53d processes the thread 2. At the next (T + 1) th clock, the ALU column 53a processes the thread 2, the ALU column 53b processes the thread 1, the ALU column 53c processes the thread 4, and the ALU column 53d processes the thread 3. In this way, each thread is processed by the ALU row 53 in the subsequent stage for each clock, whereby multithread processing is executed.

図1に戻って、回路の構成時、制御部18は、設定データ40を記憶部34から選択して読み出し、設定部14に供給する。設定部14は、各設定データ40を格納する。設定部14がコマンドメモリとして構成されている場合、制御部18は設定部14に対してプログラムカウンタ値を与え、設定部14は、そのカウンタ値に応じて格納した設定データを、コマンドデータとして演算ユニット12に設定する。なお、設定部14は、キャッシュメモリや他の種類のメモリを有して構成されてもよい。なお、本例においては、制御部18が記憶部34から設定データ40を受けて、その設定データを設定部14に供給する構成について説明するが、制御部18を介さずに、予め設定部14に設定データを格納しておいてもよい。   Returning to FIG. 1, when the circuit is configured, the control unit 18 selects and reads the setting data 40 from the storage unit 34 and supplies the setting data 40 to the setting unit 14. The setting unit 14 stores each setting data 40. When the setting unit 14 is configured as a command memory, the control unit 18 gives a program counter value to the setting unit 14, and the setting unit 14 calculates setting data stored according to the counter value as command data. Set to unit 12. The setting unit 14 may include a cache memory and other types of memory. In this example, a configuration in which the control unit 18 receives the setting data 40 from the storage unit 34 and supplies the setting data to the setting unit 14 will be described. However, the setting unit 14 is not provided via the control unit 18 in advance. The setting data may be stored in the.

設定部14は、設定データ40を演算ユニット12に設定し、演算ユニット12に回路を逐次再構成させる。これにより、演算ユニット12は、所期の演算を実行できる。演算ユニット12は、基本セルとして高性能の演算能力のあるALUを用いており、また演算ユニット12および設定部14を1チップ上に構成することから、コンフィグレーションを高速に1クロックで実現することができる。制御部18はクロック機能を有し、クロック信号は、メインメモリ27に供給される。また制御部18は4進カウンタを含み、カウント信号を設定部14に供給してもよい。   The setting unit 14 sets the setting data 40 in the arithmetic unit 12 and causes the arithmetic unit 12 to sequentially reconfigure the circuit. Thereby, the arithmetic unit 12 can perform an intended calculation. The arithmetic unit 12 uses an ALU having high-performance arithmetic capability as a basic cell, and the arithmetic unit 12 and the setting unit 14 are configured on one chip, so that the configuration can be realized at a high speed with one clock. Can do. The control unit 18 has a clock function, and the clock signal is supplied to the main memory 27. The control unit 18 may include a quaternary counter and supply a count signal to the setting unit 14.

図1は、1つの演算ユニット12を備えた処理装置10の基本構成を示すが、以下において、処理装置10は、複数の演算ユニット12を有し、各演算ユニット12がメインメモリ27を構成するために使用可能な記憶領域(RAM)を制限することで、全体の回路規模を小型化する。具体的には演算ユニット12とRAMの接続をハードウェア上で制限することで、回路規模を削減しつつ、接続制限されたなかで、演算ユニット12にRAMを効率的に割り当てる。なお以下では、処理装置10が、複数の演算ユニット12のメインメモリ27の構成機能を有する例について説明するが、メインメモリ27の再構成機能は、演算ユニット単位のほか、スレッド単位で実現されてもよい。   FIG. 1 shows a basic configuration of a processing apparatus 10 including one arithmetic unit 12. In the following, the processing apparatus 10 has a plurality of arithmetic units 12, and each arithmetic unit 12 constitutes a main memory 27. Therefore, the overall circuit scale is reduced by limiting the usable storage area (RAM). Specifically, by restricting the connection between the arithmetic unit 12 and the RAM on hardware, the RAM is efficiently allocated to the arithmetic unit 12 while the connection is restricted while reducing the circuit scale. In the following, an example in which the processing device 10 has the configuration function of the main memory 27 of the plurality of arithmetic units 12 will be described. However, the reconfiguration function of the main memory 27 is realized in units of threads in addition to the units of arithmetic units. Also good.

図4は、本実施形態の処理装置10の構成の一例を示す。図4に示す処理装置10は複数の演算ユニット12a、12b、12c、12dを備え、各演算ユニット12に対してメモリを再構成可能なメモリ構成機能をもつ。メモリ群として、共通メモリ回路60、個別メモリ回路70、個別メモリ回路80が設けられ、共通メモリ回路60、個別メモリ回路70、80のそれぞれは、第1選択回路110と2つのRAM100とから構成される。なお各メモリ回路は、3つ以上のRAM100を有してもよく、また1つのRAM100のみを有してもよい。なお処理装置10は、複数の集積回路装置26(図1参照)を備え、複数の集積回路装置26で使用できる再構成機能をもつメモリを有した構成をとってもよい。またこの場合、再構成機能をもつメモリを使用しない演算ユニット12が存在してもよい。   FIG. 4 shows an example of the configuration of the processing apparatus 10 of the present embodiment. The processing apparatus 10 shown in FIG. 4 includes a plurality of arithmetic units 12a, 12b, 12c, and 12d, and has a memory configuration function capable of reconfiguring the memory for each arithmetic unit 12. As a memory group, a common memory circuit 60, an individual memory circuit 70, and an individual memory circuit 80 are provided. Each of the common memory circuit 60 and the individual memory circuits 70 and 80 includes a first selection circuit 110 and two RAMs 100. The Note that each memory circuit may include three or more RAMs 100, or may include only one RAM 100. The processing apparatus 10 may include a plurality of integrated circuit devices 26 (see FIG. 1) and a memory having a reconfiguration function that can be used by the plurality of integrated circuit devices 26. In this case, there may be an arithmetic unit 12 that does not use a memory having a reconfiguration function.

具体的に共通メモリ回路60は、演算ユニット12a、12b、12dにより使用可能であり、第1選択回路110aと、RAM100e、100fを有する。個別メモリ回路70は、演算ユニット12a、12bのみにより使用可能であり、第1選択回路110bと、RAM100a、100bを有する。個別メモリ回路80は、演算ユニット12c、12dのみにより使用可能であり、第1選択回路110cと、RAM100c、100dを有する。ここでは、RAM100aの容量が2048バイトで、それ以外のRAM100b〜100fの容量が1024バイトであるとし、各演算ユニット12での演算結果や途中のデータを保持するメモリを、メモリ群のRAM100を用いて構成する例を示す。   Specifically, the common memory circuit 60 can be used by the arithmetic units 12a, 12b, and 12d, and includes a first selection circuit 110a and RAMs 100e and 100f. The individual memory circuit 70 can be used only by the arithmetic units 12a and 12b, and includes a first selection circuit 110b and RAMs 100a and 100b. The individual memory circuit 80 can be used only by the arithmetic units 12c and 12d, and includes a first selection circuit 110c and RAMs 100c and 100d. Here, it is assumed that the capacity of the RAM 100a is 2048 bytes, and the capacity of the other RAMs 100b to 100f is 1024 bytes, and the memory that holds the calculation results and intermediate data in each calculation unit 12 is used as the RAM 100 of the memory group. An example of configuration is shown below.

演算ユニット12に対して、メモリ群との接続を選択する第2選択回路120が設けられる。第2選択回路120aは、演算ユニット12aに対して設けられ、共通メモリ回路60または個別メモリ回路70のいずれかと演算ユニット12aとを接続する。第2選択回路120bは、演算ユニット12bに対して設けられ、共通メモリ回路60または個別メモリ回路70のいずれかと演算ユニット12bとを接続する。第2選択回路120cは、演算ユニット12cに対して設けられるが、演算ユニット12cは共通メモリ回路60を使用しないため、この例では第2選択回路120cは存在しなくてもよい。第2選択回路120dは、演算ユニット12dに対して設けられ、共通メモリ回路60または個別メモリ回路80のいずれかと演算ユニット12dとを接続する。   A second selection circuit 120 that selects connection with the memory group is provided for the arithmetic unit 12. The second selection circuit 120a is provided for the arithmetic unit 12a, and connects either the common memory circuit 60 or the individual memory circuit 70 to the arithmetic unit 12a. The second selection circuit 120b is provided for the arithmetic unit 12b, and connects either the common memory circuit 60 or the individual memory circuit 70 to the arithmetic unit 12b. Although the second selection circuit 120c is provided for the arithmetic unit 12c, since the arithmetic unit 12c does not use the common memory circuit 60, the second selection circuit 120c may not exist in this example. The second selection circuit 120d is provided for the arithmetic unit 12d, and connects either the common memory circuit 60 or the individual memory circuit 80 to the arithmetic unit 12d.

処理装置10において、第1選択回路110および第2選択回路120は、演算ユニットに対して記憶領域を必要とする場合に少なくとも1つの記憶領域(RAM100)を用いてアドレス空間を構成する記憶領域構成回路を形成する。処理装置10において、少なくとも1つのRAM100は、複数の演算ユニットの一部にのみ接続されており、これにより回路規模を削減することができる。たとえばRAM100c、100dは、演算ユニット12c、12dにのみ接続されており、演算ユニット12a、12bには接続されていない。   In the processing device 10, the first selection circuit 110 and the second selection circuit 120 have a storage area configuration that forms an address space using at least one storage area (RAM 100) when a storage area is required for the arithmetic unit. Form a circuit. In the processing apparatus 10, at least one RAM 100 is connected to only a part of the plurality of arithmetic units, thereby reducing the circuit scale. For example, the RAMs 100c and 100d are connected only to the arithmetic units 12c and 12d, and are not connected to the arithmetic units 12a and 12b.

図5は、本実施形態の処理装置10の構成の変形例を示す。図5に示す処理装置10は、1つの演算ユニット12が、複数のスレッドを処理する。図示の例では、演算ユニット12aが、スレッド1、2を実行し、演算ユニット12bが、スレッド3、4を実行する。図5に示す処理装置10は、各スレッドに対してメモリを再構成可能なメモリ構成機能をもつ。なお、図4および図5に示す処理装置10において、メモリを構成するための第1選択回路110a〜110c、第2選択回路120a〜120dの配置は同じであり、以下は、図4に示す処理装置10に関連して、メモリの構成機能を説明する。   FIG. 5 shows a modification of the configuration of the processing apparatus 10 of the present embodiment. In the processing apparatus 10 illustrated in FIG. 5, one arithmetic unit 12 processes a plurality of threads. In the illustrated example, the arithmetic unit 12 a executes threads 1 and 2, and the arithmetic unit 12 b executes threads 3 and 4. The processing apparatus 10 shown in FIG. 5 has a memory configuration function that can reconfigure the memory for each thread. 4 and FIG. 5, the arrangement of the first selection circuits 110a to 110c and the second selection circuits 120a to 120d for constituting the memory is the same, and the following processing is shown in FIG. In relation to the device 10, the memory configuration functions will be described.

図6は、各演算ユニット12に対してRAM100を用いてメインメモリ27を構成した例を示す。メインメモリ27の構成手法については、図16(a)〜図16(c)に関連して詳述する。この例では、演算ユニット12aが容量3072バイトのメモリを、演算ユニット12bが容量1024バイトのメモリを、演算ユニット12cが容量1024バイトのメモリを、演算ユニット12dが容量2048バイトのメモリを必要としている。   FIG. 6 shows an example in which the main memory 27 is configured using the RAM 100 for each arithmetic unit 12. The configuration method of the main memory 27 will be described in detail with reference to FIGS. 16 (a) to 16 (c). In this example, the arithmetic unit 12a requires a memory with a capacity of 3072 bytes, the arithmetic unit 12b requires a memory with a capacity of 1024 bytes, the arithmetic unit 12c requires a memory with a capacity of 1024 bytes, and the arithmetic unit 12d requires a memory with a capacity of 2048 bytes. .

図6に示すメモリ構成例では、演算ユニット12aに対して、共通メモリ回路60のRAM100e(容量1024バイト)と、個別メモリ回路70のRAM100a(容量2048バイト)とにより、容量3072バイトの1つのメインメモリ27aが構成されている。演算ユニット12bに対しては、個別メモリ回路70のRAM100bにより、容量1024バイトのメインメモリ27bが構成され、演算ユニット12cに対しては、個別メモリ回路80のRAM100cにより、容量1024バイトのメインメモリ27cが構成され、メインメモリ27dに対しては、個別メモリ回路80のRAM100dと、共通メモリ回路60のRAM100fとにより、容量2048バイトの1つのメインメモリ27dが構成されている。図中、addrは、メインメモリ27におけるアドレスを示す。   In the memory configuration example shown in FIG. 6, for the arithmetic unit 12a, the RAM 100e (capacity: 1024 bytes) of the common memory circuit 60 and the RAM 100a (capacity: 2048 bytes) of the individual memory circuit 70, one main having a capacity of 3072 bytes. A memory 27a is configured. For the arithmetic unit 12b, the RAM 100b of the individual memory circuit 70 constitutes a main memory 27b having a capacity of 1024 bytes. For the arithmetic unit 12c, the RAM 100c of the individual memory circuit 80 provides a main memory 27c having a capacity of 1024 bytes. For the main memory 27d, the RAM 100d of the individual memory circuit 80 and the RAM 100f of the common memory circuit 60 constitute one main memory 27d having a capacity of 2048 bytes. In the figure, addr indicates an address in the main memory 27.

図7は、共通メモリ回路60の構成を示す。共通メモリ回路60は、第1選択回路110aおよびRAM100e、100fを有して構成されており、第1選択回路110aは、メモリ制御回路130e、130fと、読出制御回路150aとを備える。メモリ制御回路130e、130fの構成は同じであるため、メモリ制御回路130fの図示は省略する。また読出制御回路150aは、読出データを、演算ユニット12aに設けられた第2選択回路120aに供給するための回路であり、本実施形態では、共通メモリ回路60が、演算ユニット12a以外にも、演算ユニット12b、12dに接続されているため、読出データを第2選択回路120b、120dに供給するための読出制御回路(図示せず)がさらに設けられる。メモリ制御回路130はRAM100ごとに設けられ、読出制御回路150は演算ユニット12ごとに設けられる。なお、図7ではRAM100を演算処理に割り当てる例として、RAM100を演算ユニット12に対して割り当てる回路構成を示しているが、既述したようにRAM100をスレッドに対して割り当てることも可能である。   FIG. 7 shows the configuration of the common memory circuit 60. The common memory circuit 60 includes a first selection circuit 110a and RAMs 100e and 100f. The first selection circuit 110a includes memory control circuits 130e and 130f and a read control circuit 150a. Since the memory control circuits 130e and 130f have the same configuration, the memory control circuit 130f is not shown. The read control circuit 150a is a circuit for supplying read data to the second selection circuit 120a provided in the arithmetic unit 12a. In the present embodiment, the common memory circuit 60 includes the arithmetic unit 12a in addition to the arithmetic unit 12a. Since it is connected to the arithmetic units 12b and 12d, a read control circuit (not shown) for supplying read data to the second selection circuits 120b and 120d is further provided. The memory control circuit 130 is provided for each RAM 100, and the read control circuit 150 is provided for each arithmetic unit 12. FIG. 7 shows a circuit configuration in which the RAM 100 is assigned to the arithmetic unit 12 as an example of assigning the RAM 100 to the arithmetic processing. However, as described above, the RAM 100 can also be assigned to the thread.

なお図7は共通メモリ回路60の構成を示しているが、個別メモリ回路70、80も、共通メモリ回路60と同様に構成することができる。   Although FIG. 7 shows the configuration of the common memory circuit 60, the individual memory circuits 70 and 80 can also be configured in the same manner as the common memory circuit 60.

メモリ制御回路130は、自身が制御するRAM100へのアクセスであるかを判定し、それによってRAM100を制御するための回路である。以下、RAM100eのメモリ制御回路130eを例に説明する。   The memory control circuit 130 is a circuit for determining whether the access is to the RAM 100 controlled by the memory control circuit 130 and controlling the RAM 100 accordingly. Hereinafter, the memory control circuit 130e of the RAM 100e will be described as an example.

set_a、set_bはメモリ構成情報である。具体的にset_aはRAM100eがどの演算ユニット12のメモリを構成しているか示す情報であり、set_bは構成されたメモリのアドレス空間のうちのどこに相当するか示す情報である。なおset_a、set_bは、どの演算ユニット12にも使用されないという情報を有してもよい。マルチプレクサ(MUX)132、134、136は、接続する演算ユニット12a、12b、12dから供給される書込データ(w_data)、アドレス信号(addr)、書込判定信号(w_en)のそれぞれから、RAM100eを使用可能な演算ユニット12のうちのひとつを選択する回路であり、set_aによって制御される。例えば、図6のメモリ構成例では、RAM100eは演算ユニット12aのメインメモリ27aの一部として構成されているため、set_aは演算ユニット12aを示す信号となっており、MUX132、134、136は、それぞれ演算ユニット12aに関するw_data、addr、w_enを選択する。   set_a and set_b are memory configuration information. Specifically, set_a is information indicating which of the arithmetic units 12 the RAM 100e constitutes, and set_b is information indicating where in the address space of the configured memory it corresponds. Note that set_a and set_b may have information that they are not used by any arithmetic unit 12. Multiplexers (MUX) 132, 134, and 136 store the RAM 100 e from write data (w_data), address signal (addr), and write determination signal (w_en) supplied from the arithmetic units 12 a, 12 b, and 12 d to be connected. This circuit selects one of the usable arithmetic units 12 and is controlled by set_a. For example, in the memory configuration example of FIG. 6, since the RAM 100e is configured as a part of the main memory 27a of the arithmetic unit 12a, set_a is a signal indicating the arithmetic unit 12a, and the MUXs 132, 134, and 136 are respectively Select w_data, addr, and w_en for the arithmetic unit 12a.

アクセス判定回路138は、addrの特定ビット(以下、判定ビット信号と呼ぶ)を用いてaddrがset_bで示されたアドレス範囲に入っているかどうかを判定する。ここで、容量が1024バイトと2048バイトのような複数の種類のRAM100が存在する場合、容量の小さいRAMもしくは同じ容量のRAMの個数が多い順に小さいアドレス値を割り当てるようにすると、addrの上位のビットを見ることによってアクセス判定回路138が効率的に判定することが可能である。例えば、図6に示すメモリ構成例では、演算ユニット12aはRAM100aとRAM100eを使用するため、容量の小さいもしくは同じ容量のRAMの個数が多いという条件に合致するRAM100eをアドレス値0から1023に割り当て、RAM100aをアドレス値1024から3071に割り当てる。そうすると、addrの下位から11ビット目以上のビットを判定ビット信号とし、判定ビット信号が0であればRAM100eへのアクセスであることが判定される。この場合、set_bは0を示す信号となり、アクセス判定回路138は判定ビット信号が0かどうかを判定し、0ならアクティブ、0でないならネガティブとして結果を出力する。   The access determination circuit 138 determines whether addr is in the address range indicated by set_b using a specific bit of addr (hereinafter referred to as a determination bit signal). Here, when there are a plurality of types of RAMs 100 having capacities of 1024 bytes and 2048 bytes, if a smaller address value is assigned in the descending order of the number of RAMs having the smaller capacity or the same capacity, the higher order of the addr The access determination circuit 138 can efficiently determine the bit by looking at the bit. For example, in the memory configuration example shown in FIG. 6, since the arithmetic unit 12a uses the RAM 100a and the RAM 100e, the RAM 100e that meets the condition that the number of RAMs having a small capacity or the same capacity is large is assigned to address values 0 to 1023, The RAM 100a is assigned to address values 1024 to 3071. Then, the eleventh bit or more from the lower order of addr is used as a determination bit signal. If the determination bit signal is 0, it is determined that the access is to the RAM 100e. In this case, set_b is a signal indicating 0, and the access determination circuit 138 determines whether the determination bit signal is 0, and outputs the result as active if 0 and negative if not.

CE生成回路142は、アクセス判定回路138の出力と選択されたw_enからRAM100eの制御信号を生成する。例えば、アクセス判定回路138の出力と選択されたw_enがともにアクティブならRAM100eに書き込みを行なわせる信号を出力し、アクセス判定回路138の出力がアクティブであって、w_enがアクティブでないならRAM100eに読み出しを行なわせる信号を出力する。   The CE generation circuit 142 generates a control signal for the RAM 100e from the output of the access determination circuit 138 and the selected w_en. For example, if the output of the access determination circuit 138 and the selected w_en are both active, a signal for writing to the RAM 100e is output. If the output of the access determination circuit 138 is active and the w_en is not active, the RAM 100e is read. Output a signal.

読出制御回路150aは、メモリ群のRAM100e、100fから読み出されたデータ(r_data)のうち、演算ユニット12aに渡す読出データを選択する。読出制御回路150aは、読出データ変換回路152、154と読出データ選択回路156から形成される。以下、RAM100eに対して設けられた読出データ変換回路152を例に説明する。読出データ変換回路152は、r_dataが演算ユニット12aのr_dataであればそのまま出力し、そうでなければ0(全ビット0)に変換して出力する。r_dataが演算ユニット12aのr_dataであるかどうかは、set_aと、メモリ制御回路130eのアクセス判定回路138の出力をRAMの読み出しにかかる時間分、遅延回路140にて遅延したデータ(select)とを用いて判定する。すなわち、set_aが演算ユニット12aを示す信号であり、かつアクセス判定回路138の出力であるselectがアクティブであれば演算ユニット12aのr_dataであることが判定される。読出データ選択回路156は、各RAM100e、100fの読出データ変換回路152、154からの出力のうち、演算ユニット12aのr_dataを選択する。この選択は、読出データ変換回路152、154の出力の論理和(OR)をとることで実現される。したがって、読出データ選択回路156からは、メモリ群のRAM100eまたはRAM100fから読み出されたデータが演算ユニット12aのr_dataの場合はそのデータ値が出力され、演算ユニット12aのr_dataでない場合は0が出力される。   The read control circuit 150a selects read data to be passed to the arithmetic unit 12a from the data (r_data) read from the RAMs 100e and 100f of the memory group. Read control circuit 150 a is formed of read data conversion circuits 152, 154 and read data selection circuit 156. Hereinafter, the read data conversion circuit 152 provided for the RAM 100e will be described as an example. The read data conversion circuit 152 outputs r_data if it is r_data of the arithmetic unit 12a, otherwise converts it to 0 (all bits 0) and outputs it. Whether r_data is r_data of the arithmetic unit 12a is determined by using set_a and data (select) obtained by delaying the output of the access determination circuit 138 of the memory control circuit 130e by the delay circuit 140 by the time required for RAM reading. Judgment. That is, if set_a is a signal indicating the arithmetic unit 12a, and the select that is the output of the access determination circuit 138 is active, it is determined that r_data of the arithmetic unit 12a. The read data selection circuit 156 selects r_data of the arithmetic unit 12a among the outputs from the read data conversion circuits 152 and 154 of the RAMs 100e and 100f. This selection is realized by taking the logical sum (OR) of the outputs of the read data conversion circuits 152 and 154. Therefore, the read data selection circuit 156 outputs the data value when the data read from the RAM 100e or RAM 100f of the memory group is r_data of the arithmetic unit 12a, and outputs 0 when it is not r_data of the arithmetic unit 12a. The

なお読出データ変換回路152、154が、それぞれのr_dataが演算ユニット12aのr_dataでない場合に全ビット0に変換して出力するとしたが、他の信号値たとえば全ビット1に変換して出力してもよい。このとき、読出データ選択回路156は、読出データ変換回路152、154の双方からの出力が全ビット1のときは0を出力し、そうでない場合は、読出データ変換回路152、154の出力の論理積(AND)をとって出力する。   Note that the read data conversion circuits 152 and 154 convert all the bits to 0 when each r_data is not r_data of the arithmetic unit 12a. However, the read data conversion circuits 152 and 154 may convert other signal values such as all bits to be output. Good. At this time, the read data selection circuit 156 outputs 0 when the outputs from both of the read data conversion circuits 152 and 154 are all 1s, otherwise, the logic of the output of the read data conversion circuits 152 and 154 Take product (AND) and output.

以上はRAM100eのメモリ制御回路130eについての説明であるが、他のRAM100のメモリ制御回路130も、同様の構成を有する。   The above is the description of the memory control circuit 130e of the RAM 100e, but the memory control circuits 130 of the other RAMs 100 have the same configuration.

図8は、第2選択回路120の回路構成を示す。第2選択回路120は、複数のメモリ群からのr_dataのうち、ひとつを選択する。回路構成は、読出制御回路150aの読出データ選択回路156と同様であり、各メモリ群からのデータの論理和(OR)をとる読出データ選択回路158を有して構成される。第2選択回路120aは、読出データ選択回路158を有して、図6に示すメモリ構成例では、演算ユニット12aのメインメモリ27aを構成するRAM100a、RAM100eの一方の読出データを演算ユニット12aに供給する。同様に第2選択回路120dは、演算ユニット12dのメインメモリ27dを構成するRAM100d、RAM100fの一方の読出データを演算ユニット12dに供給する。第2選択回路120bは、RAM100bの読出データを演算ユニット12bに供給し、第2選択回路120cは、RAM100cの読出データを演算ユニット12cに供給する。   FIG. 8 shows a circuit configuration of the second selection circuit 120. The second selection circuit 120 selects one of r_data from a plurality of memory groups. The circuit configuration is the same as that of the read data selection circuit 156 of the read control circuit 150a, and includes a read data selection circuit 158 that takes a logical sum (OR) of data from each memory group. The second selection circuit 120a has a read data selection circuit 158. In the memory configuration example shown in FIG. 6, one read data of the RAM 100a and RAM 100e constituting the main memory 27a of the arithmetic unit 12a is supplied to the arithmetic unit 12a. To do. Similarly, the second selection circuit 120d supplies one read data of the RAM 100d and RAM 100f constituting the main memory 27d of the arithmetic unit 12d to the arithmetic unit 12d. The second selection circuit 120b supplies read data from the RAM 100b to the arithmetic unit 12b, and the second selection circuit 120c supplies read data from the RAM 100c to the arithmetic unit 12c.

以上のように、演算ユニット12によって使用できるメモリ群を制限することにより、選択回路や接続線を削減することができ、配置配線の自由度が高まるとともに、回路規模が削減される。これにより、動作速度の向上し、処理時間が短くなる。   As described above, by limiting the memory group that can be used by the arithmetic unit 12, it is possible to reduce selection circuits and connection lines, thereby increasing the degree of freedom of placement and routing and reducing the circuit scale. This improves the operating speed and shortens the processing time.

さらに、読出制御回路150aと第2選択回路120aにおいて、それぞれ読出データ選択回路156と読出データ選択回路158とを設けることで、メモリ群と演算ユニット12の間の配線数が少なくできる。また、読出データ変換回路152、154にて所望のデータでない場合は読出データを0値に変換することにより、論理和をとって所望のデータのみを出力できるようにしたことで、読出データ選択回路156での制御信号を不要にしている。これらにより、配置配線の自由度が高まり、さらには回路規模が削減され、動作速度が向上し、処理時間が短くなる。   Further, the read control circuit 150a and the second selection circuit 120a are provided with the read data selection circuit 156 and the read data selection circuit 158, respectively, so that the number of wirings between the memory group and the arithmetic unit 12 can be reduced. Further, when the read data conversion circuits 152 and 154 do not have the desired data, the read data is converted into a zero value so that only the desired data can be output by performing a logical sum. The control signal at 156 is unnecessary. As a result, the degree of freedom of placement and routing is increased, the circuit scale is reduced, the operation speed is improved, and the processing time is shortened.

共通メモリ回路60のメモリ構成情報set_a、set_bは、設定部14または制御部18から供給されてもよく、リコンフィギュラブル回路である演算ユニット12のコンフィギュレーション時に設定されてもよい。前者の場合は、プロセッサの動作時にダイナミックにメモリ構成を変更できるため、演算ユニット12の処理バリエーションを増やすことができる。また、後者の場合は、メモリ構成情報をRAMごとに独立して配置できるなど、配置配線の自由度が高まる。これにより回路規模が削減され、さらに動作速度の向上により、処理時間が短くなる。   The memory configuration information set_a and set_b of the common memory circuit 60 may be supplied from the setting unit 14 or the control unit 18 and may be set when the arithmetic unit 12 that is a reconfigurable circuit is configured. In the former case, since the memory configuration can be dynamically changed during the operation of the processor, the processing variations of the arithmetic unit 12 can be increased. In the latter case, the degree of freedom of placement and routing is increased, for example, the memory configuration information can be placed independently for each RAM. As a result, the circuit scale is reduced, and the processing time is shortened by further improving the operation speed.

また、RAM100によってアドレス値の割り当てを限定することによって、メモリ構成情報やメモリ群に供給するアドレスaddrのビット幅を削減することができ、回路規模が削減される。これにより、動作速度を向上でき、処理時間を短くできる。アドレス値の割当の限定手法としては具体的に、異なる記憶容量をもつRAM100によってアドレス空間を構成する場合に、アドレス空間には、記憶容量の小さいRAM100から順に小さいアドレス値を割り当てる。また、これとは別に、同じ記憶容量のRAM100が存在する場合に、同じ記憶容量のRAM100の個数が多いものから順に、小さいアドレス値を割り当ててもよい。また、複数の演算ユニット12に使用可能なRAM100に、小さいアドレス値を割り当ててもよい。   Further, by limiting the assignment of address values by the RAM 100, the bit width of the address addr supplied to the memory configuration information and the memory group can be reduced, and the circuit scale is reduced. Thereby, the operation speed can be improved and the processing time can be shortened. Specifically, as a method for limiting the assignment of address values, specifically, when an address space is constituted by the RAMs 100 having different storage capacities, smaller address values are assigned to the address spaces in order from the RAM 100 having a smaller storage capacity. Alternatively, if there are RAMs 100 having the same storage capacity, smaller address values may be assigned in order from the largest number of RAMs 100 having the same storage capacity. Also, a small address value may be assigned to the RAM 100 that can be used for the plurality of arithmetic units 12.

例えば、図4に示す処理装置10の例では、共通メモリ回路60のRAM100e、100fの判定ビット信号を0もしくは1のみ、個別メモリ回路70のRAM100aの判定ビット信号を0から5、RAM100bの判定ビット信号を0から3、個別メモリ回路80のRAM100c、100dの判定ビット信号を0から3と制限することができる。この場合、共通メモリ回路60のRAM100e、100fのset_bは1ビット、RAM100b、100c、100dのset_bは2ビットでよいことになる。なおアドレス値の割り当てを限定しなければ、いずれもset_bは3ビット必要となるため、アドレス値の割り当ての限定には、回路規模を削減できる利点がある。また、共通メモリ回路60に送るアドレスaddrのビット幅は、制限がない場合13ビット必要であるが、このように制限した場合、演算ユニット12a、12bの出力時に共通メモリ回路60に送るアドレスaddrの12ビット目を12ビット目と13ビット目の論理和値(OR値)に変換すれば、12ビットでよいことになる。   For example, in the example of the processing apparatus 10 shown in FIG. 4, the determination bit signals of the RAMs 100e and 100f of the common memory circuit 60 are only 0 or 1, the determination bit signal of the RAM 100a of the individual memory circuit 70 is 0 to 5, and the determination bits of the RAM 100b The signal can be limited to 0 to 3, and the determination bit signals of the RAMs 100c and 100d of the individual memory circuit 80 can be limited to 0 to 3. In this case, the set_b of the RAMs 100e and 100f of the common memory circuit 60 may be 1 bit, and the set_b of the RAMs 100b, 100c, and 100d may be 2 bits. If the address value assignment is not limited, the set_b requires 3 bits in all cases. Therefore, the limitation of the address value assignment has an advantage that the circuit scale can be reduced. In addition, the bit width of the address addr to be sent to the common memory circuit 60 is 13 bits when there is no restriction. However, if this restriction is used, the address addr to be sent to the common memory circuit 60 at the time of output of the arithmetic units 12a and 12b. If the 12th bit is converted into the logical sum (OR value) of the 12th and 13th bits, 12 bits are sufficient.

図9は、本実施形態の処理装置10の構成のさらなる変形例を示す。図9に示す処理装置10は、1つの演算ユニット12aを備え、演算ユニット12aが、スレッド1、2、3、4を実行する。図9に示す処理装置10は、各スレッドに対してメモリを再構成可能なメモリ構成機能をもつ。第2選択回路120a〜120dは、それぞれスレッド1〜4に対して、それぞれのスレッドとRAM100との間のデータの送受を可能とするために設けられる。   FIG. 9 shows a further modification of the configuration of the processing apparatus 10 of the present embodiment. The processing apparatus 10 illustrated in FIG. 9 includes one arithmetic unit 12a, and the arithmetic unit 12a executes threads 1, 2, 3, and 4. The processing apparatus 10 illustrated in FIG. 9 has a memory configuration function that can reconfigure the memory for each thread. The second selection circuits 120 a to 120 d are provided for the threads 1 to 4, respectively, to enable data transmission / reception between the respective threads and the RAM 100.

このように演算ユニット12が、複数の独立した処理(スレッド)を実行可能なリコンフィギュラブル回路で構成される場合、メモリ群の使用制限をスレッド単位に設定することも可能である。図4と比較すると、演算ユニット12とスレッドとを単純に置き換えたものとみることができる。これは、図4では処理単位が演算ユニット12であったのに対して、図9では処理単位がスレッドであることの違いでしかないためであり、したがって、本実施形態のメモリ構成技術は、処理単位ごとに実行可能であることが分かる。   As described above, when the arithmetic unit 12 is configured by a reconfigurable circuit capable of executing a plurality of independent processes (threads), it is possible to set the use restriction of the memory group for each thread. Compared with FIG. 4, it can be seen that the arithmetic unit 12 and the thread are simply replaced. This is because the processing unit is the arithmetic unit 12 in FIG. 4 but only the difference in FIG. 9 is that the processing unit is a thread. Therefore, the memory configuration technique of this embodiment is as follows. It can be seen that it can be executed for each processing unit.

なお、処理装置10が複数の演算ユニット12を備え、各演算ユニット12ごとに個別メモリ回路が設けられ、またすべての演算ユニット12が共通メモリ回路にアクセス可能な構成としてもよい。この構成によると、個別メモリ回路は演算ユニット専用のメモリとすることができるため、回路規模を削減できるとともに、共通メモリ回路はすべての演算ユニットで共用するために、メモリ構成の柔軟性を維持することも可能となる。   Note that the processing device 10 may include a plurality of arithmetic units 12, an individual memory circuit may be provided for each arithmetic unit 12, and all the arithmetic units 12 may access the common memory circuit. According to this configuration, since the individual memory circuit can be a memory dedicated to the arithmetic unit, the circuit scale can be reduced, and the common memory circuit is shared by all the arithmetic units, so that the flexibility of the memory configuration is maintained. It is also possible.

以上は、処理装置10のハードウェア構成について説明した。以下では、マルチスレッド処理において、さらにメモリの有効利用を図るべく、メモリのアドレス空間を共用する技術について説明する。マルチスレッド処理は、複数の演算ユニット12において実行されてよいが、以下では説明を簡単にするために、図9に示す処理装置10の構成にしたがって、アドレス空間共用技術を説明する。   The hardware configuration of the processing device 10 has been described above. In the following, a technique for sharing a memory address space in order to further effectively use the memory in multithread processing will be described. The multi-thread processing may be executed in the plurality of arithmetic units 12, but for the sake of simplicity, the address space sharing technique will be described below according to the configuration of the processing device 10 shown in FIG.

図10は、演算ユニット12の構成の一例を示す。この演算ユニット12は、複数のスレッドがメモリのアドレス空間を共用するアドレス空間共用回路を構成する。このアドレス空間共用回路では、各スレッド1〜4のそれぞれに対してメモリが割り当てられているなかで、スレッド3がスレッド1のメモリのアドレス空間を共用できる。アドレス空間共用回路は、出力選択回路170および入力選択回路180、182により実現される。   FIG. 10 shows an example of the configuration of the arithmetic unit 12. The arithmetic unit 12 constitutes an address space sharing circuit in which a plurality of threads share the memory address space. In this address space sharing circuit, the thread 3 can share the memory 1 address space while the memory is allocated to each of the threads 1 to 4. The address space sharing circuit is realized by the output selection circuit 170 and the input selection circuits 180 and 182.

MUX160a、160b、160c、160dは、接続部52の入力側に設けられ、接続部52の下段のALU列53が処理するスレッドに割り当てられているRAM100からの読出データを選択して出力する。具体的にMUX160aは、各スレッドのRAM100からの読出データのうち、1段目のALU列53aが処理するスレッドのデータを選択して接続部52aに供給する。MUX160e、160f、160g、160hは、接続部52の出力側に設けられ、RAM100にアクセス(書込または読出)するデータのうち、特定のスレッドを処理しているALU列53の下段の接続部52からのデータを選択して出力する。具体的にMUX160eは、各ALU列53で処理されたスレッドのデータのうち、処理されたスレッド4のデータを選択して、スレッド4に割り当てられているRAM100に出力する。これらのMUX160は、4進カウンタ(図示せず)から出力される制御信号により制御されてよい。   The MUXs 160 a, 160 b, 160 c, and 160 d are provided on the input side of the connection unit 52, and select and output read data from the RAM 100 assigned to threads that are processed by the lower ALU column 53 of the connection unit 52. Specifically, the MUX 160a selects the data of the thread processed by the first-stage ALU column 53a from the read data from the RAM 100 of each thread and supplies the selected data to the connection unit 52a. The MUXs 160e, 160f, 160g, and 160h are provided on the output side of the connection unit 52, and the lower connection unit 52 of the ALU column 53 that processes a specific thread among data that accesses (writes or reads) the RAM 100. Select and output data from. Specifically, the MUX 160 e selects the processed thread 4 data from the thread data processed in each ALU column 53 and outputs the selected data to the RAM 100 allocated to the thread 4. These MUXs 160 may be controlled by a control signal output from a quaternary counter (not shown).

図11は、スレッド1とスレッド3とでアドレス空間を共用するときの出力選択回路170の動作を示す。複数スレッドでメモリのアドレス空間を共用しない場合は、MUX160e、160f、160g、160hの選択により、各段のALU列53から所期のメモリにアクセスできる。一方、図11に示すようにスレッド1とスレッド3とでメモリアドレス空間を共用する場合は、1段目のALU列53a、2段目のALU列53bからのみメモリにアクセスでき、またメモリからの読出データの入力は、3段目のALU列53c、4段目のALU列53dに制限される。ここで段を制限するとは、読出データの入力を、特定の段に限定することを意味している。   FIG. 11 shows the operation of the output selection circuit 170 when the thread 1 and the thread 3 share the address space. When the memory address space is not shared by a plurality of threads, the desired memory can be accessed from the ALU column 53 of each stage by selecting the MUXs 160e, 160f, 160g, and 160h. On the other hand, as shown in FIG. 11, when the memory address space is shared between the thread 1 and the thread 3, the memory can be accessed only from the first-stage ALU column 53a and the second-stage ALU column 53b. Input of read data is limited to the third-stage ALU column 53c and the fourth-stage ALU column 53d. Here, limiting the level means that the input of read data is limited to a specific level.

出力選択回路170は、スレッド3がスレッド1用のメモリを使用しない場合は、常にスレッド1のメモリアクセスデータを選択する。一方でスレッド3がスレッド1用のメモリを使用する場合は、出力選択回路170が、スレッド1が1段目のALU列53aまたは2段目のALU列53bで処理されているときはスレッド1のメモリアクセスデータを、それ以外のとき、つまりスレッド3が1段目のALU列53aまたは2段目のALU列53bで処理されているときはスレッド3のメモリアクセスデータを選択する。すなわち、共用時の出力選択回路170は、図11における出力選択回路170への2つの入力のうち、実線で示されている入力を常に選択するように動作する。この例では、第Tクロックで、ALU列53aで処理されたスレッド1の出力データ、第(T+1)クロックで、ALU列53bで処理されたスレッド1の出力データ、第(T+2)クロックで、ALU列53aで処理されたスレッド3の出力データ、第(T+3)クロックで、ALU列53bで処理されたスレッド3の出力データが選択される。   The output selection circuit 170 always selects the memory access data of the thread 1 when the thread 3 does not use the memory for the thread 1. On the other hand, when the thread 3 uses the memory for the thread 1, the output selection circuit 170 determines that the thread 1 is processed when the thread 1 is processed by the first-stage ALU column 53a or the second-stage ALU column 53b. At other times, that is, when the thread 3 is processed by the first-stage ALU column 53a or the second-stage ALU column 53b, the memory access data of the thread 3 is selected. In other words, the output selection circuit 170 at the time of sharing operates so as to always select the input indicated by the solid line among the two inputs to the output selection circuit 170 in FIG. In this example, the output data of the thread 1 processed in the ALU column 53a at the Tth clock, the output data of the thread 1 processed in the ALU column 53b at the (T + 1) clock, and the ALU at the (T + 2) clock. The output data of the thread 3 processed in the column 53a and the output data of the thread 3 processed in the ALU column 53b are selected at the (T + 3) th clock.

入力選択回路180、182は、MUX160c、160dに供給される4進カウンタからの制御信号を変換する回路である。メモリアドレス空間の共用が行われない場合、MUX160cは、各スレッドのメモリからの読出データのうち、常にALU列53cが処理するスレッドのデータを選択する。これは、入力選択回路180がない場合と同じである。そしてメモリアドレス空間の共用を行なう場合は、3段目のALU列53cがスレッド3を処理するときはスレッド1用メモリからのデータを選択し、それ以外のときは、3段目のALU列53cが処理するスレッドのメモリのデータを選択する。   The input selection circuits 180 and 182 are circuits that convert a control signal from a quaternary counter supplied to the MUXs 160c and 160d. When the memory address space is not shared, the MUX 160c always selects the thread data to be processed by the ALU column 53c from the read data from the memory of each thread. This is the same as when the input selection circuit 180 is not provided. When the memory address space is shared, when the third-stage ALU column 53c processes the thread 3, the data from the thread 1 memory is selected. Otherwise, the third-stage ALU column 53c is selected. Selects thread memory data to process.

同様に、メモリアドレス空間の共用が行われない場合、MUX160dは、各スレッドのメモリからの読出データのうち、常にALU列53dが処理するスレッドのデータを選択する。これは入力選択回路182がない場合と同じである。そしてメモリアドレス空間の共用を行う場合は、4段目のALU列53dがスレッド3を処理するときはスレッド1用メモリからのデータを選択し、それ以外のときは、4段目のALU列53dが処理するスレッドのメモリのデータを選択する。すなわち、スレッド1用メモリからのデータは、図11に示すように、スレッド1またはスレッド3が動作している3段目のALU列53cまたは4段目のALU列53dに入力される。   Similarly, when the memory address space is not shared, the MUX 160d always selects the thread data to be processed by the ALU column 53d from the read data from the memory of each thread. This is the same as when the input selection circuit 182 is not provided. When the memory address space is shared, the data from the thread 1 memory is selected when the fourth-stage ALU column 53d processes the thread 3, and otherwise the fourth-stage ALU column 53d. Selects thread memory data to process. That is, the data from the thread 1 memory is input to the third-stage ALU column 53c or the fourth-stage ALU column 53d in which the thread 1 or thread 3 is operating as shown in FIG.

このように、メモリのアドレス空間を複数のスレッドで共用する場合、アクセス可能なリコンフィギュラブル回路の段を制限し、共用するアドレス空間に同時にアクセスしないようにアクセスタイミングを制御することにより、複数のスレッドが同時にメモリにアクセスしないようにしている。   As described above, when the memory address space is shared by a plurality of threads, a plurality of accessible reconfigurable circuit stages are limited, and the access timing is controlled so as not to access the shared address space at the same time. Threads are prevented from accessing memory at the same time.

図12は、図9に示す処理装置10において、スレッド1とスレッド3がメモリアドレス空間を共用したときのメモリ構成例を示す。スレッド3はスレッド1のメモリを使用することにより、スレッド3が、メモリアドレス空間の非共用時に使用できるメモリの容量よりも大きな容量を使用することができる。例えば、スレッド3が必要とするメモリの容量が2500バイトであった場合、図9を参照すると、メモリ空間の非共用時には最大でもRAM100c、100dの2048バイトしか利用できないため、スレッド3の処理を実行できるメモリを構成することができない。そのため、個別メモリ回路80のRAM100の数もしくは容量を増やす必要があるが、本実施形態のようにメモリアドレス空間をスレッド1と共用可能とすると、スレッド3が、2500バイトのメモリを利用することが可能となる。   FIG. 12 shows a memory configuration example when the thread 1 and the thread 3 share the memory address space in the processing apparatus 10 shown in FIG. By using the memory of the thread 1, the thread 3 can use a capacity larger than the capacity of the memory that the thread 3 can use when the memory address space is not shared. For example, when the memory capacity required by the thread 3 is 2500 bytes, referring to FIG. 9, when the memory space is not shared, only 2048 bytes of the RAMs 100c and 100d can be used at the maximum. Can't configure memory that can. Therefore, it is necessary to increase the number or capacity of the RAM 100 of the individual memory circuit 80. However, if the memory address space can be shared with the thread 1 as in this embodiment, the thread 3 may use a 2500-byte memory. It becomes possible.

このとき、スレッド1の処理に必要なメモリの容量が500バイトであった場合、メモリアドレス空間の非共用時に1024バイトの容量のRAMをひとつ使うと、524バイトの容量が余ってしまうが、2500バイトを必要とするスレッド3と3072バイトのメモリアドレス空間を共用することで、容量の余りは僅か72バイトとなり、メモリを有効に使用することができる。このように、共用機能により、メモリの効率的な使用が可能となることで、RAM100の数やRAM100の容量を少なく構成でき、回路規模を削減できる。さらに、スレッド3がスレッド1とメモリを共有することにより、スレッド4は個別メモリ回路80のすべてのRAM100c、100dを使用できることとなり、スレッド4で実行する処理のバリエーションを増やすことができる。   At this time, if the capacity of the memory required for the processing of the thread 1 is 500 bytes, if one RAM having a capacity of 1024 bytes is used when the memory address space is not shared, the capacity of 524 bytes remains, but 2500 By sharing the memory address space of 3072 bytes with the thread 3 that requires bytes, the remainder of the capacity is only 72 bytes, and the memory can be used effectively. As described above, since the shared function enables efficient use of the memory, the number of RAMs 100 and the capacity of the RAM 100 can be reduced, and the circuit scale can be reduced. Furthermore, since the thread 3 shares the memory with the thread 1, the thread 4 can use all the RAMs 100c and 100d of the individual memory circuit 80, and variations of processing executed by the thread 4 can be increased.

さらに、複数のスレッドでメモリのアドレス空間を共用することにより、メモリを介してデータの受け渡しが可能なため、処理の効率化ができ、処理時間を短くできる。ここでは、1つの演算ユニット12aのスレッド同士でのメモリアクセスをリコンフィギュラブル回路の段で制限することで、メモリのアドレス空間を共用する構成の例を示したが、異なる演算ユニット12のスレッド同士でアドレス空間を共用できてもよく、演算ユニット12同士でアドレス空間を共用できてもよい。また、ある演算ユニット12のスレッドと、別の演算ユニット12との間でアドレス空間を共用できてもよい。また、さらには、3つ以上の演算ユニット12もしくはスレッドでアドレス空間を共用してもよい。   Further, by sharing the memory address space among a plurality of threads, data can be transferred via the memory, so that the processing efficiency can be improved and the processing time can be shortened. Here, an example of a configuration in which a memory address space is shared by restricting memory access between threads of one arithmetic unit 12a at the stage of the reconfigurable circuit is shown. The address space may be shared with each other, and the address space may be shared between the arithmetic units 12. Further, the address space may be shared between a thread of a certain arithmetic unit 12 and another arithmetic unit 12. Furthermore, the address space may be shared by three or more arithmetic units 12 or threads.

図13は、2つの演算ユニット12の構成例を示す。この例では、各演算ユニット12a、12bのスレッドに対して、RAM100が割り当てられている。演算ユニット12a、12bは、それぞれで実行するスレッドがメモリのアドレス空間を共用するアドレス空間共用回路を構成する。このアドレス空間共用回路では、演算ユニット12aで実行する各スレッド1〜4のそれぞれに対してメモリが割り当てられており、また演算ユニット12bで実行する各スレッド5〜8のそれぞれに対してメモリが割り当てられているなかで、スレッド7がスレッド1とメモリのアドレス空間を共用し、スレッド7とスレッド1とは、それぞれ異なる演算ユニット12b、12aで処理されている。アドレス空間共用回路は、出力選択回路170aおよび入力選択回路180a、182aにより実現される。出力選択回路170a、入力選択回路180a、182aの動作は、図10に関連して説明したものと同じである。   FIG. 13 shows a configuration example of the two arithmetic units 12. In this example, the RAM 100 is allocated to the threads of the arithmetic units 12a and 12b. The arithmetic units 12a and 12b constitute an address space sharing circuit in which threads executed by the respective arithmetic units 12a and 12b share the address space of the memory. In this address space shared circuit, a memory is allocated to each of the threads 1 to 4 executed by the arithmetic unit 12a, and a memory is allocated to each of the threads 5 to 8 executed by the arithmetic unit 12b. Among them, the thread 7 shares the address space of the memory with the thread 1, and the thread 7 and the thread 1 are processed by different arithmetic units 12b and 12a, respectively. The address space sharing circuit is realized by the output selection circuit 170a and the input selection circuits 180a and 182a. The operations of the output selection circuit 170a and the input selection circuits 180a and 182a are the same as those described with reference to FIG.

図14は、2つの演算ユニット12の別の構成例を示す。ここでは、各演算ユニット12a、12bに対して、RAM100が割り当てられている。演算ユニット12a、12bは、メモリのアドレス空間を共用するアドレス空間共用回路を構成する。出力選択回路170bは、メモリのアドレス空間を共用しない場合は常に演算ユニット12aの出力を選択するように動作し、共用する場合は、4進カウンタ(図示せず)からの制御信号にしたがって演算ユニット12aまたは演算ユニット12bの出力を選択する。たとえば出力選択回路170bは、4進カウンタの最初の2つのカウント値に対しては演算ユニット12aの出力を選択し、後の2つのカウント値に対しては演算ユニット12bの出力を選択するように動作してよい。また、入力選択回路180bは、メモリのアドレス空間を共用しない場合は常に演算ユニット12b用メモリからのデータをMUX160から出力させ、共用する場合は、演算ユニット12a用メモリまたは演算ユニット12b用メモリからのデータを選択する。この例では、共用を行なう場合、たとえば演算ユニット12aのメモリアクセスは1段目、2段目、入力は3段目、4段目に制限され、演算ユニット12bのメモリアクセスは3段目、4段目、入力は1段目、2段目に制限される。   FIG. 14 shows another configuration example of the two arithmetic units 12. Here, the RAM 100 is allocated to each of the arithmetic units 12a and 12b. The arithmetic units 12a and 12b constitute an address space sharing circuit that shares the address space of the memory. The output selection circuit 170b operates so as to always select the output of the arithmetic unit 12a when the address space of the memory is not shared, and when it is shared, the output unit 170b operates according to a control signal from a quaternary counter (not shown). 12a or the output of the arithmetic unit 12b is selected. For example, the output selection circuit 170b selects the output of the arithmetic unit 12a for the first two count values of the quaternary counter, and selects the output of the arithmetic unit 12b for the latter two count values. May work. Further, the input selection circuit 180b always outputs the data from the arithmetic unit 12b memory from the MUX 160 when the address space of the memory is not shared, and when shared, from the memory for the arithmetic unit 12a or the arithmetic unit 12b Select data. In this example, when sharing is performed, for example, the memory access of the arithmetic unit 12a is restricted to the first stage and the second stage, the input is restricted to the third stage and the fourth stage, and the memory access of the arithmetic unit 12b is restricted to the third stage and the fourth stage. Stages and inputs are limited to the first and second stages.

なお、演算ユニット12が多段構成をとらない場合に、例えば、2つの演算ユニット12a、12bでメモリのアドレス空間を共用するのであれば、交互にメモリにアクセスするようにアクセスタイミングを制御すればよい。以上のようにメモリのアドレス空間をスレッド間、演算ユニット間、またはスレッドと演算ユニット間で共用可能とすることで、回路規模の削減や処理時間の短縮を実現でき、処理装置10における消費電力の低減化や、処理装置10の処理パフォーマンスの向上を実現することが可能となる。   When the arithmetic unit 12 does not have a multi-stage configuration, for example, if the memory address space is shared by the two arithmetic units 12a and 12b, the access timing may be controlled so that the memory is accessed alternately. . As described above, the memory address space can be shared between threads, between arithmetic units, or between threads and arithmetic units, so that the circuit scale can be reduced and the processing time can be reduced. It is possible to realize reduction and improvement in processing performance of the processing apparatus 10.

以下において、メモリとの接続が制限された処理装置10において、メモリを演算ユニット12またはスレッドに対して、効率的に割り当てる手法について説明する。以下、メモリを割り当てる対象を「対象処理」とよぶ。ここで、処理装置10において処理単位がスレッドである場合には、スレッドが対象処理であり、またマルチスレッド処理を行わない処理装置10においては、演算ユニット12が1つの処理を実行するため、演算ユニット12が対象処理となる。   Hereinafter, a method for efficiently allocating memory to the arithmetic unit 12 or the thread in the processing device 10 in which connection with the memory is limited will be described. Hereinafter, the target to which the memory is allocated is referred to as “target processing”. Here, when the processing unit is a thread in the processing device 10, the thread is a target process, and in the processing device 10 that does not perform multi-thread processing, the arithmetic unit 12 executes one process. Unit 12 is the target process.

図15は、メモリと対象処理との接続がハードウェア上で制限された処理装置10の構成を示す。共通メモリ回路210は、RAM200e、200f、200gを有し、個別メモリ回路220は、RAM200a、200b、200cを有し、個別メモリ回路230は、RAM200dを有する。対象処理250および対象処理260は、共通メモリ回路210および個別メモリ回路220を使用可能であり、対象処理270は、共通メモリ回路210および個別メモリ回路230を使用可能である。図15中、各RAM200に対して付された数字は、メモリ容量(単位なし)を示す。たとえばRAM200aは、128のメモリ容量をもち、RAM200cは、32のメモリ容量をもっている。また各対象処理に対して付された数字は、メモリに格納する必要があるデータ量を示す。たとえば対象処理250は、190のデータ量をメモリに格納する必要があり、また対象処理260は、60のデータ量をメモリに格納する必要がある。以下、各対象処理250、260、270にメモリを割り当てる技術について説明する。   FIG. 15 shows a configuration of the processing apparatus 10 in which the connection between the memory and the target process is restricted on hardware. The common memory circuit 210 includes RAMs 200e, 200f, and 200g, the individual memory circuit 220 includes RAMs 200a, 200b, and 200c, and the individual memory circuit 230 includes a RAM 200d. The target process 250 and the target process 260 can use the common memory circuit 210 and the individual memory circuit 220, and the target process 270 can use the common memory circuit 210 and the individual memory circuit 230. In FIG. 15, the numbers given to each RAM 200 indicate the memory capacity (no unit). For example, the RAM 200a has a memory capacity of 128, and the RAM 200c has a memory capacity of 32. The number given to each target process indicates the amount of data that needs to be stored in the memory. For example, the target process 250 needs to store 190 data amounts in the memory, and the target process 260 needs to store 60 data amounts in the memory. Hereinafter, a technique for allocating memory to each of the target processes 250, 260, and 270 will be described.

図16(a)、図16(b)、図16(c)は、メモリ割当処理のフローチャートを示す。以下において、メモリと対象処理とが図15に示すように接続されている場合に、各対象処理に対してメモリを割り当てる例を説明する。このメモリ割当処理では、各対象処理で扱うデータ量を、順次RAM200に振り分けていく。このフローチャートにおいて、「未割当データ」は、RAM200に対して、まだ割り当てられていないデータを意味し、たとえば対象処理250に対してRAM200aが既に割り当てられていると、未割当データは、62(=190−128)として表現される。メモリ割当処理は、図1に示すコンパイル部30により実行される。コンパイル部30は、メモリ割当処理を行う前に、各対象処理が保持しなければならないデータ量を取得する。また、使用可能なメモリの容量も予め取得する。   FIGS. 16A, 16B, and 16C are flowcharts of the memory allocation process. In the following, an example in which memory is allocated to each target process when the memory and the target process are connected as shown in FIG. 15 will be described. In this memory allocation process, the amount of data handled in each target process is sequentially allocated to the RAM 200. In this flowchart, “unallocated data” means data not yet allocated to the RAM 200. For example, if the RAM 200a is already allocated to the target process 250, the unallocated data is 62 (= 190-128). The memory allocation process is executed by the compiling unit 30 shown in FIG. The compiling unit 30 acquires the amount of data that each target process must hold before performing the memory allocation process. Also, the available memory capacity is acquired in advance.

まず未割当データのある対象処理が存在するか判定される(S10)。すべての対象処理に対してメモリが割り当てられていれば(S10のN)、本フローは終了する。メモリ割当処理の開始時は、まだ対象処理に対してメモりが割り当てられていないため(S10のY)、S12に進む。   First, it is determined whether there is a target process with unallocated data (S10). If memory is allocated to all target processes (N in S10), this flow ends. At the start of the memory allocation process, since no memory has been allocated to the target process (Y in S10), the process proceeds to S12.

S12では、未割当データのある対象処理のうち、使用可能なメモリの総容量が最も小さい対象処理を処理群aとして設定する。使用可能なメモリの総容量とは、各対象処理がアクセス可能なメモリの総容量を意味する。図15を参照すると、メモリのアクセス制限から、使用可能なメモリの総容量が最も小さい対象処理は対象処理270であるため、処理群aに対象処理270が設定される。続いて、処理群aに含まれる対象処理のうち、未割当データ量の最も大きい対象処理を、処理xとして設定する(S14)。この場合、処理群aに含まれる対象処理が、対象処理270のみであるため、対象処理270が処理xとして特定される。続いて、処理xが使用可能なすべてのRAMを、候補メモリbとして設定する(S16)。図15を参照して、対象処理270が使用可能なRAM200d、200e、200f、200gが、候補メモリbとして特定される。これらの候補メモリbは、候補メモリ群を構成する。   In S12, among the target processes having unallocated data, the target process having the smallest total usable memory capacity is set as the process group a. The total memory capacity that can be used means the total memory capacity that can be accessed by each target process. Referring to FIG. 15, the target process 270 is set in the processing group a because the target process having the smallest total available memory capacity is the target process 270 due to memory access restrictions. Subsequently, among the target processes included in the processing group a, the target process having the largest unallocated data amount is set as the process x (S14). In this case, since the target process included in the processing group a is only the target process 270, the target process 270 is specified as the process x. Subsequently, all the RAMs that can be used by the process x are set as candidate memories b (S16). Referring to FIG. 15, RAMs 200d, 200e, 200f, and 200g that can be used by the target process 270 are identified as candidate memories b. These candidate memories b constitute a candidate memory group.

このように対象処理270に候補メモリbが設定できた場合(S18のY)、候補メモリbを容量が大きい順にソートし、その順番を保持する(S20)。なお、メモリ容量が同じ場合には、使用される可能性のある対象処理の数が少ない順にソートする。候補メモリbであるRAM200d、200e、200f、200gに関して言えば、すべて同じ32の容量を有しているが、RAM200dは、対象処理270のみにより使用される可能性があるのに対し、共通メモリ回路210に含まれる200e、200f、200gは、対象処理250、260、270の3つの対象処理により使用される可能性がある。したがって、これらは、RAM200d、200e、200f、200gの順にソートされ、その順番が保持される。S20にしたがってRAM200の割り当てを試行する順番を定めることで、メモリの割当可能性を高めることができるとともに、割り当て後のメモリの総容量を小さく抑えることも可能となる。   When the candidate memory b can be set in the target process 270 as described above (Y in S18), the candidate memories b are sorted in descending order of capacity, and the order is retained (S20). When the memory capacities are the same, sorting is performed in ascending order of the number of target processes that may be used. Regarding the RAMs 200d, 200e, 200f, and 200g, which are candidate memories b, they all have the same capacity of 32, but the RAM 200d may be used only by the target process 270, whereas the common memory circuit There is a possibility that 200e, 200f, and 200g included in 210 are used by three target processes 250, 260, and 270. Therefore, these are sorted in the order of the RAMs 200d, 200e, 200f, and 200g, and the order is maintained. By determining the order in which the RAM 200 is tried in accordance with S20, the possibility of memory allocation can be increased, and the total memory capacity after allocation can be kept small.

まず、保持したRAM200の順序を示すiを1にセットし(S22)、候補メモリ群のi番目のRAM200を候補メモリcとする(S24)。ここでは、RAM200dが候補メモリcとして設定される。続いて、候補メモリcの容量が処理xの未割当データ量以下であるか判定される(S26)。ここでは候補メモリc(RAM200d)の容量が32、処理x(対象処理270)の未割当データ量が30であり、候補メモリcの容量が処理xの未割当データ量より大きい(S26のN)。   First, i indicating the order of the stored RAM 200 is set to 1 (S22), and the i-th RAM 200 in the candidate memory group is set as a candidate memory c (S24). Here, the RAM 200d is set as the candidate memory c. Subsequently, it is determined whether the capacity of the candidate memory c is equal to or less than the unallocated data amount of the process x (S26). Here, the capacity of the candidate memory c (RAM 200d) is 32, the unallocated data amount of the process x (target process 270) is 30, and the capacity of the candidate memory c is larger than the unallocated data amount of the process x (N in S26). .

続いて、処理群aのうち、使用可能なメモリが処理xと同じ対象処理を処理群d(処理xを含む)とし、処理群dの未割当データ量を、それよりも大きいメモリの最小容量の倍数で表した値の合計をeとする(S28)。ここでは、処理群aが対象処理270のみであるため処理群dは対象処理270となり、その未割当データ量は30である。このときメモリの最小容量は32であり、32の倍数で且つ30よりも大きい値であって最小の値は32である。したがって、e=32と特定される。ここでは、最小容量のメモリをいくつ使用して未割当データ量が割り当て可能かを調べ、未割当データ量をメモリの最小容量の単位で表している。これは、S28から以下のS32ですべての未割当データが候補メモリcより容量が小さいメモリを使って割り当てできるかを調べるためである。その際、例えば、未割当データ量が10と20の2つの処理がある場合、本来は容量32のメモリをそれぞれの処理に割り当てることになるが、メモリの最小容量単位で表していないと、未割当データ量の合計が30なので容量32のメモリ1つで割り当てできると判断してしまう危険性があり、それを解決するためにメモリの最小容量単位で表している。次に、S30では、候補メモリ群のうち、候補メモリcより容量が小さいメモリの容量の合計をfとする。ここでRAM200d〜200gのうち、候補メモリc(RAM200d)より容量が小さいメモリはないので、f=0となる。   Subsequently, in the processing group a, a target process whose usable memory is the same as that of the processing x is a processing group d (including the processing x), and the unallocated data amount of the processing group d is set to a minimum memory capacity larger than that. The sum of the values expressed in multiples of e is set as e (S28). Here, since the processing group a is only the target processing 270, the processing group d is the target processing 270, and the unallocated data amount is 30. At this time, the minimum capacity of the memory is 32, which is a multiple of 32 and larger than 30, and the minimum value is 32. Therefore, e = 32 is specified. Here, it is examined how many memories with the minimum capacity can be used to allocate the unallocated data amount, and the unallocated data amount is expressed in units of the minimum capacity of the memory. This is for checking whether all unallocated data can be allocated using a memory having a capacity smaller than that of the candidate memory c from S28 to S32 below. At that time, for example, when there are two processes with unallocated data amounts of 10 and 20, a memory with a capacity of 32 is originally allocated to each process. Since the total amount of allocated data is 30, there is a risk that it can be determined that one memory with a capacity of 32 can be allocated. Next, in S30, the sum of the capacities of memories having a capacity smaller than that of the candidate memory c in the candidate memory group is defined as f. Here, since there is no memory having a smaller capacity than the candidate memory c (RAM 200d) among the RAMs 200d to 200g, f = 0.

ここでeとfとを比較し(S32)、この場合はe(=32)>f(=0)(S32のY)であるため、候補メモリcを処理xの未割当データに割り当てる(S34)。これによりRAM200dが対象処理270に割り当てられる。このとき処理x(対象処理270)のデータはすべて割り当てられたことになり、したがって処理xに未割当データはなくなるため(S36のN)、S10に戻る。   Here, e and f are compared (S32), and in this case, e (= 32)> f (= 0) (Y in S32), so that the candidate memory c is assigned to the unallocated data of the process x (S34). ). As a result, the RAM 200d is allocated to the target process 270. At this time, all the data of the process x (target process 270) is allocated, and therefore there is no unallocated data in the process x (N in S36), and the process returns to S10.

このとき未割当データのある対象処理として対象処理250、260が存在し(S10のY)、S12では、使用可能なメモリの総容量が最も小さい対象処理が処理群aとして選ばれる。ここでは、対象処理250、260の使用可能なメモリの総容量が同じであるため、双方の対象処理250、260が処理群aとして設定される。続いてS14で、未割当データ量の大きい対象処理250が処理xとして設定され、S16で、対象処理250が使用可能なメモリであるRAM200a、200b、200c、200e、200f、200gが、候補メモリbとして設定される。これらの候補メモリbは、候補メモリ群を構成する。   At this time, there are target processes 250 and 260 as target processes having unallocated data (Y in S10). In S12, the target process having the smallest total available memory capacity is selected as the process group a. Here, since the total available memory capacity of the target processes 250 and 260 is the same, both the target processes 250 and 260 are set as the processing group a. Subsequently, in S14, the target process 250 having a large amount of unallocated data is set as the process x, and in S16, the RAMs 200a, 200b, 200c, 200e, 200f, and 200g, which are memories usable by the target process 250, are stored in the candidate memory b. Set as These candidate memories b constitute a candidate memory group.

候補メモリbが存在しているため(S18のY)、S20で、候補メモリbが容量の大きい順にソートされ、その順番が保持される。なお、メモリ容量が同じ場合には、使用される可能性のある対象処理の数が少ない順にソートする。候補メモリbであるRAM200a、200b、200c、200e、200f、200gに関して言えば、候補メモリbは、RAM200a、200b、200c、200e、200f、200gの順にソートされ、その順番が保持される。   Since the candidate memory b exists (Y in S18), the candidate memory b is sorted in descending order of capacity in S20, and the order is maintained. When the memory capacities are the same, sorting is performed in ascending order of the number of target processes that may be used. Regarding the RAMs 200a, 200b, 200c, 200e, 200f, and 200g, which are candidate memories b, the candidate memories b are sorted in the order of the RAMs 200a, 200b, 200c, 200e, 200f, and 200g, and the order is maintained.

保持したRAM200の順序を示すiを1にセットし(S22)、候補メモリ群のi番目のRAM200を候補メモリcとする(S24)。ここでは、RAM200aが候補メモリcとして設定される。続いて、候補メモリcの容量が処理xの未割当データ量以下であるか判定される(S26)。ここでは候補メモリc(RAM200a)の容量が128、処理x(対象処理250)の未割当データ量が190であり、候補メモリcの容量が処理xの未割当データ量より小さい(S26のY)。したがって候補メモリcを処理xの未割当データに割り当て(S34)、これによりRAM200aが対象処理250に割り当てられる。このとき処理x(対象処理250)に未割当データが存在するため(S36のY)、S12に戻る。このとき対象処理250の未割当データ量は62(=192−128)となる。   I indicating the order of the stored RAMs 200 is set to 1 (S22), and the i-th RAM 200 in the candidate memory group is set as a candidate memory c (S24). Here, the RAM 200a is set as the candidate memory c. Subsequently, it is determined whether the capacity of the candidate memory c is equal to or less than the unallocated data amount of the process x (S26). Here, the capacity of the candidate memory c (RAM 200a) is 128, the unallocated data amount of the process x (target process 250) is 190, and the capacity of the candidate memory c is smaller than the unallocated data amount of the process x (Y in S26). . Therefore, the candidate memory c is allocated to the unallocated data of the process x (S34), whereby the RAM 200a is allocated to the target process 250. At this time, since there is unallocated data in the process x (target process 250) (Y in S36), the process returns to S12. At this time, the unallocated data amount of the target process 250 is 62 (= 192-128).

続いて、S12では、処理群aに対象処理250(未割当データ量62)、対象処理260(未割当データ量60)が選ばれる。S14では、処理群aのうち、未割当データ量の大きい対象処理250が処理xに設定される。S16で、処理xが使用可能なRAM200b、200c、200e、200f、200gが候補メモリbに設定される。候補メモリが存在するため(S18のY)、S20では、候補メモリbがソートされて、RAM200b、200c、200e、200f、200gの順番が保持される。そして、i=1(S22)として、S24では、まずRAM200bが候補メモリcに設定される。   Subsequently, in S12, the target process 250 (unallocated data amount 62) and the target process 260 (unallocated data amount 60) are selected as the processing group a. In S14, the target process 250 having a large unallocated data amount in the process group a is set as the process x. In S16, the RAMs 200b, 200c, 200e, 200f, and 200g that can use the process x are set as the candidate memory b. Since there is a candidate memory (Y in S18), in S20, the candidate memory b is sorted and the order of the RAMs 200b, 200c, 200e, 200f, and 200g is maintained. Then, i = 1 (S22), and in S24, the RAM 200b is first set as the candidate memory c.

続いて、候補メモリcの容量が処理xの未割当データ量以下であるか判定され(S26)、ここでは候補メモリc(RAM200b)の容量が128、処理x(対象処理250)の未割当データ量が62である(S26のN)。S28において、処理群aのうち、使用可能なメモリが処理xと同じ対象処理を処理群d(処理xを含む)とし、処理群dの未割当データ量を、それよりも大きいメモリの最小容量の倍数で表した値の合計をeとする(S28)。ここでは、処理群aが対象処理250、260であり、対象処理250、260は使用可能なメモリが同じであるため、処理群dは対象処理250、260となる。このとき対象処理250、260の未割当データ量は、それぞれ62、60である。このときメモリの最小容量は32であり、32の倍数で且つ62、60よりも大きい値であって最小の値はそれぞれ64、64である。したがって、e=128(=64+64)と特定される。   Subsequently, it is determined whether the capacity of the candidate memory c is equal to or less than the unallocated data amount of the process x (S26). Here, the capacity of the candidate memory c (RAM 200b) is 128, and the unallocated data of the process x (target process 250). The amount is 62 (N in S26). In S28, among the processing groups a, the target processing whose usable memory is the same as the processing x is the processing group d (including the processing x), and the unallocated data amount of the processing group d is set to the minimum memory capacity larger than that. The sum of the values expressed in multiples of e is set as e (S28). Here, since the process group a is the target processes 250 and 260 and the target processes 250 and 260 have the same usable memory, the process group d is the target processes 250 and 260. At this time, the unallocated data amounts of the target processes 250 and 260 are 62 and 60, respectively. At this time, the minimum capacity of the memory is 32, which is a multiple of 32 and larger than 62 and 60, and the minimum values are 64 and 64, respectively. Therefore, e = 128 (= 64 + 64) is specified.

次に、S30では、候補メモリ群のうち、候補メモリc(RAM200b)より容量が小さいメモリの容量の合計をfとする。ここでRAM200c、200e、200f、200gが、候補メモリc(RAM200b)より容量が小さいため、f=128(=32+32+32+32となる。このときe=f(S32のN)となり、iを1インクリメントして(S38)、候補メモリ群のi番目のメモリと(i−1)番目のメモリの容量が同じか判定される(S40)。このとき2番目のメモリ(RAM200c)と1番目のメモリ(RAM200b)とは容量が異なるため(S40のN)、S24に戻る。S24では、2番目のメモリであるRAM200cが、候補メモリcとして設定される。   Next, in S30, let f be the total memory capacity of the candidate memory group that is smaller than the candidate memory c (RAM 200b). Here, since the capacity of the RAMs 200c, 200e, 200f, and 200g is smaller than that of the candidate memory c (RAM 200b), f = 128 (= 32 + 32 + 32 + 32. At this time, e = f (N in S32), and i is incremented by 1. (S38), it is determined whether the capacities of the i-th memory and the (i-1) -th memory in the candidate memory group are the same (S40) At this time, the second memory (RAM 200c) and the first memory (RAM 200b) Since the capacity is different (N in S40), the process returns to S24, where the RAM 200c, which is the second memory, is set as the candidate memory c.

S26では、候補メモリcの容量(32)が、処理xの未割当データ量(62)以下であるため(S26のY)、候補メモリcを処理xの未割当データに割り当て(S34)、これによりRAM200cが対象処理250に割り当てられる。このとき処理x(対象処理250)に未割当データが存在するため(S36のY)、S12に戻る。このとき対象処理250の未割当データ量は30(=62−32)となる。   In S26, since the capacity (32) of the candidate memory c is equal to or less than the unallocated data amount (62) of the process x (Y in S26), the candidate memory c is allocated to the unallocated data of the process x (S34). Thus, the RAM 200c is allocated to the target process 250. At this time, since there is unallocated data in the process x (target process 250) (Y in S36), the process returns to S12. At this time, the unallocated data amount of the target process 250 is 30 (= 62−32).

続いて、S12では、処理群aに対象処理250(未割当データ量30)、対象処理260(未割当データ量60)が選ばれる。S14では、処理群aのうち、未割当データ量の大きい対象処理260が処理xに設定される。S16で、処理xが使用可能なRAM200b、200e、200f、200gが候補メモリbに設定される。候補メモリが存在するため(S18のY)、S20では、候補メモリbがソートされて、RAM200b、200e、200f、200gの順番が保持される。そして、i=1(S22)として、S24では、まずRAM200bが候補メモリcに設定される。   Subsequently, in S12, the target process 250 (unallocated data amount 30) and the target process 260 (unallocated data amount 60) are selected as the processing group a. In S14, the target process 260 having a large unallocated data amount is set as the process x in the process group a. In S16, the RAMs 200b, 200e, 200f, and 200g that can use the process x are set as the candidate memory b. Since there is a candidate memory (Y in S18), in S20, the candidate memory b is sorted and the order of the RAMs 200b, 200e, 200f, and 200g is maintained. Then, i = 1 (S22), and in S24, the RAM 200b is first set as the candidate memory c.

続いて、候補メモリcの容量が処理xの未割当データ量以下であるか判定され(S26)、ここでは候補メモリc(RAM200b)の容量が128、処理x(対象処理260)の未割当データ量が60である(S26のN)。S28において、処理群aのうち、使用可能なメモリが処理xと同じ対象処理を処理群d(処理xを含む)とし、処理群dの未割当データ量を、それよりも大きいメモリの最小容量の倍数で表した値の合計をeとする(S28)。ここでは、処理群aが対象処理250、260であり、対象処理250、260は使用可能なメモリが同じであるため、処理群dは対象処理250、260となる。このとき対象処理250、260の未割当データ量は、それぞれ30、60である。このときメモリの最小容量は32であり、32の倍数で且つ30、60よりも大きい値であって最小の値はそれぞれ32、64である。したがって、e=96(=32+64)と特定される。   Subsequently, it is determined whether the capacity of the candidate memory c is equal to or less than the unallocated data amount of the process x (S26). Here, the capacity of the candidate memory c (RAM 200b) is 128, and the unallocated data of the process x (target process 260). The amount is 60 (N in S26). In S28, among the processing groups a, the target processing whose usable memory is the same as the processing x is the processing group d (including the processing x), and the unallocated data amount of the processing group d is set to the minimum memory capacity larger than that. The sum of the values expressed in multiples of e is set as e (S28). Here, since the process group a is the target processes 250 and 260 and the target processes 250 and 260 have the same usable memory, the process group d is the target processes 250 and 260. At this time, the unallocated data amounts of the target processes 250 and 260 are 30 and 60, respectively. At this time, the minimum capacity of the memory is 32, which is a multiple of 32 and larger than 30, 60, and the minimum values are 32, 64, respectively. Therefore, e = 96 (= 32 + 64) is specified.

次に、S30では、候補メモリ群のうち、候補メモリc(RAM200b)より容量が小さいメモリの容量の合計をfとする。ここでRAM200e、200f、200gが、候補メモリc(RAM200b)より容量が小さいため、f=96(=32+32+32となる。このときe=f(S32のN)となり、iを1インクリメントして(S38)、候補メモリ群のi番目のメモリと(i−1)番目のメモリの容量が同じか判定される(S40)。このとき2番目のメモリ(RAM200e)と1番目のメモリ(RAM200b)とは容量が異なるため(S40のN)、S24に戻る。S24では、2番目のメモリであるRAM200eが、候補メモリcとして設定される。   Next, in S30, let f be the total memory capacity of the candidate memory group that is smaller than the candidate memory c (RAM 200b). Here, since the capacity of the RAMs 200e, 200f, and 200g is smaller than that of the candidate memory c (RAM 200b), f = 96 (= 32 + 32 + 32. At this time, e = f (N of S32) and i is incremented by 1 (S38). It is determined whether the i-th memory and the (i-1) -th memory in the candidate memory group have the same capacity (S40), where the second memory (RAM 200e) and the first memory (RAM 200b) are Since the capacities are different (N in S40), the process returns to S24, where the RAM 200e as the second memory is set as the candidate memory c.

S26では、候補メモリcの容量(32)が、処理xの未割当データ量(60)以下であるため(S26のY)、候補メモリcを処理xの未割当データに割り当て(S34)、これによりRAM200eが対象処理260に割り当てられる。このとき処理x(対象処理260)に未割当データが存在するため(S36のY)、S12に戻る。このとき対象処理260の未割当データ量は28(=60−32)となる。   In S26, since the capacity (32) of the candidate memory c is equal to or less than the unallocated data amount (60) of the process x (Y in S26), the candidate memory c is allocated to the unallocated data of the process x (S34). Thus, the RAM 200e is allocated to the target process 260. At this time, since unallocated data exists in the process x (target process 260) (Y in S36), the process returns to S12. At this time, the unallocated data amount of the target process 260 is 28 (= 60−32).

続いて、S12では、処理群aに対象処理250(未割当データ量30)、対象処理260(未割当データ量28)が選ばれる。S14では、処理群aのうち、未割当データ量の大きい対象処理250が処理xに設定される。S16で、処理xが使用可能なRAM200b、200f、200gが候補メモリbに設定される。候補メモリが存在するため(S18のY)、S20では、候補メモリbがソートされて、RAM200b、200f、200gの順番が保持される。そして、i=1(S22)として、S24では、まずRAM200bが候補メモリcに設定される。   Subsequently, in S12, the target process 250 (unallocated data amount 30) and the target process 260 (unallocated data amount 28) are selected as the processing group a. In S14, the target process 250 having a large unallocated data amount in the process group a is set as the process x. In S16, the RAMs 200b, 200f, and 200g that can use the process x are set as the candidate memory b. Since there is a candidate memory (Y in S18), in S20, the candidate memory b is sorted and the order of the RAMs 200b, 200f, and 200g is maintained. Then, i = 1 (S22), and in S24, the RAM 200b is first set as the candidate memory c.

続いて、候補メモリcの容量が処理xの未割当データ量以下であるか判定され(S26)、ここでは候補メモリc(RAM200b)の容量が128、処理x(対象処理250)の未割当データ量が30である(S26のN)。S28において、処理群aのうち、使用可能なメモリが処理xと同じ対象処理を処理群d(処理xを含む)とし、処理群dの未割当データ量を、それよりも大きいメモリの最小容量の倍数で表した値の合計をeとする(S28)。ここでは、処理群aが対象処理250、260であり、対象処理250、260は使用可能なメモリが同じであるため、処理群dは対象処理250、260となる。このとき対象処理250、260の未割当データ量は、それぞれ30、28である。このときメモリの最小容量は32であり、32の倍数で且つ30、28よりも大きい値であって最小の値はそれぞれ32、32である。したがって、e=64(=32+32)と特定される。   Subsequently, it is determined whether the capacity of the candidate memory c is equal to or less than the unallocated data amount of the process x (S26). Here, the capacity of the candidate memory c (RAM 200b) is 128, and the unallocated data of the process x (target process 250). The amount is 30 (N in S26). In S28, among the processing groups a, the target processing whose usable memory is the same as the processing x is the processing group d (including the processing x), and the unallocated data amount of the processing group d is set to the minimum memory capacity larger than that. The sum of the values expressed in multiples of e is set as e (S28). Here, since the process group a is the target processes 250 and 260 and the target processes 250 and 260 have the same usable memory, the process group d is the target processes 250 and 260. At this time, the unallocated data amounts of the target processes 250 and 260 are 30 and 28, respectively. At this time, the minimum memory capacity is 32, which is a multiple of 32 and larger than 30, 28, and the minimum values are 32, 32, respectively. Therefore, e = 64 (= 32 + 32) is specified.

次に、S30では、候補メモリ群のうち、候補メモリc(RAM200b)より容量が小さいメモリの容量の合計をfとする。ここでRAM200f、200gが、候補メモリc(RAM200b)より容量が小さいため、f=64(=32+32)となる。このときe=f(S32のN)となり、iを1インクリメントして(S38)、候補メモリ群のi番目のメモリと(i−1)番目のメモリの容量が同じか判定される(S40)。このとき2番目のメモリ(RAM200f)と1番目のメモリ(RAM200b)とは容量が異なるため(S40のN)、S24に戻る。S24では、2番目のメモリであるRAM200fが、候補メモリcとして設定される。   Next, in S30, let f be the total memory capacity of the candidate memory group that is smaller than the candidate memory c (RAM 200b). Here, since the RAMs 200f and 200g have a smaller capacity than the candidate memory c (RAM 200b), f = 64 (= 32 + 32). At this time, e = f (N in S32), i is incremented by 1 (S38), and it is determined whether the capacities of the i-th memory and the (i-1) -th memory in the candidate memory group are the same (S40). . At this time, since the second memory (RAM 200f) and the first memory (RAM 200b) have different capacities (N in S40), the process returns to S24. In S24, the second memory RAM 200f is set as the candidate memory c.

S26では、候補メモリcの容量(32)が、処理xの未割当データ量(30)以上であるため(S26のY)、候補メモリcを処理xの未割当データに割り当て(S34)、これによりRAM200fが対象処理250に割り当てられる。このとき処理x(対象処理260)には未割当データが存在しなくなり(S36のN)、S10に戻る。   In S26, since the capacity (32) of the candidate memory c is equal to or larger than the unallocated data amount (30) of the process x (Y in S26), the candidate memory c is allocated to the unallocated data of the process x (S34). Thus, the RAM 200f is allocated to the target process 250. At this time, there is no unallocated data in the process x (target process 260) (N in S36), and the process returns to S10.

このとき未割当データのある対象処理260が存在し(S10のY)、S12では、対象処理260が処理群aとして選ばれる。続いてS14で、対象処理260が処理xとして設定され、S16で、対象処理260が使用可能なメモリであるRAM200b、200gが、候補メモリbとして設定される。   At this time, there is a target process 260 with unallocated data (Y in S10), and in S12, the target process 260 is selected as the process group a. Subsequently, in S14, the target process 260 is set as the process x, and in S16, the RAMs 200b and 200g, which are memories that can be used by the target process 260, are set as the candidate memory b.

候補メモリbが存在しているため(S18のY)、S20で、候補メモリbが容量の大きい順にソートされ、その順番が保持される。このとき、候補メモリbは、RAM200b、200gの順にソートされ、その順番が保持される。   Since the candidate memory b exists (Y in S18), the candidate memory b is sorted in descending order of capacity in S20, and the order is maintained. At this time, the candidate memory b is sorted in the order of the RAMs 200b and 200g, and the order is retained.

保持したRAM200の順序を示すiを1にセットし(S22)、候補メモリ群のi番目のRAM200を候補メモリcとする(S24)。ここでは、RAM200bが候補メモリcとして設定される。続いて、候補メモリcの容量が処理xの未割当データ量以下であるか判定される(S26)。ここでは候補メモリc(RAM200b)の容量が128、処理x(対象処理260)の未割当データ量が28であり、候補メモリcの容量が処理xの未割当データ量より大きい(S26のN)。   I indicating the order of the stored RAMs 200 is set to 1 (S22), and the i-th RAM 200 in the candidate memory group is set as a candidate memory c (S24). Here, the RAM 200b is set as the candidate memory c. Subsequently, it is determined whether the capacity of the candidate memory c is equal to or less than the unallocated data amount of the process x (S26). Here, the capacity of the candidate memory c (RAM 200b) is 128, the unallocated data amount of the process x (target process 260) is 28, and the capacity of the candidate memory c is larger than the unallocated data amount of the process x (N in S26). .

続いて、処理群aのうち、使用可能なメモリが処理xと同じ対象処理を処理群d(処理xを含む)とし、処理群dの未割当データ量を、それよりも大きいメモリの最小容量の倍数で表した値の合計をeとする(S28)。ここでは、処理群aが対象処理260のみであるため処理群dは対象処理260となり、その未割当データ量は28である。このときメモリの最小容量は32であり、32の倍数で且つ28よりも大きい値であって最小の値は32である。したがって、e=32と特定される。次に、S30では、候補メモリ群のうち、候補メモリcより容量が小さいメモリの容量の合計をfとする。ここでRAM200b、200gのうち、候補メモリc(RAM200b)より容量が小さいメモリはRAM200gであり、f=32となる。   Subsequently, in the processing group a, a target process whose usable memory is the same as that of the processing x is a processing group d (including the processing x), and the unallocated data amount of the processing group d is set to a minimum memory capacity larger than that. The sum of the values expressed in multiples of e is set as e (S28). Here, since the process group a is only the target process 260, the process group d is the target process 260, and the amount of unallocated data is 28. At this time, the minimum capacity of the memory is 32, which is a multiple of 32 and greater than 28, and the minimum value is 32. Therefore, e = 32 is specified. Next, in S30, the sum of the capacities of memories having a capacity smaller than that of the candidate memory c in the candidate memory group is defined as f. Here, of the RAMs 200b and 200g, the memory having a smaller capacity than the candidate memory c (RAM 200b) is the RAM 200g, and f = 32.

このときe=f(S32のN)となり、iを1インクリメントして(S38)、候補メモリ群のi番目のメモリと(i−1)番目のメモリの容量が同じか判定される(S40)。このとき2番目のメモリ(RAM200g)と1番目のメモリ(RAM200b)とは容量が異なるため(S40のN)、S24に戻る。S24では、2番目のメモリであるRAM200gが、候補メモリcとして設定される。   At this time, e = f (N in S32), i is incremented by 1 (S38), and it is determined whether the capacities of the i-th memory and the (i-1) -th memory in the candidate memory group are the same (S40). . At this time, since the second memory (RAM 200g) and the first memory (RAM 200b) have different capacities (N in S40), the process returns to S24. In S24, the second memory RAM 200g is set as the candidate memory c.

このとき候補メモリc(RAM200g)の容量が32、処理x(対象処理260)の未割当データ量が28であり、候補メモリcの容量が処理xの未割当データ量より大きい(S26のN)。   At this time, the capacity of the candidate memory c (RAM 200g) is 32, the unallocated data amount of the process x (target process 260) is 28, and the capacity of the candidate memory c is larger than the unallocated data amount of the process x (N in S26). .

続いて、処理群aのうち、使用可能なメモリが処理xと同じ対象処理を処理群d(処理xを含む)とし、処理群dの未割当データ量を、それよりも大きいメモリの最小容量の倍数で表した値の合計をeとする(S28)。ここでは、処理群aが対象処理260のみであるため処理群dは対象処理260となり、その未割当データ量は28である。このときメモリの最小容量は32であり、32の倍数で且つ28よりも大きい値であって最小の値は32である。したがって、e=32と特定される。次に、S30では、候補メモリ群のうち、候補メモリcより容量が小さいメモリの容量の合計をfとする。ここでRAM200b、200gのうち、候補メモリc(RAM200g)より容量が小さいメモリは存在しないため、f=0となる。   Subsequently, in the processing group a, a target process whose usable memory is the same as that of the processing x is a processing group d (including the processing x), and the unallocated data amount of the processing group d is set to a minimum memory capacity larger than that. The sum of the values expressed in multiples of e is set as e (S28). Here, since the process group a is only the target process 260, the process group d is the target process 260, and the amount of unallocated data is 28. At this time, the minimum capacity of the memory is 32, which is a multiple of 32 and greater than 28, and the minimum value is 32. Therefore, e = 32 is specified. Next, in S30, the sum of the capacities of memories having a capacity smaller than that of the candidate memory c in the candidate memory group is defined as f. Here, since there is no memory having a smaller capacity than the candidate memory c (RAM 200g) among the RAMs 200b and 200g, f = 0.

ここでeとfとを比較し(S32)、この場合はe(=32)>f(=0)(S32のY)であるため、候補メモリcを処理xの未割当データに割り当てる(S34)。これによりRAM200gが対象処理260に割り当てられる。このとき処理x(対象処理260)のデータはすべて割り当てられたことになり、したがって処理xに未割当データはなくなるため(S36のN)、S10に戻る。S10では、すべての対象処理についてメモリの割り当てが完了したため(S10のN)、本フローが終了する。   Here, e and f are compared (S32), and in this case, e (= 32)> f (= 0) (Y in S32), so that the candidate memory c is assigned to the unallocated data of the process x (S34). ). As a result, the RAM 200g is allocated to the target process 260. At this time, all the data of the process x (target process 260) has been allocated, and therefore there is no unallocated data in the process x (N in S36), and the process returns to S10. In S10, since the memory allocation has been completed for all target processes (N in S10), this flow ends.

なお、S18において候補メモリbが存在しない場合(S18のN)、処理xが使用可能なメモリで、かつすでに割り当てられているメモリのうち割当先の処理が別のメモリに割当変更可能なメモリxがあるか判定される(S42)。そのようなメモリxが存在しない場合(S42のN)、割当ができず、本フローは終了する。一方で、そのようなメモリxが存在する場合(S42のY)、メモリxの割当先の処理において、メモリxの割当を別のメモリに変更し(S44)、メモリxを処理xの未割当データに割り当て(S46)、S36に移行する。このように、候補メモリbが存在しない場合には、すでに割り当てられているメモリを変更することで、再度、メモリの割り当て処理を実行する。   If the candidate memory b does not exist in S18 (N in S18), the memory x can be used for the process x, and the memory x that can be reassigned to another memory among the already allocated memories. It is determined whether there is (S42). If such a memory x does not exist (N in S42), allocation cannot be performed, and this flow ends. On the other hand, when such a memory x exists (Y of S42), in the process of the allocation destination of the memory x, the allocation of the memory x is changed to another memory (S44), and the memory x is not allocated to the process x. Data is assigned (S46), and the process proceeds to S36. As described above, when the candidate memory b does not exist, the memory allocation process is executed again by changing the already allocated memory.

図17は、対象処理に割り当てたRAMを示す。
以上により、コンパイル部30は、各対象処理へのメモリ割り当てを自動で行なうことができ、ユーザの開発効率を向上させることができる。また、この割当処理を実行することで、使用するメモリの総容量を極力小さくできる。メモリは一般的に容量が大きくなるほど消費電力が大きくなるため、使用するメモリの総容量を小さくすることで、メモリの消費電力を低減することができる。例えば、図15において、本手法を用いず、対象処理250から順に、使用可能なRAM200を、符号として付しているアルファベット順に割り当てていくと、対象処理250にはRAM200a、200b、対象処理260にはRAM200c、200e、対象処理270にはRAM200d、200fが割り当てられる。したがって、この場合の割り当てられたRAM200の総容量は384となり、図17における割り当てられたRAM200の総容量(320)よりも大きくなる。
FIG. 17 shows the RAM allocated to the target process.
As described above, the compiling unit 30 can automatically allocate memory to each target process, and can improve the development efficiency of the user. Also, by executing this allocation process, the total capacity of the memory to be used can be minimized. Since the memory generally increases in power consumption as its capacity increases, the power consumption of the memory can be reduced by reducing the total capacity of the memory used. For example, in FIG. 15, when the usable RAM 200 is assigned in the alphabetical order given as a reference in order from the target process 250 without using this method, the target process 250 is assigned to the RAMs 200 a and 200 b and the target process 260. Are allocated to the RAMs 200c and 200e, and the target processing 270 is the RAMs 200d and 200f. Accordingly, the total capacity of the allocated RAM 200 in this case is 384, which is larger than the total capacity (320) of the allocated RAM 200 in FIG.

今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。   The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

実施の形態に係る処理装置の基本構成図である。1 is a basic configuration diagram of a processing apparatus according to an embodiment. 演算ユニットの構成を示す図である。It is a figure which shows the structure of an arithmetic unit. マルチスレッド処理を説明するための説明図である。It is explanatory drawing for demonstrating multithread processing. 本実施形態の処理装置の構成の一例を示す図である。It is a figure which shows an example of a structure of the processing apparatus of this embodiment. 本実施形態の処理装置の構成の変形例を示す図である。It is a figure which shows the modification of the structure of the processing apparatus of this embodiment. 各演算ユニットに対してRAMを用いてメインメモリを構成した例を示す図である。It is a figure which shows the example which comprised the main memory using RAM with respect to each arithmetic unit. 共通メモリ回路の構成を示す図である。It is a figure which shows the structure of a common memory circuit. 第2選択回路の回路構成を示す図である。It is a figure which shows the circuit structure of a 2nd selection circuit. 本実施形態の処理装置の構成のさらなる変形例を示す図である。It is a figure which shows the further modification of the structure of the processing apparatus of this embodiment. 演算ユニットの構成の一例を示す図である。It is a figure which shows an example of a structure of an arithmetic unit. スレッド1とスレッド3とでアドレス空間を共用するときの出力選択回路の動作を示す図である。FIG. 10 is a diagram illustrating an operation of the output selection circuit when the thread 1 and the thread 3 share an address space. 図9に示す処理装置において、スレッド1とスレッド3がメモリアドレス空間を共用したときのメモリ構成例を示す図である。FIG. 10 is a diagram illustrating a memory configuration example when a thread 1 and a thread 3 share a memory address space in the processing device illustrated in FIG. 9. 2つの演算ユニットの構成例を示す図である。It is a figure which shows the structural example of two arithmetic units. 2つの演算ユニットの別の構成例を示す図である。It is a figure which shows another structural example of two arithmetic units. メモリと対象処理との接続がハードウェア上で制限された処理装置の構成を示す図である。It is a figure which shows the structure of the processing apparatus with which the connection of a memory and an object process was restrict | limited on hardware. メモリ割当処理のフローチャートを示す図である。It is a figure which shows the flowchart of a memory allocation process. メモリ割当処理のフローチャートを示す図である。It is a figure which shows the flowchart of a memory allocation process. メモリ割当処理のフローチャートを示す図である。It is a figure which shows the flowchart of a memory allocation process. 対象処理に割り当てたRAMを示す図である。It is a figure which shows RAM allocated to the object process.

符号の説明Explanation of symbols

10・・・処理装置、12・・・演算ユニット、14・・・設定部、18・・・制御部、20・・・内部状態保持回路、24・・・第1フィードバック経路、26・・・集積回路装置、27・・・メインメモリ、29・・・第2フィードバック経路、30・・・コンパイル部、31・・・データフローグラフ処理部、32・・・設定データ生成部、34・・・記憶部、36・・・プログラム、38・・・データフローグラフ、40・・・設定データ、50・・・論理回路、60・・・共通メモリ回路、70,80・・・個別メモリ回路、100・・・RAM、110・・・第1選択回路、120・・・第2選択回路、130・・・メモリ制御回路、138・・・アクセス判定回路、140・・・遅延回路、142・・・CE生成回路、150・・・読出制御回路、152,154・・・読出データ変換回路、156,158・・・読出データ選択回路、170・・・出力選択回路、180,182・・・入力選択回路、200・・・RAM、210・・・共通メモリ回路、220,230・・・個別メモリ回路。 DESCRIPTION OF SYMBOLS 10 ... Processing apparatus, 12 ... Arithmetic unit, 14 ... Setting part, 18 ... Control part, 20 ... Internal state holding circuit, 24 ... First feedback path, 26 ... Integrated circuit device, 27 ... main memory, 29 ... second feedback path, 30 ... compiling unit, 31 ... data flow graph processing unit, 32 ... setting data generating unit, 34 ... Storage unit 36 ... program 38 ... data flow graph 40 ... setting data 50 ... logic circuit 60 ... common memory circuit 70,80 ... individual memory circuit 100 ... RAM, 110 ... first selection circuit, 120 ... second selection circuit, 130 ... memory control circuit, 138 ... access determination circuit, 140 ... delay circuit, 142 ... CE generation circuit, 150 ..Read control circuit, 152,154 ... Read data conversion circuit, 156,158 ... Read data selection circuit, 170 ... Output selection circuit, 180,182 ... Input selection circuit, 200 ... RAM, 210 ... common memory circuit, 220, 230 ... individual memory circuit.

Claims (12)

機能の変更が可能な演算処理装置であって、
演算処理を行なう複数の演算ユニットと、
複数の記憶領域と、
各演算ユニットに対して、少なくとも1つの記憶領域を用いてアドレス空間を構成する記憶領域構成回路と、を備え、
少なくとも1つの記憶領域は、複数の演算ユニットの一部にのみ接続されていることを特徴とする演算処理装置。
An arithmetic processing device capable of changing functions,
A plurality of arithmetic units for performing arithmetic processing;
Multiple storage areas;
A storage area configuration circuit that forms an address space using at least one storage area for each arithmetic unit, and
At least one storage area is connected to only a part of a plurality of arithmetic units.
機能の変更が可能な演算処理装置であって、
複数の独立した演算処理を行なう少なくとも1つの演算ユニットと、
複数の記憶領域と、
各演算処理に対して、少なくとも1つの記憶領域を用いてアドレス空間を構成する記憶領域構成回路と、を備え、
少なくとも1つの記憶領域は、複数の演算処理の一部にのみ利用されるように演算ユニットに接続されていることを特徴とする演算処理装置。
An arithmetic processing device capable of changing functions,
At least one arithmetic unit for performing a plurality of independent arithmetic processes;
Multiple storage areas;
A storage area configuration circuit that forms an address space using at least one storage area for each arithmetic processing, and
At least one storage area is connected to an arithmetic unit so as to be used only for a part of a plurality of arithmetic processes.
前記記憶領域構成回路は、
供給されるアドレス信号の一部のビットに基づいて、
アドレス空間を構成する少なくとも1つの記憶領域のうち、データの書き込みもしくは読み出しを行う記憶領域を選択する制御回路と、
少なくとも1つの記憶領域から読み出されたデータからひとつを選択する読出データ選択回路と、を有し、
前記制御回路は、記憶領域ごとに設けられることを特徴とする請求項1または2に記載の演算処理装置。
The storage area configuration circuit includes:
Based on some bits of the address signal supplied,
A control circuit for selecting a storage area to which data is written or read out of at least one storage area constituting the address space;
A read data selection circuit for selecting one of data read from at least one storage area,
The arithmetic processing apparatus according to claim 1, wherein the control circuit is provided for each storage area.
異なる記憶容量をもつ記憶領域によってアドレス空間を構成する場合に、アドレス空間は、記憶容量の小さい記憶領域から順に小さいアドレス値が割り当てられることを特徴とする請求項1から3のいずれかに記載の演算処理装置。   4. The address space is configured in such a manner that, in the case where the address space is constituted by storage areas having different storage capacities, the address space is assigned a smaller address value in order from the storage area having the smaller storage capacity. Arithmetic processing device. アドレス空間を複数の記憶領域で構成し、同じ記憶容量の記憶領域が存在する場合に、同じ記憶容量の記憶領域の個数が多いものから順に、小さいアドレス値が割り当てられることを特徴とする請求項1から3のいずれかに記載の演算処理装置。   The address space is configured by a plurality of storage areas, and when there are storage areas having the same storage capacity, a smaller address value is assigned in order from the largest number of storage areas having the same storage capacity. The arithmetic processing device according to any one of 1 to 3. 複数の演算処理で、1つのアドレス空間を共用できることを特徴とする請求項1から5のいずれかに記載の演算処理装置。   6. The arithmetic processing apparatus according to claim 1, wherein a single address space can be shared by a plurality of arithmetic processes. 複数の演算処理で同じ記憶領域によって構成されたアドレス空間を共用する場合に、複数の演算処理が、共用するアドレス空間に同時にアクセスしないようにアクセスタイミングを制御することを特徴とする請求項6に記載の演算処理装置。   7. The access timing is controlled so that the plurality of arithmetic processes do not access the shared address space at the same time when an address space constituted by the same storage area is shared by the plurality of arithmetic processes. The arithmetic processing unit described. 前記演算ユニットは、論理回路の多段配列構造を有しており、
第1の演算処理が、第2の演算処理に対して構成されるアドレス空間を使用可能とする場合に、第1演算処理と第2演算処理が、共用するアドレス空間に同時にアクセスしないように、アドレス空間への出力または入力する段を制限することを特徴とする請求項7に記載の演算処理装置。
The arithmetic unit has a multistage arrangement structure of logic circuits,
When the first arithmetic processing enables the use of the address space configured for the second arithmetic processing, the first arithmetic processing and the second arithmetic processing do not access the shared address space at the same time. The arithmetic processing apparatus according to claim 7, wherein output stages to the address space or input stages are limited.
前記記憶領域には、すべての演算処理が使用可能な記憶領域と、複数の演算処理のうちの一部のみが使用できる記憶領域とが存在することを特徴とする請求項1から8のいずれかに記載の演算処理装置。   9. The storage area according to claim 1, wherein a storage area where all the arithmetic processes can be used and a storage area where only a part of the plurality of arithmetic processes can be used exist. The arithmetic processing unit described in 1. 複数の演算処理を実行することができ、かつ演算処理に対する記憶領域を構成可能な記憶領域構成回路を備えた演算処理装置に対して、各演算処理に割り当てる記憶領域を定める記憶領域割当方法であって、
各演算処理が保持しなければならないデータ量を取得するステップと、
使用可能な記憶領域の容量を取得するステップと、
各演算処理が保持しなければならないデータ量に応じて、各演算処理が使用可能な記憶領域を割り当てるステップと、
を備えることを特徴とする記憶領域割当方法。
A storage area allocating method for determining a storage area to be assigned to each arithmetic process for an arithmetic processing apparatus having a storage area configuration circuit capable of executing a plurality of arithmetic processes and configuring a storage area for the arithmetic process. And
Obtaining the amount of data that each arithmetic process must hold;
Obtaining the amount of storage space available;
Allocating a storage area that can be used by each arithmetic processing according to the amount of data that each arithmetic processing must hold;
A storage area allocating method comprising:
記憶領域の割当が完了していない演算処理のうち、使用可能な記憶領域の総容量が最も小さい演算処理を選択するステップを有し、
選択した演算処理から、記憶領域の割り当てを行うことを特徴とする請求項10に記載の記憶領域割当方法。
A step of selecting a calculation process in which the total capacity of the usable storage area is the smallest among the calculation processes for which storage area allocation has not been completed;
The storage area allocation method according to claim 10, wherein the storage area is allocated from the selected arithmetic processing.
請求項1から9のいずれかに記載の演算処理装置であって、記憶領域構成回路は、請求項10から11のいずれかの記憶領域割当方法により各演算処理に対して割り当てられた記憶領域の関係を用いて、アドレス空間を構成することを特徴とする演算処理装置。   The arithmetic processing device according to any one of claims 1 to 9, wherein the storage area configuration circuit includes a storage area allocated to each arithmetic processing by the storage area allocation method according to any one of claims 10 to 11. An arithmetic processing apparatus comprising an address space using a relationship.
JP2008319993A 2008-12-16 2008-12-16 Arithmetic processor and storage area allocation method Pending JP2010146102A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008319993A JP2010146102A (en) 2008-12-16 2008-12-16 Arithmetic processor and storage area allocation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008319993A JP2010146102A (en) 2008-12-16 2008-12-16 Arithmetic processor and storage area allocation method

Publications (1)

Publication Number Publication Date
JP2010146102A true JP2010146102A (en) 2010-07-01

Family

ID=42566518

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008319993A Pending JP2010146102A (en) 2008-12-16 2008-12-16 Arithmetic processor and storage area allocation method

Country Status (1)

Country Link
JP (1) JP2010146102A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016535913A (en) * 2013-10-31 2016-11-17 シリコン テーラー リミテッド Pipelined configurable processor
JP2020522825A (en) * 2017-03-14 2020-07-30 アズールエンジン テクノロジーズ ヂュハイ インク.Azurengine Technologies Zhuhai Inc. Reconfigurable parallel processing

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016535913A (en) * 2013-10-31 2016-11-17 シリコン テーラー リミテッド Pipelined configurable processor
US10275390B2 (en) 2013-10-31 2019-04-30 Silicon Tailor Limited Pipelined configurable processor
JP2020522825A (en) * 2017-03-14 2020-07-30 アズールエンジン テクノロジーズ ヂュハイ インク.Azurengine Technologies Zhuhai Inc. Reconfigurable parallel processing
US10956360B2 (en) 2017-03-14 2021-03-23 Azurengine Technologies Zhuhai Inc. Static shared memory access with one piece of input data to be reused for successive execution of one instruction in a reconfigurable parallel processor
US11176085B2 (en) 2017-03-14 2021-11-16 Azurengine Technologies Zhuhai Inc. Reconfigurable parallel processing with various reconfigurable units to form two or more physical data paths and routing data from one physical data path to a gasket memory to be used in a future physical data path as input
US11182334B2 (en) 2017-03-14 2021-11-23 Azurengine Technologies Zhuhai Inc. Shared memory access for reconfigurable parallel processor using a plurality of memory ports each comprising an address calculation unit
US11182336B2 (en) 2017-03-14 2021-11-23 Azurengine Technologies Zhuhai Inc. Reconfigurable parallel processing with a temporary data storage coupled to a plurality of processing elements (PES) to store a PE execution result to be used by a PE during a next PE configuration
US11182335B2 (en) 2017-03-14 2021-11-23 Azurengine Technologies Zhuhai Inc. Circular reconfiguration for reconfigurable parallel processor using a plurality of memory ports coupled to a commonly accessible memory unit
US11182333B2 (en) 2017-03-14 2021-11-23 Azurengine Technologies Zhuhai Inc. Private memory access for reconfigurable parallel processor using a plurality of memory ports each comprising an address calculation unit
US11226927B2 (en) 2017-03-14 2022-01-18 Azurengine Technologies Zhuhai Inc. Reconfigurable parallel processing

Similar Documents

Publication Publication Date Title
US7580963B2 (en) Semiconductor device having an arithmetic unit of a reconfigurable circuit configuration in accordance with stored configuration data and a memory storing fixed value data to be supplied to the arithmetic unit, requiring no data area for storing fixed value data to be set in a configuration memory
JP4900717B2 (en) Reconfigurable device
JP4104538B2 (en) Reconfigurable circuit, processing device provided with reconfigurable circuit, function determination method of logic circuit in reconfigurable circuit, circuit generation method, and circuit
US20200363966A1 (en) Scaling out architecture for dram-based processing unit (dpu)
CN101796484B (en) Thread optimized multiprocessor architecture
JP4484756B2 (en) Reconfigurable circuit and processing device
CN112149811A (en) Scheduling perception tensor distribution module
US20060004979A1 (en) Semiconductor device
WO2007069506A1 (en) Storage region allocation system, method, and control device
US11893475B2 (en) Neural network accelerator writable memory
JP4423953B2 (en) Semiconductor integrated circuit
US6463518B1 (en) Generation of memory addresses for accessing a memory utilizing scheme registers
JP2010146102A (en) Arithmetic processor and storage area allocation method
US20170192821A1 (en) Distributed real-time computing framework using in-storage processing
US6754801B1 (en) Method and apparatus for a shift register based interconnection for a massively parallel processor array
US20110185152A1 (en) Reconfigurable circuit and semiconductor integrated circuit
JP2012008747A (en) Integration device, memory allocation method and program
US7536499B2 (en) Memory access control device and processing system having same
JP4260086B2 (en) Data flow graph generation device, processing device, reconfigurable circuit.
JP5196538B2 (en) Semiconductor integrated circuit design method, semiconductor integrated circuit design program, and semiconductor integrated circuit
JP4562679B2 (en) Data flow graph generator
JP4436734B2 (en) Processing equipment
JP4562678B2 (en) Data flow graph reconstruction device, setting data generation device for reconfigurable circuit, and processing device
JP2009217619A (en) Device, method and program for combining operations
JP4610236B2 (en) Setting data generator