Technical data

VSIM function descriptions
470
-
VHDL Foreign Language Interface and Verilog PLI ModelSim EE/PLUS Reference Manual
signalID mti_CreateSignal(char *name, regionID region, typeID type)
Creates a new signal. If “name” is not NULL, the signal will appear in the VSIM signal
window. The name will be forced to lower case.
unsigned long mti_Delta()
Returns the simulator iteration count for the current time step.
void mti_Desensitize(processID proc)
Disconnects a C process from the signals it is sensitive to, i.e., undoes the connection
created by the mti_Sensitize call.
mti_dval mti_DoubleToDval(double d)
Converts a double to a value descriptor. Used when returning type REAL from a foreign
function.
double mti_DvalToDouble(mti_dval dval)
Converts a value descriptor to a double. Used when reading type REAL parameter passed
to a foreign function.
typeID mti_ElementType(typeID type)
Type should be a typeID for an array type. Returns the typeID for the elements in the array.
int mti_FatalError(void)
Causes VSIM to immediately halt the simulation and issue an assertion message with the
text “** Fatal: Foreign module requested halt”. A call to mti_FatalError does not return
control to the caller. The simulation cannot continue after being halted with mti_FatalError.
driverID mti_FindDriver(signalID sig)
Returns the driver (either scalar or array) for the specified signalID. Returns NULL if there
is no driver found for a scalar signal, or if any element of an array does not have a driver.
signalID mti_FindPort(interface_list *list, char *name)
This utility searches through the interface_list and returns the signalID of the port with that
name. It returns NULL if it did not find the port. The search is not case-sensitive.
char *mti_FindProjectEntry(char *section, char *nm, int expand)
Finds an entry in the project file (
modelsim.ini
). The section string identifies the project file
section that the entry resides in. The entry is identified by nm. If expand is nonzero then
environment variables are expanded, otherwise they are not expanded. For example, when
modelsim.ini
contains:
[myconfig]
myentry = $abc/xyz