
GR716-DS-UM, May 2019, Version 1.29
418
www.cobham.com/gaisler
GR716
41.3.1
Table 560.
0x00+n.4 - CVALn - Counter value register
Counter Value Register
41.3.2
Table 561.
0x100+n.4 - CCTRLn - Counter control register
Counter Control Register
31
0
CVAL
NR
rw
31:
0
Counter value (CVAL) - This register holds the current value of the counter. If the Counter control
register field CD is ‘1’, then the value displayed by this register will be the maximum counter value
reached with the settings in the counter’s control register. Writing to this register will write both to
the counter and the hold register for the maximum counter value.
31
28 27
23 22 21 20 19 18 17 16 15 14 13 12 11
4
3
0
NCPU
NCNT
MC IA DS EE AE EL CD
SU
CL EN
EVENT ID
CPU/AHBM
0
3
1
1
1
1
1 NR NR
NR
NR 0
NR
NR
r
r
r
r
r
r
r
rw rw
rw
rw rw
rw
rw
31: 28
Number of CPU (NCPU) - Number of supported processors - 1
27: 23
Number of counters (NCNT) - Number of implemented counters - 1
22
Maximum count (MC) - This field is ‘1’ indicating that the counter has support for keeping the max-
imum count value
21
Internal AHB count (IA) - This field is ‘1’ indicating that the core supports events 0x17 and 0x18
20
DSU support (DS) - This field is ‘1’ indicating that the core supports events 0x40-0x5F
19
External events (EE) - This field is ‘1’ indicating that the core supports external events (events 0x60
- 0x6F) TBD
18
AHBTRACE Events (AE) - This field is ‘1’ indicating that the core supports events 0x70 - 0x7F.
17
Event Level (EL) - The value of this field determines the level where the counter keeps running
when the CD field below has been set to ‘1’. If this field is ‘0’ the counter will count the time
between event assertions. If this field is ‘1’ the counter will count the cycles where the event is
asserted.
16
Count maximum duration (CD) - If this bit is set to ‘1’ the core will save the maximum time the
selected event has been at the level specified by the EL field. This also means that the counter will be
reset when the event is activated or deactivated depending on the value of the EL field.
When this bit is set to ‘1’, the value shown in the counter value register will be the maximum current
value which may be different from the current value of the counter.
15: 14
Supervisor/User mode filter (SU) - “01” - Only count supervisor mode events, “10” - Only count
user mode events, others values - Count events regardless of user or supervisor mode. This setting
only applies to events 0x0 - 0x3A.
When SU = “1x” only events generated by the CPU/AHB master specified in the CPU/AHBM field
will be counted. This applies to events 0x40 - 0x7F.
:
13
Clear counter on read (CL) - If this bit is set the counter will be cleared when the counter’s value is
read. The register holding the maximum value will also be cleared.
If an event occurs in the same cycle as the counter is cleared by a read then the event will not be
counted. The counter latch register can be used to guarantee that no events are lost
12
Enable counter (EN) - Enable counter
11: 4
Event ID to be counted
3: 0
CPU or AHB master to monitor.(CPU/AHBM) - The value of this field does not matter when select-
ing one of the events coming from the Debug Support Unit or one of the external events.