cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
9,656 Views
Registered: ‎09-04-2015

Vivado - wait for license ?

Jump to solution

Folks-

I see a similar discussion from last year:

 

https://forums.xilinx.com/t5/Installation-and-Licensing/Vivado-wait-for-license/m-p/531757#M8745

 

I have a similar problem where we use scripted Vivado flow and often hit issues while accessing shared licenses. Can I setup the software to wait for the next available license ?

 

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Observer
Observer
8,690 Views
Registered: ‎08-14-2012

I know that this is an old thread, but for other users looking at the same question I use the following tcl:

 

################################

if {[exec lmstat -a | grep "Users of Implementation" | tr -s " " | cut -d " " -f 11]} {
  puts "Queuing for licence for feature Implementation"
}
while {[exec lmstat -a | grep "Users of Implementation" | tr -s " " | cut -d " " -f 11]} {
exec sleep 1}

################################

 

Note that for different versions of lmstat it may be necessary to modify the field number ("-f 11") above to find the number in use.

This also assumes that you have only one license... if you have more you would need to test whether the number in use is greater than that number (something like: while {[exec lmstat -a | grep "Users of Implementation" | tr -s " " | cut -d " " -f 11] = 4} ).

 

The above checks for Implementation licenses, so should be placed before each phys_opt_design, place_design and route_design command in your script.

Do the same for "Users of Synthesis" before your synth_design commands.

 

No fool-proof if multiple users are waiting, but works most of the time...

 

View solution in original post

3 Replies
Highlighted
Scholar
Scholar
9,622 Views
Registered: ‎06-05-2013

@moazzam.hussain Make use of borrow license feature. For more infromation refer page#47

 

http://www.xilinx.com/support/documentation/sw_manuals/xilinx2015_2/ug973-vivado-release-notes-install-license.pdf

 

-Pratham

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
Highlighted
Observer
Observer
8,691 Views
Registered: ‎08-14-2012

I know that this is an old thread, but for other users looking at the same question I use the following tcl:

 

################################

if {[exec lmstat -a | grep "Users of Implementation" | tr -s " " | cut -d " " -f 11]} {
  puts "Queuing for licence for feature Implementation"
}
while {[exec lmstat -a | grep "Users of Implementation" | tr -s " " | cut -d " " -f 11]} {
exec sleep 1}

################################

 

Note that for different versions of lmstat it may be necessary to modify the field number ("-f 11") above to find the number in use.

This also assumes that you have only one license... if you have more you would need to test whether the number in use is greater than that number (something like: while {[exec lmstat -a | grep "Users of Implementation" | tr -s " " | cut -d " " -f 11] = 4} ).

 

The above checks for Implementation licenses, so should be placed before each phys_opt_design, place_design and route_design command in your script.

Do the same for "Users of Synthesis" before your synth_design commands.

 

No fool-proof if multiple users are waiting, but works most of the time...

 

View solution in original post

Highlighted
Visitor
Visitor
1,821 Views
Registered: ‎12-12-2008

This is an old thread but the issue is still present. 

 

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 that 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 i 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". 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.