Microchip® Advanced Software Framework

vect_dsp32_add_and_saturate.c File Reference
#include "dsp.h"
#include "preprocessor.h"

Macros

#define DSP32_ADD_KERNEL_X_FCT(x_num, data)
 
#define DSP32_ADDITION(x_num, data)
 

Functions

void dsp32_vect_add_and_sat (dsp32_t *vect1, dsp32_t *vect2, dsp32_t *vect3, int size)
 32-bit fixed point version of the vector addition function. More...
 

#define DSP32_ADD_KERNEL_X_FCT (   x_num,
  data 
)
Value:
static void TPASTE2(dsp32_vect_add_kernel_x, x_num)(dsp32_t *vect1, dsp32_t *vect2, dsp32_t *vect3) \
{ \
MREPEAT(x_num, DSP32_ADDITION, ""); \
}
A_ALIGNED dsp32_t vect2[SIZE]
The input signal resulting from a multiplication between a cosine and a sine.
Definition: complex_fft_example.c:91
#define DSP32_ADDITION(x_num, data)
Definition: vect_dsp32_add_and_saturate.c:46
dsp32_t__ dsp32_t
32-bit signed fixed point type optimized for 32-bit or lower microcontrollers
Definition: dsp_types.h:201
#define MREPEAT(count, macro, data)
Macro repeat.
Definition: mrepeat.h:67
A_ALIGNED dsp32_complex_t vect1[SIZE]
The output buffer.
Definition: complex_fft_example.c:88
#define TPASTE2(a, b)
Definition: tpaste.h:61
#define DSP32_ADDITION (   x_num,
  data 
)
Value:
{ \
S64 temp = vect2[x_num] + vect3[x_num]; \
if (temp > (S64) DSP_Q_MAX(DSP32_QA, DSP32_QB)) \
else if (temp < (S64) DSP_Q_MIN(DSP32_QA, DSP32_QB)) \
vect1[x_num] = (dsp32_t) temp; \
}
#define DSP_Q_MAX(a, b)
Return the maximal value of a fixed-point Qa.b typed number.
Definition: dsp_types.h:258
#define DSP_Q_MIN(a, b)
Return the minimal value of a fixed-point Qa.b typed number.
Definition: dsp_types.h:262
signed long long int S64
64-bit signed integer.
Definition: compiler.h:221
A_ALIGNED dsp32_t vect2[SIZE]
The input signal resulting from a multiplication between a cosine and a sine.
Definition: complex_fft_example.c:91
dsp32_t__ dsp32_t
32-bit signed fixed point type optimized for 32-bit or lower microcontrollers
Definition: dsp_types.h:201
#define DSP32_QB
number of fractional bits
Definition: dsp_types.h:167
A_ALIGNED dsp32_complex_t vect1[SIZE]
The output buffer.
Definition: complex_fft_example.c:88
#define DSP32_QA
number of integer bits
Definition: dsp_types.h:163

Referenced by dsp32_vect_add_and_sat().