This section presents an implementation for sine and cosine computation using CORDIC Algorithm 7.10 as described in Section 7.3.4. The circuit presented in Figure 14.19 is basically made up of three loop-circuits. The auxiliary sequence (upper loop) computes the successive values of the residual rotation angle ai. A lookup table provides the successive values of tan−1 2−i to be added or subtracted from the current angle value ai stored in register A: if ai is negative, ai+1 is computed as
The initial value a0 is the argument angle a.
The main sequences, computing sin a (register Y) and cos a (register X) are built up according to the following rules:
If ai is positive,
Otherwise, if ai is negative,
As quoted in Section 7.3.4, the argument a can be selected in [−99.88°, +99.88°]. In practice, the range can be restricted to [−90°, +90°]. 2's Complement notation is appropriate to represent data and (intermediate) results; operand length needs to cope with the required precision p, so LUT, adders/subtractors, shifters, and registers are accordingly designed. As before, a counter (not represented) may be used to generate the step number. Index i actualizes LUT addresses and shifter range control. After p steps, registers Y and X hold sin a and cos a, respectively. The cost and computation time are given by