When I add an existing xci (Xilinx IP core file) into a new project, I receive a Critical Warning and the xci file fails to be added into the project.
Critical warning: [Designutils 20-1381] The sub-design source file can not be added to the current project since there is an overlap between the sub-design directory structure and the project directory structure. Sources representing Embedded/DSP/IP sub-designs need to be located in their own directory structure. Allowing the project directory structure to overlap with the sub-design directory structure will cause errors later in the flows for any operation that requires the sub-design to be local to the project. Examples of these operations are: copying the sub-design to the project locally, project archive, project save as etc.
Please move either the project or the Embedded/DSP/IP sub-design directory structure to a different location so that there are no more overlaps, and then try adding the sub-design source to this project again. If a remote sub-design is being added to an existing project, it is recommended that the sub-design directory tree be placed completely outside the project directory structure, the sub-design root file added to the project, and then imported into the project.
Project location: /eda/test
sub-design source location: /eda/test/syn/1_2_Design/lib/2_Syn/my_IP/my_IP.xci cannot be added into the fileset 'sources_1'.
What causes the conflict and how can this issue be fixed?
As the critical warning message points out, allowing the project directory structure to overlap with the sub-design directory structure will cause errors later in the flows for any operation that requires the sub-design to be local to the project.
For example, when an IP XCI file is located in the same directory as the project, Vivado does not know all of the files associated with the .xci, so it will copy everything in the directory containing the .xci into the archive.
The problem here is that the archive is being constructed in a "tmp" directory under the project directory.
The .xci directory is the project directory, so copying everything in that directory under <project_dir>/tmp results in a recursive copy of files .
To resolve the issue, move the sub-design source file to a different directory.