NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Codec Engine GenServer Wizard FAQ

From Texas Instruments Wiki
Jump to: navigation, search

Screenshots[edit]

General Questions[edit]

What does the wizard do? What does the wizard generate?[edit]

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 BIOS config file (tcf for BIOS 5, cfg for BIOS 6)
  • XDC Configuration scripts (for Codec Engine and friends)
  • A C file containing a simple main() implementation
  • config.bld (target configuration file)
  • linker command file
  • makefile (gnu make)

The server is built by running the gmake 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?[edit]

Required Inputs:

  • Destination Directory for the server
  • TI Codegen Tools directory
  • The user must specify one or more codecs such as those created by [Codec_Engine_GenCodecPkg_Wizard_FAQ GenCodecPkg wizard.

Optional Inputs:

  • Platform (e.g. ti.platforms.evmDM6446)
    • If none specified, ti.platforms.evmDM6446 used by default.
  • Server Package Name
    • If none specified, the Wizard will supply a default package name
  • Search Path
    • This is initially the XDCPATH, as specified at startup or read from the environment. It serves two purposes: It is used to search for codecs, and it is set to the XDCPATH in the makefile generated by the wizard. It can be modified with the “Set Search Path” button, and a new list of “Codec Modules” can be generated by clicking “Refresh Codec List”. It is important that the original XDCPATH be persevered in the Package Search Path, and that only repositories that are to be searched for codecs, and repositories that are to be searched when building 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?[edit]

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

  • OMAP-L and TI81XX platforms have 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
  • You can configure the memory map
  • The Codec Engine GenServer Wizard is delivered with Codec Engine

Installation[edit]

What software prerequisites exist for using the Wizard?[edit]

The Wizard requires other TI tools:

  • Codec Engine 2.20 or greater
  • Appropriate XDAIS, Framework Components, Link, BIOS, XDC and other dependencies (see CE release notes for specific versions)

How do I install and run the Wizard?[edit]

The Wizard is delivered with Codec Engine.

  • Step 1: Install Codec Engine
  • Step 2: Add the following to your XDCPATH:
    • $(CE_INSTALL_DIR)/packages
These may optionally be added later when the wizard is running by selecting the “Set Search Path” button and adding them to the list.
  • $(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)/cetools/packages or $(XDAIS_INSTALL_DIR)/packages and $(FC_INSTALL_DIR)/packages
  • $(BIOS_INSTALL_DIR)/packages
  • $(LINK_INSTALL_DIR) - Beginning with CE 2.24, 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): -

<syntaxhighlight lang='bash'> export XDCPATH="$(CE_INSTALL_DIR)/packages;$(CE_INSTALL_DIR)/cetools/packages;$(CODEC_INSTALL_DIR)/ packages;$(BIOS_INSTALL_DIR)/packages;$(LINK_INSTALL_DIR)/packages" </syntaxhighlight>

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

<syntaxhighlight lang='make'>

  1. ======== Makefile.ce.genserver ========
  2. This makefile is optional - you can use all of it or none of it.
  3. Its purpose is to save time/typing when used from the context of the DVSDK.
  4. All of the paths are preset in the $(DVSDK_INSTALL_DIR)/Rules.make. The
  5. Codec Engine genserver requires many of these paths hence by setting
  6. the XDCPATH here we save the user some typing and package-path setup.
  7. Commands (make goals): -
  8. - Start the server wizard
  9. [>] make -f Makefile.ce.genserver genserver
  1. Import Tools Path from Rules.make

include ../Rules.make

  1. Set location of xdc executable

XDC = $(XDC_INSTALL_DIR)/xdc

  1. Set XDCPATH to contain necessary repositories.
  2. Note that we put specify both CODEC_INSTALL_DIR and CODEC_INSTALL_DIR/packages
  3. since our config.bld is typically in CODEC_INSTALL_DIR.
  4. Note that different releases will require different dependencies

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

  1. 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

</syntaxhighlight>

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

How do I set my XDCPATH?[edit]

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?[edit]

See this explanation at the RTSC Server Package Wizard FAQ

What files are included with the Wizard?[edit]

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[edit]

What if I need help on the command line?[edit]

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

What if I need help using the GUI version?[edit]

Here is a description of the wizard's screens:

Basic Server Information[edit]
Basic Server Information
Platform
Select the platform that you wish to build the server for.
Server Package Name
Edit this field to specify the server package name. An example server package name: ti.sdo.servers.viddec_copy
Destination Directory
Browse to the location that the server package files should be output to. For example, if the output repository is c:/output, and the server package name is ti.sdo.servers.viddec_copy, the files will be output to c:/output/ti/sdo/servers/viddec_copy
TI 'cgtools' Dir
The location of TI CodeGen tools. The directory above 'bin'
Set Search Path
The Search Path is the path used to search for codecs that populate the 'Codec Modules' list. Also, the path used to search for dependencies when building the server. Select this button to add and remove directories from the Search Path. All required directories (code generation, XDAIS, BIOS, etc.) must be present in this path in order to successfully build the server, unless the "Don't check for build dependencies..." box is checked. The Search Path is initialized when the wizard starts to XDCPATH.
Codec Modules
These are the names of the codec modules you wish to create the server for. The codec search path can be modified by clicking the 'Set Search Path' button and specifying directories to search in.
Enable Power Management (only in CE 2.x)
Check to enable DSP power management on omap3530 and DM6446x platforms. When selected, the Local Power Manager install directory must be in the Search Path.
Don't check for build dependencies, I'll modify the generated makefile (e.g. Rules.make users)
When this is checked, the user is expected to supply a rules/paths file. After generating the server, the user then goes into the generated makefile and includes the file. This is for users who already have a file in their development environment with paths defined, and they just want to use that.
Algorithm and Group Configuration[edit]
Algorithm Configuration
Algorithm Configuration
The default Server.algs array values for a codec can be modified by selecting a codec in the tree on the left and modifying fields on the right.
To reset values to the defaults for the currently selected codec, check the Use Defaults box.
To change the groupId of a codec, right-click on it and select 'Move to group...'. If the groupId selected doesn't exist in the tree, it will be created. A codec can also be dragged and dropped into another group.
Group Configuration
Group Configuration
To configure DSKT2 Scratch Sizes and DMA Settings for a group, select the group and enter values in the fields on the right. They are:
SARAM
The maximum scratch size required for this algorithm from SARAM space.
DARAM
The maximum scratch size required for this algorithm from DARAM space.
Params
The maximum number of Params that will be assigned to the currently selected group for sharing.
TCCs
The maximum number of TCCs that will be assigned to the currently selected group for sharing.
Edma Channels
The maximum number of Edma Channels that will be assigned to the currently selected group for sharing. On devices where DCHMAP doesn't exist, it is recommended to request as many channels as Params requested. This is only required for groups with IRES-based codecs.
Qdma Channels
The maximum number of Qdma Channels that will be assigned to the currently selected group for sharing. This is only requred when EDMA3 LLD manages EDMA3 resources
Note: Algorithms created within a group will share the EDMA3 resources assigned to that group.
To change a group item's id, or delete it if it's empty, right-click on the group name and select from the menu.
To create a new group item, right-click in an empty area of the tree and select 'New group...'
Use EDMA3 LLD to manage all EDMA3 resources
When checked, EDMA3 LLD will manage all EDMA3 resources. When unchecked, DMAN3 will manage EDMA3 resources. This selection can only be modified when no algorithms implement IRES_Fxns.
For more information on Codec Engine GroupIds, see Codec Engine GroupIds
For more information on DSKT2, see Memory management in XDAIS with DSKT2
Memory Map[edit]
Memory Map
Server memory can be configured by unchecking 'Use Defaults', selecting the order of the memory areas, and entering a base address and size for each section. All values must be entered in hexidecimal.
The 'RESET_VECTOR' memory area section needs to start at an even 1Mb, and is fixed at size 0x80.
To have all sections aligned automatically as values are entered, select the 'From top' or 'From bottom' radio button.
When 'From top' is selected, only the starting base address and length fields can be modified. When'From bottom' is selected, only the last address and length fields can be modified.
To restore all values to the defaults initially displayed, check 'Use Defaults'.

What are the default groupIds and priorities assigned to codecs?[edit]

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

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

See this explanation at the RTSC Codec Package Wizard FAQ

After the Wizard[edit]

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

  • 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!

Code Composer Studio 4.x and 5.x[edit]

The wizard creates a project files which can be used in CCS 4 and 5.

  • Import the project in CCS by going to Project -> Import Existing CCS/CCE Eclipse Project.
  • For the "root directory" click "Browse" and point it to the directory <repository>/<mycompany>/<mygroup>/<myserver>.
  • You should see <mycompany>.<mygroup>.<myserver> show up under Projects.
  • Click Finish to import the project into your workspace.

Note: Do not check "Copy projects into workspace" when importing your project

This is a "standard make" project meaning that clicking the "build" button in CCS will be equivalent to running "make" at the command line.

How do I build my Server?[edit]

  • Run gmake all to generate the server executable from the output directory (output directory + server.package.name.with.dots.turned.into.forward.slashes).

Other Questions[edit]

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

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?[edit]

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[edit]

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Codec Engine GenServer Wizard FAQ here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Codec Engine GenServer Wizard FAQ here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Codec Engine GenServer Wizard FAQ here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Codec Engine GenServer Wizard FAQ here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Codec Engine GenServer Wizard FAQ here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Codec Engine GenServer Wizard FAQ here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Codec Engine GenServer Wizard FAQ here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Codec Engine GenServer Wizard FAQ here. 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.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity