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# 62210

How to use MODELSIM PE with Vivado 2014.2


When using Windows 7 64-bit with ModelSim PE (32-bit) and Vivado Design Suite (64-bit) errors will be displayed.


The error that has been reported is:

/libxil_vsim.dll" failed: Bad DLL format.

The workaround used in the past was to use the below Tcl command to be able to compile the ModelSim libraries and to run the simulation with ModelSim PE:

set_property MODELSIM.64BIT 0 [current_fileset -simset]

However, despite this command ModelSim PE now fails to simulate :

# Loading C:/Xilinx/Vivado/2014.2/lib/win32.o/libxil_vsim.dll
# ** Error: (vsim-3193) Load of "C:/Xilinx/Vivado/2014.2/lib/win32.o/libxil_vsim.dll" failed: Bad DLL format.
# ** Error: (vsim-PLI-3002) Failed to load PLI object file "C:/Xilinx/Vivado/2014.2/lib/win32.o/libxil_vsim.dll".
#         Region: /
# //  ModelSim PE 10.2d Feb 20 2014


To overcome this problem, please follow the steps below:





This issue arises because ModelSim PE is a 32-bit version while Vivado is a run in 64-bit mode.
You can keep your Vivado 64-bit mode project intact but you will need to open Vivado in 32-bit mode, by doing the following:
Open the Vivado prompt from the start menu in Windows:

2.       At the Vivado prompt  type
Vivado m32

3.       Open your simulation project. (it does not matter if it was built using the 64-bit version of Vivado).
4.       The ModelSim libraries need to be recompiled for the 32-bit version, while in the 32-bit version of Vivado.

In the Tcl console type the following :
  • compile_simlib -simulator ModelSim -32bit -directory ./my_modelsim32_lib/
  •  Please ensure you select the right path for you directory and that the directory does NOT contain already compiled 64-bit libraries.
    A clean up is advised.
  • One log file name is boxed in RED in the screen capture below.
    Make sure that the log file names state .nt. in the name and not .nt64.
  • In Vivado 64-bit, despite the fact that set_property MODELSIM.64BIT 0 [current_fileset -simset] was set and the compilation format = 32-bit the log file was referencing nt64 in its name which did not make sense and returned a BAD DLL error.

5.       Please ensure you set up ModelSim PE via the 3rd party tools option:

6.      Run the simulation from Vivado once. You will receive an error because the ModelSim DO file generated is not correct:

Modify the libxil_vsim.dll  file address as below in the DO file to correct the error:

7.       Run the amended DO file from ModelSim PE:

8.       The simulation should now initialize and run.

Linked Answer Records

Associated Answer Records

Answer Number Answer Title Version Found Version Resolved
57043 14.6 AXI BFM - ModelSim PE - Error: (vsim-3193) Load of "libxil_vsim.dll" failed: Bad DLL format. N/A N/A
AR# 62210
Date Created 09/26/2014
Last Updated 12/08/2014
Status Active
Type Solution Center
  • Zynq-7000
  • Vivado Design Suite - 2014.2