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)
-
-txt
is used to specify the input txt file -
--datawidth
to specify AIE kernel data type width 32, 64, etc. -
--buswidth
is the PLIO width 32, 64, 128, etc. -
--complex
to 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 argumentn
is the value to indicate the number of times data should be repeated. The default value ofn
is 1.- The number of
D
columns is PLIO width / Data width of the AIE kernel.
- The number of
-
TLAST
andTKEEP
are optional columns to indicate the values to be driven with the data beat. Default value ofTKEEP
is -1 andTLAST
is 0. -
STALL:<n>
represents empty cycle(s). The argumentn
indicates the number of empty cycles from the PL domain. Default value ofn
is 1. -
COMMENT
is used to add notes for better readability of the input file.
The following section describes the CSV and TXT formats.