Implicit DSP/BIOS Instrumentation
3-30
You can rewrite this equation:
You can also express CPU load using instruction cycles rather than time
intervals:
3.6.1.1 Measuring the CPU Load
In a DSP/BIOS application, the CPU is doing work when any of the following
are occurring:
❏
hardware interrupts are serviced
❏
software interrupts and periodic functions are run
❏
task functions are run
❏
user functions are executed from the idle loop
❏
HST channels are transferring data to the host
❏
real-time analysis data is uploaded to the DSP/BIOS Analysis Tools
When the CPU is not performing any of those activities, it is going through the
idle loop, executing the IDL_cpuLoad function, and calling the other
DSP/BIOS IDL objects. In other words, the CPU idle time in a DSP/BIOS
application is the time that the CPU spends doing the routine in Example 3-3.
To measure the CPU load in a DSP/BIOS application over a time interval T, it
is sufficient to know how much time was spent going through the loop, shown
in Figure 3-3, and how much time was spent doing application work.
Example 3-3.
The Idle Loop
Over a period of time T, a CPU with M MIPS (million instructions per second)
executes M x T instruction cycles. Of those instruction cycles, c
w
are spent
doing application work. The rest are spent executing the idle loop shown in
Example 3-3. If the number of instruction cycles required to execute this loop
once is l
1
, the total number of instruction cycles spent executing the loop is
CPUload
t
w
t
w
t
i
+
--------------
100
×
=
CPUload
c
w
c
w
c
i
+
----------------
100
×
=
’Idle_loop:
Perform IDL_cpuLoad
Perform all other IDL functions (user/system functions)
Goto IDL_loop’
Содержание 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 ...