taps_aie(taps.rbegin(),taps.rend());
```
The first line is the taps vector definition in the correct order for a DSP expert, and the second line defines the vector that will be used in the AI Engine implementation as the same vector but in the reverse order.
## "Utils" Directory
For this tutorial a number of utilities have been created that you are free to reuse for your own purposes.
First, to allow these utilities to be called from anywhere during this tutorial you need to add this directory in your **_PATH_** but also indicate to `python` that this directory contains some libraries and should be checked during imports.
Navigate to the `Utils` directory, and type `source InitPythonPath` to have this directory in your path for Python libraries and executable search path.
### GenerateStreams
This utility will use a library **_GenerationLib.py_** to generate input data suitable for the cases you want to test. It is called by typing: `GenerateStreamsGUI`. This displays a GUI in which you can select the appropriate parameters to generate the correct input data files:
![missing image](./Images/GenerateStreams.jpg)
You have access to a number of parameters:
- _Data Type_: by default `cint16`as this is what you will use throughout this tutorial
- _PLIO Width_: by default `64` as this is the width which is used in this tutorial
- _Number of Phases_: for Super Sampling Rate Filters
- _Number of Streams_: for the SSR filters using the 2 streams of the AI Engines
- _Number of Samples per Stream per Phase_: Each stream contains a number of samples defined there
- _Number of Frames_: simulations are launched for a limited number of Frames
- _Base of the Filename_: `PhaseIn` by default which generates the following names:
- Single Stream, Single Phase: `PhaseIn_0.txt`
- Single Stream, Polyphase: `PhaseIn_0.txt`, `PhaseIn_1.txt`, ...
- Dual streams, Polyphase: `PhaseIn_0_0.txt`, `PhaseIn_0_0.txt`, `PhaseIn_1_0.txt, `PhaseIn_1_0.txt``, ...
Another possibility is to type `GenerateStreams` with the same parameters. If you type `GenerateStreams` without parameters, a usage text will be displayed:
```BASH
>>GenerateStreams
Stream Content Generation
================================================================================================
Usage:
GenerateStreams DataType PLIO_Width NPhases NStreams NSamples NFrames SequenceType Basename
Datatype: cint16, int16, int32
PLIO_Width: 32, 64 or 128
NPhases: any integer >= 1
NStreams: 1 or 2
NSamples: integer, multiple of 8
NFrames: Any integer >= 1
SequenceType: Dirac, Linear, SinCos, Random
Basename: file name that will prepend phase and stream index
================================================================================================
```
## ProcessAIEOutput
This utility takes all generated outputs and displays the reconstructed signal. For Single Stream/Single Phase it will display a signal using the timestamps written in the file.
If your output signals are stored in files named `output_0.txt` ... then navigate to the output directory and type `ProcessAIEOutput output_*` to process the output of the AI Engines.
Two other files are generated:
- `Atot.txt` which is the output phase by phase
- `out.txt` which is the textfile of the reconstructed signal
### StreamThroughput
This utility computes the throughput concerning all AI Engine output files given in an argument.
### GetDeclare.sh
This utility has been created to view the template arguments that were used for kernel declaration in the Double Stream SSR case. It can be easily modified to be adapted to different cases.
Copyright© 2020–2022 Xilinx
XD020