svt_mem_transaction Class Reference

Inheritance diagram for class svt_mem_transaction:

List of all members.


Detailed Description

This memory access transaction class is used as the request and response type between a memory driver and a memory sequencer.



Public Member Functions

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 string  get_mcd_class_name ( )
function void  get_phys_addr ( int burst_ix, ref int unsigned phys_addr[SVT_MEM_SA_CORE_PHYSICAL_DIMENSIONS_MAX] )
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 void  new ( string name = "svt_mem_transaction", 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 )

Public Attributes

rand svt_mem_addr_t  addr 
rand svt_mem_data_t  data [] 
rand bit  is_read 
int unsigned  phys_addr [SVT_MEM_SA_CORE_PHYSICAL_DIMENSIONS_MAX
rand svt_mem_data_t  valid [] 

Constraints

constraint  mem_transaction_valid_ranges  ( )
constraint  reasonable_data_size  ( )


Member Function Documentation

  function svt_pattern
 svt_mem_transaction::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_sequence_item :: do_allocate_pattern 

  function bit
 svt_mem_transaction::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 
 svt_sequence_item :: do_compare 

  function bit
 svt_mem_transaction::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. If protocol defines physical representation for transaction then -1 does RELEVANT is_valid. If not, -1 does COMPLETE (i.e., all fields checked) is_valid. svt_sequence_item_base :: COMPLETE always results in COMPLETE is_valid.

 Superseded functions 
 svt_sequence_item_base :: do_is_valid 
 svt_sequence_item :: do_is_valid 

  function string
 svt_mem_transaction::get_mcd_class_name

 (   ) 


Returns the class name for the object used for logging.

 Superseded functions 
 svt_sequence_item_base :: get_mcd_class_name 

  function void
 svt_mem_transaction::get_phys_addr

 (  int burst_ix , ref int unsigned phys_addr [SVT_MEM_SA_CORE_PHYSICAL_DIMENSIONS_MAX]  ) 


Method used to obtain the physical address for a specific beat within a burst.

burst_ix - Desired beat within the burst.

Return values - The physical address for the indicated burst_ix.

  function bit
 svt_mem_transaction::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_sequence_item :: get_prop_val 

  function void
 svt_mem_transaction::new

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


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

name - Instance name of the transaction

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


 Superseded functions 
 svt_sequence_item_base :: new 
 svt_sequence_item :: new 

  function int
 svt_mem_transaction::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 

  function bit
 svt_mem_transaction::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_sequence_item :: set_prop_val 


Member Attribute Documentation

 rand svt_mem_addr_t  attribute
 svt_mem_transaction::addr


The base address of the memory burst operation, using byte-level granularity. How that base address is interpreted for the remainder of the data burst depends on the component or transactor fulfilling the transaction.

 rand svt_mem_data_t  attribute
 svt_mem_transaction::data[]


Burst of data to be written or that has been read. The length of the array specifies the length of the burst. The bits that are valid in each array element is indicated by the corresponding element in the 'valid' array

 rand bit  attribute
 svt_mem_transaction::is_read


Indicates if the memory transaction is a READ or WRITE operation. When set, indicates a READ operation.

 int unsigned  attribute
 svt_mem_transaction::phys_addr[SVT_MEM_SA_CORE_PHYSICAL_DIMENSIONS_MAX]


Values representing the base physical address for the transaction. These values must be assigned in order to enable recording of the physical address.

Actual production of physical addresses for communication with the memory are done through the get_phys_addr method.

 rand svt_mem_data_t  attribute
 svt_mem_transaction::valid[]


Indicates which bits in corresponding 'data' array element are valid. The size of this array must be either 0 or equal to the size of the 'data' array. A size of 0 implies all data bits are valid. Defaults to size == 0.

Member Constraint Documentation

  constraint
 svt_mem_transaction::mem_transaction_valid_ranges


constraint mem_transaction_valid_ranges {
    data.size() == valid.size();
  }

  constraint
 svt_mem_transaction::reasonable_data_size


constraint reasonable_data_size {
    data.size() <= 1024;
    data.size() > 0;
  }