I'm trying to characterize a software algorithm's performance on this R4 processor, so I did the following:
void main(void)
{
/* USER CODE BEGIN (3) */
/* Initialize RTI driver */
rtiInit();
/* Start RTI Counter Block 0 */
rtiStartCounter(rtiCOUNTER_BLOCK0);
uint32 tick_pre = rtiGetCurrentTick(rtiNOTIFICATION_COUNTER0);
run_my_code();
uint32 tick_post = rtiGetCurrentTick(rtiNOTIFICATION_COUNTER0);
printf("RTI Period is: %u\n",rtiGetPeriod(rtiNOTIFICATION_COMPARE0));
printf("Pre: %u Post: %u\n",tick_pre,tick_post);
/* USER CODE END */
}
Looking at HalCoGen, the counter clock is set to 10Mhz. In my test, the code executes in 2.61M ticks, so I would surmise that the time it took to execute is 2.61M/10M seconds.
Is this correct? I did the same test on the supposedly faster TMS570LC4357, and the times are almost identical. I would expect the time on the TMS570LC4357 to be shorter.
Am I missing something?