Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12409 Discussions

Cyclone V SoC - Time execution function - Cycle count

Altera_Forum
Honored Contributor II
1,435 Views

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
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
123 Views

Hi , 

 

for software you can also write to rocketboard mailing list.  

 

http://lists.rocketboards.org/mailman/listinfo 

http://rocketboards.org/ 

 

Kr, 

 

Florian
Altera_Forum
Honored Contributor II
123 Views

Ok Thx. 

 

I receive an answer from altera: we can use Trace tools with DS-5 Debugger. 

 

They is a tutorial on youtube video: https://www.youtube.com/watch?v=u_xkybphchi 

 

Regards, 

 

Remy
Altera_Forum
Honored Contributor II
123 Views

I use simplest method: run my code 1000*1000(*1000...) times and see moments between writing "beg"/"end" to program console. 

Precision is sufficient to make conclusion: NEON is very weak relative TI DSPs.
Altera_Forum
Honored Contributor II
123 Views

 

--- Quote Start ---  

Ok Thx. 

 

I receive an answer from altera: we can use Trace tools with DS-5 Debugger. 

 

They is a tutorial on youtube video: https://www.youtube.com/watch?v=u_xkybphchi 

 

Regards, 

 

Remy 

--- Quote End ---  

 

 

 

Where were you able to find the time it would take to complete each cycle?
Reply