uvm_report_handler

The uvm_report_handler is the class to which most methods in uvm_report_object delegate.  It stores the maximum verbosity, actions, and files that affect the way reports are handled.

The report handler is not intended for direct use.  See uvm_report_object for information on the UVM reporting mechanism.

The relationship between uvm_report_object (a base class for uvm_component) and uvm_report_handler is typically one to one, but it can be many to one if several uvm_report_objects are configured to use the same uvm_report_handler_object.  See uvm_report_object::set_report_handler.

The relationship between uvm_report_handler and uvm_report_server is many to one.

Summary
uvm_report_handler
The uvm_report_handler is the class to which most methods in uvm_report_object delegate.
Methods
newCreates and initializes a new uvm_report_handler object.
run_hooksThe run_hooks method is called if the UVM_CALL_HOOK action is set for a report.
get_verbosity_levelReturns the verbosity associated with the given severity and id.
get_actionReturns the action associated with the given severity and id.
get_file_handleReturns the file descriptor associated with the given severity and id.
reportThis is the common handler method used by the four core reporting methods (e.g., uvm_report_error) in uvm_report_object.
format_actionReturns a string representation of the action, e.g., “DISPLAY”.

new

function new()

Creates and initializes a new uvm_report_handler object.

run_hooks

virtual function bit run_hooks( uvm_report_object  client,
uvm_severity  severity,
string  id,
string  message,
int  verbosity,
string  filename,
int  line )

The run_hooks method is called if the UVM_CALL_HOOK action is set for a report.  It first calls the client’s uvm_report_object::report_hook method, followed by the appropriate severity-specific hook method.  If either returns 0, then the report is not processed.

get_verbosity_level

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

Returns the verbosity associated with the given severity and id.

First, if there is a verbosity associated with the (severity,id) pair, return that.  Else, if there is an verbosity associated with the id, return that.  Else, return the max verbosity setting.

get_action

function uvm_action get_action( uvm_severity  severity,
string  id )

Returns the action associated with the given severity and id.

First, if there is an action associated with the (severity,id) pair, return that.  Else, if there is an action associated with the id, return that.  Else, if there is an action associated with the severity, return that.  Else, return the default action associated with the severity.

get_file_handle

function UVM_FILE get_file_handle( uvm_severity  severity,
string  id )

Returns the file descriptor associated with the given severity and id.

First, if there is a file handle associated with the (severity,id) pair, return that.  Else, if there is a file handle associated with the id, return that.  Else, if there is an file handle associated with the severity, return that.  Else, return the default file handle.

report

virtual function void report( uvm_severity  severity,   
string  name,   
string  id,   
string  message,   
int  verbosity_level  =  UVM_MEDIUM,
string  filename  =  "",
int  line  =  0,
uvm_report_object  client  =  null )

This is the common handler method used by the four core reporting methods (e.g., uvm_report_error) in uvm_report_object.

format_action

function string format_action( uvm_action  action )

Returns a string representation of the action, e.g., “DISPLAY”.

class uvm_report_object extends uvm_object
The uvm_report_object provides an interface to the UVM reporting facility.
function new()
Creates and initializes a new uvm_report_handler object.
virtual function bit run_hooks( uvm_report_object  client,
uvm_severity  severity,
string  id,
string  message,
int  verbosity,
string  filename,
int  line )
The run_hooks method is called if the UVM_CALL_HOOK action is set for a report.
Callback the report hook methods
function int get_verbosity_level( uvm_severity  severity  =  UVM_INFO,
string  id  =  "" )
Returns the verbosity associated with the given severity and id.
function uvm_action get_action( uvm_severity  severity,
string  id )
Returns the action associated with the given severity and id.
function UVM_FILE get_file_handle( uvm_severity  severity,
string  id )
Returns the file descriptor associated with the given severity and id.
virtual function void report( uvm_severity  severity,   
string  name,   
string  id,   
string  message,   
int  verbosity_level  =  UVM_MEDIUM,
string  filename  =  "",
int  line  =  0,
uvm_report_object  client  =  null )
This is the common handler method used by the four core reporting methods (e.g., uvm_report_error) in uvm_report_object.
function string format_action( uvm_action  action )
Returns a string representation of the action, e.g., “DISPLAY”.
function void set_report_handler( uvm_report_handler  handler )
Sets the report handler, overwriting the default instance.
uvm_report_server is a global server that processes all of the reports generated by an uvm_report_handler.
virtual function bit report_hook( string  id,
string  message,
int  verbosity,
string  filename,
int  line )
These hook methods can be defined in derived classes to perform additional actions when reports are issued.