I am trying to modify a Vivado 2018.3 created tcl script for version control. As soon as I try to put all VHDL files in one directory (and modify the script accordingly), the script can't find all files when calling source build.tcl
I tried to follow version control instructions for older Vivadoversions like this one: https://github.com/tobiasrj20/Vivado-Version-Control-Example.
Unfortunately I couldn't find instructions for Vivado 2018.3, since the example script looks different to what I get from Vivado.
The structure of the Vivado Project.srcs folder looks as follows.
- constr_1
- imports
- project_1 <--Here is the constraints file
sim_1
- sources_1
- bd
- contains some stuff I don't use
- imports
- Downloads <-- contains a part of vhd files
- new <-- contains another part of vhd files
- new <-- contains other vhd files
My goal is to move all the vhd files to one folder, for example called "src". And to modify the tcl script accordingly.
I changed the parts in the script according to the tutorial given above. And replaced all absolute paths with relative paths. For example like this:
Original script
set files [list \
[file normalize "${origin_dir}/fpga_top_v2.srcs/sources_1/new/clk_gen_25M.vhd" ]\
Modified:
set files [list \
[file normalize "$
$origin_dir/src/clk_gen_25M.vhd" ]\
Then there is this part, where I am not sure if I need to change it
# Set 'sources_1' fileset file properties for local files
set file "new/clk_gen_25M.vhd"
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
set_property -name "file_type" -value "VHDL" -objects $file_obj
Because the tcl console says the following during the source process:
# set file "new/clk_gen_25M.vhd"
WARNING: [Vivado 12-818] No files matched '*new/clk_gen_25M.vhd'
# set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
# set_property -name "file_type" -value "VHDL" -objects $file_obj
ERROR: [Common 17-55] 'set_property' expects at least one object.
Resolution: If [get_<value>] was used to populate the object, check to make sure this command returns at least one valid object.
Apologies, if this question has been asked before but I couldn't find any answers for this kind of question and especially for the Vivado 2018.3 version.