Stage 2: Further Analysis of the Design - 2022.2 English

Vitis Tutorials: AI Engine Development

Document ID
Release Date
2022.2 English

When creating a DSP design, one of the most important parameters to consider is the spectrum. In Simulink the spectrum can be easily displayed using a spectrum scope.

  1. Right-click the canvas and type spectrum.

  2. Connect the spectrum scope at the output of the last filter (the Channel Filter):

  3. Set the Stop Time of the simulation to inf.

missing image

Run the simulation. The spectrum scope should display similar to the following:

missing image

Now add a block coming from a standard templated C++ kernel which source is in the directory aiecode_src. This function will be a frequency shift operation that will be placed after the downsampling chain.

  1. Select the block AIE Kernel from the User-defined Functions section of the AI Engine Library and place it in the canvas:

missing image

  1. Double-click the block, a GUI will display. Populate it with the following data:

  • Kernel header file: aiecode_src / FreqShift.h

  • Kernel function: FreqShift

  • Kernel source file: aiecode_src / FreqShift.cpp

missing image

  1. Click Import. A new GUI displays. FRAME_LENGTH is the template parameter. Its value is 256 because at this stage this is the size of the data frames. The input and output ports have also the same size: 256 samples. Click OK.

missing image

  1. Place this new block between the ‘AIE FIR Channel’ and ‘To Fixed Size’ blocks. Grab the ‘FreqShift’ block from the Reference Chain Simulink design and place it after the ChannelFilter Simulink block. Your design should now look as follows: