08-10-2018 05:34 AM
When you run Vivado in a floating license environment you sometimes does not get a license and Vivado reports a build error. There is no option in Vivado to wait until a license is available. This has been dissussed in a few previous threads such as https://forums.xilinx.com/t5/Vivado-TCL-Community/Vivado-wait-for-license/m-p/881038#M7102, https://forums.xilinx.com/t5/Installation-and-Licensing/Vivado-wait-for-license/m-p/531757#M8745 and https://forums.xilinx.com/t5/Vivado-TCL-Community/Tcl-script-to-loop-for-floating-license-and-run/m-p/846651/highlight/true#M6767
I have digged a bit deeper into the problem to reduce the risk of not getting a license when running Vivado build process. Vivado requests and releases the license several times during the build process so the license check has to be done several times. I have made a TCL script that checks for Vivado_Design_Edition feature which is the limiting factor in my case by you might have to change it to Synthesis and Implementation feature instead depending on your license status. The STEPS.*.TCL.PRE is executed just before Vivado checks for license so this is a good place to put the license check script (and this will also work in GUI-mode):
set_property STEPS.SYNTH_DESIGN.TCL.PRE [file normalize $common_scripts_dir/waitforlicense.tcl] [get_runs synth_1]
set_property STEPS.OPT_DESIGN.TCL.PRE [file normalize $common_scripts_dir/waitforlicense.tcl] [get_runs impl_1]
set_property STEPS.PLACE_DESIGN.TCL.PRE [file normalize $common_scripts_dir/waitforlicense.tcl] [get_runs impl_1]
set_property STEPS.ROUTE_DESIGN.TCL.PRE [file normalize $common_scripts_dir/waitforlicense.tcl] [get_runs impl_1]
set_property STEPS.WRITE_BITSTREAM.TCL.PRE [file normalize $common_scripts_dir/waitforlicense.tcl] [get_runs impl_1]
This does not work for the "Out-of-Context Module Runs" that will be runned before the main synthesis starts. You need to add the license check script before your "launch_runs synth_1" command in you build script as well (will not be executed in GUI-mode). This check will run some time before Vivado checks for the license so this is not a perfect solution but it helps a lot. If someone has a better solution for the "Out-of-Context Module Runs", be free to comment on this post.
09-03-2018 07:19 AM
Thanks for sharing this with other users.
Please note, I have confirmed, Xilinx development team is aware of this queuing licensing option in Vivado, however there are currently no plans to get this implemented.
Thanks once again and have a nice day.