Patent ID: 7640285

Claim:
A multipurpose arithmetic functional unit for a processor, the functional unit comprising: an input section configured to receive an opcode designating one of a plurality of supported operations to be performed and one or more operands on which the designated operation is to be performed, the input section being further configured to generate a plurality of control and data signals in response to the received opcode and operands; a multiplication pipeline coupled to receive a first subset of the control and data signals from the input section, the multiplication section being configured to select a plurality of pairs of factors based on the received control and data signals and to compute a respective one of a plurality of products from each of the pairs of factors; an offset pipeline coupled to receive a second subset of the control and data signals from the input section and to generate an offset value in response to the second subset of the control and data signals; and an addition pipeline coupled to receive the respective products from the multiplication section and the offset value from the offset pipeline, the addition section being configured to add the respective products and the offset value to produce an operation result, wherein the plurality of supported operations includes a unary function approximation (UFA) operation and a planar interpolation (PI) operation, wherein the UFA operation for an input operand x and a unary function ƒ(x) to be approximated includes computation of a quadratic polynomial of the form: ƒ( x )≈ F 2 ( x b )* x h 2 +F 1 ( x b )* x h +F 0 ( x b ), wherein x b is a baseline value, x h is the difference between the input operand x and the baseline value x b , and F 2 , F 1 and F 0 are coefficients determined based on the baseline value x b and the unary function ƒ(x); the PI operation for input coordinates (x, y) includes computation of a planar function U(x, y) of the form: U ( x,y )= A*x+B*y+Δ, wherein A, B, and C are interpolation parameters and Δ is an offset term that depends at least in part on the interpolation parameter C, and wherein the offset term Δ is given by: Δ= A*dx+B*dy+C, wherein dx and dy are coordinate offsets relative to the input coordinates x, y wherein the offset pipeline is further configured to generate a plurality of different offset terms Δ in parallel in the event that the PI operation is designated; and wherein the addition pipeline includes a plurality of parallel add blocks, each parallel add block configured to form a sum of a respective one of the different offset terms Δ and all of the plurality of products.