Approximation circuit and method
First Claim
1. A method of providing a circuit comprising:
- providing a first look-up table configured to receive an approximation value “
a”
, the first look-up table configured to generate a function f(a) of the approximation value “
a”
, wherein the approximation value “
a”
approximates an input value “
x”
;
providing a second look-up table configured to receive at least a relevant portion of the approximation value “
a”
, the second look-up table configured to generate a first derivative f′
(a) of the function of the function f(a);
providing a multiplier configured to receive the first derivative f′
(a) and a difference (x−
a) between the input value “
x” and
the approximation value “
a”
, the multiplier configured to generate a product of the first derivative f′
(a) and the difference (x−
a) in parallel with the generation of function f(a);
providing an adder configured to receive the function f(a) and the product;
providing a third look-up table configured to receive at least a portion of the approximation value “
a”
, the third look-up table configured to generate a second derivative f′
(a) of the function f(a);
providing a squaring circuit configured to receive at least a portion of the difference (x−
a), the squaring circuit configured to generate a square (x−
a)2 of the difference (x−
a); and
a second multiplier configured to receive and multiply one half of the second derivative f″
(a) and the square (x−
a)2 to generate a second product in parallel with the first product and function f(a).
2 Assignments
0 Petitions
Accused Products
Abstract
An approximation circuit approximates a function f(x) of an input value “x” by adding at least the first two terms in a Taylor series (i.e., f(a) and f′(a)(x−a)) where “a” is a number reasonably close to value “x”. The first term is generated by a first look-up table which receives the approximation value “a”. The first look-up table generates a function f(a) of the approximation value “a”. The second look-up table generates a first derivative f′(a) of the function f(a). A first multiplier then multiplies the first derivative f′(a) by a difference (x−a) between input value “x” and approximation value “a” to generate a product f′(a)(x−a). The approximation circuit can approximate the function f(x) by adding the third term of the Taylor series, (½)f″(a)(x−a)2.
21 Citations
12 Claims
-
1. A method of providing a circuit comprising:
-
providing a first look-up table configured to receive an approximation value “
a”
, the first look-up table configured to generate a function f(a) of the approximation value “
a”
, wherein the approximation value “
a”
approximates an input value “
x”
;
providing a second look-up table configured to receive at least a relevant portion of the approximation value “
a”
, the second look-up table configured to generate a first derivative f′
(a) of the function of the function f(a);
providing a multiplier configured to receive the first derivative f′
(a) and a difference (x−
a) between the input value “
x” and
the approximation value “
a”
, the multiplier configured to generate a product of the first derivative f′
(a) and the difference (x−
a) in parallel with the generation of function f(a);
providing an adder configured to receive the function f(a) and the product;
providing a third look-up table configured to receive at least a portion of the approximation value “
a”
, the third look-up table configured to generate a second derivative f′
(a) of the function f(a);
providing a squaring circuit configured to receive at least a portion of the difference (x−
a), the squaring circuit configured to generate a square (x−
a)2 of the difference (x−
a); and
a second multiplier configured to receive and multiply one half of the second derivative f″
(a) and the square (x−
a)2 to generate a second product in parallel with the first product and function f(a).- View Dependent Claims (2)
splitting an input bit group representing an input value into left and right hand portions representing respective left and right hand values, wherein the input bit group comprises the at least a portion of the difference (x−
a);
generating a first term bit group representing a square of the left hand value;
generating a second term bit group representing a product of the left and right hand values;
generating a third term bit group representing a square of the right hand value;
concatenating the first and third term bit groups to provide a concatenated bit group; and
adding the concatenated bit group and the second term bit group, left shifted by n+1 bit positions, to generate an output bit group representing a square (x−
a)2 of the difference (x−
a).
-
-
3. A method of using a circuit comprising:
-
generating a function f(a) of an approximation value “
a”
with a first look-up table, the approximation value “
a”
being an approximation of an input value “
x”
;
generating a first derivative f′
(a) of the function f(a) with a second look-up table;
receiving the first derivative f′
(a) and a difference (x−
a) between the input value “
x” and
the approximation value “
a”
;
generating a product of the first derivative f′
(a) and the difference (x−
a) with a multiplier in parallel with the generation of the function f(a);
receiving the function and the product in an adder; and
generating one half of a second derivative f″
(a) of the function f(a) in a third look-up table.- View Dependent Claims (4, 5, 6, 7)
generating a square (x−
a)2 of the difference (x−
a) in a squaring circuit; and
generating a second product of the one half of the second derivative f″
(a) and the square (x−
a)2 in a second multiplier.
-
-
5. The method of claim 4 further comprising:
-
receiving the second product in the adder; and
adding the function f(a), the first product, and the second product in the adder to generate an approximation of the function f(x) of the input value “
x”
.
-
-
6. The method of claim 5, further comprising:
-
shifting the approximation in a normalization circuit so that the approximation represents a mantissa within a predetermined range; and
receiving an exponent of the input value in an exponent circuit;
negating the exponent in the exponent circuit to generate a negated exponent; and
incrementing the negated exponent to compensate for the shifting of the approximation.
-
-
7. The method of claim 3, wherein:
the function is a reciprocal a−
1 of the approximation value “
a”
.
-
8. An approximation circuit, comprising:
-
first look-up table configured to receive an approximation value “
a”
, the first look-up table configured to generate a function f(a) of the approximation value “
a”
, wherein the approximation value “
a”
approximates an input value “
x”a second look-up table configured to receive at least a portion of the approximation value “
a”
, the second look-up table configured to generate a first derivative f′
(a) of the function f(a);
a multiplier configured to receive the first derivative f′
(a) and a difference (x−
a) between the input value “
x” and
the approximation value “
a”
, the multiplier configured to generate a product of the first derivative f′
(a) and (x−
a);
a third look-up table configured to receive at least a portion of the approximation value “
a”
, the third look-up table configured to generate a second derivative f″
(a) of the function f(a);
a squaring circuit configured to receive at least a portion of (x−
a), the squaring circuit configured to generate a square (x−
a)2 of (x−
a);
a second multiplier configured to receive and multiply one-half of the second derivative f″
(a) and the square (x−
a)2 to generate a second product in parallel with the generation of f(a) and the first derivative f′
(a); and
an adder configured to generate an approximation of the function f(x) in response to the function f(a), the first product and the second product. - View Dependent Claims (9, 10, 11)
a normalization circuit configured to shift the approximation to represent a mantissa within a predetermined range; and
an exponent circuit configured to receive an exponent of the input value, the exponent circuit configured to negate the exponent and compensate for the shift of the approximation.
-
-
10. The circuit of claim 8, wherein the squaring circuit further comprises:
-
an input terminal configured to carry a k-bit input bit group representing a k-bit input value, the input bit group having a left hand m-bit portion and a right hand (k−
m)-bit portion representing respective left and right hand values, wherein the k-bit input bit group comprises the at least a portion of the difference (x−
a);
a left hand squaring circuit configured to receive the left hand m-bit portion and generate a first term bit group representing a square of the left hand value;
a multiplier configured to multiply the left hand m-bit portion and the right hand (k−
m)-bit portion and the right hand (k−
m)-bit portion and generate a second term bit group representing a product of the left and right hand values;
a right hand squaring circuit configured to receive the right hand (k−
m)-bit portion and generate a third term bit group representing a square of the right hand value; and
an adder configured to add the second term bit group, left shifted by k−
m+1 bit positions, to a concatenation of the first and third term bit groups, wherein the adder generates a square (x−
a)2 of the difference (x−
a).
-
-
11. The circuit of claim 8, wherein the function f(x) is a reciprocal, and wherein the circuit is configured to approximate the reciprocal of x.
-
12. An approximation circuit, comprising:
-
a first look-up table configured to receive an approximation value “
a”
, the first look-up table configured to generate a function f(a) of the approximation value “
a”
, wherein the approximation value “
a”
approximates an input value “
x”a second look-up table configured to receive at least a portion of the approximation value “
a”
, the second look-up table configured to generate a first derivative f′
(a) of the function f(a);
a multiplier configured to receive the first derivative f′
(a) and a difference (x−
a) between the input value “
x” and
the approximation value “
a”
, the multiplier configured to generate a product of the first derivative f′
(a) and (x−
a);
a third look-up table configured to receive at least a portion of the approximation value “
a”
, the third look-up table configured to generate a second derivative f″
(a) of the function f(a);
a squaring circuit configured to receive at least a portion of (x−
a), the squaring circuit configured to generate a square (x−
a)2 of (x−
a);
a second multiplier configured to receive and multiply one-half of the second derivative f″
(a) and the square (x−
a)2 to generate a second product in parallel with the generation of f(a) and the first derivative f′
(a); and
an adder configured to singularly generate an approximation of the function f(x) in response to the function f(a), the first product and the second product; and
a normalization circuit, coupled to the adder, configured to shift the approximation to represent a mantissa within a predetermined range.
-
Specification