Jump to content

Migrating to UVM 1.2

Recommended Posts


Couple of days ago I watched a presentation of UVM1.2 by Tom Fitzpatrick, UVM evanghelist at Mentor, and I thought to give it a try and port one of our environments based on UVM1.1d. Bellow is the story I've been through.

1. Download UVM 1.2

I started by cloning UVM1.2 on my local machine:

git clone http://git.code.sf.net/p/uvm/code uvm-code

This will make a clone of uvm code on your computer from >>sourceforge.net<<. The clone is on branch master so you have to switch to branch UVM_1_2.


cd uvm-code
git checkout UVM_1_2

Or the short way :

git clone http://git.code.sf.net/p/uvm/code uvm-code -b UVM_1_2

2. VE

I experimented with a VE that was complex enough to make the porting interesting; it features:

  • 3 different agent instances (passive and active) for 3 different protocols
  • includes configuration registers, including RC registers
  • includes virtual sequences
  • there was a regression with fixed number of tests that we run (or rerun with same seeds)
  • has a regression with fixed number of tests that I can run (or rerun with same seeds) and that gets 100% coverage

I compiled and run individual test using NCSIM, QUESTA and VCS and I run regressions using NCSIM and QUESTA.

3. Using NCSIM
Compilation stage was done by setting two flags in irun :



Individual test runs indicate a negligible difference :

  • the log has identical size
  • the test duration is about the same (+/- 5 sec for a 2..7 min test)

Regressions results :

  • regression duration was about the same for a one hour regression  (+/- 3 min); for both uvm versions I used the same regression.
  • I also run different regressions for each uvm version but with the same number of tests (50,100,200,300). The collected coverage was about the same but still worth mentioning that for UVM 1.2 was slightly lower by 1-2%. Negligible but recurent.
  • the number of runs to reach 100% functional coverage is a bit larger in case of UVM1.2

4. Using VCS

Compilation stage was  done by changing uvm path :


export VCS_UVM_HOME=/path/to/new/uvm

Individual test runs indicate a negligible difference :

  • the test duration is about the same (+/- 5 sec for a 2..7 min test)
  • log has the same dimension for both versions (I was getting a number of warnings in both UVM1.1d and UVM1.2 that I didn't bother to fix)

5. Using QUESTA

Compilation stage requires a little bit more effort, but it's not a chore. Basically I had to precompile and get a shared object "uvm_dpi64.so" :

export UVM_HOME=/uvm-code/distrib
vlib work
vlog +incdir+$UVM_HOME/src $UVM_HOME/src/uvm_pkg.sv
cd $UVM_HOME/examples
export MTI_HOME=/mentor/10.2a-64bit/questa_sim
make LIBNAME=uvm_dpi64 BITS=64 -f Makefile.questa dpi_lib
cd -

To run a test in  "run.sh" I used the shared object:


vsim -sv_lib $UVM_HOME/lib/uvm_dpi64

Individual test runs indicate a negligible difference for log size and test duration.

6. Conclusions :

  • Migrating to UVM 1.2 it's easy and there is no compilation issues.
  • Results indicate pretty similar behavior for all 3 simulators when it comes to performance, log size or random stability.
  • Results collected in the regression were aligned with what I've seen in the individual runs.
  • Although there are new features added to UVM1.2 those were not impacting in a visible way the VE.
  • I think the new macro `uvm_info_begin|end is nice and quite useful add: implementing messages it's easier and they are more readable than before.

               task task_name ();
                `uvm_info_begin("ID", "MSG", verbosity)
                `uvm_message_add_object(my object)
                `uvm_message_add_int(my int, UVM_DEC)

  • UVM 1.2 signaled an error which UVM 1.1d didn't:


  • UVM1.1d did not signal that I used UVM_HIGH instead of UVM_INFO. Probably because in UVM 1.2 these are real enums and the type mismatch can be seen.
  • The VE does not use the phasing mechanism, thus some of the features of UVM1.2 were not exercised.


I also uploaded this guide on AMIQ's Blog page so you can check there for more updates as well.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...