ALU capable of simultaneously executing a plurality of operations

Abstract: An operation unit has operation circuits (aL, aH), temporary registers (xL, yL, xH, yH) arranged just before the operation circuits, registers (R1, R2, R3, R4) arranged if required, and data buses (d1L, d2L, d1H, d2H) for transferring data among the operation circuits, temporary registers, and registers. Data to be processed are divided, are transferred to the operation circuits through the data buses, and are simultaneously and independently processed by the operation circuits. When a result of the preceding operation affects the following operation, data except the result of the preceding operation are transferred from the registers to the temporary registers before starting the operations. These techniques shorten a processing time.

Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a high-speed operation unit, and particularly, to an operation unit applicable to a high-speed microprocessor. 2. Description of the Prior Art Figure 1 shows a conventional operation unit that processes 16-bit data at the maximum. The operation unit has a 16-bit operation circuit 103 and temporary registers x101 and y102 directly connected to the data input of the operation circuit 103, to temporarily hold data to be processed. The temporary registers x101 and y102 are connected to 16-bit data buses d1 and d2. The output of the operation circuit 103 is connected to any one of the data buses d1 and d2. For the sake of explanation, the operation unit shown in Fig. 1 has 8-bit registers R1, R2, R3, and R4. The registers R1 and R2 are paired to form a 16-bit register R12, and the registers R3 and R4 are paired to form a 16-bit register R34. The data bus d1 is divided into a lower 8-bit bus d1L and a higher 8-bit bus d1H, and the data bus d2 is divided into a lower 8-bit bus d2L and a higher 8-bit bus d2H. Each of the registers R1 to R4 is connected to all of the 8-bit buses d1L, d2L, d1H, and d2H. During an 8-bit operation, the registers R1 to R4 are connected to the lower 8-bit buses d1L and d2L, and "0" is given to the higher 8-bit buses d1H and d2H when reading, the contents of the registers. A 16-bit operation processed by the operation unit shown in Fig. 1 will be explained with reference to a timing chart shown in Fig. 2. In Fig. 2, "r1" to "r4" are the contents of registers R1 to R4, respectively. And "r12" and "r34" indicate the contents of register pairs R12 and R34, respectively. For example, the contents of the register pair R12, in which the register R1 holds higher 8 bits and the register R2 holds lower 8 bits, are added to the contents of the register pair R34, in which the register R3 holds higher 8 bits and the register R4 holds lower 8 bits, and a result of the operation is written to the register pair R12. Namely, R12 + R34 --> R12. In the first state, the contents of the register pair R12 are transferred to the data bus d1. Namely, the contents of the register R1 are transferred to the higher 8-bit bus d1H, and the contents of the register R2 are transferred to the lower 8-bit bus d1L. At the same time, the contents of the register pair R34 are transferred to the data bus d2. Namely, the contents of the register R3 are transferred to the higher 8-bit bus d2H, and the contents of the register R4 are transferred to the lower 8-bit bus d2L. Thereafter, the contents of the register pair R12 on the data bus d1 are written to the temporary register x101, and the contents of the register pair R34 on the data bus d2 are written to the temporary register y102. In response to an operation control signal f, an addition instruction is given to the operation circuit 103, and "0" is given to a carry input Cin. Then, the operation circuit 103 calculates x + y. In the second state, the operation circuit 103 provides the data bus d1 with a result of the operation. Namely, the operation circuit 103 provides the higher 8-bit bus d1H with higher 8 bits of the result, and the lower 8-bit bus d1L with lower 8 bits of the result. The result on the data bus d1 is written to the register pair R12. In Fig. 2, "carry" indicates a carry caused by adding the contents of the registers R2 and R4. An 8-bit operation processed by the operation unit of Fig. 1 will be explained with reference to a timing chart of Fig. 3. For example, the contents of the register R1 are added to the contents of the register R2, and a result of the operation is written to the register R1. Further, the contents of the register R4 are subtracted from the contents of the register R3, and a result of the operation is written to the register R3. Although these operations are 8-bit operations, the operation unit shown in Fig. 1 processes them as 16-bit operations one by one. Namely, the operation of R1 + R2 --> R1 is firstly processed, and then, the operation of R3 - R4 --> R3 is processed. In the first state, the contents of the registers R1 and R2 are transferred to the data buses d1L and d2L, respectively. At this time, the data buses d1H and d2H receive "0." The data on the data buses are transferred to the temporary registers x101 and y102, respectively. In response to the operation control signal f, an addition instruction is given to the operation circuit 103, and "0" is given to the carry input Cin. Then, the operation circuit 103 calculates x + y. In the second state, the operation circuit 103 provides the data bus d1L with a result of the calculation, which is stored in the register R1. In the third state, the contents of the registers R3 and R4 are transferred to the data buses d1L and d2L, respectively, and "0" is given to the data buses d1H and d2H. The data on the data buses d1 and d2 are written to the temporary registers x101 and y102. In response to the operation control signal f, a subtraction instruction is given to the operation circuit 103, and "0" is given to the carry input Cin. Then, the operation circuit 103 calculates x - y. In the fourth state, the operation circuit 103 provides the data bus d1L with a result of the operation, which is written to the register R3. In this way, the conventional operation unit must handle 8-bit operations as 16-bit operations, to idle the higher 8 bits of the operation circuit 103. Since the conventional operation unit must execute 8-bit operations one by one, it needs four states in the case of the above example. Another operation of the operation unit shown in Fig. 1 that uses a result of the preceding operation will be explained with reference to a timing chart shown in Fig. 4. For example, the contents of the register R1 are added to the contents of the register R2, and a result of the operation is written in the register R1. Thereafter, the new contents of the register R1 are subtracted from the contents of the register R3, and the difference is written to the register R3. The operation unit shown in Fig. 1 must process these operations as 16-bit operations, so that the contents of the register R3 will not be written to the temporary registers x101 or y102 before the first operation of R1 + R2 --> R1 is completed. Accordingly, the process of R3 - R1 --> R3 is carried out only after the completion of the process R1 + R2 --> R1. In the first state, the contents of the registers R1 and R2 are transferred to the data buses d1L and d2L, respectively, and "0" is given to the data buses d1H and d2H. The data on the data buses d1 and d2 are written to the temporary registers x101 and y102, respectively. In response to the operation control signal f, an addition instruction is given to the operation circuit 103, and "0" is given to the carry input Cin. Then, the operation circuit 103 calculates x + y. In the second state, the operation circuit 103 provides the data bus d1L with a result of the operation, i.e., the sum of the contents of the registers R1 and R2, which is written to the register R1. In the third state, the contents of the registers R3 and R1 are transferred to the data buses d1L and d2L, respectively, and "0" is given to the data buses d1H and d2H. The data on the data buses d1 and d2 are written to the temporary registers x101 and y102, respectively. In response to the operation control signal f, a subtraction instruction is given to the operation circuit 103, and "0" is given to the carry input Cin. Then, the operation circuit 103 calculates x - y. In the Fourth state, the operation circuit 103 provides the data bus d1L with a result of the operation, i.e., a difference between the contents of the registers R3 and R1, which is written to the register R3. In this way, the conventional operation unit processes 8-bit operations one by one although it is a 16-bit operation unit, and requires four states in the case of the above example. Namely, it processes an 8-bit binary operation only after the completion of the preceding 8-bit binary operation. Since the conventional operation unit is incapable of simultaneously processing a plurality of operations, it involves a long processing time. WO-A-8203481 discloses processors or performing Fast Fourier Transformations. In order to achieve a device capable of a high degree of parallel processing, a structure is proposed that allows a direct interconnection between anyone of a plurality of registers and an arithmetic logic unit. Also, a system is shown, in which a plurality of bit-slice processors are provided in conjunction. There is a bus for real data and a bus for imaginary data. The 16-bit real data and the 16-bit imaginary data are split into two times 8-bit data in a real processor and an imaginary processor, respectively. Each of the real processor and imaginary processor comprise two bit-slice processors. It is described that each bit-slice processor is under independent or interdependent control of external microcode through control buses. From Hewlett-Packard Journal, vol. 33, no. 3, March 1982, Palo Alto US, pages 3-11, F. Amerson et al. "High performance Computing With Dual ALU Architecture and ECL Logic" it is mentioned that two 16-bit ALUs can be linked together to perform 32-bit calculations. From patent abstracts of Japan, vol. 11, no. 107, (P-563) [2554], 4. April 1987 & JP-A-61255433 an arithmetic unit is known which executes the calculation of 32-bit data by providing two sets of ALU parts for 16-bit data. The two ALU parts are controlled by an external carrying signal and signals provided by a selector. The unit can be operated as an arithmetic unit for 32-bit data, and as two sets of arithmetic units for 16-bit data, where swapping circuits are provided in the latter case, so that the data can be calculated by any ALU part. SUMMARY OF THE INVENTION An object of the present invention is to provide an operation unit that is capable of simultaneously processing a plurality of operations, to shorten processing time. This object is solved by an operation unit according to claim 1. Advantageous embodiments are described in the subclaims. In order to accomplish the object, the present invention provides an operation unit shown in Fig. 5. This operation unit handles data of "m" bits at the maximum and "n" bits at the minimum. The operation unit has n-bit operation circuits (1, 2, or more generally, 1, 2, 3, ... k), first hold means such as temporary registers (3, 4, 5, 6, ...), transfer units (7), second hold means such as registers (R1, R2, R3, R4, ...), and data buses (d1L, d1H, d2L, d2H, or more generally, d1 1 , d1 2 , d1 3 , ..., d1 k , d2 1 , d2 2 , d2 3 , ..., d2 k ).The operation circuits are independent of one another. The first hold means are arranged just before the respective operation circuits, to temporarily hold n-bit data to be given to the respective operation circuits. Each of the transfer units transfers a carry from the preceding operation circuit to the following operation circuit. The second hold means hold data. The data buses are paths for transmitting data among the operation circuits, the first and second hold means. When processing data of "n" bits or greater, the second hold means provide the operation circuits with n-bit data, and the operation circuits simultaneously process the data. When required, a lower one of the operation circuits provides the following processor with a carry. In this way, the operation circuits are independently and simultaneously operated to process data of "m" bits or smaller. Alternatively, the operation circuits are sequentially operated such that a result of operation of one operation circuit is given to the next operation circuit. If a given operation requires a result of the preceding operation, data except the result of the preceding operation are transferred to the first hold means in advance. Other and further objects and features of this invention will become obvious upon an understanding of the illustrative embodiments about to be described in connection with the accompanying drawings or will be indicated in the appended claims, and various advantages not referred to herein will occur to one skilled in the art upon employing of the invention in practice. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 shows an operation unit according to a prior art; Figs. 2 to 4 are timing charts showing the operations of the prior art; Fig. 5 shows an operation unit according to an embodiment of the present invention; and Figs. 6 to 8 are timing charts showing the operations of the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS Various embodiments of the invention will be described with reference to the accompanying drawings. It is to be noted that the same or similar reference numerals are applied to the same or similar parts and elements throughout the drawings, and the description of the same or similar parts and elements will be omitted or simplified. Figure 5 shows an operation unit according to an embodiment of the present invention. The operation unit has 8-bit operation circuits aL1 and aH2. Temporary registers xL3 and yL4 are directly connected to the data input of the operation circuit aL1, and temporary registers xH5 and yH6 are directly connected to the data input of the operation circuit aH2, to temporarily hold data to be processed. A selector 7 transfers a carry from the operation circuit aL1 to the operation circuit aH2. Data buses d1L, d2L, d1H, and d2H are paths for transferring data among the operation circuits aL1 and aH2 and temporary registers xL3, yL4, xH5, yH6. For the sake of explanation, the operation unit shown in Fig. 5 has 8-bit registers R1, R2, R3, and R4 for holding operation data and operation result data. The registers R1 to R4 may be other storage elements. The operation circuits aL1 and aH2 handle 8-bit data, so that a maximum data width to be handled by the operation unit is 16 bits. The operation circuits aL1 and aH2 process operations according to operation control signals fL and fH, respectively. During an 8-bit operation, the operation circuits aL1 and aH2 independently operate, and during a 16-bit operation, they cooperate with each other with the operation circuit aL1 handling lower 8 bits and the operation circuit aH2 handling higher 8 bits. At this time, the carry output of the operation circuit aL1 is connected to the carry input of the operation circuit aH2. The temporary registers xL3 and yL4 handle each lower 8 bits and are connected to the data buses d1L and d2L, respectively. The temporary registers xH5 and yH6 handle each higher 8 bits and are connected to the data buses d1H and d2H, respectively. In response to the operation control signal fL, the operation circuit aL1 processes an operation on data in the temporary registers xL3 and yL4, and provides a result of the operation. In response to the operation control signal fH, the operation circuit aH2 processes an operation on data in the temporary registers xH5 and yH6, and provides a result of the operation. The registers R1 and R2 are paired into a 16-bit register R12, and the registers R3 and R4 are paired into a 16-bit register R34. The registers R1 to R4 are connected to any one of the data buses d1L, d2L, d1H, and d2H. During a 16-bit operation, the registers R1 and R3 are connected to the data bus d1H or d2H, and the registers R2 and R4 are connected to the data bus d1L or d2L. Data are transferred to the temporary registers xL3, yL4, xH5, and yH6, and an operation result is provided in a later state. The register pairs R12 and R34 are connected to the data inputs of the temporary registers xL3, yL4, xH5, and yH6, as well as to the data outputs of the operation circuits aL1 and aH2 through the 16-bit data buses d1 and d2. The 16-bit data bus d1 is divided into the lower 8-bit bus d1L and the higher 8-bit bus d1H, and the 16-bit data bus d2 is divided into the lower 8-bit bus d2L and the higher 8-bit bus d2H. The data output of the operation circuit aL1 is connected to the data bus d1L or d2L, and the data output of the operation circuit aH2 is connected to the data bus d1H or d2H. The selector 7 selects a carry output CoutL of the operation circuit aL1 or a carry input FCinH according to an operation control signal g, and provides the operation circuit aH2 with a carry input CinH. A 16-bit operation of the operation unit of the embodiment will be explained with reference to a timing chart shown in Fig. 6. This figure corresponds to Fig. 2 of the prior art. For example, the contents of the register pair R12 are added to the contents of the register pair R34, and a result of the operation is written to the register pair R12. In Fig. 6, "r12" and "r34" indicate the contents of the register pairs R12 and R34, respectively. In the first state, the contents of the register pair R12 are transferred to the data bus d1, and the contents of the register pairs R34 are transferred to the data bus d2. The contents of the register R2 on the data bus d1L are written to the temporary register xL3, the contents of the register R1 on the data bus d1H are written to the temporary register xH5, the contents of the register R4 on the data bus d2L are written to the temporary register yL4, and the contents of the register R3 on the data bus d2H are written to the temporary register yH6. In response to the operation control signals fL and fH, an addition instruction is given to each of the operation circuits aL1 and aH2. In response to the operation control signal g, the carry output CoutL of the operation circuit aL1 is connected to the carry input CinH of the operation circuit aH2. The carry input CinL of the operation circuit aL1 receives "0." The operation circuit aL1 calculates xL + yL and provides the carry output CoutL, and the operation circuit aH2 calculates xH + yH + CinH . In the second state, the operation circuit aL1 provides the data bus d1L with a result of the operation, which is written to the register R2, and the operation circuit aH2 provides the data bus d1H with a result of the operation, which is written to the register R1. In this way, the embodiment of the present invention completes the 16-bit operation shown in Fig. 6 in two states similar to the prior art of Fig. 2, so that there is no difference between the processing speeds of the present invention and the prior art in connection with the 16-bit operation. Eight-bit operations of the present invention will be explained with reference to a timing chart shown in Fig. 7. For example, similar to the prior art of Fig. 3, the contents of the register R1 are added to the contents of the register R2, and a result of the operation is written to the register R3. At the same time, the contents of the register R4 are subtracted from the contents of the register R3, and a result of the operation is written to the register R3. In the first state, the contents of the registers R1 to R4 are transferred to the data buses d1L, d2L, d1H, and d2H, respectively, and are written to the temporary registers xL3, yL4, xH5, and yH6, respectively. In response to the operation control signal fL, an addition instruction is given to the operation circuit aL1, and "0" is given to the carry input CinL of the operation circuit aL1. At the same time, in response to the operation control signal fH, a subtraction instruction is given to the operation circuit aH2. In response to the operation signal g, the carry input FCinH is connected to the carry input CinH of the operation circuit aH2, and "0" is given to the carry input FCinH. Then, the operation circuit aL1 calculates xL + yL, and the operation circuit aH2 calculates xH - yH. In the second state, the operation circuits aL1 and aH2 provide the data buses d1L and d1H with results of the operations, respectively, which are written to the registers R1 and R3, respectively. In this way, the present invention simultaneously carries out the two 8-bit operations in two steps. On the other hand, the prior art of Fig. 1 needs four states to process the same operations, as shown in Fig. 3. This is because the prior art must process 8-bit operations as 16-bit operations, to waste-the higher 8 bits of the operation circuit 103. Namely, the prior art must process 8-bit operations one by one. Consequently, the present invention is capable of processing 8-bit operations speedier than the prior art. Another operation of the present invention will be explained with reference to a timing chart shown in Fig. 8. This operation corresponds to the operation shown in Fig. 4 of the prior art. Namely, an operation is processed on a result of the preceding operation. In this case, the present invention does not simultaneously process these operations, and therefore, processes the operations in two steps with the first step involving first and second states and the second step involving the second state and the third state. For example, the contents of the register R1 are added to the contents of the R2, and a result of the operation is written to the register R1. Then, the new contents of the register R1 are subtracted from the contents of the register R3, and the difference is written to the register R3. In the first state, the contents of the registers R1 to R3 are transferred to the data buses d1L, d2L, and d1H, respectively, and are written to the temporary registers xL3, yL4, and xH5, respectively. In response to the operation control signal fL, an addition instruction is given to the operation circuit aL1, and "0" is given to the carry input CinL of the operation circuit aL1. Then, the operation circuit aL1 calculates xL + yL. In the second state, the operation circuit aL1 provides the data bus d2L with a result of the operation, i.e., the sum of the contents of the registers R1 and R2. The sum is written to the register R1 as well as to the temporary register yH6. In response to the operation control signal fH, a subtraction instruction is given to the operation circuit aH2. In response to the operation control signal g, the carry input FCinH is connected to the carry input CinH of the operation circuit aH2, and "0" is given to the carry input FCinH. Then, the operation circuit aH2 calculates xH - yH. In the third state, the operation circuit aH2 provides the data bus d2H with the difference between the contents of the register R3 and the new contents of the register R1, which is written to the register R3. Unlike the prior art of Fig. 4 that processes these 8-bit operations one by one in four states, the present invention of Fig. 8 finishes the same operations in three states. This is because the present invention writes, in the first state, part of data that is needed in the next state to the temporary register. It is possible, according to the present invention, to write the partial data, i.e., the contents of the register R3 in the above example to the temporary register in the second state. In addition, the present invention writes a result of an operation to one of the registers as well as to one of the temporary registers. These are the reasons why the present invention is capable of reducing the number of processing states by one compared with the prior art. Namely, the present invention is capable of shortening a processing time by one to two states when continuously processing 8-bit operations. The operation unit according to the present invention, therefore, is appropriate for technical fields that need a high processing speed. Various modifications will become possible for those skilled in the art after receiving the teachings of the present disclosure without departing from the scope of the invention as defined in the appended claims.

Claims: An operation unit for handling data of "m" bits at the maximum and "n" bits at the minimum, comprising: plural n-bit operation circuits (1, 2) each having two data input terminals for receiving data to permit a data processing operation to be performed on said data, one carry input terminal for receiving a carry, and one data output terminal for providing a result of the data processing operation, and at least one of said plural n-bit operation circuits (1, 2) having carry output terminal for providing the carry, characterized by plural first hold elements (3, 4, 5, 6) disposed just before and connected to each of said data input terminals of said n-bit operation circuits (1, 2) and temporarily holding n-bit data given to each of said data input terminals; plural sets of data buses (d1 L , d2 L , d1 H , d2 H ), each set including at least two data buses (d1 L , d2 L , d1 H , d2 H ) directly connected to said first hold elements (3, 4, 5, 6) disposed before an associated one of said n-bit operation circuits (1, 2) respectively to provide said data to said two data input terminals and directly connected to said data output terminal of the associated one of said n-bit operation circuits (1, 2) to collect data from said data output terminal; and control lines connected to each of said n-bit operation circuits (1, 2) for supplying control signals (f L , f H ) to establish plural different data processing modes comprising: a first mode in which at least two of said n-bit operation circuits (1, 2) receive data simultaneously from said data buses (d1 L , d2 L , d1 H , d2 H ) to process data in a mutually exclusive and independent manner; a second mode in which at least two of said n-bit operation circuits (1, 2) receive data simultaneously from said data buses (d1 L , d2 L , d1 H , d2 H ) to process data in a mutually cooperative manner, wherein the output carry of the n-bit operation circuit of lower significance is transferred to the next operation circuit of higher significance; and a third mode in which one of said n-bit operation circuits (1, 2) receives data from said data buses (d1 L , d2 L , d1 H , d2 H ) to perform a first data processing operation, and then, the result of said first data processing operation is being fed to another one of said n-bit operation circuits (1, 2) to perform a second data processing operation executing further sequential data processing that modifies the result of said first data processing operation. An operation unit as claimed in claim 1, characterized by: plural second hold elements (R1, R2, R3, R4) connected to the plural sets of data buses (d1 L , d2 L , d1 H , d2 H ) and storing data to be processed and resultant data; and transfer carry elements (7) connected between said carry output terminal and said carry input terminal, operating with an operation control signal and a carry input signal so as to receive the carry associated with the result obtained from a data processing operation of one of said n-bit operation circuits (1, 2) through said carry output terminal and to forward the carry to said carry input terminal of another one of said n-bit operation circuits (1, 2). An operation unit as claimed in claim 2, characterized in that said second hold element (R1, R2, R3, R4) are registers.

Inventors: BANNO MORIYASU, BANNO, MORIYASU
Applicants: TOSHIBA KK, KABUSHIKI KAISHA TOSHIBA
Application year: 1994
Main classification: G06F7
IPC codes: G06F7