JPS63223825A - Data type converting circuit - Google Patents

Data type converting circuit

Info

Publication number
JPS63223825A
JPS63223825A JP62055165A JP5516587A JPS63223825A JP S63223825 A JPS63223825 A JP S63223825A JP 62055165 A JP62055165 A JP 62055165A JP 5516587 A JP5516587 A JP 5516587A JP S63223825 A JPS63223825 A JP S63223825A
Authority
JP
Japan
Prior art keywords
absolute value
signal
data
sign
conversion circuit
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.)
Pending
Application number
JP62055165A
Other languages
Japanese (ja)
Inventor
Takeshi Kamimura
健 上村
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 Corp
Original Assignee
NEC Corp
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 Corp filed Critical NEC Corp
Priority to JP62055165A priority Critical patent/JPS63223825A/en
Publication of JPS63223825A publication Critical patent/JPS63223825A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To increase the processing speed with a data type converting circuit by converting the integer data into an absolute value expressing form that can be treated by a data drive type processor when the integer data is converted into the floating point data. CONSTITUTION:A signal S101 showing an expression discriminating flag which discrimination whether the expressing form of the integer data is equal to the complement expression of '2' or the absolute value expression is supplied to a register 11 together with a signal S102 showing a code of the integer data and a signal S103 showing the absolute value. The output of the register 11 is supplied to a 1st converting circuit 12 and the integer data expressed in a complement for mis converted into the absolute value expression. While a 2nd converting circuit 13 converts the integer data into a floating point expression form. Thus a code S110 of a mantissa part and a code S111 of an exponent part are delivered together with the absolute value S112 of the mantissa part and the absolute value S113 of the exponent part. The signals of these codes and values are delivered selectively by a flip-flop 10 via multiplexers 14 and 15.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、データ駆動型処理装置におけるデータ型変換
回路に関するものであり、特に整数データを高速に浮動
小数点データに変換するデータ型変換回路に関するもの
である。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a data type conversion circuit in a data-driven processing device, and particularly to a data type conversion circuit that converts integer data into floating point data at high speed. It is something.

〔従来の技術〕[Conventional technology]

第4図は整数データの浮動小数点データへの変換を従来
方式によって行うデータ駆動型処理装置を示すもので、
’C0MPCON  5PRING゛83”の464ペ
ージから467ページに、右下、天満等により「データ
フローイメージプロセッサ」と題して発表された論文に
記載されているデータ駆動型処理装置のブロック図であ
る。これは、演算を実行するプロセッシングユニット(
PU)41と、データの行き先アドレスを貯えておくリ
ンクテーブルメモリ (LT)42と、命令を貯えてお
くファンクションテーブルメモリ (FT)43と、二
項演算の片側の入力データを一時貯えておくデータメモ
リ (DM)44と、データを次のパイプラインステー
ジに流せないときに一時貯えておくキューメモリ (Q
M)45と、外部バスへのデータの出力制御回路(QC
)46と、外部バスからのデータの入力制御回路(IC
)47により構成される。各ブロック41〜47はパイ
プラインクロックに同期してその入力データを一時保持
しておく入力レジスタを含み、全体がパイプラインクロ
ックに同期して動作する。
Figure 4 shows a data-driven processing device that converts integer data into floating point data using a conventional method.
At the bottom right, on pages 464 to 467 of ``C0MPCON 5PRING'' 83, there is a block diagram of a data-driven processing device described in a paper published by Tenma et al. entitled ``Data Flow Image Processor''. This is the processing unit (
PU) 41, a link table memory (LT) 42 that stores the destination address of data, a function table memory (FT) 43 that stores instructions, and data that temporarily stores input data for one side of a binary operation. Memory (DM) 44 and queue memory (Q) for temporarily storing data when it cannot be passed to the next pipeline stage.
M) 45 and the data output control circuit (QC) to the external bus.
) 46 and an input control circuit (IC) for data from an external bus.
) 47. Each block 41 to 47 includes an input register that temporarily holds its input data in synchronization with the pipeline clock, and the entire block operates in synchronization with the pipeline clock.

入力制御回路47は外部より入力される信号8406の
一部であるモジュール番号の値を参照し、リンクテーブ
ルメモリ42または出力制御回路46に信号5406を
振り分け、出力制御回路46へは信号5407が与えら
れる。リンクテーブルメモリ42は信号5401の一部
であるデータ識別番号をアドレスとしてアクセスされ、
次の行き先の識別番号を読み出して旧識側番号と置き換
えると同時に演算番号を読み出し、信号5402を生成
する。ファンクションテーブルメモリ43は信号S 4
02の一部である演算番号をアドレスとしてアクセスさ
れ、演算の種類を示すファンクションコード及び演算に
必要なパラメータを読み出し、信号5403を生成する
The input control circuit 47 refers to the value of the module number which is a part of the signal 8406 inputted from the outside, and distributes the signal 5406 to the link table memory 42 or the output control circuit 46, and the signal 5407 is given to the output control circuit 46. It will be done. The link table memory 42 is accessed using the data identification number that is part of the signal 5401 as an address.
The identification number of the next destination is read out and replaced with the old number, and at the same time the operation number is read out and a signal 5402 is generated. The function table memory 43 receives the signal S4
It is accessed using the operation number that is part of 02 as an address, reads out a function code indicating the type of operation and parameters necessary for the operation, and generates a signal 5403.

データメモリ44には二項演算のペアとなるデータのう
ち、先に到着したものが貯えられる。信号5403のデ
ータとペアになるデータが既にデータメモリ44内に貯
えられている場合、それを読み出し信号5404を生成
する。ペアとなるデータがまだ到着していない場合はそ
のデータを書き込む。またデータメモリ44には定数演
算に必要な定数を貯えることもできる。キューメモリ4
5には信号が到着順に貯えられ、出力制御回路46また
はプロセッシングユニット41が空き次第、読み出され
て、出力制御回路46へは信号5405がまたプロセッ
シングユニット41へは信号5409が送り込まれる。
The data memory 44 stores the data that arrives first among the data forming a pair of binary operations. If data paired with the data of signal 5403 is already stored in data memory 44, it is read out and signal 5404 is generated. If the paired data has not arrived yet, write that data. Further, the data memory 44 can also store constants necessary for constant calculations. Cue memory 4
5 stores the signals in the order of arrival, and as soon as the output control circuit 46 or the processing unit 41 is free, they are read out, and the signal 5405 and the signal 5409 are sent to the output control circuit 46 and the processing unit 41, respectively.

プロセッシングユニット41は2つの入力データ値に対
して、ファンクションコードに従い所定の演算を実行し
、結果をリンクテーブル42に出力する。
The processing unit 41 executes a predetermined operation on the two input data values according to the function code, and outputs the result to the link table 42.

なお、出力制御回路46からは外部バスへのデータとし
て信号5408が送出される。
Note that a signal 5408 is sent from the output control circuit 46 as data to the external bus.

このデータ駆動型処理装置では整数データの表現形式と
して絶対値表現を用いている。
This data-driven processing device uses absolute value representation as the representation format for integer data.

またプロセッシングユニット41は単精度の固定小数点
演算回路しか持っていないため、浮動小数点演算はソフ
トウェアにより実行される。このとき仮数部、指数部に
対する処理内容は全く異なるため、仮数部、指数部をそ
れぞれ1ワードとし、処理を個々に記述するという方法
が採られている。
Furthermore, since the processing unit 41 has only a single-precision fixed-point arithmetic circuit, floating-point arithmetic is executed by software. At this time, since the processing contents for the mantissa and exponent parts are completely different, a method is adopted in which each of the mantissa and exponent parts is made into one word and the processing is described individually.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

しかし、上述のデータ駆動型処理装置において、整数デ
ータの浮動小数点データへの変換を行うのに、従来はソ
フトウェアを用いて変換しなければならず、メモリアク
セスのオーバーヘッドが時間的にも容量的に増大してし
まう。
However, in the data-driven processing device described above, conventionally, in order to convert integer data to floating-point data, software must be used to perform the conversion, and the overhead of memory access increases in terms of time and capacity. It will increase.

すなわち、例えば画像データのような整数データに対し
て浮動小数点演算を施す場合、まずこれをユーザがソフ
トウェアにより浮動小数点データに変換しておく必要が
ある。この処理は以下の4演算から構成される。
That is, when performing a floating point operation on integer data such as image data, the user must first convert it into floating point data using software. This process consists of the following four operations.

(1)プライオリティエンコーディングによりシフト数
を求める。
(1) Find the number of shifts by priority encoding.

(2)シフト数データをコピー。(2) Copy shift number data.

(3)データのシフトにより仮数部を求める。(3) Find the mantissa by shifting the data.

(4)データのビット長から1″を減じた数よりシフト
数を減算し指数部を求める。
(4) Subtract the number of shifts from the number obtained by subtracting 1'' from the data bit length to obtain the exponent part.

第4図のデータ駆動型処理装置において、実際にこれら
各演算を実行するのはプロセッシングユニット41であ
るから、変換を終了するまでに各データはモジュール4
1〜47の間のリングを4周しなければならない。よっ
てデータの変換に膨大な処理時間を要するという欠点が
あった。
In the data-driven processing device shown in FIG. 4, since it is the processing unit 41 that actually executes each of these operations, each data is transferred to the module 4 by the time the conversion is completed.
You must go around the rings between 1 and 47 four times. Therefore, there is a drawback that data conversion requires a huge amount of processing time.

また、整数データ1ワードは浮動小数点データ2ワード
に相当することから、これを外部メモリ上から入力する
場合、データ量も倍増してしまう。
Furthermore, since one word of integer data corresponds to two words of floating point data, if this is input from an external memory, the amount of data will double.

本発明の目的は、整数データを浮動小数点データへ変換
するという処理を、データ駆動型処理装置において高速
に実行し得ると共に、更に、整数データの表現形式に関
し、与えられた整数データが2の補数で表現されたもの
の場合であっても、その整数データをデータ駆動型処理
装置で扱うことのできる絶対値表現形式に変換して上述
の処理を行えるデータ型変換回路を提供することにある
An object of the present invention is to be able to perform the process of converting integer data to floating point data at high speed in a data-driven processing device, and further, regarding the representation format of integer data, it is an object of the present invention to An object of the present invention is to provide a data type conversion circuit that can perform the above processing by converting integer data into an absolute value expression format that can be handled by a data-driven processing device, even if the data is expressed as .

〔問題点を解決するための手段〕[Means for solving problems]

本発明は、データ駆動型処理装置におけるデータ型変換
回路であって、 2の補数表現の整数データを絶対値表現に変換する第1
の変換回路と、 絶対値表現の整数データの符号を表す信号と、絶対値を
表す信号が入力され、入力信号で表される整数値を浮動
小数点表現に変換し、仮数部の符号と絶対値、指数部の
符号と絶対値を出力する第2の変換回路と、 この第2の変換回路の出力から仮数部の符号及びその絶
対値と、指数部の符号及びその絶対値を選択して外部回
路へ出力する選択手段とを有することを特徴としている
The present invention relates to a data type conversion circuit in a data-driven processing device, comprising: a first data type conversion circuit for converting integer data in two's complement representation to absolute value representation;
A conversion circuit inputs a signal representing the sign of integer data in absolute value representation and a signal representing the absolute value, converts the integer value represented by the input signal to floating point representation, and converts the sign and absolute value of the mantissa part. , a second conversion circuit that outputs the sign and absolute value of the exponent part, and selects the sign and absolute value of the mantissa part and the sign and absolute value of the exponent part from the output of this second conversion circuit and outputs the sign and absolute value of the exponent part. It is characterized by having a selection means for outputting to the circuit.

〔作用〕[Effect]

本発明のデータ型変換回路における第1及び第2の変換
回路は、第1の変換回路では2の補数表現の整数データ
の絶対値表現への変換が行われ、第2の変換回路では浮
動小数点表現への変換が行われる。浮動小数点表現への
変換は仮数部の符号。
The first and second conversion circuits in the data type conversion circuit of the present invention are such that the first conversion circuit converts integer data in two's complement representation into absolute value representation, and the second conversion circuit converts floating point data into absolute value representation. Conversion to representation takes place. Conversion to floating point representation is based on the sign of the mantissa.

指数部の符号、仮数部の絶対値及び指数部の絶対値の4
つを用いて行われ、これらが供給される選択手段では、
仮数部の符号及びその絶対値の組と、指数部の符号及び
その絶対値の組を選択的に出力する。これにより、整数
データの浮動小数点データへの変換が行われる。変換は
従来のソフトウェアを用いる場合に比し高速に実行でき
、かつ2の補数表現の場合であっても絶対値表現形式に
変換して処理され、第4図のデータ駆動型処理装置にお
いて、本発明の回路をプロセッシングユニットに含めれ
ば、各整数データはプロセッシングユニットを1回通過
するだけで浮動小数点データへの変換が終了する。
The sign of the exponent, the absolute value of the mantissa, and the absolute value of the exponent.
In the selection means that is carried out using one and supplied with the
A set of the sign of the mantissa part and its absolute value, and a set of the sign of the exponent part and its absolute value are selectively output. This converts integer data to floating point data. Conversion can be performed faster than when using conventional software, and even in the case of two's complement representation, it is converted to absolute value representation format and processed. When the circuit of the invention is included in a processing unit, each integer data only needs to pass through the processing unit once to complete the conversion to floating point data.

〔実施例〕〔Example〕

次に、本発明について図面を参照して説明する。 Next, the present invention will be explained with reference to the drawings.

第1図は本発明の一実施例であるデータ型変換回路を示
すブロック図である。これは第4図のデータ駆動型処理
装置のブロック図においては、プロセッシングユニット
41の中に1モジユールとして含まれるべきものであり
、パイプラインクロックに同期して動作する例である。
FIG. 1 is a block diagram showing a data type conversion circuit according to an embodiment of the present invention. In the block diagram of the data-driven processing device shown in FIG. 4, this should be included as one module in the processing unit 41, and is an example of operation in synchronization with the pipeline clock.

本実施例のデータ型変換回路は、第1図に示すように、
フリップフロップ10と、レジスタ11と、第1の変換
回路12と、第2の変換回路13と、2つのマルチプレ
クサ14.15を備えている。
The data type conversion circuit of this embodiment is as shown in FIG.
It includes a flip-flop 10, a register 11, a first conversion circuit 12, a second conversion circuit 13, and two multiplexers 14 and 15.

フリップフロップ10は、パイプラインクロックを入力
信号S 100として加えられるフリップフロップで、
その入力毎に値が反転する信号5104を出力し、これ
を制御信号としてレジスタ11と各マルチプレクサ14
.15に与えるようになっている。
The flip-flop 10 is a flip-flop to which a pipeline clock is applied as an input signal S100.
A signal 5104 whose value is inverted for each input is output, and this is used as a control signal for the register 11 and each multiplexer 14.
.. It is designed to be given to 15 people.

レジスタ11には、整数データの表現形式が2の補数表
現か絶対値表現かを識別する表現識別フラグを表す信号
5101と、整数データの正負の符号を表す信号510
2と、絶対値を表す信号5103が供給される。このレ
ジスタ11は、このような各情報から成る入力信号を取
り込み、保持するレジスタで、その取り込み、保持は、
フリップフロップ10により制御され、制御信号として
加えられるフリップフロップ10からの信号5104が
、0”か“1″かに応じて行われる。
The register 11 includes a signal 5101 representing an expression identification flag for identifying whether the representation format of integer data is two's complement representation or absolute value representation, and a signal 510 representing the positive or negative sign of the integer data.
2 and a signal 5103 representing the absolute value are supplied. This register 11 is a register that captures and holds input signals consisting of such various information, and the capture and holding are as follows:
It is controlled by the flip-flop 10 and is performed depending on whether the signal 5104 from the flip-flop 10, which is added as a control signal, is "0" or "1".

レジスタ11からは表現識別フラグを表す信号5101
、整数データの符号を表す信号5102)絶対値を表す
信号5103が、各々の信号5105、信号5106、
信号5107として出力され、これらが第1の変換回路
12に入力として与えられる。
A signal 5101 representing an expression identification flag is output from the register 11.
, signal 5102 representing the sign of integer data) signal 5103 representing the absolute value, respectively signal 5105, signal 5106,
These signals are outputted as signals 5107 and given as inputs to the first conversion circuit 12.

この変換回路12は選択的な変換回路であって、整数デ
ータが2の補数表現の場合には絶対値表現に変換して出
力する。入力が絶対値表現のものであるときは、変換は
行う必要はない。表現形式がどちらのものかは、表現識
別フラグが0”か“1″かで識別される。
This conversion circuit 12 is a selective conversion circuit, and when integer data is expressed in two's complement, it is converted into absolute value expression and output. When the input is in absolute value representation, no conversion is necessary. Which expression format is used is identified by whether the expression identification flag is "0" or "1".

第1の変換回路12からの絶対値表現の整数データの符
号を表す信号8108と、絶対値を表す信号5109は
、第2の変換回路13に与えられる。この第2の変換回
路13は、第1の変換回路12の出力信号で表される整
数値を仮数部と指数部とで表される浮動小数点表現にす
るもので、仮数部の符号を表す信号5110と、指数部
の符号を表す信号5111と、仮数部の絶対値を表す信
号5112と、指数部“の絶対値を表す信号5113を
出力し、これらを選択手段としてのマルチプレクサ14
.15に与えるようになっている。
A signal 8108 representing the sign of integer data expressed in absolute value from the first conversion circuit 12 and a signal 5109 representing the absolute value are provided to the second conversion circuit 13. This second conversion circuit 13 converts the integer value represented by the output signal of the first conversion circuit 12 into a floating point representation represented by a mantissa part and an exponent part, and a signal representing the sign of the mantissa part. 5110, a signal 5111 representing the sign of the exponent part, a signal 5112 representing the absolute value of the mantissa part, and a signal 5113 representing the absolute value of the exponent part.
.. It is designed to be given to 15 people.

ここで、仮数部の符号を表す信号5110が選択され信
号5114として外部回路へ出力される場合は、その絶
対値を表す信号5112が信号5115として出力され
るように、一方、指数部の符号を表す信号S 111が
信号5114として出力されるときは、その絶対値を表
す信号5113が選択され信号5115として外部回路
へ出力されるよう、図示の例では、仮数部の符号を表す
信号5110と指数部の符号を表す信号5111とが第
1のマルチプレクサ14に対して供給されると共に、仮
数部の絶対値を表す信号5112と指数部の絶対値を表
す信号5113とが第2のマルチプレクサ15に対して
供給されており、これら第1及び第2のマルチプレクサ
14.15がフリップフロップ10から制御信号として
加えられる信号5104によって制御されるようになっ
ている。
Here, when the signal 5110 representing the sign of the mantissa part is selected and outputted to the external circuit as the signal 5114, the sign of the exponent part is selected so that the signal 5112 representing its absolute value is outputted as the signal 5115. In the illustrated example, the signal 5110 representing the sign of the mantissa and the exponent are selected so that when the representing signal S 111 is output as the signal 5114, the signal 5113 representing the absolute value is selected and output to the external circuit as the signal 5115. A signal 5111 representing the sign of the mantissa part is supplied to the first multiplexer 14, and a signal 5112 representing the absolute value of the mantissa part and a signal 5113 representing the absolute value of the exponent part are supplied to the second multiplexer 15. The first and second multiplexers 14 and 15 are controlled by a signal 5104 applied as a control signal from the flip-flop 10.

このように、本実施例では、データ駆動型処理装置にお
いて、パイプラインクロックを入力し、その入力毎に値
が反転する制御信号5104を出力するフリップフロッ
プ10と、 このフリップフロップ10からの信号5104により、
整数データの表現形式を識別する表現識別フラグと、絶
対値表現された整数データの正負を表す符号と、整数デ
ータ値とから成る入力信号を取り込み、保持するレジス
タ11と、 このレジスタ11の出力値を入力し、もし2の補数表現
の整数データであればこれを絶対値表現に変換する第1
の変換回路12と、 第1の変換回路12からの出力信号で表される整数値を
浮動小数点表現に変換し、仮数部の符号と絶対値、指数
部の符号と絶対値を出力する第2の変換回路13と、 フリップフロップ10からの信号5104により、第2
の変換回路13より出力される仮数部の符号と指数部の
符号から1つを選択し、外部回路へ出力する第1のマル
チプレクサ14と、 フリップフロップ10からの信号S 104により、第
2の変換回路13より出力される仮数部の絶対値と指数
部の絶対値から1つを選択し、外部回路へ出力する第2
のマルチプレクサ15を有する。
As described above, in this embodiment, the data-driven processing device includes a flip-flop 10 that receives a pipeline clock and outputs a control signal 5104 whose value is inverted each time it is input, and a signal 5104 from this flip-flop 10. According to
A register 11 that takes in and holds an input signal consisting of an expression identification flag for identifying the expression format of integer data, a sign indicating the sign indicating the sign of the integer data expressed as an absolute value, and an integer data value; and an output value of this register 11. is input, and if it is integer data in two's complement representation, the first step is to convert it to absolute value representation.
a conversion circuit 12, and a second conversion circuit 12 that converts the integer value represented by the output signal from the first conversion circuit 12 into floating point representation, and outputs the sign and absolute value of the mantissa part and the sign and absolute value of the exponent part. The second conversion circuit 13 and the signal 5104 from the flip-flop 10
The first multiplexer 14 selects one of the sign of the mantissa and the sign of the exponent output from the conversion circuit 13 and outputs it to an external circuit, and the signal S 104 from the flip-flop 10 performs the second conversion. A second circuit selects one of the absolute value of the mantissa and the absolute value of the exponent output from the circuit 13 and outputs it to an external circuit.
multiplexer 15.

更に、第2図及び第3図をも参照しつつ本実施例につい
て具体的に説明する。
Furthermore, this embodiment will be specifically described with reference to FIGS. 2 and 3.

ここではデータのビット長が16ビツトの場合を例にと
って説明する。このとき入力となる整数にの値の範囲は
、2の補数表現ならば、 −32768≦に≦32767 絶対値表現ならば、 −65535≦に≦65535 で4ある。
Here, an example will be explained in which the data bit length is 16 bits. At this time, the range of values for the input integer is -32768≦≦32767 in two's complement representation, and -65535≦≦65535 in absolute value representation.

次に浮動小数fは次のように表現されるものとする。Next, it is assumed that the floating point number f is expressed as follows.

f =mx 2” m、eは各々仮数部、指数部を表す整数であり、次の範
囲内の値をとる。
f = mx 2'' m and e are integers representing the mantissa and exponent parts, respectively, and take values within the following ranges.

8000H≦II m II≦FFFFH0000T(
≦II e II≦7 F F F Hここで、記号H
は16進整数、記号11)1は絶対値を表す。
8000H≦II m II≦FFFFH0000T(
≦II e II≦7 F F F H Here, symbol H
is a hexadecimal integer, symbol 11) 1 represents the absolute value.

II m IIの最上位ビットが小数点以下第1位を示
す。またr=o、oの場合は次のような特殊表現を用い
るものとする。
II m The most significant bit of II indicates the first decimal place. Further, in the case of r=o, o, the following special expression shall be used.

m−0000H e=−7FFFH さて、第1図の回路は信号S 100. S 101.
 S 102゜5103を入力とする。既述した如く、
各入力はパイプラインクロック、整数データの表現形式
が2の補数表現か絶対値表現かを識別する表現識別フラ
グ、整数データの符号、絶対値を表す。なお、ここでは
表現識別フラグは“0”のとき絶対値表現入力、“1”
のとき2の補数表現入力を表すものとする。
m-0000H e=-7FFFH Now, the circuit of FIG. 1 has a signal S100. S101.
S 102°5103 is input. As already mentioned,
Each input represents a pipeline clock, an expression identification flag for identifying whether the expression format of integer data is two's complement expression or absolute value expression, and the sign and absolute value of integer data. In addition, here, when the expression identification flag is “0”, it is an absolute value expression input, and “1”
When , it represents input in two's complement representation.

フリップフロップ10は信号S 100のパイプライン
クロックを入力とし、このクロックが入力される毎に値
が反転する信号S 104を生成し、レジスタ11.マ
ルチプレクサ14.マルチプレクサ15に対して出力す
る。
Flip-flop 10 receives the pipeline clock of signal S 100 as input, generates signal S 104 whose value is inverted every time this clock is input, and registers 11. Multiplexer 14. It is output to multiplexer 15.

レジスタ11は信号5104の値が“0”ならば入力信
号S 101. S 102. S 103を取り込み
、“1″であれば取り込まずに現在の値を保持する。こ
れは外部回路のバス幅の制約により、第1図の回路の処
理結果を外部回路へ出力するのに2クロツク時間を要す
るため、2クロツクに1回以上の顔度でデータが入力さ
れることを禁するためである。
If the value of the signal 5104 is "0", the register 11 receives the input signal S101. S102. S103 is fetched, and if it is "1", the current value is held without being fetched. This is because it takes two clocks to output the processing results of the circuit in Figure 1 to the external circuit due to the bus width constraints of the external circuit, so data is input more than once every two clocks. This is to prohibit

第1の変換回路12はレジスタ11の出力信号5105
゜S 106. S 107を入力とし、絶対値表現さ
れた整数データの符号と絶対値を各々信号3108. 
S 109として出力する。
The first conversion circuit 12 outputs the output signal 5105 of the register 11.
゜S 106. S 107 is input, and the sign and absolute value of integer data expressed as absolute values are input as signals 3108 .
Output as S109.

ここで、第2図は第1図の回路にモジュールとして含ま
れている第1の変換回路12の一具体例を示すブロック
図であり、以下これを説明する。第2図中のOH″、”
7FFFH″’、”8000H”は各々16進定数を表
している。第2図において、この第1の変換回路は信号
S 200. S 201 、 S 202を入力とす
る。各信号は第1図の信号S 105. S 106゜
5107に該当し、各々表現識別フラグ、整数データの
符号、絶対値を表す。既に述べたように、表現識別フラ
グは“0”のとき絶対値表現、“1”のとき2の補数表
現を表すものとする。
Here, FIG. 2 is a block diagram showing a specific example of the first conversion circuit 12 included as a module in the circuit of FIG. 1, which will be explained below. OH'','' in Figure 2
7FFFH"' and "8000H" each represent a hexadecimal constant. In FIG. 2, this first conversion circuit receives signals S 200 , S 201 and S 202 as inputs. Signals correspond to S105.S106゜5107, and represent the expression identification flag, the sign of integer data, and the absolute value.As already mentioned, when the expression identification flag is "0", it is expressed as an absolute value, and when "1" it is expressed as an absolute value. Let it represent two's complement representation.

プライオリティエンコーダ20は絶対値に対し、最上位
のビット位置から数えて、何番目のビットが初めて論理
“1”となるかを求め、信号5204として出力する。
The priority encoder 20 calculates which bit of the absolute value, counting from the most significant bit position, becomes logic "1" for the first time, and outputs it as a signal 5204.

比較器21では信号5204の値と信号5203の“O
H”とを比較し、もし両者が一致すれば“1”を、一致
しなければ“0”を信号5205として出力する。2の
補数表現の整数が入力されたとき、信号5205が“0
″ならば入力は非負の整数、“1”ならば負の整数であ
ることを示している。
In the comparator 21, the value of the signal 5204 and the value of the signal 5203 are
If they match, "1" is output as the signal 5205, and if they do not match, "0" is output as the signal 5205. When an integer in two's complement representation is input, the signal 5205 is "0".
” indicates that the input is a non-negative integer, and “1” indicates that the input is a negative integer.

論理演算器24は信号5202の値と7FFFH”との
間でビット毎の論理積を求め、信号5209として出力
する。
The logical operator 24 calculates a bit-by-bit logical product between the value of the signal 5202 and 7FFFH'' and outputs it as a signal 5209.

減算器25は信号5209の値を信号5208の180
00H”より減じ、信号5210として出力する。
The subtracter 25 subtracts the value of the signal 5209 from 180 of the signal 5208.
00H” and output as signal 5210.

信号5210の値は2の補数表現で入力された負の整数
の絶対値を表している。
The value of signal 5210 represents the absolute value of the input negative integer in two's complement representation.

論理演算器23は比較器21の出力信号5205と表現
識別フラグ信号S 200との間で論理積を求め、信号
5206として出力する。
The logic operator 23 calculates the AND between the output signal 5205 of the comparator 21 and the expression identification flag signal S 200 and outputs the result as a signal 5206.

マルチプレクサ22は信号S 200により制御され、
信号5201と信号5205から1つを選択し、信号5
211として出力する。
Multiplexer 22 is controlled by signal S 200;
Select one from signal 5201 and signal 5205, and select signal 5.
Output as 211.

またマルチプレクサ26は信号5206により制御され
、信号5202と信号5210から1つを選択し、信号
5212として出力する。
Further, multiplexer 26 is controlled by signal 5206, selects one of signal 5202 and signal 5210, and outputs it as signal 5212.

出力信号5211.5212は各々絶対値表現された整
数の符号と絶対値を表し、各々第1図の信号5108、
 S 109に該当する。信号S 200の値が“0”
の場合は入力が絶対値表現であるから、マルチプレクサ
22.26は各々入力信号S 201. S 202を
そのまま信号S 21L S 212として出力する。
Output signals 5211 and 5212 each represent the sign and absolute value of an integer expressed in absolute value, and are respectively the signals 5108 and 5212 in FIG.
This falls under S 109. The value of signal S 200 is “0”
Since the inputs are in absolute value representation in the case of , the multiplexers 22, 26 respectively receive the input signals S 201 . S202 is output as is as signal S21L S212.

一方、信号5200の値が“1”の場合は2の補数表現
であるから、マルチプレクサ22は符号として信号52
05を選択し、マルチプレクサ26は絶対値として、入
力が非負であれば信号5202を、負であれば信号52
10を選択する。
On the other hand, when the value of the signal 5200 is "1", the multiplexer 22 uses the signal 5200 as a sign because it is expressed in two's complement.
05, and the multiplexer 26 outputs the signal 5202 as an absolute value if the input is non-negative, and the signal 5202 if the input is negative.
Select 10.

このようにして、表現識別フラグを参照し、2の補数表
現の整数データであればこれを絶対値表現に変換するこ
とができる。
In this way, by referring to the expression identification flag, integer data in two's complement expression can be converted into absolute value expression.

次に、第1図において、第2の変換回路13は第1の変
換回路12の出力信号S 108. S 109を入力
とし、浮動小数点表現に変換後の仮数部の符号、指数部
の符号、仮数部の絶対値、指数部の絶対値を、各々信号
S 110. S 111. S 112. S 11
3として出力する。
Next, in FIG. 1, the second conversion circuit 13 receives the output signal S 108. of the first conversion circuit 12. S109 is input, and the sign of the mantissa part, the sign of the exponent part, the absolute value of the mantissa part, and the absolute value of the exponent part after conversion into floating point representation are input to the signal S110. S111. S112. S11
Output as 3.

この第2の変換回路13については、−例として次のよ
うに構成することができる。
The second conversion circuit 13 can be configured as follows, for example.

すなわち、第3図は第1図の回路にモジュールとして含
まれている第2の変換回路13の一具体例を示すブロッ
ク図であり、以下これを説明する。
That is, FIG. 3 is a block diagram showing a specific example of the second conversion circuit 13 included as a module in the circuit of FIG. 1, which will be explained below.

第3図において、この第2の変換回路は信号5314、
 S 300を入力とする。各信号は第1図の信号S 
108. S 109に該当し、各々絶対値表現された
整数データの符号、絶対値を表す。
In FIG. 3, this second conversion circuit has signals 5314,
S 300 is input. Each signal is the signal S in Figure 1.
108. This corresponds to S109 and represents the sign and absolute value of integer data each expressed as an absolute value.

プライオリティエンコーダ30は絶対値に対し、最上位
のビット位置から数えて、何番目のビットが初めて論理
“1”となるかを求め、信号5303として出力する。
The priority encoder 30 calculates which bit of the absolute value, counting from the most significant bit position, becomes logic "1" for the first time, and outputs it as a signal 5303.

比較器31では絶対値と信号5301の“ooo。In the comparator 31, the absolute value and the signal 5301 are “ooo.

H”とを比較し、もし両者が一敗すれば1ltl+を、
一致しなければ“0″を信号5302として出力する。
H”, and if both lose once, 1ltl+,
If they do not match, “0” is output as a signal 5302.

信号S 302は、入力整数“±0OOOH″に対して
特殊な浮動小数点表現を与える際の制御信号として用い
ている。
The signal S 302 is used as a control signal when giving a special floating point representation to the input integer "±0OOOH".

シフト器32は絶対値を、信号5303の値だけ左側に
ビットシフトし、結果を信号5307として出力する。
Shifter 32 bit-shifts the absolute value to the left by the value of signal 5303 and outputs the result as signal 5307.

減算133には、信号5303が与えられると共に、“
FH”の信号5304が加えられており、減算器33は
、ビット長16から“1”を減じて得られる定数“FH
”から信号5303の値を滅じ、結果を信号5309と
して出力する。
A signal 5303 is given to the subtraction 133, and “
A signal 5304 of "FH" is added, and the subtracter 33 receives a constant "FH" obtained by subtracting "1" from the bit length 16.
”, the value of signal 5303 is deleted and the result is output as signal 5309.

マルチプレクサ34,35.36はいずれも比較器31
からの信号5302により制御され、2つの入力信号か
ら1つを選択し、信号S 311. S 312. S
 31:iとして出力する。すなわち、信号5302の
値が“O”のときは“±0OOOH”以外の整数が入力
されたことを意味し、各マルチプレクサは“0”の信号
S 305. S 307. S 309を選択する。
Multiplexers 34, 35, and 36 are all comparators 31
is controlled by signal 5302 from signal S 311. to select one of the two input signals. S312. S
31: Output as i. That is, when the value of the signal 5302 is "O", it means that an integer other than "±0OOOH" has been input, and each multiplexer outputs the "0" signal S305. S307. Select S309.

一方、信号5302の値が“1″のときは“±0OOO
H”が入力された場合であり、各マルチプレクサは“1
″の信号S 306.“0000H”の信号3308.
“7FFFH”の信号S 310を選択する。
On the other hand, when the value of signal 5302 is “1”, “±0OOO
This is the case when “H” is input, and each multiplexer inputs “1
” signal S 306. “0000H” signal 3308.
The signal S 310 of "7FFFH" is selected.

出力信号S 314. S 311. S 312. 
S 313は各々浮動小数点表現に変換後の仮数部の符
号、指数部の符号、仮数部の絶対値、指数部の絶対値を
表し、第1図の信号S 110. S 111. S 
112. S 113に該当する。
Output signal S 314. S311. S312.
S 313 represents the sign of the mantissa, the sign of the exponent, the absolute value of the mantissa, and the absolute value of the exponent after conversion to floating point representation, respectively, and the signals S 110 . S111. S
112. This falls under S 113.

このようにして、仮数部の符号、指数部の符号。In this way, the sign of the mantissa and the sign of the exponent.

仮数部の絶対値、指数部の絶対値を各々表すものが得ら
れると、第1図に示すように、これらのうち前2者につ
いては第1のマルチプレクサ14に、また11t2者に
ついては第2のマルチプレクサ15に与えられる。
When the absolute value of the mantissa part and the absolute value of the exponent part are obtained, as shown in FIG. is applied to multiplexer 15 of.

マルチプレクサ14.15はいずれもフリップフロップ
10からの信号5104により制御され、2つの入力信
号から1つを選択し、信号S 114. S 115と
して外部回路へ出力する。信号S 104の値が“0”
のとき、マルチプレクサ14.15は各々信号S 11
0゜5112を選択する。すなわち仮数部の符号と絶対
値を外部回路へ出力する。一方、信号S 104の値が
“1”のときは、各マルチプレクサは信号S 111゜
5113を選択し、指数部の符号と絶対値を外部回路へ
出力する。
Multiplexers 14.15 are both controlled by signal 5104 from flip-flop 10 to select one of the two input signals and output signal S 114. It is output to the external circuit as S115. The value of signal S 104 is “0”
, the multiplexers 14, 15 each output the signal S 11
Select 0°5112. That is, the sign and absolute value of the mantissa are output to an external circuit. On the other hand, when the value of the signal S104 is "1", each multiplexer selects the signal S111°5113 and outputs the sign and absolute value of the exponent part to the external circuit.

このようにして整数データを浮動小数点データに変換す
ることができるので、データ駆動型処理装置において、
かかるデータ型変換回路で変換を行うことにより、従来
のソフトウェアを用いる場合のように膨大な処理時間を
要したり、データ量が倍増してしまうということはない
In this way, integer data can be converted to floating point data, so in a data-driven processing device,
By performing the conversion using such a data type conversion circuit, it is not necessary to require a huge amount of processing time or to double the amount of data, unlike when using conventional software.

更に、整数データの表現形式に関しても、例えば2の補
数で表現された整数データが与えられた場合はこれを絶
対値表現に変換する必要があるが、第1図のように、第
1の変換回路12を備えているので、整数データが2の
補数表現のものであっても対応でき、整数データをデー
タ駆動型処理装置で扱うことのできる絶対値表現に変換
し、更に浮動小数点データへ変換するという処理をデー
タ駆動型処理装置において高速に実行することができる
Furthermore, regarding the representation format of integer data, for example, if integer data expressed in two's complement is given, it is necessary to convert it to absolute value representation, but as shown in Figure 1, the first conversion Since it is equipped with the circuit 12, it can handle even if the integer data is in two's complement representation, converting the integer data into absolute value representation that can be handled by a data-driven processing device, and then converting it into floating point data. This process can be executed at high speed in a data-driven processing device.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明によれば、整数データを高
速に浮動小数点データに変換することができると共に、
2の補数表現の整数データであっても対応でき、整数デ
ータを浮動小数点データに変換する回路をデータ駆動型
処理装置に加えることにより、従来のソフトウェアを用
いて変換する手間が省けるだけでなく、メモリアクセス
のオーバーヘッドが時間的にも容量的にも大きく削減で
きるという効果を持つ。
As explained above, according to the present invention, integer data can be converted to floating point data at high speed, and
It can handle even integer data in two's complement representation, and by adding a circuit that converts integer data to floating point data to the data-driven processing device, it not only saves the effort of converting using conventional software, but also This has the effect of greatly reducing memory access overhead in terms of time and capacity.

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

第1図は本発明の一実施例のデータ型変換回路のブロッ
ク図、 第2図は第1図に示す第1の変換回路の一具体例のブロ
ック図、 第3図は同じく第2の変換回路の一具体例のブロック図
、 第4図は従来方式に従うデータ駆動型処理装置のブロッ
ク図である。 10・・・・・フリップフロップ 11・・・・・レジスタ 12・・・・・第1の変換回路 13・・・・・第2の変換回路 14、15,22,26,34,35.36・・・マル
チプレクサ20.30  ・・・プライオリティエンコ
ーダ21.31  ・・・比較器 23.24  ・・・論理演算器 25.33  ・・・減算器 32・・・・・シフト器 41・・・・・プロセッシングユニット(P U)42
・・・・・リンクテーブルメモリ (LT)43・・・
・・ファンクションテーブルメモリ(FT) 44・・・・・データメモリ (DM)45・・・・・
キューメモリ (QM)46・・・・・出力制御回路(
OC) 47・・・・・入力制御回路(rc) 代理人 弁理士  岩 佐  義 幸 前1図 第2図 范3図 第4図
FIG. 1 is a block diagram of a data type conversion circuit according to an embodiment of the present invention, FIG. 2 is a block diagram of a specific example of the first conversion circuit shown in FIG. 1, and FIG. 3 is a block diagram of a specific example of the first conversion circuit shown in FIG. A block diagram of a specific example of the circuit. FIG. 4 is a block diagram of a data-driven processing device according to a conventional method. 10...Flip-flop 11...Register 12...First conversion circuit 13...Second conversion circuit 14, 15, 22, 26, 34, 35.36 ... Multiplexer 20.30 ... Priority encoder 21.31 ... Comparator 23.24 ... Logical operator 25.33 ... Subtractor 32 ... Shifter 41 ...・Processing unit (PU) 42
...Link table memory (LT)43...
...Function table memory (FT) 44...Data memory (DM) 45...
Queue memory (QM) 46... Output control circuit (
OC) 47... Input control circuit (rc) Agent Patent attorney Yoshii Iwasa Yukimae Figure 1 Figure 2 Figure 3 Figure 4

Claims (2)

【特許請求の範囲】[Claims] (1)データ駆動型処理装置におけるデータ型変換回路
であって、 2の補数表現の整数データを絶対値表現に変換する第1
の変換回路と、 絶対値表現の整数データの符号を表す信号と、絶対値を
表す信号が入力され、入力信号で表される整数値を浮動
小数点表現に変換し、仮数部の符号と絶対値、指数部の
符号と絶対値を出力する第2の変換回路と、 この第2の変換回路の出力から仮数部の符号及びその絶
対値と、指数部の符号及びその絶対値を選択して外部回
路へ出力する選択手段とを有することを特徴とするデー
タ型変換回路。
(1) A data type conversion circuit in a data-driven processing device, which converts integer data in two's complement representation to absolute value representation.
A conversion circuit inputs a signal representing the sign of integer data in absolute value representation and a signal representing the absolute value, converts the integer value represented by the input signal to floating point representation, and converts the sign and absolute value of the mantissa part. , a second conversion circuit that outputs the sign and absolute value of the exponent part, and selects the sign and absolute value of the mantissa part and the sign and absolute value of the exponent part from the output of this second conversion circuit and outputs the sign and absolute value of the exponent part. A data type conversion circuit comprising: selection means for outputting to the circuit.
(2)特許請求の範囲第1項に記載のデータ型変換回路
において、 前記第1の変換回路は、 パイプラインクロックを入力し、その入力毎に値が反転
する制御信号を出力するフリップフロップからの信号に
より、整数データの表現形式を識別する表現識別フラグ
と、整数データの正負を表す符号と、整数データ値とか
ら成る入力信号を取り込み、保持するレジスタの出力値
が入力され、2の補数表現の整数データであればこれを
絶対値表現に変換して出力し、絶対値表現の場合には上
記変換を行わないで出力する選択的な変換回路であって
、その出力を前記第2の変換回路に供給し、かつ、前記
選択手段が、 上記フリップフロップからの信号により、第2の変換回
路より出力される仮数部の符号と指数部の符号から1つ
を選択し、外部回路へ出力する第1のマルチプレクサと
、上記フリップフロップからの信号により、第2の変換
回路より出力される仮数部の絶対値と指数部の絶対値か
ら1つを選択し、外部回路へ出力する第2のマルチプレ
クサとから成ることを特徴とするデータ型変換回路。
(2) In the data type conversion circuit according to claim 1, the first conversion circuit is configured from a flip-flop that receives a pipeline clock and outputs a control signal whose value is inverted every time the pipeline clock is input. In response to the signal, the output value of the register that takes in and holds an input signal consisting of an expression identification flag that identifies the expression format of integer data, a sign indicating the sign indicating the positive or negative of the integer data, and an integer data value is input, and the output value of the register that holds it is input. This is a selective conversion circuit that converts integer data expressed into an absolute value expression and outputs it, and outputs it without performing the above conversion when it is an absolute value expression, and outputs the output without performing the above conversion. and the selection means selects one of the sign of the mantissa and the sign of the exponent output from the second conversion circuit according to the signal from the flip-flop, and outputs it to an external circuit. The first multiplexer selects one of the absolute value of the mantissa and the absolute value of the exponent output from the second conversion circuit according to the signals from the flip-flop and the first multiplexer that outputs the selected one to the external circuit. A data type conversion circuit comprising a multiplexer.
JP62055165A 1987-03-12 1987-03-12 Data type converting circuit Pending JPS63223825A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62055165A JPS63223825A (en) 1987-03-12 1987-03-12 Data type converting circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62055165A JPS63223825A (en) 1987-03-12 1987-03-12 Data type converting circuit

Publications (1)

Publication Number Publication Date
JPS63223825A true JPS63223825A (en) 1988-09-19

Family

ID=12991125

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62055165A Pending JPS63223825A (en) 1987-03-12 1987-03-12 Data type converting circuit

Country Status (1)

Country Link
JP (1) JPS63223825A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7558811B2 (en) 2003-01-27 2009-07-07 Denso Corporation Electronic control apparatus and memory apparatus for electronic control apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7558811B2 (en) 2003-01-27 2009-07-07 Denso Corporation Electronic control apparatus and memory apparatus for electronic control apparatus

Similar Documents

Publication Publication Date Title
US9804823B2 (en) Shift significand of decimal floating point data
EP0136656B1 (en) A nibble and word addressable memory to accessing consecutive data units for supporting decimal arithmetic operations
US9461668B2 (en) Decomposition of decimal floating point data
US4675809A (en) Data processing system for floating point data having a variable length exponent part
US4488252A (en) Floating point addition architecture
JP2674754B2 (en) Barrel shifter
EP0540150B1 (en) Arithmetic logic unit
JPH087083A (en) Three-input arithmetic and logic unit for formation of arithmetic and logic mixed combination
JPH087084A (en) Three-input arithmetic and logic unit for formation of sum of first boolean combination of first, second and third inputs plus second boolean combination of first, second and third inputs
JPH07271969A (en) Device conductiong storage in memory with condition attachedfrom registor pair
JPH07287567A (en) Arithmetical logical unit with plural independent segments and register that stores result from each fraction
JPH02138620A (en) Calculation of numerical quantity and numerical data processor
US4617641A (en) Operation unit for floating point data having a variable length exponent part
JPH086544A (en) Rotary register for orthogonal data conversion
EP0126247B1 (en) Computer system
JP2617974B2 (en) Data processing device
EP0140158B1 (en) Apparatus and method for converting a number in binary format to a decimal format
JPS63223825A (en) Data type converting circuit
US5708800A (en) High speed microprocessor for processing and transferring N-bits of M-bit data
JP2868075B2 (en) Floating point processor
JPS5932038A (en) Floating-point adder
JP2000112754A (en) Data processor
JPS5851352A (en) Data processor
JPH0795262B2 (en) Processor
JPH087082A (en) Three-input arithmetic and logic unit with barrel rotor and mask generator