Visible to Intel only — GUID: hco1423076586864
Ixiasoft
Visible to Intel only — GUID: hco1423076586864
Ixiasoft
7.4.13. Interpolating FIR Filter with Multiple Coefficient Banks
Multiple sets of coefficients requires storage in memory so that the design can switch easily from one set, or bank, of coefficients in use to another in a single clock cycle.
The design must perform the following actions:
- Specify the number of coefficient banks
- Initialize the banks
- Update the coefficients in a particular bank
- Select the bank in use in the filter
You specify the coefficient array as a matrix rather than a vector—(bank rows) by (number of coefficient columns).
The addressing scheme has address offsets of base address + (bank number * number of coefficients for each bank).
If the number of rows is greater than one, DSP Builder creates a bank select input port on the FIR filter. In a design, you can drive this input from either data or bus interface blocks, allowing either direct or bus control. The data type is unsigned integer of width ceil(log2(number of banks)).
The bank select is a single signal. For example, for a FIR filter with four input channels over two timeslots:
<0><1>
<2><3>
The corresponding input channel signal is:
<0><1>
Here the design receives more than one channel at a time, but can only choose a single bank of coefficients. Channels 0 and 2 use one set of coefficients and channels 1 and 3 another. Channel 0 cannot use a different set of coefficients to channel 2 in the same filter.
For multiple coefficient banks, you enter an array of coefficients sets, rather than a single coefficient set. For example, for a MATLAB array of 1 row and 8 columns [1 x 8], enter:
fi(fir1(7, 0.5 ),1,16,15)
For a MATLAB array of 2 rows and 8 columns [2 x 8] enter:
[fi(fir1(7, 0.5 ),1,16,15);fi(fir1(7, 0.5 ),1,16,15)]
Therefore, you can determine the number of banks by the number of rows without needing the number of banks. If the number of banks is greater than 1, add an additional bank select input on the block.
The model file is demo_firi_multibank.mdl.