Globals

Summary
Globals
Simulation Control
run_testConvenience function for ovm_top.run_test().
ovm_test_doneAn instance of the ovm_test_done_objection class, this object is used by components to coordinate when to end the currently running task-based phase.
global_stop_requestConvenience function for ovm_top.stop_request().
set_global_timeoutConvenience function for ovm_top.phase_timeout = timeout.
set_global_stop_timeoutConvenience function for ovm_top.stop_timeout = timeout.
Reporting
ovm_report_enabledReturns 1 if the configured verbosity in <ovm_top> is greater than verbosity and the action associated with the given severity and id is not OVM_NO_ACTION, else returns 0.
ovm_report_info
ovm_report_warning
ovm_report_error
ovm_report_fatalThese methods, defined in package scope, are convenience functions that delegate to the corresponding component methods in ovm_top.
Verbosity is ignored for warnings, errors, and fatals to ensure usersdo not inadvertently filter them out.
Configuration
set_config_intThis is the global version of set_config_int in ovm_component.
set_config_objectThis is the global version of set_config_object in ovm_component.
set_config_stringThis is the global version of set_config_string in ovm_component.
Miscellaneous
ovm_is_matchReturns 1 if the two strings match, 0 otherwise.
ovm_string_to_bitsConverts an input string to its bit-vector equivalent.
ovm_bits_to_stringConverts an input bit-vector to its string equivalent.
ovm_wait_for_nba_regionCall this task to wait for a delta cycle.

run_test

task run_test (string test_name = "")

Convenience function for ovm_top.run_test().  See ovm_root for more information.

ovm_test_done

ovm_test_done_objection ovm_test_done = ovm_test_done_objection::get()

An instance of the ovm_test_done_objection class, this object is used by components to coordinate when to end the currently running task-based phase.  When all participating components have dropped their raised objections, an implicit call to global_stop_request is issued to end the run phase (or any other task-based phase).

global_stop_request

function void global_stop_request()

Convenience function for ovm_top.stop_request().  See ovm_root for more information.

set_global_timeout

function void set_global_timeout(time timeout)

Convenience function for ovm_top.phase_timeout = timeout.  See ovm_root for more information.

set_global_stop_timeout

function void set_global_stop_timeout(time timeout)

Convenience function for ovm_top.stop_timeout = timeout.  See ovm_root for more information.

ovm_report_enabled

function bit ovm_report_enabled (int verbosity,  
ovm_severity severity = OVM_INFO,
string id = "")

Returns 1 if the configured verbosity in <ovm_top> is greater than verbosity and the action associated with the given severity and id is not OVM_NO_ACTION, else returns 0.

See also ovm_report_object::ovm_report_enabled.

Static methods of an extension of ovm_report_object, e.g. ovm_compoent-based objects, can not call ovm_report_enabled because the call will resolve to the ovm_report_object::ovm_report_enabled, which is non-static.  Static methods can not call non-static methods of the same class.

ovm_report_info

function void ovm_report_info(string id,  
string message,  
int verbosity =  OVM_MEDIUM,
string filename =  "",
int line =  0)

ovm_report_warning

function void ovm_report_warning(string id,  
string message,  
int verbosity =  OVM_MEDIUM,
string filename =  "",
int line =  0)

ovm_report_error

function void ovm_report_error(string id,  
string message,  
int verbosity =  OVM_LOW,
string filename =  "",
int line =  0)

ovm_report_fatal

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

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.

set_config_int

function void set_config_int (string inst_name,
string field_name,
ovm_bitstream_t value)

This is the global version of set_config_int in ovm_component.  This function places the configuration setting for an integral field in a global override table, which has highest precedence over any component-level setting.  See ovm_component::set_config_int for details on setting configuration.

set_config_object

function void set_config_object (string inst_name,  
string field_name,  
ovm_object value,  
bit clone = 1)

This is the global version of set_config_object in ovm_component.  This function places the configuration setting for an object field in a global override table, which has highest precedence over any component-level setting.  See ovm_component::set_config_object for details on setting configuration.

set_config_string

function void set_config_string (string inst_name,
string field_name,
string value)

This is the global version of set_config_string in ovm_component.  This function places the configuration setting for an string field in a global override table, which has highest precedence over any component-level setting.  See ovm_component::set_config_string for details on setting configuration.

ovm_is_match

`ifdef OVM_DPI import "DPI" function bit ovm_is_match (string expr,
string str)

Returns 1 if the two strings match, 0 otherwise.

The first string, expr, is a string that may contain ‘*’ and ‘?’ characters.  A * matches zero or more characters, and ? matches any single character.  The 2nd argument, str, is the string begin matched against.  It must not contain any wildcards.

ovm_string_to_bits

function logic[OVM_LARGE_STRING:0] ovm_string_to_bits(string str)

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

ovm_bits_to_string

function string ovm_bits_to_string(logic [OVM_LARGE_STRING:0] str)

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

ovm_wait_for_nba_region

task ovm_wait_for_nba_region

Call this task to wait for a delta cycle.  Program blocks don’t have an nba so just delay for a #0 in a program block.

task run_test (string test_name = "")
Convenience function for ovm_top.run_test().
ovm_test_done_objection ovm_test_done = ovm_test_done_objection::get()
An instance of the ovm_test_done_objection class, this object is used by components to coordinate when to end the currently running task-based phase.
class ovm_test_done_objection extends ovm_objection
Built-in end-of-test coordination
function void global_stop_request()
Convenience function for ovm_top.stop_request().
function void set_global_timeout(time timeout)
Convenience function for ovm_top.phase_timeout = timeout.
function void set_global_stop_timeout(time timeout)
Convenience function for ovm_top.stop_timeout = timeout.
function bit ovm_report_enabled (int verbosity,  
ovm_severity severity = OVM_INFO,
string id = "")
Returns 1 if the configured verbosity in ovm_top is greater than verbosity and the action associated with the given severity and id is not OVM_NO_ACTION, else returns 0.
function void ovm_report_info(string id,  
string message,  
int verbosity =  OVM_MEDIUM,
string filename =  "",
int line =  0)
function void ovm_report_warning(string id,  
string message,  
int verbosity =  OVM_MEDIUM,
string filename =  "",
int line =  0)
function void ovm_report_error(string id,  
string message,  
int verbosity =  OVM_LOW,
string filename =  "",
int line =  0)
function void set_config_int (string inst_name,
string field_name,
ovm_bitstream_t value)
This is the global version of set_config_int in ovm_component.
virtual class ovm_component extends ovm_report_object
The ovm_component class is the root base class for OVM components.
function void set_config_object (string inst_name,  
string field_name,  
ovm_object value,  
bit clone = 1)
This is the global version of set_config_object in ovm_component.
function void set_config_string (string inst_name,
string field_name,
string value)
This is the global version of set_config_string in ovm_component.
`ifdef OVM_DPI import "DPI" function bit ovm_is_match (string expr,
string str)
Returns 1 if the two strings match, 0 otherwise.
function logic[OVM_LARGE_STRING:0] ovm_string_to_bits(string str)
Converts an input string to its bit-vector equivalent.
function string ovm_bits_to_string(logic [OVM_LARGE_STRING:0] str)
Converts an input bit-vector to its string equivalent.
task ovm_wait_for_nba_region
Call this task to wait for a delta cycle.
function int ovm_report_enabled(int verbosity,  
ovm_severity severity = OVM_INFO,
string id = "")
Returns 1 if the configured verbosity for this object is greater than verbosity and the action associated with the given severity and id is not OVM_NO_ACTION, else returns 0.
class ovm_report_object extends ovm_object
The ovm_report_object provides an interface to the OVM reporting facility.
virtual function void set_config_int (string inst_name,
string field_name,
ovm_bitstream_t value)
virtual function void set_config_object (string inst_name,  
string field_name,  
ovm_object value,  
bit clone = 1)
Calling set_config_* causes configuration settings to be created and placed in a table internal to this component.
virtual function void set_config_string (string inst_name,
string field_name,
string value)