XC886/888CLM
CORDIC Coprocessor
User’s Manual
11-8
V1.3, 2010-02
CORDIC Coprocessor, V 1.2.1
Circular Vectoring Mode:
The full range of X and Y inputs [-2
15
,(2
15
-1)] are supported,
while Z initial value should satisfy |Z|
≤
π
/ 2 to prevent possible Z result data overflow.
Note: Considerations should also be given to function limitations such as the meaning
of the result data, e.g. divide by zero is not meaningful. The ‘useful domain’
included within
for each of the main functions, attempts to cover both
for CORDIC convergence and useful range of the function.
Note: Input values may be within the domain of convergence, however, this does not
guarantee a fixed level of accuracy of the CORDIC result data. Refer to
for details on accuracy of the CORDIC Coprocessor.
11.2.4.2
Overflow Considerations
Besides considerations for domain of convergence, the limitations on the magnitude of
input data must also be considered to prevent result data overflow.
Data overflow is handled by the CORDIC Coprocessor in the same way in all operating
modes. Overflow for X and Y data can be prevented by correct setting by the user of the
MPS bit, whose value is partly based on the CORDIC Coprocessor operating mode and
the application data.
The MPS setting has no effect on the Z data. For circular and hyperbolic functions, any
value of Z outside of the range [-
π
,((2
15
-1)/2
15
)
π
] cannot be represented and will result in
Z data overflow error. Note that kernel data Z has values in the range [-
π
,((2
19
-1)/2
19
)
π
]
scaled to the range [-2
19
,(2
19
-1)], so the written and read values of Z data are always
normalized as such. For linear function, where Z is a real value, magnitude of Z must not
exceed 4 integer bits.
11.2.5
CORDIC Coprocessor Data Format
The CORDIC Coprocessor accepts (initial) data X, Y and Z inputs in twos complement
format. The result data is also in twos complement format.
The only exception is for the X result data in circular vectoring mode. The X result data
has a default data format of twos complement, but the user can select via bit
CD_CON.X_USIGN = 1 for the X result data to be read as unsigned value. This option
prevents a potential overflow of the X result data (taken together with the MPS setting),
as the MSB bit is now a data bit. Note that setting bit X_USIGN = 1 is only effective when
operating in the circular vectoring mode, which always yields result data that is positive
and larger than the initial data.
Generally, the input data for X and Y can be integer or rational number (fraction).
However, in any calculation, the data form must be the same for both X and Y. Also, in
case of fraction, X and Y must have the same number of bits for decimal place.
The Z data is always handled as integer, based on the normalization factor for circular
or hyperbolic function. In case of linear function, accessible Z data is a real number with
*