Cycle Counter
20-24
ADSP-BF535 Blackfin Processor Hardware Reference
Cycle Counter
The cycle counter counts
CCLK
cycles while the program is executing. All
cycles, including execution, wait state, interrupts, and events, are counted
while the processor is in User or Supervisor mode, but the cycle counter
stops counting in Emulator mode.
The cycle counter is a 64-bit counter that increments every cycle. The
count value is stored in two 32-bit registers,
CYCLES
and
CYCLES2
. The
least significant 32 bits are stored in
CYCLES.
The most significant 32 bits
are stored in
CYCLES2
.
To ensure the correct cycle count, a read from
CYCLES
must occur
before reading from
CYCLES2
.
In User mode, these two registers may be read, but not written. In Super-
visor and Emulator modes, they are read/write registers.
To enable the cycle counters, set the
CCEN
bit in the
SYSCFG
register.
This example shows how to turn on the cycle counter:
r2 = 0 ;
cycles = r2 ;
cycles2 = r2 ;
r2 = SYSCFG ;
bitset(r2, 1) ;
SYSCFG = r2 ;
/* Insert code to be benchmarked */
0x75
Store to load forwarding
0x80
Stall cycles because of EX stage data hazards
Table 20-11. Event Monitor Table (Cont’d)
PFMONx Fields
Events That Cause the PFCNTRx Counter Registers
to Increment
Summary of Contents for ADSP-BF535 Blackfin
Page 80: ...Development Tools 1 26 ADSP BF535 Blackfin Processor Hardware Reference...
Page 312: ...Working With Memory 6 86 ADSP BF535 Blackfin Processor Hardware Reference...
Page 332: ...System Interfaces 7 20 ADSP BF535 Blackfin Processor Hardware Reference...
Page 360: ...Dynamic Power Management Controller 8 28 ADSP BF535 Blackfin Processor Hardware Reference...
Page 446: ...Beginning and Ending an SPI Transfer 10 40 ADSP BF535 Blackfin Processor Hardware Reference...
Page 522: ...Timing Examples 11 76 ADSP BF535 Blackfin Processor Hardware Reference...
Page 562: ...IrDA Support 12 40 ADSP BF535 Blackfin Processor Hardware Reference...
Page 608: ...PCI I O Issues 13 46 ADSP BF535 Blackfin Processor Hardware Reference...
Page 672: ...References 14 64 ADSP BF535 Blackfin Processor Hardware Reference...
Page 810: ...SDRAM Controller SDC 18 86 ADSP BF535 Blackfin Processor Hardware Reference...
Page 811: ...ADSP BF535 Blackfin Processor Hardware Reference 18 87 External Bus Interface Unit...
Page 812: ...SDRAM Controller SDC 18 88 ADSP BF535 Blackfin Processor Hardware Reference...
Page 860: ...DMA Bus Debug Registers 20 30 ADSP BF535 Blackfin Processor Hardware Reference...