ChipWare: Computes the integer square root of A. CW_sqrt uses a variant of the Newton-Raphson algorithm to solve many high-order arithmetic operations. With the Newton-Raphson algorithm, a function for the operation must be chosen so that the root of the function is the operation. The Newton-Raphson algorithm starts with an initial approximation and then creates a more precise approximation with each iteration. Starting the iteration for calculating the square root means finding the approximate square root of the upper two bits, and then finding the residual after the approximate square root is subtracted. For the next iteration, the next two most significant bits of the input operand a are concatenated onto the residual, and from that is subtracted the approximate square root concatenated with "01". If the residual with the two new bits is greater than or equal to the approximate square root concatenated with "01", then the new root is the old root concatenated with a "1", and the new residual is the remainder after the subtraction has occurred. Otherwise, the new root is the old root concatenated with a "0", and the new residual is the old residual with the two new bits. Note: The input operand a must be aligned to the right so that bit pairs can be considered. This means that for an odd length input operand a, an extra bit of zero is added as the high order bit. This describes the algorithm of the ripple borrow synthesis model. To get a faster (fewer gate delays) version, the propagation of the borrows in the subtractions can be improved giving the borrow lookahead synthesis model.
- This IP is available as part of Cadence Encounter RTL Compiler XL