How To: Use UVM in a Simulation
1. Load the desired UVM package.
2. 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::*;
3. Put the UVM code in your include file path and compile the UVM package by using the
-uvm default option, along with your design files:
mdc dsim -a '-genimage image -uvm default ...'
4. Load the UVM DPI library by using the
-uvm default option, and UVM testcase during runtime:
mdc dsim -a '-image image -uvm default +UVM_NO_RELNOTES +UVM_TESTNAME=...'
For more information on using UVM, refer to the article User Guide: DSim Using Verification Frameworks: UVM.