Class uvm_pkg::uvm_report_catcher
Name |
Type |
Description |
---|---|---|
DO_NOT_CATCH |
int |
Flag counts |
DO_NOT_MODIFY |
int |
Constructors
- new(string name = "uvm_report_catcher")
Function
new
Create a new report catcher. The name argument is optional, but should generally be provided to aid in debugging.
- Parameters:
name (string)
Enums
- action_e
- Enum Items:
UNKNOWN_ACTION
THROW
CAUGHT
Functions
- get_client()
Function
get_client
Returns the uvm_report_object that has generated the message that is currently being processed.
- Return type:
- get_severity()
Function
get_severity
Returns the uvm_severity of the message that is currently being processed. If the severity was modified by a previously executed catcher object (which re-threw the message), then the returned severity is the modified value.
- Return type:
- get_context()
Function
get_context
Returns the context name of the message that is currently being processed. This is typically the full hierarchical name of the component that issued the message. However, if user-defined context is set from a uvm_report_message, the user-defined context will be returned.
- get_verbosity()
Function
get_verbosity
Returns the verbosity of the message that is currently being processed. If the verbosity was modified by a previously executed catcher (which re-threw the message), then the returned verbosity is the modified value.
- get_id()
Function
get_id
Returns the string id of the message that is currently being processed. If the id was modified by a previously executed catcher (which re-threw the message), then the returned id is the modified value.
- get_message()
Function
get_message
Returns the string message of the message that is currently being processed. If the message was modified by a previously executed catcher (which re-threw the message), then the returned message is the modified value.
- get_action()
Function
get_action
Returns the uvm_action of the message that is currently being processed. If the action was modified by a previously executed catcher (which re-threw the message), then the returned action is the modified value.
- Return type:
- get_fname()
Function
get_fname
Returns the file name of the message.
- get_line()
Function
get_line
Returns the line number of the message.
- get_element_container()
Function
get_element_container
Returns the element container of the message.
- Return type:
- get_report_catcher(string name)
Function
get_report_catcher
Returns the first report catcher that has name .
- Parameters:
name (string)
- Return type:
- print_catcher(UVM_FILE file = 0)
Function
print_catcher
Prints information about all of the report catchers that are registered. For finer grained detail, the <uvm_callbacks #(T,CB)::display> method can be used by calling uvm_report_cb::display(uvm_report_object).
- Parameters:
file (UVM_FILE)
- debug_report_catcher(int what = 0)
Funciton
debug_report_catcher
Turn on report catching debug information. what is a bitwise AND of DO_NOT_CATCH -- forces catch to be ignored so that all catchers see the the reports. DO_NOT_MODIFY -- forces the message to remain unchanged
- Parameters:
what (int)
- catch()
Function
catch
This is the method that is called for each registered report catcher. There are no arguments to this function. The
interface methods can be used to access information about the current message being processed. - Return type:
- process_all_report_catchers(uvm_report_message rm)
process_all_report_catchers method called by report_server.report to process catchers
- Parameters:
rm (uvm_report_message)
- summarize()
CLASS
uvm_report_catcher
The uvm_report_catcher is used to catch messages issued by the uvm report server. Catchers are uvm_callbacks#(uvm_report_object,uvm_report_catcher) objects, so all facilities in the uvm_callback and <uvm_callbacks#(T,CB)> classes are available for registering catchers and controlling catcher state. The uvm_callbacks#(uvm_report_object,uvm_report_catcher) class is aliased to uvm_report_cb to make it easier to use. Multiple report catchers can be registered with a report object. The catchers can be registered as default catchers which catch all reports on all uvm_report_object reporters, or catchers can be attached to specific report objects (i.e. components).
User extensions of uvm_report_catcher must implement the catch method in which the action to be taken on catching the report is specified. The catch method can return CAUGHT , in which case further processing of the report is immediately stopped, or return THROW in which case the (possibly modified) report is passed on to other registered catchers. The catchers are processed in the order in which they are registered.
On catching a report, the catch method can modify the severity, id, action, verbosity or the report string itself before the report is finally issued by the report server. The report can be immediately issued from within the catcher class by calling the issue method.
The catcher maintains a count of all reports with FATAL,ERROR or WARNING severity and a count of all reports with FATAL, ERROR or WARNING severity whose severity was lowered. These statistics are reported in the summary of the uvm_report_server.
This example shows the basic concept of creating a report catching callback and attaching it to all messages that get emitted: