Documentation Center

  • Trial Software
  • Product Updates

specifyall

Fixed-point scaling modes in direct-form FIR filter

Syntax

specifyall(hd)
specifyall(hd,false)
specifyall(hd,true)
specifyall(hs)
specifyall(hs,false)

Description

specifyall sets all of the autoscale property values of direct-form FIR filters to false and all *modes of the filters to SpecifyPrecision. In this table, you see the results of using specifyall with direct-form FIR filters.

Property Name

Default

Setting After Applying specifyall

CoeffAutoScale

true

false

OutputMode

AvoidOverflow

SpecifyPrecision

ProductMode

FullPrecision

SpecifyPrecision

AccumMode

KeepMSB

SpecifyPrecision

RoundMode

convergent

convergent

OverflowMode

wrap

wrap

specifyall(hd) gives you maximum control over all settings in a filter hd by setting all of the autoscale options that are true to false, turning off all autoscaling and resetting all modes — OutputMode, ProductMode, and AccumMode — to SpecifyPrecision. After you use specifyall, you must supply the property values for the mode- and scaling related properties.

specifyall provides an alternative to changing all these properties individually. Using specifyall changes all of the settings. To set some but not all of the modes, set each property as you require.

specifyall(hd,false) performs the opposite operation of specifyall(hd) by setting all of the autoscale options to true; all of the modes to their default values; and hiding the fraction length properties in the display, meaning you cannot access them to set them or view them.

specifyall(hd,true) is equivalent to specifyall(hd).

specifyall(hs) sets all the data type fixed-point properties of the filter System object™ hs to 'Custom' so that you can easily specify all the fixed-point settings. If the object has a FullPrecisionOverride property, its value is set to false. specifyall is intended as a shortcut to changing all the fixed-point properties one by one.

specifyall(hs,false) sets all fixed-point properties of the filter System object hs to their default values and sets the filter to full-precision mode, if possible.

Examples

This example demonstrates using specifyall to provide access to all of the fixed-point settings of an FIR filter implemented with the direct-form structure. Using specifyall disables all of the automatic filter scaling and reset the mode values.

b = fircband(12,[0 0.4 0.5 1],[1 1 0 0],[1 0.2],{'w' 'c'});
hd = dfilt.dffir(b);
hd.arithmetic = 'fixed'
specifyall(hd)

The mode properties InputMode, ProductMode, and AccumMode have the value SpecifyPrecision and the fraction length properties appear in the display. Now you use the properties (InputFracLength, ProdFracLength, AccumFracLength) to set the precision the filter applies to the input, product, and accumulator operations. CoeffAutoScale switches to false, which means that the filter coefficients will not be scaled automatically to prevent overflows. None of the other filter properties change when you apply specifyall.

See Also

|

Was this topic helpful?