在将内核代码 (
.cpp
) 编译为 Vitis 内核 (.xo
) 时,必须启用自动重启和邮箱功能。在 v++ -c
命令行的 Tcl 脚本中使用以下 Vitis HLS 命令以及 --hls.pre_tcl
选项,如 --hls 选项 中所述:config_interface -s_axilite_mailbox both
config_interface -s_axilite_auto_restart_counter 1
要在无邮箱功能的情况下启用永续内核,请指定以下选项:
config_interface -s_axilite_auto_restart_counter 1
如果内核使用串流接口 (
axis
),则您还需要设置以下选项:config_interface -s_axilite_sw_reset