129
Programming the MIPS32® 74K™ Core Family, Revision 02.14
WatchHi0-3[Mask]
: implements address ranges. Set bits in
WatchHi0-3[Mask]
to mark corresponding
WatchLo0-
3[VAddr]
address bits to be ignored when deciding whether this is a match.
WatchHi0-3[I,R,W]
: read your
WatchHi0-3
after a watch exception, and these fields tell you what type of access (if
anything) matched.
Write a 1 to any of these bits in order to clear it (and therefore prevent the exception from immediately happening
again). This behavior is unusual among CP0 registers, but it is quite convenient: to clear a watchpoint of all the excep-
tion causes you’ve seen just read the value of
WatchHi0-3
and write it back again.
8.4 Performance counters
Performance counters are provided to allow software to monitor the occurrence of events of interest within the core,
and can be very useful in analyzing system performance.
74K family CPUs are fitted with four counters, each of which can be set up to count one of a large choice of different
events. Each 32-bit counter is accompanied by a control register whose layout is shown in
.
Figure 8.24 Fields in the PerfCtl0-3 Register
There are usually four counters, but software should check using the
PerfCtl[M]
bit (which indicates “at least one
more”).
Then the fields are:
M
: Reads 1 if there is another
PerfCtl
register after this one.
Event
: determines which event this counter will count; see
below. Note that the odd-numbered and even-num-
bered counters mostly count different events, though some particularly important events can use any of the four
counters.
PCTD
: setting this bit prevents the tracing of data from this performance counter when performance counter trace mode
in PDTrace is enabled.
IE
: set to cause an interrupt when the counter "overflows" into its bit 31. This can either be used to implement an
extended count, or (by presetting the counter appropriately) to notify software after a certain number of events have
happened.
U, S, K, EXL
: count events in User mode, Supervisor mode, Kernel mode and Exception mode (i.e. when
Status[EXL]
is
set) respectively. Set multiple bits to count in all cases.
The events which can be counted in the 74K core are in
. Blank fields are reserved. But before you get there,
take a look at the next sub-section...
31
30
16
15
14
12
11
5
4
3
2
1
0
M
0
PCTD
0
Event
IE
U
S
K
EXL
X
0
Содержание MIPS32 74K Series
Страница 1: ...Document Number MD00541 Revision 02 14 March 30 2011 Programming the MIPS32 74K Core Family...
Страница 10: ...Programming the MIPS32 74K Core Family Revision 02 14 10...
Страница 20: ...1 4 A brief guide to the 74K core implementation Programming the MIPS32 74K Core Family Revision 02 14 20...
Страница 28: ...2 2 PRId register identifying your CPU type Programming the MIPS32 74K Core Family Revision 02 14 28...
Страница 54: ...3 8 The TLB and translation Programming the MIPS32 74K Core Family Revision 02 14 54...
Страница 83: ......
Страница 86: ...6 5 FPU pipeline and instruction timing Programming the MIPS32 74K Core Family Revision 02 14 86...
Страница 101: ...The MIPS32 DSP ASE 101 Programming the MIPS32 74K Core Family Revision 02 14...
Страница 134: ...8 4 Performance counters Programming the MIPS32 74K Core Family Revision 02 14 134...
Страница 154: ...C 3 FPU changes in Release 2 of the MIPS32 Architecture Programming the MIPS32 74K Core Family Revision 02 14 154...