Microchip® Advanced Software Framework

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

Macros

#define ASM_INSTRUCT_COMPACKED(str)   str
 
#define ASM_INSTRUCT_EXTENDED(str)   str
 
#define DSP16_REALMUL_END_KERNEL_X_FCT(x_num, data)   __attribute__((__naked__)) DSP16_REALMUL_END_KERNEL_X_FCT__(x_num, data)
 
#define DSP16_REALMUL_END_KERNEL_X_FCT__(x_num, data)
 
#define DSP16_REALMULTIPLICATION_0(r_vect1, r_vect2, real)
 
#define DSP16_REALMULTIPLICATION_1(r_vect1, r_vect2, real)
 
#define DSP16_REALMULTIPLICATION_2(r_vect1, r_vect2, real)
 
#define DSP16_REALMULTIPLICATION_3(r_vect1, r_vect2, real)
 

Functions

void dsp16_vect_realmul (dsp16_t *vect1, dsp16_t *vect2, int size, dsp16_t real)
 16-bit fixed point version of the vector multiplication with a real number. More...
 
static int dsp16_vect_realmul_kernel_ext (dsp16_t *vect1, dsp16_t *vect2, int size, dsp16_t real)
 avr32-uc3 16 bit version More...
 

#define ASM_INSTRUCT_COMPACKED (   str)    str
#define ASM_INSTRUCT_EXTENDED (   str)    str
#define DSP16_REALMUL_END_KERNEL_X_FCT (   x_num,
  data 
)    __attribute__((__naked__)) DSP16_REALMUL_END_KERNEL_X_FCT__(x_num, data)
#define DSP16_REALMUL_END_KERNEL_X_FCT__ (   x_num,
  data 
)
Value:
static void TPASTE2(dsp16_vect_realmul_end_kernel_x, x_num)(dsp16_t *vect1, dsp16_t *vect2, dsp16_t real) \
{ \
__asm__ __volatile__ ( \
"pushm r0-r3, lr\n\t" \
TPASTE2(DSP16_REALMULTIPLICATION_, x_num)(r12, r11, r10) \
"popm r0-r3, pc\n\t" \
); \
}
A_ALIGNED dsp32_t vect2[SIZE]
Definition: complex_fft_example.c:85
dsp16_t__ dsp16_t
16-bit signed fixed point type optimized for 32-bit or lower microcontrollers
Definition: dsp_types.h:192
A_ALIGNED dsp32_complex_t vect1[SIZE]
Definition: complex_fft_example.c:82
#define TPASTE2(a, b)
Definition: tpaste.h:61
#define DSP16_REALMULTIPLICATION_0 (   r_vect1,
  r_vect2,
  real 
)
#define DSP16_REALMULTIPLICATION_1 (   r_vect1,
  r_vect2,
  real 
)
Value:
"ld.sh r2, "ASTRINGZ(r_vect2)"[0x0]\n\t" \
\
"mul r1, r2, "ASTRINGZ(real)"\n\t" \
"lsr r1, "ASTRINGZ(DSP16_QB)"\n\t" \
"st.h "ASTRINGZ(r_vect1)"[0x0], r1\n\t"
#define DSP16_QB
number of fractional bits
Definition: dsp_types.h:137
#define ASTRINGZ(x)
Absolute stringize.
Definition: stringz.h:71
#define DSP16_REALMULTIPLICATION_2 (   r_vect1,
  r_vect2,
  real 
)
Value:
"ld.w r2, "ASTRINGZ(r_vect2)"[0x0]\n\t" \
\
"mulhh.w r1, r2:b, "ASTRINGZ(real)":b\n\t" \
"lsr r1, "ASTRINGZ(DSP16_QB)"\n\t" \
"mulhh.w r0, r2:t, "ASTRINGZ(real)":b\n\t" \
"lsr r0, "ASTRINGZ(DSP16_QB)"\n\t" \
"sthh.w "ASTRINGZ(r_vect1)"[0x0], r0:b, r1:b\n\t"
#define DSP16_QB
number of fractional bits
Definition: dsp_types.h:137
#define ASTRINGZ(x)
Absolute stringize.
Definition: stringz.h:71
#define DSP16_REALMULTIPLICATION_3 (   r_vect1,
  r_vect2,
  real 
)
Value:
"ld.w r2, "ASTRINGZ(r_vect2)"[0x0]\n\t" \
\
"mulhh.w r1, r2:b, "ASTRINGZ(real)":b\n\t" \
"lsr r1, "ASTRINGZ(DSP16_QB)"\n\t" \
"mulhh.w r0, r2:t, "ASTRINGZ(real)":b\n\t" \
"lsr r0, "ASTRINGZ(DSP16_QB)"\n\t" \
"sthh.w "ASTRINGZ(r_vect1)"[0x0], r0:b, r1:b\n\t" \
\
"ld.sh r2, "ASTRINGZ(r_vect2)"[0x4]\n\t" \
\
"mul r1, r2, "ASTRINGZ(real)"\n\t" \
"lsr r1, "ASTRINGZ(DSP16_QB)"\n\t" \
"st.h "ASTRINGZ(r_vect1)"[0x4], r1\n\t"
#define DSP16_QB
number of fractional bits
Definition: dsp_types.h:137
#define ASTRINGZ(x)
Absolute stringize.
Definition: stringz.h:71

static int dsp16_vect_realmul_kernel_ext ( dsp16_t vect1,
dsp16_t vect2,
int  size,
dsp16_t  real 
)
static

avr32-uc3 16 bit version

References ASM_INSTRUCT_COMPACKED, ASTRINGZ, and DSP16_QB.

Referenced by dsp16_vect_realmul().