Forum Discussion
Altera_Forum
Honored Contributor
15 years agoPorting PIO C-code from ARM-7 to Nios II (SE1-board) + performance issue.
Hi all, I'm having a try at the moment to port my C-code from the arm-7 mcu, LPC-P2148 to Nios II, SE1-board , Cyclon-II, EP2C20F484C7. The arm-none-eabi-gcc compiler was used for the ARM-7 ...
Altera_Forum
Honored Contributor
15 years agoEach call to the pio function results in 2 for loops that call the delay function 16 times which loops 6000 times. Each call therefore delays 32 times decrements 6000 times.
Actually I think they are embedded in a for that loops 4 times. The delay which simply decrements wait is really the only thing consuming cpu time. So the comparison is really showing how fast the different cpu's/programs can: load 1; load wait; subtract; store wait - 1; load 0; compare wait - 1, 0; if (true) return; else jump to load 1; Question 1: Did the compiler allocate registers or memory for the operands? Question 2: Is this loop sufficient to measure cpu performance? In other words, is it a good benchmark of cpu performance?