24.03.2013 Views

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

UM-70 3 - Design libraries<br />

Protecting source code using -nodebug<br />

<strong>ModelSim</strong> <strong>SE</strong> User’s <strong>Manual</strong><br />

The -nodebug argument for both vcom (CR-311) <strong>and</strong> vlog (CR-358) hides internal model<br />

data. This allows a model supplier to provide pre-compiled libraries without providing<br />

source code <strong>and</strong> without revealing internal model variables <strong>and</strong> structure.<br />

Note: -nodebug encrypts entire files. The Verilog `protect compiler directive allows<br />

you to encrypt regions within a file. See "<strong>ModelSim</strong> compiler directives" (UM-155) for<br />

details.<br />

When you compile with -nodebug, all source text, identifiers, <strong>and</strong> line number information<br />

are stripped from the resulting compiled object, so <strong>ModelSim</strong> cannot locate or display any<br />

information of the model except for the external pins. Specifically, this means that:<br />

a Source window will not display the design units’ source code<br />

a structure pane will not display the internal structure<br />

the Objects pane will not display internal signals<br />

the Active Processes pane will not display internal processes<br />

the Locals pane will not display internal variables<br />

none of the hidden objects may be acces sed through the Dataflow window or with<br />

<strong>ModelSim</strong> comm<strong>and</strong>s<br />

You can access the design units comprising your model via the library, <strong>and</strong> you may invoke<br />

vsim (CR-373) directly on any of these design units <strong>and</strong> see the ports. To restrict even this<br />

access in the lower levels of your design, you can use the following -nodebug options when<br />

you compile:<br />

Comm<strong>and</strong> <strong>and</strong> switch Result<br />

vcom -nodebug=ports makes the ports of a VHDL design unit invisible<br />

vlog -nodebug=ports makes the ports of a Verilog design unit invisible<br />

vlog -nodebug=pli prevents the use of PLI functions to interrogate the module for<br />

information<br />

vlog -nodebug=ports+pli combines the functions of -nodebug=ports <strong>and</strong> -nodebug=pli<br />

Don’t use the =ports option on a design without hierarchy, or on the top level of a<br />

hierarchical design. If you do, no ports will be visible for simulation. Rather, compile all<br />

lower portions of the design with -nodebug=ports first, then compile the top level with<br />

-nodebug alone.<br />

Design units or modules compiled with -nodebug can only instantiate design units or<br />

modules that are also compiled -nodebug.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!