Profile clock in CCS

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

Contents

Introduction

This page describes how to set up and use the profile clock in CCS to count instruction cycles between two points in the code. Since the CCS Profiler has some limitations when profiling on hardware, the profile clock is one of the suggested alternate options.

Note: The below screenshots are for CCSv5. In CCSv4, the clock will be under menu Target instead of menu Run.

Enable the Profile Clock

In the debug perspective go to menu Run->Clock->Enable. This will add a clock icon and count to the status bar.

Clock enable.png

Setup the Profile Clock

In the debug perspective go to menu Run->Clock->Setup. This will bring up the Clock Setup dialog.

Clock setup.png

Reset the Profile Clock

Double-click on the clock value in the status bar to reset it to 0.

Measure cycles

To measure cycles between two lines of code using profile clock:

  1. Set breakpoints at the lines between which you want to measure cycle count
  2. Run to the first breakpoint
  3. Double click on the clock to reset its value
  4. Run to the second breakpoint
  5. The clock will display the cycle count between those two points in the code

Convert Cycles to actual time

If the target is running, for example, at 300MHz and the Profile clock cycle count for a routine is 1000, then the time consumed by the routine would be = 1000 * (1/300M)= 3.3 usec.

Leave a Comment

Comments

Comments on Profile clock in CCS


Keithhall said ...

What is the definition of a cycle count? I am using an XDS510 with an OMAP L138 DSP core running at 300 MHz and I get about 20000000 cycle counts per assembly step in the debugger disassembly window.

--Keithhall 08:32, 9 February 2012 (CST)

Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox