Regarding PLI

A

asm

Guest
Hi,
Can someone tell me how to register compile and link a PLI application
in a MODELSIM simulator.
asm.
 
i can give some hints about windows..

you have to put this in your c code

#include "acc_user.h"
#include "veriuser.h"

s_tfcell
veriusertfs[]={{usertask,0,0,0,setIn_monitor,0,"$setIn_monitor"},0}};


where setIn_monitor is the routine which you call from your *.v file

Also,you have to add one entry in the modelsim.ini concerning your
routine in the veriuser entry.

Finally the instructions i use for compiling and linking are:

cl -c -IC:\Modeltech_5.4e\include yourfile.c

link -dll -export:veriusertfs yourfile.obj
C:\Modeltech_5.4e\win32\mtipli.lib

(you have to put the c file in the include folder(you can find it in
the Modelsim folder)

The compiler and linker that i use are from Visual Studio 6.0

You can also read the help file in modelsim where is a short
explanation about PLI and compiling - linking.There are infos about
other O.S. also.

Yiannis
 
Compiling the design
vlog test.v



Compile script for C files
# Compile C files
cc -O -I/db/dspapps/modelsim_5.6e/include -c pli.c

# Linking
ld -G -B symbolic pli.o -o pli.so

Invoking Modelsim
# Invoke modelsim
vsim -pli pli.so -t ps test
 

Welcome to EDABoard.com

Sponsor

Back
Top