Atmel Software Framework

examples/dsp16_vectors/vectors_example.c File Reference
#include <avr32/io.h>
#include "compiler.h"
#include "board.h"
#include "dsp.h"
#include "dsp_debug.h"
#include "pm.h"
#include "cycle_counter.h"

Data Structures

struct  s_item_menu
 

Macros

#define CHECK_CONDITIONS(x_cond)
 
#define CHECK_CONDITIONS_ALL(x_cond)
 
#define VECT1_SIZE   11
 
#define VECT2_SIZE   11
 
#define VECT3_SIZE   11
 

Typedefs

typedef int(* fct_item_menu )(int *)
 

Functions

int addition (int *size)
 
int convolution (int *size)
 
int copy (int *size)
 
int dot_division (int *size)
 
int dot_multiplication (int *size)
 
int int_division (int *size)
 
int int_multiplication (int *size)
 
int main (int argc, char *argv[])
 The main function. More...
 
int maximum (int *size)
 
int minimum (int *size)
 
int negate (int *size)
 
int partial_convolution (int *size)
 
int power (int *size)
 
int real_addition (int *size)
 
int real_division (int *size)
 
int real_multiplication (int *size)
 
int real_subtraction (int *size)
 
int subtraction (int *size)
 
int zero_padding (int *size)
 

Variables

s_item_menu item_menu []
 
A_ALIGNED dsp16_t vect1 [VECT1_SIZE]
 
A_ALIGNED dsp16_t vect2 [VECT2_SIZE]
 
A_ALIGNED dsp16_t vect3 [VECT3_SIZE]
 

#define CHECK_CONDITIONS (   x_cond)
Value:
{ \
}
#define CHECK_CONDITIONS_ALL(x_cond)
Definition: examples/dsp16_vectors/vectors_example.c:126

Referenced by int_division(), int_multiplication(), real_addition(), and real_subtraction().

#define CHECK_CONDITIONS_ALL (   x_cond)
Value:
if (!(x_cond)) \
{ \
dsp16_debug_printf("The condition '" #x_cond "' is not verified. (line %i)\n", __LINE__); \
return -1; \
}
return
Definition: avr32/applications/uc3-audio-player/main.c:244
int dsp16_debug_printf(const char *format,...)
This function is the printf version for 16-bit Q formatted signed numbers.
Definition: dsp_debug_printf.c:358
#define VECT1_SIZE   11
#define VECT2_SIZE   11
#define VECT3_SIZE   11

typedef int(* fct_item_menu)(int *)

int addition ( int *  size)
int convolution ( int *  size)
int copy ( int *  size)
int dot_division ( int *  size)
int dot_multiplication ( int *  size)
int int_multiplication ( int *  size)
int maximum ( int *  size)
int minimum ( int *  size)
int negate ( int *  size)
int partial_convolution ( int *  size)
int power ( int *  size)
int real_division ( int *  size)
int real_multiplication ( int *  size)
int real_subtraction ( int *  size)
int subtraction ( int *  size)
int zero_padding ( int *  size)

s_item_menu item_menu[]
Initial value:
= {
{ "Addition", addition },
{ "Subtraction", subtraction },
{ "Addition with a real", real_addition },
{ "Subtraction with a real", real_subtraction },
{ "Multiplication with a real", real_multiplication },
{ "Division with a real", real_division },
{ "Dot multiplication", dot_multiplication },
{ "Dot division", dot_division },
{ "Multiplication with an integer", int_multiplication },
{ "Division with an integer", int_division },
{ "Power", power },
{ "Minimum", minimum },
{ "Maximum", maximum },
{ "Negate", negate },
{ "Copy", copy },
{ "Zero padding", zero_padding },
{ "Convolution", convolution },
{ "Partial convolution", partial_convolution }
}
int real_addition(int *size)
Definition: examples/dsp16_vectors/vectors_example.c:238
int convolution(int *size)
Function to perform Vector Convolution.
Definition: examples/dsp32_vectors/vectors_example.c:414
int copy(int *size)
Function to perform Vector Copy.
Definition: examples/dsp32_vectors/vectors_example.c:381
int int_multiplication(int *size)
Definition: examples/dsp16_vectors/vectors_example.c:352
int real_subtraction(int *size)
Definition: examples/dsp16_vectors/vectors_example.c:257
int real_multiplication(int *size)
Function to perform Vector Real Multiplication.
Definition: examples/dsp32_vectors/vectors_example.c:230
int negate(int *size)
Function to perform Vector Negation.
Definition: examples/dsp32_vectors/vectors_example.c:363
int real_division(int *size)
Function to perform Vector Real Division.
Definition: examples/dsp32_vectors/vectors_example.c:249
int subtraction(int *size)
Function to perform Vector Subtraction.
Definition: examples/dsp32_vectors/vectors_example.c:211
int partial_convolution(int *size)
Function to perform Partial Convolution.
Definition: examples/dsp32_vectors/vectors_example.c:438
int dot_division(int *size)
Function to perform Vector Dot Division.
Definition: examples/dsp32_vectors/vectors_example.c:287
int power(int *size)
Function to perform Vector Power operation.
Definition: examples/dsp32_vectors/vectors_example.c:306
int maximum(int *size)
Function to find Vector Maximum.
Definition: examples/dsp32_vectors/vectors_example.c:344
int dot_multiplication(int *size)
Function to perform Vector Dot Multiplication.
Definition: examples/dsp32_vectors/vectors_example.c:268
int addition(int *size)
Function to perform Vector Addition.
Definition: examples/dsp32_vectors/vectors_example.c:192
int zero_padding(int *size)
Function to perform Zero Padding to Vector.
Definition: examples/dsp32_vectors/vectors_example.c:399
int minimum(int *size)
Function to find Vector Minimum.
Definition: examples/dsp32_vectors/vectors_example.c:325
int int_division(int *size)
Definition: examples/dsp16_vectors/vectors_example.c:371
Initial value:
= {
DSP16_Q(0.012010),
DSP16_Q(0.059717),
DSP16_Q(0.101397),
DSP16_Q(0.0583150),
DSP16_Q(0.0000000),
DSP16_Q(0.0921177),
DSP16_Q(0.0951057),
DSP16_Q(0.0884270),
DSP16_Q(0.0716020),
DSP16_Q(0.515080),
}
#define DSP16_Q(fnum)
Convert a float into a 16-bit signed fixed-point type.
Definition: dsp_types.h:297
Initial value:
= {
DSP16_Q(0.5),
DSP16_Q(0.101397),
DSP16_Q(0.110140),
DSP16_Q(0.076849),
DSP16_Q(0.794687),
DSP16_Q(0.113757),
DSP16_Q(0.250267),
DSP16_Q(0.389747),
DSP16_Q(0.509602),
DSP16_Q(0.587785),
}
#define DSP16_Q(fnum)
Convert a float into a 16-bit signed fixed-point type.
Definition: dsp_types.h:297