svt_sequence_item_base Class Reference

Inheritance diagram for class svt_sequence_item_base:

List of all members.


Detailed Description

Base class for all SVT-based model's data object classes (configuration, transaction, etc.).



Public Member Functions

function void  add_compound_pattern_prop ( svt_pattern pttrn, string owner, string name, svt_pattern_data :: type_enum typ, int unsigned supported_methods_flag = 0, int unsigned field_width = 0, string enum_type = "" )
function void  add_pattern_prop ( svt_pattern pttrn, string owner, string name, svt_pattern_data :: type_enum typ, int unsigned supported_methods_flag = 0, int unsigned field_width = 0, string enum_type = "" )
function svt_pattern  allocate_auto_op_pattern ( int allocate_pattern_filter )
function svt_pattern  allocate_pattern ( )
function svt_pattern  allocate_xml_pattern ( )
function bit  auto_compare ( svt_sequence_item_base rhs_data, ovm_comparer comparer )
function void  auto_copy ( svt_sequence_item_base rhs_data )
function void  auto_pack ( ovm_packer packer )
function void  auto_unpack ( ovm_packer packer )
static function timeunit_enum  calc_timeunit ( )
function bit  compare_pattern_data ( svt_pattern_data rhs_pd, ovm_comparer comparer, string name_override = "" )
function bit  compare_via_pattern ( svt_pattern pttrn )
function bit  decode_pattern_data ( svt_pattern_data pd, ref string pd_string, input string delimiter )
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  display_get_prop_val_outcome ( bit success, string prop_name, bit [1023:0] prop_val, int array_ix, svt_sequence_item_base data_obj )
function void  display_set_prop_val_outcome ( bit success, string prop_name, bit [1023:0] prop_val, int array_ix )
function svt_pattern  do_allocate_pattern ( )
function bit  do_compare ( ovm_object rhs, ovm_comparer comparer )
function void  do_copy ( ovm_object rhs )
function bit  do_is_valid ( bit silent = 1, int kind = -1 )
function void  do_pack ( ovm_packer packer )
function void  do_print ( ovm_printer printer )
function void  do_record ( ovm_recorder recorder )
function void  do_unpack ( ovm_packer packer )
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 type_enum  find_type ( string prop_name )
function string  get_class_name ( )
function bit  get_do_compare_done ( )
function bit  get_do_pack_done ( )
static function string  get_environment_variable_value ( string method_name, string env_var_name, ovm_report_object reporter, bit is_optional = 0 )
function string  get_mcd_class_name ( )
function svt_pa_object_data  get_pa_obj_data ( string uid = "", string typ = "", string parent_uid = "", string channel = "" )
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 bit  get_prop_val_via_pattern ( ref svt_pattern pttrn )
function string  get_suite_name ( )
static function string  get_timeunit_str ( string class_name, ovm_report_object reporter )
function string  get_uid ( )
function svt_pattern  get_user_fsdb_props ( )
function string  get_xml_object_block_desc ( string obj_type = "", string obj_sub_type = "", string parent_uid = "", string channel = "" )
function bit  is_safe_as_ref ( svt_xml_writer writer )
function bit  is_silent ( )
function bit  is_valid ( bit silent = 1, int kind = -1 )
function bit  load ( int file )
function bit  load_from_string ( string text )
function bit  load_prop_vals ( string filename = "", int file = 0 )
function bit  load_prop_vals_with_checks ( string filename = "", int file = 0 )
function int  log_base_2 ( int val, bit round_up = 1 )
function void  mcd_log_object ( int mcd_log_file, string mcd_parameter )
function void  new ( string name = "svt_data_inst", string suite_spec = "" )
function void  pack_pattern_data ( svt_pattern_data pd, ovm_packer packer )
function int  power_of_2 ( int val )
function void  print_pattern_data ( svt_pattern_data pd, ovm_printer printer, input string name_override )
function int  reasonable_constraint_mode ( bit on_off )
function void  record_pattern_data ( svt_pattern_data pd, ovm_recorder recorder, input string name_override )
function int  resolve_compare_kind ( int kind, ovm_comparer comparer )
function int  resolve_is_valid_kind ( int kind )
function int  resolve_pack_kind ( int kind, ovm_packer packer )
function real  safe_atoreal ( string ascii_real )
function void  save ( int file )
function bit  save_child_refs ( svt_xml_writer writer, string prefix = "" )
function bit  save_object_begin ( svt_xml_writer writer )
function bit  save_object_data ( svt_xml_writer writer, string prefix = "" )
function bit  save_pattern_to_xml ( svt_xml_writer writer, svt_pa_object_data pa_obj_data, svt_pattern pttrn, string prefix = "" )
function bit  save_prop_vals ( string filename = "", int file = 0, string prefix = "" )
function bit  save_prop_vals_to_fsdb ( string inst_name, string parent_object_uid = "", string stream_attr_namestream_attr_name = [$], string stream_attr_valstream_attr_val = [$] )
function bit  save_prop_vals_to_fsdb_internal ( string top_level_name, string object_channel, string parent_object_uid = "", string object_uid = "", string prefix = "" )
function bit  save_prop_vals_to_xml ( svt_xml_writer writer, string object_block_desc = "", string prefix = "" )
function bit  save_ref ( svt_xml_writer writer, string prefix = "" )
function void  set_int_local ( string field_name, ovm_bitstream_t value, bit recurse = 1 )
function bit  set_prop_object ( string prop_name, svt_sequence_item_base prop_obj, int array_ix )
function bit  set_prop_val ( string prop_name, bit [1023:0] prop_val, int array_ix )
function bit  set_prop_val_via_pattern ( svt_pattern pttrn )
function void  set_prop_val_via_plusargs ( string plusarg_keyword )
function void  set_string_local ( string field_name, string value, bit recurse = 1 )
function void  silent_mode ( bit mode )
static function bit  strip_array_element_suffix ( ovm_report_object reporter, string prop_name, output string base_name, output int array_ix )
function void  unpack_pattern_data ( svt_pattern_data pd, ovm_packer packer )

Public Attributes

static ovm_comparer  complete_comparer = null; 
static ovm_packer  complete_packer = null; 
static int  display_kind = -1; 
int  kind = svt_sequence_item_base::UNASSIGNED; 
static int  max_array_elem_display = SVT_MAX_ARRAY_ELEM_DISPLAY_DEFAULT
static ovm_comparer  relevant_comparer = null; 
static ovm_packer  relevant_packer = null; 
static ovm_report_object  reporter = ovm_root; 
static ovm_comparer  silent_complete_comparer = null; 
static ovm_comparer  silent_relevant_comparer = null; 

Protected Attributes

protected string  suite_name = ""; 

Member Typedefs

 typedef enum  kind_enum 
 typedef enum  recursive_op_enum 


Member Function Documentation

  function void
 svt_sequence_item_base::add_compound_pattern_prop

 (  svt_pattern pttrn , string owner , string name , svt_pattern_data :: type_enum typ , int unsigned supported_methods_flag = 0, int unsigned field_width = 0, string enum_type = ""  ) 


Method which can be used to add a single svt_compound_pattern_data element to the provided pattern.

pttrn - Pattern the property is to be added to.

owner - Class name where the property is defined.

name - Name portion of the new name/value pair.

typ - Type portion of the new name/value pair.

field_width - Field bit width used by common data class operations. 0 indicates "not set".

supported_methods_flag - Flag indicating which common data class operations are to be supported automatically for this field. 0 indicates "not set".

  function void
 svt_sequence_item_base::add_pattern_prop

 (  svt_pattern pttrn , string owner , string name , svt_pattern_data :: type_enum typ , int unsigned supported_methods_flag = 0, int unsigned field_width = 0, string enum_type = ""  ) 


Method which can be used to add a single svt_pattern_data element to the provided pattern.

pttrn - Pattern the property is to be added to.

owner - Class name where the property is defined.

name - Name portion of the new name/value pair.

typ - Type portion of the new name/value pair.

field_width - Field bit width used by common data class operations. 0 indicates "not set".

supported_methods_flag - Flag indicating which common data class operations are to be supported automatically for this field. 0 indicates "not set".

  function svt_pattern
 svt_sequence_item_base::allocate_auto_op_pattern

 (  int allocate_pattern_filter  ) 


This method allocates a pattern containing svt_pattern_data instances for all of the data fields in the object that support automated implementations for the common data methods.

allocate_pattern_filter - Control settings used to limit which pattern_data elements are created.

Return values - An svt_pattern instance containing entries for all of the fields that support the automated operations.

  function svt_pattern
 svt_sequence_item_base::allocate_pattern

 (   ) 


This is a pattern allocation method which is implemented to add properties without including support for the 'automated operation' capabilities. This is provided by VIPs which have not updated to provide the automated operation support via do_allocate_pattern. VIPs should provide one or the other, but not both.

The 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 normally set to the corresponding field name, the svt_pattern_data :: value is normally set to 0. For fields which are displayed but not owned, the method puts the current value in for svt_pattern_data :: value.

The base class this method is simplay a feed through, calling do_allocate_pattern to insure all of the 'enabled' pattern_data instances are allocated.

Note that most clients needing patterns should continue to call 'allocate_pattern' or one of the derived pattern methods. This is to to insure they get both the enabled and 'not enabled' pattern_data instances. The only exceptions at this point are:

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

  function svt_pattern
 svt_sequence_item_base::allocate_xml_pattern

 (   ) 


This method allocates a pattern containing svt_pattern_data instances for all of the data fields in the object that are to be included in the object's XML output.

Return values - An svt_pattern instance containing entries for all of the fields required for XML output of the data object.


 Superseding functions 
 svt_traffic_profile_transaction :: allocate_xml_pattern 

  function bit
 svt_sequence_item_base::auto_compare

 (  svt_sequence_item_base rhs_data , ovm_comparer comparer  ) 


Methodology independent 'compare' method for comparing fields based on pattern information.

  function void
 svt_sequence_item_base::auto_copy

 (  svt_sequence_item_base rhs_data  ) 


Methodology independent 'copy' method for copying fields based on pattern information.

  function void
 svt_sequence_item_base::auto_pack

 (  ovm_packer packer  ) 


Methodology independent 'pack' method for packing fields based on pattern information.

  function void
 svt_sequence_item_base::auto_unpack

 (  ovm_packer packer  ) 


Methodology independent 'unpack' method for unpacking fields based on pattern information.

 static function timeunit_enum
 svt_sequence_item_base::calc_timeunit

 (   ) 


Calculates the timeunit that the VIP has been compiled in.

Return values - Enumerated value representing the time unit for the local compilation unit.

  function bit
 svt_sequence_item_base::compare_pattern_data

 (  svt_pattern_data rhs_pd , ovm_comparer comparer , string name_override = ""  ) 


Compare the information associated with a single pattern_data instance.

rhs_pd - The pattern data instance containing the compare value, plus the description of the field we are interested in.

comparer - The comparer being used to implement the compare and its recognition.

name_override - Used in when the pattern data name doesn't reflect the actual field being compared (e.g., if comparing array elements).

  function bit
 svt_sequence_item_base::compare_via_pattern

 (  svt_pattern pttrn  ) 


This method takes advantage of the get_prop_val method to make a simple way to compare a property pattern with the contents of a data instance. The method simply uses each name specified in pttrn, uses get_prop_val to retrieve the corresponding value from the data instance, and compares it to the value stored in the pattern.

pttrn - Pattern to be compared against the values stored in the data instance.

Return values - Success (1) or failure (0) of the compare.

  function bit
 svt_sequence_item_base::decode_pattern_data

 (  svt_pattern_data pd , ref string pd_string , input string delimiter  ) 


Simple utility used to convert an svt_pattern_data representation into its equivalent string property value representation.

pd - The pattern data being decoded.

pd_string - The resulting decoded value.

delimiter - String used as a delimiter, placed around the 'value' in complex data situations.

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

  function bit
 svt_sequence_item_base::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. If provided the type is used by the default implementation to choose an appropriate conversion method. If the type is specified as UNDEF then the the field is assumed to be an int field and the string is assumed to be an ascii int representation. Derived classes can extend this method to support other field representations such as strings, enums, bitvecs, etc.

prop_name - The name of the property being decoded.

prop_val - The bit vector decoding of prop_val_string.

prop_val_string - The resulting decoded value.

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

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


 Superseding functions 
 svt_configuration :: decode_prop_val 
 svt_fifo_rate_control_configuration :: decode_prop_val 
 svt_mem_configuration :: decode_prop_val 
 svt_err_check_stats :: decode_prop_val 
 svt_sequence_item :: decode_prop_val 
 svt_8b10b_data :: decode_prop_val 
 svt_traffic_profile_transaction :: decode_prop_val 

  function void
 svt_sequence_item_base::display_get_prop_val_outcome

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


Method to display the outcome of a get_prop_val operation.

success - Indicates whether the 'get' was successful.

prop_name - The name of a property in this class.

prop_val - The current value of the property that is being returned.

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 the sub-object is returned. In that case, the prop_val argument is meaningless.

  function void
 svt_sequence_item_base::display_set_prop_val_outcome

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


Method to display the outcome of a set_prop_val operation.

success - Indicates whether the 'set' was successful.

prop_name - The name of a property in this class.

prop_val - The value assigned to the property.

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.

  function svt_pattern
 svt_sequence_item_base::do_allocate_pattern

 (   ) 


This is the base pattern allocation method, which must be implemented to support the 'automated operation' capabilities. VIPs not providing this support instead implement allocate_pattern. VIPs should provide one or the other, but not both.

The 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 normally set to the corresponding field name, the svt_pattern_data :: value is normally set to 0. For fields which are displayed but not owned, the method puts the current value in for svt_pattern_data :: value.

Note that most clients needing patterns should continue to call 'allocate_pattern' or one of the derived pattern methods. This is to to insure they get both the enabled and 'not enabled' pattern_data instances. The only exceptions at this point are:

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


 Superseding functions 
 svt_configuration :: do_allocate_pattern 
 svt_fifo_rate_control_configuration :: do_allocate_pattern 
 svt_mem_configuration :: do_allocate_pattern 
 svt_base_mem_suite_configuration :: do_allocate_pattern 
 svt_mem_suite_configuration :: do_allocate_pattern 
 svt_err_check_stats :: do_allocate_pattern 
 svt_exception :: do_allocate_pattern 
 svt_exception_list :: do_allocate_pattern 
 svt_fifo_rate_control :: do_allocate_pattern 
 svt_mem :: do_allocate_pattern 
 svt_pattern_data_carrier :: do_allocate_pattern 
 svt_sequence_item :: do_allocate_pattern 
 svt_8b10b_data :: do_allocate_pattern 
 svt_mem_transaction :: do_allocate_pattern 
 svt_traffic_profile_transaction :: do_allocate_pattern 
 svt_status :: do_allocate_pattern 

  function bit
 svt_sequence_item_base::do_compare

 (  ovm_object rhs , ovm_comparer comparer  ) 


Override the 'do_compare' method to compare fields directly.

 Superseded functions 
 ovm_object :: do_compare 
 Superseding functions 
 svt_fifo_rate_control_configuration :: do_compare 
 svt_mem_configuration :: do_compare 
 svt_base_mem_suite_configuration :: do_compare 
 svt_mem_suite_configuration :: do_compare 
 svt_exception :: do_compare 
 svt_exception_list :: do_compare 
 svt_mem :: do_compare 
 svt_sequence_item :: do_compare 
 svt_8b10b_data :: do_compare 
 svt_mem_transaction :: do_compare 
 svt_traffic_profile_transaction :: do_compare 

  function void
 svt_sequence_item_base::do_copy

 (  ovm_object rhs  ) 


Override the 'do_copy' method to copy fields directly.

 Superseded functions 
 ovm_object :: do_copy 
 ovm_transaction :: do_copy 
 Superseding functions 
 svt_configuration :: do_copy 
 svt_exception :: do_copy 
 svt_exception_list :: do_copy 
 svt_fifo_rate_control :: do_copy 
 svt_mem :: do_copy 
 svt_sequence_item :: do_copy 
 svt_traffic_profile_transaction :: do_copy 

  function bit
 svt_sequence_item_base::do_is_valid

 (  bit silent = 1, int kind = -1  ) 


Checks to see that the data field values are valid.

silent - bit indicating whether failures should result in warning messages.

kind - This int indicates the type of is_avalid check to attempt. Only supported kind value is svt_sequence_item_base :: COMPLETE, which results in verification that the non-static data members are valid. All other kind values result in a return value of 1. Note that the 'kind' variable can be used to control this behavior, in which case this argument will be ignored.


 Superseding functions 
 svt_fifo_rate_control_configuration :: do_is_valid 
 svt_mem_configuration :: do_is_valid 
 svt_exception :: do_is_valid 
 svt_exception_list :: do_is_valid 
 svt_sequence_item :: do_is_valid 
 svt_8b10b_data :: do_is_valid 
 svt_mem_transaction :: do_is_valid 
 svt_traffic_profile_transaction :: do_is_valid 

  function void
 svt_sequence_item_base::do_pack

 (  ovm_packer packer  ) 


Override the 'do_pack' method to pack fields directly.

 Superseded functions 
 ovm_object :: do_pack 
 Superseding functions 
 svt_configuration :: do_pack 
 svt_mem_suite_configuration :: do_pack 
 svt_exception :: do_pack 
 svt_exception_list :: do_pack 
 svt_sequence_item :: do_pack 

  function void
 svt_sequence_item_base::do_print

 (  ovm_printer printer  ) 


Override the 'do_print' method to print fields directly.

 Superseded functions 
 ovm_object :: do_print 
 ovm_transaction :: do_print 
 ovm_sequence_item :: do_print 
 Superseding functions 
 svt_mem :: do_print 

  function void
 svt_sequence_item_base::do_record

 (  ovm_recorder recorder  ) 


Override the 'do_record' method to record fields directly.

 Superseded functions 
 ovm_object :: do_record 
 ovm_transaction :: do_record 

  function void
 svt_sequence_item_base::do_unpack

 (  ovm_packer packer  ) 


Override the 'do_unpack' method to unpack fields directly.

 Superseded functions 
 ovm_object :: do_unpack 
 Superseding functions 
 svt_configuration :: do_unpack 
 svt_mem_suite_configuration :: do_unpack 
 svt_exception :: do_unpack 
 svt_exception_list :: do_unpack 
 svt_sequence_item :: do_unpack 

  function bit
 svt_sequence_item_base::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. If provided the type is used by the default implementation to choose an appropriate conversion method. If the type is specified as UNDEF then the the field is assumed to be an int field and the string is assumed to be an ascii int representation. Derived classes can extend this method to support other field representations such as strings, enums, bitvecs, etc.

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.


 Superseding functions 
 svt_fifo_rate_control_configuration :: encode_prop_val 
 svt_mem_configuration :: encode_prop_val 
 svt_err_check_stats :: encode_prop_val 
 svt_sequence_item :: encode_prop_val 
 svt_8b10b_data :: encode_prop_val 
 svt_traffic_profile_transaction :: encode_prop_val 

  function type_enum
 svt_sequence_item_base::find_type

 (  string prop_name  ) 


Utility method which can be used to get the 'type' of the indicated property.

  function string
 svt_sequence_item_base::get_class_name

 (   ) 


Returns the name of this class, or a class derived from this class.

 Superseding functions 
 svt_err_check_stats :: get_class_name 
 svt_svc_err_check_stats :: get_class_name 
 svt_pattern_data_carrier :: get_class_name 
 svt_debug_opts_carrier :: get_class_name 

  function bit
 svt_sequence_item_base::get_do_compare_done

 (   ) 


Utility to obtain the do_compare_done setting for the object.

  function bit
 svt_sequence_item_base::get_do_pack_done

 (   ) 


Utility to obtain the do_pack_done setting for the object.

 static function string
 svt_sequence_item_base::get_environment_variable_value

 (  string method_name , string env_var_name , ovm_report_object reporter , bit is_optional = 0  ) 


Function which can be used to get access to an environment variable.

method_name - The method used to prefix the message.

env_var_name - The environment variable being accessed.

reporter - Used to report any issues.

is_optional - Indicates whether failure to find the environment variable is a problem.

Return values - Provides the value that was found for the envirionment variable.

  function string
 svt_sequence_item_base::get_mcd_class_name

 (   ) 


Returns the name of this class, or a class derived from this class.

 Superseding functions 
 svt_fifo_rate_control_configuration :: get_mcd_class_name 
 svt_mem_configuration :: get_mcd_class_name 
 svt_base_mem_suite_configuration :: get_mcd_class_name 
 svt_mem_suite_configuration :: get_mcd_class_name 
 svt_fifo_rate_control :: get_mcd_class_name 
 svt_mem :: get_mcd_class_name 
 svt_8b10b_data :: get_mcd_class_name 
 svt_mem_transaction :: get_mcd_class_name 
 svt_traffic_profile_transaction :: get_mcd_class_name 

  function svt_pa_object_data
 svt_sequence_item_base::get_pa_obj_data

 (  string uid = "", string typ = "", string parent_uid = "", string channel = ""  ) 


This method returns PA object which contains the PA header information for XML or FSDB.

uid - Optional string indicating the unique identification value for object. If not provided uses the 'get_uid' method to retrieve the value.

typ - Optional string indicating the 'type' of the object. If not provided uses the type name for the class.

parent_uid - Optional string indicating the UID of the object's parent. If not provided the method assumes there is no parent.

channel - Optional string indicating an object channel. If not provided the method assumes there is no channel.

Return values - The requested object block description.


 Superseding functions 
 svt_sequence_item :: get_pa_obj_data 

  function bit
 svt_sequence_item_base::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 gets the value of a single named property.

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. In that case, the prop_val argument is meaningless.

When this command is used by a component's command interface, the component 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.

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


 Superseding functions 
 svt_configuration :: get_prop_val 
 svt_fifo_rate_control_configuration :: get_prop_val 
 svt_mem_configuration :: get_prop_val 
 svt_base_mem_suite_configuration :: get_prop_val 
 svt_mem_suite_configuration :: get_prop_val 
 svt_err_check :: get_prop_val 
 svt_err_check_stats :: get_prop_val 
 svt_exception :: get_prop_val 
 svt_exception_list :: get_prop_val 
 svt_fifo_rate_control :: get_prop_val 
 svt_mem :: get_prop_val 
 svt_pattern_data_carrier :: get_prop_val 
 svt_sequence_item :: get_prop_val 
 svt_8b10b_data :: get_prop_val 
 svt_mem_transaction :: get_prop_val 
 svt_traffic_profile_transaction :: get_prop_val 
 svt_status :: get_prop_val 

  function bit
 svt_sequence_item_base::get_prop_val_via_pattern

 (  ref svt_pattern pttrn  ) 


This method takes advantage of the get_prop_val method to make a simple way to extract a property pattern from a data instance. The method simply takes all of the names specified in pttrn, and uses get_prop_val to retrieve the corresponding value so it can be placed in the pattern.

pttrn - Pattern to be loaded from the data object.

Return values - Success (1) or failure (0) of the get operation.


 Superseding functions 
 svt_pattern_data_carrier :: get_prop_val_via_pattern 

  function string
 svt_sequence_item_base::get_suite_name

 (   ) 


Returns the suite name associated with an object.

 static function string
 svt_sequence_item_base::get_timeunit_str

 (  string class_name , ovm_report_object reporter  ) 


Returns the timeunit that the VIP has been compiled in as a string value.

class_name - The class making this request.

reporter - Used to report any issues.

Return values - String value representing the time unit for the local compilation unit.

  function string
 svt_sequence_item_base::get_uid

 (   ) 


This method can be used to obtain a unique identifier for a data object.

Return values - Unique identifier for the object.

  function svt_pattern
 svt_sequence_item_base::get_user_fsdb_props

 (   ) 


User method for providing additional properties, consisting of name/value pairs, that are to be included in any FSDB output.

Return values - Pattern object describing the user proprties.

  function string
 svt_sequence_item_base::get_xml_object_block_desc

 (  string obj_type = "", string obj_sub_type = "", string parent_uid = "", string channel = ""  ) 


This method returns a string for use in the XML object block which provides basic information about the object.

obj_type - Optional string indicating the 'type' of the object. If not provided uses the type name for the class.

obj_sub_type - Optional string indicating the sub-type of the object. If not provided the method assumes there is no sub-type.

parent_uid - Optional string indicating the UID of the object's parent. If not provided the method assumes there is no parent.

channel - Optional string indicating an object channel. If not provided the method assumes there is no channel.

Return values - The requested object block description.

  function bit
 svt_sequence_item_base::is_safe_as_ref

 (  svt_xml_writer writer  ) 


This method indicates whether it will be safe to reference this object in the output generated by the writer.

writer - Object which takes care of the basic write operations.

Return values - Indicates that the reference will be available (1) or not (0).

  function bit
 svt_sequence_item_base::is_silent

 (   ) 


Returns true if silent mode is currently enabled

  function bit
 svt_sequence_item_base::is_valid

 (  bit silent = 1, int kind = -1  ) 


Checks to see that the data field values are valid.

silent - bit indicating whether failures should result in warning messages.

kind - This int indicates the type of is_avalid check to attempt. Only supported kind value is svt_sequence_item_base :: COMPLETE, which results in verification that the non-static data members are valid. All other kind values result in a return value of 1. Note that the 'kind' variable can be used to control this behavior, in which case this argument will be ignored.

  function bit
 svt_sequence_item_base::load

 (  int file  ) 

  function bit
 svt_sequence_item_base::load_from_string

 (  string text  ) 

  function bit
 svt_sequence_item_base::load_prop_vals

 (  string filename = "", int file = 0  ) 


This method loads the property values from the indicated file assuming a basic text format. If filename specified without file then creates file handle and uses it to load the values. If file specified without filename then uses file to load the values. If both filename and file specified than no load is attempted and the failure is indicated via the return.

filename - Defines the file location.

file - Handle to the file being used as the source for the load.

Return values - Indicates success (1) or failure (0) of the load.

  function bit
 svt_sequence_item_base::load_prop_vals_with_checks

 (  string filename = "", int file = 0  ) 


This method calls load_prop_vals, but enables checking on the file format and content.

filename - Defines the file location.

file - Handle to the file being used as the source for the load.

Return values - Indicates success (1) or failure (0) of the load.

  function int
 svt_sequence_item_base::log_base_2

 (  int val , bit round_up = 1  ) 


This method returns the log_base_2 of provided value.

val - Value for which log_base_2 is to be calculated.

round_up - Indicates if the log_base_2 should be rounded up to the next value if val is not an exact power of 2.

  function void
 svt_sequence_item_base::mcd_log_object

 (  int mcd_log_file , string mcd_parameter  ) 

  function void
 svt_sequence_item_base::new

 (  string name = "svt_data_inst", string suite_spec = ""  ) 


CONSTRUCTOR: Creates a new instance of the svt_sequence_item_base class.

name - Intance name for this object

suite_spec - A String that identifies the product suite to which the data object belongs.


 Superseding functions 
 svt_configuration :: new 
 svt_fifo_rate_control_configuration :: new 
 svt_mem_configuration :: new 
 svt_base_mem_suite_configuration :: new 
 svt_mem_suite_configuration :: new 
 svt_exception :: new 
 svt_fifo_rate_control :: new 
 svt_sequence_item :: new 
 svt_8b10b_data :: new 
 svt_mem_transaction :: new 
 svt_traffic_profile_transaction :: new 
 svt_status :: new 

  function void
 svt_sequence_item_base::pack_pattern_data

 (  svt_pattern_data pd , ovm_packer packer  ) 


Pack the information associated with a single pattern_data instance.

  function int
 svt_sequence_item_base::power_of_2

 (  int val  ) 


This method returns the power of 2 of provided value.

val - value to plug in to get power of 2.

  function void
 svt_sequence_item_base::print_pattern_data

 (  svt_pattern_data pd , ovm_printer printer , input string name_override  ) 


Print the information associated with a single pattern_data instance.

pd - The pattern data instance to be printed.

printer - The printer to be used.

name_override - Used when the pattern data name doesn't reflect the string which is to be displayed for the field name (e.g., if printing array elements).

  function int
 svt_sequence_item_base::reasonable_constraint_mode

 (  bit on_off  ) 


Method to turn reasonable constraints on/off as a block. This method is not implemented in this virtual class.

on_off - A bit that indicates whether the reasonable constraints should be turnd on (1) or off (0).


 Superseding functions 
 svt_fifo_rate_control_configuration :: reasonable_constraint_mode 
 svt_mem_configuration :: reasonable_constraint_mode 
 svt_base_mem_suite_configuration :: reasonable_constraint_mode 
 svt_mem_suite_configuration :: reasonable_constraint_mode 
 svt_exception_list :: reasonable_constraint_mode 
 svt_fifo_rate_control :: reasonable_constraint_mode 
 svt_8b10b_data :: reasonable_constraint_mode 
 svt_mem_transaction :: reasonable_constraint_mode 
 svt_traffic_profile_transaction :: reasonable_constraint_mode 

  function void
 svt_sequence_item_base::record_pattern_data

 (  svt_pattern_data pd , ovm_recorder recorder , input string name_override  ) 


Record the information associated with a single pattern_data instance.

pd - The pattern data instance to be recorded.

recorder - The recorder to be used.

name_override - Used when the pattern data name doesn't reflect the string which is to be recorded for the field name (e.g., if recording array elements).

  function int
 svt_sequence_item_base::resolve_compare_kind

 (  int kind , ovm_comparer comparer  ) 


Resolves the kind value used for compare operations.

kind - Value passed in to the method

comparer - Policy class used in the compare operation

Return values - Resolved value

  function int
 svt_sequence_item_base::resolve_is_valid_kind

 (  int kind  ) 


Resolves the kind value used for is_valid operations.

kind - Value passed in to the method

Return values - Resolved value

  function int
 svt_sequence_item_base::resolve_pack_kind

 (  int kind , ovm_packer packer  ) 


Resolves the kind value used for pack/unpack operations.

kind - Value passed in to the method

packer - Policy class used in the pack/unpack operation

Return values - Resolved value

  function real
 svt_sequence_item_base::safe_atoreal

 (  string ascii_real  ) 


Utility method which can be used to safely convert an ascii string to a real value, dealing with any embedded '_' characters.

ascii_real - String to be converted to a real value.

Return values - The result of the conversion.

  function void
 svt_sequence_item_base::save

 (  int file  ) 

  function bit
 svt_sequence_item_base::save_child_refs

 (  svt_xml_writer writer , string prefix = ""  ) 


This method can be used to write out Unique IDs for the children of this object using the XML format. The extended class must drive this process, but can use the save_ref method on the to individual children to output those children.

writer - Object which takes care of the basic write operations.

prefix - String to be placed at the beginning of each line in the file.

Return values - Indicates success (1) or failure (0) of the save.

  function bit
 svt_sequence_item_base::save_object_begin

 (  svt_xml_writer writer  ) 


This method uses the 'writer' class methods to write out the object begin data to file. This method is intoduced to resolve the Verdi call back issue where during concurrent transaction the order of the transaction has to be correct otherwise Verdi dumper APIs will have performance issue.

writer - Object which takes care of the basic write operations.

Return values - Indicates success (1) or failure (0) of the save.

  function bit
 svt_sequence_item_base::save_object_data

 (  svt_xml_writer writer , string prefix = ""  ) 


This method writes the object start to XML/FSDB file, This method is introduced to resolve the Verdi call back issue where during concurrent transaction the order of the transaction as to be correct otherwise Verdi dumper APIs will have performance issue.

writer - Object which takes care of the basic write operations.

prefix - Optional string to be placed at the begining of each line.

Return values - Indicates success (1) or failure (0) of the save.

  function bit
 svt_sequence_item_base::save_pattern_to_xml

 (  svt_xml_writer writer , svt_pa_object_data pa_obj_data , svt_pattern pttrn , string prefix = ""  ) 


This method writes the property values stored in the pattern to the indicated file using the XML format.

writer - Object which takes care of the basic write operations.

pa_obj_data - The 'svt_pa_object_data' which contains the PA header information.

pttrn - The pattern to be saved to XML.

prefix - String to be placed at the beginning of each line in the file.

Return values - Indicates success (1) or failure (0) of the save.

  function bit
 svt_sequence_item_base::save_prop_vals

 (  string filename = "", int file = 0, string prefix = ""  ) 


This method saves the property values to the indicated file using a basic text format. If filename specified without file then creates file handle and uses it to saves the values. If file specified without filename then uses file to save the values. If both filename and file specified than no save is attempted and the failure is indicated via the return.

filename - Defines the file location.

file - Handle to the file being used as the source for the load.

prefix - String to be placed at the beginning of each line in the file.

Return values - Indicates success (1) or failure (0) of the save.

  function bit
 svt_sequence_item_base::save_prop_vals_to_fsdb

 (  string inst_name , string parent_object_uid = "", string stream_attr_name stream_attr_name = [$], string stream_attr_val stream_attr_val = [$]  ) 


This method writes the property values associated with this data object to an FSDB file.

The supplied instance path must be a full instance path to the source of the data object. This path must identify an instance that is a sub-component of a top-level VIP component that is enabled for debug using debug opts. The routine will split out the top-level component instance from the provided instance name and obtain the registered VIP writer class using this value. The leaf path from the top-level component name is used as the FSDB channel identifier.

inst_name - The full instance path of the component that is writing the object to FSDB

parent_object_uid - Unique ID of the parent object

stream_attr_name - Queue of stream attribute names to add

stream_attr_val - Queue of stream attribute values to add

Return values - Indicates success (1) or failure (0) of the save.

  function bit
 svt_sequence_item_base::save_prop_vals_to_fsdb_internal

 (  string top_level_name , string object_channel , string parent_object_uid = "", string object_uid = "", string prefix = ""  ) 


This is an internal method and should not be used by external components.

top_level_name - The full instance path of the top level component that is writing the object to FSDB

object_channel - Channel that is being used to write the object to FSDB

parent_object_uid - Unique ID of the parent object

object_uid - Unique ID of this object

prefix - String prepended to the property name

Return values - Indicates success (1) or failure (0) of the save.

  function bit
 svt_sequence_item_base::save_prop_vals_to_xml

 (  svt_xml_writer writer , string object_block_desc = "", string prefix = ""  ) 


This method writes the property values to the indicated file using the XML format. This method relies on the allocate_xml_pattern method to obtain the pattern for the property values to be saved. Therefore the preferred mechanism for altering the format is to overload the allocate_xml_pattern to define a different pattern.

writer - Object which takes care of the basic write operations.

object_block_desc - String that is placed in the 'object' block created for the data object. If not specified method relies on get_xml_object_block_desc method to get default description.

prefix - String to be placed at the beginning of each line in the file.

Return values - Indicates success (1) or failure (0) of the save.


 Superseding functions 
 svt_sequence_item :: save_prop_vals_to_xml 

  function bit
 svt_sequence_item_base::save_ref

 (  svt_xml_writer writer , string prefix = ""  ) 


This method can be used to write out the Unique IDs for an object using the XML format.

writer - Object which takes care of the basic write operations.

prefix - String to be placed at the beginning of each line in the file.

Return values - Indicates success (1) or failure (0) of the save.

  function void
 svt_sequence_item_base::set_int_local

 (  string field_name , ovm_bitstream_t value , bit recurse = 1  ) 


Override the 'set_int_local' method to simply set the field via set_prop_val.

 Superseded functions 
 ovm_object :: set_int_local 

  function bit
 svt_sequence_item_base::set_prop_object

 (  string prop_name , svt_sequence_item_base prop_obj , int array_ix  ) 


This method allows clients to assign an object to a single named property supported by a class derived from this class. This base class implementation always returns a value of '0' since the svt_sequence_item_base class has no 'object' properties.

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

prop_obj - The object to assign to the property, expressed as svt_sequence_item_base instance.

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.


 Superseding functions 
 svt_pattern_data_carrier :: set_prop_object 

  function bit
 svt_sequence_item_base::set_prop_val

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


This method sets the value of a single named property. This method cannot be used to set the value of a sub-object.

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.


 Superseding functions 
 svt_configuration :: set_prop_val 
 svt_fifo_rate_control_configuration :: set_prop_val 
 svt_mem_configuration :: set_prop_val 
 svt_base_mem_suite_configuration :: set_prop_val 
 svt_mem_suite_configuration :: set_prop_val 
 svt_err_check :: set_prop_val 
 svt_err_check_stats :: set_prop_val 
 svt_exception :: set_prop_val 
 svt_exception_list :: set_prop_val 
 svt_fifo_rate_control :: set_prop_val 
 svt_pattern_data_carrier :: set_prop_val 
 svt_sequence_item :: set_prop_val 
 svt_8b10b_data :: set_prop_val 
 svt_mem_transaction :: set_prop_val 
 svt_traffic_profile_transaction :: set_prop_val 
 svt_status :: set_prop_val 

  function bit
 svt_sequence_item_base::set_prop_val_via_pattern

 (  svt_pattern pttrn  ) 


This method takes advantage of the set_prop_val method to make a simple way to take a common property pattern, and apply it across multiple data instances. The method simply takes all of the name/value pairs specified in pttrn, and uses set_prop_val to apply them to the data instance.

pttrn - Pattern to be applied to the data object.

Return values - Success (1) or failure (0) of the set operation.

  function void
 svt_sequence_item_base::set_prop_val_via_plusargs

 (  string plusarg_keyword  ) 


This method takes advantage of the set_prop_val method to load up a set of property values based on a command line plusarg value.

plusarg_keyword - The keyword that is used to identify the command line plusarg.

  function void
 svt_sequence_item_base::set_string_local

 (  string field_name , string value , bit recurse = 1  ) 


Override the 'set_string_local' method to simply set the field via set_prop_val.

 Superseded functions 
 ovm_object :: set_string_local 

  function void
 svt_sequence_item_base::silent_mode

 (  bit mode  ) 


Disables generation of internal messages. This can be used to turn off debug messages while executing a method that may itself be used as an argument to VMM message macros. Using this feature resolves the issue of embedded messages.

Care must be taken when using this feature to re-enable messages after they have been disabled. Every call to silent_mode with a mode value 1 must be matched with a corresponding call to silent_mode with a mode value of 0.

mode - Enables or disables silent mode

 static function bit
 svt_sequence_item_base::strip_array_element_suffix

 (  ovm_report_object reporter , string prop_name , output string base_name , output int array_ix  ) 


Utility method which accepts a property name containing an array element index, and returns the base property name and the index value.

prop_name - Property name which includes an array element index

base_name - Output value which is the property name with the array index removed

array_ix - Output value which is the array index

Return values - Indicates whether the property name supplied was recognized as an array element (1 indicates that the array element was successfully removed, 0 indicates a failed attempt)

  function void
 svt_sequence_item_base::unpack_pattern_data

 (  svt_pattern_data pd , ovm_packer packer  ) 


Unpack the information associated with a single pattern_data instance.

Member Attribute Documentation

 static ovm_comparer  attribute
 svt_sequence_item_base::complete_comparer = null


This static `SVT_XVM(comparer) can be used to request a COMPLETE compare. This is a shared comparer used by the VIP as well as the environment. As such any modifications will have a global impact and should be done with care.

 static ovm_packer  attribute
 svt_sequence_item_base::complete_packer = null


This static `SVT_XVM(packer) can be used to request a COMPLETE pack. This is a shared packer used by the VIP as well as the environment. As such any modifications will have a global impact and should be done with care.

 static int  attribute
 svt_sequence_item_base::display_kind = -1


Used by all svt_sequence_item_base derived display methods to limit the contents of the string generated by the 'psdisplay' method and put to the log by the 'display' method.

A value of -1 (svt_sequence_item_base :: RELEVANT) indicates all display calls should only display the relevant data, as defined by the current transaction values, configuration settings, etc.

If a value of svt_sequence_item_base :: COMPLETE is specified, then all data fields are displayed.

Some data classes may respond to additional kind values. The interpretations for these values are defined in the classes which support them. If one of these additional kind values is specified when the display method is called for a data class which does not support the specified kind, the display implemented for svt_sequence_item_base :: RELEVANT will be done.

Since this field is not owned by an individual instance, it is not copied, compared, etc., like the other svt_data properties.

 int  attribute
 svt_sequence_item_base::kind = svt_sequence_item_base::UNASSIGNED


Used as an alternate method for the 'kind' argument to compare, is_valid, byte_size, byte_pack, and byte_unpack. If set to a value other than 10, then this value will be used rather than the 'kind' value that is passed into these methods or the policy class that is passed in. Acceptible values are RELEVANT and COMPLETE.

NOTE: For OVM and UVM users, the 'abstract' and 'physical' attributes of the comparer and packer policy classes are used to mimic the 'kind' argument. However, begining with the UVM 1800.2 2017 release these properties have been removed from these policy classes, and so this property is the only mechanism to control this.

 static int  attribute
 svt_sequence_item_base::max_array_elem_display = SVT_MAX_ARRAY_ELEM_DISPLAY_DEFAULT


Used by all svt_data derived display methods to limit the number of array entries which are displayed whenever an array data member is displayed. If the number of array elements is less than or equal to the max_array_elem_display value or max_array_elem_display is set to -1, then all array elements are displayed. If max_array_elem_display is set to 0, then only the array size will be displayed. Otherwise max_array_elem_display array elements are displayed. Since this field is not owned by an individual instance, it is not copied, compared, etc., like the other svt_data properties. Initial value set to SVT_MAX_ARRAY_ELEM_DISPLAY_DEFAULT so it can be overridden at compile time.

 static ovm_comparer  attribute
 svt_sequence_item_base::relevant_comparer = null


This static `SVT_XVM(comparer) can be used to request a RELEVANT compare. This is a shared comparer used by the VIP as well as the environment. As such any modifications will have a global impact and should be done with care.

 static ovm_packer  attribute
 svt_sequence_item_base::relevant_packer = null


This static `SVT_XVM(packer) can be used to request a RELEVANT pack. This is a shared packer used by the VIP as well as the environment. As such any modifications will have a global impact and should be done with care.

 static ovm_report_object  attribute
 svt_sequence_item_base::reporter = ovm_root


All messages originating from data objects are routed through `SVT_XVM(top)

 static ovm_comparer  attribute
 svt_sequence_item_base::silent_complete_comparer = null


This static `SVT_XVM(comparer) can be used to request a COMPLETE compare and to hide the messages generated due to comparison failures. This is a shared comparer used by the VIP as well as the environment. As such any modifications will have a global impact and should be done with care.

 static ovm_comparer  attribute
 svt_sequence_item_base::silent_relevant_comparer = null


This static `SVT_XVM(comparer) can be used to request a RELEVANT compare and to hide the messages generated due to comparison failures. This is a shared comparer used by the VIP as well as the environment. As such any modifications will have a global impact and should be done with care.

 protected string  attribute
 svt_sequence_item_base::suite_name = ""


Identifies the product suite with which a derivative class is associated. Can be accessed through 'get_suite_name', but cannot be altered after object creation.

Member Typedef Documentation

 typedef enum  svt_sequence_item_base::kind_enum

Kinds commonly recognized (i.e., via constants) by compare, is_valid, byte_size, byte_pack, and byte_unpack. Although specified as an enum, the constant values associated with these enum elements allow them to be used to define the integer 'kind' parameter to these methods.

Classes sometimes include fields which are implied or enabled by other fields in the same class or by a field in a related class. The RELEVANT kind can be used to limit the operations to those class fields which have been enabled by these other related fields.

As an example of the 'same class' case, consider a master transaction which contains 'command' and 'data' fields. The data field would obviously be relevant when 'command == WRITE'. The data field would not be relevant, however, when 'command == READ'.

As an example of the 'related class' case, consider a system which can be configured to enable or disable specific transaction capabilities. For instance the existence of a data bus could be configurable. In this case if the 'enable_data' field in the configuration class would impact the relevance of the 'data' field in the transaction class.

If the COMPLETE kind value is specified that the operation is applied across all class fields, not just the implied or enabled fields.


RELEVANT(SVT_RELEVANT)
Limit operation to fields which are applicable based on current format, etc.
COMPLETE(SVT_COMPLETE)
Apply operation to all fields.
UNASSIGNED(SVT_UNASSIGNED)
Use the default operation (complete).

 typedef enum  svt_sequence_item_base::recursive_op_enum

Hierachical transaction options. These are used to control how embedded objects are handled for the 'copy' and 'compare' methods.

DEEP(SVT_DEEP_RECURSION)
SHALLOW(SVT_SHALLOW_RECURSION)
NULL(SVT_NULL_RECURSION)