[go: up one dir, main page]

JPH0195331A - System for processing pipe line - Google Patents

System for processing pipe line

Info

Publication number
JPH0195331A
JPH0195331A JP25238787A JP25238787A JPH0195331A JP H0195331 A JPH0195331 A JP H0195331A JP 25238787 A JP25238787 A JP 25238787A JP 25238787 A JP25238787 A JP 25238787A JP H0195331 A JPH0195331 A JP H0195331A
Authority
JP
Japan
Prior art keywords
instruction
branch
address
storage circuit
circuit
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
JP25238787A
Other languages
Japanese (ja)
Inventor
Hidenobu Ota
大田 秀信
Atsushi Sakurai
厚 桜井
Taizo Sato
泰造 佐藤
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP25238787A priority Critical patent/JPH0195331A/en
Publication of JPH0195331A publication Critical patent/JPH0195331A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】 (概 要〕 高速分岐機構を有するパイプライン処理システムに関し
、 分岐命令成功による空サイクルを少なくしてパイプライ
ン処理の高速化を図ることを目的とし、分岐命令成功時
にその分岐命令のアドレスを登録し、その分岐命令のア
ドレスと現在実行命令のアドレスとを比較する連想記憶
回路と、分岐命令成功時にその分岐命令の分岐先命令を
登録し、現在実行命令のアドレスが登録された分岐命令
のアドレスにヒツトしたときに分岐命令の分岐先命令を
送出する命令記憶回路と、分岐命令成功時にその分岐命
令の分岐先アドレス+命令記憶回路に登録された分岐先
命令のバイト数のアドレスを登録し、現在実行命令のア
ドレスがその分岐命令のアと、を具備し、現在実行命令
のアドレスが登録された分岐命令のアドレスにヒツトし
たときには命令記憶回路をパイプライン処理用の命令キ
ューステージに、アドレス記憶回路をパイプライン処理
用のブリフェッチカウンタに接続するように構成する。
[Detailed Description of the Invention] (Summary) The present invention relates to a pipeline processing system having a high-speed branch mechanism, and aims to speed up pipeline processing by reducing empty cycles due to successful branch instructions. An associative memory circuit that registers the address of a branch instruction and compares the address of the branch instruction with the address of the currently executed instruction, and registers the branch destination instruction of the branch instruction when the branch instruction is successful, and registers the address of the currently executed instruction. An instruction storage circuit that sends out the branch destination instruction of a branch instruction when the address of the branch instruction is hit, and when the branch instruction is successful, the branch destination address of the branch instruction + the number of bytes of the branch destination instruction registered in the instruction storage circuit. The address of the currently executed instruction has the address of the branch instruction, and when the address of the currently executed instruction hits the address of the registered branch instruction, the instruction storage circuit stores the instruction for pipeline processing. The queue stage is configured such that an address storage circuit is connected to a briefetch counter for pipeline processing.

〔産業上の利用分野〕[Industrial application field]

本発明は高速分岐機構を有するパイプライン処理システ
ムに関する。
The present invention relates to a pipeline processing system having a fast branching mechanism.

〔従来の技術〕[Conventional technology]

マイクロプロセッサにおいて高速性を追求していくと、
大型コンピュータで用いられているパイプライン処理が
必要となる。パイプライン処理とは一命令を複数の処理
単位に分け、見かけ上、命令が並列に実行されているよ
うな処理である。第13図に3段のパイプラインの例を
示す。すなわち、第13図においては、−命令を命令フ
ェッチIF、命令デコードID、実行EXの処理単位に
分け、見かけ上、3つの命令が並列に実行されている。
As we pursue high speed in microprocessors,
Pipeline processing, which is used in large computers, is required. Pipeline processing is processing in which one instruction is divided into multiple processing units so that the instructions appear to be executed in parallel. FIG. 13 shows an example of a three-stage pipeline. That is, in FIG. 13, the -instruction is divided into processing units of instruction fetch IF, instruction decode ID, and execution EX, and three instructions are apparently executed in parallel.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

しかしながら、上述のパイプライン処理においては、分
岐命令(ループ命令)の実行時に問題が生ずる。プログ
ラムがループを形成している場合、たとえば、 X0RA(Aをゼロにする) LD   B、lO(カウンタの初期設定)LD   
11.1   (ポインタの初期設定)LOOPI  
AOD  A、II   (A←A+H)INCH(A
←H+ 1 ) DJNZ  LOOPI  (B ” 8 1)で示さ
れる場合、DINZ LOOPIが分岐命令、ADD 
A。
However, in the pipeline processing described above, a problem occurs when executing a branch instruction (loop instruction). If the program forms a loop, for example: X0RA (sets A to zero) LD B, lO (counter initialization) LD
11.1 (Initial setting of pointer) LOOPI
AOD A, II (A←A+H) INCH(A
←H+ 1) DJNZ LOOPI (B"8 1), DINZ LOOPI is a branch instruction, ADD
A.

Hが分岐先命令である。すなわち、第14A図、第14
B図に示すように、分岐命令の実行サイクル(E X)
時には、既にフェッチされている分岐命令の次のアドレ
スの命令のデコード(ID)に入る。このとき、分岐失
敗時(ループ制御が行われないとき)には、第12A図
に示すように、通常のパイプライン処理が行われるが、
分岐成功時(ループ制御が行われるとき)には、第12
B図に示すように、改めて分岐先命令のフェッチ(IF
)を行うことによりパイプライン処理上空サイクルが発
生する。このように、ループ回数−1の数だけ改めて分
岐先命令の命令のフェッチを行う必要があるため、パイ
プライン処理上の(ループ回数−1)個の空サイクルが
発生して実行時間の遅れが大きくなるという問題点があ
った。
H is the branch destination instruction. That is, Fig. 14A, Fig. 14
As shown in Figure B, the branch instruction execution cycle (EX)
Sometimes it enters into decoding (ID) of the instruction at the next address of a branch instruction that has already been fetched. At this time, when branching fails (when loop control is not performed), normal pipeline processing is performed as shown in FIG. 12A.
When the branch is successful (when loop control is performed), the 12th
As shown in Figure B, the branch destination instruction fetch (IF
), a pipeline processing upper cycle occurs. In this way, since it is necessary to fetch the branch destination instruction a number of times equal to the number of loops minus 1, (number of loops minus 1) empty cycles occur in the pipeline process, resulting in a delay in execution time. There was a problem with the size.

従って、本発明の目的は、分岐命令成功による空サイク
ルを少なくしてパイプライン処理の高速化を図ることに
ある。
Therefore, an object of the present invention is to speed up pipeline processing by reducing empty cycles due to successful branch instructions.

〔問題点を解決するための手段〕[Means for solving problems]

上述の問題点を解決するための手段は第1A図に示され
る。すなわち、連想記憶回路1、命令記憶回路2、およ
びアドレス記憶回路3が設けられており、分岐命令成功
時すなわち分岐命令の実行時(WR=“l”)には、分
岐命令のアドレスが連想記憶回路1に、分岐先命令が命
令記憶回路2に、分岐先アドレス+命令記憶回路2に格
納された命令のバイト数のアドレスがアドレス記憶回路
3に登録される。また、連想記憶回路lは登録された分
岐命令のアドレスと現在実行命令のアドレスとを比較し
、この結果、現在実行命令のアドレスが登録された分岐
命令のアドレスにヒツト(−致)したときには、ヒツト
信号が発生される。この結果、命令記憶回路2はその分
岐命令の分岐先命令をパイプライン処理用の命令キュー
ステージ4に送出し、アドレス記憶回路3はその分岐命
令の分岐先アドレス+命令記憶回路2に格納された命令
のバイト数のアドレスをパイプライン処理用のブリフェ
ッチステージ5に送出する。つまり、このブリフェッチ
ステージ5は通常はブリフェッチアドレスに対応する命
令を出力しており、連想記憶回路1がヒツトしたときの
み対応するWAYに格納されているアドレスの命令を出
力する。なお、LRυ(Least Recently
 Used)は最後に使用した時刻で最も新しいものを
取出すように管理するシステムであって、何本かあるー
AYの中で最近使用されなかったもので一番古いものを
示すWAY発生回路である。
A means for solving the above problems is shown in FIG. 1A. That is, an associative memory circuit 1, an instruction memory circuit 2, and an address memory circuit 3 are provided, and when the branch instruction is successful, that is, when the branch instruction is executed (WR="l"), the address of the branch instruction is stored in the associative memory. In the circuit 1, the branch destination instruction is registered in the instruction storage circuit 2, and the address of the branch destination address+the number of bytes of the instruction stored in the instruction storage circuit 2 is registered in the address storage circuit 3. Further, the associative memory circuit l compares the address of the registered branch instruction and the address of the currently executed instruction, and as a result, when the address of the currently executed instruction hits (-matches) the address of the registered branch instruction, A hit signal is generated. As a result, the instruction storage circuit 2 sends the branch destination instruction of the branch instruction to the instruction queue stage 4 for pipeline processing, and the address storage circuit 3 stores the branch destination address of the branch instruction + instruction storage circuit 2. The address of the number of bytes of the instruction is sent to the brief fetch stage 5 for pipeline processing. In other words, the briftetch stage 5 normally outputs an instruction corresponding to the briftetch address, and outputs the instruction of the address stored in the corresponding WAY only when the associative memory circuit 1 is hit. In addition, LRυ (Least Recently
Used) is a management system that retrieves the newest one at the time of last use, and is a WAY generation circuit that indicates the oldest one that has not been used recently among several AYs. .

第1A図において連想記憶回路2に有効ビットが付加さ
れている場合の第1A図の動作が第1B図に示されてい
る。
The operation of FIG. 1A when a valid bit is added to the associative memory circuit 2 in FIG. 1A is shown in FIG. 1B.

〔作 用〕[For production]

第2A図、第2B図、第3A図、第3B図を参照して作
用を説明する。
The operation will be explained with reference to FIGS. 2A, 2B, 3A, and 3B.

第2A図、第2B図はミスヒツト時の場合、すなわち、
分岐命令が連想記憶回路1に登録されていない場合にあ
って且つ分岐命令がデコードされた場合を示す。この場
合には、分岐命令のデコード(ID)時には、分岐命令
のアドレス+命令記憶回路2に格納された命令のバイト
数の命令のフェッチ(ID)が行われ、分岐命令の実行
(EX)時には分岐命令のアドレス+命令記憶回路2に
格納された命令のバイト数の命令のデコード(ID)が
行われる。このとき、分岐命令の実行(EX)により分
岐命令が成功した場合(ループ制御が行われた場合)に
は、分岐先命令を実行することになるが、この場合、第
2A図に示すように、上記の分岐命令の7ドレス+命令
記憶回路2に格納された命令のバイト数の命令の実行は
中止され、改めて分岐先命令のフェッチ、デコードを行
う必要がある。従って、第2A図に示すごとく空サイク
ルが発生する。本発明においては、このようなミスヒン
ト時且つ分岐命令成功時には、分岐命令のアドレス、分
岐先命令、分岐先アドレス+命令記憶回路2に格納され
た命令のバイト数が、それぞれ、連想記憶回路1、命令
記憶回路2、アドレス記憶回路3に格納(登録)される
。他方、分岐命令の実行(EX)により分岐命令が失敗
した場合(ループ制御が行われなかった場合)、分岐命
令のアドレス+命令記憶回路2に格納された命令のバイ
ト数の命令の実行(E X)が行われ、従って、この場
合、第11図の場合と同様、通常のパイプライン処理が
行われる。
Figures 2A and 2B show the case of a mishit, that is,
A case is shown in which a branch instruction is not registered in the associative memory circuit 1 and the branch instruction has been decoded. In this case, when a branch instruction is decoded (ID), an instruction is fetched (ID) equal to the address of the branch instruction + the number of bytes of the instruction stored in the instruction storage circuit 2, and when the branch instruction is executed (EX) The address of the branch instruction+the number of bytes of the instruction stored in the instruction storage circuit 2 is decoded (ID). At this time, if the branch instruction is successful due to execution (EX) of the branch instruction (loop control is performed), the branch destination instruction will be executed, but in this case, as shown in Figure 2A, , the execution of the instructions corresponding to 7 addresses of the branch instructions + the number of bytes of the instructions stored in the instruction storage circuit 2 is stopped, and it is necessary to fetch and decode the branch destination instruction again. Therefore, an empty cycle occurs as shown in FIG. 2A. In the present invention, at the time of such a miss hint and when a branch instruction is successful, the address of the branch instruction, the branch destination instruction, the branch destination address + the number of bytes of the instruction stored in the instruction storage circuit 2 are respectively It is stored (registered) in the instruction storage circuit 2 and address storage circuit 3. On the other hand, if the branch instruction fails due to execution (EX) of the branch instruction (when loop control is not performed), the execution of the instruction (EX) equal to the address of the branch instruction + the number of bytes of the instruction stored in the instruction storage circuit 2 X) is performed, and therefore, in this case, normal pipeline processing is performed as in the case of FIG.

第3A図、第3B図はヒツト時の場合、すなわち、分岐
命令が連想記憶回路1に登録されている場合にあって且
つ分岐命令がデコードされた場合を示す。この場合には
、分岐命令のデコード(TD)時に、ヒツト信号が発生
され、この結果、分岐命令の実行(E X)時には、命
令記憶回路2から送出された分岐先命令のデコード(I
D)が行われると共に、アドレス記憶回路3から送出さ
れた分岐先アドレス+命令記憶回路2に格納された命令
のバイト数の命令のフェッチ(IF)が行われる。この
とき、分岐命令の実行(E X)により分岐命令が成功
した場合には、第3A図に示すように、分岐先命令の実
行(E X)が行われると共に、分岐先アドレス+命令
記憶回路2に格納された命令のバイト数の命令のデコー
ド(ID)が行われる。他方、分岐命令の実行(EX)
により分岐命令が失敗した場合には、分岐先命令の実行
は中止され、改めて分・岐命令のアドレス+命令記憶回
路2に格納された命令のバイト数の命令のフェッチ、デ
コードを行う必要がある。従って、第3B図に示すごと
く空サイクルが発生する。
3A and 3B show a hit case, that is, a case where a branch instruction is registered in the associative memory circuit 1 and the branch instruction is decoded. In this case, a hit signal is generated when the branch instruction is decoded (TD), and as a result, when the branch instruction is executed (EX), the branch destination instruction sent from the instruction storage circuit 2 is decoded (I
At the same time as step D) is performed, an instruction fetch (IF) of the branch destination address sent from the address storage circuit 3 + the number of bytes of the instruction stored in the instruction storage circuit 2 is performed. At this time, if the branch instruction is successful due to the execution of the branch instruction (EX), as shown in FIG. 3A, the branch destination instruction is executed (EX) and the branch destination address + instruction storage circuit is Decoding (ID) of instructions of the number of bytes of instructions stored in 2 is performed. On the other hand, execution of a branch instruction (EX)
If the branch instruction fails, the execution of the branch destination instruction is stopped, and it is necessary to fetch and decode the address of the branch/branch instruction + the number of bytes of the instruction stored in the instruction storage circuit 2 again. . Therefore, an empty cycle occurs as shown in FIG. 3B.

本発明は、1回分岐命令が分岐成功した場合には、次に
その分岐命令が出現した場合も同方向に分岐する確率が
高いことに着目したものである。
The present invention focuses on the fact that if a branch instruction succeeds once, there is a high probability that the next branch instruction will branch in the same direction.

つまり、分岐命令ループに入る前は、第2B図の状態で
パイプライン処理が行われ、最初の分岐命令の成功で第
2A図の状態でパイプライン処理が行われるが、引き続
いての分岐命令成功では第3A図の状態でパイプライン
処理が行われ、分岐命令ループを出るとき(すなわち、
分岐命令の分岐が失敗したとき)、第3B図の状態でパ
イプライン処理が行われる6従って、空サイクルが発生
する回数は2回である。
In other words, before entering the branch instruction loop, pipeline processing is performed in the state shown in Figure 2B, and if the first branch instruction is successful, pipeline processing is performed in the state shown in Figure 2A. Then, pipeline processing is performed in the state shown in Figure 3A, and when exiting the branch instruction loop (i.e.,
When a branch of a branch instruction fails), pipeline processing is performed in the state shown in FIG. 3B6.Therefore, the number of times an empty cycle occurs is two.

〔実施例〕〔Example〕

以下、第1A図の詳細について説明する。 The details of FIG. 1A will be explained below.

第4図は第1A図の連想記憶回路1の詳細な回路図であ
る。第4図において、ライトバッファWB4.WBi、
1.WB+*z、 ”’は分岐命令(7)7 )’ し
7.WDi。
FIG. 4 is a detailed circuit diagram of the associative memory circuit 1 shown in FIG. 1A. In FIG. 4, write buffer WB4. WBi,
1. WB+*z, ``'' is a branch instruction (7) 7)' and 7.WDi.

WD、、、、WD、や2.・・・をラッチするためのも
のであり、同期回路CSz、C3+、+、C3t、z、
・・・はプログラムカウンタ(PC、図示せず)からの
現在実行命令のアドレスPC4,Pct−+、PCB+
z、・・・をラッチするものであり、連想記憶要素CA
M、、 CAM、や、、CAMi。2.・・・はライト
バッファ匈B、、WB盈、1.賀Bi4□、・・・の出
力D ++ D i : D i+l+D ++I;D
i+l Di*2+ ”’と同期回路C3H,C54,
+、C54−z。
WD, , WD, and 2. ..., and the synchronous circuits CSz, C3+, +, C3t,z,
. . . is the address of the currently executed instruction from the program counter (PC, not shown) PC4, Pct-+, PCB+
It latches z,..., and the associative memory element CA
M,, CAM, ya,,CAMi. 2. . . . is the write buffer B,, WB Ying, 1. Output D ++ D i : D i + l + D ++ I; D
i+l Di*2+ "' and synchronous circuit C3H, C54,
+, C54-z.

・・・の出力C8,でi r Ci+1+τi、1; 
C4+2+で、。1・・・との比較を行うものであり、
すべてのビットが一致したときにはヒント信号HITが
発生する。
...'s output C8, i r Ci+1+τi, 1;
With C4+2+. It is used to compare with 1...
When all bits match, a hint signal HIT is generated.

第4図の書込み動作について第5図のタイミング図を参
照して説明する。ライトバッファWB、において、To
でφ1=″0″となるので、トラン ′ジスタ’r+、
’rzがオンとなり、従って、D、、D。
The write operation in FIG. 4 will be explained with reference to the timing diagram in FIG. 5. In the write buffer WB, To
Therefore, φ1=″0″, so transistor ′dister′r+,
'rz is turned on, so D,,D.

は共にハイレベルとなる。つまり、D、、D、はプリチ
ャージされる。ミスヒント時に分岐命令が成功した場合
には、図示しない制御回路によりT1にて信号−R,W
AYが“1”とされ、従って、トランジスタTs 、T
O、Ts 、Tbがオンとなり、この結果、書込みデー
タWD+(分岐命令アドレスの1ビツト)は連想記憶要
素CAM!にラッチされる。
are both at a high level. That is, D,,D, are precharged. If the branch instruction is successful at the time of a miss hint, a control circuit (not shown) outputs signals -R, W at T1.
AY is set to "1", therefore, transistors Ts and T
O, Ts, and Tb are turned on, and as a result, the write data WD+ (1 bit of the branch instruction address) is transferred to the content addressable memory element CAM! latched to.

次に、第4図のヒント判定動作について第6図を参照し
て説明する。始めに、同期回路CSiにおいては、T1
にてφO=“θ″となり、トランジスタT□、T1□が
オンとなり、従って、C,、C。
Next, the hint determination operation shown in FIG. 4 will be explained with reference to FIG. 6. First, in the synchronous circuit CSi, T1
At , φO=“θ”, transistors T□ and T1□ are turned on, and therefore C,,C.

はローレベルとなる(プリチャージに相当)。次にTo
にてφO=“l”となるとトランジスタT、、、T、6
がオンとなり、従って、プログラムカウンタPCのアド
レスビットPC正に応じてトランジスタT+ff+T1
4の一方がオン、他方がオフとされ、この結果、でi、
C4はアドレスビットPC8に応じたレベルとなる。つ
まり、論理的に、で、 =PCt。
becomes low level (equivalent to precharge). Next, To
When φO becomes “l”, the transistors T, , T, 6
is turned on, and therefore, depending on the address bit PC of the program counter PC, the transistor T+ff+T1 is turned on.
4 is turned on and the other is turned off, and as a result, i,
C4 has a level corresponding to address bit PC8. That is, logically, =PCt.

Cム=pciである。Cmu=pci.

また、連想記憶要素CAM、においては、TIにてφ0
=″O″であるのでトランジスタT1.がオンとされて
ヒツト信号線1(ITがプリチャージされ、TOにて、
でi、ciがトランジスタT *、 T +。に供給さ
れる。たとえば、PC4(=C! ) =“1”。
In addition, in the associative memory element CAM, φ0 at TI
= ``O'', so the transistor T1. is turned on and the hit signal line 1 (IT is precharged, and at TO,
where i and ci are transistors T* and T+. is supplied to For example, PC4(=C!)="1".

WDえ=“1”とすると、トランジスタT ?、 T 
+ oがオンとなり、また、トランジスタTI、TIが
オフとなり、従って、ヒツト信号線HITはディスチャ
ージされずハイレベルを保持する。また、 PC五(=
C五)=“0”、WD、=“l”とすると、トランジス
タT?、TIがオンとなり、従って、ヒツト信号線旧T
はディスチャージされてローレベルとなる。つまり、W
Di、WDiやI+S’lDi+t、・・・とPC4,
Pct++。
If WD = “1”, transistor T? , T
+o is turned on, and transistors TI and TI are turned off, so that the hit signal line HIT is not discharged and remains at a high level. Also, PC five (=
If C5) = “0” and WD = “l”, the transistor T? , TI is turned on, and therefore the hit signal line old T
is discharged and becomes low level. In other words, W
Di, WDi, I+S'lDi+t,... and PC4,
Pct++.

pc、、、、・・・とがすべて論理的に一致したときの
み、ヒツト信号線旧Tはハイレベルに保持され、ヒツト
信号となる。
Only when all of pc, .

第7図は第1図の命令記憶回路2の詳細な回路図、第8
図は第1図のアドレス記憶回路3の詳細な回路図である
。すなわち、命令記憶回路2およびアドレス記憶回路3
は同様な構成であって、ライトバッファーJJBJ、+
、WBj4g、・・・(引り、引り、、。
7 is a detailed circuit diagram of the instruction storage circuit 2 shown in FIG.
The figure is a detailed circuit diagram of the address storage circuit 3 shown in FIG. That is, the instruction storage circuit 2 and the address storage circuit 3
has a similar configuration, and write buffers JJBJ, +
, WBj4g, ... (pull, pull,...

WB、、、、・・・)およびランチ回路RAMj、RA
Mj++。
WB,...) and launch circuit RAMj, RA
Mj++.

RAMj、z、・・・(RAMt、、 R静i+*+、
 RAMk+z、・・・)よりなる。
RAMj, z, ... (RAMt,, R static i + * +,
RAMk+z,...).

また、ライトバッファWB、 (WBt、)は第4図の
ライトバッファWB、と同一構成である。また、ラッチ
回路RAJ (RAMb)の入力部も第4図の連想記憶
要素CAM、の入力部と同一構成である。従って、命令
記憶回路2およびアドレス記憶回路3の書込み動作は連
想記憶回路1の書込み動作と同一である。
Also, the write buffer WB, (WBt,) has the same configuration as the write buffer WB in FIG. 4. The input section of the latch circuit RAJ (RAMb) also has the same configuration as the input section of the content addressable memory element CAM in FIG. Therefore, the write operation of instruction memory circuit 2 and address memory circuit 3 is the same as the write operation of content addressable memory circuit 1.

第7図の回路の読出し動作について第9図のタイミング
図を用いて説明する。すなわち、連想記憶回路1の出力
であるヒツト信号HITにより読出し動作を行う、ヒン
ト信号器Tがハイレベルであれば、トランジスタTUB
がオンとなり、ラッチデータがハイレベルであればトラ
ンジスタT、もオンとなり、従って、A、はディスチャ
ージされてローレベルとなる。逆に、ラッチデータがロ
ーレベルであればトランジスタT27はオフとなり、従
って、A、はディスチャージされずハイレベルを保持す
る。つまり、ヒツト信号器Tがハイレベルのときには、
ラッチされた分岐先命令が出力される。なお、第8図に
おいても、ヒツト信号器Tがハイレベルのときには、分
岐先アドレス+命令記憶回路2に格納された命令のバイ
ト数のアドレスが出力される。
The read operation of the circuit shown in FIG. 7 will be explained using the timing diagram shown in FIG. 9. That is, if the hint signal T, which performs the read operation based on the hit signal HIT which is the output of the content addressable memory circuit 1, is at a high level, the transistor TUB
is turned on, and if the latch data is at a high level, the transistor T is also turned on, and therefore, A is discharged and becomes a low level. Conversely, if the latch data is at a low level, the transistor T27 is turned off, so that A is not discharged and remains at a high level. In other words, when the hit signal T is at high level,
The latched branch destination instruction is output. Also in FIG. 8, when the hit signal T is at a high level, the address equal to the branch destination address+the number of bytes of the instruction stored in the instruction storage circuit 2 is output.

第11図はWR信号発生回路(LRU)の詳細な回路図
であって、ノア回路1101、ラッチ回路1102、お
よびアンド回路1103が設けられている。ヒツト信号
は、WAYの本数分発生するため、全てのヒント信号の
ノア論理をとることにより全ての−AYについてミスヒ
ツトであったことがわかる。ところが、ヒツト信号はT
 OB、11間しか出力されないため、1サイクル期間
保持するためにランチ回路1102を入れである。
FIG. 11 is a detailed circuit diagram of the WR signal generating circuit (LRU), which includes a NOR circuit 1101, a latch circuit 1102, and an AND circuit 1103. Since the number of hit signals is equal to the number of WAYs, by taking the NOR logic of all the hint signals, it can be determined that all -AYs were miss-hits. However, the human signal is T
Since the signal is output only between OB and 11, a launch circuit 1102 is required to hold the signal for one cycle period.

第12図に第11図の動作を示すように、分岐命令成功
かつミスヒツトのときTlでのみヒ・ノド信号がアサー
トされる。
As shown in FIG. 12, the operation of FIG. 11 is such that the high-node signal is asserted only at Tl when the branch instruction is successful and misses.

なお、上述の連想記憶回路l、命令記憶回路2、および
アドレス記憶回路3におけるWAY数、ワード長、タイ
ミング等については種々の変更が可能である。たとえば
、連想記憶回路1を4 WAYおよび32ビツトワード
にて構成した例を第10図に示す。たとえば、PCO〜
PC□と−AYIの32個のCAMの値とがすべて一致
したときに、ヒツト信号HIT 1がハイレベルとなる
が、1つでも異なると、ヒツト信号旧T1はローレベル
となる。つまり、ワード単位(32ビツト)の比較が行
われる。
Note that various changes can be made to the number of ways, word length, timing, etc. in the content addressable memory circuit 1, instruction memory circuit 2, and address memory circuit 3 described above. For example, FIG. 10 shows an example in which the associative memory circuit 1 is configured with 4 WAYs and 32 bit words. For example, PCO~
When all 32 CAM values of PC□ and -AYI match, the hit signal HIT1 becomes high level, but if even one difference occurs, the hit signal old T1 becomes low level. That is, comparison is performed in word units (32 bits).

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

以上説明したように本発明によれば、分岐成功に伴う空
サイクルを少なくでき、特に、プログラムにおけるルー
プ回数が多い場合には空サイクルを顕著に少なくでき、
従って、パイプライン処理の高速化が図れる。
As explained above, according to the present invention, the number of empty cycles associated with a successful branch can be reduced, and especially when the number of loops in a program is large, the number of empty cycles can be significantly reduced.
Therefore, the speed of pipeline processing can be increased.

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

第1A図は本発明の原理構成を示す図、第1B図は第1
図の動作を示すフローチャート、第2A図、第2B図、
第3A図、第3B図は本発明の詳細な説明するタイミン
グ図、 第4図は第1A図の連想記憶回路の詳細な回路図、 第5図、第6図は第4図の回路動作を示すタイミング図
、 第7図は第1A図の命令記憶回路の詳細な回路図、 第8図は第1A図のアドレス記憶回路の詳細な回路図、 第9図は第7図(第8図)の回路動作を示すタイミング
図、 第10図は第4図の変更例を示す回路図、第11図は第
1図のWR信号発生回路の詳細な回路図、 第12図は第11図の回路動作を示すタイミグ図・ 第13図は通常のパイプライン処理を示すタイミング図
、 第14A図、第14B図は従来のパイプライン処理を示
すタイミング図である。 1・・・連想記憶回路、  2・・・命令記憶回路、3
・・・アドレス記憶回路、 4・・・ブリフェッチステージ、 5・・・命令キューステージ。 第1A図の動作 第18図 ミスヒツト、分岐成功時 第2A図 ミスヒツト、分岐失敗時 第28図 ヒツト、分岐命令成功時 第3A図 ヒツト、分岐命令失敗時 第38図 第4図の書込み動作 第5図 第4図のヒツト判定動作 第6図 分岐先命令 命令記憶回路の詳細 第7図 分岐先アドレス+1 アドレス記憶回路の詳細 第8図 第7図(第8図)の読出し動作 第9図 第11図 第12図 通常のパイプライン動作 第13図 分岐命令  ←IF    I[と−一旦り一分岐命令
失敗時 第144図 分岐命令成功時 第148図
FIG. 1A is a diagram showing the principle configuration of the present invention, and FIG. 1B is a diagram showing the basic configuration of the present invention.
Flowcharts showing the operations in Figures 2A, 2B,
3A and 3B are timing diagrams explaining the present invention in detail, FIG. 4 is a detailed circuit diagram of the associative memory circuit of FIG. 1A, and FIGS. 5 and 6 illustrate the circuit operation of FIG. 4. 7 is a detailed circuit diagram of the instruction storage circuit shown in FIG. 1A, FIG. 8 is a detailed circuit diagram of the address storage circuit shown in FIG. 1A, and FIG. 9 is a detailed circuit diagram of the instruction storage circuit shown in FIG. 1A. 10 is a circuit diagram showing a modification of FIG. 4, FIG. 11 is a detailed circuit diagram of the WR signal generation circuit in FIG. 1, and FIG. 12 is the circuit in FIG. 11. 13 is a timing diagram showing normal pipeline processing, and FIGS. 14A and 14B are timing diagrams showing conventional pipeline processing. 1...Associative memory circuit, 2...Instruction memory circuit, 3
...Address storage circuit, 4.Briefetch stage, 5.Instruction queue stage. Operation in Figure 1A (Miss) in Figure 18, branch success (Figure 2A) miss, branch failure in Figure 28 (Hit), branch instruction successful in Figure 3A (Hit), branch instruction failure in Figure 38 (write operation in Figure 4) Figure 4 Hit determination operation Figure 6 Branch destination instruction Details of instruction storage circuit Figure 7 Branch destination address +1 Details of address storage circuit Figure 8 Read operation of Figure 7 (Figure 8) Figure 9 Figure 11 Figure 12. Normal pipeline operation Figure 13. Branch instruction ←IF I [and - once branch instruction fails Figure 144 Branch instruction succeeds Figure 148

Claims (1)

【特許請求の範囲】 1、分岐命令成功時に該分岐命令のアドレスを登録し、
該分岐命令のアドレスと現在実行命令のアドレスとを比
較する連想記憶回路(1)と、分岐命令成功時に該分岐
命令の分岐先命令を登録し、前記現在実行命令のアドレ
スが前記登録された分岐命令のアドレスにヒットしたと
きに該分岐命令の分岐先命令を送出する命令記憶回路(
2)と、 分岐命令成功時に該分岐命令の分岐先アドレス+前記命
令記憶回路に登録された分岐命令のバイト数のアドレス
を登録し、前記現在実行命令のアドレスが前記分岐命令
のアドレスにヒットしたときに該分岐命令の分岐先アド
レス+前記命令記憶回路に登録された分岐先命令のバイ
ト数のアドレスを送出するアドレス記憶回路(3)と、 を具備し、 前記現在実行命令のアドレスが前記登録された分岐命令
のアドレスにヒットしたときには前記命令記憶回路をパ
イプライン処理用の命令キューステージに、前記アドレ
ス記憶回路をパイプライン処理用のプリフェッチステー
ジに接続するようにしたパイプライン処理システム。
[Claims] 1. Registering the address of the branch instruction when the branch instruction is successful;
an associative memory circuit (1) that compares the address of the branch instruction with the address of the currently executed instruction; registers the branch destination instruction of the branch instruction when the branch instruction is successful; and stores the address of the currently executed instruction in the registered branch; An instruction storage circuit (which sends out the branch destination instruction of the branch instruction when the address of the instruction is hit)
2) When a branch instruction is successful, the address of the branch destination address of the branch instruction + the number of bytes of the branch instruction registered in the instruction storage circuit is registered, and the address of the currently executed instruction hits the address of the branch instruction. an address storage circuit (3) that sends an address equal to the branch destination address of the branch instruction + the number of bytes of the branch destination instruction registered in the instruction storage circuit, when the address of the currently executed instruction is the registered address. The pipeline processing system is configured to connect the instruction storage circuit to an instruction queue stage for pipeline processing and connect the address storage circuit to a prefetch stage for pipeline processing when the address of a branch instruction that has been issued is hit.
JP25238787A 1987-10-08 1987-10-08 System for processing pipe line Pending JPH0195331A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25238787A JPH0195331A (en) 1987-10-08 1987-10-08 System for processing pipe line

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25238787A JPH0195331A (en) 1987-10-08 1987-10-08 System for processing pipe line

Publications (1)

Publication Number Publication Date
JPH0195331A true JPH0195331A (en) 1989-04-13

Family

ID=17236614

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25238787A Pending JPH0195331A (en) 1987-10-08 1987-10-08 System for processing pipe line

Country Status (1)

Country Link
JP (1) JPH0195331A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03129441A (en) * 1989-06-20 1991-06-03 Fujitsu Ltd Branch instruction execution device
JPH04145531A (en) * 1990-10-05 1992-05-19 Nec Corp Microprogram controller

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60168238A (en) * 1984-02-10 1985-08-31 Hitachi Ltd Instruction control system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60168238A (en) * 1984-02-10 1985-08-31 Hitachi Ltd Instruction control system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03129441A (en) * 1989-06-20 1991-06-03 Fujitsu Ltd Branch instruction execution device
JPH04145531A (en) * 1990-10-05 1992-05-19 Nec Corp Microprogram controller

Similar Documents

Publication Publication Date Title
US5027270A (en) Processor controlled interface with instruction streaming
CA2260308C (en) High performance speculative misaligned load operations
US5142631A (en) System for queuing individual read or write mask and generating respective composite mask for controlling access to general purpose register
US3728692A (en) Instruction selection in a two-program counter instruction unit
US5701430A (en) Cross-cache-line compounding algorithm for scism processors
TW200530912A (en) Transitioning from instruction cache to trace cache on label boundaries
US20030005266A1 (en) Multithreaded processor capable of implicit multithreaded execution of a single-thread program
US20040019753A1 (en) System and method for multiple store buffer forwarding in a system with a restrictive memory model
KR20060108644A (en) System and method for handling exceptional instructions in a trace cache based processor
JPH02190930A (en) Software instruction executing apparatus
KR970011208B1 (en) Pipelined Write Buffer Registers
JPS60168238A (en) Instruction control system
KR20020097149A (en) Scheduler capable of issuing and reissuing dependency chains
US6301654B1 (en) System and method for permitting out-of-order execution of load and store instructions
US5924120A (en) Method and apparatus for maximizing utilization of an internal processor bus in the context of external transactions running at speeds fractionally greater than internal transaction times
US6421758B1 (en) Method and system for super-fast updating and reading of content addressable memory with a bypass circuit
US20030163643A1 (en) Bank conflict determination
JPH05506323A (en) Apparatus and method for providing outage caching
US6823430B2 (en) Directoryless L0 cache for stall reduction
JPH05342084A (en) Device and method for storing data
US6266767B1 (en) Apparatus and method for facilitating out-of-order execution of load instructions
US5898815A (en) I/O bus interface recovery counter dependent upon minimum bus clocks to prevent overrun and ratio of execution core clock frequency to system bus clock frequency
JPH0195331A (en) System for processing pipe line
US5421026A (en) Data processor for processing instruction after conditional branch instruction at high speed
EP0375883A2 (en) Cache storage system