Implicit DSP/BIOS Instrumentation
Instrumentation
3-31
N x l
1
where N is the number of times the loop is repeated over the period T.
Hence, you have total instruction cycles equals work instruction cycles plus
idle instruction cycles.
From this expression you can rewrite c
w
as:
3.6.1.2 Calculating the Application CPU Load
Using the previous equations, you can calculate the CPU load in a DSP/BIOS
application as:
To calculate the CPU load you need to know l
1
and the value of N for a chosen
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
1
(the number of instruction
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
1
at initialization from BIOS_init.
The host uses the values described for N, T, l
1
, and the CPU MIPS to
calculate the CPU load as follows:
MT
c
w
Nl
1
+
=
c
w
MT
Nl
1
–
=
CPUload
c
w
MT
---------
100
×
MT
NI
1
–
MT
------------------------
100
×
1
NI
1
MT
---------
–
⎝
⎠
⎛
⎞
100
×
=
=
=
CPUload
1
Nl
1
MT
---------
–
100
=
Содержание TMS320 Series
Страница 1: ...TMS320 DSP BIOS v5 40 User s Guide Literature Number SPRU423G April 2009 ...
Страница 16: ...xvi ...
Страница 152: ...Tasks 4 48 Figure 4 12 Trace from Example 4 7 ...
Страница 168: ...Semaphores 4 64 Figure 4 14 Trace Results from Example 4 11 ...
Страница 202: ...5 20 ...
Страница 287: ...Index 9 Index Void 1 11 W words data memory 3 15 of code 1 5 wrapper function 2 29 ...
Страница 288: ...Index 10 Index ...