Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

CE Config Updates

From Texas Instruments Wiki
Jump to: navigation, search

Codec Engine configuration updates

Introduction

Using Codec Engine (CE) requires configuring it to match your application's needs. Over time, old configuration options have evolved and new configuration options have been added. This page summarizes the changes to CE configuration that have occurred over the history of the Codec Engine product.


DSP Link, ARM-side memory map config - for dual-core ARM-DSP devices

CE version where a change was introduced Change Example configuration
1.00 Initial implementation n/a. Configuration was done statically in DSP Link. See DSP Link 1.30 documentation for details on how to configure the memory map.
1.20 Dynamic configuration of memory map used by DSPLINK was introduced. The memory map can be specified in the application's cfg file using the osalGlobal.armDspLinkConfig variable. This configuration must match how memory is defined in the server's DSP/BIOS tcf configuration file
var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global');
osalGlobal.armDspLinkConfig = {
    memTable: [
        ["DDRALGHEAP", {addr: 0x88000000, size: 0x07A00000, type: "other"}],
        ["DDR2",       {addr: 0x8FA00000, size: 0x00400000, type: "main" }],
        ["DSPLINKMEM", {addr: 0x8FE00000, size: 0x00100000, type: "link" }],
        ["RESETCTRL",  {addr: 0x8FF00000, size: 0x00000080, type: "reset"}],
    ],
};
2.00 The function Engine.createFromServer() was introduced. This function automatically configures an engine using the memory configuration specified in the server's DSP/BIOS tcf configuration file
var Engine = xdc.useModule('ti.sdo.ce.Engine');
var demoEngine = Engine.createFromServer(
    "encode",               // Name of engine
    "./encodeCombo.x64P",   // Path to server executable
    "ti.sdo.servers.encode" // Server package name
    );

Configuration the Operating System adaption layer (OSAL) and Inter Processor Communication (IPC) layer

CE version where a change was introduced Change Example configuration
1.00 Initial implementation. IPC layer and OSAL have to be chosen as a pair using the osalGlobal.runtimeEnv variable
/*
 * Example .cfg snippet for ARM-side Linux app with remote algs
 * (OSAL = Linux, IPC = Link)
 */
var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global');
osalGlobal.runtimeEnv = osalGlobal.DSPLINK_LINUX;
/*
 * Example .cfg snippet for ARM-side Linux app with only local algs
 * (OSAL = Linux, IPC = Linux)
 */
var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global');
osalGlobal.runtimeEnv = osalGlobal.LINUX;
/*
 * Example .cfg snippet for DSP-side server
 * (OSAL = BIOS, IPC = Link)
 */
var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global');
osalGlobal.runtimeEnv = osalGlobal.DSPLINK_BIOS;
2.10 It is now possible to decouple the selection of OSAL and IPC layer. Note that it is still recommended to use the old way to configure the OSAL and IPC layers using .runtimeEnv unless there is a need to decouple them (e.g. when using custom OSAL's and IPC layers)
/*
 * Note, the previous OSAL/IPC config used since CE 1.00 is still recommended!
 * This new config option just allows the flexibility to plug in a different
 * OSAL and/or IPC.  If you're using the "off the shelf" OSAL and/or IPC as
 * distributed with CE, use the simpler config shown above.
 */
/* Example .cfg snippet for ARM-side Linux app with remote algs */
 
/* (OSAL = Linux) */
var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global');
osalGlobal.os = xdc.useModule('ti.sdo.ce.osal.linux.Settings');
 
/* (IPC = Link) */
var ipcSettings = xdc.useModule('ti.sdo.ce.ipc.Settings');
ipcSettings.ipc = xdc.useModule('ti.sdo.ce.ipc.dsplink.Ipc');
/* Example .cfg snippet for ARM-side Linux app with only local algs */
/* (OSAL = Linux) */
var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global');
osalGlobal.os = xdc.useModule('ti.sdo.ce.osal.linux.Settings');
 
/* (IPC = Linux) */
var ipcSettings = xdc.useModule('ti.sdo.ce.ipc.Settings');
ipcSettings.ipc = xdc.useModule('ti.sdo.ce.ipc.linux.Ipc');
/* Example .cfg snippet for DSP-side server */
 
/* (OSAL = BIOS) */
var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global');
osalGlobal.os = xdc.useModule('ti.sdo.ce.osal.bios.Settings');
 
/* (IPC = BIOS) */
var ipcSettings = xdc.useModule('ti.sdo.ce.ipc.Settings');
ipcSettings.ipc = xdc.useModule('ti.sdo.ce.ipc.bios.Ipc');
 
/* (add Link support to enable off-processor IPC) */
xdc.useModule('ti.sdo.ce.ipc.dsplink.dsp.Settings');

Configuration of the Load module (used by CE to collect DSP CPU load

CE version where a change was introduced Change Example configuration
1.00 Initial implementation. Load module needs to be configured in the server's DSP/BIOS tcf configuration file
var cpuLoad = prog.module("IDL").create("Global_cpuLoad");
cpuLoad.fxn = prog.extern("LOAD_idlefxn");
cpuLoad.calibration = true;
1.20 The Load module is automatically configured by CE. Must not configure it in the server's DSP/BIOS tcf configuration file
/* No configuration necessary */


Adding stronger checks in CE for proper XDM codec usage

CE version where a change was introduced Change Example configuration
1.00 Initial implementation. No option available.
/* Not possible */
1.20 Introduced the 'checked' setting feature. This allows stronger run-time checks to ensure proper xDM codec usage, at the expense of some performance hit. Good for debugging.
var Settings = xdc.useModule('ti.sdo.ce.Settings');
Settings.checked = true;
2.10.02, 2.20 Added CE_CHECK env var to enable/disable 'checked' builds at runtime without a rebuild

Just set CE_CHECK=1 in your environment before running your app to enable checking (or CE_CHECK=0 to disable)

See also