/cmsis-dsp-3.5.0/PythonWrapper/examples/ |
D | testdsp.py | 1 import cmsisdsp as dsp namespace 7 r = dsp.arm_add_f32(np.array([1.,2,3]),np.array([4.,5,7])) 10 r = dsp.arm_add_q31([1,2,3],[4,5,7]) 13 r = dsp.arm_add_q15([1,2,3],[4,5,7]) 16 r = dsp.arm_add_q7([-1,2,3],[4,127,7]) 19 r = dsp.arm_scale_f32([1.,2,3],2) 22 r = dsp.arm_scale_q31([0x7FFF,0x3FFF,0x1FFF],1 << 20,2) 25 r = dsp.arm_scale_q15([0x7FFF,0x3FFF,0x1FFF],1 << 10,2) 28 r = dsp.arm_scale_q7([0x7F,0x3F,0x1F],1 << 5,2) 32 r = dsp.arm_negate_f32([1.,2,3]) [all …]
|
D | example_1_10.py | 2 import cmsisdsp as dsp namespace 153 wf32 = dsp.arm_welch_f32(128) 156 wf64 = dsp.arm_welch_f64(128) 161 wf32 = dsp.arm_bartlett_f32(128) 164 wf64 = dsp.arm_bartlett_f64(128) 169 wf32 = dsp.arm_hamming_f32(128) 172 wf64 = dsp.arm_hamming_f64(128) 177 wf32 = dsp.arm_hanning_f32(128) 180 wf64 = dsp.arm_hanning_f64(128) 185 wf32 = dsp.arm_nuttall3_f32(128) [all …]
|
D | testdsp2.py | 1 import cmsisdsp as dsp namespace 45 i=dsp.arm_max_f32(a) 48 i=dsp.arm_absmax_f32(a) 57 i=dsp.arm_absmax_q31(a31) 61 i=dsp.arm_absmax_q15(a15) 65 i=dsp.arm_absmax_q7(a7) 74 i=dsp.arm_min_f32(a) 77 i=dsp.arm_absmin_f32(a) 84 i=dsp.arm_absmax_f32(a) 90 i=dsp.arm_absmin_q31(a31) [all …]
|
D | testdsp5.py | 1 import cmsisdsp as dsp namespace 21 i=dsp.arm_absmax_no_idx_f32(a) 25 i=dsp.arm_absmax_no_idx_f64(a) 29 r,i=dsp.arm_absmax_f64(a) 33 r,i=dsp.arm_max_f64(a) 37 i=dsp.arm_max_no_idx_f32(a) 41 i=dsp.arm_max_no_idx_f64(a) 48 i=dsp.arm_absmin_no_idx_f32(a) 52 i=dsp.arm_absmin_no_idx_f64(a) 56 r,i=dsp.arm_absmin_f64(a) [all …]
|
D | example_1_9.py | 2 import cmsisdsp as dsp namespace 39 decimator = dsp.arm_fir_decimate_instance_f32() 41 status = dsp.arm_fir_decimate_init_f32(decimator,numTaps,decimationFactor, downsamplingFilter, ds_s… 54 ref = processSignal(wave,decimator,dsp.arm_fir_decimate_f32) 62 decimatorQ31 = dsp.arm_fir_decimate_instance_q31() 63 status = dsp.arm_fir_decimate_init_q31(decimatorQ31,numTaps,decimationFactor, 66 outputQ31 = processSignal(waveQ31,decimatorQ31,dsp.arm_fir_decimate_q31) 73 decimatorQ31 = dsp.arm_fir_decimate_instance_q31() 74 status = dsp.arm_fir_decimate_init_q31(decimatorQ31,numTaps,decimationFactor, 77 outputQ31 = processSignal(waveQ31,decimatorQ31,dsp.arm_fir_decimate_fast_q31) [all …]
|
D | testrfft_all.py | 1 import cmsisdsp as dsp namespace 85 rfftf64=dsp.arm_rfft_fast_instance_f64() 86 status=dsp.arm_rfft_fast_init_f64(rfftf64,nb) 87 result = dsp.arm_rfft_fast_f64(rfftf64,signal,0) 95 rifftf64=dsp.arm_rfft_fast_instance_f64() 96 status=dsp.arm_rfft_fast_init_f64(rifftf64,nb) 97 result = dsp.arm_rfft_fast_f64(rifftf64,referenceFloat,1) 108 rfftf32=dsp.arm_rfft_fast_instance_f32() 109 status=dsp.arm_rfft_fast_init_f32(rfftf32,nb) 110 result = dsp.arm_rfft_fast_f32(rfftf32,signal,0) [all …]
|
D | testdsp4.py | 1 import cmsisdsp as dsp namespace 25 i=dsp.arm_absmax_f32(a) 36 print(dsp.arm_absmax_no_idx_q31(a31)) 37 print(dsp.arm_max_no_idx_q31(a31)) 40 print(dsp.arm_absmax_no_idx_q15(a15)) 41 print(dsp.arm_max_no_idx_q15(a15)) 44 print(dsp.arm_absmax_no_idx_q7(a7)) 45 print(dsp.arm_max_no_idx_q7(a7)) 49 i=dsp.arm_absmax_f32(a) 62 print(dsp.arm_absmin_no_idx_q31(a31)) [all …]
|
D | testdistance.py | 1 import cmsisdsp as dsp namespace 11 res=dsp.arm_braycurtis_distance_f32(a,b) 19 res=dsp.arm_canberra_distance_f32(a,b) 26 res=dsp.arm_chebyshev_distance_f32(a,b) 31 res=dsp.arm_chebyshev_distance_f64(a,b) 37 res=dsp.arm_cityblock_distance_f32(a,b) 42 res=dsp.arm_cityblock_distance_f64(a,b) 48 res=dsp.arm_correlation_distance_f32(a,b) 55 res=dsp.arm_cosine_distance_f32(a,b) 60 res=dsp.arm_cosine_distance_f64(a,b) [all …]
|
D | testdsp3.py | 1 import cmsisdsp as dsp namespace 8 r=dsp.arm_vlog_q15(f.toQ15(x)) 11 r=dsp.arm_vlog_q31(f.toQ31(x)) 25 s,c=dsp.arm_sin_cos_f32(t) 29 s,c=dsp.arm_sin_cos_q31(f.toQ31(t/180.0)) 38 err,r=dsp.arm_sqrt_f32(a) 41 err,r=dsp.arm_sqrt_q31(f.toQ31(a)) 44 err,r=dsp.arm_sqrt_q15(f.toQ15(a)) 47 err,r=dsp.arm_sqrt_f32(-a) 50 err,r=dsp.arm_sqrt_q31(f.toQ31(-a)) [all …]
|
D | testdsp6.py | 1 import cmsisdsp as dsp namespace 24 sortinst=dsp.arm_sort_instance_f32() 27 dsp.arm_sort_init_f32(sortinst,mode,SORT_ASCENDING) 28 res=dsp.arm_sort_f32(sortinst,a) 39 dsp.arm_sort_init_f32(sortinst,mode,SORT_DESCENDING) 40 res=dsp.arm_sort_f32(sortinst,a) 53 splineInst = dsp.arm_spline_instance_f32() 54 dsp.arm_spline_init_f32(splineInst,0,x,y) 55 yres=dsp.arm_spline_f32(splineInst,xnew) 105 bayesInst = dsp.arm_gaussian_naive_bayes_instance_f32( [all …]
|
D | example_1_5.py | 2 import cmsisdsp as dsp namespace 57 betaF32,vF32 = dsp.arm_householder_f32(a,dsp.DEFAULT_HOUSEHOLDER_THRESHOLD_F32) 62 betaF64,vF64 = dsp.arm_householder_f64(a,dsp.DEFAULT_HOUSEHOLDER_THRESHOLD_F64) 72 resF32 = dsp.arm_householder_f32(a,dsp.DEFAULT_HOUSEHOLDER_THRESHOLD_F32) 76 resF32 = dsp.arm_householder_f32(a,0.001*dsp.DEFAULT_HOUSEHOLDER_THRESHOLD_F32) 135 status,r,q,tau = dsp.arm_mat_qr_f64(m,dsp.DEFAULT_HOUSEHOLDER_THRESHOLD_F64,tmpa,tmpb) 159 status,r,q,tau = dsp.arm_mat_qr_f32(m,dsp.DEFAULT_HOUSEHOLDER_THRESHOLD_F32,tmpa,tmpb)
|
D | example_1_4.py | 2 import cmsisdsp as dsp namespace 39 resf32=np.array([dsp.arm_atan2_f32(yv,xv)[1] for (yv,xv) in vals])/math.pi*180 48 resq31=4*f.Q31toF32(np.array([dsp.arm_atan2_q31(yv,xv)[1] for (yv,xv) in valsQ31]))/math.pi*180 57 resq15=4*f.Q15toF32(np.array([dsp.arm_atan2_q15(yv,xv)[1] for (yv,xv) in valsQ15]))/math.pi*180 80 resf64= dsp.arm_mse_f64(a,b) 85 resf32 = dsp.arm_mse_f32(a,b) 93 resQ31 = f.Q31toF32(dsp.arm_mse_q31(aQ31,bQ31)) 101 resQ15 = dsp.arm_mse_q15(aQ15,bQ15) 111 resQ7 = dsp.arm_mse_q7(aQ7,bQ7)
|
D | debug.py | 1 import cmsisdsp as dsp namespace 50 rifftQ31=dsp.arm_rfft_instance_q31() 51 status=dsp.arm_rfft_init_q31(rifftQ31,nb,1,1) 55 resultQ31 = dsp.arm_rfft_q31(rifftQ31,referenceQ31) 62 rfftQ31=dsp.arm_rfft_instance_q31() 63 status=dsp.arm_rfft_init_q31(rfftQ31,nb,0,1) 64 resultQ31 = dsp.arm_rfft_q31(rfftQ31,signalQ31)
|
D | example_1_11.py | 2 import cmsisdsp as dsp namespace 40 status,w=dsp.arm_dtw_init_window_q7(dsp.ARM_DTW_SAKOE_CHIBA_WINDOW,wsize,dtwWindow) 59 status,w=dsp.arm_dtw_init_window_q7(dsp.ARM_DTW_SLANTED_BAND_WINDOW,wsize,dtwWindow) 98 status,dtwDistance,dtwMatrix = dsp.arm_dtw_distance_f32(distance,None) 106 path=dsp.arm_dtw_path_f32(np.copy(dtwMatrix)) 148 status,dtwDistance,dtwMatrix = dsp.arm_dtw_distance_f32(distance,w)
|
D | testmfcc.py | 1 import cmsisdsp as dsp namespace 10 mfccf32=dsp.arm_mfcc_instance_f32() 30 status=dsp.arm_mfcc_init_f32(mfccf32,FFTSize,numOfMelFilters,numOfDctOutputs,dctMatrixFilters, 36 res=dsp.arm_mfcc_f32(mfccf32,debug,tmp)
|
D | example.py | 1 import cmsisdsp as dsp namespace 58 biquadQ31 = dsp.arm_biquad_casd_df1_inst_q31() 68 dsp.arm_biquad_cascade_df1_init_q31(biquadQ31,numStages,coefsQ31,state,postshift) 75 res2a=dsp.arm_biquad_cascade_df1_q31(biquadQ31,sigQ31[1:half]) 76 res2b=dsp.arm_biquad_cascade_df1_q31(biquadQ31,sigQ31[half+1:nbSamples])
|
D | testmfccq15.py | 1 import cmsisdsp as dsp namespace 10 mfccq15=dsp.arm_mfcc_instance_q15() 25 status=dsp.arm_mfcc_init_q15(mfccq15,FFTSize,numOfMelFilters,numOfDctOutputs, 33 errorStatus,resQ15=dsp.arm_mfcc_q15(mfccq15,debugQ15,tmp)
|
D | testmfccq31.py | 1 import cmsisdsp as dsp namespace 10 mfccq31=dsp.arm_mfcc_instance_q31() 25 status=dsp.arm_mfcc_init_q31(mfccq31,FFTSize,numOfMelFilters,numOfDctOutputs, 33 errorStatus,resQ31=dsp.arm_mfcc_q31(mfccq31,debugQ31,tmp)
|
D | example_1_6.py | 2 import cmsisdsp as dsp namespace 17 t = dsp.arm_accumulate_f64(data1) 21 t = dsp.arm_accumulate_f32(data1)
|
/cmsis-dsp-3.5.0/PythonWrapper/examples/kws_example/ |
D | appnodes.py | 31 import cmsisdsp as dsp namespace 73 m = dsp.arm_mean_q15(w) 75 m = dsp.arm_negate_q15(np.array([m]))[0] 76 w = dsp.arm_offset_q15(w,m) 85 status,quotient,shift_val=dsp.arm_divide_q15(k,len(f)) 87 return(dsp.arm_shift_q31(np.array([quotient]),shift)[0]) 95 self._firq15=dsp.arm_fir_instance_q15() 108 …dsp.arm_fir_init_q15(self._firq15,10,fix.toQ15(np.ones(10)/10.0),np.zeros(stateLength,dtype=np.int… 110 b[:] = dsp.arm_fir_q15(self._firq15,a) 125 b[:] = dsp_zcr_q15(dsp.arm_mult_q15(a,self._window)) [all …]
|
/cmsis-dsp-3.5.0/PythonWrapper/docs/source/ |
D | api.rst | 10 import cmsisdsp as dsp 32 .. py:function:: dsp.arm_add_f32(pSrcA,pSrcB) 45 import cmsisdsp as dsp 47 r = dsp.arm_add_f32([1.,2,3],[4.,5,7]) 51 r = dsp.arm_add_f32(np.array([1.,2,3]),np.array([4.,5,7])) 62 import cmsisdsp as dsp 64 firf32 = dsp.arm_fir_instance_f32() 76 .. py:function:: dsp.arm_fir_init_f32(S,numTaps,pCoeffs,pState) 91 dsp.arm_fir_init_f32(firf32,3,[1.,2,3],[0,0,0,0,0,0,0]) 115 .. py:function:: dsp.arm_fir_f32(S,pSrc) [all …]
|
/cmsis-dsp-3.5.0/PythonWrapper/ |
D | testrecip.py | 1 import cmsisdsp as dsp namespace 16 s,v=dsp.arm_recip_q15(int(0x2000),recipQ15) 22 s,v=dsp.arm_recip_q15(1,recipQ15)
|
/cmsis-dsp-3.5.0/ |
D | PythonWrapper_README.md | 97 > import cmsisdsp as dsp 111 > r = dsp.arm_add_f32(np.array([1.,2,3]),np.array([4.,5,7])) 115 > r = dsp.arm_add_f32([1.,2,3],[4.,5,7]) 125 > firf32 = dsp.arm_fir_instance_f32() 129 > dsp.arm_fir_init_f32(firf32,3,[1.,2,3],[0,0,0,0,0,0,0]) 143 > print(dsp.arm_fir_f32(firf32,[1,2,3,4,5])) 149 > print(dsp.arm_fir_f32(firf32,[6,7,8,9,10])) 175 > cfftf32=dsp.arm_cfft_instance_f32() 179 > status=dsp.arm_cfft_init_f32(cfftf32, nb) 184 > resultR = dsp.arm_cfft_f32(cfftf32,signalR,0,1) [all …]
|
D | .gitignore | 26 Doxygen/dsp.dxy
|
/cmsis-dsp-3.5.0/Doxygen/ |
D | gen_doc.sh | 47 "${DOXYGEN}" dsp.dxy
|