uvm_report_object¶
- 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 returnsself
.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 ofuvm_report_enabled
. :param verbosity: :param severity: :param id:- Returns
True if given report enabled, False otherwise.
- Return type
- 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
- 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
- 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_action(severity, action)[source]¶
Function: set_report_severity_action
- Parameters
severity –
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 withid
, which takes precedence over an action associated with aseverity
.The
action
argument can take the valueUVM_NO_ACTION
, or it can be a bitwise OR of any combination ofUVM_DISPLAY
,UVM_LOG
,UVM_COUNT
,UVM_STOP
,UVM_EXIT
, andUVM_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
andid
. :param severity: :param id:Returns:
- set_report_severity_file(severity, file)[source]¶
Function: set_report_severity_file
- Parameters
severity –
file –
- 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
andid
. An upgrade or downgrade for a specificid
takes precedence over an upgrade or downgrade associated with aseverity
. :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