DVT SystemVerilog IDE User Guide
Rev. 24.1.15, 10 July 2024

41.12 UVM Library Compilation Troubleshooting

This application note covers several types of configuration issues you might encounter when working with the UVM library:

1) Error messages like:

  • Error: SYSTEM_VERILOG_2012: Cannot open `include file "uvm_macros.svh"

  • Error: SYSTEM_VERILOG_2012: Undefined macro name: `uvm_object_utils_begin

  • Error: EXTEND_CLASS: Extending non existing class 'uvm_agent

These errors indicate that the UVM library was not compiled or that the uvm_pkg has not been imported properly. To check whether the UVM library was compiled:

If the library is not compiled add the '-uvm' argument to your build file or one of the compatibility modes specific flags.

Also make sure the uvm package is imported in the scope where the errors are reported.

2) Error messages like:

  • Error: METHOD_CALL_ARGUMENTS: Expecting maximum '0' arguments when calling 'new', found '1'

  • Error: ILLEGAL_ASSIGNMENT: Illegal assignment of 'literal_string' to argument 'stream' of type 'uvm_tr_stream'

  • Error: UNDECLARED_IDENTIFIER: Identifier 'factory' is not declared

These errors can happen when there is a mismatch between the UVM version that is compiled by DVT and the one used by the project.

For example there are two scenarios for the METHOD_CALL_ARGUMENTS error:

  • 2a) The first one is the mismatch scenario.

    • The error is thrown for classes that do not define a constructor with a string argument for the name.

    • Although this is not an issue with older UVM versions such as uvm-1.1d, it is an issue for uvm-1.2 :

      • (uvm-1.1d)

      • (uvm-1.2)

    • From the pictures above it can be observed that by default the uvm-1.2 version enforces a constructor with a string argument.

    • To quickly check which version was compiled by DVT, disable the Content Filters using the toolbar button , open the Macros View and search for uvm_version.

    • To compile a different UVM version see SystemVerilog OVM or UVM Library Compilation.

  • 2b) The second scenario is where the simulator CLI gets passed +define+UVM_OBJECT_DO_NOT_NEED_CONSTRUCTOR but the directive is missing from .dvt/default.build .

3) Error messages like:

  • Error: SYSTEM_VERILOG_2012: Undefined macro name: `uvm_record_attribute

This typically happens when compiling the uvm-1.1c version and not specifiying a compatibility mode. The solution is to specify a compatibility mode.