svt_mem_configuration Class Reference

Inheritance diagram for class svt_mem_configuration:

List of all members.


Detailed Description

This memory configuration class encapsulates the configuration information for a single memory core instance.



Public Member Functions

function void  copy_dynamic_data ( ovm_sequence_item to )
function void  copy_static_data ( ovm_sequence_item 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 bit  do_compare ( ovm_object rhs, ovm_comparer comparer )
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_sequence_item_base data_obj )
function bit  load_cfg_from_catalog ( svt_mem_vendor_catalog_base catalog, string mem_package, string mem_vendor, string part_name )
function void  new ( string name = "svt_mem_configuration", 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 int  addr_width = 32; 
rand int  attr_width = 8; 
string  core_name = "MEMSERVER"; 
rand int  data_width = 32; 
bit  enable_memcore_xml_gen = 0; 
string  fname = ""; 
rand bit  is_4state = 0; 
rand bit  is_ro = 0; 
svt_xml_writer :: format_type_enum  pa_format_type 

Constraints

constraint  mem_configuration_valid_ranges  ( )


Member Function Documentation

  function void
 svt_mem_configuration::copy_dynamic_data

 (  ovm_sequence_item to  ) 


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

 Superseded functions 
 svt_configuration :: copy_dynamic_data 
 Superseding functions 
 svt_base_mem_suite_configuration :: copy_dynamic_data 
 svt_mem_suite_configuration :: copy_dynamic_data 

  function void
 svt_mem_configuration::copy_static_data

 (  ovm_sequence_item to  ) 


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

 Superseded functions 
 svt_configuration :: copy_static_data 
 Superseding functions 
 svt_base_mem_suite_configuration :: copy_static_data 
 svt_mem_suite_configuration :: copy_static_data 

  function bit
 svt_mem_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_sequence_item_base :: decode_prop_val 
 svt_configuration :: decode_prop_val 

  function svt_pattern
 svt_mem_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_sequence_item_base :: do_allocate_pattern 
 svt_configuration :: do_allocate_pattern 
 Superseding functions 
 svt_base_mem_suite_configuration :: do_allocate_pattern 
 svt_mem_suite_configuration :: do_allocate_pattern 

  function bit
 svt_mem_configuration::do_compare

 (  ovm_object rhs , ovm_comparer comparer  ) 


Compares the object with rhs..

rhs - Object to be compared against.

comparer - TBD


 Superseded functions 
 ovm_object :: do_compare 
 svt_sequence_item_base :: do_compare 
 Superseding functions 
 svt_base_mem_suite_configuration :: do_compare 
 svt_mem_suite_configuration :: do_compare 

  function bit
 svt_mem_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_sequence_item_base :: COMPLETE. Both values result in the same check of the fields.

 Superseded functions 
 svt_sequence_item_base :: do_is_valid 

  function bit
 svt_mem_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_sequence_item_base :: encode_prop_val 

  function string
 svt_mem_configuration::get_mcd_class_name

 (   ) 


Returns the class name for the object used for logging.

 Superseded functions 
 svt_sequence_item_base :: get_mcd_class_name 
 Superseding functions 
 svt_base_mem_suite_configuration :: get_mcd_class_name 
 svt_mem_suite_configuration :: get_mcd_class_name 

  function bit
 svt_mem_configuration::get_prop_val

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


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

 Superseded functions 
 svt_sequence_item_base :: get_prop_val 
 svt_configuration :: get_prop_val 
 Superseding functions 
 svt_base_mem_suite_configuration :: get_prop_val 
 svt_mem_suite_configuration :: get_prop_val 

  function bit
 svt_mem_configuration::load_cfg_from_catalog

 (  svt_mem_vendor_catalog_base catalog , string mem_package , string mem_vendor , string part_name  ) 


Walk through the part catalog to select the proper part number and returns the path to the configuration file.

catalog - The vendor part catalog that is to be used to find the part.

mem_package - Determines which package category to select the part number from.

mem_vendor - Determines which vendor category to selct the part number from.

part_name - Specifies the part name to load.

Return values - Indicates whether the load was a success.

  function void
 svt_mem_configuration::new

 (  string name = "svt_mem_configuration", string suite_name = ""  ) 


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

name - Instance name of the configuration

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


 Superseded functions 
 svt_sequence_item_base :: new 
 svt_configuration :: new 
 Superseding functions 
 svt_base_mem_suite_configuration :: new 
 svt_mem_suite_configuration :: new 

  function int
 svt_mem_configuration::reasonable_constraint_mode

 (  bit on_off  ) 


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

 Superseded functions 
 svt_sequence_item_base :: reasonable_constraint_mode 
 Superseding functions 
 svt_base_mem_suite_configuration :: reasonable_constraint_mode 
 svt_mem_suite_configuration :: reasonable_constraint_mode 

  function bit
 svt_mem_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_sequence_item_base :: set_prop_val 
 svt_configuration :: set_prop_val 
 Superseding functions 
 svt_base_mem_suite_configuration :: set_prop_val 
 svt_mem_suite_configuration :: set_prop_val 

  function int
 svt_mem_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 
 Superseding functions 
 svt_base_mem_suite_configuration :: static_rand_mode 
 svt_mem_suite_configuration :: static_rand_mode 


Member Attribute Documentation

 rand int  attribute
 svt_mem_configuration::addr_width = 32


Defines the number of address bits.

Must be less than or equal to `SVT_MAX_MEM_ADDR_WIDTH.

 rand int  attribute
 svt_mem_configuration::attr_width = 8


Defines the number of user-defined attribute bits.

Must be less than or equal to `SVT_MAX_MEM_ATTR_WIDTH.

 string  attribute
 svt_mem_configuration::core_name = "MEMSERVER"


Name of the mem_core used in C sparse array.

 rand int  attribute
 svt_mem_configuration::data_width = 32


Defines the number of data bits.

Must be less than or equal to `SVT_MAX_MEM_DATA_WIDTH.

 bit  attribute
 svt_mem_configuration::enable_memcore_xml_gen = 0


Indicates whether XML generation is included for memcore operations. The resulting file can be loaded in Protocol Analyzer to obtain a graphical presenation of the memcore activity. Set the value to 1 to enable the memcore XML generation. Set the value to 0 to disable the memcore XML generation.

 string  attribute
 svt_mem_configuration::fname = ""


Name of the file used to initialize the memory content.

If the value is "", then no file initialization will happen.

 rand bit  attribute
 svt_mem_configuration::is_4state = 0


Memory is 4state if TRUE(1).

 rand bit  attribute
 svt_mem_configuration::is_ro = 0


Memory is read-only if TRUE(1).

 svt_xml_writer :: format_type_enum  attribute
 svt_mem_configuration::pa_format_type


Determines in which format the file should write the transaction data. A value 0 indicates XML format, 1 indicates FSDB and 2 indicates both XML and FSDB.


Member Constraint Documentation

  constraint
 svt_mem_configuration::mem_configuration_valid_ranges


Keeps the randomized width from being zero

constraint mem_configuration_valid_ranges {
    data_width inside { [1: 1024] };
     addr_width inside { [4: 64] };
     attr_width inside { [0: 8] };
  }