ovm_report_handler

The ovm_report_handler is the class to which most methods in ovm_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 ovm_report_object for information on the OVM reporting mechanism.

The relationship between ovm_report_object (a base class for ovm_component) and ovm_report_handler is typically one to one, but it can be many to one if several ovm_report_objects are configured to use the same ovm_report_handler_object.  See ovm_report_object::set_report_handler.

The relationship between ovm_report_handler and ovm_report_server is many to one.

Summary
ovm_report_handler
The ovm_report_handler is the class to which most methods in ovm_report_object delegate.
Class Declaration
class ovm_report_handler
Methods
newCreates and initializes a new ovm_report_handler object.
run_hooksThe run_hooks method is called if the OVM_CALL_HOOK action is set for a report.
get_verbosity_levelReturns the configured maximum verbosity level.
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., ovm_report_error) in ovm_report_object.
format_actionReturns a string representation of the action, e.g., “DISPLAY”.

new

function new()

Creates and initializes a new ovm_report_handler object.

run_hooks

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

The run_hooks method is called if the OVM_CALL_HOOK action is set for a report.  It first calls the client’s <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()

Returns the configured maximum verbosity level.

get_action

function ovm_action get_action(ovm_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 OVM_FILE get_file_handle(ovm_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(ovm_severity severity,
string name,
string id,
string message,
int verbosity_level,
string filename,
int line,
ovm_report_object client)

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

format_action

function string format_action(ovm_action action)

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

class ovm_report_handler
The ovm_report_handler is the class to which most methods in ovm_report_object delegate.
virtual class ovm_report_object extends ovm_object
The ovm_report_object provides an interface to the OVM reporting facility.
function new()
Creates and initializes a new ovm_report_handler object.
virtual function bit run_hooks(ovm_report_object client,
ovm_severity severity,
string id,
string message,
int verbosity,
string filename,
int line)
The run_hooks method is called if the OVM_CALL_HOOK action is set for a report.
Callback the report hook methods
function int get_verbosity_level()
Returns the configured maximum verbosity level.
function ovm_action get_action(ovm_severity severity,
string id)
Returns the action associated with the given severity and id.
function OVM_FILE get_file_handle(ovm_severity severity,
string id)
Returns the file descriptor associated with the given severity and id.
virtual function void report(ovm_severity severity,
string name,
string id,
string message,
int verbosity_level,
string filename,
int line,
ovm_report_object client)
This is the common handler method used by the four core reporting methods (e.g., ovm_report_error) in ovm_report_object.
function string format_action(ovm_action action)
Returns a string representation of the action, e.g., “DISPLAY”.
function void set_report_handler(ovm_report_handler handler)
Sets the report handler, overwriting the default instance.
class ovm_report_server
ovm_report_server is a global server that processes all of the reports generated by an ovm_report_handler.