git 管理vivado工程, tcl 恢复vivado工程
如果不是上边目录结果 , 参考上边目录结构 ,重新建一个工程;
在目录work下产生proj.tcl
修改proj.tcl
主要删除bd wrapper相关的部分;
set origin_dir "."
####改为
set origin_dir [file dirname [info script]]
bd部分放在synth前边
# Import local files from the original project
set files [list \
[file normalize "${origin_dir}/Lab_5_AXILITE/Lab_5_AXILITE.srcs/sources_1/bd/design_1/design_1.bd" ]\
[file normalize "${origin_dir}/Lab_5_AXILITE/Lab_5_AXILITE.srcs/sources_1/bd/design_1/hdl/design_1_wrapper.v" ]\
]
set imported_files [import_files -fileset sources_1 $files]
# Set 'sources_1' fileset file properties for remote files
# None
# Set 'sources_1' fileset file properties for local files
set file "design_1/design_1.bd"
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
set_property -name "registered_with_manager" -value "1" -objects $file_obj
####改为
# Create block design
source $origin_dir/../src/bd/design_1.tcl
# Generate the wrapper
set design_name [get_bd_designs]
make_wrapper -files [get_files $design_name.bd] -top -import
打开 bd
然后export bd tcl 到src/bd/
然后在work目录下测试;
修改tcl;
一直到成功恢复工程;