svt_configuration Class Reference

Inheritance diagram for class svt_configuration:

List of all members.


Detailed Description

Base class for all SVT model configuration data descriptor objects. As functionality commonly needed for configuration of SVT models is defined, it will be implemented (or at least prototyped) in this class.



Public Member Functions

function svt_pattern  allocate_check_enable_pattern ( )
function svt_pattern  allocate_cov_enable_pattern ( )
function svt_pattern  allocate_debug_feature_pattern ( )
function svt_pattern  allocate_dynamic_pattern ( )
function svt_pattern  allocate_pa_feature_pattern ( )
function svt_pattern  allocate_static_pattern ( )
virtual function unsigned int  byte_pack ( ref logic [7:0] bytes[], input int unsigned offset, input int kind )
function unsigned int  byte_size ( int kind = -1 )
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  copy_dynamic_data ( vmm_data to )
function void  copy_static_data ( vmm_data to )
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 svt_pattern  do_allocate_pattern ( )
function unsigned int  do_byte_pack ( ref logic [7:0] bytes[], input int unsigned offset, input int kind )
function unsigned int  do_byte_unpack ( const ref logic [7:0] bytes[], input int unsigned offset, input int len, input int kind )
function vmm_data  do_copy ( vmm_data to = null )
function void  enable_cov_options ( )
function void  enable_debug_options ( string inst, string path = "" )
function void  enable_pa_options ( bit enable_debug_opts = 0 )
function void  find_sub_configurations ( ref svt_configuration sub_cfgs[string] )
function bit  get_check_prop_val ( )
function bit  get_cov_prop_val ( )
function bit  get_prop_val ( string prop_name, ref bit [1023:0] prop_val, input int array_ix, ref svt_data data_obj )
virtual function vmm_data  allocate ( )
function void  do_all ( vmm_data :: do_what_e do_what, ref logic [7:0] pack[], const ref logic [7:0] unpack[] )
function bit  is_pa_enabled ( )
virtual function bit  is_valid ( bit silent = 1, int kind = -1 )
function void  new ( vmm_log log = null, string suite_name = "" )
virtual function string  psdisplay ( string prefix = "" )
function void  record_cfg_info ( string inst_name )
function bit  set_prop_val ( string prop_name, bit [1023:0] prop_val, int array_ix )
function void  setup_cov_plusarg ( )
function void  setup_pa_plusarg ( )
function int  static_rand_mode ( bit on_off )

Public Attributes

bit  enable_runtime_trace_recording = 0; 
bit  enable_signal_callbacks = 0; 
bit  enable_sled = 0; 
string  filter_psdisplay_short [$] 
string  inst = SVT_UNSET_INST_NAME

Protected Attributes

static protected svt_configuration  __vmm_rhs 


Member Function Documentation

  function svt_pattern
 svt_configuration::allocate_check_enable_pattern

 (   ) 


This method allocates a pattern containing svt_pattern_data instances for all of the data fields in the object that are related to enabling coverage.

Regular expressions are used to identify checks which will be enabled. If these expressions identify properties that should not be enabled for checks, or if there are properties that are missed by these expressions then this method can be extended and the pattern can be altered.

Return values - An svt_pattern instance containing entries for all of the fields related to enabling coverage.

  function svt_pattern
 svt_configuration::allocate_cov_enable_pattern

 (   ) 


This method allocates a pattern containing svt_pattern_data instances for all of the data fields in the object that are related to enabling coverage.

Regular expressions are used to identify coverage which will be enabled. If these expressions identify properties that should not be enabled for coverage, or if there are properties that are missed by these expressions then this method can be extended and the pattern can be altered.

Return values - An svt_pattern instance containing entries for all of the fields related to enabling coverage.

  function svt_pattern
 svt_configuration::allocate_debug_feature_pattern

 (   ) 


This method allocates a pattern containing svt_pattern_data instances for all of the data fields in the object that are related to debug.

Regular expressions are used to identify debug features that will be enabled. If these expressions identify properties that should not be enabled for debug, or if there are properties that are missed by these expressions then this method can be extended and the pattern can be altered.

Return values - An svt_pattern instance containing entries for all of the fields related to debug

  function svt_pattern
 svt_configuration::allocate_dynamic_pattern

 (   ) 


This method allocates the same pattern as allocate_pattern, minus the elements which do not include the "dynamic" keyword.

Return values - An svt_pattern instance containing entries for the data fields which include the "dynamic" keyword.

  function svt_pattern
 svt_configuration::allocate_pa_feature_pattern

 (   ) 


This method allocates a pattern containing svt_pattern_data instances for all of the data fields in the object that are related to PA.

Regular expressions are used to identify PA features that will be enabled. If these expressions identify properties that should not be enabled for PA, or if there are properties that are missed by these expressions then this method can be extended and the pattern can be altered.

Return values - An svt_pattern instance containing entries for all of the fields related to PA.

  function svt_pattern
 svt_configuration::allocate_static_pattern

 (   ) 


This method allocates the same pattern as allocate_pattern, minus the elements which include the "dynamic" keyword.

Return values - An svt_pattern instance containing entries for the data fields which do not include the "dynamic" keyword.

 virtual function unsigned int
 svt_configuration::byte_pack

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


 Superseded functions 
 vmm_data :: byte_pack 
 svt_data :: byte_pack 

  function unsigned int
 svt_configuration::byte_size

 (  int kind = -1  ) 


Returns the size (in bytes) required by the byte_pack operation based on the requested byte_size kind.

kind - This int indicates the type of byte_size being requested.


 Superseded functions 
 vmm_data :: byte_size 
 svt_data :: byte_size 
 Superseding functions 
 svt_fifo_rate_control_configuration :: byte_size 
 svt_mem_configuration :: byte_size 
 svt_base_mem_suite_configuration :: byte_size 
 svt_mem_suite_configuration :: byte_size 

 virtual function unsigned int
 svt_configuration::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 

 virtual function bit
 svt_configuration::compare

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


 Superseded functions 
 vmm_data :: compare 
 svt_data :: compare 

 virtual function vmm_data
 svt_configuration::copy

 (  vmm_data to = null  ) 


 Superseded functions 
 vmm_data :: copy 
 svt_data :: copy 

  function void
 svt_configuration::copy_dynamic_data

 (  vmm_data to  ) 


Used to limit a copy to the dynamic data members of the object.

 Superseding functions 
 svt_fifo_rate_control_configuration :: copy_dynamic_data 
 svt_mem_configuration :: copy_dynamic_data 
 svt_base_mem_suite_configuration :: copy_dynamic_data 
 svt_mem_suite_configuration :: copy_dynamic_data 

  function void
 svt_configuration::copy_static_data

 (  vmm_data to  ) 


Used to limit a copy to the static data members of the object.

 Superseding functions 
 svt_fifo_rate_control_configuration :: copy_static_data 
 svt_mem_configuration :: copy_static_data 
 svt_base_mem_suite_configuration :: copy_static_data 
 svt_mem_suite_configuration :: copy_static_data 

  function bit
 svt_configuration::decode_prop_val

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


Provide string values for contained_cfg_opts.

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 - The enum value corresponding to the desc.


 Superseded functions 
 svt_data :: decode_prop_val 
 Superseding functions 
 svt_fifo_rate_control_configuration :: decode_prop_val 
 svt_mem_configuration :: decode_prop_val 

  function svt_pattern
 svt_configuration::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_data :: do_allocate_pattern 
 Superseding functions 
 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 

  function unsigned int
 svt_configuration::do_byte_pack

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


Packs the object into the bytes buffer, beginning at offset, based on the requested byte_pack kind.

bytes - Buffer that will contain the packed bytes at the end of the operation.

offset - Offset into bytes where the packing is to begin.

kind - This int indicates the type of byte_pack being requested.


 Superseded functions 
 vmm_data :: do_byte_pack 
 svt_data :: do_byte_pack 
 Superseding functions 
 svt_fifo_rate_control_configuration :: do_byte_pack 
 svt_mem_configuration :: do_byte_pack 

  function unsigned int
 svt_configuration::do_byte_unpack

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


Unpacks len bytes of the object from the bytes buffer, beginning at offset, based on the requested byte_unpack kind.

bytes - Buffer containing the bytes to be unpacked.

offset - Offset into bytes where the unpacking is to begin.

len - Number of bytes to be unpacked.

kind - This int indicates the type of byte_unpack being requested.


 Superseded functions 
 vmm_data :: do_byte_unpack 
 svt_data :: do_byte_unpack 
 Superseding functions 
 svt_fifo_rate_control_configuration :: do_byte_unpack 
 svt_mem_configuration :: do_byte_unpack 

  function vmm_data
 svt_configuration::do_copy

 (  vmm_data to = null  ) 


Copies the object into to, allocating if necessay.

to - Destination class for the copy operation


 Superseded functions 
 vmm_data :: do_copy 
 svt_data :: do_copy 

  function void
 svt_configuration::enable_cov_options

 (   ) 


Parses the configuration object using patterns and automatically enables coverage if enable_cov set to '1' based on the svt_enable_cov plusarg.

This method is called automatically when the reconfigure method is called on any of the top level components.

  function void
 svt_configuration::enable_debug_options

 (  string inst , string path = ""  ) 


Parses the configuration object using patterns and enables debug options.

This method should be called by the top level component in extended suites, immediately after the configuration is received for the first time. It is also called automatically when the reconfigure method is called.

inst - Instance name of the component that is enabled for debug

path - Optional argument to provide the hierarchical path to this object

  function void
 svt_configuration::enable_pa_options

 (  bit enable_debug_opts = 0  ) 


Parses the configuration object using patterns and automatically enables PA options if enable_pa set to '1' based on the svt_enable_pa plusarg.

This method is called automatically when the reconfigure or enable_debug_opts method is called on any of the top level components.

  function void
 svt_configuration::find_sub_configurations

 (  ref svt_configuration sub_cfgs [string]  ) 


This method scans the sub-object hierarchy looking for sub-configurations. It returns an associative array of the objects, indexed by the paths to the sub-objects.

sub_cfgs - An svt_configuration associative array with entries for all of the svt_configration sub-objects, indexed by the sub-object field names.

  function bit
 svt_configuration::get_check_prop_val

 (   ) 


Parses the configuration object using patterns to see if checks has been enabled on any of the layers or protocol as a whole.

  function bit
 svt_configuration::get_cov_prop_val

 (   ) 


Parses the configuration object using patterns to see if coverage has been enabled on any of the layers or protocol as a whole.

  function bit
 svt_configuration::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 
 Superseding functions 
 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 

 virtual function vmm_data
 svt_configuration::allocate

 (   ) 


 Superseded functions 
 vmm_data :: allocate 
 svt_data :: allocate 

  function void
 svt_configuration::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 

  function bit
 svt_configuration::is_pa_enabled

 (   ) 


Checks the PA related flags 'enable_xml_gen' and returns '1' if any of the 'enable_.*xml_gen' is set.

Clients can override this function if requeried to be.

 virtual function bit
 svt_configuration::is_valid

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


 Superseded functions 
 vmm_data :: is_valid 
 svt_data :: is_valid 

  function void
 svt_configuration::new

 (  vmm_log log = null, string suite_name = ""  ) 


CONSTRUCTOR: Creates a new instance of the svt_configuration class.

log - An vmm_log object reference used to replace the default internal logger. The class extension that calls super.new should pass a reference to its own static log instance.

suite_name - A String that identifies the product suite to which the configuration object belongs.


 Superseded functions 
 svt_data :: new 
 Superseding functions 
 svt_fifo_rate_control_configuration :: new 
 svt_mem_configuration :: new 
 svt_base_mem_suite_configuration :: new 
 svt_mem_suite_configuration :: new 

 virtual function string
 svt_configuration::psdisplay

 (  string prefix = ""  ) 


 Superseded functions 
 vmm_data :: psdisplay 
 svt_data :: psdisplay 

  function void
 svt_configuration::record_cfg_info

 (  string inst_name  ) 


Record the configuration information inside FSDB if writer is available, if the writer is not available at this time then register the data, when the writer is created the data can be written out into FSDB.

inst_name - Instance name of the component that is enabled for debug

  function bit
 svt_configuration::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_data :: set_prop_val 
 Superseding functions 
 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 

  function void
 svt_configuration::setup_cov_plusarg

 (   ) 


This method sets up the field indicating whether coverage support should be enabled automatically.

  function void
 svt_configuration::setup_pa_plusarg

 (   ) 


This method sets up the fields indicating whether PA support should be enabled automatically.

  function int
 svt_configuration::static_rand_mode

 (  bit on_off  ) 


 Superseding functions 
 svt_fifo_rate_control_configuration :: static_rand_mode 
 svt_mem_configuration :: static_rand_mode 
 svt_base_mem_suite_configuration :: static_rand_mode 
 svt_mem_suite_configuration :: static_rand_mode 


Member Attribute Documentation

 bit  attribute
 svt_configuration::enable_runtime_trace_recording = 0


Determines if runtime trace recording is to be enabled or not. By default the data is dumped at end of simulation into trace file
type: Static

 bit  attribute
 svt_configuration::enable_signal_callbacks = 0


(Default = 0) When 1 the model will enable callbacks associated with signal changes (pre_*_drive_cb_exec and post_*_sample_cb_exec).

This feature can be set directly or via the command line, using the '+define' plusarg (e.g., '+define+SVT__ENABLE_SIGNAL_CB').

 bit  attribute
 svt_configuration::enable_sled = 0


Determines if MERCURY(SLED) dumping is to enabled or not.
type: Static

 string  attribute
 svt_configuration::filter_psdisplay_short[$]


Field to store psdisplay_short display/trace-file fields to be removed. User need to input Field Header name in this field.

 string  attribute
 svt_configuration::inst = SVT_UNSET_INST_NAME


Used to define the Instance Name of a component to whose constructor this configuration object is passed. Since all SVT VIP components require that a valid configuration object (derived from this class) be passed to their constructor, this value is passed to the call to that constructor's call to super.new (i.e. as the inst argument to vmm_xactor :: new).
Similarly, the stream_id property (which is inherited from vmm_data) of a derived config object is used as the stream_id argument of vmm_xactor :: new, to define the Stream ID of the component being created.

Note: After a configuration object (derived from this class) is used to constuct a new SVT component, the values of the inst and stream_id properties must not be changed in the configuration object in use by that component.

 static protected svt_configuration  attribute
 svt_configuration::__vmm_rhs