Main Content

Conditions for Code Replacement of DSP Blocks with QHL

Each DSP blocks (DSP System Toolbox™) that can be used with the Support Package for Qualcomm Hexagon processors requires specific conditions to allow code replacement with the Qualcomm Hexagon Library (QHL). You use this code replacement when generating C code from a model. The Qualcomm Hexagon Library (QHL) supports these DSP blocks only when you set specific properties, as indicated in the following table:

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

  • single data type

  • Input size must be even

  • Filter structure: Direct Form.

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

  • Coefficients source: Dialog parameters or Input port.

  • Any frame-length if filter-length > 24.

    or

    8 <= frame-length <=64 if 16<=filter length <=24

mw_qhdsp_fir_af
2FIR Decimation (DSP System Toolbox)
  • Real values.

  • single data type

  • Input size must be even

  • Filter structure: Direct Form.

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

  • Coefficients source: Dialog parameters or Auto.

  • Rate options: Enforce single-rate processing.

  • Allow arbitrary frame length for fixed-size input signals: off

  • Decimation Factor: 2,3,4

  • Decimation Factor: 2 or 3 AND Frame Length > 10 AND Filter Length >10.

    (or)

    Decimation Factor: 4 AND Filter Length < 40

mw_qhdsp_decim_af

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

  • Input size must be in powers of 2.

  • Real : 16,32, ….

  • Complex: 8,16,...

  • 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

  • Real FFT

    • mw_qhdsp_fft_gen_twiddles_real_acf

    • mw_qhdsp_acf_r1dfft_af

  • Complex FFT

    • mw_qhdsp_fft_gen_twiddles_complex_acf

    • mw_qhdsp_c1dfft_acf

4IFFT (DSP System Toolbox)
  • single data type.

  • Complex input values.

  • Input size must be in powers of 2.

  • Real : 32, 64 ….

  • Complex: 16, 32...

  • 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_af_r1difft_acf

  • Complex FFT

    • mw_qhdsp_fft_gen_twiddles_complex_acf

    • mw_qhdsp_c1idfft_acf

5Biquad Filter (DSP System Toolbox)
  • single data type.

  • Real values.

  • Filter structure: Direct-form II Transposed

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

  • Coefficient sources: Dialog Parameters, Input port

  • All other parameters are supported.(scales, initial conditions etc)

  • Number of sections: 2 or 3 AND "FrameLength >= 50

    or

    Number of sections>= 4 AND FrameLength >= 9

mw_qhdsp_iir_af

6Second-Order Section Filter (DSP System Toolbox)
  • single data type.

  • Real values.

  • Filter structure: Direct-form II Transposed

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

  • Coefficient sources: Dialog Parameters, Input port

  • All other parameters are supported.(scales, initial conditions etc)

  • Number of sections: 2 or 3 AND FrameLength >= 50

    or

    Number of sections>= 4 AND FrameLength >= 9

mw_qhdsp_iir_af

Note

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

See Also

| | | | |

Related Topics