svt_pattern_data_carrier Class Reference

Inheritance diagram for class svt_pattern_data_carrier:

List of all members.


Detailed Description

The svt_pattern_data carrier is used to gather up properties so that they can be acted upon as a group.



Public Member Functions

function void  add_multiple_props ( create_struct field_desc[$] )
function void  add_prop ( string name, bit [1023:0] value = 0, int array_ix = 0, svt_pattern_data :: type_enum typ = svt_pattern_data::UNDEF )
function void  add_supp_data ( string prop_name, string name, bit [1023:0] value, svt_pattern_data :: type_enum typ = svt_pattern_data::UNDEF )
function void  add_supp_string ( string prop_name, string name, string value )
virtual function vmm_data  allocate ( )
virtual function unsigned int  byte_pack ( ref logic [7:0] bytes[], input int unsigned offset, input int kind )
virtual function unsigned int  byte_unpack ( const ref logic [7:0] bytes[], input int unsigned offset, input int len, input int kind )
virtual function bit  compare ( vmm_data to, output string diff, input int kind )
virtual function vmm_data  copy ( vmm_data to = null )
function void  do_all ( vmm_data :: do_what_e do_what, ref logic [7:0] pack[], const ref logic [7:0] unpack[] )
function svt_pattern  do_allocate_pattern ( )
function string  get_class_name ( )
function bit  get_prop_val ( string prop_name, ref bit [1023:0] prop_val, input int array_ix, ref svt_data data_obj )
function bit  get_prop_val_via_pattern ( ref svt_pattern pttrn )
function bit  get_supp_data_value ( string prop_name, string name, ref bit [1023:0] value )
virtual function bit  is_valid ( bit silent = 1, int kind = -1 )
function void  new ( vmm_log log = null, create_struct field_descfield_desc = [$] )
virtual function string  psdisplay ( string prefix = "" )
function bit  set_multiple_prop_vals ( get_set_struct prop_desc[$] )
function bit  set_prop_object ( string prop_name, svt_data prop_obj, int array_ix )
function bit  set_prop_val ( string prop_name, bit [1023:0] prop_val, int array_ix )
function bit  update_save_prop_vals_to_fsdb ( string inst_name, string parent_object_uid = "", get_set_struct update_descupdate_desc = [$] )

Public Attributes

svt_pattern_data  contents [$] 

Protected Attributes

static protected svt_pattern_data_carrier  __vmm_rhs 


Member Function Documentation

  function void
 svt_pattern_data_carrier::add_multiple_props

 (  create_struct field_desc [$]  ) 


Method to add multiple new name/value pairs to the current set of name/value pairs included in the pattern.

field_desc - Shorthand description of the fields to be created in the carrier.

  function void
 svt_pattern_data_carrier::add_prop

 (  string name , bit [1023:0] value = 0, int array_ix = 0, svt_pattern_data :: type_enum typ = svt_pattern_data::UNDEF  ) 


Method to add a new name/value pair to the current set of name/value pairs included in the pattern.

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

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

array_ix - Index associated with the value when the value is in an array.

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


 Superseding functions 
 svt_debug_opts_carrier :: add_prop 

  function void
 svt_pattern_data_carrier::add_supp_data

 (  string prop_name , string name , bit [1023:0] value , svt_pattern_data :: type_enum typ = svt_pattern_data::UNDEF  ) 


Utility method for adding simple supplemental data to an individual property.

prop_name - Name of the property that is to get the supplemental data.

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

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

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

  function void
 svt_pattern_data_carrier::add_supp_string

 (  string prop_name , string name , string value  ) 


Utility method for adding string supplemental data to an individual property.

prop_name - Name of the property that is to get the supplemental data.

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

value - Supplemental string value.

 virtual function vmm_data
 svt_pattern_data_carrier::allocate

 (   ) 


 Superseded functions 
 vmm_data :: allocate 
 svt_data :: allocate 
 Superseding functions 
 svt_debug_opts_carrier :: allocate 

 virtual function unsigned int
 svt_pattern_data_carrier::byte_pack

 (  ref logic [7:0] bytes [], input int unsigned offset , input int kind  ) 


 Superseded functions 
 vmm_data :: byte_pack 
 svt_data :: byte_pack 
 Superseding functions 
 svt_debug_opts_carrier :: byte_pack 

 virtual function unsigned int
 svt_pattern_data_carrier::byte_unpack

 (  const ref logic [7:0] bytes [], input int unsigned offset , input int len , input int kind  ) 


 Superseded functions 
 vmm_data :: byte_unpack 
 svt_data :: byte_unpack 
 Superseding functions 
 svt_debug_opts_carrier :: byte_unpack 

 virtual function bit
 svt_pattern_data_carrier::compare

 (  vmm_data to , output string diff , input int kind  ) 


 Superseded functions 
 vmm_data :: compare 
 svt_data :: compare 
 Superseding functions 
 svt_debug_opts_carrier :: compare 

 virtual function vmm_data
 svt_pattern_data_carrier::copy

 (  vmm_data to = null  ) 


 Superseded functions 
 vmm_data :: copy 
 svt_data :: copy 
 Superseding functions 
 svt_debug_opts_carrier :: copy 

  function void
 svt_pattern_data_carrier::do_all

 (  vmm_data :: do_what_e do_what , ref logic [7:0] pack [], const ref logic [7:0] unpack []  ) 


 Superseded functions 
 vmm_data :: do_all 
 svt_data :: do_all 
 Superseding functions 
 svt_debug_opts_carrier :: do_all 

  function svt_pattern
 svt_pattern_data_carrier::do_allocate_pattern

 (   ) 


This method allocates a pattern containing svt_pattern_data instances for all of the primitive data fields in the object.

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


 Superseded functions 
 svt_data :: do_allocate_pattern 

  function string
 svt_pattern_data_carrier::get_class_name

 (   ) 


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

 Superseded functions 
 svt_data :: get_class_name 
 Superseding functions 
 svt_debug_opts_carrier :: get_class_name 

  function bit
 svt_pattern_data_carrier::get_prop_val

 (  string prop_name , ref bit [1023:0] prop_val , input int array_ix , ref svt_data 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. 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.

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.


 Superseded functions 
 svt_data :: get_prop_val 

  function bit
 svt_pattern_data_carrier::get_prop_val_via_pattern

 (  ref svt_pattern pttrn  ) 


Since for do_allocate_pattern this class simply returns its own contents field the expectation is that this will be processing a pattern made up of the original carrier contents. Implying that it already has the values.

If a simple check validates this to be the case, this method basically just returns as the values are already contained in contents.

If the check indicates there are differences with contents then this implementation simply calls the super to let it load up the values.

pttrn - Pattern to be loaded from the data object.

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


 Superseded functions 
 svt_data :: get_prop_val_via_pattern 

  function bit
 svt_pattern_data_carrier::get_supp_data_value

 (  string prop_name , string name , ref bit [1023:0] value  ) 


Utility method for accessing supplemental data on an individual property.

prop_name - Name of the property to be accessed.

name - Name of the supplemental data whose value is to be retrieved.

value - Retrieved value.

Return values - Indicates whether the named supplemental data was found (1) or not found (0). This also indicates whether the 'value' is valid.

 virtual function bit
 svt_pattern_data_carrier::is_valid

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


 Superseded functions 
 vmm_data :: is_valid 
 svt_data :: is_valid 
 Superseding functions 
 svt_debug_opts_carrier :: is_valid 

  function void
 svt_pattern_data_carrier::new

 (  vmm_log log = null, create_struct field_desc field_desc = [$]  ) 


CONSTRUCTOR: Creates a new instance of the svt_pattern_data_carrier class.

log - A vmm_log object reference used to replace the default internal logger.

field_desc - Shorthand description of the fields to be created in the carrier.

 virtual function string
 svt_pattern_data_carrier::psdisplay

 (  string prefix = ""  ) 


 Superseded functions 
 vmm_data :: psdisplay 
 svt_data :: psdisplay 
 Superseding functions 
 svt_debug_opts_carrier :: psdisplay 

  function bit
 svt_pattern_data_carrier::set_multiple_prop_vals

 (  get_set_struct prop_desc [$]  ) 


Method to assign multiple values to the corresponding named properties included in the carrier.

prop_desc - Shorthand description of the fields to be modified.

Return values - A single bit representing whether or not the indicated properties were set successfully.


 Superseding functions 
 svt_debug_opts_carrier :: set_multiple_prop_vals 

  function bit
 svt_pattern_data_carrier::set_prop_object

 (  string prop_name , svt_data prop_obj , int array_ix  ) 


This method allows clients to assign an object to a single named property included in the carrier's contents.

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


 Superseded functions 
 svt_data :: set_prop_object 

  function bit
 svt_pattern_data_carrier::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 construction 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_data :: set_prop_val 

  function bit
 svt_pattern_data_carrier::update_save_prop_vals_to_fsdb

 (  string inst_name , string parent_object_uid = "", get_set_struct update_desc update_desc = [$]  ) 


This method modifies the object with the provided updates and then writes the resulting property values associated with the data object to an FSDB file.

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

update_desc - Shorthand description of the primitive fields to be updated in the carrier.

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


 Superseding functions 
 svt_debug_opts_carrier :: update_save_prop_vals_to_fsdb 


Member Attribute Documentation

 svt_pattern_data  attribute
 svt_pattern_data_carrier::contents[$]


The properties which have been stored in the carrier.

 static protected svt_pattern_data_carrier  attribute
 svt_pattern_data_carrier::__vmm_rhs