Contenido principal

Conditions for Code Replacement of DSP Blocks with HVX

DSP blocks (you will require DSP Toolbox installed) that can be used with the Support Package for Qualcomm® Hexagon® processors require specific conditions to allow code replacement with the Hexagon Vector Extension (HVX). You use this code replacement when generating C/C++ code from a model. The support package do not support any multi-rate DSP blocks in the Code Replacement Library (CRL). The Hexagon Vector Extension (HVX) supports these DSP blocks only when you set specific properties, as indicated in the following table.

DSP BlockInput RequirementsParameter RequirementsEquivalent Functions in Replacement
Discrete FIR Filter
  • Real values.

  • single data type

  • Input frame length >= Filter length rounded to nearest multiple of 32

  • Filter structure: Direct Form.

  • Input processing: Columns as channels (frame based).

  • Coefficients source: Dialog parameters or Input port.

  • Filter length >=16

mw_qhdsp_hvx_fir_af
FFT (DSP System Toolbox)
  • single data type.

  • Real values.

  • Input size must be in powers of 2.

  • Real : 64,128, ….

  • Complex: 32,64,...

  • FFT Length: same as input length (If Inherit FFT length from input dimensions: off)

  • FFT implementation: Auto

  • Divide output by FFT length: Off

  • Output in bit reversed order: off

For complex FFT optimized code replacement function:

  • Number of input samples must be greater than or equal to 64.

  • Real FFT

    • mw_qhdsp_hvx_fft_gen_twiddles_real_acf

    • mw_qhdsp_hvx_r1dfft_af

  • Complex FFT

    • mw_qhdsp_hvx_fft_gen_twiddles_complex_acf

    • mw_qhdsp_hvx_c1dfft_af

    • For Hexagon SDK 6.1.0.0 and above, use mw_qhdsp_hvx_c1dfft_af_asm_opt (since R2026a)

IFFT (DSP System Toolbox)
  • single data type.

  • Complex input values.

  • Input size must be in powers of 2.

  • Real : 64, 128 ….

  • Complex: 32, 64...

  • FFT Length: same as input length (If Inherit FFT length from input dimensions: off)

  • Input in bit reversed order: off

  • Real FFT

    • mw_qhdsp_fft_gen_twiddles_real_acf

    • mw_qhdsp_hvx_r1dfft_af

  • Complex FFT

    • mw_qhdsp_hvx_fft_gen_twiddles_complex_acf

    • mw_qhdsp_hvx_c1dfft_af

Note

Use only column-major layout for QHL/HVX replacements. For more information, see Row-Major and Column-Major Array Layouts.

See Also

| | | | |

Topics