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
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.