The goal of this tutorial is to implement the Decimation Filter Chain depicted in the following figure:
Open MATLAB by typing
model_composer. The path to the various blocksets of Model Composer are automatically added.
In order to initialize the tutorial environment, type
setupLabin the MATLAB command window.
This function includes the directory
LabUtils in the search path, and runs the filter coefficients initialization. The output in the MATLAB command window is:
>> setupLab HB1 Center Tap: 16384 Phase 1 Norm: 16384 Max Phase 1: 9647 HB2 Center Tap: 16384 Phase 1 Norm: 16384 Max Phase 1: 9935 HB3 Center Tap: 16384 Phase 1 Norm: 16384 Max Phase 1: 10373 CF Channel Filter Norm: 32768 Max Coef: 28004 >>
In the workspace sub-window, you can see that a number of variables that are defined:
cfi: Coefficients of the filters which are used in the Simulink model.
cfi_aie: Coefficients vectors which are used in the AI Engine design:
For half-band filters, this vector contains only the lefthand side non-null taps including the centre tap.
For symmetric filters, this vector contains only the lefthand side taps, including the center tap if the filter length is odd.
Shift1, Shift2, Shift3, ShiftCF: The number of bits bits by which the result has to be shifted before the result is sent to the ouput port.
There are 4 additional files:
These are there to help you if you cannot complete any of the four stages.