JPH0797309B2 - Data processing device - Google Patents
Data processing deviceInfo
- Publication number
- JPH0797309B2 JPH0797309B2 JP60212328A JP21232885A JPH0797309B2 JP H0797309 B2 JPH0797309 B2 JP H0797309B2 JP 60212328 A JP60212328 A JP 60212328A JP 21232885 A JP21232885 A JP 21232885A JP H0797309 B2 JPH0797309 B2 JP H0797309B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- control unit
- operand
- unit
- storage control
- 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
Links
Landscapes
- Executing Machine-Instructions (AREA)
Description
【発明の詳細な説明】 〔発明の利用分野〕 本発明は、データ処理装置における比較論理演算命令の
演算方式に係り、特に記憶部と記憶制御部とのデータ転
送幅が、記憶制御部と演算器とのデータ転送幅より大き
いデータ処理装置での比較論理演算装置に関する。Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a calculation method of a comparison logical operation instruction in a data processing device, and more particularly, a data transfer width between a storage unit and a storage control unit is equal to that of the storage control unit. The present invention relates to a comparison logical operation device in a data processing device having a data transfer width larger than that of a data processing device.
データ処理装置における比較論理演算命令は第1オペラ
ンドと第2オペランドとの関係を等しいか、第1オペラ
ンドが大きいか、もしくは小さいかを判定し、この判定
結果を条件コードとして示す命令であり、この判定は演
算器の減算機能を用いて処理するのが一般的である。こ
の為、記憶制御部で処理するデータ幅に対して演算器の
演算幅が小さい構成でのデータ処理装置での比較論理演
算命令の処理速度は演算器の演算幅により決まってしま
う。一方上記のような構成でのデータ処理装置では、記
憶制御部に減算回路を設けて記憶制御部で比較論理演算
命令を処理すれば高速化が可能となる。しかし記憶制御
部は、転送論理演算命令の高速化の為にビット単位に分
割(各バイトのビット0を集めて一つの構成とし、同様
にビット1からビット7の各々を一つの構成としたよう
な分割で、1ビットまたは数ビットまとめて分割)した
実装が普通である。この転送論理演算命令は第1オペラ
ンドの位置に第2オペランドのデータを転送する命令
で、バイト単位のシフト機能が必要であり、この為にビ
ット単位の分割とするのが実装上都合がよい。このよう
なビット単位に分割された記憶制御部に減算回路を設
け、比較論理演算命令での2つのオペランドの大小関係
を判定することは各ビット間のキャリー信号の為の信号
ピンの数の増大となり実装上困難であった。なお転送論
理演算命令の高速化として関連するものには例えば特開
昭58-182772等が挙げられる。The comparison logical operation instruction in the data processing device is an instruction that determines whether the relationship between the first operand and the second operand is equal, whether the first operand is large or small, and shows the result of this determination as a condition code. The judgment is generally processed by using the subtraction function of the arithmetic unit. For this reason, the processing speed of the comparison logic operation instruction in the data processing device having a configuration in which the arithmetic width of the arithmetic unit is smaller than the data width processed by the storage control unit is determined by the arithmetic width of the arithmetic unit. On the other hand, in the data processing device having the above-described configuration, the speed can be increased by providing the storage control unit with the subtraction circuit and processing the comparison logical operation instruction by the storage control unit. However, the storage control unit divides into bit units in order to speed up the transfer logical operation instruction (collects bit 0 of each byte into one configuration, and similarly configures each of bit 1 to bit 7 into one configuration). In general, it is an implementation in which 1 bit or several bits are collectively divided). This transfer logical operation instruction is an instruction for transferring the data of the second operand to the position of the first operand, and it requires a shift function in byte units. For this reason, it is convenient to implement division in bit units. The subtraction circuit is provided in the storage control unit divided into such bit units to determine the magnitude relation between the two operands in the comparison logical operation instruction in order to increase the number of signal pins for the carry signal between each bit. It was difficult to implement. Note that, for example, JP-A-58-182772 can be cited as one related to speeding up of transfer logical operation instructions.
本発明の目的は、比較論理演算命令を高速処理するデー
タ処理装置を提供することを目的とするものである。It is an object of the present invention to provide a data processing device that processes a comparison logical operation instruction at high speed.
本発明の特徴は、2つのオペランドの不一致検出を記憶
制御部で行ない、不一致検出後または比較終了を検出後
2つのオペランドの関係を条件コードとして設定するに
必要なデータだけを演算部に転送し、該転送されたデー
タを演算器で判定して条件コードを設定するようにした
ことにより比較論理演算命令の高速化を図ることであ
る。A feature of the present invention is that the storage control unit detects a mismatch between two operands, and transfers only the data necessary for setting the relationship between the two operands as a condition code after detecting a mismatch or detecting the end of comparison to the arithmetic unit. The purpose of this is to speed up the comparison logic operation instruction by determining the transferred data by the arithmetic unit and setting the condition code.
本発明の実施例を第1図により説明する。第1図は、記
憶部(MS)1,記憶制御部(SCU)2,演算部(ALU)3,実行
制御部(ESU)4より構成され、記憶部1と記憶制御部
2との間のデータ転送幅が8バイト、記憶制御部2と演
算部3との間のデータ転送幅が4バイトのデータ処理装
置の例である。記憶制御部2は、ANDゲート25、第1オ
ペランドデータおよび第2オペランドデータを各々保持
する8バイト長のデータレジスタA(DRA)20,データレ
ジスタB(DRB)21,第2オペランドデータを第1オペラ
ンドの開始位置にシフトする整合回路(AL)22,比較回
路(COMP)23、データレジスタA20またはデータレジス
タB21の8バイト中4バイトを選択する選択回路(SEL)
24より成る。An embodiment of the present invention will be described with reference to FIG. FIG. 1 is composed of a storage unit (MS) 1, a storage control unit (SCU) 2, an arithmetic unit (ALU) 3, and an execution control unit (ESU) 4, and is provided between the storage unit 1 and the storage control unit 2. This is an example of a data processing device having a data transfer width of 8 bytes and a data transfer width between the storage control unit 2 and the arithmetic unit 3 of 4 bytes. The storage control unit 2 stores the AND gate 25, a data register A (DRA) 20 having a length of 8 bytes, a data register B (DRB) 21, and a second operand data which hold the first operand data and the second operand data, respectively. Matching circuit (AL) 22 that shifts to the start position of the operand, comparison circuit (COMP) 23, selection circuit (SEL) that selects 4 bytes out of 8 bytes of data register A20 or data register B21
Consists of 24.
以下、第2図のマイクロプログラムフローに従って第1
図の動作の説明を行なう。In the following, according to the microprogram flow of FIG.
The operation of the figure will be described.
第2図では、ステップ200にて第2オペランドデータを
記憶部MS1から読出す為のフェッチ起動を行なう。MS1か
ら読出された第2オペランドデータは8バイト幅のデー
タ信号線100を通して記憶制御部2内のANDゲート25によ
り有効オペランドのバイト位置だけ読出しデータが出力
され、無効オペランドのバイト位置には“0"が出力され
データレジスタDRB21に保持される。この8バイト中の
有効、無効オペランドの区別は8ビットの信号線104に
て各バイト単位に示され、実行制御部4内のオペランド
長の更新回路40にて作成され、第1オペランド,第2オ
ペランドのフェッチ起動毎に作成される。DRB21に保持
された第2オペランドデータは整合回路AL22に上がり第
1オペランドの開始位置にシフトされ比較回路COMP23に
入力される。ステップ201では第1オペランドデータをM
S1から読出す為のフェッチ起動を行ない、MS1から読出
された第1オペランドデータはデータ信号線100を通し
てSCU2内のANDゲート25、および信号線104により有効オ
ペランドのバイト位置には読出しデータが、無効オペラ
ンドのバイト位置には“0"が出力されデータレジスタDR
A20に保持され直接COMP23に入力される。COMP23に入力
された2つのオペランドは比較が行なわれ、比較処理が
終了するまでステップ200,ステップ201のマイクロプロ
グラムをくり返し実行する。比較処理の終了、は2つの
オペランドの不一致を検出するか、もしくはオペランド
長を比較し終えた時である。前者はCOMP23にて不一致を
検出し1ビットの信号線102を出力し実行制御部4に送
る。後者は実行制御部4内のオペランド長の更新回路40
にて、有効、無効オペランドを示す信号線104を出力す
るとともに、オペランド長の比較終了の判定をも行な
い、比較終了を信号線105に出力する。これら不一致信
号の信号線102,オペランド長の比較終了の信号線105を
実行制御部4内のORゲート41を通してテストマトリクス
42に入力しテストされる。このテスト結果はステップ20
1のテスト条件“TEST=END"に反映され、テスト不成立
(END)の時はステップ200を実行し、テスト成立(EN
D)の時はステップ200およびステップ201のループを抜
けステップ202を実行する。信号線103は8バイトの比較
結果前半の4バイトまたは後半の4バイトで不一致を検
出したかを示す比較回路23の出力信号である。ステップ
202では、データレジスタA20に保持されている最終の第
1オペランドデータ8バイトを信号線103および選択回
路24にて前半4バイトもしくは後半4バイトを選択し、
4バイト幅のデータ信号線101を通して演算部3に転送
し、演算部3内の4バイト長のデータレジスタ(LX30)
にセットする。ステップ203では、データレジスタB21に
保持されている最終の第2オペランドデータ8バイトを
以下ステップ202と同様に4バイトのデータとして演算
部3内の4バイト長のデータレジスタ31(LY)にセット
するとともに、ステップ202でLX30にセットされた第1
オペランドと4バイト幅の演算器32にて減算し、減算の
結果を条件コード設定回路33により判定し大小関係を条
件コードに設定し演算を終了する。一方ステップ201で
のテスト結果で、オペランド長の比較終了によりテスト
が成立したのであれば、データレジスタA20,データレジ
スタB21には各々等しいオペランドが保持されており、
両オペランドの前半4バイトが演算部3に転送し演算し
た結果は“両オペランドが等しい”を示す条件コードが
設定されることは明らかである。このように、前半、後
半の4バイトのうち、不一致を検出した方を演算部へ送
るので、8バイト全部を送るよりも早く、大小比較結果
が得られる。In FIG. 2, in step 200, fetch activation for reading the second operand data from the storage unit MS1 is performed. The second operand data read from MS1 is output as read data at the byte position of the valid operand by the AND gate 25 in the storage control unit 2 through the data signal line 100 having a width of 8 bytes, and "0" is output at the byte position of the invalid operand. "Is output and held in the data register DRB21. The distinction between valid and invalid operands in the 8 bytes is indicated by the 8-bit signal line 104 on a byte-by-byte basis, and is created by the operand length update circuit 40 in the execution control unit 4, and the first and second operands are used. Created every time the operand fetch is started. The second operand data held in DRB21 goes up to the matching circuit AL22, is shifted to the start position of the first operand, and is input into the comparison circuit COMP23. In step 201, the first operand data is M
The fetch operation for reading from S1 is performed, and the first operand data read from MS1 is invalid through the data signal line 100 by the AND gate 25 in SCU2 and the signal line 104. "0" is output to the byte position of the operand and the data register DR
It is held in A20 and directly input to COMP23. The two operands input to COMP 23 are compared, and the microprograms of steps 200 and 201 are repeatedly executed until the comparison process is completed. The end of the comparison process is when the mismatch between the two operands is detected or the operand lengths are compared. The former detects a mismatch at COMP23, outputs a 1-bit signal line 102, and sends it to the execution control unit 4. The latter is an operand length updating circuit 40 in the execution control unit 4.
At the same time, the signal line 104 indicating the valid and invalid operands is output, the end of comparison of the operand lengths is also determined, and the end of comparison is output to the signal line 105. These mismatch signal line 102 and operand length comparison end signal line 105 are passed through the OR gate 41 in the execution control unit 4 to form a test matrix.
Entered in 42 and tested. This test result is step 20
It is reflected in the test condition 1 "TEST = END", and when the test is not established (END), step 200 is executed and the test is established (EN
In the case of D), the loop of step 200 and step 201 is exited and step 202 is executed. The signal line 103 is an output signal of the comparison circuit 23, which indicates whether a mismatch is detected in the first 4 bytes or the latter 4 bytes of the comparison result of 8 bytes. Step
At 202, the first 8 bytes of the first operand data held in the data register A20 is selected by the signal line 103 and the selection circuit 24 from the first 4 bytes or the second 4 bytes,
Transferred to the operation unit 3 through the 4-byte width data signal line 101, and the 4-byte length data register (LX30) in the operation unit 3
Set to. In step 203, the final 8 bytes of the second operand data held in the data register B21 is set in the data register 31 (LY) of 4 bytes in the arithmetic unit 3 as data of 4 bytes as in step 202. Along with the first set on the LX30 in step 202
The operand is subtracted from the 4-byte width arithmetic unit 32, the result of the subtraction is judged by the condition code setting circuit 33, the magnitude relation is set to the condition code, and the arithmetic operation ends. On the other hand, in the test result in step 201, if the test is established because the comparison of the operand lengths is completed, the data register A20 and the data register B21 hold equal operands,
It is obvious that the first half 4 bytes of both operands are transferred to the arithmetic unit 3 and the result of the arithmetic operation is set with a condition code indicating "both operands are equal". As described above, since the one of the four bytes in the first half and the latter half that has detected a mismatch is sent to the arithmetic unit, the magnitude comparison result can be obtained earlier than sending all eight bytes.
第3図は、記憶制御部SCU2をビット単位に分割実装した
場合の構成図である。第3図においてLSIモジュール300
は各バイトのビット0を集めて一つのLSIモジュールと
した時の構成で、以下同様の構成でLSIモジュール301は
ビット1を集めたLSIモジュールで、各ビット単位にLSI
モジュール300からLSIモジュール307まで8ケのLSIモジ
ュールから成る。2つのオペランドデータの不一致信号
は各LSIモジュールから各1ビットずつ信号線310から信
号線317までの8本の信号線で出力され、この8本の信
号線をLSIモジュール308に集めてORゲート51を通して1
ビットの不一致信号線102を略する。さらに信号線320か
ら信号線327までの8本の信号線は各LSIモジュールでの
8ビットのデータ中、前半の4ビットで、または後半の
4ビットで不一致を検出したのかを示す信号線であり、
これら8本の信号線も信号線310から信号線317の8本と
同様LSIモジュール308に集められORゲート50を通して1
ビットの信号線103を出力する。信号線103はLSIモジュ
ール300からLSIモジュール307に各々入力され選択回路S
EL24の選択信号として使用される。FIG. 3 is a configuration diagram in the case where the storage control unit SCU2 is mounted separately in bit units. In FIG. 3, the LSI module 300
Is a configuration when bit 0 of each byte is collected into one LSI module. With the same configuration, the LSI module 301 is an LSI module in which bit 1 is collected.
It consists of eight LSI modules from module 300 to LSI module 307. The non-match signal of the two operand data is output from each LSI module bit by bit by eight signal lines from signal line 310 to signal line 317. These eight signal lines are collected in the LSI module 308 and OR gate 51 Through 1
The bit mismatch signal line 102 is omitted. Further, eight signal lines from the signal line 320 to the signal line 327 are signal lines indicating whether a mismatch is detected in the first 4 bits or the latter 4 bits in the 8-bit data in each LSI module. ,
These eight signal lines are also collected in the LSI module 308 like the eight signal lines 310 to 317, and are connected to one through the OR gate 50.
The bit signal line 103 is output. The signal lines 103 are respectively input from the LSI module 300 to the LSI module 307, and the selection circuit S
Used as EL24 selection signal.
第4図は、第3図に示すLSIモジュール30内の比較回路C
OMP23の詳細図である。COMP23の2つの入力データを各
々a0〜a7,b0〜b7とすると、2つのデータは排他的論理
和ゲート60〜67により各ビット対応に排他的論理和がと
られる。ビット0からビット3までの排他的論理和ゲー
ト60〜63の出力はORゲート70を通し信号線320として出
力され、ビット4からビット7までの排他的論理和ゲー
ト64〜67の出力、およびDRゲート70の出力はORゲート71
を通し信号線310として出力される。つまり信号線320は
8ビットのデータ中前半の4ビットでの不一致信号であ
り、信号線310は8ビットのデータすべての不一致信号
である。FIG. 4 is a comparison circuit C in the LSI module 30 shown in FIG.
It is a detailed view of OMP23. When the two input data of the COMP 23 are a 0 to a 7 and b 0 to b 7 , respectively, the exclusive ORs of the two data are taken by the exclusive OR gates 60 to 67 for each bit. The outputs of the exclusive OR gates 60 to 63 from bit 0 to bit 3 are output as a signal line 320 through the OR gate 70, and the outputs of the exclusive OR gates 64 to 67 from bit 4 to bit 7 and DR The output of gate 70 is OR gate 71
Is output as a signal line 310. That is, the signal line 320 is a mismatch signal in the first 4 bits of the 8-bit data, and the signal line 310 is a mismatch signal of all the 8-bit data.
以上の説明のように、記憶制御部は2つのオペランドの
比較だけを行なうので簡単なハードウェアでしかも信号
ピンも少なくて済、高速に比較処理を行なうことが可能
となる。As described above, since the storage control unit only compares two operands, the hardware is simple and the number of signal pins is small, and the comparison processing can be performed at high speed.
本発明によれば、記憶制御部は2つのオペランドの一
致、不一致の比較だけを行ない、大小関係は演算器部に
必要なデータだけを転送し演算部にて判定することによ
り、オペランドを毎サイクル演算部へ転送する時間が省
け、しかも記憶制御部でのデータ幅で処理でき簡単なハ
ードウェアで信号ピンの数も増大せず比較論理演算が高
速に処理できる。According to the present invention, the storage control unit only compares the two operands for coincidence and non-coincidence. For the magnitude relation, only the necessary data is transferred to the arithmetic unit and the arithmetic unit judges the operands every cycle. The time to transfer to the arithmetic unit can be saved, and the comparison logic operation can be processed at high speed without increasing the number of signal pins with the simple hardware that can be processed with the data width in the storage control unit.
第1図は本発明の一実施例を示す構成図、第2図は第1
図の構成例での可変長の比較論理演算のマイクロプログ
ラムフローの例、第3図は記憶制御部をビット単位に分
割した時の構成例、第4図は第3図での比較回路の詳細
図である。 1……記憶部,2……記憶制御部,30……演算部,4……実
行制御部,20,21,30,31……データレジスタ,22……整合
回路,23……比較回路,24……選択回路,32……演算器,33
……条件コード設定回路,40……比較終了回路,43……テ
ストマトリクスFIG. 1 is a block diagram showing an embodiment of the present invention, and FIG.
An example of a microprogram flow of a variable length comparison logical operation in the configuration example of FIG. 3, FIG. 3 is an example of the configuration when the storage control unit is divided into bit units, and FIG. 4 is a detail of the comparison circuit in FIG. It is a figure. 1 ... storage unit, 2 ... storage control unit, 30 ... arithmetic unit, 4 ... execution control unit, 20, 21, 30, 31 ... data register, 22 ... matching circuit, 23 ... comparison circuit, 24 …… Selection circuit, 32 …… Calculator, 33
...... Condition code setting circuit, 40 …… Comparison end circuit, 43 …… Test matrix
Claims (1)
出す記憶制御部と、該記憶制御部により前記記憶部から
読み出されたオペランドを処理する演算部を具備し、前
記記憶部と前記記憶制御部とのデータ転送幅が前記記憶
制御部と前記演算部とのデータ転送幅よりも大きいデー
タ処理装置であって、前記記憶制御部は前記記憶部から
読み出した第1及び第2のオペランドを格納するための
第1及び第2のデータレジスタと、前記記憶制御部と前
記演算部間のデータ転送幅単位で前記第1及び第2のデ
ータレジスタに格納された前記第1及び第2のオペラン
ドを比較する比較器と、該比較器が不一致を検出したと
きに前記第1及び第2のオペランドの不一致部分を選択
して前記演算部へ送出するセレクタとを有し、前記演算
部は送出されてきた前記第1及び第2のオペランドの不
一致部分の大小判定を行う演算器を有することを特徴と
するデータ処理装置。1. A storage unit, a storage control unit for reading an operand from the storage unit, and an arithmetic unit for processing an operand read from the storage unit by the storage control unit. A data processing device having a data transfer width with the control unit larger than a data transfer width with the storage control unit and the arithmetic unit, wherein the storage control unit stores the first and second operands read from the storage unit. First and second data registers for storing, and the first and second operands stored in the first and second data registers in units of data transfer width between the storage control unit and the arithmetic unit And a selector for selecting the mismatched portion of the first and second operands and sending it to the arithmetic unit when the comparator detects a mismatch, and the arithmetic unit sends Enemy The data processing apparatus characterized by having an arithmetic unit for performing size determination of the unmatched portion of said first and second operand.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP60212328A JPH0797309B2 (en) | 1985-09-27 | 1985-09-27 | Data processing device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP60212328A JPH0797309B2 (en) | 1985-09-27 | 1985-09-27 | Data processing device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS6273330A JPS6273330A (en) | 1987-04-04 |
| JPH0797309B2 true JPH0797309B2 (en) | 1995-10-18 |
Family
ID=16620718
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP60212328A Expired - Lifetime JPH0797309B2 (en) | 1985-09-27 | 1985-09-27 | Data processing device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0797309B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0831032B2 (en) * | 1990-08-29 | 1996-03-27 | 三菱電機株式会社 | Data processing device |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS58109932A (en) * | 1981-12-24 | 1983-06-30 | Toshiba Eng Co Ltd | Comparison and arithmetic device for electronic computer |
-
1985
- 1985-09-27 JP JP60212328A patent/JPH0797309B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPS6273330A (en) | 1987-04-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP0263288B1 (en) | Extended floating point operations supporting emulation of source instruction execution | |
| US3702988A (en) | Digital processor | |
| US4719565A (en) | Interrupt and trap handling in microprogram sequencer | |
| US4999802A (en) | Floating point arithmetic two cycle data flow | |
| US3675214A (en) | Processor servicing external devices, real and simulated | |
| JPH04296937A (en) | Hardware-data-string-operatiion controller and method for performing main-storage-string operation | |
| JP3578883B2 (en) | Data processing device | |
| US6078940A (en) | Microprocessor with an instruction for multiply and left shift with saturate | |
| US4631672A (en) | Arithmetic control apparatus for a pipeline processing system | |
| JP2993975B2 (en) | Central processing unit | |
| US4309753A (en) | Apparatus and method for next address generation in a data processing system | |
| US5276822A (en) | System with enhanced execution of address-conflicting instructions using immediate data latch for holding immediate data of a preceding instruction | |
| US4924377A (en) | Pipelined instruction processor capable of reading dependent operands in parallel | |
| JPH0797309B2 (en) | Data processing device | |
| US7406590B2 (en) | Methods and apparatus for early loop bottom detection in digital signal processors | |
| US5673409A (en) | Self-defining instruction size | |
| JP2826927B2 (en) | Arithmetic processing device and processing method | |
| JP2542120B2 (en) | Information processing device | |
| JP2583614B2 (en) | Vector arithmetic unit | |
| JP2615746B2 (en) | Bit operation circuit | |
| JP2002108604A (en) | Table conversion in SIMD type microprocessor | |
| JPH04316127A (en) | Information processor | |
| JPH0266625A (en) | Data processor | |
| JPH01217628A (en) | Data processor | |
| JPS62288940A (en) | Information processor |