The main difference we can see is that the target option is set to hw. (when the build target was Emulation-SW it was set to x86).
Generated Outputs from the AIE compiler
Once the build complete, we can see in the Explorer window that a new directory named Emulation-AIE was created.
This contains all of the output from the build. We will have a look into it.
By default the AI Engine compiler writes all outputs to a directory called Work/ and a file libadf.a.
The file libadf.a is the actual output which will be used by the rest of the Vitis™ flow to integrate the AI Engine application to the rest of the system.
The Work/ directory contains multiple sub-directories and files:
aie/ : contains the output of the compilation of each individual AI Engine
arch/ : contains files describing the physical mapping of the application on the AI Engine array
config/ : contains files that specify options to the System C simulator
noc/ : contains file related to the NoC
ps/c_rts/ : Contains C-based run-time control for modeling PS interaction
ps/cdo/ : Contains generator code for graph configuration and initialization in configuration data object (CDO) format. This is used during System C-RTL simulation and during actual hardware execution.
reports/ : Contains various report files
project.aiecompiler_summary : this is a file which can be open in the Vitis Analyzer to see the compilation summary and report. We will look at this file more in detail in the next article.
Running AIE Simulator
We can now run the AIE simulator.
Select the AI Engine Application (simple_application) and click on the arrow next to the Run As icon and click Run As > Launch AIE Emulator
The simulation output is written in the file Emulation-AIE/aiesimulator_output/data/output.txt.
We can have a look into this file:
Note that there is a time before each line of values. This is because compared to the x86 simulation, the AIE simulation is cycle approximate.
We can see that the first output samples arrived after 683ns. In the VCK190 base platform, the frequency of the AI Engine is set to 1GHz. This means that 683 compute cycles were needed to output the first output sample.
In a later article we will cover the various reasons for this latency, however keep in mind (as mentioned in the AI Engine 3 article) that the code is not optimized to run on the vector processor and so is not taking advantage of its compute power.
If you look at line 64 in the output.txt, you should see a TLAST word. This marks the end of the execution of 1 iteration of the graph after 714ns.
The first sample of the second iteration is then outputted after a simulation time of 1197ns.
We can now verify that the data outputted is still matching with the golden results.
Select the golden.txt file and the newly created output.txt and right click on one of them. Now select Compare With > Each Other after transformation.
In the pop-up window, click on the list icon (predefined filters). In the second output window, enable Remove timestamp and click OK. Click OK on the first pop-up window.
This will remove the timestamps from the output file from the simulator in order to compare only the output sample values.
There should be no differences between the 2 files which means that the AIE compilation results are still functionally matching the golden reference.
In the next article we will have a look at the Vitis Analyzer report file generated after the AI Engine compilation.