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.