| Contents | Index |
hdlfilterserialinfo (Hd)
hdlfilterserialinfo (Hd,'FoldingFactor, ff)
hdlfilterserialinfo (Hd,'Multipliers, nmults)
hdlfilterserialinfo (Hd,'SerialPartition',
[p1 p2...pN])
[sp,fold,nm]
= hdlfilterserialinfo(Hd)
[sp,fold,nm]
= hdlfilterserialinfo(Hd,'FoldingFactor,
ff)
[sp,fold,nm]
= hdlfilterserialinfo(Hd,'Multipliers, nmults)
[sp,fold,nm]
= hdlfilterserialinfo(Hd,'SerialPartition',[p1 p2...pN])
hdlfilterserialinfo is an informational function that helps you define an optimal serial partition for a filter. hdlfilterserialinfo provides answers to design questions such as:
What is the folding factor and associated number of multipliers that results from a particular choice of serial partition?
What are all valid serial partitions for a given filter?
When you specify a serial architecture for a filter, you can define the serial partitioning in any the following ways:
Directly specify a vector of integers having N elements, where N is the number of serial partitions. Each element of the vector specifies the length of the corresponding partition.
Specify the desired hardware folding factor, ff, an integer greater than 1. Given the folding factor, the coder computes the serial partition and the number of multipliers.
Specify the desired number of multipliers, nmults, an integer greater than 1. Given the number of multipliers, the coder computes the serial partition and the folding factor.
By default, hdlfilterserialinfo displays a table of serial partition vector optionss for a filter object, Hd, with corresponding values of folding factor and number of multipliers.
Optionally, you can pass in a parameter/value pair specifying a serial partition vector, a folding factor, or number of multipliers. In this case, hdlfilterserialinfo displays the corresponding values for the other parameters.
You can also optionally specify that hdlfilterserialinfo returns serial partition values and corresponding values of folding factor and number of multipliers to a cell array.
hdlfilterserialinfo (Hd): For the filter object, Hd, displays a table of serial partition values with corresponding values of folding factor and number of multipliers.
hdlfilterserialinfo (Hd,'FoldingFactor, ff): For the filter object, Hd, displays the serial partition values and number of multipliers corresponding the folding factor, ff.
hdlfilterserialinfo (Hd,'Multipliers, nmults): for the filter object, Hd, displays the serial partition values and folding factor corresponding to the number of multipliers, nmults.
hdlfilterserialinfo (Hd,'SerialPartition', [p1 p2...pN]): For the filter object, Hd, displays the folding factor and number of multipliers corresponding to the serial partition vector [p1p2...pN].
[sp,fold,nm] = hdlfilterserialinfo(Hd): For the filter object, Hd, returns a table of serial partition values with corresponding values of folding factor and number of multipliers to a cell array.
[sp,fold,nm] = hdlfilterserialinfo(Hd,'FoldingFactor, ff): For the filter object, Hd, returns the serial partition values and number of multipliers corresponding to the folding factor, ff, to a cell array.
[sp,fold,nm] = hdlfilterserialinfo(Hd,'Multipliers, nmults): For the filter object, Hd, displays the serial partition values and folding factor corresponding to the number of multipliers, nmults, to a cell array.
[sp,fold,nm] = hdlfilterserialinfo(Hd,'SerialPartition',[p1 p2...pN]): For the filter object, Hd, returns the folding factor and number of multipliers corresponding to the serial partition vector [p1p2...pN] to a cell array.
Hd |
A filter object. See Speed vs. Area Optimizations for HDL Filter Realizations for a summary of filter types that support serial architectures. |
The following parameter name/value inputs are optional. These parameters do not have a default value; you must supply a valid value.
[sp,fold,nm] |
Cell array. hdlfilterserialinfo returns, in order, the serial partition, sp, folding factor, fold, and number of multipliers, nm. |
Each of the following examples constructs a direct-form FIR filter object, passes it to hdlfilterserialinfo, and shows the results as displayed at the MATLAB command line.
Pass only the filter object to hdlfilterserialinfo to display all valid serial partitions:
Hd = design(fdesign.lowpass('N,Fc',8,.4));
Hd.Arithmetic = 'fixed';
hdlfilterserialinfo(Hd)
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] |Pass the filter object to hdlfilterserialinfo, specifying the desired number of multipliers as 3:
Hd = design(fdesign.lowpass('N,Fc',8,.4));
Hd.Arithmetic = 'fixed';
hdlfilterserialinfo(Hd, 'Multipliers', 3)
SerialPartition: [3 3 3], Folding Factor: 3, Multipliers: 3Pass the filter object to hdlfilterserialinfo, specifying the desired folding factor as 4:
Hd = design(fdesign.lowpass('N,Fc',8,.4));
Hd.Arithmetic = 'fixed';
hdlfilterserialinfo(Hd, 'FoldingFactor', 4)
SerialPartition: [4 4 1], Folding Factor: 4, Multipliers: 3
Pass only the filter object to hdlfilterserialinfo, returning the results to a cell array:
Hd = design(fdesign.lowpass('N,Fc',8,.4));
Hd.Arithmetic = 'fixed';
[sp,ff,nm] = hdlfilterserialinfo(Hd)
sp =
'[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 =
'1'
'2'
'3'
'4'
'5'
'6'
'7'
'8'
'9'
nm =
'1'
'2'
'3'
'5'
'9'Pass the filter object to hdlfilterserialinfo, specifying the desired folding factor as 4, returning the results to a cell array:
Hd = design(fdesign.lowpass('N,Fc',8,.4));
Hd.Arithmetic = 'fixed';
[sp,ff,nm] = hdlfilterserialinfo(Hd, 'FoldingFactor', 4)
sp =
4 4 1
ff =
4
nm =
3

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |