对, Harmony中 勾选MIPS cache选项就可以了;我当时测试浮点数运算都是直接写C代码的 ,你可以尝试调整Cache及优化级别来确认运算速度
i = 1234.223;
j= 1234334.125;
k=0.0;
x = 81234.223;
y= 9234334.125;
mips_fir16_setup(coeffs2x, coeffs, K);
//while (1)
for(i=0;i<4;i++)
{
// load input data into indata
mips_fir16(outdata, indata, coeffs2x, delayline, N,K, 3);
// do something with outdata
}
z=0.0;
xx = 123.45;
yy= 13456.123;
zz = 0;
k=j/i;
timer1= BSP_ReadCoreTimer();
我上传了一个PIC32 Dspic library 的文件希望能对你有帮助,
|