Data processing system for single-precision and double-precision data

Abstract: A data processing system includes a single-precision operation unit (156), a double-precision operation unit (152), a single-precision data to double-precision data conversion unit (154), and a double-precision data to single-precision data conversion unit (155). When two single-precision operations are simultaneously carried out, the single-precision operation unit performs a single-precision operation upon a group of single-precision data (SX1, SY1), and the double-precision operation unit with the single-precision data to double-precision data conversion unit and the double-precision data to single-precision data conversion unit perform a single-precision operation upon the other group of single-precision data (SX2, SY2). When a double-precision operation is carried out, the double-precision operation unit performs a double-precision operation upon a group of double-precision data (WX, WY).

Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing system for use in the processing of single-precision data such as 32-bit floating-point representation data and double-precision data such as 64-bit floating-point representation data. 2. Description of the Related Art Recently, as the amount of data processed in computers having a high functionality and high performance is increased, there is a growing need to effectively carry out the processing of logic calculations and arithmetic calculations, such as scientific calculations, at a high speed. Accordingly, vector processors are used to process single-precision data and double-precision data through pipelines such as an add pipeline, a multiply pipeline, and a division pipeline. In a prior art vector processor, a double-precision operation unit such as an adder unit also processes single-precision data. To accomplish this, in a single-precision operation mode, a single-precision data to double-precision data conversion unit and a double-precision data to single-precision data conversion unit are connected to a prestage and a poststage of the double-precision operation unit, respectively, as will be later explained in more detail. In the above-mentioned prior art vector processor, however, a space is generated in the memory region of the vector registers, and in the double-precision transmission lines between the vector registers and the double-precision operation unit. Also, in the above-mentioned prior art vector processor, it is possible to transmit two single-precision data through the double-precision transmission lines, to the double-precision operation unit. In this case, however, since only one item of single-precision data can be processed by the double-precision operation unit, the processing of the other single-precision data must be delayed until processing of the first single-precision data is completed, which is an obstacle to an enhancing of the operation speed. Therefore, it is desirable to provide a data processing system, such as a vector processor, which does not generate a space in the memory region and in the double-precision transmission lines and can process single-precision data at a high speed. EP-A-0 119 016 discloses a data processing system according to the preamble of accompanying claim 1 and 8. In this system, two identical single-precision operation units are employed. For processing double-precision data, both operation units are employed together, the sign and exponent processing part of the second operation unit being rendered inoperative and the two mantissa units acting as one. According to the present invention, there is provided a data processing system comprising: receiving means for receiving first data, second data, third data, and fourth data, each of said first to fourth data forming individual single-precision data in a single-precision operation mode, said first and second data forming first double-precision data in a double-precision operation mode, said third and fourth data forming second double-precision data in a double-precision operation mode; a single-precision operation unit, connected to said receiving means, for performing a single-precision operation upon said first and third data to obtain first single-precision result data in a single-precision operation mode; and a second operation unit, connected to said receiving means; characterised in that: said receiving means comprises first, second, third and fourth receiving means for receiving said first to fourth data respectively in a single operation; said single-precision operation unit is connected to said first and third receiving means; a first conversion unit is provided, connected to said second and fourth receiving means, for converting said second and fourth data of a single-precision data type into third and fourth double-precision data, respectively, in a single-precision operation mode; said second operation unit is a double-precision operation unit, connected to said first to fourth receiving means, and to said first conversion unit, for performing a double-precision operation upon said third and fourth double-precision data in a single-precision operation mode and performing a double-precision operation upon said first and second double-precision data in a double-precision operation mode, to obtain double-precision result data; and in that a second conversion unit is provided, connected to said double-precision operation unit, for converting said double-precision result data to second single precision result data in a single-precision operation mode. Thus, in embodiments of the present invention, when two single-precision operations are simultaneously carried out, the single-precision operation unit performs a single-precision operation upon a group of single-precision data, and the double-precision operation unit with the first and second conversion units perform a single-precision operation upon the other group of single-precision data. On the other hand when a double-precision operation is carried out, the double-precision operation unit performs a double-precision operation upon a group of double-precision data. Due to the presence of effectively two single-precision operation units, it is possible to transmit two items of single-precision data through the double-precision transmission lines thereto, and further, both single-precision data can be simultaneously processed to thereby enhance the operation speed. Further, to carry out a transmission of two single-precision data, such two single-precision data can be stored in one double-precision data region of the memory, i.e., the vector registers, and thus full use is made of the memory. BRIEF DESCRIPTION OF THE DRAWINGS The present invention will be more clearly understood from the description as set forth below, with reference to the accompanying drawings, wherein: Fig. 1 is a block circuit diagram illustrating a prior art data processing system; Figs. 2A and 2B are data formats of examples of single-precision data and double-precision data, respectively; Fig. 3 is a detailed circuit diagram of the add operation pipeline 15 of Fig. 1; Figs. 4A and 4B are block diagrams explaining the operation of the add operation pipeline of Fig. 3; Fig. 5 is a block circuit diagram illustrating an embodiment of the data processing system according to the present invention; Fig. 6 is a flowchart showing the operation of the add operation pipeline of Fig. 5; Fig. 7 is a detailed circuit diagram of the adder units of Fig. 5; Fig. 8 is a block circuit diagram illustrating another embodiment of the data processing system according to the present invention; Fig. 9 is a circuit diagram of a combination of the circuits of Figs. 5 and 8; and Figs. 10A and 10B are circuit diagrams of the 32 to 64 bit conversion unit and the 64 to 32 bit conversion unit of Figs. 3, 5, and 8. DESCRIPTION OF THE PREFERRED EMBODIMENT Before the description of an embodiment of the present invention, a prior art data processing system (vector processor) will be explained with reference to Figs. 1 through 4. In Fig. 1, which illustrates a prior art data processing system, reference numeral 1 designates a one-chip vector processor connected to a central processing unit (CPU) 2 and a main storage unit (MSU) 3 by an address bus 4 and a data bus 5. The vector processor 1 includes an input/output control unit 11, an instruction register 12, an instruction control unit 13, vector registers 14, an add operation pipeline 15, a multiply operation pipeline 16, and the like. The vector registers 14 interleave four ways, i.e., are divided into four blocks which can be independently accessed. Also, each of the vector registers 14 designated by VR0, VR1, ... VRn includes 4 elements, each of which corresponds to a double-precision data such as a 64-bit data. The CPU2 transmits a sequence of instructions, via the input/output control unit 11, to the instruction register 12, and the CPU 2 further transmits data via the input/output control unit 11 to the vector resisters 14. The instructions are as follows: (1) Operation data load instruction; (2) Operation instruction such as an add operation instruction and a multiply operation instruction; (3) Operation result store instruction; and (4) Stop instruction Next, when the CPU 2 activates the vector processor 1, the instruction control unit 13 fetches an instruction from the instruction register 12 to transmit various control signals to the input/output control unit 11, the vector registers 14, the add operation pipeline 15, and the multiply operation pipeline 16. For example, if a fetched instruction is a operation load instruction, control signals are transmitted from the instruction control unit 13 to the input/output control unit 11 and the vector registers 14, and as a result, data of the MSU 3 is stored via the input/output control unit 11 to the vector registers 14. If a fetched instruction is an add operation instruction, control signals are transmitted from the instruction control unit 13 to the vector registers 14 and the add operation pipeline 15, and as a result, data of the vector registers 14 is added at the add operation pipeline 15, and the resultant data is stored in the vector registers 14. Note that such control signals include a signal indicating a single-precision operation mode or a double-precision operation mode. If a fetched instruction is a multiply operation instruction, control signals are transmitted from the instruction control unit 13 to the vector registers 14 and the multiply operation pipeline 16, and as a result, data of the vector registers 14 is multiplied at the multiply operation pipeline 16, and the resulting data is stored in the vector registers 14. Note that such control signals also include a signal indicating a single-precision operation mode or a double-precision operation mode. If a fetched instruction is an operation result store instruction, control signals are transmitted from the instruction control unit 13 to the input/output control unit 11 and the vector registers 14, and as a result, data of the vector registers 14 is stored in the MSU 3. Further, if a fetched instruction is a stop operation, control signals are transmitted from the instruction control unit 13 to the units 11, 14, 15, and 16, and as a result, the operation of the vector processor 1 is completed. The add operation pipeline 15 carries out a vector processing such as D0 10 I = 0, 7 C(I) = A(I) x B(I) 10 CONTINUE That is, the add operation pipeline 15 performs a plurality of add operations, simultaneously upon a plurality of data. Similarly, the multiply operation pipeline 16 carries out a vector processing such as D0 10 I = 0, 7 10 CONTINUE That is, the multiply operation pipeline 16 performs a plurality of multiply operations, simultaneously upon a plurality of data. Hereinafter, a single-precision data SD is represented by a 32-bit data as shown in Fig. 2A, and a double-precision data WD is represented by a 64-bit data as shown in Fig. 2B. That is, in Fig. 2A, a 31-th bit (MSB) designates a sign S; the 30-th to 23-th bits designate an exponential part E, and the 22-th to 0-th bits designate a mantissa part M. Similarly, in Fig. 2B, a 63-th bit (MSB) designates a sign S; the 62-th to 52-th bits designate an exponential part E, and the 51-th to 0-th bits designate a mantissa part M. In Fig. 3, which is a detailed circuit diagram of the add operation pipeline 15, the add operation pipeline 15 includes an input selector 151, a double-precision adder unit 152, an output selector 153, a 32 to 64 bits conversion circuit 154, and a 64 to 32 bits conversion unit 155. For example, in a double-precision add operation mode (M = "0"), a double-precision data (64 bits) WX of the vector register VR0 and a double-precision data (64 bits) WY of the vector register VR1 are selected by the input selector 151, and as a result, are transmitted directly to the double-precision adder unit 152, to thereby obtain a resulting double-precision data (64 bits) WZ. Then, the result data WZ is selected by the output selector 153, and as a result, is stored in the vector register VR2. Conversely, in a single-precision add operation mode (M = "1"), a single-precision data (32 bits) SX of the vector register VR0 and a single-precision data (32 bits) SY of the vector register VR1 are selected by the input selector 151, and are transmitted to the 32 to 64 bits conversion unit 154, which converts the single-precision data SX and SY into double-precision data WSX and WSY, respectively. Then, the converted double-precision data WSX and WSY are transmitted to the double-precision adder unit 152 to obtain a result double-precision data (64 bits) WSZ. Again, the result double-precision data WSZ is converted into a single-precision data SZ by the 64 to 32 bit conversion unit 155. This single-precision data SZ is selected by the output selector 153, and as a result, is stored in the vector register VR2. Thus, in the add operation pipeline 15, a double-precision add operation is carried out by the double-precision adder unit 152, while a single-precision add operation is carried out by the double-precision adder unit 152 associated with the 32 to 64 bits conversion unit 154 and the 64 to 32 bits conversion unit 155. In Fig. 3, in a double-precision add mode, no problem arises, but, some problems arise in a single-precision add mode. That is, as shown in Fig. 4A, a space is generated in the vector registers 14, since each of the single-precision data (32 bits) SX, SY, and SZ are stored in the elements of the vector registers 14 having 64-bit regions for double-precision data. Also, a space is generated in bit lines between the vector registers 14 and the add operation pipeline 15, since such bit lines have a capacity for double-precision data. Also, it is possible to store two single-precision data such as SX1 and SX2 into each element of the vector registers 14, as shown in Fig. 4B, and also it is possible to simultaneously transmit such two single-precision data SX1 + SX2 via the double-precision bit lines. In this case, the processing of one of the two single-precision data such as SX2 must be delayed until the processing of the other SX1 is completed, since the 32 to 64 bit conversion unit 154 can process only one of the data SX1 and SX2. Thus, in the add operation unit 15 of Fig. 3, it is impossible to enhance the operation speed for single-precision data. Note that the multiply operation pipeline 16 has the same configuration as the add operation pipeline 15, except that a double-precision multiplier unit is provided instead of the double-precision adder unit 152. Therefore, the multiply operation pipeline 16 has the same problems as the add operation pipeline 15. In Fig. 5, which illustrates an embodiment of the add operation pipeline according to the present invention, a single-precision adder unit 156 is added to the elements of the add operation pipeline 15 of Fig. 3, and an input selector 151' and an output selector 153' are similar to the input selector 151 and the output selector 153 of Fig. 3. In Fig. 5, in a double-precision add operation mode (M = "0"), a double-precision data (64 bits) WX and a double-precision data (64 bits) WY are selected by the input selector 151', and as a result, are transmitted to the double-precision adder unit 152, to obtain a result double-precision data (64 bits) WF0. Then, the result double-precision data WF0 is selected by the output selector 153'. Namely, the add operation for double-precision data is substantially the same as that of Fig. 3. Conversely, in a single-precision add operation mode (M = "1"), two kinds of single-precision add operations are carried out. One is carried out by the single-precision adder unit 156, and the other is carried out by the double-precision adder unit 152 with the 32 to 64 bit conversion unit 154 and the 64 to 32 bit conversion unit 155. That is, a single-precision data (32 bits) SX1 and a single-precision data (32 bits) SY1 are transmitted to the single precision adder unit 156, to obtain a result single-precision data (32 bits) SF0. Simultaneously, a single-precision data (32 bits) SX2 and a single-precision data (32 bits) SY2 are transmitted to the 32 to 64 bits conversion unit 154, which converts the single-precision data SX2 and SY2 into double-precision data WFX and WFY, respectively. Then, the converted double-precision data WFX and WFY are transmitted to the double-precision adder unit 152 to obtain a result double-precision data (64 bits) WF0. Again, the result double-precision data WF0 is converted into a single-precision data SZ by the 64 to 32 bit conversion unit 155. Then, the two result single-precision data SF0 SF1 are combined as S0, and the combined single-precision data S0(SF0 + SF1) is selected by the output selector 153'. As a result, the combined single-precision data S0 is stored in the vector registers 14. The above-mentioned operation of the add operation pipeline 15' is described briefly in Fig. 6. Figure 7 illustrates an example of the double-precision adder unit 152 (or the single-precision adder unit 156). This adder unit includes a sign control circuit 61, an exponential part comparator 62, a mantissa selector 63, a shift circuit 64, an arithmetic and logic unit (ALU) 65, and a rounding/normalizing circuit 66. The adder unit of Fig. 6 processes two floating-point data, each of which is formed by a sign S a (S b ), an exponential part E a (E b ), and a mantissa M a (M b ). The sign control circuit 61 processes the signs S a and S b to generate a signal S1 and transmit it to the rounding/normalizing circuit 66. The exponential part comparator 62 compares the exponential parts E a and E b with each other, and generates three signals S2, S3, and S4. Here, the signal S2 designates a larger exponential part of the parts E a and E b , the signal S3 designates a difference between the parts E 2 and E b , and the signal S3 designates whether or not the part E a is larger than the part E b . The mantissa selector 63 transmits the mantissa parts M a and M b to the ALU 65 and the shift circuit 64 in accordance with the signal S4 of the exponential part comparator 62. For example, if the signal S4 indicates that the part E a is larger than the part E b , the mantissa selector 63 transmits the parts M a and M b to the ALU 65 and the shift circuit 64, respectively, and if the signal S4 indicates that the part E a is not larger than the part E b , the mantissa selector 64 transmits the parts M a and M b to the shift circuit 64 and the ALU 65, respectively. In the shift circuit 64, the mantissa part M b or M a transmitted from the mantissa selector 63 is shifted by the difference signal S3 between the parts E a and E b , to obtain a shifted mantissa M'. Then, the ALU 65 performs an add operation upon the mantissa M a (or M b ) and the shifted mantissa M', to obtain a result mantissa MR. Finally, the rounding/normalizing circuit 66 generates a floating-point single-precision or double-precision data in accordance with the signals S1, S2, and MR. In Fig. 8, which is a detailed circuit diagram of the multiply operation pipeline according to the present invention, this multiply operation pipeline 16' has a similar configuration to that of the add operation pipeline 15' of Fig. 5, except that a double-precision multiplier unit 161 and a single-precision multiplier unit 162 are provided instead of the double-precision adder unit 152 and the single-precision adder unit 156. Such multipliers can be easily formed by using Booth's arigorithm multipliers or the like. In Fig. 9, which is a block circuit of a combination of the add operation pipeline 15' of Fig. 5 and the multiply operation pipeline 16' of Fig. 7, only the elements required for a single-precision operation are illustrated. For example, in the add operation pipeline 15', a single-precision data (32 bits) A(I) of the vector register VR0 and a single precision data (32 bits) D(I) of the vector register VR0 are added at the double-precision adder unit 152 plus the units 154 and 155, and an addition result (32 bits) C(I) is stored in the vector register VR2. Simultaneously, a single-precision data (32 bits) B(I) of the vector register VR1 and a single precision data (32 bits) E(I) of the vector register VR1 are added at the single-precision adder unit 156, and an addition result (32 bits) F(I) is stored in the vector register VR2. Similarly, in the multiply operation pipeline 16', a single-precision data (32 bits) X(I) of the vector register VR3 and a single precision data (32 bits) U(I) of the vector register VR3 are multiplied at the double-precision multiplier unit 161 plus the units 154 and 155, and a multiply result (32 bits) Z(I) is stored in the vector register VR5. Simultaneously, a single-precision data (32 bits) Y(I) of the vector register VR4 and a single precision data (32 bits) V(I) of the vector register VR4 are multiplied at the single-precision multiplier unit 156, and an addition result (32 bits) F(I) is stored in the vector register VR5. As is clear in Fig. 9, there is no space in the vector registers 14 and the transmission bit lines, and since two single-precision operations can be simultaneously carried out, there is no delay for such operations. In Fig. 10A, which is a circuit diagram of the 32 to 64 bit conversion unit 154 of Figs. 3, 5, and 8, since an exponential part is represented by 2' s complement, a 30-th bit of a single-precision data SD is allocated to the 62-th, 61-th, 60-th, and 59-th bits of a double-precision data WD, and the 29-th to 23-th bits of the single-precision data SD is allocated to the 58-th to 52-th bits, of respectively, of the double-precision data WD. Also, in a mantissa part M, "0" is allocated to the 28-th to 0-th bits of the double-precision data WD, and the 22-th to 0-th bits of the single-precision data SP are allocated to the 51-th to 29-th bits of the double-precision data WD. Note that a 22-th bit of the single-precision data SD and a 51-th bit of the double-precision data WD is always "1". In Fig. 10B, which is a circuit diagram of the 64 to 32 bit conversion unit 155 of Figs. 3, 5, and 8, the 59-th to 52-th bits of a double-precision data WD are allocated to the 3-th to 23-th bits, respectively, of a single-precision data SD, and the 51-th to 29-th bits of the double-precision data WD are allocated to the 22-th to 0-th bits, respectively, of the single-precision data SD. Note that, if the above-mentioned single-precision data SD is formed by other bits such as 8 bits, 64 bits, etc., a double-precision data WD can be formed by 16 bits, 128 bits, etc. Also, the above-mentioned add operation pipeline or multiply operation pipeline can be formed by a single-chip LSI. As explained above, according to the present invention, in a single-precision data processing, no space remains in a memory (vector registers) and in bit lines, and further, single-precision operations can be carried out at a high speed.

Claims: A data processing system comprising: receiving means for receiving first data (SX1), second data (SX2), third data (SY1), and fourth data (SY2), each of said first to fourth data forming individual single-precision data in a single-precision operation mode, said first and second data forming first double-precision data (WX) in a double-precision operation mode, said third and fourth data forming second double-precision data (WY) in a double-precision operation mode; a single-precision operation unit (156), connected to said receiving means, for performing a single-precision operation upon said first and third data to obtain first single-precision result data (SFO) in a single-precision operation mode; and a second operation unit (152), connected to said receiving means; characterised in that: said receiving means comprises first, second, third and fourth receiving means for receiving said first to fourth data respectively in a single operation; said single-precision operation unit (156) is connected to said first and third receiving means; a first conversion unit (154) is provided, connected to said second and fourth receiving means, for converting said second and fourth data of a single-precision data type into third and fourth double-precision data (WFX, WFY), respectively, in a single-precision operation mode; said second operation unit (152) is a double-precision operation unit, connected to said first to fourth receiving means, and to said first conversion unit, for performing a double-precision operation upon said third and fourth double-precision data in a single-precision operation mode and performing a double-precision operation upon said first and second double-precision data in a double-precision operation mode, to obtain double-precision result data (WFO); and in that a second conversion unit (155) is provided, connected to said double-precision operation unit, for converting said double-precision result data to second single precision result data (SF1) in a single-precision operation mode. A system as set forth in claim 1, further comprising a selector (151'), connected to a prestage of said double-precision operation unit, for selecting said third and fourth double-precision data in a single-precision operation mode, and selecting said first and second double-precision data in a double-precision operation mode. A system as set forth in claim 1, wherein said single-precision and double-precision operation units comprise adders. A system as set forth in claim 1, wherein said single-precision and double-precision operation circuits comprise multipliers. A system as set forth in claim 1, further comprising: vector registers (14) each storing a plurality of double-precision data or a plurality of pairs of single-precision data (AO, DO; Al, D1;...); and internal double-precision buses connected between said vector registers and said first to fourth receiving means, and connected between said vector registers and said transmitting means. A system as set forth in claim 1, further comprising: a data bus which can transmit double-precision data or two sets of single-precision data in parallel therethrough; a first means, connected to said data bus, for supplying said double-precision data to said data bus during a double-precision operation mode and supplying said two sets of single-precision data to said data bus during a single-precision operation mode; and a second means, connected to said data bus for supplying the double-precision data on said data bus to said second operation unit during the double-precision operation mode, and supplying one of the two sets of single-precision data to said single-precision operation unit and the other to said second conversion unit during the single-precision operation mode. A system is set forth in any preceding claim, further comprising: transmitting means (155'), connected to said single-precision operation unit, said second conversion unit, and said double-precision operation unit, for transmitting said first and second single-precision result data (SFO + SF1) to the exterior in a single-precision operation mode, and transmitting said double-precision result data (WFO) to the exterior in a double-precision operation mode. A data processing method comprising the steps of: inputting two sets of data (WX, WY; SX1, SX2, SY1, SY2); performing a double-precision operation upon double-precision data formed by combining the two sets of data (WX, WY) during a double-precision operation mode; characterized by the steps of: converting a part of the two sets of data (SX2, SY2) into double-precision data (WFX, WFY) during a single-precision operation mode; performing a double-precision operation upon the converted double-precision data (WFX, WFY) during the single-precision operation mode to form processed data (WFO); converting the processed data (WFO) into first single-precision data (SF1) during the single-precision operation mode; and performing a single-precision operation upon the non-converted part of the two sets of data (SX1, SY1) to produce second single-precision data, during the single-precision operation mode, concurrently with the double-precision operation upon the converted double-precision data (WFX, WFY). A method as set forth in claim 8, further comprising a step of parallelly storing the first and second single-precision data.

Inventors: HATTA KOICHI, KUROIWA KOICHI, HATTA, KOICHI, KUROIWA, KOICHI
Applicants: FUJITSU LTD, FUJITSU LIMITED
Application year: 1991
Main classification: G06F7
IPC codes: G06F7, G06F9