JP2012113508A - Floating point arithmetic circuit, computer with floating point arithmetic circuit, and arithmetic control method and arithmetic control program for the same - Google Patents

Floating point arithmetic circuit, computer with floating point arithmetic circuit, and arithmetic control method and arithmetic control program for the same Download PDF

Info

Publication number
JP2012113508A
JP2012113508A JP2010261830A JP2010261830A JP2012113508A JP 2012113508 A JP2012113508 A JP 2012113508A JP 2010261830 A JP2010261830 A JP 2010261830A JP 2010261830 A JP2010261830 A JP 2010261830A JP 2012113508 A JP2012113508 A JP 2012113508A
Authority
JP
Japan
Prior art keywords
circuit
arithmetic
bit width
calculation
floating
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.)
Abandoned
Application number
JP2010261830A
Other languages
Japanese (ja)
Inventor
Kenzo Yamada
謙三 山田
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.)
NEC Fielding Ltd
Original Assignee
NEC Fielding 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 NEC Fielding Ltd filed Critical NEC Fielding Ltd
Priority to JP2010261830A priority Critical patent/JP2012113508A/en
Publication of JP2012113508A publication Critical patent/JP2012113508A/en
Abandoned legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To quicken arithmetic processing, and to shorten an arithmetic execution time by achieving a parallel arithmetic operation with mutual single accuracy/mutual double accuracy by an extension accuracy arithmetic circuit and a single/double accuracy arithmetic circuit.SOLUTION: A floating point arithmetic circuit having a plurality of arithmetic circuits each of which performs a floating point arithmetic operation to a numerical value with first bit width and a numerical value with second bit width which is shorter than the first bit width includes; a halt determination part for determining that a first arithmetic circuit which performs an arithmetic operation to the numerical value with the first bit width halts on the basis of an arithmetic instruction; and an arithmetic control part for, when it is determined that the first arithmetic circuit halts by the halt determination part, controls the first arithmetic circuit to perform the arithmetic operation to the numerical value with the second bit width, and controls the first arithmetic circuit and a second arithmetic circuit which performs an arithmetic operation to the numerical value with the second bit width to execute the arithmetic operation to the numerical value with the second bit width in parallel.

Description

本発明は、スーパーコンピュータのベクトル演算などで高速な浮動小数点演算を行なうための演算技術に関する。   The present invention relates to an arithmetic technique for performing high-speed floating point arithmetic such as supercomputer vector arithmetic.

現在、スーパーコンピュータでは、単精度と倍精度と拡張精度の3種のデータを浮動小数点演算する必要がある。特に、ベクトル演算などでは、1つの演算処理が浮動小数点演算の多数回の繰り返しを含むため、各々の浮動小数点演算の短縮が演算処理の高速化に寄与する。また、回路構成を簡単にすることも演算処理の高速化に寄与する。たとえば、特許文献1では、128ビットの拡張精度データ幅の演算データを64ビット幅の上位と下位とに分け、64ビット幅の演算回路での2回の実行で1つの拡張精度データ幅の演算結果を求める。これにより、拡張精度データ幅の演算を少ないハードウェアにより実行できる。また、特許文献2では、16バイト幅(=128ビット幅)の演算器を2つの8バイト幅(=64ビット幅)に分割する。そして、分割した2つの8バイト幅の演算器で、8バイト幅(=64ビット幅)と4バイト幅((=32ビット幅))の演算データの演算を同時に実行できる。   Currently, a supercomputer needs to perform floating point arithmetic on three types of data: single precision, double precision, and extended precision. In particular, in vector operations and the like, since one operation process includes many repetitions of floating point operations, shortening of each floating point operation contributes to speeding up of the operation processing. In addition, simplifying the circuit configuration contributes to speeding up of the arithmetic processing. For example, in Patent Document 1, operation data having a 128-bit extended precision data width is divided into an upper part and a lower part having a 64-bit width, and one execution of an extended precision data width is performed twice in a 64-bit width arithmetic circuit. Find the result. Thereby, the calculation of the extended precision data width can be executed by a small amount of hardware. In Patent Document 2, an arithmetic unit having a 16-byte width (= 128-bit width) is divided into two 8-byte widths (= 64-bit width). Then, two divided 8-byte arithmetic units can simultaneously execute arithmetic data of 8-byte width (= 64-bit width) and 4-byte width ((= 32-bit width)).

特開平06−149544号公報Japanese Patent Laid-Open No. 06-149544 特開平09−091118号公報JP 09-091118 A

しかしながら、単精度と倍精度と拡張精度の3種のデータを浮動小数点演算する場合にも、演算処理を高速化して演算実行時間を短縮するには、演算を並列に同時実行することが望ましい。また、限られたハードウェア資源を効率よく使用して演算処理を高速化して演算実行時間を短縮することで、業務の効率化とコンピュータシステムの消費電力が抑制できるハードウェアの提供が求められている。   However, even when performing floating-point arithmetic on three types of data of single precision, double precision, and extended precision, it is desirable to execute the computations simultaneously in parallel in order to speed up the computation processing and shorten the computation execution time. In addition, there is a need to provide hardware that can efficiently use limited hardware resources, speed up the computation processing, and shorten the computation execution time, thereby improving operational efficiency and reducing the power consumption of the computer system. Yes.

これに対して、上記特許文献1は、倍精度(64ビット=8バイト)の演算回路を使って拡張精度(128ビット=16バイト)の演算を実行するのみであり、いずれの演算もシーケンシャルにしか実行できない。一方、上記特許文献2は、拡張精度(16バイト=128ビット)の演算器を使って、単精度(4バイト=32ビット)と倍精度(8バイト=64ビット)の演算を同時に実行可能である。しかし、単精度同士/倍精度同士の並列演算はできない。   On the other hand, the above-mentioned Patent Document 1 only executes an operation with an extended precision (128 bits = 16 bytes) using a double precision (64 bits = 8 bytes) arithmetic circuit, and all the operations are performed sequentially. Can only be executed. On the other hand, the above-mentioned patent document 2 can simultaneously execute single precision (4 bytes = 32 bits) and double precision (8 bytes = 64 bits) using an arithmetic unit with extended precision (16 bytes = 128 bits). is there. However, single-precision / double-precision parallel operations cannot be performed.

本発明の目的は、上述の課題を解決する技術を提供することにある。   The objective of this invention is providing the technique which solves the above-mentioned subject.

上記目的を達成するため、本発明に係る装置は、
第1ビット幅の数値及び前記第1ビット幅より短い第2ビット幅の数値に対してそれぞれが浮動小数点演算を行なう複数の演算回路を有する浮動小数点演算回路であって、
演算命令に基づいて、前記第1ビット幅の演算を行なう第1演算回路が休止することを判定する休止判定手段と、
前記休止判定手段が前記第1演算回路が休止すると判定した場合に、前記第1演算回路を前記第2ビット幅の数値の演算を行なうよう制御し、前記第2ビット幅の数値の演算を、前記第1演算回路と前記第2ビット幅の数値を演算する第2演算回路とにより並列に実行する演算制御手段と、
を備えることを特徴とする。
In order to achieve the above object, an apparatus according to the present invention provides:
A floating-point arithmetic circuit having a plurality of arithmetic circuits each performing a floating-point arithmetic on a numerical value of a first bit width and a numerical value of a second bit width shorter than the first bit width,
Pause determining means for determining whether the first arithmetic circuit for performing the calculation of the first bit width is paused based on an arithmetic instruction;
When the pause determination means determines that the first arithmetic circuit is paused, the first arithmetic circuit is controlled to perform a calculation of the numerical value of the second bit width, and the calculation of the numerical value of the second bit width is Arithmetic control means for executing in parallel by the first arithmetic circuit and a second arithmetic circuit for calculating a numerical value of the second bit width;
It is characterized by providing.

上記目的を達成するため、本発明に係る装置は、
拡張されたビット幅の数値の浮動小数点演算を行なう浮動小数点演算回路であって、
当該浮動小数点演算回路への演算命令が、拡張されたビット幅の数値に対する演算であるか否かを判定する演算判定手段と、
前記演算判定手段が拡張されたビット幅の数値に対する演算であると判定した場合は、前記拡張されたビット幅の数値の浮動小数点演算を実行し、前記演算判定手段が拡張されたビット幅の数値に対する演算でないと判定した場合は、前記拡張されたビット幅より短いビット幅の数値の浮動小数点演算を実行する演算実行手段と、
を備えることを特徴とする。
In order to achieve the above object, an apparatus according to the present invention provides:
A floating-point arithmetic circuit that performs floating-point arithmetic on an extended bit-width number,
An operation determination means for determining whether an operation instruction to the floating-point arithmetic circuit is an operation on an extended bit width value;
If the operation determining means determines that the operation is an operation on an extended bit width value, the floating point operation is performed on the extended bit width value, and the operation determining means is an extended bit width value. If it is determined that the operation is not for the operation, operation execution means for performing a floating point operation of a numerical value having a bit width shorter than the expanded bit width,
It is characterized by providing.

上記目的を達成するため、本発明に係る装置は、
拡張されたビット幅の数値の浮動小数点演算を行なう浮動小数点演算回路であって、
入力される演算命令を格納する演算命令レジスタと、
前記演算命令レジスタの出力信号の値に基づいて当該浮動小数点演算回路による拡張されたビット幅の浮動小数点演算を休止するか否かを検出して、演算実行中フラグを生成する演算実行中フラグ生成回路と、
前記演算実行中フラグ生成回路が生成した前記演算実行中フラグを格納する実行中フラグ格納レジスタと、
入力される拡張されたビット幅の被演算データの符号、指数及び仮数と演算データの符号、指数及び仮数とを格納する第1レジスタ群と、
入力される拡張されないビット幅の被演算データの符号、指数及び仮数と演算データの符号、指数及び仮数とを格納する第2レジスタ群と、
前記演算実行中フラグが当該浮動小数点演算回路による拡張されたビット幅の浮動小数点演算を実行することを示す場合には前記第1レジスタ群を選択し、前記演算実行中フラグが当該浮動小数点演算回路による拡張されたビット幅の浮動小数点演算を休止することを示す場合には前記第2レジスタ群を選択する符号、指数及び仮数選択回路と、
演算命令と被演算データの符号と演算データの符号とに基づいて、演算結果の符号を生成する符号生成回路と、
演算命令と被演算データの符号と演算データの符号とに基づいて、被演算データの指数と演算データの指数とを調整して演算結果の指数を生成する指数生成回路と、
前記指数生成回路における前記被演算データの指数と演算データの指数との調整に対応して、被演算データの仮数と演算データの仮数との桁合わせを行なって演算結果の仮数を生成する仮数演算回路と、
前記演算結果の指数と仮数とを整合する整合回路と、
前記演算結果の符号と、前記整合回路で整合された前記演算結果の指数と仮数とを格納する演算結果格納レジスタとを備え、
前記実行中フラグ格納レジスタに格納された前記実行中フラグと、前記演算結果格納レジスタに格納された前記演算結果の符号、指数及び仮数とを、浮動小数点演算結果として出力することを特徴とする。
In order to achieve the above object, an apparatus according to the present invention provides:
A floating-point arithmetic circuit that performs floating-point arithmetic on an extended bit-width number,
An operation instruction register for storing an input operation instruction;
Generates an in-execution flag that detects whether or not to stop the floating-point operation with the extended bit width by the floating-point operation circuit based on the value of the output signal of the operation instruction register and generates an in-operation flag Circuit,
An execution flag storage register for storing the operation execution flag generated by the operation execution flag generation circuit;
A first register group for storing the sign, exponent, and mantissa of the input operation data having an extended bit width and the sign, exponent, and mantissa of the operation data;
A second register group for storing the sign, exponent, and mantissa of the input unexpanded bit-width operand data, and the sign, exponent, and mantissa of the operation data;
The first register group is selected when the operation in progress flag indicates that the floating point operation with an extended bit width is performed by the floating point operation circuit, and the operation execution flag is in the floating point operation circuit. A sign, exponent and mantissa selection circuit for selecting the second register group when indicating that the floating-point operation with the extended bit width by
A code generation circuit for generating a code of a calculation result based on a calculation instruction, a sign of operation data, and a sign of calculation data;
An exponent generation circuit that adjusts the exponent of the operand data and the exponent of the operand data based on the arithmetic instruction, the sign of the operand data, and the sign of the operand data;
In accordance with the adjustment of the exponent of the operand data and the exponent of the calculation data in the exponent generation circuit, the mantissa calculation that generates the mantissa of the calculation result by aligning the mantissa of the operand data with the mantissa of the calculation data Circuit,
A matching circuit for matching the exponent and mantissa of the operation result;
A calculation result storage register for storing a sign of the calculation result and an exponent and mantissa of the calculation result matched by the matching circuit;
The in-execution flag stored in the in-execution flag storage register and the sign, exponent, and mantissa of the operation result stored in the operation result storage register are output as a floating-point operation result.

上記目的を達成するため、本発明に係る装置は、
異なるビット幅の数値に対してそれぞれ浮動小数点演算を行なう複数の演算回路を有する浮動小数点演算回路を備えたコンピュータであって、
第1演算回路が、
当該第1演算回路への演算命令が、第1ビット幅の数値に対する演算であるか前記第1ビット幅より短い第2ビット幅の数値に対する演算であるかを判定する演算判定手段と、
前記演算判定手段が前記第1ビット幅の数値に対する演算であると判定した場合に、前記第1ビット幅の数値の浮動小数点演算を実行し、前記演算判定手段が前記第2ビット幅の数値に対する演算であると判定した場合に、前記第2ビット幅の数値の浮動小数点演算を実行する演算実行手段と、を有し、
第2演算回路が、前記第2ビット幅の数値の浮動小数点演算を実行する回路であって、
前記浮動小数点演算回路への演算命令が前記第1ビット幅の数値に対する演算が休止することを示す場合には、前記第2ビット幅の数値の浮動小数点演算を前記第1演算回路と前記第2演算回路とにより並列に実行することを特徴とする。
In order to achieve the above object, an apparatus according to the present invention provides:
A computer having a floating-point arithmetic circuit having a plurality of arithmetic circuits that perform floating-point arithmetic on numerical values having different bit widths,
The first arithmetic circuit is
An operation determination means for determining whether an operation instruction to the first operation circuit is an operation on a numerical value of a first bit width or an operation on a numerical value of a second bit width shorter than the first bit width;
When the operation determining means determines that the operation is for the numerical value of the first bit width, a floating point operation of the numerical value of the first bit width is executed, and the operation determining means is for the numerical value of the second bit width. And a calculation execution means for executing a floating point calculation of the numerical value of the second bit width when it is determined as a calculation,
A second arithmetic circuit for performing a floating point arithmetic operation on the numerical value of the second bit width,
When the operation instruction to the floating point arithmetic circuit indicates that the operation on the numerical value of the first bit width is suspended, the floating point arithmetic operation of the numerical value of the second bit width is performed with the first arithmetic circuit and the second arithmetic circuit. It is characterized by being executed in parallel by an arithmetic circuit.

上記目的を達成するため、本発明に係る方法は、
異なるビット幅の数値に対してそれぞれ浮動小数点演算を行なう複数の演算回路を有する浮動小数点演算回路を備えたコンピュータの演算制御方法であって、
演算プログラムを記憶手段から読み出す読出ステップと、
前記演算プログラムの命令を解析して、前記浮動小数点演算回路において演算すべき数値が第1ビット幅か前記第1ビット幅より短い第2ビット幅かを判定する判定ステップと、
前記浮動小数点演算回路において演算すべき数値が第1ビット幅の場合に、前記第1ビット幅の演算を行なう第1演算回路に前記第1ビット幅の演算命令と演算すべき数値とを提供して、前記第1ビット幅の演算結果を前記第1演算回路から取得する第1演算ステップと、
前記浮動小数点演算回路において演算すべき数値が第2ビット幅の場合に、前記第1ビット幅の演算を行なう第1演算回路と前記第2ビット幅の演算を行なう第2演算回路とに並列の前記第2ビット幅の演算命令と演算すべき数値とを提供して、前記第2ビット幅の演算結果を前記第1演算回路と前記第2演算回路から並列に取得する第2演算ステップと、
を含むことを特徴とする。
In order to achieve the above object, the method according to the present invention comprises:
An arithmetic control method for a computer having a floating point arithmetic circuit having a plurality of arithmetic circuits each performing a floating point arithmetic on numerical values having different bit widths,
A reading step of reading the arithmetic program from the storage means;
A determination step of analyzing an instruction of the arithmetic program and determining whether a numerical value to be calculated in the floating-point arithmetic circuit is a first bit width or a second bit width shorter than the first bit width;
When the numerical value to be calculated in the floating-point arithmetic circuit is the first bit width, the first arithmetic circuit for performing the operation of the first bit width is provided with the arithmetic instruction of the first bit width and the numerical value to be calculated. A first calculation step of obtaining a calculation result of the first bit width from the first calculation circuit;
When the numerical value to be calculated in the floating-point arithmetic circuit is the second bit width, the first arithmetic circuit that performs the operation of the first bit width and the second arithmetic circuit that performs the operation of the second bit width are connected in parallel. A second operation step of providing an operation instruction of the second bit width and a numerical value to be operated, and obtaining an operation result of the second bit width in parallel from the first operation circuit and the second operation circuit;
It is characterized by including.

上記目的を達成するため、本発明に係るプログラムは、
異なるビット幅の数値に対してそれぞれ浮動小数点演算を行なう複数の演算回路を有する浮動小数点演算回路を備えたコンピュータの演算制御プログラムであって、
演算プログラムを記憶手段から読み出す読出ステップと、
前記演算プログラムの命令を解析して、前記浮動小数点演算回路において演算すべき数値が第1ビット幅か前記第1ビット幅より短い第2ビット幅かを判定する判定ステップと、
前記浮動小数点演算回路において演算すべき数値が第1ビット幅の場合に、前記第1ビット幅の演算を行なう第1演算回路に前記第1ビット幅の演算命令と演算すべき数値とを提供して、前記第1ビット幅の演算結果を前記第1演算回路から取得する第1演算ステップと、
前記浮動小数点演算回路において演算すべき数値が第2ビット幅の場合に、前記第1ビット幅の演算を行なう第1演算回路と前記第2ビット幅の演算を行なう第2演算回路とに並列の前記第2ビット幅の演算命令と演算すべき数値とを提供して、前記第2ビット幅の演算結果を前記第1演算回路と前記第2演算回路から並列に取得する第2演算ステップと、をコンピュータに実行させることを特徴とする。
In order to achieve the above object, a program according to the present invention provides:
An arithmetic control program for a computer comprising a floating point arithmetic circuit having a plurality of arithmetic circuits that respectively perform floating point arithmetic on numerical values of different bit widths,
A reading step of reading the arithmetic program from the storage means;
A determination step of analyzing an instruction of the arithmetic program and determining whether a numerical value to be calculated in the floating-point arithmetic circuit is a first bit width or a second bit width shorter than the first bit width;
When the numerical value to be calculated in the floating-point arithmetic circuit is the first bit width, the first arithmetic circuit for performing the operation of the first bit width is provided with the arithmetic instruction of the first bit width and the numerical value to be calculated. A first calculation step of obtaining a calculation result of the first bit width from the first calculation circuit;
When the numerical value to be calculated in the floating-point arithmetic circuit is the second bit width, the first arithmetic circuit that performs the operation of the first bit width and the second arithmetic circuit that performs the operation of the second bit width are connected in parallel. A second operation step of providing an operation instruction of the second bit width and a numerical value to be operated, and obtaining an operation result of the second bit width in parallel from the first operation circuit and the second operation circuit; Is executed by a computer.

本発明によれば、拡張精度演算回路と単・倍精度演算回路とにより単精度同士/倍精度同士の並列演算を実現し、演算処理を高速化して演算実行時間を短縮できる。   According to the present invention, single-precision / double-precision parallel computation is realized by the extended precision computation circuit and the single / double precision computation circuit, so that the computation processing can be speeded up and the computation execution time can be shortened.

本発明の第1実施形態の浮動小数点演算回路の構成を示すブロック図である。It is a block diagram which shows the structure of the floating point arithmetic circuit of 1st Embodiment of this invention. 本発明の第2実施形態に係る浮動小数点演算回路を含むコンピュータの構成を示すブロック図である。It is a block diagram which shows the structure of the computer containing the floating point arithmetic circuit which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る浮動小数点演算回路を含むコンピュータの演算処理手順を示すフローチャートである。It is a flowchart which shows the arithmetic processing procedure of the computer containing the floating point arithmetic circuit which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る浮動小数点演算回路に含まれる浮動小数点加減算回路の構成を示すブロック図である。It is a block diagram which shows the structure of the floating point addition / subtraction circuit contained in the floating point arithmetic circuit which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る浮動小数点加減算回路に含まれる拡張精度データ幅演算回路の構成を示すブロック図である。It is a block diagram which shows the structure of the extended precision data width arithmetic circuit contained in the floating point addition / subtraction circuit which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る浮動小数点加減算回路に含まれる単精度・倍精度データ幅演算回路の構成を示すブロック図である。It is a block diagram which shows the structure of the single precision and double precision data width arithmetic circuit contained in the floating point addition / subtraction circuit which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る科学演算データ形式の一例を示す図である。It is a figure which shows an example of the scientific calculation data format which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る演算命令生成の論理を示す図である。It is a figure which shows the logic of the arithmetic instruction generation which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る符号データ選択の論理を示す図である。It is a figure which shows the logic of the code data selection which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る指数データ選択の論理を示す図である。It is a figure which shows the logic of the exponent data selection which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る仮数データ選択の論理を示す図である。It is a figure which shows the logic of the mantissa data selection which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る指数大小比較信号生成の論理を示す図である。It is a figure which shows the logic of the exponent magnitude comparison signal generation which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る基準指数選択の論理を示す図である。It is a figure which shows the logic of the reference | standard index selection which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る仮数選択回路の構成を示すブロック図である。It is a block diagram which shows the structure of the mantissa selection circuit which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る被加算仮数データ選択の論理を示す図である。It is a figure which shows the logic of addition mantissa data selection which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る加算仮数と反転データ選択の論理を示す図である。It is a figure which shows the logic of the addition mantissa and inversion data selection which concern on 2nd Embodiment of this invention. 本発明の第2実施形態に係る加算仮数データ選択の論理を示す図である。It is a figure which shows the logic of the addition mantissa data selection which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る中間符号生成の論理を示す図である。It is a figure which shows the logic of the intermediate code generation which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る符号生成の論理を示す図である。It is a figure which shows the logic of the code generation which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る拡張精度データ幅演算回路における拡張精度加算時の各レジスタのデータ値例を示す図である。It is a figure which shows the example of a data value of each register at the time of extended precision addition in the extended precision data width arithmetic circuit which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る拡張精度データ幅演算回路における拡張精度加算時の各信号線のデータ値例を示す図である。It is a figure which shows the example of a data value of each signal line at the time of extended precision addition in the extended precision data width arithmetic circuit which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る拡張精度データ幅演算回路における倍精度加算時の各レジスタのデータ値例を示す図である。It is a figure which shows the data value example of each register at the time of double precision addition in the extended precision data width arithmetic circuit which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る拡張精度データ幅演算回路における倍精度加算時の各信号線のデータ値例を示す図である。It is a figure which shows the data value example of each signal line at the time of double precision addition in the extended precision data width arithmetic circuit which concerns on 2nd Embodiment of this invention.

以下に、図面を参照して、本発明の実施の形態について例示的に詳しく説明する。ただし、以下の実施の形態に記載されている構成要素はあくまで例示であり、本発明の技術範囲をそれらのみに限定する趣旨のものではない。   Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the drawings. However, the components described in the following embodiments are merely examples, and are not intended to limit the technical scope of the present invention only to them.

[第1実施形態]
本発明の第1実施形態としての浮動小数点演算回路100について、図1を用いて説明する。図1において、浮動小数点演算回路100は、第1演算回路101と、第2演算回路102と、休止判定部103と、演算制御部104とを含む。第1演算回路101は、第1ビット幅の数値と第1ビット幅より短い第2ビット幅の数値とのいずれかを選択可能に演算する回路である。第2演算回路102は、第2ビット幅を演算する回路である。休止判定部103は、演算命令を解析して、演算命令が第1演算回路101による第1ビット幅の数値の演算を休止することを判定する。演算制御部104は、休止判定部103からの判定が第1ビット幅の数値の演算を休止することを示す場合に、第2ビット幅の数値を第1演算回路101に入力すると共に、第1演算回路101を第2ビット幅の数値の演算を行なうようする。
[First Embodiment]
A floating point arithmetic circuit 100 according to a first embodiment of the present invention will be described with reference to FIG. In FIG. 1, the floating point arithmetic circuit 100 includes a first arithmetic circuit 101, a second arithmetic circuit 102, a pause determination unit 103, and an arithmetic control unit 104. The first arithmetic circuit 101 is a circuit that performs arithmetic operation so that either a numerical value of the first bit width or a numerical value of the second bit width shorter than the first bit width can be selected. The second arithmetic circuit 102 is a circuit that calculates the second bit width. The pause determination unit 103 analyzes the calculation instruction and determines that the calculation instruction pauses the calculation of the numerical value of the first bit width by the first calculation circuit 101. When the determination from the pause determination unit 103 indicates that the calculation of the first bit width value is stopped, the calculation control unit 104 inputs the second bit width value to the first calculation circuit 101 and first The arithmetic circuit 101 performs arithmetic operation on the numerical value of the second bit width.

本実施形態によれば、第1演算回路101による第1ビット幅の数値の演算が休止している時には、第1ビット幅より短い第2ビット幅の数値の演算を第1演算回路101と第2演算回路102で並列して実行できる。したがって、演算処理を高速化して演算実行時間が短縮される。   According to the present embodiment, when the calculation of the numerical value of the first bit width by the first arithmetic circuit 101 is suspended, the arithmetic operation of the numerical value of the second bit width shorter than the first bit width is performed with the first arithmetic circuit 101. Two arithmetic circuits 102 can execute in parallel. Therefore, the computation processing time is increased and the computation execution time is shortened.

[第2実施形態]
第2実施形態は、本実施形態の浮動小数点演算回路の回路構成と、この浮動小数点演算回路を使用した科学演算回路及びコンピュータの構成を示す。本実施形態では、たとえば、スーパーコンピュータのベクトル演算において、演算処理を高速化して演算実行時間を短縮することで、業務の効率化とコンピュータシステムの消費電力が抑制できる。
[Second Embodiment]
The second embodiment shows the circuit configuration of the floating point arithmetic circuit of the present embodiment, and the configuration of a scientific arithmetic circuit and a computer using this floating point arithmetic circuit. In the present embodiment, for example, in the vector calculation of the supercomputer, the calculation processing speed is increased to shorten the operation execution time, thereby making it possible to improve the efficiency of business and reduce the power consumption of the computer system.

〈第2実施形態の浮動小数点演算回路を使用したコンピュータの構成〉
図2Aは、第2実施形態の浮動小数点演算回路41、第2実施形態の浮動小数点演算回路41を使用した科学演算回路40、第2実施形態の浮動小数点演算回路41を使用したコンピュータ200のそれぞれの構成を示すブロック図である。
<Configuration of Computer Using Floating Point Arithmetic Circuit of Second Embodiment>
FIG. 2A shows a floating point arithmetic circuit 41 according to the second embodiment, a scientific arithmetic circuit 40 using the floating point arithmetic circuit 41 according to the second embodiment, and a computer 200 using the floating point arithmetic circuit 41 according to the second embodiment. It is a block diagram which shows the structure of these.

(コンピュータの概略構成)
図2Aにおいて、コンピュータ200は、科学演算回路40と、主記憶装置43と、入出力制御装置44と、外部記憶装置45とを含む。主記憶装置43は、科学演算プログラムと図6に標準指数データ方式で示した単精度601/倍精度602/拡張精度603の3種の科学演算データ及び科学演算命令を記憶する。主記憶装置43は、演算結果の一時記憶としても使用される。科学演算回路40は、主記憶装置43より科学演算プログラムを読み出し、命令を解析し、命令を実行し、前記実行結果を主記憶装置43へ出力する。入出力制御装置44は、科学演算回路40が解析した命令により外部記憶装置45への科学演算結果の入出力を制御する。外部記憶装置45は、入出力制御装置44から送られてくるデータを命令にしたがって保存し、入出力制御装置44へ記憶しているデータを送る。ここで、信号線L110は科学演算回路40と主記憶装置43との間の入出力信号のための信号線である。また、信号線L111は科学演算回路40と入出力制御装置44との間の入出力信号、L112は入出力制御装置44と外部記憶装置45との間の入出力信号である。
(Schematic configuration of computer)
2A, the computer 200 includes a scientific arithmetic circuit 40, a main storage device 43, an input / output control device 44, and an external storage device 45. The main storage device 43 stores a scientific computation program and three types of scientific computation data and scientific computation instructions of single precision 601 / double precision 602 / extended precision 603 shown by the standard exponent data system in FIG. The main storage device 43 is also used as a temporary storage of calculation results. The scientific operation circuit 40 reads a scientific operation program from the main storage device 43, analyzes the instruction, executes the instruction, and outputs the execution result to the main storage device 43. The input / output control device 44 controls the input / output of the scientific operation result to the external storage device 45 according to the instruction analyzed by the scientific operation circuit 40. The external storage device 45 stores the data sent from the input / output control device 44 in accordance with the command and sends the stored data to the input / output control device 44. Here, the signal line L110 is a signal line for an input / output signal between the scientific arithmetic circuit 40 and the main memory 43. A signal line L111 is an input / output signal between the scientific arithmetic circuit 40 and the input / output control device 44, and L112 is an input / output signal between the input / output control device 44 and the external storage device 45.

(科学演算回路の構成)
図2Aにおいて、科学演算回路40は、浮動小数点演算回路41と命令発行制御回路42とを含む。命令発行制御回路42は、主記憶装置43から読み込んだ科学演算データ及び科学演算命令を解析する。そして、浮動小数点演算回路41に、演算精度と演算種類とを示す演算命令と、被演算データ、演算データを発行し、浮動小数点演算回路41による演算結果を受け取って主記憶装置43又は外部記憶装置45に記憶する。たとえば、演算がベクトル演算のように同じ演算を繰り返す場合は、科学演算回路40で繰り返される。ここで、信号線L100〜L106は命令発行制御回路42から浮動小数点演算回路41への入力信号用の信号線、信号線L400とL401は浮動小数点演算回路41から命令発行制御回路42への出力信号用の信号線である。信号線L100は、演算命令である。信号線L101〜L106のうち、信号線L101〜L103は、単・倍精度又は拡張精度の演算をシーケンスに実行する場合に入力される数値の符号、指数及び仮数である。信号線L104〜L106は、単・倍精度の演算を並列して(パラレルに)実行する場合に、信号線L101〜L103と並列に入力される単・倍精度の数値の符号、指数及び仮数である。L400には単精度・倍精度データ幅演算回路からの演算結果が出力され、信号線L401には拡張精度データ幅演算回路からの演算結果が出力される。本実施形態では、信号線L100の演算命令が拡張精度データ幅演算回路を休止する命令であった場合には、信号線L400とL401の両方から2つの単・倍精度の演算結果が並列に出力される。
(Structure of scientific operation circuit)
In FIG. 2A, the scientific arithmetic circuit 40 includes a floating point arithmetic circuit 41 and an instruction issue control circuit 42. The instruction issuance control circuit 42 analyzes the scientific operation data and the scientific operation instruction read from the main storage device 43. Then, a calculation instruction indicating the calculation accuracy and calculation type, operation data, and calculation data are issued to the floating point calculation circuit 41, and the calculation result by the floating point calculation circuit 41 is received to receive the main storage device 43 or the external storage device. 45. For example, when the operation repeats the same operation as a vector operation, it is repeated by the scientific operation circuit 40. Here, signal lines L100 to L106 are signal lines for input signals from the instruction issuance control circuit 42 to the floating point arithmetic circuit 41, and signal lines L400 and L401 are output signals from the floating point arithmetic circuit 41 to the instruction issuance control circuit 42. Signal line. The signal line L100 is a calculation instruction. Among the signal lines L101 to L106, the signal lines L101 to L103 are numerical signs, exponents, and mantissas that are input when single / double precision or extended precision operations are executed in sequence. The signal lines L104 to L106 are represented by the sign, exponent, and mantissa of single / double precision numerical values input in parallel with the signal lines L101 to L103 when executing single / double precision operations in parallel (in parallel). is there. The calculation result from the single precision / double precision data width calculation circuit is output to L400, and the calculation result from the extended precision data width calculation circuit is output to the signal line L401. In this embodiment, when the operation instruction of the signal line L100 is an instruction to pause the extended precision data width operation circuit, two single / double precision operation results are output in parallel from both the signal lines L400 and L401. Is done.

(命令発行制御回路の動作手順)
図2Bは、命令発行制御回路42の動作手順を示すフローチャートである。なお、かかる命令発行制御回路42の動作は、ハードウェア、ソフトウェア、ファームウエア、マイクロプログラムなど、どのように構成されてもよい。したがって、図2Bのフローチャートは、プログラムの流れを示すのみではなく、ハードウェアの処理をも含むものである。また、実際には命令発行制御回路42から信号線L101〜L106に被演算データと演算データとが順次出力されてそれぞれのレジスタに保持されるが、ここでは煩雑であるのでその詳細な説明は省いている。また、本例では信号線L100上の演算命令のデータ幅が2ビットとして、拡張精度演算休止の命令と単・倍精度の演算命令とを別個に発行している。しかし、信号線L100のデータ幅が3ビット以上であれば、拡張精度演算休止の命令と単・倍精度の演算命令とを組み合わせて信号線L100に同時に出力できる。
(Operation procedure of instruction issue control circuit)
FIG. 2B is a flowchart showing the operation procedure of the instruction issue control circuit 42. The operation of the instruction issue control circuit 42 may be configured in any manner such as hardware, software, firmware, and microprogram. Therefore, the flowchart of FIG. 2B not only shows the flow of the program but also includes hardware processing. Actually, the operation data and the operation data are sequentially output from the instruction issuance control circuit 42 to the signal lines L101 to L106 and held in the respective registers. However, since this is complicated, detailed description thereof is omitted. It is. In this example, the data width of the arithmetic instruction on the signal line L100 is 2 bits, and the extended precision arithmetic pause instruction and the single / double precision arithmetic instruction are issued separately. However, if the data width of the signal line L100 is 3 bits or more, an extended precision arithmetic pause instruction and a single / double precision arithmetic instruction can be combined and output to the signal line L100 simultaneously.

まず、ステップS201において、主記憶装置43から演算プログラムを読み出す。次に、ステップS203において、演算プログラムの命令を解析する。ステップS205において、解析の結果が単・倍精度演算か/拡張精度演算かの演算判定を行なう。   First, in step S201, an arithmetic program is read from the main storage device 43. Next, in step S203, the instruction of the arithmetic program is analyzed. In step S205, a determination is made as to whether the analysis result is a single / double precision calculation or an extended precision calculation.

判定結果が単・倍精度演算である場合は、拡張精度演算回路は休止すると判断してステップS207に進む。ステップS207において、信号線L100に拡張精度演算休止を示す命令を提供する。ステップS209においては信号線L100に単・倍精度演算命令を発行して、信号線L104〜L106に信号線L101〜L103と並列に単・倍精度データを提供する。ステップS211においては、信号線L400とL401とから2つの単・倍精度演算結果を取得する。ステップS213においては繰り返し演算か否かを判定し、繰り返しならばステップS209に戻ってステップS209からS213を繰り返す。繰り返しで無ければステップS221に進む。   If the determination result is single / double precision calculation, the extended precision arithmetic circuit is determined to pause and the process proceeds to step S207. In step S207, a command indicating extended accuracy calculation suspension is provided to the signal line L100. In step S209, a single / double precision operation command is issued to the signal line L100, and single / double precision data is provided to the signal lines L104 to L106 in parallel with the signal lines L101 to L103. In step S211, two single / double precision calculation results are acquired from the signal lines L400 and L401. In step S213, it is determined whether or not the calculation is repeated. If it is repeated, the process returns to step S209 to repeat steps S209 to S213. If not repeated, the process proceeds to step S221.

一方、ステップS205の判定で判定結果が拡張精度演算であれば、ステップS215においては信号線L100に拡張精度演算命令を発行して、信号線L101〜L103に拡張精度データを出力する。ステップS217においては、信号線L401から1つの拡張精度演算結果を取得する。ステップS219においては繰り返し演算か否かを判定し、繰り返しならばステップS215に戻ってステップS215からS219を繰り返す。繰り返しで無ければステップS221に進む。   On the other hand, if the determination result in step S205 is an extended precision calculation, in step S215, an extended precision calculation command is issued to the signal line L100, and extended precision data is output to the signal lines L101 to L103. In step S217, one extended precision calculation result is acquired from the signal line L401. In step S219, it is determined whether or not the calculation is repeated. If it is repeated, the process returns to step S215, and steps S215 to S219 are repeated. If not repeated, the process proceeds to step S221.

ステップS221において演算結果を主記憶装置43に記憶する。あるいは入出力制御装置44を介して外部記憶装置45に記憶してもよい。ステップS223においては演算プログラムの終了か否かを判定し、終了でなければステップS203に戻って次の命令を処理する。演算プログラムの終了であれば処理を終了する。そして、次の演算プログラムの主記憶装置43からの読出しに始まる一連の流れが続く。   In step S221, the calculation result is stored in the main storage device 43. Alternatively, it may be stored in the external storage device 45 via the input / output control device 44. In step S223, it is determined whether or not the operation program is ended. If not, the process returns to step S203 to process the next instruction. If the arithmetic program is finished, the process is finished. Then, a series of flows starting from reading out the next arithmetic program from the main memory 43 continues.

なお、図2Bの手順は一例であって、これに限定されない。   Note that the procedure of FIG. 2B is an example, and the present invention is not limited to this.

(浮動小数点演算回路の構成)
図2Aにおいて、浮動小数点演算回路41は、浮動小数点加減算回路46と、浮動小数点乗算回路47と、浮動小数点除算回路48と、浮動小数点演算結果選択回路49とを含む。浮動小数点加減算回路46は、命令発行制御回路42が浮動小数点演算回路41に出力する命令のうち加減算命令を実行する。浮動小数点乗算回路47は、命令発行制御回路42が浮動小数点演算回路41に出力する命令のうち乗算命令を実行する。浮動小数点除算回路48は、命令発行制御回路42が浮動小数点演算回路41に出力する命令のうち除算命令を実行する。浮動小数点演算結果選択回路49は、各演算回路からの演算結果を選択して命令発行制御回路42に出力する。ここで、信号線L300〜L305とL310は、それぞれの回路を接続する信号線を表している。信号線L300,L302,L304は単・倍精度の演算回路の演算結果を出力する信号線であり、信号線L301,L303,L305は拡張精度の演算回路の演算結果を出力する信号である。信号線L310は、信号線L100の演算命令を解析して得られた拡張精度の演算回路が休止するか否かを出力する信号線である。本例では、拡張精度の演算回路が休止する場合に信号線L310に"1(ハイ)"が出力され、拡張精度の演算回路が演算する場合に信号線L310に"0(ロー)"が出力される。浮動小数点演算結果選択回路49により演算結果が選択されて信号線L400とL401に出力される。浮動小数点演算結果選択回路49においては、拡張精度の演算回路が休止して信号線L310が"1"である場合、信号線L400には信号線L300,L302,L304からの単・倍精度の演算結果が出力される。同時に、信号線L401には信号線L301,L303,L305からの単・倍精度の演算結果が並列に出力される。一方、拡張精度の演算回路が演算を実行する信号線L310が"0"である場合、信号線L401に信号線L301,L303,L305からの拡張精度の演算結果が出力される。
(Configuration of floating point arithmetic circuit)
2A, the floating point arithmetic circuit 41 includes a floating point addition / subtraction circuit 46, a floating point multiplication circuit 47, a floating point division circuit 48, and a floating point arithmetic result selection circuit 49. The floating point addition / subtraction circuit 46 executes an addition / subtraction instruction among the instructions output from the instruction issue control circuit 42 to the floating point arithmetic circuit 41. The floating point multiplication circuit 47 executes a multiplication instruction among the instructions output from the instruction issue control circuit 42 to the floating point arithmetic circuit 41. The floating point division circuit 48 executes a division instruction among the instructions output from the instruction issue control circuit 42 to the floating point arithmetic circuit 41. The floating point arithmetic result selection circuit 49 selects the arithmetic result from each arithmetic circuit and outputs it to the instruction issue control circuit 42. Here, the signal lines L300 to L305 and L310 represent signal lines connecting the respective circuits. The signal lines L300, L302, and L304 are signal lines that output the calculation results of the single / double precision arithmetic circuit, and the signal lines L301, L303, and L305 are signals that output the arithmetic results of the extended precision arithmetic circuit. The signal line L310 is a signal line that outputs whether or not the extended precision arithmetic circuit obtained by analyzing the arithmetic instruction of the signal line L100 is suspended. In this example, “1 (high)” is output to the signal line L310 when the extended precision arithmetic circuit is paused, and “0 (low)” is output to the signal line L310 when the extended precision arithmetic circuit is operated. Is done. The calculation result is selected by the floating-point calculation result selection circuit 49 and output to the signal lines L400 and L401. In the floating-point arithmetic result selection circuit 49, when the extended precision arithmetic circuit is paused and the signal line L310 is "1", the single and double precision arithmetic operations from the signal lines L300, L302, and L304 are applied to the signal line L400. The result is output. At the same time, the single / double precision calculation results from the signal lines L301, L303, and L305 are output in parallel to the signal line L401. On the other hand, when the signal line L310 on which the extended precision arithmetic circuit performs the operation is “0”, the extended precision calculation results from the signal lines L301, L303, and L305 are output to the signal line L401.

(浮動小数点加減算回路の構成)
図3は、第2実施形態に係る浮動小数点演算回路41に含まれる浮動小数点加減算回路46の構成を示すブロック図である。なお、本実施形態では、以下浮動小数点加減算回路46の構成と動作を代表して説明する。しかし、浮動小数点乗算回路47及び浮動小数点除算回路48においても、単精度・倍精度データ幅用と拡張精度データ幅用との2つの演算回路を備えている。そして、拡張精度データ幅用の演算回路が拡張精度演算の休止中に単精度・倍精度データ幅の演算を並列に行なうことは同様であり、演算の種類が異なるのみで構成の特徴は変わらない。従って、本明細書では、浮動小数点加減算回路46などをも浮動小数点演算回路と総称している。
(Configuration of floating point addition / subtraction circuit)
FIG. 3 is a block diagram showing a configuration of the floating point addition / subtraction circuit 46 included in the floating point arithmetic circuit 41 according to the second embodiment. In the present embodiment, the configuration and operation of the floating point addition / subtraction circuit 46 will be described below as a representative. However, the floating-point multiplication circuit 47 and the floating-point division circuit 48 also include two arithmetic circuits for single-precision / double-precision data width and extended-precision data width. And, it is the same that the arithmetic circuit for the extended precision data width performs the calculation of the single precision / double precision data width in parallel during the suspension of the extended precision calculation, and the feature of the configuration is not changed only by the type of the calculation. . Therefore, in this specification, the floating point addition / subtraction circuit 46 and the like are also collectively referred to as a floating point arithmetic circuit.

図3の浮動小数点加減算回路46は、単精度・倍精度データ幅演算回路11と拡張精度データ幅演算回路12とを有する。図2Aに示したように、浮動小数点加減算回路46には、単精度・倍精度データ幅演算回路11と拡張精度データ幅演算回路12とがそれぞれの加減算を行なう場合は、信号線L100に"00"や"11"でないそれぞれの演算命令が入力される。本例では、演算命令の"00"や"11"は、拡張精度データ幅演算回路12の休止を示す命令である。その場合には、信号線L101〜L103を使って、それぞれの被演算データと演算データとが入力される。単精度・倍精度データ幅演算回路11と拡張精度データ幅演算回路12との演算結果は、それぞれ信号線L300又はL301から出力される。信号線L310からは信号線L100に"00"や"11"が入力されなかったことを示す"0(ロー)"が出力される。   The floating point addition / subtraction circuit 46 of FIG. 3 includes a single precision / double precision data width arithmetic circuit 11 and an extended precision data width arithmetic circuit 12. As shown in FIG. 2A, in the floating point addition / subtraction circuit 46, when the single precision / double precision data width arithmetic circuit 11 and the extended precision data width arithmetic circuit 12 perform addition / subtraction, respectively, "00" is applied to the signal line L100. Each operation command that is not “or“ 11 ”is input. In this example, “00” and “11” of the operation instructions are instructions indicating the suspension of the extended precision data width operation circuit 12. In that case, the respective operation data and operation data are input using the signal lines L101 to L103. The calculation results of the single precision / double precision data width arithmetic circuit 11 and the extended precision data width arithmetic circuit 12 are output from the signal line L300 or L301, respectively. The signal line L310 outputs “0 (low)” indicating that “00” or “11” has not been input to the signal line L100.

一方、拡張精度データ幅演算回路12が拡張精度演算を休止する場合は、信号線L100に"00"又は"11"(拡張精度データ幅演算回路12の休止を示す命令)が入力される。その場合には、信号線L101〜L103を使って、単精度・倍精度データ幅演算回路11に単精度・倍精度の被演算データと演算データとが入力される。同時に、信号線L104〜L106を使って、拡張精度データ幅演算回路12に単精度・倍精度の被演算データと演算データとが入力される。単精度・倍精度データ幅演算回路11と拡張精度データ幅演算回路12との単精度・倍精度データの演算結果は、信号線L300及びL301から並列に出力される。信号線L310からは信号線L100に"00"又は"11"が入力されたことを示す"1(ハイ)"が出力される。この信号線L310の"1(ハイ)"は、図2Aの浮動小数点演算結果選択回路49に対して、信号線L400とL401に単精度・倍精度データ幅演算回路11と拡張精度データ幅演算回路12とが並列に演算した演算結果を出力させる。   On the other hand, when the extended precision data width arithmetic circuit 12 pauses the extended precision calculation, “00” or “11” (an instruction indicating the pause of the extended precision data width arithmetic circuit 12) is input to the signal line L100. In that case, the single-precision / double-precision data width arithmetic circuit 11 is inputted with single-precision / double-precision operand data and calculation data using the signal lines L101 to L103. At the same time, single-precision / double-precision operand data and computation data are input to the extended precision data width computation circuit 12 using the signal lines L104 to L106. The calculation results of single precision / double precision data of the single precision / double precision data width arithmetic circuit 11 and the extended precision data width arithmetic circuit 12 are output in parallel from the signal lines L300 and L301. The signal line L310 outputs “1 (high)” indicating that “00” or “11” is input to the signal line L100. “1 (High)” of the signal line L310 is connected to the single-precision / double-precision data width arithmetic circuit 11 and the extended precision data width arithmetic circuit in the signal lines L400 and L401 with respect to the floating-point arithmetic result selection circuit 49 in FIG. 2A. 12 outputs the operation result calculated in parallel with 12.

(拡張精度データ幅演算回路の構成)
図4は、第2実施形態に係る浮動小数点加減算回路46に含まれる拡張精度データ幅演算回路12の構成を示すブロック図である。拡張精度データ幅演算回路12は、図6の603に示すフォーマットの拡張精度演算データの演算を行なうが、図6の601や602に示すフォーマットの単精度・倍精度演算データの演算を行なうことも可能である。従って、図4の拡張精度データ幅演算回路12の各レジスタや各回路は、拡張精度演算データの演算と単精度・倍精度演算データの演算とを実行可能に構成されており、その詳細は省略する。なお、以下の説明では、各回路の機能及び動作順を考慮している。また、拡張精度データ幅演算回路12の減算における動作は加算と符号を変えれば実質的に同様であるので、以下の説明は加算を中心に説明する。すなわち、以下で使用する文言「加算」は、特に図7〜図17において「加減算」を意味する。従って、本明細書では、特徴的な構成を有する拡張精度データ幅演算回路12をも浮動小数点演算回路と総称している。
(Configuration of extended precision data width arithmetic circuit)
FIG. 4 is a block diagram showing a configuration of the extended precision data width arithmetic circuit 12 included in the floating point addition / subtraction circuit 46 according to the second embodiment. The extended precision data width arithmetic circuit 12 calculates the extended precision arithmetic data in the format indicated by 603 in FIG. 6, but may also execute single precision / double precision arithmetic data in the format indicated by 601 and 602 in FIG. Is possible. Therefore, each register and each circuit of the extended precision data width arithmetic circuit 12 of FIG. 4 are configured to be able to execute the arithmetic of the extended precision arithmetic data and the arithmetic of the single precision / double precision arithmetic data, and details thereof are omitted. To do. In the following description, the function and operation order of each circuit are considered. In addition, since the operation in the subtraction of the extended precision data width arithmetic circuit 12 is substantially the same if the addition and the sign are changed, the following description will be focused on the addition. That is, the wording “addition” used in the following means “addition / subtraction” particularly in FIGS. Therefore, in this specification, the extended precision data width arithmetic circuit 12 having a characteristic configuration is also collectively referred to as a floating point arithmetic circuit.

(A:入力データ用レジスタと出力データ用レジスタ)
拡張精度データ幅演算回路12は、命令発行制御回路42から信号線L100〜L106によって入力された信号を保持するレジスタ群を有する。レジスタ1は、信号線L100からの演算命令を保持する演算命令レジスタである。レジスタ2〜13は、信号線L101〜L106からの被演算データ及び演算データを保持するレジスタである。このうち、信号線L101〜L103に接続されたレジスタ2,4,6,8,10,12は、拡張精度データ幅演算回路12が拡張精度幅の加算を行なう場合に、拡張幅データを保持する第1レジスタ群である。第1レジスタ群は、さらに、被加算データの符号、指数、仮数を保持するレジスタ2,6,10と、加算データの符号、指数、仮数を保持するレジスタ4,8,12からなる。一方、信号線L104〜L106に接続されたレジスタ3,5,7,9,11,13は、拡張精度データ幅演算回路12が単精度・倍精度幅の加算を行なう場合に、単精度・倍精度幅データを保持する第2レジスタ群である。第2レジスタ群は、さらに、被加算データの符号、指数、仮数を保持するレジスタ3,7,11と、加算データの符号、指数、仮数を保持するレジスタ5,9,13からなる。
(A: Input data register and output data register)
The extended precision data width arithmetic circuit 12 includes a register group that holds signals input from the instruction issue control circuit 42 through the signal lines L100 to L106. The register 1 is an arithmetic instruction register that holds an arithmetic instruction from the signal line L100. The registers 2 to 13 are registers that hold operation data and operation data from the signal lines L101 to L106. Among these, the registers 2, 4, 6, 8, 10, and 12 connected to the signal lines L101 to L103 hold the extended width data when the extended precision data width arithmetic circuit 12 adds the extended precision width. A first register group. The first register group further includes registers 2, 6, and 10 for holding the sign, exponent, and mantissa of the added data, and registers 4, 8, and 12 for holding the sign, exponent, and mantissa of the added data. On the other hand, the registers 3, 5, 7, 9, 11, and 13 connected to the signal lines L104 to L106 are single precision / double when the extended precision data width arithmetic circuit 12 performs addition of single precision / double precision width. It is a second register group that holds precision width data. The second register group further includes registers 3, 7, and 11 for holding the sign, exponent, and mantissa of the added data, and registers 5, 9, and 13 for holding the sign, exponent, and mantissa of the added data.

一方、拡張精度データ幅演算回路12は、浮動小数点演算結果選択回路49に対して信号線L301,L310から出力する信号を保持するレジスタ14と15とを有する。レジスタ14は、演算結果の符号、指数、仮数を保持する演算結果格納レジスタである。レジスタ15は、信号線L100から入力されてレジスタ1に保持された演算命令から、演算実行中フラグ生成回路16によって生成された演算実行中フラグを保持する演算実行中フラグ格納レジスタである。この演算実行中フラグ生成回路16における、信号線L200のレジスタ1からの演算命令を入力とし、信号線L257の演算実行フラグを出力とする論理を含む、演算命令に基づく論理700を図7に示す。図7の演算命令701に基づいて演算実行フラグ702が生成される。図7に示すように、演算命令が"00"又は"11"の場合は演算実行フラグに"1"が出力されて、拡張精度データ幅演算回路12における拡張精度の演算休止が示される。したがって、レジスタ15は演算実行フラグ格納レジスタとして機能する。   On the other hand, the extended precision data width arithmetic circuit 12 includes registers 14 and 15 that hold signals output from the signal lines L301 and L310 to the floating-point arithmetic result selection circuit 49. The register 14 is an operation result storage register that holds the sign, exponent, and mantissa of the operation result. The register 15 is a calculation execution flag storage register that holds a calculation execution flag generated by the calculation execution flag generation circuit 16 from a calculation instruction input from the signal line L100 and held in the register 1. FIG. 7 shows a logic 700 based on the operation instruction including the logic that receives the operation instruction from the register 1 of the signal line L200 and outputs the operation execution flag of the signal line L257 in the operation execution flag generation circuit 16. . An operation execution flag 702 is generated based on the operation instruction 701 in FIG. As shown in FIG. 7, when the operation instruction is “00” or “11”, “1” is output to the operation execution flag, indicating that the extended accuracy data width calculation circuit 12 pauses the extended accuracy operation. Therefore, the register 15 functions as an operation execution flag storage register.

(B:単・倍精度/拡張精度の入力選択回路)
演算実行中フラグ生成回路16から出力する信号線L257の演算実行中フラグは、演算符号選択回路17、演算指数選択回路18及び演算仮数選択回路19に入力される。演算符号選択回路17、演算指数選択回路18及び演算仮数選択回路19は、信号線L257の演算実行中フラグに従って入力された符号、指数、仮数を選択して演算回路群に伝達する。
(B: Single / double precision / extended precision input selection circuit)
The calculation execution flag of the signal line L257 output from the calculation execution flag generation circuit 16 is input to the calculation sign selection circuit 17, the calculation exponent selection circuit 18, and the calculation mantissa selection circuit 19. The arithmetic code selection circuit 17, the arithmetic exponent selection circuit 18, and the arithmetic mantissa selection circuit 19 select the sign, exponent, and mantissa input according to the calculation execution flag of the signal line L257 and transmit them to the arithmetic circuit group.

演算符号選択回路17には、レジスタ2〜5からそれぞれ信号線L240〜L243に出力された被加算データ符号と加算データ符号とが入力される。演算符号選択回路17は、信号線L257の演算実行中フラグによる図8に示す論理800に従って、入力された符号を選択して信号線L253とL254とに出力する。演算実行中フラグが"0"の場合は、801で示すように、レジスタ2及び4からそれぞれ信号線L240及びL241に出力された拡張精度の被加算データ符号と加算データ符号とを選択して、信号線L253とL254に出力する。一方、演算実行中フラグが"1"の場合は、802で示すように、レジスタ3及び5からそれぞれ信号線L242及びL243に出力された単精度・倍精度の被加算データ符号と加算データ符号とを選択して、信号線L253とL254に出力する。   The operation code selection circuit 17 receives the added data code and the added data code output from the registers 2 to 5 to the signal lines L240 to L243, respectively. The operation code selection circuit 17 selects the input code and outputs it to the signal lines L253 and L254 according to the logic 800 shown in FIG. 8 based on the operation execution flag of the signal line L257. When the calculation execution flag is “0”, as shown by 801, the extended precision added data code and the added data code output from the registers 2 and 4 to the signal lines L240 and L241, respectively, are selected. Output to the signal lines L253 and L254. On the other hand, when the calculation execution flag is “1”, as indicated by 802, single-precision / double-precision added data code and added data code output from the registers 3 and 5 to the signal lines L242 and L243, respectively, Is output to the signal lines L253 and L254.

演算指数選択回路18には、レジスタ6〜9からそれぞれ信号線L244〜L247に出力された被加算指数データと加算指数データとが入力される。演算指数選択回路18は、信号線L257の演算実行中フラグによる図9に示す論理900に従って、入力された指数データを選択して信号線L255とL256とに出力する。演算実行中フラグが"0"の場合は、901で示すように、レジスタ6及び8からそれぞれ信号線L244及びL245に出力された拡張精度の被加算指数データと加算指数データとを選択して、信号線L255とL256に出力する。一方、演算実行中フラグが"1"の場合は、902で示すように、レジスタ7及び9からそれぞれ信号線L246及びL247に出力された単精度・倍精度の被加算指数データと加算指数データとを選択して、信号線L255とL256に出力する。   The added exponent data and the added exponent data output from the registers 6 to 9 to the signal lines L244 to L247, respectively, are input to the arithmetic exponent selection circuit 18. The calculation index selection circuit 18 selects the input index data and outputs it to the signal lines L255 and L256 according to the logic 900 shown in FIG. 9 by the calculation execution flag of the signal line L257. When the calculation execution flag is “0”, as shown by 901, the extended precision added index data and the added index data output from the registers 6 and 8 to the signal lines L244 and L245, respectively, are selected, Output to the signal lines L255 and L256. On the other hand, when the operation execution flag is “1”, as indicated by 902, single-precision / double-precision added exponent data and added exponent data output from the registers 7 and 9 to the signal lines L 246 and L 247, respectively, Is output to the signal lines L255 and L256.

演算仮数選択回路19には、レジスタ10〜13からそれぞれ信号線L248〜L251に出力された被加算仮数データと加算仮数データとが入力される。演算仮数選択回路19は、信号線L257の演算実行中フラグによる図10に示す論理1000に従って、入力された仮数データを選択して信号線L258とL259とに出力する。演算実行中フラグが"0"の場合は、1001で示すように、レジスタ10及び12からそれぞれ信号線L248及びL249に出力された拡張精度の被加算仮数データと加算仮数データとを選択して、信号線L258とL259に出力する。一方、演算実行中フラグが"1"の場合は、1002で示すように、レジスタ11及び13からそれぞれ信号線L250及びL251に出力された単精度・倍精度の被加算仮数データと加算仮数データとを選択して、信号線L258とL259に出力する。   The arithmetic mantissa selection circuit 19 receives the added mantissa data and the added mantissa data output from the registers 10 to 13 to the signal lines L248 to L251, respectively. The arithmetic mantissa selection circuit 19 selects the input mantissa data and outputs the selected mantissa data to the signal lines L258 and L259 in accordance with the logic 1000 shown in FIG. 10 based on the operation executing flag of the signal line L257. When the operation execution flag is “0”, as shown by 1001, the extended precision added mantissa data and the added mantissa data output from the registers 10 and 12 to the signal lines L248 and L249, respectively, are selected. Output to the signal lines L258 and L259. On the other hand, when the calculation execution flag is “1”, as indicated by 1002, single-precision / double-precision added mantissa data and added mantissa data output from the registers 11 and 13 to the signal lines L250 and L251, respectively, Is output to the signal lines L258 and L259.

(C:演算命令解析回路)
レジスタ1に保持された演算命令は、信号線L200により演算命令解析回路20に入力される。演算命令解析回路20は、図7の論理700に従って、信号線L200の演算命令と信号線L253の被加算データ符号と信号線L254の加算データ符号とに基づいて、演算命令解析結果を信号線L207から出力する。図7に示すように、演算命令解析結果の"0"は加算、"1"は減算であり、仮数選択回路25の制御に使用される。
(C: Operation instruction analysis circuit)
The operation instruction held in the register 1 is input to the operation instruction analysis circuit 20 through the signal line L200. The arithmetic instruction analysis circuit 20 outputs the arithmetic instruction analysis result to the signal line L207 based on the arithmetic instruction of the signal line L200, the added data code of the signal line L253, and the added data code of the signal line L254 according to the logic 700 of FIG. Output from. As shown in FIG. 7, “0” in the operation instruction analysis result is addition and “1” is subtraction, and is used for control of the mantissa selection circuit 25.

(D:指数選択回路と指数調整回路)
指数大小比較回路21は、演算指数選択回路18から信号線L255とL256に出力された被加算指数データと加算指数データとの大小を比較する。図11は、指数大小比較回路21における指数データと信号線L211に出力される値との論理1100を示す図である。信号線L255に出力された被加算指数データが信号線L256に出力された加算指数データよりも大きければ、信号線L211に"1"が出力される。信号線L255に出力された被加算指数データが信号線L256に出力された加算指数データよりも大きく無ければ、信号線L211に"0"が出力される。信号線L211の値は、基準指数選択回路22の選択と、中間符号生成回路24の中間符号生成と、仮数選択回路25の制御に使用される。
(D: exponent selection circuit and exponent adjustment circuit)
The exponent magnitude comparison circuit 21 compares the magnitude of the added exponent data output from the arithmetic exponent selection circuit 18 to the signal lines L255 and L256 and the added exponent data. FIG. 11 is a diagram showing a logic 1100 between the exponent data in the exponent magnitude comparison circuit 21 and the value output to the signal line L211. If the added index data output to the signal line L255 is larger than the added index data output to the signal line L256, “1” is output to the signal line L211. If the added index data output to the signal line L255 is not larger than the added index data output to the signal line L256, “0” is output to the signal line L211. The value of the signal line L211 is used for selection of the reference exponent selection circuit 22, intermediate code generation of the intermediate code generation circuit 24, and control of the mantissa selection circuit 25.

基準指数選択回路22は、被加算仮数データと加算仮数データとの桁合わせをどちらに合わせて行なうかを決定する。図12は、基準指数選択回路22における信号線L211に出力される値に対応して信号線L209に出力される指数データの論理1200を示す図である。指数大小比較回路21からの信号線L211の出力値が"0"の場合は、被加算指数データが基準となり被加算指数データが信号線L209に出力される。指数大小比較回路21からの信号線L211の出力値が"1"の場合は、加算指数データが基準となり加算指数データが信号線L209に出力される。   The reference exponent selection circuit 22 determines which digit alignment of the added mantissa data and the added mantissa data is performed. FIG. 12 is a diagram showing the logic 1200 of exponent data output to the signal line L209 corresponding to the value output to the signal line L211 in the reference exponent selection circuit 22. When the output value of the signal line L211 from the exponent magnitude comparison circuit 21 is “0”, the added exponent data is output to the signal line L209 based on the added exponent data. When the output value of the signal line L211 from the exponent magnitude comparison circuit 21 is "1", the addition exponent data is used as a reference and the addition exponent data is output to the signal line L209.

シフト量算出回路23は、演算指数選択回路18が選択したより大きい指数と選択されなかったより小さい指数の差を求めて、小さい仮数データを右シフトして桁合わせする右シフト量を求めて、信号線L210により桁合わせ右シフト回路27に送る。   The shift amount calculation circuit 23 calculates a difference between the larger exponent selected by the arithmetic exponent selection circuit 18 and the smaller exponent not selected, obtains a right shift amount for right-shifting the small mantissa data and performing signal alignment. The data is sent to the digit alignment right shift circuit 27 through the line L210.

(E:仮数演算回路)
仮数選択回路25には、演算仮数選択回路19で選択されて信号線L258とL259に出力された被加算仮数と加算仮数とが入力されて、被加算仮数と加算仮数とを信号線L212とL213のいずれに出力するかを選択する。仮数選択回路25の選択は、指数大小比較回路21から信号線L211に出力された被加算指数と加算指数との大小比較結果と、演算命令解析回路20から信号線L207に出力された演算命令解析結果とに基づいて、行なわれる。すなわち、指数の小さい方を桁合わせが必要な仮数として出力し、他方を桁合わせが必要ない仮数として出力する。
(E: Mantissa calculation circuit)
The mantissa selection circuit 25 receives the added mantissa and the addition mantissa selected by the arithmetic mantissa selection circuit 19 and output to the signal lines L258 and L259, and the added mantissa and the addition mantissa are input to the signal lines L212 and L213. Select which to output to. The mantissa selection circuit 25 selects the magnitude comparison result between the added index and the added index output from the exponent magnitude comparison circuit 21 to the signal line L211 and the calculation instruction analysis output from the calculation instruction analysis circuit 20 to the signal line L207. Based on the results. In other words, the smaller exponent is output as a mantissa requiring digit alignment, and the other is output as a mantissa requiring no digit alignment.

図13は、仮数選択回路25の内部構成を示す図である。仮数選択回路25は、仮数A選択回路50と、仮数B選択回路51と、仮数B反転選択回路52とからなる。   FIG. 13 is a diagram showing an internal configuration of the mantissa selection circuit 25. The mantissa selection circuit 25 includes a mantissa A selection circuit 50, a mantissa B selection circuit 51, and a mantissa B inversion selection circuit 52.

仮数A選択回路50は、信号線L212に出力する仮数を、信号線L211の被加算指数と加算指数との大小比較結果に基づいて被加算仮数と加算仮数とのうち指数の小さい仮数を選択する。図14は、仮数A選択回路50の論理1400を示す図である。仮数B選択回路51と仮数B反転選択回路52とは、信号線L213に出力する仮数を、信号線L211の被加算指数と加算指数との大小比較結果と、信号線L207の演算命令解析結果とに基づいて被加算仮数と加算仮数とのうち指数の大きい仮数を選択する。図15は、仮数B選択回路51の論理1500を示す図である。仮数B選択回路51から出力される信号線L280には選択された仮数がそのまま出力され、信号線L281には選択された仮数を反転したデータが出力される。仮数B反転選択回路52は、仮数B選択回路51から出力された信号線L280の仮数と信号線L281の反転仮数とを信号線L211の演算命令解析結果に基づいて選択し、信号線L213に出力する。図16は、仮数B反転選択回路52の論理1600を示す図である。演算命令解析結果が"0"(加算)の場合は信号線L280の反転しない仮数を信号線L213に出力し、演算命令解析結果が"1"(減算)の場合は信号線L280の反転した仮数を信号線L213に出力する。   The mantissa A selection circuit 50 selects a mantissa having a small exponent from the mantissa to be added and the mantissa to be added, based on the result of comparison between the exponent to be added and the addition exponent of the signal line L211. . FIG. 14 is a diagram illustrating the logic 1400 of the mantissa A selection circuit 50. The mantissa B selection circuit 51 and the mantissa B inversion selection circuit 52 determine the mantissa output to the signal line L213, the result of comparing the added exponent of the signal line L211 with the addition exponent, the result of the operation instruction analysis of the signal line L207, Based on, a mantissa having a large exponent is selected from the added mantissa and the added mantissa. FIG. 15 is a diagram illustrating the logic 1500 of the mantissa B selection circuit 51. The selected mantissa is output as it is to the signal line L280 output from the mantissa B selection circuit 51, and data obtained by inverting the selected mantissa is output to the signal line L281. The mantissa B inversion selection circuit 52 selects the mantissa of the signal line L280 and the inversion mantissa of the signal line L281 output from the mantissa B selection circuit 51 based on the operation instruction analysis result of the signal line L211 and outputs the selected mantissa to the signal line L213. To do. FIG. 16 is a diagram showing the logic 1600 of the mantissa B inversion selection circuit 52. When the operation instruction analysis result is “0” (addition), the mantissa that is not inverted of the signal line L280 is output to the signal line L213, and when the operation instruction analysis result is “1” (subtraction), the mantissa is inverted of the signal line L280. Is output to the signal line L213.

桁合わせ右シフト回路27は、信号線L212から入力された指数の小さな仮数を、シフト量算出回路23から信号線L210に出力された大小指数の差だけ右シフトして、加減算回路29で演算する仮数の桁合わせを行なう。加減算回路29は、桁合わせ右シフト回路27の桁合わせした信号線L215の仮数データと桁合わせが必要ない信号線L213の仮数データとを加算した加減算結果を、信号線L216に出力する。同時に、指数が同じ数値で、小さい被加算仮数から大きい加算仮数を減算した場合を検出して、信号線L220にその結果を出力する。指数が同じ数値で、小さい被加算仮数から大きい加算仮数を減算した場合に、"1"が出力される。   The digit alignment right shift circuit 27 shifts the mantissa with a small exponent input from the signal line L212 to the right by the difference between the large and small exponents output from the shift amount calculation circuit 23 to the signal line L210, and calculates the addition / subtraction circuit 29. Perform mantissa digit alignment. The addition / subtraction circuit 29 outputs the addition / subtraction result obtained by adding the mantissa data of the signal line L215 aligned by the digit alignment right shift circuit 27 and the mantissa data of the signal line L213 not requiring alignment to the signal line L216. At the same time, a case where a large added mantissa is subtracted from a small added mantissa with the same numerical value is detected, and the result is output to the signal line L220. When a large addition mantissa is subtracted from a small added mantissa with the same exponent, “1” is output.

0桁数チェック回路28は、加減算回路29が信号線L216に出力する演算結果の上位における"0"データの有無を検出して信号線L217に出力する。そして、正規化左シフト回路31は、0桁数チェック回路28が信号線L217出力した数値分を左シフトして演算結果の仮数を正規化し、演算結果の仮数として信号線L218に出力する。信号線L218の正規化された演算結果の仮数は、レジスタ14に送られて保持される。
かかる正規化左シフト回路31と0桁数チェック回路28は、演算結果の仮数と指数とを整合する整合回路として機能する。
The 0-digit number check circuit 28 detects the presence or absence of “0” data in the higher rank of the calculation result output from the adder / subtracter circuit 29 to the signal line L216 and outputs it to the signal line L217. The normalized left shift circuit 31 shifts the numerical value output from the signal number L217 by the 0-digit number check circuit 28 to the left, normalizes the mantissa of the operation result, and outputs the result to the signal line L218 as the mantissa of the operation result. The mantissa of the normalized calculation result of the signal line L218 is sent to the register 14 and held.
The normalized left shift circuit 31 and the 0-digit number check circuit 28 function as a matching circuit that matches the mantissa of the operation result with the exponent.

(F:指数生成回路)
指数生成減算回路30は、基準指数選択回路22から信号線L209に出力された大きな指数を入力する。そして、0桁数チェック回路28が信号線L217に出力した数値分だけ演算結果が正規化左シフト回路31で左シフトされるのに合わせて、信号線L209の指数から信号線L217の数値を減算して、演算結果の指数として信号線L219に出力する。信号線L219の生成符号は、レジスタ14に送られて保持される。
(F: exponent generation circuit)
The exponent generation / subtraction circuit 30 inputs the large exponent output from the reference exponent selection circuit 22 to the signal line L209. Then, the numerical value of the signal line L217 is subtracted from the exponent of the signal line L209 as the calculation result is shifted to the left by the normalized left shift circuit 31 by the numerical value output by the zero digit number check circuit 28 to the signal line L217. Then, it is output to the signal line L219 as an exponent of the calculation result. The generated code of the signal line L219 is sent to the register 14 and held.

(G:符号生成回路)
演算符号選択回路17から信号線L253とL254に出力された被加算データ符号と加算データ符号とは、中間符号生成回路24に入力される。中間符号生成回路24は、指数大小比較回路21からの信号線L211の値に基づいて、信号線L253とL254から入力された被加算データ符号と加算データ符号とのいずれかを選択して、信号線L208に出力する。図17は、中間符号生成回路24の論理1700を示す図である。中間符号生成回路24は、大きなデータの符号を選択して出力する。すなわち、信号線L211の値が"0"(加算指数データが被加算指数データ以上)の場合は、加算データ符号を信号線L208に出力する。一方、信号線L211の値が"1"(加算指数データが被加算指数データより小さい)の場合は、被加算データ符号を信号線L208に出力する。
(G: code generation circuit)
The added data code and the added data code output from the operational code selection circuit 17 to the signal lines L253 and L254 are input to the intermediate code generation circuit 24. Based on the value of the signal line L211 from the exponent magnitude comparison circuit 21, the intermediate code generation circuit 24 selects either the added data code or the added data code input from the signal lines L253 and L254, and outputs the signal Output to line L208. FIG. 17 is a diagram illustrating the logic 1700 of the intermediate code generation circuit 24. The intermediate code generation circuit 24 selects and outputs a large data code. That is, when the value of the signal line L211 is “0” (additional exponent data is equal to or greater than the added exponent data), the addition data code is output to the signal line L208. On the other hand, when the value of the signal line L211 is “1” (addition index data is smaller than the addition index data), the addition data code is output to the signal line L208.

符号生成回路26は、中間符号生成回路24が出力した信号線L208の中間符号を入力する。そして、加減算回路29の指数が同じ数値で、小さい被加算仮数から大きい加算仮数を減算した場合を検出して信号線L220に出力した結果に基づいて、中間符号を調整する。図18は、符号生成回路26の論理1800を示す図である。信号線L220の符号反転信号が"1"の場合に、中間符号が反転されて生成符号となる。符号生成回路26は、生成した生成符号を演算結果の符号として信号線L214に出力する。信号線L214の生成符号は、レジスタ14に送られて保持される。   The code generation circuit 26 inputs the intermediate code of the signal line L208 output from the intermediate code generation circuit 24. Then, the intermediate code is adjusted based on the result of detecting the case where a large addition mantissa is subtracted from a small added mantissa with the same numerical value in the addition / subtraction circuit 29 and outputting it to the signal line L220. FIG. 18 is a diagram illustrating the logic 1800 of the code generation circuit 26. When the sign inversion signal of the signal line L220 is “1”, the intermediate code is inverted to become a generated code. The code generation circuit 26 outputs the generated generated code to the signal line L214 as a calculation result code. The generated code of the signal line L214 is sent to the register 14 and held.

図4の拡張精度データ幅演算回路12の構成により、拡張精度データ幅演算回路12で拡張精度演算が休止中に単・倍精度演算が実行可能となる。すなわち、信号線L100から入力された演算命令が拡張精度演算であれば、信号線L101〜L103から入力された拡張精度データ幅の数値データが演算される。そして、レジスタ14に拡張精度の演算結果が保持され、レジスタ15に拡張精度演算を示す"0"が保持されて、信号線L301とL310から出力される。一方、信号線L100から入力された演算命令が拡張精度演算でなければ、信号線L104〜L106から入力された他・倍精度データ幅の数値データが演算される。そして、レジスタ14に単・倍精度の演算結果が保持され、レジスタ15に単・倍精度演算を示す"1"が保持されて、信号線L301とL310から出力される。   With the configuration of the extended precision data width arithmetic circuit 12 in FIG. 4, the extended precision data width arithmetic circuit 12 can execute single / double precision arithmetic while the extended precision arithmetic is paused. In other words, if the arithmetic instruction input from the signal line L100 is an extended precision calculation, numerical data having the extended precision data width input from the signal lines L101 to L103 is calculated. Then, the extended precision calculation result is held in the register 14 and “0” indicating the extended precision calculation is held in the register 15 and is output from the signal lines L301 and L310. On the other hand, if the operation instruction input from the signal line L100 is not an extended precision operation, numerical data having other / double precision data widths input from the signal lines L104 to L106 is calculated. The register 14 holds the single / double precision calculation result, the register 15 holds “1” indicating the single / double precision calculation, and outputs the result from the signal lines L301 and L310.

(単精度・倍精度データ幅演算回路11の構成)
図5は、第2実施形態に係る浮動小数点加減算回路46に含まれる単精度・倍精度データ幅演算回路11の構成を示すブロック図である。図5の単精度・倍精度データ幅演算回路11は、図4の拡張精度データ幅演算回路12の構成とは以下の点が異なっている以外は、データ幅の違いはあるが同じ名称の構成要素の機能は同様であるので、詳細な説明は省く。各レジスタ、指数演算に係る回路及び仮数演算に係る回路のデータ幅が、図6に示す単精度・倍精度演算データのフォーマットに適応されるのみである。
(Configuration of single precision / double precision data width arithmetic circuit 11)
FIG. 5 is a block diagram showing a configuration of the single precision / double precision data width arithmetic circuit 11 included in the floating point addition / subtraction circuit 46 according to the second embodiment. The single-precision / double-precision data width arithmetic circuit 11 shown in FIG. 5 differs from the configuration of the extended precision data width arithmetic circuit 12 shown in FIG. Since the functions of the elements are the same, a detailed description is omitted. The data width of each register, the circuit related to the exponent operation and the circuit related to the mantissa operation is only adapted to the format of the single precision / double precision operation data shown in FIG.

図5のレジスタ70は図4のレジスタ1に相当する。図5のレジスタ71〜76は、図4のレジスタ2,4,6,8,10,12に相当する。図5の演算命令解析回路77は、図4の演算命令解析回路20に相当する。図5の指数大小比較回路81は、図4の指数大小比較回路21に相当する。図5の基準指数選択回路79は、図4の基準指数選択回路22に相当する。図5のシフト量算出回路80は、図4のシフト量算出回路23に相当する。図5の仮数選択回路82は、図4の仮数選択回路25に相当する。図5の桁合わせ右シフト回路84は、図4の桁合わせ右シフト回路27に相当する。図5の加減算回路86は、図4の加減算回路29に相当する。図5の0桁数チェック回路85は、図4の0桁数チェック回路28に相当する。図5の正規化左シフト回路88は、図4の正規化左シフト回路31に相当する。図5の指数生成減算回路87は、図4の指数生成減算回路30に相当する。図5の中間符号生成回路78は、図4の中間符号生成回路24に相当する。図5の符号生成回路83は、図4の符号生成回路26に相当する。図5のレジスタ89は図4のレジスタ14に相当する。   The register 70 in FIG. 5 corresponds to the register 1 in FIG. The registers 71 to 76 in FIG. 5 correspond to the registers 2, 4, 6, 8, 10, and 12 in FIG. The operation instruction analysis circuit 77 in FIG. 5 corresponds to the operation instruction analysis circuit 20 in FIG. The exponent magnitude comparison circuit 81 in FIG. 5 corresponds to the exponent magnitude comparison circuit 21 in FIG. The reference index selection circuit 79 in FIG. 5 corresponds to the reference index selection circuit 22 in FIG. The shift amount calculation circuit 80 in FIG. 5 corresponds to the shift amount calculation circuit 23 in FIG. The mantissa selection circuit 82 in FIG. 5 corresponds to the mantissa selection circuit 25 in FIG. 4. The digit alignment right shift circuit 84 in FIG. 5 corresponds to the digit alignment right shift circuit 27 in FIG. The addition / subtraction circuit 86 in FIG. 5 corresponds to the addition / subtraction circuit 29 in FIG. 4. The zero-digit number check circuit 85 in FIG. 5 corresponds to the zero-digit number check circuit 28 in FIG. The normalized left shift circuit 88 in FIG. 5 corresponds to the normalized left shift circuit 31 in FIG. The exponent generation / subtraction circuit 87 in FIG. 5 corresponds to the exponent generation / subtraction circuit 30 in FIG. 4. The intermediate code generation circuit 78 in FIG. 5 corresponds to the intermediate code generation circuit 24 in FIG. The code generation circuit 83 in FIG. 5 corresponds to the code generation circuit 26 in FIG. The register 89 in FIG. 5 corresponds to the register 14 in FIG.

単精度・倍精度データ幅演算回路11は、拡張精度データ幅演算回路12の信号線L104〜L106の入力データを保持するレジスタ群、入力データを選択する演算符号選択回路17、演算指数選択回路18及び演算仮数選択回路19を有していない。また、選択信号である演算実行中フラグを生成する演算実行中フラグ生成回路16とそれを保持するレジスタ15を有していない。   The single-precision / double-precision data width arithmetic circuit 11 includes a register group that holds input data of the signal lines L104 to L106 of the extended precision data width arithmetic circuit 12, an arithmetic code selection circuit 17 that selects the input data, and an arithmetic exponent selection circuit 18. The arithmetic mantissa selection circuit 19 is not provided. Further, it does not have a calculation execution flag generation circuit 16 that generates a calculation execution flag that is a selection signal, and a register 15 that holds the calculation execution flag.

図4の拡張精度データ幅演算回路12と図5の単精度・倍精度データ幅演算回路11とを含む構成により、図3の浮動小数点加減算回路46は以下のように動作する。拡張精度演算であれば、拡張精度データ幅演算回路12の信号線L301から拡張精度の演算結果が出力される。一方、単・倍精度演算であれば、単・倍精度データ幅演算回路11の信号線L300から1つの単・倍精度演算結果が出力される。さらに並列に、拡張精度データ幅演算回路12の信号線L301からもう1つの単・倍精度の演算結果が出力される。拡張精度演算か単・倍精度演算かは信号線L310の信号により示される。   With the configuration including the extended precision data width arithmetic circuit 12 of FIG. 4 and the single precision / double precision data width arithmetic circuit 11 of FIG. 5, the floating point addition / subtraction circuit 46 of FIG. 3 operates as follows. In the case of the extended precision calculation, the extended precision calculation result is output from the signal line L301 of the extended precision data width calculation circuit 12. On the other hand, in the case of single / double precision computation, one single / double precision computation result is output from the signal line L300 of the single / double precision data width computation circuit 11. In parallel, another single / double precision calculation result is output from the signal line L301 of the extended precision data width arithmetic circuit 12. Whether it is an extended precision calculation or a single / double precision calculation is indicated by a signal on the signal line L310.

図3の浮動小数点加減算回路46を含む構成により、図2Aの科学演算回路40は以下のように動作する。拡張精度演算か単・倍精度演算かは信号線L310の信号により示される。拡張精度演算であれば、拡張精度データ幅演算回路12の信号線L301から出力された拡張精度の演算結果が浮動小数点演算結果選択回路49で選択されて、信号線L401により命令発行制御回路42に戻される。一方、単・倍精度演算であれば、単・倍精度データ幅演算回路11の信号線L300から出力された1つの単・倍精度演算結果が信号線L400により命令発行制御回路42に戻される。さらに並列に、拡張精度データ幅演算回路12の信号線L301から出力されたもう1つの単・倍精度の演算結果が信号線L401により命令発行制御回路42に戻される。   With the configuration including the floating point addition / subtraction circuit 46 of FIG. 3, the scientific operation circuit 40 of FIG. 2A operates as follows. Whether it is an extended precision calculation or a single / double precision calculation is indicated by a signal on the signal line L310. In the case of the extended precision calculation, the extended precision calculation result output from the signal line L301 of the extended precision data width calculation circuit 12 is selected by the floating point calculation result selection circuit 49, and is sent to the instruction issue control circuit 42 by the signal line L401. Returned. On the other hand, in the case of single / double precision computation, one single / double precision computation result output from the signal line L300 of the single / double precision data width computation circuit 11 is returned to the instruction issue control circuit 42 by the signal line L400. Further, in parallel, another single / double precision operation result output from the signal line L301 of the extended precision data width arithmetic circuit 12 is returned to the instruction issue control circuit 42 via the signal line L401.

〈第2実施形態の拡張精度データ幅演算回路を有する浮動小数点演算回路の動作手順〉
以下、第2実施形態の浮動小数点演算回路の具体的動作として、浮動小数点加減算回路46の処理例を説明する。本実施形態では、拡張精度データ幅演算回路12が休止中であることを条件に、命令発行制御回路42から拡張精度データ幅演算回路12に単精度・倍精度演算命令と単精度・倍精度の32ビット幅又は64ビット幅のデータとを転送する。これにより、拡張精度データ幅演算回路12において単精度・倍精度の演算結果を得ることができる。なお、単精度・倍精度データ幅演算回路11の動作と拡張精度データ幅演算回路12の単精度・倍精度演算は類似であるので、拡張精度データ幅演算回路12の拡張精度演算と単精度・倍精度演算について説明する。
<Operation Procedure of Floating Point Arithmetic Circuit Having Extended Precision Data Width Arithmetic Circuit of Second Embodiment>
Hereinafter, as a specific operation of the floating point arithmetic circuit according to the second embodiment, a processing example of the floating point addition / subtraction circuit 46 will be described. In the present embodiment, on the condition that the extended precision data width arithmetic circuit 12 is inactive, the instruction issue control circuit 42 sends a single precision / double precision arithmetic instruction and a single precision / double precision instruction to the extended precision data width arithmetic circuit 12. 32-bit or 64-bit data is transferred. As a result, the single-precision / double-precision calculation result can be obtained in the extended precision data width calculation circuit 12. Since the operation of the single precision / double precision data width arithmetic circuit 11 and the single precision / double precision arithmetic of the extended precision data width arithmetic circuit 12 are similar, the extended precision arithmetic of the extended precision data width arithmetic circuit 12 and the single precision / The double precision calculation will be described.

(拡張精度データ幅演算回路12の拡張精度演算時における動作手順)
以下、拡張精度データ幅の演算、"1000000000000000000000000000×162"(被加算データ)+"7FFFFFFFFFFFFFFFFFFFFFFFFFFF×164"(加算データ)、を1回加算する動作を説明する。なお、取り扱う浮動小数点演算データは、所謂、標準指数データ形式と拡張指数データ形式とIEEE指数データ形式との内、図6に示す標準指数データ形式(符号データ1ビット、指数データ7ビットを2桁の16進数表記、仮数データ112ビットを28桁の16進数表記)を用いて説明する。
(Operation procedure of extended precision data width arithmetic circuit 12 at the time of extended precision calculation)
In the following, an operation of calculating the extended precision data width, “1000000000000000000000000000 × 16 2 ” (data to be added) + “7FFFFFFFFFFFFFFFFFFFFFFFFFFF × 16 4 ” (addition data), will be described. The floating point arithmetic data to be handled is the so-called standard exponent data format, extended exponent data format, and IEEE exponent data format. The standard exponent data format shown in FIG. Hex notation and mantissa data 112 bits in 28-digit hexadecimal notation).

図19と図20は、かかる動作の説明における各レジスタ値1900と各信号線の数値2000とを示す図である。   19 and 20 are diagrams showing each register value 1900 and each signal line value 2000 in the description of the operation.

命令発行制御回路42からの信号線L100の加算命令として、レジスタ1に加算命令の数値"01"が格納される。また、前述の拡張精度データ幅の被加算データと加算データとより、レジスタ2に被加算データの符号数値"0"(正符号)が、レジスタ4に加算データの符号数値"0"(正符号)が格納される。また、レジスタ6に被加算データの指数値"02"が、レジスタ8に加算データの指数値"04"が格納される。また、レジスタ10に被加算仮数データ値"1000000000000000000000000000"が、レジスタ12に加算仮数データ値"7FFFFFFFFFFFFFFFFFFFFFFFFFFF"がそれぞれ格納される。   As the addition instruction for the signal line L100 from the instruction issuance control circuit 42, the numerical value “01” of the addition instruction is stored in the register 1. Further, the sign value “0” (positive sign) of the added data is stored in the register 2 and the code value “0” (positive sign) of the added data is stored in the register 4 based on the added data and the added data having the extended precision data width. ) Is stored. In addition, an exponent value “02” of the added data is stored in the register 6, and an exponent value “04” of the added data is stored in the register 8. Further, the added mantissa data value “1000000000000000000000000000” is stored in the register 10, and the added mantissa data value “7FFFFFFFFFFFFFFFFFFFFFFFFFFF” is stored in the register 12.

演算実行中フラグ生成回路16は、図7の演算命令生成論理700からレジスタ1からの信号線L200の信号が"01"の拡張精度データ幅の加算命令であることから、演算テータ選択信号として"0"を信号線L257に出力する。信号線L257の"0"を条件として、演算符号選択回路17は、図8の符号データ選択論理800から信号線L240とL242の拡張精度データ幅の被加算符号データを選択して、信号線L253とL254に共に"0"(正符号)を出力する。演算指数選択回路18は、図9の指数データ選択論理900から信号線L244とL245の拡張精度データ幅の指数データを選択して、信号線L255に"02"、信号線L256"04"を出力する。演算仮数選択回路19は、図10の仮数データ選択論理1000から信号線L248とL249の拡張精度データ幅の仮数データを選択する。そして、それぞれ信号線L258に"1000000000000000000000000000"、信号線L259に"7FFFFFFFFFFFFFFFFFFFFFFFFFFF"を出力する。   Since the operation execution flag generation circuit 16 is the addition instruction of the extended precision data width of the signal line L200 from the operation instruction generation logic 700 of FIG. 0 "is output to the signal line L257. On condition that the signal line L257 is “0”, the operation code selection circuit 17 selects the added code data of the extended precision data width of the signal lines L240 and L242 from the code data selection logic 800 of FIG. "0" (plus sign) is output to both L and L254. The arithmetic exponent selection circuit 18 selects exponential data with the extended precision data width of the signal lines L244 and L245 from the exponent data selection logic 900 of FIG. 9, and outputs “02” and signal line L256 “04” to the signal line L255. To do. The arithmetic mantissa selection circuit 19 selects the mantissa data of the extended precision data width of the signal lines L248 and L249 from the mantissa data selection logic 1000 of FIG. Then, “1000000000000000000000000000” is output to the signal line L258, and “7FFFFFFFFFFFFFFFFFFFFFFFFFFFF” is output to the signal line L259.

演算命令解析回路20は、信号線L200の演算命令の数値"01"(加算命令)と、信号線L253の数値"0"(正符号)と、信号線L254の数値"0"(正符号)との条件から、図7の演算命令生成論理700から加算命令となることを解析し、信号線L207に数値"0"(加算命令)を出力する。   The arithmetic instruction analyzing circuit 20 includes a numerical value “01” (addition instruction) of the arithmetic instruction of the signal line L200, a numerical value “0” (positive sign) of the signal line L253, and a numerical value “0” (positive sign) of the signal line L254. 7 is analyzed from the operation instruction generation logic 700 of FIG. 7, and a numerical value “0” (addition instruction) is output to the signal line L207.

指数大小比較回路21は、信号線L255の被加算指数データの数値"02"と信号線L256の加算指数データの数値"04"とを大小比較する。比較結果として、図11の指数大小比較論理1100から信号線L256の指数データを大きいと判定して、指数大小比較結果信号として信号線L211に数値"0"を出力する。基準指数選択回路22は、信号線L211の指数大小比較結果の数値"0"の条件から、図12の基準指数選択論理1200から大きい加算指数データである信号線L256の数値"04"を選択して、信号線L209に出力する。シフト量算出回路23は、信号線L255の被加算データの指数の数値"02"と、信号線L256の加算データの指数の数値"04"との差を求め、桁合わせのための右シフト量として信号線L210に数値"2"を出力する。   The exponent magnitude comparison circuit 21 compares the numerical value “02” of the added exponent data of the signal line L255 with the numeric value “04” of the added exponent data of the signal line L256. As a comparison result, the exponent magnitude comparison logic 1100 in FIG. 11 determines that the exponent data of the signal line L256 is large, and outputs a numerical value “0” to the signal line L211 as an exponent magnitude comparison result signal. The reference exponent selection circuit 22 selects the numeric value “04” of the signal line L256, which is large added exponent data, from the reference exponent selection logic 1200 of FIG. 12 based on the condition of the numeric value “0” of the exponent magnitude comparison result of the signal line L211. To the signal line L209. The shift amount calculation circuit 23 obtains the difference between the exponent value “02” of the added data of the signal line L255 and the exponent value “04” of the added data of the signal line L256, and the right shift amount for digit alignment The numerical value “2” is output to the signal line L210.

仮数選択回路25は、信号線L211の指数大小比較結果信号が"0"で加算データの指数が大きいので、図10の被加算仮数データ選択結果論理1400から被加算データの仮数と加算データの仮数との入れ替えは必要ないと判断する。従って、信号線L258の被加算仮数データを選択し、信号線L212に被加算仮数データ"1000000000000000000000000000"を出力する。一方、図15の加算仮数データと加算反転仮数データの選択論理1500から、信号線L259の加算仮数データの数値、"7FFFFFFFFFFFFFFFFFFFFFFFFFFF"を信号線L280に出力する。また、信号線L259の補数、"1000000000000000000000000000"を信号線L281に出力する。そして、信号線L207の演算命令解析結果信号の"0(加算)"を条件に、図16の加算仮数データ選択論理1600から、信号線L280の加算仮数データ、"7FFFFFFFFFFFFFFFFFFFFFFFFFFF"を信号線L213の仮数選択信号として選択して出力する。桁合わせ右シフト回路27は、信号線L210の右シフト量信号の数値"2"に基づいて2桁右シフトをすることから、被加算データの仮数の数値として"0010000000000000000000000000"を信号線L215に出力する。加減算回路29は、信号線L215の数値"0010000000000000000000000000"と、信号線L213の数値"7FFFFFFFFFFFFFFFFFFFFFFFFFFF"とを加算する。そして、加算結果の数値、"800FFFFFFFFFFFFFFFFFFFFFFFFF"を信号線L216に出力する。   Since the exponent magnitude comparison result signal of the signal line L211 is “0” and the exponent of the addition data is large, the mantissa selection circuit 25 has the mantissa of the addition data and the mantissa of the addition data from the addition mantissa data selection result logic 1400 of FIG. It is judged that the replacement with is unnecessary. Therefore, the added mantissa data of the signal line L258 is selected, and the added mantissa data “1000000000000000000000000000” is output to the signal line L212. On the other hand, the numerical value of the added mantissa data of the signal line L259, “7FFFFFFFFFFFFFFFFFFFFFFFFFFF”, is output to the signal line L280 from the selection logic 1500 of the added mantissa data and the addition inverted mantissa data in FIG. Further, the complement of the signal line L259, “1000000000000000000000000000”, is output to the signal line L281. Then, on the condition of “0 (addition)” of the operation instruction analysis result signal of the signal line L207, the added mantissa data selection logic 1600 of FIG. Select and output as selection signal. The digit alignment right shift circuit 27 shifts right by two digits based on the value “2” of the right shift amount signal of the signal line L210, and therefore outputs “0010000000000000000000000000” as the mantissa value of the added data to the signal line L215. To do. The addition / subtraction circuit 29 adds the numerical value “0010000000000000000000000000” of the signal line L215 and the numerical value “7FFFFFFFFFFFFFFFFFFFFFFFFFFF” of the signal line L213. Then, the numerical value of the addition result, “800FFFFFFFFFFFFFFFFFFFFFFFFF” is output to the signal line L216.

0桁数チェック回路28は、信号線L216の加算結果信号の数値"800FFFFFFFFFFFFFFFFFFFFFFFFF"の"8"を先頭に上の桁に数値"0"の有無をチェックする。信号線L216の数値の先頭が"8"で先頭データに"1"の数値が存在することを確認すると、信号線L217に0桁数チェック信号の数値"0"を出力する。信号線L217の"0"は、正規化のための左シフトが不要であることから正規化左シフト回路31は正規化のための左シフトは行わず、結果として数値"800FFFFFFFFFFFFFFFFFFFFFFFFF"を信号線L218に出力する。   The zero digit number check circuit 28 checks whether or not there is a numerical value “0” in the upper digit starting with “8” of the numerical value “800FFFFFFFFFFFFFFFFFFFFFFFFF” of the addition result signal of the signal line L216. When it is confirmed that the beginning of the numerical value of the signal line L216 is “8” and the numerical value of “1” exists in the leading data, the numerical value “0” of the 0-digit number check signal is output to the signal line L217. Since “0” of the signal line L217 does not need a left shift for normalization, the normalized left shift circuit 31 does not perform a left shift for normalization, and as a result, the numerical value “800FFFFFFFFFFFFFFFFFFFFFFFFF” is changed to the signal line L218. Output to.

指数生成減算回路30は、信号線L209の基準指数選択結果の数値"04"から信号線L217の0桁数チェック信号の数値"0"を減算して、信号線L219に指数データの数値"04"を出力する。   The exponent generation / subtraction circuit 30 subtracts the numeric value “0” of the zero-digit number check signal of the signal line L217 from the numeric value “04” of the reference exponent selection result of the signal line L209, and the exponent data numeric value “04” to the signal line L219. "Is output.

中間符号生成回路24は、信号線L211の指数大小比較結果信号の数値"0"と、信号線L253の被加算符号テータ及び信号線L254の加算符号データの"0"の条件から、図17の中間符号生成論理1700から、信号線L254の大きい指数の符号の数値"0"(正符号)を信号線L208に出力する。そして、符号生成回路26は、演算を実行する被加算仮数と加算仮数の数値から小さい被加算仮数データから大きい加算仮数データを減算することはないので、信号線L220に"0"を出力する。信号線L220の"0"の条件に基づき、図18の符号生成論理1700から符号を反転することなく信号線L214に数値"0"(正符号)を出力する。   The intermediate code generation circuit 24 calculates the value “0” of the exponent magnitude comparison result signal of the signal line L211 and the condition “0” of the added code data of the signal line L253 and the added code data of the signal line L254 of FIG. From the intermediate code generation logic 1700, the numerical value “0” (positive code) of the sign of the large exponent of the signal line L254 is output to the signal line L208. Then, the sign generation circuit 26 outputs “0” to the signal line L220 because it does not subtract the large added mantissa data from the small added mantissa data from the numerical value of the added mantissa and the added mantissa for performing the operation. Based on the condition “0” of the signal line L220, the code generation logic 1700 in FIG. 18 outputs a numerical value “0” (plus sign) to the signal line L214 without inverting the sign.

レジスタ14は、符号生成回路26で生成した信号線L214の符号値"0"(正符号)を格納する。また、指数生成減算回路30で求めた信号線L219の指数データ"04"と、正規化左シフト回路31が信号線L218に出力した仮数データ"800FFFFFFFFFFFFFFFFFFFFFFFFF"とを格納する。そして、演算結果として信号線L301により出力する。また、レジスタ15は、演算実行中フラグ生成回路16の信号線L257への出力"0"を格納し、信号L310により出力する。   The register 14 stores the code value “0” (plus sign) of the signal line L214 generated by the code generation circuit 26. Also, the exponent data “04” of the signal line L219 obtained by the exponent generation / subtraction circuit 30 and the mantissa data “800FFFFFFFFFFFFFFFFFFFFFFFFF” output by the normalized left shift circuit 31 to the signal line L218 are stored. And it outputs by the signal line L301 as a calculation result. Further, the register 15 stores an output “0” to the signal line L257 of the calculation execution flag generation circuit 16 and outputs it by a signal L310.

以上で、"1000000000000000000000000000×162"+"7FFFFFFFFFFFFFFFFFFFFFFFFFFF×164"の加算が完了し、この結果を、図2Aの浮動小数点加減算回路46から浮動小数点加減算結果を信号線L301により出力する。浮動小数点演算結果選択回路49は、信号線L301の拡張精度の加算結果を信号線L401により命令発行制御回路42に出力して、拡張精度の1回の演算が完了する。 Thus, the addition of “1000000000000000000000000000 × 16 2 ” + “7FFFFFFFFFFFFFFFFFFFFFFFFFFF × 16 4 ” is completed, and the floating-point addition / subtraction circuit 46 of FIG. 2A outputs the floating-point addition / subtraction result through the signal line L301. The floating point calculation result selection circuit 49 outputs the addition result of the extended precision of the signal line L301 to the instruction issue control circuit 42 through the signal line L401, and one calculation of the extended precision is completed.

この加算の解は、"800FFFFFFFFFFFFFFFFFFFFFFFFF×164"である。このように、信号線L219の指数の数値が"04"であり、信号線L218に仮数の数値が"800FFFFFFFFFFFFFFFFFFFFFFFFF"であることから一致する。 The solution of this addition is “800FFFFFFFFFFFFFFFFFFFFFFFFF × 16 4 ”. Thus, the numerical value of the exponent of the signal line L219 is “04”, and the numerical value of the mantissa is “800FFFFFFFFFFFFFFFFFFFFFFFFF” in the signal line L218.

同様に、図2に示す浮動小数点演算回路41の浮動小数点乗算回路47は信号線L303に拡張精度の演算結果を、浮動小数点除算回路48は信号線L305に拡張精度の演算結果を出力する。これらの拡張精度の演算結果は、浮動小数点演算結果選択回路49から命令発行制御回路42に戻されて、加減算と乗算と除算の拡張精度の1回の演算は完了する。   Similarly, the floating point multiplication circuit 47 of the floating point arithmetic circuit 41 shown in FIG. 2 outputs the extended precision arithmetic result to the signal line L303, and the floating point division circuit 48 outputs the extended precision arithmetic result to the signal line L305. These extended precision arithmetic results are returned from the floating-point arithmetic result selection circuit 49 to the instruction issuance control circuit 42, and one arithmetic operation with the extended precision of addition / subtraction, multiplication and division is completed.

(拡張精度データ幅演算回路12の単・倍精度演算時における動作手順)
以下、倍精度データ幅の演算、"10000000000000xxxxxxxxxxxxxx×162"(被加算データ)"(被加算データ)+"7FFFFFFFFFFFFFxxxxxxxxxxxxxx×164"(加算データ)、を1回加算する動作を説明する。なお、取り扱う浮動小数点演算データは、所謂、標準指数データ形式と拡張指数データ形式とIEEE指数データ形式との内、図6に示した標準データ形式(符号データ1ビット、指数データ7ビットを2桁の16進数表記、仮数データ56ビットを14桁の16進数表記)を用いて説明する。なお、単精度の演算も同様であり、説明は省略する。
(Operation procedure of single / double precision calculation of extended precision data width arithmetic circuit 12)
Hereinafter, the operation of double-precision data width calculation, “10000000000000000xxxxxxxxxxxx × 16 2 ” (added data) “added data” + “7FFFFFFFFFFFFFxxxxxxxxxxxx × 16 4 ” (added data) will be described. The floating-point arithmetic data to be handled is the so-called standard exponent data format, extended exponent data format, and IEEE exponent data format. The standard data format shown in FIG. 6 (code data 1 bit, exponent data 7 bits, 2 digits 16 This is described using a hexadecimal notation and a mantissa data of 56 bits (hexadecimal notation of 14 digits).

図21と図22は、かかる動作の説明における各レジスタ値2100と各信号線の数値2200とを示す図である。   FIG. 21 and FIG. 22 are diagrams showing each register value 2100 and each signal line value 2200 in the description of the operation.

まず、命令発行制御回路42からの信号線L100の演算命令として、レジスタ1に数値"00"または"11"が格納される。レジスタ1からの信号線L200は演算実行中フラグ生成回路16に入力され、図7の論理700に従って信号線L257には演算実行中フラグが"1"で出力される。この演算実行中フラグの"1"で信号線L104〜L106から入力される倍精度データが演算符号、演算指数、演算仮数として選択される。また、演算実行中フラグの"1"は、レジスタ15に格納されて信号線L310から出力され、図2Aに図示の浮動小数点演算結果選択回路49における演算結果の選択に使用される。   First, a numerical value “00” or “11” is stored in the register 1 as an operation instruction for the signal line L100 from the instruction issuance control circuit 42. The signal line L200 from the register 1 is input to the operation execution flag generation circuit 16, and the operation execution flag is output as "1" to the signal line L257 in accordance with the logic 700 of FIG. Double precision data input from the signal lines L104 to L106 is selected as an operation code, an operation index, and an operation mantissa when the operation execution flag is “1”. Further, “1” of the operation execution flag is stored in the register 15 and output from the signal line L310, and is used for selection of the operation result in the floating-point operation result selection circuit 49 shown in FIG. 2A.

次に、命令発行制御回路42からの信号線L100の加算命令として、レジスタ1に加算命令の数値"01"が格納される。また、前述の倍精度データ幅の被加算データと加算データとより、レジスタ2に被加算データの符号数値"0"(正符号)が、レジスタ4に加算データの符号数値"0"(正符号)が格納される。また、レジスタ10に被加算仮数データ値"10000000000000xxxxxxxxxxxxxx"が、レジスタ12に加算仮数データ値"7FFFFFFFFFFFFFxxxxxxxxxxxxxx"がそれぞれ格納される。   Next, as the addition instruction for the signal line L100 from the instruction issuance control circuit 42, the numerical value “01” of the addition instruction is stored in the register 1. In addition, based on the added data and the added data having the double precision data width described above, the sign value “0” (plus sign) of the added data is stored in the register 2, and the sign value “0” (plus sign) of the added data is stored in the register 4. ) Is stored. Further, the added mantissa data value “10000000000000xxxxxxxxxxxx” is stored in the register 10, and the added mantissa data value “7FFFFFFFFFFFFFxxxxxxxxxxxx” is stored in the register 12, respectively.

演算命令解析回路20は、拡張精度の演算時と同様に、信号線L200の演算命令の数値"01"(加算命令)と、信号線L253の数値"0"(正符号)と、信号線L254の数値"0"(正符号)との条件から、図7の演算命令生成論理700から加算命令となることを解析し、信号線L207に数値"0"(加算命令)を出力する。   The arithmetic instruction analysis circuit 20, similarly to the arithmetic operation with extended precision, calculates the numerical value “01” (addition instruction) of the arithmetic instruction of the signal line L 200, the numerical value “0” (positive sign) of the signal line L 253, and the signal line L 254. 7 is analyzed from the calculation instruction generation logic 700 of FIG. 7 and a numerical value “0” (addition instruction) is output to the signal line L207.

指数の処理も拡張精度の演算時と同様である。指数大小比較回路21は、信号線L255の被加算指数データの数値"02"と信号線L256の加算指数データの数値"04"とを大小比較する。比較結果として、図11の指数大小比較論理1100から信号線L256の指数データを大きいと判定して、指数大小比較結果信号として信号線L211に数値"0"を出力する。基準指数選択回路22は、信号線L211の指数大小比較結果の数値"0"の条件から、図12の基準指数選択論理1200から大きい加算指数データである信号線L256の数値"04"を選択して、信号線L209に出力する。シフト量算出回路23は、信号線L255の被加算データの指数の数値"02"と、信号線L256の加算データの指数の数値"04"との差を求め、桁合わせのための右シフト量として信号線L210に数値"2"を出力する。   Exponential processing is the same as that for extended precision calculation. The exponent magnitude comparison circuit 21 compares the numerical value “02” of the added exponent data of the signal line L255 with the numeric value “04” of the added exponent data of the signal line L256. As a comparison result, the exponent magnitude comparison logic 1100 in FIG. 11 determines that the exponent data of the signal line L256 is large, and outputs a numerical value “0” to the signal line L211 as an exponent magnitude comparison result signal. The reference exponent selection circuit 22 selects the numeric value “04” of the signal line L256, which is large added exponent data, from the reference exponent selection logic 1200 of FIG. 12 based on the condition of the numeric value “0” of the exponent magnitude comparison result of the signal line L211. To the signal line L209. The shift amount calculation circuit 23 obtains the difference between the exponent value “02” of the added data of the signal line L255 and the exponent value “04” of the added data of the signal line L256, and the right shift amount for digit alignment The numerical value “2” is output to the signal line L210.

仮数選択回路25は、信号線L211の指数大小比較結果信号が"0"で加算データの指数が大きいので、図10の被加算仮数データ選択結果論理1400から被加算データの仮数と加算データの仮数との入れ替えは必要ないと判断する。 従って、信号線L258の被加算仮数データを選択し、信号線L212に被加算仮数データ"10000000000000xxxxxxxxxxxxxx"を出力する。   Since the exponent magnitude comparison result signal of the signal line L211 is “0” and the exponent of the addition data is large, the mantissa selection circuit 25 has the mantissa of the addition data and the mantissa of the addition data from the addition mantissa data selection result logic 1400 of FIG. It is judged that the replacement with is unnecessary. Accordingly, the added mantissa data of the signal line L258 is selected, and the added mantissa data “10000000000000xxxxxxxxxxxx” is output to the signal line L212.

一方、図15の加算仮数データと加算反転仮数データの選択論理1500から、信号線 L259の加算仮数データの数値、"7FFFFFFFFFFFFFxxxxxxxxxxxxxx"を信号線L280に出力する。また、信号線L259の補数、"10000000000000xxxxxxxxxxxxxx"を信号線L281に出力する。そして、信号線L207の演算命令解析結果信号の"0(加算)"を条件に、図16の加算仮数データ選択論理1600から、信号線L280の加算仮数データ、"7FFFFFFFFFFFFFxxxxxxxxxxxxxx"を信号線L213の仮数選択信号として選択して出力する。桁合わせ右シフト回路27は、信号線L210の右シフト量信号の数値"2"に基づいて2桁右シフトをすることから、被加算データの仮数の数値として"00100000000000xxxxxxxxxxxxxx"を信号線 L215に出力する。加減算回路29は、信号線L215の数値"00100000000000xxxxxxxxxxxxxx"と、信号線L213の数値"7FFFFFFFFFFFFFxxxxxxxxxxxxxx"とを加算する。そして、加算結果の数値、"800FFFFFFFFFFFxxxxxxxxxxxxxx"を信号線L216に出力する。   On the other hand, from the selection logic 1500 of the added mantissa data and the added inverted mantissa data in FIG. 15, the numerical value of the added mantissa data of the signal line L259, “7FFFFFFFFFFFFFxxxxxxxxxxxx” is output to the signal line L280. Further, the complement of the signal line L259, “10000000000000xxxxxxxxxxxx” is output to the signal line L281. Then, on the condition of “0 (addition)” of the operation instruction analysis result signal of the signal line L207, the addition mantissa data selection logic 1600 of FIG. Select and output as selection signal. Since the digit alignment right shift circuit 27 shifts right by two digits based on the value “2” of the right shift amount signal of the signal line L210, “00100000000000xxxxxxxxxxxx” is output to the signal line L215 as the mantissa value of the added data. To do. The addition / subtraction circuit 29 adds the numerical value “00100000000000000xxxxxxxxxxxx” of the signal line L215 and the numerical value “7FFFFFFFFFFFFFxxxxxxxxxxxx” of the signal line L213. The numerical value of the addition result, “800FFFFFFFFFFFxxxxxxxxxxxx” is output to the signal line L216.

0桁数チェック回路28のチェックは、拡張精度の場合と倍精度の場合で異なっている。0桁数チェック回路28は、信号線L216の加算結果信号の数値"800FFFFFFFFFFFxxxxxxxxxxxxxx"の"8"を先頭に上の桁に数値"0"の有無をチェックする。信号線L216の数値の先頭が"8"で先頭データに"1"の数値が存在することを確認すると、信号線L217に0桁数チェック信号の数値"0"を出力する。信号線L217の"0"は、正規化のための左シフトが不要であることから正規化左シフト回路31は正規化のための左シフトは行わず、結果として数値"800FFFFFFFFFFFxxxxxxxxxxxxxx"を信号線L218に出力する。   The check of the 0 digit number check circuit 28 is different between the case of the extended precision and the case of the double precision. The 0-digit number check circuit 28 checks whether or not the numerical value “0” exists in the upper digit starting with “8” of the numerical value “800FFFFFFFFFFFxxxxxxxxxxxx” of the addition result signal of the signal line L216. When it is confirmed that the beginning of the numerical value of the signal line L216 is “8” and the numerical value of “1” exists in the leading data, the numerical value “0” of the 0-digit number check signal is output to the signal line L217. Since “0” of the signal line L217 does not require a left shift for normalization, the normalized left shift circuit 31 does not perform a left shift for normalization. As a result, the numerical value “800FFFFFFFFFFFxxxxxxxxxxxx” is represented by the signal line L218. Output to.

指数生成減算回路30は、信号線L209の基準指数選択結果の数値"04"から信号線L217の0桁数チェック信号の数値"0"を減算して、信号線L219に指数データの数値"04"を出力する。   The exponent generation / subtraction circuit 30 subtracts the numeric value “0” of the zero-digit number check signal of the signal line L217 from the numeric value “04” of the reference exponent selection result of the signal line L209, and the exponent data numeric value “04” to the signal line L219. "Is output.

中間符号生成回路24は、信号線L211の指数大小比較結果信号の数値"0"と、信号線L253の被加算符号テータ及び信号線L254の加算符号データの"0"の条件から、図17の中間符号生成論理1700から、信号線L254の大きい指数の符号の数値"0"(正符号)を信号線L208に出力する。そして、符号生成回路26は、演算を実行する被加算仮数と加算仮数の数値から小さい被加算仮数データから大きい加算仮数データを減算することはないので、信号線L220に"0"を出力する。信号線L220の"0"の条件に基づき、図18の符号生成論理1700から符号を反転することなく信号線L214に数値"0"(正符号)を出力する。   The intermediate code generation circuit 24 calculates the value “0” of the exponent magnitude comparison result signal of the signal line L211 and the condition “0” of the added code data of the signal line L253 and the added code data of the signal line L254 of FIG. From the intermediate code generation logic 1700, the numerical value “0” (positive code) of the sign of the large exponent of the signal line L254 is output to the signal line L208. Then, the sign generation circuit 26 outputs “0” to the signal line L220 because it does not subtract the large added mantissa data from the small added mantissa data from the numerical value of the added mantissa and the added mantissa for performing the operation. Based on the condition “0” of the signal line L220, the code generation logic 1700 in FIG. 18 outputs a numerical value “0” (plus sign) to the signal line L214 without inverting the sign.

レジスタ14は、符号生成回路26で生成した信号線L214の符号値"0"(正符号)を格納する。また、指数生成減算回路30で求めた信号線L219の指数データ"04"と、正規化左シフト回路31が信号線L218に出力した仮数データ"800FFFFFFFFFFFxxxxxxxxxxxxxx"とを格納する。そして、演算結果として信号線L301により出力する。また、レジスタ15は、演算実行中フラグ生成回路16の信号線L257への出力"0"を格納し、信号L310により出力する。 The register 14 stores the code value “0” (plus sign) of the signal line L214 generated by the code generation circuit 26. Further, the exponent data “04” of the signal line L219 obtained by the exponent generation / subtraction circuit 30 and the mantissa data “800FFFFFFFFFFFxxxxxxxxxxxx” output from the normalized left shift circuit 31 to the signal line L218 are stored. And it outputs by the signal line L301 as a calculation result. Further, the register 15 stores an output “0” to the signal line L257 of the calculation execution flag generation circuit 16 and outputs it by a signal L310.

以上で、倍精度の"00100000000000xxxxxxxxxxxxxx×162"+"7FFFFFFFFFFFFFxxxxxxxxxxxxxx×164"の加算が完了し、この結果を、図2Aの浮動小数点加減算回路46から浮動小数点加減算結果を信号線L301により出力する。 This completes the addition of the double precision “0010000000000000xxxxxxxxxxxx × 16 2 ” + “7FFFFFFFFFFFFFxxxxxxxxxxxx × 16 4 ”, and outputs the floating point addition / subtraction result from the floating point addition / subtraction circuit 46 of FIG. 2A via the signal line L301.

同様に、図2に示す浮動小数点演算回路41の浮動小数点乗算回路47は信号線L302とL303に並列に2つの倍精度の演算結果を、浮動小数点除算回路48は信号線L304とL305に並列の2つの倍精度の演算結果を出力する。これらの倍精度の2つの演算結果は、浮動小数点演算結果選択回路49から命令発行制御回路42に信号線L400とL401により並列に戻されて、加減算と乗算と除算の倍精度のそれぞれ2回の演算は完了する。   Similarly, the floating point multiplication circuit 47 of the floating point arithmetic circuit 41 shown in FIG. 2 outputs two double-precision arithmetic results in parallel with the signal lines L302 and L303, and the floating point division circuit 48 in parallel with the signal lines L304 and L305. Outputs two double-precision arithmetic results. These two precision results are returned from the floating-point computation result selection circuit 49 to the instruction issuance control circuit 42 in parallel by signal lines L400 and L401, and are added twice in double precision of addition / subtraction, multiplication and division, respectively. The computation is complete.

以上、拡張精度データ幅演算回路12の拡張精度演算時または倍精度演算時における動作手順を示した。単精度・倍精度データ幅演算回路11の動作手順は、拡張精度演算の中止と演算データの選択が無い場合の拡張精度データ幅演算回路12の倍精度演算時における動作手順と類似である。   The operation procedure at the time of extended precision calculation or double precision calculation of the extended precision data width arithmetic circuit 12 has been described above. The operation procedure of the single-precision / double-precision data width calculation circuit 11 is similar to the operation procedure at the time of double-precision calculation of the extended-precision data width calculation circuit 12 when the extended-precision calculation is stopped and no calculation data is selected.

本実施形態によれば、128ビットの拡張精度のデータ幅の演算回路で32ビットの単精度データ幅と64ビットの倍精度データ幅の演算が実行できる。従って、既存の単精度・倍精度データ幅の演算回路と同時に拡張精度の演算回路との2つの演算回路で並列に演算ができることで、演算時間が1/2に短縮できることにある。その理由は、拡張演算回路が演算実行中又は未使用であることを検出する回路を設けている。そして、拡張データ幅の演算回路が未使用である場合に単精度倍精度と拡張精度データ幅の演算データを拡張演算回路に振り向けて実行できる回路を設けていることにある。本実施形態は、特にスーパーコンピュータなどでのベクトル演算における多回数の繰り返し演算において、より顕著な効果を発揮する。   According to this embodiment, an arithmetic circuit with a 128-bit extended precision data width can execute a 32-bit single-precision data width and a 64-bit double-precision data width. Accordingly, the calculation time can be reduced to ½ by performing the calculation in parallel with the two arithmetic circuits of the existing single-precision / double-precision data width arithmetic circuit and the extended precision arithmetic circuit. The reason is that a circuit for detecting that the extended arithmetic circuit is executing or not in use is provided. In addition, when an arithmetic circuit with an extended data width is not used, a circuit is provided that can execute single-precision double precision and arithmetic data with an extended precision data width by allocating them to the extended arithmetic circuit. The present embodiment exhibits a more remarkable effect especially in a large number of repetitive operations in a vector operation in a supercomputer or the like.

[他の実施形態]
以上、本発明の実施形態について詳述したが、それぞれの実施形態に含まれる別々の特徴を如何様に組み合わせたシステム又は装置も、本発明の範疇に含まれる。
[Other Embodiments]
As mentioned above, although embodiment of this invention was explained in full detail, the system or apparatus which combined the separate characteristic contained in each embodiment how was included in the category of this invention.

また、本発明は、複数の機器から構成されるシステムに適用しても良いし、単体の装置に適用しても良い。さらに、本発明は、実施形態の機能を実現する演算制御プログラムが、システムあるいは装置に直接あるいは遠隔から供給される場合にも適用可能である。したがって、本発明の機能をコンピュータで実現するために、コンピュータにインストールされる演算制御プログラム、あるいはその演算制御プログラムを格納した記憶媒体、その演算制御プログラムをダウンロードさせるWWWサーバも、本発明の範疇に含まれる。   Further, the present invention may be applied to a system composed of a plurality of devices, or may be applied to a single device. Furthermore, the present invention can also be applied to a case where an arithmetic control program that realizes the functions of the embodiment is supplied directly or remotely to a system or apparatus. Therefore, in order to realize the functions of the present invention on a computer, an arithmetic control program installed in the computer, a storage medium storing the arithmetic control program, and a WWW server that downloads the arithmetic control program are also included in the scope of the present invention. included.

[実施形態の他の表現]
上記の実施形態の一部又は全部は、以下の付記のようにも記載されうるが、以下には限られない。
(付記1)
第1ビット幅の数値及び前記第1ビット幅より短い第2ビット幅の数値に対してそれぞれが浮動小数点演算を行なう複数の演算回路を有する浮動小数点演算回路であって、
演算命令に基づいて、前記第1ビット幅の演算を行なう第1演算回路が休止することを判定する休止判定手段と、
前記休止判定手段が前記第1演算回路が休止すると判定した場合に、前記第1演算回路を前記第2ビット幅の数値の演算を行なうよう制御し、前記第2ビット幅の数値の演算を、前記第1演算回路と前記第2ビット幅の数値を演算する第2演算回路とにより並列に実行する演算制御手段と、
を備えることを特徴とする浮動小数点演算回路。
(付記2)
前記第1ビット幅の数値及び前記第2ビット幅の数値を前記休止判定手段の判定結果に応じて、前記第1演算回路に選択可能に入力する入力手段を有することを特徴とする付記1に記載の浮動小数点演算回路。
(付記3)
前記演算制御手段において前記第1演算回路が前記第2ビット幅の数値を演算した演算結果と前記第2演算回路が前記第2ビット幅の数値を演算した演算結果とを選択して出力する出力手段を含むことを特徴とする付記1又は2に記載の浮動小数点演算回路。
(付記4)
前記第1演算回路は、
前記第1演算回路への演算命令が、前記第1ビット幅の数値に対する演算であるか否かを判定する演算判定手段と、
前記演算判定手段が前記第1ビット幅の数値に対する演算であると判定した場合は、前記第1ビット幅の数値に対して浮動小数点演算を実行し、前記演算判定手段が前記第1ビット幅の数値に対する演算でないと判定した場合は、前記第2ビット幅の数値に対して浮動小数点演算を実行する演算実行手段と、
を有することを特徴とする付記1乃至3のいずれか1項に記載の浮動小数点演算回路。
(付記5)
前記演算判定手段は、
演算命令を格納する演算命令レジスタと、
前記演算命令レジスタの出力信号の値に基づいて前記第1演算回路を休止するか否かを検出して演算実行中フラグを生成する演算実行中フラグ生成手段と、
前記演算実行中フラグ生成手段が生成した前記第1演算回路を休止するか否かの前記演算実行中フラグを格納する実行中フラグ格納レジスタと、を有し、
前記演算実行手段は、
前記演算実行中フラグが演算実行中であることを示す場合に、前記第1ビット幅の数値に含まれる符号、指数及び仮数を選択して浮動小数点演算を実現する回路群に伝達し、前記演算実行中フラグが演算実行中でないことを示す場合に、前記第2ビット幅の数値に含まれる符号、指数及び仮数を選択して浮動小数点演算を実現する回路群に伝達する選択手段と、
前記浮動小数点演算を実現する回路群から得た浮動小数点演算結果を格納する演算結果格納レジスタと、を有することを特徴とする付記1乃至4のいずれか1項に記載の浮動小数点演算回路。
(付記6)
拡張されたビット幅の数値の浮動小数点演算を行なう浮動小数点演算回路であって、
当該浮動小数点演算回路への演算命令が、拡張されたビット幅の数値に対する演算であるか否かを判定する演算判定手段と、
前記演算判定手段が拡張されたビット幅の数値に対する演算であると判定した場合は、前記拡張されたビット幅の数値の浮動小数点演算を実行し、前記演算判定手段が拡張されたビット幅の数値に対する演算でないと判定した場合は、前記拡張されたビット幅より短いビット幅の数値の浮動小数点演算を実行する演算実行手段と、
を備えることを特徴とする浮動小数点演算回路。
(付記7)
前記演算判定手段は、
入力される演算命令を格納する演算命令レジスタと、
前記演算命令レジスタの出力信号の値に基づいて当該浮動小数点演算回路を休止するか否かを検出して演算実行中フラグを生成する演算実行中フラグ生成手段と、
前記演算実行中フラグ生成手段が生成した前記演算実行中フラグを格納する実行中フラグ格納レジスタと、を有し、
前記演算実行手段は、
前記演算実行中フラグが演算実行中であることを示す場合に、前記拡張されたビット幅の数値に含まれる符号、指数及び仮数を選択して浮動小数点演算を実現する回路群に伝達し、前記演算実行中フラグが演算実行中でないことを示す場合に、前記拡張されたビット幅より短いビット幅の数値に含まれる符号、指数及び仮数を選択して浮動小数点演算を実現する回路群に伝達する選択手段と、
前記浮動小数点演算を実現する回路群から浮動小数点演算結果を格納する演算結果格納レジスタと、
を有することを特徴とする付記6に記載の浮動小数点演算回路。
(付記8)
前記浮動小数点演算回路が行なう演算が、加算又は減算である場合に、
前記演算実行手段は、
前記演算実行中フラグに基づいて指数のデータ幅に合った指数を選択する基準指数選択回路と、
前記演算実行中フラグに基づいて指数の差を求めて桁合わせ右シフト量を求めるシフト量算出回路と、
第1データの仮数が格納される第1レジスタと、
第2データの仮数が格納される第2レジスタと、
前記第1データの仮数及び前記第2データの仮数のうち、前記演算実行中フラグに基づいて指数の小さい方を桁合わせが必要な仮数として出力し、他方を桁合わせが必要ない仮数として出力する仮数選択回路と、
前記仮数選択回路から出力された桁合わせが必要な仮数を、前記第1データの仮数及び前記第2データの前記演算実行中フラグに基づく指数の差に応じたシフト量だけ右シフトして、シフトした結果を出力する桁合わせ右シフト回路と、
前記桁合わせ右シフト回路から出力される前記桁合わせが必要な仮数のシフトした結果と前記仮数選択回路から出力される桁合わせが必要ない仮数との加減算を行って、加減算結果を出力する加減算回路と、
前記加減算回路から出力された前記加減算結果を正規化する正規化左シフト回路と、
を備えることを特徴とする付記7に記載の浮動小数点演算回路。
(付記9)
拡張されたビット幅の数値の浮動小数点演算を行なう浮動小数点演算回路であって、
入力される演算命令を格納する演算命令レジスタと、
前記演算命令レジスタの出力信号の値に基づいて当該浮動小数点演算回路による拡張されたビット幅の浮動小数点演算を休止するか否かを検出して、演算実行中フラグを生成する演算実行中フラグ生成回路と、
前記演算実行中フラグ生成回路が生成した前記演算実行中フラグを格納する実行中フラグ格納レジスタと、
入力される拡張されたビット幅の被演算データの符号、指数及び仮数と演算データの符号、指数及び仮数とを格納する第1レジスタ群と、
入力される拡張されないビット幅の被演算データの符号、指数及び仮数と演算データの符号、指数及び仮数とを格納する第2レジスタ群と、
前記演算実行中フラグが当該浮動小数点演算回路による拡張されたビット幅の浮動小数点演算を実行することを示す場合には前記第1レジスタ群を選択し、前記演算実行中フラグが当該浮動小数点演算回路による拡張されたビット幅の浮動小数点演算を休止することを示す場合には前記第2レジスタ群を選択する符号、指数及び仮数選択回路と、
演算命令と被演算データの符号と演算データの符号とに基づいて、演算結果の符号を生成する符号生成回路と、
演算命令と被演算データの符号と演算データの符号とに基づいて、被演算データの指数と演算データの指数とを調整して演算結果の指数を生成する指数生成回路と、
前記指数生成回路における前記被演算データの指数と演算データの指数との調整に対応して、被演算データの仮数と演算データの仮数との桁合わせを行なって演算結果の仮数を生成する仮数演算回路と、
前記演算結果の指数と仮数とを整合する整合回路と、
前記演算結果の符号と、前記整合回路で整合された前記演算結果の指数と仮数とを格納する演算結果格納レジスタとを備え、
前記実行中フラグ格納レジスタに格納された前記実行中フラグと、前記演算結果格納レジスタに格納された前記演算結果の符号、指数及び仮数とを、浮動小数点演算結果として出力することを特徴とする浮動小数点演算回路。
(付記10)
異なるビット幅の数値に対してそれぞれ浮動小数点演算を行なう複数の演算回路を有する浮動小数点演算回路を備えたコンピュータであって、
第1演算回路が、
当該第1演算回路への演算命令が、第1ビット幅の数値に対する演算であるか前記第1ビット幅より短い第2ビット幅の数値に対する演算であるかを判定する演算判定手段と、
前記演算判定手段が前記第1ビット幅の数値に対する演算であると判定した場合に、前記第1ビット幅の数値の浮動小数点演算を実行し、前記演算判定手段が前記第2ビット幅の数値に対する演算であると判定した場合に、前記第2ビット幅の数値の浮動小数点演算を実行する演算実行手段と、を有し、
第2演算回路が、前記第2ビット幅の数値の浮動小数点演算を実行する回路であって、
前記浮動小数点演算回路への演算命令が前記第1ビット幅の数値に対する演算が休止することを示す場合には、前記第2ビット幅の数値の浮動小数点演算を前記第1演算回路と前記第2演算回路とにより並列に実行することを特徴とするコンピュータ。
(付記11)
前記第1ビット幅の数値及び前記第2ビット幅の数値を前記休止判定手段の判定結果に応じて、前記第1演算回路に選択可能に入力する入力手段と、
前記演算制御手段において前記第1演算回路が前記第2ビット幅の数値を演算した演算結果と前記第2演算回路が前記第2ビット幅の数値を演算した演算結果とを選択して出力する出力手段とを含むことを特徴とする付記10に記載のコンピュータ。
(付記12)
前記コンピュータは、前記第1ビット幅の数値に対する演算が休止する場合に、前記第2ビット幅の数値に対する演算であることを示す演算命令を少なくとも前記第1演算回路に対して発行し、前記第2ビット幅の数値を前記第1演算回路及び前記第2演算回路に対して提供する命令発行制御手段をさらに有することを特徴とする付記10又は11に記載のコンピュータ。
(付記13)
前記命令発行制御手段に接続されて、前記演算命令と、前記浮動小数点演算回路において演算すべき前記第1ビット幅の数値及び前記第2ビット幅の数値とを前記命令発行制御手段に対して提供し、前記浮動小数点演算回路において演算した演算結果を一時記憶する主記憶手段と、
データの入出力を制御する入出力制御手段を介して前記命令発行制御手段に接続されて、前記浮動小数点演算回路において演算した演算結果を保存する外部記憶手段とを有することを特徴とする付記10乃至12のいずれか1項に記載のコンピュータ。
(付記14)
異なるビット幅の数値に対してそれぞれ浮動小数点演算を行なう複数の演算回路を有する浮動小数点演算回路を備えたコンピュータの演算制御方法であって、
演算プログラムを記憶手段から読み出す読出ステップと、
前記演算プログラムの命令を解析して、前記浮動小数点演算回路において演算すべき数値が第1ビット幅か前記第1ビット幅より短い第2ビット幅かを判定する判定ステップと、
前記浮動小数点演算回路において演算すべき数値が第1ビット幅の場合に、前記第1ビット幅の演算を行なう第1演算回路に前記第1ビット幅の演算命令と演算すべき数値とを提供して、前記第1ビット幅の演算結果を前記第1演算回路から取得する第1演算ステップと、
前記浮動小数点演算回路において演算すべき数値が第2ビット幅の場合に、前記第1ビット幅の演算を行なう第1演算回路と前記第2ビット幅の演算を行なう第2演算回路とに並列の前記第2ビット幅の演算命令と演算すべき数値とを提供して、前記第2ビット幅の演算結果を前記第1演算回路と前記第2演算回路から並列に取得する第2演算ステップと、
を含むことを特徴とする演算制御方法。
(付記15)
異なるビット幅の数値に対してそれぞれ浮動小数点演算を行なう複数の演算回路を有する浮動小数点演算回路を備えたコンピュータの演算制御プログラムであって、
演算プログラムを記憶手段から読み出す読出ステップと、
前記演算プログラムの命令を解析して、前記浮動小数点演算回路において演算すべき数値が第1ビット幅か前記第1ビット幅より短い第2ビット幅かを判定する判定ステップと、
前記浮動小数点演算回路において演算すべき数値が第1ビット幅の場合に、前記第1ビット幅の演算を行なう第1演算回路に前記第1ビット幅の演算命令と演算すべき数値とを提供して、前記第1ビット幅の演算結果を前記第1演算回路から取得する第1演算ステップと、
前記浮動小数点演算回路において演算すべき数値が第2ビット幅の場合に、前記第1ビット幅の演算を行なう第1演算回路と前記第2ビット幅の演算を行なう第2演算回路とに並列の前記第2ビット幅の演算命令と演算すべき数値とを提供して、前記第2ビット幅の演算結果を前記第1演算回路と前記第2演算回路から並列に取得する第2演算ステップと、をコンピュータに実行させることを特徴とする演算制御プログラム。
[Other expressions of embodiment]
A part or all of the above-described embodiment can be described as in the following supplementary notes, but is not limited thereto.
(Appendix 1)
A floating-point arithmetic circuit having a plurality of arithmetic circuits each performing a floating-point arithmetic on a numerical value of a first bit width and a numerical value of a second bit width shorter than the first bit width,
Pause determining means for determining whether the first arithmetic circuit for performing the calculation of the first bit width is paused based on an arithmetic instruction;
When the pause determination means determines that the first arithmetic circuit is paused, the first arithmetic circuit is controlled to perform a calculation of the numerical value of the second bit width, and the calculation of the numerical value of the second bit width is Arithmetic control means for executing in parallel by the first arithmetic circuit and a second arithmetic circuit for calculating a numerical value of the second bit width;
A floating-point arithmetic circuit comprising:
(Appendix 2)
The supplementary note 1 includes input means for selectively inputting the numerical value of the first bit width and the numerical value of the second bit width to the first arithmetic circuit according to the determination result of the pause determination means. The floating-point arithmetic circuit described.
(Appendix 3)
An output for selecting and outputting the calculation result obtained by the first calculation circuit calculating the numerical value of the second bit width and the calculation result of the second calculation circuit calculating the numerical value of the second bit width in the calculation control means. The floating point arithmetic circuit according to appendix 1 or 2, further comprising: means.
(Appendix 4)
The first arithmetic circuit includes:
An operation determination means for determining whether an operation instruction to the first operation circuit is an operation on the numerical value of the first bit width;
When the operation determining means determines that the operation is for the numerical value of the first bit width, a floating point operation is performed on the numerical value of the first bit width, and the operation determining means is If it is determined that the operation is not a numerical value, an arithmetic execution means for performing a floating point operation on the numerical value of the second bit width;
The floating-point arithmetic circuit according to any one of appendices 1 to 3, wherein the floating-point arithmetic circuit includes:
(Appendix 5)
The calculation determination means includes
An operation instruction register for storing operation instructions; and
A calculation execution flag generating means for detecting whether to pause the first calculation circuit based on a value of an output signal of the calculation instruction register and generating a calculation execution flag;
An in-execution flag storage register for storing the in-operation flag indicating whether or not to pause the first arithmetic circuit generated by the in-operation flag generation unit;
The calculation execution means includes
When the operation execution flag indicates that the operation is being executed, the sign, exponent, and mantissa included in the numerical value of the first bit width are selected and transmitted to a circuit group that realizes a floating-point operation, and the operation is performed. A selection means for selecting a sign, an exponent, and a mantissa included in the numerical value of the second bit width and transmitting them to a circuit group for realizing a floating-point operation when the execution flag indicates that the operation is not being executed;
5. The floating point arithmetic circuit according to any one of appendices 1 to 4, further comprising: an arithmetic result storage register that stores a floating point arithmetic result obtained from a circuit group that realizes the floating point arithmetic.
(Appendix 6)
A floating-point arithmetic circuit that performs floating-point arithmetic on an extended bit-width number,
An operation determination means for determining whether an operation instruction to the floating-point arithmetic circuit is an operation on an extended bit width value;
If the operation determining means determines that the operation is an operation on an extended bit width value, the floating point operation is performed on the extended bit width value, and the operation determining means is an extended bit width value. If it is determined that the operation is not for the operation, operation execution means for performing a floating point operation of a numerical value having a bit width shorter than the expanded bit width,
A floating-point arithmetic circuit comprising:
(Appendix 7)
The calculation determination means includes
An operation instruction register for storing an input operation instruction;
A calculation execution flag generating means for detecting whether to pause the floating-point calculation circuit based on the value of the output signal of the calculation instruction register and generating a calculation execution flag;
An execution flag storage register that stores the calculation execution flag generated by the calculation execution flag generation unit;
The calculation execution means includes
When the operation execution flag indicates that the operation is being executed, the sign, exponent, and mantissa included in the extended bit-width value are selected and transmitted to a circuit group that realizes a floating-point operation, and When the operation execution flag indicates that the operation is not being executed, the sign, exponent, and mantissa included in the numerical value having a bit width shorter than the extended bit width are selected and transmitted to the circuit group that realizes the floating-point operation. A selection means;
A calculation result storage register for storing a floating point calculation result from a circuit group for realizing the floating point calculation;
The floating point arithmetic circuit according to appendix 6, characterized by comprising:
(Appendix 8)
When the operation performed by the floating point arithmetic circuit is addition or subtraction,
The calculation execution means includes
A reference index selection circuit that selects an index suitable for the data width of the index based on the calculation execution flag;
A shift amount calculation circuit for determining an exponent difference based on the calculation execution flag and determining a digit-aligned right shift amount; and
A first register storing a mantissa of first data;
A second register storing a mantissa of second data;
Of the mantissa of the first data and the mantissa of the second data, the one with the smaller exponent is output as a mantissa requiring digit alignment based on the in-operation flag, and the other is output as a mantissa requiring no digit alignment. A mantissa selection circuit;
The mantissa requiring digit alignment output from the mantissa selection circuit is shifted to the right by a shift amount corresponding to the difference between the mantissa of the first data and the exponent during execution of the second data, Digit shift right shift circuit that outputs the result
Addition / subtraction circuit for performing addition / subtraction between the result of shifting the mantissa requiring digit alignment output from the digit alignment right shift circuit and the mantissa not requiring digit alignment output from the mantissa selection circuit, and outputting the addition / subtraction result When,
A normalized left shift circuit that normalizes the addition / subtraction result output from the addition / subtraction circuit;
The floating point arithmetic circuit according to appendix 7, characterized by comprising:
(Appendix 9)
A floating-point arithmetic circuit that performs floating-point arithmetic on an extended bit-width number,
An operation instruction register for storing an input operation instruction;
Generates an in-execution flag that detects whether or not to stop the floating-point operation with the extended bit width by the floating-point operation circuit based on the value of the output signal of the operation instruction register and generates an in-operation flag Circuit,
An execution flag storage register for storing the operation execution flag generated by the operation execution flag generation circuit;
A first register group for storing the sign, exponent, and mantissa of the input operation data having an extended bit width and the sign, exponent, and mantissa of the operation data;
A second register group for storing the sign, exponent, and mantissa of the input unexpanded bit-width operand data, and the sign, exponent, and mantissa of the operation data;
The first register group is selected when the operation in progress flag indicates that the floating point operation with an extended bit width is performed by the floating point operation circuit, and the operation execution flag is in the floating point operation circuit. A sign, exponent and mantissa selection circuit for selecting the second register group when indicating that the floating-point operation with the extended bit width by
A code generation circuit for generating a code of a calculation result based on a calculation instruction, a sign of operation data, and a sign of calculation data;
An exponent generation circuit that adjusts the exponent of the operand data and the exponent of the operand data based on the arithmetic instruction, the sign of the operand data, and the sign of the operand data;
In accordance with the adjustment of the exponent of the operand data and the exponent of the calculation data in the exponent generation circuit, the mantissa calculation that generates the mantissa of the calculation result by aligning the mantissa of the operand data with the mantissa of the calculation data Circuit,
A matching circuit for matching the exponent and mantissa of the operation result;
A calculation result storage register for storing a sign of the calculation result and an exponent and mantissa of the calculation result matched by the matching circuit;
The floating flag stored in the in-execution flag storage register and the sign, exponent, and mantissa of the operation result stored in the operation result storage register are output as a floating-point operation result. Decimal point arithmetic circuit.
(Appendix 10)
A computer having a floating-point arithmetic circuit having a plurality of arithmetic circuits that perform floating-point arithmetic on numerical values having different bit widths,
The first arithmetic circuit is
An operation determination means for determining whether an operation instruction to the first operation circuit is an operation on a numerical value of a first bit width or an operation on a numerical value of a second bit width shorter than the first bit width;
When the operation determining means determines that the operation is for the numerical value of the first bit width, a floating point operation of the numerical value of the first bit width is executed, and the operation determining means is for the numerical value of the second bit width. And a calculation execution means for executing a floating point calculation of the numerical value of the second bit width when it is determined as a calculation,
A second arithmetic circuit for performing a floating point arithmetic operation on the numerical value of the second bit width,
When the operation instruction to the floating point arithmetic circuit indicates that the operation on the numerical value of the first bit width is suspended, the floating point arithmetic operation of the numerical value of the second bit width is performed with the first arithmetic circuit and the second arithmetic circuit. A computer that is executed in parallel by an arithmetic circuit.
(Appendix 11)
Input means for selectively inputting the numerical value of the first bit width and the numerical value of the second bit width to the first arithmetic circuit according to a determination result of the pause determination means;
An output for selecting and outputting the calculation result obtained by the first calculation circuit calculating the numerical value of the second bit width and the calculation result of the second calculation circuit calculating the numerical value of the second bit width in the calculation control means. The computer according to appendix 10, characterized by comprising: means.
(Appendix 12)
The computer issues, to the first arithmetic circuit, at least an arithmetic instruction indicating that the arithmetic operation is performed on the second bit width value when the arithmetic operation on the first bit width value is suspended. 12. The computer according to appendix 10 or 11, further comprising instruction issue control means for providing a numerical value with a 2-bit width to the first arithmetic circuit and the second arithmetic circuit.
(Appendix 13)
Connected to the instruction issue control means and provides the instruction issue control means with the arithmetic instruction and the numerical value of the first bit width and the numerical value of the second bit width to be calculated in the floating point arithmetic circuit. Main storage means for temporarily storing the operation result calculated in the floating-point arithmetic circuit;
And an external storage means connected to the instruction issue control means via an input / output control means for controlling the input / output of data, and for storing a calculation result calculated in the floating point arithmetic circuit. The computer of any one of thru | or 12.
(Appendix 14)
An arithmetic control method for a computer having a floating point arithmetic circuit having a plurality of arithmetic circuits each performing a floating point arithmetic on numerical values having different bit widths,
A reading step of reading the arithmetic program from the storage means;
A determination step of analyzing an instruction of the arithmetic program and determining whether a numerical value to be calculated in the floating-point arithmetic circuit is a first bit width or a second bit width shorter than the first bit width;
When the numerical value to be calculated in the floating-point arithmetic circuit is the first bit width, the first arithmetic circuit for performing the operation of the first bit width is provided with the arithmetic instruction of the first bit width and the numerical value to be calculated. A first calculation step of obtaining a calculation result of the first bit width from the first calculation circuit;
When the numerical value to be calculated in the floating-point arithmetic circuit is the second bit width, the first arithmetic circuit that performs the operation of the first bit width and the second arithmetic circuit that performs the operation of the second bit width are connected in parallel. A second operation step of providing an operation instruction of the second bit width and a numerical value to be operated, and obtaining an operation result of the second bit width in parallel from the first operation circuit and the second operation circuit;
An arithmetic control method comprising:
(Appendix 15)
An arithmetic control program for a computer comprising a floating point arithmetic circuit having a plurality of arithmetic circuits that respectively perform floating point arithmetic on numerical values of different bit widths,
A reading step of reading the arithmetic program from the storage means;
A determination step of analyzing an instruction of the arithmetic program and determining whether a numerical value to be calculated in the floating-point arithmetic circuit is a first bit width or a second bit width shorter than the first bit width;
When the numerical value to be calculated in the floating-point arithmetic circuit is the first bit width, the first arithmetic circuit for performing the operation of the first bit width is provided with the arithmetic instruction of the first bit width and the numerical value to be calculated. A first calculation step of obtaining a calculation result of the first bit width from the first calculation circuit;
When the numerical value to be calculated in the floating-point arithmetic circuit is the second bit width, the first arithmetic circuit that performs the operation of the first bit width and the second arithmetic circuit that performs the operation of the second bit width are connected in parallel. A second operation step of providing an operation instruction of the second bit width and a numerical value to be operated, and obtaining an operation result of the second bit width in parallel from the first operation circuit and the second operation circuit; An arithmetic control program for causing a computer to execute.

Claims (10)

第1ビット幅の数値及び前記第1ビット幅より短い第2ビット幅の数値に対してそれぞれが浮動小数点演算を行なう複数の演算回路を有する浮動小数点演算回路であって、
演算命令に基づいて、前記第1ビット幅の演算を行なう第1演算回路が休止することを判定する休止判定手段と、
前記休止判定手段が前記第1演算回路が休止すると判定した場合に、前記第1演算回路を前記第2ビット幅の数値の演算を行なうよう制御し、前記第2ビット幅の数値の演算を、前記第1演算回路と前記第2ビット幅の数値を演算する第2演算回路とにより並列に実行する演算制御手段と、
を備えることを特徴とする浮動小数点演算回路。
A floating-point arithmetic circuit having a plurality of arithmetic circuits each performing a floating-point arithmetic on a numerical value of a first bit width and a numerical value of a second bit width shorter than the first bit width,
Pause determining means for determining whether the first arithmetic circuit for performing the calculation of the first bit width is paused based on an arithmetic instruction;
When the pause determination means determines that the first arithmetic circuit is paused, the first arithmetic circuit is controlled to perform a calculation of the numerical value of the second bit width, and the calculation of the numerical value of the second bit width is Arithmetic control means for executing in parallel by the first arithmetic circuit and a second arithmetic circuit for calculating a numerical value of the second bit width;
A floating-point arithmetic circuit comprising:
前記第1演算回路は、
前記第1演算回路への演算命令が、前記第1ビット幅の数値に対する演算であるか否かを判定する演算判定手段と、
前記演算判定手段が前記第1ビット幅の数値に対する演算であると判定した場合は、前記第1ビット幅の数値に対して浮動小数点演算を実行し、前記演算判定手段が前記第1ビット幅の数値に対する演算でないと判定した場合は、前記第2ビット幅の数値に対して浮動小数点演算を実行する演算実行手段と、
を有することを特徴とする請求項1に記載の浮動小数点演算回路。
The first arithmetic circuit includes:
An operation determination means for determining whether an operation instruction to the first operation circuit is an operation on the numerical value of the first bit width;
When the operation determining means determines that the operation is for the numerical value of the first bit width, a floating point operation is performed on the numerical value of the first bit width, and the operation determining means is If it is determined that the operation is not a numerical value, an arithmetic execution means for performing a floating point operation on the numerical value of the second bit width;
The floating point arithmetic circuit according to claim 1, further comprising:
前記演算判定手段は、
演算命令を格納する演算命令レジスタと、
前記演算命令レジスタの出力信号の値に基づいて前記第1演算回路を休止するか否かを検出して演算実行中フラグを生成する演算実行中フラグ生成手段と、
前記演算実行中フラグ生成手段が生成した前記第1演算回路を休止するか否かの前記演算実行中フラグを格納する実行中フラグ格納レジスタと、を有し、
前記演算実行手段は、
前記演算実行中フラグが演算実行中であることを示す場合に、前記第1ビット幅の数値に含まれる符号、指数及び仮数を選択して浮動小数点演算を実現する回路群に伝達し、前記演算実行中フラグが演算実行中でないことを示す場合に、前記第2ビット幅の数値に含まれる符号、指数及び仮数を選択して浮動小数点演算を実現する回路群に伝達する選択手段と、
前記浮動小数点演算を実現する回路群から得た浮動小数点演算結果を格納する演算結果格納レジスタと、を有することを特徴とする請求項1または2に記載の浮動小数点演算回路。
The calculation determination means includes
An operation instruction register for storing operation instructions; and
A calculation execution flag generating means for detecting whether to pause the first calculation circuit based on a value of an output signal of the calculation instruction register and generating a calculation execution flag;
An in-execution flag storage register for storing the in-operation flag indicating whether or not to pause the first arithmetic circuit generated by the in-operation flag generation unit;
The calculation execution means includes
When the operation execution flag indicates that the operation is being executed, the sign, exponent, and mantissa included in the numerical value of the first bit width are selected and transmitted to a circuit group that realizes a floating-point operation, and the operation is performed. A selection means for selecting a sign, an exponent, and a mantissa included in the numerical value of the second bit width and transmitting them to a circuit group for realizing a floating-point operation when the execution flag indicates that the operation is not being executed;
The floating point arithmetic circuit according to claim 1, further comprising: an arithmetic result storage register that stores a floating point arithmetic result obtained from a circuit group that realizes the floating point arithmetic.
拡張されたビット幅の数値の浮動小数点演算を行なう浮動小数点演算回路であって、
当該浮動小数点演算回路への演算命令が、拡張されたビット幅の数値に対する演算であるか否かを判定する演算判定手段と、
前記演算判定手段が拡張されたビット幅の数値に対する演算であると判定した場合は、前記拡張されたビット幅の数値の浮動小数点演算を実行し、前記演算判定手段が拡張されたビット幅の数値に対する演算でないと判定した場合は、前記拡張されたビット幅より短いビット幅の数値の浮動小数点演算を実行する演算実行手段と、
を備えることを特徴とする浮動小数点演算回路。
A floating-point arithmetic circuit that performs floating-point arithmetic on an extended bit-width number,
An operation determination means for determining whether an operation instruction to the floating-point arithmetic circuit is an operation on an extended bit width value;
If the operation determining means determines that the operation is an operation on an extended bit width value, the floating point operation is performed on the extended bit width value, and the operation determining means is an extended bit width value. If it is determined that the operation is not for the operation, operation execution means for performing a floating point operation of a numerical value having a bit width shorter than the expanded bit width,
A floating-point arithmetic circuit comprising:
前記演算判定手段は、
入力される演算命令を格納する演算命令レジスタと、
前記演算命令レジスタの出力信号の値に基づいて当該浮動小数点演算回路を休止するか否かを検出して演算実行中フラグを生成する演算実行中フラグ生成手段と、
前記演算実行中フラグ生成手段が生成した前記演算実行中フラグを格納する実行中フラグ格納レジスタと、を有し、
前記演算実行手段は、
前記演算実行中フラグが演算実行中であることを示す場合に、前記拡張されたビット幅の数値に含まれる符号、指数及び仮数を選択して浮動小数点演算を実現する回路群に伝達し、前記演算実行中フラグが演算実行中でないことを示す場合に、前記拡張されたビット幅より短いビット幅の数値に含まれる符号、指数及び仮数を選択して浮動小数点演算を実現する回路群に伝達する選択手段と、
前記浮動小数点演算を実現する回路群から浮動小数点演算結果を格納する演算結果格納レジスタと、
を有することを特徴とする請求項4に記載の浮動小数点演算回路。
The calculation determination means includes
An operation instruction register for storing an input operation instruction;
A calculation execution flag generating means for detecting whether to pause the floating-point calculation circuit based on the value of the output signal of the calculation instruction register and generating a calculation execution flag;
An execution flag storage register that stores the calculation execution flag generated by the calculation execution flag generation unit;
The calculation execution means includes
When the operation execution flag indicates that the operation is being executed, the sign, exponent, and mantissa included in the extended bit-width value are selected and transmitted to a circuit group that realizes a floating-point operation, and When the operation execution flag indicates that the operation is not being executed, the sign, exponent, and mantissa included in the numerical value having a bit width shorter than the extended bit width are selected and transmitted to the circuit group that realizes the floating-point operation. A selection means;
A calculation result storage register for storing a floating point calculation result from a circuit group for realizing the floating point calculation;
5. The floating point arithmetic circuit according to claim 4, further comprising:
前記浮動小数点演算回路が行なう演算が、加算又は減算である場合に、
前記演算実行手段は、
前記演算実行中フラグに基づいて指数のデータ幅に合った指数を選択する基準指数選択回路と、
前記演算実行中フラグに基づいて指数の差を求めて桁合わせ右シフト量を求めるシフト量算出回路と、
第1データの仮数が格納される第1レジスタと、
第2データの仮数が格納される第2レジスタと、
前記第1データの仮数及び前記第2データの仮数のうち、前記演算実行中フラグに基づいて指数の小さい方を桁合わせが必要な仮数として出力し、他方を桁合わせが必要ない仮数として出力する仮数選択回路と、
前記仮数選択回路から出力された桁合わせが必要な仮数を、前記第1データの仮数及び前記第2データの前記演算実行中フラグに基づく指数の差に応じたシフト量だけ右シフトして、シフトした結果を出力する桁合わせ右シフト回路と、
前記桁合わせ右シフト回路から出力される前記桁合わせが必要な仮数のシフトした結果と前記仮数選択回路から出力される桁合わせが必要ない仮数との加減算を行って、加減算結果を出力する加減算回路と、
前記加減算回路から出力された前記加減算結果を正規化する正規化左シフト回路と、
を備えることを特徴とする請求項5に記載の浮動小数点演算回路。
When the operation performed by the floating point arithmetic circuit is addition or subtraction,
The calculation execution means includes
A reference index selection circuit that selects an index suitable for the data width of the index based on the calculation execution flag;
A shift amount calculation circuit for determining an exponent difference based on the calculation execution flag and determining a digit-aligned right shift amount; and
A first register storing a mantissa of first data;
A second register storing a mantissa of second data;
Of the mantissa of the first data and the mantissa of the second data, the one with the smaller exponent is output as a mantissa requiring digit alignment based on the in-operation flag, and the other is output as a mantissa requiring no digit alignment. A mantissa selection circuit;
The mantissa requiring digit alignment output from the mantissa selection circuit is shifted to the right by a shift amount corresponding to the difference between the mantissa of the first data and the exponent during execution of the second data, Digit shift right shift circuit that outputs the result
Addition / subtraction circuit for performing addition / subtraction between the result of shifting the mantissa requiring digit alignment output from the digit alignment right shift circuit and the mantissa not requiring digit alignment output from the mantissa selection circuit, and outputting the addition / subtraction result When,
A normalized left shift circuit that normalizes the addition / subtraction result output from the addition / subtraction circuit;
The floating point arithmetic circuit according to claim 5, further comprising:
拡張されたビット幅の数値の浮動小数点演算を行なう浮動小数点演算回路であって、
入力される演算命令を格納する演算命令レジスタと、
前記演算命令レジスタの出力信号の値に基づいて当該浮動小数点演算回路による拡張されたビット幅の浮動小数点演算を休止するか否かを検出して、演算実行中フラグを生成する演算実行中フラグ生成回路と、
前記演算実行中フラグ生成回路が生成した前記演算実行中フラグを格納する実行中フラグ格納レジスタと、
入力される拡張されたビット幅の被演算データの符号、指数及び仮数と演算データの符号、指数及び仮数とを格納する第1レジスタ群と、
入力される拡張されないビット幅の被演算データの符号、指数及び仮数と演算データの符号、指数及び仮数とを格納する第2レジスタ群と、
前記演算実行中フラグが当該浮動小数点演算回路による拡張されたビット幅の浮動小数点演算を実行することを示す場合には前記第1レジスタ群を選択し、前記演算実行中フラグが当該浮動小数点演算回路による拡張されたビット幅の浮動小数点演算を休止することを示す場合には前記第2レジスタ群を選択する符号、指数及び仮数選択回路と、
演算命令と被演算データの符号と演算データの符号とに基づいて、演算結果の符号を生成する符号生成回路と、
演算命令と被演算データの符号と演算データの符号とに基づいて、被演算データの指数と演算データの指数とを調整して演算結果の指数を生成する指数生成回路と、
前記指数生成回路における前記被演算データの指数と演算データの指数との調整に対応して、被演算データの仮数と演算データの仮数との桁合わせを行なって演算結果の仮数を生成する仮数演算回路と、
前記演算結果の指数と仮数とを整合する整合回路と、
前記演算結果の符号と、前記整合回路で整合された前記演算結果の指数と仮数とを格納する演算結果格納レジスタとを備え、
前記実行中フラグ格納レジスタに格納された前記実行中フラグと、前記演算結果格納レジスタに格納された前記演算結果の符号、指数及び仮数とを、浮動小数点演算結果として出力することを特徴とする浮動小数点演算回路。
A floating-point arithmetic circuit that performs floating-point arithmetic on an extended bit-width number,
An operation instruction register for storing an input operation instruction;
Generates an in-execution flag that detects whether or not to stop the floating-point operation with the extended bit width by the floating-point operation circuit based on the value of the output signal of the operation instruction register and generates an in-operation flag Circuit,
An execution flag storage register for storing the operation execution flag generated by the operation execution flag generation circuit;
A first register group for storing the sign, exponent, and mantissa of the input operation data having an extended bit width and the sign, exponent, and mantissa of the operation data;
A second register group for storing the sign, exponent, and mantissa of the input unexpanded bit-width operand data, and the sign, exponent, and mantissa of the operation data;
The first register group is selected when the operation in progress flag indicates that the floating point operation with an extended bit width is performed by the floating point operation circuit, and the operation execution flag is in the floating point operation circuit. A sign, exponent and mantissa selection circuit for selecting the second register group when indicating that the floating-point operation with the extended bit width by
A code generation circuit for generating a code of a calculation result based on a calculation instruction, a sign of operation data, and a sign of calculation data;
An exponent generation circuit that adjusts the exponent of the operand data and the exponent of the operand data based on the arithmetic instruction, the sign of the operand data, and the sign of the operand data;
In accordance with the adjustment of the exponent of the operand data and the exponent of the calculation data in the exponent generation circuit, the mantissa calculation that generates the mantissa of the calculation result by aligning the mantissa of the operand data with the mantissa of the calculation data Circuit,
A matching circuit for matching the exponent and mantissa of the operation result;
A calculation result storage register for storing a sign of the calculation result and an exponent and mantissa of the calculation result matched by the matching circuit;
The floating flag stored in the in-execution flag storage register and the sign, exponent, and mantissa of the operation result stored in the operation result storage register are output as a floating-point operation result. Decimal point arithmetic circuit.
異なるビット幅の数値に対してそれぞれ浮動小数点演算を行なう複数の演算回路を有する浮動小数点演算回路を備えたコンピュータであって、
第1演算回路が、
当該第1演算回路への演算命令が、第1ビット幅の数値に対する演算であるか前記第1ビット幅より短い第2ビット幅の数値に対する演算であるかを判定する演算判定手段と、
前記演算判定手段が前記第1ビット幅の数値に対する演算であると判定した場合に、前記第1ビット幅の数値の浮動小数点演算を実行し、前記演算判定手段が前記第2ビット幅の数値に対する演算であると判定した場合に、前記第2ビット幅の数値の浮動小数点演算を実行する演算実行手段と、を有し、
第2演算回路が、前記第2ビット幅の数値の浮動小数点演算を実行する回路であって、
前記浮動小数点演算回路への演算命令が前記第1ビット幅の数値に対する演算が休止することを示す場合には、前記第2ビット幅の数値の浮動小数点演算を前記第1演算回路と前記第2演算回路とにより並列に実行することを特徴とするコンピュータ。
A computer having a floating-point arithmetic circuit having a plurality of arithmetic circuits that perform floating-point arithmetic on numerical values having different bit widths,
The first arithmetic circuit is
An operation determination means for determining whether an operation instruction to the first operation circuit is an operation on a numerical value of a first bit width or an operation on a numerical value of a second bit width shorter than the first bit width;
When the operation determining means determines that the operation is for the numerical value of the first bit width, a floating point operation of the numerical value of the first bit width is executed, and the operation determining means is for the numerical value of the second bit width. And a calculation execution means for executing a floating point calculation of the numerical value of the second bit width when it is determined as a calculation,
A second arithmetic circuit for performing a floating point arithmetic operation on the numerical value of the second bit width,
When the operation instruction to the floating point arithmetic circuit indicates that the operation on the numerical value of the first bit width is suspended, the floating point arithmetic operation of the numerical value of the second bit width is performed with the first arithmetic circuit and the second arithmetic circuit. A computer that is executed in parallel by an arithmetic circuit.
異なるビット幅の数値に対してそれぞれ浮動小数点演算を行なう複数の演算回路を有する浮動小数点演算回路を備えたコンピュータの演算制御方法であって、
演算プログラムを記憶手段から読み出す読出ステップと、
前記演算プログラムの命令を解析して、前記浮動小数点演算回路において演算すべき数値が第1ビット幅か前記第1ビット幅より短い第2ビット幅かを判定する判定ステップと、
前記浮動小数点演算回路において演算すべき数値が第1ビット幅の場合に、前記第1ビット幅の演算を行なう第1演算回路に前記第1ビット幅の演算命令と演算すべき数値とを提供して、前記第1ビット幅の演算結果を前記第1演算回路から取得する第1演算ステップと、
前記浮動小数点演算回路において演算すべき数値が第2ビット幅の場合に、前記第1ビット幅の演算を行なう第1演算回路と前記第2ビット幅の演算を行なう第2演算回路とに並列の前記第2ビット幅の演算命令と演算すべき数値とを提供して、前記第2ビット幅の演算結果を前記第1演算回路と前記第2演算回路から並列に取得する第2演算ステップと、
を含むことを特徴とする演算制御方法。
An arithmetic control method for a computer having a floating point arithmetic circuit having a plurality of arithmetic circuits each performing a floating point arithmetic on numerical values having different bit widths,
A reading step of reading the arithmetic program from the storage means;
A determination step of analyzing an instruction of the arithmetic program and determining whether a numerical value to be calculated in the floating-point arithmetic circuit is a first bit width or a second bit width shorter than the first bit width;
When the numerical value to be calculated in the floating-point arithmetic circuit is the first bit width, the first arithmetic circuit for performing the operation of the first bit width is provided with the arithmetic instruction of the first bit width and the numerical value to be calculated. A first calculation step of obtaining a calculation result of the first bit width from the first calculation circuit;
When the numerical value to be calculated in the floating-point arithmetic circuit is the second bit width, the first arithmetic circuit that performs the operation of the first bit width and the second arithmetic circuit that performs the operation of the second bit width are connected in parallel. A second operation step of providing an operation instruction of the second bit width and a numerical value to be operated, and obtaining an operation result of the second bit width in parallel from the first operation circuit and the second operation circuit;
An arithmetic control method comprising:
異なるビット幅の数値に対してそれぞれ浮動小数点演算を行なう複数の演算回路を有する浮動小数点演算回路を備えたコンピュータの演算制御プログラムであって、
演算プログラムを記憶手段から読み出す読出ステップと、
前記演算プログラムの命令を解析して、前記浮動小数点演算回路において演算すべき数値が第1ビット幅か前記第1ビット幅より短い第2ビット幅かを判定する判定ステップと、
前記浮動小数点演算回路において演算すべき数値が第1ビット幅の場合に、前記第1ビット幅の演算を行なう第1演算回路に前記第1ビット幅の演算命令と演算すべき数値とを提供して、前記第1ビット幅の演算結果を前記第1演算回路から取得する第1演算ステップと、
前記浮動小数点演算回路において演算すべき数値が第2ビット幅の場合に、前記第1ビット幅の演算を行なう第1演算回路と前記第2ビット幅の演算を行なう第2演算回路とに並列の前記第2ビット幅の演算命令と演算すべき数値とを提供して、前記第2ビット幅の演算結果を前記第1演算回路と前記第2演算回路から並列に取得する第2演算ステップと、をコンピュータに実行させることを特徴とする演算制御プログラム。
An arithmetic control program for a computer comprising a floating point arithmetic circuit having a plurality of arithmetic circuits that respectively perform floating point arithmetic on numerical values of different bit widths,
A reading step of reading the arithmetic program from the storage means;
A determination step of analyzing an instruction of the arithmetic program and determining whether a numerical value to be calculated in the floating-point arithmetic circuit is a first bit width or a second bit width shorter than the first bit width;
When the numerical value to be calculated in the floating-point arithmetic circuit is the first bit width, the first arithmetic circuit for performing the operation of the first bit width is provided with the arithmetic instruction of the first bit width and the numerical value to be calculated. A first calculation step of obtaining a calculation result of the first bit width from the first calculation circuit;
When the numerical value to be calculated in the floating-point arithmetic circuit is the second bit width, the first arithmetic circuit that performs the operation of the first bit width and the second arithmetic circuit that performs the operation of the second bit width are connected in parallel. A second operation step of providing an operation instruction of the second bit width and a numerical value to be operated, and obtaining an operation result of the second bit width in parallel from the first operation circuit and the second operation circuit; An arithmetic control program for causing a computer to execute.
JP2010261830A 2010-11-24 2010-11-24 Floating point arithmetic circuit, computer with floating point arithmetic circuit, and arithmetic control method and arithmetic control program for the same Abandoned JP2012113508A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010261830A JP2012113508A (en) 2010-11-24 2010-11-24 Floating point arithmetic circuit, computer with floating point arithmetic circuit, and arithmetic control method and arithmetic control program for the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010261830A JP2012113508A (en) 2010-11-24 2010-11-24 Floating point arithmetic circuit, computer with floating point arithmetic circuit, and arithmetic control method and arithmetic control program for the same

Publications (1)

Publication Number Publication Date
JP2012113508A true JP2012113508A (en) 2012-06-14

Family

ID=46497660

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010261830A Abandoned JP2012113508A (en) 2010-11-24 2010-11-24 Floating point arithmetic circuit, computer with floating point arithmetic circuit, and arithmetic control method and arithmetic control program for the same

Country Status (1)

Country Link
JP (1) JP2012113508A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111381802A (en) * 2018-12-28 2020-07-07 上海寒武纪信息科技有限公司 Data comparator, data processing method, chip and electronic equipment
CN115390770A (en) * 2022-10-31 2022-11-25 上海亿铸智能科技有限公司 Method and system for simplifying multipath selection of SRAM output data

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0484219A (en) * 1990-07-26 1992-03-17 Fujitsu Ltd Arithmetic processor and arithmetic processing method
JPH0991118A (en) * 1995-09-27 1997-04-04 Hitachi Ltd Floating point arithmetic unit
JPH11175339A (en) * 1997-12-17 1999-07-02 Hitachi Ltd Microcomputer

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0484219A (en) * 1990-07-26 1992-03-17 Fujitsu Ltd Arithmetic processor and arithmetic processing method
JPH0991118A (en) * 1995-09-27 1997-04-04 Hitachi Ltd Floating point arithmetic unit
JPH11175339A (en) * 1997-12-17 1999-07-02 Hitachi Ltd Microcomputer

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111381802A (en) * 2018-12-28 2020-07-07 上海寒武纪信息科技有限公司 Data comparator, data processing method, chip and electronic equipment
CN111381802B (en) * 2018-12-28 2022-12-09 上海寒武纪信息科技有限公司 Data comparator, data processing method, chip and electronic equipment
CN115390770A (en) * 2022-10-31 2022-11-25 上海亿铸智能科技有限公司 Method and system for simplifying multipath selection of SRAM output data

Similar Documents

Publication Publication Date Title
JP6487097B2 (en) Perform rounding according to instructions
CN107077416B (en) Apparatus and method for vector processing in selective rounding mode
CN110036368B (en) Apparatus and method for performing arithmetic operations to accumulate floating point numbers
CN101438232B (en) The floating add of different floating-point format
TWI515649B (en) Reducing power consumption in a fused multiply-add (fma) unit responsive to input data values
CN101620589B (en) Efficient parallel floating point exception handling in processor
US8990282B2 (en) Apparatus and method for performing fused multiply add floating point operation
CN103988171B (en) In a data processing system for the method and apparatus performing floating-point operation arithmetic
CA3083043C (en) System and method of floating point multiply operation processing
EP3719639A2 (en) Systems and methods to perform floating-point addition with selected rounding
US10579338B2 (en) Apparatus and method for processing input operand values
JP2012113508A (en) Floating point arithmetic circuit, computer with floating point arithmetic circuit, and arithmetic control method and arithmetic control program for the same
US10671347B2 (en) Stochastic rounding floating-point multiply instruction using entropy from a register
US10459688B1 (en) Encoding special value in anchored-data element
US11221826B2 (en) Parallel rounding for conversion from binary floating point to binary coded decimal
US10963245B2 (en) Anchored data element conversion
JP2022162183A (en) Computing device and computing method
CN111124361A (en) Arithmetic processing apparatus and control method thereof
WO2022204620A2 (en) Systems and methods for efficient accumulate and multiply-accumulate operations of floating-point numbers in a unified register file
JP2011090623A (en) Floating-point retrieval calculation apparatus, method and program

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130123

A762 Written abandonment of application

Free format text: JAPANESE INTERMEDIATE CODE: A762

Effective date: 20130308