GB2397674A - Multiplier accumulator unit with a Wallace tree coupled to an adder and a controller - Google Patents

Multiplier accumulator unit with a Wallace tree coupled to an adder and a controller Download PDF

Info

Publication number
GB2397674A
GB2397674A GB0407413A GB0407413A GB2397674A GB 2397674 A GB2397674 A GB 2397674A GB 0407413 A GB0407413 A GB 0407413A GB 0407413 A GB0407413 A GB 0407413A GB 2397674 A GB2397674 A GB 2397674A
Authority
GB
United Kingdom
Prior art keywords
mac
adder
wallace tree
bit
block
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.)
Granted
Application number
GB0407413A
Other versions
GB0407413D0 (en
GB2397674B (en
Inventor
Yuyun Liao
Tom M Hameenanttila
David B Roberts
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.)
Intel Corp
Original Assignee
Intel Corp
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
Priority claimed from US09/470,836 external-priority patent/US6611856B1/en
Application filed by Intel Corp filed Critical Intel Corp
Publication of GB0407413D0 publication Critical patent/GB0407413D0/en
Publication of GB2397674A publication Critical patent/GB2397674A/en
Application granted granted Critical
Publication of GB2397674B publication Critical patent/GB2397674B/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/544Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices for evaluating functions by calculation
    • G06F7/5443Sum of products

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Complex Calculations (AREA)

Abstract

A Multiplier accumulator unit (MAC) with a structure for performing multiple addition operations, an adder and a controller is disclosed. The controller permits a first part of an operand or input to be operated on by the structure and a second operation to be done on a second part of the operand by the adder. The multiple addition structure may be a Wallace tree which may be a set of carry-save adders and the tree may be a four stage Wallace tree. The adder may be a carry-save adder. The MAC may have a Booth encoder coupled to the multiple addition structure. The MAC may have an internal storage medium which may be a plurality of accumulators. The accumulators may be coupled to the output of the adder. The controller may send a plurality of signals to the Wallace tree and the adder, for the Wallace to execute a part of an instruction while the adder executes another part of the instruction.

Description

1 2397674
PROCESSING MULTIPLY-ACCUMULATE OPERATIONS
iN A SINGLE CYCLE
Background
This invention relates to processor-based systems and, more particularly, to multiply-accumulate units.
A muitiply-accumuiate unit, or MAC, is a unit designed to perform multiplication operations. In a processor-based system, for example, such operations may be plentiful.
MACs may be implemented using a variety of logic. Because of the abundance of multiplication operations in some applications, the fastest performing MAC is generally preferred. The success of any MAC design may depend upon the power requirements, the available space which may be allocated to MAC; circuitry, and the intended use for the MAC, among other considerations.
Usually, however, a tradeoff between speed and cost makes the design of an optimally performing MAC difficult. The cost may come in the form of additional hardware, the chip space necessary to accommodate that hardware, or in the power needed to drive the hardware.
For example, in many digital signal processing, or DSP, applications, some critical operations may involve a series of multiplications and or accumulations. Accordingly, a high-throughput MAC is essential to achieving high performance. However, many DSP applications today require low power consumption, particularly in the portable electronics market.
Titus, there is a continuing need for a SAC which may achieve high throughput without excessively consuming power
Summary
According to the present invention there is provided an apparatus, comprising: a structure Thor performing maitipie addition operations; an adder; and a controller which permits a first operation to be performed on a portion of a first operand using the structure while the adder is performing a second operation on another portion of the first operand.
Also according to the present invention there is provided an apparatus comprlsmg: a Wallace tree; an adder; and a controller that sends a plurality of signals to cause the Wallace tree to execute a part of an instruction while the adder executes another part of the instruction.
Advantages and other features of the invention will become apparent from the following description, the drawings, and the claims.
Brief Description of the Drawinas
Figure 1 is a block diagram of a multiply accumulate unit according to one embodiment of the invention; Fires 2A and 2B are flow diagrams of a multiply operation performed using the MAC of Figure 1 according to one embodiment of the invention; Figure 3 is a chart of the performance time for 1 6-bit multiplication operations using the MAC of Figure 1 according to one enbo&ent of the invention; Figures 4A - 4C are flow diagrams of an implicit multiply operation performed using He MAC of Figure I according to one embodiment of the invention; and Figure is a flow diagram of a multiply operation using packed data instructions performed using the MAC of Figure 1 according to one embodiment of the invention.
Detailed Description
At the most basic level, a MAC may receive two integer values, multiply the values together and send out the result of the operation. For some applications, an additional constant value, an accumulate value, may be added to the result. So, the MAC may produce a result, d, from the multiplication of a multiplicand, a, and a multiplier, b, plus the accumulation of c, as shown in the following equation: d=(axb)+c Multiplication operations may essentially be performed as a series of additions of partial products. To achieve optimism performance, MACs may include features which perfonn addition operations more quickly or which reduce the number of necessary addition operations.
For example, a MAC typically includes a Booth encoder, also called a Booth recoder or Booth multiplier. A Booth encoder may reduce the number of stages used to perform the multiplication. The number of partial products that are added together thus may be reduced.
For example' for a 1 6-bit word, the number of partial products may be reduced from sixteen to eight, a factor of two.
Another feature which may be found in a MAC is known as a Wallace tree. Wallace trees are structures for performing multiple addition operations. Wallace trees typically include features, such as adders, to help perform the addition of multiple partial products.
For example, a Wallace tree may include a group of carry-save adders. A 3to-2 carry-save adder, for example, receives three inputs, a, b, and c, and produces two outputs, a sum, y, and a carry, z, as illustrated by the following equation: a+b+c=y+z*2 The output carry is "saved" for the next operation, thus, the name.
Wallace trees may organize carry-save adders or similar logic such that a number of input values typically produces two results, a sum value and a carry value. For example, a four-stage Wallace tree may include four stages of 3-to-2 carry-save adders. The four-stage Wallace tree may receive nine input vectors, and produce a sum vector and a carry vector as its result.
Another feature of many MAC designs is logic for adding all 'e bits of two -vectors, to produce a final result, for example. A carry look-ahead adder, or CLA, is one such logic device. The CLA may efficiently perfom, the addition of two multi-bit operands.
Especially for digital signal processing and other applications, the ability of the MAC to multiply 1 6-bit signed integers at a very fast rate is a paramount concern. To speed up the multiplication of 1 6-bit and even larger integer operations, the MAC could include additional circuitry. For example, each component of the MAC could be duplicated, such that multiple operations run simultaneously. Control logic to keep track of the parallel operations would be part of the MAC as well. However, the additional hardware may be costly, the available space may be limited, and additional power to support the new hardware may be used.
Another MAC design may pipeline the operations, such that a new multiply operation may be processed while a prior operation is not yet completed by the MAC hardware, somewhere down the pipeline. Pipelining may involve a number of stages of the operation being performed, each stage operating independently from the others. Pipelining may thus utilize additional control logic and hardware, such as registers, for temporarily storing the state of the two, three, or more, independent operations being conducted simultaneously by the MAC hardware. Although less costly than providing parallel hardware, the additional control logic may add to development cost and diminish available board or chip space.
Further, a MAC which supports pipeiining may run more slowly.
A higher throughput MAC may be implemented using conventional architectural features, without excessively impacting the cost or power requirements of the hardware. In some embodiments of the invention, a MAC design provides a single-cycle throughput for 16-bit multiplication operations by simultaneously operating two functional units of the MAC.
In Figure 1, a MAC 100 includes a Booth encoder 10, a multiplexer, or MUX, array 14, a Wallace free 20, and a cony look-ahead adder, or CLA, 30, according to one embodiment of the invention. The MAC 100 may receive two input values, a multiplicand, A, and a multiplier, B. as well as an accumulate data value, C. The input values A, B. and C may be 16-bit, 32-bit, or larger signed integer values, for example.
In one embodiment of the invention, the Booth encoder receives up to sixteen bits of the multiplier, B. at a time, and thus produces up to eight control signals 12a- 12h. The MI3X array 14 receives the eight control signals 12a- 12h from the Booth encoder 10 as well as receiving the multiplicand, A. The [v7( array 14 produces up to eight partial products, 16a - 16h, which are then sent to the Wallace tree 20.
In one embodiment of the invention, the Wallace tree 20 is a four-stage unit, including a plurality of carry-save adders (not shown). The Wallace tree 20 thus receives nine input signals and produces two output signals, a sum vector 22a and a carry vector 22b. The sum vector 22a and the carry vector 22b may subsequently be fed into the CLA 30, to be added together. Alternatively or simultaneously, the sum vector 22a and the carry vector 22b may be routed back to the MUX array 14, for further processing.
The MAC 100 includes 'three banks of Tiptops 6a - 6c. The "tip-flops 6 enable portions of the multiplicand A, the multiplier B. and the accumulate data C to be sent to ule other logic of the MAC 100 for processing. For example, if a 32-bit multiplier, B[31:0], is sent to the MAC 100 as part of a multiplication operation, the flip-flops 6b may toggle between two 16-bit portions, B[31:16] or B[15:0], controlling which portion of the multiplier B is sent to the Booth encoder 10.
The MAC 100 also includes MUXs 8a- Be. The MUXs 8 may control the receipt of a signal by a subsequent unit of the MAC 100. For example, the MUXs 8a - Sc work in conjunction with the flip-flops 6a - 6c to control which portion of the multiplicand A, the multiplier B. or the accumulator C may be received by the MUX array 14, the Booth encoder lo, or the Wallace tree 20, respectively. The Moms Ed control receipt of the sum vector 22a and the carry vector 22b by the CLA 30. The MUXs 8e enable the output value 34 from the CLA 30 to be sign-extended, if needed.
The MAC 100 includes two banks of MUXs and flip-flops units 24a and 24b which receive the output signals 22a and 22b from the Wallace tree 20. The MEXs and flip-flops unit 24a is used to feed part of the sum vector 22a and the carry vector 22b back to the MI3X allay 14. The portion 26a fed back to the MUX array 14 depends upon the type of operation being performed. Such feedback is a feature common to multi-stage MAC operations, such as for performing a 32-bit multiplication.
The MAC 100 includes a second hours and flip-ffops unit 24b, to which the sum vector 22a and the carry vector 22b are also sent. Subsequently, these values may be sent to the CLA 30 via the MUXs 8d. In one embodiment of the invention, the sum vector 22a and the carry vector 22b are sent to both units 24a and 24b simultaneously.
In some embodiments of the invention, the MAC 100 includes architeciZ.rai enhancements which may improve throughput for multiplication operations. For example, in one embodiment of the invention, me MAC l DO includes two registers, an accumulator A 32a and an accumulator B 32b. The accumulators 32 may receive the result vector 34 from the CLA 30. In one embodiment of the invention, the result vector 34 is-alternatively stored in the accumulators 32. For example, in a first operation, the result vector, which may be an intermediate result, is stored in the accumulator A 32a. In a subsequent operation, the subsequent result vector is stored in the accumulator B 32b.
The accumulators 32 are each connected to the MUXs 8c, for submission to the Wallace tree A). 'Lee configuration allows the values stored in either accumulator 3:z to be submitted to the Wallace tree 20 as the accumulate data instead of receiving the accumulated data from a source (C) external to the MAC 100. As will be shown below, the accumulators 32 may facilitate the throughput of operations performed in the MAC 100 in one embodiment of the invention.
The MAC l OO may support implicit instructions such as an implicit multiply instruction. An implicit instruction is one where one or more intermediate results may be stored internally to the MAC, such as in a register. Including a register in the MAC circuitry may allow the MAC to avoid sending intermediate results to a storage location outside the MAC over an external bus, for example. Thus, a MAC which supports implicit operations may process instructions more quickly than a MAC with no such support.
For many multiplication operations, the MAC circuitry may provide multiple intermediate results before arriving at the final result. The conventional MAC design typically receives an intermediate result, an intermediate sum vector and an intermediate carry vector, from the Wallace tree and feeds the results back into the MUX array for subsequent processing. This scheme is repeated as necessary. Eventually, the sum vector stud the carry vector produced by the Wallace tree represent the final result. These values are subsequently sent to the CLA, where they are added together and sent out of the MAC circuitry as the final result.
In the embodiment of Figure 1, the intermediate sum vector 22a and the intermediate carry vector 22b may be sent to the CLA 30 in each cycle, if desired. The CLA 30 may then add the intermediate sum vector 22a and the intermediate carry vector 22b, to produce an intermediate result 34, which may then be stored in one of the accumulators 32.
Feedback logic in the MAC 100 design permits die intermediate result 34 to be fed from one of the accumulators 32 back into the Wallace tree 20, via the MUXs 8c, as accumulate data 18. Recall that the Wallace tree 20 includes an input line 18 for the accumulator C. In Figure 1, the MVXs 8c permit the source of the accumulate data 18 to include the accumulators 32.
In one embodiment of the invention, the MAC 100 provides circuitry which allows simultaneous operation of both the Wallace tree 20 and the CLA 30. This circuitry includes early termination logic 50 and MAC control logic 52, in one embodiment of the invention.
This circuitry may control the simultaneous processing of more than one multiplication operation or of more than one portion or a single mnitipiicaion operation by the MAN i DO.
In a typical implementation, a MAC may receive signed binary values as operands.
For example, a two's complement notation may be used. In two's complement notation, the most significant bit of the value may represent the sign: zero for positive values, one for negative values. Accordingly, in two's complement notation, the 16-bit operand FFClh may represent -63d and the operand 003Fh may represent +63d.
Additionally, 16-bit values- may be represented as 32-bit values, for some applications. The sign bit (bit fifteen) may thus be "extended" or duplicated in the upper sixteen bits. The sign-extended operand FFFFFFClh may thus again represent -63d while the operand 0000003Fh may represent + 63d. The upper seventeen bits of both operands are identical, as the sign bit (bit fifteen) is extended. Likewise, for either value, the upper sixteen bits are not needed to perform a multiplication operation.
In one embodiment of the invention, the early termination logic 50 uses this feature of signed binary values to the advantage of the MAC 100. In Figure 1, the early termination logic 50 receives a signal from the multiplier B. The early termination logic 50 may be invoked when the upper seventeen bits of a 32-bit multiplier B are identical. In such a case, the upper sixteen bits of the multiplier B are not used in the multiplication operation.
Once invoked, the early termination logic 50 sends a signal to the MAC control logic 52. The MAC control logic 52 controls the flip-flops 6, the MUXs 8, and the MUXs and flip- flops 24, as well as the accumulators 32. The MAC control logic 52 thus may enable the next multiplicand A to be latched by the flip-flops 6a and the MUXs 8a, the next multiplier B to be latched by the flip-flops 6b and the MUXs 8b, or the next accumulate data C to be latched by the flip- flops 6c and the MUXs 8c.
Additionally, the MAC control logic 52 may control the routing of the intermediate sum vector 22a and the intermediate carry vector 22b, received from the Wallace tree 30.
The MAC control logic 52 may enable the MUXs and flip-flops 24a, the MUXs and flip- flops 24b, and the Mums ad, as needed.
The MAC control logic 52 further controls the accumulator A register 32a and the accumulator B register 32b, permitting the values contained therein to be routed back to the Wallace tree 20 as accumulate input 18. Finally, the MAC control logic 52 may control the MUXs 8e such that the final output erector 34 may be sig"-extended, if desired and produce the output value 40.
In one embodiment of the invention, the MAC control unit 52 may receive control signals from a source external to the MAC 100, such as an instruction decoder (not shown).
The MAC control unit 52 may also submit control signals to another source external to the MAC 100.
Depending upon the operation being performed, the MAC 100 may produce intermediate vector values. For exurnple, in one embodiment of the invention, the Booth Decoder 10.eceites a 16-hit Value o.m. the multiplier, R ACcordin-giv, to multiply two 32- bit numbers, or a 16-bit multiplicand and a 32-bit multiplier, the Booth encoder 10 may receive the lower sixteen bits of the multiplier in a first cycle and then receive the upper sixteen bits of the multiplier in a second cycle. Likewise, the other circuitry of the MAC 100 may receive data in both a first and a second cycle. The multiplication operation thus takes, at a minimum, two cycles to complete.
For some operations, the MAC 100 may achieve single-cycle throughput. In one embodiment of the invention, the MAC 100 achieves single-cycle throughput in performing 16-bit multiplication operations. Following receipt of the first set of operands into the MAC 100, Me Wallace wee 55 End the CLA 68 may simultaneously process all subsequent operands. For example, the Wallace tree 66 may be processing data for cycle n, while, at the same time, the CLA 68 is processing data for cycle n-1.
In Figure 2A, a flow diagram illustrates how the MAC 100 logic processes a multiply or multiply/accumulate operation. In this example, two 16-bit operands are sign-extended as 32-bit values. Such operands are common in DSP applications and may particularly illustrate performance of the early termination logic 50 in the MAC 100. The MAC 100, however, may perform multiply or multiply/accumulate operations on operands with other characteristics.
A first cycle, cycle 0, begins (block 200). In one embodiment of the invention, the lower sixteen bits ofthemultiplierB[15:0] are sent to the Booth encoder 10 (block202). The MUX array 14 receives eight control signals 12 from the Booth encoder 10 as well as the multiplicand A[31:0] (block 204). The MUX array 14 processes these signals such that the Wallace tree 20 receives eight partial product vectors 16 from the MUX array 14.
Additionally, the Wallace tree 20 receives accumulate data C[31:0] (block 206). From this data, the 'vvrallace tree 20 produces an intermediate sum vector (ISV) 22a and an intermediate carry vector (ICY) 22b (block 208). The intermediate sum vector 22a and the intermediate carry vector 22b are sent to the MUXs and flip-flops 24a and 24b (block 210).
Independently from the preceding operations, at the beginning of cycle O (block 200), the early termination logic 50 may receive the 32-bit multiplier B[31:0] (block 212). Because the operands are sign-extended 16bit values, the upper seventeen bits of the multiplier B are identical. Accordingly, the early termination logic 50 sends a signal to the MAC control logic 52 (block 214). The MAC control logic 52 then sends a signal to latch the flip-flops 6a, 6b and 6c as well as the MlVXs 8a, 8b and 8c (block 216). In this manner, the MAC control logic 52 enables the circuitry to latch the next MAC operands A, B and C. In Figure 2B, the second cycle, cycle one, is a continuation of the operations of Figure 2A. After cycle one begins (block 230), the MAC control logic 52 sends a signal to the MUXs 8d to release the intermediate sum vector 22a and the intermediate carry vector 22b (block 232). The intermediate sum vector 22a and the intermediate carry vector 22b are sent to the CLA 30 (block 234). Accordingly, the CLA 30 adds the intermediate sum vector 22a and the intermediate carry vector 22b together (block 236). The result 40 is then sent out of the MAC 100 (block 238). Thus, cycle one is completed.
In Figure 3, the single-cycle throughput of 16-bit multiplication operations using Me MAC I 00 according to one embodiment of the invention may be demonstrated using a chart.
At the top of the chart, a numbered series of 16-bit multiplication operations performed by the MAC 100 is depicted. On the left side of the chart, the cycle in which an operation was performed is specified. The chart tracks operations performed by the Wallace tree 20, indicated as "W", and the CLA 30, indicated as "C" according to one embodiment of the invention.
For the first 16-bit multiplication operation, the Wallace tree 20 is executed in cycle zero while the CLA 30 is executed in cycle one. For the second 16-bit multiplication operation, the Wallace tree 20 is executed in cycle one and the CLA 30 is executed in cycle two. The execution of the CLA 30 for the first multiplication operation occurs simultaneously with the execution of the Wallace tree 20 for the second 16-bit multiplication operation. As the chart demonstrates, the subsequent 1 6- bit multiplication operations proceed like the two already described. At the end of the fifteenth cycle, fifteen 16-bit multiplication operations have been completed. For some multiplication operations according to one embodiment of the invention' the MAC i00 thus provides a singie-cycie throughput.
The accumulators 32 allow the MAC 100 to perform implicit multiply and multiply/accumulate operations. In a second embodiment, the MAC 100 may include a single accumulator. The accumulators 32 may be implicitly referenced by several implicit instructions. Those implicit multiply/accumulate instructions reference the accumulators 32 instead of a register-specified accumulator.
For example, the instructions in one embodiment of the invention, MAR or MRA may be received by the MAC control logic 52 in order for the accumulators 32 to be read from or written to, respectively. In Figure 4A, a flow diagram illustrates the implicit multiply/accumulate operation in which early termination is invoked. Recall that, in order for early termination to be invoked, the other seventeen bits of the multiplier B are all zeros or all ones.
When cycle zero begins (block 300), the multiplier B[15:0] is sent to the Booth encoder 10 (block 302). The MUX array 14 then receives eight control signals 12 from the Booth encoder l O as well as the multiplicand A[31:0] (block 304).
The Wallace tree 20 receives eight partial product vectors from the ATE array 14.
Additionally, the Wallace tree 20 receives an accumulate value from either accumulator A 32a or accumulator B 32b (block 306). The Wallace tree 20 subsequently produces an intermediate sum vector 22a and an intermediate carry vector 22b (block 308).
In one embodiment of the invention, the carry look-ahead adder 3Q is a 40bit CLA, which may perform 16-bit DSP operations. Likewise, the accumulator A register 32a and the accumulator B register 32b are 40-bit registers. Thus, in the next operation, the lower 40 bits of the intermediate sum vector 22a and the intermediate carry vector 22b are sent to the MUXs and flip-flops 24a and 24b (block 310).
Also at the beginning of cycle zero, the entire 32-bit multiplier B is sent to the early termination logic (ETL) 50 (block 312). Because the upper seventeen bits of the multiplier B are identical, the early termination logic 50 sends a signal to the MAC control logic 52 (block 314). The MAC control logic 52 then sends a signal to latch the flipflops 6a, 6b, and 6c as well as the MUXs 8a, 8b, and 8c (block 316). This indicates that the Wallace tree 20 will be available to accept the next implicit multiply/accumulate instruction in the next cycle (block 318.
In Figure 4B, cycle 1 begins (block 330j. t he IuAC control logic; sends a signal to the MUXs 8d to release the intermediate sum vector 22a and the intermediate carry vector 22b (block 332). The CLA 30 then adds the two values 22 together to produce an intermediate result 34 (block 334). Because this is an implicit instruction, the result 34 is next stored in either accumulator A 32a or accumulator B 32b (block 336). This completes the end of cycle one (block 338).
In one embodiment of the invention, the MAC 100 may receive implicit instructions which reference the accumulators. These instructions may be received from the MAC control logic 52, which ultimately controls the accumulator A 32a and the accumulator B 32b.
For example, in Figure 4C, the MAC control logic 52 may receive an implicit instruction for reading the accumulator A 32a (block 350). The values stored in the accumulator A 32a and the accumulator B 32b are sent to the CLA 30 (block 352). The CLA then adds the values 36a and 36b together (block 354). The CLA 30 then sends the result as output data (block 356). The result 40 may then be sent to a register file external to the MAC 100.
In Figure 5, a multiply with implicit accumulate operation uses packed data instnuc.ions. In one e,l,bodirl.er.t of the ir.verltiorl, the SAC '00 may receive fox- different packed data instructions. These four packed data instructions operate on sixteen bits or half of two 32-bit operands. For example, one instruction may operate on the lower sixteen bits of both the multiplier B and the multiplicand A. Another may operate on the upper sixteen bits of the multiplicand A and the lower sixteen bits of the multiplier B. Ultimately, each packed- data instruction thus performs a 1 6-bit multiply operation on two 1 6- bit operands.
At the beginning of cycle zero (block 400), a 32-bit multiplicand A[3 1:0] and a 32-bit multiplier B[31:0] are sent to the MAC 100 (block 402). The MAC control logic 52 also receives a packed-data instruction (block 404).
Sixteen bits of the multiplicand A are extended to 32 bits. For example, if the packed- data instruction is operating on the lower sixteen bits of the multiplicand A, then the upper sixteen bits of the multiplicand A are replaced with the contents of the 16th bit of the multiplicand A. In essence, the sign is extended from the 16th to the 32nd bit. Likewise, if the packed-data instruction is operating on the upper sixteen bits of the multiplicand A, then the upper sixteen bits are shifted to the lower 16 bits and the upper sixteen bits are filled with the value of the sign bit.
Sixteen bits of the multiplier B are sent to the Booth encoder lO Block 408). For example, if the packed-data instruction operates on the lower half of the multiplier B. then B[15:0] are sent to the Booth encoder 10. Likewise, for a packed-data instruction which operates on the upper half of the multiplier B. the B[3 1:16] bits are sent to the Booth encoder 10.
From this point, the packed-data instructions are operated upon just as any other implicit instruction would be. Accordingly, the next operation to be performed by the MAC is in Figure 4A (block 304).
Just as for other operations, the MAC 100 is simultaneously determining whether the early termination logic 50 will be invoked. That is, the multiplier B[3 1:0] is sent to the early termination logic 50 (block 420). Because the upper seventeen bits of the multiplier B are identical, the early termination logic 50 sends a signal to the MAC control logic 52 (block 422). The MAC control logic 52 then sends a signal to latch the flip- flops 6a, 6b, and 6c as well as the MUXs 8a, 8b and 8c (block 424). This allows a new MAC instruction to be processed in the next cycle (block 426) .
Thus, a multiply-accumulate unit may provide single-cycle throughput for certain operations. In one embodiment of the invention, the iAC avoids using redundant hardware, which may consume additional power, and includes no pipelining circuitry, which may run more slowly. Instead, the Wallace tree and the carry look-ahead adder which are part of the MAC may simultaneously operate. Where such simultaneous operations occur, a higher throughput may be possible.
While the present invention has been described with respect to a limited number of embodiments, those skilled in the art will appreciate numerousmodifications and variations therefrom. It is intended that the appended claims cover all such modifications and variations as fall within the true spirit and scope of this present invention.

Claims (12)

  1. i. An apparatus, comprising: a structure for performing multiple addition operations; an adder; and a controller which permits a first operation to be performed on a portion of a first operand using the structure while the adder is performing a second operation on another portion of the first operand.
  2. 2. The apparatus of claim 1, further comprising an internal storage medium coupled to the adder.
  3. 3. The apparatus of claim 1, wherein the structure for performing multiple addition operations comprises a Wallace tree.
  4. 4. The apparatus of claim 3 wherein the Wallace tree comprises a plurality of carrv-save adders.
  5. 5. The apparatus of claim 4, wherein the Wallace tree is a four-stage Wallace tree.
  6. 6. The apparatus of claim 1, wherein the adder is a carry look-ahead adder.
  7. 7. The apparatus of claim 1, further comprising a Booth encoder coupled to the structure for performing multiple addition operations.
  8. 8. The apparatus of clan-e 4, wherein the Wallace tree receives nine input vectors and produces two output vectors.
  9. 9. The apparatus of claim 2, wherein the internal storage medium comprises one or more accumulators.
  10. 10. The apparatus of claim 9, wherein one or more accumulators are coupled to the output of the adder.
  11. 11. An apparatus comprising: a Wallace tree; an adder; and a controller that sends a plurality of signals to cause the Wallace tree to execute a part of an instruction while the adder executes another part of the instruction.
  12. 12. The apparatus of claim 11, wherein the adder is a carry look-ahead adder.
GB0407413A 1999-12-23 2000-12-04 Processing multiply-accumulate operations in a single cycle Expired - Fee Related GB2397674B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US09/470,836 US6611856B1 (en) 1999-12-23 1999-12-23 Processing multiply-accumulate operations in a single cycle
GB0208937A GB2371657B (en) 1999-12-23 2000-12-04 Processing multiply-accumulate operations in a single cycle

Publications (3)

Publication Number Publication Date
GB0407413D0 GB0407413D0 (en) 2004-05-05
GB2397674A true GB2397674A (en) 2004-07-28
GB2397674B GB2397674B (en) 2004-09-15

Family

ID=32658395

Family Applications (1)

Application Number Title Priority Date Filing Date
GB0407413A Expired - Fee Related GB2397674B (en) 1999-12-23 2000-12-04 Processing multiply-accumulate operations in a single cycle

Country Status (1)

Country Link
GB (1) GB2397674B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0316036A2 (en) * 1987-11-09 1989-05-17 Lsi Logic Corporation Digital multiplier circuit and a digital multiplier-accumulator circuit which preloads and accumulates subresults
EP0377837A2 (en) * 1989-01-13 1990-07-18 International Business Machines Corporation Floating point unit having simultaneous multiply and add
EP0576154A1 (en) * 1992-05-26 1993-12-29 Samsung Electronics Co., Ltd. Multiplication method and circuit
US5426599A (en) * 1992-06-17 1995-06-20 Mitsubishi Denki Kabushiki Kaisha Hardware implemented multiplier for performing multiplication of two digital data according to booth algorithm
US5923871A (en) * 1996-08-07 1999-07-13 Elbrus International Multifunctional execution unit having independently operable adder and multiplier

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0316036A2 (en) * 1987-11-09 1989-05-17 Lsi Logic Corporation Digital multiplier circuit and a digital multiplier-accumulator circuit which preloads and accumulates subresults
EP0377837A2 (en) * 1989-01-13 1990-07-18 International Business Machines Corporation Floating point unit having simultaneous multiply and add
EP0576154A1 (en) * 1992-05-26 1993-12-29 Samsung Electronics Co., Ltd. Multiplication method and circuit
US5426599A (en) * 1992-06-17 1995-06-20 Mitsubishi Denki Kabushiki Kaisha Hardware implemented multiplier for performing multiplication of two digital data according to booth algorithm
US5923871A (en) * 1996-08-07 1999-07-13 Elbrus International Multifunctional execution unit having independently operable adder and multiplier

Also Published As

Publication number Publication date
GB0407413D0 (en) 2004-05-05
GB2397674B (en) 2004-09-15

Similar Documents

Publication Publication Date Title
US6611856B1 (en) Processing multiply-accumulate operations in a single cycle
EP0326415B1 (en) Floating point/integer processor with divide and square root functions
EP1446728B1 (en) Multiply-accumulate (mac) unit for single-instruction/multiple-data (simd) instructions
US7516307B2 (en) Processor for computing a packed sum of absolute differences and packed multiply-add
US3787673A (en) Pipelined high speed arithmetic unit
US7716269B2 (en) Method and system for performing parallel integer multiply accumulate operations on packed data
US4168530A (en) Multiplication circuit using column compression
US5325320A (en) Area efficient multiplier for use in an integrated circuit
US20210349692A1 (en) Multiplier and multiplication method
US6243803B1 (en) Method and apparatus for computing a packed absolute differences with plurality of sign bits using SIMD add circuitry
US20130262547A1 (en) Processor for performing multiply-add operations on packed data
JPH07200261A (en) Logic unit
US7028066B2 (en) Vector SIMD processor
JP2618604B2 (en) How to control data input from the data bus
JPH02196328A (en) Floating point computing apparatus
US5253195A (en) High speed multiplier
US9372665B2 (en) Method and apparatus for multiplying binary operands
US6324638B1 (en) Processor having vector processing capability and method for executing a vector instruction in a processor
JPH11511577A (en) Device for performing multiply-add operation of packed data
US6493817B1 (en) Floating-point unit which utilizes standard MAC units for performing SIMD operations
JPS62194577A (en) Complex multiplier and complex multiplication
US5721697A (en) Performing tree additions via multiplication
US5036482A (en) Method and circuitry for digital system multiplication
US4761756A (en) Signed multiplier with three port adder and automatic adjustment for signed operands
US4823300A (en) Performing binary multiplication using minimal path algorithm

Legal Events

Date Code Title Description
PCNP Patent ceased through non-payment of renewal fee

Effective date: 20161204