Main Content

CMSIS Conditions for DSP System Objects to Support ARM Cortex-M Processors

Each DSP System object™ that can be used with the Support Package for ARM® Cortex®-M processors requires specific conditions to allow code replacement with the CMSIS Library. You use this code replacement when generating C code from a model or from MATLAB® code. The CMSIS library supports these DSP System objects only when you set specific properties, as indicated in the following table:

Note

In the Fixed-point mode of the CMSIS DSP functions (FIR and Biquad filters), Wrap is used for intermediate MAC operations if accumulator result overflows. At the end, the accumulator is right-shifted and saturated to the output data type. For the discrete FIR and Biquad filter System objects, there is only one overflow setting for the accumulator and output. If overflow happens in accumulation, the simulation result will not match the CMSIS library result. If OverflowAction is set to 'Wrap' and only the output overflows, the simulation result will also not match the CMSIS library result. For this case, set OverflowAction to 'Saturate'.

DSP System ObjectInput RequirementsProperty RequirementsEquivalent CMSIS Functions
dsp.FIRFilter
  • Real values. Output must also be real values.

  • single data type for Lattice MA structure.

  • single or fixed-point data types for Direct Form structure.

    • For fixed-point data, the input word length:

      • For word length 8,supported fractional bits is 7

      • For word length 16,supported fractional bits is 15

      • For word length 32,supported fractional bits is 31

      , but the input and output must be the same data type.

  • Single channel (one column).

  • Structure: Direct Form or Lattice MA.

  • InitialConditions: 0.

For 'Direct Form' Structure:

  • NumeratorSource: Property or Input port.

For 'Lattice MA' Structure:

  • ReflectionCoefficientSource: Property or Input port.

For fixed-point FIR filter with Direct Form Structure:

  • FullPrecisionOverride: false.

  • RoundingMethod: 'Floor'.

  • OverflowAction: 'Wrap' or 'Saturate'.

  • Q15-specific: Number of filter coefficients must be even and greater than or equal to 4. If not, pad zeros at the end.

'Direct Form' Structure:

  • arm_fir_f32

  • arm_fir_init_f32

  • Fixed-point input with q7 format:

    • arm_fir_q7

    • arm_fir_init_q7

  • Fixed-point input with Q15 format:

    • arm_fir_q15

    • arm_fir_init_q15

  • Fixed-point input with Q31 format:

    • arm_fir_q31

    • arm_fir_init_q31

'Lattice MA' Structure:

  • arm_fir_lattice_f32

  • arm_fir_lattice_init_f32

dsp.FIRDecimator
  • Real values. Output must also be real values.

  • single data type.

  • Single channel (one column).

  • Structure: Direct Form.

  • AllowArbitraryInputLength: false.

  • arm_fir_decimate_init_f32

  • arm_fir_decimate_f32

dsp.FIRInterpolator
  • Real values. Output must also be real values.

  • single data type.

  • Single channel (one column).

None
  • arm_fir_interpolate_init_f32

  • arm_fir_interpolate_f32

dsp.LMSFilter
  • Real values. Output must also be real values.

  • single data type.

  • Single channel (one column).

  • StepSizeSource: 'Property'.

  • WeightResetInputPort: false.

  • WeightsOutputPort: false.

  • AdaptInputPort: false.

  • LeakageFactor: 1.0.

  • InitialConditions: 0.

  • Method: LMS or Normalized LMS.

  • arm_lms_init_f32

  • arm_lms_f32

    If the algorithm is Normalized LMS:

    • arm_lms_norm_f32

    • arm_lms_norm_init_f32

dsp.BiquadFilter
  • Real values. Output must also be real values.

  • single or fixed-point data type.

    • For fixed-point data, the input word length:

      • For word length 16,supported fractional bits is 15

      • For word length 32,supported fractional bits is 31

      , but the input and output must be the same data type.

  • Single channel (one column).

  • SOSMatrixSource : 'Property' or 'Input port'.

  • Structure: Direct Form I or Direct Form II transposed.

  • InitialConditions: 0.

  • ScaleValuesInputPort : False (when the SOSMatrixSource is set to 'Input Port').

For fixed-point support for Direct Form I Structure for Q15, Q31, and Q15 fast version:

  • RoundingMethod: 'Floor'.

  • OverflowAction: 'Wrap' or 'Saturate'.

  • arm_biquad_cascade_df1_init_f32

  • arm_biquad_cascade_df1_f32

  • arm_biquad_cascade_df2T_f32

  • arm_biquad_cascade_df2T_init_f32

dsp.FFT
  • Complex values.

  • single data type.

  • Single channel.

  • Input length must equal FFT length.

  • FFTImplementation: Radix-2.

  • Normalize : False.

  • FFTLength: 16, 64, 256, 1024.

  • FFTLengthSource : 'Property'.

  • WrapInput : True or False. Value does not matter because input length must equal FFT length.

  • arm_cfft_radix2_init_f32

  • arm_cfft_radix2_f32

dsp.IFFT
  • Complex values.

  • single data type.

  • Single channel.

  • Input length must equal FFT length.

  • FFTImplementation: Radix-2.

  • Normalize : True.

  • FFTLengthSource : 'Property'.

  • FFTLength: 16, 64, 256, 1024.

  • ConjugateSymmetricInput : False.

  • WrapInput : True or False. Value does not matter because input length must equal FFT length.

  • arm_cfft_radix2_init_f32

  • arm_cfft_radix2_f32

dsp.VariableBandwidthFIRFilter
  • Real values. Output must also be real values.

  • Single channel (one column).

  • single data type.

None.
  • arm_fir_f32

  • arm_fir_init_f32

dsp.FIRHalfbandInterpolator
  • Real values. Output must also be real values.

  • Single channel (one column).

  • single data type.

None.
  • arm_fir_f32

  • arm_fir_init_f32

dsp.FIRHalfbandDecimator
  • Real values. Output must also be real values.

  • Single channel (one column).

  • single data type.

None.
  • arm_fir_f32

  • arm_fir_init_f32

dsp.CICCompensationDecimator
  • Real values. Output must also be real values.

  • Single channel (one column).

  • single data type.

None.
  • arm_fir_decimate_init_f32

  • arm_fir_decimate_f32

dsp.CICCompensationInterpolator
  • Real values. Output must also be real values.

  • Single channel (one column).

  • single data type.

None.
  • arm_fir_interpolate_init_f32

  • arm_fir_interpolate_f32

dsp.DigitalDownConverter
  • Real values. Output must also be real values.

  • Single channel (one column).

  • single data type.

  • Oscillator: 'None'.

  • arm_fir_decimate_init_f32

  • arm_fir_decimate_f32

dsp.DigitalUpConverter
  • Real values. Output must also be real values.

  • Single channel (one column).

  • single data type.

None.

  • arm_fir_interpolate_init_f32

  • arm_fir_interpolate_f32

dsp.SampleRateConverter
  • Real values. Output must also be real values.

  • Single channel (one column).

  • single data type.

None.

For reducing sample rate:

  • arm_fir_decimate_init_f32

  • arm_fir_decimate_f32

For increasing sample rate:

  • arm_fir_interpolate_init_f32

  • arm_fir_interpolate_f32

dsp.SOSFilter
  • Real values. Output must also be real values.

  • Single channel (one column).

  • single data type.

  • Structure: Direct Form I or Direct Form II transposed.

  • CoefficientSource: Property or Input port.

  • HasScaleValues: false after setting CoefficientSource: Input port

Direct Form I Structure:

  • arm_biquad_cascade_df1_init_f32

  • arm_biquad_cascade_df1_f32

Direct Form II transposed structure:

  • arm_biquad_cascade_df2T_init_f32

  • arm_biquad_cascade_df2T_f32