1、在CCS5.5中,使用profile测量c6748的程序执行时间准确吗?如果不准确,是偏大还是偏小?
2、在CCS5.5中,使用TSCL和TSCH测量程序执行时间为什么这两个寄存器的值一直是0,而没有变化?
Shine:
不精准,所以 C6000 hardware不支持profile功能,具体见下面的FAQhttp://processors.wiki.ti.com/index.php/FAQ_-_CCSv5#Q:_Why_is_function_profiling_not_supported_on_C6000_hardware.3F
Shine:
回复 Shine:
2. 请问你用TSCL, TSCH测量执行之间的代码是怎么写的?
Shine:
回复 Shine:
是不是类似于下面这种?void main() { unsigned long long t1, t2; … TSCL = 0; // Initiate CPU timer by writing any val to TSCL … t1 = _itoll( TSCH, TSCL ); // benchmark snapshot of free-running ctr my_code_to_benchmark(); t2 = _itoll( TSCH, TSCL ); // benchmark snapshot of free-running ctr printf("# cycles == %ld\n", (t2-t1));}
Dali Zhang:
回复 Shine:
是的,正如你所举得例子一样。在CCS5.5中做simulator时,TSCH, TSCL寄存器没有变化,一直是0。
Shine:
回复 Dali Zhang:
请问TSCH, TSCL寄存器你是怎么定义的?
程序中包含c6x.h头文件了么?
TI中文支持网
