AnsweredAssumed Answered

Basic cycle counting

Question asked by sauwen on Nov 4, 2010
Latest reply on Nov 5, 2010 by kbrafford

Hello all,

 

I am trying to use this basic cycle counting:

 

  cycle_t start_count;
  cycle_t final_count;
  START_CYCLE_COUNT(start_count);
  Some_Function_Or_Code_To_Measure();
  STOP_CYCLE_COUNT(final_count,start_count);
  PRINT_CYCLES("Number of  cycles: ",final_count);

 

I don't see anything printing out and I am suspecting that the macros aren't activated and that I need to compile with the -DDO_CYCLE_COUNTS compile-time switch as indicated by the C/C++ Compiler  and Library Manual for Blackfin® Processors > 4 DSP Run-Time  Library > DSP Run-Time Library  Guide > Measuring Cycle  Counts > Basic Cycle-Counting Facility guide.  The question is.. how do I compile with the -DDO_CYCLE_COUNTS?  Also, what does that extern int do in the example code?  It doesn't look to be used. 

 

Thanks!

Outcomes