Vivado appears to sometimes copy files into the generated IP sources that already exist in the precompiled libraries. This creates a conflict where add_from_compile_order_file and add_external_library both try to create the same library, which fails.
possible solutions in the order from better to worse IMO, not necessarily complete or accurate fixes, just based on some experimentation:
- In extract_compile_order.tcl, exclude files with property IS_VISIBLE == 0
- In extract_compile_order.tcl, exclude files with USED_IN contains ipstatic
- In
add_from_compile_order_file, ignore any files with a library that is not xil_defaultlib, which all generated IP files should belong to. Probably best to make the name configurable because it xil_defaultlib is defined as the default in the XPR file so may be able to be changed.
- Require the user to run
add_external_library after add_from_compile_order_file and add logic to skip any duplicates. This may not work if only some files are copied out by Vivado but some IP depends on files which are not copied out.
My specific issue is with Vivado 2025.2 and the hdl/ecc_v2_0_vl_rfs.v file being compiled into ecc_v2_0_18.
Vivado appears to sometimes copy files into the generated IP sources that already exist in the precompiled libraries. This creates a conflict where
add_from_compile_order_fileandadd_external_libraryboth try to create the same library, which fails.possible solutions in the order from better to worse IMO, not necessarily complete or accurate fixes, just based on some experimentation:
add_from_compile_order_file, ignore any files with a library that is not xil_defaultlib, which all generated IP files should belong to. Probably best to make the name configurable because it xil_defaultlib is defined as the default in the XPR file so may be able to be changed.add_external_libraryafteradd_from_compile_order_fileand add logic to skip any duplicates. This may not work if only some files are copied out by Vivado but some IP depends on files which are not copied out.My specific issue is with Vivado 2025.2 and the hdl/ecc_v2_0_vl_rfs.v file being compiled into ecc_v2_0_18.