Main Content

hdlfilterserialinfo

Serial partition information for filter architectures

Description

example

hdlfilterserialinfo(filtSO,'InputDataType',nt) displays an exhaustive table of serial partition values with corresponding folding factors and numbers of multipliers for the specified filter System object™ and the input data type, specified by nt. This information helps you to define optimal serial architecture for the filter in the generated HDL code.

example

hdlfilterserialinfo(filtSO,'InputDataType',nt,'FoldingFactor',ff) displays only those serial partition values that correspond to the specified folding factor.

example

hdlfilterserialinfo(filtSO,'InputDataType',nt,'Multipliers',mult) displays only those serial partition values that correspond to the specified number of multipliers.

hdlfilterserialinfo(filtSO,'InputDataType',nt,'SerialPartition',[p1 ... pN]) displays the folding factor and number of multipliers corresponding to the serial partition vector.

hdlfilterserialinfo(filtObj) displays serial partition information for the specified dfilt filter object.

hdlfilterserialinfo(filtObj,'FoldingFactor',ff) displays only those serial partition values that correspond to the specified folding factor.

hdlfilterserialinfo(filtObj,'Multipliers',mult) displays only those serial partition values that correspond to the specified number of multipliers.

hdlfilterserialinfo(filtObj,'SerialPartition',[p1 ... pN]) displays the folding factor and number of multipliers corresponding to the serial partition vector.

example

[sp,fold,nm] = hdlfilterserialinfo(___) captures serial partition values with their corresponding folding factors and numbers of multipliers, for any of the input argument combinations in previous syntaxes.

Examples

collapse all

To display valid serial partitions, pass the filter, with no other arguments, to hdlfilterserialinfo.

filt = design(fdesign.lowpass('N,Fc',8,.4),'SystemObject',true);
hdlfilterserialinfo(filt,'InputDataType',numerictype(1,12,10))
   | Total Coefficients | Zeros | Effective |
   ------------------------------------------
   |          9         |   0   |     9     |

Effective filter length for SerialPartition value is 9.

  Table of 'SerialPartition' values with corresponding values of 
  folding factor and number of multipliers for the given filter.

   | Folding Factor | Multipliers |   SerialPartition   |
   ------------------------------------------------------
   |        1       |      9      |[1 1 1 1 1 1 1 1 1]  |
   |        2       |      5      |[2 2 2 2 1]          |
   |        3       |      3      |[3 3 3]              |
   |        4       |      3      |[4 4 1]              |
   |        5       |      2      |[5 4]                |
   |        6       |      2      |[6 3]                |
   |        7       |      2      |[7 2]                |
   |        8       |      2      |[8 1]                |
   |        9       |      1      |[9]                  |

Design a filter and pass it to hdlfilterserialinfo. Request serial partition parameters for a design that uses three multipliers.

filt = design(fdesign.lowpass('N,Fc',8,.4),'SystemObject',true);
hdlfilterserialinfo(filt,'InputDataType',numerictype(1,12,10),'Multipliers',3)
Serial Partition: [3 3 3], Folding Factor:    3, Multipliers:    3

Design a filter and pass it to hdlfilterserialinfo. Request serial partition parameters for a design that uses a folding factor of four.

filt = design(fdesign.lowpass('N,Fc',8,.4),'SystemObject',true);
hdlfilterserialinfo(filt,'InputDataType',numerictype(1,12,10),'FoldingFactor',4)
Serial Partition: [4 4 1], Folding Factor:    4, Multipliers:    3

Pass the filter and data type, with no additional arguments, to hdlfilterserialinfo. You can return the results to a cell array.

filt = design(fdesign.lowpass('N,Fc',8,.4),'SystemObject',true);
[sp,ff,nm] = hdlfilterserialinfo(filt,'InputDataType',numerictype(1,12,10))
sp = 9x1 cell
    {'[1 1 1 1 1 1 1 1 1]'}
    {'[2 2 2 2 1]'        }
    {'[3 3 3]'            }
    {'[4 4 1]'            }
    {'[5 4]'              }
    {'[6 3]'              }
    {'[7 2]'              }
    {'[8 1]'              }
    {'[9]'                }

ff = 9x1 cell
    {'1'}
    {'2'}
    {'3'}
    {'4'}
    {'5'}
    {'6'}
    {'7'}
    {'8'}
    {'9'}

nm = 5x1 cell
    {'1'}
    {'2'}
    {'3'}
    {'5'}
    {'9'}

You can also use this syntax while specifying a number of multipliers or folding factor.

[sp_ff4,ff4,nm_ff4] = hdlfilterserialinfo(filt,'InputDataType',numerictype(1,12,10), ...
    'FoldingFactor',4)
sp_ff4 = 1×3

     4     4     1

ff4 = 4
nm_ff4 = 3

Input Arguments

collapse all

Filter for which to display serial partition information, specified as a filter System object. To create a filter System object, use the design function or see the reference page of the object. The following System objects from DSP System Toolbox™ support serial architectures:

For more information, see Speed vs. Area Tradeoffs.

Input data type, specified as a numerictype object. This argument applies only when the input filter is a System object. Call numerictype(s,w,f), where s is 1 for signed and 0 for unsigned, w is the word length in bits, and f is the number of fractional bits.

Filter for which to display serial partition information, specified as a dfilt object. See Speed vs. Area Tradeoffs for filter types that support serial architectures. You can create this object using the design function.

Hardware folding factor, specified as an integer greater than 1 or Inf. Given the folding factor, the coder computes the serial partition and the number of multipliers. If the folding factor is Inf, the coder uses the maximum folding factor.

Desired number of multipliers, specified as an integer greater than 1 or Inf. Given the number of multipliers, the coder computes the serial partition and the folding factor. If the number of multipliers is inf, the coder uses the maximum number of multipliers.

Serial partitions, specified as a vector of N integers, where N is the number of serial partitions. Each element of the vector specifies the length of the corresponding partition.

Output Arguments

collapse all

Available serial partitioning options, returned as a cell array of vectors.

Available folding factor values, returned as a cell array.

Available multiplier values, returned as a cell array.

Version History

Introduced in R2010b