Skip to content

HVX Optimized Qualcomm Hexagon Libraries Example

This example illustrates how to use the HVX optimized Qualcomm Hexagon Libraries (QHL HVX) located under $HEXAGON_SDK_ROOT/libs/qhl_hvx.

Refer to the complete documentation on the QHL HVX library for more details on each supported function and the unit test framework provided to test the performance and accuracy of all functions.

Refer to the Feature Matrix for example support and to know the DSP architecture on the target.

Overview

The example calls a few functions from the qhblas and qhdsp libraries and sends their output to the console. The list of functions invoked in this example are listed below:

  • qhblas_hvx_vector_add_vb
  • qhblas_hvx_vh_vector_add_vb
  • qhblas_hvx_vector_add_vh
  • qhblas_hvx_vw_vector_add_vh
  • qhblas_hvx_vector_add_vw
  • qhblas_hvx_vector_add_vhf
  • qhblas_hvx_vector_add_vf
  • qhdsp_hvx_vcw_r2dfft_vub
  • qhdsp_hvx_vub_r2difft_vcw

This example uses a different build approach from the other example projects in the SDK: it uses a standalone Makefile and invokes CMake to build the required QHL libs. The standalone Makefile in this project does not have dependencies on the make.d build system.

Using the walkthrough script

The walkthrough script qhl_hvx_walkthrough.py automates the steps of signing the device, building, pushing and running the qhl_hvx example. You can run the walkthrough script with the dry-run (-DR) option to display all the commands that the script would execute without actually running them.

Review the generic setup and walkthrough_scripts instructions to learn more about setting up your device and using the walkthrough script.

Note: In order to build the QHL_HVX libraries, the Make build system invokes a CMake command: build_cmake hexagon DSP_ARCH=v68 from within the QHL_HVX library project.