Texas Instruments TMS320 User Manual page 93

Dsp/bios v5.40
Hide thumbs Also See for TMS320:
Table of Contents

Advertisement

3.6.1.2 Calculating the Application CPU Load
N x l
where N is the number of times the loop is repeated over the period T.
1
Hence, you have total instruction cycles equals work instruction cycles plus
idle instruction cycles.
MT
=
c
+
Nl
w
1
From this expression you can rewrite c
c
=
MT Nl
w
1
Using the previous equations, you can calculate the CPU load in a DSP/BIOS
application as:
c
w
×
-------- -
CPUload
=
100
=
MT
To calculate the CPU load you need to know l
time interval T, over which the CPU load is being measured.
The IDL_cpuLoad object in the DSP/BIOS idle loop updates an STS object,
IDL_busyObj, that keeps track of the number of times the IDL_loop runs, and
the time as kept by the DSP/BIOS high-resolution clock (see section 4.9,
Timers, Interrupts, and the System Clock, page 4-71). This information is
used by the host to calculate the CPU load according to the equation above.
The host uploads the STS objects from the target at the polling rate set in the
RTA Control Panel Property Page. The information contained in IDL_busyObj
is used to calculate the CPU load. The IDL_busyObj count provides a
measure of N (the number of times the idle loop ran). The IDL_busyObj
maximum is not used in CPU load calculation. The IDL_busyObj total
provides the value T in units of the high-resolution clock.
To calculate the CPU load you still need to know l
cycles spent in the idle loop). When the Auto calculate idle loop instruction
count box is enabled for the Idle Function Manager, DSP/BIOS calculates l
at initialization from BIOS_init.
The host uses the values described for N, T, l
calculate the CPU load as follows:
Nl
1
CPUload
=
1
100
-------- -
MT
Implicit DSP/BIOS Instrumentation
as:
w
MT NI
NI
1
×
----------------------- -
100
=
1
-------- -
MT
MT
and the value of N for a chosen
1
1
×
100
(the number of instruction
1
, and the CPU MIPS to
1
Instrumentation
1
3-31

Advertisement

Table of Contents
loading

Table of Contents