Altera_Forum
Honored Contributor
14 years agoConfirmation about method of calulate execution time
Hi
I try to check the execution time of my algorithme. I use the high res_timer. I find on the tutorial how can calculate it, at least with this instruction: time1= alt_timestamp(); K=1; time2= alt_timestamp(); num_ticks=time2-time1; printf("execution time en ms is : %.*f (ms)\n",4, (((float)num_ticks/(float)alt_timestamp_freq())*(float)1000)); And when i try to calculate the execution time for just simple instruction (k=1) i don't find one clock cycle. The frequency that i use is 250 Mhz. It mean that for execute (k=1) instruction should be 0.004 microsecond but i find 0.4 microsecond. That's mean there are a factor of 100. My question is there are mistake on the method? Or i should devide the time by 100? Or what is the problem? Thank you