Globals

UVMkit » 1800.2-2017
Summary
Globals
Simulation Control
run_testConvenience function for uvm_top.run_test().
Reporting
uvm_report_enabledReturns 1 if the configured verbosity in uvm_top for this severity/id is greater than or equal to verbosity else returns 0.
uvm_report
uvm_report_info
uvm_report_warning
uvm_report_error
uvm_report_fatalThese methods, defined in package scope, are convenience functions that delegate to the corresponding component methods in uvm_top.
uvm_process_report_messageThis method, defined in package scope, is a convenience function that delegate to the corresponding component method in uvm_top.
MiscellaneousThe library implements the following public API at the package level beyond what is documented in IEEE 1800.2.
uvm_string_to_bitsConverts an input string to its bit-vector equivalent.
uvm_initImplementation of uvm_init, as defined in section F.3.1.3 in 1800.2-2017.
uvm_bits_to_stringConverts an input bit-vector to its string equivalent.
uvm_wait_for_nba_regionThis task will block until SystemVerilog’s NBA region (or Re-NBA region if called from a program context).
uvm_split_stringReturns a queue of strings, values, that is the result of the str split based on the sep.

run_test

task run_test ( string  test_name  =  "" )

Convenience function for uvm_top.run_test().  See uvm_root for more information.

uvm_report_enabled

function int uvm_report_enabled ( int  verbosity,   
uvm_severity  severity  =  UVM_INFO,
string  id  =  "" )

Returns 1 if the configured verbosity in uvm_top for this severity/id is greater than or equal to verbosity else returns 0.

See also uvm_report_object::uvm_report_enabled.

Static methods of an extension of uvm_report_object, e.g. uvm_component-based objects, cannot call uvm_report_enabled because the call will resolve to the uvm_report_object::uvm_report_enabled, which is non-static.  Static methods cannot call non-static methods of the same class.

uvm_report

function void uvm_report( uvm_severity  severity,   
string  id,   
string  message,   
int  verbosity  =  (severity == uvm_severity'(UVM_ERROR)) ? UVM_LOW : (severity == uvm_severity'(UVM_FATAL)) ? UVM_NONE : UVM_MEDIUM,
string  filename  =  "",
int  line  =  0,
string  context_name  =  "",
bit  report_enabled_checked  =  0 )

uvm_report_info

function void uvm_report_info( string  id,   
string  message,   
int  verbosity  =  UVM_MEDIUM,
string  filename  =  "",
int  line  =  0,
string  context_name  =  "",
bit  report_enabled_checked  =  0 )

uvm_report_warning

function void uvm_report_warning( string  id,   
string  message,   
int  verbosity  =  UVM_MEDIUM,
string  filename  =  "",
int  line  =  0,
string  context_name  =  "",
bit  report_enabled_checked  =  0 )

uvm_report_error

function void uvm_report_error( string  id,   
string  message,   
int  verbosity  =  UVM_NONE,
string  filename  =  "",
int  line  =  0,
string  context_name  =  "",
bit  report_enabled_checked  =  0 )

uvm_report_fatal

function void uvm_report_fatal( string  id,   
string  message,   
int  verbosity  =  UVM_NONE,
string  filename  =  "",
int  line  =  0,
string  context_name  =  "",
bit  report_enabled_checked  =  0 )

These methods, defined in package scope, are convenience functions that delegate to the corresponding component methods in uvm_top.  They can be used in module-based code to use the same reporting mechanism as class-based components.  See uvm_report_object for details on the reporting mechanism.

Note: Verbosity is ignored for warnings, errors, and fatals to ensure users do not inadvertently filter them out.  It remains in the methods for backward compatibility.

uvm_process_report_message

function void uvm_process_report_message( uvm_report_message  report_message )

This method, defined in package scope, is a convenience function that delegate to the corresponding component method in uvm_top.  It can be used in module-based code to use the same reporting mechanism as class-based components.  See uvm_report_object for details on the reporting mechanism.

Miscellaneous

The library implements the following public API at the package level beyond what is documented in IEEE 1800.2.

uvm_string_to_bits

function logic[UVM_LARGE_STRING:0] uvm_string_to_bits( string  str )

Converts an input string to its bit-vector equivalent.  Max bit-vector length is approximately 14000 characters.

uvm_init

function void uvm_init( uvm_coreservice_t  cs  =  null )

Implementation of uvm_init, as defined in section F.3.1.3 in 1800.2-2017.

Note: The LRM states that subsequent calls to uvm_init after the first are silently ignored, however there are scenarios wherein the implementation breaks this requirement.

If the core state (see <get_core_state>) is UVM_CORE_PRE_INIT when uvm_init, is called, then the library can not determine the appropriate core service.  As such, the default core service will be constructed and a fatal message shall be generated.

If the core state is past UVM_CORE_PRE_INIT, and cs is a non-null core service instance different than the value passed to the first uvm_init call, then the library will generate a warning message to alert the user that this call to uvm_init is being ignored.

@uvm-contrib This API represents a potential contribution to IEEE 1800.2

uvm_bits_to_string

function string uvm_bits_to_string( logic  [UVM_LARGE_STRING:0]  str )

Converts an input bit-vector to its string equivalent.  Max bit-vector length is approximately 14000 characters.

uvm_wait_for_nba_region

task uvm_wait_for_nba_region

This task will block until SystemVerilog’s NBA region (or Re-NBA region if called from a program context).  The purpose is to continue the calling process only after allowing other processes any number of delta cycles (#0) to settle out.

@uvm-accellera The details of this API are specific to the Accellera implementation, and are not being considered for contribution to 1800.2

uvm_split_string

function automatic void uvm_split_string ( string  str,
byte  sep,
ref  string  values[$] )

Returns a queue of strings, values, that is the result of the str split based on the sep.  For example:

uvm_split_string("1,on,false", ",", splits);

Results in the ‘splits’ queue containing the three elements: 1, on and false.

uvm_enum_wrapper#(T)

The uvm_enum_wrapper#(T) class is a utility mechanism provided as a convenience to the end user.  It provides a <from_name> method which is the logical inverse of the System Verilog name method which is built into all enumerations.

Summary
uvm_enum_wrapper#(T)
The uvm_enum_wrapper#(T) class is a utility mechanism provided as a convenience to the end user.
Class Declaration
class uvm_enum_wrapper#(
    type  T  =  uvm_active_passive_enum
)
task run_test ( string  test_name  =  "" )
Convenience function for uvm_top.run_test().
function int uvm_report_enabled ( int  verbosity,   
uvm_severity  severity  =  UVM_INFO,
string  id  =  "" )
Returns 1 if the configured verbosity in uvm_top for this severity/id is greater than or equal to verbosity else returns 0.
function void uvm_report( uvm_severity  severity,   
string  id,   
string  message,   
int  verbosity  =  (severity == uvm_severity'(UVM_ERROR)) ? UVM_LOW : (severity == uvm_severity'(UVM_FATAL)) ? UVM_NONE : UVM_MEDIUM,
string  filename  =  "",
int  line  =  0,
string  context_name  =  "",
bit  report_enabled_checked  =  0 )
function void uvm_report_info( string  id,   
string  message,   
int  verbosity  =  UVM_MEDIUM,
string  filename  =  "",
int  line  =  0,
string  context_name  =  "",
bit  report_enabled_checked  =  0 )
function void uvm_report_warning( string  id,   
string  message,   
int  verbosity  =  UVM_MEDIUM,
string  filename  =  "",
int  line  =  0,
string  context_name  =  "",
bit  report_enabled_checked  =  0 )
function void uvm_report_error( string  id,   
string  message,   
int  verbosity  =  UVM_NONE,
string  filename  =  "",
int  line  =  0,
string  context_name  =  "",
bit  report_enabled_checked  =  0 )
function void uvm_report_fatal( string  id,   
string  message,   
int  verbosity  =  UVM_NONE,
string  filename  =  "",
int  line  =  0,
string  context_name  =  "",
bit  report_enabled_checked  =  0 )
These methods, defined in package scope, are convenience functions that delegate to the corresponding component methods in uvm_top.
function void uvm_process_report_message( uvm_report_message  report_message )
This method, defined in package scope, is a convenience function that delegate to the corresponding component method in uvm_top.
function logic[UVM_LARGE_STRING:0] uvm_string_to_bits( string  str )
Converts an input string to its bit-vector equivalent.
function void uvm_init( uvm_coreservice_t  cs  =  null )
Implementation of uvm_init, as defined in section F.3.1.3 in 1800.2-2017.
function string uvm_bits_to_string( logic  [UVM_LARGE_STRING:0]  str )
Converts an input bit-vector to its string equivalent.
task uvm_wait_for_nba_region
This task will block until SystemVerilog’s NBA region (or Re-NBA region if called from a program context).
function automatic void uvm_split_string ( string  str,
byte  sep,
ref  string  values[$] )
Returns a queue of strings, values, that is the result of the str split based on the sep.
The uvm_root class serves as the implicit top-level and phase controller for all UVM components.
function int uvm_report_enabled( int  verbosity,   
uvm_severity  severity  =  UVM_INFO,
string  id  =  "" )
Returns 1 if the configured verbosity for this severity/id is greater than or equal to verbosity else returns 0.
class uvm_report_object extends uvm_object
The uvm_report_object provides an interface to the UVM reporting facility.
class uvm_enum_wrapper#( type  T  =  uvm_active_passive_enum )
The uvm_enum_wrapper#(T) class is a utility mechanism provided as a convenience to the end user.