JP2011198100A - Processor and control method thereof - Google Patents
Processor and control method thereof Download PDFInfo
- Publication number
- JP2011198100A JP2011198100A JP2010064725A JP2010064725A JP2011198100A JP 2011198100 A JP2011198100 A JP 2011198100A JP 2010064725 A JP2010064725 A JP 2010064725A JP 2010064725 A JP2010064725 A JP 2010064725A JP 2011198100 A JP2011198100 A JP 2011198100A
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- instructions
- processor
- slot
- arithmetic unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は、並列して命令が実行可能なプロセッサ及びその制御方法に関し、特に、例えばVLIW(Very Long Instruction Word)命令を実行可能なプロセッサ及びその制御方法に関する。 The present invention relates to a processor capable of executing instructions in parallel and a control method thereof, and more particularly to a processor capable of executing, for example, a VLIW (Very Long Instruction Word) instruction and a control method thereof.
従来、CPU(Central Processing Unit)、DSP(Digital Signal Processor)等プロセッサの処理能力向上のため、複数の命令を並列実行する方法がある。この方法にはハードウェアが自動的に命令の並列実行性を検出して並列実行するスーパースカラと呼ばれるものと、プログラムをコンパイル、アセンブルする際に予め命令の並列度を検出しておき、並列実行可能な命令コードを生成しておくVLIW(Very Long Instruction Word)と呼ばれるものがある。組み込み機器向けプロセッサでは消費電力、面積の関係で回路構成が簡単なVLIW方式を使うことが多い。 Conventionally, there is a method of executing a plurality of instructions in parallel in order to improve the processing capability of a processor such as a CPU (Central Processing Unit) and a DSP (Digital Signal Processor). This method is called a superscalar where the hardware automatically detects the parallel execution of instructions and executes them in parallel, and when the program is compiled and assembled, the parallelism of the instructions is detected in advance. There is a so-called VLIW (Very Long Instruction Word) that generates a possible instruction code. Processors for embedded devices often use the VLIW method with a simple circuit configuration in terms of power consumption and area.
近年のプロセッサでは性能向上のため、命令並列度が高くなることがあり、VLIW型プロセッサは回路構成が簡単と言っても並列実行される命令群に含まれる各命令を、対応する演算ユニットに発行する回路が大きくなり、動作周波数が低下する事が問題となっている。 In order to improve performance in recent processors, the degree of instruction parallelism may increase, and even if the VLIW processor is simple in circuit configuration, each instruction included in a group of instructions executed in parallel is issued to the corresponding arithmetic unit. The problem is that the operating frequency becomes large and the operating frequency decreases.
この問題を解決する手法として特許文献1に記載されているように、命令メモリから読み出した命令群を、各演算ユニットに発行する前に、命令群内の命令の順番を並べ直すことで、発行回路の選択回路を削減し、面積低減、周波数劣化低減を図るものや、特許文献2に記載されているように、コンパイル、アセンブル時に命令群内の命令の順番をある固定の順番で並べて命令メモリに置いておき、発行回路の選択回路を削減し、面積低減、周波数劣化低減を図るものがある。これらはいずれも各命令を対応する各演算ユニットに発行する段階では、各命令がある順番(法則)に基づいて並んでいる点が特徴である。
As described in
MX/MY/AX/AY/DX/DY/SX/SYという8つの演算ユニットを持つプロセッサで、命令発行時の命令順が自由な場合と、ある順番(法則)に基づいている場合での命令発行回路の違いについて説明する。ここで、MX/MY、AX/AY、DX/DY、SX/SYはそれぞれ同一の演算ユニットが2個ずつあり、1個目が*X、2個目が*Yであることを示す。また、MY、AY、DY、SYは2個目の演算ユニットであるのでMY、AY、DY、SYだけに命令が発行されることはなく、必ずそれぞれMX、AX、DX、SYへの命令の発行が行われる必要がある。また説明の都合上、命令メモリから読み出した並列実行される命令群は最大で8並列とする。 Instructions when the order of instructions when issuing instructions is free and when they are based on a certain order (law) in a processor having eight arithmetic units of MX / MY / AX / AY / DX / DY / SX / SY The difference between the issuing circuits will be described. Here, MX / MY, AX / AY, DX / DY, and SX / SY each indicate two identical arithmetic units, the first being * X and the second being * Y. In addition, since MY, AY, DY, and SY are the second arithmetic units, instructions are not issued only to MY, AY, DY, and SY, and instructions to MX, AX, DX, and SY are always issued. Issue needs to be made. For convenience of explanation, the maximum number of instructions executed in parallel read from the instruction memory is 8 in parallel.
命令順が自由の場合、MX演算ユニットに属する命令は命令レジスタ内の命令1スロット〜命令8スロットのどのスロットにも存在する可能性がある。同様にAX演算ユニットに属する命令、DX演算ユニットに属する命令、SX演算ユニットに属する命令も命令レジスタ内の命令1スロット〜命令8スロットのどのスロットにも存在する可能性がある。また、MY演算ユニットに属する命令、AY演算ユニットに属する命令、DY演算ユニットに属する命令、SY演算ユニットに属する命令はそれぞれMX、AX、DX、SX演算ユニットに属する命令の実行が前提となるため、命令レジスタ内の命令2スロット〜命令8スロットのどのスロットにも存在する可能性がある。そのため、命令発行回路はMX/AX/DX/SX演算ユニット用に命令1スロット〜命令8スロットのいずれからも選択できる8to1の選択回路と、MY/AY/DY/SY演算ユニット用に命令2スロット〜命令8スロットのいずれからも選択できる7to1の選択回路とを有する。言い換えると8to1の選択回路が4個と7to1の選択回路が4個必要となる。
When the instruction order is free, an instruction belonging to the MX arithmetic unit may exist in any slot of the
次に命令発行時の命令順をMX→MY→AX→AY→DX→DY→SX→SYの順に固定した場合の命令発行回路について説明する。
命令順を上記のように固定した場合、以下のことが言える。
Next, an instruction issue circuit when the order of instructions at the time of issuing instructions is fixed in the order of MX → MY → AX → AY → DX → DY → SX → SY will be described.
When the order of instructions is fixed as described above, the following can be said.
(1)MX演算ユニットに属する命令は命令1スロットに存在するか、実行される命令がなく命令レジスタに存在しないかのどちらかである。
(1) An instruction belonging to the MX operation unit exists in the
(2)MY演算ユニットに属する命令はMX演算ユニットに属する命令が実行されることが前提となるので命令1スロットに存在することはない。したがって、命令2スロットに存在するか、実行される命令がなく命令レジスタに存在しないかのどちらかである。
(2) Since an instruction belonging to the MY arithmetic unit is premised on an instruction belonging to the MX arithmetic unit being executed, it does not exist in the
(3)AX演算ユニットに属する命令が存在する命令スロットはMX演算ユニット、MY演算ユニットに属する命令の有無に依存する。MX/MYとも存在せず命令1スロットに存在するか、MXのみ存在して命令2スロットに存在するか、MX/MYとも存在して命令3スロットに存在するか、実行される命令がなく命令レジスタに存在しないかのいずれかである。
(3) The instruction slot in which an instruction belonging to the AX arithmetic unit exists depends on the presence / absence of an instruction belonging to the MX arithmetic unit and the MY arithmetic unit. MX / MY does not exist and exists in the
(4)AY演算ユニットに属する命令が存在する命令スロットはMX演算ユニット、MY演算ユニットに属する命令の有無に依存し、かつAX演算ユニットに属する命令が実行されることが前提で決定される。MX/MYとも存在せずAXが命令1スロット、AYが命令2スロットに存在するか、MXのみ存在してAXが命令2スロット、AYが命令3スロットに存在するか、MX/MYとも存在してAXが命令3スロット、AYが命令4スロットに存在するか、実行される命令がなく命令レジスタに存在しないかのいずれかである。
(4) The instruction slot in which an instruction belonging to the AY arithmetic unit exists depends on the presence or absence of an instruction belonging to the MX arithmetic unit and the MY arithmetic unit, and is determined on the assumption that the instruction belonging to the AX arithmetic unit is executed. MX / MY does not exist, AX exists in the
同様にしてDX、DY、SX、SY演算ユニットに属する命令が存在する命令スロットは以下の通りになる。 Similarly, the instruction slots in which instructions belonging to the DX, DY, SX, and SY operation units exist are as follows.
(5)DX演算ユニットに属する命令は命令1スロット〜命令5スロットのいずれかに存在するか、実行される命令が無く命令レジスタに存在しないかのどちらかである。
(5) The instruction belonging to the DX arithmetic unit exists either in the
(6)DY演算ユニットに属する命令は命令2スロット〜命令6スロットのいずれかに存在するか、実行される命令が無く命令レジスタに存在しないかのどちらかである。
(6) The instruction belonging to the DY operation unit exists in any of the
(7)SX演算ユニットに属する命令は命令1スロット〜命令7スロットのいずれかに存在するか、実行される命令が無く命令レジスタに存在しないかのどちらかである。
(7) The instruction belonging to the SX arithmetic unit is either in the
(8)SY演算ユニットに属する命令は命令2スロット〜命令8スロットのいずれかに存在するか、実行される命令が無く命令レジスタに存在しないかのどちらかである。
(8) The instruction belonging to the SY arithmetic unit is either in the
そのため、命令発行回路は以下の構成となる。
(ア)MX/MYに関してはそれぞれ命令1スロット、命令2スロットを直結。
(イ)AX/AYに関してはそれぞれ命令1スロット〜命令3スロット、命令2スロット〜命令4スロットの3つの命令スロットから選択。
(ウ)DX/DYに関してはそれぞれ命令1スロット〜命令5スロット、命令2スロット〜命令6スロットの5つの命令スロットから選択。
(エ)SX/SYに関してはそれぞれ命令1スロット〜命令7スロット、命令3スロット〜命令8スロットの7つの命令スロットから選択。
言い換えると、3to1の選択回路が2個、5to1の選択回路が2個、7to1の選択回路が2個必要ということになる。
Therefore, the instruction issue circuit has the following configuration.
(A) For MX / MY, the
(A) For AX / AY, select from three instruction slots of
(C) For DX / DY, select from five instruction slots of
(D) For SX / SY, select from 7 instruction slots from
In other words, two 3to1 selection circuits, two 5to1 selection circuits, and two 7to1 selection circuits are required.
面積比較のため、各選択回路を2to1の選択回路で構成したとすると、8to1選択回路は2to1選択回路7個、7to1選択回路は2to1選択回路6個、5to1選択回路は2to1選択回路4個、3to1選択回路は2to1選択回路2個に置き換えられるので、命令順が自由の場合の命令発行回路部分は7×4+6×4=52で2to1選択回路52個相当、命令順が固定の場合の命令発行回路部分は6×2+4×2+2×2=24で2to1選択回路24個相当となり、面積が大幅に削減できることがわかる。 If each selection circuit is configured with a 2to1 selection circuit for area comparison, the 8to1 selection circuit has seven 2to1 selection circuits, the 7to1 selection circuit has six 2to1 selection circuits, the 5to1 selection circuit has four 2to1 selection circuits, and 3to1. Since the selection circuit is replaced with two 2to1 selection circuits, the instruction issuing circuit portion when the instruction order is free is 7 × 4 + 6 × 4 = 52, which corresponds to 52 2to1 selection circuits, and the instruction issuing circuit when the instruction order is fixed The portion is 6 × 2 + 4 × 2 + 2 × 2 = 24, which corresponds to 24 2to1 selection circuits, and it can be seen that the area can be greatly reduced.
周波数に関しては8to1選択回路と7to1選択回路の論理段数は3段で変わりないので最大遅延パスの論理段数は変わらないが、遅延の大きなパスと小さなパスが明確になる事で論理合成時の最適化が進みやすくなる事や、面積が小さくなる事で配線長の削減、迂回配線の削減等の効果により動作周波数が向上する。 Regarding the frequency, the number of logic stages of the 8to1 selection circuit and the 7to1 selection circuit does not change with 3 stages, so the number of logic stages of the maximum delay path does not change, but optimization at the time of logic synthesis by clarifying a path with a large delay and a small path The operation frequency is improved by the effect of reducing the wiring length, reducing the number of detour wirings, and the like.
このような命令処理方法について更に詳細に説明する。図3は、特許文献2に記載のVLIWプロセッサを示す図である。図3に示すように、VLIWプロセッサは、メモリ220から命令を読み出す命令読出部221と、4つの命令スロット0〜3を有する命令レジスタ222と、命令レジスタ222からの命令を振り分ける命令発行部223と、命令を実行する命令実行部224とを有する。命令実行部224の各演算ユニットは、レジスタPC、GR、FRを参照しつつ命令レジスタ222からの命令を実行する。ここで、命令実行部224は、整数ユニットであるIU0とIU1、浮動小数点数ユニットであるFU0とFU1、分岐ユニットであるBU0とBU1を備える。また、プロセッサは汎用レジスタGR、浮動小数点レジスタFR、プログラムカウンタPCを有する。
Such an instruction processing method will be described in more detail. FIG. 3 is a diagram showing the VLIW processor described in
ここで、VLIW命令内の基本命令の並びとして、図4に示す22通りのVLIW命令を実行可能であるとする。図4において、記号の意味は次の通りである。I0は、IU0にて実行される基本命令が配置されることを意味する。I1は、IU1にて実行される基本命令が配置されることを意味する。F0は、FU0にて実行される基本命令が配置されることを意味する。F1は、FU1にて実行される基本命令が配置されることを意味する。B0は、BU0にて実行される基本命令が配置されることを意味する。B1は、BU1にて実行される基本命令が配置されることを意味する。空欄は、基本命令を配置しないことを意味する。 Here, it is assumed that the 22 VLIW instructions shown in FIG. 4 can be executed as a sequence of basic instructions in the VLIW instruction. In FIG. 4, the meanings of the symbols are as follows. I0 means that a basic instruction executed in IU0 is arranged. I1 means that a basic instruction executed by IU1 is arranged. F0 means that a basic instruction executed in FU0 is arranged. F1 means that a basic instruction executed in FU1 is arranged. B0 means that a basic instruction executed in BU0 is arranged. B1 means that a basic instruction executed in BU1 is arranged. A blank means that a basic instruction is not arranged.
命令発行部は、命令レジスタから読み込んだ命令を対応する機能ユニットであるIU、FU、BUへ供給する。最大4命令を同時実行可能で、6つの機能ユニットうち最大4つの機能ユニットに命令を供給する。 The instruction issuing unit supplies the instruction read from the instruction register to the corresponding functional units IU, FU, and BU. Up to 4 instructions can be executed simultaneously, and instructions are supplied to up to 4 functional units out of 6 functional units.
命令スロット0に保持されている基本命令はIU0、FU0、BU0へ供給可能である。命令スロット1に保持されている基本命令はFU0、IU1、FU1、BU0、BU1へ供給可能である。命令スロット2に保持されている基本命令はIU1、FU1、BU0、BU1へ供給可能である。命令スロット3に保持されている基本命令はFU1、BU0、BU1へ供給可能である。また、このプロセッサで許されているVLIW命令内の基本命令の並びは、図4の通りとする。
Basic instructions held in the instruction slot 0 can be supplied to the IU0, FU0, and BU0. The basic instruction held in the
このようにして命令の順序が確定している場合は、命令発行部223は、各命令を全機能ユニットに供給可能とする必要はなく、所定の機能ユニットに格納可能なように構成することができる。 When the order of the instructions is determined in this way, the instruction issuing unit 223 does not need to be able to supply each instruction to all the functional units but can be configured to be stored in a predetermined functional unit. it can.
しかしながら、特許文献2に記載の技術は新規プロセッサの場合には問題がないが、過去のプロセッサの延長、すなわち互換性が必要なプロセッサの場合には過去のソフトウェア資産の流用の点で問題がある。具体例を以下に示す。
However, the technique described in
特許文献2に記載の方法は、近年の性能向上のために命令並列度が高くなった際の問題解決のための手法である。言い換えればそれ以前のプロセッサでは要求性能、チップ面積の関係でそれほど命令並列度は高くなく、要求される技術ではなかったと言える。例えば前世代プロセッサでは命令並列度が4並列であったとする。4並列程度では命令発行回路の規模、周波数の関係で命令順が自由のケースも十分考えられる。その場合、命令レジスタ内にAX→MX→DXの順で命令が並んでいることも在りうる。この様な場合、MXは命令1スロットからしか読み出すことが出来ないので命令2スロットに存在するMX命令が読み出せず、実行出来ないという問題が発生する。
The method described in
自社開発のソフトウェアの場合は最悪、コンパイル又はアセンブルし直す事で命令順を並べなおすことが可能であるが、IPベンダーから購入したようなソフトウェアの場合、通常ソースコードは知的財産であり入手できないため、命令順を並べなおす難易度が非常に高くなる。現在、ビデオ、画像等マルチメディア処理に特化したIPベンダーによるソフトウェアの流通が活発な状況であり、従来技術では流用できないソフトウェアが大量に発生する可能性がある。 In the case of software developed in-house, it is possible to rearrange the order of instructions by compiling or reassembling. However, in the case of software purchased from an IP vendor, the source code is usually intellectual property and cannot be obtained. For this reason, the difficulty of rearranging the order of instructions becomes very high. At present, software distribution by IP vendors specializing in multimedia processing such as video and images is active, and there is a possibility that a large amount of software that cannot be diverted by conventional technology may occur.
本発明に係るプロセッサは、第1命令乃至第n命令(nは自然数)と、第(n+1)命令乃至第m命令(m>nで2以上の自然数)のうち最大でm個の命令を並列実行するプロセッサであって、前記第1乃至第m命令のいずれかが入力され実行する第1乃至第m演算ユニットと、前記第1乃至第m演算ユニットにそれぞれ対応して設けられ、前記第1乃至第m命令のいずれかの命令を選択して当該第1乃至第m演算ユニットに入力する第1乃至第m選択器とを有し、前記第1乃至第n命令は、前記第1乃至m選択器のそれぞれに入力され、前記第(n+1)乃至第m命令は、それぞれ第(n+1)乃至第m以降の選択器に入力される、ものである。 The processor according to the present invention parallels a maximum of m instructions from the first instruction to the nth instruction (n is a natural number) and the (n + 1) th instruction to the mth instruction (m> n is a natural number of 2 or more). A processor to be executed, which is provided corresponding to each of the first to m-th arithmetic units to which any one of the first to m-th instructions is input and executed; A first to m-th selector for selecting any of the first to m-th instructions and inputting the selected instruction to the first to m-th arithmetic units, wherein the first to n-th instructions are the first to m-th instructions. The (n + 1) th to mth instructions are input to each of the selectors, and are input to the (n + 1) th to mth and subsequent selectors, respectively.
本発明に係るプロセッサの制御方法は、第1命令乃至第n命令(nは自然数)と、第(n+1)命令乃至第m命令(m>nで2以上の自然数)とのうち最大でm個の命令を第1乃至第m演算ユニットにより並列実行するプロセッサの制御方法であって、前記第1乃至第n命令が、前記第1乃至第m演算ユニットのいずれか1つに入力され、前記(n+1)乃至第m命令は、前記(n+1)乃至第m以降の演算ユニットに入力される The control method of the processor according to the present invention is a maximum of m instructions from the first instruction to the nth instruction (n is a natural number) and the (n + 1) th instruction to the mth instruction (m> n is a natural number of 2 or more). Are controlled in parallel by the first to m-th arithmetic units, and the first to n-th instructions are input to any one of the first to m-th arithmetic units. The (n + 1) th to mth instructions are input to the (n + 1) th to mth arithmetic units.
本発明においては、第1乃至第n命令は、第1乃至m選択器のそれぞれに入力されるので、第1乃至第m演算ユニットのいずれにおいても演算することができる。一方、n以上の命令がある場合は、各命令は順序どおり入力されるので、第(n+1)乃至第m命令がそれぞれ第(n+1)乃至第m以降の選択器に入力されることにより、第(n+1)乃至第m演算ユニットで演算が可能となる。 In the present invention, since the first to n-th instructions are input to the first to m-th selectors, they can be operated in any of the first to m-th arithmetic units. On the other hand, when there are n or more instructions, the instructions are input in order, so that the (n + 1) th to mth instructions are input to the (n + 1) th to mth selectors, respectively. Operations can be performed by (n + 1) to the m-th operation unit.
本発明によれば、面積削減と動作周波数削減を図ることができるプロセッサ及びその制御方法を提供することができる。 According to the present invention, it is possible to provide a processor capable of reducing the area and operating frequency and a control method thereof.
以下、本発明を適用した具体的な実施の形態について、図面を参照しながら詳細に説明する。この実施の形態は、本発明を、並列命令を実施するプロセッサに適用したものである。
本発明の実施の形態1.
Hereinafter, specific embodiments to which the present invention is applied will be described in detail with reference to the drawings. In this embodiment, the present invention is applied to a processor that executes parallel instructions.
図1は、本発明の実施1の形態にかかるプロセサ100を示す図である。プロセッサ100は、命令読出部11、命令レジスタ12、命令発行部13、8つの演算ユニットからなる演算実行部14及びメモリ15を有する。なお、メモリ15は、プロセッサの外部にあってもよい。
FIG. 1 is a diagram showing a processor 100 according to the first embodiment of the present invention. The processor 100 includes an
命令読出部11は、メモリ15から複数のメモリを読み出し、命令レジスタ12に供給する。本例の場合、メモリ15から読み出した命令のうち最大8つの命令を同時に命令レジスタ12に供給する。
The
命令レジスタ12は、命令1〜命令8の8つの命令を並列に実行するため、8つの命令を保持可能に構成されている。
The
命令発行部13は、選択回路131乃至138を有し、命令レジスタ12からの命令を、各演算ユニットに振り分ける。
The
演算ユニットは、MX演算ユニット141、MY演算ユニット142、AX演算ユニット143、AY演算ユニット144、DX演算ユニット145、DY演算ユニット146、SX演算ユニット147及びSY演算ユニット148の8つの演算ユニットからなる。
The arithmetic unit is composed of eight arithmetic units: MX
ここで、当該プロセッサは、第1命令乃至第n命令(nは自然数)と、第(n+1)命令乃至第m命令(m>nで2以上の自然数)のうち最大でm個の命令をを並列実行するプロセッサとすると、演算ユニットは、第1乃至第m命令のいずれかが入力され実行する演算ユニットである。本例では、m=8つの演算ユニットの例を示している。ここで、MX演算ユニット141及びMY演算ユニット142は、同一の演算ユニットを示し、例えば乗算器である。AX演算ユニット143及びAY演算ユニット144は、同一の演算ユニットを示し、例えは算術論理回路である。DX演算ユニット145及びDY演算ユニット146は、同一の演算ユニットを示し、例えばデータ・ロードストアである。SX演算ユニット147及びSY演算ユニット148は同じ演算ユニットを示し、例えばシステム命令である。
Here, the processor receives at most m instructions from the first instruction to the nth instruction (n is a natural number) and the (n + 1) th instruction to the mth instruction (m> n is a natural number of 2 or more). If the processors are executed in parallel, the arithmetic unit is an arithmetic unit that receives and executes any of the first to m-th instructions. In this example, an example of m = 8 arithmetic units is shown. Here, the MX
なお、以下の説明では、n=4として説明する。すなわち、第1乃至第4命令は、順位が定められておらず、いずれの命令がいずれの演算ユニットに入力されるか不明である。第5乃至第8命令は、この順序で命令が演算ユニットに入力されるものとする。 In the following description, it is assumed that n = 4. That is, the order of the first to fourth instructions is not determined, and it is unknown which instruction is input to which arithmetic unit. In the fifth to eighth instructions, the instructions are input to the arithmetic unit in this order.
この場合、8つの選択器は、第1乃至第8演算ユニットにそれぞれ対応して設けられ、第1乃至第8命令のいずれかの命令を選択して第1乃至第8演算ユニットに入力するものである。そして、第1乃至第4命令は、第1乃至8選択器のそれぞれに入力され、第5乃至第8命令は、それぞれ第5乃至第8以降の選択器に入力される。 In this case, the eight selectors are provided corresponding to the first to eighth arithmetic units, respectively, and select one of the first to eighth instructions and input it to the first to eighth arithmetic units. It is. The first to fourth instructions are input to the first to eighth selectors, and the fifth to eighth instructions are input to the fifth to eighth selectors, respectively.
ここで、命令2〜4は、全選択回路と接続されるが、命令1は、選択回路1、3、5、7のみに接続される。これは、命令1は、MX演算ユニット141、AX演算ユニット143、DX演算ユニット145、SX演算ユニット147のみに入力されるためであり、MY演算ユニット142、AY演算ユニット144、DY演算ユニット146及びSY演算ユニット148は、命令1スロットが存在すると初めて命令を入力される可能性があるためである。
Here, the
本実施の形態においては、前世代プロセッサでの命令並列度に対応する命令スロットまでは命令順が自由のケースでも命令発行ができるよう、命令1〜命令n(nは前世代プロセッサの最大命令並列度、本実施の形態においては、n=4)に関しては全ての演算ユニットの選択回路に接続し、命令n以降の命令に関しては従来技術と同様に各演算ユニットと命令順規則によってその命令が存在しうる命令だけを選択回路に接続する。ただし、MY/AY/DY/SY演算ユニットに対応する選択回路はMX/AX/DX/SX演算ユニットでの命令の実行が前提となるため、命令1スロットには接続しない。図1に示す図は、命令並列度8、前世代プロセッサの命令並列度4の場合の構成を示している。
In this embodiment,
ここで、前世代プロセッサでの最大命令並列度n=4であるので、順不同な命令が入力される場合、最大でも命令1〜4までしか使用されず、並列命令数は4以下となる。一方、命令数が5以上となる場合は、命令1〜8は、MX→MY→AX→AY→DX→DY→MX→MYの順となる。
Here, since the maximum instruction parallelism n = 4 in the previous generation processor, when instructions out of order are input, only the
例えば、この図1に示す例では、DX→MX→AX→SXの順で命令が並んでいる場合でも命令1スロットに存在するDX命令を選択回路5を経由してDX演算ユニットに発行できる。また、命令2スロットに存在するMX命令を選択回路1を経由してMX演算ユニットに発行できる。さらに、命令3スロットに存在するAX命令を選択回路3を経由してAX演算ユニットに発行できる。さらにまた、命令4スロットに存在するSX命令を選択回路7を経由してSX演算ユニットに発行できる。
For example, in the example shown in FIG. 1, even when instructions are arranged in the order of DX → MX → AX → SX, the DX instruction existing in the
本実施の形態においては、命令2スロット〜命令4スロットはすべての演算ユニットに、命令1スロットはMX/AX/DX/SX演算ユニットに選択回路1〜選択回路8を介して接続されているため、前世代プロセッサの最大並列度に対応する命令1スロット〜命令4スロットにどのような順番で命令が存在しても正しく命令を発行することができる。一方、命令5スロット〜命令8スロットに関しては前世代プロセッサでは使われることがないスロットであり、新プロセッサのみが使用するため、命令数が5以上の場合は、命令順を固定することで面積削減、動作周波数向上を図ることができる。
In this embodiment, the
すなわち、命令5〜8スロットは、DX演算ユニット145、DY演算ユニット146、SX演算ユニット147、SY演算ユニット148に順に入力されるため、命令5スロットは、選択回路5以降の選択回路5〜8、命令6スロットは、選択回路6以降の選択回路6〜8、命令7スロットは、選択回路7以降の選択回路7〜8、命令8スロットは、選択回路8にのみ接続されていればよい。
That is, since the
本実施の形態においては、従来例同様に2to1選択回路ベースで面積を算出すると、6×2+4×2+3×2+2×2=30で2to1選択回路30個相当となる。従来例の2to1選択回路24個相当よりは面積は大きくなるが、性能向上のため、命令並列度を拡張した場合でも、前世代プロセッサとのバイナリーレベルでの互換性を維持しつつ面積削減と動作周波数削減を図ることができる。 In the present embodiment, when the area is calculated on the basis of the 2to1 selection circuit as in the conventional example, 6 × 2 + 4 × 2 + 3 × 2 + 2 × 2 = 30, which corresponds to 30 2to1 selection circuits. Although the area is larger than the equivalent of 24 conventional 2to1 selection circuits, even if the instruction parallelism is expanded to improve performance, area reduction and operation are maintained while maintaining binary compatibility with previous generation processors. Frequency reduction can be achieved.
また、遅延の大きなパスと小さなパスが明確になる事で論理合成時の最適化が進みやすくなる事や、面積が小さくなる事で配線長の削減、迂回配線の削減等の効果により動作周波数が向上する。
本発明の実施の形態2.
In addition, by clarifying paths with large delays and paths with small delays, the optimization of logic synthesis is easy to proceed, and by reducing the area, the operating frequency is reduced due to effects such as reduced wiring length and reduced bypass wiring. improves.
次に、本発明の実施の形態2について説明する。本実施の形態においては、命令発行部16及び演算実行部17の構成が実施の形態1と異なる。すなわち、演算ユニットを3種類とし、MX、MY、MZは同一の演算ユニット、AXは、1つの演算ユニットのみ、DX、DY、DZ1、DZ2は、同一の演算ユニットとする。この場合の命令発行部16の接続は図2のようになる。図2は、本実施の形態にかかるプロセッサを示す図である。
Next, a second embodiment of the present invention will be described. In the present embodiment, the configuration of the
実施の形態1と同様、演算ユニットの個数m=8、前世代プロセッサの最大命令並列度n=4とする。この場合、命令2〜4スロットは、全ての選択回路1〜8に接続される。一方、命令1スロットは、MX演算ユニット171、AY演算ユニット174、DX演算ユニット175と接続される。上述したように、MY演算ユニット172やDY演算ユニット176は、MX演算ユニット171やDX演算ユニット175の命令が存在する場合に命令が存在するため、命令1スロットは、選択回路2、3、6〜8に入力する必要がない。
As in the first embodiment, the number m of arithmetic units is 8, and the maximum instruction parallelism n of the previous generation processor is 4. In this case, the instruction 2-4 slots are connected to all the selection circuits 1-8. On the other hand, the
本実施の形態においても、例えば、DX→MX→MY→AXのような命令が発行されたとしても、命令1スロットに存在するDX命令は、選択回路5を経由してDX演算ユニット175に発行される。また、命令2スロットに存在するMX命令は、選択回路1を経由してMX演算ユニット171に発行される。更に、命令3スロットに存在するMY命令は、選択回路2を経由してMY演算ユニット172に発行され、命令4スロットに存在するAX命令は、選択回路4を経由してAY演算ユニット174に発行される。
Also in this embodiment, for example, even if an instruction such as DX → MX → MY → AX is issued, the DX instruction existing in the
また、命令数が5つ以上の場合は、命令は、MX→MY→MZ→AX→DX→DY→DZ1→DZ2の順に入力されるため、命令5スロットは、選択回路5以降の選択回路5〜8、命令6スロットは、選択回路6以降の選択回路6〜8、命令7スロットは、選択回路7以降の選択回路7〜8、命令8スロットは、選択回路8にのみ接続されていればよい。
When the number of instructions is five or more, the instructions are input in the order of MX → MY → MZ → AX → DX → DY → DZ1 → DZ2, and therefore the
本実施の形態においても、実施の形態と同様の効果を奏する。従来例同様に2to1選択回路ベースで面積を算出すると、5×2+4×2+3×2+2×2=20で2to1選択回路28個相当となる。性能向上のため、命令並列度を拡張した場合でも、前世代プロセッサとのバイナリーレベルでの互換性を維持しつつ面積削減と動作周波数削減を図ることができる。 Also in this embodiment, the same effects as in the embodiment can be obtained. When the area is calculated on the basis of the 2to1 selection circuit as in the conventional example, 5 × 2 + 4 × 2 + 3 × 2 + 2 × 2 = 20 corresponds to 28 2to1 selection circuits. Even when the instruction parallelism is expanded to improve performance, it is possible to reduce the area and operating frequency while maintaining binary compatibility with the previous generation processor.
なお、本発明は上述した実施の形態のみに限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能であることは勿論である。 It should be noted that the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the scope of the present invention.
11 命令読出部
12 命令レジスタ
13、16 命令発行部
14、17 演算実行部
15 メモリ
141 MX演算ユニット
142 MY演算ユニット
143 AX演算ユニット
144 AY演算ユニット
145 DX演算ユニット
146 DY演算ユニット
147 SX演算ユニット
148 SY演算ユニット
171 MX演算ユニット
172 MY演算ユニット
173 MZ演算ユニット
174 AX演算ユニット
175 DX演算ユニット
176 DY演算ユニット
177 DZ1演算ユニット
178 DZ2演算ユニット
220 メモリ
221 命令読出部
222 命令レジスタ
223 命令発行部
224 命令実行部
PC レジスタ
GR レジスタ
FR レジスタ
DESCRIPTION OF
Claims (9)
前記第1乃至第m命令のいずれかが入力され実行する第1乃至第m演算ユニットと、
前記第1乃至第m演算ユニットにそれぞれ対応して設けられ、前記第1乃至第m命令のいずれかの命令を選択して当該第1乃至第m演算ユニットに入力する第1乃至第m選択器とを有し、
前記第1乃至第n命令は、前記第1乃至m選択器のそれぞれに入力され、
前記第(n+1)乃至第m命令は、それぞれ第(n+1)乃至第m以降の選択器に入力される、プロセッサ。 A processor that executes at most m instructions in parallel among a first instruction to an nth instruction (n is a natural number) and an (n + 1) th instruction to an mth instruction (m> n is a natural number of 2 or more),
First to m-th arithmetic units that receive and execute any of the first to m-th instructions;
First to m-th selectors provided corresponding to the first to m-th arithmetic units, respectively, for selecting any one of the first to m-th instructions and inputting the selected instruction to the first to m-th arithmetic units. And
The first to nth instructions are input to each of the first to m selectors,
The (n + 1) th to mth instructions are input to the (n + 1) th to mth and subsequent selectors, respectively.
前記第1乃至第n命令が、前記第1乃至第m演算ユニットのいずれか1つに入力され、
前記(n+1)乃至第m命令は、前記(n+1)乃至第m以降の演算ユニットに入力される、プロセッサの制御方法。 The first to m-th arithmetic units receive a maximum of m instructions from the first instruction to the n-th instruction (n is a natural number) and the (n + 1) -th instruction to the m-th instruction (m> n is a natural number of 2 or more). A method for controlling a processor that executes in parallel,
The first to n-th instructions are input to any one of the first to m-th arithmetic units;
The processor control method, wherein the (n + 1) through m-th instructions are input to the (n + 1) through m-th and subsequent arithmetic units.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010064725A JP2011198100A (en) | 2010-03-19 | 2010-03-19 | Processor and control method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010064725A JP2011198100A (en) | 2010-03-19 | 2010-03-19 | Processor and control method thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2011198100A true JP2011198100A (en) | 2011-10-06 |
Family
ID=44876200
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010064725A Pending JP2011198100A (en) | 2010-03-19 | 2010-03-19 | Processor and control method thereof |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2011198100A (en) |
-
2010
- 2010-03-19 JP JP2010064725A patent/JP2011198100A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7028170B2 (en) | Processing architecture having a compare capability | |
US9760373B2 (en) | Functional unit having tree structure to support vector sorting algorithm and other algorithms | |
JP4489102B2 (en) | Profiler for optimization of processor structure and applications | |
KR100464406B1 (en) | Apparatus and method for dispatching very long instruction word with variable length | |
US9250899B2 (en) | Method and apparatus for spatial register partitioning with a multi-bit cell register file | |
JP2002333978A (en) | Vliw type processor | |
CN101097512B (en) | Method, device and system for performing mixed washing and other operation | |
US20160162291A1 (en) | Parallel arithmetic device, data processing system with parallel arithmetic device, and data processing program | |
EP2758866B1 (en) | A processing device and a swizzle pattern generator | |
US20140317388A1 (en) | Apparatus and method for supporting multi-modes of processor | |
JP6502616B2 (en) | Processor for batch thread processing, code generator and batch thread processing method | |
US5890009A (en) | VLIW architecture and method for expanding a parcel | |
CN112074810B (en) | Parallel processing apparatus | |
US8601236B2 (en) | Configurable vector length computer processor | |
US20160274916A1 (en) | Processor, program code translator and software | |
CN112379928B (en) | Instruction scheduling method and processor comprising instruction scheduling unit | |
KR100960148B1 (en) | Data processing circuit | |
JP2011198100A (en) | Processor and control method thereof | |
JP4444305B2 (en) | Semiconductor device | |
US20230071941A1 (en) | Parallel processing device | |
KR101118593B1 (en) | Apparatus and method for processing VLIW instruction | |
US20080162870A1 (en) | Virtual Cluster Architecture And Method | |
JP4703735B2 (en) | Compiler, code generation method, code generation program | |
JP2011128672A (en) | Super-scalar processor and instruction processing method thereof | |
JP2006139644A (en) | Processor |