Atmel Software Framework

simulator_examples/dsp32_lms/lms_example.c File Reference

32-bit LMS filtering

Copyright (c) 2011-2012 Atmel Corporation. All rights reserved.

#include <avr32/io.h>
#include "compiler.h"
#include "board.h"
#include "dsp.h"
#include "dsp_debug.h"
#include "sysclk.h"
#include "cycle_counter.h"

Macros

#define FIR_COEF_SIZE   12
 
#define SIZE   64
 The size of the input signal. More...
 

Functions

int main (int argc, char *argv[])
 

Variables

A_ALIGNED dsp32_t input_d [SIZE]
 Buffer containing filtered input data. More...
 
A_ALIGNED dsp32_t input_x [SIZE]
 Buffer containing input data. More...
 
A_ALIGNED dsp32_t unknown_coef_filter [FIR_COEF_SIZE]
 
A_ALIGNED dsp32_t w [FIR_COEF_SIZE]
 Coefficients of the filter. More...
 
A_ALIGNED dsp32_t x [FIR_COEF_SIZE]
 

#define FIR_COEF_SIZE   12

Referenced by main().

#define SIZE   64

The size of the input signal.

Referenced by main().

int main ( int  argc,
char *  argv[] 
)
Note
the call to sysclk_init() will disable all non-vital peripheral clocks, except for the peripheral clocks explicitly enabled in conf_clock.h.

References dsp32_debug_sprintf(), dsp32_filt_lms(), dsp_debug_initialization, FIR_COEF_SIZE, FOSC0, i, input_d, input_x, SIZE, sysclk_init(), w, x, and y.

Buffer containing filtered input data.

Buffer containing input data.

A_ALIGNED dsp32_t unknown_coef_filter[FIR_COEF_SIZE]
Initial value:
= {
DSP32_Q(0.0132),
DSP32_Q(0.0254),
DSP32_Q(0.0579),
DSP32_Q(0.1006),
DSP32_Q(0.1398),
DSP32_Q(0.1632),
DSP32_Q(0.1632),
DSP32_Q(0.1398),
DSP32_Q(0.1006),
DSP32_Q(0.0579),
DSP32_Q(0.0254),
}
#define DSP32_Q(fnum)
Convert a float into a 32-bit signed fixed-point type.
Definition: dsp_types.h:301

Coefficients of the filter.