2

I want to use OSVVM. Modelsim comes with an older version of OSVVM precompiled in a library called osvvm. This is set up in the global modelsim.ini file:

osvvm = $MODEL_TECH/../osvvm

I would like to be able to compile a later version of OSVVM. I still want to compile it into a library called osvvm, because that is where the OSVVM source code expects it to be.

I have got round this temporarily by just commenting out the above line in the global modelsim.ini. That works, but is not very sustainable: it will have to be done every time we install Modelsim (presumably).

So, is there some way of undoing this line in a local modelsim.ini file? That would be much more sustainable for me. Or, is there some other method that doesn't involve making a machine-specific change?

Matthew Taylor
  • 13,365
  • 3
  • 17
  • 44

2 Answers2

1

Almost every ModelSim program can load a private modelsim.ini with option -modelsim_ini. You can write your own modelsim INI file.

I suggest, to remove OSVVM from the global modelsim.ini and create a local modelsim.ini that references the existing global file. INI file syntax:

others = ../../modelsim.ini
Paebbels
  • 15,573
  • 13
  • 70
  • 139
  • Thank you for replying. I did mention that I was trying to avoid editing the global modelsim.ini, because that will then have to be done every time we install Modelsim in the future. (We have a procedure to which this step could be added, but following it is then one more thing to have to do every time we install Modelsim going forward.) – Matthew Taylor Dec 13 '17 at 09:20
  • The alternative is to: 1. read the existing `modelsim.ini` into memory by a Python script; 2. patch the modelsim.ini file for some library assignments; 3. write out the patched version into a user directory; 4. use the patched file in all calls to vcom, vlib, vmap, .... Or alternatively, write the patched version into each working directory where you run modelsim. – Paebbels Dec 13 '17 at 10:49
  • Have you tried, what happens if an existing osvvm mapping is read read again? Does modelsim overwrite the first mapping with the mapping from the installed modelsim.ini? – Paebbels Dec 13 '17 at 10:50
  • Yes - that seems to be the case. I generated a local modelsim.ini with the text from the other answer as is and it solved the problem. – Matthew Taylor Dec 13 '17 at 13:53
1

You can simply overwrite the global mapping in your local 'modelsim.ini'. This file is automatically loaded when you enter the directory (at least in the modelsim GUI).

Just make a local modelsim.ini in you project/simulation directory and fill it with:

[Library]
; load the global modelsim.ini
others = $MODEL_TECH/../modelsim.ini
; overwrite the existing mapping
osvvm = osvvm

(assuming your osvvm has been build in the directory osvvm in your project directory. Else just add the correct path.)

JHBonarius
  • 10,824
  • 3
  • 22
  • 41
  • In the Intel Questa release this worked fine until recently. They deleted the OSVVM library, but did not delete the mapping. In that case, you do have to delete the global mapping as apparently you cannot replace it with another library when the original library did not exist. So in this case, you do have to delete (or comment out) the mapping. – Jim Lewis Apr 20 '23 at 13:23