The AI Engine simulator supports both a CSV and TXT file format as inputs and outputs to the simulator.
Starting in 2023.2, there is a new CSV-based file format introduced for simulation input. CSV can be used instead of text-based file format for PLIO based simulation. To generate the CSV based file format from an existing TXT file, AMD provides a utility script. You can run the below command passing the input TXT file:
$XILINX_VITIS/data/emulation/scripts/aiesim_convert_plio_txt2csv.py -txt <input.txt> --datawidth <n> --buswidth <n> --complex (optional)
-
-txtis used to specify the input txt file -
--datawidthto specify AIE kernel data type width 32, 64, etc. -
--buswidthis the PLIO width 32, 64, 128, etc. -
--complexto specify that the AI Engine data type is complex.
For more details on the options available in the script, use the --help option.
The generated CSV file format has columns and rows as shown below.
Where,
-
DATA:<n>is the command to represent the data values. The argumentnis the value to indicate the number of times data should be repeated. The default value ofnis 1.- The number of
Dcolumns is PLIO width / Data width of the AIE kernel.
- The number of
-
TLASTandTKEEPare optional columns to indicate the values to be driven with the data beat. Default value ofTKEEPis -1 andTLASTis 0. -
STALL:<n>represents empty cycle(s). The argumentnindicates the number of empty cycles from the PL domain. Default value ofnis 1. -
COMMENTis used to add notes for better readability of the input file.
The following section describes the CSV and TXT formats.