DPI library compilation

I am trying to compile UVM-1.2 pkg, which requires DPI library compilation also.

but it is showing some fatal error regarding to vpi_user.h

make -f Makefile.questa BITS=32 dpi_lib
make[1]: Entering directory `/home/acaic/Downloads/UART_BHAUTIK/uvm-1.2/examples/simple/basic_examples/pkg’
mkdir -p …/…/…/…/lib
gcc -m32 -fPIC -DQUESTA -g -W -shared -x c -I/include …/…/…/…/src/dpi/uvm_dpi.cc -o …/…/…/…/lib/uvm_dpi.so
In file included from …/…/…/…/src/dpi/uvm_dpi.cc:34:0:
…/…/…/…/src/dpi/uvm_dpi.h:31:22: fatal error: vpi_user.h: No such file or directory

include “vpi_user.h”

i am using questasim10.0b on linux-32bit platform.

can anyone help me with this?

thanks
Bhautik

Have you set the environmental variable MTI_HOME to your Questa installation directory?

In reply to cgales:

thanks cgales,

it worked. but now i am getting run-time error & warnings and still not able to use “hdl paths” for it.

** Warning: (vsim-7032) The 32-bit glibc RPM does not appear to be installed on this machine. Calls to gcc may fail.

Time: 0 ps Iteration: 0 Instance: /top/RTL1 File: …/rtl/uart_top.v

Compiling /var/tmp/acaic@aceic_dpi_11004/exportwrapper.c

Loading /var/tmp/acaic@aceic_dpi_11004/exportwrapper.so

** Warning: (vsim-3770) Failed to find user specified function ‘uvm_hdl_check_path’. The search list was empty.

Using -sv_lib, -sv_root, and -sv_liblist arguments can provide a search list

of shared libraries that will be used to resolve user specified functions.

is questasim using any default gcc compiler or what?

In reply to Bhautik Baraiya:

Are you sure you are on a 32-bit platform? The 32-bit GLIBC libraries should be installed on a 32-bit platform. Post the results of ‘uname -a’.

Also, post the exact command you are using and from which directory you are using it so others can try what you are doing.

In reply to cgales:

Hi cgales,

problem solved…!!!

actually i forgot to create library mkdir $(UVM_HOME)/lib in which it stores uvm_dpi.so file.

commands:

mkdir $(UVM_HOME)/lib
vlog …/uvm-1.2/src/uvm_pkg.sv
gcc -m32 -fPIC -DQUESTA -g -W -shared -x c -I…/uvm-1.2/include …/uvm-1.2/src/dpi/uvm_dpi.cc -o …/uvm-1.2/lib/uvm_dpi.so

vsim -sv_lib …/uvm-1.2/lib/uvm_dpi

thanks,
Bhautik