JPH0425577B2 - - Google Patents

Info

Publication number
JPH0425577B2
JPH0425577B2 JP57131922A JP13192282A JPH0425577B2 JP H0425577 B2 JPH0425577 B2 JP H0425577B2 JP 57131922 A JP57131922 A JP 57131922A JP 13192282 A JP13192282 A JP 13192282A JP H0425577 B2 JPH0425577 B2 JP H0425577B2
Authority
JP
Japan
Prior art keywords
data
type data
aligner
register
arithmetic unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP57131922A
Other languages
Japanese (ja)
Other versions
JPS5924342A (en
Inventor
Takeshi Watanabe
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP57131922A priority Critical patent/JPS5924342A/en
Publication of JPS5924342A publication Critical patent/JPS5924342A/en
Publication of JPH0425577B2 publication Critical patent/JPH0425577B2/ja
Granted legal-status Critical Current

Links

Classifications

    • 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
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/483Computations with numbers represented by a non-linear combination of denominational numbers, e.g. rational numbers, logarithmic number system or floating-point numbers

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Nonlinear Science (AREA)
  • General Engineering & Computer Science (AREA)

Description

【発明の詳細な説明】 発明の対象 本発明は情報処理システムの演算装置に係り、
特に整数型データを浮動小数点型データに変換す
るのに好適な演算装置に関するものである。
[Detailed Description of the Invention] Object of the Invention The present invention relates to an arithmetic device of an information processing system,
In particular, the present invention relates to an arithmetic unit suitable for converting integer type data to floating point type data.

従来技術 整数型データを浮動小数点型データに変換する
コンバート命令は、例えば、FORTRANでコー
デングされたプログラムでの型変換命令を効率的
に実行するために有効であることが知られてい
る。従来、その実現手段としてソフトウエアで行
う方法とハードウエアで行う方法があるが、ソフ
トウエアで行う方法は、型変換を数ステツプの命
令の組合せで実行しており、大規模な科学計算を
高速に処理したい場合には非効率的であり、明ら
かに不向きであつた。
Prior Art It is known that a conversion instruction for converting integer type data into floating point type data is effective for efficiently executing a type conversion instruction in a program coded in FORTRAN, for example. Conventionally, there are two ways to achieve this, one using software and the other using hardware. However, the method using software executes type conversion using a combination of instructions in several steps, making it possible to perform large-scale scientific calculations at high speed. This method was inefficient and clearly unsuitable when processing was desired.

ハードウエアで行う方法は、型変換を行う機械
語を用意し、直接ハードウエアで実行するという
もので、第1図にその構成例を示す。第1図はメ
インストレージ10より整数型データを汎用演算
ユニツト70に送り、そこで第1の処理を行い、
次に浮動小数点演算ユニツト80に送つて第2の
処理を行い、結果を浮動小数点レジスタ51に書
き込む構成である。以下、第1図の動作を詳述す
る。
The method using hardware involves preparing machine language for type conversion and directly executing it on hardware. An example of its configuration is shown in FIG. In FIG. 1, integer type data is sent from the main storage 10 to the general purpose arithmetic unit 70, where it is subjected to first processing.
The data is then sent to the floating point arithmetic unit 80 for second processing, and the result is written into the floating point register 51. The operation shown in FIG. 1 will be explained in detail below.

まず、メインストレージ10より読み出したデ
ータをストレージバス60にて送出し、アライナ
20によりアライナ・コントローラ21の制御下
で左づめになるようにシフトし、オペランドバス
61を経て汎用演算器70内のワークレジスタA
(WAR)30にラツチする。次に補数器32に
より、データが負の場合再補数化し、正数表現に
変換することで仮数部を作成し、レジスタ36経
由で第2のワークレジスタ(WCR)31にラツ
チする。レジスタ36は演算の中間結果を保持す
る回路である。
First, the data read from the main storage 10 is sent out via the storage bus 60, shifted by the aligner 20 so that it is left-justified under the control of the aligner controller 21, and transferred to the workpiece in the general-purpose arithmetic unit 70 via the operand bus 61. Register A
(WAR) Latch at 30. Next, if the data is negative, it is re-complemented by the complementer 32 and converted into positive number representation to create a mantissa part, which is latched into the second work register (WCR) 31 via the register 36. The register 36 is a circuit that holds intermediate results of operations.

次に、ワークレジスタ31の仮数部をシフタ3
3により右づめにシフトすると同時に、符号およ
び指数部を定数発生器35により発生し、バイト
アダー34、中間結果レジスタ36を経て再びワ
ークレジスタ31にラツチする。この場合、符号
は、元のデータが正数又は零の場合は“0”を、
負数の場合は“1”を発生し、指数部は(4E)16
を発生し、ワークレジスタ31に左づめしてラツ
チする、第3図は、このときのワークレジスタ3
1の状態を示したもので、斜線部は仮数部デー
タ、「・」印は小数点位置である。ここで、指数
部に定数(4E)16を発生させる理由は、第8図a
に示すように、整数型データの小数点位置を7バ
イトすなわち14桁左にシフトして、左から1バイ
ト目に置いたからである。さらに、浮動小数点型
データの指数部はEXCESS−64コードであるた
めである。
Next, the mantissa part of the work register 31 is transferred to the shifter 3.
At the same time, the sign and exponent parts are generated by the constant generator 35, passed through the byte adder 34 and the intermediate result register 36, and then latched into the work register 31 again. In this case, the code is “0” if the original data is a positive number or zero,
If it is a negative number, it generates “1” and the exponent part is (4E) 16
is generated and latched to the left in the work register 31. Figure 3 shows the work register 3 at this time.
1, the shaded area is the mantissa data, and the ``•'' mark is the decimal point position. Here, the reason for generating the constant (4E) 16 in the exponent part is as shown in Figure 8a.
This is because the decimal point position of the integer type data was shifted to the left by 7 bytes, or 14 digits, and placed at the 1st byte from the left, as shown in . Furthermore, this is because the exponent part of floating point type data is an EXCESS-64 code.

以上の処理を終えると、汎用演算ユニツト70
は中間経過をデータパス62を経て浮動小数点ユ
ニツト80に送出する。浮動小数点演算ユニツト
80は、符号および指数部をワークレジスタ
(FER)45に、仮数部をワークレジスタ
(FAR)40にラツチする。
After completing the above processing, the general-purpose arithmetic unit 70
sends intermediate progress via data path 62 to floating point unit 80. The floating point arithmetic unit 80 latches the sign and exponent part into a work register (FER) 45 and the mantissa part into a work register (FAR) 40.

浮動小数点演算ユニツト80では、最初のサイ
クルにおいて、補数器コントローラ49が受けと
つたデータのうち、符号および指数部はそのまま
レジスタ(FFR)46へ、仮数部は補数器41
を経由してレジスタ(FPAOR)42に転送する
よう指示する。次に、レジスタ42にラツチした
仮数部の上位に連続する“0”をデコーダ48に
より調べ、シフタ43により左に桁シフトして消
去すると同時に、指数部を左桁シフトした分だけ
減算し、データをポストノーマライズする。この
最終結果をレジスタ44を経由して浮動小数点レ
ジスタ51に書き込む。
In the floating point arithmetic unit 80, in the first cycle, the sign and exponent part of the data received by the complementer controller 49 are directly transferred to the register (FFR) 46, and the mantissa part is transferred to the complementer 41.
It instructs to transfer it to the register (FPAOR) 42 via . Next, the decoder 48 examines the consecutive "0"s in the upper part of the mantissa latched in the register 42, and the shifter 43 shifts the digits to the left and erases them. At the same time, the exponent part is subtracted by the amount shifted to the left, and the data is Post-normalize. This final result is written to floating point register 51 via register 44.

以上の処理をマシンサイクル毎にまとめたのが
第4図aである。第4図aから分かるように、従
来のハードウエアで行う方法では、演算ユニツト
間でのデータ送受による時間損失があり、高速化
するには限界がある。
FIG. 4a shows a summary of the above processing for each machine cycle. As can be seen from FIG. 4a, in the conventional method using hardware, there is a time loss due to data transmission and reception between arithmetic units, and there is a limit to speeding up the process.

発明の目的 本発明の目的は、上記従来技術の欠点を除去
し、係数型データを浮動小数型データに型変換を
行うコンバート命令を高速に処理する演算装置を
提供することにある。
OBJECTS OF THE INVENTION It is an object of the present invention to provide an arithmetic device that eliminates the drawbacks of the above-mentioned prior art and processes convert instructions for converting coefficient type data into floating point type data at high speed.

発明の総括的説明 本発明は、メモリからの読出し長がデータ長よ
りも長い場合において(以下の実施例では、読出
し長8バイト、データ長4バイト)、読み出した
データから整数データを取り出すアライナの際
に、予め指数部の長さだけ空けて左側につめてし
まうことにより、メモリから読み出された所定長
のデータから、整数型データをアライナにより切
り出す際に、同時に浮動小数点型のデータ(最初
のバイトは指数部、残りは仮数部)の形式として
しまうものである。
General Description of the Invention The present invention provides an aligner for extracting integer data from the read data when the read length from the memory is longer than the data length (in the following embodiment, the read length is 8 bytes and the data length is 4 bytes). When cutting out integer type data using an aligner from a predetermined length of data read from memory, by spacing the length of the exponent part in advance and packing it to the left, floating point type data (first The bytes are the exponent part and the rest are the mantissa part.

発明の実施例 第2図は本発明の一実施例で、アライナ20に
第1図の浮動小数点演算ユニツト80を直接結合
したものである。メインストレージ10より読み
出した整数型データをストレージバス60にて送
出し、アライナ20を経て左シフトするが、第2
図においては、アライナ・コントローラ21は該
整数型データを左から第2バイト目から詰めるよ
うにシフトする。この結果、整数型データが仮数
部用レジスタ(FAR)40に左づめにラツチさ
れる。補数器コントロール49は、レジスタ40
にラツチされた整数型データが正または零の場合
はそのまま補数器41を通し、負の場合には補数
器41で補数化し、整数表現に変換する。一方、
定数発生器50は符号および指数部の定数を発生
する。符号は、データが正又は零のとき“0”
を、負の場合は“1”を発生する。指数は
(48)16を発生する。ここで、指数に定数(48)16
を発生させる理由は、第3図bに示すように、4
バイトの整数型データを第2バイト目から左づめ
にした場合、第5バイト目にあつた小数点位置を
第1バイト目まで4バイトすなわち8桁だけ左シ
フトしたためである。
Embodiment of the Invention FIG. 2 shows an embodiment of the invention in which floating point arithmetic unit 80 of FIG. 1 is directly coupled to aligner 20. The integer type data read from the main storage 10 is sent out via the storage bus 60 and shifted to the left via the aligner 20.
In the figure, the aligner controller 21 shifts the integer type data so as to start from the second byte from the left. As a result, the integer type data is latched in the mantissa register (FAR) 40 in a left-aligned manner. Complementor control 49 is connected to register 40
If the integer type data latched is positive or zero, it passes through the complementer 41 as is, and if it is negative, it is complemented by the complementer 41 and converted into an integer representation. on the other hand,
Constant generator 50 generates constants for the sign and exponent parts. The sign is “0” when the data is positive or zero.
If it is negative, "1" is generated. The exponent yields (48) 16 . where the exponent is a constant (48) 16
The reason for this is, as shown in Figure 3b, 4
This is because when the integer type data of the bytes is left justified from the second byte, the decimal point position in the fifth byte is shifted to the left by 4 bytes, that is, 8 digits, to the first byte.

ポストノーマライズ処理は第1図の場合と同様
であり、レジスタ42にラツチした仮数部の上位
に連続する0をデコーダ48により調べ、その数
分だけシフタ43で左に桁シフトして消去すると
同時に、レジスタ46にラツチされている指数部
を該左桁シフトした分だけ演算器47で減算す
る。このようにして得られた最終結果は、レジス
タ44を経由して浮動小数点レジスタ51に書き
込まれる。以上の処理をまとめたのが第4図bで
ある。
The post-normalization process is the same as in the case of FIG. 1, and the decoder 48 checks the consecutive 0s in the upper part of the mantissa latched in the register 42, and the shifter 43 shifts the digits to the left by that number and erases them. An arithmetic unit 47 subtracts the exponent part latched in the register 46 by the amount shifted by the left digit. The final result thus obtained is written to floating point register 51 via register 44. FIG. 4b summarizes the above processing.

発明の効果 以上の説明から明らかな如く、本発明によれ
ば、メモリから読み出された所定長のデータか
ら、整数型のデータをアライナにより切り出す際
に、同時に浮動小数点型のデータ(最初のバイト
は指数部、残りは仮数部)の形式としてしまうこ
とによつて、処理速度の向上を図るという効果が
ある。
Effects of the Invention As is clear from the above description, according to the present invention, when integer type data is cut out by an aligner from data of a predetermined length read from memory, floating point type data (first byte is an exponent part and the rest is a mantissa part), this has the effect of improving processing speed.

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

第1図は従来の構成例を示す図、第2図は本発
明の一実施例を示す図、第3図は従来技術と本発
明におけるレジスタの内容を比較する図、第4図
は従来技術と本発明の動作シーケンスを比較する
図である。 10……メインストレージ、20……アライ
ナ、21……アライナ・コントローラ、40,4
5……ワークレジスタ、41……補数器、42,
44,46……レジスタ、43……シフタ、47
……演算器、48……デコーダ、49……補数器
コントローラ、50……定数発生器。
FIG. 1 is a diagram showing a conventional configuration example, FIG. 2 is a diagram showing an embodiment of the present invention, FIG. 3 is a diagram comparing the contents of registers in the prior art and the present invention, and FIG. 4 is a diagram showing the conventional technology. FIG. 4 is a diagram for comparing the operation sequence of the present invention. 10... Main storage, 20... Aligner, 21... Aligner controller, 40,4
5...Work register, 41...Complementer, 42,
44, 46...Register, 43...Shifter, 47
... Arithmetic unit, 48 ... Decoder, 49 ... Complement controller, 50 ... Constant generator.

Claims (1)

【特許請求の範囲】[Claims] 1 整数型データを浮動小数点型データに変換す
る演算装置において、アライナと、メモリから読
み出された第1の長さのデータの中に含まれる該
第1の長さよりも短い第2の長さの整数型データ
を指数部の長さだけ空けて左側につめるように前
記アライナ制御する論理制御部と、指数部の長さ
だけ空けて左側につめられたデータのうち、指数
部の部分を除くデータを仮数部とし、該仮数部の
データが負の場合には補数化を行う補数器と、符
号および指数部の定数を発生する定数発生器と、
前記補数器からの仮数部のデータの上位に連続し
て並ぶ“0”を消すため該データをシフトするシ
フタと、演算器と、前記データの上位に連続して
並ぶ“0”を消すためデータをシフトした桁数だ
け前記定数発生部で発生した指数部を補正するよ
うに前記演算器を制御する論理制御部とを有する
ことを特徴とする演算装置。
1. In an arithmetic unit that converts integer type data to floating point type data, an aligner and a second length shorter than the first length included in the first length data read from memory a logic control unit that controls the aligner so that the integer type data is packed on the left side with a space equal to the length of the exponent part; and a logic control unit that controls the aligner so that the integer type data of a complementer that uses data as a mantissa part and performs complementation when the data in the mantissa part is negative; a constant generator that generates constants for the sign and exponent part;
a shifter for shifting the data of the mantissa from the complementer in order to erase the consecutive "0's" arranged in the upper part of the data, an arithmetic unit, and data for erasing the "0" consecutively arranged in the upper part of the data. and a logic control section that controls the arithmetic unit so as to correct the exponent part generated by the constant generation section by the number of digits shifted by the number of digits shifted.
JP57131922A 1982-07-30 1982-07-30 Arithmetic device Granted JPS5924342A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP57131922A JPS5924342A (en) 1982-07-30 1982-07-30 Arithmetic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP57131922A JPS5924342A (en) 1982-07-30 1982-07-30 Arithmetic device

Publications (2)

Publication Number Publication Date
JPS5924342A JPS5924342A (en) 1984-02-08
JPH0425577B2 true JPH0425577B2 (en) 1992-05-01

Family

ID=15069331

Family Applications (1)

Application Number Title Priority Date Filing Date
JP57131922A Granted JPS5924342A (en) 1982-07-30 1982-07-30 Arithmetic device

Country Status (1)

Country Link
JP (1) JPS5924342A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6123232A (en) * 1984-07-11 1986-01-31 Nec Corp Arithmetic unit

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5285437A (en) * 1976-01-10 1977-07-15 Agency Of Ind Science & Technol Converter of data form
JPS55150042A (en) * 1979-05-10 1980-11-21 Matsushita Electric Ind Co Ltd Code converter
JPS5755447A (en) * 1980-09-20 1982-04-02 Fujitsu Ltd Data converting circuit

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5285437A (en) * 1976-01-10 1977-07-15 Agency Of Ind Science & Technol Converter of data form
JPS55150042A (en) * 1979-05-10 1980-11-21 Matsushita Electric Ind Co Ltd Code converter
JPS5755447A (en) * 1980-09-20 1982-04-02 Fujitsu Ltd Data converting circuit

Also Published As

Publication number Publication date
JPS5924342A (en) 1984-02-08

Similar Documents

Publication Publication Date Title
US4172287A (en) General purpose data processing apparatus for processing vector instructions
Tucker Emulation of large systems
Hassitt et al. Implementation of a high level language machine
EP0134000A2 (en) Information processing system
KR970022770A (en) Data processing device
US4413326A (en) Floating point division control
JPH0425577B2 (en)
JPS58182754A (en) Arithmetic processor
JPS6314378B2 (en)
US3937941A (en) Method and apparatus for packed BCD sign arithmetic employing a two's complement binary adder
ES8606686A1 (en) Apparatus and method for converting a number in binary format to a decimal format.
GB2410097A (en) Constant generation in floating point processing
JPH0774989B2 (en) Code conversion circuit
Knuth Runcible—algebraic translation on a limited computer
EP0265972B1 (en) Control of the program counter used in a pipelined computer
JPS5856040A (en) Data processor
JPS6120134A (en) Root calculator
JP2510691B2 (en) Arithmetic processing method
JPS58205253A (en) Arithmetic device
JPH01217622A (en) Conversion system for expression of floating point
JP3139011B2 (en) Fixed-point processor
JP2624738B2 (en) Rounding method
JPS59139443A (en) Code conversion system
JPS6149234A (en) Multiplier circuit for floating point
JPS6057603B2 (en) arithmetic processing unit