Examples

Back

 

Stand-alone kernel examples/tests

Each kernel directory has a stand-alone application that can be compiled and run on a bare-metal DSP (no OS or drivers). The main test file is the *_d.c file. This file follows a common format for each kernel:
  • Load all the test vectors from the *_idat.c file of the same directory.
  • For each test case:
    • Allocate memory for each buffer based on the parameters specified from the test vector
    • Initialize buffers with data as specified from the test vector (random, static, etc.)
    • Initialize function parameters
    • Call the optimized version of the kernel from the c66 folder of the same directory
    • Call the natural c version of the kernel from the *_cn.c file of the same directory
    • Compare the results of these two versions to make sure they match
    • Optionally compare the results against a static expected output_iterator
    • Print test results, including performance
    • Free buffers
  • When all the test vectors are completed, print summary of performance and memory usage.
 

Full regression test

The packages/ti/vxlib.main.c contains
  • Regression application (Calls each of the kernel tests one after the other in a single executable)
 

Copyright 2022, Texas Instruments Incorporated