dsPIC DSC DSP Algorithm Library
  Software Libraries
  Application Notes
  Code Examples
  Data Sheets
  Development Tools
  MCU & DSC Overview
  8-bit
  16-bit
  32-bit
  Application Design Centers
dsPIC DSC DSP Algorithm Library

Summary

The dsPIC DSP Library provides a set of speed optimized functions for the most common digital signal processing applications. The DSP Library provides significant performance savings over equivalent functions coded in “C” and allows developers to dramatically shorten their development time. The DSP Library may be used with any dsPIC device

 

Description
The DSP Library is written predominantly in assembly language and makes extensive use of the dsPIC DSP instruction set and hardware resources, including X and Y memory addressing, modulo addressing, bit-reversed addressing, 9.31 saturation, and REPEAT and DO loops.

The DSP Library provides functions for the following types of operations:
Vector Operations
Matrix Operations
Filtering Operations
Transform Operations
Window Operations

Features
Free library included with MPLAB C30 compiler

Full compliance with the Microchip dsPIC C30 Compiler, Assembler and Linker
Simple user interface – just one library file and one header file
Functions are both “C” and assembly callable
FIR filtering functions include support for Lattice, Decimating, Interpolating and LMS filters
IIR filtering functions include support for Canonic, Transposed Canonic and Lattice filters
FIR and IIR functions may be used with the filter files generated by the dsPIC30F Filter Design program
Transform functions include support for in-place and out-of-place DCT, FFT and IFFT transforms
Window functions include support for Bartlett, Blackman, Hamming, Hanning and Kaiser windows
Control Functions including PID
Support for Program Space Visibility
Complete function profile information including register usage, cycle count and function size information

Devices Supported
All processors in the dsPIC DSC family

Getting Started
Read the summary section of this web page
Read the HTML Help files in the MPLAB C30 compiler release.
The DSP library file “libdsp.a” should be located in your C30 language tools “lib” folder.
The DSP library header file “dsp.h” should be located in your C30 language tools “include” folder.

 

Function Execution Times: dsPIC33F only

Function

Cycle Count Equation

Conditions

Number of Cycles

Execution Time @40 MIPS

 

Complex FFT**

-

N=64

3739

93.4 us

 

Complex FFT**

-

N=128

8485

212.1 us

 

Complex FFT**

-

N=256

19055

476.4 us

 

Block FIR

53+N(4+M)

N=32, M=32

1205

30.1 us

 

Block FIR Lattice

41+N(4+7M)

N=32, M=32

7337

183.4 us

 

Block IIR Canonic

36+N(8+7S)

N=32, S=4

1188

29.7 us

 

Block IIR Lattice

46+N(16+7M)

N=32, M=8

2350

58.7 us

 

Matrix Add

20+3(C*R)

C=8, R=8

212

5.3 us

 

Matrix Transpose

16+C(6+3(R-1))

C=8, R=8

232

5.8 us

 

Vector Dot Product

17+3N

N=32

113

2.9 us

 

Vector Max

19+7(N-2)

N=32

229

5.7 us

 

Vector Multiply

17+4N

N=32

145

3.6 us

 

Vector Power

16+2N

N=32

80

2.0 us

 

Proportional integral Derivative (PID)

30

N=1

30

0.75 us

 
 

Function Execution Times: 70 MIPS dsPIC33E only

Function

Cycle Count Equation

Conditions

Number of Cycles

Execution Time @70 MIPS

 

Complex FFT**

-

N=64

3889

55.6 us

 

Complex FFT**

-

N=128

8765

125.2 us

 

Complex FFT**

-

N=256

19593

279.9 us

 

Block FIR

73+N(4+M)

N=32, M=32

1225

17.5 us

 

Block FIR Lattice

56+N(4+7M)

N=32, M=32

7352

105.0 us

 

Block IIR Canonic

41+N(8+7S)

N=32, S=4

1193

17.0 us

 

Block IIR Lattice

48+N(18+7M)

N=32, M=8

2416

34.5 us

 

Matrix Add

27+3(C*R)

C=8, R=8

219

3.1 us

 

Matrix Transpose

23+C(6+3(R-1))

C=8, R=8

239

3.4 us

 

Vector Dot Product

24+3N

N=32

120

1.7 us

 

Vector Max

26+11(N-2)

N=32

236

3.4 us

 

Vector Multiply

24+4N

N=32

152

2.2 us

 

Vector Power

23+2N

N=32

87

1.2 us

 

Proportional integral Derivative (PID)

36

N=1

36

0.51 us

 
           

*C= #columns, N=# samples, M=#taps, S=#sections, R=#rows
**Complex FFT routine inherently prevents overflow

 

1 cycle = 25 nanoseconds @40 MIPS

1 cycle = 14.28 nanoseconds @70 MIPS

Downloads