Problem generating "uvm_dpi.dll" for UVM1.2 for QuestaSim 10.2c in 64 bit Windows

Hello all,

I am running the “hello_world” example from UVM 1.2 and I’m having problems using the “uvm_dpi.dll” that I generate, my settings are:

*- OS Version: Windows 64 bits

  • QuestaSim Version: 10.2c 64 bits
  • UVM Version: 1.2
  • ${UVM_HOME}: path to the UVM-1.2 kit I’ve downloaded from www.verificationacademy.com
  • ${MTI_HOME}: path to my questasim 10.2c 64 bit home directory.
  • Using the GUI to execute commands.*

The latest precompiled UVM version in this QuestaSim package is 1.1d, so in order to use 1.2 I need to compile the DPI.

The default Windows mode in ${UVM_HOME}/examples/Makefile.questa is 32bit, so to compile UVM-1.2 I need to make modifications to match the 64 bit version I am running:

{MTI_HOME}/gcc-4.5.0-mingw64/bin/g++.exe \ -g \ -DQUESTA \ -W \ -shared \ -Bsymbolic \ -x c \ -I{MTI_HOME}/include
{UVM_HOME}/src/dpi/uvm_dpi.cc \ -o {UVM_HOME}/lib/uvm_dpi.dll
${MTI_HOME}/win64/mtipli.dll -lregex

but it doesn’t work, it reports lots of error messages like these:

*C:/questasim64_10.2c/win64/mtipli.dll:137:1: error: stray ‘@’ in program
C:/questasim64_10.2c/win64/mtipli.dll:137:1: error: stray ‘\255’ in program
C:/questasim64_10.2c/win64/mtipli.dll:137:1: error: stray ‘\255’ in program
C:/questasim64_10.2c/win64/mtipli.dll:137:1: error: stray ‘`’ in program
C:/questasim64_10.2c/win64/mtipli.dll:137:1: error: stray ‘\255’ in program
C:/questasim64_10.2c/win64/mtipli.dll:137:1: error: stray ‘\255’ in program
C:/questasim64_10.2c/win64/mtipli.dll:137:1: error: stray ‘\200’ in program
*

I debugged these errors and modified the command to:

** {MTI_HOME}/gcc-4.5.0-mingw64/bin/g++.exe \ -g \ -DQUESTA \ -W \ -shared \ -Bsymbolic \ -I{MTI_HOME}/include
-I${UVM_HOME}/src
-I${UVM_HOME}/src/dpi/uvm_dpi.cc
-o {UVM_HOME}/lib/uvm_dpi.dll \ {MTI_HOME}/win64/mtipli.dll
-I${MTI_HOME}/gcc-4.5.0-mingw64/include -lregex**

This finishes without errors and I can see the ${UVM_HOME}/lib/uvm_dpi.dll generated.

After this, I compile and run the simulation with these commands:

vlib work
vlog +incdir+{UVM_HOME}/src {UVM_HOME}/src/uvm.sv +incdir+. hello_world.sv
vsim
-sv_lib ${UVM_HOME}/lib/uvm_dpi.dll-c -do “run -all; quit -f” -l questa.log -f questa.tops

Commands vlib and vlog report no issues, but vsim ends with fatal and several warnings like:

*# Loading C:/uvm-1.2/lib/uvm_dpi.dll

** Warning: (vsim-3770) Failed to find user specified function ‘uvm_hdl_check_path’ in DPI precompiled library search list "C:/uvm-1.2/lib/uvm_dpi.dll ".

Time: 0 ns Iteration: 0 Region: /uvm_pkg File: C:/uvm-1.2/src/uvm_pkg.sv

** Warning: (vsim-3770) Failed to find user specified function ‘uvm_hdl_deposit’ in DPI precompiled library search list "C:/uvm-1.2/lib/uvm_dpi.dll ".

Time: 0 ns Iteration: 0 Region: /uvm_pkg File: C:/uvm-1.2/src/uvm_pkg.sv

** Warning: (vsim-3770) Failed to find user specified function ‘uvm_hdl_force’ in DPI precompiled library search list "C:/uvm-1.2/lib/uvm_dpi.dll ".*

I made an experiment, in which I use the precompiled dll {MTI_HOME}/uvm-1.1d/win64/uvm_dpi.dll* instead of the *{UVM_HOME}/lib/uvm_dpi.dll I generated, and the simulation runs OK, commands are:

** vlib work
vlog +incdir+{UVM_HOME}/src {UVM_HOME}/src/uvm.sv +incdir+. hello_world.sv
vsim**-sv_lib ${MTI_HOME}/uvm-1.1d/win64/uvm_dpi.dll-c -do “run -all; quit -f” -l questa.log -f questa.tops

This workaround works, but I think it’s not OK to compile the SV part of uvm-1.2 and use the DPI from uvm-1.1d.

This points me to the g++ command I modified to use it in 64bit mode and seems my modifications are not working.
Please help! Can someone point me to use the correct 64 bit g++ command in Windows to generate the DPI?

Thank you.

Unless you have a specific need to use UVM 1.2, we suggest that you stay with UVM 1.1d and continue to use the pre-compiled libraries that come with Questa. UVM 1.2 is still in transition as it being transferred to the IEEE.

We also recommend that you use 32-bit binaries for better performance unless you have designs that are too large to fit in the 32-bit address space, or have other shared objects that you need to link with and only have 64-bit versions of those objects.

Otherwise you should be able to compile your DPI files together with your SV files on the same vlog command line.

In reply to dave_59:

Hi Dave,

The reasons I am using 64 bits is because I have Windows 64 bit, QuestaSim 10.2c 64 Bit and the only mtipli.dll file needed by the g++ command is inside this path ${MTI_HOME}/win64/mtipli.dll, there is no 32 bit version of this file in my installation directory.

I’ve tried your suggestion of compiling the DPI and the SV files with this command:

**vlog +incdir+{UVM_HOME}/src {UVM_HOME}/src/uvm.sv ${UVM_HOME}/src/dpi/uvm_dpi.cc +incdir+. hello_world.sv
**

And I get this error:

Top level modules:
hello_world
– Compiling DPI C/C++ file C:/uvm-1.2/src/dpi/uvm_dpi.cc
** Error: (vlog-70) Compilation of the C/C++ src files failed with the error messages given below.

In file included from C:/uvm-1.2/src/dpi/uvm_dpi.cc:34:0:
C:/uvm-1.2/src/dpi/uvm_dpi.h:37:19: fatal error: regex.h: No such file or directory
compilation terminated.

Am I missing a switch?
I searched for the missing file regex.h and added a +incdir+ to the command to the directory the file is:

**vlog +incdir+{UVM_HOME}/src {UVM_HOME}/src/uvm.sv {UVM_HOME}/src/dpi/uvm_dpi.cc +incdir+. hello_world.sv +incdir+{QUESTA_HOME}/gcc-4.5.0-mingw64/include
**

but I still see same error.

In reply to Romanwang:

I think the Makefile.questa in the top-level examples directory is not correct. Try the attached.

In reply to :

I tried attachment with Questa Sim-64 10.2c linux version, it still has some different errors.
Please check it.

vlib work
vlog -timescale “1ns/1ns” …/…/…/…/src/dpi/uvm_dpi.cc -ccflags -DQUESTA -writetoplevels questa.tops +incdir+…/…/…/…/src …/…/…/…/src/uvm.sv +incdir+.
top.sv
QuestaSim vlog 10.2c Compiler 2013.07 Jul 18 2013
– Compiling package uvm_pkg
** Warning: …/…/…/…/src/base/uvm_event.svh(39): (vlog-2181) Use of a parameterized class uvm_event_callback as a type creates a default specialization.
– Compiling package user_pkg
– Importing package uvm_pkg
– Compiling module top
– Importing package user_pkg

Top level modules:
top
– Compiling DPI C/C++ file …/…/…/…/src/dpi/uvm_dpi.cc
vsim -voptargs=+acc=rmb -c -do “run -all; q” -l questa.log -f questa.tops
Reading pref.tcl

10.2c

vsim -do {run -all; q} -l questa.log -voptargs=+acc=rmb -c top

Loading /var/tmp/romwang@cybvgar-nx23_dpi_29739/linux_gcc-4.5.0/export_tramp.so

** Note: (vsim-3812) Design is being optimized…

** Warning: …/…/…/…/src/base/uvm_tr_stream.svh(494): (vopt-2250) Function “do_open_recorder” has no return value assignment.

** Warning: …/…/…/…/src/base/uvm_recorder.svh(678): (vopt-2250) Function “check_handle_kind” has no return value assignment.

** Warning: …/…/…/…/src/tlm1/uvm_sqr_ifs.svh(248): (vopt-2250) Function “is_auto_item_recording_enabled” has no return value assignment.

// Questa Sim

// Version 10.2c linux Jul 18 2013

//

// Copyright 1991-2013 Mentor Graphics Corporation

// All Rights Reserved.

//

// THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION

// WHICH IS THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS

// LICENSORS AND IS SUBJECT TO LICENSE TERMS.

//

Loading sv_std.std

Loading work.uvm_pkg(fast)

Loading work.user_pkg(fast)

** Note: (vsim-8785) UVM-aware debugging capabilities will be disabled since no compiled “questa_uvm_pkg” can be found.

This also means that later if you turn on UVM-aware debugging your debug simulations may have

different random seeds from your non-debug simulations.

Loading work.top(fast)

** Error: (vsim-3978) …/…/…/…/src/base/uvm_transaction.svh(487): Illegal assignment to class work.uvm_pkg::uvm_event #(class work.uvm_pkg::uvm_object) from unknown class type

Time: 0 ns Iteration: 0 Region: /uvm_pkg File: …/…/…/…/src/uvm_pkg.sv

** Error: (vsim-3978) …/…/…/…/src/base/uvm_transaction.svh(676): Illegal assignment to class work.uvm_pkg::uvm_event #(class work.uvm_pkg::uvm_object) from unknown class type

Time: 0 ns Iteration: 0 Region: /uvm_pkg File: …/…/…/…/src/uvm_pkg.sv

** Error: (vsim-3978) …/…/…/…/src/base/uvm_component.svh(2597): Illegal assignment to class work.uvm_pkg::uvm_event #(class work.uvm_pkg::uvm_object) from unknown class type

Time: 0 ns Iteration: 0 Region: /uvm_pkg File: …/…/…/…/src/uvm_pkg.sv

** Error: (vsim-3978) …/…/…/…/src/base/uvm_component.svh(2810): Illegal assignment to class work.uvm_pkg::uvm_event #(class work.uvm_pkg::uvm_object) from unknown class type

Time: 0 ns Iteration: 0 Region: /uvm_pkg File: …/…/…/…/src/uvm_pkg.sv

** Error: (vsim-3978) …/…/…/…/src/base/uvm_component.svh(2762): Illegal assignment to class work.uvm_pkg::uvm_event #(class work.uvm_pkg::uvm_object) from unknown class type

Time: 0 ns Iteration: 0 Region: /uvm_pkg File: …/…/…/…/src/uvm_pkg.sv

Error loading design

Error loading design
make: *** [run] Error 12

In reply to Romanwang:

Hi Roman,

That Makefile worked for me on both Windows 7 and Linux.

I think you will have to contact someone in Mentor support to help you better. There you can provide more details about your environment.

Dave

In reply to dave_59:

Thanks Dave. I will contact the local support.

In reply to chavhector:

My friend is using the Questa Sim-64 10.2c win64/ Cygwin environment to compile the UVM-1.2 example.
He tired chavhector’s options. but he met following error.
do you have any suggestion?

[Administrator@PC201408061944 …sequence/basic_read_write_sequence]$ make -f Makefile.questa all
vlib work
vlog -timescale “1ns/1ns” -ccflags -DQUESTA -writetoplevels questa.tops +incdir+…/…/…/…/src …/…/…/…/src/uvm.sv +incdir+.
top.sv
QuestaSim-64 vlog 10.2c Compiler 2013.07 Jul 19 2013
– Compiling package uvm_pkg
** Warning: …/…/…/…/src/base/uvm_event.svh(39): (vlog-2181) Use of a parameterized class uvm_event_callback as a type creates a default specialization.
– Compiling package user_pkg
– Importing package uvm_pkg
– Compiling module top
– Importing package user_pkg

Top level modules:
top
vsim -voptargs=+acc=rmb -c -do “run -all; q” -l questa.log -f questa.tops
Reading D:/questasim64_10.2c/tcl/vsim/pref.tcl

10.2c

vsim -do {run -all; q} -l questa.log -voptargs=+acc=rmb -c top

Loading C:\cygwin64\tmp\Administrator@PC201408061944_dpi_4772\win64_gcc-4.5.0\export_tramp.dll

** Note: (vsim-3812) Design is being optimized…

** Warning: …/…/…/…/src/base/uvm_tr_stream.svh(494): (vopt-2250) Function “do_open_recorder” has no return value assignment.

** Warning: …/…/…/…/src/base/uvm_recorder.svh(678): (vopt-2250) Function “check_handle_kind” has no return value assignment.

// Questa Sim-64

// Version 10.2c Unknown Platform Jul 19 2013

//

// Copyright 1991-2013 Mentor Graphics Corporation

// All Rights Reserved.

//

// THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION

// WHICH IS THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS

// LICENSORS AND IS SUBJECT TO LICENSE TERMS.

//

Loading sv_std.std

Loading work.uvm_pkg(fast)

Loading work.user_pkg(fast)

** Note: (vsim-8785) UVM-aware debugging capabilities will be disabled since no compiled “questa_uvm_pkg” can be found.

This also means that later if you turn on UVM-aware debugging your debug simulations may have

different random seeds from your non-debug simulations.

Loading work.top(fast)

Compiling C:\cygwin64\tmp\Administrator@PC201408061944_dpi_4772\win64_gcc-4.5.0\exportwrapper.c

Loading C:\cygwin64\tmp\Administrator@PC201408061944_dpi_4772\win64_gcc-4.5.0\dpi_auto_compile.dll

** Warning: (vsim-3770) Failed to find user specified function ‘uvm_hdl_check_path’ in DPI C/C++ source files.

Time: 0 ns Iteration: 0 Region: /uvm_pkg File: …/…/…/…/src/uvm_pkg.sv

** Warning: (vsim-3770) Failed to find user specified function ‘uvm_hdl_deposit’ in DPI C/C++ source files.

Time: 0 ns Iteration: 0 Region: /uvm_pkg File: …/…/…/…/src/uvm_pkg.sv

** Warning: (vsim-3770) Failed to find user specified function ‘uvm_hdl_force’ in DPI C/C++ source files.

Time: 0 ns Iteration: 0 Region: /uvm_pkg File: …/…/…/…/src/uvm_pkg.sv

** Warning: (vsim-3770) Failed to find user specified function ‘uvm_hdl_release_and_read’ in DPI C/C++ source files.

Time: 0 ns Iteration: 0 Region: /uvm_pkg File: …/…/…/…/src/uvm_pkg.sv

** Warning: (vsim-3770) Failed to find user specified function ‘uvm_hdl_release’ in DPI C/C++ source files.

Time: 0 ns Iteration: 0 Region: /uvm_pkg File: …/…/…/…/src/uvm_pkg.sv

** Warning: (vsim-3770) Failed to find user specified function ‘uvm_hdl_read’ in DPI C/C++ source files.

Time: 0 ns Iteration: 0 Region: /uvm_pkg File: …/…/…/…/src/uvm_pkg.sv

** Warning: (vsim-3770) Failed to find user specified function ‘uvm_dpi_get_next_arg_c’ in DPI C/C++ source files.

Time: 0 ns Iteration: 0 Region: /uvm_pkg File: …/…/…/…/src/uvm_pkg.sv

** Warning: (vsim-3770) Failed to find user specified function ‘uvm_dpi_get_tool_name_c’ in DPI C/C++ source files.

Time: 0 ns Iteration: 0 Region: /uvm_pkg File: …/…/…/…/src/uvm_pkg.sv

** Warning: (vsim-3770) Failed to find user specified function ‘uvm_dpi_get_tool_version_c’ in DPI C/C++ source files.

Time: 0 ns Iteration: 0 Region: /uvm_pkg File: …/…/…/…/src/uvm_pkg.sv

** Warning: (vsim-3770) Failed to find user specified function ‘uvm_dpi_regcomp’ in DPI C/C++ source files.

Time: 0 ns Iteration: 0 Region: /uvm_pkg File: …/…/…/…/src/uvm_pkg.sv

** Warning: (vsim-3770) Failed to find user specified function ‘uvm_dpi_regexec’ in DPI C/C++ source files.

Time: 0 ns Iteration: 0 Region: /uvm_pkg File: …/…/…/…/src/uvm_pkg.sv

** Warning: (vsim-3770) Failed to find user specified function ‘uvm_dpi_regfree’ in DPI C/C++ source files.

Time: 0 ns Iteration: 0 Region: /uvm_pkg File: …/…/…/…/src/uvm_pkg.sv

** Warning: (vsim-3770) Failed to find user specified function ‘uvm_re_match’ in DPI C/C++ source files.

Time: 0 ns Iteration: 0 Region: /uvm_pkg File: …/…/…/…/src/uvm_pkg.sv

** Warning: (vsim-3770) Failed to find user specified function ‘uvm_dump_re_cache’ in DPI C/C++ source files.

Time: 0 ns Iteration: 0 Region: /uvm_pkg File: …/…/…/…/src/uvm_pkg.sv

** Warning: (vsim-3770) Failed to find user specified function ‘uvm_glob_to_re’ in DPI C/C++ source files.

Time: 0 ns Iteration: 0 Region: /uvm_pkg File: …/…/…/…/src/uvm_pkg.sv

run -all

** Fatal: (vsim-160) …/…/…/…/src/dpi/uvm_svcmd_dpi.svh(27): Null foreign function pointer encountered when calling ‘uvm_dpi_get_next_arg_c’

Time: 0 ns Iteration: 0 Process: /uvm_pkg/#INITIAL#212 File: …/…/…/…/src/dpi/uvm_svcmd_dpi.svh

Fatal error in Module uvm_pkg at …/…/…/…/src/dpi/uvm_svcmd_dpi.svh line 27

HDL call sequence:

Stopped at …/…/…/…/src/dpi/uvm_svcmd_dpi.svh 27 Module uvm_pkg

called from …/…/…/…/src/dpi/uvm_svcmd_dpi.svh 32 Module uvm_pkg

called from …/…/…/…/src/base/uvm_cmdline_processor.svh 247 Function uvm_pkg/uvm_cmdline_processor::new

called from …/…/…/…/src/base/uvm_cmdline_processor.svh 62 Function uvm_pkg/uvm_cmdline_processor::get_inst

called from …/…/…/…/src/base/uvm_root.svh 339 Function uvm_pkg/uvm_root::new

called from …/…/…/…/src/base/uvm_root.svh 271 Function uvm_pkg/uvm_root::m_uvm_get_root

called from …/…/…/…/src/base/uvm_coreservice.svh 184 Function uvm_pkg/uvm_default_coreservice_t::get_root

called from …/…/…/…/src/base/uvm_root.svh 326 Function uvm_pkg/uvm_root::get

called from …/…/…/…/src/base/uvm_root.svh 315 Module uvm_pkg

q

Makefile.questa:34: recipe for target ‘run’ failed
make: *** [run] Error 1

In reply to Romanwang:

Hello Romanwang, which options do you used?
If you read carefully my original question, basically I made 3 experiments:

[] Compile with the default makefile with minimal modifications for 64 bits.
[
] Compile with the make file debugged with my understanding of what could be wrong.
[*] Created a “Frankenstein” compilation with compiled dpi from 1.1d with 1.2 SV files.

Best Regards.

In reply to chavhector:

Hi All,
For me all things are same as chavhector’s.
But I am not sure how to set UVM_HOME variable inside Questasim GUI. Kindly show me
this also.

First I am compiling with following command (this is same as geneated by Makefile):
vlog -timescale “1ns/1ns” …/…/…/src/dpi/uvm_dpi.cc -ccflags -DQUESTA -writetoplevels questa.tops +incdir+…/…/…/src …/…/…/src/uvm.sv +incdir+. hello_world.sv

This as usual completes without any error :

** Warning: …/…/…/src/base/uvm_event.svh(40): (vlog-2181) Use of a parameterized class uvm_event_callback as a type creates a default specialization.

– Compiling module hello_world

– Importing package uvm_pkg

Top level modules:

hello_world

– Compiling DPI C/C++ file …/…/…/src/dpi/uvm_dpi.cc

Now for vsim command I get error as :
vsim -voptargs=+acc=rmb -c -do “run -all; q” -l questa.log -f questa.tops

vsim -do {run -all; q} -l questa.log -voptargs=+acc=rmb -c hello_world

Loading C:\Users\Chandan\AppData\Local\Temp\Chandan@CHANDAN-PC_dpi_5992\win64_gcc-4.5.0\export_tramp.dll

Loading sv_std.std

Loading work.uvm_pkg(fast)

Loading work.hello_world(fast)

** Note: (vsim-8785) UVM-aware debugging capabilities will be disabled since no compiled “questa_uvm_pkg” can be found.

This also means that later if you turn on UVM-aware debugging your debug simulations may have

different random seeds from your non-debug simulations.

Compiling C:\Users\Chandan\AppData\Local\Temp\Chandan@CHANDAN-PC_dpi_5992\win64_gcc-4.5.0\exportwrapper.c

**** Fatal: ** Error: (vsim-3828) Could not link ‘dpi_auto_compile.dll’: cmd = ‘D:/questasim64_10.2c\gcc-4.5.0-mingw64\bin\g++.exe -shared -o “C:\Users\Chandan\AppData\Local\Temp\Chandan@CHANDAN-PC_dpi_5992\win64_gcc-4.5.0\dpi_auto_compile.dll” C:/cygwin/home/Chandan/uvm-1.2/uvm-1.2/examples/simple/hello_world/work_dpi\auto_compile@\win64_gcc-4.5.0\uvm_dpi.o “C:\Users\Chandan\AppData\Local\Temp\Chandan@CHANDAN-PC_dpi_5992\win64_gcc-4.5.0\exportwrapper.o” -L"D:/questasim64_10.2c/win64" -lmtipli’**

(vsim-50) A call to system(D:/questasim64_10.2c\gcc-4.5.0-mingw64\bin\g++.exe -shared -o “C:\Users\Chandan\AppData\Local\Temp\Chandan@CHANDAN-PC_dpi_5992\win64_gcc-4.5.0\dpi_auto_compile.dll” C:/cygwin/home/Chandan/uvm-1.2/uvm-1.2/examples/simple/hello_world/work_dpi\auto_compile@\win64_gcc-4.5.0\uvm_dpi.o “C:\Users\Chandan\AppData\Local\Temp\Chandan@CHANDAN-PC_dpi_5992\win64_gcc-4.5.0\exportwrapper.o” -L"D:/questasim64_10.2c/win64" -lmtipli) returned error code ‘1’.

The logfile contains the following messages:

d:/questasim64_10.2c/gcc-4.5.0-mingw64/bin/…/lib/gcc/x86_64-w64-mingw32/4.5.0/…/…/…/…/x86_64-w64-mingw32/lib/libmingwex.a(lib64_libmingwex_a-wassert.o): In function `_wassert’:

c:\mingw64_crt\mingw-w64-v1.0-20100527\build/…/mingw-w64-crt/misc/wassert.c:44: undefined reference to `__imp_GetModuleFileNameA’

c:\mingw64_crt\mingw-w64-v1.0-20100527\build/…/mingw-w64-crt/misc/wassert.c:53: undefined reference to `__imp_MessageBoxA’

collect2: ld returned 1 exit status

No such file or directory. (errno = ENOENT)

FATAL ERROR while loading design

Error loading design

Also if I try to point to uvm_dpi.dll file from uvm-1.1d I get the same error.

I am not sure if I need to provide some output path in vlog command.

Kindly help.

Regards,
Chandan

In reply to uvm_user235:

In reply to chavhector:
Hi All,
For me all things are same as chavhector’s.
But I am not sure how to set UVM_HOME variable inside Questasim GUI. Kindly show me
this also.
First I am compiling with following command (this is same as geneated by Makefile):
vlog -timescale “1ns/1ns” …/…/…/src/dpi/uvm_dpi.cc -ccflags -DQUESTA -writetoplevels questa.tops +incdir+…/…/…/src …/…/…/src/uvm.sv +incdir+. hello_world.sv

You should try compiling uvm_dpi.cc and generate uvm_dpi.so file separately with g++ compiler.

For Windows OS its,

mkdir <UVM1.2_path>/lib

g++ -g -DQUESTA -w -shared -Bsymbolic -x c <UVM1.2_path>/src/dpi/uvm_dpi.cc -o <UVM1.2_path>/lib/uvm_dpi.so

vlog <compile files and flags> -sv_lib <UVM1.2_path>/lib/uvm_dpi
..

Or if you don’t want uvm-1.2 DPI then use +define+UVM_NO_DPI with vlog command.
Refer uvm-1.2/examples/Makefile.questa in UVM source files for more details.

In reply to mayurkubavat:

Hi ,

Thanks for your response.
I think the problem is that Questasim’s C++ compiler for Windows 64 bit is not available and Cygwin’s is not compatible.
With pre compiled library it works now for me :

qverilog -timescale "1ns/1ns" +acc=rmb +incdir+../../../../src/uvm.sv +incdir+../../../../src+../sv  ubus_tb_top.sv -R -sv_lib ../../../../win64/uvm_dpi  +UVM_TESTNAME=test_2m_4s -c -do "run -all; q" -l questa.log

Regards,
Chandan