Implements a class-based dynamic queue. Allows queues to be allocated on demand, and passed and stored by reference.
uvm_queue #(T) | ||||||||
Implements a class-based dynamic queue. | ||||||||
Class Hierarchy | ||||||||
| ||||||||
Class Declaration | ||||||||
| ||||||||
Methods | ||||||||
new | Creates a new queue with the given name. | |||||||
get_global_queue | Returns the singleton global queue for the item type, T. | |||||||
get_global | Returns the specified item instance from the global item queue. | |||||||
get | Returns the item at the given index. | |||||||
size | Returns the number of items stored in the queue. | |||||||
insert | Inserts the item at the given index in the queue. | |||||||
delete | Removes the item at the given index from the queue; if index is not provided, the entire contents of the queue are deleted. | |||||||
pop_front | Returns the first element in the queue (index=0), or null if the queue is empty. | |||||||
pop_back | Returns the last element in the queue (index=size()-1), or null if the queue is empty. | |||||||
push_front | Inserts the given item at the front of the queue. | |||||||
push_back | Inserts the given item at the back of the queue. |
static function this_type get_global_queue ()
Returns the singleton global queue for the item type, T.
This allows items to be shared amongst components throughout the verification environment.
static function T get_global ( int index )
Returns the specified item instance from the global item queue.
virtual function T get ( int index )
Returns the item at the given index.
If no item exists by that key, a new item is created with that key and returned.
virtual function void insert ( int index, T item )
Inserts the item at the given index in the queue.
virtual function void delete ( int index = -1 )
Removes the item at the given index from the queue; if index is not provided, the entire contents of the queue are deleted.
virtual function T pop_front()
Returns the first element in the queue (index=0), or null if the queue is empty.
virtual function T pop_back()
Returns the last element in the queue (index=size()-1), or null if the queue is empty.
virtual function void push_front( T item )
Inserts the given item at the front of the queue.
virtual function void push_back( T item )
Inserts the given item at the back of the queue.
The uvm_object class is the base class for all UVM data and hierarchical classes.
virtual class uvm_object extends uvm_void
Implements a class-based dynamic queue.
class uvm_queue #( type T = int ) extends uvm_object
Creates a new queue with the given name.
function new ( string name = "" )
Returns the singleton global queue for the item type, T.
static function this_type get_global_queue ()
Returns the specified item instance from the global item queue.
static function T get_global ( int index )
Returns the item at the given index.
virtual function T get ( int index )
Returns the number of items stored in the queue.
virtual function int size ()
Inserts the item at the given index in the queue.
virtual function void insert ( int index, T item )
Removes the item at the given index from the queue; if index is not provided, the entire contents of the queue are deleted.
virtual function void delete ( int index = -1 )
Returns the first element in the queue (index=0), or null if the queue is empty.
virtual function T pop_front()
Returns the last element in the queue (index=size()-1), or null if the queue is empty.
virtual function T pop_back()
Inserts the given item at the front of the queue.
virtual function void push_front( T item )
Inserts the given item at the back of the queue.
virtual function void push_back( T item )