Abstract:
In a microprocessor having a floating-point execution unit, a floating-point bus control apparatus for performing dual-operation instructions includes a multiplier unit having first and second multiplexed operand inputs, an adder unit also having first and second multiplexed operand inputs, a register for storing real and imaginary components of a constant, another register for storing an intermediate result of the multiplier unit and appropriate interconnections. The floating-point unit of the processor supplies first and second instruction source operands and a destination floating-point register. Multiplexers are used to select which operands are to be input to the appropriate operand inputs so as to implement the corresponding dual-operation algorithm.

Description:
This is a continuation of application Ser. No. 07/309,430, filed Feb. 10, 1989, now abandoned. 
    
    
     FIELD OF THE INVENTION 
     The invention relates to the field of semiconductor microprocessors. 
     BACKGROUND OF THE INVENTION 
     The present invention covers a bus control apparatus arrangement forming part of a floating-point unit within a microprocessor. The microprocessor utilized with the present invention is the Intel 860™ Microprocessor, frequently referred to as the N10™ processor. (Intel is a registered trademark of Intel Corporation). 
     The N10 processor is a 32/64-bit IEEE compatible floating-point processor, a 32-bit RISC integer processor and a 64-bit 3-dimensional graphics processor. Using a numerics processor optimized for both vector and scalar operations, it represents the industry&#39;s first integrated high performance vector processor incorporating over one million transistors and providing about 1/2 the performance of the Cray1, all on a single chip. The N10 processor uses pipelined floating-point units to achieve extremely fast execution rates. 
     As will be seen, the present invention provides a highly optimized bus control apparatus for the floating-point hardware of the N10 processor. This bus control apparatus supports simultaneous (dual) operation of a multiplier and an adder unit. These dual-operations support the most commonly used software algorithms such as sum of products, DAXPY, FFT, etc. 
     Normally, in the instructions of a microprocessor, the source operands and destinations are specified from a set of floating-point registers. In most systems, this set of floating-point registers usually supplies two source operands and one destination operand. The three operand arrangement is sufficient for doing simple add or multiply operations. However, to perform dual-operations such as an add or multiply simultaneously, three more operands (for a total of six) need to be supplied. Because it is very inefficient to require the floating-point register file to deal with six operands, prior art microprocessors typically perform dual-operations serially. In other words, an add is first performed followed by a multiply, or vice versa. 
     An alternative to serial operation is to perform both multiply and add operations in parallel. One widely adopted approach is known as a multiply cumulate operation. In the multiply cumulate operation, the multiplier gets two source operands from the floating-point register file. One of the operand inputs to the adder receives the result output of the multiplier. The other source operand input to the adder is coupled to the result output of the adder itself, in a sort of feedback arrangement. The arithmetic operation simulated is basically a cumulation of the sum of products. The chief drawback of the multiply cumulate operation is that it is only capable of implementing a simple kind of operation, i.e., a sum of products. This is because the interconnects are generally &#34;hard-wired&#34; in a fixed arrangement. Because of the desire to implement a variety of algorithms, what is needed is an apparatus which is substantially more generalized and can handle a broader range of operations. It would be advantageous to have a bus control apparatus that could implement complex algorithms in a much more efficient manner. As will be seen, the present invention permits a broad range of parallel operations, or algorithms, to be executed in an efficient manner. This capability enhances the presently described microprocessor when compared to prior art processors. 
     SUMMARY OF THE INVENTION 
     A bus control apparatus for performing dual arithmetic operations in a microprocessor capable of executing floating-point operations is described. The microprocessor provides first and second floating-point source instruction operands and a floating-point destination register. A multiplier means is used to multiply first and second operands to produce a first result. An adder means is used for adding third and fourth operands to produce a second result. The present invention also includes a register means for storing real and imaginary portions of a constant used for performing inner loop calculations for a given algorithm, and also for temporarily storing the first result produced by the multiplier. Data path control means are used for selecting one of a plurality of operands to be coupled to each of the operand inputs of the multiplier and the adder so as to realize a predetermined algorithm in a parallel manner. This aspect of the present invention permits a wide variety of algorithms, combining both multiply and add operations in parallel, to be implemented within the microprocessor. 
     Finally, interconnections are provided in the bus control apparatus for connecting the plurality of operands (which may include the first result, the second result, first and second source operands, a constant or the temporarily stored first result) to the inputs of the data path control means. For a given algorithm implementation the data path control means determine which particular operand input is to be coupled to the appropriate input of either the multiplier or the adder. By way of example, sixteen different data paths implementing sixteen different software instructions, or algorithms, are shown in accordance with the teachings of the present invention. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The present invention will be understood more fully from the detailed description given below and from the accompanying drawings of the preferred embodiment of the invention, which, however, should not be taken to limit the invention to the specific embodiment but are for explanation and understanding only. 
     FIG. 1 illustrates the pipelined architecture of the processor associated with the floating-point bus control apparatus of the present invention. Three pipeline stages are shown. 
     FIG. 2 shows a preferred embodiment of the bus control apparatus of the present invention. 
     FIG. 3 shows the actual data-path selected for the mnemonics r2p1 and r2s1, as given in Table 1. Each mneumonic represents a particular software instruction. 
     FIG. 4 shows the actual data-path selected for the mnemonics r2pt and r2st, as given in Table 1. Each mneumonic represents a particular software instruction. 
     FIG. 5 shows the actual data-path selected for the mnemonics r2ap1 and r2as1, as given in Table 1. Each mneumonics represents a particular software instruction. 
     FIG. 6 is the actual data-path selected for the mnemonics r2apt and r2ast, as given in Table 1. Each mneumonic represents a particular software instruction. 
     FIG. 7 is the actual data-path selected for the mnemonics i2p1 and i2s1, as given in Table 1. Each mneumonic represents a particular software instruction. 
     FIG. 8 is the actual data-path selected for the mnemonics i2pt and i2st, as given in Table 1. Each mneumonic represents a particular software instruction. 
     FIG. 9 is the actual data-path selected for the mnemonics i2ap1 and i2as1, as given in Table 1. Each mneumonic represents a particular software instruction. 
     FIG. 10 is the actual dual-path selected for the mnemonics i2apt and i2ast, as given in Table 1. Each mneumonic represents a particular software instruction. 
     FIG. 11 is the actual data-path selected for the mnemonics rat1p2and rat1s2, as shown in Table 1. Each mneumonic represents a particular software instruction. 
     FIG. 12 is the actual data-path selected for the mnemonics m12apm and m12asm, as given in Table 1. Each mneumonic represents a particular software instruction. 
     FIG. 13 is the actual data-path selected for the mnemonics ra1p2 and ra1s2, as given in Table 1. Each mneumonic represents a particular software instruction. 
     FIG. 14 is the actual data-path selected for the mnemonics m12ttpa and m12ttsa, as given in Table 1. Each mneumonic represents a particular software instruction. 
     FIG. 15 is the actual data-path selected for the mnemonics iat1p2 and iat1s2, as given in Table 1. Each mneumonic represents a particular software instruction. 
     FIG. 16 is the actual data-path selected for the mnemonics m12tpm and m12tsm, as given in Table 1. Each mneumonic represents a particular software instruction. 
     FIG. 17 is the actual data-path selected for the mnemonics ia1p2 and ia1s2, as given in Table 1. 
     FIG. 18 is the actual data-path selected for the mnemonics m12tpa and m12tsa, as given in Table 1. Each mneumonic represents a particular software instruction. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     A floating-point bus control apparatus for use in performing parallel arithmetic operations is described. In the following description, numerous specific details are set forth, such as specific data-paths, etc., in order to provide a thorough understanding of the present invention. It will be obvious, however, to one skilled in the art that these specific details need not be used to practice the present invention. In other instances, well-known structures and circuits, such as adders and multipliers, have not been shown in detail in order not to unnecessarily obscure the present invention. 
     In the architecture of many modern microprocessors, the floating-point unit uses parallelism to increase the rate at which operations may be introduced into the unit. One type of parallelism is called &#34;pipelining&#34;. The pipelined architecture treats each operation as a series of more primitive operations (called &#34;stages&#34;) that can be executed in parallel. Consider just the floating-point adder unit of a processor as an example. Let A represent the operation of the adder. Let the stages be represented by A 1 , A 2 , and A 3 . The stages are designated such that A i+1  for one adder instruction can execute in parallel with A i  for the next adder instruction. Furthermore, each A i  can be executed in just one clock. The pipelining within the multiplier and vector integer units of the processor can be described similarly, except that the number of stages may be different. 
     FIG. 1 illustrates 3-stage pipelining as found in the floating-point adder (also in the floating-point multiplier when single-precision input operands are employed) of the processor incorporating the present invention. Each column of the figures represents one of the three stages of the pipeline. Each stage holds intermediate results and also (when introduced into the first stage by software) holds status information pertaining to those results. The figure assumes that the instruction stream consists of a series of consecutive floating-point instructions, all of one type (i.e., all adder instructions, or all single-precision multiplier instructions). The temporal relationship of the instructions is represented as i, i+1, i+2, etc. The rows of the figure represent the states of the unit at successive clock cycles. Each time a pipelined operation is performed, the status of the last stage becomes available to a status register (for example, in the N10 processor, the result is available in floating-point status register &#34;fsr&#34;). The result of the last stage of the pipeline is stored in rdest, the pipeline is advanced one stage and the input operands src1 and src2 are transferred to the first stage of the pipeline. The mnemonics src1 and src2 and rdest refer to one of the 32 floating-point registers located within the N10 processor. 
     In the N10 processor, the number of pipeline stages may range from one to three. A pipelined operation with a 3-stage pipeline stores the result of the third prior operation. A pipelined operation with a 2-stage pipeline stores the result of the second prior operation. A pipelined operation with a 1-stage pipeline stores the results of the prior operation. The N10 processor has four floating-point pipelines: one for the multiplier, one for the adder, one for the vector-integer unit and one for floating-point loads. The adder pipeline has 3 stages. The number of stages in the multiplier pipeline depends on the precision of the source operands in the pipeline; either 2 or 3 stages. The vector-integer unit has 1 stage for all precisions. The load pipeline has 3 stages for all precisions. 
     Referring to FIG. 2, a preferred embodiment of the present invention is shown. The floating-point bus control apparatus of FIG. 2 comprises a multiplier unit 24 and an adder unit 32. The internal design of units 24 and 32 is well-known within the field and will not be discussed here. Simply stated, they may comprise any ordinary digital multiplier or adder. The currently preferred embodiment uses a multiplier unit disclosed in copending U.S. Patent applications entitled &#34;Four-to-Two Adder Cell for Parallel Multiplication&#34;, now U.S. Pat. No. 4,901,270, issued on Feb. 13, 1990 and &#34;Sticky bit Predictor for Floating-Point Multiplication&#34;, now U.S. Pat. No. 4,928,259, issued on May 22, 1990 both of which are assigned to the assignee of the present invention. The adder unit of the currently preferred embodiment is disclosed in co-pending U.S. Patent applications entitled &#34;Prenormalization for a Floating-Point Adder&#34;, now U.S. Pat. No. 5,010,508, issued on Apr. 23, 1991, and &#34;Rounding Logic for Floating-Point Adder&#34;, now U.S. Pat. No. 5,027,308, issued on Jun. 25, 1991 both of which are also assigned to the assignee of the present application. 
     As illustrated, the bus control apparatus also comprises three special registers: KR register 22, KI register 21 and T register 30. (KI stands for constant imaginary, KR is constant real and T stands for temporary). These registers can store values from one dual-operation instruction and supply them as inputs to subsequent dual-operation instructions. The constant registers 22 and 21 can be used for storing the real and imaginary portions, respectively, of an operand src1. Those values may then be subsequently supplied to the multiply pipeline in place of src1. The T (temporary) register 30 is useful for storing the last-stage result of the multiplier pipeline and thereafter suppling that value to the adder pipeline in place of src1. 
     Also shown in FIG. 2 are data-path control members 23, 25, 31 and 33. Data path control members 23, 25, 31 and 33 are used to select the operand inputs to both the multiplier unit and the adder unit. Each of these control members (shown in FIG. 2 by a single horizontal line) typically may comprise a switching device such as a multiplexer or a controllable bus. The preferred embodiment currently uses ordinary multiplexers of a variety well-known in the art. 
     In operation, one operand out of a plurality of operands (shown by arrows directed into the horizontal lines representing the data-path control members) is selected to be coupled into either the multiplier or adder unit. For example, data-path control member 23, provides either the constant imaginary value stored in KI, the constant real value stored in KR or the source operand src1 to the first operand input of the multiplier unit 24 depending on which algorithm is to be implemented. In the preferred embodiment, control for each of the multiplexers 23, 25, 31 and 33 is provided by a 4-bit data-path control field (DPC) in the opcode. The DPC specifies the operands and also the loading of the special registers. 
     FIG. 2 shows the complete bus connection matrix used to realize all the possible algorithms supported by a preferred embodiment of the present invention. Thus, operand 1 of multiplier unit 24 is selected to be either KR, supplied from register 22, Kl from register 21 or src1 supplied along line 20. The determination of which one of these values becomes operand 1 (op1) of the multiplier is fixed by the particular encoding of the DPC. Similarly, operand 2 (op2) of the multiplier can either be src2, supplied from line 26, or the last stage result of the adder pipeline appearing on line 34. Control member 25 determines which of these two values becomes operand 2. Operand 1 of the adder can either be src1, connected from line 20, the temporary result value stored in T register 30, or the last stage result of the adder pipeline input along line 34. Control member 31 is used to select the appropriate data path for the operand 1 input of adder unit 32. Finally, operand 2 of adder 32 is selected to be either src2 from line 26, the last-stage result of the multiplier pipeline on line 27, or the last-stage result of the adder pipeline supplied on line 34. The control member, or multiplexor means, 33 is directed by the DPC to select which input operand becomes operand 2 of adder unit 32. The result provided by adder unit 32 along line 34 represents the rdest value which is coupled to one of the 32 floating-point registers of the processor. 
     Table 1 illustrates how various encodings of DPC select different data-paths and thereby implement different algorithms. Each value of DPC has a unique set of mnemonics associated with it. Mnemonics PFAM and PFSM correspond to the dual-operation instructions &#34;pipelined floating-point add and multiply&#34; and &#34;pipelined floating-point subtract and multiply&#34;, respectively. The actual data-paths realized for the dual-operation instructions given by the mnemonics of Table 1 are shown in FIGS. 3 through FIG. 18. 
     
                                           TABLE 1__________________________________________________________________________DPC ENCODING   PFAM  PFSM  M-Unit              M-Unit                   A-Unit                        A-Unit                             T  KDPC   Mnemonic    Mnemonic          op1 op2  op1  op2  Load                                Load*__________________________________________________________________________0000   r2p1  r2s1  KR  src2 src1 M result                             No No0001   r2pt  r2st  KR  src2 T    M result                             No Yes0010   r2ap1 r2as1 KR  src2 src1 A result                             Yes                                No0011   r2apt r2ast KR  src2 T    A result                             Yes                                Yes0100   i2p1  i2s1  Kl  src2 src1 M result                             No No0101   i2pt  i2st  Kl  src2 T    M result                             No Yes0110   i2ap1 i2as1 Kl  src2 src1 A result                             Yes                                No0111   i2apt i2ast Kl  src2 T    A result                             Yes                                Yes1000   rat1p2    rat1s2          KR  A result                   src1 src2 Yes1001   m12apm    m12asm          src1              src2 A result                        M result                             No No1010   ra1p2 ra1s2 KR  A result                   src1 src2 No No1011   m12ttpa    m12ttsa          src1              src2 T    A result                             Yes                                No1100   iat1p2    iat1s2          Kl  A result                   src1 src2 Yes                                No1101   m12tpm    m12tsm          src1              src2 T    M result                             No No1110   ia1p2 ia1s2 Kl  A result                   src1 src2 No No1111   m12tpa    m12tsa          src1              src2 T    A result                             No No__________________________________________________________________________ *If Kload is set, KR is loaded when operand1 of the multiplier is KR, Kl is loaded when operand1 of the multiplier is KL. 
    
     For purposes of illustration, consider an example whereby a programmer wishes to perform a matrix inversion. In the present invention, this is accomplished using the software instruction r2p1, illustrated in the actual data path of FIG. 3. In performing a matrix inversion, the inner loop of the algorithm assumes the mathematical relationship given below: 
     
         kV.sub.1 +V.sub.2 →V.sub.2 
    
     Where k represents a real number constant, while V 1  and V 2  are vector elements. Performing a matrix inversion involves multiplying each element of a vector by a certain constant then adding that result to a second vector, whereby the result is stored back into the second vector storage location. To implement this instruction, FIG. 3 shows the KR register coupled directly to the op1 input of the multiplier unit. The other input of the multiplier unit (op2) is coupled to the floating-point instruction operand src2. The output result of the multiplier unit is coupled to the op2 input of the adder unit and the op1 input of the adder unit is coupled to the src1 instruction operand of the floating-point unit. The src1 and src2 operands correspond to V 2  and V 1  in the above equation. The result from the adder unit is placed in the rdest register where it is then becomes the new value for vector V 2 . 
     Matrix inversion provides a good example of a dual-operation involving inner loop constants that can be done with the bus control apparatus of the present invention but cannot be easily performed using the traditional multiply cumulate operation. The multiply cumulate alternative is less desireable because it is generally less accurate, more difficult to program and is slower in producing results. (It should be noted that the traditional multiply cumulate operation is implemented by the m12apn software instruction as applied to the bus matrix of the present invention). 
     Whereas many alternations and modifications of the present invention will no doubt become apparent to the person of ordinary skill in the art after having read the foregoing description, it is to be understood that the particular embodiment shown and described by way of illustration is in no way intended to be considered limiting. For example, although this disclosure has shown a variety of algorithms that can be implemented, other matrix connections are possible to implement different algorithms. Therefore, reference to the details of the illustrated data path are not intended to limit the scope of the claims which themselves recite only those features regarded as essential to the invention. 
     Thus, a novel bus control apparatus for performing dual-operation instructions within a floating-point unit of a microprocessor has been described.