svt_fifo_rate_control Class Reference

Inheritance diagram for class svt_fifo_rate_control:

List of all members.


Detailed Description

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 bit  check_fifo_fill_level ( svt_sequence_item xact, int num_bytes )
function svt_pattern  do_allocate_pattern ( )
function void  do_copy ( uvm_object rhs )
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_sequence_item_base data_obj )
function void  new ( string name = "svt_fifo_rate_control", 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_sequence_item xact, int num_bytes )
task   update_total_expected_fill_levels ( svt_sequence_item 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 
protected uvm_report_object  reporter 

Member Typedefs

 typedef enum  fifo_mode_enum 


Member Function Documentation

  function bit
 svt_fifo_rate_control::check_fifo_fill_level

 (  svt_sequence_item xact , int num_bytes  ) 

  function svt_pattern
 svt_fifo_rate_control::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 

  function void
 svt_fifo_rate_control::do_copy

 (  uvm_object rhs  ) 


Extend the copy method to take care of the transaction fields and cleanup the exception xact pointers.

rhs - Source object to be copied.


 Superseded functions 
 uvm_object :: do_copy 
 uvm_transaction :: do_copy 
 svt_sequence_item_base :: do_copy 

  function string
 svt_fifo_rate_control::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 bit
 svt_fifo_rate_control::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 

  function void
 svt_fifo_rate_control::new

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


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

name - Instance name of the configuration

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


 Superseded functions 
 svt_sequence_item_base :: new 

  function int
 svt_fifo_rate_control::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 void
 svt_fifo_rate_control::reset_all

 (   ) 


Resets current and expected fill level and semaphore

  function void
 svt_fifo_rate_control::reset_curr_fill_level

 (   ) 


Resets the current fill level

  function void
 svt_fifo_rate_control::reset_sema

 (   ) 


Resets the semaphore

  function bit
 svt_fifo_rate_control::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 

  function void
 svt_fifo_rate_control::update_fifo_levels_every_clock

 (   ) 


Updates FIFO levels every clock. Must be implemented in an extended class

  task
 svt_fifo_rate_control::update_fifo_levels_on_data_xmit

 (  svt_sequence_item xact , int num_bytes  ) 


Decrements FIFO levels by num_bytes

xact - Handle to the transaction based on which the update is made.

num_bytes - Number of bytes to be decremented from the current FIFO level.

  task
 svt_fifo_rate_control::update_total_expected_fill_levels

 (  svt_sequence_item xact , svt_fifo_rate_control :: fifo_mode_enum mode = svt_fifo_rate_control::FIFO_ADD_TO_ACTIVE, int num_bytes  ) 


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.

  task
 svt_fifo_rate_control::wait_for_fifo_full

 (  int num_bytes  ) 


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.


Member Attribute Documentation

 svt_fifo_rate_control_configuration  attribute
 svt_fifo_rate_control::fifo_cfg


FIFO rate control configuration corresponding to this class

 int  attribute
 svt_fifo_rate_control::fifo_curr_fill_level = 0


The current fill level of the FIFO

 protected semaphore  attribute
 svt_fifo_rate_control::fifo_sema


Semaphore used to access the FIFO

 protected uvm_report_object  attribute
 svt_fifo_rate_control::reporter


SVT message macros route messages through this reference. This overrides the shared svt_sequence_item_base reporter.

 int  attribute
 svt_fifo_rate_control::total_expected_fill_level = 0


The total expected fill level

Member Typedef Documentation

 typedef enum  svt_fifo_rate_control::fifo_mode_enum
FIFO_ADD_TO_ACTIVE(SVT_FIFO_ADD_TO_ACTIVE)
FIFO_REMOVE_FROM_ACTIVE(SVT_FIFO_REMOVE_FROM_ACTIVE)