Technical data

VSIM function descriptions
474
-
VHDL Foreign Language Interface and Verilog PLI ModelSim EE/PLUS Reference Manual
responsible for freeing this memory with the
free
C-library function). If buf is not NULL,
then VSIM copies the value into buf and returns buf.
typeID mti_GetSignalType(signalID sig)
Returns the typeID for the signal.
long mti_GetSignalValue (signalID sig)
Gets the value of a scalar signal except TIME and DOUBLE which require
GetSignalValueIndirect.
void * mti_GetSignalValueIndirect(signalID sig, void * buf)
Gets the value of a signal of any type. GetSignalValueIndirect must be used for signals of
type REAL and TIME. If buf is NULL, then VSIM allocates memory for the value and
returns a pointer to it (the caller is responsible for freeing this memory with the
free
C-library function). If buf is not NULL, then VSIM copies the value into buf and returns
buf.
regionID mti_GetTopRegion(void)
Returns the regionID for the top of the design tree. This can be used to traverse the signal
hierarchy from the top. For Verilog, gets the first top-level module. (Use mti_NextRegion
to get additional top-level Verilog modules.)
int mti_GetTraceLevel(void)
If
vsim
(p91) was invoked with the - trace_foreign option, returns the trace level. Otherwise
returns 0. Use to detect whether FLI/PLI tracing is on.
int mti_GetTraceLevel PROTO((void))
Returns -trace_foreign parameter to VSIM. Indicates if tracing is on or off.
type_kind mti_GetTypeKind(typeID type)
Returns the kind of the type described by the typeID. That is one of:
MTI_TYPE_SCALAR, MTI_TYPE_ARRAY, MTI_TYPE_RECORD,
MTI_TYPE_ENUM, MTI_TYPE_REAL, MTI_TYPE_ACCESS, MTI_TYPE_FILE,
MTI_TYPE_TIME.
MTI_TYPE_SCALAR indicates either an integer or a physical type (except
TIME).
void mti_GetVarAddr(char *nm)
Returns the address of the variable identified by nm. The variable name may be either a full
hierarchical name or a relative name. The variable name must include the process label. A