JPS61286930A - Instruction prefetching control system - Google Patents
Instruction prefetching control systemInfo
- Publication number
- JPS61286930A JPS61286930A JP12860785A JP12860785A JPS61286930A JP S61286930 A JPS61286930 A JP S61286930A JP 12860785 A JP12860785 A JP 12860785A JP 12860785 A JP12860785 A JP 12860785A JP S61286930 A JPS61286930 A JP S61286930A
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- prefetch
- branch
- execution
- circuit
- 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
Links
Landscapes
- Advance Control (AREA)
Abstract
Description
【発明の詳細な説明】
〔概要〕
命令先取り機構を有する命令制御装置において、該先取
りした命令に分岐命令が存在することを検出する検出回
路(DEC)を設け、該検出回路(DEC)が分岐命令
の存在を検出した時には、該命令先取りの為の主記憶装
置(MS)読み出し要求を抑止し、該分岐命令の実行を
完了した時点において、該抑止状態を解除するようにし
たものである。Detailed Description of the Invention [Summary] In an instruction control device having an instruction prefetch mechanism, a detection circuit (DEC) is provided to detect the presence of a branch instruction in the prefetched instruction, and the detection circuit (DEC) detects the presence of a branch instruction. When the presence of an instruction is detected, a main memory (MS) read request for prefetching the instruction is suppressed, and the suppressed state is released when the execution of the branch instruction is completed.
本発明は、命令先取り機構を有する命令制御装置におい
て、先取りした命令の中に分岐命令が存在する場合の命
令先取り制御方式に関する。The present invention relates to an instruction prefetch control method when a branch instruction exists among the prefetched instructions in an instruction control device having an instruction prefetch mechanism.
最近の半導体技術の著しい進歩に伴って、プロセッサ(
CPU)の方は益々高速化される動向にあるが、主記憶
装置(MS)の方はプロセッサ(CPU)の程度には高
速化されないのが実情である。With the recent remarkable progress in semiconductor technology, processors (
Although there is a trend toward faster speeds of CPUs (CPUs), the reality is that main memory devices (MSs) are not faster than processors (CPUs).
一方、命令制御装置においては、該装置の処理能力を向
上させる為に、命令の実行に先立って命令を先取りする
機構が備えられていることが多い。On the other hand, instruction control devices are often equipped with a mechanism for pre-fetching instructions prior to their execution in order to improve the processing performance of the device.
この場合、該先取りした命令の中に2分岐命令が存在す
ると、該先取りした命令の一部が無効になることがあり
、当該命令処理装置の処理能力を低下させる要因となる
問題がある。In this case, if a two-branch instruction exists among the prefetched instructions, a part of the prefetched instructions may become invalid, which poses a problem that causes a reduction in the processing performance of the instruction processing device.
特に、上記のように、主記憶装置(MS)に対するアク
セスタイムに比較してプロセッサ(CPU)のマシンサ
イクルが速い場合には、その影響は大きい。Particularly, as described above, when the machine cycle of the processor (CPU) is faster than the access time to the main memory (MS), the influence is large.
このような事情から、命令先取り機構を有する命令制御
装置においては、上記無効命令をできる限り先取りしな
い先取り制御方式が要求されるようになってきた。Under these circumstances, in an instruction control device having an instruction prefetch mechanism, a prefetch control method that prevents invalid instructions from being prefetched as much as possible has been required.
第5図は従来の命令先取り制御回路の一例を示した図で
あって、命令先取りの為の命令バッファ2として、IB
O−IR3迄の4命令分を具備している。FIG. 5 is a diagram showing an example of a conventional instruction prefetch control circuit, in which an IB
It is equipped with four instructions up to O-IR3.
今、命令先取り要求信号7の指示により、主記憶装置(
MS) 1がアクセスされ、一度に2命令が読み出され
て、該命令バッファ(IBO〜(B3) 2の何れか2
つの命令バッファ(IBo、1.又はIR2,3)に格
納されると、同時に該命令バッファの命令有効フラグ3
0〜33の内、対応するフラグが°オン′にセットされ
る。Now, according to the instruction prefetch request signal 7, the main memory (
MS) 1 is accessed, 2 instructions are read at once, and any 2 of the instruction buffers (IBO to (B3) 2) is accessed.
When the instruction is stored in one instruction buffer (IBo, 1. or IR2, 3), the instruction valid flag of the instruction buffer is set at the same time.
The corresponding flag from 0 to 33 is set to 'on'.
次実行命令選択信号4により選択された命令バッファ(
IBo、1.又はIR2,3) 2の命令有効フラグが
°オン゛であると、上記選択信号4により選択された命
令バッファ(IBo、1.又はIR2,3) 2の内容
が、次実行命令選択回路5を通して命令レジスタ(IR
)6に読み出され、当該命令の実行が開始され、同時に
上記命令有効フラグ30〜33の内、対応するフラグが
リセットされる。The instruction buffer (
IBo, 1. or IR2, 3) 2 is on, the contents of the instruction buffer (IBo, 1. or IR2, 3) 2 selected by the selection signal 4 are passed through the next execution instruction selection circuit 5. Instruction register (IR
) 6, execution of the instruction is started, and at the same time, the corresponding flag among the instruction valid flags 30 to 33 is reset.
こうして、2命令分の命令有効フラグ、例えば30.3
1が゛オフ′の状態になると、対応するノア回路13が
付勢され、オア回路工4を通して、主記憶装置(MS)
1に対して命令先取りの為の命令先取り要求信号7を
′オン゛ として命令の先取りが行われ、以下同じ動作
が繰り替えされる。 1このようにし
て、命令先取り制御により、当該命令制御装置の処理能
力の向上が図られている。In this way, the instruction valid flag for two instructions, for example 30.3
1 becomes the "off" state, the corresponding NOR circuit 13 is energized, and the main memory (MS) is connected through the OR circuit 4.
1, the instruction prefetch request signal 7 for prefetching an instruction is turned on to prefetch the instruction, and the same operation is repeated thereafter. 1 In this way, the processing ability of the instruction control device is improved by instruction prefetch control.
上記従来方式において、分岐命令の実行により、命令バ
ッファ(IBo、1.又はIR2,3’)のクリアを行
い、新たに命令の先取りを行う場合、該分岐命令の実行
前に発生した先取り要求によって、主記憶装置(MS)
1が読み出しサイクルに入っていると、該分岐先命令
の先取りは、当該読み出しサイクルが完了する迄待たな
ければならないと云う問題があった。In the above conventional method, when executing a branch instruction, the instruction buffer (IBo, 1. or IR2, 3') is cleared and a new instruction is prefetched, a prefetch request that occurs before the execution of the branch instruction , main memory (MS)
1 is in a read cycle, there is a problem in that prefetching of the branch destination instruction must wait until the read cycle is completed.
第6図は、上記従来方式による命令先取り動作をタイム
チャートで示した図であって、命令バッファ(IBO)
の命令への実行■が完了し、命令バッチ(IBI)の命
令Bの実行■が開始された時点において、命令有効フラ
グ30.31が“オフ゛となる為、ノア回路13が付勢
され、命令先取り要求信号■7が′オン′ となって、
図示のタイミングで、主記憶(MS)読み出しサイクル
■に入る。FIG. 6 is a time chart showing the instruction prefetching operation according to the conventional method, in which the instruction buffer (IBO)
When the execution of the instruction B is completed and the execution of the instruction B of the instruction batch (IBI) is started, the instruction valid flags 30 and 31 are turned off, so the NOR circuit 13 is activated and the instruction Preemption request signal ■7 becomes ``on'',
At the timing shown in the figure, the main memory (MS) read cycle (2) is entered.
その結果、命令バッファ(IR2)に格納されている分
岐命令Cの実行は、例えば2マシンサイクル待たされて
、■のタイミングで実行されることになる。As a result, the execution of the branch instruction C stored in the instruction buffer (IR2) is delayed, for example, by two machine cycles, and is executed at the timing (2).
本発明は上記従来の欠点に鑑み、先取りした命令に対し
て分岐命令の存在を確認することにより、無駄な命令を
先取りすることによる、分岐命令の実行の待ち時間をな
くし、命令制御装置の性能を向上させる方法を提供する
ことを目的とするものである。In view of the above conventional drawbacks, the present invention eliminates the waiting time for execution of branch instructions by prefetching useless instructions by confirming the existence of a branch instruction with respect to the prefetched instructions, thereby improving the performance of the instruction control device. The purpose is to provide a method for improving the
第1図は本発明の命令先取り制御の原理ブロック図であ
る。FIG. 1 is a block diagram of the principle of instruction preemption control according to the present invention.
命令バッファ(IBi) 2に読み出された先取り命令
をデコーダ(DEC) 8でデコードして、分岐命令を
検出し、フリップフロップ(以下、FPと云う)10に
記憶させ、上記デコーダ(DEC) 8の出力信号9と
、該FF 10の出力信号との論理和信号(オア回路1
2の出力信号)を生成して、命令先取り信号7を抑止す
るように構成する。The prefetch instruction read into the instruction buffer (IBi) 2 is decoded by the decoder (DEC) 8 to detect a branch instruction and stored in the flip-flop (hereinafter referred to as FP) 10. The logical sum signal (OR circuit 1) of the output signal 9 of the FF 10 and the output signal of the FF 10
2 output signal) to suppress the instruction prefetch signal 7.
即ち、本発明によれば、命令先取り機構を有する命令制
御装置において、該先取りした命令に分岐命令が存在す
ることを検出する検出回路(DIIC)を設け、該検出
回路(DIIC)が分岐命令の存在を検出した時には、
該命令先取りの為の主記憶装置(MS)読み出し要求を
抑止し、該分岐命令の実行を完了した時点において、該
抑止状態を解除するようにしたものであるので、無駄な
命令の先取りを抑止でき、主記憶装置(MS)に対する
負荷が軽減され、命令制御装置の性能の向上が図れる効
果がある。That is, according to the present invention, an instruction control device having an instruction prefetch mechanism is provided with a detection circuit (DIIC) that detects the presence of a branch instruction in the prefetched instruction, and the detection circuit (DIIC) detects the presence of a branch instruction in the prefetched instruction. When the presence is detected,
The main memory (MS) read request for prefetching the instruction is suppressed, and the suppressed state is released when the execution of the branch instruction is completed, thereby preventing unnecessary prefetching of instructions. This has the effect of reducing the load on the main memory (MS) and improving the performance of the instruction control device.
以下本発明の実施例を図面によって詳述する。 Embodiments of the present invention will be described in detail below with reference to the drawings.
第2図は本発明の一実施例をブロック図で示した図であ
り、第4図は本発明の他の実施例をブロック図で示した
図であって、第5図と同じ符号は同じ対象物を示し、第
1図で説明した分岐先取り制御機構(8〜12)が本発
明を実施するのに必要な機能ブロックである。FIG. 2 is a block diagram showing one embodiment of the present invention, and FIG. 4 is a block diagram showing another embodiment of the present invention, and the same reference numerals as in FIG. 5 are the same. The branch preemption control mechanism (8 to 12) shown in FIG. 1 and described in FIG. 1 is a necessary functional block to implement the present invention.
先ず、命令バッファ(IBo、1.又はIR2,3)
2に読み出された先取り命令の一つが、次実行命令選択
信号4によって、次実行命令選択回路5から選択され、
命令レジスタ(IR) 6にセットされるタイミングに
おいて、デコーダ(DEC) 8でデコードされ、分岐
命令であることが検出されると、命令先取り要求禁止を
記憶するフリップフロップ(FF) 10が゛オン”と
なり、該デコーダ(DEC) 8の出力信号と、当該F
F 10の出力信号との論理和がオア回路12でとられ
、その出力信号が、ナンド回路13に対する抑止信号と
して機能し、命令先取り要求信号7を抑止する。First, the instruction buffer (IBo, 1. or IR2, 3)
One of the prefetched instructions read out in step 2 is selected from the next execution instruction selection circuit 5 by the next execution instruction selection signal 4,
At the timing when the instruction register (IR) 6 is set, when it is decoded by the decoder (DEC) 8 and a branch instruction is detected, the flip-flop (FF) 10 that stores instruction prefetch request prohibition is turned on. The output signal of the decoder (DEC) 8 and the F
An OR circuit 12 performs a logical sum with the output signal of F10, and the output signal functions as an inhibit signal for the NAND circuit 13, thereby inhibiting the instruction prefetch request signal 7.
第3図は本発明による命令先取りの抑止動作をタイムチ
ャートで示した図であって、上記オア回路12の出力信
号によって、命令先取り要求信号■7が抑止され、分岐
命令Cの実行が、命令Bの実行完了に続いて実行できる
ことが理解される。FIG. 3 is a time chart showing the instruction prefetch inhibiting operation according to the present invention, in which the instruction prefetch request signal 7 is inhibited by the output signal of the OR circuit 12, and the execution of branch instruction C is It is understood that it can be executed following the completion of execution of B.
上記FF 10のリセットは、当該分岐命令Cの実行信
号11によって行われるので、該分岐命令実行後は再び
先取り要求許可状態となる。Since the reset of the FF 10 is performed by the execution signal 11 of the branch instruction C, after the branch instruction is executed, the prefetch request is allowed again.
本実施例においては、総ての命令バッファ(BIO〜B
I3) 2内にある命令に対する分岐命令の検出はでき
ないが、少量のハードウェアで効果的に無駄な命令の先
取りを抑止できる利点がある。In this embodiment, all instruction buffers (BIO to B
Although it is not possible to detect a branch instruction for an instruction within I3) 2, there is an advantage in that it can effectively prevent unnecessary prefetching of instructions with a small amount of hardware.
これに対して、第4図の実施例においては、総ての命令
バッファ(BIO−BI3)に対する分岐命令の検出を
可能としたものである。In contrast, in the embodiment shown in FIG. 4, branch instructions can be detected for all instruction buffers (BIO-BI3).
即ち、主記憶装置(MS) 1からの命令の先取りデー
タ(2命令分)に対して、分岐命令を検出する為のデコ
ーダ(DEC) 8を設けたもので、該先取り命令の中
に分岐命令が存在すると、オア回路12を通して、前述
のFF 10がセットされ、ナンド回路13を閉塞して
、次の命令先取り要求信号7を抑止するように機能する
ので、何れの命令バッファ(IBO〜183)に対して
も、無駄な命令が先取りされるのを抑止することができ
る。That is, a decoder (DEC) 8 is provided to detect a branch instruction for prefetched data (for two instructions) of instructions from the main memory (MS) 1, and if there is a branch instruction in the prefetched instruction. If exists, the aforementioned FF 10 is set through the OR circuit 12, which functions to block the NAND circuit 13 and suppress the next instruction prefetch request signal 7. It is also possible to prevent unnecessary instructions from being prefetched.
このように、本発明においては、先取り命令の中に分岐
命令が存在することを検出するデコーダ(DEC) 8
を設け、該先取り命令の中に分岐命令が存在することが
検出された時、該検出信号をFF 10に記憶させて、
当該分岐命令の実行が完了する迄、次の命令先取り要求
信号7を抑止するようにした所に特徴がある。In this way, in the present invention, a decoder (DEC) 8 detects the presence of a branch instruction among prefetch instructions.
is provided, and when it is detected that a branch instruction exists among the prefetch instructions, the detection signal is stored in the FF 10,
The feature is that the next instruction prefetch request signal 7 is suppressed until the execution of the branch instruction is completed.
以上、詳細に説明したように、本発明の命令先取り制御
方式は、命令先取り機構を有する命令制御装置において
、該先取りした命令に分岐命令が存在することを検出す
る検出回路(DEC)を設け、該検出回路(DEC)が
分岐命令の存在を検出した時には、該命令先取りの為の
主記憶袋W(MS)読み出し要求を抑止し、該分岐命令
の実行を完了した時点において、該抑止状態を解除する
ようにしたものであるので、無駄な命令の先取りを抑止
でき、主記憶装置(MS)に対する負荷が軽減され、命
令制御装置の性能の向上が図れる効果がある。As described above in detail, the instruction prefetch control method of the present invention includes, in an instruction control device having an instruction prefetch mechanism, a detection circuit (DEC) that detects the presence of a branch instruction in the prefetched instruction; When the detection circuit (DEC) detects the existence of a branch instruction, it suppresses the main memory bag W (MS) read request for prefetching the instruction, and when the execution of the branch instruction is completed, the suppressed state is turned off. Since the command is released, unnecessary prefetching of instructions can be suppressed, the load on the main memory (MS) can be reduced, and the performance of the command control device can be improved.
第1図は本発明の命令先取り制御の原理ブロック図。
第2図は本発明の一実施例をブロック図で示した図。
第3図は本発明による命令先取りの抑止動作をタイムチ
ャートで示した図。
第4図は本発明の他の実施例をブロック図で示した図。
第5図は従来の命令先取り制御回路の一例を示した図。
第6図は従来方式による命令先取り動作をタイムチャー
トで示した図。
である。
図面において、
1は主記憶装置(MS) 。
2は命令バッファ(IBO〜IB3)。
30〜33は命令有効フラグ、4は次実行命令選択信号
。
6は命令レジスタ、 7は命令先取り要求信号。
8はデコーダ(DEC) 。
10は先取り要求禁止フリップフロップ(FF)。
■〜■は命令実行、又は制御信号。
をそれぞれ示す。
C0刺鳴コ尤(二よるq4刈0暑り鵞が12Lタイムラ
−ヤードて示したの斉 乙 口FIG. 1 is a block diagram of the principle of instruction preemption control according to the present invention. FIG. 2 is a block diagram showing an embodiment of the present invention. FIG. 3 is a time chart showing the instruction prefetch inhibiting operation according to the present invention. FIG. 4 is a block diagram showing another embodiment of the present invention. FIG. 5 is a diagram showing an example of a conventional instruction prefetch control circuit. FIG. 6 is a time chart showing the instruction prefetching operation according to the conventional method. It is. In the drawings, 1 is a main memory (MS). 2 is an instruction buffer (IBO to IB3). 30 to 33 are instruction valid flags, and 4 is a next execution instruction selection signal. 6 is an instruction register, and 7 is an instruction prefetch request signal. 8 is a decoder (DEC). 10 is a prefetch request prohibition flip-flop (FF); ■~■ are command execution or control signals. are shown respectively. C0 stinging sound (Niyoru q4 cut 0 hot goose showed 12L timer yard)
Claims (1)
行に先行して、主記憶装置(MS)(1)より命令を読
み出して、該命令バッファ(IBi)(2)に格納する
命令先取り制御機構を有する命令制御装置において、該
先取りした命令に分岐命令が存在することを検出する回
路(DEC)(8)を設け、 該検出回路(DEC)(8)によって分岐命令が存在す
ることが検出された時には、該分岐命令の実行に入る迄
は、上記命令先取りの為の主記憶装置(MS)(1)に
対する読み出し要求信号(7)を抑止し、該分岐命令の
実行後、上記命令先取りの為の主記憶装置(MS)の読
み出し要求の禁止状態(10)の解除を行うように制御
することを特徴とする命令先取り制御方式。[Claims] It has a plurality of instruction buffers (IBi) (2), and prior to execution of the instruction, the instruction is read from the main memory (MS) (1) and the instruction buffer (IBi) ( In an instruction control device having an instruction prefetch control mechanism stored in 2), a circuit (DEC) (8) for detecting the existence of a branch instruction in the prefetched instruction is provided, and the detection circuit (DEC) (8) When the existence of a branch instruction is detected, the read request signal (7) to the main memory (MS) (1) for instruction prefetching is suppressed until the branch instruction is executed, and An instruction prefetch control method, characterized in that, after execution of the instruction, control is performed to cancel the prohibition state (10) of a read request of a main memory (MS) for the instruction prefetch.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP12860785A JPS61286930A (en) | 1985-06-13 | 1985-06-13 | Instruction prefetching control system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP12860785A JPS61286930A (en) | 1985-06-13 | 1985-06-13 | Instruction prefetching control system |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS61286930A true JPS61286930A (en) | 1986-12-17 |
Family
ID=14988959
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP12860785A Pending JPS61286930A (en) | 1985-06-13 | 1985-06-13 | Instruction prefetching control system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS61286930A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH01263727A (en) * | 1988-04-13 | 1989-10-20 | Mitsubishi Electric Corp | Data processor |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS57193843A (en) * | 1981-05-22 | 1982-11-29 | Mitsubishi Electric Corp | Pipeline computer |
JPS6074033A (en) * | 1983-09-30 | 1985-04-26 | Fujitsu Ltd | Instruction readout system |
-
1985
- 1985-06-13 JP JP12860785A patent/JPS61286930A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS57193843A (en) * | 1981-05-22 | 1982-11-29 | Mitsubishi Electric Corp | Pipeline computer |
JPS6074033A (en) * | 1983-09-30 | 1985-04-26 | Fujitsu Ltd | Instruction readout system |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH01263727A (en) * | 1988-04-13 | 1989-10-20 | Mitsubishi Electric Corp | Data processor |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8739164B2 (en) | Automatic suspend atomic hardware transactional memory in response to detecting an implicit suspend condition and resume thereof | |
JP4759273B2 (en) | Data processing apparatus and shared resource access control method | |
JP3226055B2 (en) | Information processing device | |
KR960035262A (en) | Method and apparatus for selective control of interrupt wait in data processing system | |
JPH07311740A (en) | Computer | |
JPS61286930A (en) | Instruction prefetching control system | |
EP0385136B1 (en) | Microprocessor cooperating with a coprocessor | |
JPS6247746A (en) | Interruption control system | |
JP3199035B2 (en) | Processor and execution control method thereof | |
JPS6212538B2 (en) | ||
JP2944563B2 (en) | Pipeline type information processing device | |
JP2656558B2 (en) | Cache memory control circuit | |
JP2572821B2 (en) | Operation processing method by instruction re-execution | |
JP2544533B2 (en) | Programmable controller sequence instruction processor | |
JPH01240941A (en) | Information processor | |
JPS6243740A (en) | Countermeasure circuit for runaway of microprocessor device | |
JPS6232507B2 (en) | ||
JPS6231439A (en) | Instruction reprocessing control system | |
JP2009205351A (en) | Microcomputer | |
JPH0380355A (en) | Computer with dma transfer mechanism | |
JPH0259933A (en) | Microprocessor | |
JPS63148329A (en) | Instruction prefetch control system | |
JPS5957372A (en) | Parallel arithmetic stop controlling system | |
JPH027128A (en) | Information processor | |
JPS63241637A (en) | System for receiving interruption of arithmetic processor by pipe line control |