UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 63986

How to run Vivado Simulator in batch mode?

Description

I would like to run Vivado Simulator in batch mode in Windows.

I have created a simulation batch file (.bat) with the following commands:

xvlog file1.v
xvhdl file2.vhd
xvlog top.v
xelab -debug typical top -s top_sim
xsim top_sim -t xsim_run.tcl

When I run this batch file, the script halts after executing the first command.

What is the correct way to run Vivado Simulator in batch mode?

Solution

In the Windows platform, the xvlog, xvhdl, xelab and xsim files are batch files (have the .bat extension) not windows executables (.exe extension).

If you would like to run Vivado Simulator in batch mode, be aware that in Windows, calling a batch file from within another one requires the use of a call before the batch file name. 

In Linux, xvlog, xvhdl, xelab and xsim are shell scripts and they can be invoked just like executables.

So, no change in the calling mechanism is required for Linux.

See the following examples:
 

run_xsim.bat (Windows)
 
call xvlog file1.v
call xvhdl file2.vhd
call xvlog top.v
call xelab -debug typical top -s top_sim
call xsim top_sim -t xsim_run.tcl 

run_xsim.sh (Linux)
 
xvlog file1.v
xvhdl file2.vhd
xvlog top.v
xelab -debug typical top -s top_sim
xsim top_sim -t xsim_run.tcl

Linked Answer Records

Master Answer Records

Answer Number Answer Title Version Found Version Resolved
58799 Xilinx Simulation Solution Center - Design Assistant - Vivado Simulator N/A N/A
AR# 63986
Date Created 03/22/2015
Last Updated 04/02/2015
Status Active
Type General Article
Tools
  • Vivado Design Suite