instruction counter

Hello

how can i count the instructions in a blackfin 537?

i have read that cycle register in the compiled simulator option shows the number of instructions, but i dont think its correct.

  • Hi,

    To measure the cycles accurately, you can make use of the Cycle count macros provided by the libraries. e.g.

    #include <cycle_count.h>


    cycle_t start_count;
    cycle_t final_count;
    START_CYCLE_COUNT(start_count);

        *pTIMER_ENABLE = TIMEN7;  // start single-shot timer

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

    For more information, take a look at EE-332 "Cycle Counting a Profiling", available from the link below.
    www.analog.com/.../EE-332 .pdf

    Regards,
    Lalitha.S