How To: Use UVM in a Simulation

Modified on Wed, 24 Apr at 8:16 AM

How To: Use UVM in a Simulation

1. Include uvm_macros.svh and import the UVM package in all your design files that require them by including these 2 lines at the top of your design file:


 

`include "uvm_macros.svh"
import uvm_pkg::*;

 

2. Put the UVM code in your include file path and compile the UVM package by using the -uvm <uvm_version> option, along with your design files, where <uvm_version> is one of 1.2, 1.1d, or 1.1b. :


 

mdc dsim -a '-genimage image -uvm <uvm_version> ...'

 

3. Load the UVM DPI library by using the -uvm <uvm_version> option, and UVM testcase during runtime:


 

mdc dsim -a '-image image -uvm <uvm_version> +UVM_NO_RELNOTES +UVM_TESTNAME=...'

 

For more information on using UVM, refer to the article User Guide: DSim Using Verification Frameworks: UVM.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article