uvm_report_object

The uvm_report_object provides an interface to the UVM reporting facility.  Through this interface, components issue the various messages that occur during simulation.  Users can configure what actions are taken and what file(s) are output for individual messages from a particular component or for all messages from all components in the environment.  Defaults are applied where there is no explicit configuration.

Most methods in uvm_report_object are delegated to an internal instance of an uvm_report_handler, which stores the reporting configuration and determines whether an issued message should be displayed based on that configuration.  Then, to display a message, the report handler delegates the actual formatting and production of messages to a central uvm_report_server.

A report consists of an id string, severity, verbosity level, and the textual message itself.  They may optionally include the filename and line number from which the message came.  If the verbosity level of a report is greater than the configured maximum verbosity level of its report object, it is ignored.  If a report passes the verbosity filter in effect, the report’s action is determined.  If the action includes output to a file, the configured file descriptor(s) are determined.

Actionscan be set for (in increasing priority) severity, id, and (severity,id) pair.  They include output to the screen UVM_DISPLAY, whether the message counters should be incremented UVM_COUNT, and whether a $finish should occur UVM_EXIT.
Default ActionsThe following provides the default actions assigned to each severity.  These can be overridden by any of the set_*_action methods.
UVM_INFO -       UVM_DISPLAY
UVM_WARNING -    UVM_DISPLAY
UVM_ERROR -      UVM_DISPLAY | UVM_COUNT
UVM_FATAL -      UVM_DISPLAY | UVM_EXIT
File descriptorsThese can be set by (in increasing priority) default, severity level, an id, or (severity,id) pair.  File descriptors are standard verilog file descriptors; they may refer to more than one file.  It is the user’s responsibility to open and close them.
Default file handleThe default file handle is 0, which means that reports are not sent to a file even if an UVM_LOG attribute is set in the action associated with the report.  This can be overridden by any of the set_*_file methods.
Summary
uvm_report_object
The uvm_report_object provides an interface to the UVM reporting facility.
Class Hierarchy
uvm_report_object
Class Declaration
class uvm_report_object extends uvm_object
newCreates a new report object with the given name.
Reporting
uvm_report_info
uvm_report_warning
uvm_report_error
uvm_report_fatalThese are the primary reporting methods in the UVM.
Callbacks
report_info_hook
report_error_hook
report_warning_hook
report_fatal_hook
report_hookThese hook methods can be defined in derived classes to perform additional actions when reports are issued.
report_headerPrints version and copyright information.
report_summarizeOutputs statistical information on the reports issued by the central report server.
dieThis method is called by the report server if a report reaches the maximum quit count or has an UVM_EXIT action associated with it, e.g., as with fatal errors.
Configuration
set_report_verbosity_levelThis method sets the maximum verbosity level for reports for this component.
set_report_id_verbosity
set_report_severity_id_verbosityThese methods associate the specified verbosity with reports of the given severity, id, or severity-id pair.
set_report_severity_action
set_report_id_action
set_report_severity_id_actionThese methods associate the specified action or actions with reports of the given severity, id, or severity-id pair.
set_report_severity_override
set_report_severity_id_overrideThese methods provide the ability to upgrade or downgrade a message in terms of severity given severity and id.
set_report_default_file
set_report_severity_file
set_report_id_file
set_report_severity_id_fileThese methods configure the report handler to direct some or all of its output to the given file descriptor.
get_report_verbosity_levelGets the verbosity level in effect for this object.
get_report_actionGets the action associated with reports having the given severity and id.
get_report_file_handleGets the file descriptor associated with reports having the given severity and id.
uvm_report_enabledReturns 1 if the configured verbosity for this severity/id is greater than verbosity and the action associated with the given severity and id is not UVM_NO_ACTION, else returns 0.
set_report_max_quit_countSets the maximum quit count in the report handler to max_count.
Setup
set_report_handlerSets the report handler, overwriting the default instance.
get_report_handlerReturns the underlying report handler to which most reporting tasks are delegated.
reset_report_handlerResets the underlying report handler to its default settings.
get_report_serverReturns the uvm_report_server instance associated with this report object.
dump_report_stateThis method dumps the internal state of the report handler.

new

function new( string  name  =  "" )

Creates a new report object with the given name.  This method also creates a new uvm_report_handler object to which most tasks are delegated.

uvm_report_info

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

uvm_report_warning

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

uvm_report_error

virtual function void uvm_report_error( string  id,   
string  message,   
int  verbosity  =  UVM_LOW,
string  filename  =  "",
int  line  =  0 )

uvm_report_fatal

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

These are the primary reporting methods in the UVM.  Using these instead of $display and other ad hoc approaches ensures consistent output and central control over where output is directed and any actions that result.  All reporting methods have the same arguments, although each has a different default verbosity:

ida unique id for the report or report group that can be used for identification and therefore targeted filtering.  You can configure an individual report’s actions and output file(s) using this id string.
messagethe message body, preformatted if necessary to a single string.
verbositythe verbosity of the message, indicating its relative importance.  If this number is less than or equal to the effective verbosity level, see set_report_verbosity_level, then the report is issued, subject to the configured action and file descriptor settings.  Verbosity is ignored for warnings, errors, and fatals.  However, if a warning, error or fatal is demoted to an info message using the uvm_report_catcher, then the verbosity is taken into account.
filename/line(Optional) The location from which the report was issued.  Use the predefined macros, `__FILE__ and `__LINE__.  If specified, it is displayed in the output.

report_info_hook

virtual function bit report_info_hook( string  id,
string  message,
int  verbosity,
string  filename,
int  line )

report_error_hook

virtual function bit report_error_hook( string  id,
string  message,
int  verbosity,
string  filename,
int  line )

report_warning_hook

virtual function bit report_warning_hook( string  id,
string  message,
int  verbosity,
string  filename,
int  line )

report_fatal_hook

virtual function bit report_fatal_hook( string  id,
string  message,
int  verbosity,
string  filename,
int  line )

report_hook

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.  They are called only if the UVM_CALL_HOOK bit is specified in the action associated with the report.  The default implementations return 1, which allows the report to be processed.  If an override returns 0, then the report is not processed.

First, the report_hook method is called, followed by the severity severity specific hook (report_info_hook, etc.).  If either hook method returns 0 then the report is not processed further.

report_header

virtual function void report_header( UVM_FILE  file  =  0 )

Prints version and copyright information.  This information is sent to the command line if file is 0, or to the file descriptor file if it is not 0.  The uvm_root::run_test task calls this method just before it component phasing begins.

report_summarize

virtual function void report_summarize( UVM_FILE  file  =  0 )

Outputs statistical information on the reports issued by the central report server.  This information will be sent to the command line if file is 0, or to the file descriptor file if it is not 0.

The run_test method in uvm_top calls this method.

die

virtual function void die()

This method is called by the report server if a report reaches the maximum quit count or has an UVM_EXIT action associated with it, e.g., as with fatal errors.

Calls the uvm_component::pre_abort() method on the entire uvm_component hierarchy in a bottom-up fashion.  It then call calls report_summarize and terminates the simulation with $finish.

set_report_verbosity_level

function void set_report_verbosity_level ( int  verbosity_level )

This method sets the maximum verbosity level for reports for this component.  Any report from this component whose verbosity exceeds this maximum will be ignored.

set_report_id_verbosity

function void set_report_id_verbosity ( string  id,
int  verbosity )

set_report_severity_id_verbosity

function void set_report_severity_id_verbosity ( uvm_severity  severity,
string  id,
int  verbosity )

These methods associate the specified verbosity with reports of the given severity, id, or severity-id pair.  An verbosity associated with a particular severity-id pair takes precedence over an verbosity associated with id, which take precedence over an an verbosity associated with a severity.

The verbosity argument can be any integer, but is most commonaly a predefined uvm_verbosity value, UVM_NONE, UVM_LOW, UVM_MEDIUM, UVM_HIGH, UVM_FULL.

set_report_severity_action

function void set_report_severity_action ( uvm_severity  severity,
uvm_action  action )

set_report_id_action

function void set_report_id_action ( string  id,
uvm_action  action )

set_report_severity_id_action

function void set_report_severity_id_action ( uvm_severity  severity,
string  id,
uvm_action  action )

These methods associate the specified action or actions with reports of the given severity, id, or severity-id pair.  An action associated with a particular severity-id pair takes precedence over an action associated with id, which takes precedence over an an action associated with a severity.

The action argument can take the value UVM_NO_ACTION, or it can be a bitwise OR of any combination of UVM_DISPLAY, UVM_LOG, UVM_COUNT, UVM_STOP, UVM_EXIT, and UVM_CALL_HOOK.

set_report_severity_override

function void set_report_severity_override( uvm_severity  cur_severity,
uvm_severity  new_severity )

set_report_severity_id_override

function void set_report_severity_id_override( uvm_severity  cur_severity,
string  id,
uvm_severity  new_severity )

These methods provide the ability to upgrade or downgrade a message in terms of severity given severity and id.  An upgrade or downgrade for a specific id takes precedence over an upgrade or downgrade associated with a severity.

set_report_default_file

function void set_report_default_file ( UVM_FILE  file )

set_report_severity_file

function void set_report_severity_file ( uvm_severity  severity,
UVM_FILE  file )

set_report_id_file

function void set_report_id_file ( string  id,
UVM_FILE  file )

set_report_severity_id_file

function void set_report_severity_id_file ( uvm_severity  severity,
string  id,
UVM_FILE  file )

These methods configure the report handler to direct some or all of its output to the given file descriptor.  The file argument must be a multi-channel descriptor (mcd) or file id compatible with $fdisplay.

A FILE descriptor can be associated with with reports of the given severity, id, or severity-id pair.  A FILE associated with a particular severity-id pair takes precedence over a FILE associated with id, which take precedence over an a FILE associated with a severity, which takes precedence over the default FILE descriptor.

When a report is issued and its associated action has the UVM_LOG bit set, the report will be sent to its associated FILE descriptor.  The user is responsible for opening and closing these files.

get_report_verbosity_level

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

Gets the verbosity level in effect for this object.  Reports issued with verbosity greater than this will be filtered out.  The severity and tag arguments check if the verbosity level has been modified for specific severity/tag combinations.

get_report_action

function int get_report_action( uvm_severity  severity,
string  id )

Gets the action associated with reports having the given severity and id.

get_report_file_handle

function int get_report_file_handle( uvm_severity  severity,
string  id )

Gets the file descriptor associated with reports having the given severity and id.

uvm_report_enabled

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 verbosity and the action associated with the given severity and id is not UVM_NO_ACTION, else returns 0.

See also get_report_verbosity_level and get_report_action, and the global version of uvm_report_enabled.

set_report_max_quit_count

function void set_report_max_quit_count( int  max_count )

Sets the maximum quit count in the report handler to max_count.  When the number of UVM_COUNT actions reaches max_count, the die method is called.

The default value of 0 indicates that there is no upper limit to the number of UVM_COUNT reports.

set_report_handler

function void set_report_handler( uvm_report_handler  handler )

Sets the report handler, overwriting the default instance.  This allows more than one component to share the same report handler.

get_report_handler

function uvm_report_handler get_report_handler()

Returns the underlying report handler to which most reporting tasks are delegated.

reset_report_handler

function void reset_report_handler

Resets the underlying report handler to its default settings.  This clears any settings made with the set_report_* methods (see below).

get_report_server

function uvm_report_server get_report_server()

Returns the uvm_report_server instance associated with this report object.

dump_report_state

function void dump_report_state()

This method dumps the internal state of the report handler.  This includes information about the maximum quit count, the maximum verbosity, and the action and files associated with severities, ids, and (severity, id) pairs.

The uvm_void class is the base class for all UVM classes.
virtual class uvm_object extends uvm_void
The uvm_object class is the base class for all UVM data and hierarchical classes.
class uvm_report_object extends uvm_object
The uvm_report_object provides an interface to the UVM reporting facility.
function new( string  name  =  "" )
Creates a new report object with the given name.
virtual function void uvm_report_info( string  id,   
string  message,   
int  verbosity  =  UVM_MEDIUM,
string  filename  =  "",
int  line  =  0 )
virtual function void uvm_report_warning( string  id,   
string  message,   
int  verbosity  =  UVM_MEDIUM,
string  filename  =  "",
int  line  =  0 )
virtual function void uvm_report_error( string  id,   
string  message,   
int  verbosity  =  UVM_LOW,
string  filename  =  "",
int  line  =  0 )
virtual function void uvm_report_fatal( string  id,   
string  message,   
int  verbosity  =  UVM_NONE,
string  filename  =  "",
int  line  =  0 )
These are the primary reporting methods in the UVM.
virtual function bit report_info_hook( string  id,
string  message,
int  verbosity,
string  filename,
int  line )
virtual function bit report_error_hook( string  id,
string  message,
int  verbosity,
string  filename,
int  line )
virtual function bit report_warning_hook( string  id,
string  message,
int  verbosity,
string  filename,
int  line )
virtual function bit report_fatal_hook( string  id,
string  message,
int  verbosity,
string  filename,
int  line )
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.
virtual function void report_header( UVM_FILE  file  =  0 )
Prints version and copyright information.
virtual function void report_summarize( UVM_FILE  file  =  0 )
Outputs statistical information on the reports issued by the central report server.
virtual function void die()
This method is called by the report server if a report reaches the maximum quit count or has an UVM_EXIT action associated with it, e.g., as with fatal errors.
function void set_report_verbosity_level ( int  verbosity_level )
This method sets the maximum verbosity level for reports for this component.
function void set_report_id_verbosity ( string  id,
int  verbosity )
function void set_report_severity_id_verbosity ( uvm_severity  severity,
string  id,
int  verbosity )
These methods associate the specified verbosity with reports of the given severity, id, or severity-id pair.
function void set_report_severity_action ( uvm_severity  severity,
uvm_action  action )
function void set_report_id_action ( string  id,
uvm_action  action )
function void set_report_severity_id_action ( uvm_severity  severity,
string  id,
uvm_action  action )
These methods associate the specified action or actions with reports of the given severity, id, or severity-id pair.
function void set_report_severity_override( uvm_severity  cur_severity,
uvm_severity  new_severity )
function void set_report_severity_id_override( uvm_severity  cur_severity,
string  id,
uvm_severity  new_severity )
These methods provide the ability to upgrade or downgrade a message in terms of severity given severity and id.
function void set_report_default_file ( UVM_FILE  file )
function void set_report_severity_file ( uvm_severity  severity,
UVM_FILE  file )
function void set_report_id_file ( string  id,
UVM_FILE  file )
function void set_report_severity_id_file ( uvm_severity  severity,
string  id,
UVM_FILE  file )
These methods configure the report handler to direct some or all of its output to the given file descriptor.
function int get_report_verbosity_level( uvm_severity  severity  =  UVM_INFO,
string  id  =  "" )
Gets the verbosity level in effect for this object.
function int get_report_action( uvm_severity  severity,
string  id )
Gets the action associated with reports having the given severity and id.
function int get_report_file_handle( uvm_severity  severity,
string  id )
Gets the file descriptor associated with reports having the given severity and id.
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 verbosity and the action associated with the given severity and id is not UVM_NO_ACTION, else returns 0.
function void set_report_max_quit_count( int  max_count )
Sets the maximum quit count in the report handler to max_count.
function void set_report_handler( uvm_report_handler  handler )
Sets the report handler, overwriting the default instance.
function uvm_report_handler get_report_handler()
Returns the underlying report handler to which most reporting tasks are delegated.
function void reset_report_handler
Resets the underlying report handler to its default settings.
function uvm_report_server get_report_server()
Returns the uvm_report_server instance associated with this report object.
uvm_report_server is a global server that processes all of the reports generated by an uvm_report_handler.
function void dump_report_state()
This method dumps the internal state of the report handler.
The uvm_report_handler is the class to which most methods in uvm_report_object delegate.
Sends the report to the standard output
Counts the number of reports with the COUNT attribute.
Terminates the simulation immediately.
virtual class uvm_report_catcher extends uvm_callback
The uvm_report_catcher is used to catch messages issued by the uvm report server.
Callback the report hook methods
virtual task run_test ( string  test_name  =  "" )
Phases all components through all registered phases.
virtual function void pre_abort
This callback is executed when the message system is executing a UVM_EXIT action.
virtual class uvm_component extends uvm_report_object
The uvm_component class is the root base class for UVM components.
Defines standard verbosity levels for reports.
Report is always printed.
Report is issued if configured verbosity is set to UVM_LOW or above.
Report is issued if configured verbosity is set to UVM_MEDIUM or above.
Report is issued if configured verbosity is set to UVM_HIGH or above.
Report is issued if configured verbosity is set to UVM_FULL or above.
No action is taken
Sends the report to the file(s) for this (severity,id) pair
Causes $stop to be executed, putting the simulation into interactive mode.