Inheritance diagram for class svt_err_catcher:
This file creates a UVM/OVM message catcher class to demote expected error and warnings.
The add_message_text_to_demote method is used to add a regex expression to match the message text of ERROR or WARNING messages to be demoted.
The add_message_id_to_demote() method is used to add a regex expression to match the message id of ERROR or WARNING messages to be demoted.
Any ERROR or WARNING message or ID that matches these expressions are demoted to INFO level messages. The number of times that a message or id is demoted is tracked in the demoted_messages_count [string] and the demoted_id_count [string] arrays.
Public Member Functions | |
| function void | add_message_id_to_demote ( string id, int limit = 0 ) |
| function void | add_message_text_to_demote ( string msg, int limit = 0 ) |
| function action_e | catch ( ) |
| function uvm_object | create ( string name = "" ) |
| function int | get_demoted_id_count ( string id ) |
| function int | get_demoted_id_limit ( string id ) |
| function int | get_demoted_messages_count ( string msg ) |
| function int | get_demoted_messages_limit ( string msg ) |
| function string_q_t | get_ids_to_demote ( ) |
| function string_q_t | get_messages_to_demote ( ) |
| virtual function uvm_object_wrapper | get_object_type ( ) |
| static function type_id | get_type ( ) |
| virtual function string | get_type_name ( ) |
| function void | new ( string name = "svt_err_catcher" ) |
| function void | remove_message_id_to_demote ( string id, bit retain_limit_check = 0 ) |
| function void | remove_message_text_to_demote ( string msg, bit retain_limit_check = 0 ) |
| function bit | report ( bit silent = 0 ) |
Public Attributes | |
| static const string | type_name = "svt_err_catcher"; |
Protected Attributes | |
| protected int | demoted_id_count [string] |
| protected int | demoted_id_limit [string] |
| protected int | demoted_messages_count [string] |
| protected int | demoted_messages_limit [string] |
| protected string_q_t | ids_to_demote |
| protected string_q_t | ids_to_demote_removed |
| protected bit | ids_to_demote_removed_limit_check [string] |
| protected string_q_t | messages_to_demote |
| protected string_q_t | messages_to_demote_removed |
| protected bit | messages_to_demote_removed_limit_check [string] |
Member Typedefs | |
| typedef class | type_id |
|
||
Adds a new regex entry that will be used to match against the message ID of every ERROR and WARNING message.
The limit argument of this method will restrict the error catcher to demote the message ID the number of times provided. After this number of demotions is reached then the message will continue to be issued as normal. A limit value of 0 indicates no limit (all matching message IDs observed will be demoted). Multiple calls of this method with the same message ID will result in updates to the limit value for this message ID. If a limit value of 0 is supplied in a subsequent call then the limit will be reset back to 0 (unlimited). Positive values received will increase the limit value and negative values will decrease the limit value. If the limit value is modified to be equal to 0 by a subsequent call then the message ID demotion for this ID will be removed. Errors will be generated if the limit is set to a value of less than 0, either in the first call or in subsequent calls.
id - Regex expression used to match the message id
limit - Number of times that the message id is demoted before the message filter is disabled. A value of 0 will cause all messages to be demoted (no limit). |
|
||
Adds a new regex entry that will be used to match against the message text of every ERROR and WARNING message.
The limit argument of this method will restrict the error catcher to demote the message text the number of times provided. After this number of demotions is reached then the message will continue to be issued as normal. A limit value of 0 indicates no limit (all matching message text observed will be demoted). Multiple calls of this method with the same message text will result in updates to the limit value for this message text. If a limit value of 0 is supplied in a subsequent call then the limit will be reset back to 0 (unlimited). Positive values received will increase the limit value and negative values will decrease the limit value. If the limit value is modified to be equal to 0 by a subsequent call then the message text demotion for this text will be removed. Errors will be generated if the limit is set to a value of less than 0, either in the first call or in subsequent calls.
msg - Regex expression used to match the message text
limit - Number of times that the message text is demoted before the message filter is disabled. A value of 0 will cause all messages to be demoted (no limit). |
|
||||
UVM/OVM catch method implementation
| ||||
|
|
||||
|
|
||
Returns the number of times that a message ID has been demoted.
id - Message ID text that was used in the call to add_message_id_to_demote
Return values - number of times that the message ID has been demoted |
|
||
Returns the demotion limit that has been set up for this message ID.
id - Message ID text that was used in the call to add_message_id_to_demote
Return values - number of times that the message ID will be demoted |
|
||
Returns the number of times that a message has been demoted.
msg - Message text that was used in the call to add_message_text_to_demote
Return values - number of times that the message has been demoted |
|
||
Returns the demotion limit that has been set up for this message text.
msg - Message text that was used in the call to add_message_text_to_demote
Return values - number of times that the message will be demoted |
|
||
Returns the queue of message ID entries that have been submitted.
Return values - Queue of strings that have been submitted to demote message ID |
|
||
Returns the queue of message text entries that have been submitted.
Return values - Queue of strings that have been submitted to demote message text |
|
||||
|
|
||||
|
|
||||||
|
|
||||||||
Constructor
| ||||||||
|
|
||
Removes an existing entry from the message ID to demote queue. The string value must be an exact match for an existing entry or an error message is generated.
By default the limit check associated with this message text entry is also removed. This check can be retained using the retain_limit_check argument.
id - Message ID to demote entry to be removed
retain_limit_check - Optional argument that allows the limit check for this message ID to be retained |
|
||
Removes an existing entry from the message text to demote queue. The string value must be an exact match for an existing entry or an error message is generated.
By default the limit check associated with this message text entry is also removed. This check can be retained using the retain_limit_check argument.
msg - Message text to demote entry to be removed
retain_limit_check - Optional argument that allows the limit check for this message ID to be retained |
|
||
Analyzes all expected message and ID demotions and returns 1 if all expected messages were demoted, and 0 if any expected messages were not detected.
silent - Controls whether each missing message is displayed
Return values - Status of all expected message demotions. Return value of 1 indicates that all expected messages were observed, and 0 indicates that not all messages were observed. |
|
|
Array to store the number of times that a particular message id has been demoted.
|
|
|
Array to store the number of times that a particular WARNING message will be demoted before the message filter is disabled.
|
|
|
Array to store the number of times that a particular message text has been demoted.
|
|
|
Array to store the number of times that a particular ERROR message will be demoted before the message filter is disabled.
|
|
|
Queue that contains regex expressions to identify message ID to be demoted. Multiple messages can be demoted by pushing multiple values to the queue.
|
|
|
ids_to_demote entries that have been removed via a call to remove_message_id_to_demote. These are retained so that they can be used to summarize the report catcher activity.
|
|
|
Flag that determines whether the limit check should be executed on message ID entries that have been removed.
|
|
|
Queue that contains regex expressions to identify message text to be demoted. Multiple messages can be demoted by pushing multiple values to the queue.
|
|
|
messages_to_demote entries that have been removed via a call to remove_message_text_to_demote. These are retained so that they can be used to summarize the report catcher activity.
|
|
|
Flag that determines whether the limit check should be executed on message text entries that have been removed.
|
|
|
|