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.

XDAIS sample algorithm

From Texas Instruments Wiki
Jump to: navigation, search

Intro

Although XDAIS has existed since 1999, its surprisingly difficult to find a good sample algorithm to use as a baseline for your own algorithm development.

This topic fills that gap, supplying a FIR filter written by vendor TI, built and tested for the c64 Instruction Set Architectures. (porting it to another ISA is simple since its straight C code)

Before venturing into this we suggest you first take a look at the XDAIS docs.

Build & test information

This FIR_TI XDAIS algorithm was built with: -

  • Codegen tools 6.0.14 link
  • DSP/BIOS 5.32.02 link
    • however there are 2 project configurations - one that uses DSP/BIOS (Debug) and one that does not (NOBIOS).
  • CCS 3.3

It was tested with the C6416 Device Cycle Accurate Simulator.

The directory layout is as follows: -

align="center"
Directories in attached sample algorithms
Directory Description
src/fir_ti FIR_TI sample algorithm. Source + CCS Project.
src/api Sample ALG library for clients to use to instantiate XDAIS algorithms
include/ Public include directory
lib/ Public libraries/archives directory
apps/firtest1 Sample application invoking the XDAIS algorithm. Ultra-simple.

CCS projects are available so you can rebuild it.

To run it simply: -

  • launch the c6416 Cycle Accurate Simulator (or any c64 CCS Simulator or Hardware Platform)
  • select the appropriate configuration - it will default to a BIOS Debug configuration with LOG_printf() output, but you can flip it to NOBIOS if you just want standard C I/O to display the results.
  • if in Debug config open the BIOS LOG window and run (F5). If in NOBIOS simply run.

You will see a bunch of FIR filtered result values.

Using FIR_TI as a baseline for your own algorithm

The intent of this topic is not to repeat the high quality XDAIS documentation in describing FIR_TI's usage of the XDAIS concepts. Instead it is intended as a find-replace start-point. i.e. for your own Barcode Scanner algorithm you could start with a find-replace of FIR to BARCODE and then TI to VENDORNAME.

The next step would be to modify your algorithm to implement IALG according to your algorithm's needs i.e. how many buffers do you need, are they scratch/persistent etc.

spru352 and spru360 are the right documents to use to understand how to implement this most efficiently.

Compliance testing

Once you're happy with your new XDAIS algorithm, you want to be sure it really is compliant to the XDAIS standard.

From XDAIS 6.x there is a new freely available tool QualiTI which lets you check this.

This tool will check for namespace compliance, appropriate library names, correct interface points and also print out helpful footprint information.

Making it work in Codec Engine

TI supplies a very powerful framework named Codec Engine (CE) that supports many platforms.

Algorithms that implement predefined interfaces simply 'plug in' to Codec Engine, however if you have a barcode scanner there may not be a standard interface available. In this case you need to either use the IUNIVERSAL interface, or implement custom stubs & skeletons which is described in the Codec Engine Algorithm Creator's User Guide. The SCALE example describes this flow.

It is beyond the scope of this topic to describe this process.

Attachments

Media:firtest.tar.gz