uvm_report_object

uvm.base.uvm_report_object.get_verbosity(severity)[source]
class uvm.base.uvm_report_object.UVMReportObject(name='')[source]

Bases: UVMObject

CLASS: UVMReportObject

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 a <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.

Actions - can 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 Actions - The 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 descriptors - These can be set by (in increasing priority) default, severity level, an id, or (severity,id) pair. File descriptors are standard SystemVerilog file descriptors; they may refer to more than one file. It is the user’s responsibility to open and close them.

Default file handle - The default file handle is 0, which means that reports are not sent to a file even if a UVM_LOG attribute is set in the action associated with the report. This can be overridden by any of the ~set_*_file~ methods.

uvm_get_report_object()[source]

Returns the nearest uvm_report_object when called. From inside a UVMComponent, the method simply returns self.

See also the global version of uvm_get_report_object. Returns:

uvm_report_enabled(verbosity, severity=0, id='')[source]

Returns 1 if the configured verbosity for this severity/id is greater than or equal to verbosity else returns 0.

See also get_report_verbosity_level and the global version of uvm_report_enabled. :param verbosity: :param severity: :param id:

Returns

True if given report enabled, False otherwise.

Return type

bool

uvm_report(severity, id, message, verbosity=-1, filename='', line=0, context_name='', report_enabled_checked=False)[source]
uvm_report_info(id, message, verbosity=200, filename='', line=0, context_name='', report_enabled_checked=False)[source]

Function: uvm_report_info

Parameters
  • id (str) – Message ID/tag.

  • message (str) – Message string.

  • verbosity (int) – Verbosity of the message.

  • filename (str) – Filename of the caller.

  • line (int) – Line from where this is called.

  • context_name (str) – Name of the calling context.

  • report_enabled_checked (bool) – Checks report enabled.

uvm_report_warning(id, message, verbosity=200, filename='', line=0, context_name='', report_enabled_checked=False)[source]

Function: uvm_report_warning :param id: :param message: :param verbosity: :param filename: :param line: :param context_name: :param report_enabled_checked:

uvm_report_error(id, message, verbosity=100, filename='', line=0, context_name='', report_enabled_checked=False)[source]

Function: uvm_report_error :param id: :param message: :param verbosity: :param filename: :param line: :param context_name: :param report_enabled_checked:

uvm_report_fatal(id, message, verbosity=0, filename='', line=0, context_name='', report_enabled_checked=False)[source]

Function: uvm_report_fatal :param id: :param message: :param verbosity: :param filename: :param line: :param context_name: :param report_enabled_checked:

uvm_process_report_message(report_message)[source]

Function: uvm_process_report_message

This method takes a preformed uvm_report_message, populates it with the report object and passes it to the report handler for processing. It is expected to be checked for verbosity and populated. :param report_message:

get_report_verbosity_level(severity=0, id='')[source]

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.

Parameters
  • severity

  • id (str) –

Returns:

get_report_max_verbosity_level()[source]

Function: get_report_max_verbosity_level

Gets the maximum verbosity level in effect for this report object. Any report from this component whose verbosity exceeds this maximum will be ignored.

Returns

Maximum verbosity level.

Return type

int

set_report_verbosity_level(verbosity_level)[source]

Function: set_report_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.

Parameters

verbosity_level

set_report_id_verbosity(id, verbosity)[source]

Function: set_report_id_verbosity

Parameters
  • id

  • verbosity

set_report_severity_id_verbosity(severity, id, verbosity)[source]
get_report_action(severity, id)[source]
set_report_severity_action(severity, action)[source]

Function: set_report_severity_action

Parameters
  • severity

  • action

set_report_id_action(id, action)[source]

Function: set_report_id_action

Parameters
  • id

  • action

set_report_severity_id_action(severity, id, action)[source]

Function: set_report_severity_id_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 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. :param severity: :param id: :param action:

get_report_file_handle(severity, id)[source]

Function: get_report_file_handle

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

Returns:

set_report_default_file(file)[source]

Function: set_report_default_file :param file:

set_report_id_file(id, file)[source]

Function: set_report_id_file :param id: :param file:

set_report_severity_file(severity, file)[source]

Function: set_report_severity_file

Parameters
  • severity

  • file

set_report_severity_id_file(severity, id, file)[source]
set_report_severity_override(cur_severity, new_severity)[source]
Parameters
  • cur_severity

  • new_severity

set_report_severity_id_override(cur_severity, id, new_severity)[source]

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. :param cur_severity: :param id: :param new_severity:

set_report_handler(handler)[source]

Sets the report handler, overwriting the default instance. This allows more than one component to share the same report handler. :param handler: New report handler for this object. :type handler: UVMReportHandler

get_report_handler()[source]

Returns the underlying report handler to which most reporting tasks are delegated. :returns: Report handler of this object. :rtype: UVMReportHandler

reset_report_handler()[source]

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