This group is the entry point for DSP Library users.
Introduction
The Atmel AVR DSPLib is a library which provides a useful set of digital signal processing functions. All the source code is available and fully compilable with GCC and IAR. This library provides optimized functions for the 32-bit AVRs but also target-independants functions.
This document is a listing of the functions currently implemented in the DSP Library
What can I find in this document ?
Following are the main sections available in this document.
Architecture
The DSPLib is divided in 2 parts :
- The basic library : containing the basic functions which are themselves sorted in sub-groups : filters, windows, vector management functions, operators, transforms and signal generation functions.
- The advanced library : built on the first one and which contains more complex functions such as ADCPM encoder/decoder.
Here is the directory architecture of the DSPLib (See /services/dsp/dsplib in the Atmel Software Framework) :
Directory Architecture of the DSPLib
|
- The /at32uc directory includes all the source code of the optimized functions available for the AT32UC targets and provided by the DSPLib (mainly assembly coded).
- The /examples directory regroups a lot of examples showing a way to use the functions provided by both advanced and basic libraries.
- The /generic directory regroups all the target-independant source code of the DSPLib.
- The /include directory includes all the common include files for the optimized functions and the generic functions.
- The /utils directory regroups useful tools and scripts for the DSP library.
|
Fixed-point format
All DSP types in the DSPLib includes the notion of 16-bit and 32-bit fixed-point formats. It is important to understand this format in order to fastest and/or debug an application. See Q Format for more details on this format.
Naming Convention
Each function in the basic library of the DSPLib follows this naming convention rule : dspX_Y_Z(...) Where:
- X is the type used (16 or 32)
- Y is category of the library (op, vect, trans, ...)
- Z is the short name of the function (cos, mul, ...)
Example :
dsp16_vect_mul is a function part of the DSP library. It works with 16-bit values and is used to multiply vectors.
Compilation Options
The DSPLIB is made to fit the best the user needs. Therefore, many configuration constants can be set at the compilation of the library. Here is the list :
- DSP_OPTIMIZATION : used to optimize the algorithmic of the functions. This optimization can be for speed, size, accuracy or size and accuracy. It can be set in addition to the one provided by the compiler.
- FORCE_ALL_GENERICS : to use only the generic (target-independant) functions when you compile the library.
- FORCE_GENERIC_DSP16_Z : to use the 16-bit generic version of a function. The specified function is defined by replacing the Z letter with the short name of the function. See Naming Convention for more details on the short name of a function.
- FORCE_GENERIC_DSP32_Z : to use the 32-bit generic version of a function. The specified function is defined by replacing the Z letter with the short name of the function. See Naming Convention for more details on the short name of a function.
- DSP16_FORMAT : to specify the precision of the 16-bit Q format number used. (ie: to use Q3.13 numbers, define DSP16_FORMAT with the value 13).
- DSP32_FORMAT : to specify the precision of the 32-bit Q format number used. (ie: to use Q10.22 numbers, define DSP32_FORMAT with the value 22).
All of these defines can be passed to the preprocessor at the compilation. Example:
use -D DSP16_FORMAT=12 in command line with GCC to use formatted Q4.12 numbers.
Device Information
All 32-bit AVR devices can be used.