我用ccs编了一个for循环在debug模式下做了50000次浮点型乘法运算,然后配置一个IO口输出高低电平,用示波器看波形和时间,最终得到1ms可以计算9000+次乘法,是不是因为配置了IO口,要访问IO才导致速度这么慢?这时候数据应该是在RAM吧,理论上速度应该很快啊。
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
我用ccs编了一个for循环在debug模式下做了50000次浮点型乘法运算,然后配置一个IO口输出高低电平,用示波器看波形和时间,最终得到1ms可以计算9000+次乘法,是不是因为配置了IO口,要访问IO才导致速度这么慢?这时候数据应该是在RAM吧,理论上速度应该很快啊。
问题不在这。
#1. 代码要优化,不然比较测试没意义:
http://processors.wiki.ti.com/index.php/TMS320C6000_DSP_Optimization_Workshop?keyMatch=optimization&tisearch=Search-EN
#2. 不要用GPIO来测时间,用profile:
Profiler:
http://processors.wiki.ti.com/index.php/Profiler?keyMatch=profile&tisearch=Search-EN-Everything
CCS profile clock:
http://processors.wiki.ti.com/index.php/Profile_clock_in_CCS