Technical data

VSIM function descriptions
468
-
VHDL Foreign Language Interface and Verilog PLI ModelSim EE/PLUS Reference Manual
void mti_AddRestoreCB (funcptr func, void *param)
Causes the function to be called on a warm restore. This function can not be used for cold
restores (vsim -restore) as function entry points may be located at different places after a
cold restore.
void mti_AddSaveCB (funcptr func, void *param)
Causes the function to be called when a checkpoint operation is performed. The parameter
supplied is copied and passed through to the function.
void mti_AddSocketInputReadyCB(int fd, funcptr func, void *param)
Causes the function to be called when the specified socket descriptor has data available for
reading.
void mti_AddSocketOutputReadyCB(int fd, funcptr func, void *param)
Causes the function to be called when the specified socket descriptor is available for
writing.
void mti_AddSimStatusCB(funcptr func, void *param)
Causes the function to be called when the simulator RUN status changes. For this callback,
the function will be called with two arguments, the user specified param, and a second
argument of type int which is 1 when the simulator is about to start a run and 0 when the
run completes.
void mti_AddTclCommand PROTO
((char *cmd_name, funcptr func, void *param, funcptr func_delete_cb))
Access to Tcl_CreateCommand(). Can be used in place of mti_AddCommand().
int mti_AskStdin(char *buf, char * prompt)
Asks for input string from user. Uses "prompt>" for prompt. Buf is a preallocated array that
will contain the returned input string.
void mti_Break(void)
Requests VSIM to halt the simulation and issue an assertion message with the text “Halt
requested”. The request is satisfied after returning control to the caller and after the caller
returns control to the simulator.
The simulation may be continued after being halted with mti_Break.
int mti_Cmd PROTO((char *cmd))
Similar to mti_Command(), except a) it returns a Tcl interp status (TCL_OK or
TCL_ERROR), and b) it does not transcribe the results.