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