This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Question about profile clock in CCSv5 when using an emulator

Dear CCS champs,

I'm using CCSv5.3.0.00090, my target hardware is a C5515 EVM, and I use the on-board USB emulator. I have two questions with regards to the CCS profile clock. This is the profile clock you can enable by using the CCS menu Run->Clock->Enable.

Q1. I'm used to using this clock when I use the TI simulator and it's pretty easy to see how the simulator can count CPU cycles. However, we can also use this clock with the emulator, at least on the C5515EVM. My Question is, how is this clock determined? I don't recall seeing any kind of free running counter in the C5515 like we have in a C64x+ core. I'm interested in how this works? How does the emulator+CCS count CPU cycles?

Q2. I see discrepencies between stepping over functions and stepping into functions. If I step over a function, I get a certain clock count. However, if I rerun and instead of stepping over that function, I step into and single step my way though it, the total clock count is less. Why do I get less clock counts if I single step my way through a function compared to just stepping over a function? I found a somewhat similar post for a C2000 DSP but it was talking about the simulator and how you don't see the effects of the pipeline when single stepping. Is that the same situation here? I guess if I knew the answer to Q1, that would help understand Q2.

Thanks

  • Hi Brad,

    Brad Caldwell said:
    Q1. I'm used to using this clock when I use the TI simulator and it's pretty easy to see how the simulator can count CPU cycles. However, we can also use this clock with the emulator, at least on the C5515EVM. My Question is, how is this clock determined? I don't recall seeing any kind of free running counter in the C5515 like we have in a C64x+ core. I'm interested in how this works? How does the emulator+CCS count CPU cycles?

    I attached part of a old slide set I have on the nuts and bolts of how profiling works in CCS. The slide is old (CCSv3 timeframe) but I believe the base material is still relevant. Ignore the references to runb and the analysis tool (they are specific to CCSv3 and earlier). Basically the profile clock in v5 would get it's information from CLK for C5000 targets assuming the C5515 is not wildly different from past C5000 devices.

    Brad Caldwell said:
    Why do I get less clock counts if I single step my way through a function compared to just stepping over a function?

    Actually I would expect the opposite. Do you have a small test case you could provide to me?

    Thanks

    ki

    ccs_profiling_basics.pdf