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.

CPU cycles measurement for TMS 2812 in Code Composer studio

Hello there!

I have some question about cycle\time measurement in device emulator. I use CCS 3.3. and project for TMS 2812 at Win XP PC. And one of my goal is measurement of CPU cycle and timing for it. But i have some problems.

For example, when i use asm instruction, like this (definitions):

#define DO_NOTHING_11_CPUCLOCKS asm(" RPT #10 || NOP")

#define DO_NOTHING_1_CPUCLOCK   asm(" NOP")

result of measurements is not correct. As i think due to in accordance to TMS manual, where

  RPT    #19 ; Do nothing for 20 cycles
||NOP

but actual value of cpu cycles is wrong. For example, first instruction (DO_NOTHING_11_CPUCLOCKS ) takes 37 cycles, not 11. Via assembler stepping I have 3 cycles for NOP and $ cycles for RPT instruction, total 3*11+4=37. But it isn't correct!

Clock and profiler results are same.

Maybe special settings for emulator needed? If not, how to resolve this problem? Or possible another way to measure CPU cycles and timing? By the way: hardware test done with ok, if we test something longer (frame delays), it runs with correct time (150Mhz->6,6ns), but it's is in contradiction with emulator counter!

Thanks in advance!