Modelsim PLI, DLL and Mingw

Guest
Hi Folks,

Can someone help me with creating PLI DLL for Modelsim on a windows
platform using Mingw? The commands shown here work and generate the
dll but when I start the simulator I get an error that veriusertfs
array is not found.

To run simulation I use -
vsim -c -pli proc_bfm.dll to start the simulator.

To compile the c code and build dll I use the following commands.
These are taken directly from Modelsim documentation -

gcc -c -g -Ic:/Modeltech_6.1b/include proc_bfm.c
gcc -shared -o proc_bfm.dll proc_bfm.o -Lc:/modeltech_6.1b/win32
-lmtipli

This is how it looks in my proc_bfm.c -

#include <stdio.h>
#include <stdlib.h>
#include <veriuser.h>

int getop_calltf();
int getop_checktf();

s_tfcell veriusertfs[] =
{
{usertask, 0, getop_checktf,
0, getop_calltf, 0, "$getop"},
{0} /*final entry should be null*/
};

int (*endofcompile_routines[])() =
{
/*** my_eoc_routine, ***/
0 /*** final entry must be 0 ***/
};
 

Welcome to EDABoard.com

Sponsor

Back
Top