GR740-UM-DS, Nov 2017, Version 1.7
72
www.cobham.com/gaisler
GR740
6.10.4 ASR22-23 - Up-counter
The ancillary state registers 22 and 23 (%ASR22-23) contain a internal up-counter that can be read by
software without causing any access on the on-chip bus. The number of available bits in the counter is
56 and corresponds to the DSU time tag counter. %ASR23 contains the least significant part of the
counter value and %ASR22 contains the most significant part.
The time tag value accessible in these registers is the same time tag value used for the system’s trace
buffers and for all processors. The time tag counter will increment when any of the trace buffers is
enabled, or when the time tag counter is forced to be enabled via the DSU register interface, or when
any processor has its %ASR22 Disable Up-counter (DUCNT) field set to zero. It is possible to control
if the time tag counter should increment when the processors enter debug mode, this is configured via
DSU AHB trace buffer control register’s TE and DF fields, see section 33.6.7.
The up-counter value will increment even if all processors have entered power-down mode.
Table 51.
%asr22 - LEON4 Up-counter MSbs
31 30
24 23
0
D
U
C
N
T
RESERVED
UPCNT(55:32)
1
0
*
rw
r
31
Disable Up-counter (DUCNT) - Disable upcounter. When set to ‘1’ the up-counter may be disabled.
The value for the up-counter in each processor is taken from a shared timer. The shared counter is
stopped when all processors have DUCNT set to one and the time tag counter in the DSU is disabled.
When cleared, the counter will increment each processor clock cycle. Default (reset) value is ‘1’.
30: 24
RESERVED
23: 0
Counter value (UPCNT(62:32)) - Most significant bits of internal up-counter. Counter is reset to 0 at
reset but may start counting due to conditions described for the DUCNT field.
Table 52.
%asr23 - LEON4 Up-counter LSbs
31
0
UPCNT(31:0)
*
r
31: 0
Counter value (UPCNT(31:0)) - Least significant bits of internal up-counter. Counter is reset to 0 at
reset but may start counting due to conditions described for the DUCNT field in %asr22.