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

Page 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

Image 6
Contents Viewing Benchmarks in the Instrumented Application Modifications to the Base ExampleRTA Techniques for Performance Measurement References Appendix A. Performance ImpactImportant Benchmarks for Video Applications FiguresBase Application Overview SPRAA56TskInput DSP/BIOS and RF5 Components Used 1 LOG2 STS 3 TRC4 UTL Modifications to the Base Example Requirements for Viewing RTA BenchmarksSplitting the Encode and Decode CELLs Adding the Control TSK and MBX CommunicationQuerying the H.263 Encoder for Status TskInputTskO utput Controlling the Frame Rate RTA Techniques for Performance Measurement Measuring Function Execution Time with the UTL ModuleMeasuring Task Scheduling Latencies Measuring End-to-End LatenciesMeasuring the Frame Rate Programmatic Measurement of Total CPU Load Memory Bus Utilization 14,400 B 720*480 = 345,600 B86,400 B External memoryBitrate and Frame Type Methods for Transmitting Measured Performance Data Viewing Benchmarks in the Instrumented Application Application-Specific Control via GEL Scripts in CCStudioRequirements Running the Application Load the h263loopbackrta.out programSPRAA56 Interpreting the Benchmarks Expected Values for the STS Objects Expected and Measured STS Benchmarks Controlling the Run-Time Parameters Dynamically Debug ModeExpected Values Delivered to the Message Log Expected and Measured Logged BenchmarksReferences Capture and Display Task BenchmarkingRTA Effects on CPU Load Appendix A. Performance ImpactOverhead of Performance Measurement Techniques Measured Performance of Benchmarking TechniquesMemory Footprint Memory Footprint DetailsImportant Notice