Technical data

VSIM function descriptions
ModelSim EE/PLUS Reference Manual VHDL Foreign Language Interface and Verilog PLI
-
477
time64 *mti_NowIndirect(time64 *time_buf)
Returns a structure containing the upper and lower 32 bits of the 64-bit current simulation
time. If time_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
time_buf is not NULL, then VSIM copies the value into time_buf and returns time_buf.
long mti_NowUpper(void)
Returns the high order 32 bits of the current simulation time. The time units are equivalent
to the current simulator time unit setting. See mti_Resolution.
void mti_PrintMessage(char *msg)
Prints a message in the main VSIM window. You may include the newline character (\n)
in the string to print text on a new line. Model
Sim
, however, provides the newline character
by default.
void *mti_Realloc (void *p, unsigned long sz)
Works just like the UNIX realloc function. If the specified size is larger than the size block
already allocated to p, new memory of the required size is allocated and initialized to zero,
and the entire contents of the old record is copied into the new record; a pointer to the new
block is returned. Otherwise, a pointer to the old block is returned. Any memory allocated
by mti_Realloc is guaranteed to be restored like mti_Malloc.
void mti_RemoveRestoreCB (funcptr func, void *param)
Removes the function from the restore callback list.
void mti_RemoveSaveCB (funcptr func, void *param)
Removes the function from the save callback list.
char * mti_Resolution(void)
Returns a string that has the name of the time unit for the simulator resolution. For
backward compatibility with versions prior to 5.0. CAUTION; if this function is called by
an FLI application and the resolution is not a power of 1000 (e.g., "-t 10ps" isn't a power of
1000, but "-t ps" is), then mti_Resolution will cause the simulation to terminate.
void mti_RestoreBlock (char *pointer)
Restores a block of data to the address pointed to by pointer. The size of the data block
restored is the same as the size that was saved by the corresponding mti_SaveBlock() call.
char mti_RestoreChar (void)
Returns one byte of data read from the checkpoint file.