FFTLIB User Guide
Ubuntu 22.04 Build Instructions for FFTLIB
Python3 Setup
  • We auto generate test cases via python scripts packaged in the library
  • Please ensure that you have the following python3 packages installed
    • numpy, scipy, and scikit-learn
Environment Setup
  • Run the executables on EVM using CCS (Code composer studio)
  • Setup needed for the compiler for CGT7x
  • Path setup
    • export PATH=${CGT7X_ROOT}/bin:${PATH}
Build
  • FFTLIB utilizes CMake to build, ensure that system has CMake v3.16.0 or higher
  • Build options:
    • SOC=AM62A/j721e/j721s2/j784s4
    • DEVICE=C7504/C7100/C7120
    • TARGET_PLATFORM=PC/""
    • KERNEL_NAME
    • BUILD_TEST=1 OR AUTO_TEST=1
    • FFTLIB_DEBUGPRINT=1/0
    • FFTLIB_TESTPRINT
    • ALL_TEST_CASES=1 OR TEST_CASE=TestCaseID
    • CMAKE_EXPORT_COMPILE_COMMANDS=TRUE
    • CMAKE_BUILD_TYPE=Release/Debug
    • AUTO_TEST=1/0 (builds all test cases and libraries)
  • Example CMake commands
    • To build fft_c7x/FFTLIB_fft1dBatched_i32fc_c32fc_o32fc for target on J721S2 and run performance test cases:
      • cmake -B build -DTARGET_PLATFORM="" -DBUILD_TEST="1" -DKERNEL_NAME="fft_c7x/FFTLIB_fft1dBatched_i32fc_c32fc_o32fc" -DSOC="j721s2" \
        -DDEVICE="C7120" -DFFTLIB_DEBUGPRINT="0" -DALL_TEST_CASES="1" -DCMAKE_EXPORT_COMPILE_COMMANDS="TRUE" \
        -DCMAKE_BUILD_TYPE="Release"
    • To build fft_c7x/FFTLIB_fft1dBatched_i32fc_c32fc_o32fc for host emulation on J721S2 and run test case 2 with debug print statements
      • cmake -B build -DTARGET_PLATFORM="PC" -DBUILD_TEST="1" -DKERNEL_NAME="fft_c7x/FFTLIB_fft1dBatched_i32fc_c32fc_o32fc" -DSOC="j721s2" \
        -DDEVICE="C7120" -DFFTLIB_DEBUGPRINT="1" -DTEST_CASE="2" -DCMAKE_EXPORT_COMPILE_COMMANDS="TRUE" \
        -DCMAKE_BUILD_TYPE="Release"
    • To build all tests cases and libraries for release for J721S2 for target
      • cmake -B build -DTARGET_PLATFORM="" -DAUTO_TEST="1" -DSOC="j721s2" -DDEVICE="C7120" \
        -DALL_TEST_CASES="1" -DCMAKE_BUILD_TYPE="Release" -DFFTLIB_DEBUGPRINT="0"
    • Then run:
      • cmake --build build -j<num_cores>
Run
  • To run FFTLIB kernels on a PC:
    • bin/Release/test_FFTLIB_<kernel_name>_<device>_x86_64
      OR
      bin/Debug/test_FFTLIB_<kernel_name>_<device>_x86_64
      • Ex:
        bin/Release/test_FFTLIB_and_C7120_x86_64
  • To run FFTLIB kernels for target
    • To reproduce numbers given in the datasheet, run the .out program on the EVM in No Boot Mode