STS Module
Application Program Interface
2-413
Description
The STS module manages objects called statistics accumulators. Each
STS object accumulates the following statistical information about an
arbitrary 32-bit wide data series:
❏
Count
. The number of values in an application-supplied data series
❏
Total
. The sum of the individual data values in this series
❏
Maximum
. The largest value already encountered in this series
Using the count and total, the Statistics View analysis tool calculates the
average on the host.
Statistics are accumulated in 32-bit variables on the target and in 64-bit
variables on the host. When the host polls the target for real-time
statistics, it resets the variables on the target. This minimizes space
requirements on the target while allowing you to keep statistics for long
test runs.
Default STS Tracing
In the RTA Control Panel, you can enable statistics tracing for the
following modules by marking the appropriate checkbox. You can also
set the HWI Object Properties to perform various STS operations on
registers, addresses, or pointers.
Except for tracing TSK execution, your program does not need to include
any calls to STS functions in order to gather these statistics. The default
units for the statistics values are shown in Table 2-6.
Table 2-6.
Statistics Units for HWI, PIP, PRD, and SWI Modules
Custom STS Objects
You can create custom STS objects using Tconf. The STS_add
operation updates the count, total, and maximum using the value you
provide. The STS_set operation sets a previous value. The STS_delta
numB
Int32
0
numC
Int32
1
Name
Type
Default (Enum Options)
Module
Units
HWI
Gather statistics on monitored values within
HWI
s
PIP
Number of frames read from or written to data pipe (count only)
PRD
Number of ticks elapsed from time that the PRD object is ready
to run to end of execution
SWI
Instruction cycles elapsed from time posted to completion
TSK
Instruction cycles elapsed from time TSK is made ready to run
until the application calls TSK_deltatime.