JP4021590B2 - Floating point arithmetic unit - Google Patents
Floating point arithmetic unit Download PDFInfo
- Publication number
- JP4021590B2 JP4021590B2 JP17355499A JP17355499A JP4021590B2 JP 4021590 B2 JP4021590 B2 JP 4021590B2 JP 17355499 A JP17355499 A JP 17355499A JP 17355499 A JP17355499 A JP 17355499A JP 4021590 B2 JP4021590 B2 JP 4021590B2
- Authority
- JP
- Japan
- Prior art keywords
- arithmetic unit
- instruction
- exception
- floating point
- point arithmetic
- 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
Links
Images
Description
【0001】
【発明の属する技術分野】
本発明は、浮動小数点演算装置に関する。
【0002】
【従来の技術】
IEEE754に準拠した浮動小数点演算器を構成する場合には、浮動小数点演算結果である例外要因情報と、そのフラグ情報を持つことが規定されている。
図3は、従来の浮動小数点演算装置の構成を示す図である。浮動小数点演算装置は、例えば加減算器10、掛け算器12、割り算器/平方根14の3つの演算器で構成され、それぞれの演算器は独立して動作ている。そして、各演算器10、12、14から出力される例外要因情報とそのフラグ情報は、それぞれORゲート16、18を介して1つの状態レジスタ20に格納される構成となっている。また、状態レジスタ20には、各演算器10、12、14のMステージから出力される信号をORゲート22でORされた出力がイネーブル信号として入力されている。
この場合、状態レジスタ20のフラグ情報は、順不同に更新されて良いが、例外要因情報は最後に実行された命令の例外情報でなければならない制約がある。この為、例外要因情報はレジスタ単位で更新するといずれかを更新する可能性がある場合は、前の命令が完了するまで次の命令の実行が出来なくなる問題が生じていた。それを解決するために、後の実行命令に待ちを入れる必要があった。
【0003】
図4、図5は上述した従来の動作を示すのもで、図4は、オーバーラップさせた場合の例を示し、図5は待ちを入れた場合を示す。図4、図5において、Dは命令のデコードステージ、E1は第1の演算ステージ、E2は第2の演算ステージ、Mは例外検出ステージ、Wは演算結果の書き戻しステージを示す。
例えば、図4の例では割り算命令と加算命令とが並列実行される場合において、最後の命令が加算命令であったとすると、両命令は割り算器14と加減算器10によって同時に実行される。上記命令の処理速度は加減算器10の方が早く終了し、そのMステージで出力される例外要因情報はORゲート16を介して状態レジスタ20に入力され、同じくMステージのイネーブル信号によって状態レジスタ20の例外要因情報が更新される。
その後、割り算器14の割り算命令処理が終了して、そのMステージにて出力される例外情報は同様な手順で状態レジスタ20に記憶される。この場合、演算器の処理速度の違いにより、加算命令の例外要因情報の上に、割り算命令の例外要因情報が上書きされてしまうことになる。この為、最後に実行された加算命令であるにもかかわらず、例外要因情報が正しく記憶されない問題が発生する。
【0004】
これを解決するために、図5に示す例では、加算命令のE1ステージに待ち(STALL)を挿入する。そして、割り算命令のE2ステージが終了後、加算命令のE1ステージが実行され、同様にMステージで例外情報を状態レジスタ20に記憶する。この結果、図4に示した割り算命令によって出力される例外要因情報が上書きされることがなくなるが、加算命令の処理が遅れる欠点が発生する。
【0005】
【発明が解決しようとする課題】
上述したように、従来の浮動小数点演算装置では、状態レジスタに複数の情報が混在する場合に、不要な待ち時間が発生する欠点がある。
本発明は上記欠点を解決するためになされたもので、状態レジスタ内に複数の情報が混在する場合は、各々の命令に情報の更新権を持たせることによって複数の命令をオーバーラップして実行出来る浮動小数点演算装置を提供することを目的とする。
【0006】
【課題を解決するための手段】
上記目的を達成するために、本発明の浮動小数点演算装置は、それぞれ独立して命令を実行する異なる複数の演算器を有し、前記各演算器毎にその演算器の命令が発行された時にセットされ、別な演算器の命令が発行された時にリセットされる例外情報更新権ビットを持たせ、前記例外情報更新権ビットがセットされている前記演算器によってのみ例外情報を更新可能とすることを特徴とする。
また、本発明の浮動小数点演算装置は、異なる複数の演算器を有し、それぞれ独立して命令を実行する浮動小数点演算器と、前記浮動小数点演算器の各演算器毎に内蔵され、その演算器の命令が発行された時にセットされ、別な演算器の命令が発行された時にリセットされる例外情報更新権ビットの記憶手段と、前記各演算器から出力される例外情報を前記記憶手段の前記例外情報更新権ビットによって選択した例外情報が記憶される例外情報レジスタとを具備することを特徴とする。
このような構成により、状態レジスタ内に複数の情報が混在する場合は、各々の命令に情報の更新権を持たせることによって複数の命令をオーバーラップして実行出来る。これにより、浮動小数点演算装置において、不要な待ち時間をなくすことで、性能低下を防ぐことが出来る。
【0007】
【発明の実施の形態】
以下本発明に係る実施の形態を、図面を参照して説明する。
図1は、本発明の浮動小数点演算装置の構成を示すブロック図である。図において、浮動小数点演算装置は、例えば加減算器30、掛け算器32、割り算器/平方根34の3つの演算器で構成され、それぞれの演算器は独立して動作する。
各演算器30、32、34には、その演算器の命令が発行された時にセットされ、他の別な演算器の命令が発行された時にリセットされる例外要因更新権ビットを記憶するメモリ(例えば、フリップフロップやレジスタ等)31、33、35がそれぞれ設けられる。また、状態レジスタは例外要因情報レジスタ44とフラグ情報レジスタ38に分けて構成される。
そして、各演算器30、32、34から出力されるフラク情報は、ORゲート36を介してフラグ情報レジスタ38に記憶される。また、フラグ情報レジスタ38には各演算器30、32、34のMステージから出力される信号をORゲート40でORされた出力信号が記憶時のイネーブル信号として入力されている。こうして、フラグ情報レジスタ38には、実行された全ての命令について、各命令を実行した時に得られる例外フラグ(演算命令の処理結果として発生した例外要因の内、例外マスクでマスクされたもの)のORを取ったものが記憶される。
【0008】
一方、各演算器30、32、34から出力される例外要因情報は、それぞれセレクタ42を介して例外要因情報レジスタ44に記憶される。例外要因情報レジスタ44には各演算器30、32、34の更新権ビットを記憶したメモリ31、33、35から出力される信号をORゲート46でORされた出力がイネーブル信号として入力されている。また、更新権ビットを記憶したメモリ31、33、35から出力される信号は、セレクタ42の選択信号としても入力されている。
図2は、本発明の浮動小数点演算装置の動作を示すタイミング図である。この図2を参照して本発明の浮動小数点演算装置の動作を説明する。
本発明の動作例として、図4または図5の説明と同様に、割り算命令に続き加算命令が発行された場合について説明する。
本発明では、割り算命令が発行されたことによって、割り算器34の更新権ビットのメモリ35がセットされる。次に、加算命令が発行されることによって、先にセットされた割り算器34の更新権ビットのメモリ35がリセットされ、加減算器30の更新権ビットのメモリ31がセットされる。
この状態で割り算器34と加減算器30において、それぞれの命令が並列処理され、加減算器30のMステージで出力された例外要因情報はセレクタ42に出力される。そして、加減算器30の更新権ビットのメモリ31から出力された信号によってセレクタ42は加減算器30から出力された例外要因情報が選択出力されレジスタ44に入力され、同じくメモリ31から出力された信号がイネーブル信号となって例外要因情報レジスタ44に例外情報がセットされる。
【0009】
その後に、割り算器34において、割り算命令が終了してMステージになっても割り算器34の更新権ビットのメモリ35の内容が既にリセットされていることから、例外要因情報レジスタ44の内容が更新されることはない。
【0010】
【発明の効果】
以上詳述した発明によれば、従来の状態レジスタをフラク情報レジスタと例外要因情報レジスタとに分けて構成し、浮動小数点演算装置を構成する各種演算器それぞれに更新権ビットを記憶するようにして、最後に発行された命令の例外要因情報が必ず例外要因情報レジスタに記憶できるようにしたことによって、不要な待ち時間を削減することが出来る。
【図面の簡単な説明】
【図1】本発明の浮動小数点演算装置の構成を示すブロック図。
【図2】本発明の浮動小数点演算装置の動作を示すタイミング図。
【図3】従来の浮動小数点演算装置の構成を示すブロック図。
【図4】従来の浮動小数点演算装置の動作を示すタイミング図。
【図5】従来の浮動小数点演算装置の動作を示すタイミング図。
【符号の説明】
30…加減算器、32…掛け算器、34…割り算器
31、33、35…更新権ビットのメモリ
36、40、46…ORゲート
42…セレクタ
38…フラク情報レジスタ
46…例外要因情報レジスタ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a floating point arithmetic unit.
[0002]
[Prior art]
When a floating-point arithmetic unit conforming to IEEE754 is configured, it is specified to have exception factor information that is a floating-point operation result and flag information thereof.
FIG. 3 is a diagram showing a configuration of a conventional floating point arithmetic unit. The floating point arithmetic unit is composed of three arithmetic units, for example, an adder /
In this case, the flag information of the
[0003]
FIGS. 4 and 5 show the above-described conventional operation. FIG. 4 shows an example of overlapping, and FIG. 5 shows a case of waiting. 4 and 5, D represents an instruction decode stage, E1 represents a first operation stage, E2 represents a second operation stage, M represents an exception detection stage, and W represents an operation result write back stage.
For example, in the example of FIG. 4, when a division instruction and an addition instruction are executed in parallel, if the last instruction is an addition instruction, both instructions are executed simultaneously by the divider 14 and the adder /
Thereafter, the division instruction processing of the divider 14 is completed, and the exception information output at the M stage is stored in the
[0004]
In order to solve this, in the example shown in FIG. 5, a wait (STALL) is inserted in the E1 stage of the addition instruction. Then, after the E2 stage of the division instruction is completed, the E1 stage of the addition instruction is executed, and exception information is stored in the
[0005]
[Problems to be solved by the invention]
As described above, the conventional floating point arithmetic unit has a drawback that an unnecessary waiting time occurs when a plurality of pieces of information are mixed in the status register.
The present invention has been made to solve the above-described drawbacks. When a plurality of pieces of information are mixed in the status register, a plurality of instructions are overlapped and executed by giving each instruction the right to update information. An object of the present invention is to provide a floating point arithmetic unit that can be used.
[0006]
[Means for Solving the Problems]
In order to achieve the above object, the floating point arithmetic unit of the present invention has a plurality of different arithmetic units that execute instructions independently, and when the arithmetic unit instructions are issued for each of the arithmetic units, An exception information update right bit that is set and reset when an instruction of another arithmetic unit is issued, and exception information can be updated only by the arithmetic unit in which the exception information update right bit is set It is characterized by.
Further, the floating point arithmetic unit of the present invention includes a plurality of different arithmetic units, each of which includes a floating point arithmetic unit that executes an instruction independently, and each arithmetic unit of the floating point arithmetic unit. A storage means for an exception information update right bit that is set when an instruction of a calculator is issued and reset when an instruction of another calculator is issued, and exception information output from each calculator is stored in the storage means And an exception information register in which exception information selected by the exception information update right bit is stored.
With this configuration, when a plurality of pieces of information are mixed in the status register, a plurality of instructions can be overlapped and executed by giving each instruction the right to update information. As a result, in the floating point arithmetic unit, it is possible to prevent performance degradation by eliminating unnecessary waiting time.
[0007]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 is a block diagram showing the configuration of the floating point arithmetic unit of the present invention. In the figure, the floating point arithmetic unit is composed of three arithmetic units, for example, an adder /
Each of the
The flag information output from each of the
[0008]
On the other hand, exception factor information output from each of the
FIG. 2 is a timing chart showing the operation of the floating point arithmetic unit of the present invention. The operation of the floating point arithmetic unit according to the present invention will be described with reference to FIG.
As an example of the operation of the present invention, a case where an addition instruction is issued following a division instruction will be described as in the description of FIG. 4 or FIG.
In the present invention, when a division instruction is issued, the update right bit memory 35 of the
In this state, the
[0009]
Thereafter, in the
[0010]
【The invention's effect】
According to the above-described invention, the conventional status register is divided into the flag information register and the exception factor information register, and the update right bit is stored in each of the various arithmetic units constituting the floating point arithmetic unit. Since the exception factor information of the last issued instruction can always be stored in the exception factor information register, unnecessary waiting time can be reduced.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a floating point arithmetic unit according to the present invention.
FIG. 2 is a timing chart showing the operation of the floating point arithmetic unit of the present invention.
FIG. 3 is a block diagram showing the configuration of a conventional floating point arithmetic unit.
FIG. 4 is a timing chart showing the operation of a conventional floating point arithmetic unit.
FIG. 5 is a timing chart showing the operation of a conventional floating point arithmetic unit.
[Explanation of symbols]
DESCRIPTION OF
Claims (2)
前記浮動小数点演算器の各演算器毎に内蔵され、その演算器の命令が発行された時にセットされ、他の演算器の命令が発行された時にリセットされる例外要因更新権ビットの記憶手段と、
前記演算器から出力される例外要因情報を前記例外要因更新権ビットがセットされる前記記憶手段によって選択された例外要因情報が記憶される例外要因情報レジスタと、
を具備することを特徴とする浮動小数点演算装置。A floating point arithmetic unit having a plurality of different arithmetic units and executing instructions independently of each other;
Means for storing exception factor update right bits that are built in each arithmetic unit of the floating-point arithmetic unit, set when an instruction of the arithmetic unit is issued, and reset when an instruction of another arithmetic unit is issued; ,
An exception factor information register for storing exception factor information selected by the storage means in which the exception factor update right bit is set as exception factor information output from the arithmetic unit;
A floating point arithmetic unit comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP17355499A JP4021590B2 (en) | 1999-06-21 | 1999-06-21 | Floating point arithmetic unit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP17355499A JP4021590B2 (en) | 1999-06-21 | 1999-06-21 | Floating point arithmetic unit |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2001005639A JP2001005639A (en) | 2001-01-12 |
JP4021590B2 true JP4021590B2 (en) | 2007-12-12 |
Family
ID=15962706
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP17355499A Expired - Fee Related JP4021590B2 (en) | 1999-06-21 | 1999-06-21 | Floating point arithmetic unit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4021590B2 (en) |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS63303425A (en) * | 1987-06-03 | 1988-12-12 | Nec Corp | Arithmetic unit |
US5043867A (en) * | 1988-03-18 | 1991-08-27 | Digital Equipment Corporation | Exception reporting mechanism for a vector processor |
JPH0820947B2 (en) * | 1988-11-30 | 1996-03-04 | 松下電器産業株式会社 | Data processing device |
US5257214A (en) * | 1992-06-16 | 1993-10-26 | Hewlett-Packard Company | Qualification of register file write enables using self-timed floating point exception flags |
JPH07219796A (en) * | 1994-02-04 | 1995-08-18 | Kofu Nippon Denki Kk | Information processor |
JP3212213B2 (en) * | 1994-03-16 | 2001-09-25 | 株式会社日立製作所 | Data processing device |
JPH09160840A (en) * | 1995-12-08 | 1997-06-20 | Fuji Facom Corp | Bus communication device |
-
1999
- 1999-06-21 JP JP17355499A patent/JP4021590B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2001005639A (en) | 2001-01-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4498136A (en) | Interrupt processor | |
US5222240A (en) | Method and apparatus for delaying writing back the results of instructions to a processor | |
JP2653037B2 (en) | Data processing system | |
US4642757A (en) | Microinstruction controlled arithmetic control unit | |
US6055628A (en) | Microprocessor with a nestable delayed branch instruction without branch related pipeline interlocks | |
US5590359A (en) | Method and apparatus for generating a status word in a pipelined processor | |
JPS62115542A (en) | Information processor | |
JP4021590B2 (en) | Floating point arithmetic unit | |
JPS60178580A (en) | Instruction control system | |
US5931942A (en) | Pipeline data processing apparatus of reduced circuit scale | |
US6032249A (en) | Method and system for executing a serializing instruction while bypassing a floating point unit pipeline | |
JP2503984B2 (en) | Information processing device | |
JP2875864B2 (en) | Pipeline processing method | |
JP3055139B2 (en) | Micro program control method | |
JPH0222413B2 (en) | ||
JP3459495B2 (en) | Microprocessor | |
JP3531856B2 (en) | Program control method and program control device | |
JPH03156674A (en) | Vector processor | |
JP3473506B2 (en) | Pipeline processing equipment | |
JP2763450B2 (en) | Pipeline processing data processing device | |
JP2503983B2 (en) | Information processing device | |
JPH06161778A (en) | Multi-flow instruction control method and instruction processor | |
JPS5875250A (en) | Digital information processor | |
JPS62164138A (en) | Microprocessor with concurrent loop | |
JPH0855027A (en) | Pipeline processor with register file |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20050406 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050407 |
|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A711 Effective date: 20050415 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070912 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20070925 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070927 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101005 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |