[FAQ] TDA4VH-Q1: [DSPLIB/MATHLIB] : Steps to Migrate C66x Source Code to C7x

Part Number: TDA4VH-Q1
Other Parts Discussed in Thread: MATHLIB

Hi,

How can I port my existing C66x code to an optimized C7x implementation?
 
Regards,
Betsy Varughese
  • Hi,

    Kindly follow the steps outlined below to migrate the existing C66x code to the C7x platform.
    1) Download the SDK containing C66x source codehttps://www.ti.com/tool/PROCESSOR-SDK-J721E#downloads
    2) Analyze Existing C66x Source Code : 
    • Go through the logic and implementation of the current C66x code. The source code is available at "mathlib_c66x_3_1_2_4\packages\ti\mathlib\src\".
    3) Set Up the C7x Development Environment ((if it’s not already installed):
    • Download and install the C7x Code Generation Tools (CGT) from here..
    • Refer to the C7x Math/dsp Library implementation for the particular kernel located at "mathlib\src\MATHLIB_<kernel_name>" to understand the folder structure and API's used.

    4)  Apply C7x-Specific Optimizations: 

    • Leverage vectorization and streaming engine features for performance improvements. (Training Material Link is attached below)

    5) Replace C66x Intrinsic with C7x Equivalents :

    6) Measure the performance improvement using __TSC.

    Regards,

    Betsy Varughese