Texas Instruments SPRAA56 Computer Hardware User Manual


 
SPRAA56
DSP/BIOS Real-Time Analysis (RTA) and Debugging Applied to a Video Application 11
4 RTA Techniques for Performance Measurement
The RTA techniques described in this section are largely application-specific calls to DSP/BIOS
RTA services via APIs in the run-time code. These API calls can be added to any application
without modifying its logical structure.
In the case of the video application, performance overhead of the RTA tools is expected to be
minimal because the calls are made at the frame rate of 30 or 25 Hz, or even in some cases
every 30 or 25 frames, a very slow rate when compared to the speed of the DSP. In applications
where the frame rate is faster than 30Hz—for example, voice or audio—less frequent calls to
RTA services may be preferable. You might display benchmarking statistics only every N
frames, where N results in a display period of about one half second.
See Appendix A: Performance Impact for information on measuring overhead.
4.1 Measuring Function Execution Time with the UTL Module
The first technique for benchmarking uses the UTL module from Reference Frameworks. The
UTL_stsStart and UTL_stsStop calls were inserted before and after functions of interest, and
UTL_stsPeriod was used in each of the three data tasks to measure the period of one complete
loop through each task. Because the UTL module acts as a wrapper for DSP/BIOS STS objects,
the STS objects needed to be created during DSP/BIOS configuration. The following naming
convention is used to create the statistics objects:
“sts” + task pseudonym + function benchmarked
The appInstrument.tci Tconf configuration script contains the following loop that creates these
STS objects. For example, the stsProcCell0 STS object is created for the first processing
function (cell 0) in the process task.
/* Array of string names to be used to create STS objects */
var stsNames = new Array("InVid", "OutVid", "Proc");
var stsStruct = new Array(
new Array("BusUtil", "Cell0", "Period", "Total", "Wait0"),
new Array("BusUtil", "Cell0", "Period", "Total", "Wait0"),
new Array("BusUtil", "Cell0", "Cell1", "Period", "Total", "Nframes")
)
/* STS objects for use with UTL_sts* functions */
for (i = 0; i < APPSTSTIMECOUNT; i++) {
for (j = 0; j < stsStruct[i].length; j++) {
var stsTime = tibios.STS.create("sts" + stsNames[i] + stsStruct[i][j] );
if(stsStruct[i][j] != "BusUtil") {
stsTime.unitType = "High resolution time based";
stsTime.operation = "A * x";
} else {
stsTime.unitType = "Not time based";
stsTime.operation = "Nothing";
}
}
}
The Tconf scripts are used to generate the DSP/BIOS configuration CDB file at design time,
which in turn links the appropriate kernel modules into the executable image during a build.