JP4533432B2 - TLB correlation type branch predictor and method of using the same - Google Patents

TLB correlation type branch predictor and method of using the same Download PDF

Info

Publication number
JP4533432B2
JP4533432B2 JP2007513656A JP2007513656A JP4533432B2 JP 4533432 B2 JP4533432 B2 JP 4533432B2 JP 2007513656 A JP2007513656 A JP 2007513656A JP 2007513656 A JP2007513656 A JP 2007513656A JP 4533432 B2 JP4533432 B2 JP 4533432B2
Authority
JP
Japan
Prior art keywords
branch
history
shift register
value
bit
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.)
Expired - Fee Related
Application number
JP2007513656A
Other languages
Japanese (ja)
Other versions
JP2008501166A (en
Inventor
チュンロン ライ
Original Assignee
インテル コーポレイション
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 インテル コーポレイション filed Critical インテル コーポレイション
Publication of JP2008501166A publication Critical patent/JP2008501166A/en
Application granted granted Critical
Publication of JP4533432B2 publication Critical patent/JP4533432B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3836Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
    • G06F9/3842Speculative instruction execution
    • G06F9/3844Speculative instruction execution using dynamic branch prediction, e.g. using branch history tables

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Advance Control (AREA)

Description

本発明の実施形態は高性能プロセッサに関し、より具体的には、変換索引バッファ(translation look-aside buffer;TLB)入力及び可変長グローバル分岐履歴を用いる命令分岐予測器に関する。   Embodiments of the present invention relate to high performance processors, and more particularly to instruction branch predictors that use translation look-aside buffer (TLB) inputs and variable length global branch history.

分岐命令の発生率及び命令パイプライン深さがともに増大するに連れ、スーパースカラのアウトオブオーダ・プロセッサの潜在的な性能を実現するために、正確な分岐予測がますます重要になってきている。従来技術に係る幾つかの分岐予測器が、グローバル履歴を有さない分岐予測器、又はグローバル履歴を有する2レベル分岐予測器の何れかとして実現されている。 As branch instruction rates and instruction pipeline depth both increase, accurate branch prediction is becoming increasingly important to realize the potential performance of superscalar out-of-order processors. . Some branch predictors according to the prior art are implemented as either a branch predictor without a global history or a two- level branch predictor with a global history.

一部の分岐予測器では、グローバル履歴はm個の最近の分岐から構成され、分岐が為されたか否かを各々のビットが記録するmビットのグローバル・シフトレジスタに導入されている。残念ながら、現行のグローバル・シフトレジスタは固定長のグローバル履歴を記録するのみである。しかしながら、最近の研究により、別個のプログラムからの別個の命令は別々の長さのグローバル履歴を用いることにより、より正確に予測される場合があることが示されている。   In some branch predictors, the global history consists of m recent branches and is introduced into an m-bit global shift register in which each bit records whether a branch has been taken or not. Unfortunately, current global shift registers only record a fixed-length global history. However, recent studies have shown that separate instructions from separate programs may be predicted more accurately by using different lengths of global history.

図1は、技術的に既知である分岐予測器の回路ブロック図を示している。図1において、mビット履歴シフトレジスタ110はビットmの単一ビットのシフト入力と、ビット1の単一ビットのシフト出力とを含んでおり、単一ビットのシフト入力は個々の命令に対して分岐が為されたか否かを示すものを受け取る。例えば、分岐が為されたことを示すために値“1”が用いられ、分岐が為されなかったことを示すために値“0”が用いられる。履歴シフトレジスタ110は、固定長(すなわち、mビット長)のグローバル分岐予測の履歴を格納するため、最上位ビット値すなわち最初のビット値をシフト出力するため、そして格納されるべきmビットの分岐予測履歴値の全体を出力するために用いられる。   FIG. 1 shows a circuit block diagram of a branch predictor known in the art. In FIG. 1, m-bit history shift register 110 includes a single-bit shift input of bit m and a single-bit shift output of bit 1, where the single-bit shift input is for each instruction. Receives an indication of whether or not a branch has been taken. For example, the value “1” is used to indicate that a branch has been taken, and the value “0” is used to indicate that a branch has not been taken. The history shift register 110 stores a fixed-length (ie m-bit long) global branch prediction history, shifts out the most significant bit value, ie the first bit value, and the m-bit branch to be stored. Used to output the entire prediction history value.

図1では、履歴シフトレジスタ110は排他的論理和(排他的OR)ゲート120に結合されており、履歴シフトレジスタ110は履歴シフトレジスタ110に格納されたmビットのグローバル分岐予測履歴値を排他的論理和ゲート120の第1の入力に出力する。排他的論理和ゲート120は分岐アドレスレジスタ130にも結合されており、分岐アドレスレジスタ130はmビットの分岐アドレスを排他的論理和ゲート120の第2の入力に出力する。排他的論理和ゲート120は、分岐アドレスレジスタ130からのmビット分岐アドレス入力が履歴シフトレジスタ110からのmビットグローバル履歴入力と一致する場合に、mビットのグローバル履歴をパターン履歴表140に出力する。分岐アドレスレジスタ130からのmビット分岐アドレスは、履歴シフトレジスタ110からの出力とビット数を合わせるために、出力される前にシフトされ、拡張され、あるいは切り取られる。その結果、グローバル分岐予測履歴値の長さは変化する場合があるが、分岐アドレスレジスタ130からのmビット分岐アドレスビットストリング出力のビット数は、履歴シフトレジスタ110からのグローバル分岐予測値入力のビット数と常に一致する。   In FIG. 1, the history shift register 110 is coupled to an exclusive OR (exclusive OR) gate 120, and the history shift register 110 exclusives the m-bit global branch prediction history value stored in the history shift register 110. Output to the first input of the OR gate 120. The exclusive OR gate 120 is also coupled to the branch address register 130, which outputs the m-bit branch address to the second input of the exclusive OR gate 120. The exclusive OR gate 120 outputs the m-bit global history to the pattern history table 140 when the m-bit branch address input from the branch address register 130 matches the m-bit global history input from the history shift register 110. . The m-bit branch address from branch address register 130 is shifted, expanded, or cut off before being output to match the number of bits with the output from history shift register 110. As a result, the length of the global branch prediction history value may change, but the number of bits of the m-bit branch address bit string output from the branch address register 130 is the bit of the global branch prediction value input from the history shift register 110. Always matches the number.

図1では、パターン履歴表140は2m個の入力項目で構成されており、この表内の各入力項目は“ローカル履歴”を含んでいる。ローカル履歴情報は一般に2ビット飽和(saturated)分岐予測器に格納される。排他的論理和ゲート120からのmビットのグローバル履歴出力は、パターン履歴表140から1つの入力項目を選択するために用いられ、そして、選択された1つの入力項目は予測を実行するために用いられる。この設計によって確かな予測入力項目が用いられ、別個の分岐命令が互いに相関関係を有する有効な履歴情報が格納される。 In FIG. 1, the pattern history table 140 is composed of 2 m input items, and each input item in this table includes “local history”. Local history information is typically stored in a 2-bit saturated branch predictor. The m-bit global history output from the exclusive OR gate 120 is used to select one input item from the pattern history table 140, and the selected one input item is used to perform the prediction. It is done. This design uses reliable predictive input items and stores valid history information in which separate branch instructions are correlated with each other.

図1では、2ビット分岐予測器は2ビットカウンタを保持している。それは、参照されるとその内容に基づいて分岐予測を出力する。例えば、ある1つの分岐に対し、その分岐に割り当てられた予測器(すなわち、パターン履歴表の入力項目)の2ビットの内容が“10”である場合、分岐が“為される”と予測する。しばらくして実際の指示が判明した後、その内容が更新される。例えば、分岐が“為された”場合は“10”は“11”に更新され、分岐が“為されなかった”場合は“10”は“01”に更新される。一般に、2ビットカウンタ値がその最大値の1/2すなわち22-1=2以上であるとき、分岐が為されると予測される。逆に、2ビットカウンタ値が2未満であるとき、分岐は為されないと予測される。換言すれば、2ビットカウンタが“10”(すなわち、2)又は“11”(すなわち、3)の何れかを含んでいるときは分岐が為されると予測され、2ビットカウンタが“00”(すなわち、0)又は“01”(すなわち、1)の何れかを含んでいるときは分岐が為されないと予測される。 In FIG. 1, the 2-bit branch predictor holds a 2-bit counter. When it is referenced, it outputs a branch prediction based on its contents. For example, when a 2-bit content of a predictor assigned to the branch (that is, an input item of the pattern history table) is “10”, the branch is predicted to be “taken”. . After a while, the actual instructions are found, and the contents are updated. For example, when the branch is “taken”, “10” is updated to “11”, and when the branch is “not taken”, “10” is updated to “01”. In general, it is predicted that a branch will be taken when the 2-bit counter value is 1/2 of its maximum value, ie 2 2-1 = 2 or more. Conversely, when the 2-bit counter value is less than 2, it is predicted that no branch will be taken. In other words, if the 2-bit counter contains either “10” (ie, 2) or “11” (ie, 3), the branch is predicted to be taken and the 2-bit counter is set to “00”. It is predicted that no branch will be taken if it contains either (ie 0) or “01” (ie 1).

ローカル履歴は分岐の出力がそれ自身の履歴に依存することを意味するものであるが、グローバル履歴は分岐の出力がその他の分岐の履歴に依存することを暗示するものである。以下の短いコードの例では、第1の分岐が“為される”を出力する場合、第2の分岐もまた“為される”を出力する。そして、この情報をこのグローバル履歴及び2レベル(two-level)分岐予測手法を用いて維持するために、独立した2ビット分岐予測器(グローバル履歴を有するパターン履歴の入力項目が分岐d==0に対応して採用される)が用いられることになる。 Local history implies that the output of a branch depends on its own history, while global history implies that the output of a branch depends on the history of other branches. In the following short code example, if the first branch outputs “done”, the second branch also outputs “done”. Then, this information to maintain with this global history and 2 levels (two-level) branch prediction scheme, two independent bits branch predictor (input field branch d == 0 of pattern history with global history Is adopted corresponding to the above).

If(d==0) // もし d=0
d=1; // ならば d=1 に設定
If(d==1) // もし d=1
… // ならば d=1条件命令を継続する
残念ながら、図1のグローバル履歴レジスタ110は何れの場合にも固定長のグローバル履歴を記録するのみであるため、固定長のグローバル履歴に基づく分岐予測は十分に優れたものではない。例えば、固定長のグローバル履歴に基づく分岐予測は、先行の分岐命令が現下の分岐命令と相関関係を有するとしても、先行の分岐命令を常に正確に識別するわけではない。同様に、固定長のグローバル履歴を用いると、相関関係のないその他の分岐命令だけでなく、一部の文脈に相関が存在し、相関が存在すべきその他の文脈に相関が存在しない分岐命令も常に正確に予測されるわけではない。例えば、以下のコードの例で、メモリ・オペランドX、Yがデータの局所性に起因して近接値を有すると仮定する。分岐予測器は上述のように機能し得る。しかしながら、この関係はデータの局所性の喪失によって損なわれることになる。
If (d == 0) // if d = 0
d = 1; // then set d = 1
If (d == 1) // if d = 1
... // If d = 1 conditional instruction is continued, unfortunately, global history register 110 in FIG. 1 only records a fixed-length global history in any case, so a branch based on a fixed-length global history The prediction is not good enough. For example, branch prediction based on a fixed-length global history does not always accurately identify the preceding branch instruction, even if the preceding branch instruction has a correlation with the current branch instruction. Similarly, with fixed-length global history, not only other uncorrelated branch instructions but also some branch instructions that have correlation in some contexts and other contexts that should have no correlation. It is not always predicted accurately. For example, in the following code example, assume that memory operands X, Y have proximity values due to data locality . The branch predictor may function as described above. However, this relationship is compromised by the loss of data locality .

If(d==0) // もし d=0
d=X; // ならば d=X に設定
If(d==Y) // もし d=Y
… // ならば d=Y条件命令を継続する
この事例は、グローバルな相関はグローバル履歴又は分岐アドレスだけでなくデータの局所性をも当てにするときがあることを示している。上記の例で示されたようなデータの局所性の喪失は、第2の命令でdがXに等しく設定され、且つ第3の命令でdがYに等しくないと決定されるときに発生する。その結果、d=Yの条件命令は実行されない場合がある。これはまたグローバル履歴を損ね得るものである。故に、上述の欠陥を回避した分岐予測を備えることが望ましい。
If (d == 0) // if d = 0
d = X; // then set d = X
If (d == Y) // if d = Y
… // If this case continues with a d = Y conditional instruction, this example shows that global correlation may rely on data locality as well as global history or branch addresses. The loss of data locality as shown in the above example occurs when d is set equal to X in the second instruction and d is not equal to Y in the third instruction . As a result, the conditional instruction with d = Y may not be executed. This can also damage the global history. Therefore, it is desirable to provide branch prediction that avoids the aforementioned defects.

本発明は、上述の欠陥を回避した分岐予測を提供することを目的とする。   An object of the present invention is to provide branch prediction that avoids the above-described defects.

本発明の実施形態は、変換索引バッファ(translation look-aside buffer)相関型分岐予測の装置及び方法に関し、以下に限られないが、動的制御される可変長の分岐履歴を有する場合と有しない場合の双方における、グローバル履歴の変換索引バッファ相関型分岐予測器、及び/又は2レベル(two-level)の変換索引バッファ相関型分岐予測器を含む。例えば、本発明の一実施形態に従ったプロセッサは、変換索引バッファからグローバル分岐履歴シフトレジスタへの入力用配線を具備した相関型分岐予測器を有している。入力用配線は、変換索引バッファ内にミスが生じている状態を示し得るものであり、グローバル分岐履歴シフトレジスタの内容を消去(クリア)するために使用可能である。グローバル分岐履歴シフトレジスタに格納されたグローバル分岐履歴はデータの局所性によって鍛えられ得るので、変換索引バッファミス時にグローバル分岐履歴シフトレジスタをクリアすることは、変換索引バッファからの欠けたデータによって引き起こされるデータの非局所性により破損されたグローバル分岐履歴を無効にする助けとなり得る。 Embodiments of the present invention relate to a translation look-aside buffer correlation type branch prediction apparatus and method, which are not limited to the following, but do or do not have a dynamically controlled variable length branch history. in both cases, including the global history translation lookaside buffer correlated branch predictor, and / or two-level (two-level) translation lookaside buffer correlated branch predictor. For example, a processor according to an embodiment of the present invention includes a correlated branch predictor having input wiring from a translation index buffer to a global branch history shift register. The input wiring can indicate a state where a mistake has occurred in the conversion index buffer, and can be used to erase (clear) the contents of the global branch history shift register. Since the global branch history stored in the global branch history shift register can be trained by data locality, clearing the global branch history shift register on a translation index buffer miss is caused by missing data from the translation index buffer It may help to disable global branch history which is broken by the non-locality of data.

図2は、本発明の一実施形態に従った、プロセッサ用の変換索引バッファ相関型分岐予測器の回路ブロック図である。図2において、プロセッサ200はmビットの履歴シフトレジスタ210を有している。履歴シフトレジスタ210は、(図1の単一ビットシフト入力に類似とし得る)第1の単一ビットのシフト入力、第2の単一ビットのシフト入力、及び(図1の単一ビットシフト出力に類似とし得る)単一ビットのシフト出力を有しており、第1の単一ビットシフト入力は個々の命令に対して分岐が為されたか否かを示す信号を受け取る。履歴シフトレジスタ210は、実行中の命令に対する可変長のグローバル分岐履歴を格納するために用いられ得る。一般に、妥当な履歴長を特定するために、値“1”を有する最上位ビットが用いられる。例えば、最上位の“1”がmビットのシフトレジスタの5番目のビットにある場合、グローバル履歴はm-5ビットの長さに決定され得る。その結果、最上位の“1”の値は分岐が起こったか否かを表さない。本発明の一実施形態に従って、“1”の値は分岐が為されたことを表すイネーブル信号として使用され、“0”は分岐が為されなかったことを表す非イネーブル信号として使用されてもよい。履歴シフトレジスタ210はm-1ビットの最大長を有する可変長のグローバル分岐予測履歴を格納するため、そして最上位ビット値すなわちm-1ビットの値を出力するために用いられてもよい。故に、“0000…01”のストリングは、グローバル履歴が履歴シフトレジスタ210から最近消去されたことを指し示す長さゼロのグローバル履歴を表してもよい。同様に、本発明の一実施形態に従って、“0000…00”のストリングは、存在しないグローバル履歴長を表すので意味がないとして扱われてもよく、“1X…Y”ストリング(X及びYは各々“0”又は“1”に等しい)は、レジスタが含み得る最長のグローバル履歴長、すなわち、m-1ビットの長さを含むとして扱われてもよい。 FIG. 2 is a circuit block diagram of a transform index buffer correlated branch predictor for a processor according to one embodiment of the present invention. In FIG. 2, the processor 200 has an m-bit history shift register 210. The history shift register 210 includes a first single bit shift input (which may be similar to the single bit shift input of FIG. 1), a second single bit shift input, and the single bit shift output of FIG. The first single bit shift input receives a signal indicating whether a branch has been taken for an individual instruction. The history shift register 210 may be used to store a variable length global branch history for the instruction being executed. In general, the most significant bit having the value “1” is used to specify a reasonable history length. For example, if the most significant “1” is in the fifth bit of the m-bit shift register, the global history can be determined to be m-5 bits long. As a result, the most significant “1” value does not indicate whether a branch has taken place. According to one embodiment of the present invention, "1" value of is used as an enable signal indicating that the branch is made, "0" may be used as a non-enable signal indicating that the branch is not made . The history shift register 210 may be used to store a variable length global branch prediction history having a maximum length of m−1 bits and to output the most significant bit value, ie, the m−1th bit value. Thus, the string “0000... 01” may represent a zero-length global history indicating that the global history has been recently erased from the history shift register 210. Similarly, according to one embodiment of the present invention, a string of “0000 ... 00” may be treated as meaningless because it represents a global history length that does not exist, and a “1X ... Y” string (where X and Y are each (Equal to “0” or “1”) may be treated as including the longest global history length that the register may contain, ie, a length of m−1 bits.

図2では、履歴シフトレジスタ210は排他的論理和(排他的OR)ゲート220に結合されており、履歴シフトレジスタ210は、履歴シフトレジスタ210に格納されたmビットのグローバル分岐予測履歴の値を排他的論理和ゲート220の第1の入力に出力する。また、排他的論理和ゲート220は分岐アドレスレジスタ230に結合されており、分岐アドレスレジスタ230はmビットの分岐アドレスを排他的論理和ゲート220の第2の入力に出力する。排他的論理和ゲート220は、分岐アドレスレジスタ230からのmビットの分岐アドレス入力が履歴シフトレジスタ210からのmビットのグローバル履歴入力と一致する場合、mビットのグローバル履歴をパターン履歴表240に出力する。分岐アドレスレジスタ230からのmビット分岐アドレスは、履歴シフトレジスタ210からの出力とビット数を合わせるために、出力される前にシフトされ、拡張され、あるいは切り取られ得る。その結果、グローバル分岐予測履歴値の長さは変化する場合があるが、分岐アドレスレジスタ230からのmビット分岐アドレスビットストリング出力のビット数は、一般に、履歴シフトレジスタ210からのグローバル分岐予測値入力のビット数と常に一致する。   In FIG. 2, the history shift register 210 is coupled to an exclusive OR (exclusive OR) gate 220, and the history shift register 210 stores the value of the m-bit global branch prediction history stored in the history shift register 210. Output to the first input of the exclusive OR gate 220. Further, the exclusive OR gate 220 is coupled to the branch address register 230, and the branch address register 230 outputs the m-bit branch address to the second input of the exclusive OR gate 220. The exclusive OR gate 220 outputs the m-bit global history to the pattern history table 240 when the m-bit branch address input from the branch address register 230 matches the m-bit global history input from the history shift register 210. To do. The m-bit branch address from branch address register 230 can be shifted, expanded, or clipped before being output to match the number of bits with the output from history shift register 210. As a result, the length of the global branch prediction history value may change, but the number of bits of the m-bit branch address bit string output from the branch address register 230 is generally input from the global branch prediction value from the history shift register 210. Always matches the number of bits.

図2では、パターン履歴表240は2m個の入力項目で構成されており、この表内の各入力項目は“ローカル履歴”を含んでいてもよい。ローカル履歴情報は一般に2ビット飽和(saturated)分岐予測器に格納され得る。排他的論理和ゲート220からのmビットのグローバル履歴出力は、パターン履歴表240から1つの入力項目を選択するために用いられてもよく、また、選択された1つの入力項目は予測を実行するために用いられてもよい。この設計によって確かな予測入力項目が用いられ、別個の分岐命令が互いに相関関係を有する有効な履歴情報が格納される。 In FIG. 2, the pattern history table 240 is composed of 2 m input items, and each input item in this table may include “local history”. Local history information can generally be stored in a 2-bit saturated branch predictor. The m-bit global history output from the exclusive OR gate 220 may be used to select one input item from the pattern history table 240, and the selected one input item performs prediction. May be used for This design uses reliable predictive input items and stores valid history information in which separate branch instructions are correlated with each other.

一般に、図2では、履歴シフトレジスタ210は、2つの例外、すなわち、グローバル分岐履歴が消去されるべきとき、及びX、Y及びZは各々“0”又は“1”に等しいとしてグローバル履歴ストリングの値が“1XYZ…”に等しいとき、を除いて、図1にて述べられたようにシフトする。第1に、図2において、履歴シフトレジスタ210が消去されるべき場合、履歴シフトレジスタ210内のグローバル分岐履歴ストリングがクリアされ“0000…01”に設定される。第2に、履歴シフトレジスタ210が履歴シフトレジスタ210の最上位ビット(すなわち、ビット1)に“1”が格納されていることを意味するm-1ビット長のグローバル分岐履歴を含んでいるとき、ビット1に格納された値“1”は維持され、ビット2のビット値がシフトアウトされる。 In general, in FIG. 2, the history shift register 210 has two exceptions: when the global branch history is to be erased, and as X, Y and Z are equal to “0” or “1”, respectively, Shift as described in FIG. 1 except when the value is equal to “1XYZ...”. First, in FIG. 2, when the history shift register 210 is to be erased, the global branch history string in the history shift register 210 is cleared and set to “0000... 01”. Second, when the history shift register 210 contains a global branch history m-1 bits long, which means that the most significant bit (i.e., bit 1) to "1" is stored in the history shift register 210 The value “1” stored in bit 1 is maintained, and the bit value of bit 2 is shifted out.

履歴シフトレジスタ210はまた、例えば3状態バッファ等のラッチメモリ250に結合され、ラッチメモリ250は変換索引バッファ“TLB”(図示せず)からTLBミスがあったかどうかを示す信号を受け取り得る。また、ラッチメモリ250はmビットの入力クリア値を受け取って格納し得る。このmビットの入力クリア値は、“1”である右端の数字を除いて全て“0”を含む。例えば、m=16の場合、16ビットの入力クリア値は“0000000000000001”である。TLBミスが生じると、TLBミスが生じたことを表すイネーブル信号がTLB(図示せず)によってTLBミスライン260上で有効状態にされる。TLBミスが生じたことを表すイネーブル信号がラッチメモリ250に到達すると、ラッチメモリ250に格納されたmビット入力クリア値が履歴シフトレジスタ210に読み込まれる。その結果、履歴シフトレジスタ210は“クリアされ”、履歴シフトレジスタ210にその時点で格納されていたmビット値が、ラッチメモリ250からのmビット値、例えば“0000000000000001”、で上書きされる。 The history shift register 210 is also coupled to a latch memory 250, such as a tri-state buffer, for example, which may receive a signal from the translation index buffer “TLB” (not shown) indicating whether there has been a TLB miss . The latch memory 250 may receive and store an m-bit input clear value. This m-bit input clear value includes all “0” s except for the rightmost digit “1”. For example, when m = 16, the 16-bit input clear value is “0000000000000001”. When a TLB miss occurs, an enable signal indicating that a TLB miss has occurred is enabled on the TLB miss line 260 by a TLB (not shown) . When an enable signal indicating that a TLB miss has occurred reaches the latch memory 250, the m-bit input clear value stored in the latch memory 250 is read into the history shift register 210. As a result, the history shift register 210 is “cleared”, and the m-bit value stored in the history shift register 210 at that time is overwritten with the m-bit value from the latch memory 250, for example, “0000000000000001”.

図2では、フィードバック回路270が履歴シフトレジスタ210のビット1の位置とビット2の位置とに結合されている。フィードバック回路270は論理積(AND)ゲート280を有しており、論理積ゲート280は履歴シフトレジスタ210に結合されて出力の最上位ビットを受け取るとともに論理和(OR)ゲート290にも結合されている。論理和ゲート290は履歴シフトレジスタ210のビット1及びビット2の位置に結合されている。フィードバック回路270は、履歴シフトレジスタ210のm-1ビット位置に最上位ビット値1を維持するために用いられ得る。具体的には、論理積ゲート280の第1の入力281は履歴シフトレジスタ210の出力に結合されている。論理積ゲート280の第2の入力283は値“1”を受け取り、その値は履歴シフトレジスタ210の出力値と掛け合わされて論理積値となり、論理積ゲート280から出力287を介して論理和ゲート290の第1の入力291に出力される。論理和ゲート290の第2の入力293は履歴シフトレジスタ210のビット2の位置に結合され、そこから値を受け取る。論理和ゲート290の出力297は履歴シフトレジスタ210のビット1の位置に結合され、そこに論理和値を出力する。論理積ゲート280の第2の入力283は一定の入力である“1”を有するので、2つの入力の組み合わせ(0,1)及び(1,1)のみが可能である。すなわち、論理積ゲート280からの取り得る出力値は2つのみであり、履歴シフトレジスタ210のm-1ビット位置の出力値も“1”である場合には論理積ゲート280から“1”が出力され、履歴シフトレジスタ210のm-1ビット位置の出力値が“0”である場合には論理積ゲート280から“0”が出力されることになる。同様に、論理和ゲート290もまた同じ2つの取り得る出力値(すなわち、“0”又は“1”)を有するのみであるが、その結果は4つの取り得る入力の組み合わせ、すなわち、(0,0)、(0,1)、(1,0)及び(1,1)から生じる。なぜなら、論理和ゲート290への第1の入力291及び第2の入力293の何れも単一の値には限定されていないからである。   In FIG. 2, a feedback circuit 270 is coupled to the bit 1 and bit 2 positions of the history shift register 210. The feedback circuit 270 includes an AND gate 280, which is coupled to the history shift register 210 to receive the most significant bit of the output and is also coupled to an OR gate 290. Yes. An OR gate 290 is coupled to the bit 1 and bit 2 positions of the history shift register 210. The feedback circuit 270 may be used to maintain the most significant bit value 1 at the m−1 bit position of the history shift register 210. Specifically, the first input 281 of AND gate 280 is coupled to the output of history shift register 210. The second input 283 of the logical product gate 280 receives the value “1”, and the value is multiplied with the output value of the history shift register 210 to obtain a logical product value. It is output to the first input 291 of 290. The second input 293 of the OR gate 290 is coupled to the position of bit 2 of the history shift register 210 and receives the value therefrom. The output 297 of the logical sum gate 290 is coupled to the position of bit 1 of the history shift register 210, and outputs the logical sum value there. Since the second input 283 of the AND gate 280 has a constant input “1”, only two input combinations (0,1) and (1,1) are possible. That is, only two output values can be taken from the AND gate 280, and if the output value at the m-1 bit position of the history shift register 210 is also "1", "1" is output from the AND gate 280. When the output value at the m−1 bit position of the history shift register 210 is “0”, “0” is output from the AND gate 280. Similarly, OR gate 290 also only has the same two possible output values (ie, “0” or “1”), but the result is a combination of four possible inputs, ie, (0, Resulting from (0), (0,1), (1,0) and (1,1). This is because neither the first input 291 nor the second input 293 to the OR gate 290 is limited to a single value.

Figure 0004533432
表1に示された論理和の論理表に見られるように、取り得る4つの入力値の組み合わせのうちの3つの結果として“1”が出力される。故に、履歴シフトレジスタ210のビット1の値が“1”であるとき論理積ゲート280は常に“1”を出力するので、履歴シフトレジスタ210がTLBミスによってクリアされるまで、フィードバック回路はビット1の位置に値“1”を維持することが分かる。
Figure 0004533432
As can be seen from the logical table of the logical sum shown in Table 1, “1” is output as three results of four possible combinations of input values. Therefore, since the logical product gate 280 always outputs “1” when the value of bit 1 of the history shift register 210 is “1”, the feedback circuit is set to bit 1 until the history shift register 210 is cleared by a TLB miss . It can be seen that the value “1” is maintained at the position of.

本発明の実施形態は、フェッチ/復号化ユニットが例えば命令キャッシュ等の記憶位置からマクロ命令等の命令を取得してその命令を復号化するアウトオブオーダ・プロセッサに実装され得るものである。複数命令セットコンピュータ(Complex Instruction Set Computer;“CISC”)アーキテクチャでは、フェッチ/復号化ユニットは複雑な命令を1つ又は複数のマイクロ命令/操作に復号化し得る。通常、これらのマイクロ命令は負荷記憶型アーキテクチャを定義し、メモリ操作を含むマイクロ命令が、例えば、縮小命令セットコンピュータ(Reduced Instruction Set Computer;“RISC”)又は超長命令語(Very Long Instruction Word;“VLIW”)アーキテクチャ等の、その他のアーキテクチャで実行され得る。   Embodiments of the present invention can be implemented in an out-of-order processor in which a fetch / decode unit obtains an instruction, such as a macro instruction, from a storage location, such as an instruction cache, and decodes the instruction. In a multiple instruction set computer (“CISC”) architecture, a fetch / decode unit may decode complex instructions into one or more microinstructions / operations. Typically, these microinstructions define a load storage architecture, and microinstructions involving memory operations are, for example, reduced instruction set computers (“RISC”) or very long instruction words (Very Long Instruction Words); It can be implemented on other architectures, such as the “VLIW” architecture.

典型的なRISCアーキテクチャでは、命令はマイクロ命令には復号化されない。本発明はCISCアーキテクチャだけでなくRISCアーキテクチャでも実行され得るものであるので、特に断らない限り命令とマイクロ命令/操作との間で区別は設けず、単純にこれらを命令と呼ぶことにする。   In a typical RISC architecture, instructions are not decoded into microinstructions. Since the present invention can be executed not only in the CISC architecture but also in the RISC architecture, unless otherwise specified, no distinction is made between instructions and microinstructions / operations, and these are simply referred to as instructions.

図3は、本発明の一実施形態に従った方法の流れ図である。図3では、例えばパターン履歴表240から、TLBからの入力を用いて予測入力項目が選択され(310)、選択された予測入力項目及びTLB入力に基づいて分岐が為され得るかどうかが動的に予測される(320)。当該方法は分岐が実際に為されたかどうかについての情報を受け取り(330)、分岐が実際に為されたか否かに基づいて予測入力項目が更新される(340)。例えば、予測入力項目はパターン履歴表240内で更新される(340)。分岐が実際に為されたかどうかを表すグローバル履歴値とパターン履歴表240とが、例えば、分岐が実際に為されたかどうかに基づいて履歴シフトレジスタ210内で更新される。そして、次の分岐命令が取得される(360)。当該方法は、一般に、プロセッサの電源が落とされたとき、又はさらなる命令の処理が実行されないときにのみ終了する。   FIG. 3 is a flow diagram of a method according to an embodiment of the invention. In FIG. 3, for example, from the pattern history table 240, a prediction input item is selected using an input from the TLB (310), and whether or not a branch can be made based on the selected prediction input item and the TLB input is dynamically determined. (320). The method receives information about whether a branch has actually been taken (330) and updates the prediction input item based on whether the branch has actually been taken (340). For example, the prediction input item is updated in the pattern history table 240 (340). The global history value indicating whether the branch has actually been taken and the pattern history table 240 are updated in the history shift register 210 based on, for example, whether the branch has actually been taken. Then, the next branch instruction is acquired (360). The method generally ends only when the processor is powered down or no further instruction processing is performed.

これに代わる本発明の一実施形態では、明示されていないが、図3の方法は更なる分岐命令がすぐには取得されない場合に、終了してから更なる分岐命令を待ってもよい。   In an alternative embodiment of the present invention, although not explicitly shown, the method of FIG. 3 may wait and wait for further branch instructions if no further branch instructions are obtained immediately.

図3の方法は、当該方法を実行する特定の順序に触れているが、本発明の実施形態を上記の順序に限定するものと解釈されるべきものではない。本発明では、実際、当該方法の構成要素の一部又は全てが如何なる順序でも実行され得る実施形態も意図される。例えば、以下には限られないが、全体的又は部分的にアウトオブオーダ(“OOO”)プロセッサにて並列に実行されることが意図される。同様に、図示された事例では、図3の方法は一度に1つの分岐を処理することを反映するように単純化されているが、本発明では、当然ながら既存のデータの従属関係によって制限されるものの、複数の分岐が同時に処理され得る実施形態も意図される。   Although the method of FIG. 3 refers to a particular order in which the method is performed, it should not be construed as limiting embodiments of the present invention to the above order. The present invention also contemplates embodiments in which some or all of the components of the method may actually be performed in any order. For example, but not limited to, it is intended to be executed in parallel on an out-of-order (“OOO”) processor in whole or in part. Similarly, in the illustrated case, the method of FIG. 3 has been simplified to reflect processing one branch at a time, but the present invention is of course limited by existing data dependencies. However, embodiments in which multiple branches can be processed simultaneously are also contemplated.

以下の単純化された疑似コード部分は、本発明の一実施形態に従ったTLB相関型グローバル履歴分岐予測器を実動させる操作を例示している:
check_and_initialize_predictor(argc,argv,&inTrace,&aPredictor);
while(!inTrace->EndOfTrace()){
aPredictor->SelectPredictionEntry(inTrace->GetAddress(),
inTrace->TLBMissOrNot()); //TLB情報をここに
bool pr-taken=aPredictor->prediction(inTrace->ForwardBranchOrNot());
//静的予測許可
aPredictor->UpdatePredictor(inTrace->TakenOrNot(),pr~taken);
//実際の分岐対象の判明後、
// パターン履歴表の更新及びグローバルレジスタのシフト
inTrace->read~trace(); //シミュレーションで次の分岐命令の読み込み
}
aPredictor->ShowAccuracyo;
例えば、上記の擬似コードで、予測器は命令の実行中に命令に含まれる各分岐の結果を予測し、実際の結果の判明後それを用いて予測を更新するように動作することが分かる。上記の擬似コード例は直列実行を暗に示すものであるが、これは単に全体概念を例示しているに過ぎず、当然ながら境界内(inter-bound)のデータの従属関係に応じてであるが、分岐の並列実行及び/又はアウトオブオーダ実行が為される他の実施形態も意図される。
The following simplified pseudo code portion illustrates the operation of running a TLB correlated global history branch predictor according to one embodiment of the present invention:
check_and_initialize_predictor (argc, argv, & inTrace, &aPredictor);
while (! inTrace-> EndOfTrace ()) {
aPredictor-> SelectPredictionEntry (inTrace-> GetAddress (),
inTrace-> TLBMissOrNot ()); // TLB information here
bool pr-taken = aPredictor-> prediction (inTrace-> ForwardBranchOrNot ());
// Allow static prediction
aPredictor-> UpdatePredictor (inTrace-> TakenOrNot (), pr ~ taken);
// After finding out the actual branch target,
// Update pattern history table and shift global register
inTrace-> read ~ trace (); // Read next branch instruction in simulation
}
aPredictor->ShowAccuracyo;
For example, in the above pseudo code, it can be seen that the predictor operates to predict the result of each branch included in the instruction during execution of the instruction and update the prediction using it after the actual result is known. The pseudocode example above implies serial execution, but this is merely an example of the overall concept, and of course depends on inter-bound data dependencies. However, other embodiments where parallel execution and / or out-of-order execution of branches are contemplated are also contemplated.

図4は、本発明の一実施形態に従って使用される、1つ又は複数のプロセッサ及びメモリを含むコンピュータシステムのブロック図である。図4では、コンピュータシステム400は、プロセッサ・バス420に結合された1つ又は複数のプロセッサ410(1)乃至410(n)を含んでおり、プロセッサ・バス420はシステムロジック430に結合されている。1つ又は複数のプロセッサ410(1)乃至410(n)の各々はNビットのプロセッサであり、復号器(図示せず)及び1つ又は複数のNビットレジスタ(図示せず)を含んでいてもよい。システムロジック430は、バス450を介してシステムメモリ440に結合されており、また、周辺バス460を介して不揮発性メモリ470及び1つ又は複数の周辺装置480(1)乃至480(m)に結合されている。周辺バス460は、例えば、PCI分科会のPCIローカルバス仕様書2.2版(1998年12月18日出版)にある1つ又は複数の周辺部品相互接続(Peripheral Component Interconnect;PCI)バス、業界標準アーキテクチャ(Industry Standard Architecture;ISA)バス、BCPRサービス社のEISA仕様書3.12版(1992年)にある拡張(Extended)ISA(EISA)バス、USB仕様書1.1版(1998年9月23日出版)にあるユニバーサル・シリアル・バス(USB)、及び類似の周辺バスを表す。不揮発性メモリ470は、例えば読み出し専用メモリ(ROM)又はフラッシュメモリ等のスタティックメモリ装置とし得る。周辺装置480(1)乃至480(m)は、例えば、キーボード、マウス若しくはその他のポインティング装置、ハードディスクドライブ、コンパクトディスク(CD)ドライブ、光ディスク、及びデジタル・ビデオディスク(DVD)ドライブ等の大容量記憶装置、ディスプレー並びにこれらに類するものを含み得る。   FIG. 4 is a block diagram of a computer system including one or more processors and memory used in accordance with one embodiment of the present invention. In FIG. 4, computer system 400 includes one or more processors 410 (1) -410 (n) coupled to a processor bus 420, which is coupled to system logic 430. . Each of the one or more processors 410 (1) -410 (n) is an N-bit processor and includes a decoder (not shown) and one or more N-bit registers (not shown). Also good. System logic 430 is coupled to system memory 440 via bus 450 and is coupled to non-volatile memory 470 and one or more peripheral devices 480 (1) -480 (m) via peripheral bus 460. Has been. Peripheral bus 460 may be, for example, one or more peripheral component interconnect (PCI) buses, industry standard architecture, as found in PCI local bus specification version 2.2 (published December 18, 1998). (Industry Standard Architecture; ISA) Bus, Extended to ISA (EISA) bus, USB specification version 1.1 (published on September 23, 1998) in EISA specification version 3.12 (1992) of BCPR Service Represents universal serial bus (USB) and similar peripheral buses. The non-volatile memory 470 may be a static memory device such as a read only memory (ROM) or a flash memory, for example. Peripheral devices 480 (1) to 480 (m) are, for example, mass storage devices such as a keyboard, mouse or other pointing device, hard disk drive, compact disk (CD) drive, optical disk, and digital video disk (DVD) drive Devices, displays, and the like may be included.

本発明について詳細に述べてきたが、様々な変更、代替及び改変が為され得ることは理解されるべきところである。さらに、特定の機能を制御するソフトウェア及びハードウェアについて説明されているが、技術的に周知のように、このような機能はソフトウェア、ハードウェア、又はそれらの組み合わせの何れを用いて実現されてもよい。同様に、請求項における“命令”という用語は、RISCアーキテクチャでの命令又はCISCアーキテクチャでの命令、及びその他のコンピュータ・アーキテクチャで用いられる命令を包含し得るものである。他の実施例が、当業者によって容易に確認され、特許請求の範囲によって定められる本発明の意図及び範囲を逸脱することなく作り出される。   Although the invention has been described in detail, it should be understood that various changes, substitutions and modifications can be made. Further, although software and hardware that control specific functions are described, as is well known in the art, such functions may be implemented using software, hardware, or a combination thereof. Good. Similarly, the term “instructions” in the claims can encompass instructions in a RISC architecture or instructions in a CISC architecture, and instructions used in other computer architectures. Other embodiments will be readily apparent to those skilled in the art and may be made without departing from the spirit and scope of the invention as defined by the claims.

従来の分岐予測器の回路ブロック図である。It is a circuit block diagram of the conventional branch predictor. 本発明の一実施形態に従った、プロセッサ用の変換索引バッファ相関型分岐予測器の回路ブロック図である。FIG. 3 is a circuit block diagram of a transform index buffer correlated branch predictor for a processor according to one embodiment of the present invention. 本発明の一実施形態に従った方法の流れ図である。2 is a flow diagram of a method according to an embodiment of the invention. 本発明の一実施形態に従って使用される、1つ又は複数のプロセッサ及びメモリを含むコンピュータシステムのブロック図である。1 is a block diagram of a computer system including one or more processors and memory used in accordance with one embodiment of the present invention.

Claims (25)

実行中の命令における分岐結果をプロセッサにて予測する分岐予測回路を有する分岐予測器であって、前記分岐予測回路は:
複数の分岐予測入力項目を格納するパターン履歴表;及び
前記パターン履歴表に結合され、且つ変換索引バッファミス信号ラインを介して変換索引バッファに結合されて、パターン履歴値を出力する履歴シフトレジスタであり、前記パターン履歴値は、分岐アドレスに一致するとき、分岐予測を実行するために前記パターン履歴表から1つの分岐予測入力項目を選択するために使用され、当該履歴シフトレジスタは、前記変換索引バッファミス信号ラインからのミス信号を受けて当該履歴シフトレジスタ自身をクリアする履歴シフトレジスタ;
を有する、分岐予測器。
The branching results in executing instruction a branch predictor having a branch prediction circuit for predicting in processor, the branch prediction circuit:
A pattern history table storing a plurality of branch prediction input items ; and a history shift register coupled to the pattern history table and coupled to the conversion index buffer via a conversion index buffer miss signal line to output a pattern history value And the pattern history value is used to select one branch prediction input item from the pattern history table to execute branch prediction when the pattern history value matches the branch address, and the history shift register includes the conversion index receiving a miss signal from the buffer miss signal line clears the history shift register itself, history shift register;
A branch predictor.
前記分岐予測回路が:
前記履歴シフトレジスタに結合されたメモリであり、前記変換索引バッファミス信号ラインからのミス信号を受けてクリア値を前記履歴シフトレジスタに渡すメモリ;
をさらに有するところの請求項1に記載の分岐予測器。
The branch prediction circuit:
A memory coupled to the history shift register and receiving a miss signal from the conversion index buffer miss signal line and passing a clear value to the history shift register;
The branch predictor according to claim 1, further comprising:
前記メモリが3状態バッファを有するところの請求項2に記載の分岐予測器。  The branch predictor of claim 2, wherein the memory has a tristate buffer. 前記分岐予測回路が:
前記履歴シフトレジスタに結合されたフィードバックループであり前記履歴シフトレジスタからシフトアウトされる最上位ビット値に応じて、前記履歴シフトレジスタの前記最上位ビット値を維持するフィードバックループ;
をさらに有するところの請求項2に記載の分岐予測器。
The branch prediction circuit:
The history shift is coupled feedback loop register, in accordance with the most significant bit value is shifted out of the history shift register, a feedback loop that maintains the most significant bit value of the history shift register;
The branch predictor according to claim 2, further comprising:
前記フィードバックループは、シフトアウトされる前記最上位ビット値が1であるとき、前記最上位ビット値を1に維持するところの請求項4に記載の分岐予測器。5. The branch predictor according to claim 4, wherein the feedback loop maintains the most significant bit value at 1 when the most significant bit value to be shifted out is 1 . 前記履歴シフトレジスタにおける最上位の値1のビット位置が、前記履歴シフトレジスタに格納されたグローバル分岐履歴の長さを決定するところの請求項4に記載の分岐予測器。  The branch predictor according to claim 4, wherein the bit position of the most significant value 1 in the history shift register determines the length of the global branch history stored in the history shift register. 前記履歴シフトレジスタに格納された前記グローバル分岐履歴の長さが、前記最上位の値1の前記ビット位置によって定められるところの請求項6に記載の分岐予測器。  The branch predictor according to claim 6, wherein the length of the global branch history stored in the history shift register is determined by the bit position of the most significant value 1. 前記フィードバックループが:
前記履歴シフトレジスタに結合され、前記履歴シフトレジスタの出力ビット値、及びイネーブル信号を受け取る論理積ゲート;及び
前記論理積ゲート及び前記履歴シフトレジスタに結合され、前記論理積ゲートからの第1の入力値及び前記履歴シフトレジスタからの第2最上位ビットの値である第2の入力値を受け取り、且つ新たなビット値を前記履歴シフトレジスタの最上位ビットに出力する論理和ゲート;
を有するところの請求項4に記載の分岐予測器。
The feedback loop is:
An AND gate coupled to the history shift register and receiving an output bit value of the history shift register and an enable signal; and a first input from the AND gate coupled to the AND gate and the history shift register. An OR gate that receives a value and a second input value that is the value of the second most significant bit from the history shift register and outputs a new bit value to the most significant bit of the history shift register;
The branch predictor according to claim 4, comprising:
前記履歴シフトレジスタが可変長のグローバル分岐履歴を含んでいるところの請求項1に記載の分岐予測器。  2. The branch predictor of claim 1, wherein the history shift register includes a variable length global branch history. 前記分岐アドレスを排他的論理和ゲートに出力する分岐アドレスレジスタを更に有し、前記履歴シフトレジスタが、mビットを有し、且つmビットのパターン履歴値を前記パターン履歴表に前記排他的論理和ゲートを介して出力するところの請求項1に記載の分岐予測器。 Further comprising, the history shift register having m bits, and the exclusive pattern historical values of m bits to the pattern history table branch address register for outputting the branch address to the exclusive OR gates The branch predictor according to claim 1, wherein the branch predictor outputs via a gate. 前記排他的論理和ゲートが、mビットの前記パターン履歴値及びmビットの分岐アドレス値を受け取り、且つmビットのパターン履歴値を前記パターン履歴表に出力するところの請求項10に記載の分岐予測器。  The branch prediction according to claim 10, wherein the exclusive OR gate receives the m-bit pattern history value and the m-bit branch address value, and outputs the m-bit pattern history value to the pattern history table. vessel. 分岐予測回路であり、
複数の分岐予測入力項目を格納するパターン履歴表;
前記パターン履歴表及び変換索引バッファに結合され、グローバル分岐履歴を含むパターン履歴値を出力するmビット履歴シフトレジスタ;及び
前記履歴シフトレジスタ内に表された各分岐のアドレスを格納し、格納した分岐アドレス群から分岐アドレスを出力する分岐アドレスレジスタ;
を有する分岐予測回路;
前記変換索引バッファ及び前記分岐予測回路に結合され、前記変換索引バッファのミスを示すものを受けて前記分岐予測回路にmビットの入力クリア値を提供するメモリ;並びに
前記分岐予測回路に結合され、前記グローバル分岐履歴の長さがm-1に等しいとき前記mビット履歴シフトレジスタの最上位ビット値を維持するフィードバックループ;
を有する分岐予測器であって、
前記mビット履歴シフトレジスタは、前記変換索引バッファの前記ミスを示すものを受けて、前記mビットの入力クリア値を格納し、且つ
出力された前記パターン履歴値は、出力された前記分岐アドレスに一致するとき、分岐予測を実行するために前記パターン履歴表から1つの分岐予測入力項目を選択するために使用される、
分岐予測器。
A branch prediction circuit ,
Pattern history table that stores multiple branch prediction input items;
An m-bit history shift register coupled to the pattern history table and the translation index buffer for outputting a pattern history value including a global branch history; and
A branch address register that stores an address of each branch represented in the history shift register and outputs a branch address from the stored branch address group;
A branch prediction circuit having:
Coupled to and said branch prediction circuit; said translation lookaside buffer and coupled to said branch prediction circuitry, the memory provides an input clear value of m bits to the branch prediction circuit receives an indication of a mistake of the translation lookaside buffer A feedback loop that maintains the most significant bit value of the m-bit history shift register when the length of the global branch history is equal to m−1;
A branch predictor having
The m-bit history shift register receives the indication of the miss in the conversion index buffer, stores the m-bit input clear value, and
When the output pattern history value matches the output branch address, it is used to select one branch prediction input item from the pattern history table to perform branch prediction.
Branch predictor.
前記メモリが前記履歴シフトレジスタに結合されているところの請求項12に記載の分岐予測器。  The branch predictor of claim 12, wherein the memory is coupled to the history shift register. 前記メモリが3状態バッファを有するところの請求項12に記載の分岐予測器。  The branch predictor of claim 12, wherein the memory has a tri-state buffer. 前記フィードバックループが:
前記履歴シフトレジスタに結合され、前記履歴シフトレジスタの出力ビット値、及びイネーブル信号を受け取る論理積ゲート;及び
前記論理積ゲート及び前記履歴シフトレジスタに結合され、前記論理積ゲートからの第1の入力値及び前記履歴シフトレジスタからの第2最上位ビットの値である第2の入力値を受け取り、且つ新たなビット値を前記履歴シフトレジスタの最上位ビットに出力する論理和ゲート;
を有するところの請求項12に記載の分岐予測器。
The feedback loop is:
An AND gate coupled to the history shift register and receiving an output bit value of the history shift register and an enable signal; and a first input from the AND gate coupled to the AND gate and the history shift register. An OR gate that receives a value and a second input value that is the value of the second most significant bit from the history shift register and outputs a new bit value to the most significant bit of the history shift register;
The branch predictor according to claim 12, comprising:
変換索引バッファ;
分岐予測回路であり、
複数の分岐予測入力項目を格納するパターン履歴表;
前記パターン履歴表及び変換索引バッファに結合され、グローバル分岐履歴を含むパターン履歴値を出力するmビット履歴シフトレジスタ;及び
前記履歴シフトレジスタ内に表された各分岐のアドレスを格納し、格納した分岐アドレス群から分岐アドレスを出力する分岐アドレスレジスタ;
を有する分岐予測回路;
前記変換索引バッファ及び前記分岐予測回路に結合され、前記変換索引バッファのミスを示すものを受けて前記分岐予測回路にmビットの入力クリア値を提供するメモリ;並びに
前記分岐予測回路に結合され、前記グローバル分岐履歴の長さがm-1に等しいとき前記mビット履歴シフトレジスタの最上位ビット値を維持するフィードバックループ;
を有するプロセッサであって、
前記mビット履歴シフトレジスタは、前記変換索引バッファの前記ミスを示すものを受けて、前記mビットの入力クリア値を格納し、且つ
出力された前記パターン履歴値は、出力された前記分岐アドレスに一致するとき、分岐予測を実行するために前記パターン履歴表から1つの分岐予測入力項目を選択するために使用される、
プロセッサ。
Conversion index buffer;
A branch prediction circuit,
Pattern history table that stores multiple branch prediction input items;
An m-bit history shift register coupled to the pattern history table and the translation index buffer for outputting a pattern history value including a global branch history; and
A branch address register that stores an address of each branch represented in the history shift register and outputs a branch address from the stored branch address group;
A branch prediction circuit having:
Coupled to and said branch prediction circuit; said translation lookaside buffer and coupled to said branch prediction circuitry, the memory provides an input clear value of m bits to the branch prediction circuit receives an indication of a mistake of the translation lookaside buffer A feedback loop that maintains the most significant bit value of the m-bit history shift register when the length of the global branch history is equal to m−1;
A processor having:
The m-bit history shift register receives the indication of the miss in the conversion index buffer, stores the m-bit input clear value, and
When the output pattern history value matches the output branch address, it is used to select one branch prediction input item from the pattern history table to perform branch prediction.
Processor.
前記メモリが前記履歴シフトレジスタに結合されているところの請求項16に記載のプロセッサ。  The processor of claim 16, wherein the memory is coupled to the history shift register. 前記メモリが3状態バッファを有するところの請求項16に記載のプロセッサ。  The processor of claim 16, wherein the memory comprises a tri-state buffer. 前記フィードバックループが:
前記履歴シフトレジスタに結合され、前記履歴シフトレジスタの出力ビット値、及びイネーブル信号を受け取る論理積ゲート;及び
前記論理積ゲート及び前記履歴シフトレジスタに結合され、前記論理積ゲートからの第1の入力値及び前記履歴シフトレジスタからの第2最上位ビットの値である第2の入力値を受け取り、且つ新たなビット値を前記履歴シフトレジスタの最上位ビットに出力する論理和ゲート;
を有するところの請求項16に記載のプロセッサ。
The feedback loop is:
An AND gate coupled to the history shift register and receiving an output bit value of the history shift register and an enable signal; and a first input from the AND gate coupled to the AND gate and the history shift register. An OR gate that receives a value and a second input value that is the value of the second most significant bit from the history shift register and outputs a new bit value to the most significant bit of the history shift register;
The processor of claim 16, comprising:
メモリ;
前記メモリに結合されたプロセッサであり、
変換索引バッファ;及び
分岐予測回路であり、
複数の分岐予測入力項目を格納するパターン履歴表;
前記パターン履歴表及び変換索引バッファに結合され、グローバル分岐履歴を含むパターン履歴値を出力するmビット履歴シフトレジスタ;及び
前記履歴シフトレジスタ内に表された各分岐のアドレスを格納し、格納した分岐アドレス群から分岐アドレスを出力する分岐アドレスレジスタ;
を有する分岐予測回路;
を有するプロセッサ;
前記変換索引バッファ及び前記分岐予測回路に結合され、前記変換索引バッファのミスを示すものを受けて前記分岐予測回路にmビットの入力クリア値を提供するメモリ;並びに
前記分岐予測回路に結合され、前記グローバル分岐履歴の長さがm-1に等しいとき前記mビット履歴シフトレジスタの最上位ビット値を維持するフィードバックループ;
を有する計算システムであって、
前記mビット履歴シフトレジスタは、前記変換索引バッファの前記ミスを示すものを受けて、前記mビットの入力クリア値を格納し、且つ
出力された前記パターン履歴値は、出力された前記分岐アドレスに一致するとき、分岐予測を実行するために前記パターン履歴表から1つの分岐予測入力項目を選択するために使用される、
計算システム。
memory;
A processor coupled to the memory;
Conversion index buffer; and
A branch prediction circuit,
Pattern history table that stores multiple branch prediction input items;
An m-bit history shift register coupled to the pattern history table and the translation index buffer for outputting a pattern history value including a global branch history; and
A branch address register that stores an address of each branch represented in the history shift register and outputs a branch address from the stored branch address group;
A branch prediction circuit having:
A processor having:
A memory coupled to the conversion index buffer and the branch prediction circuit and receiving an indication of a miss in the conversion index buffer and providing an m-bit input clear value to the branch prediction circuit; and coupled to the branch prediction circuit; A feedback loop that maintains the most significant bit value of the m-bit history shift register when the length of the global branch history is equal to m−1;
A computing system comprising:
The m-bit history shift register receives the indication of the miss in the conversion index buffer, stores the m-bit input clear value, and
When the output pattern history value matches the output branch address, it is used to select one branch prediction input item from the pattern history table to perform branch prediction.
Calculation system.
前記メモリが前記履歴シフトレジスタに結合されているところの請求項20に記載の計算システム。  21. The computing system of claim 20, wherein the memory is coupled to the history shift register. 実行中の複数の命令の分岐結果をプロセッサ内で予測するステップを有する方法であって、実行中の複数の命令の分岐結果をプロセッサ内で予測する前記ステップは:
前記実行中の複数の命令の各々に対して分岐結果を予測するステップ;
前記実行中の複数の命令の各々に対して予測された分岐結果を維持するステップ;及び
前記実行中の複数の命令の1つに関連するデータに関して変換索引バッファにミスが生じたことを示すものを受けてグローバル分岐履歴をクリアするステップ;
を有する、方法。
The branch result of a plurality of instructions being executed by a method comprising the step of predicting within processor, wherein said step of predicting the branch outcome of a plurality of instructions being executed in a processor comprising:
Predicting a branch result for each of the plurality of executing instructions;
Maintaining a predicted branch result for each of the plurality of executing instructions; and indicating that a translation index buffer miss has occurred with respect to data associated with one of the plurality of executing instructions Receiving and clearing the global branch history;
Having a method.
変換索引バッファにミスが生じたことを示すものを受けてグローバル分岐履歴をクリアする前記ステップが、:
前記グローバル分岐履歴を所定のクリア値で置換すること
を有するところの請求項22に記載の方法。
The step of clearing the global branch history in response to an indication that a mistake has occurred in the translation index buffer comprises:
23. The method of claim 22, comprising replacing the global branch history with a predetermined clear value.
実行中の複数の命令の分岐結果を予測するステップを有する方法をプロセッサに実行させる実行可能な命令を格納した機械読み取り可能媒体であって
実行中の複数の命令の分岐結果を予測する前記ステップは:
前記実行中の複数の命令の各々に対して分岐結果を予測するステップ;
前記実行中の複数の命令の各々に対して予測された分岐結果を維持するステップ;及び
前記実行中の複数の命令の1つに関連するデータに関して変換索引バッファにミスが生じたことを示すものを受けてグローバル分岐履歴をクリアするステップ;
を有する
機械読み取り可能媒体。
The branch result of a plurality of instructions being executed by a machine-readable medium having stored thereon executable instructions that cause a processor for execution of the method with a step to predict,
Wherein the step of the branch results to predict a plurality of instructions being executed:
Predicting a branch result for each of the plurality of executing instructions;
Maintaining a predicted branch result for each of the plurality of executing instructions; and indicating that a translation index buffer miss has occurred with respect to data associated with one of the plurality of executing instructions Receiving and clearing the global branch history;
Having,
Machine-readable medium.
変換索引バッファにミスが生じたことを示すものを受けてグローバル分岐履歴をクリアする前記ステップは、
前記グローバル分岐履歴を所定のクリア値で置換すること
を有する
請求項24に記載の機械読み取り可能媒体。
Receiving the indication that a mistake has occurred in the translation index buffer and clearing the global branch history ;
Replacing the global branch history with a predetermined clear value ;
25. A machine readable medium according to claim 24.
JP2007513656A 2004-06-02 2004-06-02 TLB correlation type branch predictor and method of using the same Expired - Fee Related JP4533432B2 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2004/000583 WO2005119428A1 (en) 2004-06-02 2004-06-02 Tlb correlated branch predictor and method for use therof

Publications (2)

Publication Number Publication Date
JP2008501166A JP2008501166A (en) 2008-01-17
JP4533432B2 true JP4533432B2 (en) 2010-09-01

Family

ID=35463053

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007513656A Expired - Fee Related JP4533432B2 (en) 2004-06-02 2004-06-02 TLB correlation type branch predictor and method of using the same

Country Status (4)

Country Link
JP (1) JP4533432B2 (en)
CN (1) CN1961285B (en)
DE (1) DE112004002877T5 (en)
WO (1) WO2005119428A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7984279B2 (en) * 2006-11-03 2011-07-19 Qualcomm Incorporated System and method for using a working global history register
GB2577708B (en) 2018-10-03 2022-09-07 Advanced Risc Mach Ltd An apparatus and method for monitoring events in a data processing system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04337833A (en) * 1991-05-15 1992-11-25 Koufu Nippon Denki Kk Data processor
IE940855A1 (en) * 1993-12-20 1995-06-28 Motorola Inc Data processor with speculative instruction fetching and¹method of operation
US6079003A (en) * 1997-11-20 2000-06-20 Advanced Micro Devices, Inc. Reverse TLB for providing branch target address in a microprocessor having a physically-tagged cache
US5938761A (en) * 1997-11-24 1999-08-17 Sun Microsystems Method and apparatus for branch target prediction
US6427206B1 (en) * 1999-05-03 2002-07-30 Intel Corporation Optimized branch predictions for strongly predicted compiler branches
US6546481B1 (en) * 1999-11-05 2003-04-08 Ip - First Llc Split history tables for branch prediction
US6681345B1 (en) * 2000-08-15 2004-01-20 International Business Machines Corporation Field protection against thread loss in a multithreaded computer processor

Also Published As

Publication number Publication date
WO2005119428A1 (en) 2005-12-15
CN1961285B (en) 2011-05-25
CN1961285A (en) 2007-05-09
JP2008501166A (en) 2008-01-17
DE112004002877T5 (en) 2007-05-03

Similar Documents

Publication Publication Date Title
US7114059B2 (en) System and method to bypass execution of instructions involving unreliable data during speculative execution
US7962725B2 (en) Pre-decoding variable length instructions
JP3919802B2 (en) Processor and method for scheduling instruction operations in a processor
US6247122B1 (en) Method and apparatus for performing branch prediction combining static and dynamic branch predictors
US8938605B2 (en) Instruction cracking based on machine state
JP3594506B2 (en) Microprocessor branch instruction prediction method.
JP5231403B2 (en) Sliding window block based branch target address cache
JP2014002735A (en) Zero cycle load
JP2005500616A (en) Branch prediction with 2-level branch prediction cache
TW201403472A (en) Optimizing register initialization operations
JP2009536770A (en) Branch address cache based on block
US10664280B2 (en) Fetch ahead branch target buffer
US7487334B2 (en) Branch encoding before instruction cache write
WO2007019001A1 (en) Call return stack way prediction repair
US10691460B2 (en) Pointer associated branch line jumps for accelerated line jumps
JP7046087B2 (en) Cache Miss Thread Balancing
US6948053B2 (en) Efficiently calculating a branch target address
US7640419B2 (en) Method for and a trailing store buffer for use in memory renaming
US20060015706A1 (en) TLB correlated branch predictor and method for use thereof
JP4533432B2 (en) TLB correlation type branch predictor and method of using the same
US7600102B2 (en) Condition bits for controlling branch processing
US6816962B2 (en) Re-encoding illegal OP codes into a single illegal OP code to accommodate the extra bits associated with pre-decoded instructions
US7783692B1 (en) Fast flag generation
US11663126B1 (en) Return address table branch predictor
JP2023047283A (en) Scalable toggle point control circuit for clustered decode pipeline

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080604

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080617

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080912

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081014

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20090113

A602 Written permission of extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A602

Effective date: 20090120

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20090216

A602 Written permission of extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A602

Effective date: 20090223

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090316

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100126

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100421

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100525

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100611

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130618

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees