IDL Module
Application Program Interface
2-173
IDL context. IDL functions can be written in C or assembly and must
follow the C calling conventions described in the compiler manual.
When RTA is enabled (see page 2–111), an application contains an
IDL_cpuLoad object, which runs a function that provides data about the
CPU utilization of the application. In addition, the LNK_dataPump
function handles host I/O in the background, and the RTA_dispatch
function handles run-time analysis communication.
The IDL Function Manager allows you to insert additional functions that
are executed in a loop whenever no other processing (such as HWIs or
higher-priority tasks) is required.
IDL Manager
Properties
The following global properties can be set for the IDL module in the IDL
Manager Properties dialog of the DSP/BIOS Configuration Tool or in a
Tconf script:
❏
Object Memory
. The memory segment that contains the IDL
objects.
Tconf Name: OBJMEMSEG
Type: Reference
Example:
bios.IDL.OBJMEMSEG = prog.get("myMEM");
❏
Auto calculate idle loop instruction count
. When this property is
set to true, the program runs the IDL functions one or more times at
system startup to get an approximate value for the idle loop
instruction count. This value, saved in the global variable
CLK_D_idletime, is read by the host and used in the CPU load
calculation. By default, the instruction count includes all IDL
functions, not just LNK_dataPump, RTA_dispatcher, and
IDL_cpuLoad. You can remove an IDL function from the calculation
by setting the "Include in CPU load calibration" property for an IDL
object to false.
Remember that functions included in the calibration are run before
the main() function runs. These functions should not access data
structures that are not initialized before the main() function runs. In
particular, functions that perform any of the following actions should
not be included in the idle loop calibration:
■
enabling hardware interrupts or the SWI or TSK schedulers
■
using CLK APIs to get the time
■
accessing PIP objects
■
blocking tasks
■
creating dynamic objects
Tconf Name: AUTOCALCULATE
Type: Bool
Example:
bios.IDL.AUTOCALCULATE = true;