在Vitis HLS中可以在TCL脚本中增加设计文件 add_files
可参考这个官方链接 add_files in vitis-hls
如果有不同的设计(C代码)此时要怎么办?尤其是这些设计的顶层函数名相同,重复add_files增加设计文件会有冲突。
我们发现Vitis_hls 中 tcl 无法自动移除设计文件
invalid command name "remove_files"
不过我们可以通过tcl的文件复制操作实现次命令
file copy -force file1 file2
参考链接tcl file copy
翻译/English
I found we cannot use remove_files as add_files in Vitis HLS tcl scripts. So I use file copy to achieve such operation. I copy design file (usually the C/C++ files in HLS) file1 to target file file2. By this way, target file2 will be replaced (same as delate/remove and add a new one) by a new design file.