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'.

  • The DSP System object implementation causes an error when there is an overflow in the SRAM buffer on the PIL or hardware.

DSP System objectSupported data typesInput requirementsProperty requirementsWrapper calling CMSIS functions
dsp.FIRFilter
  • single

  • fixdt(true,32,31)

  • fixdt(true,16,15)

  • fixdt(true,8,7)

  • Real inputs.

  • Real outputs

  • Input and output must be of the same data type.

  • Single/Multi channel.

  • Structure: Direct Form

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

  • mw_arm_fir_f32

  • mw_arm_fir_init_f32

  • Fixed-point input with q7 format:

    • mw_arm_fir_q7

    • mw_arm_fir_init_q7

  • Fixed-point input with Q15 format:

    • mw_arm_fir_q15

    • mw_arm_fir_init_q15

  • Fixed-point input with Q31 format:

    • mw_arm_fir_q31

    • mw_arm_fir_init_q31

dsp.FIRDecimator
  • single

  • Real inputs.

  • Real outputs

  • Single/Multi channel.

  • Structure: Direct Form.

  • AllowArbitraryInputLength: false.

  • mw_arm_fir_decimate_init_f32

  • mw_arm_fir_decimate_f32

dsp.FIRInterpolator
  • single

  • Real inputs.

  • Real outputs

  • Single/Multi channel.

None
  • mw_arm_fir_interpolate_init_f32

  • mw_arm_fir_interpolate_f32

dsp.LMSFilter
  • single

  • Real inputs.

  • Real outputs

  • Single/Multi channel.

  • 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.FFT
  • single

  • Single/Multi channel.

  • Input length must be equal to 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.

  • mw_arm_cfft_init_f32

  • mw_arm_cfft_f32

dsp.IFFT
  • single

  • Single/Multi channel.

  • Input length must be equal to 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.

  • mw_arm_cfft_init_f32

  • mw_arm_cfft_f32

dsp.VariableBandwidthFIRFilter
  • single

  • Real inputs.

  • Real outputs

  • Single/Multi channel.

None.
  • mw_arm_fir_f32

  • mw_arm_fir_init_f32

dsp.FIRHalfbandInterpolator
  • single

  • Real inputs.

  • Real outputs

  • Single/Multi channel.

None.
  • mw_arm_fir_f32

  • mw_arm_fir_init_f32

dsp.FIRHalfbandDecimator
  • single

  • Real inputs.

  • Real outputs

  • Single/Multi channel.

None.
  • mw_arm_fir_f32

  • mw_arm_fir_init_f32

dsp.CICCompensationDecimator
  • single

  • Real inputs.

  • Real outputs

  • Single/Multi channel.

None.
  • mw_arm_fir_decimate_init_f32

  • mw_arm_fir_decimate_f32

dsp.CICCompensationInterpolator
  • single

  • Real inputs.

  • Real outputs

  • Single/Multi channel.

None.
  • mw_arm_fir_interpolate_init_f32

  • mw_arm_fir_interpolate_f32

dsp.DigitalDownConverter
  • single

  • Real inputs.

  • Real outputs

  • Single/Multi channel.

  • Oscillator: 'None'.

  • mw_arm_fir_decimate_init_f32

  • mw_arm_fir_decimate_f32

dsp.DigitalUpConverter
  • single

  • Real inputs.

  • Real outputs

  • Single/Multi channel.

None.

  • mw_arm_fir_interpolate_init_f32

  • mw_arm_fir_interpolate_f32

dsp.SampleRateConverter
  • single

  • Real inputs.

  • Real outputs

  • Single/Multi channel.

None.

For reducing sample rate:

  • mw_arm_fir_decimate_init_f32

  • mw_arm_fir_decimate_f32

For increasing sample rate:

  • mw_arm_fir_interpolate_init_f32

  • mw_arm_fir_interpolate_f32

dsp.SOSFilter
  • single

  • Real inputs.

  • Real outputs

  • Single/Multi channel.

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

  • mw_arm_biquad_cascade_df1_init_f32

  • mw_arm_biquad_cascade_df1_f32

Direct Form II transposed structure:

  • mw_arm_biquad_cascade_df2T_init_f32

  • mw_arm_biquad_cascade_df2T_f32