Texas Instruments Codec Engine Server Server User Manual


 
Creating a Codec Server
Configuring a Codec Server 2-15
2.2.4.1 DSP/BIOS Threads and Module Use
Each “remote” algorithm instance that runs on the DSP executes in a
DSP/BIOS thread whose priority is specified by a static configuration
parameter (see ti.sdo.ce.Server). The stack size of the thread that runs a
“remote” algorithm is specified by the algorithm’s implementation of the
ICodec interface (see ti.sdo.ce.ICodec).
The initial release of the Codec Engine runtime starts a separate thread
for each “remote” algorithm instance; thus, two instances of the same
algorithm run in two separate threads (even though these threads have
the same stack size and priority). Future releases may run these
instances in a single thread. However, algorithm instances that require
different priorities will always be run in separate threads.
Creation and deletion of algorithm instance threads is handled by a
Resource Manager Server (RMS) thread. This thread is part of the Codec
Engine Runtime and, by default, runs at the lowest possible priority so as
to avoid affecting real-time processing performed by “remote” algorithm
instances. The RMS thread also provides “resource monitoring” services
to the Codec Engine Runtime. For example, it reports overall DSP CPU
load to the GPP, transfers execution trace data from the DSP to the GPP,
and controls the acquisition of DSP trace information based on GPP
commands.
Although the Codec Engine uses the DSP/BIOS CLK services, the initial
release does not require timer interrupts and configures the DSP/BIOS
CLK interrupt to run once every 5 seconds. In the future, the Codec
Engine may require interrupts rates as high as 1/second to support
watchdog timers and recovery from IPC failures.
In order to support CPU load monitoring, the Codec Engine adds an idle
function to DSP/BIOS’s idle loop. The current implementation allows
other application-specified idle functions to also run. However, to support
low power modes of the DSP, future implementations may idle the CPU,
which prevents other idle functions from running.
Note that the changes mentioned in this section are not certain. We are
simply pointing out areas of the implementation that may be subject to
change in future releases.
2.2.5 Editing the Build Script
Edit the package.bld file with a text editor. This build script is run by the
makefile. In addition to compiling code, the build script runs the
DSP/BIOS and XDC configuration scripts and links the executables
together.