Creating a Vivado Zombie

April 26, 2015


There is a very cool feature here why we want to use tcl scripts to run hundreds of experiments without human interaction.


Warm-up: Suppose you have a tcl script called test.tcl. How do you run it without inferring GUI?

I guess you know you can do: vivado -mode tcl

Then you can do: source test.tcl

This will infer vivado scripting to run hundreds of experiments. However, you have to keep the terminal open at least. Suppose the network is gone...


Question 1: can we run the scripts in the background even if we close the terminal?

Answer: nohup vivado -mode tcl -source test.tcl &

This one, however, will record every piece of screen message into nohup.out.


Question 2: can we ignore this large nohup.out to make everything run even faster?

Answer: nohup vivado -mode tcl -source test.tcl > /dev/null 2>&1&

Then no output text file is recorded. If you want to check the log file, then check the file “Vivado.log” in the working folder. Cool, a zombie has been created.


Question 3: how do we check the status of the vivado process?

You can use ps aux | grep <username> to check all the processes alive. You can also kill process by their IDs. Now I guess you can just put everything into server, turn off your machine, and check the results another day. You don't have to worry about any network issue! Make sure the script works well before you create the zombie. Refer to the warm-up question for debugging. Believe me, this is much more convenient than using GUI.