Andes Workshop
http://forum.andestech.com/

How to use Andes DSP library
http://forum.andestech.com/viewtopic.php?f=23&t=924
Page 1 of 1

Author:  cindy [ Wed May 06, 2015 3:57 pm ]
Post subject:  How to use Andes DSP library

(1)Linking with -ldsp (in the nds32le-elf/lib/libdsp.a of the toolchain)
(2)Including header files provided by Andes DSP library. They are named according to function categories:
nds32_basic_math.h
nds32_complex_math.h
nds32_controller_math.h
nds32_filtering_math.h
nds32_matrix_math.h
nds32_statistics_math.h
nds32_transform_math.h
nds32_utils_math.h

AndeSight setting:
Attachment:
ldsp.png
ldsp.png [ 12.24 KiB | Viewed 6767 times ]


Sample Code:
Code:
#include <stdio.h>
#include <stdlib.h>
#include <nds32_basic_math.h>

int main(void) {

   float input1[3]={1.1,2.2,3.3};
   float input2[3]={1.1,2.2,3.3};
   float output[3];
   nds32_add_f32(input1, input2, output, 3);

   printf("result: 1,2,3= %f, %f, %f", output[0],output[1],output[2]);
   return 0;
}




output
Attachment:
output.png
output.png [ 5.21 KiB | Viewed 6766 times ]

Attachment:
dsp_sim_sample.zip [57.38 KiB]
Downloaded 457 times

Page 1 of 1 All times are UTC + 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/