[source]

Class uvm_callback_iter

The uvm_callback_iter class is an iterator class for iterating over callback queues of a specific callback type. The typical usage of the class is:

uvm_callback_iter#(mycomp,mycb) iter = new(this);
for(mycb cb = iter.first(); cb != null; cb = iter.next())
   cb.dosomething();

The callback iteration macros, uvm_do_callbacks and uvm_do_callbacks_exit_on provide a simple method for iterating callbacks and executing the callback methods.

Parameters

Name

Default value

Description

T

uvm_object

CB

uvm_callback

Constructors

function new ( uvm_object obj ) [source]

Creates a new callback iterator object. It is required that the object context be provided.

Functions

function CB first ( ) [source]

Returns the first valid (enabled) callback of the callback type (or a derivative) that is in the queue of the context object. If the queue is empty then null is returned.

function CB last ( ) [source]

Returns the last valid (enabled) callback of the callback type (or a derivative) that is in the queue of the context object. If the queue is empty then null is returned.

function CB next ( ) [source]

Returns the next valid (enabled) callback of the callback type (or a derivative) that is in the queue of the context object. If there are no more valid callbacks in the queue, then null is returned.

function CB prev ( ) [source]

Returns the previous valid (enabled) callback of the callback type (or a derivative) that is in the queue of the context object. If there are no more valid callbacks in the queue, then null is returned.

function CB get_cb ( ) [source]

Returns the last callback accessed via a first() or next() call.