The AI Engine reset and reload flow enables you to run the application on hardware multiple times without rebooting the board and the Linux operating system. This flow supports resetting and reloading the AI Engine array and all PL logic within the platform dynamic region block design under control of the RST_PL RESET0 register. The RST_PL register is described in the Versal Adaptive SoC Register Reference (AM012). This reset and reload flow does as follows:
- Resets the AI Engine array that is configured with an AI Engine graph application, such as, kernels programmed in specific tiles, DMAs, and FIFOs between tiles and memories.
- Resets the AI Engine array on a non-DFx platform.
- Resets the AI Engine array without rebooting the board.
- Reloads the AI Engine array with the same graph or a different graph without rebooting the board.
The flow is supported on Linux XRT.
Consecutive resets and reloads of the application must use the same AI Engine-PL interfaces. You can reload the AI Engine array with the same graphs, or using different graphs.
Use this flow to:
- Avoid resetting the system and rebooting the board to run the AI Engine application multiple times.
- Avoid long reboot times, in case the system runs into abnormal situation running on the board, and the application must be rerun again.
- Avoid resetting the system and rebooting the board to run a modified AI Engine kernel(s).
The reset and reload flow requires that you compile the AI Engine graphs and PL kernels into separate XCLBIN files. The host application will need to use these XCLBIN files. You will then use the xbutil utility to reset the PL and AI Engine Kernels between consecutive application runs.
Event trace and profile of AI Engine design in hardware is not supported when the design is reset and reloaded in hardware.
Prerequisites to the Reset and Reload Flow
- Compile AI Engine graphs.
- Compile PL kernels.
- Use v++ linker to target the HW flow and generate the XSA file.
- Use v++ packager to generate the PL-only XCLBIN. Refer to Generate AI Engine-only and PL-only XCLBIN.
- Use v++ packager to generate the AI Engine-only XCLBIN. Refer to Generate AI Engine-only and PL-only XCLBIN.
- Use v++ packager to include the above generated AI Engine-only XCLBIN and PL-only XCLBIN into
sd_card
image using the--package.sd_file <>
option. - Ensure the host code loads the AI Engine-only XCLBIN, and the PL-only XCLBIN that was generated in the previous step. Refer to Host Application for Reset and Reload Flow.
Reset and Reload Flow Steps
- Run the application on the board. Refer to Performance Analysis of AI Engine Graph Application on Hardware.
- Reset the application using the
xbutil reset
command. Refer to Reset Before Consecutive Application Runs. - Rerun the application on the board.
- Recompile the newer kernels using the
aiecompiler
with the platform XSA-generated in step 3 of the prerequisite section above. - Use v++ packager to generate the newer AI Engine-only XCLBIN.
- Use v++ packager to include the newer AI Engine-only XCLBIN into
sd_card
image using the--package.sd_file <>
option.