svt_fifo_rate_control_configuration Class Reference

Inheritance diagram for class svt_fifo_rate_control_configuration:

List of all members.


Detailed Description

This FIFO rate control configuration class encapsulates the configuration information for the rate control parameters modeled in a FIFO.



Public Member Functions

function unsigned int  byte_size ( int kind = -1 )
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 = -1 )
function unsigned int  do_byte_unpack ( const ref logic [7:0] bytes[], input int unsigned offset, input int len, input int kind )
function bit  do_compare ( vmm_data to, output string diff, input int kind )
function bit  do_is_valid ( bit silent = 1, int kind = RELEVANT )
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_mcd_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 void  new ( vmm_log log = null, string suite_name = "" )
function int  reasonable_constraint_mode ( bit on_off )
function bit  set_prop_val ( string prop_name, bit [1023:0] prop_val, int array_ix )
function int  static_rand_mode ( bit on_off )

Public Attributes

rand svt_fifo_rate_control_configuration :: fifo_type_enum  fifo_type 
rand int  full_level = SVT_FIFO_MAX_FULL_LEVEL
string  group_name 
int  group_seq_number 
rand int  rate = SVT_FIFO_MAX_RATE
string  seqr_full_name 
rand svt_fifo_rate_control_configuration :: fifo_start_up_level_enum  start_up_level 

Member Typedefs

 typedef enum  fifo_start_up_level_enum 
 typedef enum  fifo_type_enum 

Constraints

constraint  reasonable_full_level  ( )
constraint  reasonable_rate  ( )
constraint  valid_ranges  ( )


Member Function Documentation

  function unsigned int
 svt_fifo_rate_control_configuration::byte_size

 (  int kind = -1  ) 


Returns the size (in bytes) required by the byte_pack operation. Only supports COMPLETE pack so kind must be svt_data :: COMPLETE.

 Superseded functions 
 vmm_data :: byte_size 
 svt_data :: byte_size 
 svt_configuration :: byte_size 

  function void
 svt_fifo_rate_control_configuration::copy_dynamic_data

 (  vmm_data to  ) 


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

 Superseded functions 
 svt_configuration :: copy_dynamic_data 

  function void
 svt_fifo_rate_control_configuration::copy_static_data

 (  vmm_data to  ) 


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

 Superseded functions 
 svt_configuration :: copy_static_data 

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


 Superseded functions 
 svt_data :: decode_prop_val 
 svt_configuration :: decode_prop_val 

  function svt_pattern
 svt_fifo_rate_control_configuration::do_allocate_pattern

 (   ) 


HDL Support: 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 
 svt_configuration :: do_allocate_pattern 

  function unsigned int
 svt_fifo_rate_control_configuration::do_byte_pack

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


Packs the object into the bytes buffer, beginning at offset. Only supports COMPLETE pack so kind must be svt_data :: COMPLETE.

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. Only supported kind value is svt_data :: COMPLETE, which results in all of the fields being packed and the return of an integer indicating the number of packed bytes. All other kind values result in no change to the buffer contents, and a return value of 0.


 Superseded functions 
 vmm_data :: do_byte_pack 
 svt_data :: do_byte_pack 
 svt_configuration :: do_byte_pack 

  function unsigned int
 svt_fifo_rate_control_configuration::do_byte_unpack

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


Unpacks the object from the bytes buffer, beginning at offset. Only supports COMPLETE unpack so kind must be svt_data :: COMPLETE.

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. Only supported kind value is svt_data :: COMPLETE, which results in all of the fields being unpacked and the return of an integer indicating the number of unpacked bytes. All other kind values result in no change to the buffer contents, and a return value of 0.


 Superseded functions 
 vmm_data :: do_byte_unpack 
 svt_data :: do_byte_unpack 
 svt_configuration :: do_byte_unpack 

  function bit
 svt_fifo_rate_control_configuration::do_compare

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


Compares the object with to. Differences are placed in diff. Only supported kind values are -1 and svt_data :: COMPLETE. Both values result in a COMPLETE compare.

to - vmm_data object to be compared against.

diff - String indicating the differences between this and to.

kind - This int indicates the type of compare to be attempted. Only supported kind value is svt_data :: COMPLETE, which results in comparisons of the non-static data members. All other kind values result in a return value of 1.


 Superseded functions 
 vmm_data :: do_compare 
 svt_data :: do_compare 

  function bit
 svt_fifo_rate_control_configuration::do_is_valid

 (  bit silent = 1, int kind = RELEVANT  ) 


Checks to see that the data field values are valid, focusing mainly on checking/enforcing valid_ranges constraint. Only supported kind values are -1 and svt_data :: COMPLETE. Both values result in the same check of the fields.

 Superseded functions 
 vmm_data :: do_is_valid 
 svt_data :: do_is_valid 

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


 Superseded functions 
 svt_data :: encode_prop_val 

  function string
 svt_fifo_rate_control_configuration::get_mcd_class_name

 (   ) 


Returns the class name for the object used for logging.

 Superseded functions 
 svt_data :: get_mcd_class_name 

  function bit
 svt_fifo_rate_control_configuration::get_prop_val

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


HDL Support: For read access to public data members of this class.

 Superseded functions 
 svt_data :: get_prop_val 
 svt_configuration :: get_prop_val 

  function void
 svt_fifo_rate_control_configuration::new

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


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

log - Sets the log file that is used for status output.

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


 Superseded functions 
 svt_data :: new 
 svt_configuration :: new 

  function int
 svt_fifo_rate_control_configuration::reasonable_constraint_mode

 (  bit on_off  ) 


Method to turn reasonable constraints on/off as a block.

 Superseded functions 
 svt_data :: reasonable_constraint_mode 

  function bit
 svt_fifo_rate_control_configuration::set_prop_val

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


HDL Support: For write access to public data members of this class.

 Superseded functions 
 svt_data :: set_prop_val 
 svt_configuration :: set_prop_val 

  function int
 svt_fifo_rate_control_configuration::static_rand_mode

 (  bit on_off  ) 


Method to turn static config param randomization on/off as a block.

 Superseded functions 
 svt_configuration :: static_rand_mode 


Member Attribute Documentation

 rand svt_fifo_rate_control_configuration :: fifo_type_enum  attribute
 svt_fifo_rate_control_configuration::fifo_type = WRITE_TYPE_FIFO


Indicates if this is a FIFO for read type transactions or a FIFO for WRITE type transactions

 rand int  attribute
 svt_fifo_rate_control_configuration::full_level = SVT_FIFO_MAX_FULL_LEVEL


The full level in bytes of the READ FIFO into which data from READ transactions is dumped or the WRITE FIFO from which data for WRITE transactions is taken.

 string  attribute
 svt_fifo_rate_control_configuration::group_name


The name of the group in the traffic profile corresponding to this configuration

 int  attribute
 svt_fifo_rate_control_configuration::group_seq_number


The sequence number of the group in the traffic profile corresponding to this configuration

 rand int  attribute
 svt_fifo_rate_control_configuration::rate = SVT_FIFO_MAX_RATE


The rate in bytes/cycle of the FIFO into which data from READ transactions is dumped or data for WRITE transactions is taken.

 string  attribute
 svt_fifo_rate_control_configuration::seqr_full_name


The full name of the sequencer to which this configuration applies

 rand svt_fifo_rate_control_configuration :: fifo_start_up_level_enum  attribute
 svt_fifo_rate_control_configuration::start_up_level = FIFO_EMPTY_ON_START


Indicates if the start up level of the FIFO is empty or full

Member Typedef Documentation

 typedef enum  svt_fifo_rate_control_configuration::fifo_start_up_level_enum
FIFO_EMPTY_ON_START(SVT_FIFO_EMPTY_ON_START)
FIFO_FULL_ON_START(SVT_FIFO_FULL_ON_START)

 typedef enum  svt_fifo_rate_control_configuration::fifo_type_enum
WRITE_TYPE_FIFO(SVT_FIFO_WRITE)
READ_TYPE_FIFO(SVT_FIFO_READ)


Member Constraint Documentation

  constraint
 svt_fifo_rate_control_configuration::reasonable_full_level


constraint reasonable_full_level {
    full_level <= 256;
  }

  constraint
 svt_fifo_rate_control_configuration::reasonable_rate


constraint reasonable_rate {
    rate <= 256;
  }

  constraint
 svt_fifo_rate_control_configuration::valid_ranges


constraint valid_ranges {
    rate > 0;
    full_level > 0;
  }