JPH0333932A - Condition branch accelerating system - Google Patents

Condition branch accelerating system

Info

Publication number
JPH0333932A
JPH0333932A JP16947589A JP16947589A JPH0333932A JP H0333932 A JPH0333932 A JP H0333932A JP 16947589 A JP16947589 A JP 16947589A JP 16947589 A JP16947589 A JP 16947589A JP H0333932 A JPH0333932 A JP H0333932A
Authority
JP
Japan
Prior art keywords
instruction
branch
taken
executed
bank
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
JP16947589A
Other languages
Japanese (ja)
Inventor
Yoichi Yano
矢野 陽一
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP16947589A priority Critical patent/JPH0333932A/en
Publication of JPH0333932A publication Critical patent/JPH0333932A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Abstract

PURPOSE:To reduce pipeline delay due to a conditional branch instruction and to accelerate the execution of the conditional branch instruction by providing two pairs of memory banks, etc., and preparing two systems of ports for instruction fetch between a CPU and a memory. CONSTITUTION:The CPU 100 having two memory banks 111 and 112 at a (+) side and a (-) side and instruction fetch units 103 and 106 for memory bank at the (+) side ant the (-) side is provided, and two systems of ports for instruction fetch are prepared. When the conditional branch instruction is inputted to one side of the banks 111 and 112, such control that an instruction to be executed when branch is established is taken out from an opposite bank or the instruction to be executed when it is not established from the same bank simultaneously via two instruction take out ports is performed. At such a case, the control that either the instruction required at a time when it is cleared that establishment or non-establishment if obtained is executed, and the other is deleted is performed. In such a way, the delay of the pipeline due to the conditional branch instruction is reduced, and the execution of the conditional branch instruction is accelerated.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は条件分岐高速化方式に関し、特に半導体集積回
路技術を応用したマイクロプロセッサの設計にかける条
件分岐命令を高速化するための条件分岐高速化方式に関
する。
[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to a method for accelerating conditional branching, and in particular to a method for accelerating conditional branching to speed up conditional branching instructions applied to the design of microprocessors that apply semiconductor integrated circuit technology. Regarding the conversion method.

〔従来の技術〕[Conventional technology]

半導体技術の進歩によ#)、高性能マイクロプロセッサ
を実現する基盤技術が揃うようになってきている。かか
る高性能マイクロプロセッサを実現するときに重要とな
る設計方法にパイプライン処理がある。
Due to advances in semiconductor technology, the fundamental technologies for realizing high-performance microprocessors are becoming available. Pipeline processing is an important design method for realizing such high-performance microprocessors.

すなわち、パイプライン処理は命令の実行を複数のステ
ージに分割し、各々のステージを別個のハードウェア・
ユニットが流れ作業的に処理することであう、高い性能
を達成する方式である。このパイプライン処理方式の一
例としては、次の構成のマイクロプロセッサが考えられ
る。
That is, pipelining divides the execution of an instruction into multiple stages, with each stage running on a separate hardware
This is a system that achieves high performance by having units perform assembly-line processing. As an example of this pipeline processing method, a microprocessor having the following configuration can be considered.

例えば、 1F :命令のメモリからの取り出し ID :命令のデコード Ai)DB :レジスタの読み出しと実効アドレス計算
ALtJ :演算、またはメモリアクセスW凡 :レジ
スタへの書き戻し、またはメモリからのデータの誉き込
み としたとき、このノ・−ドウエア構成での1命令の処理
は、 IF  ID ADL)RALU WB書き表わすこと
ができる。また、複数の引続く命令は、 命令I IF ID ADDRALU  WB命令2 
   IF  ID  AJ)DRALU  WB命令
3       IF   ID  ADD)LALU
  WB命令4           IF   ID
  ADDRALUと重ね合わせられながら、流れ作業
的に実行される。
For example, 1F: Retrieval of instruction from memory ID: Decoding of instruction Ai) DB: Reading register and calculating effective address ALtJ: Operation or memory access W: Writing back to register or reading data from memory The processing of one instruction in this hardware configuration can be expressed as IF ID ADL) RALU WB. Also, multiple consecutive instructions are: Instruction I IF ID ADDRALU WB Instruction 2
IF ID AJ) DRALU WB instruction 3 IF ID ADD) LALU
WB command 4 IF ID
It is executed in an assembly line while being overlapped with ADDRALU.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述した従来の条件分岐命令によるパイプライン処理は
、順番に命令を実行するときは、有効にパイプラインが
動作するので高い性能を達成できるが、分岐命令を実行
するときには分岐した先の命令コードをフェッチするた
めに、パイプラインがいったん停止しなければならない
ときがある。
The conventional pipeline processing using conditional branch instructions described above can achieve high performance because the pipeline operates effectively when instructions are executed in order, but when executing a branch instruction, the instruction code of the branch destination is There are times when the pipeline must be stopped to perform a fetch.

すなわち、条件分岐命令によるパイプラインの遅れが生
ずるという欠点がある。
That is, there is a drawback that a pipeline delay occurs due to the conditional branch instruction.

前記パイプライン処理の例において、分岐先のアドレス
が確定するのはADL)Rステージによるアドレス計算
の後であるから、 分岐  IF  ID ADDRALU WB次命令 
  X   X   IF  ID ADDRALU 
WBB のように、×印のステージが無駄になシ2クロックの遅
延が起こる。しかるに、条件分岐命令では、比較命令の
結果が条件コードに示され、それを参照した後、分岐す
るかどうかが決筐るため。
In the above example of pipeline processing, the branch destination address is determined after address calculation in the ADL)R stage, so Branch IF ID ADDRALU WB Next Instruction
X X IF ID ADDRALU
As in WBB, the stages marked with an x are wasted and a delay of two clocks occurs. However, in a conditional branch instruction, the result of the comparison instruction is shown in the condition code, and after referring to it, it is decided whether or not to branch.

比較 IF ID ADDRALU胡 分岐IF  ID  ΔADDRALUW13次命令 
    X3次命令   X   IFIDADDRA
LUのように、3クロツクの遅延が起こる。すなわち、
この比較命令の結果が分かるのは、ALUステージを終
了した時点であるから、分岐するかどうかのアドレス計
算を開始できるのは、その後だからである。要するに、
分岐命令において、Δ印で示される遅延が挿入される。
Comparison IF ID ADDRALU Hu branch IF ID ΔADDRALUW 13th instruction
X3rd instruction X IFIDADDRA
Like LU, there is a 3 clock delay. That is,
The result of this comparison instruction is known at the end of the ALU stage, so address calculation to determine whether to branch can be started only after that. in short,
In a branch instruction, a delay is inserted, indicated by a Δ symbol.

これをまとめると、無条件分岐命令のときは2クロツク
の遅れであシ、条件分岐命令のときは典型的なシーケン
スでみたとき、3クロツクの遅れとなる。
To summarize, an unconditional branch instruction results in a two-clock delay, while a conditional branch instruction results in a three-clock delay when viewed in a typical sequence.

なか、条件分岐命令において、比較命令との間に別の命
令を挿入できれば、このlクロックを命令実行のために
有効利用でき、分岐による遅′#、をB 2クロツクまで減すことができる。これを解消するため
に、従来は最適化コンパイラを用いて、命令コードを並
べ変え、空きスロットに命令を挿入している。しかしな
がら、統計的にも空きスロットを十分に利用できないと
いうことが一般的常識になっている。
Among them, if another instruction can be inserted between the conditional branch instruction and the comparison instruction, this 1 clock can be effectively used for instruction execution, and the delay caused by the branch can be reduced to B2 clocks. To solve this problem, conventionally, an optimizing compiler is used to rearrange instruction codes and insert instructions into empty slots. However, it is common knowledge that empty slots cannot be fully utilized statistically.

本発明の目的は、かかる条件分岐命令によるパイプライ
ンの遅れを少なくすることのできる条件分岐高速化方式
を提供することにある。
An object of the present invention is to provide a conditional branch acceleration method that can reduce pipeline delays caused by such conditional branch instructions.

〔作用〕[Effect]

本発明は条件分岐命令を高速化するための方式かかる条
件分岐命令は条件成立を判断した後に分岐した先の命令
コードの7エツチを開始するので、1クロツクの遅延を
生じている。もし1分岐の成立時と不成立時の両方のコ
ードをフェッチすることができれば、1クロツク短縮で
きる。なぜならば、分岐先アドレスはAI)DRフェー
ズで計算するので、計算開始を1クロツク前からできる
からである。
The present invention provides a method for increasing the speed of conditional branch instructions.Since such conditional branch instructions start the 7-etch of the instruction code to which the branch is made after determining that the condition is met, a delay of one clock occurs. If it is possible to fetch the code both when one branch is taken and when it is not taken, one clock can be shortened. This is because the branch destination address is calculated in the AI)DR phase, so calculation can be started one clock earlier.

比較  IF ID ADDRALU  WB分岐  
  IF  ID  ADDRALUWB次命令   
   X   X   IF  IDADDRALUW
Bすなわち、分岐成立時と不成立時の判断は、前の命令
のALUサイクルの終シにわかるので、必要な側のコー
ドを採用し不要な側のコードを捨てる。これを「ダブル
・フェッチ方式」と呼ぶ。
Comparison IF ID ADDRALU WB branch
IF ID ADDRALUWB next instruction
X X IF IDADDRALUW
B: Since the decision as to whether a branch is taken or not taken can be made at the end of the ALU cycle of the previous instruction, the necessary code is adopted and the unnecessary code is discarded. This is called the "double fetch method."

本発明はこのダブル・フェッチ方式を実現するために、
メモリとの間に命令フェッチのためのポートを二系統用
意する。一方は、分岐成立時の命令ストリームをフェッ
チするためのポートであシ、もう一方は不成立時の命令
ス) IJ−ムをフェッチするためのポートである。一
方のポートを(→側、もう一方を(−)側と呼ぶ。
In order to realize this double fetch method, the present invention
Two ports for fetching instructions are provided between the memory and the memory. One is a port for fetching an instruction stream when a branch is taken, and the other is a port for fetching an instruction stream when a branch is not taken. One port is called the (→ side) and the other port is called the (-) side.

従って、条件分岐命令は、もし条件分岐命令が(+)側
にあるときには、成立時の命令は(−)fullから、
また不成立時の命令は(+)側からそれぞれ同時にフェ
ッチする。もし、条件分岐命令が(→側にあるときには
、成立時の命令は(+)側から、iた不成立時の命令は
←)1!1からそれぞれ同時にフェッチする。
Therefore, if the conditional branch instruction is on the (+) side, the instruction at the time of establishment will change from (-)full to
Further, instructions when the instruction is not established are fetched from the (+) side at the same time. If the conditional branch instruction is on the (→ side), the instruction when the conditional branch is established is fetched from the (+) side, and the instruction when the conditional branch is not established is fetched from 1!1 at the same time.

このように、2つの命令ストリームを同時に取り出し1
分岐が成立するかどうかを判断した後に、不必要な側の
引続く7エツチを停止しその内容を捨てる。
In this way, we can take two instruction streams at the same time, one
After determining whether the branch is established, the subsequent 7 etches on the unnecessary side are stopped and its contents are discarded.

なお1通常の条件分岐命令は、成立時あるいは不成立時
とも同じバンクから命令を取り出す制御を行う。
Note that a normal conditional branch instruction performs control to take out an instruction from the same bank regardless of whether it is established or not.

また、2つのポートをメモリに接続するには。Also, to connect two ports to memory.

メモリをデュアル・ポート構成にするのが簡単である反
面、高価である。そこで、2つのメモリ・バンクを持つ
ことにし、(+)バンクと(−)バンクという名称で呼
ぶとともに1名称に対応する2系統の命令フェッチのた
めのマイクロプロセッサのポートと接続する。
Although it is easy to configure memory in a dual port configuration, it is expensive. Therefore, it is decided to have two memory banks, which are called the (+) bank and the (-) bank, and are connected to two systems of microprocessor ports for fetching instructions corresponding to one name.

〔課題を解決するための手段〕[Means to solve the problem]

本発明の条件分岐高速化方式は、メモリからの命令取り
出しのための2つのポートと、前記2つノホートに対応
した2つのメモリ・バンクトラ有し、無条件分岐命令に
は、前記メモリ・バンクの片側にこの命令があったとき
に、次に実行すべき命令を同一バンクのポートから取り
出すかあるいは次に実行すべき命令を反対バンクのポー
トから取り出すかの2種類の制御を行う命令があり、管
た条件分岐命令には、前記メモリ・バンクの片側にこの
命令があったときに、分岐成立時に実行すべき命令を反
対バンクから、あるいは分岐不成立時に実行すべき命令
を同一バンクから、それぞれ前記2つの命令取出しポー
トを介して同時に取り出すか、もしくは分岐が成立する
かどうかを判断した後に、次に実行すべき命令を口」−
バンクから取り出すかの21!Ii類の制御を行う命令
があり、前記分岐成立時に実行すべき命令を反対バンク
から、あるいは分岐不成立時に実行すべき命令を同一バ
ンクから取り出す場合には、分岐成立筐たは不成立が判
明した時点で、どちらか必要となった命令を実行し、他
方を廃棄する制御を行うように構成される。
The conditional branch acceleration method of the present invention has two ports for fetching instructions from memory and two memory bank controllers corresponding to the two nodes, and unconditional branch instructions have two ports for fetching instructions from the memory. When there is this instruction on one side, there is an instruction that performs two types of control: the next instruction to be executed is taken out from a port in the same bank, or the next instruction to be executed is taken out from a port in the opposite bank. When the conditional branch instruction is in one side of the memory bank, the instruction to be executed when the branch is taken is from the opposite bank, or the instruction to be executed when the branch is not taken is from the same bank, respectively. Either fetch the instructions simultaneously through two instruction fetch ports, or select the next instruction to be executed after determining whether a branch is taken or not.
21 to take out from the bank! If there is an instruction that performs class Ii control, and the instruction to be executed when the branch is taken is taken from the opposite bank, or the instruction to be executed when the branch is not taken from the same bank, the time when the branch is found to be taken or not taken. The configuration is such that control is executed to execute one of the commands that becomes necessary and to discard the other.

〔実施例〕〔Example〕

次に、本発明の実施例について図面を参照して説明する
Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明のダブルフェッチ方式を適用した一実施
例を説明するための中央処理装置の主要部を示すブロッ
ク図である。
FIG. 1 is a block diagram showing the main parts of a central processing unit for explaining an embodiment to which the double fetch method of the present invention is applied.

第1図に示すように、本実施例は中央処理装置100と
二組のバンク111,112とを有する。
As shown in FIG. 1, this embodiment has a central processing unit 100 and two sets of banks 111 and 112.

この中央処理装置100はパイプライン処理構造をとっ
てシシ、バス制御ユニツト101と、命令デコード・ユ
ニット102と、命令実行ユニット104と、レジスタ
ファイル105および二組の命令フェッチェニツ) 1
03,106から構成される。二組の命令フェッチェニ
ツ) 103,106は、二組のメモリ・バンクに接続
している。第一のメモリバンクは(+)側メモリバンク
111であυ、アドレスバス107とデータバス108
によシ中央処理装置100に接続している。第二のメモ
リバンクは(→側メモリバンク112であり%アドレス
バス109とデータバス110によう中央処理装置10
0に接続している。
This central processing unit 100 has a pipeline processing structure, and includes a bus control unit 101, an instruction decode unit 102, an instruction execution unit 104, a register file 105, and two sets of instruction fetch units.
Consists of 03,106. Two sets of instructions (103, 106) are connected to two sets of memory banks. The first memory bank is the (+) side memory bank 111, which includes an address bus 107 and a data bus 108.
It is connected to the central processing unit 100. The second memory bank (→ side memory bank 112) is connected to the address bus 109 and data bus 110 by the central processing unit 10.
Connected to 0.

かかる中央処理装置100の命令デコードユニッ)10
2にかける命令をデコードしたときの動作は、通常の命
令であれば同一バンクから後続の命令をフェッチし、オ
た分岐系の命令であれは第1表(無条件分岐命令のとき
)j?よび第2表(条件付分岐命令のとき)に基づいて
制御する。
Instruction decoding unit) 10 of such central processing unit 100
The operation when decoding an instruction that applies to 2 is that if it is a normal instruction, the subsequent instruction is fetched from the same bank, and if it is a branch instruction, it is shown in Table 1 (when it is an unconditional branch instruction). and Table 2 (for conditional branch instructions).

通常の命令であれば、もちろん普通の実行を行い、それ
がメモリアクセスを伴う命令であればバス制御ユニッ)
101を駆動し外部メモリにアクセスするが、この制御
に関連するユニット力よびメモリは本実施例の本質では
ないので説明を省略する。
If it is a normal instruction, it will of course be executed normally, and if it is an instruction that involves memory access, it will be executed by the bus control unit).
101 to access the external memory, but the unit power and memory related to this control are not the essence of this embodiment, so their explanation will be omitted.

次に、このような処理を行う中央処理装置1o。Next, the central processing unit 1o performs such processing.

において、パンク111,112間の命令の分配と割す
付け、すなわち(+)バンク側と(−)パンク側の間の
命令コードの割付けを行わなくてはならない。
In this step, it is necessary to distribute and allocate instructions between the punctures 111 and 112, that is, to allocate instruction codes between the (+) bank side and the (-) bank side.

最も簡単な割υ付けは(+1側と(−14JJAに同一
のコード′に複製して持つことであるが、メモリ量が膨
大になシ高価になるという欠点がある。しかし、両バン
クに同一の命令コードがあるので1条件分岐命令がどち
らのバンクにあろうとも取立時には反対側のバンクから
命令をフェッチすれは良いため性能低下は起らない。
The simplest allocation is to duplicate the same code on the (+1 side and (-14JJA), but this has the drawback that it requires a huge amount of memory and is expensive. However, the same code is on both banks. Since there is an instruction code of 1, no matter which bank the single conditional branch instruction is in, the instruction can be fetched from the opposite bank at the time of acquisition, so there is no performance deterioration.

この割り付けを説明するために必要となる基本ブロック
の概念を定義する。基本ブロックとは、1つ以上の命令
の列からなるシーフェンスであること、基本ブロック内
での命令実行は順に行われること、シよび他の基本ブロ
ックからの分岐はその先頭にのみ入シ途中には入らない
ことからなるものをいう。次に、かかる基本ブロックの
具体例を説明する。
Define the basic block concept needed to explain this allocation. A basic block is a sea fence consisting of a sequence of one or more instructions, instructions within the basic block are executed sequentially, and branches from other basic blocks are only entered at the beginning of the basic block. refers to things that are not included in Next, a specific example of such a basic block will be explained.

第2図は第1図にかいて用いられるプログラムの具体例
を示す図である。
FIG. 2 is a diagram showing a specific example of the program used in FIG. 1.

第2図に示すように、このプログラムは必ずしも前述し
たパイプライン構成のマイクロプロセッサで実行できる
ものではないが、基本的な考え方(ブロック)を示すた
めに説明するものである。
As shown in FIG. 2, this program cannot necessarily be executed by the pipeline-configured microprocessor described above, but is described here to show the basic idea (blocks).

このプログラムは12個の基本ブロック(■から@まで
の番号で示す)からなる。
This program consists of 12 basic blocks (indicated by numbers from ■ to @).

第3図は第2図に示すプログラムの基本ブロック間の制
御の流れを示すフロー図である。
FIG. 3 is a flow diagram showing the flow of control between basic blocks of the program shown in FIG. 2.

第3図に示すように、この基本ブロック間の制御の流れ
において、矢印は基本ブロックの間を直列に実行できる
場合(分岐不成立時も含む)であシ、実線は無条件分岐
で移行する場合、また点線は条件分岐の分岐時に移行す
る場合により制御移行の関連を示している。このプログ
ラムは、無条件分岐が4つ、条件分岐の分岐時は5つの
分岐パスが含まれている。
As shown in Figure 3, in the flow of control between basic blocks, arrows indicate cases where basic blocks can be executed in series (including when a branch is not taken), and solid lines indicate cases where transition is due to an unconditional branch. , and the dotted line indicates the relationship of control transition depending on the case where the transition occurs at the time of a conditional branch. This program includes four unconditional branches and five conditional branches.

第4図は第1図にかける命令コードを複製して持った場
合の割シ付は例を示すフロー図である。
FIG. 4 is a flowchart showing an example of assignment when the instruction code shown in FIG. 1 is duplicated.

第4図に示すように、かかる割す付けは12個の基本ブ
ロックを、それぞれ(+)側と(→側に重複して配置す
る。この間の制御の流れは、矢印(順序的に移行)、実
線(無条件分岐で移行)1点線(条件分岐で分岐成立時
に移行)でそれぞれ示しである。ここで1条件分岐はダ
ブル・フェッチ方式が有効に生かせるようにバンクにま
たがって制御が移行するバスになっているが、無条件分
岐は同一パンク内にのみ制御が移行するようにしである
。(+)側のバンクの■から実行を開始すると、()で
囲んである←)側の■と■および(+)側の■を制御が
通らないことがわかる。それ以外の制御は両方のバンク
の命令コードをすべて通過する複雑なものになっている
。これからも、両方のハードウェアを使い切っているこ
とがわかる。
As shown in FIG. 4, this allocation places 12 basic blocks overlappingly on the (+) side and the (→ side.The flow of control during this time is indicated by the arrows (sequential transition). , are shown by solid lines (transition at unconditional branch) and dotted lines (transition at conditional branch when the branch is established).Here, in one conditional branch, control is transferred across banks so that the double fetch method can be effectively utilized. Although it is a bus, unconditional branches are designed so that control is transferred only within the same puncture.When execution starts from ■ on the (+) side bank, the ■ on the ←) side surrounded by () It can be seen that control does not pass through ■ and ■ on the (+) side. Other controls are complex, passing through all instruction codes of both banks. From now on, I can see that I am using up both hardware.

この例では5個ある条件分岐命令をすべて高速化するこ
とができるので、無条件分岐は4個となり%筐た条件分
岐の分岐時は5個(うち高速版5個)となる。従って、
トータルでは5クロツクの高速化を達成できる。
In this example, all five conditional branch instructions can be sped up, so there are four unconditional branches and five conditional branches (including five high-speed versions). Therefore,
In total, a speed increase of 5 clocks can be achieved.

第5図は本発明の他の実施例を説明するための条件分岐
の分岐成立時を優先的に考えて配置する場合のフロー図
である。
FIG. 5 is a flowchart for illustrating another embodiment of the present invention, in which the conditional branch is arranged with priority given to when the branch is established.

第5図に示すように、本実施例はメモリ量を最小にする
ための割υ付は方法であシ、ここに示す分岐成立時優先
側シ付けは条件分岐の分岐成立時を優先的に考えて配置
する場合の例を示し、12個の基本ブロックを第1図に
示す2つのバンクにちょうど6個ずつ配置する。しかし
、この例では、分岐成立時の条件分岐命令はすべて高速
化できるが、順序実行のある基本ブロック間の遷移が別
パンクにわかれてし1ったパスが5つもある。すなわち
、無条件分岐は9個(うちバンク間遷移のためのみ5個
)となう、また条件分岐の分岐時は5個(うち高速版5
個)となり1 )−タルで5クロツクのロスとなってし
1っている。
As shown in FIG. 5, this embodiment uses a method of allocation to minimize the amount of memory, and the priority side allocation when a branch is taken as shown here gives priority to when a conditional branch is taken. An example of thoughtful placement is shown in which 12 basic blocks are placed in each of the two banks shown in FIG. 1, with exactly six blocks each. However, in this example, although all conditional branch instructions when a branch is taken can be sped up, there are five paths in which transitions between basic blocks that are executed sequentially are separated into separate punctures. In other words, there are 9 unconditional branches (of which 5 are only for transitions between banks), and 5 for conditional branches (of which 5 are high-speed branches).
1) and 1) - Tal, resulting in a loss of 5 clocks.

第6図は第5図と同様に分岐不成立時の制御の移行をス
ノ・−ズに行うように割り付けたフロー図である。
FIG. 6 is a flowchart, similar to FIG. 5, in which the control is transferred to Snow's when the branch is not taken.

第6図に示すように、ここに示す分岐不成立時優先側シ
付けは逆に分岐不成立時の制御の移行をスムーズに行う
ように割シ付ける例を示し、同じく12個の基本フロッ
クを2つのバンクにちょうど6個ずつ配置する。この第
6図でも示されているように、5個の条件分岐命令のう
ち2つのバンクを利用する高速板を、5個の命令のうち
3個に使用することができる。すなわち、無条件分岐は
4個となシ、筐た条件分岐の分岐時は5個(うち高速板
3個)となり、トータルで3クロソクの高速化を図るこ
とができる。
As shown in Fig. 6, the priority side assignment when a branch is not taken is an example of assigning the priority side when a branch is not taken to smoothly transfer the control when the branch is not taken. Place exactly 6 pieces in each bank. As shown in FIG. 6, a high-speed board that utilizes two banks among the five conditional branch instructions can be used for three of the five instructions. That is, the number of unconditional branches is four, and the number of branched conditional branches is five (including three high-speed branches), making it possible to increase the speed by three crosses in total.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明の条件分岐高速化方式は、
中央処理装置とメモリとの間の命令フェッチを2系統用
意することにより、条件分岐命令を高速化することがで
きるという効果がある。
As explained above, the conditional branch acceleration method of the present invention is
By providing two systems of instruction fetch between the central processing unit and the memory, there is an effect that conditional branch instructions can be executed at high speed.

【図面の簡単な説明】[Brief explanation of drawings]

第1図は本発明のダブルフェッチ方式を適用した一実施
例を説明するための中央処理装置の主要部を示すブロッ
ク図、第2図は第1図にかいて用いられるプログラムの
具体例を示す図、第3図は第2図に示すプログラムの基
本ブロック間の制御の流れを示すフロー図、第4図は第
1図における命令コードを複製して持った場合の割す付
は例を示すフロー図、第5図は本発明の他の実施例を説
明するための条件分岐の分岐成立時を優先的に考えて配
置する場合のフロー図、第6図は第5図と同様に分岐不
成立時の制御の移行をスムーズに行うように割り付けた
フロー図である。 100・・・中央処理装置、101・・・バス制御ユニ
ット、102・・・命令デコード・ユニット、103・
・・(+)側メモリバンク用命令フェッチユニット、1
04・・・命令実行ユニット、105・・・レジスタフ
ァイル、106・・・(−)側メモリバンク用命令フェ
ッチユニット、107・・・(+)(allメモリバン
ク用アドレスバス、108・・・I+)’JJAメモリ
バンク用テータバス、109・・・□ IIIJ メモ
リバンク用アドレスバス、110・・・(−)側メモリ
バンク用データバス、111・・・(+)側メモリバン
ク、112・・・(−)側メモリバンク。
FIG. 1 is a block diagram showing the main parts of a central processing unit for explaining an embodiment to which the double fetch method of the present invention is applied, and FIG. 2 shows a specific example of the program used in FIG. 1. Figure 3 is a flow diagram showing the flow of control between the basic blocks of the program shown in Figure 2. Figure 4 shows an example when the instruction code in Figure 1 is duplicated. Flowchart, FIG. 5 is a flowchart for arranging conditional branches with priority given to when the branch is taken to explain another embodiment of the present invention, and FIG. 6 is a flowchart when the branch is not taken as in FIG. 5. FIG. 3 is a flowchart arranged so as to smoothly transfer time control; FIG. 100...Central processing unit, 101...Bus control unit, 102...Instruction decode unit, 103...
...Instruction fetch unit for (+) side memory bank, 1
04... Instruction execution unit, 105... Register file, 106... (-) side memory bank instruction fetch unit, 107... (+) (all memory bank address bus, 108... I+ )'JJA memory bank data bus, 109...□ IIIJ memory bank address bus, 110...(-) side memory bank data bus, 111...(+) side memory bank, 112...( −) side memory bank.

Claims (1)

【特許請求の範囲】[Claims] パイプライン処理を行う中央制御装置を備えた条件分岐
高速化方式において、メモリからの命令取り出しのため
の2つのポートと、前記2つのポートに対応した2つの
メモリ・バンクとを有し、無条件分岐命令には、前記メ
モリ・バンクの片側にこの命令があったときに、次に実
行すべき命令を同一バンクのポートから取り出すかある
いは次に実行すべき命令を反対バンクのポートから取り
出すかの2種類の制御を行う命令があり、また条件分岐
命令には、前記メモリ・バンクの片側にこの命令があっ
たときに、分岐成立時に実行すべき命令を反対バンクか
ら、あるいは分岐不成立時に実行すべき命令を同一バン
クから、それぞれ前記2つの命令取出しポートを介して
同時に取り出すか、もしくは分岐が成立するかどうかを
判断した後に、次に実行すべき命令を同一バンクから取
り出すかの2種類の制御を行う命令があり、前記分岐成
立時に実行すべき命令を反対バンクから、あるいは分岐
不成立時に実行すべき命令を同一バンクから取り出す場
合には、分岐成立または不成立が判明した時点で、どち
らか必要となった命令を実行し、他方を廃棄する制御を
行うことを特徴とする条件分岐高速化方式。
In a conditional branch acceleration method equipped with a central control unit that performs pipeline processing, it has two ports for fetching instructions from memory and two memory banks corresponding to the two ports; A branch instruction includes, when this instruction is on one side of the memory bank, whether the next instruction to be executed is taken out from a port in the same bank, or whether the next instruction to be executed is taken out from a port in the opposite bank. There are two types of control instructions, and conditional branch instructions include instructions to be executed from the opposite bank when the branch is taken, or instructions to be executed when the branch is not taken, when this instruction is on one side of the memory bank. There are two types of control: to fetch the instructions to be executed from the same bank simultaneously through the two instruction fetch ports, or to fetch the next instruction to be executed from the same bank after determining whether a branch is taken. If there is an instruction that executes a branch, and if the instruction to be executed when the branch is taken is taken from the opposite bank, or the instruction to be executed when the branch is not taken is taken from the same bank, then when it becomes clear that the branch is taken or not taken, whichever is necessary is retrieved. A method for accelerating conditional branching that is characterized by controlling the execution of one instruction and discarding the other.
JP16947589A 1989-06-29 1989-06-29 Condition branch accelerating system Pending JPH0333932A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16947589A JPH0333932A (en) 1989-06-29 1989-06-29 Condition branch accelerating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16947589A JPH0333932A (en) 1989-06-29 1989-06-29 Condition branch accelerating system

Publications (1)

Publication Number Publication Date
JPH0333932A true JPH0333932A (en) 1991-02-14

Family

ID=15887244

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16947589A Pending JPH0333932A (en) 1989-06-29 1989-06-29 Condition branch accelerating system

Country Status (1)

Country Link
JP (1) JPH0333932A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0594305A (en) * 1991-02-19 1993-04-16 Matsushita Electric Ind Co Ltd Cache memory device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0594305A (en) * 1991-02-19 1993-04-16 Matsushita Electric Ind Co Ltd Cache memory device

Similar Documents

Publication Publication Date Title
JP2500036B2 (en) Hybrid pipeline connection processor and processing method thereof
US6216223B1 (en) Methods and apparatus to dynamically reconfigure the instruction pipeline of an indirect very long instruction word scalable processor
US7366881B2 (en) Method and apparatus for staggering execution of an instruction
US20030163669A1 (en) Configuration of multi-cluster processor from single wide thread to two half-width threads
EA004196B1 (en) Control program product and data processing system
JPS59173850A (en) Pipeline type processor
JPH07122853B2 (en) Computer and instruction processing method
US6233671B1 (en) Staggering execution of an instruction by dividing a full-width macro instruction into at least two partial-width micro instructions
JPH04111127A (en) Arithmetic processor
US7139899B2 (en) Selected register decode values for pipeline stage register addressing
US6023756A (en) Instruction processing method and system for variable-length instructions
JPH02130635A (en) Simultaneous processing system for plural instructions
JPH10143365A (en) Parallel processing device and its command issuing system
JPH0333932A (en) Condition branch accelerating system
US6725355B1 (en) Arithmetic processing architecture having a portion of general-purpose registers directly coupled to a plurality of memory banks
US6654870B1 (en) Methods and apparatus for establishing port priority functions in a VLIW processor
US7613905B2 (en) Partial register forwarding for CPUs with unequal delay functional units
JPH05197547A (en) Vliw type arithmetic processor
JPS5899867A (en) Parallel processing system
JPS63316133A (en) Arithmetic processor
JPS5899869A (en) Parallel processing system
JP3855069B2 (en) Logic circuit
JP2504535B2 (en) Bus unit configuration method
JPS5899846A (en) Parallel processing system
JPH0218732B2 (en)