Texas Instruments SPRAA56 appendix 2 STS, 3 TRC, 4 UTL

Models: SPRAA56

1 29
Download 29 pages 9.1 Kb
Page 6
Image 6

SPRAA56

2.1.2 STS

An STS object accumulates the following statistical information about an arbitrary 32-bit wide data series: count, total, and maximum.

Statistics are accumulated in 32-bit variables on the target DSP and in 64-bit variables on the host PC. 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.

As part of using the DSP/BIOS instrumented kernel, the application automatically acquires STS information for HWI, PIP, PRD, SWI, and TSK objects. To use this built-in feature on TSKs, the application must call the TSK_settime and TSK_deltatime APIs to obtain STS information.

Custom STS objects can also be created in the DSP/BIOS configuration. By using the STS APIs for the created objects, you can determine what statistical information needs to be acquired by the system application during run-time.

2.1.3 TRC

The TRC module manages a set of trace control bits that control the real-time capture of program information through event logs and statistics accumulators. For greater efficiency, the target does not execute log or statistics APIs unless tracing is enabled.

This module contains two user-defined TRC flags that can be toggled using the DSP/BIOS RTA Control Panel in Code Composer Studio. The application can use these bits to enable or disable sets of explicit instrumentation. The program can use the TRC_query API to check the settings of these bits and either perform or omit instrumentation calls based on the result. DSP/BIOS does not use or set these bits.

2.1.4 UTL

UTL is part of the Reference Frameworks distribution. The UTL module is used for debugging and diagnostics.

The module is essentially a set of macros that can either be expanded to code that performs the desired debugging function, or removed completely when building depending on the value of the UTL_DBGLEVEL preprocessor flag. The UTL module encapsulates DSP/BIOS services such as CLK, STS, and LOG in APIs. These services can be easily removed in the final build by using the preprocessor flag, -d “UTL_DBGLEVEL=0”.

With conditional expansion of macros to code you can reduce code size and remove unnecessary functionality in the deployment phase without having to remove development debugging/diagnostics aids. This technique also means you don’t need to modify code at deployment time, thus reducing the possibility of error.

6

DSP/BIOS Real-Time Analysis (RTA) and Debugging Applied to a Video Application

Page 6
Image 6
Texas Instruments SPRAA56 appendix 2 STS, 3 TRC, 4 UTL