User`s manual
Using the Verilog PLI
ModelSim Xilinx User’s Manual Verilog Simulation 5-87
• The sizetf function should return 0 if the system function return value is of
Verilog type "real".
• The sizetf function should return -32 if the system function return value is of
Verilog type "integer".
Object handles
Many of the object handles returned by the ACC PLI routines are pointers to
objects that naturally exist in the simulation data structures, and the handles to
these objects are valid throughout the simulation, even after the acc_close routine
is called. However, some of the objects are created on demand, and the handles to
these objects become invalid after acc_close is called. The following object types
are created on demand in ModelSim Verilog:
accOperator (acc_handle_condition)
accWirePath (acc_handle_path)
accTerminal (acc_handle_terminal, acc_next_cell_load, acc_next_driver, and
acc_next_load)
accPathTerminal (acc_next_input and acc_next_output)
accTchkTerminal (acc_handle_tchkarg1 and acc_handle_tchkarg2)
accPartSelect (acc_handle_conn, acc_handle_pathin, and acc_handle_pathout)
accRegBit (acc_handle_by_name, acc_handle_tfarg, and acc_handle_itfarg)
If your PLI application uses these types of objects, then it is important to call
acc_close to free the memory allocated for these objects when the application is
done using them.
Third party PLI applications
Many third party PLI applications come with instructions on using them with
ModelSim Verilog. Even without the instructions, it is still likely that you can get
it to work with ModelSim Verilog as long as the application uses standard PLI
routines. The following guidelines are for preparing a Verilog-XL PLI application
to work with ModelSim Verilog.
Generally, a Verilog-XL PLI application comes with a collection of object files
and a veriuser.c file. The veriuser.c file contains the registration information as
described above in "Registering PLI applications". To prepare the application for
ModelSim Verilog, you must compile the veriuser.c file and link it to the object
files to create a dynamically loadable object (see "Compiling and linking PLI
applications"). For example, if you have a veriuser.c file and a library archive
libapp.a file that contains the application's object files, then the following
commands should be used to create a dynamically loadable object for the Solaris
operating system: