Inheritance diagram for class svt_exception:
Base class for all SVT model exception objects. As functionality commonly needed for exceptions for SVT models is defined, it will be implemented (or at least prototyped) in this class.
Public Member Functions | |
| virtual function vmm_data | allocate ( ) |
| 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 int | collision ( svt_exception test_exception ) |
| virtual function bit | compare ( vmm_data to, output string diff, input int kind ) |
| virtual function vmm_data | copy ( vmm_data to = null ) |
| 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 void | error_driven ( ) |
| virtual function string | get_description ( ) |
| function bit | get_prop_val ( string prop_name, ref bit [1023:0] prop_val, input int array_ix, ref svt_data data_obj ) |
| function real | get_start_time ( ) |
| virtual function void | inject_error_into_xact ( ) |
| virtual function bit | is_valid ( bit silent = 1, int kind = -1 ) |
| function void | new ( vmm_log log = null, string suite_name = "" ) |
| virtual function bit | no_op ( ) |
| virtual function string | psdisplay ( string prefix = "" ) |
| function void | set_constraint_weights ( int new_weight ) |
| function bit | set_prop_val ( string prop_name, bit [1023:0] prop_val, int array_ix ) |
| function void | set_start_time ( real start_time ) |
Public Attributes | |
| bit | recognized = 0; |
| real | start_time = -1; |
Protected Attributes | |
| static protected svt_exception | __vmm_rhs |
|
||||||
|
|
||||||
|
|
||||||
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. | ||||||
|
|
||||||
|
|
||
Checks whether this exception collides with another exception, test_exception. This method must be implemented by extended classes.
test_exception - Exception to be checked as a possible collision. |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||
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. | ||||
|
|
||||||
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. | ||||||
|
|
||||||
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. | ||||||
|
|
||||||
|
|
||||||
Extend the copy method to copy the exception base class fields.
to - Destination class for the copy operation | ||||||
|
|
||||||
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 data members are all valid. All other kind values result in a return value of 1. | ||||||
|
|
||
Updates the start time to indicate the exception has been driven and generates the STARTED notification.
|
|
||
Returns a string which provides a description of the exception.
|
|
||||
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 its 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 its 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. | ||||
|
|
||
Returns a the start_time for the exception.
|
|
||
Injects the error into the transaction associated with the exception. This method is not implemented.
|
|
||||||
|
|
||||
CONSTRUCTOR: Create a new instance of the svt_exception 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 exception object belongs. | ||||
|
|
||
Method used to identify whether an exception is a no-op. In situations where its may be impossible to satisfy the exception constraints (e.g., if the weights for the exception types conflict with the current transaction) the extended exception class should provide a no-op exception type and implement this method to return 1 if and only if the type of the chosen exception corresponds to the no-op exception.
Return values - Indicates whether the exception is a valid (0) or no-op (1) exception. |
|
||||||
|
|
||
Method to change the exception weights as a block.
|
|
||||
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. | ||||
|
|
||
Sets the start_time for the exception.
start_time - Time to be registered as the start_time for the exception. |
|
|
Indicates if the exception is an exception to be injected, or an exception which has been recognized by the VIP. This is used for deciding if protocol errors should be flagged for this exception. recognized == 0 indicates the exception is to be injected, recognized = 1 indicates the exception has been recognized.
The default for this should be setup in the exception constructor. The setting should be based on whether or not the exception CAN be recognized. If it can, then recognized should default to 1 in order to make it less likely that protocol errors could be disabled accidentally. If the exception cannot be recognized, then recognized should default to 0. Since not all suites support exception recognition, the base class assumes that exception recognition is NOT supported and leaves this value initialized to 0. |
|
|
If set to something other than -1, indicates the (first) time at which the error was driven on the physical interface. At the time at which the error is driven, the STARTED notification (an ON/OFF notification) is indicated (i.e. turned ON).
|
|