svt_err_check_stats Class Reference

Inheritance diagram for class svt_err_check_stats:

List of all members.


Detailed Description

Error Check Statistics Class - This class is simply used to encapsulate statistics related to one specific error check. A queue of objects of this class is used within the svt_err_check class (the check member of the svt_xactor class), to track error checks performed by all transactors.



Public Member Functions

function void  add_cov ( bit enable_pass_cov = 0, bit enable_fail_cov = 1 )
function void  capture_is_enabled ( )
function svt_err_check_stats_cov  create_cov ( )
function bit  decode_prop_val ( string prop_name, bit [1023:0] prop_val, ref string prop_val_string, input svt_pattern_data :: type_enum typ )
function void  delete_cov ( )
function svt_pattern  do_allocate_pattern ( )
function bit  encode_prop_val ( string prop_name, string prop_val_string, ref bit [1023:0] prop_val, input svt_pattern_data :: type_enum typ )
function string  get_basic_check_info ( )
function string  get_basic_check_message ( string message = "" )
function string  get_check_id_str ( )
function string  get_check_info ( )
function string  get_check_message ( string message = "" )
function string  get_check_stats ( )
function string  get_class_name ( )
function string  get_description ( )
function string  get_err_check_name ( )
function string  get_full_name ( )
function string  get_group ( )
function bit  get_is_enabled ( )
function bit  get_last_is_enabled ( )
function bit  get_prop_val ( string prop_name, ref bit [1023:0] prop_val, input int array_ix, ref svt_sequence_item_base data_obj )
function string  get_reference ( )
function string  get_sub_group ( )
function string  get_unique_id ( )
function void  new ( string suite_name = "", string check_id_str = "", string group = "", string sub_group = "", string description = "", string reference = "", svt_err_check_stats :: fail_effect_enum default_fail_effect = svt_err_check_stats::ERROR, int filter_after_count = 0, bit is_enabled = 1 )
function string  psdisplay_stats ( string prefix = "" )
function void  register_cov_override ( ovm_object_wrapper cov_override )
function void  register_fail ( string message = "", svt_err_check_stats :: fail_effect_enum override_fail_effect = svt_err_check_stats::DEFAULT, string filename = "", int line = 0 )
function void  register_pass ( svt_err_check_stats :: fail_effect_enum override_pass_effect = svt_err_check_stats::DEFAULT, string filename = "", int line = 0 )
function void  report_info ( string prefix = "", bit omit_disabled = 0 )
function void  report_stats ( string prefix = "", bit omit_unexercised = 0 )
function void  reset_counters ( )
function void  set_default_fail_effect ( svt_err_check_stats :: fail_effect_enum new_default_fail_effect )
function void  set_default_pass_effect ( svt_err_check_stats :: fail_effect_enum new_default_pass_effect )
function void  set_err_check_name ( string err_check_name )
function void  set_is_enabled ( bit new_is_enabled )
function bit  set_prop_val ( string prop_name, bit [1023:0] prop_val, int array_ix )

Public Attributes

ovm_object_wrapper  cov_override = null; 
svt_err_check_stats :: fail_effect_enum  default_fail_effect 
svt_err_check_stats :: fail_effect_enum  default_pass_effect 
svt_err_check_stats_cov  err_check_stats_cov_inst 
int  exec_count = 0; 
int  fail_debug_count = 0; 
int  fail_err_count = 0; 
int  fail_expected_count = 0; 
int  fail_ignore_count = 0; 
int  fail_note_count = 0; 
int  fail_verbose_count = 0; 
int  fail_warn_count = 0; 
int  filter_after_count = 0; 
int  pass_count = 0; 
ovm_report_object  reporter 
static ovm_report_object  shared_reporter = svt_non_abstract_report_object; 

Protected Attributes

protected string  check_id_str = ""; 
protected string  description = SVT_DATA_UTIL_UNSPECIFIED
protected string  err_check_name = ""; 
protected string  group = ""; 
protected bit  is_enabled = 1; 
protected bit  last_is_enabled = 1; 
protected string  reference = SVT_DATA_UTIL_UNSPECIFIED
protected string  sub_group = ""; 

Member Typedefs

 typedef enum  fail_effect_enum 


Member Function Documentation

  function void
 svt_err_check_stats::add_cov

 (  bit enable_pass_cov = 0, bit enable_fail_cov = 1  ) 


Method which establishes the err_check_stats_cov_inst. This object is created using the create_cov method.

enable_pass_cov - Enables the "pass" bins of the status covergroup.

enable_fail_cov - Enables the "fail" bins of the status covergroup.

  function void
 svt_err_check_stats::capture_is_enabled

 (   ) 


Captures whether the check is enabled (1) or disabled (0).

  function svt_err_check_stats_cov
 svt_err_check_stats::create_cov

 (   ) 


Method which creates an svt_err_check_stats_cov instance for this svt_err_check_stats instance. The default implementation uses the'type' override facilities provided by the verification methodology.

  function bit
 svt_err_check_stats::decode_prop_val

 (  string prop_name , bit [1023:0] prop_val , ref string prop_val_string , input svt_pattern_data :: type_enum typ  ) 


Simple utility used to convert 'bit [1023:0]' property value representation into its equivalent string property value representation. Extended to support decoding of enum values.

prop_name - The name of the property being encoded.

prop_val_string - The string describing the value to be encoded.

prop_val - The bit vector encoding of prop_val_string.

typ - Optional field type used to help in the encode effort.

Return values - Status indicating the success/failure of the decode.


 Superseded functions 
 svt_sequence_item_base :: decode_prop_val 

  function void
 svt_err_check_stats::delete_cov

 (   ) 


Method which deletes the err_check_stats_cov_inst field, assigning it to 'null'.

  function svt_pattern
 svt_err_check_stats::do_allocate_pattern

 (   ) 


This method allocates a pattern containing svt_pattern_data instances for all of the primitive data fields in the object. The svt_pattern_data :: name is set to the corresponding field name, the svt_pattern_data :: value is set to 0.

Return values - An svt_pattern instance containing entries for all of the data fields.


 Superseded functions 
 svt_sequence_item_base :: do_allocate_pattern 

  function bit
 svt_err_check_stats::encode_prop_val

 (  string prop_name , string prop_val_string , ref bit [1023:0] prop_val , input svt_pattern_data :: type_enum typ  ) 


Simple utility used to convert string property value representation into its equivalent 'bit [1023:0]' property value representation. Extended to support encoding of enum values.

prop_name - The name of the property being encoded.

prop_val_string - The string describing the value to be encoded.

prop_val - The bit vector encoding of prop_val_string.

typ - Optional field type used to help in the encode effort.

Return values - Status indicating the success/failure of the encode.


 Superseded functions 
 svt_sequence_item_base :: encode_prop_val 

  function string
 svt_err_check_stats::get_basic_check_info

 (   ) 


Returns a formatted string that provides the basic information about the check: the description and the reference.

  function string
 svt_err_check_stats::get_basic_check_message

 (  string message = ""  ) 


Returns a string that provides the basic check message (basic check info plus message, if provided).

message - the message to be appended to the basic check info.

Return values - the complete string.

  function string
 svt_err_check_stats::get_check_id_str

 (   ) 


Returns the ID string of a check statistics object.

Return values - The check identifier string.

  function string
 svt_err_check_stats::get_check_info

 (   ) 


Returns a formatted string that provides the general information about the check including suite, check identifier, group, sub-group, description, and reference.

  function string
 svt_err_check_stats::get_check_message

 (  string message = ""  ) 


Returns a string that provides the general check message (check info plus message, if provided).

message - the message to be appended to the check info.

Return values - the complete string.

  function string
 svt_err_check_stats::get_check_stats

 (   ) 


Returns a formatted string that provides the statistics (counts) about the check.

  function string
 svt_err_check_stats::get_class_name

 (   ) 


Returns a string giving the name of the class.

 Superseded functions 
 svt_sequence_item_base :: get_class_name 
 Superseding functions 
 svt_svc_err_check_stats :: get_class_name 

  function string
 svt_err_check_stats::get_description

 (   ) 


Returns a string that provides only the check's description.

  function string
 svt_err_check_stats::get_err_check_name

 (   ) 


Returns the err_check_name field identifying the svt_err_check instance that contains this svt_err_check_stats instance (if available).

Return values - The name of the svt_err_check instance.

  function string
 svt_err_check_stats::get_full_name

 (   ) 


Technology independent method which returns the full instance path for the err_check_stats instance.

 Superseded functions 
 ovm_object :: get_full_name 
 ovm_sequence_item :: get_full_name 

  function string
 svt_err_check_stats::get_group

 (   ) 


Returns a string with the check group.

Return values - the check group.

  function bit
 svt_err_check_stats::get_is_enabled

 (   ) 


Returns a value indicating whether the check is enabled (1) or disabled (0).

Return values - The enabled (1) or disabled (0) value.

  function bit
 svt_err_check_stats::get_last_is_enabled

 (   ) 


Returns a value indicating whether the check was last enabled (1) or disabled (0).

Return values - The enabled (1) or disabled (0) value.

  function bit
 svt_err_check_stats::get_prop_val

 (  string prop_name , ref bit [1023:0] prop_val , input int array_ix , ref svt_sequence_item_base data_obj  ) 


This method is used by a component's command interface, to allow command code to retrieve the value of a single named property of a data class derived from this class. If the prop_name argument does not match a property of the class, or if the array_ix argument is not zero and does not point to a valid array element, this function returns '0'. Otherwise it returns '1', with the value of the prop_val argument assigned to the value of the specified property. However, If the property is a sub-object, a reference to it is assigned to the data_obj (ref) argument.

prop_name - The name of a property in this class, or a derived class.

prop_val - A ref argument used to return the current value of the property, expressed as a 1024 bit quantity. When returning a string value each character requires 8 bits so returned strings must be 128 characters or less.

array_ix - If the property is an array, this argument specifies the index being accessed. If the property is not an array, it should be set to 0.

data_obj - If the property is not a sub-object, this argument is assigned to null. If the property is a sub-object, a reference to it is assigned to this (ref) argument. In that case, the prop_val argument is meaningless. The transactor will then store the data object reference in its temporary data object array, and return a handle to its location as the prop_val argument of the get_data_prop task of the component. The command testbench code must then use that handle to access the properties of the sub-object.

Return values - A single bit representing whether or not a valid property was retrieved.


 Superseded functions 
 svt_sequence_item_base :: get_prop_val 

  function string
 svt_err_check_stats::get_reference

 (   ) 


Returns a string that provides only the check's reference.

  function string
 svt_err_check_stats::get_sub_group

 (   ) 


Returns a string with the check sub-group.

Return values - the check sub-group.

  function string
 svt_err_check_stats::get_unique_id

 (   ) 


Returns the unique identifier which is used to register and retrieve this check in check containers. This method returns check_id_str if it set, but if it is not set it returns the description.

  function void
 svt_err_check_stats::new

 (  string suite_name = "", string check_id_str = "", string group = "", string sub_group = "", string description = "", string reference = "", svt_err_check_stats :: fail_effect_enum default_fail_effect = svt_err_check_stats::ERROR, int filter_after_count = 0, bit is_enabled = 1  ) 


CONSTRUCTOR: Create a new svt_err_check_stats instance, passing the appropriate argument values to the svt_data parent class.

suite_name - Passed in by transactor, to identify the model suite.

check_id_str - Unique string identifier.

group - The group to which the check belongs.

sub_group - The sub-group to which the check belongs.

description - Text description of the check.

reference - (Optional) Text to reference protocol spec requirement associated with the check.

default_fail_effect - (Optional: Default = ERROR) Sets the default handling of a failed check.

filter_after_count - (Optional) Sets the number of fails before automatic filtering is applied.

is_enabled - (Optional) The default enabled setting for the check.


 Superseding functions 
 svt_svc_err_check_stats :: new 

  function string
 svt_err_check_stats::psdisplay_stats

 (  string prefix = ""  ) 


Formats the statistics (counts) about the check.

prefix - The prefix string for all output.

  function void
 svt_err_check_stats::register_cov_override

 (  ovm_object_wrapper cov_override  ) 


Method which registers a coverage override class to be used when creating coverage for this class.

  function void
 svt_err_check_stats::register_fail

 (  string message = "", svt_err_check_stats :: fail_effect_enum override_fail_effect = svt_err_check_stats::DEFAULT, string filename = "", int line = 0  ) 


Registers a FAILED check with this class. As long as the failure has not been filtered, this method produces log output with information about the check, and the fact that it has FAILED, along with a message (if specified).

message - (Optional) Additional output that will be printed along with the basic failure message.

override_fail_effect - (Optional: Default=DEFAULT) Allows the failure to be overridden for this particular failure.

filename - Optional argument identifying the source file for the message.

line - Optional argument identifying the source line number for the message.


 Superseding functions 
 svt_svc_err_check_stats :: register_fail 

  function void
 svt_err_check_stats::register_pass

 (  svt_err_check_stats :: fail_effect_enum override_pass_effect = svt_err_check_stats::DEFAULT, string filename = "", int line = 0  ) 


Registers a PASSED check with this class. As long as the pass has not been filtered, this method produces log output with information about the check, and the fact that it has PASSED.

override_pass_effect - (Optional: Default=DEFAULT) Allows the pass to be overridden for this particular pass. Most values correspond to the corresponding message levels. The exceptions are

  • IGNORE - No message is generated.
  • EXPECTED - The message is generated as verbose.

filename - Optional argument identifying the source file for the message.

line - Optional argument identifying the source line number for the message.


 Superseding functions 
 svt_svc_err_check_stats :: register_pass 

  function void
 svt_err_check_stats::report_info

 (  string prefix = "", bit omit_disabled = 0  ) 


Reports the basic information about the check: check identifier, group, sub-group, description, and reference.

prefix - The prefix string for all output.

omit_disabled - If this flag is set, and the check is not enabled, this method does nothing.

  function void
 svt_err_check_stats::report_stats

 (  string prefix = "", bit omit_unexercised = 0  ) 


Reports the statistics (counts) about the check.

prefix - The prefix string for all output.

omit_unexercised - If this flag is set, and the check has not been exercised, this method does nothing.

  function void
 svt_err_check_stats::reset_counters

 (   ) 


Resets all counters.

  function void
 svt_err_check_stats::set_default_fail_effect

 (  svt_err_check_stats :: fail_effect_enum new_default_fail_effect  ) 


Modifies the default handling of this check in the event of failure.

new_default_fail_effect - the new fail effect.

  function void
 svt_err_check_stats::set_default_pass_effect

 (  svt_err_check_stats :: fail_effect_enum new_default_pass_effect  ) 


Modifies the default handling of this check in the event of pass.

new_default_pass_effect - the new pass effect.

  function void
 svt_err_check_stats::set_err_check_name

 (  string err_check_name  ) 


Sets the err_check_name field identifying the svt_err_check instance that contains this svt_err_check_stats instance.

  function void
 svt_err_check_stats::set_is_enabled

 (  bit new_is_enabled  ) 


Modifies whether the check is enabled (1) or disabled (0).

new_is_enabled - the new enabled setting.

  function bit
 svt_err_check_stats::set_prop_val

 (  string prop_name , bit [1023:0] prop_val , int array_ix  ) 


This method is used by a component's command interface, to allow command code to set the value of a single named property of a data class derived from this class. This method cannot be used to set the value of a sub-object, since sub-object consruction is taken care of automatically by the command interface. If the prop_name argument does not match a property of the class, or it matches a sub-object of the class, or if the array_ix argument is not zero and does not point to a valid array element, this function returns '0'. Otherwise it returns '1'.

prop_name - The name of a property in this class, or a derived class.

prop_val - The value to assign to the property, expressed as a 1024 bit quantity. When assigning a string value each character requires 8 bits so assigned strings must be 128 characters or less.

array_ix - If the property is an array, this argument specifies the index being accessed. If the property is not an array, it should be set to 0.

Return values - A single bit representing whether or not a valid property was set.


 Superseded functions 
 svt_sequence_item_base :: set_prop_val 


Member Attribute Documentation

 protected string  attribute
 svt_err_check_stats::check_id_str = ""


An ID string that identifies a unique error check. Currently supporting check_id or check_id_str.

 ovm_object_wrapper  attribute
 svt_err_check_stats::cov_override = null

 svt_err_check_stats :: fail_effect_enum  attribute
 svt_err_check_stats::default_fail_effect = ERROR


Specifies the default handling of this check in the event of failure. A value of DEFAULT results in no message being generated. This value can be overridden by the code implementing the check when the check is fired.

 svt_err_check_stats :: fail_effect_enum  attribute
 svt_err_check_stats::default_pass_effect = DEBUG


Specifies the default handling of this check in the event of a pass. A value of DEFAULT results in no message being generated. This value can be overridden by the code implementing the check when the check is fired.

 protected string  attribute
 svt_err_check_stats::description = SVT_DATA_UTIL_UNSPECIFIED


A string that describes what is being checked.

 protected string  attribute
 svt_err_check_stats::err_check_name = ""


An optional string which identifies the svt_err_check instance that contains this svt_err_check_stats instance.

 svt_err_check_stats_cov  attribute
 svt_err_check_stats::err_check_stats_cov_inst


Instance of the svt_err_check_stats_cov class corresponding to this svt_err_check_stats instance.

 int  attribute
 svt_err_check_stats::exec_count = 0


Tracks the number of times that a given check has been executed.

 int  attribute
 svt_err_check_stats::fail_debug_count = 0


Tracks the number of times the check has failed, with DEBUG effect.

 int  attribute
 svt_err_check_stats::fail_err_count = 0


Tracks the number of times the check has failed, with ERROR or FATAL effect.

 int  attribute
 svt_err_check_stats::fail_expected_count = 0


Tracks the number of times the check has failed, with EXPECTED effect.

 int  attribute
 svt_err_check_stats::fail_ignore_count = 0


Tracks the number of times the check has failed, with IGNORED effect.

 int  attribute
 svt_err_check_stats::fail_note_count = 0


Tracks the number of times the check has failed, with NOTE effect.

 int  attribute
 svt_err_check_stats::fail_verbose_count = 0


Tracks the number of times the check has failed, with VERBOSE effect.

 int  attribute
 svt_err_check_stats::fail_warn_count = 0


Tracks the number of times the check has failed, with WARNING effect.

 int  attribute
 svt_err_check_stats::filter_after_count = 0


Number of ERRORs after which the error will automatically be filtered. If this variable is set to '0', automatic filtering will be disabled.

 protected string  attribute
 svt_err_check_stats::group = ""


A string that defines the group to which the check belongs.

 protected bit  attribute
 svt_err_check_stats::is_enabled = 1


Indicates whether or not the check is enabled. This variable cannot be acccessed directly -- the "set_is_enabled" method must be used.

 protected bit  attribute
 svt_err_check_stats::last_is_enabled = 1


Indicates whether or not the check was enabled previously. This variable cannot be acccessed directly -- the "capture_is_enabled" method must be used.

 int  attribute
 svt_err_check_stats::pass_count = 0


Tracks the number of times that a given check has PASSED.

 protected string  attribute
 svt_err_check_stats::reference = SVT_DATA_UTIL_UNSPECIFIED


A string that identifies a protocol specification reference, if applicable.

 ovm_report_object  attribute
 svt_err_check_stats::reporter


SVT message macros route messages through this reference

 static ovm_report_object  attribute
 svt_err_check_stats::shared_reporter = svt_non_abstract_report_object


Shared reporter used if no reporter has been provided to the class.

 protected string  attribute
 svt_err_check_stats::sub_group = ""


A string that defines the sub-group to which the check belongs.

Member Typedef Documentation

 typedef enum  svt_err_check_stats::fail_effect_enum

Value that is associated with a check passing or failing, which is sed to specify the desired effect when that check passes or fails.

IGNORE(SVT_IGNORE_EFFECT)
Ignore the pass/fail check result.
VERBOSE(SVT_VERBOSE_EFFECT)
Generate verbose message for the pass/fail check results.
DEBUG(SVT_DEBUG_EFFECT)
Generate debug message for the pass/fail check results.
NOTE(SVT_NOTE_EFFECT)
Generate note message for the pass/fail check results.
WARNING()
Generate warning message for the pass/fail check results.
ERROR()
Generate error message for the pass/fail check results.
EXPECTED(SVT_EXPECTED_EFFECT)
Do not generate any message as the pass/fail of the check is expected.
DEFAULT(SVT_DEFAULT_EFFECT)
Rely on the default_pass_effect/default_fail_effect setting for the check to decide whether or not to generate a message for the pass/fail of the check.