DSPLib For SH Application Note (19-031/1.0) Contents
Hitachi Micro Systems Europe Ltd ii
TABLE OF CONTENTS
PREFACE ................................................................................................................................................i
1.0 OVERVIEW......................................................................................................................................1
1.1 GENERAL DESCRIPTION.......................................................................................................................1
1.1.2 Note About Data Types................................................................................................................2
1.2 FUNCTION TIMINGS .............................................................................................................................3
1.2.1 FFT Timings ................................................................................................................................3
1.2.2 Filter Timings ..............................................................................................................................3
1.2.3 Convolution & Correlation Timings............................................................................................4
2.0 FAST FOURIER TRANSFORMS (FFT).......................................................................................5
2.1 FFT BACKGROUND THEORY ...............................................................................................................5
2.1.1 Not In Place FFT.........................................................................................................................6
2.1.2 In-Place FFT ...............................................................................................................................7
2.1.3 FFT Scaling.................................................................................................................................8
2.1.4 Input / Output Array Format .......................................................................................................8
2.2 ROUTINE DESCRIPTIONS ......................................................................................................................9
2.2.1 FftReal.........................................................................................................................................9
2.2.2 FftComplex ................................................................................................................................13
2.2.3 IfftComplex ................................................................................................................................14
2.2.4 IfftReal.......................................................................................................................................16
2.2.5 FftInComplex.............................................................................................................................17
2.2.6 FftInReal....................................................................................................................................17
2.2.7 IfftInComplex.............................................................................................................................18
2.2.8 IfftInReal............................................................................................................... .....................18
3.0 WINDOW FUNCTIONS................................................................................................................21
3.1 FUNCTION DESCRIPTIONS ..................................................................................................................21
3.2 USING WINDOW FUNCTIONS..............................................................................................................24
3.3 FFT APPLICATION OF WINDOW FUNCTIONS......................................................................................24
4.0 FILTERS.........................................................................................................................................31
4.1 FILTER BACKGROUND THEORY .........................................................................................................31
4.1.1 Finite Impulse Response Filters (FIR).......................................................................................32
4.1.2 Infinite Impulse Response Filters (IIR)......................................................................................33
4.1.3 Filter Specification ....................................................................................................................35
4.2 ROUTINE DESCRIPTIONS ....................................................................................................................37
4.2.1 Fir..............................................................................................................................................37
4.2.2 Fir1............................................................................................................................................39
4.2.3 Iir...............................................................................................................................................41
4.2.4 Iir1..................................................................................................................... ........................43
4.2.5 DIir ............................................................................................................................................44
4.2.6 DIir1 ..........................................................................................................................................49
4.2.7 Lms.............................................................................................................................................50
4.2.8 Lms1...........................................................................................................................................57
5.0 CONVOLUTION AND CORRELATION ...................................................................................59
5.1 BACKGROUND THEORY.....................................................................................................................59
5.1.1 Convolution ...............................................................................................................................59
5.1.2 Correlation ................................................................................................................................60
5.2 ROUTINE DESCRIPTIONS ....................................................................................................................61
5.2.1 ConvComplete............................................................................................................................61
5.2.2 ConvCyclic.................................................................................................................................62