WO1992016891A1 - Numerical expression converter and vector processor using the same - Google Patents

Numerical expression converter and vector processor using the same Download PDF

Info

Publication number
WO1992016891A1
WO1992016891A1 PCT/JP1992/000324 JP9200324W WO9216891A1 WO 1992016891 A1 WO1992016891 A1 WO 1992016891A1 JP 9200324 W JP9200324 W JP 9200324W WO 9216891 A1 WO9216891 A1 WO 9216891A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
point
numerical
floating
decimal point
Prior art date
Application number
PCT/JP1992/000324
Other languages
English (en)
French (fr)
Inventor
Koichi Hatta
Original Assignee
Fujitsu Limited
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Limited filed Critical Fujitsu Limited
Priority to KR1019920702897A priority Critical patent/KR960003044B1/ko
Priority to DE69225654T priority patent/DE69225654T2/de
Priority to EP92906919A priority patent/EP0530372B1/en
Publication of WO1992016891A1 publication Critical patent/WO1992016891A1/ja
Priority to US08/353,374 priority patent/US5508948A/en

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/14Conversion to or from non-weighted codes
    • H03M7/24Conversion to or from floating-point codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations

Definitions

  • the present invention relates to a numerical representation conversion device having a function of converting and outputting a floating-point number consisting of a sign part, an exponent part, and a mantissa part to a fixed-point number, and is particularly required for negative fixed-point number conversion.
  • the present invention relates to a numerical expression changing device that achieves a reduction in the number of circuits and an increase in processing speed, and a vector processor unit.
  • a fixed-point representation is one in which the position of the decimal point is usually set to the right of LSB and the weight of LSB is "1". In this fixed-point representation, negative numbers are represented by two's complement.
  • floating-point representation expresses a numerical value by dividing it into a sign part, an exponent part, and a mantissa part.
  • Fig. 1 shows two examples of a conventional numerical representation conversion device. As shown in the figure, the sign part (S), exponent part (E), and mantissa part (M) of the numerical value in the floating-point representation are stored in registers 10a, 10b, and IOC, respectively.
  • the weight determination circuit 11 functions as weight determination means for determining the weight of the mantissa part (M) from the value of the exponent part (E) of the input floating-point number.
  • the shifter 12 functions as decimal point positioning means for performing a decimal point alignment by shifting the value of the input mantissa of the floating point number according to the determined weight. 2 is provided with a detection unit 12a for detecting the presence of a numerical value protruding below the decimal point.
  • the two's complement generation circuit 13, the decrementer 14 and the first selector 15 convert the value of the integer part of the numerical value obtained by the decimal point alignment into a two's complement notation, and receive an externally supplied value. Based on the truncation direction command (C), it functions as a polarity conversion unit with rounding processing 20 for rounding off a value protruding below the decimal point in one of two types of truncation directions.
  • the two's complement generation circuit 13 includes a bit inversion circuit 13 a for bit-converting the integer part of the output value of the shifter 2, and a 1 And an adder circuit 13 b for adding the integers. Therefore, the integer of the output value of the shifter 12 is output from the two's complement generation circuit 13 as a two's complement representation. This output is equivalent to the value of the integer part when the value after the decimal point of the shifter 12 is rounded down to a direction close to zero.
  • the decrementer 14 is a circuit for subtracting 1 from the number output from the two's complement generation circuit 13, so that the decrementer 14 increases the value after the decimal point of the shift 2 to a negative value from the decrementer 14. The value of the integer part when rounded down in the direction is output.
  • the first selector 15 includes an AND circuit 15a to which the detection signal B and the command signal C are supplied, an inverter 15b to invert its output, and a decrementer.
  • the output of the AND circuit 15c to which the evening output is supplied, the output of the AND circuit 15d to which the output of the two's complement generation circuit 13 is supplied, and the outputs of the AND circuits 15c and 15d are supplied.
  • an OR circuit 15 e The shift signal 12 is detected when the detection signal B is 0 based on the detection signal B of the protruding value presence / absence detection section 12 a of the shifter 12 and the truncation direction indication signal C.
  • the value of the integer part when the value is rounded down to a value close to zero output from the 2's complement generation circuit 13 is selected, and the detection signal B is If there is a protruding value at 1 and the command signal is 1, the value is rounded down in the negative direction output from the decrementer 14 And selects the output value of the integer part of the case.
  • the second selector 16 inverts the sign (S) as shown in FIG. 4, an inverted circuit 16a, an AND circuit 16b supplied with the selector 15 output, and a shifter 12 output. And an OR circuit 16d to which the outputs of the AND circuits 16b and 16c are supplied, respectively.
  • the sign (S) of the register 10a is When 0 is positive, the integer part of the numerical value obtained by the shift function 12 functioning as the decimal point alignment means is selected. When the sign part (S) is 1 and negative, the polarity conversion means with rounding process 2 is selected. Select and output the value determined by 0.
  • Conversion result register 17 is the sign part of the input floating-point value
  • the first selector 15 when the value of the truncation direction command signal C is “0”, the truncation process is performed in a direction close to zero, and when the value is “1”, a negative value increases. Selection control is performed so as to perform rounding in the direction. As a result, the first selector 15 outputs (111) if the value of the trimming direction command signal C is "0" or "1". Force Also the value of the truncation direction command signal C In the case of "1", (1 101) is output.
  • selection control is performed so that the output of the shifter 12 is selected when the value of the sign unit S is “0”, and the output of the first selector 15 is selected when the value of the sign unit S is “1”.
  • the second selector 16 outputs (1 1 1 0) or (1 1 0 1) in response to the value of the sign portion S being "1".
  • the conversion result register 17 outputs (111111) or (111101) as the target signed fixed-point value.
  • the delay time of one gate is one unit, after a floating-point number is stored in registers 10a to 10c shown in Fig. 6 (A), it is a kind of adder circuit.
  • the weight judgment circuit 11 is delayed by 6 units as shown in the figure
  • the shifter 12 is delayed by 3 units as shown in FIG. 3
  • the delay is 6 units as shown in (D) in the same figure
  • the decrement time 14 is the delay of 6 units as shown in (E) in the same figure
  • the selectors 15 and 16 respectively show (F) and It is delayed by 3 units as shown in (G). In other words, a total delay of 27 units occurs.
  • the addition circuit 13 b also exists in the two's complement generation circuit 13. Therefore, there is a problem that the operation time is increased by the presence of these two adding circuits, and the circuit configuration is correspondingly complicated.
  • an object of the present invention is to provide a new and useful numerator conversion circuit which eliminates the above-mentioned problems, and a vector 'processor' unit using the same.
  • a further object of the present invention is to perform two types of truncation processing on a numerical value in a floating-point expression and to increase the operation speed of converting the numerical value into a numerical value in a fixed-point expression and to simplify the circuit configuration. Disclosure of the invention
  • the objective is to determine the weight of the mantissa part (M) from the value of the exponent part (E) of the input floating-point number,
  • a numerical representation conversion device having a function of converting a floating-point number consisting of a sign part (S), an exponent part (E) and a mantissa part (M) into a fixed-point number and outputting the fixed-point number.
  • Bit inversion means (31) for bit-inverting the integer part of the numerical value obtained from the decimal point alignment means (12);
  • Decision means (32) A carry value for determining a carry value based on information indicating the presence or absence of a value below the decimal point in the digit shift of the decimal point alignment means (1 2) and a truncation direction command given from the outside.
  • Fig. 1 shows the configuration of the conventional device
  • Figure 2 is a block diagram of a two's complement circuit
  • Figure 3 is the circuit diagram of the first selector
  • Figure 4 is the circuit diagram of the second selector
  • FIG. 5 is a diagram for explaining the operation of FIG. 1,
  • Fig. 6 is the operation timing chart of Fig. 1,
  • FIG. 7 is a configuration diagram of the device of the present invention.
  • Figure 8 is an illustration of floating-point representation
  • Fig. 9 is an explanatory diagram of the relationship between the index part and the shift amount
  • FIG. 10 is an explanatory diagram of the operation of FIG. 7,
  • Fig. 11 is the operation timing chart of Fig. 7,
  • Fig. 12 is a block diagram of the vector 'processor' unit. BEST MODE FOR CARRYING OUT THE INVENTION
  • FIG. 7 shows a configuration diagram of an embodiment of the device of the present invention.
  • the same parts as those in FIG. 1 are denoted by the same reference numerals, and description thereof will be omitted.
  • the sign part (S), exponent part (E), and mantissa part (M) stored in registers 10a to 10c are 1-bit and 3-bit, respectively, as shown in FIG. , And 4 bits.
  • the weight judging circuit 11 is a subtractor for subtracting the value of the exponent part of the register 1 Ob from a predetermined value (3 in this case), and outputs a shift amount shown in FIG. 9 according to the value of the exponent part. .
  • the present embodiment is different from the conventional example in that the polarity converter with rounding processing 30 comprises a bit inverting circuit 31, a NAND circuit 32, and an adding circuit 33.
  • bit inverting circuit 31 bit-inverts the integer part of the numerical value obtained from the shifter 12 functioning as a decimal point aligning means and outputs the result. Then, this bit inverting circuit 31 O Is supplied to one input of an adder circuit 33. Note that the output value of the bit inversion circuit 31 corresponds to the output value when the truncation process is performed in the direction in which the negative value increases.
  • the NAND circuit 32 is a circuit that performs a NAND logic of the detection signal B from the protruding numerical value presence / absence detection section 12 a of the shifter 12 and the truncation direction command signal C, and the output of the NAND circuit 32 rises.
  • the other value of the adder circuit 33 as a numerical value ("1" when truncating toward zero or "0" when truncating toward a larger negative value) Supplied to input.
  • the adding circuit 33 adds the output value of the bit inverting circuit 31 and the output value of the NAND circuit 32, and outputs the result to the selector 16 as a negative value in a fixed-point representation to be finally output. Supply.
  • the bit inversion circuit 31 outputs a value (1101) obtained by bit-inverting the contents (00110) of the integer part of the shifter 2, and this value is output.
  • the value (1101) is supplied to one input of the adder circuit 11 as an output value when performing a rounding process in a direction in which the negative value increases.
  • the value of the detection signal B from the detection unit 12 a of the shifter 12 is “1”, and the value of the truncation direction command signal C is “1” when the truncation process is performed to the side close to zero. 0 "1” when the truncation process is performed in the direction in which the negative value increases, and "1” when the output value of the NAND circuit 32 is truncated to the side closer to zero. "0" when truncation is performed in the direction in which the negative value increases.
  • the output of the NAND circuit 32 is supplied to the other input of the adder circuit 33 as a carry value.
  • the output of the adder circuit 33 is converted into a signed fixed-point value from the conversion result register 17 through the selector 16 as in the conventional example as a signed fixed-point value (1 1 1 1 0) Or (1 1 1 0 1) is output to the outside.
  • the delay time of one gate is one unit
  • the floating-point representation numbers are stored in the registers 10a to 10c shown in Fig. 11 (A)
  • a kind of addition is performed.
  • the NAND circuit 32 delays one unit as shown in FIG. 3D
  • the adder 33 delays six units as shown in FIG. As shown in F): 3 units are delayed.
  • FIG. 12 is a block diagram of a vector processor unit (VPU) to which the present invention is applied.
  • This vector processor unit is a one-chip semiconductor integrated circuit.
  • a vector register (VU) 50 stores a vector register 51 for storing vector data, a scalar register 52 for storing scalar data, and a mask register 53 for storing mask data. Is provided.
  • the adder 54, the multiplier 55, and the divider 56 of the vector geometry unit 50 ⁇ respectively perform pipeline processing of addition, multiplication, and division of numerical data.
  • the mask unit 57 performs mask processing at the time of vector operation.
  • the data output latch 58 and the data input latch 59 respectively perform external output of data and data input from outside.
  • the command buffer unit (CBU) 60 is provided with an instruction buffer (VCB) 61 for storing instructions.
  • the instruction read from the instruction buffer 61 is supplied to the decoding unit 71 in the control unit (CU) 70.
  • the pipeline control unit 72 Based on the decoding result, the pipeline control unit 72 performs pipeline control of the addition unit 54, the multiplication unit 55, and the division unit 56 in the vector and the unit 50.
  • the scoreboard unit 73 manages the right to use various registers in the vector unit 50 used for the above pipeline control.
  • the dress unit (AU) 80 is virtualized using a VTR (vector 'translation' register) 81 and a TLB (translation, lux, size, buffer) 82.
  • the address is converted from the address to the physical address, and the address is transferred between the inside and the outside of the chip.
  • the bus control unit 85 exchanges data between the inside and the outside of the chip.
  • the numerical representation conversion device of the present invention shown in FIG. 7 is provided in the addition unit 54 of the vector unit 50, and converts the floating-point representation vector data. Used to convert to fixed-point representation and add vector data.
  • an integrated circuit having a large scale and performing high-speed operations such as a vector-processor unit, it is very important that the device of the present invention reduce the chip area by simplifying the circuit configuration or increase the speed of the operations.
  • the numerical representation conversion device of the present invention it is possible to increase the operation speed and simplify the circuit configuration. Further, according to the vector processor unit of the present invention, The chip area can be reduced along with the increase in computation speed, which is extremely useful in practical use.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Algebra (AREA)
  • Pure & Applied Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Complex Calculations (AREA)
  • Image Processing (AREA)

Description

明細書
数値表現変換装置及びそれを用いたべク トル · プロセッサ · ュニッ h
技術分野
本発明は、 符号部、 指数部及び仮数部からなる浮動小数点表現の 数値を固定小数点表現の数値に変換出力する機能を有する数値表現 変換装置に係り、 特に負の固定小数点数変換に必要とされる回路数 の削減及び処理の高速化を達成した数値表現変化装置及びそれを m いたべク トル · プロセッサ ·ュニッ 卜に関する。
数値演算で扱われるデータを表現する手段としては、 通常、 固定 小数点表現と浮動小数点表現とが用いられている。 固定小数点表現 とは、 小数点の位置を普通 L S Bの右側に設定し、 L S Bの重みを " 1 " とするものであり、 またこの固定小数点表現においては負の 数値は 2の補数により表される。 他方、 浮動小数点表現とは、 符号 部、 指数部、 仮数部に分割して数値を表現するものである。
大抵の数値演算装置は、 数値を固定小数点表現から浮動小数点表 現へと、 また浮動小数点表現から固定小数点表現へと数値を変換す る機能を有する。 浮動小数点数を固定小数点数に変換する場合、 迎 常、 固定小数点数は整数であるので、 小数点以下の値は繰り上げる 力、、 又は切り捨てることとなる。
今、 小数点以下を切り捨てつつ、 浮動小数点から固定小数点へと 数値表現を変換する場合を考える。 例えば、 浮動小数点数の " 2 . 5 " という値を固定小数点に変換する場合、 小数点以下の " 0 . 5 " は切り捨てられて " 2 " という値に変換される。 次に、 "― 2 . ' という値を変換する場合、 変換された値としては、 "一 2 " と "一 3 " との 2通りが考えられる。 前者は符号が単純に方向を表すだけ の場合等で、 小数点以下を切り捨てた値としては " 0 " に近いほう が望ましい。 一方、 後者は本来正の数であるものに計算の都合上 (ダイナミ ックレンジの問題等) 負のバイアスをかけている場合等 で、 後で負のバイアスを除去して本来の正の数に戻すことを考える と小数点以下を切り捨てた値としては負に大きい値が望ましい。 従来の技術
従来の数値表現変換装置の二例を第 1図に示す。 同図に示される ように、 浮動小数点表現による数値の符号部 (S ) 、 指数部 (E ) 及び仮数部 (M) 夫々がレジスタ 1 0 a , 1 0 b , I O Cに格納さ れ o
重み判定回路 1 1 は、 入力された浮動小数点数の指数部 (E ) の 値から仮数部 (M) の重みを判定する重み判定手段として機能する ものである。
シフタ 1 2は、 入力された浮動小数点数の仮数部の値を前記判定 されたその重みに従って桁シフ トさせて小数点位置合せを行なう小 数点位置合せ手段として機能するものであり、 このシフタ 1 2には 小数点以下にはみだした数値が存在することを検出する検出部 1 2 aが設けられている。
2の補数生成回路 1 3、 デクリメン夕 1 4及び第 1セレクタ 1 5 は、 前記小数点位置合せにより得られた数値の整数部の値を 2の補 数表示に変換するとともに、 外部より与えられた切捨方向指令 ( C ) に基づき小数点以下にはみだした数値を 2種類の切捨方向のい ずれかで切捨処理するた丸め処理付き極性変換手段 2 0 として機能 するものである。
すなわち、 2の補数生成回路 1 3は、 第 2図に示す如く、 シフタ 2の出力値の整数部分をビッ ト変換するビッ ト反転回路 1 3 a と、 このビッ ト反転回路の出力値に 1 を加算する加算回路 1 3 b とから 構成されており、 このため 2の補数生成回路 1 3からはシフタ 1 2 の出力値の整数が 2の補数表示となって出力される。 また、 この出 力は、 シフタ 1 2の小数点以下の数値を零に近い方向へと切り捨て た場合の整数部の値に相当する。 デクリ メンタ 1 4は、 2の補数生成回路 1 3から出力される数か ら 1 を減算する回路であり、 このためデク リ メン夕 1 4からはシフ 夕 2の小数点以下の数値を負に大きい方向へと切り捨てた場合の整 数部の値が出力される。
第 1 セレクタ 1 5は、 第 3図に示す如く、 検出信号 Bと指令信号 Cとを供給されるアン ド回路 1 5 aと、 その出力を反転するィン バー夕 1 5 bと、 デクリ メン夕出力を供給されるアン ド回路 1 5 c と、 2の補数生成回路 1 3出力を供給されるアン ド回路 1 5 dと、 アン ド回路 1 5 c, 1 5 d夫々の出力を供給されるオア回路 1 5 e とより構成されており、 シフタ 1 2のはみだし数値有無検出部 1 2 aの検出信号 Bと前記切捨方向指合信号 Cとに基いて、 検出信号 B が 0ではみだし数値が無いか、 又は指令信号 Cが 0の場合は 2の補 数生成回路 1 3から出力される前記零に近い方向へと切り捨てた場 合の整数部の値を選択し、 検出信号 Bが 1ではみだし数値が有り、 かつ指令信号が 1の場合はデクリ メンタ 1 4から出力される前記負 に大きい方向へと切り捨てた場合の整数部の値を選択出力するもの である。
第 2セレクタ 1 6は、 第 4図に示す如く符号部 (S ) を反転する インバー夕 1 6 aと、 セレクタ 1 5出力を供給されるアン ド回路 1 6 bと、 シフタ 1 2出力を供給されるアン ド回路 1 6 c と、 アン ド 回路 1 6 b , 1 6 c夫々の出力を供給されるオア回路 1 6 dとより 構成されており、 レジスタ 1 0 aの符号部 (S ) が 0で正を表わす とき前記小数点位置合せ手段として機能するシフ夕 1 2により求め られた数値の整数部を選択し、 符号部 (S ) が 1で負を表わすとき 前記丸め処理付き極性変換手段 2 0により求められた数値を選択出 力する。
変換結果レジス夕 1 7は、 入力された浮動小数点数値の符号部
( S ) とセレクタ 1 6の出力とを一時記憶し、 最終的に固定小数点 数値として出力する。 次に、 以上の構成よりなる数値表現変換装置の動作を第 5図を参 照しつつ説明する。 尚、 以下の説明では入力された浮動小数点数値 が負極性であり、 かつ小数点以下にはみだし数値が存在する場合 ( "一 2. 5 " の場合) で説明するが、 その他正極性の場合 ( "十 2. 0 " 又は " + 2. 5 " の場合) 、 或いは負極性であってもはみ だし数値が存在しない場合 ( "一 2. 0 " の場合) には、 単なる切 捨処理が行われるだけであることは、 当業者であれば容易に理解で きるであろう。
今、 仮に数値 "— 2. 5 " が浮動小数点表現によりレ ジス夕 1 U a〜 1 0 cに入力されると、 3 = 1、 £= 0 0 1、 1 = 1 0 1 0 と
7よる。
すると、 重み判定回路 1 1からは E= 1に基いてシフ ト量 (重 み) として " 2 " が出力され、 これによりシフタ 1 2の内容 (M = 1 0 1 0 ) が右方向へ 2 ビッ トシフ トされることにより、 シフタ 1 2の整数部の内容は ( 0 0 1 0 ) となると共に、 はみだし数値検出 信号 Bの値は " 1 " となる。
次いで、 2の補数生成回路 1 3では、 ( 1 1 0 1 ) + ( 0 0 ϋ 1 ) = ( 1 1 1 0 ) なる演算が行われて、 数値 ( 0 0 1 0 ) の補数 ( 1 1 1 0 ) が求められ、 この補数 ( 1 1 1 0 ) は前述したように 零に近い側へと切捨処理を行う場合の出力として、 セレクタ 1 5の —方の入力に与えられる。 他方、 デク リ メンタ 1 4においては、 ( 1 1 1 0 ) - ( 0 0 0 1 ) = ( 1 1 0 1 ) なる演算が行われ、 そ の演算結果は前述したように負の側に大きくなる方向の切捨処理を 行う場合の出力として、 セレクタ 1 5の他方の入力に与えられる。 第 1セレクタ 1 5では、 切捨方向措令信号 Cの値が " 0 " の場 ί には、 零に近い方向への切捨処理を、 また " 1 " の場合には負の値 が大きくなる方向への切捨処理う行うように選択制御が行われ、 そ の結果、 第 1セレクタ 1 5からは、 切捨方向指令信号 Cの値か " 0 " の場合には ( 1 1 1 0 ) 力 また切捨方向指令信号 Cの値 " 1 " の場合には ( 1 1 0 1 ) が出力される。
第 2セレクタ 1 6では、 符号部 Sの値が " 0 " の場合にはシフ 1 2の出力を、 また " 1 " の場合には第 1セレクタ 1 5の出力を選 択するように選択制御が行われ、 その結果、 第 2セレクタ 1 6から は符号部 Sの値が " 1 " であることに対応して ( 1 1 1 0) または ( 1 1 0 1 ) が出力される。
そして、 最終的に、 変換結果レジスタ 1 7からは、 目的とする符 号付きの固定小数点数値として、 ( 1 1 1 1 0 ) または ( 1 1 1 0 1 ) が出力される。
ここで、 1ゲー トの遅延時間を 1ユニッ トとすると、 第 6図 ( A) に示すレジスタ 1 0 a〜 1 0 cに浮動小数点表現の数値が格納 された後、 一種の加算回路である重み判定回路 1 1で同図 に 示す如く 6ュニッ ト遅延され、 シフタ 1 2で同図 (C) に示す如 '、 3ュニッ ト遅延され、 加算回路 1 3 bを持つ 2の補数生成回路 1 3 で同図 (D) に示す如く 6ユニッ ト遅延され、 デクリ メン夕 1 4で 同図 (E) に示す如く 6ュニッ ト遅延され、 セレクタ 1 5, 1 6 夫々で同図 (F) , (G) に示す如く 3ュニッ トずつ遅延される。 つまり全体で 27ュニッ 卜の遅延が生じる。
このように従来の数値表現変換装置にあっては、 デク リ メ ン夕 (一種の加算回路) 1 4に加えて、 2の補数生成回路 1 3内にも加 算回路 1 3 bが存在することから、 これら 2つの加算回路の存在に より演算時間が大きくなり、 またその分回路構成も複雑化するとい う問題点があった。
従って、 本発明は上記の問題点を除去した新規かつ有用な数 現変換回路及びそれを用いたベ 卜ル ' プロセッサ 'ュニッ 卜を提 供することを目的とする。
更に、 本発明は浮動小数点表現の数値について 2種類の切捨処理 を行い、 固定小数点表現の数値に変換する演算速度の高速化及び回 路構成の簡素化を図ることを目的とする。 発明の開示
上記目的は、 入力された浮動小数点数の指数部 (E) の値から仮 数部 (M) の重みを判定する重み判定手段 ( 1 1 ) と、
入力された浮動小数点数の仮数部 (M) の値を前記判定されたそ の重みに従って桁シフ 卜させて小数点位置合せを行なう小数点位置 合せ手段 ( 1 2) と、
前記小数点位置合せにより得られた数値の整数部の値を負極性 ¾ 示に変換するとともに、 外部より与えられた切捨方向指令に基づき 小数点以下にはみだした数値を 2種類の切捨方向のいずれかで切捨 処理する丸め処理付き極性変換手段 (3 0) と、
入力された浮動小数点数の符号部 (S) の値に従って、 前記小数 点位置合せ手段により求められた数値の整数部又は前記丸め処理付 き極性変換手段により求められた数値のいずれかを選択出力する選 択手段 ( 1 6)
とを備え、 符号部 (S) 、 指数部 (E) 及び仮数部 (M) からな る浮動小数点表現の数値を固定小数点表現の数値に変換出力する機 能を有する数値表現変換装置において、
前記負極性数値生成手段 (3 0) は、
前記小数点位置合せ手段 ( 1 2) より得られる数値の整数部を ビッ ト反転するビッ ト反転手段 ( 3 1 ) と、
前記小数点位置合せ手段 ( 1 2) の桁シフ トにおいて小数点以下 にはみだした数値の有無を示す情報と外部より与えられた切捨方向 指令とに基いて繰り上り数値の値を決定する繰り上り数値決定手段 ( 32) と、
前記ビッ ト反転手段 (3 1 ) の出力数値と前記繰り上かり数 ffi; 定手段 (3 2) で決定された繰り上り数値とを加算する加算手 ( 3 3 ) と、 からなることにより達成される。 図面の簡単な説明
第 1図は従来装置 構成図、
第 2図は 2の補数回路のプロック図、
第 3図は第 1セレクタの回路図、
第 4図は第 2セレクタの回路図、
第 5図は第 1図の動作説明図、
第 6図は第 1図の動作タイ ミ ングチャー ト、
第 7図は本発明装置の構成図、
第 8図は浮動小数点表現の説明図、
第 9図は指数部とシフ ト量の関係の説明図、
第 1 0図は第 7図の動作説明図、
第 1 1図は第 7図の動作タイ ミ ングチャー ト、
第 1 2図はベク トル ' プロセッサ 'ュニッ 卜の構成図である 発明を実施するための最良の形態
第 7図は本発明装置の一実施例の構成図を示す。 同図中、 第 1 図 と同一部分には同一符号を付し、 その説明を省略する。
第 7図において、 レジスタ 1 0 a〜 1 0 c夫々に格納される符号 部 (S ) 、 指数部 (E ) 、 仮数部 (M ) 夫々は第 8図に示す如く 1 ビッ ト、 3 ビッ ト、 4 ビッ トであるとして説明する。
重み判定回路 1 1 は、 所定値 (この場合 3 ) からレジスタ 1 O b の指数部の値を減算する減算器であり、 指数部の値に応じて第 9図 に示すシフ ト量を出力する。
本実施例では丸め処理付き極性変換手段 3 0がビッ ト反転回路 3 1 とナンド回路 3 2と加算回路 3 3 とより構成されている点が従来 例と異なっている。
すなわち、 第 7図において、 ビッ ト反転回路 3 1 は、 小数点位^ 合せ手段として機能するシフタ 1 2より得られる数値の整数部を ビッ ト反転して出力する。 そして、 このビッ ト反転回路 3 1 O出 は加算回路 3 3の一方の入力に供給される。 尚、 このビッ 卜反転回 路 3 1の出力値は、 負の値が大きくなる方向への切捨処理を行う場 合の出力値に対応する。
ナンド回路 3 2は、 シフタ 1 2のはみだし数値有無検出部 1 2 a からの検出信号 Bと切捨方向指令信号 Cとのナンド論理をとる回路 であり、 このナンド回路 3 2の出力は繰り上がり数値 (零に近付く 方向への切捨処理を行う場合には " 1 " 又は負の値が大きくなる方 向への切捨処理を行う場合には " 0 " ) として加算回路 3 3の他方 の入力に供給される。
加算回路 3 3では、 ビッ ト反転回路 3 1の出力値とナン ド回路 3 2の出力値とを加算し、 これを最終的に出力されるべき固定小数点 表現による負極性数値としてセレクタ 1 6に供給する。
次に、 以上の構成よりなる実施例装置の動作を第 1 0図を参照し つつ説明する。 尚、 以下の説明では入力された浮動小数点数値か負 極であり、 かつ小数点以下にはみだし数値が存在する場合 ( "- 2. 5 " の場合) で説明するが、 その他正極性の場合 ( "+ 2. 0 " 又 は "+ 2. 5 " の場合) 、 或いは負極性であってもはみだし数値か 存在しない場合 ( "一 2. 0 " の場合) には、 単なる切捨処理が行 われるだけであることは、 当業者であれば容易に理解できるであろ ラ c
今、 仮に数値 "一 2. 5 " が浮動小数点表現により入力されると、 S = l、 E = 0 0 1. M= 1 0 1 0 となる。
すると、 重み判定回路 1 1からは E= 1に基いてシフ 卜量 (重 み) として " 2 " が出力され、 これによりシフタ 2の內容 (M= 1 0 1 0 ) が右方向へ 2 ビッ トシフ 卜されることにより、 シフ夕 2 整数部の内容は ( 0 0 1 0 ) となると共に、 はみだし数値検出信 S Bの値は " 1 " となる。
次いで、 ビッ ト反転回路 3 1からは、 シフタ 2の整数部の内容 ( 0 0 1 0 ) をビッ ト反転をした値 ( 1 1 0 1 ) が出力され、 この 値 ( 1 1 0 1 ) は負の値が大きくなる方向への切捨処理を行う場合 の出力値として加算回路 1 1の一方の入力に供給される。
他方、 シフタ 1 2の検出部 1 2 aからの検出信号 Bの値は " 1 " であり、 また切捨方向指令信号 Cの値は、 零に近い側へと切捨処理 を行う場合は " 0 " 又負の値が大きくなる方向への切捨処理を行う 場合は " 1 " となるため、 ナン ド回路 3 2の出力値は零に近い側へ と切捨処理を行う場合は " 1 " 又負の値が大きくなる方向への切捨 処理を行う場合は " 0 " となる。 このナン ド回路 3 2の出力が繰り 上がり数値として加算回路 3 3の他方の入力に供給される。
従って、 加算回路 3 3においては、 零に近い側へと切捨処理を行 う場合には、 ( 1 1 0 1 ) + ( 0 0 0 1 ) = ( 1 1 1 0 ) なる演算 により数値 ( 1 1 1 0 = "— 2 " ) が出力されるのに対し、 負の値 が大きくなる方向への切捨処理を行う場合には、 ( 1 1 0 1 ) + ( 0 0 0 0 ) = ( 1 1 0 1 ) なる演算により数値 ( 1 1 0 1 = ··— 3 " ) が出力される。
以後、 この加算回路 3 3の出力は、 従来例と同様にして、 セレ ク 夕 1 6を経由して変換結果レジス夕 1 7から、 符号付きの固定小数 点数値として ( 1 1 1 1 0 ) 又は ( 1 1 1 0 1 ) が外部へと出力さ れる。
ここで、 1 ゲー卜の遅延時間を 1ユニッ トとすると、 第 1 1 図 ( A) に示すレジス夕 1 0 a〜 l 0 cに浮動小数点表現の数値が格 納された後、 一種の加算回路である重み判定回路 1 1で同図 ( B ) に示す如く 6ュニッ ト遅延され、 シフタ 1 2で同図 (C) に示す如 く 3ュニッ ト遅延される。 この後、 ナンド回路 3 2で同図 (D) に 示す如く 1ュニッ ト遅延され、 加算回路 3 3で同図 (E) に示す如 く 6ユニッ ト遅延され、 セレクタ 1 6夫々で同図 (F) に示す如 : 3ュニッ ト遅延される。 つまり全体で 1 9ュニッ 卜の遅延が生じる r このように、 丸め処理付き極性変換手段 3 0に比較的遅延量の大 きな加算回路 3 3が 1回路しかないため、 2個の加算回路を必要と した従来装置に比して演算時間が約 3 0 %短縮され高速化を図るこ とができると共に、 回路構成も簡単になる。
第 1 2図は本発明装置を適用したベク トル · プロセッサ ·ュニッ ト (VPU) の構成図を示す。 このべク トル . プロセッサ ·ュニッ トは 1チップの半導体集積回路である。 同図中、 べク トルュニッ ト (VU) 5 0内にはべク トルデータを格納するべク トルレジスタ 5 1、 スカラーデータを格納するスカラーレジスタ 5 2、 マスクデ一 タを格納するマスクレジスタ 5 3が設けられている。 またべク 卜几 ユニッ ト 5 0內の加算部 5 4、 乗算部 5 5、 除算部 5 6夫々は数値 デ一夕の加算、 乗算、 除算夫々のパイプライン処理を行なう。 マス ク部 5 7はべク トル演算の際のマスク処理を行なう。 データ出力 ラッチ 5 8及びデータ入力ラッチ 5 9夫々はデータの外部出力及び 外部よりのデータ入力を行なう。
コマンド、 ノくッファ 'ユニッ ト (C B U) 6 0には命令を格納す る命令バッファ (VC B) 6 1が設けられている。 この命令バッ ファ 6 1から読出された命合はコントロールュニッ ト (CU) 7 0 内のデコード部 7 1に供給される。 このデコード結果によりパイプ ライン制御部 7 2はベク トル,ユニッ ト 5 0内の加算部 5 4、 乗算 部 5 5、 除算部 5 6夫々のパイプライン制御を行なう。 スコアボー ド部 7 3は上記パイプライン制御で使用するべク トル ·ュニッ ト 5 0内の各種レジスタの使用権を管理している。
了ドレス ·ユニ ッ ト (AU) 8 0は VTR (ベク トル ' 卜ランス レ一シヨン ' レジスタ) 8 1 と TL B (トランスレーショ ン · ルツ クアサイ ド ·ノく ッファ) 8 2を用いて仮想了 ドレスから物理了 ドレ スへのァドレス変換を行なってチップの内部と外部とのァ ドレスの 受渡しを行なう。 バス · コン トロール 'ュニッ ト 8 5はチップの内 部と外部とのデータの受渡しを行なう。
第 7図に示す本発明の数値表現変換装置はべク トル ·ュニッ ト 5 0の加算部 5 4内に設けられ、 浮動小数点表現のべク ト儿データを 固定小数点表現に変換してべク トルデータの加算を行なうために用 いられる。 ベク トル - プロセッサ ·ュニッ 卜の如く規模が大きく高 速演算を行なう集積回路においては、 本発明装置により回路構成か 簡略化によってチップ面積を小さく、 演算を高速化することは非常 に重要である。 産業上の利用可能性
上述の如く、 本発明の数値表現変換装置によれば、 演算速度の高 速化及び回路構成の簡素化を図ることができ、 また本発明のべク 卜 ル · プロセッサ ·ュニッ 卜によれば、 演算速度の高速化と共にチッ プ面積を小さくでき、 実用上きわめて有用である。

Claims

請求の範囲
1. 入力された浮動小数点数の指数部 (E) の値から仮数部 ( M) の重みを判定する重み判定手段 ( 1 1 ) と、
入力された浮動小数点数の仮数部 (M) の値を前記判定されたそ の重みに従って桁シフ 卜させて小数点位置合せを行なう小数点位置 合せ手段 ( 1 2) と、
前記小数点位置合せにより得られた数値の整数部の値を負極性表 示に変換するとともに、 外部より与えられた切捨方向措合に基づき 小数点以下にはみだした数値を 2種類の切捨方向のいずれかで切捨 処理する丸め処理付き極性変換手段 (3 0) と、
入力された浮動小数点数の符号部 (S) の値に従って、 前記小数 点位置合せ手段により求められた数値の整数部又は前記丸め処理付 き極性変換手段により求められた数値のいずれかを選択出力する選 択手段 ( 1 6)
とを備え、 符号部 (S) 、 指数部 (E) 及び仮数部 (M) からな る浮動小数点表現の数値を固定小数点表現の数値に変換出力する機 能を有する数値表現変換装置において、
前記負極性数値生成手段 (3 0) は、
前記小数点位置合せ手段 ( 1 2) より得られる数値の整数部を ビッ ト反転するビッ ト反転手段 (3 1 ) と、
前記小数点位置合せ手段 ( 1 2) の桁シフ トにおいて小数点以下 にはみだした数値の有無を示す情報と外部より与えられた切捨方向 措令とに基づいて繰り上り数値の値を決定する繰り上り数値決定手 段 ( 32) と、
前記ビッ ト反転手段 (3 1 ) の出力数値と前記繰り上かり数値 i' 定手段 (3 2) で決定された繰り上り数値とを加算する加算手段 ( 3 3) と、 からなることを特徴とする数値表現変換装置。
2. 請求項 1記載の数値表現変換装置において、
前記繰り上がり数値決定手段 ( 3 2) をナン ド回路で構成したこ とを特徴とする数値表現変換装置。
3. 請求項 1記載の数値表現変換装置を用いて浮動小数点表現の ベタ トルデータを固定小数点表現に変換してべク トルデータの演算 を行なうことを特徴とするべク トル ' プロセッサ 'ユニッ ト。
4. 回路全体を単一の半導体チップ上に形成したことを特徴とす る請求項 3記載のべク トル ' プロセッサ 'ユニッ ト。
PCT/JP1992/000324 1991-03-19 1992-03-18 Numerical expression converter and vector processor using the same WO1992016891A1 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
KR1019920702897A KR960003044B1 (ko) 1991-03-19 1992-03-18 수치표현 변환장치 및 그것을 사용한 벡터ㆍ프로세서ㆍ유니트
DE69225654T DE69225654T2 (de) 1991-03-19 1992-03-18 Wandler fuer numerische ausdruecke und ihn benuetzender vektorprozessor
EP92906919A EP0530372B1 (en) 1991-03-19 1992-03-18 Numerical expression converter and vector processor using the same
US08/353,374 US5508948A (en) 1991-03-19 1994-12-02 Numeric representation converting apparatus and vector processor unit such apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP3/55183 1991-03-19
JP3055183A JPH04290122A (ja) 1991-03-19 1991-03-19 数値表現変換装置

Publications (1)

Publication Number Publication Date
WO1992016891A1 true WO1992016891A1 (en) 1992-10-01

Family

ID=12991603

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP1992/000324 WO1992016891A1 (en) 1991-03-19 1992-03-18 Numerical expression converter and vector processor using the same

Country Status (6)

Country Link
US (1) US5508948A (ja)
EP (1) EP0530372B1 (ja)
JP (1) JPH04290122A (ja)
KR (1) KR960003044B1 (ja)
DE (1) DE69225654T2 (ja)
WO (1) WO1992016891A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100443395B1 (ko) * 2000-11-13 2004-08-23 엔이씨 일렉트로닉스 가부시키가이샤 축소된 회로 규모로 고정 소수점 데이터를 생성하는 회로및 방법

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5619198A (en) * 1994-12-29 1997-04-08 Tektronix, Inc. Number format conversion apparatus for signal processing
GB9514695D0 (en) * 1995-07-18 1995-09-13 Sgs Thomson Microelectronics Combining data values
US6046746A (en) * 1996-07-01 2000-04-04 Sun Microsystems, Inc. Method and apparatus implementing high resolution rendition of Z-buffered primitives
US6115047A (en) * 1996-07-01 2000-09-05 Sun Microsystems, Inc. Method and apparatus for implementing efficient floating point Z-buffering
US5995992A (en) * 1997-11-17 1999-11-30 Bull Hn Information Systems Inc. Conditional truncation indicator control for a decimal numeric processor employing result truncation
US6965906B1 (en) * 1999-08-19 2005-11-15 National Semiconductor Corporation Converting negative floating point numbers to integer notation without two's complement hardware
US6415308B1 (en) * 1999-08-19 2002-07-02 National Semiconductor Corporation Converting negative floating point numbers to integer notation without two's complement hardware
US6907435B2 (en) * 2001-02-27 2005-06-14 Microsoft Corporation Converting numeric values to strings for optimized database storage
US6707865B2 (en) * 2001-07-16 2004-03-16 Qualcomm Incorporated Digital voltage gain amplifier for zero IF architecture
US6614369B1 (en) * 2002-03-05 2003-09-02 International Business Machines Corporation DC balanced 7B/8B, 9B/10B, and partitioned DC balanced 12B/14B, 17B/20B, and 16B/18B transmission codes
US7062525B1 (en) 2002-08-30 2006-06-13 Lsi Logic Corporation Circuit and method for normalizing and rounding floating-point results and processor incorporating the circuit or the method
JP2009099084A (ja) * 2007-10-19 2009-05-07 Kyocera Corp 変換装置
US7694112B2 (en) 2008-01-31 2010-04-06 International Business Machines Corporation Multiplexing output from second execution unit add/saturation processing portion of wider width intermediate result of first primitive execution unit for compound computation
US8196024B2 (en) * 2008-06-27 2012-06-05 Wi-Lan Inc. Demapper using floating-point representation of soft bits
US9104479B2 (en) 2011-12-07 2015-08-11 Arm Limited Apparatus and method for rounding a floating-point value to an integral floating-point value
US9722629B2 (en) * 2015-01-15 2017-08-01 Huawei Technologies Co., Ltd. Method and apparatus for converting from floating point to integer representation
GB2560766B (en) 2017-03-24 2019-04-03 Imagination Tech Ltd Floating point to fixed point conversion
GB2560830B (en) * 2017-03-24 2019-04-03 Imagination Tech Ltd Floating point to fixed point conversion
GB2556645B (en) 2017-03-24 2019-04-03 Imagination Tech Ltd Floating point to fixed point conversion

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6370333A (ja) * 1986-09-12 1988-03-30 Toshiba Corp デジタル演算装置
JPH0340129A (ja) * 1989-07-07 1991-02-20 Fujitsu Ltd 浮動小数点加算器

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5776634A (en) * 1980-10-31 1982-05-13 Hitachi Ltd Digital signal processor
US4700319A (en) * 1985-06-06 1987-10-13 The United States Of America As Represented By The Secretary Of The Air Force Arithmetic pipeline for image processing
US4815021A (en) * 1986-01-30 1989-03-21 Star Technologies, Inc. Multifunction arithmetic logic unit circuit
JP2509279B2 (ja) * 1988-02-16 1996-06-19 富士通株式会社 浮動小数点数一固定小数点数変換装置
US5161117A (en) * 1989-06-05 1992-11-03 Fairchild Weston Systems, Inc. Floating point conversion device and method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6370333A (ja) * 1986-09-12 1988-03-30 Toshiba Corp デジタル演算装置
JPH0340129A (ja) * 1989-07-07 1991-02-20 Fujitsu Ltd 浮動小数点加算器

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP0530372A4 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100443395B1 (ko) * 2000-11-13 2004-08-23 엔이씨 일렉트로닉스 가부시키가이샤 축소된 회로 규모로 고정 소수점 데이터를 생성하는 회로및 방법

Also Published As

Publication number Publication date
KR930700904A (ko) 1993-03-16
US5508948A (en) 1996-04-16
DE69225654D1 (de) 1998-07-02
EP0530372B1 (en) 1998-05-27
EP0530372A4 (en) 1995-11-22
JPH04290122A (ja) 1992-10-14
KR960003044B1 (ko) 1996-03-04
EP0530372A1 (en) 1993-03-10
DE69225654T2 (de) 1998-09-24

Similar Documents

Publication Publication Date Title
WO1992016891A1 (en) Numerical expression converter and vector processor using the same
JP2662196B2 (ja) 演算結果正規化方法及び装置
JP2884057B2 (ja) 数値フォーマット変換装置
JPH04127364A (ja) 積和算器
KR100465371B1 (ko) 덧셈 및 반올림 연산을 동시에 수행하는 부동 소수점alu 연산 장치
JPS62197823A (ja) 多能算術論理回路
US5790444A (en) Fast alignment unit for multiply-add floating point unit
JPH0343645B2 (ja)
US7016930B2 (en) Apparatus and method for performing operations implemented by iterative execution of a recurrence equation
JP2511527B2 (ja) 浮動小数点演算器
US10310809B2 (en) Apparatus and method for supporting a conversion instruction
KR100331846B1 (ko) 실수 연산기
JPH0546363A (ja) 除算器
JP2509279B2 (ja) 浮動小数点数一固定小数点数変換装置
JP4613992B2 (ja) Simd演算器、simd演算器の演算方法、演算処理装置及びコンパイラ
JPS62197868A (ja) パイプライン構成の直線近似変換回路
JP3286990B2 (ja) ディジタルシグナルプロセッサ
EP1041720B1 (en) Binary zero determination signal generating circuit
JP2856792B2 (ja) 浮動小数点数演算装置
JPS58186840A (ja) デ−タ処理装置
JP2002175179A (ja) 整数除算方法および整数除算装置
JPS59140560A (ja) 浮動小数点乗算器
JPH02171923A (ja) 浮動小数点加減算装置
JPH01232430A (ja) 演算回路
JPH03102519A (ja) 除算器

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): KR US

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): DE FR GB

WWE Wipo information: entry into national phase

Ref document number: 1992906919

Country of ref document: EP

WWP Wipo information: published in national office

Ref document number: 1992906919

Country of ref document: EP

WWG Wipo information: grant in national office

Ref document number: 1992906919

Country of ref document: EP