JPH0266628A - Information processor - Google Patents

Information processor

Info

Publication number
JPH0266628A
JPH0266628A JP21915688A JP21915688A JPH0266628A JP H0266628 A JPH0266628 A JP H0266628A JP 21915688 A JP21915688 A JP 21915688A JP 21915688 A JP21915688 A JP 21915688A JP H0266628 A JPH0266628 A JP H0266628A
Authority
JP
Japan
Prior art keywords
instruction
branch
stream
processing
buffer
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.)
Granted
Application number
JP21915688A
Other languages
Japanese (ja)
Other versions
JPH07120281B2 (en
Inventor
Kenji Matsubara
健二 松原
Seiji Nagai
長井 清治
Kazunori Kuriyama
和則 栗山
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
Original Assignee
Hitachi 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 filed Critical Hitachi Ltd
Priority to JP63219156A priority Critical patent/JPH07120281B2/en
Publication of JPH0266628A publication Critical patent/JPH0266628A/en
Publication of JPH07120281B2 publication Critical patent/JPH07120281B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE:To quickly release an instruction buffer and to read the stream of the branching destination of the subsequent branch instruction by preparing plural instruction buffers and an address buffer which holds the instruction read addresses of each stream and can be controlled independently of those instruction buffers. CONSTITUTION:The output of an instruction address adder 19 is selected by a selector 22 and stored in an instruction counter register 23 as the continuous subsequent instruction addresses. When the branching destination stream of a branch instruction is read out, the read addresses are successively stored in an instruction counter queue 20. When the branch instruction is executed, the continuous subsequent instruction addresses are obtained and outputted. At the same time, the instruction addresses of the branching destination streams are selected by a selector 21 and outputted as the instruction counters. When the branch existence is decided with execution of the branch instruction, the selector 22 selects the output of the selector 21 and the branch instruction address is stored in the register 23. Thus it is possible to release an instruction buffer without preparing an arithmetic execution stage of the branch instruction.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、情報処理装置に関し、特に、パイプライン処
理方式により命令処理を先行制御して処理する情報処理
装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an information processing device, and more particularly to an information processing device that pre-controls instruction processing using a pipeline processing method.

〔従来の技術〕[Conventional technology]

従来、この種のパイプライン処理方式をとる情報処理装
置は1例えば、特開昭58−96345号公報に記載の
ように、複数の命令バッファを設け、分岐命令の実行に
先立ち、分岐先命令の処理のストリーム(記憶装置から
読出された一連の命令列)の読出しを行ない、分岐成立
の判定が下ると、命令デコード回路への入力を分岐命令
が出現したストリーム(メインストリーム)から分岐先
命令処理のストリームに直ちに切換えることにより、分
岐先命令読出しのオーバーヘッドを減らしている。
Conventionally, an information processing device that uses this kind of pipeline processing method has been provided with a plurality of instruction buffers, as described in Japanese Patent Application Laid-Open No. 58-96345, and prior to execution of a branch instruction, a branch destination instruction is stored. The processing stream (a series of instructions read from the storage device) is read, and when it is determined that the branch is established, the input to the instruction decoding circuit is transferred from the stream where the branch instruction appeared (main stream) to the branch destination instruction processing. By immediately switching to the stream, the overhead of reading the branch destination instruction is reduced.

また、各命令バッファに対応するアドレスバッファに、
命令処理のストリームの読出しアドレスを保持し、命令
が実行されるとき、当該命令の命令長を処理中のストリ
ームに対応するアドレスバッファのアドレスに加算して
連続する次命令アドレスを求める。分岐命令が実行され
るときには、連続する次命令アドレスを求めるとともに
、分岐先のターゲットストリームに対応するアドレスバ
ッファの命令読出しアドレスを選択し、分岐先命令アド
レスを求めている。これらの連続する次命令アドレス、
分岐先命令アドレスは当該命令の実行中に割込みや障害
が発生した場合の復帰アドレスとして用いられる。この
処理実行中の命令アドレスは、命令カウンタレジスタに
格納されて、命令処理実行の管理に用いられる。このよ
うな命令処理の実行を管理する命令カウント値(実行中
の命令のアドレス)を、ここでは命令カウンタと称する
Also, in the address buffer corresponding to each instruction buffer,
The read address of the stream of instruction processing is held, and when an instruction is executed, the instruction length of the instruction is added to the address of the address buffer corresponding to the stream being processed to obtain a continuous next instruction address. When a branch instruction is executed, the next consecutive instruction address is determined, and the instruction read address of the address buffer corresponding to the branch destination target stream is selected to determine the branch destination instruction address. These consecutive next instruction addresses,
The branch destination instruction address is used as a return address when an interrupt or failure occurs during execution of the instruction. The address of the instruction being processed is stored in the instruction counter register and used for managing the execution of the instruction processing. The instruction count value (address of the instruction being executed) that manages the execution of such instruction processing is herein referred to as an instruction counter.

第3図は、従来のパイプライン処理方式の情報処理装置
の一例の要部を示すブロック図である。
FIG. 3 is a block diagram showing essential parts of an example of a conventional pipeline processing type information processing device.

第3図において、31は第1の命令バッファ、32は第
2の命令バッファ、33は第3の命令バッファである。
In FIG. 3, 31 is a first instruction buffer, 32 is a second instruction buffer, and 33 is a third instruction buffer.

34はセレクタ、35は命令デコード回路、36は分岐
判定回路、37は実行待ち命令キュー、38は実行待ち
命令キュー37からの命令情報を選択するセレクタであ
る。39は命令アドレス加算器、40〜42は命令アド
レス加算器39または命令デコード回路35からの命令
カウンタを選択するセレクタ、43は第1の命令カウン
タバッファ、44は第2の命令カウンタバッファ、45
は第3の命令カウンタバッファ、また、46はセレクタ
である。この情報処理装置において、命令の処理はパイ
プライン処理方式により処理される。すなわち、各々の
命令処理の実行は、一連の命令列のストリームを形成し
、そのストリームにおいて、各処理ステージ(命令読出
しステージ、デコードステージ、オペランド読出しステ
ージ、演算実行ステージ等)を順次に進めてパイプライ
ン処理で実行される。
34 is a selector, 35 is an instruction decoding circuit, 36 is a branch determination circuit, 37 is an execution queue, and 38 is a selector for selecting instruction information from the execution queue 37. 39 is an instruction address adder, 40 to 42 are selectors for selecting an instruction counter from the instruction address adder 39 or the instruction decode circuit 35, 43 is a first instruction counter buffer, 44 is a second instruction counter buffer, 45
is a third instruction counter buffer, and 46 is a selector. In this information processing device, instructions are processed using a pipeline processing method. In other words, execution of each instruction process forms a stream of a series of instructions, and in that stream, each processing stage (instruction read stage, decode stage, operand read stage, operation execution stage, etc.) is sequentially advanced and piped. Executed in line processing.

命令列1は、命令処理のストリーム毎に、各々の命令バ
ッファ31〜33に格納されており、命令カウンタバッ
ファ43〜45とそれぞれ対応している。
The instruction sequence 1 is stored in each of the instruction buffers 31 to 33 for each stream of instruction processing, and corresponds to the instruction counter buffers 43 to 45, respectively.

次に実行する命令は、分岐判定回路36からの制御信号
によって選択され、例えば第1の命令バッファ31から
セレクタ34により選択され、命令デコード回路35に
供給されて、デコードされる。命令デコード回路35は
命令をデコードすると、命令長と命令ストリーム番号と
を、命令の演算実行時に必要なセットアツプ情報と共に
、実行待ち命令キュー37に格納する。実行待ち命令キ
ュー37に格納された命令処理の情報は、セレクタ38
により選択され、セットアツプ情報2a、命令長2b、
命令ストリーム番号2cとがそれぞれに出力される。演
算実行ステージに入るとき、命令カウンタバッファ43
〜45の中から、該命令処理のストリームに対応する命
令カウンタが命令ストリーム番号2cの指示でセレクタ
46により選ばれて出力される。また、命令アドレス加
算器39は、当該命令カウンタに命令長2bを加えて、
次の命令カウンタとして。
The next instruction to be executed is selected by a control signal from the branch determination circuit 36, for example, selected from the first instruction buffer 31 by the selector 34, and supplied to the instruction decoding circuit 35 to be decoded. When the instruction decode circuit 35 decodes the instruction, it stores the instruction length and instruction stream number in the execution waiting instruction queue 37 along with the setup information necessary when executing the instruction. The instruction processing information stored in the execution waiting instruction queue 37 is sent to the selector 38
The set-up information 2a, the instruction length 2b,
The instruction stream number 2c is output to each. When entering the operation execution stage, the instruction counter buffer 43
.about.45, the instruction counter corresponding to the stream of the instruction processing is selected by the selector 46 and outputted according to the instruction of the instruction stream number 2c. Further, the instruction address adder 39 adds the instruction length 2b to the instruction counter, and
as the next instruction counter.

セレクタ40〜42を介して元の命令カウンタバッファ
に設定される。
It is set to the original instruction counter buffer via selectors 40-42.

分岐命令が命令デコード回路35によりデコードされる
と、命令デコード回路35からは分岐先命令アドレスが
出力され1分岐先命令に対するストリームを形成するた
め、命令列1から命令が読み出され、空いている命令バ
ッファ31〜33のいずれかに格納される。このとき、
命令デコード回路35から出力される分岐先命令アドレ
スが対応する命令カウンタバッファ43〜45に保持さ
れる。
When a branch instruction is decoded by the instruction decoding circuit 35, the instruction decoding circuit 35 outputs a branch destination instruction address and forms a stream for one branch destination instruction. Therefore, instructions are read from instruction string 1, and an empty address is read out. It is stored in one of the instruction buffers 31-33. At this time,
The branch destination instruction address output from the instruction decode circuit 35 is held in the corresponding instruction counter buffers 43-45.

このような情報処理装置における命令処理動作を具体的
に、分岐命令を含んだ命令列の処理を実行する場合を例
にして、命令処理に対応するストリームが生成されて命
令処理が行なわれる様子を説明する。
Specifically, we will explain the instruction processing operation in such an information processing device by taking as an example the case where processing of an instruction sequence including a branch instruction is performed, and how a stream corresponding to the instruction processing is generated and the instruction processing is performed. explain.

第4図は、第3図の情報処理装置の命令処理動作を説明
するための命令ストリームの例を示す図である。情報処
理装置が命令列の命令処理を実行する場合、命令処理の
ストリームを生成して、パイプライン処理により命令処
理を実行する。まず、実行する命令列のストリームが第
1の命令バッファ31に格納され、命令カウンタが第1
の命令カウンタバッファ43に設定される。これにより
、メインストリームとなる第1のストリーム#0を生成
して、パイプライン処理による命令列の命令処理が実行
される。ストリーム#0の命令処理50が進み、分岐命
令51が出現すると、分岐命令51によって、分岐先の
命令処理52に対するストリーム#1を生成する。この
ため、分岐先の命令列の命令を格納する第2の命令バッ
ファ32が確保されて、分岐先命令アドレスが第2の命
令カウンタバッファ44に設定される。分岐判定回路3
6により、パイプライン処理の演算実行ステージで命令
の演算が実行される前に分岐成立判定が行なわれたとす
ると、パイプライン処理で行う先行制御の命令処理はス
トリーム#1に移る。そして、次にストリーム#1の命
令処理52の実行へと進む。命令処理52が進むと、次
にストリーム#1における処理の中で分岐命令53が出
現する。この場合も、前述と同様にして、分岐命令53
によって、分岐先の命令処理54に対応するストリーム
#2を生成するため1分岐先の命令列の命令を格納する
第3の命令バッファ33を確保して、分岐先命令アドレ
スを第3の命令カウンタバッファ45に設定する。分岐
命令53の処理において分岐判定が直ちに行なえない場
合には、非分岐のストリームの命令処理55が同時に進
められる。この場合、ストリーム#1において、再び分
岐命令56が出現すると、前述と同様にして、新たに分
岐先の命令処理のためのストリームを生成することにな
る。この時、ストリーム#0に対応していた第1の命令
バッファ31は使用されていないため、分岐命令56に
よって第1の命令バッファ31を確保しようとするが、
未だ分岐命令51の演算実行ステージが実行されていな
い場合には、第1の命令カウンタバッファ43を解放す
ることができない。このため、分岐命令56のデコード
は、分岐命令51の演算実行が行なわれるまで、待たさ
れてしまうことになり、パイプライン処理の流れが乱れ
て、命令の処理速度が低下してしまう。
FIG. 4 is a diagram showing an example of an instruction stream for explaining the instruction processing operation of the information processing apparatus shown in FIG. When an information processing device executes instruction processing of a sequence of instructions, it generates a stream of instruction processing and executes the instruction processing by pipeline processing. First, a stream of instructions to be executed is stored in the first instruction buffer 31, and the instruction counter is
is set in the instruction counter buffer 43 of . As a result, the first stream #0 serving as the main stream is generated, and instruction processing of the instruction sequence is executed by pipeline processing. As the instruction processing 50 of stream #0 progresses and a branch instruction 51 appears, the branch instruction 51 generates stream #1 for the instruction processing 52 at the branch destination. Therefore, the second instruction buffer 32 that stores the instructions of the branch destination instruction sequence is secured, and the branch destination instruction address is set in the second instruction counter buffer 44. Branch judgment circuit 3
6, if the branch establishment determination is performed before the instruction operation is executed in the operation execution stage of the pipeline processing, the instruction processing of the advance control performed in the pipeline processing moves to stream #1. Then, the flow proceeds to the execution of instruction processing 52 for stream #1. As the instruction processing 52 progresses, a branch instruction 53 appears next in the processing in stream #1. In this case as well, in the same manner as described above, the branch instruction 53
In order to generate stream #2 corresponding to the branch destination instruction processing 54, the third instruction buffer 33 for storing the instructions of the instruction sequence of one branch destination is secured, and the branch destination instruction address is stored in the third instruction counter. Set in buffer 45. If a branch determination cannot be made immediately in the processing of a branch instruction 53, instruction processing 55 of a non-branched stream is proceeded at the same time. In this case, when the branch instruction 56 appears again in stream #1, a new stream for processing the branch destination instruction is generated in the same manner as described above. At this time, since the first instruction buffer 31 corresponding to stream #0 is not in use, an attempt is made to secure the first instruction buffer 31 by the branch instruction 56.
If the arithmetic execution stage of the branch instruction 51 has not yet been executed, the first instruction counter buffer 43 cannot be released. Therefore, the decoding of the branch instruction 56 has to wait until the arithmetic operation of the branch instruction 51 is executed, which disrupts the flow of pipeline processing and reduces the instruction processing speed.

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

上述のように、従来のパイプライン処理方式の情報処理
装置においては、分岐命令の判定が早く下り、もはや命
令バッファ中のストリームの命令が不要となった場合で
も、命令処理のストリームにおける読出しアドレスを格
納している命令カウンタバッファは、命令バッファに対
応しているため、当該分岐命令が実行されて命令カウン
タを求めるまでは、該当する命令バッファを解放できな
い。このため、後続する分岐命令の分岐先ストリームに
おける命令読出しが待たされてしまい、命令処理の性能
向上が困難になっているという問題点がある。
As mentioned above, in a conventional pipeline processing type information processing device, even if a branch instruction decision is made quickly and the instruction in the stream in the instruction buffer is no longer needed, the read address in the instruction processing stream is Since the stored instruction counter buffer corresponds to the instruction buffer, the instruction buffer cannot be released until the branch instruction is executed and the instruction counter is determined. As a result, the reading of an instruction in the branch destination stream of a subsequent branch instruction is forced to wait, making it difficult to improve the performance of instruction processing.

本発明は、上記問題を解決するためになされたものであ
る。
The present invention has been made to solve the above problems.

本発明の目的は、パイプライン処理方式で命令処理を行
う情報処理装置において、分岐判定が下り、命令バッフ
ァ中の命令が不必要となった場合に、速やかに命令バッ
ファを解放し、後続の分岐命令の分岐先のストリーム読
出しを可能にすることにある。
An object of the present invention is to quickly release the instruction buffer when a branch decision is made and the instruction in the instruction buffer is no longer needed in an information processing device that processes instructions using a pipeline processing method, so that subsequent branches can be processed. The purpose is to enable stream reading of branch destinations of instructions.

本発明の前記ならびにその他の目的と新規な特徴は、本
明細書の記述及び添付図面によって明らかになるであろ
う。
The above and other objects and novel features of the present invention will become apparent from the description of this specification and the accompanying drawings.

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

上記目的を達成するため、本発明においては、命令の読
出し、デコード、オペランド読出し、および実行の各処
理ステージを順次に行い、各々の命令に対する処理をオ
ーバーラツプして行うパイプライン処理方式の情報処理
装置において、処理する命令列の一連の命令のストリー
ムを格納する複数の命令バッファと、各ストリームの命
令読出しアドレスを保持し、前記命令バッファとは独立
に制御できるアドレスバッファとを有することを特徴と
する。
In order to achieve the above object, the present invention provides an information processing apparatus using a pipeline processing method, in which each processing stage of instruction reading, decoding, operand reading, and execution is performed sequentially, and processing for each instruction is performed in an overlapping manner. The method is characterized by having a plurality of instruction buffers for storing a series of instruction streams to be processed, and an address buffer that holds an instruction read address for each stream and can be controlled independently of the instruction buffers. .

〔作用〕[Effect]

前記手段によれば、パイプライン処理方式の情報処理装
置において、処理する命令列の一連の命令のストリーム
を格納する複数の命令バッファと、各ストリームの命令
読出しアドレスを保持し、前記命令バッファとは独立に
制御できるアドレスバッファとが備えられる。各々のス
トリームの読出しアドレスは、命令バッファとは独立に
制御されるアドレスバッファに格納され、該アドレスバ
ッファにより命令カウンタが求められる。分岐先ストリ
ームの読出しが行なわれるとき、読出しアドレスはアド
レスバッファに格納される。命令が実行されるとき、当
該命令ストリームに対応するアドレスバッファに格納さ
れている命令カウンタに命令長を加算することにより連
続する次の命令アドレスが求められる。また、分岐命令
が実行されるとき、連続する次の命令アドレスを求める
制御に加えて、分岐先入!〜リームに対応するアドレス
バッファを選択して分岐命令アドレスを求める。
According to the above means, in an information processing apparatus of a pipeline processing type, a plurality of instruction buffers storing a series of instruction streams of an instruction sequence to be processed and an instruction read address of each stream are held, and the instruction buffers are An independently controllable address buffer is provided. The read address of each stream is stored in an address buffer that is controlled independently of the instruction buffer, and the instruction counter is determined by the address buffer. When a branch destination stream is read, the read address is stored in the address buffer. When an instruction is executed, the next consecutive instruction address is determined by adding the instruction length to the instruction counter stored in the address buffer corresponding to the instruction stream. Also, when a branch instruction is executed, in addition to the control to obtain the next consecutive instruction address, the branch destination input! ~ Select the address buffer corresponding to the ream and find the branch instruction address.

これにより、命令カウンタを格納しているアドレスバッ
ファの解放は分岐命令の実行によりメインストリームか
ら分岐先ストリームに切換えられるときに行われる。こ
のように命令カウンタが命令バッファとは独立に求めら
れるため1分岐命令の判定が下れば、不要となった命令
バッファをただちに解放することが可能となる。
As a result, the address buffer storing the instruction counter is released when the main stream is switched to the branch destination stream by executing a branch instruction. In this way, since the instruction counter is calculated independently of the instruction buffer, if it is determined that the instruction is a one-branch instruction, the instruction buffer that is no longer needed can be immediately released.

〔実施例〕〔Example〕

以下、本発明の一実施例を図面を用いて具体的に説明す
る。
Hereinafter, one embodiment of the present invention will be specifically described using the drawings.

第1図は、本発明の一実施例にかかるパイプライン処理
方式の情報処理装置の要部を示すブロック図である。第
1図において、11は第1の命令バッファ、工2は第2
の命令バッファ、13は第3の命令バッファである。1
4はセレクタ、15は命令デコード回路、16は分岐判
定回路、17は実行待ち命令キュー、18は実行待ち命
令キュー17からの命令情報を選択するセレクタである
。19は命令アドレス加算器、20は命令カウンタキュ
ー、21は命令カウンタキュー20からの命令カウンタ
を選択するセレクタ、22は命令アドレス加算器19ま
たはセレクタ21からの命令カウンタを選択するセレク
タ、23は命令カウンタレジスタである。
FIG. 1 is a block diagram showing the main parts of a pipeline processing type information processing apparatus according to an embodiment of the present invention. In FIG. 1, 11 is the first instruction buffer, and 2 is the second instruction buffer.
13 is a third instruction buffer. 1
4 is a selector, 15 is an instruction decoding circuit, 16 is a branch determination circuit, 17 is an execution queue, and 18 is a selector for selecting instruction information from the execution queue 17. 19 is an instruction address adder, 20 is an instruction counter queue, 21 is a selector that selects an instruction counter from the instruction counter queue 20, 22 is a selector that selects an instruction counter from the instruction address adder 19 or the selector 21, and 23 is an instruction It is a counter register.

この情報処理装置において、命令の処理はパイプライン
処理方式により処理され、各々の命令処理が一連の命令
列のストリームを形成し、そのストリームにおいて、命
令処理を命令の読出しステージ、デコードステージ、オ
ペランド読出しステージ、演算実行ステージの各々の処
理ステージを順次に進めて実行される。
In this information processing device, instructions are processed by a pipeline processing method, where each instruction process forms a stream of a series of instructions, and in this stream, instruction processing is performed at an instruction read stage, a decode stage, and an operand read stage. The processing stage and the calculation execution stage are sequentially advanced and executed.

命令列1は命令処理のストリーム毎に、各々の命令バッ
ファ11〜13に格納される。これらの命令のストリー
ムに対応する命令読出しアドレスは、それぞれ命令カウ
ンタキュー20に格納される。次に実行する命令は、分
岐判定回路16からの制御信号によって選択され、例え
ば第1の命令バッファ11からセレクタ14により選択
され、命令デコード回路15に供給されて、デコードさ
れる。命令デコード回路15は命令をデコードすると、
命令長、後続命令が分岐先命令であるかどうかを示す後
続分岐先フラグとが、命令の演算実行時に必要なセット
アツプ情報と共に、実行待ち命令キュー17に格納され
る。この後続分岐先フラグは、デコードされた命令が分
岐命令であり、引続いて分岐先ストリームを処理する場
合に論理tl I ++となる。また、分岐命令がデコ
ードされた場合には、分岐先命令アドレスが命令カウン
タキュー20に格納される。
The instruction sequence 1 is stored in each instruction buffer 11 to 13 for each stream of instruction processing. Instruction read addresses corresponding to these instruction streams are stored in the instruction counter queue 20, respectively. The next instruction to be executed is selected by a control signal from the branch determination circuit 16, for example, selected from the first instruction buffer 11 by the selector 14, and supplied to the instruction decoding circuit 15 to be decoded. When the instruction decoding circuit 15 decodes the instruction,
The instruction length and a subsequent branch destination flag indicating whether the subsequent instruction is a branch destination instruction are stored in the execution waiting instruction queue 17, along with set-up information necessary when executing an operation of the instruction. This subsequent branch destination flag becomes logical tl I ++ when the decoded instruction is a branch instruction and the branch destination stream is subsequently processed. Furthermore, when a branch instruction is decoded, the branch destination instruction address is stored in the instruction counter queue 20.

実行する命令(命令情報)がセレクタ18により選択さ
れて、演算実行ステージに入るとき、命令カウンタレジ
スタ23により命令カウンタが出力される。このとき、
後続分岐先フラグが論理“O++の場合には、実行待ち
命令キュー17からセレクタ18を介して出力された後
続分岐先フラグ2dによりセレクタ22を制御して、命
令カウンタレジスタ23に格納されている命令カウンタ
に命令長2bを加えた命令アドレス加算器19からの出
力である命令カウンタを選択して、命令カウンタレジス
タ23に設定する。一方、後続分岐先フラグが論理II
 I ++の場合には、セレクタ22を制御して、命令
カウンタキュー20からセレクタ21を介して出力され
た命令カウンタを選択して、命令カウンタレジスタ23
に設定する。
When an instruction (instruction information) to be executed is selected by the selector 18 and enters the arithmetic execution stage, the instruction counter register 23 outputs an instruction counter. At this time,
When the subsequent branch destination flag is logic “O++,” the selector 22 is controlled by the subsequent branch destination flag 2d output from the execution waiting instruction queue 17 via the selector 18, and the instruction stored in the instruction counter register 23 is The instruction counter that is the output from the instruction address adder 19, which is the counter plus the instruction length 2b, is selected and set in the instruction counter register 23.On the other hand, the subsequent branch destination flag is set to logic II.
In the case of I++, the selector 22 is controlled to select the instruction counter outputted from the instruction counter queue 20 via the selector 21, and to select the instruction counter output from the instruction counter register 23.
Set to .

次に、このような情報処理装置における命令処理動作を
具体的に、分岐命令を含んだ命令列の処理を実行する場
合を例にして、命令処理に対応するストリームが生成さ
れて命令処理が行なわれる様子を説明する。
Next, we will specifically explain the instruction processing operation in such an information processing device, taking as an example a case in which a sequence of instructions including a branch instruction is executed, and a stream corresponding to the instruction processing is generated and the instruction processing is performed. Explain how it works.

第2図は、第1図の情報処理装置の命令処理動作を説明
するための命令ストリームの例を示す図である。情報処
理装置が命令列の命令処理を実行する場合、命令処理の
ストリームを生成して、パイプライン処理により命令処
理を実行する。まず、実行する命令列のストリームが第
1の命令バッファ11に格納され、命令カウンタは命令
カウンタレジスタ23に設定される。これにより、メイ
ンストリームとなる第1のストリーム#0を生成して、
パイプライン処理による命令列の命令処理が実行される
。ストリーム#0の命令処理24が進み、分岐命令25
が出現すると、分岐命令25により、分岐先の命令処理
26に対するストリーム#1を生成する。このため、分
岐先の命令列の命令を格納する第2の命令バッファ12
が確保されて、分岐先命令アドレスが命令カウンタキュ
ー20aに設定される。
FIG. 2 is a diagram showing an example of an instruction stream for explaining the instruction processing operation of the information processing apparatus shown in FIG. When an information processing device executes instruction processing of a sequence of instructions, it generates a stream of instruction processing and executes the instruction processing by pipeline processing. First, a stream of instructions to be executed is stored in the first instruction buffer 11, and an instruction counter is set in the instruction counter register 23. As a result, the first stream #0, which becomes the main stream, is generated,
Instruction processing of an instruction sequence is executed by pipeline processing. The instruction processing 24 of stream #0 progresses and branch instruction 25
When this occurs, the branch instruction 25 generates stream #1 for the instruction processing 26 at the branch destination. For this reason, the second instruction buffer 12 stores the instructions of the branch destination instruction sequence.
is secured and the branch destination instruction address is set in the instruction counter queue 20a.

分岐命令25は分岐判定回路16により、パイプライン
処理の演算実行ステージで命令の演算が実行される前に
分岐成立判定が行なわれたとすると、パイプライン処理
で行う先行制御の命令処理はストリーム#1に移る。そ
して、ここで第1の命令バッファ11は解放される。分
岐命令25に対する分岐成立の判定結果から、分岐命令
25に後続する命令は分岐先の命令であるので、命令デ
コード回路15からの命令情報が実行待ち命令キュー1
7に格納されるとき、後続命令が分岐先であることを示
す後続分岐先フラグは論理″1″′として、実行待ち命
令キュー17に格納される。これにより、命令処理がス
トリーム#1に移り、命令処理26に進む。命令処理2
6が進むと、分岐命令27が出現する。この場合におい
ても、分岐命令25の場合と同様にして。
Assuming that the branch instruction 25 is determined by the branch determination circuit 16 to be a branch before the instruction is executed in the operation execution stage of pipeline processing, the instruction processing for advance control performed in the pipeline processing is performed in stream #1. Move to. Then, the first instruction buffer 11 is released. From the determination result of branch establishment for the branch instruction 25, the instruction following the branch instruction 25 is the branch destination instruction, so the instruction information from the instruction decoding circuit 15 is stored in the execution waiting instruction queue 1.
7, the subsequent branch destination flag indicating that the subsequent instruction is the branch destination is stored in the execution waiting instruction queue 17 as logic "1". As a result, the instruction processing shifts to stream #1 and proceeds to instruction processing 26. Instruction processing 2
When 6 advances, a branch instruction 27 appears. In this case as well, do the same as in the case of branch instruction 25.

命令バッファが用意される。用意される命令バッファと
して、例えば第3の命令バッファ13が確保され、分岐
命令アドレスが命令カウンタキュー20bに設定される
。これにより、分岐先のストリーム#2が生成されて、
命令処理28aが進められる。
An instruction buffer is prepared. For example, the third instruction buffer 13 is secured as the instruction buffer to be prepared, and the branch instruction address is set in the instruction counter queue 20b. As a result, branch destination stream #2 is generated,
Instruction processing 28a proceeds.

分岐命令27の処理において分岐判定が直ちに行なえな
い場合には、非分岐のストリームの命令処理28bが同
時に進められる。この非分岐のストリームの命令処理2
8bを進めた場合、ストリーム#1において、再び分岐
命令29が出現すると、前述と同様にして、新たに分岐
先の命令処理のためのストリームを生成することになる
。この時、第1の命令バッファ11は既に解放されてい
るため、分岐命令29のデコードは抑止されることなく
、第1の命令バッファ11を確保し、分岐命令アドレス
を命令カウンタキュー20cに設定する。これにより、
ストリーム#0で命令処理30が進められる。また、分
岐命令25が演算実行ステージに入いるとき、分岐命令
25に後続する命令が分岐先命令であることを示す後続
分岐先フラグが論理rt I I+であることから、セ
レクタ22は、セレクタ21の出力の側か選択される。
If a branch determination cannot be made immediately in the processing of the branch instruction 27, instruction processing 28b of the non-branched stream is proceeded at the same time. Instruction processing 2 for this non-branching stream
8b, when the branch instruction 29 appears again in stream #1, a new stream for processing the branch destination instruction is generated in the same way as described above. At this time, since the first instruction buffer 11 has already been released, decoding of the branch instruction 29 is not inhibited, the first instruction buffer 11 is secured, and the branch instruction address is set in the instruction counter queue 20c. . This results in
Instruction processing 30 proceeds with stream #0. Further, when the branch instruction 25 enters the arithmetic execution stage, the subsequent branch destination flag indicating that the instruction following the branch instruction 25 is a branch destination instruction is logical rt I I+, so the selector 22 selects the selector 21 The side of the output is selected.

これにより、命令カウンタレジスタ23には、命令カウ
ンタキュー20aの値が設定される。
As a result, the value of the instruction counter queue 20a is set in the instruction counter register 23.

その時の命令カウンタとして処理が進められる。Processing proceeds based on the instruction counter at that time.

このようにして、命令のストリームの読出しアドレスを
格納するアドレスバッファとなる命令カウンタキュー2
0を設け、この命令カウンタキュー20を各々の命令バ
ッファ11〜13とは独立に制御することにより1分岐
判定が直ちに下れば、該分岐命令の演算実行ステージを
待つことなく、命令バッファを解放することができる。
In this way, the instruction counter queue 2 serves as an address buffer for storing read addresses of a stream of instructions.
0, and by controlling this instruction counter queue 20 independently of each instruction buffer 11 to 13, if a 1 branch decision is made immediately, the instruction buffer is released without waiting for the arithmetic execution stage of the branch instruction. can do.

このため、分岐命令が連続して出現する場合にも、パイ
プライン処理の流れが乱れることなく、処理の高速化を
図ることができる。
Therefore, even when branch instructions appear consecutively, the flow of pipeline processing is not disrupted, and processing speed can be increased.

以上、本実施例にかかる情報処理装置の要部をまとめれ
ば、次のようになる。
The main parts of the information processing apparatus according to this embodiment can be summarized as follows.

(1)初期動作においてセレクタ22ではメインストリ
ームの命令続出アドレスが選択され、命令カウンタレジ
スタ23に格納される。
(1) In the initial operation, the selector 22 selects the main stream instruction successive address and stores it in the instruction counter register 23.

(2)分岐命令以外の命令が実行されるときは。(2) When an instruction other than a branch instruction is executed.

命令アドレス加算器19により命令カウンタと命令長と
が加算され、該命令に後続する次命令アドレスが求めら
れ、命令カウンタとして出力される。
An instruction address adder 19 adds the instruction counter and the instruction length, determines the next instruction address following the instruction, and outputs it as an instruction counter.

このときセレクタ22では命令アドレス加算器19の出
力が選択され、連続する次命令アドレスとして命令カウ
ンタレジスタ23に格納される。
At this time, the output of the instruction address adder 19 is selected by the selector 22 and stored in the instruction counter register 23 as a continuous next instruction address.

(3)分岐命令の分岐先ストリーム読出しが行なわれる
と、読出しアドレスが命令カウンタキュー20に順番に
格納される。分岐命令が実行されるときには、連続する
次命令アドレスが求められて、出力されると同時に、セ
レクタ21において分岐先ストリームの命令アドレスが
選択され、命令カウンタとして出力される。該分岐命令
の実行により分岐成立の判定が下ると、セレクタ22に
おいてセレクタ21の出力が選択され、分岐先命令アド
レスが命令カウンタレジスタ23に格納される。
(3) When a branch destination stream of a branch instruction is read, the read addresses are stored in the instruction counter queue 20 in order. When a branch instruction is executed, consecutive next instruction addresses are determined and output, and at the same time, the instruction address of the branch destination stream is selected by the selector 21 and output as an instruction counter. When it is determined that the branch is established by executing the branch instruction, the output of the selector 21 is selected by the selector 22, and the branch destination instruction address is stored in the instruction counter register 23.

(4)これにより、分岐命令の演算実行ステージを待つ
ことなく、命令バッファを解放することができる。この
ため、分岐命令が連続して出現する場合にも、パイプラ
イン処理の流れが乱れることなく、処理の高速化を図る
ことができる。
(4) This allows the instruction buffer to be released without waiting for the arithmetic execution stage of the branch instruction. Therefore, even when branch instructions appear consecutively, the flow of pipeline processing is not disrupted, and processing speed can be increased.

以上1本発明を実施例にもとづき具体的に説明したが、
本発明は、前記実施例に限定されるものではなく、その
要旨を逸脱しない範囲において種々変更可能であること
は言うまでもない。
The present invention has been specifically explained above based on examples, but
It goes without saying that the present invention is not limited to the embodiments described above, and can be modified in various ways without departing from the spirit thereof.

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

以上、説明したように5本発明によれば、命令バッファ
の制御とは独立に命令カウンタを求めることができるの
で、分岐判定により不要となった命令バッファをただち
に解放でき、後続分岐命令の分岐先ストリーム読出しが
可能となり、分岐命令処理の高速化を図かることができ
る。
As explained above, according to the present invention, the instruction counter can be obtained independently of the control of the instruction buffer, so the instruction buffer that is no longer needed due to branch judgment can be immediately released, and the branch destination of the subsequent branch instruction can be Stream reading becomes possible, and branch instruction processing speed can be increased.

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

第1図は、本発明の一実施例にかかるパイプライン処理
方式の情報処理装置の要部を示すブロック図、 第2図は、第1図の情報処理装置の命令処理動作を説明
するための命令ストリーム例を示す図。 第3図は、従来のパイプライン処理方式の情報処理装置
の一例の要部を示すブロック図、第4図は、第3図の情
報処理装置の命令処理動作を説明するための命令ストリ
ームの例を示す図である。 図中、11.31・・・第1の命令バッファ、12.3
2・・・第2の命令バッファ、13.33・・・第3の
命令バッファ、14.18.21.22.34.38.
40.41.42.46・・・セレクタ、15.35・
・・命令デコード回路、16.36・・・分岐判定回路
、17.37・・・実行待ち命令キュー、19゜39・
・・命令アドレス加算器、20・・・命令カウンタキュ
、23・・・命令カウンタレジスタ。 第1図
FIG. 1 is a block diagram showing the main parts of a pipeline processing type information processing device according to an embodiment of the present invention, and FIG. 2 is a block diagram showing the instruction processing operation of the information processing device shown in FIG. FIG. 3 is a diagram illustrating an example instruction stream. FIG. 3 is a block diagram showing the main parts of an example of a conventional pipeline processing type information processing device, and FIG. 4 is an example of an instruction stream for explaining the instruction processing operation of the information processing device of FIG. 3. FIG. In the figure, 11.31...first instruction buffer, 12.3
2...Second instruction buffer, 13.33...Third instruction buffer, 14.18.21.22.34.38.
40.41.42.46...Selector, 15.35.
...Instruction decoding circuit, 16.36... Branch judgment circuit, 17.37... Execution waiting instruction queue, 19°39.
. . . instruction address adder, 20 . . . instruction counter cue, 23 . . . instruction counter register. Figure 1

Claims (1)

【特許請求の範囲】 1、命令の読出し、デコード、オペランド読出し、およ
び実行の各処理ステージを順次に行い、各々の命令に対
する処理をオーバーラップして行うパイプライン処理方
式の情報処理装置において、処理する命令列の一連の命
令をストリームとして格納する複数個の命令バッファと
、各々のストリームの命令読出しアドレスを保持し、前
記命令バッファとは独立に制御できるアドレスバッファ
とを有することを特徴とする情報処理装置。 2、命令の読出し、デコード、オペランド読出し、およ
び実行の各処理ステージを順次に行い、各々の命令に対
する処理をオーバーラップして行うパイプライン処理方
式の情報処理装置において、処理する命令列の一連の命
令をストリームとして格納する複数個の命令バッファと
、各々のストリームの命令読出しアドレスを保持し、前
記命令バッファとは独立に制御できるアドレスバッファ
と、分岐命令以外の命令が実行されるとき当該命令の命
令長からストリームの命令読出しアドレスを求める第1
制御手段と、分岐命令が実行されるときに分岐先のスト
リームの命令読出しアドレスを求める第2制御手段と、
分岐命令の判定が下ると、連続する次命令アドレスまた
は分岐アドレスを求める前に不要となった前記命令バッ
ファを解放し、後続する分岐先ストリームを命令バッフ
ァに格納を可能とする第3制御手段とを有することを特
徴とする情報処理装置。
[Scope of Claims] 1. In an information processing device using a pipeline processing method, each processing stage of instruction reading, decoding, operand reading, and execution is performed sequentially, and processing for each instruction is performed in an overlapping manner. Information characterized in that it has a plurality of instruction buffers that store a series of instructions as a stream, and an address buffer that holds an instruction read address for each stream and can be controlled independently of the instruction buffers. Processing equipment. 2. In a pipeline processing information processing device that sequentially performs the processing stages of instruction reading, decoding, operand reading, and execution, and overlaps the processing for each instruction, a series of instructions to be processed is processed. A plurality of instruction buffers that store instructions as streams, an address buffer that holds instruction read addresses for each stream and that can be controlled independently of the instruction buffers, and The first step is to find the instruction read address of the stream from the instruction length.
a control means; a second control means for determining an instruction read address of a branch destination stream when a branch instruction is executed;
When a branch instruction is determined, a third control means releases the instruction buffer that is no longer needed before determining a continuous next instruction address or a branch address, and enables storing a subsequent branch destination stream in the instruction buffer. An information processing device comprising:
JP63219156A 1988-08-31 1988-08-31 Information processing equipment Expired - Lifetime JPH07120281B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63219156A JPH07120281B2 (en) 1988-08-31 1988-08-31 Information processing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63219156A JPH07120281B2 (en) 1988-08-31 1988-08-31 Information processing equipment

Publications (2)

Publication Number Publication Date
JPH0266628A true JPH0266628A (en) 1990-03-06
JPH07120281B2 JPH07120281B2 (en) 1995-12-20

Family

ID=16731079

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63219156A Expired - Lifetime JPH07120281B2 (en) 1988-08-31 1988-08-31 Information processing equipment

Country Status (1)

Country Link
JP (1) JPH07120281B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006112190A1 (en) * 2005-04-08 2006-10-26 Matsushita Electric Industrial Co., Ltd. Processor

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62145430A (en) * 1985-12-20 1987-06-29 Nec Corp Data processor
JPS62208129A (en) * 1986-03-10 1987-09-12 Fujitsu Ltd Data processing system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62145430A (en) * 1985-12-20 1987-06-29 Nec Corp Data processor
JPS62208129A (en) * 1986-03-10 1987-09-12 Fujitsu Ltd Data processing system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006112190A1 (en) * 2005-04-08 2006-10-26 Matsushita Electric Industrial Co., Ltd. Processor

Also Published As

Publication number Publication date
JPH07120281B2 (en) 1995-12-20

Similar Documents

Publication Publication Date Title
EP0021399B1 (en) A method and a machine for multiple instruction execution
US5671382A (en) Information processing system and information processing method for executing instructions in parallel
JPS63136138A (en) Information processor
JPS6043751A (en) Information processor
JPH06103494B2 (en) Vector processor control system
JPH0348536B2 (en)
JPS61253541A (en) Instruction processor
JPS62226232A (en) Control system for branch instruction
JPH0266628A (en) Information processor
JPH05274143A (en) Composite condition processing system
JP3982077B2 (en) Multiprocessor system
JPH04205448A (en) Information processor
JPH0991139A (en) Information processor
JP3431503B2 (en) Information processing apparatus and program control method
JPS60105050A (en) Pipeline control system
JPH0769800B2 (en) Data processing device
JPS6023378B2 (en) information processing equipment
JPH03288228A (en) Information processor
JPS61289429A (en) Arithmetic processing unit
JP2741717B2 (en) Vector processing equipment
JPS58163046A (en) Information processor
JPH0619705A (en) Pipeline control system
JPH0827720B2 (en) Data processing device
JPS59158441A (en) Pipeline control system
JPH01240931A (en) Data processor