Patent ID: 8190669

Claim:
A method for operating a functional unit of a microprocessor, the method comprising: receiving 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; in response to the opcode and the one or more operands, selecting a plurality of inputs M 2 , μ 2 , M 1 , μ 1 and M 0 , wherein selecting M 2 includes selecting between a first operand A and a first coefficient F 2 (x b ) provided by a first lookup table, selecting M 1 includes selecting between a second operand B and a second coefficient F 1 (x b ) provided by a second lookup table, selecting μ 2 includes selecting between a third operand and the square of a fourth operand x h , and selecting μ 1 includes selecting between the fourth operand x h and a fifth operand; and operating a plurality of configurable arithmetic circuits in the functional unit to compute an operation result of the form M 2 *μ 2 +M 1 *μ 1 +M 0 from the selected inputs M 2 , μ 2 , M 1 , μ 1 and M 0 , wherein the plurality of supported operations includes a unary function approximation (UFA) operation for approximating a unary function ƒ(x) of an argument operand x and a planar interpolation (PI) operation for performing planar interpolation on coordinate operands x and y, wherein selecting the plurality of inputs M 2 , μ 2 , M 1 , μ 1 and M 0 includes: in the event that the UFA operation is designated, selecting the plurality of inputs M 2 , μ 2 , M 1 , μ 1 and M 0 such that the configurable arithmetic circuits compute an operation result corresponding to 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 argument 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); and in the event that the PI operation is designated, selecting the plurality of inputs M 2 , μ 2 , M 1 , μ 1 and M 0 such that the configurable arithmetic circuits compute an operation result corresponding to 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, wherein selecting the plurality of inputs M 2 , μ 2 , M 1 , μ 1 and M 0 in the event that the PI operation is designated further includes: obtaining the interpolation coefficients A, B, and C; selecting the interpolation coefficients A and B as inputs M 2 and M 1 , respectively; and selecting the coordinate operands x and y as inputs μ 2 and μ 1 , respectively, wherein the interpolation coefficients A, B, and C are obtained from the one or more operands on which the PI operation is to be performed, wherein selecting the plurality of inputs M 2 , μ 2 , M 1 , μ 1 and M 0 in the event that the PI operation is designated further includes: selecting the interpolation coefficient C as the input M 0 .