Technical data
Passing parameters to macros
534
-
Tips and Techniques ModelSim EE/PLUS Reference Manual
Passing parameters to macros
In Model
Sim
, you invoke macros with the do command:
Syntax
do
<filename> [ <parameter_value> ...]
Arguments
<filename>
Specifies the name of the macro file to be executed.
<parameter_value>
Specifies values that are to be passed to the corresponding parameters $1 through $9 in the
macro file. Multiple parameter values must be separated by spaces. If you specify fewer
parameter values than the number of parameters used in the macro, the unspecified values
are treated as empty strings in the macro.
There is no limit on the number of parameters that can be passed to macros, but
only nine values are visible at one time. You can use the
shift
command (p367) to
see the other parameters.
If you do not know how many parameters have been passed, you can use the
argc
variable; it returns the total number of currently-active parameters (i.e. the number
of parameters passed less the number of
shift
commands (p367) executed).
See also
The
do
command (p302) for more information on do files. Also see the DOPATH
variable (p54) for adding a do file path to your environment.
Source code security and -nodebug
The
-nodebug
option on both
vcom
(p71) and
vlog
(p83) 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.
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