Hello,
I'm programming a PPC405 in c on a devolpment board, I didn't enable the cache and I set the compiler option to no optimization. I'm trying to measure the execution time for a simple for loop with a HW timer on an FPGA some thing like this:
i, test is defined as unsigned integer 32 bit
start the timer;
for (i=0; i<1000000; i++)
test = i + 5000;
read the timer and print the timer result;
My problem is that the result is changed if I chenged my code i.e. increased the code but outside the loop and the timer.
I expect to have fix time since the loop is not changed, any hint?
Thanks.
I'm programming a PPC405 in c on a devolpment board, I didn't enable the cache and I set the compiler option to no optimization. I'm trying to measure the execution time for a simple for loop with a HW timer on an FPGA some thing like this:
i, test is defined as unsigned integer 32 bit
start the timer;
for (i=0; i<1000000; i++)
test = i + 5000;
read the timer and print the timer result;
My problem is that the result is changed if I chenged my code i.e. increased the code but outside the loop and the timer.
I expect to have fix time since the loop is not changed, any hint?
Thanks.