The goal of this tutorial is to implement the Decimation Filter Chain depicted in the following figure:
↓2
↓2
↓2
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
setupLab
in 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:
hb1
,hb2
,hb3
,cfi
: Coefficients of the filters which are used in the Simulink model.hb1_aie
,hb2_aie
,hb3_aie
,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:
VMC_DSPLib_Solution_Stage1.slx
VMC_DSPLib_Solution_Stage2.slx
VMC_DSPLib_Solution_Stage3.slx
VMC_DSPLib_Solution_Stage4.slx
These are there to help you if you cannot complete any of the four stages.