Register Model
e200z3 Power Architecture Core Reference Manual, Rev. 2
Freescale Semiconductor
2-33
Even if the update frequency is not constant, values read from the TB are
monotonically increasing (except when the TB wraps from 2
64
– 1 to 0). If
a trace entry is recorded each time the update frequency changes, the
sequence of TB values can be post-processed to become actual time values.
Successive readings of the TB may return identical values.
The TB is useful for timing reasonably short sequences of code (a few hundred instructions) and for
low-overhead time stamps for tracing.
2.11.4
Decrementer Register
DEC, shown in
, is a decrementing counter that is enabled by setting HID0[TBEN]. The
decrementer and time base update at the same frequency, which is selected in HID0[SEL_TBCLK]. It
provides way to signal a decrementer interrupt after a specified period unless one of the following occurs:
•
Software alters DEC in the interim.
•
The TB update frequency changes.
DEC is typically used as a general-purpose software timer. The decrementer auto-reload register (DECAR)
automatically reloads a programmed value into DEC.
2.11.5
Decrementer Auto-Reload Register (DECAR)
If the auto-reload function is enabled (TCR[ARE] = 1), the auto-reload value in DECAR, shown in
, is written to DEC when DEC decrements from 0x0000_0001 to 0x0000_0000. Writing DEC
with zeros by using an mtspr does not automatically generate a decrementer interrupt.
32
63
Field
Decrementer value
Reset
Undefined on
m_por assertion, unchanged on p_reset_b
assertion
R/W
R/W
SPR
SPR 22
Figure 2-27. Decrementer Register (DEC)
32
63
Field
Decrementer auto-reload value
Reset
Undefined on
m_por assertion, unchanged on p_reset_b
assertion
R/W
R/W
SPR
SPR 54
Figure 2-28. Decrementer Auto-Reload Register (DECAR)