Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Using xvhdl in a .bat/.cmd file seems to abort execution

Status
Not open for further replies.

ads-ee

Super Moderator
Staff member
Joined
Sep 10, 2013
Messages
7,944
Helped
1,822
Reputation
3,654
Reaction score
1,808
Trophy points
1,393
Location
USA
Activity points
60,207
Folks,

I'm running into a strange problem with using Vivado's xsim simulator. I'm trying to run a batch command file to compile the files with xvhdl without a project or the gui running. Well I've run into a problem with the batch file aborting after the very first xvhdl command is run. The VHDL file gets compiled and put into the work library, but immediately afterwards the next line in the batch file isn't even executed. I checked by adding a REM statement (rem got here).

So I've either got some strange issue with my system or there is something about the return value of xvhdl that is aborting the batch file, when the command completes.

Anyone have any ideas that I can try to get around this behavior. If not I guess I'll have to produce a Vivado simulation project file and/or use a tcl script to call the xvhdl commands.

Currently I'm using Vivado 2012.4 along with ISE Design Suite 14.7 on a new Win7 laptop.

I sure do miss my Modelsim license. :'(


Thanks

P.S. I've added a very simple testcase: View attachment testcase.zip
 
Last edited:

Well I found out what was going on. Without forum help, as none was given ;-)

I initially tried a python script to call the xvhdl command:
subprocess.call('xvhdl -work work "<file_name>.vhd"')
but that kept throwing errors in subprocess.py. I ended up using Popen, which worked as long as I set shell=True (default is False).
subprocess.Popen('xvhdl -work work "<file_name>.vhd"', shell=True)
This worked, which made me suspicious of why call didn't work.

I finally ended up looking in the c:\Xilinx\Vivado\2013.4\bin directory which it turns out doesn't have any executable binary files, but instead has only unix scripts and batch files. As the original subprocess.call was trying to execute the unix script it would fail. Changing the python script to use the following command:
subprocess.call('xvhdl.bat -work work "<file_name>.vhd"')
corrected the original script.

In regards to the original issue of running the xvhdl command in a batch file you need to use the batch command call to allow the xvhdl.bat batch file to return control the the calling batch file. e.g. call xvhdl.bat -work work "<file_name>.vhdl"

Regards
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top