Cycle Counter
21-24
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
The cycle counter is 64 bits and increments every cycle. The count value is
stored in two 32-bit registers,
CYCLES
and
CYCLES2
. The least significant 32
bits (LSBs) are stored in
CYCLES.
The most significant 32 bits (MSBs) are
stored in
CYCLES2
.
L
To ensure read coherency, a read of
CYCLES
stores the current
CYCLES2
value in a shadow register, and all subsequent reads of
CYCLES2
come from the shadow register. The shadow register is
only updated on another read from
CYCLES
.
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. The
following example shows how to use the cycle counter:
R2 = 0;
CYCLES = R2;
CYCLES2 = R2;
R2 = SYSCFG;
BITSET(R2,1);
SYSCFG = R2;
/* Insert code to be benchmarked here. */
R2 = SYSCFG;
BITCLR(R2,1);
SYSCFG = R2;
CYCLES and CYCLES2 Registers
The Execution Cycle Count registers (
CYCLES
and
CYCLES2
) are shown in
Figure 21-14
. This 64-bit counter increments every
CCLK
cycle. The
CYCLES
register contains the least significant 32 bits of the cycle counter’s
64-bit count value. The most significant 32 bits are contained by
CYCLES2.
Содержание ADSP-BF53x Blackfin
Страница 38: ...Conventions xxxviii ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 134: ...System Reset and Powerup 3 18 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 324: ...Instruction Overview 7 20 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 486: ...Instruction Overview 13 28 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 512: ...Instruction Overview 14 26 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 604: ...Instruction Overview 15 92 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 688: ...Instruction Overview 18 48 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 742: ...Instruction Overview 19 54 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 752: ...Examples 20 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 780: ...Product Identification Register 21 28 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 790: ...ADSP BF535 Flags A 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 800: ...Performance Monitor Registers B 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 994: ...Instructions Listed By Operation Code C 194 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 1042: ...Index I 40 ADSP BF53x BF56x Blackfin Processor Programming Reference...