NOTICE: The Processors Wiki will End-of-Life in December of 2020. 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.
XDAIS sample algorithm
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"
|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.
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
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.