JPH0243627A - Data processor - Google Patents

Data processor

Info

Publication number
JPH0243627A
JPH0243627A JP63195674A JP19567488A JPH0243627A JP H0243627 A JPH0243627 A JP H0243627A JP 63195674 A JP63195674 A JP 63195674A JP 19567488 A JP19567488 A JP 19567488A JP H0243627 A JPH0243627 A JP H0243627A
Authority
JP
Japan
Prior art keywords
operand
data
instruction
register
zero
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
Application number
JP63195674A
Other languages
Japanese (ja)
Inventor
Katsumi Onishi
克己 大西
Aiichiro Inoue
愛一郎 井上
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 JP63195674A priority Critical patent/JPH0243627A/en
Publication of JPH0243627A publication Critical patent/JPH0243627A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To execute the zero clear due to the operand full overlapping of an exclusive OR instruction at a high speed by sending the data read earlier to two inputs of a computing element when a first operand and a second operand are coincident, and after the first operand is read, even when the data of the second operand are rewritten to other CPU. CONSTITUTION:The title device has means 6 and 25 to detect that an XC (Exclusive OR Character) instruction is obtained and two operands 16 and 17 are coincident. In the XC instruction, when it is detected that the address of the first operand and the second operand is coincident, the data of one side operand read from the memory earlier are sent to an arithmetic unit, the data of other side operand are not sent to the arithmetic unit and instead, the data read earlier are sent to the arithmetic unit. Thus, the zero clear due to the operand full overlapping of the XC instruction can be executed at a high speed.

Description

【発明の詳細な説明】 〔概要〕 排他的論理和を行う命令を有するデータ処理装置に関し
、 排他的論理和命令のオペランドフルオーバーラツプによ
るゼロクリアを高速に実行でき、かつマルチCPUにお
いても必ずゼロデータを得ることができるデータ処理装
置を提供することを目的し、排他的論理和命令でありか
つ2つのオペランドが一致する命令を検出する手段と、
前記命令が検出されたときに何れか一方のオペランドの
データを演算器の2つの人力へ送り出すことを特徴とす
るデータ処理装置を構成する。
[Detailed Description of the Invention] [Summary] Regarding a data processing device having an exclusive OR instruction, it is possible to perform zero clearing at high speed by operand full overlap of an exclusive OR instruction, and it always clears zero even in multiple CPUs. A means for detecting an instruction that is an exclusive OR instruction and whose two operands match, the purpose of which is to provide a data processing device that can obtain data;
The data processing device is characterized in that, when the instruction is detected, data of one of the operands is sent to two human power units of an arithmetic unit.

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

本発明は、排他的論理和を行う命令を有するデータ処理
装置に関する。
The present invention relates to a data processing device having an instruction to perform exclusive OR.

第1オペランドと第2オペランドとの間で排他的論理和
を行い、結果を第1オペランドに格納する命令がある。
There is an instruction that performs exclusive OR between a first operand and a second operand and stores the result in the first operand.

この命令をXC命令と略する。This instruction is abbreviated as an XC instruction.

XCとはExclusive ORCharacter
の略である。
What is XC?Exclusive ORCharacter
It is an abbreviation of

XC命令を有するデータ処理装置において、第1オペラ
ンドと第2オペランドを一致させてゼロクリアを行うこ
とが極めて多い。よって、XC命令によるゼロクリアを
高速に行うことが望まれていた。
In a data processing device having an XC instruction, zero clearing is very often performed by matching the first and second operands. Therefore, it has been desired to perform zero clearing using the XC command at high speed.

〔従来の技術] XC命令において、第1オペランドと第2オペランドを
一致させ、記憶装置上の所定のデータをゼロクリアする
場合について説明する。XC命令は、第1オペランドの
データを読み出し、次に第2オペランドのデータを読み
出し、第1オペランドデータと第2オペランドデータの
排他的論理和を行い、第1オペランドへ書き込むものと
する。
[Prior Art] A case will be described in which, in an XC instruction, the first operand and the second operand are made to match and predetermined data on a storage device is cleared to zero. The XC instruction reads the data of the first operand, then reads the data of the second operand, performs an exclusive OR of the first operand data and the second operand data, and writes the result to the first operand.

アクセスデータ幅を8バイトとし、1ブロツク32バイ
トのゼロクリアを行うものとする。
Assume that the access data width is 8 bytes, and 1 block of 32 bytes is cleared to zero.

最もオーツドックスな方法は、実際に第1及び第2オペ
ランドの最初の8バイトのデータを読み出し、演算を行
い、結果として得られたゼロデータを書き込むもので、
オペランド長のデータを全て処理するまで繰り返す。第
2図のパイプライン処理のタイムチャート図を用いて説
明すると、第1フローで第1オペランドをフェッチし、
第2フローで第2オペランドのフェッチ及びXC命令の
演算を実行し、第3フローで演算結果のゼロデータを書
き込む。アクセスデータ幅をゼロクリアするのに3フロ
ーを要するので、1ブロツクのゼロクリアには12フロ
ーを要する。
The most orthodox method is to actually read the first 8 bytes of data of the first and second operands, perform the operation, and write the resulting zero data.
Repeat until all data of the operand length is processed. To explain using the time chart of pipeline processing in Figure 2, the first operand is fetched in the first flow,
In the second flow, the fetch of the second operand and the operation of the XC instruction are executed, and in the third flow, zero data as the result of the operation is written. Since 3 flows are required to zero-clear the access data width, 12 flows are required to zero-clear one block.

これを高速化するために第1オペランドと第2オペラン
ドの先頭データのみ排他的論理和を行い、演算結果とし
て得られたゼロデータをオペランド長の全範囲に書き込
む方法がある。パイプライン処理では、第1フローで第
1オペランドをフエ・ンチし、第2フローで第2オペラ
ンドのフェッチ、オペランドの一致の検出及びXC命令
の演算を行い、第3フローで演算結果を書き込み、第4
フロー以下、オペランドのフェッチ及び演算を行うこと
なしに、第3フローで得られたゼロデータを書き込む、
よって、1ブロツクのゼロクリアに6フローを要する。
In order to speed up this process, there is a method of exclusive ORing only the first data of the first and second operands and writing zero data obtained as a result of the operation to the entire range of the operand length. In pipeline processing, the first operand is fetched in the first flow, the second operand is fetched in the second flow, a match of the operands is detected, and the XC instruction is operated, and the operation result is written in the third flow. Fourth
Below the flow, write the zero data obtained in the third flow without fetching or calculating the operands.
Therefore, six flows are required to zero-clear one block.

また、第1オペランドと第2オペランドが一致すること
を検出し、第1オペランド及び第2オペランドのデータ
を読み出すことなく、何らかの手段で作り出したゼロデ
ータを第1オペランドへ書き込む方法もある。パイプラ
イン処理では、第1フローでオペランドの一致を検出し
、オペランドデータを読み出すことなく、ゼロデータを
書き込み、以下第4フローまで順次ゼロデータを書き込
んでいく。この方法では1ブロツクのゼロクリアが4フ
ローで処理できる。
There is also a method of detecting that the first and second operands match and writing zero data created by some means to the first operand without reading the data of the first and second operands. In pipeline processing, a match between operands is detected in the first flow, zero data is written without reading the operand data, and zero data is written sequentially up to the fourth flow. With this method, one block of zero clearing can be processed in four flows.

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

第1オペランドと第2オペランドの先頭データのみ排他
的論理和を行い、演算結果として得られたゼロデータを
オペランド長の範囲に書き込む方法は、CPUが1台だ
けなら問題はないが、CPUが2台以上になると、不都
合が生じる。あるCPUがXC命令を実行するために第
1オペランドを読み出した後、第2オペランドを読み出
すまでの間に、第2オペランドのデータを他のCPUが
書き換えた場合、演算結果としてゼロデータが得られな
い。また、最初の演算結果をオペランドの第9バイト以
降に順次書き込んでいくので、ゼロクリアすべき範囲に
ゼロ以外のデータが書き込まれてしまう。
The method of exclusive ORing only the first data of the first and second operands and writing the zero data obtained as a result of the operation within the range of the operand length has no problem if there is only one CPU, but if there are two CPUs If the number exceeds 100, inconveniences will occur. If another CPU rewrites the data in the second operand after a CPU reads the first operand to execute an XC instruction and before it reads the second operand, zero data will be obtained as the result of the operation. do not have. Furthermore, since the first operation result is written sequentially from the 9th byte of the operand onward, data other than zero is written in the range that should be cleared to zero.

次に第1オペランドと第2オペランドが一致することを
検出し、第1オペランド及び第2オペランドのデータを
読み出すことなく、ゼロデータを第1オペランドへ書き
込む方法は、実際に演算を行わないため、演算実行時に
生成されるコンデイションコードや演算結果であるゼロ
データを演算以外の何らかの手段で作り出さなければな
らない。
Next, the method of detecting that the first and second operands match and writing zero data to the first operand without reading the data of the first and second operands does not actually perform an operation, so The condition code generated when an operation is executed and the zero data that is the result of the operation must be created by some means other than the operation.

よって、前記の手段を達成するための回路が増加し、マ
シンサイクルの短縮が困難になる。
Therefore, the number of circuits required to achieve the above means increases, making it difficult to shorten the machine cycle.

本発明は、XC命令のオペランドフルオーバーラツプに
よるゼロクリアを高速に実行でき、かつマルチCPUに
おいても必ずゼロデータを得ることができるデータ処理
装置を提供することを目的とする。
SUMMARY OF THE INVENTION An object of the present invention is to provide a data processing device that can execute zero clearing at high speed by operand full overlap of XC instructions, and can always obtain zero data even in multiple CPUs.

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

上記目的を達成するために、XC命令でありかつ2つの
オペランドが一致することを検出する手段と、前記手段
に検出されたときに何れか一方のオペランドのデータを
メモリから読み出して演算器の2つの入力へ送り出すこ
とを特徴とするデータ処理装置を構成する。
In order to achieve the above object, there is provided a means for detecting that it is an XC instruction and two operands match, and a means for reading data of one of the operands from the memory when detected by the means, A data processing device is configured in which data is sent to two inputs.

〔作用〕[Effect]

XC命令において、第1オペランドと第2オペランドの
アドレスが一致することを検出したときは、先にメモリ
から読み出した一方のオペランドのデータを演算ユニッ
トへ送り出し、他方のオペランドのデータを演算ユニッ
トに送り出す代わりに、先に読み出したデータを演算ユ
ニットへ送り出す。よって、同一のデータで排他的論理
和を行うので、必ずゼロデータが得られる。また、実際
に演算を行うため、コンデイションコードやゼロデータ
を作り出す手段を別途設ける必要がない。
In an XC instruction, when it is detected that the addresses of the first and second operands match, the data of one operand read from memory first is sent to the arithmetic unit, and the data of the other operand is sent to the arithmetic unit. Instead, the data read out first is sent to the arithmetic unit. Therefore, since exclusive OR is performed using the same data, zero data is always obtained. Furthermore, since the calculation is actually performed, there is no need to separately provide means for generating condition codes and zero data.

オペランド内の先頭のデータ以外にも、演算結果として
得られたゼロデータを順次書き込んでいく。
In addition to the first data in the operand, zero data obtained as a result of the operation is sequentially written.

〔実施例〕〔Example〕

第1図に本発明の一実施例を示す。 FIG. 1 shows an embodiment of the present invention.

図中、■はアドレス生成器であり、ペースレジスタ11
とインデックスレジスタ12とデータレジスタ13の値
からオペランドアドレスを算出し、アドレスレジスタ1
4に送出する。2はバッファメモリであり、アドレスレ
ジスタ14で指定されたデータが読み出される。5のフ
リップフロップはレジスタセット信号発生器であり、オ
ペランドデータレジスタ16または17(以下、ODR
,,0DRzと略す)にレジスタセット信号51及び5
1“を送出し、ODR,と0DRzを交互にセットする
。3はデータセレクタであり、レジスタ選択信号で指定
されたレジスタのデータを送り出す。19はワーキング
レジスタであり、第2オペランドデータが読み出される
まで第1オペランドデータを保持する。4はXC演算器
であり、演算器のI1に入力されるワーキングレジスタ
14の第1オペランドデータと、データセレクタ3を通
してI2に入力されるデータとを排他的論理和の演算を
おこない、リザルトレジスタ20にセットする。
In the figure, ■ is an address generator, and the pace register 11
The operand address is calculated from the values of index register 12 and data register 13, and address register 1 is
Send to 4. 2 is a buffer memory from which data specified by the address register 14 is read. Flip-flop 5 is a register set signal generator, and operand data register 16 or 17 (hereinafter referred to as ODR) is a register set signal generator.
, 0DRz) are set to register set signals 51 and 5.
1" and sets ODR and 0DRz alternately. 3 is a data selector and sends out the data of the register specified by the register selection signal. 19 is a working register from which the second operand data is read. 4 is an XC arithmetic unit, and the first operand data of the working register 14 inputted to I1 of the arithmetic unit and the data inputted to I2 through the data selector 3 are controlled by exclusive logic. The sum is calculated and set in the result register 20.

以上は従来の構成と同様であり、本発明実施のために追
加された回路は、7のフリップフロップと21〜25の
論理回路である。従来、データセレクタ3に入力される
レジスタ選択信号は、レジスタセット信号発生器5の出
力等が入力されていて、データが新たにセットされた側
のオペランドデータレジスタが選択されていた。25の
論理積回路は、XC検出信号54とオペランド一致信号
93から、XCオペランドフルオーバーラツプ信号53
を送出する。21〜24の論理回路は、信号53がオフ
ならレジスタセット信号発生器5の出力をレジスタ選択
信号52とする。つまり、データがセットされたオペラ
ンドデータレジスタが選択される。また、信号53がオ
ンなら、レジスタ選択信号 52を反転すべきところを
反転させず、ひとつ前にデータがセットされたオペラン
ドデータレジスタを選択する。
The above configuration is the same as the conventional configuration, and the circuits added to implement the present invention are 7 flip-flops and 21 to 25 logic circuits. Conventionally, the register selection signal input to the data selector 3 is the output of the register set signal generator 5, and the operand data register to which data is newly set is selected. The AND circuit 25 generates an XC operand full overlap signal 53 from the XC detection signal 54 and the operand match signal 93.
Send out. Logic circuits 21 to 24 use the output of the register set signal generator 5 as the register selection signal 52 if the signal 53 is off. In other words, the operand data register in which data is set is selected. Further, if the signal 53 is on, the register selection signal 52 is not inverted where it should be inverted, and the operand data register in which data was set immediately before is selected.

ここで、従来例と同様第2図のパイプライン処理のタイ
ムチャート図を用いて、32バイトのゼロクリアを説明
する。A1サイクルでは、アドレス生成器1により第1
オペランドのアドレスを算出し、アドレスレジスタ14
にセットする。B。
Here, 32-byte zero clearing will be explained using the pipeline processing time chart shown in FIG. 2, as in the conventional example. In the A1 cycle, the first
Calculates the address of the operand and stores it in the address register 14.
Set to . B.

サイクルでアドレスレジスタ14によって指定されるデ
ータをODR,にセットする。レジスタセット信号発生
器5がODR,にレジスタセット信号を送出したものと
する。この状態ではXcオペランドフルオーバーラツプ
信号がオフままであり、レジスタ切換信号発生器7はデ
ータがセットされたレジスタを選択する信号を送出する
。B1サイクルでは、ODR,にセットされた第1オペ
ランドデータをワーキングレジスタ19にセットする。
The data specified by the address register 14 is set in ODR in the cycle. Assume that the register set signal generator 5 sends a register set signal to the ODR. In this state, the Xc operand full overlap signal remains off, and the register switching signal generator 7 sends out a signal to select the register in which data is set. In the B1 cycle, the first operand data set in ODR is set in the working register 19.

これらの処理と並列に、A2サイクルでは第2オペラン
ドアドレスを算出し、このアドレスをアドレスレジスタ
14にセットするまえに、第2オペランドアドレスとア
ドレスレジスタ14にセットされている第1オペランド
アドレスを比較し、オペランド比較信号91〜93を送
出する。この信号中のオペランド一致信号とXC検出信
号より、XCオペランドフルオーバーラツプ信号53を
送出する。
In parallel with these processes, in the A2 cycle, the second operand address is calculated, and before setting this address in the address register 14, the second operand address and the first operand address set in the address register 14 are compared. , and sends out operand comparison signals 91-93. An XC operand full overlap signal 53 is sent out from the operand match signal and the XC detection signal in this signal.

B2サイクルでは第2オペランドデータをODR。In the B2 cycle, the second operand data is ODR.

にセットする。従来なら、レジスタ切換信号発生器7は
ODR,を選択するが、本発明では、前回にデータをセ
ットしたレジスタを選択する。B2サイクルでは、ワー
キングレジスタ19の第1オペランドデータと、データ
セレクタから送られてくるODR,に格納されている第
1オペランドデータとをXC演算回により、排他的論理
和をおこなう。W、サイクルで演算結果であるゼロデー
タを書き込む。第4フロー以下は、第2フローで得られ
たゼロデータを第1オペランドの残りへ順次書き込んで
いく。
Set to . Conventionally, the register switching signal generator 7 selects the ODR, but in the present invention, the register in which data was previously set is selected. In the B2 cycle, the first operand data of the working register 19 and the first operand data stored in the ODR sent from the data selector are subjected to an exclusive OR operation using the XC operation. Write zero data, which is the operation result, in the W cycle. In the fourth flow and subsequent flows, the zero data obtained in the second flow is sequentially written into the remainder of the first operand.

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

上記で説明したように、本発明では、第1オペランドと
第2オペランドが一致したとき、第1オペランドを読み
出した後、第2オペランドのデータが他のCPUに書き
換えられても、先に読み込んであるデータを演算器の2
つの入力に送り出すので、ゼロデータを得ることができ
る。また、最初の1度だけは実際に排他的論理和を行う
ので、コンデイションコードやゼロデータを作り出す手
段を設ける必要がなく、回路が少なくてすむのでマシン
サイクルの短縮も可能である。
As explained above, in the present invention, when the first operand and the second operand match, even if the data of the second operand is rewritten by another CPU after reading the first operand, the data is read first. 2 of the arithmetic unit
Since it sends out to two inputs, zero data can be obtained. In addition, since the exclusive OR is actually performed only once at the beginning, there is no need to provide a means for creating a condition code or zero data, and the number of circuits can be reduced, making it possible to shorten the machine cycle.

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

第1図は本発明の一実施例の構成図であり、第2図は処
理動作を説明するためのパイプライン処理のタイムチャ
ート図である。 図中、 ・アドレス生成器 ・バッファメモリ ・データセレクタ ・XC演算器 ・レジスタセット信号発生器 ・オペランド比較器 ・アドレスレジスタ ・第1オペランドデータレジスタ ・第2オペランドデータレジスタ ・ワーキングレジスタ ト レジスタセット信号 ・レジスタ選択信号 ・XCオペランドフルオーバーラツ プ信号 54・・・XC検出信号 93・・・オペランド一致信号 52 ・ 1 ・ 2 ・ 3 ・ 4 ・ 5 ・ 6 ・ 14 ・ 16 ・ 17 ・ 19 ・ 51. 53 ・ Dt At Bt Et Wt Dz  Az  f3z  Ez 1AhD3/4J 
Eli Ei Wa 04 A4134 fa J杓 ? 凹
FIG. 1 is a block diagram of an embodiment of the present invention, and FIG. 2 is a time chart of pipeline processing for explaining processing operations. In the figure: Address generator Buffer memory Data selector XC computing unit Register set signal generator Operand comparator Address register First operand data register Second operand data register Working register Set signal Register selection signal/XC operand full overlap signal 54...XC detection signal 93...Operand match signal 52 ・ 1 ・ 2 ・ 3 ・ 4 ・ 5 ・ 6 ・ 14 ・ 16 ・ 17 ・ 19 ・ 51. 53 ・ Dt At Bt Et Wt Dz Az f3z Ez 1AhD3/4J
Eli Ei Wa 04 A4134 fa J scoop? Concave

Claims (1)

【特許請求の範囲】 第1及び第2のオペランドのデータを入力し排他的論理
和を行う演算器(4)を有するデータ処理装置において
、 排他的論理和命令でありかつ2つのオペランドが一致す
る命令を検出する手段(6及び25)と、前記命令が検
出されたときに何れか一方のオペランドのデータを演算
器(4)の2つの入力へ送り出す手段(3、7及び21
〜25)とを備えたことを特徴とするデータ処理装置。
[Scope of Claim] A data processing device having an arithmetic unit (4) that inputs data of first and second operands and performs an exclusive OR, which is an exclusive OR instruction and the two operands match. means (6 and 25) for detecting an instruction; and means (3, 7 and 21) for sending data of one of the operands to two inputs of the arithmetic unit (4) when the instruction is detected;
~25) A data processing device comprising:
JP63195674A 1988-08-04 1988-08-04 Data processor Pending JPH0243627A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63195674A JPH0243627A (en) 1988-08-04 1988-08-04 Data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63195674A JPH0243627A (en) 1988-08-04 1988-08-04 Data processor

Publications (1)

Publication Number Publication Date
JPH0243627A true JPH0243627A (en) 1990-02-14

Family

ID=16345110

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63195674A Pending JPH0243627A (en) 1988-08-04 1988-08-04 Data processor

Country Status (1)

Country Link
JP (1) JPH0243627A (en)

Similar Documents

Publication Publication Date Title
US4476525A (en) Pipeline-controlled data processing system capable of performing a plurality of instructions simultaneously
JPH09330236A (en) Microprocessor and peripheral device for the same
JPS6125169B2 (en)
JPH03201031A (en) Information processor
JPH04215129A (en) Method and apparatus for executing continuous command
JPH0243627A (en) Data processor
US6453410B1 (en) Computer system having a cache memory and a tracing function
KR19980024622A (en) Program execution method and device using the method
JPH0377137A (en) Information processor
JPH0248733A (en) Information processor
JP2629479B2 (en) Information processing device
JP2006515446A (en) Data processing system with Cartesian controller that cross-references related applications
JP2522564B2 (en) Programmable controller
JP3124361B2 (en) Memory data loading device
JP2583614B2 (en) Vector arithmetic unit
JP3414579B2 (en) Programmable controller
JPH0234058B2 (en)
JP3693873B2 (en) Mask bit number arithmetic unit, vector processing unit, information processing unit
JPH02151925A (en) Fast bit logic operation device
JPS61122754A (en) Microprocessor
JPS6115235A (en) Central processor
JPH04245333A (en) Information processor
JPS63311438A (en) Control circuit for discrepancy of store instruction
JPH02294829A (en) Memory operand takeout system
JPS6226542A (en) Pipeline system instruction processor