1. Field of the Invention
This application relates arithmetic structures in computer systems and more particularly to structures utilized in multiplication operations.
2. Description of the Related Art
Computer architectures may include many different types of multiply instructions with various input and output data precision. For example, single instruction multiple data (SIMD) multimedia instructions are typically implemented using partitioned input and output data. Also, in the same implementation, architectures are demanding large 64 bits multiplies.
Conventional floating point units (FPUs) support many data flows customized to a specific multiply instruction to create the best possible performance. By increasing the number of types of multiply data flows implemented independently in a micro-architecture causes the area, power, and costs to grow.
Many multimedia instruction set architectures define several signed and unsigned integer and single precision floating point instructions, which execute as a SIMD (single instruction, multiple data) operation, producing various precision results in parallel.
It would be desirable to implement the various multiplies required by a particular architecture in a single multiplier structure to provide a better area, power, and cost tradeoff for a performance level.
Accordingly, an embodiment of the invention provides for execution of SIMD and non-SIMD multiplies in one multiplier to save area, power, and cost with minimal impact on instruction latency and performance. The multiplies may be both integer and floating point operations.
In one embodiment, the invention provides a multiplication unit that includes a partitionable multiplier structure partitionable into two or more sub-tree structures. The multiplication unit responds to an indication of a first instruction type to configure the multiplier structure into the two or more sub-trees structure to perform multiple multiplication operations in parallel. The multiplication unit responds to an indication of a second instruction type to configure the sub-tree structure into a single data flow to perform a single multiplication operation.
In another embodiment, a method is provided for performing a multiplication operation using a partitionable data flow structure having a plurality of sub-trees. The method includes formatting one or more first operands, according to an instruction decode, by formatting at least a least significant bit in each data partition, each data partition corresponding to a sub-tree, that is adjacent to another data partition corresponding to another sub-tree. A second operand is supplied to each sub-tree of the partitionable multiplier structure; and the formatted one or more first operands are used to generate control signals for encoding the second operands to provide partial products supplied in each sub-tree.
In another embodiment, a method is provided for performing multiplication operations that includes configuring a partitionable tree structure to be a single tree structure in response to a first multiplication instruction decode and as a partitioned tree structure in response to a second multiplication instruction decode; and performing at least two multiplication operations in parallel in the partitioned tree structure in response to the second multiplication instruction decode and performing a single multiplication operation in the single tree structure in response to the first multiplication instruction decode.
The present invention may be better understood, and its numerous objects, features, and advantages made apparent to those skilled in the art by referencing the accompanying drawings in which the use of the same reference symbols in different drawings indicates similar or identical items.
Referring to
In addition to partitioning into the various trees, the multiplier structure 100 includes a format stage in order to support the partitioning. That is, the input operands are specially formatted to enable the sharing of hardware in the partitionable multiplier structure 100.
In a conventional multiply operation, a partial product is generated for each bit in the multiplier, which are then summed. With binary arithmetic, the multiplier is either a one or a zero, so each partial product is either the multiplicand (1× multiplicand) or 0 (0× multiplicand). The maximum number of partial products that need to be added corresponds to the number of non-zero bits in the multiplier. Booth encoding reduces the number of partial products utilizing multiple bits to determine each partial product. Booth encoding typically uses two current bits as well as the MSB of the previous two bits to determine the partial product.
Referring to
For SIMD instructions, the multiple data will be partitioned and formatted into the booth encoder. To avoid data from corrupting a neighboring booth encoder data, a duplicated bit will have to be generated. The duplicated bits will be on the edges of each partitioned sub-tree structure. These edge bits are 47, 31, and 15 as indicated in
In other contexts, for example when the partition is for four sixteen bit multiplies, an instruction may specify a signed multiplication with one or both of the operands being less than 16 bits. In such circumstances, the bits supplied to, e.g., Booth encoder 303 may require sign extension. Thus, the formatting performed by multiplexers 201-207 and any additional formatting logic for sign extension that is not explicitly shown, is dependent upon the instruction decode. The instruction decode specifies whether a non-SIMD scalar type multiplication (e.g. 64 bit operands) or a SIMD multiplication (e.g. 32 or 16 bit operands). The instruction decode may specify, e.g., a double precision multiplication operation, a single precision operation, an integer multiply, and may specify whether the operation is signed or unsigned. Thus, e.g., the instruction decode can specify whether sign extension is required because of a signed multiply having an operand used for the Booth encoding that is less than 16 bits.
Referring to
A 16 bit operand multiplied by a 16 bit operand will produce a 32 bit result. The four multiplication results are supplied in sum and carry representation on nodes 421, 423, 425 and 427. Those results are supplied to and selected by multiplexers 121 and 123 when the instruction specifies 16 bit SIMD operations. Thus, the instruction decode determines the multiplexer selects for multiplexers 121 and 123. Note that
The output format multiplexer has to take data from different stages of the Wallace tree depending on the output precision of the result. For example, for 16 bit multiples, the output format bypasses any additional carry-save-adders which would corrupt the final result data.
The utilization of the partitionable multiplier structure is further illustrated in
The embodiments described above are presented as examples and are subject to other variations in structure and implementation within the capabilities of one reasonably skilled in the art. The details provided above should be interpreted as illustrative and not as limiting. Variations and modifications of the embodiments disclosed herein, may be made based on the description set forth herein, without departing from the scope of the invention as set forth in the following claims.
Number | Name | Date | Kind |
---|---|---|---|
4953119 | Wong et al. | Aug 1990 | A |
5450607 | Kowalczyk et al. | Sep 1995 | A |
5487022 | Simpson et al. | Jan 1996 | A |
5636351 | Lee | Jun 1997 | A |
5669010 | Duluk, Jr. | Sep 1997 | A |
5673407 | Poland et al. | Sep 1997 | A |
5675526 | Peleg et al. | Oct 1997 | A |
5761103 | Oakland et al. | Jun 1998 | A |
5809292 | Wilkinson et al. | Sep 1998 | A |
5867415 | Makino | Feb 1999 | A |
5867724 | McMahon | Feb 1999 | A |
6035318 | Abdallah et al. | Mar 2000 | A |
6202077 | Smith | Mar 2001 | B1 |
6243728 | Farooqui et al. | Jun 2001 | B1 |
6631392 | Jiang et al. | Oct 2003 | B1 |
6714197 | Thekkath et al. | Mar 2004 | B1 |
7043518 | Simon et al. | May 2006 | B2 |
7099910 | Brooks et al. | Aug 2006 | B2 |
20020042805 | Ferroussat | Apr 2002 | A1 |