JPH0769820B2 - Data processing device - Google Patents

Data processing device

Info

Publication number
JPH0769820B2
JPH0769820B2 JP1072623A JP7262389A JPH0769820B2 JP H0769820 B2 JPH0769820 B2 JP H0769820B2 JP 1072623 A JP1072623 A JP 1072623A JP 7262389 A JP7262389 A JP 7262389A JP H0769820 B2 JPH0769820 B2 JP H0769820B2
Authority
JP
Japan
Prior art keywords
stage
instruction
information holding
flag information
pipeline
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
JP1072623A
Other languages
Japanese (ja)
Other versions
JPH02138625A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP1072623A priority Critical patent/JPH0769820B2/en
Priority to US07/497,375 priority patent/US5239633A/en
Publication of JPH02138625A publication Critical patent/JPH02138625A/en
Publication of JPH0769820B2 publication Critical patent/JPH0769820B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、パイプライン処理を行うデータ処理装置に
係り、特にメモリ間接アドレッシング,レジスタ間接ア
ドレッシングをアドレス計算ステージで行うデータ処理
装置に関するものである。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing device for performing pipeline processing, and more particularly to a data processing device for performing memory indirect addressing and register indirect addressing at an address calculation stage. .

〔従来の技術〕[Conventional technology]

データ処理装置の処理速度を上げるための方法として、
パイプライン処理方式がある。
As a method to increase the processing speed of the data processing device,
There is a pipeline processing method.

パイプライン処理方式は、命令処理を分割しデータ処理
装置中で複数の命令を同時に実行することでスループッ
トを上げ1命令の見かけ上の実行速度を上げるものであ
る。例えば、1命令が命令デコード,オペランドアドレ
ス計算,オペランドフェッチ,演算実行の4ステージの
パイプラインで実行されるように構成したデータ処理装
置では、最大4つの命令がそれぞれの処理ステージで同
時に実行される。それに対し、1命令ずつ処理を行うデ
ータ処理装置では、命令デコード,オペランドアドレス
計算,オペランドフェッチ,演算実行のすべての処理を
終えねば次の命令処理に進めない。そのためこの場合、
パイプライン処理を行うデータ処理装置は見かけ上4倍
の命令処理速度を持つことができる。
The pipeline processing method divides the instruction processing and executes a plurality of instructions simultaneously in the data processing device to increase the throughput and the apparent execution speed of one instruction. For example, in a data processing device configured such that one instruction is executed in a four-stage pipeline of instruction decoding, operand address calculation, operand fetch, and operation execution, a maximum of four instructions are simultaneously executed in each processing stage. . On the other hand, in a data processing device which processes one instruction at a time, it is not possible to proceed to the next instruction processing until all the processing of instruction decoding, operand address calculation, operand fetch, and operation execution are completed. So in this case,
A data processing device that performs pipeline processing can apparently have an instruction processing speed four times as high.

データ処理装置の処理速度を上げるためには、パイプラ
イン処理効率を高めることが必要である。パイプライン
処理の効率を高めるには、パイプラインの各ステージ負
荷が均等であることと、各ステージが同数のクロックサ
イクルでデータを処理し、次々とパイプライン処理が進
行することが必要である。
In order to increase the processing speed of the data processing device, it is necessary to improve the pipeline processing efficiency. In order to increase the efficiency of pipeline processing, it is necessary that the load on each stage of the pipeline is equal, that each stage process data in the same number of clock cycles, and the pipeline processing progresses one after another.

パイプライン中の連続したデータ処理の進行を乱す要因
には、ジャンプ命令,例外,割込み,パイプライン中の
命令どうしのコンフリクト等がある。ここで、パイプラ
イン中のコンフリクトの主なものの1つは、演算実行ス
テージが書込む汎用レジスタあるいはメモリをオペラン
ドアドレス計算ステージがその書込み前に参照すること
である。
Factors that disturb the progress of continuous data processing in the pipeline include jump instructions, exceptions, interrupts, and conflicts between instructions in the pipeline. Here, one of the main conflicts in the pipeline is that the operand address calculation stage refers to a general-purpose register or memory written by the operation execution stage before the writing.

プログラム通りに命令が正しく実行されるためには、演
算実行ステージが汎用レジスタあるいはメモリ書込みを
終えた後で、オペランドアドレス計算ステージがその汎
用レジスタあるいはメモリを参照しなければならない。
In order for the instruction to be executed correctly as programmed, the operand address calculation stage must refer to the general-purpose register or memory after the operation execution stage has finished writing to the general-purpose register or memory.

第4図は従来のパイプライン制御機構を説明する回路ブ
ロック図であり、41は命令デコーダで、命令を解読し
て、レジスタ書込み予約信号をレジスタ書込み処理用の
SRフリップフロップ42のセット入力に出力し、メモリ書
込み予約信号をメモリ書込み処理用のSRフリップフロッ
プ43のセット入力に出力する。SRフリップフロップ42,
メモリ書込み処理用のSRフリップフロップ43はそれぞれ
演算処理部44からのリセット信号によりリセットされ
る。
FIG. 4 is a circuit block diagram for explaining a conventional pipeline control mechanism. Reference numeral 41 is an instruction decoder which decodes an instruction and outputs a register write reservation signal for register write processing.
It outputs to the set input of the SR flip-flop 42, and outputs the memory write reservation signal to the set input of the SR flip-flop 43 for memory write processing. SR flip-flop 42,
The SR flip-flops 43 for the memory writing process are reset by the reset signal from the arithmetic processing unit 44.

第5図はパイプライン処理推移を説明する状態図であ
り、51は命令デコードステージを示し、52はアドレス計
算ステージを示し、53はオペランドフェッチステージを
示し、54は演算実行ステージを示し、T1〜T8は処理サイ
クルを示し、I1〜I3はパイプラインを流れる命令を示
す。
FIG. 5 is a state diagram for explaining the transition of pipeline processing. 51 is an instruction decode stage, 52 is an address calculation stage, 53 is an operand fetch stage, 54 is an operation execution stage, and T1 ... T8 indicates a processing cycle, and I1 to I3 indicate instructions flowing in the pipeline.

次に第4図を参照しながら従来のレジスタあるいはメモ
リへの書込みに伴うパイプライン制御方式を説明する。
Next, referring to FIG. 4, a conventional pipeline control method associated with writing to a register or memory will be described.

命令デコーダ41は入力された命令が演算処理部44におい
てレジスタあるいはメモリにデータを書き込むかどうか
を調べる。次いで、メモリに書き込む場合には、メモリ
書込み予約信号をSRフリップフロップ43に送出し「1」
にセットする。SRフリップフロップ43の値は、「1」を
セットした命令が演算処理部44において、処理を終了し
たときに、「0」にリセットされ、その後再び命令処理
が開始される。
The instruction decoder 41 checks whether the input instruction writes data in a register or a memory in the arithmetic processing unit 44. Then, when writing to the memory, the memory write reservation signal is sent to the SR flip-flop 43 and set to "1".
Set to. The value of the SR flip-flop 43 is reset to "0" when the processing unit 44 finishes processing the instruction in which "1" is set, and then the instruction processing is started again.

メモリ書き込みと同様に、レジスタ書き込みもレジスタ
書込み予約信号がSRフリップフロップ42をセットし、演
算処理部44で処理が終了した時リセットされる。このよ
うな、パイプライン制御によるステージ遅延を第5図を
参照しなが説明する。
Similar to memory writing, register writing is also reset when the register write reservation signal sets the SR flip-flop 42 and the arithmetic processing unit 44 completes the processing. The stage delay due to the pipeline control will be described with reference to FIG.

例えば命令I1がメモリ書き込み予約をすると、命令I2は
処理サイクルT3で処理が停止し、処理サイクルT4で命令
I1がメモリにデータを書き込むまでデコード処理を実行
できない。処理サイクルT4で停止信号がリセットされ、
処理サイクルT5で命令I2は再び処理を開始する。結果と
して、命令I2には2サイクルの遅延が生じる。レジスタ
書き込み予約の場合も同様の遅延が生ずる。
For example, if the instruction I1 makes a memory write reservation, the instruction I2 stops processing in the processing cycle T3, and the instruction I2 stops processing in the processing cycle T4.
Decoding cannot be executed until I1 writes data to memory. The stop signal is reset in processing cycle T4,
In the processing cycle T5, the instruction I2 starts processing again. As a result, instruction I2 is delayed by two cycles. The same delay occurs in the case of register write reservation.

このため、上記のようなレジスタコンフリクトに伴うこ
の問題点を、例えば特願昭62-144394号等に示されるよ
うに改善する提案が既になされている。
Therefore, a proposal has already been made to improve this problem associated with the register conflict as described above, for example, as shown in Japanese Patent Application No. 62-144394.

〔発明が解決しようとする課題〕[Problems to be Solved by the Invention]

ところが、従来の方法では、前の命令がメモリに値を書
き込む場合、その後ろの命令が前の命令のメモリ書き込
みを終了するまで、オペランドアドレス計算処理を停止
し、パイプラインの処理速度の著しい低下を招くという
問題点があった。
However, in the conventional method, when the previous instruction writes the value to the memory, the operand address calculation processing is stopped until the instruction after the previous instruction finishes the memory writing of the previous instruction, and the pipeline processing speed is significantly reduced. There was a problem of inviting.

この発明は、上記の問題点を解決するためになされたも
ので、命令のメモリ書き込み状態を調べてメモリ書込み
予約情報を各ステージに順次転送することにより、先行
命令のメモリ書き込みに伴う後続命令のオペランドアド
レス計算処理に起因する処理停止頻度を大幅に減少させ
て、効率よくパイプライン処理を実行できるデータ処理
装置を得ることを目的とする。
The present invention has been made to solve the above problems, and by checking the memory write state of an instruction and sequentially transferring the memory write reservation information to each stage, the subsequent instruction accompanying the memory write of the preceding instruction An object of the present invention is to obtain a data processing device capable of efficiently executing pipeline processing by greatly reducing the frequency of processing suspension caused by operand address calculation processing.

〔課題を解決するための手段〕[Means for Solving the Problems]

この発明に係るデータ処理装置は、オペランドのアドレ
ス計算を行う第1のパイプラインステージと演算結果の
オペランドの書き込みを行う第2のパイプラインステー
ジとを含むパイプライン処理機構と、メモリ空間への演
算結果のオペランド書き込みを行う第1の命令に関する
処理を第1のパイプラインステージで実行する際に、メ
モリ空間にオペランドを書き込む旨を予約するオペラン
ド書込み予約手段と、このオペランド書込み予約手段の
出力を保持する1つまたは複数の予約ラッチ手段と、第
1の命令に関する処理を第2のパイプラインステージで
処理する際に、1つまたは複数の予約ラッチ手段の内容
をクリアする予約ラッチクリア手段と、第1のパイプラ
インステージでオペランドのアドレス計算のためにメモ
リ空間をアクセスする第2の命令に関する処理を実行す
る際に、予約ラッチの内容に基づいて第1のパイプライ
ンステージでのオペランドのアドレス計算を抑止するオ
ペランドアドレス計算抑止手段とから構成したものであ
る。
A data processing apparatus according to the present invention includes a pipeline processing mechanism including a first pipeline stage for calculating an address of an operand and a second pipeline stage for writing an operand of an operation result, and an operation to a memory space. An operand write reservation unit that reserves the writing of an operand in the memory space and an output of the operand write reservation unit are held when the process related to the first instruction that writes the resulting operand is executed in the first pipeline stage. One or a plurality of reservation latch means, a reservation latch clear means for clearing the contents of the one or a plurality of reservation latch means when processing the first instruction in the second pipeline stage; Access memory space for operand address calculation in 1 pipeline stage That when executing the processing for the second instruction, which is constituted from an operand address calculation inhibition means for inhibiting the address calculation of an operand in the first pipeline stage based on the contents of the reservation latch.

また、入力データ信号と入力イネーブル信号とクリア信
号と出力信号をもつ1ビットのレジスタ回路である第1
のフラグ情報保持部と、入力データ信号と入力イネーブ
ル信号とクリア信号と出力信号を持つ1ビットのレジス
タ回路である第2のフラグ情報保持部と、第3のパイプ
ラインステージと第4のパイプラインステージに対応し
て第1のフラグ情報保持部と第2のフラグ情報保持部を
直列接続したフラグ情報保持手段と、第1のフラグ情報
保持部および第2のフラグ情報保持部の各出力の論理和
をとりながらフラグ情報保持手段におけるフラグ情報保
持状態を検出するフラグ情報保持状態検出手段と、第3
のパイプラインステージで第1の命令を処理するとき第
1のフラグ情報保持部をセットし、第1の命令の処理が
第3のパイプラインステージでの処理から第4のパイプ
ラインステージでの処理に移るとき、第1のフラグ情報
保持部の内容を上記第2のフラグ情報保持部に転送し、
かつ上記第1のフラグ情報保持部をクリアすることによ
り、フラグ情報保持手段内で順次情報を移動し、フラグ
情報保持状態検出手段の出力に従い、オペランドのアド
レス計算のためにメモリ空間をアクセスする第2の命令
に関する処理を制御するパイプライン制御手段とを設け
たものである。
In addition, a 1-bit register circuit having an input data signal, an input enable signal, a clear signal, and an output signal
Flag information holding unit, a second flag information holding unit which is a 1-bit register circuit having an input data signal, an input enable signal, a clear signal, and an output signal, a third pipeline stage, and a fourth pipeline. A flag information holding unit in which a first flag information holding unit and a second flag information holding unit are connected in series corresponding to a stage, and logic of each output of the first flag information holding unit and the second flag information holding unit. Flag information holding state detecting means for detecting the flag information holding state in the flag information holding means while taking a sum;
The first flag information holding unit is set when the first instruction is processed in the pipeline stage, and the processing of the first instruction is performed from the processing in the third pipeline stage to the processing in the fourth pipeline stage. When moving to, the contents of the first flag information holding unit is transferred to the second flag information holding unit,
Further, by clearing the first flag information holding unit, the information is sequentially moved in the flag information holding unit, and the memory space is accessed for operand address calculation according to the output of the flag information holding state detecting unit. Pipeline control means for controlling the processing relating to the second instruction.

〔作用〕[Action]

この発明においては、メモリ空間に演算結果のオペラン
ド書き込みを行う第1の命令、例えばメモリ書込み命令
に関する処理を第1のパイプラインステージで行うと
き、メモリ空間にオペランドを書き込むことをオペラン
ド書込み予約手段に予約し、第1の命令に関する処理を
第2のパイプラインステージで行うとき、予約ラッチク
リア手段により予約ラッチ手段の内容をクリアし、オペ
ランドのアドレス計算のためにメモリ空間をアクセスす
る第2の命令、例えばアドレス計算でメモリアクセスす
る命令に関する処理を第1のパイプラインステージで行
うとき、オペランドアドレス計算抑止機構により、オペ
ランドのアドレス計算を遅延して実行する。
According to the present invention, when the first instruction for writing the operand of the operation result to the memory space, for example, the processing related to the memory write instruction is performed in the first pipeline stage, the operand write reservation means is to write the operand in the memory space. A second instruction that reserves and when the processing related to the first instruction is performed in the second pipeline stage, the content of the reserved latch means is cleared by the reserved latch clear means, and the memory space is accessed for operand address calculation. For example, when processing relating to an instruction for memory access by address calculation is performed in the first pipeline stage, the operand address calculation suppression mechanism delays and executes the address calculation of the operand.

また、パイプライン制御手段が第3のパイプラインステ
ージで第1の命令、例えばメモリ書込みを行う命令とそ
の他の命令を処理するとき第1のフラグ情報保持部をセ
ットし、第1の命令の処理が第3のパイプラインステー
ジでの処理から第4のパイプラインステージでの処理に
移るとき、第1のフラグ情報保持部の内容を第2のフラ
グ情報保持部に転送し、かつ第1のフラグ情報保持部を
クリアすることにより、フラグ情報保持手段内で順次情
報を移動させる。また、パイプライン制御手段は、フラ
グ情報保持状態検出手段の出力に従い第2の命令、例え
ばアドレス計算でメモリアクセスする命令に関する処理
実行を制御する。
Further, the pipeline control means sets the first flag information holding unit when processing the first instruction in the third pipeline stage, for example, an instruction for writing a memory and another instruction, and processes the first instruction. Transfers from the processing in the third pipeline stage to the processing in the fourth pipeline stage, the contents of the first flag information holding unit are transferred to the second flag information holding unit, and the first flag By clearing the information holding unit, the information is sequentially moved in the flag information holding unit. Further, the pipeline control means controls the processing execution relating to the second instruction, for example, the instruction for memory access by address calculation, according to the output of the flag information holding state detection means.

〔実施例〕〔Example〕

第1図はこの発明の一実施例を示すデータ処理装置の構
成を説明するブロック図であり、例えば5段のパイプラ
イン構成となっている場合を示してある。
FIG. 1 is a block diagram for explaining the configuration of a data processing device showing an embodiment of the present invention, and shows a case of a five-stage pipeline configuration, for example.

この図において、1は命令フェッチステージ(IFステー
ジ)で、命令のプリフェッチ処理を行う。2はデコード
ステージ(Dステージ)で、命令のデコードを行う。3
は第1のパイプラインステージとなるオペランドアドレ
ス計算ステージ(Aステージ)で、オペランドのアドレ
ス計算を行う。4は第3のパイプラインステージとなる
オペランドフェッチステージ(Fステージ)で、マイク
ロROMアクセスとオペランドのフェッチを行う。5は第
2または第4のパイプラインステージとなる実行ステー
ジ(Eステージ)で、命令の実行を行う。
In this figure, reference numeral 1 denotes an instruction fetch stage (IF stage) which performs instruction prefetch processing. A decode stage (D stage) 2 decodes an instruction. Three
In the operand address calculation stage (A stage), which is the first pipeline stage, performs operand address calculation. An operand fetch stage (F stage) 4 is a third pipeline stage, which performs micro ROM access and operand fetch. An execution stage (E stage) 5 is the second or fourth pipeline stage, which executes instructions.

IFステージ1はDステージ2に命令コードを渡し、Dス
テージ2からAステージ3には演算に関する情報とオペ
ランドのアドレス計算に関する情報が渡され、Aステー
ジ3からFステージ4にはマイクロプログラムルーチン
のエントリ番地,マイクロプログラムへのパラメータ情
報とオペランドのアドレス,アクセス方法に関する情報
が渡され、Fステージ4からEステージ5には演算制御
情報とオペランドやオペランドアドレスに関する情報が
渡される。
The IF stage 1 passes the instruction code to the D stage 2, the D stage 2 to the A stage 3 receives information about the operation and the address calculation of the operand, and the A stage 3 to the F stage 4 enters the microprogram routine. Addresses, parameter information to the microprogram, operand addresses, and access method information are passed, and operation control information and operand and operand address information are passed from the F stage 4 to the E stage 5.

6は命令デコーダで、IFステージ1から出力される命令
を演算に関する情報とオペランドアドレス計算に関する
情報にデコードする。7は命令デコーダ、8はデコーダ
で、命令デコーダ7は演算に関する情報をさらにデコー
ドして、Eステージ5でレジスタあるいはメモリ書込み
を行うかどうかを判断してデコード結果をレジスタ書込
み予約回路9あるいはメモリ書込み予約回路10に予約す
る。デコーダ8はオペランドに関する情報をさらにデコ
ードして、そのデコード結果をレジスタ書込み予約回路
9に出力する。
An instruction decoder 6 decodes the instruction output from the IF stage 1 into information related to operation and information related to operand address calculation. Reference numeral 7 is an instruction decoder, and 8 is a decoder. The instruction decoder 7 further decodes the information related to the operation, judges whether or not to write the register or the memory in the E stage 5, and judges the decoding result by the register writing reservation circuit 9 or the memory writing. Make a reservation in the reservation circuit 10. The decoder 8 further decodes the information on the operand and outputs the decoding result to the register write reservation circuit 9.

11はレジスタ書込み予約フラグ回路(Fステージ4に設
ける)で、レジスタ書込み予約回路9に予約され、パイ
プライン制御回路15から出力される制御信号(詳細は後
述する)に基づいてレジスタ書込み予約回路9から転送
されるレジスタ書込み予約情報を保持する。
Reference numeral 11 is a register write reservation flag circuit (provided in the F stage 4), which is reserved in the register write reservation circuit 9 and is based on a control signal output from the pipeline control circuit 15 (details will be described later). Holds register write reservation information transferred from.

12はメモリ書込み予約フラグ回路(Fステージ4に設け
る)で、メモリ書込み予約回路10に予約され、パイプラ
イン制御回路15から出力される制御信号(詳細は後述す
る)に基づいてメモリ書込み予約回路10から転送される
メモリ書込み予約情報を保持する。
Reference numeral 12 is a memory write reservation flag circuit (provided in the F stage 4), which is reserved in the memory write reservation circuit 10 and is based on a control signal (details will be described later) output from the pipeline control circuit 15. Holds memory write reservation information transferred from.

13はレジスタ書込み予約フラグ回路(Eステージ5に設
ける)で、レジスタ書込み予約フラグ回路11に保持さ
れ、パイプライン制御回路15から出力される制御信号
(詳細は後述する)に基づいてレジスタ書込み予約フラ
グ回路11から転送されるレジスタ書込み予約情報を保持
する。
Reference numeral 13 is a register write reservation flag circuit (provided in the E stage 5), which is held in the register write reservation flag circuit 11 and is based on a control signal (details will be described later) output from the pipeline control circuit 15 It holds the register write reservation information transferred from the circuit 11.

14はメモリ書込み予約フラグ回路(Eステージ5に設け
る)で、メモリ書込み予約フラグ回路12に保持され、パ
イプライン制御回路15から出力される制御信号(詳細は
後述する)に基づいてメモリ書込み予約フラグ回路12か
ら転送されるレジスタ書込み予約情報を保持する。
Reference numeral 14 is a memory write reservation flag circuit (provided in the E stage 5), which is held in the memory write reservation flag circuit 12 and which is based on a control signal (details will be described later) output from the pipeline control circuit 15 It holds the register write reservation information transferred from the circuit 12.

なお、メモリ空間に演算結果のオペランド書き込みを行
う第1の命令に関する処理を第1のパイプラインステー
ジ(Aステージ3)で行うとき、メモリ空間にオペラン
ドを書き込むことをオペランド書込み予約手段(メモリ
書込み予約回路10)に予約し、第1の命令に関する処理
を第2のパイプラインステージ(Eステージ5)で完了
のとき、予約ラッチクリア手段(パイプライン制御回路
15が兼ねる)により予約ラッチ手段(メモリ書込み予約
フラグ回路14)の内容をクリアし、オペランドのアドレ
ス計算のためにメモリ空間をアクセスする第2の命令に
関する処理を第1のパイプラインステージで行うとき、
オペランドアドレス計算抑止機構(パイプライン制御回
路15が兼ねる)により、オペランドのアドレス計算を遅
延して実行する。
It should be noted that, when performing the processing related to the first instruction for writing the operand of the operation result in the memory space in the first pipeline stage (A stage 3), writing the operand in the memory space is performed by the operand write reservation means (memory write reservation). Circuit 10) and when the processing related to the first instruction is completed in the second pipeline stage (E stage 5), the reservation latch clear means (pipeline control circuit)
(15 also serves as) to clear the contents of the reservation latch means (memory write reservation flag circuit 14) and perform the processing related to the second instruction for accessing the memory space for the operand address calculation in the first pipeline stage. ,
The operand address calculation suppression mechanism (also used by the pipeline control circuit 15) delays and executes the operand address calculation.

以下、パイプライン中の命令どうしのコンフリクトに伴
うパイプライン制御動作について説明する。
The pipeline control operation associated with a conflict between instructions in the pipeline will be described below.

データ処理装置中で処理される命令は、IFステージ1よ
りDステージ2に渡され、命令デコーダ6でデコードさ
れ演算に関する情報とオペランドアドレス計算に関する
情報がAステージ3に渡される。Aステージ3ではオペ
ランドアドレス計算に関する情報によりオペランドアド
レス計算をするとともに、演算に関する情報を命令デコ
ーダ7でさらにデコードしEステージ5でレジスタある
いはメモリに書込みするかどうかを判断する。書込みに
関するデコード結果は、レジスタ書込み予約回路9,メモ
リ書込み予約回路10にセットされる。レジスタ書込み予
約回路9は、レジスタの数だけ予約回路を持ち、命令デ
コーダ7の出力とレジスタ指定のためのデコーダ8の出
力により予約される。メモリ書込み予約フラグはアドレ
スに関係なく1つだけであり命令デコーダ7の出力によ
り予約される。
The instruction processed in the data processor is passed from the IF stage 1 to the D stage 2, decoded by the instruction decoder 6 and the information about the operation and the information about the operand address calculation are passed to the A stage 3. In the A stage 3, the operand address is calculated based on the information related to the operand address calculation, and the information related to the operation is further decoded by the instruction decoder 7 and it is determined in the E stage 5 whether to write it in the register or the memory. The decoding result related to the writing is set in the register writing reservation circuit 9 and the memory writing reservation circuit 10. The register write reservation circuit 9 has as many reservation circuits as the number of registers and is reserved by the output of the instruction decoder 7 and the output of the decoder 8 for register designation. The memory write reservation flag is only one regardless of the address and is reserved by the output of the instruction decoder 7.

1命令が複数のオペランドを有する場合、1命令は複数
の処理単位に分けてデコードされ、書込み予約情報は繰
り返し行われる書込み予約により蓄積される。
When one instruction has a plurality of operands, one instruction is divided into a plurality of processing units and decoded, and the write reservation information is accumulated by repeated write reservations.

このような、1命令が複数の処理単位に分けて処理され
ることは、特願昭61-236456号等に詳しく述べられてあ
る。
It is described in detail in Japanese Patent Application No. 61-236456 that such one instruction is divided into a plurality of processing units and processed.

1命令のAステージ処理が終了すると、書込み予約情報
はFステージ4に転送され、レジスタ書込み予約フラグ
回路11あるいはメモリ書込み予約フラグ回路12に保持さ
れる。命令のFステージ処理終了とともにEステージ5
への書込み予約情報の転送が行われる。書込み予約情報
は、書込み予約した命令が処理されているステージのフ
ラグ回路が保持しており、書込み予約情報を転送したフ
ラグ回路は保持していた書込み予約情報をクリアする。
Eステージ5で書込み予約した命令の処理が終了した時
点で、レジスタ書込み予約フラグ回路13あるいはメモリ
書込み予約フラグ回路14がクリアされる。オペランドア
ドレス計算でメモリ間接アドレッシングのためにメモリ
を参照する命令は、Aステージ3でメモリ書込み予約フ
ラグ回路12,14の少なくとも1つがセットされていれば
処理を停止し、メモリ書込み予約フラグ回路12,14がす
べてリセットされるまで待つ。
When the A stage processing of one instruction is completed, the write reservation information is transferred to the F stage 4 and held in the register write reservation flag circuit 11 or the memory write reservation flag circuit 12. E stage 5 upon completion of F stage processing of instruction
The write reservation information is transferred to. The write reservation information is held by the flag circuit of the stage where the write-reserved instruction is processed, and the flag circuit that has transferred the write reservation information clears the held write reservation information.
When the processing of the instruction reserved for writing in the E stage 5 is completed, the register write reservation flag circuit 13 or the memory write reservation flag circuit 14 is cleared. The instruction that refers to the memory for the memory indirect addressing in the operand address calculation stops the processing if at least one of the memory write reservation flag circuits 12 and 14 is set in the A stage 3, and the memory write reservation flag circuit 12 and 14 Wait until all 14 are reset.

同様に、Aステージ3でオペランドのアドレス計算でレ
ジスタ参照する命令は、参照するレジスタに対応するレ
ジスタ書込み予約フラグ回路11,13が1つでもセットさ
れていれば処理を停止し、そのレジスタ書込み予約フラ
グ回路11,13がすべてリセットされるのを待つ。
Similarly, an instruction that refers to a register in operand address calculation in the A stage 3 stops the processing if at least one of the register write reservation flag circuits 11 and 13 corresponding to the referred register is set, and the register write reservation is performed. Wait for the flag circuits 11 and 13 to be reset.

この制御方式では、Aステージ3で書込み予約を行うの
で、オペランドアドレス計算に使用するレジスタやメモ
リのオペランド書込み予約が先に行われ、自分自身でコ
ンフリクトを起こすことはない。これらの書込み予約情
報の転送は、すべて総括的にパイプライン制御回路15
(詳細は後述する)が制御する。
In this control method, since the write reservation is made in the A stage 3, the operand write reservation of the register and the memory used for the operand address calculation is made first and the conflict does not occur by itself. All of the transfer of the write reservation information is generally performed by the pipeline control circuit 15
(Details will be described later).

次に第2図および第3図を参照しながら第1図に示した
データ処理装置における書込み予約情報転送処理につい
てさらに説明する。
Next, the write reservation information transfer process in the data processing device shown in FIG. 1 will be further described with reference to FIGS. 2 and 3.

第2図は、第1図に示した書込み予約情報転送回路の一
例を説明する構成図であり、21はメモリ書込み予約ラッ
チで、アンドゲート21a,21b,ノアゲート21c,インバータ
21d等から構成され、アンドゲート21aには非重複2相ク
ロックφ2および命令デコーダ7からのメモリ書込み予
約信号22が入力され、Fステージ4のRレジスタ23に出
力される。Rレジスタ23はマスタスレーブ構成となって
おり、トランスミッションゲート23a,23b,インバータ23
c,ノアゲート23d等よりなり、後段のEステージ5のEI
レジスタ24に書込み予約情報を転送する。25はEレジス
タで、EIレジスタ24を介して書込み予約情報を受け取
る。26はオアゲートで、Rレジスタ23のスレーブおよび
マスタ側のノアゲート23dの出力,EIレジスタ24の出力,E
レジスタ25の出力等のオア(論理和)をとり(メモリ書
込み予約フラグの設定状態を検出する処理)Aステージ
3のアンドゲート27に書込み予約信号を出力する。な
お、アンドゲート27の一方には、メモリ間接参照信号28
が入力され、上記書込み予約信号とのアンド出力がメモ
リコンフリクト信号29として出力され、このメモリコン
フリクト信号29が「1」の間は、Aステージ3における
オペランドアドレス計算が停止する。このように、各ス
テージに1ビットの書込み予約情報転送ラインを設け、
命令デコーダ7,デコーダ8より出力されるメモリまたは
レジスタの書込み予約情報を順次後段のステージに遷移
転送し、Eステージ5に書込み予約情報を通知する。そ
して、各ステージに対する書込み予約情報状態をオア論
理で検出させ、命令に対する書込み予約情報がいずれか
のステージに対して転送中および転送後、Eステージ5
によるメモリまたはレジスタ書込みが完了するまで、A
ステージ3におけるオペランドアドレス計算開始を遅延
制御させる。
FIG. 2 is a configuration diagram for explaining an example of the write reservation information transfer circuit shown in FIG. 1. Reference numeral 21 is a memory write reservation latch, which is AND gates 21a, 21b, NOR gate 21c, and inverter.
The AND gate 21a is supplied with the non-overlapping two-phase clock φ2 and the memory write reservation signal 22 from the instruction decoder 7 and is output to the R register 23 of the F stage 4. The R register 23 has a master-slave configuration and includes transmission gates 23a and 23b and an inverter 23.
c, NOR gate 23d, etc.
The write reservation information is transferred to the register 24. Reference numeral 25 is an E register, which receives write reservation information via the EI register 24. 26 is an OR gate, which is the output of the NOR gate 23d on the slave and master sides of the R register 23, the output of the EI register 24, and E
The OR (logical sum) of the outputs of the register 25 is taken (processing for detecting the setting state of the memory write reservation flag), and the write reservation signal is output to the AND gate 27 of the A stage 3. One of the AND gates 27 has a memory indirect reference signal 28
Is input and the AND output with the write reservation signal is output as the memory conflict signal 29. While the memory conflict signal 29 is "1", the operand address calculation in the A stage 3 is stopped. In this way, a 1-bit write reservation information transfer line is provided in each stage,
The memory or register write reservation information output from the instruction decoder 7 and the decoder 8 is sequentially transferred to the subsequent stage, and the E stage 5 is notified of the write reservation information. Then, the state of the write reservation information for each stage is detected by the OR logic, and the E stage 5 is set after the write reservation information for the instruction is being transferred to any stage.
Until the memory or register write by is completed.
Delay the start of operand address calculation in stage 3.

なお、Aステージ3のメモリ書込み予約ラッチ21はパイ
プライン制御回路15から出力されるAステージ終了信号
30によりリセットされるとともに、Rレジスタ書込み信
号31によりラッチされた書込み予約信号がFステージ4
に転送される。
The memory write reservation latch 21 of the A stage 3 is an A stage end signal output from the pipeline control circuit 15.
The write reservation signal latched by the R register write signal 31 while being reset by the F register 4 is reset by the F stage 4
Transferred to.

また、Fステージ4のRレジスタ23は、マスタ側に転送
された書込み予約信号をパイプライン制御回路15から出
力されるRレジスタ読出し信号36によりスレーブ側に書
込み予約信号を転送し、Rレジスタクリア信号32により
クリアされる。
Further, the R register 23 of the F stage 4 transfers the write reservation signal transferred to the master side to the slave side by the R register read signal 36 output from the pipeline control circuit 15, and the R register clear signal. Cleared by 32.

さらに、Eステージ5のEIレジスタ24はパイプライン制
御回路15から出力されるEIレジスタ書込み信号33により
Rレジスタ23から書込み予約信号を受取り、Eステージ
開始信号34によりEIレジスタ24から書込み予約信号を受
取り、Eステージ終了信号35によりクリアされる。な
お、図中の〜は各ノード出力を示す。
Further, the EI register 24 of the E stage 5 receives the write reservation signal from the R register 23 by the EI register write signal 33 output from the pipeline control circuit 15, and receives the write reservation signal from the EI register 24 by the E stage start signal 34. , E stage end signal 35 clears. In the figure, ~ indicates the output of each node.

第3図は、第2図に示した各信号の送出タイミングを説
明するタイミングチャートである。
FIG. 3 is a timing chart for explaining the transmission timing of each signal shown in FIG.

メモリ書込み予約信号22は、命令デコーダ7から出力さ
れ、メモリ書込み予約ラッチ21をセットする。1つの命
令が複数オペランドについてのメモリ書込みを行うとき
は、その回数だけメモリ書込み予約信号22がメモリ書込
み予約ラッチ21をセットする。最終的に1命令のアドレ
ス計算処理が終ったところで、Aステージ終了信号30と
Rレジスタ書込み信号31によりメモリ書込み予約情報は
Eステージ4に送出され、メモリ書込み予約ラッチ21は
リセットされる。そして、書込み予約情報がFステージ
4に転送されると、Fステージ4のメモリ書込み予約フ
ラグであるRレジスタ23はマスタスレーブ構成となって
おり、次命令のメモリ書込み予約情報の取り入れと、E
ステージ5へのメモリ書込み予約情報の転送を同時に行
う。Rレジスタ読出し信号36によりスレーブへメモリ書
込み情報が転送され、Rレジスタ23のマスタは次の命令
のメモリ書込み予約情報の入力がない場合にはクリアさ
れる。
The memory write reservation signal 22 is output from the instruction decoder 7 and sets the memory write reservation latch 21. When one instruction performs a memory write for a plurality of operands, the memory write reservation signal 22 sets the memory write reservation latch 21 that number of times. Finally, when the address calculation processing of one instruction is completed, the memory write reservation information is sent to the E stage 4 by the A stage end signal 30 and the R register write signal 31, and the memory write reservation latch 21 is reset. Then, when the write reservation information is transferred to the F stage 4, the R register 23 which is the memory write reservation flag of the F stage 4 has a master-slave configuration, and the memory write reservation information of the next instruction is taken in and E
The memory write reservation information is transferred to the stage 5 at the same time. The memory write information is transferred to the slave by the R register read signal 36, and the master of the R register 23 is cleared when the memory write reservation information of the next instruction is not input.

Fステージ4で命令の処理が終了すると、メモリ書込み
予約情報は、EIレジスタ24に対するEIレジスタ書込み信
号33によりEステージ5へ転送され、Rレジスタ23のス
レーブ側がRレジスタ23のマスタ側からの入力情報にオ
ーバーライトされる。
When the processing of the instruction is completed in the F stage 4, the memory write reservation information is transferred to the E stage 5 by the EI register write signal 33 to the EI register 24, and the slave side of the R register 23 receives the input information from the master side of the R register 23. Will be overwritten.

EIレジスタ24が、Fステージ4よりメモリ書込み予約情
報を受け取ると、入力レジスタであるEIレジスタ24から
入力されたメモリ書込み予約情報は、Eステージ開始信
号34によりEレジスタ25に転送され、次命令の予約情報
入力がなければEIレジスタ24はクリアされる。Eレジス
タ25に入力されたメモリ書込み予約情報は、Eステージ
処理は終了時に、Eステージ終了信号35によりクリアさ
れる。
When the EI register 24 receives the memory write reservation information from the F stage 4, the memory write reservation information input from the EI register 24 which is an input register is transferred to the E register 25 by the E stage start signal 34, and the next instruction If no reservation information is input, the EI register 24 is cleared. The memory write reservation information input to the E register 25 is cleared by the E stage end signal 35 at the end of the E stage processing.

このようにメモリ書込み予約情報は、パイプラインを転
送される命令と同期してパイプライン中を転送され、E
ステージ5でメモリ書込みが行われ命令が終了するとク
リアされる。
As described above, the memory write reservation information is transferred in the pipeline in synchronization with the instruction transferred in the pipeline.
The memory is written in stage 5 and cleared when the instruction is completed.

なお、パイプライン制御手段となるパイプライン制御回
路15が第3のパイプラインステージとなるFステージ4
で第1の命令を処理するとき第1のフラグ情報保持部
(メモリ書込み予約フラグ回路12)をセットし、第1の
命令の処理が第3のパイプラインステージでの処理から
第4のパイプラインステージ(Eステージ5)での処理
に移るとき、メモリ書込み予約フラグ回路12の内容を第
2のフラグ情報保持部(メモリ書き込み予約フラグ回路
14)に転送し、かつメモリ書き込み予約フラグ回路12を
クリアすることにより、フラグ情報保持手段内で順次情
報を移動させる。また、パイプライン制御回路15は、フ
ラグ情報保持状態検出手段(オアゲート26およびアンド
ゲート27等より構成される)の出力に従い第3のパイプ
ラインステージでの第2の命令に関する処理実行を制御
るす。
The pipeline control circuit 15 serving as pipeline control means is the F stage 4 serving as the third pipeline stage.
The first flag information holding unit (memory write reservation flag circuit 12) is set when the first instruction is processed by, and the processing of the first instruction changes from the processing in the third pipeline stage to the fourth pipeline. When the process proceeds to the stage (E stage 5), the contents of the memory write reservation flag circuit 12 are changed to the second flag information holding unit (memory write reservation flag circuit).
14) and clear the memory write reservation flag circuit 12 to sequentially move the information in the flag information holding means. Further, the pipeline control circuit 15 controls the processing execution relating to the second instruction in the third pipeline stage according to the output of the flag information holding state detecting means (which is constituted by the OR gate 26 and the AND gate 27 etc.). .

以下、第2図の動作について説明する。The operation of FIG. 2 will be described below.

各ステージのメモリ書込み予約フラグの出力はオアゲー
ト26でオアされ、アンドゲート27に入力する。Aステー
ジ3でメモリ参照する命令はメモリ間接参照信号28を
「1」とする。このため、パイプライン中を先行する命
令が1つでもメモリ書込み予約がなされた場合には、メ
モリコンフリクト信号29が「1」となり、Aステージ3
は処理を停止する。そして、メモリ書込み予約した命令
がすべてEステージ5で処理されてメモリコンフリクト
信号29が「0」になると、Aステージ3は処理を再開す
る。
The output of the memory write reservation flag of each stage is ORed by the OR gate 26 and input to the AND gate 27. The memory indirect reference signal 28 is set to "1" in the instruction for memory reference in the A stage 3. Therefore, when even one instruction preceding the pipeline is reserved for memory writing, the memory conflict signal 29 becomes "1", and the A stage 3
Stops processing. Then, when all the instructions reserved for memory writing are processed in the E stage 5 and the memory conflict signal 29 becomes "0", the A stage 3 restarts the processing.

なお、上記実施例では、メモリ書込み予約情報の転送に
ついて説明したが、レジスタ予約情報でも同様のハード
ウエアにより転送させることが可能である。特に、レジ
スタ予約情報は、レジスタの数だけあり、レジスタ予約
とレジスタコンフリクト信号の発生は、レジスタ毎に独
立して行われる。Aステージ3でレジスタを参照する命
令はレジスタ間接参照信号28を「1」とし、パイプライ
ン中を先行する命令が1つでも対応するレジスタを書込
み予約していれば、レジスタコンフリクト信号が「1」
となり、Aステージ3は処理を停止する。そして、レジ
スタ書込み予約した命令がすべてEステージ5で処理さ
れ、レジスタコンフリクト信号が「0」となると、Aス
テージ3は処理を再開する。
In the above embodiment, the transfer of the memory write reservation information has been described, but the register reservation information can be transferred by the same hardware. In particular, there are as many register reservation information as there are registers, and register reservation and register conflict signal generation are performed independently for each register. An instruction that refers to a register in the A stage 3 sets the register indirect reference signal 28 to "1", and if even one preceding instruction in the pipeline has reserved the corresponding register for writing, the register conflict signal is "1".
Then, the A stage 3 stops processing. Then, all the instructions reserved for register writing are processed in the E stage 5, and when the register conflict signal becomes "0", the A stage 3 restarts the processing.

なお、ジャンプ命令や割込みをEステージ5が実行する
場合には、ジャンプが起こると、パイプライン中の命令
はキャンセルされ、IFステージ1が新たにジャンプ先の
命令取り込みを開始する。このとき、パイプライン中の
命令と同様にレジスタ書込み予約情報,メモリ書込み予
約情報もクリアされる。レジスタ書込み予約フラグ,メ
モリ書込み予約フラグにはリセット入力があり、Eステ
ージ5でジャンプが起こると、クリアされる。
When the E stage 5 executes a jump instruction or an interrupt, when a jump occurs, the instruction in the pipeline is canceled, and the IF stage 1 newly starts fetching the instruction at the jump destination. At this time, the register write reservation information and the memory write reservation information are cleared as in the case of the instruction in the pipeline. The register write reservation flag and the memory write reservation flag have reset inputs and are cleared when a jump occurs in the E stage 5.

このとき、メモリ書込み予約ラッチ21は、Aステージ終
了信号30により、Rレジスタ23は、Rレジスタ読出し信
号36とRレジスタクリア信号32により、EIレジスタ24は
Eステージ開始信号34により、Eレジスタ25はEステー
ジ終了信号35によりそれぞれクリアされる。
At this time, the memory write reservation latch 21 uses the A stage end signal 30, the R register 23 uses the R register read signal 36 and the R register clear signal 32, the EI register 24 uses the E stage start signal 34, and the E register 25 uses the E register 25. It is cleared by the E stage end signal 35.

また、上記実施例においては、メモリ空間全体について
1系統のメモリ書込み予約とコンフリクトチェックを行
う場合について説明したが、メモリのアドレスにより複
数の空間に分けてその空間毎に書込み予約とコンフリク
トチェックを行うようにしてもよい。
Further, in the above-described embodiment, a case has been described in which one system of memory write reservation and conflict check are performed for the entire memory space, but the memory reservation is divided into a plurality of spaces and the write reservation and conflict check are performed for each space. You may do it.

さらに、上記実施例では、メモリ書き込みを行う命令が
書き込み予約を行いコンフリクトチェックを行う構成で
あるが、パイプライン中に命令が存在するかしないかに
よりコンフリクトチェックを行う構成にしてもよい。そ
の場合、パイプラインステージに対応したフラグ情報保
持回路が、そのステージの命令存在情報を持つようにす
る。パイプラインステージに命令があればフラグは1と
なり、命令が存在しなければフラグは「0」である。パ
イプライン中を命令が転送されて行くとそれに対応し
て、命令の存在を示すフラグがフラグ情報保持回路中を
転送されて行く。フラグ情報保持回路は、そのステージ
の処理が終ると命令存在を示すフラグを次段のパイプラ
インステージに送り出しフラグ情報をクリアする。オペ
ランドのアドレス計算を行うステージより後段のステー
ジのフラグ情報保持回路出力すべての論理和をとり、ア
ドレス計算ステージより後段のステージに命令があるか
ないか検出する。1つでも後段のステージに命令があれ
ば論理和信号は「1」となり、後段のステージの命令が
すべて無くなれば論理和信号は「0」となる。アドレス
計算ステージで処理される命令がメモリを参照するアド
レス計算を行う場合、フラグ情報保持回路出力の論理和
信号を調べ、後段のステージで命令が存在しないことを
確認してからアドレス計算を実行する。論理和信号が
「「1」であれば、後段のステージの命令がメモリ書き
込みする可能性があるのでアドレス計算の実行を停止
し、後段のステージの命令がすべて完了し論理和信号が
「0」となってからアドレス計算を実行する。このよう
にしてメモリコンフリクトチェックを行うことも可能で
ある。
Furthermore, in the above-described embodiment, the memory write instruction performs the write reservation and the conflict check is performed. However, the conflict check may be performed depending on whether or not the instruction exists in the pipeline. In that case, the flag information holding circuit corresponding to the pipeline stage has the instruction presence information of that stage. If there is an instruction in the pipeline stage, the flag is 1, and if there is no instruction, the flag is "0". When an instruction is transferred in the pipeline, a flag indicating the existence of the instruction is transferred in the flag information holding circuit correspondingly. When the processing of that stage is completed, the flag information holding circuit sends a flag indicating the presence of an instruction to the next pipeline stage to clear the flag information. The outputs of the flag information holding circuits of the stages subsequent to the stage for calculating the address of the operand are ORed to detect whether or not there is an instruction in the stage subsequent to the address calculation stage. If there is even one instruction in the subsequent stage, the logical sum signal becomes "1", and if all the instructions in the subsequent stage disappear, the logical sum signal becomes "0". When an instruction processed in the address calculation stage performs address calculation that refers to memory, the address calculation is performed after checking the logical sum signal of the flag information holding circuit output and confirming that there is no instruction in the subsequent stage. . If the OR signal is "1", the instruction of the subsequent stage may write to the memory, so execution of the address calculation is stopped, all the instructions of the subsequent stage are completed, and the OR signal is "0". Then the address calculation is executed. It is also possible to perform the memory conflict check in this way.

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

以上説明したように、この発明はオペランドのアドレス
計算を行う第1のパイプラインステージと演算結果のオ
ペランドの書き込みを行う第2のパイプラインステージ
とを含むパイプライン処理機構と、メモリ空間への演算
結果のオペランド書き込みを行う第1の命令に関する処
理を第1のパイプラインステージで実行する際に、メモ
リ空間にオペランドを書き込む旨を予約するオペランド
書込み予約手段と、このオペランド書込み予約手段の出
力を保持する1つまたは複数の予約ラッチ手段と、第1
の命令に関する処理を第2のパイプラインステージで処
理する際に、1つまたは複数の予約ラッチ手段の内容を
クリアする予約ラッチクリア手段と、第1のパイプライ
ンステージでオペランドのアドレス計算のためにメモリ
空間をアクセスする第2の命令に関する処理を実行する
際に、予約ラッチの内容に基づいて第1のパイプライン
ステージでのオペランドのアドレス計算を抑止するオペ
ランドアドレス計算抑止手段とから構成したもので、オ
ペランド計算ステージでメモリ参照する命令だけがメモ
リコンフリクトによる処理待ちとなり、パイプライン処
理の乱れを大幅に減少させて、パイプライン処理効率を
高めることができる。また、パイプラインを構成する各
ステージ毎にメモリ書き込み予約フラグがあるので、パ
イプライン中に複数の命令によるメモリ書き込み予約情
報を保持させることが可能となる。
As described above, according to the present invention, the pipeline processing mechanism including the first pipeline stage for calculating the address of the operand and the second pipeline stage for writing the operand of the operation result, and the operation to the memory space An operand write reservation unit that reserves the writing of an operand in the memory space and an output of the operand write reservation unit are held when the process related to the first instruction that writes the resulting operand is executed in the first pipeline stage. One or more reservation latch means for
Reserved latch clearing means for clearing the contents of one or more reserved latching means when the processing related to the instruction is processed in the second pipeline stage, and the address calculation of the operand in the first pipeline stage. And an operand address calculation suppressing means for suppressing the address calculation of the operand in the first pipeline stage based on the contents of the reserved latch when executing the processing related to the second instruction for accessing the memory space. In the operand calculation stage, only the instruction that refers to the memory is placed in the waiting state due to the memory conflict, so that the disturbance of the pipeline processing can be significantly reduced and the pipeline processing efficiency can be improved. Further, since there is a memory write reservation flag for each stage constituting the pipeline, it is possible to hold memory write reservation information by a plurality of instructions in the pipeline.

また、入力データ信号と入力イネーブル信号とクリア信
号と出力信号をもつ1ビットのレジスタ回路である第1
のフラグ情報保持部と、入力データ信号と入力イネーブ
ル信号とクリア信号と出力信号を持つ1ビットのレジス
タ回路である第2のフラグ情報保持部と、第3のパイプ
ラインステージと第4のパイプラインステージに対応し
て第1のフラグ情報保持部と第2のフラグ情報保持部を
直列接続したフラグ情報保持手段と、第1のフラグ情報
保持部および第2のフラグ情報保持部の各出力の論理和
をとりながらフラグ情報保持手段におけるフラグ情報保
持状態を検出するフラグ情報保持状態検出手段と、第3
のパイプラインステージで第1の命令を処理するとき第
1のフラグ情報保持部をセットし、第1の命令の処理が
第3のパイプラインステージでの処理から第4のパイプ
ラインステージでの処理に移るとき、第1のフラグ情報
保持部の内容を上記第2のフラグ情報保持部に転送し、
かつ上記第1のフラグ情報保持部をクリアすることによ
り、フラグ情報保持手段内で順次情報を移動し、フラグ
情報保持状態検出手段の出力に従い、オペランドのアド
レス計算のためにメモリ空間をアクセスする第2の命令
に関する処理を制御するパイプライン制御手段とを設け
たので、パイプライン中の各ステージにメモリ書込み予
約情報/レジスタ書込み予約情報を転送する際に、各ス
テージに保持されたメモリ書込み予約情報/レジスタ書
込み予約情報をクリアしながら後段ステージに転送で
き、命令実行ステージでの命令終了時点でパイプライン
中のメモリ書込み予約情報/レジスタ書込み予約情報を
自動的にオールクリアでき、パイプライン処理の効率を
格段に向上できる等の優れた効果を奏する。
In addition, a 1-bit register circuit having an input data signal, an input enable signal, a clear signal, and an output signal
Flag information holding unit, a second flag information holding unit which is a 1-bit register circuit having an input data signal, an input enable signal, a clear signal, and an output signal, a third pipeline stage, and a fourth pipeline. A flag information holding unit in which a first flag information holding unit and a second flag information holding unit are connected in series corresponding to a stage, and logic of each output of the first flag information holding unit and the second flag information holding unit. Flag information holding state detecting means for detecting the flag information holding state in the flag information holding means while taking a sum;
The first flag information holding unit is set when the first instruction is processed in the pipeline stage, and the processing of the first instruction is performed from the processing in the third pipeline stage to the processing in the fourth pipeline stage. When moving to, the contents of the first flag information holding unit is transferred to the second flag information holding unit,
Further, by clearing the first flag information holding unit, the information is sequentially moved in the flag information holding unit, and the memory space is accessed for operand address calculation according to the output of the flag information holding state detecting unit. Since the pipeline control means for controlling the processing relating to the instruction 2 is provided, the memory write reservation information held in each stage when the memory write reservation information / register write reservation information is transferred to each stage in the pipeline / Transfer to the subsequent stage while clearing the register write reservation information, and can automatically clear all the memory write reservation information / register write reservation information in the pipeline at the end of the instruction in the instruction execution stage, and the efficiency of pipeline processing It has an excellent effect that it can be remarkably improved.

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

第1図はこの発明の一実施例を示すデータ処理装置の構
成を説明するブロック図、第2図は、第1図に示した書
込み予約情報転送回路の一例を説明する構成図、第3図
は、第2図に示した各信号の送出タイミングを説明する
タイミングチャート、第4図は従来のパイプライン制御
機構を説明する回路ブロック図、第5図はパイプライン
処理推移を説明する状態図である。 図において、1はIFステージ、2はDステージ、3はA
ステージ、4はFステージ、5はEステージ、6,7は命
令デコーダ、8はデコーダ、9はレジスタ書込み予約回
路、10はメモリ書込み予約回路、11,13はレジスタ書込
み予約フラグ回路、12,14はメモリ書込み予約フラグ回
路である。 なお、図中の同一符号は同一または相当部分を示す。
FIG. 1 is a block diagram illustrating the configuration of a data processing device according to an embodiment of the present invention, FIG. 2 is a configuration diagram illustrating an example of the write reservation information transfer circuit shown in FIG. 1, and FIG. FIG. 4 is a timing chart for explaining the transmission timing of each signal shown in FIG. 2, FIG. 4 is a circuit block diagram for explaining a conventional pipeline control mechanism, and FIG. 5 is a state diagram for explaining transition of pipeline processing. is there. In the figure, 1 is an IF stage, 2 is a D stage, and 3 is A.
Stage 4, F stage, 5 E stage, 6 and 7 instruction decoder, 8 decoder, 9 register write reservation circuit, 10 memory write reservation circuit, 11 and 13 register write reservation flag circuit, 12 and 14 Is a memory write reservation flag circuit. The same reference numerals in the drawings indicate the same or corresponding parts.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】オペランドのアドレス計算を行う第1のパ
イプラインステージと演算結果のオペランドの書き込み
を行う第2のパイプラインステージとを含むパイプライ
ン処理機構と、メモリ空間への演算結果のオペランド書
き込みを行う第1の命令に関する処理を前記第1のパイ
プラインステージで実行する際に、前記メモリ空間にオ
ペランドを書き込む旨を予約するオペランド書込み予約
手段と、このオペランド書込み予約手段の出力を保持す
る1つまたは複数の予約ラッチ手段と、前記第1の命令
に関する処理を前記第2のパイプラインステージで処理
する際に、前記1つまたは複数の予約ラッチ手段の内容
をクリアする予約ラッチクリア手段と、前記第1のパイ
プラインステージで前記オペランドのアドレス計算のた
めにメモリ空間をアクセスする第2の命令に関する処理
を実行する際に、前記予約ラッチ手段の内容に基づいて
前記第1のパイプラインステージでのオペランドのアド
レス計算を抑止するオペランドアドレス計算抑止手段と
から構成したことを特徴とするデータ処理装置。
1. A pipeline processing mechanism including a first pipeline stage for calculating an address of an operand and a second pipeline stage for writing an operand of an operation result, and writing an operand of the operation result to a memory space. An operand write reservation unit that reserves the writing of an operand in the memory space when executing the process related to the first instruction for executing the operation 1 in the first pipeline stage; One or more reservation latch means, and a reservation latch clear means for clearing the contents of the one or more reservation latch means when processing the first instruction in the second pipeline stage; In the first pipeline stage, a memory space is allocated for address calculation of the operand. And an operand address calculation inhibiting means for inhibiting the address calculation of the operand in the first pipeline stage based on the contents of the reservation latch means when executing the processing relating to the second instruction to be accessed. Characteristic data processing device.
【請求項2】第1の命令およびこの第1の命令に続くオ
ペランドのアドレス計算のためにメモリ空間をアクセス
する第2の命令を順次処理する第3のパイプラインステ
ージと、この第3のパイプラインステージの後段の第4
のパイプラインステージとを含むパイプライン処理機構
を有するデータ処理装置において、入力データ信号と入
力イネーブル信号とクリア信号と出力信号をもつ1ビッ
トのレジスタ回路である第1のフラグ情報保持部と、入
力データ信号と入力イネーブル信号とクリア信号と出力
信号を持つ1ビットのレジスタ回路である第2のフラグ
情報保持部と、上記第3のパイプラインステージと上記
第4のパイプラインステージに対応して上記第1のフラ
グ情報保持部と上記第2のフラグ情報保持部を直列接続
したフラグ情報保持手段と、前記第1のフラグ情報保持
部および前記第2のフラグ情報保持部の各出力の論理和
をとりながら前記フラグ情報保持手段におけるフラグ情
報保持状態を検出するフラグ情報保持状態検出手段と、
前記第3のパイプラインステージで第1の命令を処理す
るとき前記第1のフラグ情報保持部をセットし、前記第
1の命令の処理が前記第3のパイプラインステージでの
処理から前記第4のパイプラインステージでの処理に移
るとき、前記第1のフラグ情報保持部の内容を上記第2
のフラグ情報保持部に転送し、かつ上記第1のフラグ情
報保持部をクリアすることにより、前記フラグ情報保持
手段内で順次情報を移動し、前記フラグ情報保持状態検
出手段の出力に従い、オペランドのアドレス計算のため
にメモリ空間をアクセスする第2の命令に関する処理を
制御するパイプライン制御手段とを設けたことを特徴と
するデータ処理装置。
2. A third pipeline stage for sequentially processing a second instruction accessing a memory space for address calculation of a first instruction and an operand following the first instruction, and the third pipe. 4th after the line stage
A data processing device having a pipeline processing mechanism including a pipeline stage, and a first flag information holding unit which is a 1-bit register circuit having an input data signal, an input enable signal, a clear signal, and an output signal; A second flag information holding unit, which is a 1-bit register circuit having a data signal, an input enable signal, a clear signal, and an output signal, and the third pipeline stage and the fourth pipeline stage corresponding to the above. The logical sum of the outputs of the first flag information holding unit and the second flag information holding unit and the flag information holding unit in which the second flag information holding unit is connected in series, and the outputs of the first flag information holding unit and the second flag information holding unit are calculated. Flag information holding state detecting means for detecting the flag information holding state in the flag information holding means,
When processing the first instruction in the third pipeline stage, the first flag information holding unit is set, and the processing of the first instruction proceeds from the processing in the third pipeline stage to the fourth. Of the pipeline stage, the contents of the first flag information holding unit are changed to those of the second flag information holding unit.
Information is transferred to the flag information holding unit and the first flag information holding unit is cleared to sequentially move the information in the flag information holding unit, and according to the output of the flag information holding state detecting unit, And a pipeline control means for controlling a process relating to a second instruction for accessing a memory space for address calculation.
JP1072623A 1988-08-18 1989-03-24 Data processing device Expired - Lifetime JPH0769820B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP1072623A JPH0769820B2 (en) 1988-08-18 1989-03-24 Data processing device
US07/497,375 US5239633A (en) 1989-03-24 1990-05-04 Data processor executing memory indirect addressing and register indirect addressing

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP20556688 1988-08-18
JP63-205566 1988-08-18
JP1072623A JPH0769820B2 (en) 1988-08-18 1989-03-24 Data processing device

Publications (2)

Publication Number Publication Date
JPH02138625A JPH02138625A (en) 1990-05-28
JPH0769820B2 true JPH0769820B2 (en) 1995-07-31

Family

ID=26413754

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1072623A Expired - Lifetime JPH0769820B2 (en) 1988-08-18 1989-03-24 Data processing device

Country Status (1)

Country Link
JP (1) JPH0769820B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6227829A (en) * 1985-07-30 1987-02-05 Fujitsu Ltd Control system for multiplex load instruction

Also Published As

Publication number Publication date
JPH02138625A (en) 1990-05-28

Similar Documents

Publication Publication Date Title
US5293500A (en) Parallel processing method and apparatus
EP0405495B1 (en) Instruction unit logic management apparatus included in a pipelined processing unit and method therefor
JP5209933B2 (en) Data processing device
JPS5932045A (en) information processing equipment
KR20100003309A (en) A system and method for using a local condition code register for accelerating conditional instruction execution in a pipeline processor
JP2620511B2 (en) Data processor
JPH02227730A (en) Data processing system
JPH0760388B2 (en) Pipeline control circuit
US5239633A (en) Data processor executing memory indirect addressing and register indirect addressing
JPH09138748A (en) Floating point instruction early completion method and apparatus
JPH0769825B2 (en) Parallel processor
JP3158107B2 (en) Method and apparatus for directly executing floating point status and control register (FPSCR) instructions
JP3014682B2 (en) Program control method and device
JPH02138625A (en) Data processor
JPH07244588A (en) Data processing device
JP2824484B2 (en) Pipeline processing computer
JP3526773B2 (en) Multiprocessor device and control method thereof
JPS6259829B2 (en)
JP2503223B2 (en) Prior control method
JP3743155B2 (en) Pipeline controlled computer
JP2504263B2 (en) Data processing device
JPS60247743A (en) Pipeline arithmetic controller
JP2933182B2 (en) Pipeline control method
CN119987866A (en) Instruction processing method, storage medium and electronic device
JPH06161778A (en) Multiflow instruction control method and instruction processing device