All the fixed point operators functions currently implemented in the DSP library.
These functions multiply two fixed-point numbers.
Relative functions:
These functions divide two fixed-point numbers. Relative functions:
These functions compute the sine of the argument 'angle'.
Relative functions:
These functions compute the cosine of the argument 'angle'. Angles are scale to fit in the range [-1; 1], where -1 corresponds to -pi and 1 to pi. Relative functions:
These functions compute the arc sine of the argument.
Relative functions:
These functions compute the arc cosine of the argument.
Relative functions:
These functions compute the absolute value of the argument. Relative functions:
These functions compute the square root of the argument. Relative functions:
These functions compute the natural logarithm of the argument. Relative functions:
These functions compute the binary logarithm of the argument.
Relative functions:
These functions compute the common logarithm of the argument.
Relative functions:
These functions compute the exponential of the argument.
Relative functions:
These functions compute x^y.
Relative functions:
These functions generate a pseudo-radomized number Relative functions:
Functions | |
static dsp16_t | dsp16_op_abs (dsp16_t number) |
16-bit fixed point version of the absolute function. More... | |
static dsp16_t | dsp16_op_acos (dsp16_t number) |
16-bit fixed point version of the arc cosine function. More... | |
dsp16_t | dsp16_op_asin (dsp16_t number) |
16-bit fixed point version of the arc sine function. More... | |
static dsp16_t | dsp16_op_cos (dsp16_t angle) |
16-bit fixed point version of the cosine function. More... | |
static dsp16_t | dsp16_op_div (dsp16_t num, dsp16_t den) |
16-bit fixed point version of the division function. More... | |
dsp16_t | dsp16_op_exp (dsp16_t number) |
16-bit fixed point version of the exponential function. More... | |
dsp16_t | dsp16_op_ln (dsp16_t number) |
16-bit fixed point version of the natural logarithm function. More... | |
dsp16_t | dsp16_op_log10 (dsp16_t number) |
16-bit fixed point version of the common logarithm function. More... | |
dsp16_t | dsp16_op_log2 (dsp16_t number) |
16-bit fixed point version of the binary logarithm function. More... | |
static dsp16_t | dsp16_op_mul (dsp16_t num1, dsp16_t num2) |
16-bit fixed point version of the multiplication function. More... | |
dsp16_t | dsp16_op_pow (dsp16_t x, dsp16_t y) |
16-bit fixed point version of the power function. More... | |
dsp16_t | dsp16_op_rand (void) |
16-bit fixed point version of the random operator. More... | |
dsp16_t | dsp16_op_sin (dsp16_t angle) |
16-bit fixed point version of the sine function. More... | |
dsp16_t | dsp16_op_sqrt (dsp16_t number) |
16-bit fixed point version of the square root function. More... | |
static dsp32_t | dsp32_op_abs (dsp32_t number) |
32-bit fixed point version of the absolute function. More... | |
static dsp32_t | dsp32_op_acos (dsp32_t number) |
32-bit fixed point version of the arc cosine function. More... | |
dsp32_t | dsp32_op_asin (dsp32_t number) |
32-bit fixed point version of the arc sine function. More... | |
static dsp32_t | dsp32_op_cos (dsp32_t angle) |
32-bit fixed point version of the cosine function. More... | |
static dsp32_t | dsp32_op_div (dsp32_t num, dsp32_t den) |
32-bit fixed point version of the division function. More... | |
dsp32_t | dsp32_op_exp (dsp32_t number) |
32-bit fixed point version of the exponential function. More... | |
dsp32_t | dsp32_op_ln (dsp32_t number) |
32-bit fixed point version of the natural logarithm function. More... | |
dsp32_t | dsp32_op_log10 (dsp32_t number) |
32-bit fixed point version of the common logarithm function. More... | |
dsp32_t | dsp32_op_log2 (dsp32_t number) |
32-bit fixed point version of the binary logarithm function. More... | |
static dsp32_t | dsp32_op_mul (dsp32_t num1, dsp32_t num2) |
32-bit fixed point version of the multiplication function. More... | |
dsp32_t | dsp32_op_pow (dsp32_t x, dsp32_t y) |
32-bit fixed point version of the power function. More... | |
dsp32_t | dsp32_op_rand (void) |
32-bit fixed point version of the random operator. More... | |
dsp32_t | dsp32_op_sin (dsp32_t angle) |
32-bit fixed point version of the sine function. More... | |
dsp32_t | dsp32_op_sqrt (dsp32_t number) |
32-bit fixed point version of the square root function. More... | |
void | dsp_op_srand (int new_seed) |
Initialize the pseudo-random number generator. More... | |
16-bit fixed point version of the absolute function.
number | The number to compute |
Referenced by dsp16_op_asin(), dsp16_op_exp(), and dsp16_op_pow().
16-bit fixed point version of the arc cosine function.
number | The number to compute |
References dsp16_op_asin(), and DSP16_Q.
16-bit fixed point version of the arc sine function.
number | The number to compute |
References A, B, C, D, dsp16_op_abs(), dsp16_op_asin(), dsp16_op_sqrt(), DSP16_Q, DSP16_QB, and num.
Referenced by dsp16_op_acos(), and dsp16_op_asin().
16-bit fixed point version of the cosine function.
angle | The angle to compute |
References dsp16_op_sin(), and DSP16_Q.
Referenced by dsp16_filt_lpfirdesign_windowed_sinc().
16-bit fixed point version of the exponential function.
number | The number to compute |
References A, B, C, CST_INV_SQUARE_ROOT_2, CST_LN_2, CST_SQUARE_ROOT_2, DSP16_EXP_LIMIT_VAL, dsp16_op_abs(), DSP16_Q, DSP16_QA, DSP16_QB, DSP_Q, and DSP_Q_MAX.
Referenced by dsp16_op_pow().
16-bit fixed point version of the natural logarithm function.
number | The number to compute |
References dsp16_op_ln_raw(), DSP16_QA, DSP16_QB, DSP_Q_MIN, and num.
16-bit fixed point version of the common logarithm function.
number | The number to compute |
References CST_LN_10, dsp16_op_ln_raw(), DSP16_QA, DSP16_QB, DSP_Q, DSP_Q_MIN, and num.
16-bit fixed point version of the binary logarithm function.
number | The number to compute |
References CST_LN_2, dsp16_op_ln_raw(), DSP16_QA, DSP16_QB, DSP_Q, DSP_Q_MIN, and num.
16-bit fixed point version of the multiplication function.
num1 | The first member of the multiplication. |
num2 | The second member of the multiplication. |
References DSP16_QB.
Referenced by dsp16_filt_lpfirdesign(), and dsp16_filt_lpfirdesign_windowed_sinc().
16-bit fixed point version of the power function.
x | The number from which the power has to be applied. |
y | The power. |
References CST_LN_2, dsp16_op_abs(), dsp16_op_exp(), dsp16_op_ln_raw(), DSP16_Q, DSP16_QA, DSP16_QB, DSP_Q, DSP_Q_MAX, DSP_Q_MIN, and num.
dsp16_t dsp16_op_rand | ( | void | ) |
16-bit fixed point version of the sine function.
angle | The angle to compute |
References DSP16_MODULO_1_MASK, dsp16_op_kernel_cosfix(), dsp16_op_kernel_sinfix(), DSP16_Q, and DSP16_QB.
Referenced by dsp16_filt_lpfirdesign_windowed_sinc(), and dsp16_op_cos().
16-bit fixed point version of the square root function.
number | The number to compute |
16-bit fixed point version of the square root function.
References ASM_INSTRUCT_COMPACKED, ASTRINGZ, CST_ZERO, DSP16_Q, DSP16_QA, DSP16_QB, DSP16_SQRT_NEWTON_ITERATION, DSP16_SQRT_ONE_POINT_FIVE, and MREPEAT.
Referenced by dsp16_op_asin().
32-bit fixed point version of the absolute function.
number | The number to compute |
Referenced by dsp32_op_asin(), dsp32_op_exp(), and dsp32_op_pow().
32-bit fixed point version of the arc cosine function.
number | The number to compute |
References dsp32_op_asin(), and DSP32_Q.
32-bit fixed point version of the arc sine function.
number | The number to compute |
References A, B, C, D, dsp32_op_abs(), dsp32_op_asin(), dsp32_op_sqrt(), DSP32_Q, DSP32_QB, E, F, and num.
Referenced by dsp32_op_acos(), and dsp32_op_asin().
32-bit fixed point version of the cosine function.
angle | The angle to compute |
References dsp32_op_sin(), and DSP32_Q.
32-bit fixed point version of the exponential function.
number | The number to compute |
References A, B, C, CST_INV_SQUARE_ROOT_2, CST_LN_2, CST_SQUARE_ROOT_2, D, DSP32_EXP_LIMIT_VAL, dsp32_op_abs(), DSP32_Q, DSP32_QA, DSP32_QB, DSP_Q_MAX, and E.
Referenced by dsp32_op_pow().
32-bit fixed point version of the natural logarithm function.
number | The number to compute |
References dsp32_op_ln_raw(), DSP32_QA, DSP32_QB, DSP_Q_MIN, and num.
32-bit fixed point version of the common logarithm function.
number | The number to compute |
References CST_LN_10, dsp32_op_ln_raw(), DSP32_QA, DSP32_QB, DSP_Q_MIN, and num.
32-bit fixed point version of the binary logarithm function.
number | The number to compute |
References CST_LN_2, dsp32_op_ln_raw(), DSP32_QA, DSP32_QB, DSP_Q_MIN, and num.
32-bit fixed point version of the multiplication function.
num1 | The first member of the multiplication. |
num2 | The second member of the multiplication. |
References DSP32_QB.
32-bit fixed point version of the power function.
x | The number from which the power has to be applied. |
y | The power. |
References CST_LN_2, dsp32_op_abs(), dsp32_op_exp(), dsp32_op_ln_raw(), DSP32_Q, DSP32_QA, DSP32_QB, DSP_Q_MAX, DSP_Q_MIN, and num.
dsp32_t dsp32_op_rand | ( | void | ) |
32-bit fixed point version of the sine function.
angle | The angle to compute |
References DSP32_MODULO_1_MASK, dsp32_op_kernel_cosfix(), dsp32_op_kernel_sinfix(), DSP32_Q, and DSP32_QB.
Referenced by dsp16_filt_lpfirdesign(), and dsp32_op_cos().
32-bit fixed point version of the square root function.
number | The number to compute |
References CST_INV_SQUARE_ROOT_2, DSP32_Q, DSP32_QB, DSP32_SQRT_NEWTON_ITERATION, MREPEAT, and num.
Referenced by dsp32_op_asin().
void dsp_op_srand | ( | int | new_seed | ) |
Initialize the pseudo-random number generator.
new_seed | An integer value to be used as seed by the pseudo-random number generator algorithm. |
References seed.