Chapter 8
Programming the MIPS32® 74K™ Core Family, Revision 02.14
102
74K™ core features for debug and profiling
In this chapter you’ll find:
•
Section 8.1, "EJTAG on-chip debug unit"
•
Section 8.3, "CP0 Watchpoints"
- monitor code and data access without using EJTAG.
•
Section 8.4, "Performance counters"
- gather statistics about events, useful for understanding where your pro-
gram spends its time.
The description here is terse and leaves out some information about EJTAG and PDtrace facilities which are not visi-
ble to programmers. We will document it here if it’s software visible, or is implementation-dependent information not
found in the detailed documentation (see
8.1 EJTAG on-chip debug unit
This is a collection of in-CPU resources to support debug. Debug logic serves no direct purpose in the final end-user
application, so it’s always under threat of being omitted for cost reasons. A debug unit must have virtually no perfor-
mance impact when not in use; it must use few or no dedicated package pins, and should not increase the logic gate
count too much. EJTAG solves the pin issue (and gets its name) by recycling the JTAG pins already included in every
SoC for chip test
24
.
So the debug unit requires:
•
Physical communications with some kind of “probe” device (which is itself controlled by the debug host),
achieved through the JTAG pins.
•
The ability for a probe to “remote-control” the CPU. The basic trick is to get the CPU to execute instructions that
the probe supplies. In turn that’s done by directing the CPU to execute code from the magic “dmseg” region
where CPU reads and writes are made down the wire to the probe. “dmseg” is itself a part of “dseg”, see
8.1.5, "The “dseg” memory decode region"
•
A distinguished debug exception. In MIPS EJTAG, this is a special “super-exception” marked by a special
debug-exception-level flag, so you can use an EJTAG debugger even on regular exception handler code. See
below;
•
A number of “hardware breakpoints”. Their numerous control registers can’t be accommodated in the CP0 regis-
ter set, so are memory-mapped into “dseg”;
•
You can take a debug exception from a special breakpoint instruction
sdbbp
, on a match from an EJTAG hard-
ware breakpoint, after an EJTAG single-step, when the probe writes the break bit
EJTAG_CONTROL[EjtagBrk]
,
or by asserting the external
DINT
(debug interrupt) signal.
24. It can actually be quite useful to provide EJTAG with its own pins, if your package permits.
Содержание 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...