JPH0820947B2 - Data processing device - Google Patents

Data processing device

Info

Publication number
JPH0820947B2
JPH0820947B2 JP63302902A JP30290288A JPH0820947B2 JP H0820947 B2 JPH0820947 B2 JP H0820947B2 JP 63302902 A JP63302902 A JP 63302902A JP 30290288 A JP30290288 A JP 30290288A JP H0820947 B2 JPH0820947 B2 JP H0820947B2
Authority
JP
Japan
Prior art keywords
data
flag
information
bus
operand
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP63302902A
Other languages
Japanese (ja)
Other versions
JPH02148222A (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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP63302902A priority Critical patent/JPH0820947B2/en
Publication of JPH02148222A publication Critical patent/JPH02148222A/en
Publication of JPH0820947B2 publication Critical patent/JPH0820947B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Description

【発明の詳細な説明】 産業上の利用分野 本発明はデータ処理装置に関するものである。Description: FIELD OF THE INVENTION The present invention relates to a data processing device.

従来の技術 第3図は従来のデータ処理装置を示すものであり、10
1は演算を行う演算装置である。102は外部からデータを
取り込むバス制御装置である。103は演算装置101及びバ
ス制御装置102の出力データを転送する出力データ用バ
スである。104は出力データバス103上のデータを入力す
るレジスタファイルである。105は出力データバス103の
データを読み込みフラグ生成のためのデータに依存した
情報を生成するフラグ情報生成装置である。106はフラ
グ情報生成装置105で生成された情報と演算装置101の演
算実行で生成されるフラグ生成のための演算に依存した
情報からフラグを生成するフラグ生成制御装置である。
Prior Art FIG. 3 shows a conventional data processing device.
Reference numeral 1 is a computing device that performs computation. Reference numeral 102 is a bus control device for fetching data from the outside. An output data bus 103 transfers the output data of the arithmetic unit 101 and the bus control unit 102. Reference numeral 104 is a register file for inputting data on the output data bus 103. Reference numeral 105 denotes a flag information generation device that reads data from the output data bus 103 and generates information depending on the data for flag generation. Reference numeral 106 denotes a flag generation control device that generates a flag from the information generated by the flag information generation device 105 and the information that depends on the calculation for flag generation generated by the arithmetic operation of the arithmetic device 101.

以上のように構成されたデータ処理装置について、以
下にその動作について説明する。まず外部メモリよりデ
ータをデータ処理装置内部の汎用レジスタに転送する命
令(以下ロード命令とする)の動作を説明する。バス制
御装置102が外部よりデータを取り込み出力データ用バ
ス103にデータを出力する。そして出力データ用バス103
上のデータをレジスタファイル104が読み込み汎用レジ
スタに書き込む。それと同時にフラグ情報生成装置105
が出力データ用バス103のデータよりフラグ生成のため
の情報を生成しフラグ生成制御装置106がフラグを生成
し命令の実行が終了する。次にデータを加算しレジスタ
に書き込む命令(以下加算命令とする)の動作を表す。
演算装置101が演算するデータを取り込み加算を行い出
力データ用バス103に加算結果を出力する。そして出力
データ用バス103上の加算結果をレジスタに書き込む。
この場合も上記のロード命令と同じようにフラグ情報生
成装置105が出力データ用バス103上の加算結果よりフラ
グ生成のためのデータに依存した情報を生成し、フラグ
生成制御装置106がその情報と、演算装置101の演算実行
で生成されるフラグ生成のための演算に依存した情報よ
りフラグを生成し命令の実行が終了する。
The operation of the data processing apparatus configured as described above will be described below. First, the operation of an instruction (hereinafter referred to as a load instruction) for transferring data from an external memory to a general-purpose register inside the data processing device will be described. The bus controller 102 takes in data from the outside and outputs the data to the output data bus 103. And output data bus 103
The register file 104 reads the above data and writes it to a general-purpose register. At the same time, the flag information generator 105
Generates information for flag generation from the data of the output data bus 103, the flag generation control device 106 generates a flag, and the execution of the instruction ends. Next, the operation of an instruction for adding data and writing it to the register (hereinafter referred to as an addition instruction) is shown.
The data calculated by the arithmetic unit 101 is fetched and added, and the addition result is output to the output data bus 103. Then, the addition result on the output data bus 103 is written in the register.
Also in this case, the flag information generation device 105 generates information dependent on the data for flag generation from the addition result on the output data bus 103 in the same manner as the load instruction, and the flag generation control device 106 stores the information. The flag is generated from the information depending on the calculation for flag generation generated by the arithmetic operation of the arithmetic unit 101, and the execution of the instruction is completed.

発明が解決しようとする課題 しかしながらこの構成においては命令、特に高機能命
令を高速に実行する。つまり、オペランドフェッチとデ
ータの格納のない比較命令を同時に実行しようとしても
オペランドフェッチしているときは出力データ用バス10
3上にオペランドフェッチしたデータがありフラグ情報
生成装置105はオペランドフェッチしたデータを読み込
みフラグ生成のための情報を生成し、フラグ生成制御装
置106はその情報によってフラグを生成するのでオペラ
ンドフェッチと比較命令を同時に実行できないという課
題を有していた。
However, in this configuration, instructions, especially highly functional instructions, are executed at high speed. That is, even if an operand fetch and a comparison instruction with no data storage are executed at the same time, the output data bus 10
3 has operand fetched data, the flag information generation device 105 reads the operand fetched data and generates information for flag generation, and the flag generation control device 106 generates a flag based on that information, so operand fetch and comparison instructions Had the problem that they could not be executed simultaneously.

本発明はかかる点に鑑み、若干のハードウェアの増加
で、フラグ反映の必要がないオペランドフェッチと演算
結果を書き込む必要がなくフラグ反映のみを行えばよい
演算を並列同時実行できるデータ処理装置を提供するこ
とを目的とする。
In view of such a point, the present invention provides a data processing apparatus capable of executing parallel and parallel operations by only slightly increasing hardware and performing operand fetches that do not need to reflect flags and operations that do not need to write operation results and need only reflect flags. The purpose is to do.

課題を解決するための手段 本発明は演算を行う1つまたは複数の演算装置と、前
記演算装置の出力データを転送する出力データ用バス
と、オペランドデータを転送するオペランドフェッチ用
バスと、前記出力データ用バスと前記オペランドフェッ
チ用バスを選択するデータ選択装置と、前記出力データ
用バスのデータを読み込みデータよりフラグ生成のため
のデータに依存した情報を生成する出力データ用フラグ
情報生成装置と、前記オペランドフェッチ用バスのデー
タを読み込みデータよりフラグ生成のためのデータに依
存した情報を生成するオペランドデータ用フラグ情報生
成装置と、前記出力データ用フラグ情報生成装置からの
出力と前記オペランドデータ用フラグ情報生成装置から
の出力を選択するフラグ情報選択装置と、前記フラグ情
報選択装置で選択されたフラグ生成のためのデータに依
存した情報と前記演算装置の演算実行で生成されるフラ
グ生成のために演算に依存した情報を入力し前記情報よ
りフラグを生成するフラグ生成制御装置を備えたデータ
処理装置である。
Means for Solving the Problems The present invention provides one or a plurality of arithmetic units for performing an operation, an output data bus for transferring output data of the arithmetic unit, an operand fetch bus for transferring operand data, and the output. A data selection device for selecting a data bus and the operand fetch bus; an output data flag information generation device for generating data-dependent information for reading the data of the output data bus from the read data; An operand data flag information generation device for generating information depending on data for reading a flag from the data of the operand fetch bus, and an output from the output data flag information generation device and the operand data flag A flag information selection device for selecting an output from the information generation device; A flag for inputting information dependent on the data for flag generation selected by the information selection device and information dependent on the operation for flag generation generated by the arithmetic operation of the arithmetic device and generating a flag from the information It is a data processing device provided with a generation control device.

作用 本発明は前記した構成により、オペランドフェッチで
はデータ選択装置はオペランドフェッチ用バスを選択し
オペランドフェッチしてきたデータをレジスタファイル
内のレジスタに書き込むと同時に、フラグ情報選択装置
はオペランドデータ用フラグ情報生成装置を選択してフ
ラグを生成できる。また演算実行ではデータ選択装置は
出力データ用バスを選択し演算装置で実行した演算の結
果をレジスタファイル内のレジスタに書き込むと同時
に、フラグ情報選択装置は出力データ用フラグ情報生成
装置を選択してフラグを生成できる。そしてフラグへの
反映を行わないオペランドフェッチではデータ選択装置
はオペランドフェッチ用バスを選択しオペランドフェッ
チしたデータをレジスタファイル内のレジスタに書き込
むのと同時に、フラグ情報選択装置は出力データ用フラ
グ情報生成装置を選択して演算装置で実行した演算結果
を書き込む必要のない演算のフラグ反映のみを行うこと
ができる。従って、フラグ反映する必要のないオペラン
ドフェッチと演算結果を書き込む必要がなくフラグ反映
のみを行う演算を並列に実行することが可能であり、高
機能命令等の命令の実行サイクルが削減でき高速化でき
る。
According to the present invention having the above-described structure, in the operand fetch, the data selection device selects the operand fetch bus and writes the operand fetched data in the register in the register file, and at the same time, the flag information selection device generates the operand data flag information. You can select a device and generate a flag. Further, in the operation execution, the data selection device selects the output data bus and writes the result of the operation executed by the operation device into the register in the register file, and at the same time, the flag information selection device selects the output data flag information generation device. Can generate flags. In the operand fetch that does not reflect in the flag, the data selection device selects the operand fetch bus and writes the operand fetched data to the register in the register file, and at the same time, the flag information selection device is the output data flag information generation device. It is possible to reflect only the flag of an operation that does not require writing the operation result executed by the operation device by selecting. Therefore, it is possible to execute an operand fetch that does not need to reflect the flag and an operation that does not need to write the operation result and only reflect the flag in parallel, and it is possible to reduce the execution cycle of instructions such as high-performance instructions and speed up. .

実 施 例 第1図は本発明のデータ処理装置の構成図である。第
1図において1は演算を行う演算装置である。2は演算
装置1の出力データを転送する出力データ用バスであ
る。3は外部からのデータの取り込みを制御するバス制
御装置である。4はバス制御装置3データを転送するオ
ペランドフェッチ用バスである。5は出力データ用バス
2とオペランドフェッチ用バス4を選択するデータ選択
装置である。6はデータ選択装置5で選択されたデータ
を入力するレジスタファイルである。7は出力データ用
バス2のデータを読み込みそのデータよりフラグ生成の
ためのデータに依存した情報を生成する出力データ用フ
ラグ情報生成装置である。8はオペランドフェッチ用バ
ス4のデータを読み込みそのデータよりフラグ生成のた
めのデータに依存した情報を生成するオペランドデータ
用フラグ情報生成装置である。9は出力データ用フラグ
情報生成装置7からの出力とオペランドデータ用フラグ
情報生成装置8からの出力を選択するフラグ情報選択装
置である。10はフラグ情報選択装置9で選択されたフラ
グ生成のためのデータに依存した情報と演算装置1の演
算実行で生成されるフラグ生成のための演算に依存した
情報を入力しフラグを生成するフラグ生成制御装置であ
る。
Practical Example FIG. 1 is a block diagram of a data processing apparatus of the present invention. In FIG. 1, reference numeral 1 is an arithmetic unit for performing arithmetic operations. An output data bus 2 transfers the output data of the arithmetic unit 1. Reference numeral 3 is a bus control device for controlling the fetching of data from the outside. Reference numeral 4 is an operand fetch bus for transferring the data of the bus controller 3. Reference numeral 5 is a data selection device for selecting the output data bus 2 and the operand fetch bus 4. Reference numeral 6 is a register file for inputting the data selected by the data selection device 5. Reference numeral 7 is an output data flag information generation device that reads data from the output data bus 2 and generates information depending on the data for flag generation from the data. Reference numeral 8 denotes an operand data flag information generation device for reading data from the operand fetch bus 4 and generating information depending on the data for flag generation from the data. Reference numeral 9 is a flag information selection device for selecting an output from the output data flag information generation device 7 and an output from the operand data flag information generation device 8. Reference numeral 10 is a flag for inputting the information dependent on the data for flag generation selected by the flag information selection device 9 and the information dependent on the operation for flag generation generated by the arithmetic operation of the arithmetic unit 1 to generate a flag. It is a generation control device.

以上のように構成された本実施例について、以下に動
作を説明する。ロード命令では、バス制御装置3が外部
よりデータを取り込みオペランドフェッチ用バス4にデ
ータを出力する。そしてデータ選択装置5がオペランド
フェッチ用バス4側を選択し、レジスタファイル6がデ
ータを読み込みレジスタに書き込む。それと同時にオペ
ランドデータ用フラグ情報生成装置8がオペランドフェ
ッチ用バス4上のデータを読み込みフラグ反映のための
データに依存する情報を生成する。そしてフラグ情報選
択装置9がオペランドデータ用フラグ情報生成装置8側
を選択しその情報よりフラグ生成制御装置10がフラグを
生成し命令の実行が終了する。加算命令では、演算装置
1がデータを取り込み加算を行い出力データ用バス2に
加算結果を出力する。そしてデータ選択装置5が出力デ
ータ用バス2側を選択し加算結果をレジスタファイル6
が読み込みレジスタに書き込む。これと同時に出力デー
タ用フラグ情報生成装置7が出力データ用バス2上のデ
ータを読み込みフラグ生成のためのデータに依存した情
報を生成する。そしてフラグ情報選択装置9が出力デー
タ用フラグ情報生成装置7側を選択しフラグ生成制御装
置10がそのデータに依存した情報と演算装置1内で生成
されるフラグ生成のための演算に依存した情報よりフラ
グを生成し命令の実行が終了する。
The operation of the present embodiment configured as described above will be described below. In the load instruction, the bus controller 3 takes in data from the outside and outputs the data to the operand fetch bus 4. Then, the data selection device 5 selects the operand fetch bus 4 side, and the register file 6 reads the data and writes it in the register. At the same time, the operand data flag information generation device 8 reads the data on the operand fetch bus 4 and generates information depending on the data for reflecting the flag. Then, the flag information selection device 9 selects the operand data flag information generation device 8 side, the flag generation control device 10 generates a flag from the information, and the execution of the instruction ends. In the addition instruction, the arithmetic unit 1 takes in the data, adds it, and outputs the addition result to the output data bus 2. Then, the data selection device 5 selects the output data bus 2 side and the addition result is registered in the register file 6
Writes to the read register. At the same time, the output data flag information generation device 7 reads the data on the output data bus 2 and generates information depending on the data for flag generation. Then, the flag information selection device 9 selects the output data flag information generation device 7 side, and the flag generation control device 10 depends on the data and the operation-dependent information generated in the arithmetic device 1 for flag generation. The flag is generated and the execution of the instruction ends.

高機能命令は複数の基本命令に展開できるので1つの
高機能命令に複数のオペランドフェッチや演算実行が存
在する。また高機能命令の展開中に表れるオペランドフ
ェッチはフラグ反映を必要としない場合があり、演算実
行命令の中には比較命令のように演算結果の書き込みが
なく演算を行いフラグ反映のみを必要とするものがあ
る。従って、両者を同時実行する場合にはバス制御装置
3が外部よりデータを取り込みオペランドフェッチ用バ
ス4にデータを出力し、データ選択装置5がオペランド
フェッチ用バス4側を選択しレジスタファイル6がオペ
ランドフェッチしてきたデータを読み込みレジスタに書
き込む。それと同じサイクルで演算装置1がデータを取
り込み演算を行い出力データ用バス2に演算結果を出力
し、出力データ用フラグ情報生成装置7が出力データ用
バス2上のデータを読み込みフラグ生成のためのデータ
に依存した情報を生成する。そしてフラグ情報選択装置
9が出力データ用フラグ情報生成装置7側を選択しフラ
グ生成制御装置10がその演算結果に依存する情報と演算
装置1内で生成されるフラグ生成のための演算に依存し
た情報よりフラグを生成する。以上のように、高機能命
令等でフラグ反映を行わないオペランドフェッチと、演
算結果を書き込まずフラグ反映のみを行う演算実行があ
る場合にはその2つを同時に実行することができる。
Since a high-performance instruction can be expanded into a plurality of basic instructions, one high-function instruction has a plurality of operand fetches and operation executions. In addition, the operand fetch that appears during the development of a high-performance instruction may not need to reflect the flag, and some operation execution instructions do not have to write the operation result like the comparison instruction and do the operation and only need to reflect the flag. There is something. Therefore, when both are executed simultaneously, the bus control device 3 takes in data from the outside and outputs the data to the operand fetch bus 4, the data selection device 5 selects the operand fetch bus 4 side, and the register file 6 operates the operands. Write the fetched data in the read register. In the same cycle, the arithmetic unit 1 takes in data, performs arithmetic operation, outputs the arithmetic result to the output data bus 2, and the output data flag information generation unit 7 reads the data on the output data bus 2 to generate a flag. Generate data-dependent information. Then, the flag information selection device 9 selects the output data flag information generation device 7 side, and the flag generation control device 10 depends on the information depending on the calculation result and the calculation for generating the flag generated in the calculation device 1. Generate flags from information. As described above, if there is an operand fetch in which a flag is not reflected in a high-performance instruction or the like and an operation execution in which an operation result is not written and only a flag is reflected, the two can be executed at the same time.

以上のことより高機能命令などでは命令実行のサイク
ル数を減少することができ命令実行の高速化がはかれ
る。
From the above, in the case of a high-performance instruction, the number of instruction execution cycles can be reduced and the instruction execution speed can be increased.

例えば、R0の内容をスタートアドレスとするメモリ上
のデータ(src1)とR1の内容をスタートアドレスとする
メモリ上のデータ(src2)を1バイトずつ比較しsrc1と
src2が等しい限りアドレスを1バイトずつ増加して比較
を繰り返す命令(以下ストリングコンペア命令とする)
があるとする。但し、この繰り返しの比較の終了条件と
してsrc1とsrc2が等しくない場合、src1とR3の内容(終
了条件比較値)が等しい場合、R2の内容(比較するデー
タ数)が0になった場合の3つがありこの条件を満たせ
ば比較を終了するものとする。上記のストリングコンペ
ア命令を従来のデータ処理装置の構成で実行した場合の
マイクロコードの展開の説明図を第4図に示す。以下順
にサイクル毎に説明する。但し図中のマイクロコード展
開の1行が実行サイクルに相当するものとする。まず第
1サイクルで演算装置101でR2の内容より1を減じて出
力データ用バス103を介してレジスタファイル104内のR2
に書き込む。次に第2サイクルでR0の内容をアドレスと
するメモリ上のデータをバス制御装置102がフェッチしt
mp1(レジスタファイル104内のワークレジスタ)に書き
込む。次も同様にR1の内容をアドレスとするメモリ上の
データを制御装置102がフェッチしtmp2(レジスタファ
イル104内のワークレジスタ)に書き込む。第4サイク
ルで演算装置101でR0の内容を1増加させて出力データ
用バス103に出力しレジスタファイル104のR0に書き込
む。同様に第5サイクルでは演算装置101でR1の内容を
1増加させて出力データ用バス103を介してR1に書き込
む。第6、第7、第8サイクルでは演算装置101で減算
を行い出力データ用バス103に出力しフラグ情報生成装
置105がデータよりフラグ生成のためのデータに依存し
た情報を生成しフラグ生成制御装置106がそのデータに
依存した情報と演算装置101からのフラグ生成のための
演算に依存する情報よりフラグを生成することにより終
了条件のチェックを行っている。ここで終了条件が満た
せばlabel1に分岐して命令を終了し、満たさなければlo
opに分岐して比較を繰り返す。このようにストリングの
比較が続く場合マイクロコードはループして実行を行っ
ている。そのループ内の実行サイクルは9であるので命
令が終了するまでにn回ループしたとすると命令の実行
サイクルは9nとなる。
For example, compare the data (src1) on the memory with the content of R0 as the start address with the data (src2) on the memory with the content of R1 as the start address byte by byte.
An instruction that increments the address by 1 byte and repeats the comparison as long as the src2 is the same (hereinafter referred to as a string compare instruction)
There is. However, when src1 and src2 are not equal as the end condition of this repeated comparison, when src1 and R3 contents (end condition comparison value) are equal, and when R2 contents (number of data to be compared) become 0, 3 If there is one, and this condition is met, the comparison will end. FIG. 4 shows an explanatory diagram of the development of the microcode when the above string compare instruction is executed by the configuration of the conventional data processing device. Each cycle will be described below in sequence. However, one line of the microcode expansion in the figure corresponds to an execution cycle. First, in the first cycle, the arithmetic unit 101 subtracts 1 from the contents of R2 and the R2 in the register file 104 is transferred via the output data bus 103.
Write in. Next, in the second cycle, the bus controller 102 fetches the data in the memory whose address is the content of R0, and t
Write to mp1 (work register in register file 104). Similarly, the controller 102 fetches the data on the memory having the content of R1 as an address and writes it in tmp2 (work register in the register file 104). In the fourth cycle, the arithmetic unit 101 increments the content of R0 by 1, outputs it to the output data bus 103, and writes it to R0 of the register file 104. Similarly, in the fifth cycle, the arithmetic unit 101 increments the content of R1 by 1 and writes it to R1 via the output data bus 103. In the sixth, seventh, and eighth cycles, the arithmetic unit 101 performs subtraction and outputs it to the output data bus 103, and the flag information generation unit 105 generates the information dependent on the data for flag generation from the data and the flag generation control unit. The termination condition is checked by generating a flag from the information depending on the data and the information depending on the calculation for flag generation from the arithmetic unit 101. If the end condition is satisfied here, branch to label1 to end the instruction, and if not satisfied, lo
Branch to op and repeat the comparison. If the string comparison continues in this way, the microcode is looping and executing. Since the execution cycle in the loop is 9, if the instruction is looped n times before the end, the execution cycle of the instruction becomes 9n.

次に同じストリングコンペア命令を上記実施例の構成
で実行した場合のマイクロコード展開の説明図を第2図
に示す。まず第1サイクルでは演算装置1がR2の内容か
ら1を減じて出力データ用バス2に出力し、データ選択
装置5が出力データ用バス2側に選択されレジスタファ
イル6内のR2にデータが書き込まれる。第2サイクルで
はバス制御装置3が外部よりデータを取り込みオペラン
ドフェッチ用バス4に出力し、データ選択装置5はオペ
ランドフェッチ用バス4側を選択しレジスタファイル6
内のワークレジスタ(tmp1)に書き込む。それと同時に
演算装置1はR2と0の減算を行い結果を出力データ用バ
ス2に出力し、出力データ用フラグ情報生成装置7がデ
ータを読み込みフラグ生成のためのデータに依存した情
報を生成し、フラグ情報選択装置9が出力データ用フラ
グ情報生成装置7側を選択しこのデータに依存した情報
と演算装置1から出力されるフラグ生成のための演算に
依存した情報とからフラグ生成制御装置10がフラグを生
成し、これより終了条件をチェックする。同じように第
3サイクルではオペランドフェッチしてきたデータをデ
ータ選択装置5をオペランドフェッチ用バス4側に選択
することによりワークレジスタ(tmp2)に書き込む。そ
れと同じサイクルで演算装置1でtmp1の内容とR3の内容
を減算して出力データ用バス2に出力しフラグ情報選択
装置9を出力データ用フラグ情報生成装置7側にするこ
とにより演算結果よりフラグを生成し終了条件のチェッ
クを行っている。第4、第5サイクルでは第1サイクル
と同じように演算装置1で加算を行いデータ選択装置5
を出力データ用バス2側にしレジスタファイル6内のレ
ジスタに書き込む。第6サイクルでは終了条件をチェッ
クし終了条件を満たせば終了し、満たさなければloopに
分岐して比較を繰り返す。以上のように本実施例ではフ
ラグ反映を行わないオペランドフェッチと、レジスタに
書き込まずフラグ反映のみを行う演算実行を同時に実行
することができるので、従来の構成では1サイクルかけ
て行っていた終了条件のチェックをオペランドフェッチ
と同時に行うことができる。第2図の第2、第3サイク
ルがオペランドフェッチと終了条件のチェックを同時に
行っているサイクルである。これよりマイクロコード展
開のループ内のサイクル数は従来のものより2サイクル
減り命令の実行サイクルは7nとなる。従って、従来の構
成での命令実行より2nサイクル高速に実行でき、特に繰
り返し回数が多い場合にはその効果は大きい。
Next, FIG. 2 shows an explanatory diagram of the microcode expansion when the same string compare instruction is executed with the configuration of the above embodiment. First, in the first cycle, the arithmetic unit 1 subtracts 1 from the content of R2 and outputs it to the output data bus 2, the data selection unit 5 is selected on the output data bus 2 side, and the data is written to R2 in the register file 6. Be done. In the second cycle, the bus control device 3 fetches data from the outside and outputs it to the operand fetch bus 4, and the data selection device 5 selects the operand fetch bus 4 side and selects the register file 6
Write to the work register (tmp1). At the same time, the arithmetic unit 1 subtracts R2 from 0 and outputs the result to the output data bus 2. The output data flag information generation unit 7 reads the data and generates information dependent on the data for flag generation, The flag information selection device 9 selects the output data flag information generation device 7 side, and the flag generation control device 10 determines from the information dependent on this data and the information dependent on the operation for flag generation output from the arithmetic device 1. Generate a flag and check the end condition from this. Similarly, in the third cycle, the data fetched from the operand is written in the work register (tmp2) by selecting the data selection device 5 on the side of the operand fetch bus 4. In the same cycle, the arithmetic unit 1 subtracts the contents of tmp1 and the contents of R3 and outputs them to the output data bus 2, and the flag information selection unit 9 is set to the output data flag information generation unit 7 side so that the operation result is flagged. Is generated and the end condition is checked. In the fourth and fifth cycles, the arithmetic unit 1 performs addition in the same manner as in the first cycle, and the data selection unit 5
Is set to the output data bus 2 side and written in the register in the register file 6. In the sixth cycle, the end condition is checked, and if the end condition is satisfied, the process ends. If it does not, the process branches to loop and repeats the comparison. As described above, in this embodiment, the operand fetch not reflecting the flag and the operation execution not writing to the register but only reflecting the flag can be executed at the same time. Can be checked at the same time as the operand fetch. The second and third cycles of FIG. 2 are the cycles in which the operand fetch and the end condition are checked at the same time. As a result, the number of cycles in the microcode expansion loop is reduced by 2 cycles compared to the conventional one, and the instruction execution cycle becomes 7n. Therefore, the instruction can be executed 2n cycles faster than the conventional instruction execution, and the effect is great especially when the number of repetitions is large.

さらに、本発明では出力データ用バスに演算装置を複
数接続したとしても演算結果のデータに依存するフラグ
生成のための情報を生成する装置は出力データ用バスに
1つ接続するだけですみ、若干のハードウェアの増加だ
けで実現できるのでこの効果は大きい。
Further, according to the present invention, even if a plurality of arithmetic devices are connected to the output data bus, only one device for generating information for flag generation depending on the data of the operation result is connected to the output data bus. This effect is great because it can be realized only by increasing the hardware.

発明の効果 以上説明したように、本発明によれば、フラグ反映を
行わなければならない命令に対しては、オペランドフェ
ッチの場合、フラグ情報選択装置をオペランドフェッチ
用バスに選択し、演算実行の場合、フラグ情報選択装置
を出力データ用バスに選択することによりオペランドフ
ェッチや演算実行にともなってフラグ反映ができる。
又、高機能命令などで表れるフラグを反映する必要のな
いオペランドフェッチに対しては、フェッチしてきたデ
ータはデータ選択装置をオペランドフェッチ用バスに選
択することによりレジスタに書き込み、それと同時に演
算結果を書き込まない演算を演算装置で実行しフラグ情
報選択装置を出力データ用バスに選択することにより、
オペランドフェッチと同時に選択結果をフラグに反映す
ることができる。すなわち、フラグ反映を必要としない
オペランドフェッチと演算結果を書き込む必要のない演
算を並列に実行することが可能であり、命令の実行サイ
クルを減少することができ、命令の実行を高速化でき
る。特に、高機能命令のように繰り返し実行を行う命令
のループ内にオペランドフェッチがある場合には効果が
大きくなる。その上、本発明では出力データ用バスに演
算装置を複数接続したとしても演算結果のデータに依存
するフラグ生成のための情報を生成する装置は出力デー
タ用バスに1つ接続するだけですみ、若干のハードウェ
アの増加だけで実現できるのでその実用的効果は大き
い。
As described above, according to the present invention, in the case of an operand fetch, in the case of an operand fetch, the flag information selection device is selected as the operand fetch bus and the operation is executed. By selecting the flag information selection device for the output data bus, it is possible to reflect the flag along with the operand fetch and the operation execution.
For operand fetches that do not need to reflect the flags that appear in high-function instructions, the fetched data is written to the register by selecting the data selection device on the operand fetch bus, and at the same time the operation result is written. By executing a non-operation in the arithmetic unit and selecting the flag information selection unit for the output data bus,
The selection result can be reflected in the flag at the same time as the operand fetch. That is, it is possible to execute an operand fetch that does not need to reflect a flag and an operation that does not need to write an operation result in parallel, reduce the instruction execution cycle, and speed up the instruction execution. In particular, when the operand fetch is in a loop of an instruction that is repeatedly executed, such as a high-performance instruction, the effect becomes large. Moreover, in the present invention, even if a plurality of arithmetic devices are connected to the output data bus, only one device that generates information for flag generation depending on the data of the operation result is connected to the output data bus. The practical effect is great because it can be realized with a slight increase in hardware.

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

第1図は本発明の一実施例の構成を示すブロック図、第
2図は上記実施例で高機能命令を実行する場合のマイク
ロコードの展開の説明図、第3図は従来のデータ処理装
置を示す構成図、第4図は従来のデータ処理装置で高機
能命令を実行する場合のマイクロコードの展開の説明図
である。 1……演算装置、2……出力データ用バス、 3……バス制御装置、 4……オペランドフェッチ用バス、 5……データ選択装置、6……レジスタファイル、 7……出力データ用フラグ情報生成装置、 8……オペランドデータ用フラグ情報生成装置、 9……フラグ情報選択装置、 10……フラグ生成制御装置、 101……演算装置、102……バス制御装置、 103……出力データ用バス、 104……レジスタファイル、 105……フラグ情報生成装置、 106……フラグ生成制御装置。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention, FIG. 2 is an explanatory diagram of the expansion of microcode when executing a high-performance instruction in the above embodiment, and FIG. 3 is a conventional data processing device. FIG. 4 is a diagram showing the construction of a microcode when a high-performance instruction is executed in a conventional data processing device. 1 ... Arithmetic unit, 2 ... Output data bus, 3 ... Bus control unit, 4 ... Operand fetch bus, 5 ... Data selection unit, 6 ... Register file, 7 ... Output data flag information Generation device, 8 ... Operand data flag information generation device, 9 ... Flag information selection device, 10 ... Flag generation control device, 101 ... Arithmetic device, 102 ... Bus control device, 103 ... Output data bus , 104 ... register file, 105 ... flag information generation device, 106 ... flag generation control device.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 足立 恒三 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 (56)参考文献 特開 昭61−100836(JP,A) 特開 昭58−60355(JP,A) 特開 平2−100134(JP,A) ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Tsunezo Adachi 1006 Kadoma, Kadoma City, Osaka Prefecture Matsushita Electric Industrial Co., Ltd. (56) References JP 61-100836 (JP, A) JP 58- 60355 (JP, A) JP-A-2-100134 (JP, A)

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】演算を行う1つまたは複数の演算装置と、
前記演算装置の出力データを転送する出力データ用バス
と、オペランドデータを転送するオペランドフェッチ用
バスと、前記出力データ用バスと前記オペランドフェッ
チ用バスを選択するデータ選択装置と、前記データ選択
装置で選択したデータを格納するレジスタファイルと、
前記出力データ用バスのデータを読み込みデータよりフ
ラグ生成のためのデータに依存した情報を生成する出力
データ用フラグ情報生成装置と、前記オペランドフェッ
チ用バスのデータを読み込みデータよりフラグ生成のた
めのデータに依存した情報を生成するオペランドデータ
用フラグ情報生成装置と、前記出力データ用フラグ情報
生成装置からの出力と前記オペランドデータ用フラグ情
報生成装置からの出力を選択するフラグ情報選択装置
と、前記フラグ情報選択装置で選択されたフラグ生成の
ためのデータに依存した情報と前記演算装置の演算実行
で生成されるフラグ生成のための演算に依存した情報を
入力し前記情報よりフラグを生成するフラグ生成制御装
置を備え、オペランドフェッチの場合前記データ選択装
置は前記オペランドフェッチ用バスを選択し前記フラグ
情報選択装置は前記オペランドデータ用フラグ情報生成
装置を選択してオペランドフェッチと同時にフラグを生
成し、演算実行の場合前記データ選択装置は出力データ
用バスを選択し前記フラグ情報選択装置は前記出力デー
タ用フラグ情報生成装置を選択して演算実行と共にフラ
グを生成し、フラグ反映を行わないオペランドフェッチ
の場合前記データ選択装置はオペランドフェッチ用バス
を選択し前記フラグ情報選択装置は前記出力データ用フ
ラグ情報生成装置を選択してオペランドフェッチと演算
のフラグ反映を同時に実行できることを特徴とするデー
タ処理装置。
1. One or more arithmetic units for performing arithmetic operations,
An output data bus for transferring output data of the arithmetic unit, an operand fetch bus for transferring operand data, a data selection device for selecting the output data bus and the operand fetch bus, and the data selection device. A register file that stores the selected data,
A flag information generation device for output data, which generates information depending on the data for reading the data of the output data bus from the read data, and data for the flag generation from the read data of the operand fetch bus Operand information flag information generating device for generating information dependent on the flag, a flag information selecting device for selecting an output from the output data flag information generating device and an output from the operand data flag information generating device, and the flag Flag generation for inputting information dependent on data for flag generation selected by the information selection device and information dependent on calculation for flag generation generated by the arithmetic operation of the arithmetic device, and generating a flag from the information In the case of operand fetch, the data selection device includes a control device A bus for data selection, the flag information selection device selects the flag information generation device for operand data to generate a flag at the same time as the operand fetch, and when executing an operation, the data selection device selects the output data bus and The flag information selection device selects the output data flag information generation device to generate a flag while executing an operation, and in the case of an operand fetch that does not reflect the flag, the data selection device selects an operand fetch bus to select the flag information. A data processing device, wherein the device can select the output data flag information generating device and simultaneously execute operand fetch and operation flag reflection.
JP63302902A 1988-11-30 1988-11-30 Data processing device Expired - Fee Related JPH0820947B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63302902A JPH0820947B2 (en) 1988-11-30 1988-11-30 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63302902A JPH0820947B2 (en) 1988-11-30 1988-11-30 Data processing device

Publications (2)

Publication Number Publication Date
JPH02148222A JPH02148222A (en) 1990-06-07
JPH0820947B2 true JPH0820947B2 (en) 1996-03-04

Family

ID=17914483

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63302902A Expired - Fee Related JPH0820947B2 (en) 1988-11-30 1988-11-30 Data processing device

Country Status (1)

Country Link
JP (1) JPH0820947B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4021590B2 (en) * 1999-06-21 2007-12-12 東芝ソリューション株式会社 Floating point arithmetic unit
JP5866697B2 (en) * 2012-02-23 2016-02-17 株式会社エルイーテック CPU having a plurality of condition flags

Also Published As

Publication number Publication date
JPH02148222A (en) 1990-06-07

Similar Documents

Publication Publication Date Title
JPH10232779A (en) Instruction parallel processing method and apparatus
TW201823972A (en) Vector generation instruction
JP3237858B2 (en) Arithmetic unit
JPH0683582A (en) Data processing device
JP3834145B2 (en) Data processing apparatus having a microprocessor having a nestable delay branch instruction and a method of operating the microprocessor
US5390306A (en) Pipeline processing system and microprocessor using the system
JPH02148222A (en) data processing equipment
JP2861560B2 (en) Data processing device
JP3278441B2 (en) Vector processing equipment
JP3124361B2 (en) Memory data loading device
JP3441847B2 (en) Processor with data memory
JP2542120B2 (en) Information processing device
JPH10105399A (en) Data processing device
JP3523407B2 (en) Information processing equipment
JP2636566B2 (en) Pipeline control method
JP3068406B2 (en) Vector arithmetic unit
JPH0228828A (en) Maximum value and minimum value detecting circuit
JPS6386033A (en) Pipeline processing system
JPS6373335A (en) Information processor
JP2924004B2 (en) Instruction code transfer method
JPS6028014B2 (en) microprocessor
JPH01147723A (en) Pipe line processing system for information processor
JPH11143710A (en) Processing target value input device and program conversion device
JPH11203133A (en) Information processing device
JP2005134987A (en) Pipeline processing unit

Legal Events

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