
11-10
MPC7400 RISC Microprocessor Users Manual
Special-Purpose Registers Used by the Performance Monitor
11.3.2.2 Performance Monitor Counter Registers (PMC1DPMC4)
The performance monitor counter registers, PMC1DPMC4, shown in Figure 11-5, are
32-bit counters that can be programmed to generate interrupt signals when they overow.
Figure 11-5. Performance Monitor Counter Registers (PMC1DPMC4)
The bits contained in the PMC registers are described in Table 11-7.
Counters overow when the high-order bit (the sign bit) becomes set; that is, they reach the
value 2,147,483,648 (0x8000_0000). However, an interrupt is not signaled unless both
MMCR0[PMXE] and either MMCR0[PMC1CE] or MMCR0[PMCjCE] are also set as
appropriate.
Note that the interrupts can be masked by clearing MSR[EE]; the interrupt signal condition
may occur with MSR[EE] cleared, but the exception is not taken until MSR[EE] is set.
Setting MMCR0[FCECE] forces counters to stop counting when a counter interrupt or any
enabled condition or event occurs. Setting MMCR0[TRIGGER] forces counters PMCj
(j > 1), to begin counting when PMC1 goes negative or an enabled condition or event
occurs.
Software is expected to use the
mtspr
instruction to explicitly set PMC to non-overowed
values. Setting an overowed value may cause an erroneous exception. For example, if both
MMCR0[PMXE] and either MMCR0[PMC1CE] or MMCR0[PMCjCE] are set and the
mtspr
instruction loads an overow value, an interrupt signal may be generated without an
event counting having taken place.
The PMC registers can be accessed with the
mtspr
and
mfspr
instructions using the
following SPR numbers:
¥
¥
¥
¥
PMC1 is SPR 953
PMC2 is SPR 954
PMC3 is SPR 957
PMC4 is SPR 958
Table 11-7. PMC
n
Field Descriptions
Bits
Name
Description
0
OV
Overow. When this bit is set, it indicates this counter reaches its maximum value.
1D31
Counter value
Indicates the number of occurrences of the speciTed event.
0
1
31
OV
Counter Value