106
January, 2004
Developer’s Manual
Intel XScale® Core
Developer’s Manual
Performance Monitoring
8.3
XSC2 Register Description (4 counter variant)
Table 8-5
contains details on accessing these registers with MRC and MCR coprocessor
instructions.
8.3.1
Clock Counter (CCNT)
The format of CCNT is shown in
Table 8-6
. The clock counter is reset to ‘0’ by setting bit 2 in the
Performance Monitor Control Register (PMNC) or can be set to a predetermined value by directly
writing to it. It counts core clock cycles. When CCNT reaches its maximum value 0xFFFF,FFFF,
the next clock cycle will cause it to roll over to zero and set the overflow flag (bit 0) in FLAG. An
interrupt request will occur if it is enabled via bit 0 in INTEN.
Table 8-5.
Performance Monitoring Registers
Description
CRn
Register#
CRm
Register#
Instruction
(PMNC) Performance Monitor Control
Register
0b0000
0b0001
Read: MRC p14, 0, Rd, c0, c1, 0
Write: MCR p14, 0, Rd, c0, c1, 0
(CCNT) Clock Counter Register
0b0001
0b0001
Read: MRC p14, 0, Rd, c1, c1, 0
Write: MCR p14, 0, Rd, c1, c1, 0
(INTEN) Interrupt Enable Register
0b0100
0b0001
Read: MRC p14, 0, Rd, c4, c1, 0
Write: MCR p14, 0, Rd, c4, c1, 0
(FLAG) Overflow Flag Register
0b0101
0b0001
Read: MRC p14, 0, Rd, c5, c1, 0
Write: MCR p14, 0, Rd, c5, c1, 0
(EVTSEL) Event Selection Register
0b1000
0b0001
Read: MRC p14, 0, Rd, c8, c1, 0
Write: MCR p14, 0, Rd, c8, c1, 0
(PMN0) Performance Count Register 0
0b0000
0b0010
Read: MRC p14, 0, Rd, c0, c2, 0
Write: MCR p14, 0, Rd, c0, c2, 0
(PMN1) Performance Count Register 1
0b0001
0b0010
Read: MRC p14, 0, Rd, c1, c2, 0
Write: MCR p14, 0, Rd, c1, c2, 0
(PMN2) Performance Count Register 2
0b0010
0b0010
Read: MRC p14, 0, Rd, c2, c2, 0
Write: MCR p14, 0, Rd, c2, c2, 0
(PMN3) Performance Count Register 3
0b0011
0b0010
Read: MRC p14, 0, Rd, c3, c2, 0
Write: MCR p14, 0, Rd, c3, c2, 0
Table 8-6.
Clock Count Register (CCNT)
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
8
7
6
5
4
3
2
1
0
Clock Counter
reset value: unpredictable
Bits
Access
Description
31:0
Read / Write
32-bit clock counter
- Reset to ‘0’ by PMNC register.
When the clock counter reaches its maximum value
0xFFFF,FFFF, the next cycle will cause it to roll over to
zero and generate an interrupt request if enabled.