Forum Discussion
Altera_Forum
Honored Contributor
11 years ago --- Quote Start --- One item that is still a question, though: once I've successfully understood and navigated through the steps you both have outlined, does this place a (single source) copy of my (new) library in a place that is accessible and usable to both Quartus and ModelSim? Or, is there another set of steps for Quartus? --- Quote End --- Quartus and Modelsim both need to use *source* code, they cannot share compiled library source. However, your question is still relevant for Modelsim, in that if you have a bunch of common code, and multiple projects that use it, you don't want to have to rebuild the common code for each testbench. The modelsim.ini file stores the library mappings. A read-only copy of that file lives in the modelsim installation. When you type a vmap command, Modelsim tries to write to modelsim.ini, and if it cannot, it copies the file and creates a local copy, and then edits that. If you build all your Modelsim simulations in one area, then that automatic action may be ok for you. In my setup I have several versions of Modelsim installed (several versions of Quartus and the associated Modelsim-ASE, and several versions of Modelsim-SE). In this setup I use Tcl scripts to setup the environment; MODELSIM_TCL points to a Tcl script that Modelsim runs, and that Tcl script sets up the MGC_WD (Modelsim working directory) which in turn influences the setting for the MODELSIM environment variable. In the end, the variable $env(MODELSIM) points to a Modelsim-version-specific folder where I have my custom libraries compiled. Read the Modelsim manuals for details on these variables. If you think you want to go this route, ask, and I'll see if I can hack together a really basic set of setup scripts. ... Unless Tricky points out that there is an easier way :) Cheers, Dave