Codec Engine GenServer Wizard FAQ

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search

Contents

Screenshots

General Questions

What does the wizard do? What does the wizard generate?

The Codec Engine GenServer Wizard generates the files needed to create a Codec Server package that uses 1 or more codecs. This includes:

  • XDC files like package.xdc and package.bld
  • A TCF file (for BIOS 5 RTOS configuration)
  • XDC Configuration scripts (for both server and codec)
  • A C file containing a simple main() implementation
  • linker command file.

The server is generated by running the xdc release command after the Wizard has finished generating the necessary files. For more information on Codec Servers, see the Codec Engine Server Integrator User's Guide.

What inputs are required?

The user must specify one or more codec modules such as those in packages generated by the RTSC Codec Package Wizard. These should be selected from the “Codec Modules” list displayed in Step 1.

Optional Inputs:

  • Platform (e.g. ti.platforms.evmDM6446)
    • If none specified, ti.platforms.evmDM6446 used by default.
  • Output Repository for the server
    • If none specified, then the repository of the Wizard package is used as the server's output repository
  • Server Package Name
    • If none specified, the Wizard will supply a default package name
  • Package Search Path
    • This is initially the XDCPATH, as specified at startup or read from the environment. It can be modified with the “Set Package Search Path” button, and a new list of “Codec Modules” can be generated by clicking “Search for Codecs”. It is important that the XDCPATH be persevered in the Package Search Path, and that only repositories that are to be searched for codecs be added and deleted from the path
  • Server.algs array for the generated codec configuration script. For each codec module used:
    • Scratch GroupId. Defaults are determined by the type of processing.:
      • Video: 1
      • Imaging: 2
      • Audio/Speech: 3
    • Name. Default is the codec module name in all lower case
    • Thread Priority: Defaults are determined by the type of processing:
      • Video: Server.MINPRI + 1
      • Imaging: ServerMINPRI + 2
      • Audio/Speech: Server.MINPRI + 3
    • Stack size. Initialized to codec defaults
    • StackMemId. Default is 0

What is the difference between the Codec Engine GenServer Wizard and the RTSC Server Package Wizard?

The biggest difference being this Wizard can create a server that uses multiple codecs, also referred to as a server combo. Also:

  • evmOMAPL137 support has been added
  • You can modify the Package Search Path and search for codecs from within the Wizard
  • You can configure the array of algorithms the server can serve up, Server.algs
  • The Codec Engine GenServer Wizard is delivered with Codec Engine

Installation

What software prerequisites exist for using the Wizard?

The Wizard requires other TI tools:

  • Codec Engine 2.20 or greater
  • Codec Engine Tools (found in CE directory) or XDAIS 6.20 (or greater)
  • DSP/BIOS 5.32.04 or greater
  • XDC Tools 3.10 or greater

How do I install and run the Wizard?

The Wizard is delivered with Codec Engine.

  • Step 1: Install Codec Engine
  • Step 2: Add the following to your XDCPATH:
    • $(CODEC_INSTALL_DIR)/packages - this may be one or more repositories, wherever you have codecs you want to add to the Server
    • $(CE_INSTALL_DIR)/packages
    • $(CE_INSTALL_DIR)/cetools/packages
    • $(BIOS_INSTALL_DIR)/packages
    • $(LINK_INSTALL_DIR) - Beginning with CE 2.24, DSP Link was removed from cetools and must be added explicitly.

An example on Linux if using 'full' Codec Engine might be the following (assumes various "INSTALL_DIR" variables have already been set): -

export XDCPATH="$(CE_INSTALL_DIR)/packages;$(CE_INSTALL_DIR)/cetools/packages;$(CODEC_INSTALL_DIR)/packages;$(BIOS_INSTALL_DIR)/packages;$(LINK_INSTALL_DIR)/packages"

An alternative is to write a quick Makefile so that you have less to type each time you invoke the wizard. For example: -

#
#  ======== Makefile.ce.genserver ========
#  This makefile is optional - you can use all of it or none of it.
#  Its purpose is to save time/typing when used from the context of the DVSDK.
#  All of the paths are preset in the $(DVSDK_INSTALL_DIR)/Rules.make. The 
#  Codec Engine genserver requires many of these paths hence by setting 
#  the XDCPATH here we save the user some typing and package-path setup.
#  Commands (make goals): -
#  - Start the server wizard
#  [>] make -f Makefile.ce.genserver genserver 
 
# Import Tools Path from Rules.make
include ../Rules.make
 
# Set location of xdc executable
XDC = $(XDC_INSTALL_DIR)/xdc
 
# Set XDCPATH to contain necessary repositories.
# Note that we put specify both CODEC_INSTALL_DIR and CODEC_INSTALL_DIR/packages
# since our config.bld is typically in CODEC_INSTALL_DIR.
 
XDCPATH = $(CODEC_INSTALL_DIR);$(CODEC_INSTALL_DIR)/packages;$(CE_INSTALL_DIR)/packages;$(CE_INSTALL_DIR)/cetools/packages;$(BIOS_INSTALL_DIR)/packages;$(LINK_INSTALL_DIR)/packages
 
# Conditionally, you can create verbose build output
XDCOPTIONS=v
 
export XDCOPTIONS
export XDCPATH
 
all: .all-packages
 
.all-packages:
	$(XDC_INSTALL_DIR)/xs ti.sdo.ce.wizards.genserver

You can then type: -

make -f Makefile.ce.genserver

If you do use such a Makefile then you can obviously skip step 3 - because the Makefile will invoke wizard itself.

  • Step 3: Run the Codec Engine GenServer Wizard by executing:
    • $(XDC_INSTALL_DIR)/xs ti.sdo.ce.wizards.genserver

Note: You must provide a config.bld to build - XDCtools searches for this file in your current directory, then the XDCPATH, and finally XDCROOT and XDCROOT/etc. Verify the config.bld you wish to use will be found before any other config.bld by placing its parents directory earlier in your XDCPATH. If you encounter build errors related to your config.bld, verify that the paths contained in config.bld are correct. Also see xdc.pdf in XDCROOT/docs for more information.

An example config.bld for the OMAP3530 platform is shown below - for other C64P platforms such as DM6446/DM6467 just swap out the platform name.

/*
 *  ======== config.bld ========
 * User note: YOU MUST MODIFY THIS FILE TO SPECIFY THE COMPILER TOOL PATHS.
 *
 * Edit this file to specify compiler toolchain paths, and any custom
 * compiler/linker options.
 */
 
/* location of your C6000 codegen tools */
var C64P = xdc.useModule('ti.targets.C64P');
 
/* location of your CG tools */
var codegen = "" + java.lang.System.getenv("CODEGEN_INSTALL_DIR");
C64P.platform = "ti.platforms.evm3530";
 
/* Verify that CODEGEN_INSTALL_DIR was set as an environment variable */
if (codegen=="null" || codegen=="") {
    print("Warning: TI Code Generation Tools not found. Verify that "
        + "CODEGEN_INSTALL_DIR is set correctly in the Makefile.");
} else if ( !java.io.File( codegen ).isDirectory() ) {
    print("Warning: CODEGEN_INSTALL_DIR is not set to a valid directory.");
}
C64P.rootDir = codegen;
 
 
/*
 *  ======== Build.targets ========
 * list of targets (ISAs + compilers) to build for
 */
Build.targets = [
    C64P,
];

How do I set my XDCPATH?

See this explanation at the RTSC Codec Package Wizard FAQ

Also see the example above.

The XDCPATH is too long to type. Is there another way?

See this explanation at the RTSC Server Package Wizard FAQ

What files are included with the Wizard?

The Wizard consists of the ti.sdo.ce.wizards.genserver package containing XDC files (package.xdc, package.bld, Main.xdc), XDC script files (denoted with extension .xs), templates directory (*.xdt files used to generate XDC files), and a readme.

Running the Wizard

What if I need help on the command line?

See the Codec Engine GenServer Wizard help by: xs ti.sdo.ce.wizards.genserver --help

What if I need help using the GUI version?

After you have started the GUI Wizard, use Help->Instructions

What if I want to use a different memory map?

Edit server.tcf in ti/sdo/ce/wizards/genserver/templates/ti.platforms.<platform>

What if I am using a platform other than the ones displayed in the Platform drop-down list?

The platforms currently supported are:

  • ti.platforms.evmDM6446
  • ti.platforms.evmDM6467
  • ti.platforms.evm3530
  • ti.platforms.evmOMAPL137

What are the default groupIds and priorities assigned to codecs?

The default values are assigned according to the interface that a codec inherits:

inherits group id   priority
ti.sdo.ce.image1.IIMGDEC1     0      Server.MINPRI + 1
ti.sdo.ce.image1.IIMGENC1     0      Server.MINPRI + 1
ti.sdo.ce.video.IVIDDEC     0      Server.MINPRI + 2
ti.sdo.ce.video.IVIDENC     0      Server.MINPRI + 2
ti.sdo.ce.video1.IVIDDEC1     0      Server.MINPRI + 2
ti.sdo.ce.video1.IVIDENC1     0      Server.MINPRI + 2
ti.sdo.ce.video2.IVIDDEC2     0      Server.MINPRI + 2
ti.sdo.ce.video2.split.IVIDDEC2BACK     0      Server.MINPRI + 2
ti.sdo.ce.video2.split.IVIDDEC2FRONT     0      Server.MINPRI + 2
ti.sdo.ce.image.IIMGDEC     0      Server.MINPRI + 3
ti.sdo.ce.image.IIMGENC     0      Server.MINPRI + 3
ti.sdo.ce.audio.IAUDDEC     1      Server.MINPRI + 3
ti.sdo.ce.audio.IAUDENC     1      Server.MINPRI + 3
ti.sdo.ce.audio1.IAUDDEC1     1      Server.MINPRI + 3
ti.sdo.ce.audio1.IAUDENC1     1      Server.MINPRI + 3
ti.sdo.ce.speech.ISPHDEC     1      Server.MINPRI + 3
ti.sdo.ce.speech.ISPHENC     1      Server.MINPRI + 3
ti.sdo.ce.speech1.ISPHDEC1     1      Server.MINPRI + 3
ti.sdo.ce.speech1.ISPHENC1     1      Server.MINPRI + 3
ti.sdo.ce.IVIDANALYTICS     2      Server.MINPRI + 1
ti.sdo.ce.IVIDTRANSCODE     2      Server.MINPRI + 1
ti.sdo.ce.IUNIVERSAL     2      Server.MINPRI + 1

This addresses: SDOCM00057124 genserver wizard generates wrong groupId values. It is available in Codec Engine 2.24.

Improving performance on the generated servers

See this explanation at the RTSC Codec Package Wizard FAQ

Release Issues

What do I need to do after the wizard has successfully output the files needed?

  • After generating files using the RTSC Server Package Wizard, edit codec.cfg. Assign values to any settings that are undefined:
    • Example:
      • Original line: VIDDEC_COPY.alg.codeSection = undefined;
      • Modified line: VIDDEC_COPY.alg.codeSection = "DDR2";
      • Don't forget the quotes!
  • Note:
    • You must have the following on your XDCPATH to build a server:
      • $(CE_INSTALL_DIR)/packages
      • $(CE_INSTALL_DIR)/cetools/packages or XDAIS repository
      • $(BIOS_INSTALL_DIR)/packages
    • Additionally XDCTools must be supplied with a config.bld - check to see if your config.bld requires a user.bld! For example, the config.bld usually found in $(CE_INSTALL_DIR)/packages searches for a user.bld. The user.bld is searched for in an analogous manner as the config.bld. If you can't find a config.bld, here's a simple one [1] that you can use for C64+ servers. In the file, just make sure you modify the path to the code generation tools and the platform you are building for.
      • To explicitly specify the config.bld, modify your XDC build command to: XDCBUILDCFG=<path_to_config.bld> xdc release -PD .
      • Alternatively, the XDCTools will search for a config.bld along your XDCPATH (using the first one it finds) and then in the XDCTools Dir\packages directory.
      • Option: Start your XDCPATH with $(CE_INSTALL_DIR)/packages, then $(CE_INSTALL_DIR)/examples; then, assuming you have not added a user.bld in $(CE_INSTALL_DIR)/packages, the config.bld will be used from $(CE_INSTALL_DIR)/packages and the user.bld from $(CE_INSTALL_DIR)/examples.
  • Run xdc release -PD . (note the period to indicate 'this directory'!) to generate the server executable from the output directory (output repository + server.package.name.with.dots.turned.into.forward.slashes).
  • You can override the default server name and default profile via: xdc release XDCARGS="release myNewServerName" -PD .

Build Errors

See the RTSC Codec Package Wizard FAQ

Other Questions

Does the wizard run the same way on both Windows and Linux?

Yes, the wizard behaves the exact same way on both Windows and Linux.

This topic describes how to build codec combos in Windows (since codec-combos run on the DSP they are completely agnostic to the GPP OS. The same codec combo can be reused in Linux, WinCE GPP environments etc)

Ok. Now I have a codec-combo. Then what?

Testing it would probably be wise!

There are a whole suite of sample apps in DMAI that can be used to (unit) test a codec-combo e.g. you could use apps/audio_decode_io1 to test all of the IAUDDEC1 based audio decoders in your codec-combo.

Other FAQs

Other RTSC Codec Package Wizard Info


For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Codec Engine GenServer Wizard FAQ here.
Leave a Comment
Personal tools