JP2000227857A - Information processor for branch destination associative storage system - Google Patents

Information processor for branch destination associative storage system

Info

Publication number
JP2000227857A
JP2000227857A JP11028941A JP2894199A JP2000227857A JP 2000227857 A JP2000227857 A JP 2000227857A JP 11028941 A JP11028941 A JP 11028941A JP 2894199 A JP2894199 A JP 2894199A JP 2000227857 A JP2000227857 A JP 2000227857A
Authority
JP
Japan
Prior art keywords
branch
instruction
address
associative memory
branch destination
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.)
Withdrawn
Application number
JP11028941A
Other languages
Japanese (ja)
Inventor
Teruhito Tamura
輝人 田村
Toru Hiraoka
徹 平岡
Kazuo Oshima
和郎 尾島
Tomonaga Itoi
朋永 糸井
Masashi Hakamata
正史 袴田
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.)
Hitachi Ltd
Hitachi Solutions Technology Ltd
Original Assignee
Hitachi Ltd
Hitachi ULSI Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd, Hitachi ULSI Systems Co Ltd filed Critical Hitachi Ltd
Priority to JP11028941A priority Critical patent/JP2000227857A/en
Publication of JP2000227857A publication Critical patent/JP2000227857A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide accurate branch prediction by performing an appropriate amount of registration/deletion by independently performing the registration/ deletion to/from first and second branch destination associative memories. SOLUTION: This device is provided with means 15-1 and 15-2 for respectively and independently holding the results of reference to a first low-speed large- capacity branch destination associative memory 12 and a second high-speed small-capacity branch destination associative memory 13 for storing, respectively, the instruction address and branch destination address of a branching instruction according to the execution history of branching instructions in the past, means 17-1 and 17-2 for respectively and independently discriminating branch establishment/non-establishment according to held predictive information and means 18-1 and 18-2 for respectively and independently performing the registration/deletion to/from the first and second branch destination associative memories 12 and 13 according to the discriminated result.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はパイプライン制御等
の命令語の先取りを行う情報処理装置に関し、特に分岐
先連想記憶を用い、分岐先命令を先行して読み出して分
岐命令の処理を高速化する分岐先連想記憶方式の情報処
理装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information processing apparatus for prefetching an instruction word such as a pipeline control, and more particularly, to speed up processing of a branch instruction by reading out a branch instruction in advance using a branch associative memory. The present invention relates to a branch destination associative storage type information processing apparatus.

【0002】[0002]

【従来の技術】従来、パイプライン制御の情報処理装置
等においては、分岐命令の処理を高速に行うため、過去
に実行された分岐命令のアドレスと分岐先のアドレスを
対にして格納した分岐先連想記憶を用い、分岐先命令を
先行して読み出しパイプラインの乱れを小さくする制御
が行われている。
2. Description of the Related Art Conventionally, in a pipeline-controlled information processing device or the like, in order to process a branch instruction at a high speed, a branch destination storing a pair of an address of a previously executed branch instruction and a branch destination address is stored. Control is performed using associative memory to reduce the disturbance of the read pipeline ahead of the branch destination instruction.

【0003】分岐先連想記憶は多数の登録が必要である
ため、大容量のRAMで構成する場合が多い。しかし、
RAMはレジスタに比べアクセスに時間がかかるため、
大容量のRAMで構成される第1の分岐先連想記憶に加
えて、小容量ではあるがレジスタで構成される第2の分
岐先連想記憶を設置し、第2の分岐先連想記憶により高
速に分岐先命令を読み出す方式がとられている。この分
岐先連想記憶の階層化については、例えば特開平3−6
3726号公報に記載されている。
[0003] The branch destination associative memory requires a large number of registrations, and is often constituted by a large-capacity RAM. But,
RAM takes longer to access than registers,
In addition to the first branch destination associative memory composed of a large-capacity RAM, a second branch destination associative memory having a small capacity but composed of registers is provided, and the second branch destination associative memory is operated at high speed. A method of reading a branch destination instruction is employed. The hierarchization of the branch destination associative memory is described in, for example,
No. 3726.

【0004】以下、図8から図12を参照して、従来技
術の分岐先連想記憶方式の情報処理装置による分岐命令
の高速処理について説明する。
A high-speed processing of a branch instruction by a conventional information processing apparatus of a branch destination associative memory system will be described below with reference to FIGS.

【0005】図8は、分岐先命令の読み出しを高速化す
る従来の分岐先連想記憶方式の情報処理装置の一般的ブ
ロック図である。図8において、1はアドレスレジスタ
A、2はアドレスレジスタB、3は分岐命令アドレスレ
ジスタ、4は分岐先アドレスレジスタ、5はアドレス比
較回路A、6は優先度制御回路、7は分岐先アドレス選
択回路、8は分岐命令アドレスアレイ、9は分岐先アド
レスアレイ、10はアドレス比較回路B、11は分岐先
アドレスアレイレジスタ、12は第1の分岐先連想記
憶、13は第2の分岐先連想記憶、14は命令読み出し
制御回路、15は予測情報保持回路、16は分岐制御回
路、17は分岐判定比較回路、18は登録削除制御回
路、19は分岐命令アドレス選択回路である。ここで、
第1の分岐先連想記憶12はRAMで構成され、その分
岐命令アドレスアレイ8には、過去命令に対する命令ア
ドレスが格納され、分岐命令アドレスアレイ9には、分
岐命令アドレスアレイ8の命令アドレスに対応してその
分岐先アドレスが格納される。第2の分岐先連想記憶1
3はレジスタで構成され、その分岐命令アドレスレジス
タ3には、例えば最新の分岐命令に対する命令アドレス
が格納され、分岐先アドレスレジスタには、分岐命令ア
ドレスレジスタ3の命令アドレスに対応してその分岐先
アドレスが格納される。
FIG. 8 is a general block diagram of a conventional branch destination associative memory type information processing apparatus for speeding up the reading of a branch destination instruction. 8, 1 is an address register A, 2 is an address register B, 3 is a branch instruction address register, 4 is a branch destination address register, 5 is an address comparison circuit A, 6 is a priority control circuit, and 7 is a branch destination address selection. Circuit, 8 is a branch instruction address array, 9 is a branch destination address array, 10 is an address comparison circuit B, 11 is a branch destination address array register, 12 is a first branch destination associative memory, and 13 is a second branch destination associative memory. , 14 is an instruction read control circuit, 15 is a prediction information holding circuit, 16 is a branch control circuit, 17 is a branch determination comparison circuit, 18 is a registration deletion control circuit, and 19 is a branch instruction address selection circuit. here,
The first branch destination associative memory 12 is composed of a RAM, and its branch instruction address array 8 stores instruction addresses for past instructions, and the branch instruction address array 9 corresponds to the instruction addresses of the branch instruction address array 8. Then, the branch destination address is stored. Second branch destination associative memory 1
Reference numeral 3 denotes a register. The branch instruction address register 3 stores, for example, the instruction address of the latest branch instruction. The branch destination address register stores the branch destination address corresponding to the instruction address of the branch instruction address register 3. The address is stored.

【0006】まず、第2の分岐先連想記憶13に分岐命
令の命令アドレス情報が登録されておらず、第1の分岐
先連想記憶12のみに分岐命令の命令アドレス情報が登
録されている場合の分岐先命令の読み出しについて、図
9のタイムチャートで説明する。
First, the case where the instruction address information of the branch instruction is not registered in the second branch destination associative memory 13 and the instruction address information of the branch instruction is registered only in the first branch destination associative memory 12 is described. The reading of the branch destination instruction will be described with reference to the time chart of FIG.

【0007】図9において、上部の横軸はパイプライン
の実行サイクルを示しており、1〜17までの順次のサ
イクルを参照可能にするため、便宜上番号付けしたサイ
クル番号を示したものである。またD、A、T、B、
L、E、Di、及び、Ai、Ti、Bi、Liはパイプ
ラインステージを表し、Dは命令のデコード、Aはアド
レス計算、Tはアドレス変換、Bはメモリアクセス、L
はメモリ読み出しデータの転送、Eは命令の実行、Di
は読み出す命令語の命令アドレス生成のためのアドレス
情報の取り出し、Aiは読み出す命令語の命令アドレス
生成および読み出しリクエスト発行、Tiは命令読み出
し時のアドレス変換、Biは命令読み出し時のメモリア
クセス、Liは命令読み出し時のメモリ読み出しデータ
の転送を行うことを表している。
[0009] In FIG. 9, the horizontal axis at the top indicates the execution cycle of the pipeline, and indicates the cycle number given for convenience in order to make it possible to refer to the sequential cycles 1 to 17. D, A, T, B,
L, E, Di, and Ai, Ti, Bi, Li represent pipeline stages, D is instruction decoding, A is address calculation, T is address conversion, B is memory access, L is memory access,
Is transfer of memory read data, E is instruction execution, Di
Fetches address information for generating the instruction address of the instruction word to be read, Ai generates the instruction address of the instruction word to be read and issues a read request, Ti is the address conversion at the time of reading the instruction, Bi is the memory access at the time of reading the instruction, and Li is This indicates that the memory read data is transferred when the instruction is read.

【0008】図9でパイプライン制御による命令の処理
は、分岐命令1が分岐成立して分岐先命令2へと続くも
のとする。命令読み出し制御回路14にて、サイクル1
より分岐命令1を含む命令語の命令読み出し処理が開始
され、サイクル2で読み出す命令語の命令アドレスを生
成し、サイクル3で、サイクル2で生成した命令アドレ
スを線100よりアドレスレジスタA1に受ける。分岐
命令アドレス選択回路19は第1の分岐先連想記憶12
から分岐命令の命令アドレスを参照する場合はアドレス
レジスタA1のアドレスを選択し、第1の分岐先連想記
憶12へ登録または削除を行う時は登録削除制御回路1
8から送出される命令アドレスを選択する。本ケースで
は、選択回路19はアドレスレジスタA1の命令アドレ
スを選択し、アドレスレジスタB2に送出する。サイク
ル4で、アドレスレジスタA1の命令アドレスを第1の
分岐先連想記憶13内のアドレスレジスタB2で受け、
該アドレスレジスタB2の一部を第1の分岐先連想記憶
12の読み出す場所を示すアドレスとして分岐命令アド
レスアレイ8から分岐命令アドレスを読み出し、アドレ
スレジスタB2の命令アドレスと分岐命令アドレスアレ
イ8から読み出した分岐命令アドレスをアドレス比較回
路B10で比較を行い、分岐命令1の命令アドレスが分
岐命令アドレスアレイ8に登録されているかを検出し、
登録されていることが検出された場合、検出信号を優先
度制御回路6へ線101を介して送出し、また、検出さ
れた分岐命令1に対応する分岐先アドレスを分岐先アド
レスアレイ9より読み出す。サイクル5では、サイクル
4で分岐先アドレスアレイ9から読み出した分岐先アド
レスを分岐先アドレスアレイレジスタ11で受け、線1
02を介して分岐先アドレス選択回路7へ該分岐先アド
レスを送出する。優先度制御回路6では、サイクル4で
線101を介して受けた検出信号により、第1の分岐先
連想記憶12から読み出した分岐先アドレスを選択する
信号を線103を介して分岐先アドレス選択回路7に送
出し、線101を介して受けた検出信号を命令読み出し
制御回路14に送出する。分岐先アドレス選択回路7
は、優先度制御回路6から線103を介して受けた選択
信号により、線102の分岐命令アドレスアレイレジス
タ11からの分岐先アドレスを命令読み出し制御回路1
4に送出する。こうして、命令読み出し制御回路14の
制御下で、サイクル8で分岐先命令2の読み出しが完了
し、サイクル9から分岐先命令2のデコードが開始さ
れ、サイクル14で分岐先命令2の処理が完了する。
[0009] In FIG. 9, the instruction processing by the pipeline control is such that the branch instruction 1 is taken and the branch instruction 2 continues. Cycle 1 in the instruction read control circuit 14
The instruction reading process of the instruction word including the branch instruction 1 is started, the instruction address of the instruction word to be read in cycle 2 is generated, and the instruction address generated in cycle 2 is received from the line 100 to the address register A1 in cycle 3. The branch instruction address selection circuit 19 stores the first branch destination associative memory 12
When the instruction address of the branch instruction is referred to from, the address of the address register A1 is selected, and when registration or deletion to the first branch destination associative memory 12 is performed, the registration / deletion control circuit 1
8 selects the instruction address sent out. In this case, the selection circuit 19 selects the instruction address of the address register A1 and sends it to the address register B2. In cycle 4, the instruction address of the address register A1 is received by the address register B2 in the first branch destination associative memory 13,
The branch instruction address is read from the branch instruction address array 8 as a part of the address register B2 indicating the location where the first branch destination associative memory 12 is to be read, and the instruction address of the address register B2 and the branch instruction address array 8 are read. The branch instruction address is compared by the address comparison circuit B10 to detect whether the instruction address of the branch instruction 1 is registered in the branch instruction address array 8,
When the registration is detected, a detection signal is transmitted to the priority control circuit 6 via the line 101, and a branch destination address corresponding to the detected branch instruction 1 is read from the branch destination address array 9. . In cycle 5, the branch destination address read from the branch destination address array 9 in cycle 4 is received by the branch destination address array register 11, and the line 1
The branch destination address is sent to the branch destination address selection circuit 7 through the line 02. In the priority control circuit 6, a signal for selecting the branch destination address read from the first branch destination associative memory 12 is supplied via the line 103 to the branch destination address selection circuit based on the detection signal received via the line 101 in the cycle 4. 7, and sends the detection signal received via the line 101 to the command readout control circuit 14. Branch destination address selection circuit 7
The instruction read control circuit 1 reads the branch destination address from the branch instruction address array register 11 on the line 102 according to the selection signal received from the priority control circuit 6 via the line 103.
4 Thus, under the control of the instruction read control circuit 14, the reading of the branch destination instruction 2 is completed in cycle 8, the decoding of the branch destination instruction 2 is started in cycle 9, and the processing of the branch destination instruction 2 is completed in cycle 14. .

【0009】次に、第2の分岐先連想記憶13のみに分
岐命令1のアドレス情報が登録されている場合につい
て、図10のタイムチャートで説明する。
Next, a case where the address information of the branch instruction 1 is registered only in the second branch destination associative memory 13 will be described with reference to a time chart of FIG.

【0010】サイクル1より分岐命令1を含む命令語の
命令読み出し処理が開始され、サイクル2で読み出す命
令語の命令アドレスを生成し、サイクル3で、サイクル
2で生成した命令アドレスを線100よりアドレスレジ
スタA1に受け、該アドレスレジスタA1の内容と第2
の分岐先連想記憶13内の分岐命令アドレスレジスタ3
の内容とをアドレス比較回路A5で比較を行い、分岐命
令1の命令アドレスが分岐命令アドレスレジスタ3に登
録されているかどうかを検出し、登録されていることが
検出された場合、検出信号を優先度制御回路6へ線10
4を介して送出し、また、検出された分岐命令1に対応
する分岐先アドレスを分岐先アドレスレジスタ4より読
み出し、線105を介して分岐先アドレス選択回路7へ
送出する。優先度制御回路6では、線104を介して受
けた検出信号により、第2の分岐先連想記憶13から読
み出した分岐先アドレスを選択する信号を線103を介
して分岐先アドレス選択回路7に送出し、線105を介
して受けた検出信号を命令読み出し制御回路14に送出
する。分岐先アドレス選択回路7は、優先度制御回路6
からの選択信号により、線105の分岐先アドレスレジ
スタ4の分岐先アドレスを命令読み出し制御回路14に
送出する。こうして、サイクル6で分岐先命令読み出し
が完了し、サイクル7から分岐先命令のデコードが開始
され、サイクル12で分岐先命令の処理が完了する。
The instruction reading process of the instruction word including the branch instruction 1 is started in cycle 1, the instruction address of the instruction word to be read in cycle 2 is generated, and in cycle 3, the instruction address generated in cycle 2 is transferred from the line 100 to the address. The contents of the address register A1 and the second
Branch instruction address register 3 in the branch destination associative memory 13
Is compared by the address comparison circuit A5 to detect whether or not the instruction address of the branch instruction 1 is registered in the branch instruction address register 3. If it is detected that the instruction address is registered, the detection signal is prioritized. Line 10 to degree control circuit 6
4, the branch destination address corresponding to the detected branch instruction 1 is read from the branch destination address register 4, and transmitted to the branch destination address selection circuit 7 via the line 105. The priority control circuit 6 sends a signal for selecting a branch destination address read from the second branch associative memory 13 to the branch destination address selection circuit 7 via the line 103 based on the detection signal received via the line 104. Then, the detection signal received via the line 105 is sent to the command readout control circuit 14. The branch destination address selection circuit 7 includes a priority control circuit 6
The branch destination address of the branch destination address register 4 on the line 105 is sent to the instruction read control circuit 14 in response to the selection signal from. Thus, the reading of the branch destination instruction is completed in cycle 6, the decoding of the branch destination instruction is started in cycle 7, and the processing of the branch destination instruction is completed in cycle 12.

【0011】このように、レジスタ構成の高速の第2の
分岐先連想記憶13を持つことにより、従来技術では、
読み出す命令語に含まれている分岐命令の命令アドレス
が分岐先連想記憶に登録されているかどうかの検出を高
速化し、分岐先命令の読み出しを高速に行うことで、分
岐命令の処理時間を短縮している。
As described above, by having the high-speed second branch destination associative memory 13 having a register configuration, in the prior art,
The speed of detecting whether the instruction address of the branch instruction included in the instruction word to be read is registered in the branch destination associative memory is increased, and the processing time of the branch instruction is reduced by reading the branch destination instruction at high speed. ing.

【0012】次に、分岐先連想記憶への命令アドレスと
分岐先アドレスの登録動作について、図11を参照して
説明する。
Next, the operation of registering an instruction address and a branch destination address in the branch destination associative memory will be described with reference to FIG.

【0013】パイプライン制御による命令の処理は、分
岐命令1が分岐成立して分岐先命令へ分岐し、該分岐先
命令も分岐命令2で、該分岐命令2が分岐成立して分岐
先命令3へ分岐するものとする。また、第1の分岐先連
想記憶12には分岐命令1のアドレス情報と分岐命令2
のアドレス情報の両方とも登録されておらず、第2の分
岐先連想記憶13には分岐命令2のアドレス情報のみが
登録されているものとする。
In the processing of an instruction by pipeline control, a branch instruction 1 is taken and a branch is taken, and a branch is made to a branch instruction. The branch instruction is also a branch instruction 2, and the branch instruction 2 is taken and a branch instruction is taken. Branch to The first branch destination associative memory 12 stores the address information of the branch instruction 1 and the branch instruction 2
Are not registered, and only the address information of the branch instruction 2 is registered in the second branch destination associative memory 13.

【0014】サイクル1より分岐命令1を含む命令語の
命令読み出し処理が開始され、サイクル3で、サイクル
2で生成した命令アドレスを線100よりアドレスレジ
スタA1に受け、アドレスレジスタA1の内容と第2の
分岐先連想記憶13内の分岐命令アドレスレジスタ3の
内容とをアドレス比較回路A5で比較を行い、読み出す
命令語に含まれている分岐命令1の命令アドレスが分岐
命令アドレスレジスタ3に登録されているかを検出す
る。本ケースでは登録されていることが検出されないた
め、検出されなかったことを表す信号を線106を介し
て予測情報保持回路15に送出する。また、アドレスレ
ジスタA1から第1の分岐先連想記憶12内のアドレス
レジスタB2に、命令アドレスを送出する。サイクル4
では、アドレスレジスタB2の一部を第1の分岐先連想
記憶12の読み出す場所を示すアドレスとして分岐命令
アドレスアレイ8から分岐命令アドレスを読み出し、ア
ドレスレジスタB2の命令アドレスと分岐命令アドレス
アレイ8から読み出した分岐命令アドレスをアドレス比
較回路B10で比較を行い、分岐命令1の命令アドレス
が分岐命令アドレスアレイ8に登録されているかを検出
する。本ケースでは登録されていることが検出されない
ため、検出されなかったことを表す信号を線108を介
して予測情報保持回路15に送出する。予測情報保持回
路15では、線106から受けた検出信号と線108か
ら受けた検出信号に従い分岐不成立の予測を行い、本ケ
ースでは分岐不成立予測信号を生成する。サイクル5か
らは、分岐不成立予測信号を予測情報保持回路15内で
分岐命令1のパイプラインステージに対応して保持し、
図11では分岐命令1のEステージ(サイクル11)ま
で保持する。
In cycle 1, the instruction reading process of the instruction word including the branch instruction 1 is started. In cycle 3, the instruction address generated in cycle 2 is received by the address register A1 from the line 100, and the contents of the address register A1 and the second The content of the branch instruction address register 3 in the branch destination associative memory 13 is compared by the address comparison circuit A5, and the instruction address of the branch instruction 1 included in the instruction word to be read is registered in the branch instruction address register 3. To detect In this case, since the registration is not detected, a signal indicating that the registration has not been detected is sent to the prediction information holding circuit 15 via the line 106. The instruction address is sent from the address register A1 to the address register B2 in the first branch destination associative memory 12. Cycle 4
Then, the branch instruction address is read from the branch instruction address array 8 as a part of the address register B2 indicating the position where the first branch destination associative memory 12 is read, and the instruction address of the address register B2 and the branch instruction address array 8 are read. The address comparison circuit B10 compares the branch instruction addresses thus obtained, and detects whether the instruction address of the branch instruction 1 is registered in the branch instruction address array 8. In this case, since the registration is not detected, a signal indicating that the registration has not been detected is sent to the prediction information holding circuit 15 via the line 108. The prediction information holding circuit 15 predicts whether a branch is not taken in accordance with the detection signal received from the line 106 and the detection signal received from the line 108, and in this case, generates a branch not taken prediction signal. From cycle 5, the branch not-taken prediction signal is held in the prediction information holding circuit 15 corresponding to the pipeline stage of the branch instruction 1,
In FIG. 11, the instruction is held until the E stage of the branch instruction 1 (cycle 11).

【0015】サイクル11では、分岐制御回路16で分
岐命令1を実行した結果が分岐成立か不成立かを判定す
る。本ケースは分岐成立のため、分岐制御回路16は分
岐成立信号を生成して、線110を介して分岐判定比較
回路17に該分岐成立信号を送出し、更に分岐命令1の
命令アドレスと分岐先アドレスを線111と線112を
介して登録削除制御回路18に送出する。また、予測情
報保持回路15は、分岐命令1の分岐不成立予測信号を
線114を介して分岐判定比較回路17に送出する。分
岐判定比較回路17は、線114による分岐不成立予測
信号と線110による分岐成立信号により予測が外れた
ことを判定して、第1の分岐先連想記憶12と第2の分
岐先連想記憶13の両方に分岐命令1の登録を行うため
の登録信号を生成し、登録削除制御回路18に送出す
る。登録削除回路18は、線113から受けた登録信号
と線111から受けた分岐命令アドレスと分岐先アドレ
スを第1の分岐先連想記憶12と第2の分岐先連想記憶
13に送出する。
In cycle 11, it is determined whether the result of executing branch instruction 1 in branch control circuit 16 is whether the branch is taken or not taken. In this case, since the branch is taken, the branch control circuit 16 generates a branch taken signal, sends the branch taken signal to the branch determination / comparison circuit 17 via the line 110, and further outputs the instruction address of the branch instruction 1 and the branch destination. The address is sent to the registration / deletion control circuit 18 via the lines 111 and 112. Further, the prediction information holding circuit 15 sends a branch failure prediction signal of the branch instruction 1 to the branch determination / comparison circuit 17 via the line 114. The branch determination / comparison circuit 17 determines that the prediction has been missed by the branch not taken prediction signal by the line 114 and the branch taken signal by the line 110, and stores the first branch destination associative memory 12 and the second branch destination associative memory 13. A registration signal for registering the branch instruction 1 is generated for both, and sent to the registration deletion control circuit 18. The registration deletion circuit 18 sends the registration signal received from the line 113, the branch instruction address and the branch destination address received from the line 111 to the first branch destination associative memory 12 and the second branch destination associative memory 13.

【0016】サイクル12では、第2の分岐先連想記憶
13にて登録削除制御回路18からの登録信号により分
岐命令アドレスと分岐先アドレスをそれぞれ分岐命令レ
ジスタ3と分岐先アドレスレジスタ4に登録を行う。ま
た、第1の分岐先連想記憶12内のアドレスレジスタB
2に登録削除制御回路18から送出された分岐命令アド
レスを受ける。サイクル13では、アドレスレジスタB
2のアドレスを第1の分岐先連想記憶12の登録場所を
示すアドレスとし、そのアドレスによって示された分岐
命令アドレスアレイ8には分岐命令1の命令アドレス
を、分岐先アドレスアレイ9には分岐命令1の分岐先ア
ドレスをそれぞれ登録する。
In the cycle 12, the branch instruction address and the branch destination address are registered in the branch instruction register 3 and the branch destination address register 4 in the second branch destination associative memory 13 by the registration signal from the registration and deletion control circuit 18. . The address register B in the first branch destination associative memory 12
2 receives the branch instruction address sent from the registration / deletion control circuit 18. In cycle 13, address register B
2 is an address indicating a registration location of the first branch destination associative memory 12, the instruction address of the branch instruction 1 is stored in the branch instruction address array 8 indicated by the address, and the branch instruction is stored in the branch destination address array 9. 1 are registered.

【0017】このようにして、第1の分岐先連想記憶1
2と第2の分岐先連想記憶13の両方ともに分岐命令1
の命令アドレス情報が登録されていなかった場合は、分
岐命令1の命令アドレスと分岐先アドレスが第1の分岐
先連想記憶12と第2の分岐先連想記憶13の両方に登
録される。
Thus, the first branch destination associative memory 1
2 and the second branch destination associative memory 13 both branch instruction 1
Is not registered, the instruction address and the branch destination address of the branch instruction 1 are registered in both the first branch destination associative memory 12 and the second branch destination associative memory 13.

【0018】一方、サイクル6から分岐命令1のデコー
ドが開始され、サイクル7で分岐命令1の分岐先アドレ
ス(分岐命令2のアドレス)を生成し、サイクル8で生
成した分岐先アドレスを線100よりアドレスレジスタ
A1に受け、アドレスレジスタA1の内容と第2の分岐
先連想記憶13内の分岐命令アドレスレジスタ3の内容
をアドレス比較回路A5で比較を行い、読み出す命令語
に含まれている分岐命令2の命令アドレスが分岐命令ア
ドレスレジスタ3に登録されているかを検出する。本ケ
ースでは登録されていることが検出されるため、検出し
たことを表す信号を線106を介して予測情報保持回路
15に送出する。また、アドレスレジスタA1から第1
の分岐先連想記憶12内のアドレスレジスタB2に命令
アドレス(分岐命令2のアドレス)を送出する。サイク
ル9では、アドレスレジスタB2の一部を第1の分岐先
連想記憶12の読み出す場所を示すアドレスとして分岐
命令アドレスアレイ8から分岐命令アドレスを読み出
し、アドレスレジスタB2の命令アドレスと分岐命令ア
ドレスアレイ8から読み出した分岐命令アドレスをアド
レス比較回路B10で比較を行い、分岐命令2の命令ア
ドレスが分岐命令アドレスレジスタ3に登録されている
かを検出する。本ケースでは登録されていることが検出
されないため、検出されなかったことを表す信号を線1
08を介して予測情報保持回路15に送出する。予測情
報保持回路15では、線106から受けた検出信号と線
108から受けた検出信号に従い、第1と第2のいずれ
かの分岐先連想記憶から登録されていることが検出され
た場合は分岐成立の予測を行うため、本ケースでは、分
岐成立予測信号を生成する。サイクル10からは、分岐
成立予測信号を予測情報保持回路15内で分岐命令2の
パイプラインステージに対応して保持し、図11では分
岐命令2のEステージ(サイクル16)まで保持する。
On the other hand, the decoding of the branch instruction 1 starts in cycle 6, the branch destination address of branch instruction 1 (address of branch instruction 2) is generated in cycle 7, and the branch destination address generated in cycle 8 is The address comparison circuit A5 compares the contents of the address register A1 with the contents of the branch instruction address register 3 in the second branch destination associative memory 13 by the address comparison circuit A5, and reads the branch instruction 2 included in the instruction word to be read. Is detected in the branch instruction address register 3. In this case, since the registration is detected, a signal indicating the detection is transmitted to the prediction information holding circuit 15 via the line 106. Further, the first address register A1
The instruction address (the address of the branch instruction 2) is sent to the address register B2 in the branch destination associative memory 12. In cycle 9, the branch instruction address is read from the branch instruction address array 8 as a part of the address register B2 indicating the location to be read from the first branch destination associative memory 12, and the instruction address of the address register B2 and the branch instruction address array 8 are read. Is compared by the address comparison circuit B10 to detect whether the instruction address of the branch instruction 2 is registered in the branch instruction address register 3. In this case, since the registration has not been detected, a signal indicating that the registration has not been detected is indicated by line 1.
08 to the prediction information holding circuit 15. In accordance with the detection signal received from the line 106 and the detection signal received from the line 108, the prediction information holding circuit 15 branches if any of the first and second branch destination associative memories is detected. In this case, a branch taken prediction signal is generated to predict the taken. From cycle 10, the branch taken prediction signal is held in the prediction information holding circuit 15 corresponding to the pipeline stage of the branch instruction 2, and is held up to the E stage (cycle 16) of the branch instruction 2 in FIG.

【0019】サイクル16では、分岐制御回路16で分
岐命令2を実行した結果が分岐成立か不成立かを判定す
る。本ケースは分岐成立のため、分岐制御回路6は分岐
成立信号を生成して、線110を介して分岐判定比較回
路17に分岐成立信号を送出し、更に、分岐命令2の命
令アドレスと分岐先アドレスを線111と線112を介
して登録削除制御回路18に送出する。また、予測情報
保持回路15は分岐命令2の分岐成立予測信号を線11
4を介して分岐判定比較回路17に送出する。分岐判定
比較回路17は、線114による分岐成立予測信号と線
110による分岐成立信号により、予測が成功したこと
を判定して、あらためて分岐命令2の命令アドレスおよ
び分岐先アドレスを登録する必要がないため、第1の分
岐先連想記憶12および第2の分岐先連想記憶13のい
ずれに対しても登録信号は生成せず、分岐命令2の命令
アドレスと分岐先アドレスの登録は行わない。
In cycle 16, it is determined whether the result of executing branch instruction 2 by branch control circuit 16 is whether the branch is taken or not taken. In this case, since the branch is taken, the branch control circuit 6 generates a branch taken signal, sends a branch taken signal to the branch determination / comparison circuit 17 via the line 110, and further outputs the instruction address of the branch instruction 2 and the branch destination. The address is sent to the registration / deletion control circuit 18 via the lines 111 and 112. Further, the prediction information holding circuit 15 sends the branch taken prediction signal of the branch instruction 2 to the line 11.
4 and transmitted to the branch determination / comparison circuit 17. The branch determination / comparison circuit 17 determines that the prediction was successful based on the branch taken prediction signal by the line 114 and the branch taken signal by the line 110, and does not need to register the instruction address and the branch destination address of the branch instruction 2 again. Therefore, neither the first branch destination associative memory 12 nor the second branch destination associative memory 13 generates a registration signal, and the instruction address of the branch instruction 2 and the branch destination address are not registered.

【0020】このように、第2の分岐先連想記憶13に
分岐命令が登録されており、第1の分岐先連想記憶12
には分岐命令が登録されていない場合は、第2の分岐先
連想記憶13による分岐予測が優先されるため、第1の
分岐先連想記憶12にはあらためて登録を行わないこと
になる。また、第1の分岐先連想記憶12に分岐命令が
登録されており、第2の分岐先連想記憶13には分岐命
令が登録されていない場合は、第1の分岐先連想記憶1
2による分岐予測が優先されるため、第2の分岐先連想
記憶13にはあらためて登録を行わないことになる。
As described above, the branch instruction is registered in the second branch destination associative memory 13 and the first branch destination associative memory 12 is registered.
If no branch instruction is registered in the first branch destination associative memory 13, the branch prediction is not performed in the first branch destination associative memory 12 again. When the branch instruction is registered in the first branch destination associative memory 12 and the branch instruction is not registered in the second branch destination associative memory 13, the first branch destination associative memory 1 is stored.
Since the branch prediction by 2 is prioritized, the registration is not performed again in the second branch destination associative memory 13.

【0021】次に、分岐先連想記憶への削除動作につい
て図12を参照して説明する。パイプライン制御による
命令の処理は、分岐命令1が分岐不成立して命令2を実
行するものとする。また、第1の分岐先連想記憶12に
は分岐命令1の命令アドレスは登録されておらず、第2
の分岐先連想記憶13には分岐命令1の命令アドレスが
登録されているものとする。
Next, the operation of deleting from the branch destination associative memory will be described with reference to FIG. In the instruction processing by the pipeline control, it is assumed that the branch instruction 1 is not taken and the instruction 2 is executed. Further, the instruction address of the branch instruction 1 is not registered in the first branch destination associative memory 12,
It is assumed that the instruction address of the branch instruction 1 is registered in the branch destination associative memory 13.

【0022】命令読み出し制御回路14の制御下でサイ
クル1より分岐命令1を含む命令語の命令読み出し処理
が開始され、サイクル3で、サイクル2で生成した命令
アドレスを線100よりアドレスレジスタA1に受け、
アドレスレジスタA1の内容と第2の分岐先連想記憶1
3内の分岐命令アドレスレジスタ3の内容とをアドレス
比較回路A5で比較を行い、読み出す命令語に含まれて
いる分岐命令1の命令アドレスが分岐命令アドレスレジ
スタ3に登録されているかを検出する。本ケースでは登
録されていることが検出されるため、検出したことを表
す信号を線106を介して予測情報保持回路15に送出
する。また、アドレスレジスタA1から第1の分岐先連
想記憶12内のアドレスレジスタB2に命令アドレスを
送出する。サイクル4では、アドレスレジスタB2の一
部を第1の分岐先連想記憶12の読み出す場所を示すア
ドレスとして分岐命令アドレスアレイ8から分岐命令ア
ドレスを読み出し、アドレスレジスタB2の命令アドレ
スと分岐命令アドレスアレイ8から読み出した分岐命令
アドレスをアドレス比較回路B10で比較を行い、分岐
命令1の命令アドレスが分岐命令アドレスアレイ8に登
録されているかを検出する。本ケースでは登録されてい
ることが検出されないため、検出されなかったことを表
す信号を線108を介して予測情報保持回路15に送出
する。予測情報保持回路15では、線106から受けた
検出信号と線108から受けた検出信号に従い、第1と
第2のいずれかの分岐先連想記憶から登録されているこ
とが検出された場合は分岐成立の予測を行うため、分岐
成立予測信号を生成する。サイクル5からは、分岐成立
予測信号を予測情報保持回路15内で分岐命令1のパイ
プラインステージに対応して保持し、図12では分岐命
令1のEステージ(サイクル11)まで保持する。
Under the control of the instruction read control circuit 14, the instruction read processing of the instruction word including the branch instruction 1 is started in cycle 1, and in cycle 3, the instruction address generated in cycle 2 is received from the line 100 to the address register A1. ,
Address register A1 contents and second branch destination associative memory 1
The contents of the branch instruction address register 3 are compared with the contents of the branch instruction address register 3 by the address comparison circuit A5, and it is detected whether or not the instruction address of the branch instruction 1 included in the instruction word to be read is registered in the branch instruction address register 3. In this case, since the registration is detected, a signal indicating the detection is transmitted to the prediction information holding circuit 15 via the line 106. The instruction address is sent from the address register A1 to the address register B2 in the first branch destination associative memory 12. In cycle 4, the branch instruction address is read from the branch instruction address array 8 as a part of the address register B2 indicating the location to be read from the first branch destination associative memory 12, and the instruction address of the address register B2 and the branch instruction address array 8 are read. The address of the branch instruction read from is compared by the address comparison circuit B10 to detect whether the instruction address of the branch instruction 1 is registered in the branch instruction address array 8. In this case, since the registration is not detected, a signal indicating that the registration has not been detected is sent to the prediction information holding circuit 15 via the line 108. In accordance with the detection signal received from the line 106 and the detection signal received from the line 108, the prediction information holding circuit 15 branches if any of the first and second branch destination associative memories is detected. In order to predict the establishment, a branch establishment prediction signal is generated. From cycle 5, the branch taken prediction signal is held in the prediction information holding circuit 15 corresponding to the pipeline stage of the branch instruction 1, and is held up to the E stage (cycle 11) of the branch instruction 1 in FIG.

【0023】サイクル11では、分岐制御回路16で分
岐命令1を実行した結果が分岐成立か不成立かを判定す
る。本ケースでは分岐不成立のため、分岐制御回路16
は分岐不成立信号を生成し、線110を介して分岐判定
比較回路17に分岐不成立信号を送出し、更に分岐命令
1の命令アドレスを線111を介して登録削除制御回路
18に送出する。また、予測情報保持回路15は、分岐
命令1の分岐成立予測信号を線114を介して分岐判定
比較回路17に送出する。分岐判定比較回路17は、線
114による分岐成立予測信号と線110による分岐不
成立信号により、予測が失敗だったことを判定して、分
岐命令1の命令アドレスおよび分岐先アドレスを削除す
るため、第1の分岐先連想記憶12および第2の分岐先
連想記憶13の両方に対して削除信号を生成し、登録削
除制御回路18に送出する。登録削除回路18は、線1
15から受けた削除信号と線111から受けた分岐命令
アドレスを第1の分岐先連想記憶12と第2の分岐先連
想記憶13に送出する。
In cycle 11, it is determined whether the result of executing branch instruction 1 in branch control circuit 16 is whether the branch is taken or not taken. In this case, since the branch is not taken, the branch control circuit 16
Generates a branch-not-taken signal, sends a branch-not-taken signal to the branch determination / comparison circuit 17 via the line 110, and sends the instruction address of the branch instruction 1 to the registration / deletion control circuit 18 via the line 111. Further, the prediction information holding circuit 15 sends a branch establishment prediction signal of the branch instruction 1 to the branch determination / comparison circuit 17 via the line 114. The branch determination / comparison circuit 17 determines that the prediction has failed based on the branch taken prediction signal by the line 114 and the branch not taken signal by the line 110, and deletes the instruction address and the branch destination address of the branch instruction 1. A delete signal is generated for both the first branch destination associative memory 12 and the second branch destination associative memory 13 and sent to the registration / deletion control circuit 18. The registration delete circuit 18
The delete signal received from the line 15 and the branch instruction address received from the line 111 are sent to the first branch destination associative memory 12 and the second branch destination associative memory 13.

【0024】サイクル12では、第2の分岐先連想記憶
13は、分岐命令アドレスレジスタ3から分岐命令1の
命令アドレスを削除し、分岐先アドレスレジスタ4から
分岐命令1の分岐先アドレスを削除する。また、第1の
分岐先連想記憶12内のアドレスレジスタB2に、登録
削除制御回路18から送出された分岐命令アドレスを受
ける。サイクル13では、登録削除回路18からの削除
信号により、第1の分岐先連想記憶12には削除すべき
分岐命令アドレスが登録されていなかったが、アドレス
レジスタB2のアドレスの一部を第1の分岐先連想記憶
12の削除場所を示すアドレスとし、そのアドレスによ
って示された分岐命令アドレスアレイ8の登録内容と分
岐先アドレスアレイ9の登録内容をそれぞれ削除する。
In cycle 12, second associative branch destination memory 13 deletes the instruction address of branch instruction 1 from branch instruction address register 3, and deletes the branch destination address of branch instruction 1 from branch destination address register 4. The address register B2 in the first branch destination associative memory 12 receives the branch instruction address sent from the registration / deletion control circuit 18. In the cycle 13, the branch instruction address to be deleted is not registered in the first branch destination associative memory 12 by the deletion signal from the registration deletion circuit 18, but a part of the address of the address register B2 is changed to the first. An address indicating the location where the branch destination associative memory 12 is to be deleted is set, and the registered contents of the branch instruction address array 8 and the registered contents of the branch destination address array 9 indicated by the address are deleted.

【0025】[0025]

【発明が解決しようとする課題】上記従来技術による
と、たとえば第2の分岐先連想記憶に分岐命令の命令ア
ドレスが登録されており、第1の分岐先連想記憶には分
岐命令の命令アドレスが登録されていない場合、分岐予
測は第1の分岐先連想記憶と第2の分岐先連想記憶のい
ずれかに登録されていれば分岐成立予測となるため、分
岐判定が分岐成立であった場合、第1の分岐先連想記憶
の予測情報は使用されず予測成功となり、第1の分岐先
連想記憶に登録は行われない。そして、第2の分岐先連
想記憶への登録が多数回行われ、登録数が第2の分岐先
連想記憶の容量を超えた場合、既に第2の分岐先連想記
憶に登録されている分岐命令の命令アドレスが他の分岐
命令アドレスによって上書きされてしまう。このとき、
第1の分岐先連想記憶には上記理由により登録されてい
ないため、以後の分岐予測が正しく行われないという問
題が発生する。
According to the above prior art, for example, the instruction address of a branch instruction is registered in the second branch destination associative memory, and the instruction address of the branch instruction is stored in the first branch destination associative memory. If the branch is not registered, the branch prediction is a branch taken prediction if the branch prediction is registered in either the first branch destination associative memory or the second branch destination associative memory. The prediction information in the first branch destination associative memory is not used, and the prediction is successful, and no registration is performed in the first branch destination associative memory. If the registration in the second branch destination associative memory is performed many times and the number of registrations exceeds the capacity of the second branch destination associative memory, the branch instruction already registered in the second branch destination associative memory. Instruction address is overwritten by another branch instruction address. At this time,
Since it is not registered in the first branch destination associative memory for the above-described reason, a problem occurs that the subsequent branch prediction is not performed correctly.

【0026】また、第2の分岐先連想記憶のみに分岐命
令が登録されている場合、分岐予測は第1の分岐先連想
記憶と第2の分岐先連想記憶のいずれかに登録されてい
れば分岐成立予測となるため、分岐判定が分岐不成立で
あった場合、予測失敗となり、第2の分岐先連想記憶の
削除が行われる。この時、同時に第1の分岐先連想記憶
に対する不要な削除も行われ、分岐命令アドレスの一部
を第1の分岐先連想記憶の削除場所を示すアドレスとし
て削除を行うため、本来削除してはいけない分岐命令の
命令アドレス情報を削除してしまい、やはり以後の分岐
予測が正しく行われないという問題が発生する。
When the branch instruction is registered only in the second branch destination associative memory, if the branch prediction is registered in either the first branch destination associative memory or the second branch destination associative memory. Since the branch is taken, if the branch determination is not taken, the prediction fails and the second branch destination associative memory is deleted. At this time, unnecessary deletion of the first branch destination associative memory is also performed at the same time, and a part of the branch instruction address is deleted as an address indicating the deletion location of the first branch destination associative memory. The problem is that the instruction address information of the branch instruction which is not to be used is deleted, and the subsequent branch prediction is not correctly performed.

【0027】そこで、本発明の第1の目的は、第1の分
岐先連想記憶の予測情報と第2の分岐先連想記憶の予測
情報を独立に保持し、分岐予測の予測成功/失敗を第1
の分岐先連想記憶と第2の分岐先連想記憶で独立に判定
して分岐先連想記憶への登録または削除を独立に行うこ
とで、精度の高い分岐予測を行うことを可能とする分岐
先連想記憶方式の情報処理装置を提供することにある。
Accordingly, a first object of the present invention is to hold prediction information of a first branch destination associative memory and prediction information of a second branch destination associative memory independently, and to determine whether branch prediction has succeeded or failed. 1
Of the branch destination associative memory and the second branch destination associative memory, and independently registering or deleting the branch associative memory, thereby enabling highly accurate branch prediction. An object of the present invention is to provide a storage-type information processing device.

【0028】第1の分岐先連想記憶と第2の分岐先連想
記憶を独立に登録を行った場合、分岐命令のアドレス情
報は第1の分岐先連想記憶と第2の分岐先連想記憶の両
方に登録される。このため、命令の先読みを行う場合、
第1の分岐先連想記憶と第2の分岐先連想記憶で同じ分
岐命令の命令アドレスが検出されることになる。この場
合、第2の分岐先連想記憶から読み出した分岐先アドレ
スにより命令読み出しを行い、さらに第1の分岐先連想
記憶から読み出した分岐先アドレスにより命令読み出し
を行うため、同じアドレスに対する命令読み出しを重複
して行うという問題が発生する。
When the first branch destination associative memory and the second branch destination associative memory are independently registered, the address information of the branch instruction is stored in both the first branch destination associative memory and the second branch destination associative memory. Registered in. Therefore, when prefetching an instruction,
The instruction address of the same branch instruction is detected in the first branch destination associative memory and the second branch destination associative memory. In this case, the instruction is read using the branch destination address read from the second branch destination associative memory, and the instruction is read using the branch destination address read from the first branch destination associative memory. The problem occurs.

【0029】そこで、本発明の第2の目的は、第2の分
岐先連想記憶と第1の分岐先連想記憶で同じ分岐命令の
命令アドレスが検出された場合に、重複して行われる命
令読み出しの一方の処理を抑止し、不要な命令読み出し
を行わないことを可能とする分岐先連想記憶方式の情報
処理装置を提供することにある。
Accordingly, a second object of the present invention is to provide a method for reading instructions which are performed in duplicate when the instruction address of the same branch instruction is detected in the second branch destination associative memory and the first branch destination associative memory. Another object of the present invention is to provide an information processing apparatus of a branch destination associative memory system that can suppress one of the processes and prevent unnecessary instruction reading.

【0030】また、第2の分岐先連想記憶は、登録数が
第1の分岐先連想記憶に比べ少ないため、登録数が第2
の分岐先連想記憶の容量を超えた場合は登録の上書きが
発生し、このため、第1の分岐先連想記憶と第2の分岐
先連想記憶の登録内容が不一致になる。この場合、命令
の先読みを行うと、第1の分岐先連想記憶で検出した分
岐命令アドレスと第2の分岐先連想記憶で検出した分岐
命令アドレスが異なったアドレスで検出される。第1の
分岐先連想記憶で検出した分岐命令アドレスが第2の分
岐先連想記憶で検出した分岐命令アドレスより小さい場
合、命令の実行順序を考慮すると、第1の分岐先連想記
憶で予測した分岐命令の方が先に実行され、第1の分岐
先連想記憶の予測が成功すれば、第2の分岐先連想記憶
で予測した分岐命令は実行されず、第2の分岐先連想記
憶により読み出した分岐先命令も実行されない。しか
し、第1の分岐先連想記憶と第2の分岐先連想記憶を独
立に制御した場合では、第2の分岐先連想記憶から読み
出した分岐先アドレスと第1の分岐先連想記憶から読み
出した分岐先アドレスの両方の命令読み出しを行うた
め、実行される可能性の低い分岐命令に対する分岐先命
令の読み出しも行われるという問題が発生する。
The second branch destination associative memory has a smaller number of registrations than the first branch destination associative memory.
When the capacity of the branch destination associative memory is exceeded, overwriting of the registration occurs, so that the registered contents of the first branch destination associative memory and the second branch destination associative memory do not match. In this case, when the instruction is prefetched, the branch instruction address detected in the first branch destination associative memory and the branch instruction address detected in the second branch destination associative memory are detected at different addresses. If the branch instruction address detected in the first branch destination associative memory is smaller than the branch instruction address detected in the second branch destination associative memory, the branch predicted in the first branch destination associative memory is considered in consideration of the execution order of the instructions. If the instruction is executed first and the prediction of the first branch destination associative memory is successful, the branch instruction predicted by the second branch destination associative memory is not executed and the instruction is read out by the second branch destination associative memory. The branch instruction is not executed. However, when the first branch destination associative memory and the second branch destination associative memory are independently controlled, the branch destination address read from the second branch destination associative memory and the branch destination read from the first branch destination associative memory. Since both instructions at the destination address are read, there is a problem that a branch destination instruction is also read for a branch instruction that is unlikely to be executed.

【0031】そこで、本発明の第3の目的は、第2の分
岐先連想記憶と第1の分岐先連想記憶が異なる分岐命令
アドレスで登録されていることが検出された場合、第1
の分岐先連想記憶から読み出した分岐命令アドレスと第
2の分岐先連想記憶から読み出した分岐命令アドレスの
比較を行って実行順序を判定し、既に開始された第2の
分岐先連想記憶による命令読み出しの処理を中断し、実
行される可能性の低い分岐命令の分岐先命令の読み出し
を行わないことを可能とする分岐先連想記憶方式の情報
処理装置を提供することにある。
Accordingly, a third object of the present invention is to provide a method for detecting the first branch destination associative memory and the first branch destination associative memory when the second and third branch associative memories are registered at different branch instruction addresses.
Of the branch instruction address read from the second branch destination associative memory and the branch instruction address read from the second branch destination associative memory to determine the execution order, and to read the instruction by the already started second branch destination associative memory. The present invention is to provide an information processing apparatus of a branch destination associative memory system capable of suspending the processing of the above and not reading a branch destination instruction of a branch instruction which is unlikely to be executed.

【0032】[0032]

【課題を解決するための手段】上記第1の目的を達成す
るために、本発明の情報処理装置では、低速大容量の第
1の分岐先連想記憶と高速小容量の第2の分岐先連想記
憶をもち、命令語の先取りにおいて先取る命令語に含ま
れている分岐命令の命令アドレスが第1の分岐先連想記
憶に登録されているかどうかを検出する手段と第2の分
岐先連想記憶に登録されているかどうかを検出する手段
により予測を行い、その予測情報を独立に保持し、第1
の分岐先連想記憶に登録されていなかった分岐命令が分
岐成立した場合は第1の分岐先連想記憶に該分岐命令の
命令アドレスと分岐先アドレスを登録し、第2の分岐先
連想記憶に登録されていなかった分岐命令が分岐成立し
た場合は該分岐命令の命令アドレスと分岐先アドレスを
第2の分岐先連想記憶に登録し、第2の分岐先連想記憶
に登録されていた分岐命令が分岐不成立の場合は第2の
分岐先連想記憶の登録を削除し、第1の分岐先連想記憶
に登録されていた分岐命令が分岐不成立の場合は第1の
分岐先連想記憶の登録を削除する手段により、不要な登
録/削除を抑止し、精度の高い分岐予測を行うことを特
徴とする。
In order to achieve the first object, an information processing apparatus according to the present invention comprises a first branch destination associative memory having a low speed and a large capacity and a second branch destination associative memory having a high speed and a small capacity. Means for detecting whether or not the instruction address of a branch instruction contained in the prefetched instruction word in prefetching the instruction word is registered in the first branch destination associative memory; Prediction is performed by means for detecting whether or not the information has been registered, and the prediction information is held independently.
When a branch instruction not registered in the branch destination associative memory is taken, the instruction address and the branch destination address of the branch instruction are registered in the first branch destination associative memory and registered in the second branch destination associative memory. When a branch instruction that has not been taken is taken, the instruction address and the branch destination address of the branch instruction are registered in the second branch destination associative memory, and the branch instruction registered in the second branch destination associative memory is branched. Means for deleting the registration of the second branch destination associative memory when the branch is not taken, and deleting the registration of the first branch destination associative memory when the branch instruction registered in the first branch destination associative memory is not taken. Thus, unnecessary registration / deletion is suppressed, and highly accurate branch prediction is performed.

【0033】また、第2の目的を達成するために、本発
明の情報処理装置は、命令語の先取りにおいて先取る命
令語に含まれている分岐命令の命令アドレス情報が第1
の分岐先連想記憶に登録されているかどうかを検出する
手段と第2の分岐先連想記憶に登録されているかを検出
する手段により両方で登録が検出された場合に、検出さ
れた分岐命令アドレスをそれぞれ独立に保持し、第1の
分岐先連想記憶で検出された分岐命令アドレスと第2の
分岐先連想記憶で検出された分岐命令アドレスが一致し
ているかを比較し、比較結果が一致していた場合に第1
の分岐先連想記憶による命令読み出しを抑止する手段に
より、不要な命令読み出しを行わないことを特徴とす
る。
In order to achieve the second object, an information processing apparatus according to the present invention is arranged such that the instruction address information of the branch instruction included in the prefetched instruction word in the prefetching of the instruction word is the first address.
If the registration is detected by both of the means for detecting whether or not the branch instruction is registered in the branch destination associative memory and the means for detecting whether or not the branch instruction is stored in the second branch associative memory, the detected branch instruction address is deleted. Each of them is held independently, and it is compared whether the branch instruction address detected in the first branch destination associative memory matches the branch instruction address detected in the second branch destination associative memory, and the comparison results are identical. First
Means for suppressing instruction reading by the associative memory of the branch destination, so that unnecessary instruction reading is not performed.

【0034】また、第3の目的を達成するために、本発
明の情報処理装置は、命令語の先取りにおいて先取る命
令語に含まれている分岐命令の命令アドレス情報が第1
の分岐先連想記憶に登録されているかどうかを検出する
手段と第2の分岐先連想記憶に登録されているかを検出
する手段により両方に登録が検出された場合、検出され
た分岐命令アドレスをそれぞれ保持し、第1の分岐先連
想記憶で検出された分岐命令アドレスと第2の分岐先連
想記憶で検出された分岐命令アドレスを比較し、第1の
分岐先連想記憶で検出した分岐命令アドレスが第2の分
岐先連想記憶で検出した分岐命令アドレスより小さい場
合に第2の分岐先連想記憶による分岐先命令の命令読み
出し処理を中断させる手段により、命令読み出し処理を
中断し、不要な命令読み出しを行わないことを特徴とす
る。
In order to achieve the third object, an information processing apparatus according to the present invention is arranged such that the instruction address information of the branch instruction included in the prefetched instruction word in the prefetching of the instruction word is the first address.
If the registration is detected in both of the branch destination associative memory and the means for detecting whether or not the branch instruction is registered in the second branch associative memory, the detected branch instruction addresses are respectively The branch instruction address detected in the first branch destination associative memory is compared with the branch instruction address detected in the second branch destination associative memory. Means for interrupting the instruction read processing of the branch instruction by the second branch address associative memory when the address is smaller than the branch instruction address detected in the second branch address associative memory. It is characterized by not being performed.

【0035】[0035]

【発明の実施の形態】以下、本発明の実施の形態を図1
乃至7により詳細に説明する。図1は、本発明の一実施
形態による、分岐予測により分岐命令の処理を高速化す
る分岐先連想記憶方式の情報処理装置のブロック図であ
る。図1において、1は読み出す命令語の命令アドレス
を格納するアドレスレジスタA、2はアドレスレジスタ
A1の内容を受けるアドレスレジスタBである。3は過
去の分岐命令に対する命令アドレスが格納される分岐命
令アドレスレジスタ、4は分岐命令アドレスレジスタ3
の分岐命令アドレスに対応してその分岐先アドレスが格
納される分岐先アドレスレジスタ、5はアドレスレジス
タA1の命令アドレスと分岐命令アドレスレジスタ3の
分岐命令アドレスを比較するアドレス比較回路Aであ
る。同様に、8は過去の分岐命令に対する命令アドレス
が格納される分岐命令アドレスアレイ、9は分岐命令ア
ドレスアレイ8の分岐命令アドレスに対応してその分岐
先アドレスが格納される分岐先アドレスアレイ、10は
アドレスレジスタB2の命令アドレスと分岐命令アドレ
スアレイ8の分岐命令アドレスを比較するアドレス比較
回路B、11は分岐先アドレスアレイ9から読み出され
た分岐先アドレスを受ける分岐先アドレスアレイレジス
タである。12はRAM構成の大容量な第1の分岐先連
想記憶であり、アドレスレジスタB2、分岐命令アドレ
スアレイ8及び分岐先命令アドレスアレイ9からなる。
13はレジスタ構成の小容量な第2の分岐先連想記憶で
あり、分岐命令アドレスレジスタ3及び分岐先アドレス
レジスタ4からなる。
FIG. 1 is a block diagram showing an embodiment of the present invention.
This will be described in more detail with reference to FIGS. FIG. 1 is a block diagram of an information processing apparatus of a branch destination associative memory system that speeds up processing of a branch instruction by branch prediction according to an embodiment of the present invention. In FIG. 1, reference numeral 1 denotes an address register A for storing an instruction address of an instruction word to be read, and reference numeral 2 denotes an address register B for receiving the contents of the address register A1. 3 is a branch instruction address register for storing an instruction address for a past branch instruction, and 4 is a branch instruction address register 3.
A branch destination address register 5 for storing the branch destination address corresponding to the branch instruction address 5 is an address comparison circuit A for comparing the instruction address of the address register A1 with the branch instruction address of the branch instruction address register 3. Similarly, reference numeral 8 denotes a branch instruction address array in which an instruction address corresponding to a past branch instruction is stored, 9 denotes a branch destination address array in which the branch destination address corresponding to the branch instruction address of the branch instruction address array 8 is stored, 10 Is an address comparison circuit B for comparing the instruction address of the address register B2 with the branch instruction address of the branch instruction address array 8, and 11 is a branch destination address array register for receiving the branch destination address read from the branch destination address array 9. Reference numeral 12 denotes a large-capacity first associative memory having a RAM structure, which comprises an address register B2, a branch instruction address array 8, and a branch instruction address array 9.
Reference numeral 13 denotes a small-capacity second branch-address associative memory having a register configuration, which comprises a branch instruction address register 3 and a branch destination address register 4.

【0036】14は命令語の先取り制御を行う命令読み
出し制御回路、16は命令の分岐制御を行う分岐制御回
路である。15−1は分岐命令のパイプラインステージ
に対応して第2の分岐先連想記憶13による分岐予測情
報を保持する予測情報保持回路A、17−1は第2の分
岐先連想記憶13による予測情報と分岐判定が一致した
かどうかを比較する分岐判定比較回路A、18−1は第
2の分岐先連想記憶13に対する登録削除制御回路Aで
ある。15−2は分岐命令のパイプラインステージに対
応して第1の分岐先連想記憶12による分岐予測情報を
保持する予測情報保持回路B、17−2は第1の分岐先
連想記憶12による予測情報と分岐判定が一致したかど
うかを比較する分岐判定比較回路B、18−2は第1の
分岐先連想記憶12に対する登録削除制御回路Bであ
る。19アドレスレジスタA1あるいは登録削除制御回
路B18−2からのアドレスを選択する分岐命令アドレ
ス選択回路である。
Reference numeral 14 denotes an instruction read control circuit for performing prefetch control of instruction words, and 16 denotes a branch control circuit for performing instruction branch control. Reference numeral 15-1 denotes a prediction information holding circuit A for holding branch prediction information in the second branch destination associative memory 13 corresponding to a pipeline stage of a branch instruction, and 17-1 denotes prediction information in the second branch destination associative memory 13. And a branch determination comparison circuit A 18-1 for comparing whether or not the branch determination matches with the branch determination is a registration deletion control circuit A for the second branch destination associative memory 13. 15-2 is a prediction information holding circuit B for holding branch prediction information in the first branch destination associative memory 12 corresponding to a pipeline stage of a branch instruction, and 17-2 is prediction information in the first branch destination associative memory 12. A branch determination comparison circuit B 18-2 for comparing whether or not the branch determination matches with the branch determination is a registration deletion control circuit B for the first branch destination associative memory 12. 19 is a branch instruction address selection circuit for selecting an address from the address register A1 or the registration / deletion control circuit B18-2.

【0037】次に、図1の本発明の実施形態の情報処理
装置における第1の分岐先連想記憶および第2の分岐先
連想記憶の登録制御を、図2のタイムチャートを参照し
て説明する。図2は本実施形態にかかる情報処理装置の
動作を説明するパイプライン制御フローのタイムチャー
トである。パイプライン制御による命令の処理は、分岐
命令1が分岐成立し、分岐先命令2へと続く命令列を処
理するものとする。図示の例は第1の分岐先連想記憶1
2と第2の分岐先連想記憶13の両方とも分岐命令1の
命令アドレスは登録されていないが、分岐命令1が分岐
成立した場合に第2の分岐先連想記憶と第1の分岐先連
想記憶への登録動作を行うものである。
Next, the registration control of the first branch destination associative memory and the second branch destination associative memory in the information processing apparatus according to the embodiment of the present invention shown in FIG. 1 will be described with reference to the time chart of FIG. . FIG. 2 is a time chart of a pipeline control flow for explaining the operation of the information processing apparatus according to the present embodiment. In the processing of the instructions by the pipeline control, it is assumed that the branch instruction 1 is taken and the instruction sequence following the branch destination instruction 2 is processed. The illustrated example is the first branch destination associative memory 1
Although the instruction address of the branch instruction 1 is not registered in both the second and the second branch destination associative memories 13, when the branch instruction 1 is taken, the second branch destination associative memory and the first branch destination associative memory are stored. Registration operation.

【0038】命令読み出し制御回路14の制御下で、サ
イクル1で分岐命令1を含む命令語の命令読み出しが開
始され、サイクル2で読み出す命令語の命令アドレスを
生成する。サイクル3にて、サイクル2で生成した命令
アドレスを線100よりアドレスレジスタA1で受け、
アドレスレジスタA1との内容と第2の分岐先連想記憶
13内の分岐命令アドレスレジスタ3の内容とをアドレ
ス比較回路A5で比較を行い、分岐命令1の命令アドレ
スが分岐命令アドレスレジスタ3に登録されているかを
検出する。本ケースでは分岐命令1は登録されているこ
とが検出されないため、アドレス比較回路A5は予測情
報保持回路A15−1に分岐不成立予測信号を線121
を介して送出する。サイクル4で、線121の分岐不成
立予測信号を予測情報保持回路A15−1で受け、分岐
命令1のパイプラインステージに合わせて、該分岐不成
立予測信号をサイクル11(分岐命令1のEステージ)
まで保持する。
Under the control of the instruction read control circuit 14, the instruction reading of the instruction word including the branch instruction 1 is started in cycle 1, and the instruction address of the instruction word to be read is generated in cycle 2. In cycle 3, the instruction address generated in cycle 2 is received from line 100 by address register A1,
The contents of the address register A1 and the contents of the branch instruction address register 3 in the second branch destination associative memory 13 are compared by an address comparison circuit A5, and the instruction address of the branch instruction 1 is registered in the branch instruction address register 3. Is detected. In this case, since it is not detected that the branch instruction 1 has been registered, the address comparing circuit A5 sends the branch failure prediction signal to the prediction information holding circuit A15-1 by the line 121.
Out via. In cycle 4, the prediction information holding circuit A15-1 receives the branch failure prediction signal of the line 121, and in accordance with the pipeline stage of the branch instruction 1, sends the branch failure prediction signal in cycle 11 (E stage of branch instruction 1).
Hold up to

【0039】一方、サイクル4で、読み出す命令語の命
令アドレスをアドレスレジスタA1からアドレスレジス
タB2で受け、アドレスレジスタB2のアドレスと第1
の分岐先連想記憶12内の分岐命令アドレスアレイ8の
分岐アドレスとをアドレス比較回路B10で比較を行
い、分岐命令1の命令アドレスが分岐命令アドレスアレ
イ11の中に登録されているかを検出する。本ケースで
は分岐命令1は分岐命令アドレスアレイ11に登録され
ていないため、アドレス比較回路B10は予測情報保持
回路B15−2に分岐不成立予測信号を線122を介し
て送出する。サイクル5で、線122の分岐不成立予測
信号を予測情報保持回路B15−2で受け、分岐命令1
のパイプラインステージに合わせて分岐不成立予測信号
をサイクル11(分岐命令1のEステージ)まで保持す
る。
On the other hand, in cycle 4, the instruction address of the instruction word to be read is received from the address register A1 by the address register B2, and the address of the address register B2 and the first
Is compared with the branch address of the branch instruction address array 8 in the branch destination associative memory 12 by the address comparison circuit B10 to detect whether the instruction address of the branch instruction 1 is registered in the branch instruction address array 11. In this case, since the branch instruction 1 is not registered in the branch instruction address array 11, the address comparison circuit B10 sends out a branch failure prediction signal to the prediction information holding circuit B15-2 via the line 122. In cycle 5, the prediction information holding circuit B15-2 receives the branch failure prediction signal of the line 122 and outputs the branch instruction 1
Is held until cycle 11 (E stage of branch instruction 1).

【0040】サイクル11では、分岐制御回路16で分
岐命令1の分岐成立/不成立の判定が行われ、本ケース
は分岐成立であるため、分岐成立信号が分岐制御回路1
6から分岐判定比較回路A17−1に送出され、同様に
分岐判定比較回路B17−2にも分岐成立信号が送出さ
れる。分岐判定比較回路A17−1は、予測情報保持回
路A15−1でサイクル11まで保持させた分岐不成立
予測信号を線123を介して受け、分岐制御回路16か
ら受けた分岐成立信号と分岐不成立予測信号の比較を行
う。本ケースは分岐不成立予測であるが、分岐成立だっ
たため、予測は失敗し、分岐命令1の命令アドレスおよ
び分岐先アドレスを第2の分岐先連想記憶13に登録す
る必要があり、分岐判定比較回路A17−1は、第2の
分岐先連想記憶13の登録信号を生成して登録削除制御
回路A18−1に送出する。また、分岐判定比較回路B
17−2は、予測情報保持回路B15−2でサイクル1
1まで保持させた分岐不成立予測信号を線124を介し
て受け、分岐制御回路16から受けた分岐成立信号と分
岐不成立予測信号の比較を行う。本ケースは分岐不成立
予測であるが、分岐成立だったため、予測は失敗し、分
岐命令1の命令アドレスおよび分岐先アドレスを第1の
分岐先連想記憶12に登録する必要があり、分岐判定比
較回路17−2は第1の分岐先連想記憶の登録信号を生
成して登録削除制御回路B18−2に送出する。
In cycle 11, the branch control circuit 16 determines whether the branch of the branch instruction 1 is taken or not. In this case, the branch is taken.
6 is sent to the branch judgment / comparison circuit A17-1. Similarly, a branch establishment signal is sent to the branch judgment / comparison circuit B17-2. The branch determination / comparison circuit A17-1 receives, via the line 123, the branch failure prediction signal held by the prediction information holding circuit A15-1 until cycle 11, and receives the branch determination signal and the branch failure prediction signal received from the branch control circuit 16. Is compared. In this case, the branch is not taken. However, since the branch is taken, the prediction fails, and it is necessary to register the instruction address of the branch instruction 1 and the branch destination address in the second branch destination associative memory 13. A17-1 generates a registration signal of the second branch destination associative memory 13, and sends it to the registration deletion control circuit A18-1. Further, the branch determination comparison circuit B
17-2 is a cycle 1 in the prediction information holding circuit B15-2.
The branch not taken prediction signal held to 1 is received via the line 124, and the branch taken signal received from the branch control circuit 16 is compared with the branch not taken prediction signal. In this case, the branch is not taken. However, since the branch is taken, the prediction fails, and it is necessary to register the instruction address and the branch destination address of the branch instruction 1 in the first branch destination associative memory 12. 17-2 generates a registration signal for the first branch destination associative memory and sends it to the registration deletion control circuit B18-2.

【0041】登録削除制御回路A18−1は、登録信号
を分岐判定比較回路17−1から受け、分岐命令1の命
令アドレスおよび分岐先アドレスを分岐制御回路16か
ら受け、分岐命令1の登録信号と分岐命令アドレスと分
岐先アドレスを第2の分岐先連想記憶13に送出する。
また、登録削除制御回路B18−2は、登録信号を分岐
判定比較回路B17−2から受け、分岐命令1の命令ア
ドレスおよび分岐先アドレスを分岐制御回路16から受
け、分岐命令1の登録信号と分岐命令アドレスと分岐先
アドレスを第1の分岐先連想記憶12に送出する。そし
て、サイクル14で、第2の分岐先連想記憶13内の分
岐命令アドレスレジスタ3と分岐先アドレスレジスタ4
に分岐命令1の命令アドレスおよび分岐先アドレスの書
き込みが完了する。また、第1の分岐先連想記憶12で
は、アドレスレジスタB2に分岐命令1の命令アドレス
を受け、その分岐命令アドレスの一部を第1の分岐先連
想記憶12の登録する場所を示すアドレスとして、分岐
命令アドレスアレイ8と分岐先アドレスアレイ9に分岐
命令アドレスと分岐先アドレスの書き込みを行い、サイ
クル15で該第1の分岐先連想記憶12に対する分岐命
令アドレスと分岐先アドレスの書き込みが完了する。
The registration / deletion control circuit A18-1 receives the registration signal from the branch determination / comparison circuit 17-1, receives the instruction address of the branch instruction 1 and the branch destination address from the branch control circuit 16, and stores the registration signal of the branch instruction 1 The branch instruction address and the branch destination address are sent to the second branch destination associative memory 13.
Further, the registration / deletion control circuit B18-2 receives the registration signal from the branch determination / comparison circuit B17-2, receives the instruction address and the branch destination address of the branch instruction 1 from the branch control circuit 16, and receives the registration signal of the branch instruction 1 and the branch signal. The instruction address and the branch destination address are sent to the first branch destination associative memory 12. Then, in cycle 14, the branch instruction address register 3 and the branch destination address register 4 in the second branch destination associative memory 13 are read.
Then, the writing of the instruction address of the branch instruction 1 and the branch destination address are completed. Further, in the first branch destination associative memory 12, the instruction address of the branch instruction 1 is received in the address register B2, and a part of the branch instruction address is used as an address indicating a location to be registered in the first branch destination associative memory 12. The branch instruction address and the branch destination address are written to the branch instruction address array 8 and the branch destination address array 9, and the writing of the branch instruction address and the branch destination address to the first branch destination associative memory 12 is completed in cycle 15.

【0042】このように、本発明の実施形態では、第1
の分岐先連想記憶12と第2の分岐先連想記憶13への
書き込みを、第1の分岐先連想記憶12と第2の分岐先
連想記憶13それぞれの予測情報に従って行うことで、
他方の予測に影響されず過不足ない登録が行われる。
As described above, in the embodiment of the present invention, the first
Is written to the branch destination associative memory 12 and the second branch destination associative memory 13 according to the prediction information of the first branch destination associative memory 12 and the second branch destination associative memory 13, respectively.
Registration is performed without being affected by the other prediction.

【0043】次に、図1の本実施形態の情報処理装置に
おける第1の分岐先連想記憶12と第2の分岐先連想記
憶13の削除動作を、図3のタイムチャートを参照して
説明する。パイプライン制御による命令の処理は分岐命
令1が分岐不成立で命令2へと続く命令列を処理するも
のとする。図3の例は、第1の分岐先連想記憶12と第
2の分岐先連想記憶13の両方に登録されている分岐命
令1が分岐不成立だった場合に、第1の分岐先連想記憶
12と第2の分岐先連想記憶13の削除動作を行うもの
である。
Next, the operation of deleting the first branch destination associative memory 12 and the second branch destination associative memory 13 in the information processing apparatus of this embodiment of FIG. 1 will be described with reference to the time chart of FIG. . Instruction processing by pipeline control is to process an instruction sequence following instruction 2 when branch instruction 1 is not taken. In the example of FIG. 3, when the branch instruction 1 registered in both the first branch destination associative memory 12 and the second branch destination associative memory 13 is not taken, the first branch destination associative memory 12 and The second branch destination associative memory 13 is deleted.

【0044】サイクル1で分岐命令1を含む命令語の命
令読み出しが開始され、サイクル2で読み出す命令語の
命令アドレスを生成し、サイクル3にて、サイクル2で
生成した命令アドレスを線100よりアドレスレジスタ
A1で受け、アドレスレジスタA1のアドレスと第2の
分岐先連想記憶13内の分岐命令アドレスレジスタ3の
アドレスをアドレス比較回路A5で比較を行い、分岐命
令1の命令アドレスが分岐命令アドレスレジスタ3に登
録されているかを検出する。本ケースでは分岐命令1が
登録されていることが検出され、アドレス比較回路A5
は予測情報保持回路A15−1に分岐成立予測信号を線
121を介して送出する。サイクル4で、線121の分
岐成立予測信号を予測情報保持回路A15−1で受け、
分岐命令1のパイプラインステージに合わせて、該分岐
成立予測信号をサイクル11(分岐命令1のEステー
ジ)まで保持する。
In cycle 1, the instruction reading of the instruction word including the branch instruction 1 is started, the instruction address of the instruction word to be read in cycle 2 is generated, and in cycle 3, the instruction address generated in cycle 2 is sent from the line 100 to the address. The address received by the register A1, the address of the address register A1 and the address of the branch instruction address register 3 in the second branch destination associative memory 13 are compared by an address comparison circuit A5. Detect if it is registered in. In this case, it is detected that the branch instruction 1 is registered, and the address comparison circuit A5
Sends a branch taken prediction signal to the prediction information holding circuit A15-1 via the line 121. In cycle 4, the branch taken prediction signal of the line 121 is received by the prediction information holding circuit A15-1,
The branch taken prediction signal is held until cycle 11 (E stage of branch instruction 1) in accordance with the pipeline stage of branch instruction 1.

【0045】一方、サイクル4では、アドレスレジスタ
A1より読み出す命令語の命令アドレスをアドレスレジ
スタB2で受け、アドレスレジスタB2のアドレスと第
1の分岐先連想記憶12内の分岐命令アドレスアレイ8
のアドレスとをアドレス比較回路B10で比較を行い、
分岐命令1の命令アドレスが分岐命令アドレスアレイ8
の中に登録されているかを検出する。本ケースでは分岐
命令1は分岐命令アドレスアレイ8に登録されているこ
とが検出され、アドレス比較回路B10は予測情報保持
回路B15−2に分岐成立予測信号を線122を介して
送出する。サイクル5で、線122の分岐成立予測信号
を予測情報保持回路B15−2で受け、分岐命令1のパ
イプラインステージに合わせて、該分岐成立予測信号を
サイクル11(分岐命令1のEステージ)まで保持す
る。
On the other hand, in cycle 4, the instruction address of the instruction word read from the address register A1 is received by the address register B2, and the address of the address register B2 and the branch instruction address array 8 in the first branch destination associative memory 12 are read.
Is compared with the address in the address comparison circuit B10.
The instruction address of the branch instruction 1 is the branch instruction address array 8
Detects whether it is registered in. In this case, it is detected that the branch instruction 1 is registered in the branch instruction address array 8, and the address comparison circuit B10 sends a branch establishment prediction signal to the prediction information holding circuit B15-2 via the line 122. In cycle 5, the branch taken prediction signal of line 122 is received by the prediction information holding circuit B15-2, and the branch taken prediction signal is sent to cycle 11 (E stage of branch instruction 1) in accordance with the pipeline stage of branch instruction 1. Hold.

【0046】サイクル11で、分岐制御回路16にて分
岐命令1の分岐成立/不成立の判定が行われ、本ケース
は分岐不成立であるため、分岐不成立信号が分岐制御回
路16から分岐判定比較回路A17−1に送出され、同
様に分岐判定比較回路B17−2にも分岐不成立信号が
送出される。分岐判定比較回路A17−1は、予測情報
保持回路A15−1でサイクル11まで保持させた分岐
成立予測信号を線1234を介して受け、また、分岐制
御回路16から分岐不成立信号を受けて、分岐成立予測
信号と比較を行う。本ケースは分岐成立予測であるが、
分岐不成立だったため、予測は失敗し、分岐命令1の命
令アドレスおよび分岐先アドレスを第2の分岐先連想記
憶13から削除する必要があり、分岐判定比較回路A1
7−1では第2の分岐先連想記憶13の削除信号を生成
して登録削除制御回路A18−1に送出する。また、分
岐判定比較回路B17−2は、予測情報保持回路B15
−2でサイクル11まで保持させた分岐成立予測信号を
線124を介して受け、また、分岐制御回路16から分
岐不成立信号を受けて、分岐成立予測信号と比較を行
う。本ケースは分岐成立予測であるが、分岐不成立だっ
たため、予測は失敗し、分岐命令1の命令アドレスおよ
び分岐先アドレスを第1の分岐先連想記憶12から削除
する必要があり、分岐判定比較回路17−2では第1の
分岐先連想記憶12の削除信号を生成して登録削除制御
回路B18−2に送出する。
In cycle 11, the branch control circuit 16 determines whether the branch instruction 1 is taken or not. In this case, the branch is not taken. Therefore, the branch not-taken signal is sent from the branch control circuit 16 to the branch judgment comparison circuit A17. -1. Similarly, a branch failure signal is also sent to the branch determination / comparison circuit B17-2. The branch determination / comparison circuit A17-1 receives via the line 1234 the branch taken prediction signal held by the prediction information holding circuit A15-1 up to cycle 11, and receives the branch not taken signal from the branch control circuit 16, and A comparison is made with the establishment prediction signal. This case is a branch taken prediction,
Since the branch was not taken, the prediction failed, and it was necessary to delete the instruction address and the branch destination address of the branch instruction 1 from the second branch destination associative memory 13, and the branch determination comparison circuit A1
At 7-1, a delete signal of the second branch destination associative memory 13 is generated and sent to the registration / deletion control circuit A18-1. Further, the branch determination comparison circuit B17-2 includes a prediction information holding circuit B15.
At -2, the branch taken prediction signal held up to the cycle 11 is received via the line 124, and the branch not taken signal is received from the branch control circuit 16, and is compared with the branch taken prediction signal. This case is a branch taken prediction, but the prediction fails because the branch was not taken, and the instruction address and the branch destination address of the branch instruction 1 need to be deleted from the first branch destination associative memory 12. At 17-2, a delete signal for the first branch destination associative memory 12 is generated and sent to the registration / deletion control circuit B18-2.

【0047】登録削除制御回路A18−1は、削除信号
を分岐判定比較回路A17−1から受け、分岐命令1の
命令アドレスおよび分岐先アドレスを分岐制御回路16
から受け、分岐命令1の削除信号を第2の分岐先連想記
憶13に送出する。また、登録削除制御回路B18−2
は削除信号を分岐判定比較回路B17−2から受け、分
岐命令1の命令アドレスを分岐制御回路16から受け、
分岐命令1の削除信号と分岐命令アドレスを第1の分岐
先連想記憶12に送出する。そして、サイクル12で、
第2の分岐先連想記憶13に対する分岐命令1の命令ア
ドレスおよび分岐先アドレスの削除が完了する。また、
第1の分岐先連想記憶12では、アドレスレジスタB2
に分岐命令1の命令アドレスを受け、その分岐命令アド
レスを第1の分岐先連想記憶12の削除アドレスとして
分岐命令アドレスと分岐先アドレスの削除を行い、サイ
クル13で第1の分岐先連想記憶12に対する分岐命令
アドレスと分岐先アドレスの削除が完了する。
The registration / deletion control circuit A18-1 receives the deletion signal from the branch judgment / comparison circuit A17-1, and outputs the instruction address of the branch instruction 1 and the branch destination address to the branch control circuit 16-1.
And sends a delete signal of the branch instruction 1 to the second branch destination associative memory 13. Also, the registration deletion control circuit B18-2
Receives the delete signal from the branch determination / comparison circuit B17-2, receives the instruction address of the branch instruction 1 from the branch control circuit 16,
The delete signal of the branch instruction 1 and the branch instruction address are sent to the first branch destination associative memory 12. Then, in cycle 12,
The deletion of the instruction address of the branch instruction 1 and the branch destination address from the second branch destination associative memory 13 is completed. Also,
In the first branch destination associative memory 12, the address register B2
Receives the instruction address of the branch instruction 1 and deletes the branch instruction address and the branch destination address using the branch instruction address as the delete address of the first branch destination associative memory 12. The deletion of the branch instruction address and the branch destination address for is completed.

【0048】このように、本発明の実施形態では、第1
の分岐先連想記憶12と第2の分岐先連想記憶13への
削除を第1の分岐先連想記憶12と第2の分岐先連想記
憶13それぞれの予測情報に従って行うことで、他方の
予測に影響されず過不足ない削除が行われる。
As described above, in the embodiment of the present invention, the first
Is deleted from the branch destination associative memory 12 and the second branch destination associative memory 13 in accordance with the prediction information of the first branch destination associative memory 12 and the second branch destination associative memory 13, thereby affecting the other prediction. The deletion is performed without any excess or shortage.

【0049】図4は本発明の他の一実施形態で、第1の
分岐先連想記憶および第2の分岐先連想記憶が同じ分岐
命令アドレスで検出された場合、一方の命令読み出しを
抑止し、命令の処理を高速化することを特徴とする情報
処理装置のブロック図である。図4において、20が本
実施形態で設けた読み出し処理抑止回路であり、その他
の構成は図1と同じである。
FIG. 4 shows another embodiment of the present invention. In the case where the first branch destination associative memory and the second branch destination associative memory are detected at the same branch instruction address, the reading of one instruction is suppressed. FIG. 9 is a block diagram of an information processing apparatus characterized by accelerating instruction processing. In FIG. 4, reference numeral 20 denotes a read processing suppressing circuit provided in the present embodiment, and the other configuration is the same as that of FIG.

【0050】図5は、第1の分岐先連想記憶12と第1
の分岐先連想記憶13で同じ分岐命令アドレスで分岐命
令が検出された場合、一方の命令読み出しを抑止する回
路20を持つ、図4の情報処理装置における命令処理の
タイムチャートである。図5では、パイプライン制御に
よる命令の処理は分岐命令1が分岐成立し分岐先命令2
へと実行されるものとし、分岐命令1は第1の分岐先連
想記憶12と第2の分岐先連想記憶13の両方に分岐命
令アドレスが登録されているものとする。
FIG. 5 shows the first branch destination associative memory 12 and the first branch destination associative memory 12.
5 is a time chart of the instruction processing in the information processing apparatus of FIG. 4 including a circuit 20 for suppressing reading of one instruction when a branch instruction is detected at the same branch instruction address in the branch destination associative memory 13 of FIG. In FIG. 5, the instruction processing by the pipeline control is such that the branch instruction 1 is taken and the branch destination instruction 2 is taken.
It is assumed that the branch instruction 1 is registered in both the first branch destination associative memory 12 and the second branch destination associative memory 13.

【0051】サイクル1で分岐命令1を含む命令列を読
み出す処理が開始され、サイクル3で線100よりアド
レスレジスタA1に読み出す命令語の命令アドレスを受
け、該アドレスレジスタA1の内容と第2の分岐先連想
記憶13内の分岐命令アドレスレジスタ3の内容とをア
ドレス比較回路A5で比較を行い、分岐命令1の命令ア
ドレスが分岐命令アドレスレジスタ3に登録されている
かを検出する。本ケースでは分岐命令1が登録されてい
ることが検出されるため、アドレス比較回路A5は、そ
の検出信号を命令読み出し制御回路14に送出し、同時
に検出された分岐命令に対応する分岐先アドレスが分岐
先アドレスレジスタ4より読み出され、命令読み出し制
御回路14に送出される。また、アドレス比較回路A5
は、読み出し処理抑止回路20に前記検出信号と検出さ
れた分岐命令アドレスを送出する。サイクル4でアドレ
スレジスタB2に命令読み出しアドレスを受け、アドレ
スレジスタB2の内容と第1の分岐先連想記憶12内の
分岐命令アドレスアレイ8の内容をアドレス比較回路B
10で比較を行い、分岐命令1の命令アドレスが分岐命
令アドレスアレイ8に登録されているかを検出する。本
ケースでは分岐命令1が登録されていることが検出され
るため、アドレス比較回路B10は、その検出信号と検
出された分岐命令アドレスを、読み出し処理抑止回路2
0に送出する。
In cycle 1, a process of reading an instruction sequence including the branch instruction 1 is started. In cycle 3, the instruction address of the instruction word to be read from the line 100 to the address register A1 is received, and the contents of the address register A1 and the second branch are received. The contents of the branch instruction address register 3 in the associative memory 13 are compared by the address comparison circuit A5, and it is detected whether or not the instruction address of the branch instruction 1 is registered in the branch instruction address register 3. In this case, since it is detected that the branch instruction 1 is registered, the address comparison circuit A5 sends the detection signal to the instruction read control circuit 14, and the branch destination address corresponding to the branch instruction detected at the same time is It is read from the branch destination address register 4 and sent to the instruction read control circuit 14. Further, the address comparison circuit A5
Sends the detection signal and the detected branch instruction address to the read processing inhibiting circuit 20. In cycle 4, the instruction read address is received by the address register B2, and the contents of the address register B2 and the contents of the branch instruction address array 8 in the first branch destination associative memory 12 are compared with the address comparison circuit B.
A comparison is made at 10 to detect whether the instruction address of the branch instruction 1 is registered in the branch instruction address array 8. In this case, since it is detected that the branch instruction 1 has been registered, the address comparison circuit B10 compares the detection signal and the detected branch instruction address with the read processing suppression circuit 2
Send to 0.

【0052】読み出し処理抑止回路20では、サイクル
3でアドレス比較回路A5から受けた分岐命令アドレス
とサイクル4でアドレス比較回路B10から受けた分岐
命令アドレスの比較を行う。本ケースではアドレス比較
回路A5から受けた分岐命令アドレスとアドレス比較回
路B10から受けた分岐命令アドレスが一致しているた
め、既に第2の分岐先連想記憶13による命令読み出し
処理が行われていることを判断し、読み出し処理抑止回
路20は、第1の分岐先連想記憶12による命令読み出
し処理を抑止するための読み出し処理抑止信号を生成
し、第1の分岐先連想記憶12による分岐命令1の検出
信号を、命令読み出し制御回路14に送出するのを抑止
する。
The read processing suppressing circuit 20 compares the branch instruction address received from the address comparison circuit A5 in cycle 3 with the branch instruction address received from the address comparison circuit B10 in cycle 4. In this case, since the branch instruction address received from the address comparison circuit A5 matches the branch instruction address received from the address comparison circuit B10, the instruction read processing by the second branch destination associative memory 13 has already been performed. And the read processing suppression circuit 20 generates a read processing suppression signal for suppressing the instruction read processing by the first branch destination associative memory 12, and detects the branch instruction 1 by the first branch destination associative memory 12. The transmission of the signal to the instruction read control circuit 14 is suppressed.

【0053】このように、本実施形態では、第1の分岐
先連想記憶12と第2の分岐先連想記憶13の両方で同
一の分岐命令の命令アドレスが登録されていることが検
出された場合、命令読み出し制御回路14における第1
の分岐先連想記憶12による分岐先命令の読み出し処理
を抑止し、不要な命令読み出しを行わないことで、メモ
リへのアクセス回数を低減することができる。
As described above, in this embodiment, when it is detected that the instruction address of the same branch instruction is registered in both the first branch destination associative memory 12 and the second branch destination associative memory 13 , The first in the instruction read control circuit 14
The reading processing of the branch destination instruction by the branch destination associative memory 12 is suppressed, and unnecessary instruction reading is not performed, so that the number of accesses to the memory can be reduced.

【0054】図6は、本発明の更に他の一実施形態で、
第1の分岐先連想記憶および第2の分岐先連想記憶が異
なる分岐命令アドレスで検出された場合、命令の実行順
序を判断し、後に実行される分岐命令の命令読み出しを
抑止し、命令の処理を高速化することを特徴とする情報
処理装置のブロック図である。図6において、21が本
実施形態で特に設けた読み出し処理中断回路であり、そ
の他の構成は図4と同じである。
FIG. 6 shows still another embodiment of the present invention.
When the first branch destination associative memory and the second branch destination associative memory are detected at different branch instruction addresses, the execution order of the instructions is determined, instruction reading of a later executed branch instruction is suppressed, and instruction processing is performed. FIG. 2 is a block diagram of an information processing apparatus characterized by speeding up the processing. In FIG. 6, reference numeral 21 denotes a read processing interruption circuit particularly provided in the present embodiment, and other configurations are the same as those in FIG.

【0055】図7は、第1の分岐先連想記憶12と第2
の分岐先連想記憶13で異なる分岐命令の分岐命令アド
レスが検出された場合、分岐命令の実行順序を判断し、
一方の命令読み出しを中断する回路21を持つ、図6の
情報処理装置における命令処理のタイムチャートであ
る。図7では、パイプライン制御による命令の処理は分
岐命令1が分岐成立し分岐先命令2へと実行され、第1
の分岐先連想記憶12には分岐命令1の命令アドレスと
分岐先アドレスが登録されており、第2の分岐先連想記
憶13には分岐命令1の命令アドレスと分岐先アドレス
は登録されておらず、分岐命令1の命令アドレスよりも
大きい分岐命令アドレスの分岐命令の命令アドレスと分
岐先アドレスが登録されているものとする。
FIG. 7 shows the first branch destination associative memory 12 and the second branch destination associative memory 12.
If the branch instruction address of a different branch instruction is detected in the branch destination associative memory 13, the execution order of the branch instruction is determined,
7 is a time chart of instruction processing in the information processing apparatus of FIG. 6 having a circuit 21 for interrupting one instruction read. In FIG. 7, in the processing of the instruction by the pipeline control, the branch instruction 1 is taken and the branch instruction 1 is executed.
The instruction address and the branch destination address of the branch instruction 1 are registered in the branch destination associative memory 12, and the instruction address and the branch destination address of the branch instruction 1 are not registered in the second branch destination associative memory 13. It is assumed that the instruction address and the branch destination address of the branch instruction having the branch instruction address larger than the instruction address of the branch instruction 1 are registered.

【0056】サイクル1で分岐命令1を含む命令列を読
み出す処理が開始され、サイクル3で線100よりアド
レスレジスタA1に読み出す命令語の命令アドレスを受
け、アドレスレジスタA1の内容と第2の分岐先連想記
憶13内の分岐命令アドレスレジスタ3の内容とをアド
レス比較回路A5で比較を行い、分岐命令1の命令アド
レスが分岐命令アドレスレジスタ3に登録されているか
を検出する。本ケースでは分岐命令1とは異なる分岐命
令が登録されていることが検出され、アドレス比較回路
A5は、その検出信号を命令読み出し制御回路14に送
出する。同時に、検出された分岐命令に対応する分岐先
アドレスが分岐先アドレスレジスタ4より読み出され、
命令読み出し制御回路14に送出される。また、アドレ
ス比較回路A5は、読み出し処理抑止回路20と読み出
し処理中断回路21に、前記検出信号と検出された分岐
命令アドレスを送出する。サイクル4で、アドレスレジ
スタB2にアドレスレジスタA1より読み出す命令の命
令アドレスを受け、アドレスレジスタB2の内容と第1
の分岐先連想記憶12内の分岐命令アドレスアレイ8の
内容とをアドレス比較回路B10で比較を行い、分岐命
令1の命令アドレスが分岐命令アドレスアレイ8に登録
されているかを検出する。本ケースでは分岐命令1が登
録されていることが検出されるため、アドレス比較回路
B10は、その検出信号と検出された分岐命令アドレス
を、読み出し処理抑止回路20と読み出し処理抑止回路
21にそれぞれ送出する。また、検出された分岐命令1
の分岐先アドレスが分岐先アドレスアレイ9から読み出
され、分岐先アドレスアレイレジスタ14に送出され
る。
In cycle 1, the process of reading an instruction string including branch instruction 1 is started. In cycle 3, the instruction address of the instruction word to be read from line 100 to address register A1 is received, and the contents of address register A1 and the second branch destination are read. The contents of the branch instruction address register 3 in the associative memory 13 are compared by the address comparison circuit A5 to detect whether the instruction address of the branch instruction 1 is registered in the branch instruction address register 3. In this case, it is detected that a branch instruction different from the branch instruction 1 is registered, and the address comparison circuit A5 sends the detection signal to the instruction read control circuit 14. At the same time, the branch destination address corresponding to the detected branch instruction is read from the branch destination address register 4, and
The instruction is sent to the instruction read control circuit 14. Further, the address comparison circuit A5 sends the detection signal and the detected branch instruction address to the read processing inhibition circuit 20 and the read processing interruption circuit 21. In cycle 4, the instruction address of the instruction read from the address register A1 is received in the address register B2, and the contents of the address register B2 and the first address are read.
The content of the branch instruction address array 8 in the branch destination associative memory 12 is compared by the address comparison circuit B10 to detect whether the instruction address of the branch instruction 1 is registered in the branch instruction address array 8. In this case, since it is detected that the branch instruction 1 is registered, the address comparison circuit B10 sends the detection signal and the detected branch instruction address to the read processing inhibition circuit 20 and the read processing inhibition circuit 21, respectively. I do. Also, the detected branch instruction 1
Is read from the branch destination address array 9 and sent to the branch destination address array register 14.

【0057】読み出し処理抑止回路20では、サイクル
3でアドレス比較回路A5から受けた分岐命令アドレス
とサイクル4でアドレス比較回路B10から受けた分岐
命令アドレスの比較を行い、比較結果が不一致であるこ
とを検出するため、第1の分岐先連想記憶12に分岐命
令1の命令アドレスが登録されていることを検出した検
出信号を抑止せずに、命令読み出し制御回路14に送出
する。
The read processing suppression circuit 20 compares the branch instruction address received from the address comparison circuit A5 in cycle 3 with the branch instruction address received from the address comparison circuit B10 in cycle 4, and confirms that the comparison results are not identical. To detect this, the detection signal that detects that the instruction address of the branch instruction 1 is registered in the first branch destination associative memory 12 is sent to the instruction readout control circuit 14 without suppression.

【0058】読み出し処理抑止回路21では、サイクル
3でアドレス比較回路A5から受けた分岐命令アドレス
とサイクル4でアドレス比較回路B10から受けた分岐
命令アドレスの比較を行う。本ケースでは、アドレス比
較回路A5から受けた分岐命令アドレスよりアドレス比
較回路B10から受けた分岐命令アドレスの方が小さい
ため、分岐命令の実行順序は第1の分岐先連想記憶12
に登録されていた分岐命令が先に実行され、既に分岐先
命令の読み出し処理が開始されている第2の分岐先連想
記憶13に登録されていた分岐命令は実行される可能性
が低い。このため、読み出し処理中断回路21では、第
2の分岐先連想記憶13による命令読み出し処理を中断
するための読み出し処理中断信号を生成し、命令読み出
し制御回路14に該読み出し処理中断信号を送出する。
サイクル5では、命令読み出し制御回路14において、
読み出し処理中断信号により第2の分岐先連想記憶13
による命令読み出し処理を中断する。また、命令読み出
し制御回路14は、分岐先アドレスアレイレジスタ11
から受けた分岐先アドレスにより分岐命令1の分岐先命
令の読み出しを行う。
The read processing inhibiting circuit 21 compares the branch instruction address received from the address comparison circuit A5 in cycle 3 with the branch instruction address received from the address comparison circuit B10 in cycle 4. In this case, since the branch instruction address received from the address comparison circuit B10 is smaller than the branch instruction address received from the address comparison circuit A5, the execution order of the branch instructions is the first branch destination associative memory 12
The branch instruction registered in the second branch destination associative memory 13 in which the branch instruction registered in the second branch destination associative memory 13 in which the reading process of the branch destination instruction has already been started is less likely to be executed. Therefore, the read processing interruption circuit 21 generates a read processing interruption signal for interrupting the instruction read processing by the second branch destination associative memory 13, and sends the read processing interruption signal to the instruction read control circuit 14.
In cycle 5, the instruction read control circuit 14
The second branch destination associative memory 13 is read by the read processing interruption signal.
Interrupts the instruction reading process. Further, the instruction read control circuit 14 controls the branch destination address array register 11
The branch destination instruction of the branch instruction 1 is read based on the branch destination address received from.

【0059】このように、本実施形態では、第1の分岐
先連想記憶12と第2の分岐先連想記憶13で異なる分
岐命令の命令アドレスが登録されていることが検出され
た場合、第1の分岐先連想記憶12で検出された分岐命
令アドレスと第2の分岐先連想記憶13で検出された分
岐命令アドレスの比較を行い、第1の分岐先連想記憶1
2で検出された分岐命令アドレスの方が小さかった場合
に第2の分岐先連想記憶13による分岐先命令の読み出
し処理を中断し、第1の分岐先連想記憶12による分岐
先命令の読み出しのみを行うことで、不要な命令読み出
しを行わず、メモリへのアクセス回数を低減することが
できる。
As described above, in the present embodiment, when it is detected that the instruction addresses of different branch instructions are registered in the first branch destination associative memory 12 and the second branch destination associative memory 13, the first The first branch destination associative memory 1 is compared with the branch instruction address detected in the branch destination associative memory 12 and the branch instruction address detected in the second branch destination associative memory 13.
If the branch instruction address detected in step 2 is smaller, the process of reading the branch destination instruction by the second branch destination associative memory 13 is interrupted, and only the reading of the branch target instruction by the first branch destination associative memory 12 is performed. By doing so, unnecessary instruction reading is not performed, and the number of accesses to the memory can be reduced.

【0060】[0060]

【発明の効果】以上、説明したように、本発明によれ
ば、第1の分岐先連想記憶と第2の分岐先連想記憶の登
録削除を独立に行うことにより、他方の予測に影響され
ず過不足のない登録削除を行うことが可能で、不要な登
録/削除が抑止され、精度の高い分岐予測を行うことが
できる。
As described above, according to the present invention, registration and deletion of the first branch destination associative memory and the second branch destination associative memory are independently performed, so that the other branch is not affected by the prediction. It is possible to perform registration deletion without excess / shortage, unnecessary registration / deletion is suppressed, and highly accurate branch prediction can be performed.

【0061】また、本発明によれば、分岐命令の命令ア
ドレスが第1の分岐先連想記憶と第2の分岐先連想記憶
の両方で登録されていることが検出され、検出された分
岐命令アドレスが第1の分岐先連想記憶と第2の分岐先
連想記憶で一致していた場合に重複して行われる命令の
読み出しを抑止し、不要な命令読み出しを行わないこと
で、メモリへのアクセス回数を低減することができる。
According to the present invention, it is detected that the instruction address of the branch instruction is registered in both the first branch destination associative memory and the second branch destination associative memory, and the detected branch instruction address is detected. Is suppressed in the first branch destination associative memory and the second branch destination associative memory, and the number of accesses to the memory can be suppressed by not reading out unnecessary instructions. Can be reduced.

【0062】また、本発明によれば、分岐命令の命令ア
ドレスが第1の分岐先連想記憶と第2の分岐先連想記憶
の両方で登録されていることが検出され、第1の分岐先
連想記憶で検出された分岐命令アドレスと第2の分岐先
連想記憶で検出された分岐命令アドレスの比較を行い、
第1の分岐先連想記憶で検出された分岐命令アドレスの
方が小さい場合、第2の分岐先連想記憶による命令読み
出し処理を中断し、不要な命令読み出し処理を行わない
ことで、同様にメモリへのアクセス回数を低減すること
ができる。
Further, according to the present invention, it is detected that the instruction address of the branch instruction is registered in both the first branch destination associative memory and the second branch destination associative memory, and the first branch destination associative memory is detected. Comparing the branch instruction address detected in the storage with the branch instruction address detected in the second branch destination associative memory;
When the branch instruction address detected in the first branch destination associative memory is smaller, the instruction read processing by the second branch destination associative memory is interrupted, and unnecessary instruction read processing is not performed. Can be reduced.

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

【図1】本発明の第1の実施例を示すブロック図であ
る。
FIG. 1 is a block diagram showing a first embodiment of the present invention.

【図2】第1の実施例において分岐先連想記憶への登録
を行う場合のタイムチャートである。
FIG. 2 is a time chart in a case where registration to a branch destination associative memory is performed in the first embodiment.

【図3】第1の実施例において分岐先連想記憶の削除を
行う場合のタイムチャートである。
FIG. 3 is a time chart when deleting a branch destination associative memory in the first embodiment.

【図4】本発明の第2の実施例を示すブロック図であ
る。
FIG. 4 is a block diagram showing a second embodiment of the present invention.

【図5】第2の実施例において分岐先連想記憶による命
令読み出しを行う場合のタイムチャートである。
FIG. 5 is a time chart when an instruction is read out by a branch destination associative memory in the second embodiment.

【図6】本発明の第3の実施例を示すブロック図であ
る。
FIG. 6 is a block diagram showing a third embodiment of the present invention.

【図7】第3の実施例において分岐先連想記憶による命
令読み出しを行う場合のタイムチャートである。
FIG. 7 is a time chart when an instruction is read out by associative storage of a branch destination in the third embodiment.

【図8】分岐先連想記憶方式の情報処理装置の従来例の
一般的ブロック図である。
FIG. 8 is a general block diagram of a conventional example of a branch destination associative storage type information processing apparatus.

【図9】従来例において第1の分岐先連想記憶のみに分
岐命令の命令アドレスが登録されていた場合の命令読み
出しを行う場合のタイムチャートである。
FIG. 9 is a time chart for performing an instruction read when an instruction address of a branch instruction is registered only in the first branch destination associative memory in the conventional example.

【図10】従来例において第2の分岐先連想記憶に分岐
命令の命令アドレスが登録されていた場合の命令読み出
しを行う場合のタイムチャートである。
FIG. 10 is a time chart for performing an instruction read when an instruction address of a branch instruction is registered in a second branch destination associative memory in a conventional example.

【図11】従来例において分岐先連想記憶に登録する場
合のタイムチャートである。
FIG. 11 is a time chart when registering in a branch destination associative memory in a conventional example.

【図12】従来例において分岐先連想記憶の削除をする
場合のタイムチャートである。
FIG. 12 is a time chart when deleting a branch destination associative memory in a conventional example.

【符号の説明】[Explanation of symbols]

1 アドレスレジスタA 2 アドレスレジスタB 3 分岐命令アドレスレジスタ 4 分岐先アドレスレジスタ 5 アドレス比較回路A 8 分岐命令アドレスアレイ 9 分岐先アドレスアレイ 10 アドレス比較回路B 11 分岐先アドレスアレイレジスタ 12 第1の分岐先連想記憶 13 第2の分岐先連想記憶 14 命令読み出し制御回路 15−1,15−2 予測情報保持回路A,B 17−1,17−2 分岐判定比較回路A,B 18−1,18−2 登録削除制御回路A,B 19 分岐命令アドレス選択回路 20 読み出し処理抑止回路 21 読み出し処理中断回路 DESCRIPTION OF SYMBOLS 1 Address register A 2 Address register B 3 Branch instruction address register 4 Branch destination address register 5 Address comparison circuit A 8 Branch instruction address array 9 Branch destination address array 10 Address comparison circuit B 11 Branch destination address array register 12 First branch destination Associative memory 13 Second branch destination associative memory 14 Instruction reading control circuit 15-1, 15-2 Prediction information holding circuits A, B 17-1, 17-2 Branch judgment comparing circuits A, B 18-1, 18-2 Registration / deletion control circuits A and B 19 Branch instruction address selection circuit 20 Read processing suppression circuit 21 Read processing interruption circuit

───────────────────────────────────────────────────── フロントページの続き (72)発明者 平岡 徹 東京都小平市上水本町5丁目22番1号 株 式会社日立超エル・エス・アイ・システム ズ内 (72)発明者 尾島 和郎 神奈川県秦野市堀山下1番地 株式会社日 立製作所汎用コンピュータ事業部内 (72)発明者 糸井 朋永 神奈川県秦野市堀山下1番地 株式会社日 立製作所汎用コンピュータ事業部内 (72)発明者 袴田 正史 神奈川県秦野市堀山下1番地 株式会社日 立製作所汎用コンピュータ事業部内 Fターム(参考) 5B013 BB11 BB15  ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Toru Hiraoka 5-22-1, Josuihoncho, Kodaira-shi, Tokyo Inside Hitachi Ultra-SII Systems Co., Ltd. (72) Inventor Kazuo Ojima Kanagawa 1 Horiyamashita, Hadano-shi, General-purpose Computer Business Division, Hitachi, Ltd. (72) Inventor Tomonaga Itoi 1-Horiyamashita, Hadano-shi, Kanagawa Prefecture, General-purpose Computer Business Division, Hitachi, Ltd. 1 Ichihoriyamashita F-term in the General-purpose Computer Division, Hitachi, Ltd. 5B013 BB11 BB15

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 分岐先連想記憶を用い、分岐先命令を先
行して読み出して分岐命令の処理を高速化する情報処理
装置において、 過去の分岐命令の実行履歴に従い、分岐命令の命令アド
レスと該分岐命令の分岐先アドレスを格納する第1の分
岐先連想記憶手段と、該第1の分岐先連想記憶手段より
小容量ではあるが高速な第2の分岐先連想記憶手段と、 命令語の先取りにおいて先取る命令語に含まれている分
岐命令の命令アドレスが第1の分岐先連想記憶に登録さ
れているかどうかを検出する第1の検出手段と、 命令語の先取りにおいて先取る命令語に含まれている分
岐命令の命令アドレスが第2の分岐先連想記憶に登録さ
れているかどうかを検出する第2の検出手段と、 第1の検出手段により第1の分岐先連想記憶で該分岐命
令の命令アドレスが登録されていることが検出された場
合、その検出結果と該分岐命令が分岐成立か不成立かを
示す分岐判定結果とを比較する第1の比較手段と、 第2の検出手段により第2の分岐先連想記憶で該分岐命
令の命令アドレスが登録されていることが検出された場
合、その検出結果と該分岐命令が分岐成立か不成立かを
示す分岐判定結果とを比較する第2の比較手段と、 第1の比較手段の比較結果に従い第1の分岐先連想記憶
に登録/削除を行う第1の登録削除手段と、 第2の比較手段の比較結果に従い第2の分岐先連想記憶
に登録/削除を行う第2の登録削除手段を備え、 第1の分岐先連想記憶と第2の分岐先連想記憶への登録
/削除を独立に行うことを特徴とする分岐先連想記憶方
式の情報処理装置。
1. An information processing apparatus for reading a branch instruction ahead of time by using a branch destination associative memory to speed up the processing of the branch instruction. First branch destination associative storage means for storing a branch destination address of a branch instruction; second branch destination associative storage means smaller in size but faster than the first branch destination associative storage means; A first detecting means for detecting whether or not the instruction address of the branch instruction included in the prefetched instruction word is registered in the first branch destination associative memory; Second detecting means for detecting whether or not the instruction address of the branch instruction which has been registered is registered in the second branch destination associative memory; and Instruction add When it is detected that the branch instruction is registered, first detection means for comparing the detection result with a branch determination result indicating whether the branch instruction is taken or not taken; Is detected in the associative memory of the branch destination, the result of the detection is compared with a branch determination result indicating whether the branch instruction is taken or not taken. Means, first registration / deletion means for registering / deleting the first branch destination associative memory according to the comparison result of the first comparison means, and second branch destination associative memory according to the comparison result of the second comparison means. Information on a branch destination associative memory system, comprising a second registration / deletion means for performing registration / deletion, wherein registration / deletion to / from the first branch destination associative memory and the second branch destination associative memory is performed independently. Processing equipment.
【請求項2】 命令語の先取りにおいて先取る命令語に
含まれている分岐命令の命令アドレスが第1の分岐先連
想記憶と第2の分岐先連想記憶の両方に登録されている
ことが検出された場合に、第1の分岐先連想記憶で検出
された分岐命令アドレスと第2の分岐先連想記憶で検出
された分岐命令アドレスを比較し、その比較結果が一致
した場合に第1の分岐先連想記憶から読み出した分岐先
アドレスによる命令読み出しを抑止する手段を備え、 重複した命令読み出しを抑止することを特徴とする請求
項1に記載の分岐先連想記憶方式の情報処理装置。
2. The method according to claim 1, wherein the prefetching of the instruction word detects that the instruction address of the branch instruction included in the prefetched instruction word is registered in both the first branch destination associative memory and the second branch destination associative memory. In this case, the branch instruction address detected in the first branch destination associative memory is compared with the branch instruction address detected in the second branch destination associative memory. 2. The information processing apparatus according to claim 1, further comprising means for suppressing reading of an instruction by a branch destination address read from the first associative memory, and suppressing duplicate instruction reading.
【請求項3】 命令語の先取りにおいて先取る命令語に
含まれている分岐命令の命令アドレスが第1の分岐先連
想記憶と第2の分岐先連想記憶の両方で登録されている
ことが検出された場合に、第1の分岐先連想記憶で検出
された分岐命令アドレスと第2の分岐先連想記憶で検出
された分岐命令アドレスを比較し、該比較結果が第1の
分岐先連想記憶で検出された分岐命令アドレスの方が小
さい場合に第2の分岐先連想記憶から読み出した分岐先
アドレスによる命令読み出しを中断する手段を備え、 不要な命令読み出しを抑止することを特徴とする請求項
1に記載の分岐先連想記憶方式の情報処理装置。
3. The method according to claim 1, wherein the prefetching of the instruction word detects that the instruction address of the branch instruction included in the prefetched instruction word is registered in both the first branch destination associative memory and the second branch destination associative memory. In this case, the branch instruction address detected in the first branch destination associative memory is compared with the branch instruction address detected in the second branch destination associative memory, and the comparison result is stored in the first branch destination associative memory. 2. The method according to claim 1, further comprising: means for interrupting the instruction read by the branch destination address read from the second branch destination associative memory when the detected branch instruction address is smaller, thereby suppressing unnecessary instruction read. An information processing apparatus using a branch destination associative storage method according to claim 1.
JP11028941A 1999-02-05 1999-02-05 Information processor for branch destination associative storage system Withdrawn JP2000227857A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11028941A JP2000227857A (en) 1999-02-05 1999-02-05 Information processor for branch destination associative storage system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11028941A JP2000227857A (en) 1999-02-05 1999-02-05 Information processor for branch destination associative storage system

Publications (1)

Publication Number Publication Date
JP2000227857A true JP2000227857A (en) 2000-08-15

Family

ID=12262444

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11028941A Withdrawn JP2000227857A (en) 1999-02-05 1999-02-05 Information processor for branch destination associative storage system

Country Status (1)

Country Link
JP (1) JP2000227857A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018537771A (en) * 2015-12-15 2018-12-20 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Auxiliary branch prediction using usability tracking

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018537771A (en) * 2015-12-15 2018-12-20 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Auxiliary branch prediction using usability tracking

Similar Documents

Publication Publication Date Title
US4827402A (en) Branch advanced control apparatus for advanced control of a branch instruction in a data processing system
US4881170A (en) Instruction prefetch control apparatus
JP2002297379A (en) Hardware prefetch system
JPH03147022A (en) Branch instruction processing apparatus and method
JP2008186233A (en) Instruction cache pre-fetch control method and device thereof
JP2596712B2 (en) System and method for managing execution of instructions, including adjacent branch instructions
KR100719420B1 (en) Information processing device
JP2570859B2 (en) Data processing device
JP2000227857A (en) Information processor for branch destination associative storage system
JPS5991551A (en) Instruction prefetching device forecasting address to be branched
JPH04205448A (en) Information processor
JPH0248733A (en) Information processor
JP2001154845A (en) Memory bus access control system after cache miss
JP4049490B2 (en) Information processing device
JPH04213727A (en) Information processor
CN117093271A (en) Branch instruction prefetching method and device
JPH06301537A (en) Instruction fetching circuit
JPH0646381B2 (en) Instruction fetching device
JPH0227430A (en) Fetching system for branching instruction
JPH08212068A (en) Information processor
JPS5991554A (en) Instruction prefetch device forecasting branch direction
JPS581247A (en) Cntrolling method for instruction advance-fetch
JPH02278428A (en) Branch control system
JPH09218825A (en) Variable cache system
JPH04239324A (en) Branch destination estimating system

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060509