System and method for optimized reciprocal operations
First Claim
Patent Images
1. A method for calculating a reciprocal R of an integer N of length k*256 bit, the method comprising:
- determining a required precision;
determining a number of iterations T responsive to the required precision;
normalizing N into d so that N=d*2−
s*2K, 1≦
d<
2 (d=1.b1b2b3 . . . bK), where N=(Nk−
1Nk−
2 . . . N0)b is modulus before normalization, d is an intermediate result of modulus after normalization, and s is normalize shift count;
obtaining initial approximation of 1/d=R[0], where R is reciprocal at different iterations of a modified Newton Raphson operation;
refining reciprocal approximation by the modified Newton Raphson operation using ones complements;
truncating final iteration result R[T] responsive to the required precision;
denormalizing R[T]; and
outputting the reciprocal R.
6 Assignments
0 Petitions
Accused Products
Abstract
A method and apparatus for calculating a reciprocal of an integer using a modified Newton Raphson method using one'"'"'s complements instead of two'"'"'s complements. The method includes determining a required precision; determining a number of iterations T responsive to the required precision; normalizing N into d; obtaining initial approximation of 1/d=R[0]; refining reciprocal approximation by the modified Newton Raphson operation using ones complements; truncating final iteration result R[T] responsive to the required precision; denormalizing R[T]; and outputting the reciprocal R.
38 Citations
20 Claims
-
1. A method for calculating a reciprocal R of an integer N of length k*256 bit, the method comprising:
-
determining a required precision;
determining a number of iterations T responsive to the required precision;
normalizing N into d so that N=d*2−
s*2K, 1≦
d<
2 (d=1.b1b2b3 . . . bK), where N=(Nk−
1Nk−
2 . . . N0)b is modulus before normalization, d is an intermediate result of modulus after normalization, and s is normalize shift count;
obtaining initial approximation of 1/d=R[0], where R is reciprocal at different iterations of a modified Newton Raphson operation;
refining reciprocal approximation by the modified Newton Raphson operation using ones complements;
truncating final iteration result R[T] responsive to the required precision;
denormalizing R[T]; and
outputting the reciprocal R. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A system for accelerating calculation of a reciprocal of an integer N comprising:
-
an input buffer for receiving an input including a long integer N and a required precision;
a parser for decoding the received input to determine the size of the integer N, the number of iterations of a modified Newton Raphson operation, and the number of truncations for each iteration;
a lookup table for obtaining an initial reciprocal seed 1/d;
a memory for storing the input integer N, intermediate normalized d of N, and intermediate and final results of the reciprocal calculation in pre-assigned locations;
a microcode generation module for generating microcode on the fly responsive to the required precision, the stored integer N, and the intermediate results;
an execution unit for executing the generated microcode in a single-cycle based pipeline structure to generate the reciprocal of the integer N; and
an output buffer for outputting the reciprocal. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17)
-
-
18. A system for accelerating calculation of a reciprocal of an integer N comprising:
-
means for receiving an input including a long integer N and a required precision;
means for decoding the received input to determine the size of the integer N, the number of iterations of a modified Newton Raphson operation, and the number of truncations for each iteration;
means for obtaining an initial reciprocal seed 1/d;
means for storing the input integer N, intermediate normalized d of N, and intermediate and final results of the reciprocal calculation in pre-assigned locations;
means for generating microcode on the fly responsive to the required precision, the stored integer N, and the intermediate results;
means for executing the generated microcode in a single-cycle based pipeline structure to generate the reciprocal of the integer N; and
means for outputting the reciprocal. - View Dependent Claims (19, 20)
-
Specification