Technical data

FLI and PLI tracing
ModelSim EE/PLUS Reference Manual VHDL Foreign Language Interface and Verilog PLI
-
489
Replayin
g
a Verilo
g
PLI session
To replay the C files, compile
mti_top_<tag>.c
as appropriate for the platform
you are working on, as for any PLI code, and set the Veriuser line in your
modelsim.ini
file to point to the appropriate resulting object file.
Since the foreign interface tracing is preliminary, there may be cases in which you
need to hand edit some C files to compile or run properly. An example is when
you have a design with more than one PLI object file. In that case, the original run
will make multiple calls to init_usertfs() functions. For replay, everything is
combined into one object file, so only one call will be made. If you merge the
separate cases in the top level routine (in
mti_top_<tag>.c
), all the initializations
will be done properly in one init_usertfs() callback.
Invoke
vsim
(p91) on the original design with the option:
-trace_foreign 16
Sometimes it is useful to create a trace of the replay in order to debug problems
with the replay itself. To do that, use one of the following:
-trace_foreign 17
-trace_foreign 18
-trace_foreign 19
The actions of the original PLI function will be replayed as a result.