Forum Discussion
Altera_Forum
Honored Contributor
16 years agoNios Instruction Execution Count
Hi everyone, I was wondering if there's any way to know how many instructions a Nios processor has executed. So what I need to do is to start the processor and after say 1M instructions, I want...
Altera_Forum
Honored Contributor
16 years agoIt ought to be possible to write a slave for the 'tightly coupled instruction memory' (that just accesses some M9K memory) and count the number of code fetches.
Or are you really trying to benchmark the compiler! In which case analysing the generated code might be better. However, overall performance is significantly changed by memory delays, execution stalls, and mis-predicted branches. So any attempt to benchmark the processor should really take these into account. Unless, of course, you are trying to deterimine the number of lost cycles (ie comparing the clock count to the instruction count).