svt_transaction Class Reference

Inheritance diagram for class svt_transaction:

List of all members.


Detailed Description

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



Public Member Functions

virtual function vmm_data  allocate ( )
function svt_data_converter  allocate_data_converter ( )
function svt_pattern  allocate_xml_pattern ( )
function void  apply_byte_to_crc ( bit [7:0] value, bit init = 0 )
function bit  begin_is_off ( )
function bit  begin_is_on ( )
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 )
function void  clear ( )
function void  clear_implementation ( )
function void  clear_trace ( )
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_implementation ( vmm_data to, svt_data :: recursive_op_enum impl_trace_op = DEEP )
function void  copy_trace ( vmm_data to, svt_data :: recursive_op_enum impl_trace_op = DEEP )
function bit  decode_8b10b_data ( input bit [9:0] data_in, ref bit running_disparity, output bit data_k, output bit [7:0] data_out )
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 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 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 vmm_data  do_copy ( vmm_data to = null )
function bit  do_is_valid ( bit silent = 1, int kind = -1 )
function bit  enable_trace ( )
function bit  encode_8b10b_data ( input bit [7:0] data_in, input bit data_k, ref bit running_disparity, output bit [9:0] data_out )
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 bit  end_is_off ( )
function bit  end_is_on ( )
static function svt_transaction  find_recycled_xact ( string class_name )
function realtime  get_accept_realtime ( )
function svt_configuration  get_base_cfg ( )
function realtime  get_begin_realtime ( )
function svt_transaction  get_causal_ref ( )
function void  get_clean_realtimes ( ref realtime start_time, ref realtime end_time )
function void  get_clean_times ( ref time start_time, ref time end_time )
function bit [31:0]   get_crc ( )
function bit [31:0]   get_crc_initial_value ( )
function bit [31:0]   get_crc_polynomial ( )
function svt_data_converter  get_data_converter ( )
function realtime  get_end_realtime ( )
function svt_transaction  get_implementation ( int ix )
function svt_transaction  get_implementation_xact_factory ( )
function bit  get_is_internal ( )
function svt_transaction  get_original_ref ( )
function svt_pa_object_data  get_pa_obj_data ( string uid = "", string typ = "", string parent_uid = "", string channel = "" )
function bit  get_prop_val ( string prop_name, ref bit [1023:0] prop_val, input int array_ix, ref svt_data data_obj )
function svt_transaction  get_recycled_xact ( string class_name )
function time  get_safe_begin_time ( )
function time  get_safe_end_time ( )
function svt_transaction  get_trace ( int ix )
function svt_transaction  get_trace_xact_factory ( )
function bit  get_xact_status ( ref svt_transaction :: status_enum status )
function void  initialize_8b10b ( bit force_load = 0 )
function void  initialize_crc ( bit [31:0] poly, int width, bit [31:0] init, bit force_load = 0 )
function void  initialize_scrambling ( )
function bit  is_supported ( svt_configuration cfg, bit silent = 0 )
virtual function bit  is_valid ( bit silent = 1, int kind = -1 )
function void  post_randomize ( )
function void  pre_randomize ( )
virtual function string  psdisplay ( string prefix = "" )
function string  psdisplay_concise ( )
function string  psdisplay_implementation ( string prefix = "", int max_impl_elem_display = -1 )
function string  psdisplay_meta_info ( string prefix = "" )
function string  psdisplay_short ( string prefix = "", bit hdr_only = 0 )
function string  psdisplay_short_hdr_body ( string prefix = "" )
function string  psdisplay_short_via_pattern ( svt_pattern pttrn, string prefix = "", bit hdr_only = 0 )
function string  psdisplay_trace ( string prefix = "", int max_trace_elem_display = -1 )
function void  recycle_me ( )
function bit  save_prop_vals_to_xml ( svt_xml_writer writer, string object_block_desc = "", string prefix = "" )
function void  scramble ( input byte unsigned array_in[], ref bit [15:0] lfsr, output byte unsigned array_out[] )
function void  set_crc_initial_value ( bit [31:0] init )
function void  set_crc_polynomial ( bit [31:0] poly )
function void  set_data_converter ( svt_data_converter new_converter )
function void  set_is_internal ( bit is_internal = 1 )
function bit  set_prop_val ( string prop_name, bit [1023:0] prop_val, int array_ix )
function void  store_causal_ref ( svt_transaction causal )
function void  store_context ( svt_transaction implementation_xact )
function void  store_original_ref ( svt_transaction original )
function void  store_trace ( svt_transaction trace_xact, bit copy = 1, svt_data :: recursive_op_enum copy_depth = SHALLOW )
function void  svt_transaction_copy_hook ( vmm_data to = null )
function void  new ( vmm_log log = null, string suite_name = "" )
function void  unscramble ( input byte unsigned array_in[], ref bit [15:0] lfsr, output byte unsigned array_out[] )
task   wait_begin ( )
task   wait_end ( )
task   wait_end_last_implementation ( )
task   wait_for_causal_ref ( )
task   wait_for_causal_ref_thru_time_unit ( int wait_time = 1 )

Public Attributes

realtime  active_xml_start_time = -1; 
svt_transaction  default_implementation_xact_factory = null; 
real  end_time = 0; 
static svt_data :: recursive_op_enum  exception_list_opts 
svt_transaction  implementation [$] 
static svt_data :: recursive_op_enum  protocol_xacts_opts 
real  start_time = 0; 
realtime  svt_accept_realtime = 0; 
realtime  svt_begin_realtime = 0; 
realtime  svt_end_realtime = 0; 
svt_transaction  trace [$] 

Protected Attributes

static protected svt_transaction  __vmm_rhs 

Member Typedefs

 typedef enum  status_enum 


Member Function Documentation

 virtual function vmm_data
 svt_transaction::allocate

 (   ) 


 Superseded functions 
 vmm_data :: allocate 
 svt_data :: allocate 
 Superseding functions 
 svt_8b10b_data :: allocate 
 svt_mem_transaction :: allocate 
 svt_traffic_profile_transaction :: allocate 

  function svt_data_converter
 svt_transaction::allocate_data_converter

 (   ) 


Method to allocate a new data converter. Extended classes with additional converter capabilities should overload this method to allocate an extended data converter supporting these additional capabilities.

  function svt_pattern
 svt_transaction::allocate_xml_pattern

 (   ) 


This method allocates a pattern containing svt_pattern_data instances for all of the data fields in the object that are to be included in the object's XML output.

Return values - An svt_pattern instance containing entries for all of the fields required for XML output of the data object.


 Superseded functions 
 svt_data :: allocate_xml_pattern 
 Superseding functions 
 svt_traffic_profile_transaction :: allocate_xml_pattern 

  function void
 svt_transaction::apply_byte_to_crc

 (  bit [7:0] value , bit init = 0  ) 


This methods applies a byte to the CRC algorithm.

value - Value to be applied to the CRC algorithm

init - Optional argument that signifies that the CRC value should be initialied before the value is applied.

  function bit
 svt_transaction::begin_is_off

 (   ) 


Utility method which identifies the 'off' state of the begin event independent of the underlying methodology.

  function bit
 svt_transaction::begin_is_on

 (   ) 


Utility method which identifies the 'on' state of the begin event independent of the underlying methodology.

 virtual function unsigned int
 svt_transaction::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_8b10b_data :: byte_pack 
 svt_mem_transaction :: byte_pack 
 svt_traffic_profile_transaction :: byte_pack 

  function unsigned int
 svt_transaction::byte_size

 (  int kind = -1  ) 


Returns the size (in bytes) required by the byte_pack operation.

kind - This int indicates the type of byte_size being requested. Only supported kind value is svt_data :: COMPLETE, which results in a size calculation based on the non-static fields. All other kind values result in a return value of 0.


 Superseded functions 
 vmm_data :: byte_size 
 svt_data :: byte_size 
 Superseding functions 
 svt_8b10b_data :: byte_size 
 svt_mem_transaction :: byte_size 
 svt_traffic_profile_transaction :: byte_size 

 virtual function unsigned int
 svt_transaction::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_8b10b_data :: byte_unpack 
 svt_mem_transaction :: byte_unpack 
 svt_traffic_profile_transaction :: byte_unpack 

  function void
 svt_transaction::clear

 (   ) 


Clears the contents of the transaction so that it can safely be reused.

  function void
 svt_transaction::clear_implementation

 (   ) 


This method clears the implementation [$] transaction list, as well as any causal references which may have been setup.

  function void
 svt_transaction::clear_trace

 (   ) 


This method clears the trace [$] transaction list, as well as any original references which may have been setup.

 virtual function bit
 svt_transaction::compare

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


 Superseded functions 
 vmm_data :: compare 
 svt_data :: compare 
 Superseding functions 
 svt_8b10b_data :: compare 
 svt_mem_transaction :: compare 
 svt_traffic_profile_transaction :: compare 

 virtual function vmm_data
 svt_transaction::copy

 (  vmm_data to = null  ) 


 Superseded functions 
 vmm_data :: copy 
 svt_data :: copy 
 Superseding functions 
 svt_8b10b_data :: copy 
 svt_mem_transaction :: copy 
 svt_traffic_profile_transaction :: copy 

  function void
 svt_transaction::copy_implementation

 (  vmm_data to , svt_data :: recursive_op_enum impl_trace_op = DEEP  ) 


Copies the object implementation queue into to.

to - vmm_data object is the destination of the copy.

  function void
 svt_transaction::copy_trace

 (  vmm_data to , svt_data :: recursive_op_enum impl_trace_op = DEEP  ) 


Copies the object trace queue into to.

to - vmm_data object is the destination of the copy.

  function bit
 svt_transaction::decode_8b10b_data

 (  input bit [9:0] data_in , ref bit running_disparity , output bit data_k , output bit [7:0] data_out  ) 


Decodes a ten bit data value into its eight bit representation. The function returns 0 and the output is unpredictable.

data_in - Ten bit value to be decoded

running_disparity - The value provided to this argument determines whether the ten bit value is selected from the positive or negative disparity column. The value is updated with the disparity of the new ten bit value that is selected. If the encode operation fails then the value remains unchanged.

data_k - Flag that determines when the Ten bit data represents a control character.

data_out - Eight bit decoded data.

  function bit
 svt_transaction::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 exception_list_opts and protocol_xacts_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_8b10b_data :: decode_prop_val 
 svt_traffic_profile_transaction :: decode_prop_val 

  function void
 svt_transaction::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_8b10b_data :: do_all 
 svt_mem_transaction :: do_all 
 svt_traffic_profile_transaction :: do_all 

  function svt_pattern
 svt_transaction::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_8b10b_data :: do_allocate_pattern 
 svt_mem_transaction :: do_allocate_pattern 
 svt_traffic_profile_transaction :: do_allocate_pattern 

  function unsigned int
 svt_transaction::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, 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. Only supported kind value is svt_data :: COMPLETE, which results in all of the non-static 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 
 Superseding functions 
 svt_8b10b_data :: do_byte_pack 
 svt_mem_transaction :: do_byte_pack 
 svt_traffic_profile_transaction :: do_byte_pack 

  function unsigned int
 svt_transaction::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, 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. Only supported kind value is svt_data :: COMPLETE, which results in all of the non-static 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 exception contents, and a return value of 0.


 Superseded functions 
 vmm_data :: do_byte_unpack 
 svt_data :: do_byte_unpack 
 Superseding functions 
 svt_8b10b_data :: do_byte_unpack 
 svt_mem_transaction :: do_byte_unpack 
 svt_traffic_profile_transaction :: do_byte_unpack 

  function bit
 svt_transaction::do_compare

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


Compares the object with to, based on the requested compare kind. Differences are placed in diff.

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 
 Superseding functions 
 svt_8b10b_data :: do_compare 
 svt_mem_transaction :: do_compare 
 svt_traffic_profile_transaction :: do_compare 

  function vmm_data
 svt_transaction::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 
 Superseding functions 
 svt_traffic_profile_transaction :: do_copy 

  function bit
 svt_transaction::do_is_valid

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


Checks to see that the data field values are valid.

silent - bit indicating whether failures should result in warning messages.

kind - This int indicates the type of is_avalid check to attempt. Only supported kind value is svt_data :: COMPLETE, which results in verification that the non-static data members are all valid. All other kind values result in a return value of 1.


 Superseded functions 
 vmm_data :: do_is_valid 
 svt_data :: do_is_valid 
 Superseding functions 
 svt_8b10b_data :: do_is_valid 
 svt_mem_transaction :: do_is_valid 
 svt_traffic_profile_transaction :: do_is_valid 

  function bit
 svt_transaction::enable_trace

 (   ) 


This virtual method is used to enable/disable the trace capability. The base class implementation always returns 0, indicating that this feature is disabled. Extended classes wishing to support this feature must consider whether this feature should always be enabled, be enabled for all instances of the extended class, or enabled on a per instance basis. This method, and any supporting data fields, etc., in the extended class should be implemented in accordance with these decisions.

  function bit
 svt_transaction::encode_8b10b_data

 (  input bit [7:0] data_in , input bit data_k , ref bit running_disparity , output bit [9:0] data_out  ) 


Encodes an eight bit data value into its ten bit representation. The function returns 0 and the output is unpredictable if Xs and Zs are passed in via the argument.

data_in - Eight bit value to be encoded.

data_k - Flag that determines when the eight bit data represents a control character.

running_disparity - The value provided to this argument determines whether the ten bit value is selected from the positive or negative disparity column. The value is updated with the disparity of the new ten bit value that is selected. If the encode operation fails then the value remains unchanged.

data_out - Ten bit encoded data.

  function bit
 svt_transaction::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 - Status indicating the success/failure of the encode.


 Superseded functions 
 svt_data :: encode_prop_val 
 Superseding functions 
 svt_8b10b_data :: encode_prop_val 
 svt_traffic_profile_transaction :: encode_prop_val 

  function bit
 svt_transaction::end_is_off

 (   ) 


Utility method which identifies the 'off' state of the end event independent of the underlying methodology.

  function bit
 svt_transaction::end_is_on

 (   ) 


Utility method which identifies the 'on' state of the end event independent of the underlying methodology.

 static function svt_transaction
 svt_transaction::find_recycled_xact

 (  string class_name  ) 


Static method to obtain a previously used transaction from recycled_xact [$] for reuse. Calls clear before returning the recycled transaction.

class_name - Used to help insure that the retrieved svt_transaction is of the desired type.

Return values - The previously used transaction, ready for reuse.

  function realtime
 svt_transaction::get_accept_realtime

 (   ) 


Accessor method which returns the time at which the accept event was triggered as a realtime value.

  function svt_configuration
 svt_transaction::get_base_cfg

 (   ) 


Returns a reference of the transaction object. NOTE: This operation is used to fetch details to filter psdisplay_short display fields.

  function realtime
 svt_transaction::get_begin_realtime

 (   ) 


Accessor method which returns the time at which the begin event was triggered as a realtime value.

  function svt_transaction
 svt_transaction::get_causal_ref

 (   ) 


This method returns the causal_xact transaction reference.

  function void
 svt_transaction::get_clean_realtimes

 (  ref realtime start_time , ref realtime end_time  ) 


Method provided to get clean real time values to support XML, FSDB and other output.

  function void
 svt_transaction::get_clean_times

 (  ref time start_time , ref time end_time  ) 


Method provided to get clean time values to support XML, FSDB and other output. This method has been deprecated. Clients should override 'get_clean_realtimes' instead of 'get_clean_times'.

  function bit [31:0]
 svt_transaction::get_crc

 (   ) 


This method returns the calculated CRC value.

  function bit [31:0]
 svt_transaction::get_crc_initial_value

 (   ) 


Utility method for getting the CRC initial value.

Return values - The CRC initial value.

  function bit [31:0]
 svt_transaction::get_crc_polynomial

 (   ) 


Utility method for getting the crc polynomial value.

Return values - The CRC polynomial value.

  function svt_data_converter
 svt_transaction::get_data_converter

 (   ) 


Method to return the current data converter. Extended classes which provide data converter capabilities should overload this method to provide access to the current data converter, typically shared as a static member of the suite specific transaction object.

  function realtime
 svt_transaction::get_end_realtime

 (   ) 


Accessor method which returns the time at which the end event was triggered as a realtime value.

  function svt_transaction
 svt_transaction::get_implementation

 (  int ix  ) 


Get the indexed transaction out of the implementation [$] property.

  function svt_transaction
 svt_transaction::get_implementation_xact_factory

 (   ) 


This virtual method must be replaced by transactions that make use of the implementation [$] property. Derived transactions must return a typed factory object which can be used when generating the transaction references in the implementation [$] transaction list.

  function bit
 svt_transaction::get_is_internal

 (   ) 


Method to get the is_internal value.

  function svt_transaction
 svt_transaction::get_original_ref

 (   ) 


This method returns the original_xact transaction reference.

  function svt_pa_object_data
 svt_transaction::get_pa_obj_data

 (  string uid = "", string typ = "", string parent_uid = "", string channel = ""  ) 


This method create/update the 'svt_pa_object_data' object data for use in the XML/FSDB which provides basic information about the object. The transaction extension adds begin and end time information to the object if provided by the base class.

uid - Optional string indicating the unique identification value for object. If not provided uses the 'get_uid' method to retrieve the value.

typ - Optional string indicating the 'type' of the object. If not provided uses the type name for the class.

parent_uid - Optional string indicating the UID of the object's parent. If not provided the method uses get_causal_ref to obtain a handle to the parent and obtain a parent_uid. If no causal reference found the method assumes there is no parent_uid. To cancel the causal reference lookup completely the client can provide a parent_uid value of "". If "" is provided the method assumes there is no parent_uid.

channel - Optional string indicating an object channel. If not provided or set to "" the method assumes there is no channel.

Return values - The 'svt_pa_object_data' required for PA header.


 Superseded functions 
 svt_data :: get_pa_obj_data 

  function bit
 svt_transaction::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_8b10b_data :: get_prop_val 
 svt_mem_transaction :: get_prop_val 
 svt_traffic_profile_transaction :: get_prop_val 

  function svt_transaction
 svt_transaction::get_recycled_xact

 (  string class_name  ) 


Method to obtain a previously used transaction from recycled_xact [$] for reuse. Calls clear before returning the recycled transaction.

class_name - Used to help insure that the retrieved svt_transaction is of the desired type.

Return values - The previously used transaction, ready for reuse.

  function time
 svt_transaction::get_safe_begin_time

 (   ) 


Method which filters out any begin time values of -1.

  function time
 svt_transaction::get_safe_end_time

 (   ) 


Method which filters out any end time values of -1.

  function svt_transaction
 svt_transaction::get_trace

 (  int ix  ) 


Get the indexed transaction out of the trace [$] property.

  function svt_transaction
 svt_transaction::get_trace_xact_factory

 (   ) 


This virtual method must be replaced by transactions that make use of the trace [$] property. Derived transactions must return a typed factory object which can be used when generating the transaction references in the trace [$] transaction list.

  function bit
 svt_transaction::get_xact_status

 (  ref svt_transaction :: status_enum status  ) 


Method provided to get the transaction status for inclusion in XML and other output.

status - The overall transaction status.

Return values - Indicates whether the status was available (1) or not (0) and therefore whether the status field should be used.

  function void
 svt_transaction::initialize_8b10b

 (  bit force_load = 0  ) 


This method initializes the 8b10b lookup tables.

force_load - Forces the 8b10b tables to be re-initialized.

  function void
 svt_transaction::initialize_crc

 (  bit [31:0] poly , int width , bit [31:0] init , bit force_load = 0  ) 


This method initializes the CRC lookup table, saves the CRC width, and the initial CRC value.

poly - Polynomial used to initialize the CRC lookup table

width - Width of the CRC lookup table that is generated

init - The CRC value is initialized to this value

force_load - Forces the CRC algorithm to be re-initialized

  function void
 svt_transaction::initialize_scrambling

 (   ) 


This method initializes the scrambling seed.

  function bit
 svt_transaction::is_supported

 (  svt_configuration cfg , bit silent = 0  ) 


Determines if this transaction can reasonably be expected to function correctly on the supplied cfg object.

cfg - The svt_configuration to examine for supportability.

silent - Indicates whether issues with the configuration should be reported.

Return values - Returns '1' if sequence is supported by the configuration, '0' otherwise.

 virtual function bit
 svt_transaction::is_valid

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


 Superseded functions 
 vmm_data :: is_valid 
 svt_data :: is_valid 
 Superseding functions 
 svt_8b10b_data :: is_valid 
 svt_mem_transaction :: is_valid 
 svt_traffic_profile_transaction :: is_valid 

  function void
 svt_transaction::post_randomize

 (   ) 


Override post_randomize to implement the 'post' half of a pre_randomize/post_randomize handshake, designed to insure that pre_randomize and post_randomize are not blocked by extended classes.

  function void
 svt_transaction::pre_randomize

 (   ) 


Override pre_randomize to implement the 'pre' half of a pre_randomize/post_randomize handshake, designed to insure that pre_randomize and post_randomize are not blocked by extended classes.

 virtual function string
 svt_transaction::psdisplay

 (  string prefix = ""  ) 


 Superseded functions 
 vmm_data :: psdisplay 
 svt_data :: psdisplay 
 Superseding functions 
 svt_8b10b_data :: psdisplay 
 svt_mem_transaction :: psdisplay 
 svt_traffic_profile_transaction :: psdisplay 

  function string
 svt_transaction::psdisplay_concise

 (   ) 


Returns a concise string (32 characters or less) that gives a concise description of the data transaction. Can be used to represent the currently processed data transaction via a signal.

  function string
 svt_transaction::psdisplay_implementation

 (  string prefix = "", int max_impl_elem_display = -1  ) 


Displays the implementation list to a string. Each line of the generated output is preceded by prefix.

prefix - String which precedes each line in the display output.

max_impl_elem_display - Optional int used to control whether the method does a full or partial display of the implementation queue. A value of -1 indicates that the display rules controlled by svt_data :: max_array_elem_display should simply be applied.

  function string
 svt_transaction::psdisplay_meta_info

 (  string prefix = ""  ) 


Displays the meta information to a string. Each line of the generated output is preceded by prefix. Extends class flexibility in choosing what meta information should be displayed.

 Superseding functions 
 svt_8b10b_data :: psdisplay_meta_info 

  function string
 svt_transaction::psdisplay_short

 (  string prefix = "", bit hdr_only = 0  ) 


Returns a string that reports the essential contents of the packet generally necessary to uniquely identify that packet.

prefix - (Optional: default = "") The string given in this argument becomes the first item listed in the value returned. It is intended to be used to identify the component (or other source) that requested this string. This argument should be limited to 8 characters or less (to accommodate the fixed column widths in the returned string). If more than 8 characters are supplied, only the first 8 characters are used.

hdr_only - (Optional: default = 0) If this argument is supplied, and is '1', the function returns a 3-line table header string, which indicates which packet data appears in the subsequent columns. If this argument is '1', the prefix argument becomes the column label for the first header column (still subject to the 8 character limit).


 Superseding functions 
 svt_8b10b_data :: psdisplay_short 

  function string
 svt_transaction::psdisplay_short_hdr_body

 (  string prefix = ""  ) 


Returns a string that reports the essential contents of the packet generally necessary to uniquely identify that packet. This method basically consists of two calls to psdisplay_short, with hdr_only = 1 and hdr_only = 0, to create the header and body information for the transaction.

prefix - (Optional: default = "") The string given in this argument becomes the first item listed in the value returned. It is intended to be used to identify the component (or other source) that requested this string. This argument should be limited to 8 characters or less (to accommodate the fixed column widths in the returned string). If more than 8 characters are supplied, only the first 8 characters are used.

  function string
 svt_transaction::psdisplay_short_via_pattern

 (  svt_pattern pttrn , string prefix = "", bit hdr_only = 0  ) 


Returns a string that reports the essential contents of the packet generally necessary to uniquely identify that packet.

prefix - (Optional: default = "") The string given in this argument becomes the first item listed in the value returned. It is intended to be used to identify the component (or other source) that requested this string. This argument should be limited to 8 characters or less (to accommodate the fixed column widths in the returned string). If more than 8 characters are supplied, only the first 8 characters are used.

hdr_only - (Optional: default = 0) If this argument is supplied, and is '1', the function returns a 3-line table header string, which indicates which packet data appears in the subsequent columns. If this argument is '1', the prefix argument becomes the column label for the first header column (still subject to the 8 character limit).

  function string
 svt_transaction::psdisplay_trace

 (  string prefix = "", int max_trace_elem_display = -1  ) 


Displays the trace list to a string. Each line of the generated output is preceded by prefix.

prefix - String which precedes each line in the display output.

max_trace_elem_display - Optional int used to control whether the method does a full or partial display of the trace queue. A value of -1 indicates that the display rules controlled by svt_data :: max_array_elem_display should simply be applied.

  function void
 svt_transaction::recycle_me

 (   ) 


Method to add this transaction to recycled_xact [$], which is a queue of recycled transactions. Transactions should only be recycled if the client is sure that the transaction is no longer in use.

  function bit
 svt_transaction::save_prop_vals_to_xml

 (  svt_xml_writer writer , string object_block_desc = "", string prefix = ""  ) 


This method overides the super method to set the 'active_xml_start_time' to support backward compatibility and call the super class method to save the object properties.

writer - Object which takes care of the basic write operations.

object_block_desc - String that is placed in the 'object' block created for the data object. If not specified method relies on get_xml_object_block_desc method to get default description.

prefix - String to be placed at the beginning of each line in the file.

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


 Superseded functions 
 svt_data :: save_prop_vals_to_xml 

  function void
 svt_transaction::scramble

 (  input byte unsigned array_in [], ref bit [15:0] lfsr , output byte unsigned array_out []  ) 


Function is used for scrambling a byte of data. Following rules are followed while implementing this function: 1) The LFSR implements the polynomial: G(X)=X^16+X^5+X^4+X^3+1 2) All D-codes and K-codes are scrambled. 3) There is no resetting of the LFSR under any condition.

array_in - An array that contains data to be scrambled.

lfsr - Sixteen bit value with which the function encodes the data. It is up to the entity calling this function to keep track of the lfsr value and to provide the correct lfsr value on the subsequent calls.

array_out - An array constaing the scrambled data.

  function void
 svt_transaction::set_crc_initial_value

 (  bit [31:0] init  ) 


Utility method for setting the CRC initial value.

init - The new CRC initial value.

  function void
 svt_transaction::set_crc_polynomial

 (  bit [31:0] poly  ) 


Utility method for setting the CRC polynomial value.

poly - The new CRC polynomial value.

  function void
 svt_transaction::set_data_converter

 (  svt_data_converter new_converter  ) 


Method to set the current data converter. Extended classes which provide data converter capabilities should overload this method to store away the current data converter, typically shared as a static member of the suite specific transaction object.

  function void
 svt_transaction::set_is_internal

 (  bit is_internal = 1  ) 


Method to set the is_internal value.

  function bit
 svt_transaction::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_8b10b_data :: set_prop_val 
 svt_mem_transaction :: set_prop_val 
 svt_traffic_profile_transaction :: set_prop_val 

  function void
 svt_transaction::store_causal_ref

 (  svt_transaction causal  ) 


This method updates this transaction's causal_xact reference to point to the causal transaction.

  function void
 svt_transaction::store_context

 (  svt_transaction implementation_xact  ) 


This method first sets up the causal reference for the implementation_xact and then saves the implementation_xact in the implementation [$] transaction list.

  function void
 svt_transaction::store_original_ref

 (  svt_transaction original  ) 


This method updates this transaction's original_xact reference to point to the original transaction.

  function void
 svt_transaction::store_trace

 (  svt_transaction trace_xact , bit copy = 1, svt_data :: recursive_op_enum copy_depth = SHALLOW  ) 


This method is used to add trace_xact to the trace [$] transaction list associated with this transaction. It first sets up our transaction as the original_xact reference for the trace_xact transaction, and then saves the trace_xact transaction in the trace [$] transaction list.

trace_xact - The transaction to be added to the trace [$] transaction list.

copy - Bit indicating whether the trace_xact or a copy should be stored.

copy_depth - If copy set to 1, indicates whether the copy should be done with a DEEP or SHALLOW copy, thereby including or excluding objects such as implementation [$].

  function void
 svt_transaction::svt_transaction_copy_hook

 (  vmm_data to = null  ) 


Hook called by the VMM shorthand macro after performing the automated 'copy' routine.

to - Destination class for teh copy operation

  function void
 svt_transaction::new

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


CONSTRUCTOR: Creates a new instance of the svt_transaction class, passing the appropriate argument values to the svt_data parent 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 transaction object belongs.


 Superseded functions 
 svt_data :: new 
 Superseding functions 
 svt_8b10b_data :: new 
 svt_mem_transaction :: new 
 svt_traffic_profile_transaction :: new 

  function void
 svt_transaction::unscramble

 (  input byte unsigned array_in [], ref bit [15:0] lfsr , output byte unsigned array_out []  ) 


Function is used for unscrambling a byte of data. The function returns 0 and the output is unpredictable if Xs and Zs are passed in via the argument. Following rules are followed while implementing this function: 1) The LFSR implements the polynomial: G(X)=X^16+X^5+X^4+X^3+1 2) There is no resetting of the LFSR under any condition.

array_in - An array whose elements need to be unscrambled.

lfsr - Is the Sixteen bit value with which the function decodes the data. It is up to the entity calling this function to keep track of the lfsr value and to provide the correct lfsr value on the subsequent calls.

array_out - An array containing unscrambled data.

  task
 svt_transaction::wait_begin

 (   ) 


Utility method which can be used to wait for the beginning of this transaction independent of the underlying methodology.

  task
 svt_transaction::wait_end

 (   ) 


Utility method which can be used to wait for the end of this transaction independent of the underlying methodology.

  task
 svt_transaction::wait_end_last_implementation

 (   ) 


Utility method which can be used to wait for the end of the last transaction in the implementation queue.

  task
 svt_transaction::wait_for_causal_ref

 (   ) 


This method waits for the transaction's causal_xact reference to point to something other than null.

  task
 svt_transaction::wait_for_causal_ref_thru_time_unit

 (  int wait_time = 1  ) 


This method waits for the transaction's causal_xact reference to point to something other than null, but only for the indicated number of time units. It gives up if the value isn't updated within the specificied number of time units.

wait_time - The number of time units to wait before giving up.


Member Attribute Documentation

 realtime  attribute
 svt_transaction::active_xml_start_time = -1


Local 'time' stores the current active start time of the object. This is used for backwards compatibility purposes. Should be removed when all clients remove the 'save_prop_vals_to_xml' implementation and move to 'save_object_begin' and 'save_object_data'.

 svt_transaction  attribute
 svt_transaction::default_implementation_xact_factory = null


Default factory used for creation of the implementation queue.

 real  attribute
 svt_transaction::end_time = 0


Time at which this transaction was ended

 static svt_data :: recursive_op_enum  attribute
 svt_transaction::exception_list_opts = DEEP


Used by all svt_transaction derived 'copy' and 'compare' methods to determine whether the exception list object is not copied or compared (NULL), the reference is copied and compared (SHALLOW), or whether the object is copied and compared (DEEP). Since not owned by an individual instance, not copied, compared, etc., like other svt_transaction properties.

 svt_transaction  attribute
 svt_transaction::implementation[$]


Reference to the lower level transactions that are created as a result of processing this transaction. This is assigned by calling the store_context method.

 static svt_data :: recursive_op_enum  attribute
 svt_transaction::protocol_xacts_opts = NULL


Used by all svt_transaction derived 'copy' and 'compare' methods to determine whether the lower level protocol references are not copied or compared (NULL), the references are copied and compared (SHALLOW), or whether the objects are copied and compared (DEEP). Since not owned by an individual instance, not copied, compared, etc., like other svt_transaction properties.

 real  attribute
 svt_transaction::start_time = 0


Time at which this transaction was started

 realtime  attribute
 svt_transaction::svt_accept_realtime = 0


Time at which this transaction was accepted recorded as a realtime value

 realtime  attribute
 svt_transaction::svt_begin_realtime = 0


Time at which this transaction was started recorded as a realtime value

 realtime  attribute
 svt_transaction::svt_end_realtime = 0


Time at which this transaction was ended recorded as a realtime value

 svt_transaction  attribute
 svt_transaction::trace[$]


Trace of any transactions of the same type that were created as a result of processing this transaction (e.g., due to retries, etc.). If enable_trace defined to return 0, then only contains 'last' traced transaction. If enable_trace defined to return 1, then contains all traced transactions. Elements are added to this list via calls to store_trace.

 static protected svt_transaction  attribute
 svt_transaction::__vmm_rhs


Member Typedef Documentation

 typedef enum  svt_transaction::status_enum

Used to indicate status for a transaction or for a data flow within a transaction. Transactions may be setup with a single status property, or they may have multiple properties corresponding to the different data flows supported by the transaction.

For simple transactions or data flows where value acceptance occurs immediatly upon the driving of the signal(s), the values will simply go from INITIAL->ACCEPT. In simple situations which require a handshake the values would be expected to go from INITIAL->ACTIVE->ACCEPT. Note that if a handshake is required, but the handshake occurs immediately, the status will only go through INITIAL->ACCEPT.

PARTIAL_ACCEPT normally comes into play if the transaction or data flow involves multiple iterations (e.g., burst transactions or transactions with multiple beats). In this situation the status will go to PARTIAL_ACCEPT as each iteration is completed, and back to ACTIVE whenever a new iteration is begun. The status will only go to ACCEPT once the final iteration is complete.

For example a two beat burst with no handshake would be expected to go through INITIAL->PARTIAL_ACCEPT->ACCEPT. A two beat burst with a handshake would be expected to to through INITIAL->ACTIVE->PARTIAL_ACCEPT->ACTIVE->ACCEPT.

A transaction might also cycle between ACTIVE and PARTIAL_ACCEPT it the protocol defines several phases. For example a transaction that is made up of multiple distinct packets (e.g., header, data, handshake) might go to ACTIVE as a packet is being transmitted, to to PARTIAL_ACCEPT when a packet is completed, cycle between ACTIVE and PARTIAL_ACCEPT as the remaining packets are exchanged, and only change to ACCEPT once the final packet is complete.

Status fields for transactions or data flows with multiple iterations or phases are partnered with 'next' counters reflecting the next iteration or phase. The counter is incremented when a PARTIAL_ACCEPT or ACCEPT occurs, and can be used in combination with the status field to recognize where the transaction is in terms of processing.

For example a status of ACTIVE combined with a next value of 0 indicates that the first beat of the transaction, beat 0, is on the bus. A status of ACTIVE combined with a next value of 3 indicates that the 4th beat of the transaction, beat 3, is on the bus. A status of PARTIAL_ACCEPT combined with a next value of 1 indicates that there is no activity on the bus, but that the first beat, beat 0, has been accepted.

In protocols where it is possible for a transaction to be rejected, and then retried by the transmitter, the RETRY status has been provided. This status Corresponds for the most part to the INITIAL state, i.e., the transaction is not active, but has the added recognition that the transaction was tried at least once before, and that the component is waiting to re-attempt transaction transmission.

DISABLED is specified upon transaction construction if the design is configured to not support a particular part of the protocol which might have been tracked. For example if there are multiple data flows, and the transactions are designed to track these data flows individually (e.g., via status fields for the individual data flows), but one of these data flows is disabled by the configuration, then the status field for that data flow would be set to DISABLED.

For transactions and data flows which are DISABLED, the corresponding next counter remains at 0 throughout the transaction.

The CANCELLED status occurs if an iteration is queued up but not initiated on the bus, and it is cancelled prior to being placed on the bus. CANCELLED should only be used if the component is designed such that it can return to this transaction and resume the effort to place the CANCELLED iteration on the bus. Once the component restarts this iteration the status is changed to ACTIVE.

If the component is not designed to resume cancelled transactions, and is instead designed to 'drop' these transactions, then it should instead mark the transaction as ABORTED. Whenever a transaction is interrupted and dropped for any reason, it should be marked as ABORTED.


INITIAL(SVT_CMD_XACT_STATUS_INITIAL)
Data object initial (inactive) state
RETRY(SVT_CMD_XACT_STATUS_RETRY)
Data object initial (inactive) state, but as the result of a retry
ACTIVE(SVT_CMD_XACT_STATUS_ACTIVE)
Transaction or Data Flow values have been driven by one end of the bus
PARTIAL_ACCEPT(SVT_CMD_XACT_STATUS_PARTIAL_ACCEPT)
Transaction or Data Flow has been accepted either automatically or due to handshake
ACCEPT(SVT_CMD_XACT_STATUS_ACCEPT)
All iterations or phases of the Transaction or Data Flow have been accepted
DISABLED(SVT_CMD_XACT_STATUS_DISABLED)
Data Flow is not supported by this system, and therefore not included in this transaction
CANCELLED(SVT_CMD_XACT_STATUS_CANCELLED)
Iteration or phase was started, but cancelled for some reason
ABORTED(SVT_CMD_XACT_STATUS_ABORTED)
Transaction or Phase interrupted by a protocol reset or other event