Inheritance diagram for class svt_mem_transaction:
This memory access transaction class is used as the request and response type between a memory driver and a memory sequencer.
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 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 vmm_data | do_allocate ( ) |
| 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 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_data data_obj ) |
| virtual function bit | is_valid ( bit silent = 1, int kind = -1 ) |
| virtual function string | psdisplay ( string prefix = "" ) |
| 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 void | new ( vmm_log log = null, string suite_name = "" ) |
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 [] |
Protected Attributes | |
| static protected svt_mem_transaction | __vmm_rhs |
Constraints | |
| constraint | mem_transaction_valid_ranges ( ) |
| constraint | reasonable_data_size ( ) |
|
||||||||
|
|
||||||||
|
|
||||||||
|
|
||||||||
|
|
||||||||
|
|
||||||||
|
|
||||||||
|
|
||||
Allocates a new object of type svt_mem_transaction.
| ||||
|
|
||||||
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. | ||||||
|
|
||||||||
Packs the object into the bytes buffer, beginning at offset. If protocol defines physical representation for transaction then -1 kind does RELEVANT byte_pack. If not, -1 kind results in an error. svt_data :: COMPLETE always results in COMPLETE byte_pack.
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. | ||||||||
|
|
||||||||
Unpacks the object from the bytes buffer, beginning at offset. If protocol defines physical representation for transaction then -1 kind does RELEVANT byte_unpack. If not, -1 kind results in an error. svt_data :: COMPLETE always results in COMPLETE byte_unpack.
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. | ||||||||
|
|
||||||||
Compares the object with to. Differences are placed in diff. Only supported kind values are -1 and svt_data :: COMPLETE. If protocol defines physical representation for transaction then -1 does RELEVANT compare. If not, -1 does COMPLETE (i.e., all fields checked) compare. svt_data :: COMPLETE always results in 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. The basic comparison function is implemented as follows: For a given bit position, If both sides have the corresponding valid bit set, the corresponding data bits are compared If both sides exist and only one side has valid bit set, it is considered a mismatch If both sides exist and no side has the valid bit set, it is considered a match If only one side exists, and if the valid bit is set, it is considered a mismatch If only one side exists, and if the valid bit is not set, it is considered a match | ||||||||
|
|
||||||||
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. 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_data :: COMPLETE always results in COMPLETE is_valid.
| ||||||||
|
|
||||
Returns the class name for the object used for logging.
| ||||
|
|
||
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. |
|
||||||
HDL Support: For read access to public data members of this class.
| ||||||
|
|
||||||||
|
|
||||||||
|
|
||||
Method to turn reasonable constraints on/off as a block.
| ||||
|
|
||||||
HDL Support: For write access to public data members of this class.
| ||||||
|
|
||||||
CONSTRUCTOR: Create a new transaction 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 transaction object belongs. | ||||||
|
|
|
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.
|
|
|
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
|
|
|
Indicates if the memory transaction is a READ or WRITE operation. When set, indicates a READ operation.
|
|
|
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. |
|
|
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.
|
|
|
|
constraint mem_transaction_valid_ranges {
data.size() == valid.size(); } |
|
|
constraint reasonable_data_size {
data.size() <= 1024; data.size() > 0; } |