SystemVerilog OVM or UVM Library Compilation

Typically the OVM or UVM libraries are compiled using directives like:

+incdir+/path/to/xvm/src
/path/to/xvm/src/xvm_pkg.sv

Using the -ovm or -uvm directives

You can use the -ovm or -uvm directives to compile the OVM or UVM libraries. They are shortcuts for the explicit directives above.

For -uvm:

  1. If the $UVM_HOME system variable is specified, use that library.

  2. If the $DVT_UVM_HOME system variable is specified, use that library. If you launch DVT using one of the utility scripts that ship with DVT, $DVT_UVM_HOME is set by default to the most recent uvm library in $DVT_HOME/predefined_projects/libs (if you’re using DVT Eclipse or the DVT for VS Code pre-packed distribution) or $DVT_HOME/common/predefined_projects/libs (if you’re using the DVT extension from the VS Code Marketplace).

  3. If $DVT_UVM_HOME is not defined, falls back to $DVT_HOME/predefined_projects/libs/uvm-1.2 (if you’re using DVT Eclipse or the DVT for VS Code pre-packed distribution) or $DVT_HOME/common/predefined_projects/libs/uvm-1.2 (if you’re using the DVT extension from the VS Code Marketplace).

The -ovm directive works in a similar way.

Note

At any time you can set a system variable using for example:

+dvt_setenv+UVM_HOME=/path/to/xvm