完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我正在尝试MIPS DSP功能在PIC32 MX130F064 B上工作。我使用XC32 V2.05和MPLABX V4.15。FFT函数(MIPS1 FFT16)工作很好。向量添加函数(MIPSvVECADAD16)工作得很好。但是多个函数中没有一个工作(MIPSH VECUMUL16,MIPSY VECUM SUMIX SuffRES16等)。下面是一个示例,演示MIPsxVECUAD16的工作原理,但是MIPsxVECUMUL16不起作用。我尝试了不同的编译器设置,使用32位版本的函数并使用不同的数据类型(包括FrACT和字节对齐编译器指令)。但这些都没有效果。下面是测试代码,在这里我表示向量乘法工作,但是向量乘以X.H.& gt;包括“dSpBixDSP.H”UINT32×t AB〔1000〕;INT32 32×BB;INT16 TestOutOUT〔16〕;INT16 TEST1〔16〕;INT16 Test2〔16〕;int NN;int main(空隙){int NN;(NN=0;NN & LT;16;NN+++){Test1[NN]=NN。//TEST1是0,1,2,3,4…Test2[NN]=NN+5;//Test2是5、6、7、8、9、…} MIPSSVIECADAD16(TestOutOUT,TEST1,TEST 2,16);//矢量添加工作完美!对于(NN=0;NN和lt;16;NN++){//这是我设置断点并检查TestOxOUT数组的地方。PtUB= TestOxOU[NN];//TestExoT是5,7,9,11,15,…正确答案!} MIPSvVECUMUL16(TestiOUT,TEST1,TEST 2,16);/ /向量多重返回全部零。对于(NN=0;NN和lt;16;NN++){//这是我设置断点并检查TestOxOUT数组的地方。PtUB= TestOxOU[NN];//TestIOUT应该是0,7,14等,但它都是零(不正确)} TestOxOut[0 ]=MIPSv.VEC.SUMIX SUBARES16(Test1,16.1);//平方和返回零/ /这是我设置断点并检查TestOxOUT数组的地方。PtUB= TestEXOUT〔0〕;//TestExOUT(0)等于零(不正确)返回(0);}
以上来自于百度翻译 以下为原文 I'm trying to get the mips DSP functions working on a PIC32MX130F064B. I'm using xc32 v2.05 and MPLABX v4.15. The FFT function (mips_fft16) works great. The vector add function (mips_vec_add16) works great. But none of the multiple functions work (mips_vec_mul16, mips_vec_sum_squares16 etc) . Below is an example where I show mips_vec_add16 working, but the mips_vec_mul16 doesn't work. I've tried different compiler settings, using 32 bit version of the functions and using different datatypes (including Fract and byte alignment compiler directives). But none of that works. Below is test code where I show that the vector add works, but the vector multiplies return all zeros. #include #include "dsplib_dsp.h" uint32_t aa[1000]; uint32_t bb; int16 test_out[16]; int16 test1[16]; int16 test2[16]; int nn; int main(void) { int nn; for (nn=0;nn<16;nn++) { test1[nn]=nn; //test1 is 0,1,2,3,4 ... test2[nn]=nn+5; //test2 is 5,6,7,8,9,.... } mips_vec_add16(test_out,test1,test2,16); //vector add works perfect! for (nn=0;nn<16;nn++) { //This is where I set a breakpoint and inspect test_out array. PORTB = test_out[nn]; //test_out is 5,7,9,11,15,....correct answer! } mips_vec_mul16(test_out,test1,test2,16); //vector multiple returns all zeros. for (nn=0;nn<16;nn++) { //This is where I set a breakpoint and inspect test_out array. PORTB = test_out[nn]; //test_out should be 0,7,14,etc, but it's all zeros (incorrect) } test_out[0]=mips_vec_sum_squares16(test1,16,1); //sum of squares returns zeros //This is where I set a breakpoint and inspect test_out array. PORTB = test_out[0]; //test_out[0] is equal to zero (incorrect) return(0); } |
|
相关推荐
2个回答
|
|
您好,您使用的是和声,还是使用MLA或裸金属方式?可以与不同的DSP库进行交互。没有已知的问题会阻止你使用这个函数。
以上来自于百度翻译 以下为原文 Hello, Are you using Harmony, or are you using MLA or bare metal approach? There could be some interaction with the different DSP libraries. There are no known issues that would prevent you from using this function. |
|
|
|
这些都是完全正确的结果,考虑到函数参数是Q15类型的事实,与DSPIRBIDEF文件H中的Mul16()函数定义相比较。
以上来自于百度翻译 以下为原文 These are completely correct results, taking into account the fact that the function arguments are of type Q15 Compare with the mul16 () function definition in the dsplib_def.h file albert |
|
|
|
只有小组成员才能发言,加入小组>>
4910 浏览 9 评论
1867 浏览 8 评论
1810 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3006 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2094 浏览 5 评论
505浏览 1评论
362浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
414浏览 0评论
303浏览 0评论
1059浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-7-3 16:08 , Processed in 1.114363 second(s), Total 77, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191