ModelSim SE 6.6d and UVM

Hi,

I’m trying to use UVM with ModelSim SE 6.6d. (I am new to ModelSim and UVM)
Therefore I downloaded UVM package and the examples from the book “A Practical Guide To Adopting the Universal Verification Methodology (UVM)”

Then I compiled one of the examples using the compile Dialog of ModelSim. In the compile Options I added $UVM_HOME/src with

+incdir+ …

It compiles correctly, but during simulation I get the following error (and a lot of warnings):

Null foreign function pointer encountered when calling ‘dpi_next_arg_c’

Did I forget something?
Do I have to build a library for the UVM package? (And when yes: How do I do this?)

Thanks,
Melanie

The reason for the message is that UVM 1.x uses a DPI shared object which has to be included in the vsim command line for versions of Questa prior to 10.0b

For 6.6d you have to compile the UVM shared object by going to the UVM examples directory and running:

make -f Makefile.Questa

This will create a shared object in the directory:

$UVM_HOME/lib

where the dpi shared object is named according to the platform you are running on. Note that you should have also installed the GCC compiler for this to work.

If you can move to Questa 6.6e this has already been done for you and you will find the shared object in:

$UVM_HOME/verilog_src/uvm_1.0p1/lib/uvm_dpi.so

Set an environment variable to point to this:

setenv UVM_LIB $UVM_HOME/verilog/uvm_1.0p1/lib/uvm_dpi

To load the shared object at simulation time you will need to use the -sv_lib switch:

vsim my_tb +UVM_TESTNAME=my_test -sv_lib $UVM_LIB

BTW the book you are referencing is about a year old now, and was written for UVM 1.0EA which pre-dates the UVM proper. For an alternative view on how to use the UVM you might like to take a look at the on-line cookbook which you can find at:

http://verificationacademy.com/uvm-ovm

The cookbook resource contains downloadable examples which assume the use of Questa 10.0b in the Makefiles, but you should be able to get them to compile and work following the above procedure.

In reply to mperyer:

Thank you. That helped a lot.

I will take a look at the on-lone cookbook. Thanks for the advice

In reply to mdiepenbeck:

Hello,
I am trying to run the make file in the basic example using Windows ModelsimSE-64 10.0b.

make -f Makefile.questa dpi_libWin

I get numerous errors related to mtipli.dll such as this:

/cygdrive/c/modeltech64_10.0b/win64/mtipli.dll:194:1: error: missing terminating " character

I had to make a few modification to the Makefile. Are we supposed to be able to compile the UVM examples with modelsim? Or is it necessary to make more changes to files to get it running properly?

Thank you for the assistance!

In reply to mwhite_cp:

I can’t explain the error message you are seeing without knowing all the modifications you made. Make sure you read http://go.mentor.com/uvm1-0-questa.

Although the examples will compile on Modelsim, you need Questa to run the UVM examples since they utilize constructs like randomization that only Questa supports.