Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

Cyclone V SoC - Time execution function - Cycle count

Hi everybody,

I'm new on SoC architecture and I need to measure cycle count about some function using NEON instruction.

My goal is to measure optmization code compared to an other architecture.

In Texas Instrument or Analog Devices case, I can put MACRO on code. Theses MACRO allows an hardware cycle counter in order to calculate function cycle time.

Example from Analog Devices:

  • #include <cycle_count.h>

  • START_CYCLE_COUNT(S)

  • STOP_CYCLE_COUNT(T,S)

Example from TI:

  • #include <c6x.h>

  • start_time = _itoll(TSCH, TSCL);

  • end_time = _itoll(TSCH, TSCL);)

  • cyclecount= end_time - start_time;

  • or directly with Code Composer Studio.

ARM Compiler, DS-5 on eclipse or an other tools allow that?

Thank a lot,

Remy

4 Replies