JPH0256636A - Branching controller - Google Patents

Branching controller

Info

Publication number
JPH0256636A
JPH0256636A JP20741888A JP20741888A JPH0256636A JP H0256636 A JPH0256636 A JP H0256636A JP 20741888 A JP20741888 A JP 20741888A JP 20741888 A JP20741888 A JP 20741888A JP H0256636 A JPH0256636 A JP H0256636A
Authority
JP
Japan
Prior art keywords
branch destination
branch
destination address
instruction
register
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP20741888A
Other languages
Japanese (ja)
Inventor
Kenichi Maeda
賢一 前田
Takeshi Aikawa
健 相川
Mitsuo Saito
斉藤 光男
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP20741888A priority Critical patent/JPH0256636A/en
Publication of JPH0256636A publication Critical patent/JPH0256636A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)
  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To execute a branch instruction at a high speed without necessitating a complicated hardware, etc. by providing a simple register instead of a branch target cache and registering only a branch to an address being smaller than the present program counter. CONSTITUTION:When a branch destination address is smaller than a value of a program counter 4, a comparator 5 outputs a signal. On the other hand, the branch destination address is compared with a branch destination address register 7 by a comparator 10, and when the branch destination address register 7 and the branch destination address are equal to each other, this comparator 10 outputs a signal. This signal is brought to AND with a branch signal by a gate 11 and becomes a selecting signal, and this selecting signal shows a fact that the branch destination coincides with the most recent branch destination to the rear. The selecting signal is supplied to a selector 12, and selects the contents of a branch destination instruction register 9 instead of a regular instruction buffer. In such a way, an instruction of the branch destination which is fetched in advance is executed at a high speed.

Description

【発明の詳細な説明】 〔発明の目的〕 (産業上の利用分野) 本発明はコンピュータなどに用いられる分岐制御装置に
関する。
DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Field of Industrial Application) The present invention relates to a branch control device used in computers and the like.

(従来の技術) 従来、コンビ二一夕などの分岐命令を高速に実行するた
めに、ブランチ−ターゲット・キャッシユなどの技術が
用いられてきた。これは分岐先のアドレスと命令とを高
速にアクセスできるキャVシェ・メモリにストアして2
いて、2度目以降の分岐が同じアドレスであるteには
このキャッシユから分岐先の命令をフェッチしてくると
いうものである。
(Prior Art) Conventionally, techniques such as branch-target cache have been used in order to execute branch instructions such as combination instructions at high speed. This stores the branch destination address and instructions in a cache memory that can be accessed at high speed.
Then, when the second and subsequent branches have the same address te, the branch destination instruction is fetched from this cache.

しかし、従来の技術においては、キャッシユの制御のた
めに複雑なハードウェアを必要とし、装置が大がかりで
高価なものになりてしまうという問題点かありたつ (発明が解決しようとする課題) この様に従来の技術では、分岐命令をキャッシュ制御に
より実行していたため、複雑なハードウェアを必要とす
るという欠点が有りた。
However, the conventional technology requires complicated hardware to control the cash machine, resulting in a large and expensive device (problem to be solved by the invention). In the conventional technique, branch instructions were executed by cache control, which had the disadvantage of requiring complicated hardware.

そこで本発明は、複雑なハードウェア等を必要とせずに
、分岐命令を高速実行できる装置を提供することを目的
としている。
Therefore, an object of the present invention is to provide a device that can execute branch instructions at high speed without requiring complicated hardware or the like.

〔発明の構成〕[Structure of the invention]

(課題を解決するための手段) 本発明においては、前記問題点を解決するために、ブラ
ンチ・ターゲフト・キャッシユの代わりに導線なレジス
タを設け、現在のプログラム・カウンタより小さいアド
レスへの分岐のみを佳録するものである。
(Means for Solving the Problems) In the present invention, in order to solve the above problems, a conductive register is provided in place of the branch target cache, and only a branch to an address smaller than the current program counter is executed. I would like to make a special note of this.

(作用) 分岐の実行時間が問題となるのは、ループはどのように
同一の分岐が多数回実行される場合である。ループは現
在のプログラム・カウンタより小さいアドレス、すなわ
ち後方への分岐である(第2図参照)。従りて、本発明
のようにプログラム・カウンタと分岐先アドレスとを比
較し、後方への分岐をレジスタに登録することによりて
、実行時間が間魂となる分岐を高速に実行することがで
きる。第3図のようにループが多重になりているvIj
廿、一番内測のループから回り出すので、このようなF
JA8−でも本発明は同様蛋こ作用する。ループの中に
非ループ性の分岐が存在する場合、列えば44図のよう
な局曾があるが、このような鴨曾に非ループ性の分岐は
レジスタ奢こ登録されないため、ループの部分だけが高
速化される。しかし、非ループ性の分岐は1回ごとに分
岐先が異なる性格の物であるから、ループと比較して実
行時1@が問題となる可能性は低い。
(Operation) Branch execution time becomes a problem when the same branch is executed many times in a loop. A loop is a branch to an address less than the current program counter, ie, backwards (see Figure 2). Therefore, by comparing the program counter and the branch destination address and registering a backward branch in a register as in the present invention, it is possible to execute a branch whose execution time is short at high speed. . vIj with multiple loops as shown in Figure 3
廿, since it starts from the innermost measurement loop, such F
The present invention works similarly on JA8-. If there is a non-loop branch in a loop, there will be a branch as shown in Figure 44, but since such a non-loop branch is not registered in the register, only the loop part is is accelerated. However, since a non-loop branch has a different branch destination each time, it is less likely that 1@ will pose a problem during execution compared to a loop.

(実jill1例) 以下に図1iiを参照して、本宅病の具体的実施例につ
いて説明する。
(One Actual Example) A specific example of the disease will be described below with reference to FIG. 1ii.

i1図は本発明の一実施例を示す図である。通常実行さ
れる命令は、メモリlから命令バッファ21こフェッチ
され、デコード/実行ユニット3で実行される0分岐岐
令は、デコード/実行ユニット中の分岐制御部で処理さ
れ、分岐信号と分岐先アドレスが生成される。分岐信号
によりてプログラム・カラ/り4が分岐先アドレスに更
新される。
Figure i1 is a diagram showing an embodiment of the present invention. An instruction to be normally executed is fetched from the instruction buffer 21 from memory 1, and a 0 branch branch instruction executed by the decode/execution unit 3 is processed by the branch control section in the decode/execution unit, and the branch signal and branch destination are An address is generated. The program color/ri4 is updated to the branch destination address by the branch signal.

さらに、分岐先アドレスは比較器5によりて更新される
前のプログラム・カウンタと比較される。
Further, the branch target address is compared with the program counter before being updated by the comparator 5.

この比較器はプログラムeカウンタの直より分岐先アド
レスがl」\さい鴇廿に信号を出す。この信号は分岐信
号とゲート6によりANDが取られ、ラッチ信号となる
。このラッチ信号は後方への分岐であることを示してい
る。ラッチ信号は分岐先アドレスと、遅延器8による一
足の遅延の後分岐先命令を、それぞれ分岐先アドレス・
レジスタ713よび分岐先命令レジスタ9にうVチする
。一方、分岐先アドレスは比較器lOによりて分岐先ア
ドレス・レジスタと比較される。この比較器は分岐先ア
ドレス拳レジスタと分岐先アドレスが等しい時信号を出
す。この信号は分岐信号とゲートllによりANDが取
られ選択信号となる。この選択信号は分岐先が最も最近
の後方への分岐先と一致したことを示している1選択信
号はセレクタ12に供給され、通常の命令バッファの代
わりに分岐先命守レジスタの内存を選択するにれ番こよ
り、罰もってフェVチしてきてありた分岐先の命令が高
速に実行される。
This comparator outputs a signal directly from the program e counter to the terminal whose branch destination address is "1". This signal is ANDed with the branch signal by gate 6, and becomes a latch signal. This latch signal indicates a backward branch. The latch signal outputs the branch destination address and the branch destination instruction after a delay of one foot by the delay device 8, respectively.
Write to register 713 and branch destination instruction register 9. On the other hand, the branch destination address is compared with the branch destination address register by comparator IO. This comparator outputs a signal when the branch destination address register and the branch destination address are equal. This signal is ANDed with the branch signal and gate 11 to become a selection signal. This selection signal indicates that the branch destination matches the most recent backward branch destination.The 1 selection signal is supplied to the selector 12, which selects the existence of the branch destination survival register instead of the normal instruction buffer. Since Nile's turn, the instruction at the branch destination, which has been punished as a fetish, is executed at high speed.

本発明は前記実施例に限定されるものではなく、その要
旨を変更しない範囲でさまざまの変形が可能である。例
えば、@5図に示すようにセレクタを112のように配
置してもよいし、第61擾こ示すように、分岐先の命令
そのものの代わりに命令のデコード結果をデコード結果
レジスタ202や分岐先デコード、′I!未レジスタ2
09にラッチし、これをセレクタ212で選択するよう
にしてもよい、後者の方法はパイプライン制御の1会に
より高速の実行が可能となる。この鳴曾、選択信号によ
りて、事前に登録された分岐先への分岐の際、プログラ
ム・カウンタを一つ先の自省を指すようにする必要があ
る。また、1!!延器208も遅延量を一つ増やす必要
がある。
The present invention is not limited to the embodiments described above, and various modifications can be made without changing the gist thereof. For example, as shown in Figure @5, the selectors may be arranged like 112, or as shown in Figure 61, the decoding result of the instruction is stored in the decode result register 202 or the branch destination instead of the branch destination instruction itself. Decode, 'I! unregistered 2
09 may be latched and selected by the selector 212. The latter method enables high-speed execution due to one cycle of pipeline control. When branching to a pre-registered branch destination, it is necessary to use this selection signal to point the program counter to the next step. Also, 1! ! It is also necessary to increase the delay amount by one in the delay device 208.

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

以上説明したように、本発明によれば、簡単なハードウ
ェアfζよりて分岐命令を高速に実行することができ、
実用的な効果が極めて大きい。
As explained above, according to the present invention, branch instructions can be executed at high speed using simple hardware fζ.
The practical effects are extremely large.

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

@1図は本発明の構成と示すブロック図、第2図、#c
3図、@4図は本発明の詳細な説明するための図1.第
5.図、第6図は本発明の別の実施例を説明する図であ
る。 l・・・メモリ、2・・・命令バッファ、3・・・デコ
ード/実行ユニット% 4・・・プログラムカウンタ、
5゜10・・・比較回路、6.11・・・AND回路、
7・・・分岐先アドレスレジスタ、8・・・遅延回路、
9・・・分岐先岐曾レジスタ、12・・・セレクタ。 代理人 弁理士  則 近 fI  方向      
  松  山  光  2第 図 第 図 第 図
@Figure 1 is a block diagram showing the configuration of the present invention, Figure 2, #c
Figures 3 and 4 are Figures 1 and 4 for detailed explanation of the present invention. Fifth. FIG. 6 is a diagram illustrating another embodiment of the present invention. l...Memory, 2...Instruction buffer, 3...Decode/execution unit% 4...Program counter,
5゜10... Comparison circuit, 6.11... AND circuit,
7... Branch destination address register, 8... Delay circuit,
9... Branch destination Chiso register, 12... Selector. Agent Patent Attorney Rules Near fI Direction
Hikaru Matsuyama 2nd figure 2nd figure 2nd figure

Claims (2)

【特許請求の範囲】[Claims] (1)プログラムを格納するメモリと、プログラムの実
行アドレスを指示するプログラム・カウンタと、分岐制
御機能を含むデコード/実行ユニットとを有する装置に
おいて、 分岐先アドレスとプログラム・カウンタとを比較する第
一の比較手段と、 分岐先アドレスを格納する分岐先アドレス・レジスタと
、 分岐先アドレスと前記分岐先アドレス・レジスタの内容
とを比較する第二の比較手段と、分岐先の命令を格納す
る分岐先命令レジスタと、分岐先アドレスが前記プログ
ラム・カウンタの値以下の場合に前記分岐先アドレス・
レジスタに該分岐先アドレスを格納し前記分岐先命令レ
ジスタに分岐先の命令を格納するラッチ制御手段と、前
記分岐先アドレス・レジスタの内容と分岐先アドレスが
等しい場合に前記メモリからフェッチされた命令の代わ
りに前記分岐先命令レジスタの命令を選択する選択手段
と を具備したことを特徴とする分岐制御装置。
(1) In a device that has a memory that stores a program, a program counter that indicates the execution address of the program, and a decode/execution unit that includes a branch control function, the first step is to compare the branch destination address and the program counter. a branch destination address register that stores a branch destination address; a second comparison device that compares the branch destination address with the contents of the branch destination address register; and a branch destination that stores a branch destination instruction. instruction register and the branch destination address if the branch destination address is less than or equal to the value of the program counter.
latch control means for storing the branch destination address in a register and storing the branch destination instruction in the branch destination instruction register; and an instruction fetched from the memory when the contents of the branch destination address register and the branch destination address are equal. A branch control device comprising: selecting means for selecting an instruction in the branch destination instruction register instead of the branch destination instruction register.
(2)分岐先命令レジスタはデコードされた後の命令を
格納するものである請求項1記載の分岐制御装置。
(2) The branch control device according to claim 1, wherein the branch destination instruction register stores a decoded instruction.
JP20741888A 1988-08-23 1988-08-23 Branching controller Pending JPH0256636A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20741888A JPH0256636A (en) 1988-08-23 1988-08-23 Branching controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20741888A JPH0256636A (en) 1988-08-23 1988-08-23 Branching controller

Publications (1)

Publication Number Publication Date
JPH0256636A true JPH0256636A (en) 1990-02-26

Family

ID=16539425

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20741888A Pending JPH0256636A (en) 1988-08-23 1988-08-23 Branching controller

Country Status (1)

Country Link
JP (1) JPH0256636A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05134869A (en) * 1991-11-11 1993-06-01 Nec Corp Information processor
JPH06110685A (en) * 1990-06-29 1994-04-22 Digital Equip Corp <Dec> Branch estimating method in high-performance processor
JPH0727770A (en) * 1993-07-14 1995-01-31 Aloka Co Ltd Monitoring method of discharge amount and liquid drip amount and its dispensing apparatus
JP2010066892A (en) * 2008-09-09 2010-03-25 Renesas Technology Corp Data processor and data processing system
US7793085B2 (en) 2004-09-06 2010-09-07 Fujitsu Semiconductor Limited Memory control circuit and microprocessory system for pre-fetching instructions

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06110685A (en) * 1990-06-29 1994-04-22 Digital Equip Corp <Dec> Branch estimating method in high-performance processor
JPH05134869A (en) * 1991-11-11 1993-06-01 Nec Corp Information processor
JPH0727770A (en) * 1993-07-14 1995-01-31 Aloka Co Ltd Monitoring method of discharge amount and liquid drip amount and its dispensing apparatus
US7793085B2 (en) 2004-09-06 2010-09-07 Fujitsu Semiconductor Limited Memory control circuit and microprocessory system for pre-fetching instructions
JP2010066892A (en) * 2008-09-09 2010-03-25 Renesas Technology Corp Data processor and data processing system

Similar Documents

Publication Publication Date Title
US4476525A (en) Pipeline-controlled data processing system capable of performing a plurality of instructions simultaneously
JP2929057B2 (en) Circuit for selecting multiple instructions from a stream of instruction data
US5168571A (en) System for aligning bytes of variable multi-bytes length operand based on alu byte length and a number of unprocessed byte data
US5131086A (en) Method and system for executing pipelined three operand construct
JPH06236268A (en) Apparatus and method for judgment of length of instruction
US6832305B2 (en) Method and apparatus for executing coprocessor instructions
JPH0736848A (en) Information processor and processing method
JP2535252B2 (en) Parallel processor
US3553655A (en) Short forward conditional skip hardware
JPH0256636A (en) Branching controller
JP2916605B2 (en) Computer processor
KR920006770B1 (en) System for controlling instruction fetch controlling
US5062036A (en) Instruction prefetcher
JPH06124207A (en) Sub-routine branching instruction execution method
JP2944563B2 (en) Pipeline type information processing device
JPS63314644A (en) Data processor
JP2977099B2 (en) Arithmetic processing unit
JP2597744B2 (en) Branch control method
JP3493110B2 (en) High-speed branch processing unit
JPH06161778A (en) Multi-flow instruction control method and instruction processor
JPS61175733A (en) Control system of branch estimation
JP3625586B2 (en) Processor instruction execution control system
JPS6389930A (en) Microprogram controller
JPS61273637A (en) Information processor
JPH0774992B2 (en) Data processing device