JP2511063B2 - Pipeline control method - Google Patents

Pipeline control method

Info

Publication number
JP2511063B2
JP2511063B2 JP62224183A JP22418387A JP2511063B2 JP 2511063 B2 JP2511063 B2 JP 2511063B2 JP 62224183 A JP62224183 A JP 62224183A JP 22418387 A JP22418387 A JP 22418387A JP 2511063 B2 JP2511063 B2 JP 2511063B2
Authority
JP
Japan
Prior art keywords
instruction
flow
state
exception
detected
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 - Fee Related
Application number
JP62224183A
Other languages
Japanese (ja)
Other versions
JPS6467627A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP62224183A priority Critical patent/JP2511063B2/en
Publication of JPS6467627A publication Critical patent/JPS6467627A/en
Application granted granted Critical
Publication of JP2511063B2 publication Critical patent/JP2511063B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔概 要〕 命令長がパイプラインの処理幅より大きいSS型命令で
パイプライン処理を行う場合のパイプライン制御方式に
関し、 命令バッファ有効信号(STV信号)の回路遅延時間特
性に影響されることなくマシンサイクルを短縮可能にし
て、パイプライン処理を高速化することを目的とし、 SS型式命令の前半命令を第1フローで実行し、後半命
令を第2フローで実行するパイプライン制御方式におい
て、SS型式命令である場合はSTV信号に関係なく第1フ
ローをDステートより1ステート以上後で、かつEステ
ートより前のステートにインターロックし、第2フロー
が実行され命令取出し例外が検出された場合、第1フロ
ーのインターロックがSTV信号により解除された後、第
1フローのEステート又はその前のステートにバイパス
するように構成する。
DETAILED DESCRIPTION OF THE INVENTION [Overview] Regarding a pipeline control method when pipeline processing is performed with an SS type instruction whose instruction length is larger than the pipeline processing width, the circuit delay time of the instruction buffer valid signal (STV signal) The first half instruction of SS type instruction is executed in the first flow and the second half instruction is executed in the second flow for the purpose of speeding up the pipeline processing by making it possible to shorten the machine cycle without being affected by the characteristics. In the pipeline control system, if it is an SS type instruction, the first flow is interlocked with a state one state or more after the D state and before the E state regardless of the STV signal, and the second flow is executed and the instruction is executed. If a fetch exception is detected, after the interlock of the first flow is released by the STV signal, it goes back to the E state of the first flow or the state before it. Configured to pass.

〔産業上の利用分野〕[Industrial applications]

本発明は、パイプライン制御方式、特に、命令長がパ
イプラインの処理幅より大きいSS型式命令でパイプライ
ン処理を行う場合のパイプライン制御方式に関する。
The present invention relates to a pipeline control method, and more particularly to a pipeline control method in the case of performing pipeline processing with an SS type instruction whose instruction length is larger than the processing width of the pipeline.

〔従来の技術〕[Conventional technology]

パイプライン処理においては、命令の長さnバイトが
パイプラインの処理幅(mバイト)よりも大きい場合と
小さい場合があり、n>mの場合は、SS(Storage−and
−Storage)型式命令と呼ばれている。
In pipeline processing, the instruction length n bytes may be larger or smaller than the pipeline processing width (m bytes), and when n> m, SS (Storage-and
-Storage) Type instructions.

SS型式命令以外の命令では、n≦mであるので、パイ
プライン処理の1フローで命令のデコードとアドレス計
算が行われる。これに対し、SS型式命令ではn>mであ
るために、命令のデコードとオペランドのアドレス計算
について2フローを必要とする。
For instructions other than SS type instructions, since n ≦ m, instruction decoding and address calculation are performed in one flow of pipeline processing. On the other hand, in the SS type instruction, since n> m, two flows are required for instruction decoding and operand address calculation.

次に、第3図〜第5図を参照して、mが4バイトでn
が6バイトである場合を例にとって、SS命令型式による
パイプライン処理方式について説明する。
Next, referring to FIG. 3 to FIG. 5, m is 4 bytes and n
The pipeline processing method by the SS instruction type will be described by taking the case where is 6 bytes as an example.

第3図は、6バイトのSS型式命令を示したもので、
“0〜5"はそのバイト位置を示す。6バイト命令は2分
され、“0〜3"のHWD0が前半命令であり、“2〜5"のHW
D1が後半命令である。
Figure 3 shows a 6-byte SS type instruction.
"0-5" indicates the byte position. A 6-byte instruction is divided into two parts, HWD0 of "0-3" is the first half instruction, and HWD of "2-5"
D1 is the second half instruction.

このSS型式命令を用いて命令処理幅mが4バイトのパ
イプライン処理を行う場合には、第1フローでは前半命
令HWD0についてデコード及びアドレス計算が行われ、第
2フローでは後半命令HWD1についてデコード及びアドレ
ス計算が行われる。
When pipeline processing with an instruction processing width m of 4 bytes is performed using this SS type instruction, decoding and address calculation are performed for the first half instruction HWD0 in the first flow, and decoding and address calculation are performed for the second half instruction HWD1 in the second flow. Address calculation is performed.

この場合、パイプライン処理を高速化するために、前
半命令HWD0の部分が命令バッファに入力された段階で、
第4図に示すように第1フローの処理が開始される。第
4図において、Dステートはデコード・ステートで、命
令のデコードが行われる。Aステートはアドレス計算ス
テートで、アドレス計算が行われる。Tステートはバッ
ファンチェックステートで、アドレスがバッファ(図示
せず)にあるか否かのチェックが行われる。Bステート
はバッファリードステートで、バッファにあるオペラン
ド・データがリードされる。Eステートは演算実行ステ
ートで、命令の内容が実行される。Wステートはライト
ステートで、実行した結果がライトされる。各ステート
の間隔はマシンサイクルに一致する。
In this case, in order to speed up the pipeline processing, when the first half instruction HWD0 part is input to the instruction buffer,
As shown in FIG. 4, the process of the first flow is started. In FIG. 4, the D state is the decode state, and the instruction is decoded. The A state is an address calculation state in which address calculation is performed. The T state is a buffer check state, and it is checked whether the address is in a buffer (not shown). The B state is a buffer read state in which the operand data in the buffer is read. The E state is an arithmetic execution state, and the content of the instruction is executed. The W state is a write state, and the execution result is written. The interval between each state corresponds to the machine cycle.

同様にして、第2フローも、D,A,T,……等の各ステー
トの順で処理が実行される。
Similarly, the second flow is also processed in the order of each state such as D, A, T, ....

この第4図のパイプライン処理は、第2フローに命令
取出し例外が無ければ正常に動作して、パイプライン処
理を高速に行うことができる。しかし、第2フローに命
令取出し例外があると、誤動作が生じる場合がある。
The pipeline processing of FIG. 4 operates normally if there is no instruction fetch exception in the second flow, and the pipeline processing can be performed at high speed. However, if there is an instruction fetch exception in the second flow, a malfunction may occur.

例えば、第1フローのAステートで命令取出し例外が
なく、第2フローのDステートで初めて命令取出し例外
が解る場合がある。
For example, there is a case where there is no instruction fetch exception in the A state of the first flow and the instruction fetch exception is known for the first time in the D state of the second flow.

この場合は、第4図に示すように、第2フローが第1
フローのWステートの後から開始されると、第1フロー
のオペランドに関する実行例外がEステートの初めに検
出されて実行例外レジスタ(D−X・R)にセットさ
れ、その後、第2フローの命令取出し例外がそのDステ
ートの初めに検出されて命令取出し例外レジスタ(I−
X・R)にセットされる。
In this case, the second flow is the first as shown in FIG.
When started after the W state of the flow, the execution exception for the operand of the first flow is detected at the beginning of the E state and set in the execution exception register (DXR), and then the instruction of the second flow. A fetch exception is detected at the beginning of its D state and the instruction fetch exception register (I-
X / R).

図示しないCPUは、実行例外レジスタ(D−X・R)
又は命令取出し例外レジスタ(I−X・R)に例外がセ
ットされると、先にセットされたものに対する割込み処
理を行う。このため、本来は命令取出し例外に対する割
込み処理を先に行う必要があるにも拘らず、誤って実行
例外に対する割込み処理が行われることになる。またこ
の結果、命令取出し例外情報が失われ、その後同じ命令
が実行されると、再び誤動作するという不都合が生じ
る。
The CPU (not shown) is an execution exception register (DX-R).
Alternatively, when an exception is set in the instruction fetch exception register (IXR), interrupt processing for the previously set one is performed. For this reason, the interrupt process for the execution exception is erroneously performed although the interrupt process for the instruction fetch exception should be performed first. Further, as a result, the instruction fetch exception information is lost, and if the same instruction is executed thereafter, the malfunction occurs again.

このような誤動作が生じるのを防止するために、第1
フローの処理をインターロックし、第2フローで発生し
た命令取出し例外による割込みを優先させるパイプライ
ン制御方式が行われている。次に、第2図及び第5図を
参照して、このパイプライン制御方式を説明する。第2
図は、パイプライン制御システムの構成の説明図、第5
図はその動作タイミングチャートである。
In order to prevent such malfunctions, the first
A pipeline control method is used in which the processing of the flow is interlocked and the interrupt due to the instruction fetch exception generated in the second flow is prioritized. Next, this pipeline control method will be described with reference to FIGS. 2 and 5. Second
FIG. 5 is an explanatory diagram of the configuration of the pipeline control system, fifth.
The figure is the operation timing chart.

第2図において、10はCPUで、記憶制御ユニット11、
命令制御ユニット12及び演算制御ユニット13で構成され
る。図には、従来技術及び本発明の説明に必要な部分の
構成が示されている。
In FIG. 2, 10 is a CPU, which is a storage control unit 11,
It is composed of an instruction control unit 12 and an arithmetic control unit 13. The drawings show the structure of the parts necessary for explaining the conventional technology and the present invention.

記憶制御ユニット11は、図示しない主記憶又はバッフ
ァへのアクセス制御、取り出された命令語やデータ語を
命令制御ユニット12及び演算制御ユニット13へ供給する
制御、アドレス変換制御等を行う。また、命令制御ユニ
ット12の命令バッファに書き込まれた命令が有効である
ことを指示する命令バッファ有効信号(STV(Status Va
lid)信号)を発行する。
The storage control unit 11 performs access control to a main memory or a buffer (not shown), control for supplying the fetched instruction word or data word to the instruction control unit 12 and the operation control unit 13, address conversion control, and the like. In addition, an instruction buffer valid signal (STV (Status Va) that indicates that the instruction written in the instruction buffer of the instruction control unit 12 is valid.
lid) signal) is issued.

命令制御ユニット12はCPU10全体の命令制御を行うユ
ニットで、記憶制御ユニット11への命令の読出し要求、
オペランドデータのフェッチとストア制御、命令のデコ
ードのパイプライン制御、演算制御ユニット13との間の
オペランドデータの送受、各種割込み要求に対する処理
等を行う。
The instruction control unit 12 is a unit that performs instruction control of the entire CPU 10, and requests reading of instructions to the storage control unit 11,
It performs fetch and store control of operand data, pipeline control of instruction decoding, transmission and reception of operand data to and from the operation control unit 13, and processing for various interrupt requests.

命令制御ユニット12において、121は命令バッファ
で、記憶制御ユニット11より送られた命令の内容がmバ
イト単位で書き込まれる。
In the instruction control unit 12, 121 is an instruction buffer in which the content of the instruction sent from the storage control unit 11 is written in units of m bytes.

122はパイプライン制御部で、命令バッファ121のデー
タ及びSTV信号を受けて、パイプライン処理の各ステー
トの切換え、インターロック等、パイプライン処理に関
する制御を行う。
A pipeline control unit 122 receives the data of the instruction buffer 121 and the STV signal, and controls the pipeline processing such as switching between states of the pipeline processing and interlocking.

123は第1例外レジスタで、パイプライン処理の第1
フロー中の1つのステートで検出された例外が、その命
令の内容とともにセットされる。
123 is the first exception register, which is the first of the pipeline processing
The exception detected in one state in the flow is set along with the contents of the instruction.

124は第2例外レジスタで、パイプライン処理の第2
フロー中の1つのステートで検出された例外が、その命
令の内容とともにセットされる。
Reference numeral 124 is a second exception register, which is the second of the pipeline processing.
The exception detected in one state in the flow is set along with the contents of the instruction.

125はマルチプレクサで、第1フローで命令取出し例
外が検出されず、第2フローで命令取出し例外が検出さ
れた場合に、第2例外レジスタ124をセレクトし、その
他の場合は第1例外レジスタ123をセレクトする。
A multiplexer 125 selects the second exception register 124 when the instruction fetch exception is not detected in the first flow and the instruction fetch exception is detected in the second flow. In other cases, the first exception register 123 is selected. Select.

126は第3例外レジスタで、マルチプレクサ125のセレ
クトしたレジスタの内容がセットされる。
Reference numeral 126 is a third exception register in which the contents of the register selected by the multiplexer 125 are set.

127は例外検出部で、命令取出し例外の検出を行う。 An exception detection unit 127 detects an instruction fetch exception.

次に、第2図の動作を、第5図のタイミングチャート
を参照して説明する。
Next, the operation of FIG. 2 will be described with reference to the timing chart of FIG.

パイプライン処理が開始されると、命令制御ユニット
12は、記憶制御ユニット11に命令の読出しを要求する。
記憶制御ユニット11は、図示しない主記憶又はバッファ
をアクセスして命令を読み出し、命令バッファ121に送
る。
When the pipeline processing is started, the instruction control unit
12 requests the storage control unit 11 to read an instruction.
The storage control unit 11 accesses a main memory or a buffer (not shown) to read an instruction and sends it to the instruction buffer 121.

パイプライン制御部122は、Dステートにおいて命令
バッファ121の内容をデコードし、命令がSS型式命令
で、かつ後半が命令バッファ121にないという条件で、
第1フローのAステートにおいてインタローク信号を上
げ、第1フローをステートAの状態でインターロックす
る。これにより、第1フローは、第5図に示すようにス
テートAが繰り返される。もし、Dステートにおいて何
らかの例外が検出されると、記憶制御ユニット11は、そ
の例外を第1例外レジスタ123にセットする。
The pipeline control unit 122 decodes the contents of the instruction buffer 121 in the D state, and if the instruction is an SS type instruction and the latter half is not in the instruction buffer 121,
The interlock signal is raised in the A state of the first flow to interlock the first flow in the state A. As a result, in the first flow, the state A is repeated as shown in FIG. If any exception is detected in the D state, the storage control unit 11 sets the exception in the first exception register 123.

SS型式命令の残りが命令バッファ121に入って、記憶
制御ユニット11からSTV信号が発行されると第2フロー
が実行され、そのDステートで命令取出し例外が検出さ
れると第2例外レジスタ124にセットされる。
When the rest of the SS type instruction enters the instruction buffer 121 and the STV signal is issued from the storage control unit 11, the second flow is executed, and when the instruction fetch exception is detected in the D state, it is stored in the second exception register 124. Set.

パイプライン制御部122は、STV信号を受けると第1フ
ローのインターロックを解除し、AステートからTステ
ートへの切換え信号を出して第1フローの処理を続行さ
せる。
Upon receiving the STV signal, the pipeline control unit 122 releases the interlock of the first flow and outputs a switching signal from the A state to the T state to continue the processing of the first flow.

更に、第1フローのDステートで命令取出し例外が検
出されず、(*1F−X−1で示す、*は反転符号)、第
2フローのDステートで命令取出し例外が検出される
(1F−X−2で示す)と、第1フローにおいてAステー
トからTステートに切り換るタイミングで、マルチプレ
クサ125で第2例外レジスタ124をセレクトし、その内容
を第3例外レジスタ126にセットする。
Further, no instruction fetch exception is detected in the D state of the first flow (* 1F-X-1, * is an inverted sign), and an instruction fetch exception is detected in the D state of the second flow (1F- (Denoted by X-2) and the timing of switching from the A state to the T state in the first flow, the multiplexer 125 selects the second exception register 124 and sets the contents in the third exception register 126.

記憶制御ユニット11から命令バッファ121に命令が入
れられると同時に例外もセットされ、その命令の実行時
に例外検出部127で例外(*1F−X−1,1F−X−2)が
検出される。
When an instruction is entered from the storage control unit 11 into the instruction buffer 121, an exception is set at the same time, and the exception detection unit 127 detects the exception (* 1F-X-1, 1F-X-2) when the instruction is executed.

これにより、第1フローのAステートで例外が検出さ
れないか又は検出された例外が命令取出し例外以外の例
外である場合は、第2フローで検出された命令取出し例
外が、Dステートからバイパスして第3例外レジスタ12
6にセットされる。なお、第1フローのAステートにお
いて命令取出し例外が検出されると、第3例外レジスタ
126に第1例外レジスタ123の命令取出し例外がセットさ
れる。
As a result, if no exception is detected in the A state of the first flow, or if the detected exception is an exception other than the instruction fetch exception, the instruction fetch exception detected in the second flow is bypassed from the D state. Third exception register 12
Set to 6. When an instruction fetch exception is detected in the A state of the first flow, the third exception register
The instruction fetch exception of the first exception register 123 is set in 126.

命令制御部12は、この第3例外レジスタ126にセット
された命令取出し例外に対応した割込み処理を行う。
The instruction control unit 12 performs interrupt processing corresponding to the instruction fetch exception set in the third exception register 126.

以上のようにして、命令取出し例外が検出された場合
は、それが第1フロー又は第2フローのいずれにおいて
検出されても、常に他の例外に優先して受けられて割込
み処理が行われる。これにより、正しい例外処理動作が
保障される。
As described above, when an instruction fetch exception is detected, regardless of whether it is detected in the first flow or the second flow, it is always received in preference to other exceptions and interrupt processing is performed. This ensures correct exception handling operation.

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

従来のパイプライン制御方式は、命令がSS型式命令で
ある場合、前述のように、第1フローのAステートでイ
ンターロックした後、STV信号の発行された段階でイン
ターロックを解除し、第1フローのAステートからTス
テートに切り換わるタイミングで第2フローで検出され
た命令取出し例外を第1フローにバイパスさせて、正し
い例外処理動作を保障していた。
In the conventional pipeline control method, when the instruction is the SS type instruction, as described above, after interlocking in the A state of the first flow, the interlock is released when the STV signal is issued, The instruction fetch exception detected in the second flow is bypassed to the first flow at the timing of switching from the A state to the T state of the flow to guarantee the correct exception handling operation.

この場合のSTV信号は、記憶制御ユニット11から命令
制御ユニット12のパイプライン制御部122に入り、ステ
ート切換え信号及び第3例外レジスタ126のクロック制
御信号となっている他、図示しない様々な所で使用され
ている。一方、パイプライン制御部122の回路は、多く
の動作を行ういわゆる“重い回路”である。これらの原
因により、STV信号の回路遅延時間は大きくなり、第2
例外レジスタ124の命令取出し例外を第3例外レジスタ1
26にバイパスしてセットする時間も、この遅延時間の影
響により大きなものとなる。
The STV signal in this case enters the pipeline control unit 122 of the instruction control unit 12 from the storage control unit 11 and serves as a state switching signal and a clock control signal of the third exception register 126, and at various places not shown. in use. On the other hand, the circuit of the pipeline control unit 122 is a so-called “heavy circuit” that performs many operations. Due to these causes, the circuit delay time of the STV signal becomes large,
The instruction fetch exception of the exception register 124 is set to the third exception register 1
The time to bypass and set to 26 also becomes large due to the influence of this delay time.

このため、パイプライン処理を行う各ステートの切換
えタイミング間隔すなわちマシンサイクル間隔が増大
し、パイプライン処理を高速化する際の大きな妨げとな
っているという問題があった。
For this reason, there has been a problem that the switching timing interval of each state in which pipeline processing is performed, that is, the machine cycle interval is increased, which is a great obstacle to speeding up pipeline processing.

本発明は、STV信号の回路遅延時間特性に影響される
ことなくマシンサイクルを短縮可能にし、パイプライン
処理を高速化することを目的とする。
An object of the present invention is to shorten the machine cycle without being influenced by the circuit delay time characteristic of the STV signal and to speed up the pipeline processing.

〔問題点を解決するための手段〕[Means for solving problems]

SS型式命令の第1フローをインターロックする目的
は、第2フローにおいて命令取出し例外が検出された場
合に、それを第1フローにバイパスし、第1フローで検
出された命令取出し例外以外の例外が実行される前に命
令取出し例外に対する割込み処理を行わせて誤動作を防
止することである。
The purpose of interlocking the first flow of the SS type instruction is to bypass the instruction fetch exception in the second flow when the instruction fetch exception is detected, and to throw an exception other than the instruction fetch exception detected in the first flow. Is to prevent an erroneous operation by executing an interrupt process for an instruction fetch exception before the execution of.

第1フローにおいて命令が実行されるのはEステート
である。したがって、第1フローのEステート開始前に
第2フローで検出された命令取出し例外が第1フローに
バイパスされるならば、バイパスされた命令取出し例外
に対する割込み処理が先に実行されるので問題は生じな
い。この場合のバイパス処理はSTV信号を使用しなくて
も可能であるので、STV信号の回路遅延時間特性に影響
されることなく、短かいマシンサイクルにおいてバイパ
ス処理を行うことができる。
In the first flow, the instruction is executed in the E state. Therefore, if the instruction fetch exception detected in the second flow is bypassed to the first flow before the E state of the first flow is started, the interrupt processing for the bypassed instruction fetch exception is executed first, and thus the problem occurs. Does not happen. Since the bypass processing in this case can be performed without using the STV signal, the bypass processing can be performed in a short machine cycle without being affected by the circuit delay time characteristic of the STV signal.

本発明は、このような着想に基づいてなされたもの
で、以下、第1図に示した本発明の原理図を参照して本
発明の採用した解決手段を説明する。
The present invention has been made based on such an idea, and the solution means adopted by the present invention will be described below with reference to the principle diagram of the present invention shown in FIG.

パイプライン処理が開始され、その第1フローの最初
のDステートにおいて命令がSS型式命令であることが検
出されると、STV信号に関係なく第1フローをDステー
トより1ステート以上後で、かつEステートより前のス
テートにインターロックする。
When the pipeline processing is started and it is detected that the instruction is an SS type instruction in the first D state of the first flow, the first flow is made one or more states after the D state regardless of the STV signal, and Interlock to the state before the E state.

命令バッファにSS型式命令の後半が入り、記憶制御ユ
ニットからSTV信号が発せられてくると第2フローが開
始され、そのSTVを1回ラッチした信号で第1フローの
インターロックが解かれる。
When the second half of the SS type instruction enters the instruction buffer and the STV signal is issued from the storage control unit, the second flow is started, and the interlock of the first flow is released by the signal that STV is latched once.

第2フローでは、Dステート以後のステートの処理が
実行され、第1フローのインターロックが解除されると
同時に、第1フローに命令取出し例外が検出されずかつ
第2フローに命令取出し例外が検出された場合に、第1
フローのEステート又はそれより前のステートにバイパ
スさせるようにする。
In the second flow, the processing of the states after the D state is executed, the interlock of the first flow is released, and at the same time, the instruction fetch exception is not detected in the first flow and the instruction fetch exception is detected in the second flow. If the first
Bypass to the E state or earlier states of the flow.

〔作 用〕[Work]

パイプライン処理が開始され、その第1フローの最初
のDステートにおいて命令がSS型式命令であることが検
出されると、STV信号に関係なく第1フローをDステー
トより1ステート以上後で、かつEステートよりも前の
ステートにインターロックする(第1図には、Bステー
トでインターロックする場合が例示されている)。
When the pipeline processing is started and it is detected that the instruction is an SS type instruction in the first D state of the first flow, the first flow is made one or more states after the D state regardless of the STV signal, and Interlock with a state prior to the E state (FIG. 1 exemplifies the case of interlocking with the B state).

命令にバッファにSS型式命令の後半が入り、記憶制御
ユニットからS+V信号が送られてくると第2フローが
開始され、そのSTVを1回ラッチした信号で第1フロー
のインターロックが解除される(第1図では、第2フロ
ーのAステートからTステートに切り換わるタイミング
で、第1フローのインターロックが解除される例が示さ
れている)。
The second flow starts when the latter half of the SS type instruction enters the buffer and the S + V signal is sent from the storage control unit, and the interlock of the first flow is released by the signal that STV is latched once. (FIG. 1 shows an example in which the interlock of the first flow is released at the timing of switching from the A state to the T state of the second flow).

第2フローでは、Dステート以後のステートが実行さ
れ、第1フローのインターロックが解除されると同時
に、第2フローにおいてのみ命令取出し例外が検出され
た場合に、第2フローを第1フローのEステート又はそ
れよりも前のステートにバイパスさせる(第1図では、
第1フローのEステートにバイパスする例が示されてい
る)。
In the second flow, the states after the D state are executed, the interlock of the first flow is released, and at the same time when the instruction fetch exception is detected only in the second flow, the second flow is changed to the first flow. Bypass to state E or earlier (in FIG. 1,
An example of bypassing to the E state of the first flow is shown).

これにより、第2フローの命令取出し例外に対する処
理が他の例外に優先して実行される。
As a result, the processing for the instruction fetch exception in the second flow is executed with priority over other exceptions.

以上のように、STV信号を直接使用することなく、第
1フローのインターロックと命令取出し例外検出時の第
2フローの第1フローのバイパス処理を行うようにした
ので、パイプラインの各ステートの切換えタイミング、
すなわちマシンサイクルをSTV信号の遅延時間と関係な
く選定することが可能となり、これによりマシンサイク
ルを短縮して全体のパイプライン処理を高速化すること
ができる。
As described above, the interlock of the first flow and the bypass process of the first flow of the second flow at the time of detecting an instruction fetch exception are performed without directly using the STV signal. Switching timing,
That is, the machine cycle can be selected regardless of the delay time of the STV signal, which shortens the machine cycle and speeds up the entire pipeline processing.

〔実施例〕〔Example〕

本発明の一実施例を、第1図及び第2図を参照して説
明する。本発明は、第2図に示した実施システムと基本
的に共通の構成の実施システムで実施することができ、
その構成については、既に説明した通りである。ただ
し、具体的な制御動作は、以下に説明するように第5図
の場合とは異なっており、また第1例外レジスタ124〜
第3例外レジスタ126にセットされる内容も異なったス
テートのものである。
An embodiment of the present invention will be described with reference to FIGS. 1 and 2. The present invention can be implemented in an implementation system basically having the same configuration as the implementation system shown in FIG.
The configuration is as described above. However, the specific control operation is different from the case of FIG. 5 as described below, and the first exception register 124-
The contents set in the third exception register 126 are also in different states.

パイプライン制御部122は、第1フローのDステート
において命令バッファ121の内容をデコードし、命令がS
S型式命令でかつ命令6バイト全部が命令バッファ121に
ない場合は、第1フローをDステートより1ステート以
上後で、かつEステートより前のステートにおいてイン
ターロックする。
The pipeline control unit 122 decodes the contents of the instruction buffer 121 in the D state of the first flow, and the instruction S
If the instruction is an S type instruction and not all 6 bytes of the instruction are in the instruction buffer 121, the first flow is interlocked in a state one state or more after the D state and a state before the E state.

この実施例では、Aステートのアドレス計算処理とT
ステートのアドレスのチェック処理は関連性があるの
で、第1図に示すように、TステートからBステートへ
の切換え信号でBステートにインターロックされる。
In this embodiment, the A state address calculation process and the T state
Since the state address check processing is related, as shown in FIG. 1, the state is interlocked with the B state by a switching signal from the T state to the B state.

もし、Bステートにおいて何らかの例外が検出される
と、記憶制御ユニット11は、その例外を第1例外レジス
タ123にその例の内容とともにセットされる。
If any exception is detected in the B state, the storage control unit 11 sets the exception in the first exception register 123 with the contents of the example.

命令バッファ121にSS型式命令の後半が入り記憶制御
ユニットからSTV信号が送られてくると第2フローが開
始される。
When the second half of the SS type instruction enters the instruction buffer 121 and the STV signal is sent from the storage control unit, the second flow is started.

パイプライン制御部122は、記憶制御ユニット11よりS
TV信号を受けると、第2フローのDステートからAステ
ートへの切換えタイミングにおいてSTV信号をラッチす
る。更に、このSSラッチ信号を用いて、第2フローのA
ステートからTステートへの切換えタイミングにおい
て、第1フローのインターロックを解除する。なお、ST
Vラッチ信号は、パイプライン制御部122における各種の
制御に利用される。
The pipeline control unit 122 uses the S
When receiving the TV signal, the STV signal is latched at the timing of switching from the D state to the A state in the second flow. Furthermore, using this SS latch signal,
At the timing of switching from the state to the T state, the interlock of the first flow is released. In addition, ST
The V latch signal is used for various controls in the pipeline control unit 122.

一方、パイプライン制御部122は、STV信号を見ること
なく、第2フローを第1フローのインターロック解除後
のBステートに対応するTステートまで実行する。この
Bステートにおいて命令取出し例外が検出されると、第
2例外レジスタ125にその命令の内容とともにセットさ
れる。
On the other hand, the pipeline control unit 122 executes the second flow up to the T state corresponding to the B state after the interlock release of the first flow without looking at the STV signal. When an instruction fetch exception is detected in the B state, it is set in the second exception register 125 together with the content of the instruction.

第1フローのインターロックが解除された後、第1フ
ローのBステートにおいて命令取出し例外が検出されて
おらず、第2フローのTステートにおいて命令取出し例
外が検出されているときは、第1フローがBステートか
らEステートに切り換わるタイミング、すなわち第2フ
ローがTステートからBステートに切り換わるタイミン
グにおいて、マルチプレクサ125で第2例外レジスタを
セレクタし、その内容を第3例外レジスタ126にセット
する。
After the interlock of the first flow is released, when the instruction fetch exception is not detected in the B state of the first flow and the instruction fetch exception is detected in the T state of the second flow, the first flow At the timing of switching from the B state to the E state, that is, at the timing of switching the second flow from the T state to the B state, the multiplexer 125 selects the second exception register and sets the contents in the third exception register 126.

これにより、第2フローにおいてのみ命令取出し例外
が検出された場合は、第2フローは第1フローのEステ
ートにバイパスされる。もし、第1フローにおいて命令
取出し例外が検出されているときは、第1例外レジスタ
124の内容が第3例外レジスタ126にセットされる。
As a result, when the instruction fetch exception is detected only in the second flow, the second flow is bypassed to the E state of the first flow. If an instruction fetch exception is detected in the first flow, the first exception register
The contents of 124 are set in the third exception register 126.

命令制御部12は、この第3例外レジスタ126にセット
された命令取消し例外に対応した割込み処理を行う。
The instruction control unit 12 performs interrupt processing corresponding to the instruction cancellation exception set in the third exception register 126.

以上のようにして、命令取消し例外が検出された場合
は、それが第1フロー又は第2フローのいずれにおいて
検出されても、常に他の例外に優先して受け付けられて
その割込み処理か行われ、これにより、正しい例外処理
が保障される。
As described above, when the instruction cancellation exception is detected, regardless of whether it is detected in the first flow or the second flow, it is always accepted in preference to other exceptions and the interrupt processing is performed. , This ensures correct exception handling.

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

以上説明したように、本発明は、STV信号を直接使用
することなくパイプライン処理における第1フローのイ
ンターロックと命令取出し例外検出時の第2フローの第
1フローへのバイパス処理を行うようにしたので、パイ
プラインの各ステートの切換えタイミング、すなわちマ
シンサイクルをSTV信号の遅延時間と関係なく選定する
ことが可能となり、これにより、マシンサイクルを短縮
して全体のパイプライン処理を高速化することができ
る。
As described above, according to the present invention, the interlock of the first flow in the pipeline processing and the bypass processing of the second flow to the first flow upon detection of an instruction fetch exception are performed without directly using the STV signal. Therefore, it is possible to select the switching timing of each state of the pipeline, that is, the machine cycle regardless of the delay time of the STV signal, which shortens the machine cycle and speeds up the entire pipeline processing. You can

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

第1図は本発明の原理図、 第2図はパイプライン制御システムの構成の説明図、 第3図はSS型式命令の説明図、 第4図はSS型式命令によるインターロックをかけないと
きのパイプライン処理動作の説明図、 第5図は従来のパイプライン処理動作の説明図である。 第2図において、 10……CPU、11……記憶制御ユニット、12……命令制御
ユニット、13……演算制御ユニット、121……命令バッ
ファ、122……パイプライン制御部。
FIG. 1 is a principle diagram of the present invention, FIG. 2 is an explanatory diagram of a configuration of a pipeline control system, FIG. 3 is an explanatory diagram of an SS type instruction, and FIG. 4 is a case when an interlock by the SS type instruction is not applied. FIG. 5 is an explanatory diagram of the pipeline processing operation, and FIG. 5 is an explanatory diagram of the conventional pipeline processing operation. In FIG. 2, 10 ... CPU, 11 ... storage control unit, 12 ... instruction control unit, 13 ... arithmetic control unit, 121 ... instruction buffer, 122 ... pipeline control unit.

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】複数の命令を保持する命令バッファ(12
1)を有し、該命令バッファ(121)に保持された命令を
mバイト単位でパイプライン処理するに際し、命令長が
mより大きいnバイトの命令である場合は命令をmバイ
トの前半命令と後半命令に分け、前半命令をパイプライ
ンの第1フローで実行し、後半命令を第2フローで実行
し、命令バッファ(121)に前半命令しか保持されない
ときは第1フローを一時インターロックさせ、第2フロ
ーが開始されて命令バッファ(121)の命令が有効であ
ることを指示する命令バッファ有効信号が発行されたと
きに第1フローのインターロックを解除させ、第2フロ
ーにおいて命令取出し例外が検出されたときにのみ、こ
の命令取出し例外を第1フローにバイパスするパイプラ
イン制御方式であって、 (a) 第1フローの最初のデコード・ステートにおい
て命令長nバイトが処理幅mバイトより大きい命令であ
ることが検出されると、命令バッファ有効信号に関係な
く第1フローをデコードステートより1ステート以上後
で、かつ演算実行ステートより前のステートにインター
ロックし、 (b) 第2フローはデコード・ステート以後のステー
トの処理が実行され、第1フローインターロックが解除
された後、第2フローにおいてのみ命令取出し例外が検
出された場合に、第2フローを第1フローの演算実行ス
テート又はそれより前のステートにバイパスさせる、 ことを特徴とするパイプライン制御方式。
1. An instruction buffer (12) for holding a plurality of instructions.
1) and pipeline processing the instruction held in the instruction buffer (121) in units of m bytes, if the instruction length is n bytes larger than m, the instruction is regarded as the first half instruction of m bytes. Divide into the latter half instruction, execute the first half instruction in the first flow of the pipeline, execute the latter half instruction in the second flow, and temporarily interlock the first flow when only the first half instruction is held in the instruction buffer (121), When the second flow is started and an instruction buffer valid signal indicating that the instruction in the instruction buffer (121) is valid is issued, the interlock of the first flow is released, and an instruction fetch exception occurs in the second flow. A pipeline control method for bypassing this instruction fetch exception to the first flow only when detected: (a) in the first decode state of the first flow; When it is detected that the instruction length n bytes is an instruction larger than the processing width m bytes, the first flow is moved to the state one state or more after the decode state and the state before the operation execution state regardless of the instruction buffer valid signal. (B) In the second flow, after the processing of the states after the decode state is executed, and the instruction fetch exception is detected only in the second flow after the first flow interlock is released, A pipeline control method, characterized in that the two flows are bypassed to the operation execution state of the first flow or a state prior thereto.
【請求項2】第1フローが演算実行ステートの前のバッ
ファリード・ステートでインターロックされ、命令取り
出し例外が検出された第2フローが、第1フローの実行
ステートにバイパスされることを特徴とする特許請求の
範囲第1項記載のパイプライン制御方式。
2. The second flow in which the first flow is interlocked in the buffer read state before the operation execution state and the instruction fetch exception is detected is bypassed to the execution state of the first flow. The pipeline control system according to claim 1.
JP62224183A 1987-09-09 1987-09-09 Pipeline control method Expired - Fee Related JP2511063B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62224183A JP2511063B2 (en) 1987-09-09 1987-09-09 Pipeline control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62224183A JP2511063B2 (en) 1987-09-09 1987-09-09 Pipeline control method

Publications (2)

Publication Number Publication Date
JPS6467627A JPS6467627A (en) 1989-03-14
JP2511063B2 true JP2511063B2 (en) 1996-06-26

Family

ID=16809825

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62224183A Expired - Fee Related JP2511063B2 (en) 1987-09-09 1987-09-09 Pipeline control method

Country Status (1)

Country Link
JP (1) JP2511063B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0475325U (en) * 1990-11-09 1992-07-01

Also Published As

Publication number Publication date
JPS6467627A (en) 1989-03-14

Similar Documents

Publication Publication Date Title
US6233670B1 (en) Superscalar processor with direct result bypass between execution units having comparators in execution units for comparing operand and result addresses and activating result bypassing
EP0437044B1 (en) Data processing system with instruction tag apparatus
JP3556246B2 (en) Apparatus for interrupt handling in a pipeline processor
US4992932A (en) Data processing device with data buffer control
EP0378415A2 (en) Multiple instruction dispatch mechanism
JP2682232B2 (en) Floating point processor
JPH0527971A (en) Information processor
US5615375A (en) Interrupt control circuit
US5867696A (en) Saving a program counter value as the return address in an arbitrary general purpose register
JPH0410102B2 (en)
JP2690406B2 (en) Processor and data processing system
JP2511063B2 (en) Pipeline control method
EP0334131B1 (en) Data processor performing operation on data having length shorter than one-word length
EP0898226B1 (en) Data processor with register file and additional substitute result register
EP0416345B1 (en) Instruction decoder for a pipeline processor
JPS6236575B2 (en)
JPS6232508B2 (en)
JPH0373010B2 (en)
US4467410A (en) Multi-phase subroutine control circuitry
US4649472A (en) Multi-phase subroutine control circuitry
JP3476314B2 (en) Microprocessor
JPH05307483A (en) Method and circuit for controlling write-in to register
JP2924004B2 (en) Instruction code transfer method
JPH02301830A (en) Information processing system
JPH0740226B2 (en) Branch instruction control method

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees