JPH1031618A - Data conversion system - Google Patents

Data conversion system

Info

Publication number
JPH1031618A
JPH1031618A JP8205211A JP20521196A JPH1031618A JP H1031618 A JPH1031618 A JP H1031618A JP 8205211 A JP8205211 A JP 8205211A JP 20521196 A JP20521196 A JP 20521196A JP H1031618 A JPH1031618 A JP H1031618A
Authority
JP
Japan
Prior art keywords
data
precision
path
cache
determination result
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
JP8205211A
Other languages
Japanese (ja)
Inventor
Katsutoshi Uehara
克利 上原
Toshihiko Kurihara
俊彦 栗原
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 JP8205211A priority Critical patent/JPH1031618A/en
Publication of JPH1031618A publication Critical patent/JPH1031618A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a data converting system for improving data converting processing speed in the case of cache hit. SOLUTION: In the case of floating point data, parallelly with the write of data to be written into a data cache to J2, at a data discriminating circuit G, either single precision or double precision and the kind of data in the case of single precision are discriminated and the data discriminated result is written in J3. An aligner A1 inputs the data of a path 4 and the data of a path 5 read from J2, selects any data, outputs the data unnecessitating data conversion in the selected data to a path 7 and outputs data requiring it to a path 6, an aligner A2 inputs the data of a path 16 and the data read from J3, selects any data and outputs them to a path 18, and concerning the data from the path 6, a precision converting circuit C converts single-precision data to double- precision data based on the data discriminated result from a path 18.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、命令の実行におい
て、データキャッシュから読み出されたデータをデータ
変換する場合におけるデータ変換方式に関する。
[0001] 1. Field of the Invention [0002] The present invention relates to a data conversion method for converting data read from a data cache during execution of an instruction.

【0002】[0002]

【従来の技術】上記データ変換方式の従来技術を、デー
タが浮動小数点データであり、単精度の浮動小数点デー
タを倍精度の浮動小数点データに変換する場合につい
て、図4の構成図を用いて説明する。図4の構成図に示
す従来のデータ変換方式では、データの精度を単精度か
ら倍精度に変換しており、データアドレスタグJ1とデ
ータキャッシュメモリJ2からなるデータキャッシュ、
浮動小数点レジスタF1(以下、FR)、浮動小数点演
算器F2、データ判定回路G、データ変換回路としての
精度変換回路C、ラッチL1、L2を備え、セレクタS
1、S2、S3、アライナA1を備え、データパス1、
2、3、4、5、6、7、8、9、10、11、12、
13を備えている。FRは64ビット幅であり、単精度
データは32ビット、倍精度データは64ビットとす
る。データの精度を単精度から倍精度に変換するのは、
浮動小数点演算器が倍精度の演算器であるため、単精度
データの演算のためには、単精度データを倍精度データ
に変換してから演算する必要があるためである。
2. Description of the Related Art The prior art of the data conversion method will be described with reference to the configuration diagram of FIG. 4 in the case where data is floating point data and single precision floating point data is converted to double precision floating point data. To do. In the conventional data conversion method shown in the configuration diagram of FIG. 4, the precision of data is converted from single precision to double precision, and a data cache comprising a data address tag J1 and a data cache memory J2 is provided.
A floating point register F1 (hereinafter, FR), a floating point arithmetic unit F2, a data determination circuit G, a precision conversion circuit C as a data conversion circuit, latches L1 and L2, and a selector S
1, S2, S3, aligner A1, and data path 1,
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13 is provided. FR has a width of 64 bits, single precision data is 32 bits and double precision data is 64 bits. Converting the precision of data from single precision to double precision
This is because, since the floating-point arithmetic unit is a double-precision arithmetic unit, it is necessary to convert single-precision data into double-precision data before performing the arithmetic operation on single-precision data.

【0003】図7は浮動小数点データの形式の例を説明
する図であり、単精度データは1ビットの符号部と、8
ビットの指数部と、23ビットの仮数部で表現され、倍
精度データは1ビットの符号部と、11ビットの指数部
と、52ビットの仮数部で表現されている。データキャ
ッシュメモリJ2のデータの読み出し幅、及び書き込み
幅は64ビットとし、主記憶装置からデータキャッシュ
メモリJ2へのデータ転送は、64ビット*4cyc=
256ビットで、ターゲットアドレスのデータを含んだ
64ビットが先頭のサイクルに転送される方式とする。
また、命令の実行は、命令読み出しステージ(IFステ
ージ)、命令デコードステージ(Dステージ)、命令実
行ステージ(Eステージ)、メモリアクセスステージ
(Aステージ)、キャンセルステージ(Nステージ)、
書き込みステージ(Wステージ)からなるパイプライン
処理とする。
FIG. 7 is a view for explaining an example of the format of floating-point data.
It is represented by a bit exponent part and a 23-bit mantissa part, and double-precision data is represented by a 1-bit sign part, an 11-bit exponent part, and a 52-bit mantissa part. The data read width and the data write width of the data cache memory J2 are 64 bits, and the data transfer from the main storage device to the data cache memory J2 is 64 bits * 4cyc =
It is assumed that 64 bits of 256 bits including the data of the target address are transferred in the first cycle.
Instruction execution includes an instruction read stage (IF stage), an instruction decode stage (D stage), an instruction execution stage (E stage), a memory access stage (A stage), a cancel stage (N stage),
The pipeline processing is composed of a writing stage (W stage).

【0004】以下、単精度浮動小数点ロード命令の実行
動作を例に説明する。該命令の動作概要は、単精度32
ビットデータを読み出して、そのデータの値に応じた適
切な倍精度フォーマットに変換した後、ターゲットのF
Rに書き込む動作を行うことである。IFステージでフ
ェッチした命令を、Dステージでデコードした結果、単
精度浮動小数点ロード命令と判明し、Eステージでター
ゲットアドレスの計算を行う。Aステージでは、32ビ
ット単精度データを得るためにデータアドレスタグJ1
のアクセスを行うが、キャッシュミスとなった場合で
は、主記憶装置からのデータ転送を行うため、データは
パス1、パス3を経由してデータキャッシュメモリJ2
に書き込まれる。また、この場合には、同時にターゲッ
トアドレスのデータを含む先頭サイクルのデータはデー
タキャッシュメモリJ2を迂回し、ラッチL2、パス4
を経由して、アライナA1に入力される。アライナA1
は、キャッシュヒット、キャッシュミスに応じてパス4
又はパス5の64ビットデータの何れか一方を選択して
パス7に出力する機能と、ターゲットアドレスに応じて
前記選択した、64ビットデータの前半又は後半32ビ
ットを選択してパス6に出力する機能がある。また、ア
ライナA1は、単精度データか、倍精度データかにかか
わらずパス7に64ビットデータを出力する。なお、図
示はしていないが、キャッシュヒットしたかキャッシュ
ミスしたかの結果に基づく制御信号がアライナA1に入
力されており、この制御信号によりパス4またはパス5
の選択が行われる。また、64ビットデータの前半又は
後半32ビットの選択は、ターゲットアドレス内にこの
選択のための1ビットが含まれ、この1ビットの値をア
ライナA1で判定することにより、前半又は後半32ビ
ットの選択が行われる。
An operation of executing a single-precision floating-point load instruction will be described below as an example. The operation outline of the instruction is as follows.
After reading the bit data and converting it to the appropriate double precision format according to the value of that data, the target F
That is, an operation of writing to R is performed. As a result of decoding the instruction fetched in the IF stage in the D stage, it is found to be a single precision floating point load instruction, and the target address is calculated in the E stage. In the A stage, in order to obtain 32-bit single precision data, the data address tag J1
However, if a cache miss occurs, the data is transferred from the main storage device, so the data passes through path 1 and path 3 and the data cache memory J2
Written in. Further, in this case, the data of the first cycle that simultaneously includes the data of the target address bypasses the data cache memory J2, and the latch L2 and the path 4
Is input to the aligner A1. Aligner A1
Passes 4 depending on cache hit or cache miss
Alternatively, a function of selecting one of the 64-bit data of the pass 5 and outputting the selected data to the pass 7, and selecting the first half or the latter 32 bits of the selected 64-bit data according to the target address and outputting the selected data to the pass 6. There is a function. The aligner A1 outputs 64-bit data to the path 7 regardless of whether the data is single-precision data or double-precision data. Although not shown, a control signal based on the result of the cache hit or the cache miss is input to the aligner A1.
Is selected. Also, when selecting the first half or the latter half 32 bits of 64-bit data, 1 bit for this selection is included in the target address. A selection is made.

【0005】パス6に出力された32ビットデータは、
データ判定回路G、精度変換回路C、パス8、セレクタ
S2、パス10を経由してターゲットのFRに書き込ま
れる。ここで、データ判定回路Gでは図5に示す通り、
入力データの値を判定して、どのフォーマットに基づい
て単精度から倍精度に変換するかを選択するための判定
結果を出力する。精度変換回路Cでは図6に示すよう
に、前記データ判定回路Gの判定結果を使用して単精度
データを倍精度データへフォーマット変換する。
[0005] The 32-bit data output to pass 6 is
The data is written in the target FR via the data determination circuit G, the precision conversion circuit C, the path 8, the selector S2, and the path 10. Here, in the data determination circuit G, as shown in FIG.
The value of the input data is judged, and the judgment result for selecting which format to convert from single precision to double precision is output. As shown in FIG. 6, the precision conversion circuit C uses the determination result of the data determination circuit G to format-convert single precision data into double precision data.

【0006】また、倍精度浮動小数点ロード命令の実行
では、データ変換は不要であるから、データキャッシュ
メモリJ2又は主記憶装置からの64ビット倍精度デー
タをアライナA1で選択した後、データ判定回路G、精
度変換回路Cを迂回するパス7、セレクタS2、パス1
0を経由して、ターゲットのFRに書き込む。なお、図
示はしていないが、Dステージでのデコード結果に基づ
く制御信号がセレクタS2に入力されており、この制御
信号によりパス7またはパス8またはパス9の信号の選
択が行われる。また、ストア命令の場合には、セレクタ
S3により、固定小数点ストア命令ならばGRからのパ
ス13を選択し、浮動小数点ストア命令ならばFRから
のパス11を選択し、パス2、パス3を経由して、デー
タキャッシュメモリJ2にデータを書き込む。また、浮
動小数点演算の実行では、パス11、パス12を経由し
てFRのデータを浮動小数点演算器F2に送り、演算結
果はパス9、パス10を経由してターゲットのFRに書
き込まれる。
Since data conversion is not required in the execution of the double-precision floating-point load instruction, 64-bit double-precision data from the data cache memory J2 or the main memory is selected by the aligner A1, and then the data decision circuit G is selected. , Path 7 bypassing the precision conversion circuit C, selector S2, path 1
Write to the target FR via 0. Although not shown, a control signal based on the decoding result of the D stage is input to the selector S2, and the signal of path 7, 8 or 9 is selected by this control signal. In the case of a store instruction, the selector S3 selects the path 13 from GR for a fixed-point store instruction, the path 11 from FR for a floating-point store instruction, and passes through the paths 2 and 3. Then, data is written to the data cache memory J2. In the execution of the floating-point operation, the data of the FR is sent to the floating-point arithmetic unit F2 via the paths 11 and 12, and the operation result is written to the target FR via the paths 9 and 10.

【0007】[0007]

【発明が解決しようとする課題】しかし、このような従
来のデータ変換方式では、Aステージのキャッシュアク
セスの結果、キャッシュヒットした場合では、データは
データキャッシュメモリJ2、ラッチL1、パス5、パ
ス6、データ判定回路G、データ変換回路としての精度
変換回路C、パス8、パス10を経由してFRに書き込
まれる。このため、単精度浮動小数点ロード命令の実行
においては、ターゲットアドレスがキャッシュヒットし
た時は必ず、データキャッシュメモリJ2からのデータ
読み出しの時に精度変換回路Cで変換する前にデータ判
定回路Gを経由することとなり、処理速度が遅くなると
いう問題があった。本発明では上述の問題を解決するも
ので、キャッシュヒット時のデータ変換処理速度を向上
するための方式を提供することを目的とする。
However, in such a conventional data conversion method, if a cache hit occurs as a result of the A-stage cache access, the data is stored in the data cache memory J2, the latch L1, the path 5, and the path 6. , A data determination circuit G, an accuracy conversion circuit C as a data conversion circuit, a path 8 and a path 10 to be written into FR. For this reason, in the execution of the single-precision floating-point load instruction, whenever a cache hit occurs in the target address, the data passes through the data determination circuit G before being converted by the precision conversion circuit C when reading data from the data cache memory J2. Therefore, there is a problem that the processing speed becomes slow. SUMMARY OF THE INVENTION It is an object of the present invention to solve the above-described problem and to provide a method for improving a data conversion processing speed at the time of a cache hit.

【0008】[0008]

【問題を解決するための手段】上記目的を達成するた
め、本発明は、データキャッシュに、書き込まれたデー
タの種類を示すデータ判定結果をデータ毎に記憶するデ
ータ判定結果領域を設け、前記データキャッシュへのデ
ータの書き込みと平行して該データの種類を判定しデー
タ判定結果を前記データ判定結果領域に書き込むデータ
判定手段を設け、前記データキャッシュから読み出され
たデータとデータ判定結果を入力し、該データ判定結果
に基づき該データのデータ変換を行うデータ変換手段を
設けるようにしている。さらに、前記データキャッシュ
への書き込みデータと、前記データキャッシュからの読
み出しデータを入力し、該両データの内のいずれか一方
のデータを選択して出力する第1のアライナと、前記デ
ータ判定手段から出力されたデータ判定結果と、前記デ
ータキャッシュから読み出したデータ判定結果を入力
し、該両データ判定結果の内のいずれか一方のデータ判
定結果を選択して出力する第2のアライナを設け、該第
1のアライナと第2のアライナの出力を前記データ変換
手段の入力としてデータ変換を行うようにしている。さ
らに、前記第1のアライナは、前記データキャッシュへ
の書き込みデータと、前記データキャッシュからの読み
出しデータを入力し、該両データの内のいずれか一方の
データを選択し、かつ該選択したデータの内、データ変
換の必要のないデータを出力する出力端子と、データ変
換の必要なデータを出力する出力端子とを備え、該デー
タ変換の必要なデータを出力する出力端子を前記データ
変換手段の入力に接続するようにしている。また、前記
データキャッシュに書き込まれるデータは浮動小数点デ
ータであり、前記データの種類は単精度データか倍精度
データかの種類及び単精度データにおける種類であるよ
うにしている。
In order to achieve the above object, the present invention provides a data cache, comprising: a data determination result area for storing, for each data, a data determination result indicating a type of written data; Data determination means for determining the type of the data in parallel with writing the data to the cache and writing the data determination result to the data determination result area is provided, and the data read from the data cache and the data determination result are input. Data conversion means for converting the data based on the data determination result is provided. A first aligner for inputting write data to the data cache and read data from the data cache, selecting and outputting one of the data, and a data aligner. A second aligner for inputting the output data determination result and the data determination result read from the data cache, selecting and outputting one of the data determination results from the two data determination results, Data conversion is performed by using the outputs of the first aligner and the second aligner as inputs of the data conversion means. Further, the first aligner inputs the write data to the data cache and the read data from the data cache, selects either one of the two data, and selects the selected data. And an output terminal for outputting data that does not require data conversion, and an output terminal for outputting data that requires data conversion. The output terminal for outputting data that requires data conversion is provided as an input of the data conversion means. To connect to. The data written to the data cache is floating-point data, and the type of the data is the type of single precision data or double precision data and the type of single precision data.

【0009】[0009]

【発明の実施の形態】以下、本発明のデータ変換方式の
実施例を、データが浮動小数点データであり、単精度の
浮動小数点データを倍精度の浮動小数点データに変換す
る場合を例にして、図面に基づいて具体的に説明する。
図1に実施例の構成図を示す。図2には実施例における
動作例のキャッシュミスの場合のタイムチャートを示
し、図3には実施例における動作例のキャッシュヒット
の場合のタイムチャートを示す。図1の構成図に示すデ
ータ精度変換を行うプロセッサでは、データアドレスタ
グJ1とデータキャッシュメモリJ2からなるデータキ
ャッシュ、データ判定結果J3、浮動小数点レジスタF
1(以下、FR)、浮動小数点演算器F2、データ判定
回路G、データ変換回路としての精度変換回路C、ラッ
チL1、L2、L3、L4を備え、セレクタS1、S
2、S3、アライナA1、A2を備え、データパス1、
2、3、4、5、6、7、8、9、10、11、12、
13、14、15、16、17、18を備えている。F
Rは64ビット幅であり、単精度は32ビット、倍精度
は64ビットである。データキャッシュメモリJ2のデ
ータの読み出し幅、及び書き込み幅は64ビットとし、
主記憶装置からデータキャッシュメモリJ2へのデータ
転送は、64*4=256ビットで、ターゲットアドレ
スのデータを含んだ64ビットが先頭のサイクルに転送
される方式である。また、命令の実行は、命令読み出し
ステージ(IFステージ)、命令デコードステージ(D
ステージ)、命令実行ステージ(Eステージ)、メモリ
アクセスステージ(Aステージ)、キャンセルステージ
(Nステージ)、書き込みステージ(Wステージ)から
なるパイプライン処理である。
BEST MODE FOR CARRYING OUT THE INVENTION An embodiment of the data conversion system of the present invention will be described below, taking data as floating point data and converting single precision floating point data into double precision floating point data as an example. A specific description will be given based on the drawings.
FIG. 1 shows a configuration diagram of the embodiment. 2 shows a time chart in the case of a cache miss in the operation example in the embodiment, and FIG. 3 shows a time chart in the case of a cache hit in the operation example in the embodiment. In the processor that performs the data precision conversion shown in the configuration diagram of FIG. 1, the data cache including the data address tag J1 and the data cache memory J2, the data determination result J3, the floating point register F
1 (hereinafter, FR), a floating point arithmetic unit F2, a data determination circuit G, a precision conversion circuit C as a data conversion circuit, and latches L1, L2, L3, L4, and selectors S1, S
2, S3, aligners A1, A2, and data path 1,
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
It is equipped with 13, 14, 15, 16, 17, and 18. F
R is 64 bits wide, single precision is 32 bits, and double precision is 64 bits. The data read width and the data write width of the data cache memory J2 are 64 bits,
The data transfer from the main storage device to the data cache memory J2 is a method in which 64 * 4 = 256 bits and 64 bits including the data of the target address are transferred in the first cycle. In addition, the instruction is executed by the instruction read stage (IF stage) and the instruction decode stage (D
Stage), an instruction execution stage (E stage), a memory access stage (A stage), a cancel stage (N stage), and a write stage (W stage).

【0010】まず、単精度浮動小数点ロード命令の実行
動作を例に説明する。IFステージでフェッチした命令
を、Dステージでデコードした結果、単精度浮動小数点
ロード命令と判明し、Eステージでターゲットアドレス
の計算を行う。Aステージでは、32ビット単精度デー
タを得るためにデータアドレスタグJ1のアクセスを行
うが、キャッシュミスとなった場合では、主記憶装置か
らのデータ転送を行うため、データはパス1、パス3を
経由してデータキャッシュメモリJ2に書き込まれる。
この時、パス14を経由したデータはデータ判定回路G
に入力され、データ判定回路Gは、図5に示すとおり、
精度変換回路Cにおいてデータをどのフォーマットに基
づいて精度変換するかを示すデータ判定結果を出力す
る。このデータ判定結果は、データキャッシュに新たに
設けたデータ判定結果J3に書き込んでおく。データ判
定結果は、本実施例の場合、2ビットであり、データ判
定結果J3は32ビットのデータ毎に2ビットを記憶す
る。また、同時にターゲットアドレスのデータを含む先
頭サイクルのデータはデータキャッシュメモリJ2を迂
回し、ラッチL2、パス4を経由して、アライナA1に
入力される。また、キャッシュヒットした場合にはデー
タキャッシュメモリJ2はラッチL1、パス5を経由し
て、アライナA1に入力される。アライナA1は、キャ
ッシュヒット、キャッシュミスに応じてパス4又はパス
5の64ビットデータの何れか一方を選択してパス7に
出力する機能と、ターゲットアドレスに応じて前記選択
した64ビットデータの前半又は後半32ビットをパス
6に出力する機能がある。パス6に出力された32ビッ
トデータは、精度変換回路Cに入力される。なお、図示
はしていないが、キャッシュヒットしたかキャッシュミ
スしたかの結果に基づく制御信号がアライナA1に入力
されており、この制御信号によりパス4またはパス5の
選択が行われる。また、64ビットデータの前半又は後
半32ビットの選択は、ターゲットアドレス内にこの選
択のための1ビットが含まれ、この1ビットの値をアラ
イナA1で判定することにより、前半又は後半32ビッ
トの選択が行われる。
First, an operation of executing a single-precision floating-point load instruction will be described as an example. The instruction fetched in the IF stage is decoded in the D stage, and as a result, is determined to be a single-precision floating-point load instruction. The target address is calculated in the E stage. At the A stage, the data address tag J1 is accessed in order to obtain 32-bit single precision data, but in the case of a cache miss, data is transferred from the main storage device, so data is passed through paths 1 and 3. It is written in the data cache memory J2 via
At this time, the data passed through the path 14 is the data judgment circuit G.
Data is input to the data determination circuit G, as shown in FIG.
The precision conversion circuit C outputs a data determination result indicating which format the data is to be precision converted based on. This data determination result is written in the data determination result J3 newly provided in the data cache. The data determination result is 2 bits in this embodiment, and the data determination result J3 stores 2 bits for each 32-bit data. At the same time, the data of the first cycle including the data of the target address bypasses the data cache memory J2 and is input to the aligner A1 via the latch L2 and the path 4. When a cache hit occurs, the data cache memory J2 is input to the aligner A1 via the latch L1 and the path 5. The aligner A1 has a function of selecting one of the 64-bit data of the path 4 or the path 5 and outputting it to the path 7 according to a cache hit or a cache miss, and the first half of the selected 64-bit data according to the target address. Alternatively, there is a function of outputting the latter 32 bits to the path 6. The 32-bit data output to the path 6 is input to the precision conversion circuit C. Although not shown, a control signal based on the result of a cache hit or a cache miss is input to the aligner A1, and the path 4 or the path 5 is selected by this control signal. The selection of the first or second half 32 bits of the 64-bit data includes one bit for this selection in the target address, and the value of this one bit is determined by the aligner A1. A selection is made.

【0011】同様に、キャッシュミスした場合、データ
判定回路Gのデータ判定結果もデータ判定結果J3を迂
回し、ラッチL4、パス16を経由してアライナA2に
入力され、キャッシュヒットした場合には、データ判定
結果J3の出力が、ラッチL3、パス17を経由してア
ライナA2に入力される。アライナA2は、キャッシュ
ヒット、キャッシュミスに応じてパス16又はパス17
のデータ判定結果の何れか一方を選択してパス18に出
力する機能を有する。パス18に出力されたデータ判定
結果は、精度変換回路Cに入力される。なお、図示はし
ていないが、キャッシュヒットしたかキャッシュミスし
たかの結果に基づく制御信号がアライナA2に入力され
ており、この制御信号によりパス16またはパス17の
選択が行われる。
Similarly, in the case of a cache miss, the data determination result of the data determination circuit G also bypasses the data determination result J3, is input to the aligner A2 via the latch L4 and the path 16, and if a cache hit occurs, The output of the data determination result J3 is input to the aligner A2 via the latch L3 and the path 17. The aligner A2 passes the path 16 or 17 depending on the cache hit or the cache miss.
Has a function of selecting any one of the data determination results and outputting the result to the path 18. The data determination result output to the path 18 is input to the precision conversion circuit C. Although not shown, a control signal based on the result of a cache hit or a cache miss is input to the aligner A2, and the control signal selects the path 16 or the path 17.

【0012】精度変換回路Cは、パス6からの32ビッ
トデータと、パス18からのデータ判定結果が入力さ
れ、図6に示すように、データ判定結果にしたがい単精
度データを倍精度データへフォーマット変換する。
The precision conversion circuit C receives the 32-bit data from the path 6 and the data determination result from the path 18, and formats the single precision data into double precision data according to the data determination result, as shown in FIG. Convert.

【0013】また、倍精度浮動小数点ロード命令の実行
では、データ精度変換は不要であるから、データキャッ
シュメモリJ2又は主記憶装置からの64ビット倍精度
データをアライナA1で選択した後、パス7、セレクタ
S2、パス10を経由して、ターゲットのFRに書き込
む。なお、図示はしていないが、Dステージでのデコー
ド結果に基づく制御信号がセレクタS2に入力されてお
り、この制御信号によりパス7またはパス8またはパス
9の信号の選択が行われる。
Further, since the data precision conversion is not necessary in the execution of the double precision floating point load instruction, after the 64-bit double precision data from the data cache memory J2 or the main memory is selected by the aligner A1, the pass 7, Write to the target FR via the selector S2 and path 10. Although not shown, a control signal based on the decoding result of the D stage is input to the selector S2, and the signal of path 7, 8 or 9 is selected by this control signal.

【0014】また、ストア命令の場合には、セレクタS
3により、固定小数点ストア命令ならばGRからのパス
13を選択し、浮動小数点ストア命令ならばFRからの
パス11を選択し、パス2、パス3を経由して、データ
キャッシュメモリJ2に書き込む。この時、データをデ
ータキャッシュメモリJ2に書き込むと共に、パス1
4、データ判定回路G、パス15を経由して、データ判
定回路Gの出力をデータ判定結果J3に書き込む。この
ように、ストア命令ではデータ判定結果の値を更新して
おく必要がある。
In the case of a store instruction, the selector S
3, the path 13 from GR is selected for a fixed-point store instruction, the path 11 from FR is selected for a floating-point store instruction, and data is written to the data cache memory J2 via path 2 and path 3. At this time, the data is written to the data cache memory J2 and the pass 1
4. The output of the data determination circuit G is written to the data determination result J3 via the data determination circuit G and the path 15. As described above, it is necessary to update the value of the data determination result in the store instruction.

【0015】また、浮動小数点演算の実行では、パス1
1、パス12を経由してFRのデータを浮動小数点演算
器F2に送り、演算結果はパス9、パス10を経由して
ターゲットのFRに書き込まれる。
In the execution of the floating point operation, pass 1
The FR data is sent to the floating point arithmetic unit F2 via the path 1 and the path 12, and the operation result is written into the target FR via the paths 9 and 10.

【0016】上記実施例では、データが浮動小数点デー
タであり、単精度の浮動小数点データを倍精度の浮動小
数点データに変換する場合のデータ変換方式の具体例に
ついて説明したが、データ変換対象となるデータは、浮
動小数点データに限られるものではなく、データキャッ
シュから読み出された後にデータ変換が必要とされるデ
ータであればよいのであって、このようなデータに本発
明のデータ変換方式が適用可能であることは云うまでも
ない。
In the above embodiment, the data is floating-point data, and a specific example of the data conversion method when single-precision floating-point data is converted to double-precision floating-point data has been described. The data is not limited to the floating point data, and may be any data that needs data conversion after being read from the data cache, and the data conversion method of the present invention is applied to such data. It goes without saying that it is possible.

【0017】[0017]

【発明の効果】以上説明したように、本発明によれば、
データのデータキャッシュへの書き込みに平行してデー
タの種類をデータ判定し、データキャッシュにデータと
データ判定結果を書き込むようにしているため、キャッ
シュヒットした場合の読み出しデータはそのままデータ
変換回路でデータ変換されるため、従来技術に比べ、キ
ャッシュヒットした場合の読み出しデータのデータ変換
の処理速度を向上することができ、データ変換によるデ
ィレイの低減を図ることができる。
As described above, according to the present invention,
Since the data type is judged in parallel with the writing of the data to the data cache and the data and the data judgment result are written to the data cache, the read data in the case of a cache hit is directly converted by the data conversion circuit. Therefore, the processing speed of the data conversion of the read data in the case of a cache hit can be improved as compared with the related art, and the delay due to the data conversion can be reduced.

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

【図1】本発明の実施例の構成を示す図である。FIG. 1 is a diagram showing a configuration of an exemplary embodiment of the present invention.

【図2】実施例におけるキャッシュミスの場合のタイム
チャートである。
FIG. 2 is a time chart in the case of a cache miss in the embodiment.

【図3】実施例におけるキャッシュヒットの場合のタイ
ムチャートである。
FIG. 3 is a time chart in the case of a cache hit in the embodiment.

【図4】従来技術に従う単精度データ変換方式の構成を
示す図である。
FIG. 4 is a diagram showing a configuration of a single-precision data conversion method according to the related art.

【図5】精度変換のためのデータ判定回路における処理
内容を示す図である。
FIG. 5 is a diagram illustrating processing contents in a data determination circuit for precision conversion.

【図6】精度変換回路における処理内容を示す図であ
る。
FIG. 6 is a diagram showing processing contents in a precision conversion circuit.

【図7】浮動小数点データのデータ形式の例を示す図で
ある。
FIG. 7 is a diagram showing an example of a data format of floating point data.

【符号の説明】[Explanation of symbols]

J1 データアドレスタグ J2 データキャッシュメモリ J3 データ判定結果 F1 浮動小数点レジスタ F2 浮動小数点演算器 G データ判定回路 C 精度変換回路 L1〜L4 ラッチ S1〜S3 セレクタ A1、A2 アライナ 1〜18 パス J1 Data address tag J2 Data cache memory J3 Data judgment result F1 Floating point register F2 Floating point arithmetic unit G Data judgment circuit C Precision conversion circuit L1 to L4 Latch S1 to S3 Selector A1, A2 Aligner 1 to 18 Pass

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 データキャッシュに、書き込まれたデー
タの種類を示すデータ判定結果をデータ毎に記憶するデ
ータ判定結果領域を設け、 前記データキャッシュへのデータの書き込みと平行して
該データの種類を判定しデータ判定結果を前記データ判
定結果領域に書き込むデータ判定手段を設け、 前記データキャッシュから読み出されたデータとデータ
判定結果を入力し、該データ判定結果に基づき該データ
のデータ変換を行うデータ変換手段を設けたことを特徴
とするデータ変換方式。
1. A data determination result area for storing, for each data, a data determination result indicating a type of written data in a data cache, wherein the type of the data is determined in parallel with the writing of the data to the data cache. Data determining means for determining and writing the data determination result to the data determination result area, inputting the data read from the data cache and the data determination result, and performing data conversion of the data based on the data determination result A data conversion method comprising a conversion means.
【請求項2】 請求項1記載のデータ変換方式におい
て、 前記データキャッシュへの書き込みデータと、前記デー
タキャッシュからの読み出しデータを入力し、該両デー
タの内のいずれか一方のデータを選択して出力する第1
のアライナと、前記データ判定手段から出力されたデー
タ判定結果と、前記データキャッシュから読み出したデ
ータ判定結果を入力し、該両データ判定結果の内のいず
れか一方のデータ判定結果を選択して出力する第2のア
ライナを設け、該第1のアライナと第2のアライナの出
力を前記データ変換手段の入力としてデータ変換を行う
ことを特徴とするデータ変換方式。
2. The data conversion method according to claim 1, wherein write data to said data cache and read data from said data cache are input, and one of said data is selected. The first to output
, The data determination result output from the data determination unit, and the data determination result read from the data cache are input, and one of the data determination results is selected and output. A data aligner for performing data conversion using outputs of the first aligner and the second aligner as inputs of the data converter.
【請求項3】 請求項2記載のデータ変換方式におい
て、 前記第1のアライナは、前記データキャッシュへの書き
込みデータと、前記データキャッシュからの読み出しデ
ータを入力し、該両データの内のいずれか一方のデータ
を選択し、かつ該選択したデータの内、データ変換の必
要のないデータを出力する出力端子と、データ変換の必
要なデータを出力する出力端子とを備え、該データ変換
の必要なデータを出力する出力端子を前記データ変換手
段の入力に接続することを特徴とするデータ変換方式。
3. The data conversion method according to claim 2, wherein the first aligner inputs write data to the data cache and read data from the data cache, and selects one of the two data. An output terminal for selecting one of the data and outputting data that does not require data conversion among the selected data, and an output terminal for outputting data that requires data conversion are provided. A data conversion method, wherein an output terminal for outputting data is connected to an input of the data conversion means.
【請求項4】 請求項1乃至請求項3のいずれかの請求
項記載のデータ変換方式において、 前記データキャッシュに書き込まれるデータは浮動小数
点データであり、前記データの種類は単精度データか倍
精度データかの種類及び単精度データにおける種類であ
ることを特徴とするデータ変換方式。
4. The data conversion method according to claim 1, wherein the data written to the data cache is floating-point data, and the type of the data is single-precision data or double-precision data. A data conversion method characterized by the type of data and the type of single precision data.
JP8205211A 1996-07-16 1996-07-16 Data conversion system Pending JPH1031618A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8205211A JPH1031618A (en) 1996-07-16 1996-07-16 Data conversion system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8205211A JPH1031618A (en) 1996-07-16 1996-07-16 Data conversion system

Publications (1)

Publication Number Publication Date
JPH1031618A true JPH1031618A (en) 1998-02-03

Family

ID=16503249

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8205211A Pending JPH1031618A (en) 1996-07-16 1996-07-16 Data conversion system

Country Status (1)

Country Link
JP (1) JPH1031618A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006154979A (en) * 2004-11-25 2006-06-15 Sony Corp Floating point number arithmetic circuit

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006154979A (en) * 2004-11-25 2006-06-15 Sony Corp Floating point number arithmetic circuit
US7949696B2 (en) 2004-11-25 2011-05-24 Sony Corporation Floating-point number arithmetic circuit for handling immediate values

Similar Documents

Publication Publication Date Title
US4675809A (en) Data processing system for floating point data having a variable length exponent part
US5784585A (en) Computer system for executing instruction stream containing mixed compressed and uncompressed instructions by automatically detecting and expanding compressed instructions
US5636353A (en) Superscalar processor with direct result bypass between execution units having comparators in execution units for comparing operand and result addresses and activating results bypassing
EP0491693B1 (en) Improved cpu pipeline having register file bypass on update/access address compare
US5805475A (en) Load-store unit and method of loading and storing single-precision floating-point registers in a double-precision architecture
JP2000235491A (en) Processing of load error of computer processor
EP0126247B1 (en) Computer system
JPH10228376A (en) Method and program for processing multiple-register instruction
JPH11504744A (en) System for performing arithmetic operations in single or double precision
US5668984A (en) Variable stage load path and method of operation
JP3199465B2 (en) Information processing device
US5335330A (en) Information processing apparatus with optimization programming
US4739470A (en) Data processing system
US5815420A (en) Microprocessor arithmetic logic unit using multiple number representations
US6178500B1 (en) Vector packing and saturation detection in the vector permute unit
US5349671A (en) Microprocessor system generating instruction fetch addresses at high speed
JP3751402B2 (en) Multi-pipeline microprocessor with data accuracy mode indicator
EP1609058A2 (en) Method and apparatus for hazard detection and management in a pipelined digital processor
JP2580396B2 (en) Branch instruction control method in pipeline
US6263424B1 (en) Execution of data dependent arithmetic instructions in multi-pipeline processors
JPH07239780A (en) One-clock variable length instruction execution process type instruction read computer
US5732005A (en) Single-precision, floating-point register array for floating-point units performing double-precision operations by emulation
JPH1031618A (en) Data conversion system
JP3693556B2 (en) Method and apparatus for performing load bypass in a floating point unit
JPH05274143A (en) Composite condition processing system