JPH0827718B2 - Information processing device - Google Patents

Information processing device

Info

Publication number
JPH0827718B2
JPH0827718B2 JP58186437A JP18643783A JPH0827718B2 JP H0827718 B2 JPH0827718 B2 JP H0827718B2 JP 58186437 A JP58186437 A JP 58186437A JP 18643783 A JP18643783 A JP 18643783A JP H0827718 B2 JPH0827718 B2 JP H0827718B2
Authority
JP
Japan
Prior art keywords
instruction
store
branch destination
read
queue
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP58186437A
Other languages
Japanese (ja)
Other versions
JPS6077241A (en
Inventor
真也 渡部
秀一 安部
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 JP58186437A priority Critical patent/JPH0827718B2/en
Publication of JPS6077241A publication Critical patent/JPS6077241A/en
Publication of JPH0827718B2 publication Critical patent/JPH0827718B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3802Instruction prefetching
    • G06F9/3812Instruction prefetching with instruction modification, e.g. store into instruction stream

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Advance Control (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は、先行制御方式の情報処理装置に関する。Description: FIELD OF THE INVENTION The present invention relates to an information processing apparatus of advanced control system.

〔発明の背景〕[Background of the Invention]

周知のように、先行制御方式の情報処理装置は、現在
実行中の命令の他にこれに続く命令群を予め主記憶装置
(メモリ)から先行して読み出して命令バッファに格納
しておき、現在実行中の命令終了後に次の命令を該命令
バッファから取り出して実行処理する。従って、前の命
令の実行と次の命令の実行の間に発生する命令読出しの
オーバヘッドを減少せしめることができる。
As is well known, in the information processing apparatus of the advance control system, in addition to the instruction currently being executed, the following instruction group is read in advance from the main storage device (memory) and stored in the instruction buffer. After the instruction being executed is completed, the next instruction is fetched from the instruction buffer and executed. Therefore, it is possible to reduce the instruction read overhead that occurs between the execution of the previous instruction and the execution of the next instruction.

ところで、メモリから命令バッファへの読出しは、メ
モリの読出し幅、例えば8バイト単位に読み出されるた
めに、命令以外にオペランドとしてのデータも読み出さ
れる可能性がある。先行する命令がメモリにストア動作
を行い、命令やデータを変更し、しかも、そのストア領
域の命令やデータが既に命令バッファに取り込まれてい
る場合、メモリと命令バッファの内容の間に不一致が生
じる。
By the way, when reading from the memory to the instruction buffer, since the reading width of the memory, for example, a unit of 8 bytes is read, data as an operand may be read in addition to the instruction. If the preceding instruction performs a store operation in memory, changes the instruction or data, and the instruction or data in the store area has already been fetched into the instruction buffer, a mismatch occurs between the contents of the memory and the instruction buffer. .

かゝる問題に対処するため、従来は、例えば命令バッ
ファに取り込まれている内容がメモリ上で変更された時
点で命令バッファの内容を全て無効化し、実行中の命令
のアドレスと変更された命令やデータのアドレス間に存
在する命令(これは前述した如くメモリの読出し幅との
関係でデータも含まれ得る)を再びメモリから読み出し
ている。しかし、変更された命令やデータの前に分岐命
令があり、分岐成功により分岐を行ったような場合や、
変更されたのが命令でなくデータの場合(データが命令
バッファに取り込まれていても、命令でないため無視で
きる)、あるいは変更された内容が命令として全く実行
されない場合、命令バッファ内の有効な命令を含めて全
て無効化し、メモリから再読出しすることは、命令の処
理効率上望ましくない。
In order to deal with such a problem, conventionally, for example, when the contents stored in the instruction buffer are changed in the memory, the contents of the instruction buffer are all invalidated, and the address of the instruction being executed and the changed instruction are changed. And an instruction existing between data addresses (this may include data in relation to the read width of the memory as described above) is read again from the memory. However, if there is a branch instruction before the changed instruction or data and the branch is successful and the branch is successful,
A valid instruction in the instruction buffer if it was not the instruction that changed it (data is fetched into the instruction buffer, but can be ignored because it is not an instruction), or if the changed content is not executed as an instruction at all. It is not desirable to invalidate all of the data including the above and re-read from the memory from the viewpoint of instruction processing efficiency.

そこで、命令バッファに先取りされている内容がメモ
リ上で変更されたことを検出した場合、以後の先取りは
抑止するが、既に先取りされた命令については処理を続
行し、命令の実行が上記変更された命令に進んだ時、命
令バッファの内容を無効とし、メモリから該変更された
命令を含むそれ以降の命令を読み出すようにして、命令
の処理効率の向上を図った情報処理装置が提案されてい
る(特公昭56−40378号および特開昭57−185545号)。
Therefore, when it is detected that the contents prefetched in the instruction buffer are changed in the memory, the prefetching after that is suppressed, but the processing of the prefetched instructions is continued and the execution of the instructions is changed as described above. When an advanced instruction is executed, the contents of the instruction buffer are invalidated, and the subsequent instructions including the changed instruction are read out from the memory, so that an information processing apparatus for improving the processing efficiency of the instruction is proposed. (Japanese Patent Publication No. 56-40378 and Japanese Patent Publication No. 57-185545).

しかし、この情報処理装置では、分岐命令の分岐先命
令読出しにおいて、分岐先命令アドレスを計算し、それ
を先取り命令変更検出論理部に転送するまでの間に、先
行するストア動作が実行されると、命令の先取り変更検
出の抜けが生じる。即ち、命令の実行が分岐命令まで進
むと、分岐先命令アドレスを計算し、該アドレス以降の
命令をメモリから先行して読み出して命令バッファに格
納していく。一方、上記計算された分岐先命令アドレス
は先取り命令変更検出論理部に転送され、先行する命令
のストア・アドレスと比較するのに用いられるが、たま
たまその間にストア動作が実行されて、該分岐先命令が
変更された場合、命令バッファには変更前の内容が取り
込まれることになる。したがって、分岐先命令アドレス
が先取り命令変更検出論理部に転送され、該先取り命令
変更検出論理部が有効に動作する時刻まで、分岐先命令
の読出しを遅らせる必要があるが、これは先行制御方式
の利点を損うことになり、命令処理効率の点で好ましく
ない。
However, in this information processing device, when the branch destination instruction address of the branch instruction is read, the preceding store operation is executed before the branch destination instruction address is calculated and transferred to the prefetch instruction change detection logic unit. , Missing prefetch change detection of instruction occurs. That is, when the execution of the instruction progresses to the branch instruction, the branch destination instruction address is calculated, and the instruction after the address is read out from the memory in advance and stored in the instruction buffer. On the other hand, the calculated branch destination instruction address is transferred to the prefetch instruction change detection logic unit and used for comparison with the store address of the preceding instruction. When the instruction is changed, the content before the change is fetched in the instruction buffer. Therefore, it is necessary to delay the reading of the branch destination instruction until the time when the branch destination instruction address is transferred to the prefetch instruction change detection logic unit and the prefetch instruction change detection logic unit operates effectively. The advantage is lost, and it is not preferable in terms of instruction processing efficiency.

〔発明の目的〕[Object of the Invention]

本発明の目的は、命令バッファの不必要な無効化と、
メモリの不必要な読出しを減少させると共に、上記先取
り命令変更検出論理部が有効に動作する時刻まで分岐先
命令の読出しを遅らせることなく、分岐命令によって読
み出された分岐先命令が先行するストア動作によって書
き換えられることの検出を可能とすることにより、分岐
命令における分岐先命令の読出しを高速に行い、命令処
理効率の一層の向上を図った先行制御方式の情報処理装
置を提供することにある。
The object of the present invention is to unnecessarily invalidate the instruction buffer,
A store operation in which the branch destination instruction read by the branch instruction precedes without delaying the reading of the branch destination instruction until the time when the prefetch instruction change detection logic unit operates effectively while reducing unnecessary reading of the memory It is an object of the present invention to provide an information processing apparatus of the advance control system in which a branch destination instruction in a branch instruction is read at high speed by enabling the detection of rewriting by, and the instruction processing efficiency is further improved.

〔発明の概要〕[Outline of Invention]

本発明は、分岐命令によって分岐先命令が読み出され
る場合、分岐先命令読出しアドレスとその分岐命令に先
行し、ストアが完了していないすべてのストア命令のス
トア・アドレスとを比較し、先取りする命令がメモリ上
で変更されることを検出する。検出結果は、先取りした
命令に付随したフラグとして命令バッファに記憶し、命
令が命令バッファから取りだされた時、該フラグも同時
に取り出す。そして、命令が実際に実行を開始する時
に、その命令が、先取りされた後、先行するストア命令
によって変更されたか否か判定し、変更されていた場
合、命令バッファの無効化とメモリからの再読出しを行
う。これにより、命令バッファの不必要な無効化とメモ
リの不必要な読出しが減少すると共に、分岐先命令の読
出しを遅らせる必要がなく、命令の処理効率の一層の向
上がもたらされる。
The present invention, when a branch destination instruction is read by a branch instruction, compares the read address of the branch destination instruction with the store addresses of all store instructions that precede the branch instruction and have not been stored, and prefetch the instruction. Detects that is changed in memory. The detection result is stored in the instruction buffer as a flag associated with the prefetched instruction, and when the instruction is fetched from the instruction buffer, the flag is also fetched at the same time. Then, when the instruction actually starts executing, it is determined whether the instruction has been prefetched and then modified by the preceding store instruction, and if so, the instruction buffer is invalidated and re-loaded from memory. Read out. As a result, unnecessary invalidation of the instruction buffer and unnecessary reading of the memory are reduced, and it is not necessary to delay the reading of the branch target instruction, which further improves the processing efficiency of the instruction.

なお、ストア命令により変更される後続の命令が、本
発明で対象としている分岐命令により読み出される分岐
先命令以外の命令の場合には、例えば、先の特公昭56−
40378号や特開昭57−185545号に記載されている技術を
適用すればよい。
If the subsequent instruction changed by the store instruction is an instruction other than the branch destination instruction read by the branch instruction targeted by the present invention, for example, the aforementioned Japanese Patent Publication No.
The techniques described in 40378 and JP-A-57-185545 may be applied.

〔発明の実施例〕Example of Invention

第1図は本発明に係る情報処理装置の一実施例のブロ
ック図で、特に本発明に関係する部分のみを示したもの
である。第1図において、命令バッファ(IBR:Instruct
ion Buffer Register)5には、記憶制御装置1により
メモリ2から先取りされた命令がデータ線12を介して格
納される。該命令に付随するフラグについては後述す
る。IBR5の格納指示および格納位置は、命令読出し制御
部9より出力されるセット信号21で制御される。第1図
では、IBR5はIBR0〜IBR31の32面あるとし、各面には、
それぞれ2バイトのデータが格納できる。
FIG. 1 is a block diagram of an embodiment of an information processing apparatus according to the present invention, and particularly shows only a portion related to the present invention. In Fig. 1, the instruction buffer (IBR: Instruct
An instruction prefetched from the memory 2 by the storage controller 1 is stored in the ion buffer register 5 via the data line 12. The flag associated with the instruction will be described later. The storage instruction and storage position of the IBR 5 are controlled by the set signal 21 output from the instruction read control unit 9. In FIG. 1, IBR5 has 32 faces IBR0 to IBR31, and each face has
Each can store 2 bytes of data.

命令レジスタ(IR:Instruction Register)6には、
命令デコード制御部25より出力されるセット信号33によ
り、次にデコードされる命令がIBR5よりデータ線14を介
して格納される。IR6の命令はデータ線19を介し、デコ
ーダ8に転送される。デコーダ8は、IR6から転送され
てきた命令をデコードし、該命令の実行に必要な制御情
報を制御線16,20,42等に出力する。こゝで、制御線20は
分岐命令のときオンとなり、制御線42はストアリクエス
トを発行する命令のときオンとなる。制御線16の制御情
報(命令コード等)は命令キュー(IQ:Instruction Que
ue)7に格納され、命令の実行待ちとなる。IQ7への格
納は、命令デコード制御部25より出力されるセット信号
34により指示され、IQ0,IQ1,IQ2のいずれかに格納され
る。
In the instruction register (IR: Instruction Register) 6,
By the set signal 33 output from the instruction decode control unit 25, the instruction to be decoded next is stored from the IBR 5 via the data line 14. The instruction of IR6 is transferred to the decoder 8 via the data line 19. The decoder 8 decodes the instruction transferred from IR6 and outputs the control information necessary for executing the instruction to the control lines 16, 20, 42 and the like. Here, the control line 20 is turned on for a branch instruction, and the control line 42 is turned on for an instruction to issue a store request. The control information (instruction code, etc.) of the control line 16 is stored in the instruction queue (IQ: Instruction Que
ue) 7 and the instruction is awaited for execution. The set signal output from the instruction decode controller 25 is stored in IQ7.
It is instructed by 34 and is stored in any of IQ0, IQ1, and IQ2.

命令実行制御部32は、命令キュー7のIQ0,IQ1,IQ2の
いずれか1つをデータ線18、セレクタ30を介して選択
し、次に実行すべき命令の制御情報をデータ線39を介し
て取り出す。この場合、選択すべきIQ番号は、セレクト
信号37で指定される。
The instruction execution control unit 32 selects any one of IQ0, IQ1 and IQ2 of the instruction queue 7 via the data line 18 and the selector 30, and the control information of the next instruction to be executed via the data line 39. Take it out. In this case, the IQ number to be selected is designated by the select signal 37.

アドレス加算器(AA:Address Adder)27は、IR6の命
令の所定フィールドで指定された汎用レジスタ(GR:Gen
eral Register)26より読み出したベース値およびイン
デックス値に、IR6の命令のディスプレイスメント値を
加え、オペランド・アドレスをデータ線36に出力する。
ストア命令の場合、データ線36はストアオペランドの下
限アドレス(先頭アドレス)を示すことになる。ストア
長論理部28は、IR6の命令の所定フィールドをデータ線1
9を介して入力し、ストアオペランドのストアすべき長
さをデータ線43に出力する。ストア長は、例えばSTORE
命令では4バイトと固定長であり、MOVE命令ではLフィ
ールドで指定される。加算器41は、データ線36の値とデ
ータ線43の値を加え、ストアオペランドの上限アドレス
を(最終アドレス)データ線44に出力する。
The address adder (AA: Address Adder) 27 is a general-purpose register (GR: Gen) specified in a predetermined field of the IR6 instruction.
The displacement value of the instruction of IR6 is added to the base value and index value read from the eral register) 26, and the operand address is output to the data line 36.
In the case of a store instruction, the data line 36 indicates the lower limit address (start address) of the store operand. The store length logic unit 28 stores the predetermined field of the instruction of IR6 in the data line 1
Input via 9 and output the length to be stored of the store operand to the data line 43. For example, STORE
The instruction has a fixed length of 4 bytes, and the MOVE instruction specifies it in the L field. The adder 41 adds the value of the data line 36 and the value of the data line 43, and outputs the upper limit address of the store operand to the (final address) data line 44.

ストア・アドレス・キュー(SQ:Store Add ress Queu
e)3は実行待ちのストア命令の下限アドレス(SLLi:St
ore Lower Limit)(i=0,1,2)と上限アドレス(SU
Li:Store Upper Limit)(i=0,1,2)を格納する。有
効表示ビット(SQVi:Store Queue Valid)(i=0,1,
2)は、その命令がストア命令のとき“1"となり、該当S
LLiおよびSULiが有効であることを示す。SQ3の格納およ
び取り出しは、IQ7と同様に制御される。すなわち、命
令デコード制御部25から出力されるセット信号34によ
り、制御線42、データ線36、データ線44の値がそれぞれ
SQVi,SLLi,SULiに格納される。また、SQ3の内容は、
命令実行制御部32が出すセレクト信号37により制御され
るセレクタ29によって選択され、線45に出力される。線
45の値は、レジスタ31に格納される。レジスタ31はSQ3
の一面と同一の構造で、SQV3,SLL3,SUL3を持つ。レジ
スタ31の格納は、命令実行制御部32が出すセット信号41
によって指定される。SLL3,SUL3は、実行中のストア命
令の下限アドレスと上限アドレスを示すものである。
Store address queue (SQ: Store Add ress Queu
e) 3 is the lower limit address of the store instruction waiting to be executed (SLL i : St
ore Lower Limit) (i = 0,1,2) and upper address (SU
L i : Store Upper Limit) (i = 0,1,2) is stored. Valid indication bit (SQV i : Store Queue Valid) (i = 0,1,
In 2), when the instruction is a store instruction, it becomes "1" and the S
Indicates that LL i and SUL i are valid. SQ3 storage and retrieval is controlled similarly to IQ7. That is, the set signal 34 output from the instruction decoding control unit 25 causes the values of the control line 42, the data line 36, and the data line 44 to be changed.
It is stored in SQV i , SLL i , and SUL i . Also, the contents of SQ3 are
It is selected by the selector 29 controlled by the select signal 37 issued by the instruction execution control unit 32 and output to the line 45. line
The value of 45 is stored in the register 31. Register 31 is SQ3
It has the same structure as one side and has SQV 3 , SLL 3 and SUL 3 . The register 31 is stored by the set signal 41 issued by the instruction execution control unit 32.
Specified by. SLL 3 and SUL 3 indicate the lower limit address and the upper limit address of the store instruction being executed.

以下、命令レジスタ(IR)6に分岐命令が格納された
場合を説明する。
The case where a branch instruction is stored in the instruction register (IR) 6 will be described below.

IR6に分岐命令が格納されると、AA27は分岐先命令ア
ドレスを計算してデータ線36に出力する。一方、デコー
ダ8は制御線20をオンにする。命令読出し制御部9は、
制御線20によりIR6の命令が分岐命令であることを認識
し、分岐先命令読出しを起動する。すなわち、命令読出
し制御部9は、命令読出しリクエスト線(IFリクエス
ト)24をオンとし、同時にデータ線36の分岐先命令アド
レスを命令読出しアドレス線23に与える。記憶制御装置
1はメモリ2を制御し、命令データ(分岐先命令群)を
読み出す。該読み出された命令データは、データ線12を
介して命令バッファ(IBR)5に転送される。
When the branch instruction is stored in IR6, AA27 calculates the branch destination instruction address and outputs it to the data line 36. On the other hand, the decoder 8 turns on the control line 20. The instruction read control unit 9
The control line 20 recognizes that the instruction of IR6 is a branch instruction, and starts reading the branch destination instruction. That is, the instruction read control unit 9 turns on the instruction read request line (IF request) 24, and at the same time, supplies the branch destination instruction address of the data line 36 to the instruction read address line 23. The storage controller 1 controls the memory 2 to read instruction data (branch destination instruction group). The read instruction data is transferred to the instruction buffer (IBR) 5 via the data line 12.

なお、当然のことながら、このとき既に命令バッファ
5に入っている内容は、分岐先命令群の転送に先立って
クリアするか、あるいは、後続の分岐先命令群で書き替
えるかして、使われないようにする。
Of course, at this time, the contents already stored in the instruction buffer 5 are used by clearing them before the transfer of the branch target instruction group or rewriting them in the subsequent branch target instruction group. Try not to.

一方、先取り命令変更検出論理部4は、線23で与えら
れる命令読出しアドレス(分岐先命令アドレス)を、線
10により与えられるストアが完了していない先行ストア
命令のストア・アドレスSLLi,SULi,SQVi(i=0,1,
2)及び実行中のストア命令のストア・アドレスSLL3,S
UL3,SQV3と比較し、メモリ2から読み出される命令デ
ータ(分岐先命令)が先行するストア動作によって変更
されるか否か検出する。以後、命令が先行するストア動
作によって変更されることをPSC(Program Store Confl
ict)と称す。例えば命令長は2バイト、4バイト、6
バイトのいずれかであるため、検出は2バイト単位に行
う。命令読出し幅が8バイトの時、PSCの有無を示す4
ビットがデータ線11に出力される。
On the other hand, the prefetch instruction change detection logic unit 4 changes the instruction read address (branch destination instruction address) given by the line 23 to the line
Store addresses SLL i , SUL i , SQV i (i = 0,1,
2) and the store address SLL 3 , S of the store instruction being executed
By comparing with UL 3 and SQV 3 , it is detected whether the instruction data (branch destination instruction) read from the memory 2 is changed by the preceding store operation. After that, PSC (Program Store Confl
ict). For example, the instruction length is 2 bytes, 4 bytes, 6
Since it is one of the bytes, the detection is performed in units of 2 bytes. Indicates the presence or absence of PSC when the instruction read width is 8 bytes 4
The bits are output on the data line 11.

第2図は先取り命令変更検出論理部4の詳細図であ
る。第2図において、ストアマーク論理回路50,51,52,5
3は第1図のSQ3の3面及びレジスタ31にそれぞれ対応す
る。各ストアマーク論理回路50〜53は命令読出しアドレ
ス(IFA:Instruction Fetch Address)を共通に入力し
て、それをSLLi,SULi(i=0,1,2,3)と並列に比較
し、結果を線540〜570,541〜571,542〜572および543〜5
73に与える。ANDゲート58〜61はストアマーク論理回路5
0の出力とSQV0とのアンド条件をとり、結果を線580〜61
0に出力する。同様に、ANDゲート62〜65はストアマーク
論理回路51の出力とSQV1のアンド条件、ANDゲート66〜6
9はストアマーク論理回路52の出力とSQV2のアンド条
件、ANDゲート70〜73はストアマーク論理回路53の出力
とSQV3のアンド条件をとり、それぞれ結果を線620〜65
0、660〜690、700〜730へ出力する。最後にアンドゲー
ト58〜61,62〜65,60〜69,70〜73の出力をORゲート74で
ビット対応にオアし、PSCの有無を示す4ビット(A,B,
C,D)をデータ線11に出力する。
FIG. 2 is a detailed diagram of the prefetch instruction change detection logic unit 4. In FIG. 2, store mark logic circuits 50, 51, 52, 5 are shown.
3 corresponds to the 3rd surface of SQ3 and the register 31 in FIG. Each of the store mark logic circuits 50 to 53 inputs an instruction read address (IFA: Instruction Fetch Address) in common and compares it in parallel with SLL i and SUL i (i = 0,1,2,3), Results are lines 540-570,541-571,542-572 and 543-5
Give to 73. AND gates 58 to 61 are store mark logic circuits 5
Take the AND condition between the output of 0 and SQV 0, and output the result as lines 580 to 61.
Output to 0. Similarly, the AND gates 62 to 65 are connected to the output of the store mark logic circuit 51 and the AND condition of SQV 1 , and AND gates 66 to 6 are used.
9 is the output of the store mark logic circuit 52 and the SQV 2 AND condition, and AND gates 70 to 73 are the output of the store mark logic circuit 53 and the SQV 3 AND condition.
Output to 0, 660 to 690, 700 to 730. Finally, the outputs of the AND gates 58 to 61, 62 to 65, 60 to 69, 70 to 73 are ORed by the OR gate 74 to correspond to the bits, and 4 bits (A, B,
C, D) are output to the data line 11.

第2図におけるストアマーク論理回路50の詳細を第3
図に示す。ストアマーク論理回路51、52、53についても
同様である。こゝで、命令読出しは8バイト単位で行う
とし、そのアドレスを含む8バイト境界内のデータをフ
ェッチするとする。比較回路75はSLL0(ビット0〜2
8)、IFA(ビット0〜28)を入力として8バイト単位で
比較し、SLL0=IFAのとき出力線750を“1"、SLL0<IFA
のとき出力線751を“1"とする。比較回路76はIFA(ビッ
ト0〜28)、SUL0(ビット0〜28)を入力として同様に
8バイト単位で比較し、IFA=SUL0のとき出力線760を
“1"、IFA<SUL0のとき出力線761を“1"とする。ANDゲ
ート77は線750と760、ANDゲート78は線751と760、ANDゲ
ート79は線750と761、ANDゲート80は線751と761のアン
ド条件をそれぞれとり、その出力P0〜P3を線770〜800を
介してストアマーク発生器81に与える。ストアマーク発
生器81は上記ANDゲート770〜800の出力P0〜P3、およびS
LL0(ビット29,30)、SUL0(ビット29,30)を入力と
し、第4図(a)の論理にしたがってストアマーク(A,
B,C,D)を線540〜570に与える。ストアマークは2バイ
ト単位で表わす。こゝで、“X"は、その出力がその入力
値に依存しないことを表わす。第4図(b)は第4図
(a)の場合の8バイト内でのPSCの発生情況を図示し
たものである。
The details of the store mark logic circuit 50 in FIG.
Shown in the figure. The same applies to the store mark logic circuits 51, 52 and 53. Here, it is assumed that instruction reading is performed in 8-byte units and that data within the 8-byte boundary including the address is fetched. Comparator circuit 75 uses SLL 0 (bits 0-2
8), IFA (bits 0 to 28) are input and compared in 8-byte units. When SLL 0 = IFA, output line 750 is set to “1”, SLL 0 <IFA
In this case, the output line 751 is set to "1". The comparator circuit 76 receives IFA (bits 0 to 28) and SUL 0 (bits 0 to 28) as input, and similarly compares them in units of 8 bytes. When IFA = SUL 0 , the output line 760 is set to “1” and IFA <SUL 0. In this case, the output line 761 is set to "1". AND gate 77 takes AND conditions of lines 750 and 760, AND gate 78 takes lines 751 and 760, AND gate 79 takes lines 750 and 761, and AND gate 80 takes lines 751 and 761. Give to the store mark generator 81 via ~ 800. The store mark generator 81 outputs the outputs P0 to P3 and S of the AND gates 770 to 800.
LL 0 (bits 29,30) and SUL 0 (bits 29,30) are input, and the store mark (A,
B, C, D) are given on lines 540-570. The store mark is expressed in units of 2 bytes. Here, "X" indicates that the output does not depend on the input value. FIG. 4 (b) shows the situation of PSC occurrence within 8 bytes in the case of FIG. 4 (a).

再び第1図を参照する。IBR5は先取りされた命令を格
納するデータ部と、そのデータのPSCの有無を示すフラ
グ部より構成される。フラグは先取り命令2バイト単位
に1ビット付加される。命令読出し幅は8バイトであ
る。第2図乃至第4図で説明した先取り命令変更検出論
理部4において報告された先取り命令変更ビット(A,B,
C,D)は、データ線11を介し、命令バッファ5のフラグ
部に格納される。格納位置は該当命令データと同一の位
置である。
Referring back to FIG. The IBR 5 is composed of a data part for storing prefetched instructions and a flag part for indicating the presence / absence of PSC of the data. One bit is added to the flag in units of 2 bytes of the prefetch instruction. The instruction read width is 8 bytes. The prefetch instruction change bits (A, B, and B) reported by the prefetch instruction change detection logic unit 4 described with reference to FIGS.
C, D) are stored in the flag section of the instruction buffer 5 via the data line 11. The storage position is the same as the corresponding command data.

IBR5の先取り命令変更ビットも上記命令の流れと同様
に処理される。すなわち、分岐先命令がIR6に取り出さ
れた時、その命令のPSCの有無を示すフラグもIBR5より
データ線13を介して取り出され、IR6へ格納される。次
に、命令がIQ7にキューイングされるのと同時に、命令
レジスタ6のフラグも、線15を介してIQ7のフラグへキ
ューイングされる。従って、IQ7は各命令に対応してフ
ラグを持つことになる。命令がIQ7より取り出され、命
令実行部18へ転送されると同時に、その命令のPSCの有
無を示すフラグも、データ線17およびセレクタ30を介
し、制御線38へ現われる。これにより、実行へ進んだ命
令のPSCの有無が制御線38によって示される。制御線38
がオンの時、すなわち、PSCが発生している時、命令実
行制御部32は当該命令の実行を中止する。この制御線38
の状態は命令読出し制御部9に与えられる。命令読出し
制御部9は、制御線38がオンの時、リセット信号22をオ
ンとして、先取りされたIBR5の内容を無効化し、命令読
出しを再度起動する。
The prefetch instruction change bit of IBR5 is processed in the same manner as the above instruction flow. That is, when the branch destination instruction is fetched by IR6, the flag indicating the presence or absence of PSC of the instruction is fetched from IBR5 via the data line 13 and stored in IR6. Then, at the same time that the instruction is queued to IQ7, the flag of instruction register 6 is also queued to the flag of IQ7 via line 15. Therefore, IQ7 has a flag corresponding to each instruction. At the same time that the instruction is fetched from the IQ 7 and transferred to the instruction execution unit 18, a flag indicating the presence or absence of PSC of the instruction also appears on the control line 38 via the data line 17 and the selector 30. As a result, the presence or absence of PSC of the instruction which has proceeded to execution is indicated by the control line 38. Control line 38
Is ON, that is, when the PSC is generated, the instruction execution control unit 32 suspends the execution of the instruction. This control line 38
Is given to the instruction read control unit 9. When the control line 38 is on, the instruction read control unit 9 turns on the reset signal 22 to invalidate the prefetched contents of the IBR 5, and activates the instruction read again.

なお、第1図では省略したが、制御線38がオンの時、
当然のことながら命令レジスタ6、命令キュー7に残さ
れている内容も無効化される。
Although omitted in FIG. 1, when the control line 38 is on,
Naturally, the contents left in the instruction register 6 and the instruction queue 7 are also invalidated.

このように、第1図の構成によれば、分岐命令の分岐
先命令読出し時における先取り命令変更検出論理の抜け
を防止することができる。すべての命令読出しにおいて
抜けなく、先取り命令変更を検出するには、例えば先に
述べた特開昭57−185545号のような方式を第1図に取り
入れ、その検出結果を、制御線38とオアして、命令実行
制御部32に報告すれば良い。
As described above, according to the configuration of FIG. 1, it is possible to prevent the prefetch instruction change detection logic from being omitted when the branch destination instruction of the branch instruction is read. In order to detect a prefetching command change without omission in all the command readings, for example, a method such as the above-mentioned Japanese Patent Laid-Open No. 57-185545 is incorporated in FIG. 1, and the detection result is used as the control line 38 and OR. Then, it may be reported to the instruction execution control unit 32.

〔発明の効果〕〔The invention's effect〕

以上述べた如く、本発明によれば、特に、分岐命令に
よって分岐先命令が読出される場合、分岐先命令読出し
アドレスと、その分岐命令に先行し、ストアが完了して
いないすべてのストア命令のストア・アドレスと比較し
て、先取りする命令がメモリ上で変更されることを検出
するため、分岐先命令読出しを遅らせることなく、分岐
先命令読出し時における先取り命令変更検出論理の抜け
が防止でき、命令の処理効率の向上がもたらされる。
As described above, according to the present invention, particularly when a branch destination instruction is read by a branch instruction, the branch destination instruction read address and all store instructions that precede the branch instruction and are not stored yet are stored. Compared with the store address, it detects that the instruction to be prefetched is changed in memory, so it is possible to prevent the drop of the prefetch instruction change detection logic when the branch destination instruction is read without delaying the branch destination instruction reading. The processing efficiency of the instruction is improved.

また、上記検出結果は命令に付随したフラグとして命
令バッファに記憶し、命令が実際に実行を開始する時
に、該命令に付随するフラグにより、その命令が先行す
るストア命令によって変更されたか否か判定し、変更さ
れた場合、命令バッファ等の無効化とメモリからの再読
出しを行うため、命令バッファ等の不必要な無効化とメ
モリの不必要な読出しが減少し、やはり命令の処理効率
が向上する。
The detection result is stored in the instruction buffer as a flag associated with the instruction, and when the instruction actually starts executing, it is determined by the flag associated with the instruction whether or not the instruction is changed by the preceding store instruction. However, if it is changed, the instruction buffer etc. is invalidated and the memory is read again, so unnecessary invalidation of the instruction buffer etc. and unnecessary reading of the memory are reduced, and the instruction processing efficiency is also improved. To do.

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

第1図は本発明の情報処理装置の主要部の一実施例を示
すブロック図、第2図は第1図における先取り命令変更
検出論理部の詳細図、第3図は第2図におけるストアマ
ーク論理回路の詳細図、第4図(a),(b)は第3図
の動作例を示す図である。 1…記憶制御装置、2…主記憶装置(メモリ)、3…ス
トア・アドレス・キュー、4…先取り命令変更検出論理
部、5…命令バッファ、6…命令レジスタ、7…命令キ
ュー、8…デコーダ、9…命令読出し制御部、25…命令
デコード制御部、32…命令実行制御部。
FIG. 1 is a block diagram showing an embodiment of a main part of an information processing apparatus of the present invention, FIG. 2 is a detailed view of a prefetch instruction change detection logic part in FIG. 1, and FIG. 3 is a store mark in FIG. FIG. 4A and FIG. 4B are detailed diagrams of the logic circuit showing the operation example of FIG. DESCRIPTION OF SYMBOLS 1 ... Storage control device, 2 ... Main storage device (memory), 3 ... Store address queue, 4 ... Prefetch instruction change detection logic part, 5 ... Instruction buffer, 6 ... Instruction register, 7 ... Instruction queue, 8 ... Decoder , 9 ... Instruction read control unit, 25 ... Instruction decode control unit, 32 ... Instruction execution control unit.

フロントページの続き (56)参考文献 特開 昭58−161043(JP,A) 特開 昭57−193843(JP,A) 特開 昭54−82140(JP,A) 特開 昭57−185545(JP,A) 特開 昭58−115680(JP,A) 特開 昭53−74857(JP,A) 特開 昭58−137048(JP,A)Continuation of the front page (56) Reference JP-A-58-161043 (JP, A) JP-A-57-193843 (JP, A) JP-A-54-82140 (JP, A) JP-A-57-185545 (JP , A) JP 58-115680 (JP, A) JP 53-74857 (JP, A) JP 58-137048 (JP, A)

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】先行する命令の実行と非同期にメモリから
命令を先読みして命令バッファに格納し、該命令バッフ
ァから命令を命令レジスタに順次取り出し、該命令レジ
スタに取り出された命令をデコーダでデコードし、該デ
コード結果を命令キューに格納し、該命令キューの内容
を順次取り出して実行する、先行制御方式の情報処理装
置において、 前記デコーダのデコード結果に応じ、前記命令レジスタ
に取り出された先行するストア命令のストア・アドレス
をストア動作が完了するまで保持するストアアドレスキ
ューと、 前記命令レジスタに分岐命令が取り出されると、前記デ
コーダのデコード結果に応じ、該分岐先命令で指定され
る分岐先命令アドレスにより分岐先命令読出しを起動
し、メモリから分岐先命令を先読みし、前記命令バッフ
ァの内容を該先読みした分岐先命令に置きかえる命令読
出し制御部と、 前記メモリから先読みされる分岐先命令の読出しアドレ
スと前記ストアアドレスキューに保持されているストア
・アドレスとを比較して、前記メモリから先読みされる
分岐先命令が先行するストア命令によって変更されるか
否か検出し、該検出結果をフラグとして前記命令バッフ
ァ内の該当分岐先命令に付随して記憶する先取り命令変
更検出論理部と、 前記命令バッファ内に記憶された前記フラグが、当該命
令に付随して命令レジスタ、命令キューと順次伝播する
信号線と、 前記命令キューから出力される命令に付随する前記フラ
グに基づき、当該命令が先行するストア命令によって変
更されていることを示していると、当該命令の実行を中
止せしめるとともに、前記命令読出し制御部に対して前
記命令バッファの内容の無効化と命令読出しの再起動を
指示し、さらに前記命令レジスタ、命令キューの内容を
無効化せしめる制御線とを具備していることを特徴とす
る情報処理装置。
1. An instruction is prefetched from a memory and stored in an instruction buffer asynchronously with the execution of a preceding instruction, the instructions are sequentially fetched from the instruction buffer into an instruction register, and the instructions fetched into the instruction register are decoded by a decoder. Then, in the information processing apparatus of the advance control system, which stores the decoding result in the instruction queue and sequentially fetches and executes the contents of the instruction queue, the preceding fetched to the instruction register is performed according to the decoding result of the decoder. A store address queue for holding the store address of the store instruction until the store operation is completed, and a branch destination instruction specified by the branch destination instruction according to the decoding result of the decoder when the branch instruction is fetched into the instruction register. The branch destination instruction read is activated by the address, the branch destination instruction is prefetched from the memory, and the instruction An instruction read control unit that replaces the contents of the file with the prefetched branch destination instruction; compares the read address of the branch destination instruction prefetched from the memory with the store address held in the store address queue; A prefetch instruction change detection logic unit that detects whether or not a branch destination instruction prefetched from memory is changed by a preceding store instruction, and stores the detection result as a flag in association with the branch destination instruction in the instruction buffer. The flag stored in the instruction buffer is based on the instruction register, an instruction queue, a signal line that sequentially propagates to the instruction queue, and the flag attached to the instruction output from the instruction queue. Indicating that an instruction has been modified by a preceding store instruction causes the instruction to stop executing and And a control line for instructing the instruction read control unit to invalidate the contents of the instruction buffer and to restart the instruction read, and further to invalidate the contents of the instruction register and the instruction queue. Information processing device.
JP58186437A 1983-10-05 1983-10-05 Information processing device Expired - Lifetime JPH0827718B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58186437A JPH0827718B2 (en) 1983-10-05 1983-10-05 Information processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58186437A JPH0827718B2 (en) 1983-10-05 1983-10-05 Information processing device

Publications (2)

Publication Number Publication Date
JPS6077241A JPS6077241A (en) 1985-05-01
JPH0827718B2 true JPH0827718B2 (en) 1996-03-21

Family

ID=16188428

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58186437A Expired - Lifetime JPH0827718B2 (en) 1983-10-05 1983-10-05 Information processing device

Country Status (1)

Country Link
JP (1) JPH0827718B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6263339A (en) * 1985-09-13 1987-03-20 Fujitsu Ltd Pipeline control system
JPH06100968B2 (en) * 1986-03-25 1994-12-12 日本電気株式会社 Information processing equipment
US4991090A (en) * 1987-05-18 1991-02-05 International Business Machines Corporation Posting out-of-sequence fetches

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5374857A (en) * 1976-12-15 1978-07-03 Fujitsu Ltd Data processor
JPS5482140A (en) * 1977-12-14 1979-06-30 Hitachi Ltd Information processor
JPS57185545A (en) * 1981-05-11 1982-11-15 Hitachi Ltd Information processor
JPS57193843A (en) * 1981-05-22 1982-11-29 Mitsubishi Electric Corp Pipeline computer
JPS58115680A (en) * 1981-12-28 1983-07-09 Nec Corp Information processor

Also Published As

Publication number Publication date
JPS6077241A (en) 1985-05-01

Similar Documents

Publication Publication Date Title
US20060224870A1 (en) Information processing device
EP0525666B1 (en) Information processing apparatus incorporating branch target instruction buffer
US5276825A (en) Apparatus for quickly determining actual jump addresses by assuming each instruction of a plurality of fetched instructions is a jump instruction
JPH0816394A (en) Apparatus and method for prefetch for prefetching of instruction code from system memory
EP0394711A2 (en) Branch instruction control unit based on a pipeline method
JPH03129432A (en) Branch control circuit
US5381532A (en) Microprocessor having branch aligner between branch buffer and instruction decoder unit for enhancing initiation of data processing after execution of conditional branch instruction
JPH09330221A (en) System and method for tracking early exception of microprocessor
JPH0827718B2 (en) Information processing device
JP2000056970A (en) Look-ahead method for instruction and data, micro controller, pseudo instruction detection circuit and recording medium
EP0324952A2 (en) Branching circuit for a pipelined processor
JPH07306785A (en) Processor with branch instruction executing function and branch instruction control method
JPH05241827A (en) Command buffer controller
JP2817524B2 (en) Instruction cache control method
JP2001273137A (en) Microprocessor
JP4049490B2 (en) Information processing device
JPS6240555A (en) Prefetch control system
JPH0248733A (en) Information processor
JPH08286914A (en) Memory controller
JPS63311438A (en) Control circuit for discrepancy of store instruction
JPS6277648A (en) Instruction readout control system
JPS6047618B2 (en) information processing equipment
JPH09311787A (en) Data processor
JPS6232507B2 (en)
JPS61211744A (en) Instruction prefetch control circuit