|
| void | cordic_approx (int32_t th_rad_fxp, int32_t a_idx, int32_t *sign, int32_t *b_yn, int32_t *xn, int32_t *th_cdc_fxp) |
| | cordic_approx() - CORDIC-based approximation of sine and cosine
|
| int32_t | is_scalar_cordic_acos (int32_t realvalue, int numiters_minus_one) |
| | is_scalar_cordic_acos() - CORDIC-based approximation for inverse cosine
|
| int32_t | is_scalar_cordic_asin (int32_t realvalue, int numiters_minus_one) |
| | is_scalar_cordic_asin() - CORDIC-based approximation for inverse sine
|
| void | cmpx_cexp (int32_t sign, int32_t b_yn, int32_t xn, cordic_cfg type, struct cordic_cmpx *cexp) |
| | cmpx_cexp() - CORDIC-based approximation of complex exponential e^(j*THETA)
|
| static int32_t | sin_fixed_32b (int32_t th_rad_fxp) |
| | sin_fixed_32b() - Sine function using CORDIC algorithm
|
| static int32_t | cos_fixed_32b (int32_t th_rad_fxp) |
| | cos_fixed_32b() - Cosine function using CORDIC algorithm
|
| static int16_t | sin_fixed_16b (int32_t th_rad_fxp) |
| | sin_fixed_16b() - Sine function using CORDIC algorithm
|
| static int16_t | cos_fixed_16b (int32_t th_rad_fxp) |
| | cos_fixed_16b() - Cosine function using CORDIC algorithm
|
| static void | cmpx_exp_32b (int32_t th_rad_fxp, struct cordic_cmpx *cexp) |
| | cmpx_exp_32b() - CORDIC-based approximation of complex exponential e^(j*THETA).
|
| static void | cmpx_exp_16b (int32_t th_rad_fxp, struct cordic_cmpx *cexp) |
| | cmpx_exp_16b() - CORDIC-based approximation of complex exponential e^(j*THETA).
|
| static int32_t | asin_fixed_32b (int32_t cdc_asin_th) |
| | asin_fixed_32b() - CORDIC-based approximation of inverse sine
|
| static int32_t | acos_fixed_32b (int32_t cdc_acos_th) |
| | acos_fixed_32b() - CORDIC-based approximation of inverse cosine
|
| static int16_t | asin_fixed_16b (int32_t cdc_asin_th) |
| | asin_fixed_16b() - CORDIC-based approximation of inverse sine
|
| static int16_t | acos_fixed_16b (int32_t cdc_acos_th) |
| | acos_fixed_16b() - CORDIC-based approximation of inverse cosine
|
| int32_t | sofm_atan2_32b (int32_t y, int32_t x) |
| | sofm_atan2_32b() - Four-quadrant arctangent using degree-9 Remez minimax polynomial
|
| int16_t acos_fixed_16b |
( |
int32_t | cdc_acos_th | ) |
|
|
inlinestatic |
acos_fixed_16b() - CORDIC-based approximation of inverse cosine
- Parameters
-
| cdc_acos_th | Input value in Q2.30 format. |
- Returns
- Inverse cosine angle in Q3.13 format.
inverse cosine of cdc_acos_theta based on a CORDIC approximation acos(cdc_acos_th) inverse cosine angle values in radian produces using the DCORDIC (Double CORDIC) algorithm. Q2.30 cdc_acos_th , input value range [-1 to 1] Q3.13 th_acos_fxp, output value range [3.14159265346825 to 0] LUT size set type 31 number of iteration 15 Error (max = 0.000059799232976), THD+N = -89.824298401466635 (dBc)
| int32_t acos_fixed_32b |
( |
int32_t | cdc_acos_th | ) |
|
|
inlinestatic |
acos_fixed_32b() - CORDIC-based approximation of inverse cosine
- Parameters
-
| cdc_acos_th | Input value in Q2.30 format. |
- Returns
- Inverse cosine angle in Q3.29 format.
inverse cosine of cdc_acos_theta based on a CORDIC approximation acos(cdc_acos_th) inverse cosine angle values in radian produces using the DCORDIC (Double CORDIC) algorithm. Q2.30 cdc_acos_th , input value range [-1 to 1] Q3.29 th_acos_fxp, output value range [3.14159265346825 to 0] LUT size set type 31 Error (max = 0.000000026077032), THD+N = -157.948952635422842 (dBc)
| int16_t asin_fixed_16b |
( |
int32_t | cdc_asin_th | ) |
|
|
inlinestatic |
asin_fixed_16b() - CORDIC-based approximation of inverse sine
- Parameters
-
| cdc_asin_th | Input value in Q2.30 format. |
- Returns
- Inverse sine angle in Q2.14 format.
inverse sine of cdc_asin_theta based on a CORDIC approximation. asin(cdc_asin_th) inverse sine angle values in radian produces using the DCORDIC (Double CORDIC) algorithm. Inverse sine angle values in rad Q2.30 cdc_asin_th, value in between range of [-1 to 1] Q2.14 th_asin_fxp, output value range [-1.5707963258028 to 1.5707963258028] LUT size set type 31 number of iteration 15 Error (max = 0.000059800222516), THD+N = -89.824282520774048 (dBc)
| int32_t asin_fixed_32b |
( |
int32_t | cdc_asin_th | ) |
|
|
inlinestatic |
asin_fixed_32b() - CORDIC-based approximation of inverse sine
- Parameters
-
| cdc_asin_th | Input value in Q2.30 format. |
- Returns
- Inverse sine angle in Q2.30 format.
inverse sine of cdc_asin_theta based on a CORDIC approximation. asin(cdc_asin_th) inverse sine angle values in radian produces using the DCORDIC (Double CORDIC) algorithm. Inverse sine angle values in rad Q2.30 cdc_asin_th, value in between range of [-1 to 1] Q2.30 th_asin_fxp, output value range [-1.5707963258028 to 1.5707963258028] LUT size set type 15 Error (max = 0.000000027939677), THD+N = -157.454534077921551 (dBc)
| void cmpx_exp_16b |
( |
int32_t | th_rad_fxp, |
|
|
struct cordic_cmpx * | cexp ) |
|
inlinestatic |
cmpx_exp_16b() - CORDIC-based approximation of complex exponential e^(j*THETA).
- Parameters
-
| th_rad_fxp | Input angle in radian Q4.28 format. |
| cexp | Output pointer to complex result in struct cordic_cmpx in Q1.15 format. |
computes COS(THETA) + j*SIN(THETA) using CORDIC algorithm approximation and returns the complex result. THETA values must be in the range [-2*pi, 2*pi). The cordic exponential algorithm converges, when the angle is in the range [-pi/2, pi/2).If an angle is outside of this range, then a multiple of pi/2 is added or subtracted from the angle until it is within the range [-pi/2,pi/2).Start with the angle in the range [-2*pi, 2*pi) and output has range in [-1.0 to 1.0] Error (max = 0.000060862861574), THD+N = -89.049303454077403 +---------------—+--------------—+-----—+---------—+ | thRadFxp |cdccexpth |thRadFxp| cdccexpth| +-—+--—+----—+-—+-—+----—+-----—+---------—+ |WLen| FLen|Signbit|WLen|FLen|Signbit| Qformat| Qformat | +-—+--—+----—+-—+-—+----—+-----—+---------—+ | 32 | 28 | 1 | 32 | 15 | 1 | 4.28 | 1.15 | +---------------—+--------------—+-----—+---------—+
| void cmpx_exp_32b |
( |
int32_t | th_rad_fxp, |
|
|
struct cordic_cmpx * | cexp ) |
|
inlinestatic |
cmpx_exp_32b() - CORDIC-based approximation of complex exponential e^(j*THETA).
- Parameters
-
| th_rad_fxp | Input angle in radian Q4.28 format. |
| cexp | Output pointer to complex result in struct cordic_cmpx in Q2.30 format. |
computes COS(THETA) + j*SIN(THETA) using CORDIC algorithm approximation and returns the complex result. THETA values must be in the range [-2*pi, 2*pi). The cordic exponential algorithm converges, when the angle is in the range [-pi/2, pi/2).If an angle is outside of this range, then a multiple of pi/2 is added or subtracted from the angle until it is within the range [-pi/2,pi/2).Start with the angle in the range [-2*pi, 2*pi) and output has range in [-1.0 to 1.0] Error (max = 0.000000015832484), THD+N = -167.082852232808847 +---------------—+--------------—+-----—+---------—+ | thRadFxp |cdccexpth |thRadFxp| cdccexpth| +-—+--—+----—+-—+-—+----—+-----—+---------—+ |WLen| FLen|Signbit|WLen|FLen|Signbit| Qformat| Qformat | +-—+--—+----—+-—+-—+----—+-----—+---------—+ | 32 | 28 | 1 | 32 | 15 | 1 | 4.28 | 2.30 | +---------------—+--------------—+-----—+---------—+
| int16_t cos_fixed_16b |
( |
int32_t | th_rad_fxp | ) |
|
|
inlinestatic |
cos_fixed_16b() - Cosine function using CORDIC algorithm
- Parameters
-
| th_rad_fxp | Input angle in radian Q4.28 format. |
- Returns
- Cosine value in Q1.15 format.
Compute fixed point cordic cosine with table lookup and interpolation The cordic cos algorithm converges, when the angle is in the range [-pi/2, pi/2).If an angle is outside of this range, then a multiple of pi/2 is added or subtracted from the angle until it is within the range [-pi/2,pi/2).Start with the angle in the range [-2*pi, 2*pi) and output has range in [-1.0 to 1.0] +---------------—+--------------—+-----—+---------—+ | thRadFxp | cdccosth |thRadFxp| cdccosth| +-—+--—+----—+-—+-—+----—+-----—+---------—+ |WLen| FLen|Signbit|WLen|FLen|Signbit| Qformat| Qformat | +-—+--—+----—+-—+-—+----—+-----—+---------—+ | 32 | 28 | 1 | 32 | 15 | 1 | 4.28 | 1.15 | +---------------—+--------------—+-----—+---------—+
| int32_t cos_fixed_32b |
( |
int32_t | th_rad_fxp | ) |
|
|
inlinestatic |
cos_fixed_32b() - Cosine function using CORDIC algorithm
- Parameters
-
| th_rad_fxp | Input angle in radian Q4.28 format. |
- Returns
- Cosine value in Q1.31 format.
Compute fixed point cordicsine with table lookup and interpolation The cordic cosine algorithm converges, when the angle is in the range [-pi/2, pi/2).If an angle is outside of this range, then a multiple of pi/2 is added or subtracted from the angle until it is within the range [-pi/2,pi/2).Start with the angle in the range [-2*pi, 2*pi) and output has range in [-1.0 to 1.0] +---------------—+--------------—+-----—+-----—+ | thRadFxp | cdccosth |thRadFxp|cdccosth| +-—+--—+----—+-—+-—+----—+-----—+-----—+ |WLen| FLen|Signbit|WLen|FLen|Signbit| Qformat| Qformat| +-—+--—+----—+-—+-—+----—+-----—+-----—+ | 32 | 28 | 1 | 32 | 31 | 1 | 4.28 | 1.31 | +---------------—+--------------—+-----—+-----—+
| int16_t sin_fixed_16b |
( |
int32_t | th_rad_fxp | ) |
|
|
inlinestatic |
sin_fixed_16b() - Sine function using CORDIC algorithm
- Parameters
-
| th_rad_fxp | Input angle in radian Q4.28 format. |
- Returns
- Sine value in Q1.15 format
Compute fixed point cordic sine with table lookup and interpolation The cordic sine algorithm converges, when the angle is in the range [-pi/2, pi/2).If an angle is outside of this range, then a multiple of pi/2 is added or subtracted from the angle until it is within the range [-pi/2,pi/2).Start with the angle in the range [-2*pi, 2*pi) and output has range in [-1.0 to 1.0] +---------------—+--------------—+-----—+---------—+ | thRadFxp | cdcsinth |thRadFxp| cdcsinth| +-—+--—+----—+-—+-—+----—+-----—+---------—+ |WLen| FLen|Signbit|WLen|FLen|Signbit| Qformat| Qformat | +-—+--—+----—+-—+-—+----—+-----—+---------—+ | 32 | 28 | 1 | 32 | 15 | 1 | 4.28 | 1.15 | +---------------—+--------------—+-----—+---------—+
| int32_t sin_fixed_32b |
( |
int32_t | th_rad_fxp | ) |
|
|
inlinestatic |
sin_fixed_32b() - Sine function using CORDIC algorithm
- Parameters
-
| th_rad_fxp | Input angle in radian Q4.28 format. |
- Returns
- Sine value in Q1.31 format.
Compute fixed point cordicsine with table lookup and interpolation The cordic sine algorithm converges, when the angle is in the range [-pi/2, pi/2).If an angle is outside of this range, then a multiple of pi/2 is added or subtracted from the angle until it is within the range [-pi/2,pi/2).Start with the angle in the range [-2*pi, 2*pi) and output has range in [-1.0 to 1.0] +---------------—+--------------—+-----—+-----—+ | thRadFxp | cdcsinth |thRadFxp|cdcsinth| +-—+--—+----—+-—+-—+----—+-----—+-----—+ |WLen| FLen|Signbit|WLen|FLen|Signbit| Qformat| Qformat| +-—+--—+----—+-—+-—+----—+-----—+-----—+ | 32 | 28 | 1 | 32 | 31 | 1 | 4.28 | 1.31 | +---------------—+--------------—+-----—+-----—+