cptracer probes can measure latency, throughput, and describe transactions.

The throughput and latency probes measure over a sample period. The default
value in the Period field is 0x3FFF.  For example, the MSMC1 probe period
can be changed by:
      cptracer.MSMC_1.EMIF0_I.PERiod 0x<value>.

The value represents bits 23-10 of a 24-bit field. Bits 9:0 are fixed
at 0x3FF.  A probe's speed is typically set to match the speed of the
interconnect its connected to. For example, the MSMC3 (and C7x) typically
runs at 1GHz.

The default probe counter will accumulate events over the interval of:
0x00FFFFFF * 1/1GHz = 16.7mS  (EX: for MSMC@1GHz)
A '0' for a R5 MSRAM gives 0x3FF * 1/500MHz = 2.048uS

To find average throughput use (total bytes / time in sample period)
To find the average transaction length use (total bytes / total matched)
 - if emifs > 1, select each emif, or multiply one output by the # of emifs

To find average latency use (total wait time) / (total tracked)

First usage typically is broad total usage.  However, zooming in is possible
by using routeid and address filtering.

Since multiple routes exist to some destinations traffic monitoring may be needed
multiple points to get a full picture.

The transaction probes capture rate is determined by the transaction latency to
the endpoint and the number of transactions. A dump window might only show a
transaction every 10mS (poll rate for start of window) where a CPU running code
generate transactions in the 10s of nS. Message size and FIFO depth will
determine how many transactions are sampled.

---
EMIF probe note: J784S4 provides up to 4 EMIF/DDR controllers. The transaction
probes are placed at the inputs of the EMIF where the MSMC may have translated
their system address to a local one. To interpret transaction probes an address
mapping needs to be worked out. For example, with an interleave of 128 bytes,
the local 0 address of each EMIF will be offset (decode + EMIF# x interleave size).
	system:0x8000_0000++0x7F -> EMIF1:8_0000_0000
	system:0x8000_0080++0x7F -> EMIF2:8_0000_0000
	system:0x8000_0100++0x7F -> EMIF3:8_0000_0000
	system:0x8000_0180++0x7F -> EMIF4:8_0000_0000
	system:0x9000_0000++0x7F -> EMIF1:8_0400_0000
	system:0x9000_0080++0x7F -> EMIF2:8_0400_0000
	system:0x9000_0100++0x7F -> EMIF3:8_0400_0000
	system:0x9000_0180++0x7F -> EMIF4:8_0400_0000
	system:0xA000_0000++0x7F -> EMIF1:8_0800_0000
	system:0xA000_0080++0x7F -> EMIF2:8_0800_0000
	system:0xA000_0100++0x7F -> EMIF3:8_0800_0000
	system:0xA000_0180++0x7F -> EMIF4:8_0800_0000
MSMC+EMIF configs can be used to figure out the decode mapping. Alternately
the use of a routeid filter and test patterns can also be used.

---
Transaction probes can be viewed in the CPTT GUI by any core.  However, some
versions of TRACE32 only show a 32-bit address in the GUI. The use of a 64-bit
core may be needed to see some address representations.

---
Information on probes can be found in the cptracer directory a summary of the mapping is like this:

Debug Address (APB) : 0x9xxx_xxxx --> System Address (AXI) 0x4C:0x3xxx_xxxx

;     TraceID        Agg      TBR    APB:Agg base ; ProbeBase: AggBase+0x20000 + Prob#x0x1000
;STM2.TraceID 0x50 ; SOC-RC : TBR3 - 0x9E100000   ; 6 probes
;STM2.TraceID 0x51 ; MCU    : TBR3 - 0x9E000000   ; 4 probes
;STM2.TraceID 0x52 ; AC     : TBR3 - 0x9E180000   ; 7 probes
;STM2.TraceID 0x53 ; HC     : TBR3 - 0x9E200000   ; 6 probes
;STM2.TraceID 0x54 ; MV     : TBR3 - 0x9E1C0000   ; 1 probe
;STM2.TraceID 0x55 ; MI     : TBR3 - 0x9E140000   ; 1 probe
;STM2.TraceID 0x56 ; ACP    : TBR3 - 0x9E240000   ; 2 probes
;STM2.TraceID 0x57 ; MSMC_0 : TBR1 - 0x90140000   ; 9 probes
;STM2.TraceID 0x58 ; MSMC_1 : TBR1 - 0x90180000   ; 8 probes
;STM2.TraceID 0x59 ; C7-1   : TBR1 - 0x91440000   ; 6 probes
;STM2.TraceID 0x5a ; C7-2   : TBR1 - 0x91840000   ; 6 probes
;STM2.TraceID 0x5b ; C7-3   : TBR1 - 0x91C40000   ; 6 probes
;STM2.TraceID 0x5c ; C7-4   : TBR1 - 0x92040000   ; 6 probes
;STM2.TRACEID 0x5d : MSMC1_0: TBR1 - 0x93040000   ; 8 probes
;STM2.TRACEID 0x5e : MSMC1_1: TBR1 - 0x93140000   ; 8 probes
;STM2.TRACEID 0x5f : MSMC1_2: TBR1 - 0x93240000   ; 8 probes
;STM2.TRACEID 0x60 : MSMC1_3: TBR1 - 0x93340000   ; 8 probes

; MSMC_0            => MSMC3 probes
00 DRU0.T
01 DRU0.I
02 DRU1.T
03 DRU1.I
04 CSI0.T ARM Clust0
05 CSI0.I ARM Clust0
08 CSI4.T MSMC2
09 CSI4.I MSMC2
12 CSI8.T NAVSS NB1

; MSMC_1            => MSMC3 probes
00 EMIF0
01 EMIF1
02 CSI1.T ARM Clust1
03 CSI1.I ARM Clust1
10 CSI9.T
11 CSI9.I
30 EMIF3
31 EMIF2

; MSMC1_x (x=0-3)   => Per C7x local MSMC1 probes
00 DRU0.T
01 DRU0.I
02 DRU1.T
03 DRU1.I
04 CSI0.T C7-x
05 CS10.I C7-x
06 CSI2.T MSMC2
07 CSI2.I MSMC2

; C7-x (x=1-4)      => Per C7x L1 and SE probe
00 L1D to L2
01 L1P to L2
02 SE0 to L2
03 SE1 to L2
04 L2 to L1D
05 MMU to L2

08/16/2024


