Inheritance diagram for class svt_fifo_rate_control:
Utility class which may be used by agents to model a FIFO based resource class to control the rate at which transactions are sent from a component
Public Member Functions | |
| function unsigned int | byte_size ( int kind = -1 ) |
| function bit | check_fifo_fill_level ( svt_transaction xact, int num_bytes ) |
| function svt_pattern | do_allocate_pattern ( ) |
| function unsigned int | do_byte_pack ( ref logic [7:0] bytes[], input int unsigned offset, input int kind ) |
| function unsigned int | do_byte_unpack ( const ref logic [7:0] bytes[], input int unsigned offset, input int len, input int kind ) |
| function vmm_data | do_copy ( vmm_data to = null ) |
| 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_data data_obj ) |
| function void | new ( vmm_log log = null, string suite_name = "" ) |
| function int | reasonable_constraint_mode ( bit on_off ) |
| function void | reset_all ( ) |
| function void | reset_curr_fill_level ( ) |
| function void | reset_sema ( ) |
| function bit | set_prop_val ( string prop_name, bit [1023:0] prop_val, int array_ix ) |
| function void | update_fifo_levels_every_clock ( ) |
| task | update_fifo_levels_on_data_xmit ( svt_transaction xact, int num_bytes ) |
| task | update_total_expected_fill_levels ( svt_transaction xact, svt_fifo_rate_control :: fifo_mode_enum mode = svt_fifo_rate_control::FIFO_ADD_TO_ACTIVE, int num_bytes ) |
| task | wait_for_fifo_full ( int num_bytes ) |
Public Attributes | |
| svt_fifo_rate_control_configuration | fifo_cfg |
| int | fifo_curr_fill_level = 0; |
| int | total_expected_fill_level = 0; |
Protected Attributes | |
| protected semaphore | fifo_sema |
Member Typedefs | |
| typedef enum | fifo_mode_enum |
|
||||||
|
|
|
||||
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. Only supports COMPLETE pack so kind must be svt_data :: COMPLETE.
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. Only supports COMPLETE unpack so kind must be svt_data :: COMPLETE.
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. | ||||||
|
|
||||||
Extend the copy method to copy the transaction class fields.
to - Destination class for the copy operation | ||||||
|
|
||||
Returns the class name for the object used for logging.
| ||||
|
|
||||
HDL Support: For read access to public data members of this class.
| ||||
|
|
||||
CONSTRUCTOR: Create a new configuration 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 configuration object belongs. | ||||
|
|
||||
Method to turn reasonable constraints on/off as a block.
| ||||
|
|
||
Resets current and expected fill level and semaphore
|
|
||
Resets the current fill level
|
|
||
Resets the semaphore
|
|
||||
HDL Support: For write access to public data members of this class.
| ||||
|
|
||
Updates FIFO levels every clock. Must be implemented in an extended class
|
|
||
|
||
Updates total_expected_fill_level based on num_bytes xact - Handle to the transaction based on which the update is made. mode - Indicates the mode in which this task is called. If the value passed is 'add_to_active', num_bytes are added to the total_expected_fill_level. If the value passed is 'remove_from_active', num_bytes are decremented from total_expected_fill_level. num_bytes - Number of bytes to be incremented or decremented from the total_expected_fill_level. |
|
||
Waits for the FIFO to be full after taking num_bytes into account num_bytes - The number of bytes to be added to the current fifo level before checking whether FIFO is full or not. |
|
|
FIFO rate control configuration corresponding to this class
|
|
|
The current fill level of the FIFO
|
|
|
Semaphore used to access the FIFO
|
|
|
The total expected fill level
|
|