User`s manual
Source code security and -nodebug
C-292  Tips and Techniques ModelSim Xilinx User’s Manual
Source code security and -nodebug
The -nodebug option on both vcom (CR-106) and vlog (CR-141) hides internal 
model data. This allows a model supplier to provide pre-compiled libraries 
without providing source code and without revealing internal model variables and 
structure.
Note:  ModelSim’s -nodebug compiler option provides protection for proprietary model information. The 
Verilog protect compiler directive provides similar protection, but uses a Cadence encryption algorithm that 
is unavailable to Model Technology.
If a design unit is compiled with -nodebug the Source window will not display the 
design unit's source code, the Structure window will not display the internal 
structure, the Signals window will not display internal signals (it still displays 
ports), the Process window will not display internal processes, and the Variables 
window will not display internal variables. In addition, none of the hidden objects 
may be accessed through the Dataflow window or with ModelSim commands.
Even with the data hiding of -nodebug, there remains some visibility into models 
compiled with -nodebug. The names of all design units comprising your model 
are visible in the library, and you may invoke vsim 
(CR-148) directly on any of 
these design units and see the ports. For this reason it is important to compile all 
design units with -nodebug.
Design units or modules compiled with -nodebug can only instantiate design units 
or modules that are also compiled -nodebug.
Note: For Verilog designs there is a small window of time - just after loading the design and before 
simulation begins - that a model’s internals are available to the PLI access routines.
Setting up libraries for group use
By adding an “others” clause to your modelsim.ini file, you can have a hierarchy 
of library mappings. If the ModelSim tools don’t find a mapping in the 
modelsim.ini file, then they will search the library section of the initialization file 
specified by the “others” clause. For example:
[library]
asic_lib = /cae/asic_lib
work = my_work
others = /usr/modeltech/modelsim.ini










