The wlf file contains the wave dump data. For some reason I get this message on my computer:

#           File in use by: leader  Hostname: DESKTOP-LEADER7  ProcessID: 14602
#           Attempting to use alternate WLF file "./wlftnzmqtm".
# ** Warning: (vsim-WLF-5001) Could not open WLF file: vsim.wlf
#           Using alternate file: ./wlftnzmqtm

Why it can't open the file I do not know. Basically I have commands to compile all files and then invoke vsim. I just invoke these .do files and soon I start seeing this error. I just want Modelsim to stop creating wlf files as I do not need them and because of this error, Modelsim ends up creating a lot of wlf files.

  • \$\begingroup\$ A workaround for suppressing the generation of the wlf file is to use the -novopt option in vsim, vsim -novopt <design>. If you need to generate a wlf file with a specific name, use vsim -novopt -wlf <wave_file> <design>. \$\endgroup\$ – rvkrysh Feb 12 '18 at 8:27
  • \$\begingroup\$ novopt has to do with optimization right? How is that linked to the wlf file? \$\endgroup\$ – quantum231 Feb 13 '18 at 10:23
  • \$\begingroup\$ Yes. novopt is to turn off optimizations. However, I have seen that it also suppresses the wlf generation. When using novopt, you will have to use the wlf option specifically in order to generate the wave file. This may not be a solution for your problem, but will allow you to continue your simulations without the error. \$\endgroup\$ – rvkrysh Feb 13 '18 at 15:56

This usually happens when ModelSim has crashed or otherwise not been exited correctly.

Exiting correctly means using the Windows menu Close option or the window's corner 'X' icon. Incorrectly is by a program crash, a Windows crash, using a 'process kill' etc.

Here, your ModelSim launches and finds an existing vsim.wlf, causing it to create a pseudo-randomly-named alternative .wlf file to use instead. Had the earlier ModelSim session been exited correctly, it would have happily re-used the existing vsim.wlf file. There's clearly some tidying-away actions it carries it during program exit that makes a vsim.wlf re-usable to itself.

In any event, you can resolve the situation by closing ModelSim correctly and manually deleting the vsim.wlf files plus any others it has created. The next time you launch ModelSim, it will create a new vsim.wlf that it can re-use each session.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.