blob: 82c1c7d4fc4cbebe5f61e3c31ff9af2ab24e41a0 [file] [log] [blame]
<html><head><title>Callbacks Classes</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script></head><body class="FramedContentPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
<!-- Generated by Natural Docs, version Development Release 01-12-2008 (1.35 base) -->
<!-- http://www.naturaldocs.org -->
<!-- saved from url=(0026)http://www.naturaldocs.org -->
<!--TOP - START OF CONTENT-->
<div id=Content>
<!--CONTENT index=0 -->
<div class="CSection"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="Callbacks_Classes" href="../../src/base/uvm_callback.svh">Callbacks Classes</a></h1><div class=CBody><p>This section defines the classes used for callback registration, management, and user-defined callbacks.</p>
<!--START_ND_SUMMARY index=0-->
<div class=Summary><div class=STitle>Contents</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable>
<!-- index=0 -->
<tr class="SMain"><td class=SEntry><a href="#Callbacks_Classes" >Callbacks Classes</a></td><td class=SDescription>This section defines the classes used for callback registration, management, and user-defined callbacks.</td></tr>
<!-- index=1 -->
<tr class="SSMethod SMarked"><td class=SEntry><a href="#uvm_callbacks#(T,CB)" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">uvm_callbacks #(T,CB)</a></td><td class=SDescription>The <i>uvm_callbacks</i> class provides a base class for implementing callbacks, which are typically used to modify or augment component behavior without changing the component class. </td></tr>
<!-- index=16 -->
<tr class="SSMethod"><td class=SEntry><a href="#uvm_callback_iter" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">uvm_callback_iter</a></td><td class=SDescription>The <i>uvm_callback_iter</i> class is an iterator class for iterating over callback queues of a specific callback type. </td></tr>
<!-- index=24 -->
<tr class="SSMethod SMarked"><td class=SEntry><a href="#uvm_callback" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">uvm_callback</a></td><td class=SDescription>The <i>uvm_callback</i> class is the base class for user-defined callback classes. </td></tr></table></div></div><!--END_ND_SUMMARY-->
</div></div></div>
<!--CONTENT index=1 -->
<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="uvm_callbacks#(T,CB)" href="../../src/base/uvm_callback.svh">uvm_callbacks #(T,CB)</a></h2><div class=CBody><p>The <i>uvm_callbacks</i> class provides a base class for implementing callbacks, which are typically used to modify or augment component behavior without changing the component class.&nbsp; To work effectively, the developer of the component class defines a set of &ldquo;hook&rdquo; methods that enable users to customize certain behaviors of the component in a manner that is controlled by the component developer.&nbsp; The integrity of the component&rsquo;s overall behavior is intact, while still allowing certain customizable actions by the user.</p><p>To enable compile-time type-safety, the class is parameterized on both the user-defined callback interface implementation as well as the object type associated with the callback.&nbsp; The object type-callback type pair are associated together using the <a href="../macros/uvm_callback_defines-svh.html#`uvm_register_cb" class=LMacro >`uvm_register_cb</a> macro to define a valid pairing; valid pairings are checked when a user attempts to add a callback to an object.</p><p>To provide the most flexibility for end-user customization and reuse, it is recommended that the component developer also define a corresponding set of virtual method hooks in the component itself.&nbsp; This affords users the ability to customize via inheritance/factory overrides as well as callback object registration.&nbsp; The implementation of each virtual method would provide the default traversal algorithm for the particular callback being called.&nbsp; Being virtual, users can define subtypes that override the default algorithm, perform tasks before and/or after calling super.&lt;method&gt; to execute any registered callbacks, or to not call the base implementation, effectively disabling that particalar hook.&nbsp; A demonstration of this methodology is provided in an example included in the kit.</p>
<!--START_ND_SUMMARY index=1-->
<div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable>
<!-- index=1 -->
<tr class="SClass"><td colspan=2 class=SEntry><a href="#uvm_callbacks#(T,CB)" id=link4 onMouseOver="ShowTip(event, 'tt1', 'link4')" onMouseOut="HideTip('tt1')">uvm_callbacks #(T,CB)</a></td></tr>
<tr class=SMain><td colspan=2 class=SWideDescription>The <i>uvm_callbacks</i> class provides a base class for implementing callbacks, which are typically used to modify or augment component behavior without changing the component class. </td></tr>
<!-- HIERARCHY -->
<tr class="SHierarchy SIndent1 "><td colspan=2 class="SEntry SIndent1">Class Hierarchy</td></tr>
<tr class="SPrototype SIndent1"><td colspan=2 class=SDescription>
<div class=ClassHierarchy>
<table border=0 cellspacing=0 cellpadding=0>
<tr><td><div class=CHParent><div class=CHEntry>uvm_typed_callbacks#(T)</div></div></td></tr>
<tr><td><div class=CHCurrent><div class=CHEntry>uvm_callbacks#(T,CB)</div></div></td></tr>
</table>
</div>
</td></tr>
<!-- PROTOTYPE -->
<tr class="SPrototype SIndent1"><td colspan=2 class="SEntry SIndent1">Class Declaration</td></tr>
<tr class="SPrototype SIndent1"><td colspan=2 class=SDescription>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters colspan=5>class uvm_callbacks #(</td> </tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>type&nbsp;</td>
<td class=PParameter nowrap>T</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>uvm_object,</td>
</tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>type&nbsp;</td>
<td class=PParameter nowrap>CB</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>uvm_callback</td>
</tr>
<tr>
<td class=PAfterParameters colspan=5>) extends uvm_typed_callbacks#(T)</td></tr>
</table></td></tr>
</table></blockquote>
</td></tr>
<!-- index=2 -->
<tr class="SParameter SIndent1 SMarked"><td class=SEntry><a href="#uvm_callbacks#(T,CB).T" >T</a></td><td class=SDescription>This type parameter specifies the base object type with which the <a href="#uvm_callbacks#(T,CB).CB" class=LParameter id=link5 onMouseOver="ShowTip(event, 'tt4', 'link5')" onMouseOut="HideTip('tt4')">CB</a> callback objects will be registered. </td></tr>
<!-- index=3 -->
<tr class="SParameter SIndent1"><td class=SEntry><a href="#uvm_callbacks#(T,CB).CB" >CB</a></td><td class=SDescription>This type parameter specifies the base callback type that will be managed by this callback class. </td></tr>
<!-- index=4 -->
<tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_callbacks#(T,CB).Add/delete_inteface" >Add/<span class=HB> </span>delete inteface</a></td><td class=SDescription></td></tr>
<!-- index=5 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_callbacks#(T,CB).add" id=link6 onMouseOver="ShowTip(event, 'tt5', 'link6')" onMouseOut="HideTip('tt5')">add</a></td><td class=SDescription>Registers the given callback object, <i>cb</i>, with the given <i>obj</i> handle. </td></tr>
<!-- index=6 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_callbacks#(T,CB).add_by_name" id=link7 onMouseOver="ShowTip(event, 'tt6', 'link7')" onMouseOut="HideTip('tt6')">add_by_name</a></td><td class=SDescription>Registers the given callback object, <i>cb</i>, with one or more uvm_components. </td></tr>
<!-- index=7 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_callbacks#(T,CB).delete" id=link8 onMouseOver="ShowTip(event, 'tt7', 'link8')" onMouseOut="HideTip('tt7')">delete</a></td><td class=SDescription>Deletes the given callback object, <i>cb</i>, from the queue associated with the given <i>obj</i> handle. </td></tr>
<!-- index=8 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_callbacks#(T,CB).delete_by_name" id=link9 onMouseOver="ShowTip(event, 'tt8', 'link9')" onMouseOut="HideTip('tt8')">delete_by_name</a></td><td class=SDescription>Removes the given callback object, <i>cb</i>, associated with one or more uvm_component callback queues. </td></tr>
<!-- index=9 -->
<tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_callbacks#(T,CB).Iterator_Interface" >Iterator Interface</a></td><td class=SDescription>This set of functions provide an iterator interface for callback queues. </td></tr>
<!-- index=10 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_callbacks#(T,CB).get_first" id=link10 onMouseOver="ShowTip(event, 'tt9', 'link10')" onMouseOut="HideTip('tt9')">get_first</a></td><td class=SDescription>Returns the first enabled callback of type CB which resides in the queue for <i>obj</i>. </td></tr>
<!-- index=11 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_callbacks#(T,CB).get_last" id=link11 onMouseOver="ShowTip(event, 'tt10', 'link11')" onMouseOut="HideTip('tt10')">get_last</a></td><td class=SDescription>Returns the last enabled callback of type CB which resides in the queue for <i>obj</i>. </td></tr>
<!-- index=12 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_callbacks#(T,CB).get_next" id=link12 onMouseOver="ShowTip(event, 'tt11', 'link12')" onMouseOut="HideTip('tt11')">get_next</a></td><td class=SDescription>Returns the next enabled callback of type CB which resides in the queue for <i>obj</i>, using <i>itr</i> as the starting point. </td></tr>
<!-- index=13 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_callbacks#(T,CB).get_prev" id=link13 onMouseOver="ShowTip(event, 'tt12', 'link13')" onMouseOut="HideTip('tt12')">get_prev</a></td><td class=SDescription>Returns the previous enabled callback of type CB which resides in the queue for <i>obj</i>, using <i>itr</i> as the starting point. </td></tr>
<!-- index=14 -->
<tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_callbacks#(T,CB).Debug" >Debug</a></td><td class=SDescription></td></tr>
<!-- index=15 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_callbacks#(T,CB).display" id=link14 onMouseOver="ShowTip(event, 'tt13', 'link14')" onMouseOut="HideTip('tt13')">display</a></td><td class=SDescription>This function displays callback information for <i>obj</i>. </td></tr></table></div></div><!--END_ND_SUMMARY-->
</div></div></div>
<!--CONTENT index=2 -->
<div class="CParameter"><div class=CTopic><h3 class=CTitle><a name="uvm_callbacks#(T,CB).T" href="../../src/base/uvm_callback.svh">T</a></h3><div class=CBody><p>This type parameter specifies the base object type with which the <a href="#uvm_callbacks#(T,CB).CB" class=LParameter id=link15 onMouseOver="ShowTip(event, 'tt4', 'link15')" onMouseOut="HideTip('tt4')">CB</a> callback objects will be registered.&nbsp; This object must be a derivative of <i>uvm_object</i>.</p></div></div></div>
<!--CONTENT index=3 -->
<div class="CParameter"><div class=CTopic><h3 class=CTitle><a name="uvm_callbacks#(T,CB).CB" href="../../src/base/uvm_callback.svh">CB</a></h3><div class=CBody><p>This type parameter specifies the base callback type that will be managed by this callback class.&nbsp; The callback type is typically a interface class, which defines one or more virtual method prototypes that users can override in subtypes.&nbsp; This type must be a derivative of <a href="#uvm_callback" class=LClass id=link16 onMouseOver="ShowTip(event, 'tt3', 'link16')" onMouseOut="HideTip('tt3')">uvm_callback</a>.</p></div></div></div>
<!--CONTENT index=4 -->
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_callbacks#(T,CB).Add/delete_inteface" href="../../src/base/uvm_callback.svh">Add/<span class=HB> </span>delete inteface</a></h3></div></div>
<!--CONTENT index=5 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_callbacks#(T,CB).add" href="../../src/base/uvm_callback.svh">add</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>static function void add(</td> <td class=PType nowrap>T&nbsp;</td>
<td class=PParameter nowrap>obj,</td>
<td class=PDefaultValuePrefix>&nbsp;&nbsp;</td>
<td class=PDefaultValue width=100%></td>
</tr><tr><td></td> <td class=PType nowrap>uvm_callback&nbsp;</td>
<td class=PParameter nowrap>cb,</td>
<td class=PDefaultValuePrefix>&nbsp;&nbsp;</td>
<td class=PDefaultValue width=100%></td>
</tr><tr><td></td> <td class=PType nowrap>uvm_apprepend&nbsp;</td>
<td class=PParameter nowrap>ordering</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>UVM_APPEND</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>Registers the given callback object, <i>cb</i>, with the given <i>obj</i> handle.&nbsp; The <i>obj</i> handle can be null, which allows registration of callbacks without an object context.&nbsp; If <i>ordreing</i> is UVM_APPEND (default), the callback will be executed after previously added callbacks, else the callback will be executed ahead of previously added callbacks.&nbsp; The <i>cb</i> is the callback handle; it must be non-null, and if the callback has already been added to the object instance then a warning is issued.&nbsp; Note that the CB parameter is optional.&nbsp; For example, the following are equivalent:</p><blockquote><pre>uvm_callbacks#(my_comp)::add(comp_a, cb);
uvm_callbacks#(my_comp, my_callback)::add(comp_a,cb);</pre></blockquote></div></div></div>
<!--CONTENT index=6 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_callbacks#(T,CB).add_by_name" href="../../src/base/uvm_callback.svh">add_by_name</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>static function void add_by_name(</td> <td class=PType nowrap>string&nbsp;</td>
<td class=PParameter nowrap>name,</td>
<td class=PDefaultValuePrefix>&nbsp;&nbsp;</td>
<td class=PDefaultValue width=100%></td>
</tr><tr><td></td> <td class=PType nowrap>uvm_callback&nbsp;</td>
<td class=PParameter nowrap>cb,</td>
<td class=PDefaultValuePrefix>&nbsp;&nbsp;</td>
<td class=PDefaultValue width=100%></td>
</tr><tr><td></td> <td class=PType nowrap>uvm_component&nbsp;</td>
<td class=PParameter nowrap>root,</td>
<td class=PDefaultValuePrefix>&nbsp;&nbsp;</td>
<td class=PDefaultValue width=100%></td>
</tr><tr><td></td> <td class=PType nowrap>uvm_apprepend&nbsp;</td>
<td class=PParameter nowrap>ordering</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>UVM_APPEND</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>Registers the given callback object, <i>cb</i>, with one or more uvm_components.&nbsp; The components must already exist and must be type T or a derivative.&nbsp; As with <a href="#uvm_callbacks#(T,CB).add" class=LMethod id=link17 onMouseOver="ShowTip(event, 'tt5', 'link17')" onMouseOut="HideTip('tt5')">add</a> the CB parameter is optional.&nbsp; <i>root</i> specifies the location in the component hierarchy to start the search for <i>name</i>.&nbsp; See <a href="uvm_root-svh.html#uvm_root.find_all" class=LMethod id=link18 onMouseOver="ShowTip(event, 'tt14', 'link18')" onMouseOut="HideTip('tt14')">uvm_root::find_all</a> for more details on searching by name.</p></div></div></div>
<!--CONTENT index=7 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_callbacks#(T,CB).delete" href="../../src/base/uvm_callback.svh">delete</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>static function void delete(</td> <td class=PType nowrap>T&nbsp;</td>
<td class=PParameter nowrap>obj,</td>
</tr><tr><td></td> <td class=PType nowrap>uvm_callback&nbsp;</td>
<td class=PParameter nowrap>cb</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>Deletes the given callback object, <i>cb</i>, from the queue associated with the given <i>obj</i> handle.&nbsp; The <i>obj</i> handle can be null, which allows de-registration of callbacks without an object context.&nbsp; The <i>cb</i> is the callback handle; it must be non-null, and if the callback has already been removed from the object instance then a warning is issued.&nbsp; Note that the CB parameter is optional.&nbsp; For example, the following are equivalent:</p><blockquote><pre>uvm_callbacks#(my_comp)::delete(comp_a, cb);
uvm_callbacks#(my_comp, my_callback)::delete(comp_a,cb);</pre></blockquote></div></div></div>
<!--CONTENT index=8 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_callbacks#(T,CB).delete_by_name" href="../../src/base/uvm_callback.svh">delete_by_name</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>static function void delete_by_name(</td> <td class=PType nowrap>string&nbsp;</td>
<td class=PParameter nowrap>name,</td>
</tr><tr><td></td> <td class=PType nowrap>uvm_callback&nbsp;</td>
<td class=PParameter nowrap>cb,</td>
</tr><tr><td></td> <td class=PType nowrap>uvm_component&nbsp;</td>
<td class=PParameter nowrap>root</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>Removes the given callback object, <i>cb</i>, associated with one or more uvm_component callback queues.&nbsp; As with <a href="#uvm_callbacks#(T,CB).delete" class=LMethod id=link19 onMouseOver="ShowTip(event, 'tt7', 'link19')" onMouseOut="HideTip('tt7')">delete</a> the CB parameter is optional.&nbsp; <i>root</i> specifies the location in the component hierarchy to start the search for <i>name</i>.&nbsp; See <a href="uvm_root-svh.html#uvm_root.find_all" class=LMethod id=link20 onMouseOver="ShowTip(event, 'tt14', 'link20')" onMouseOut="HideTip('tt14')">uvm_root::find_all</a> for more details on searching by name.</p></div></div></div>
<!--CONTENT index=9 -->
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_callbacks#(T,CB).Iterator_Interface" href="../../src/base/uvm_callback.svh">Iterator Interface</a></h3><div class=CBody><p>This set of functions provide an iterator interface for callback queues.&nbsp; A facade class, <a href="#uvm_callback_iter" class=LClass id=link21 onMouseOver="ShowTip(event, 'tt2', 'link21')" onMouseOut="HideTip('tt2')">uvm_callback_iter</a> is also available, and is the generally preferred way to iterate over callback queues.</p></div></div></div>
<!--CONTENT index=10 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_callbacks#(T,CB).get_first" href="../../src/base/uvm_callback.svh">get_first</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>static function CB get_first (</td> <td class=PTypePrefix nowrap>ref&nbsp;</td>
<td class=PType nowrap>int&nbsp;</td>
<td class=PParameter nowrap>itr,</td>
</tr><tr><td></td> <td class=PTypePrefix nowrap>input&nbsp;</td>
<td class=PType nowrap>T&nbsp;</td>
<td class=PParameter nowrap>obj</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>Returns the first enabled callback of type CB which resides in the queue for <i>obj</i>.&nbsp; If <i>obj</i> is null then the typewide queue for T is searched.&nbsp; <i>itr</i> is the iterator; it will be updated with a value that can be supplied to <a href="#uvm_callbacks#(T,CB).get_next" class=LMethod id=link22 onMouseOver="ShowTip(event, 'tt11', 'link22')" onMouseOut="HideTip('tt11')">get_next</a> to get the next callback object.</p><p>If the queue is empty then null is returned.</p><p>The iterator class <a href="#uvm_callback_iter" class=LClass id=link23 onMouseOver="ShowTip(event, 'tt2', 'link23')" onMouseOut="HideTip('tt2')">uvm_callback_iter</a> may be used as an alternative, simplified, iterator interface.</p></div></div></div>
<!--CONTENT index=11 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_callbacks#(T,CB).get_last" href="../../src/base/uvm_callback.svh">get_last</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>static function CB get_last (</td> <td class=PTypePrefix nowrap>ref&nbsp;</td>
<td class=PType nowrap>int&nbsp;</td>
<td class=PParameter nowrap>itr,</td>
</tr><tr><td></td> <td class=PTypePrefix nowrap>input&nbsp;</td>
<td class=PType nowrap>T&nbsp;</td>
<td class=PParameter nowrap>obj</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>Returns the last enabled callback of type CB which resides in the queue for <i>obj</i>.&nbsp; If <i>obj</i> is null then the typewide queue for T is searched.&nbsp; <i>itr</i> is the iterator; it will be updated with a value that can be supplied to <a href="#uvm_callbacks#(T,CB).get_prev" class=LMethod id=link24 onMouseOver="ShowTip(event, 'tt12', 'link24')" onMouseOut="HideTip('tt12')">get_prev</a> to get the previous callback object.</p><p>If the queue is empty then null is returned.</p><p>The iterator class <a href="#uvm_callback_iter" class=LClass id=link25 onMouseOver="ShowTip(event, 'tt2', 'link25')" onMouseOut="HideTip('tt2')">uvm_callback_iter</a> may be used as an alternative, simplified, iterator interface.</p></div></div></div>
<!--CONTENT index=12 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_callbacks#(T,CB).get_next" href="../../src/base/uvm_callback.svh">get_next</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>static function CB get_next (</td> <td class=PTypePrefix nowrap>ref&nbsp;</td>
<td class=PType nowrap>int&nbsp;</td>
<td class=PParameter nowrap>itr,</td>
</tr><tr><td></td> <td class=PTypePrefix nowrap>input&nbsp;</td>
<td class=PType nowrap>T&nbsp;</td>
<td class=PParameter nowrap>obj</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>Returns the next enabled callback of type CB which resides in the queue for <i>obj</i>, using <i>itr</i> as the starting point.&nbsp; If <i>obj</i> is null then the typewide queue for T is searched.&nbsp; <i>itr</i> is the iterator; it will be updated with a value that can be supplied to <a href="#uvm_callbacks#(T,CB).get_next" class=LMethod id=link26 onMouseOver="ShowTip(event, 'tt11', 'link26')" onMouseOut="HideTip('tt11')">get_next</a> to get the next callback object.</p><p>If no more callbacks exist in the queue, then null is returned.&nbsp; <a href="#uvm_callbacks#(T,CB).get_next" class=LMethod id=link27 onMouseOver="ShowTip(event, 'tt11', 'link27')" onMouseOut="HideTip('tt11')">get_next</a> will continue to return null in this case until <a href="#uvm_callbacks#(T,CB).get_first" class=LMethod id=link28 onMouseOver="ShowTip(event, 'tt9', 'link28')" onMouseOut="HideTip('tt9')">get_first</a> or <a href="#uvm_callbacks#(T,CB).get_last" class=LMethod id=link29 onMouseOver="ShowTip(event, 'tt10', 'link29')" onMouseOut="HideTip('tt10')">get_last</a> has been used to reset the iterator.</p><p>The iterator class <a href="#uvm_callback_iter" class=LClass id=link30 onMouseOver="ShowTip(event, 'tt2', 'link30')" onMouseOut="HideTip('tt2')">uvm_callback_iter</a> may be used as an alternative, simplified, iterator interface.</p></div></div></div>
<!--CONTENT index=13 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_callbacks#(T,CB).get_prev" href="../../src/base/uvm_callback.svh">get_prev</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>static function CB get_prev (</td> <td class=PTypePrefix nowrap>ref&nbsp;</td>
<td class=PType nowrap>int&nbsp;</td>
<td class=PParameter nowrap>itr,</td>
</tr><tr><td></td> <td class=PTypePrefix nowrap>input&nbsp;</td>
<td class=PType nowrap>T&nbsp;</td>
<td class=PParameter nowrap>obj</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>Returns the previous enabled callback of type CB which resides in the queue for <i>obj</i>, using <i>itr</i> as the starting point.&nbsp; If <i>obj</i> is null then the typewide queue for T is searched.&nbsp; <i>itr</i> is the iterator; it will be updated with a value that can be supplied to <a href="#uvm_callbacks#(T,CB).get_prev" class=LMethod id=link31 onMouseOver="ShowTip(event, 'tt12', 'link31')" onMouseOut="HideTip('tt12')">get_prev</a> to get the previous callback object.</p><p>If no more callbacks exist in the queue, then null is returned.&nbsp; <a href="#uvm_callbacks#(T,CB).get_prev" class=LMethod id=link32 onMouseOver="ShowTip(event, 'tt12', 'link32')" onMouseOut="HideTip('tt12')">get_prev</a> will continue to return null in this case until <a href="#uvm_callbacks#(T,CB).get_first" class=LMethod id=link33 onMouseOver="ShowTip(event, 'tt9', 'link33')" onMouseOut="HideTip('tt9')">get_first</a> or <a href="#uvm_callbacks#(T,CB).get_last" class=LMethod id=link34 onMouseOver="ShowTip(event, 'tt10', 'link34')" onMouseOut="HideTip('tt10')">get_last</a> has been used to reset the iterator.</p><p>The iterator class <a href="#uvm_callback_iter" class=LClass id=link35 onMouseOver="ShowTip(event, 'tt2', 'link35')" onMouseOut="HideTip('tt2')">uvm_callback_iter</a> may be used as an alternative, simplified, iterator interface.</p></div></div></div>
<!--CONTENT index=14 -->
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_callbacks#(T,CB).Debug" href="../../src/base/uvm_callback.svh">Debug</a></h3></div></div>
<!--CONTENT index=15 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_callbacks#(T,CB).display" href="../../src/base/uvm_callback.svh">display</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>static function void display(</td> <td class=PType nowrap>T&nbsp;</td>
<td class=PParameter nowrap>obj</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>null</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>This function displays callback information for <i>obj</i>.&nbsp; If <i>obj</i> is null, then it displays callback information for all objects of type <i>T</i>, including typewide callbacks.</p></div></div></div>
<!--CONTENT index=16 -->
<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="uvm_callback_iter" href="../../src/base/uvm_callback.svh">uvm_callback_iter</a></h2><div class=CBody><p>The <i>uvm_callback_iter</i> class is an iterator class for iterating over callback queues of a specific callback type.&nbsp; The typical usage of the class is:</p><blockquote><pre>uvm_callback_iter#(mycomp,mycb) iter = new(this);
for(mycb cb = iter.first(); cb != null; cb = iter.next())
cb.dosomething();</pre></blockquote><p>The callback iteration macros, <a href="../macros/uvm_callback_defines-svh.html#`uvm_do_callbacks" class=LMacro >`uvm_do_callbacks</a> and <a href="../macros/uvm_callback_defines-svh.html#`uvm_do_callbacks_exit_on" class=LMacro >`uvm_do_callbacks_exit_on</a> provide a simple method for iterating callbacks and executing the callback methods.</p>
<!--START_ND_SUMMARY index=16-->
<div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable>
<!-- index=16 -->
<tr class="SClass"><td colspan=2 class=SEntry><a href="#uvm_callback_iter" id=link36 onMouseOver="ShowTip(event, 'tt2', 'link36')" onMouseOut="HideTip('tt2')">uvm_callback_iter</a></td></tr>
<tr class=SMain><td colspan=2 class=SWideDescription>The <i>uvm_callback_iter</i> class is an iterator class for iterating over callback queues of a specific callback type. </td></tr>
<!-- PROTOTYPE -->
<tr class="SPrototype SIndent1"><td colspan=2 class="SEntry SIndent1">Class Declaration</td></tr>
<tr class="SPrototype SIndent1"><td colspan=2 class=SDescription>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>class uvm_callback_iter#(</td> <td class=PType nowrap>type&nbsp;</td>
<td class=PParameter nowrap>T</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%> uvm_object,</td>
</tr><tr><td></td> <td class=PType nowrap>type&nbsp;</td>
<td class=PParameter nowrap>CB</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%> uvm_callback</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
</td></tr>
<!-- index=17 -->
<tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_callback_iter.Methods" >Methods</a></td><td class=SDescription></td></tr>
<!-- index=18 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_callback_iter.new" id=link37 onMouseOver="ShowTip(event, 'tt15', 'link37')" onMouseOut="HideTip('tt15')">new</a></td><td class=SDescription>Creates a new callback iterator object. </td></tr>
<!-- index=19 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_callback_iter.first" id=link38 onMouseOver="ShowTip(event, 'tt16', 'link38')" onMouseOut="HideTip('tt16')">first</a></td><td class=SDescription>Returns the first valid (enabled) callback of the callback type (or a derivative) that is in the queue of the context object. </td></tr>
<!-- index=20 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_callback_iter.last" id=link39 onMouseOver="ShowTip(event, 'tt17', 'link39')" onMouseOut="HideTip('tt17')">last</a></td><td class=SDescription>Returns the last valid (enabled) callback of the callback type (or a derivative) that is in the queue of the context object. </td></tr>
<!-- index=21 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_callback_iter.next" id=link40 onMouseOver="ShowTip(event, 'tt18', 'link40')" onMouseOut="HideTip('tt18')">next</a></td><td class=SDescription>Returns the next valid (enabled) callback of the callback type (or a derivative) that is in the queue of the context object. </td></tr>
<!-- index=22 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_callback_iter.prev" id=link41 onMouseOver="ShowTip(event, 'tt19', 'link41')" onMouseOut="HideTip('tt19')">prev</a></td><td class=SDescription>Returns the previous valid (enabled) callback of the callback type (or a derivative) that is in the queue of the context object. </td></tr>
<!-- index=23 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_callback_iter.get_cb" id=link42 onMouseOver="ShowTip(event, 'tt20', 'link42')" onMouseOut="HideTip('tt20')">get_cb</a></td><td class=SDescription>Returns the last callback accessed via a first() or next() call.</td></tr></table></div></div><!--END_ND_SUMMARY-->
</div></div></div>
<!--CONTENT index=17 -->
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_callback_iter.Methods" href="../../src/base/uvm_callback.svh">Methods</a></h3></div></div>
<!--CONTENT index=18 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_callback_iter.new" href="../../src/base/uvm_callback.svh">new</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>function new(</td> <td class=PType nowrap>T&nbsp;</td>
<td class=PParameter nowrap>obj</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>Creates a new callback iterator object.&nbsp; It is required that the object context be provided.</p></div></div></div>
<!--CONTENT index=19 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_callback_iter.first" href="../../src/base/uvm_callback.svh">first</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function CB first()
</td></tr></table></blockquote><div class=CBody><p>Returns the first valid (enabled) callback of the callback type (or a derivative) that is in the queue of the context object.&nbsp; If the queue is empty then null is returned.</p></div></div></div>
<!--CONTENT index=20 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_callback_iter.last" href="../../src/base/uvm_callback.svh">last</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function CB last()
</td></tr></table></blockquote><div class=CBody><p>Returns the last valid (enabled) callback of the callback type (or a derivative) that is in the queue of the context object.&nbsp; If the queue is empty then null is returned.</p></div></div></div>
<!--CONTENT index=21 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_callback_iter.next" href="../../src/base/uvm_callback.svh">next</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function CB next()
</td></tr></table></blockquote><div class=CBody><p>Returns the next valid (enabled) callback of the callback type (or a derivative) that is in the queue of the context object.&nbsp; If there are no more valid callbacks in the queue, then null is returned.</p></div></div></div>
<!--CONTENT index=22 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_callback_iter.prev" href="../../src/base/uvm_callback.svh">prev</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function CB prev()
</td></tr></table></blockquote><div class=CBody><p>Returns the previous valid (enabled) callback of the callback type (or a derivative) that is in the queue of the context object.&nbsp; If there are no more valid callbacks in the queue, then null is returned.</p></div></div></div>
<!--CONTENT index=23 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_callback_iter.get_cb" href="../../src/base/uvm_callback.svh">get_cb</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function CB get_cb()
</td></tr></table></blockquote><div class=CBody><p>Returns the last callback accessed via a first() or next() call.</p></div></div></div>
<!--CONTENT index=24 -->
<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="uvm_callback" href="../../src/base/uvm_callback.svh">uvm_callback</a></h2><div class=CBody><p>The <i>uvm_callback</i> class is the base class for user-defined callback classes.&nbsp; Typically, the component developer defines an application-specific callback class that extends from this class.&nbsp; In it, he defines one or more virtual methods, called a <i>callback interface</i>, that represent the hooks available for user override.</p><p>Methods intended for optional override should not be declared <i>pure.</i>&nbsp; Usually, all the callback methods are defined with empty implementations so users have the option of overriding any or all of them.</p><p>The prototypes for each hook method are completely application specific with no restrictions.</p>
<!--START_ND_SUMMARY index=24-->
<div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable>
<!-- index=24 -->
<tr class="SClass"><td colspan=2 class=SEntry><a href="#uvm_callback" id=link45 onMouseOver="ShowTip(event, 'tt3', 'link45')" onMouseOut="HideTip('tt3')">uvm_callback</a></td></tr>
<tr class=SMain><td colspan=2 class=SWideDescription>The <i>uvm_callback</i> class is the base class for user-defined callback classes. </td></tr>
<!-- HIERARCHY -->
<tr class="SHierarchy SIndent1 "><td colspan=2 class="SEntry SIndent1">Class Hierarchy</td></tr>
<tr class="SPrototype SIndent1"><td colspan=2 class=SDescription>
<div class=ClassHierarchy>
<table border=0 cellspacing=0 cellpadding=0>
<tr><td><div class=CHParent><div class=CHEntry><a href="uvm_misc-svh.html#uvm_void" class=LGeneric id=link43 onMouseOver="ShowTip(event, 'tt21', 'link43')" onMouseOut="HideTip('tt21')">uvm_void</a></div></div></td></tr>
<tr><td><div class=CHParent><div class=CHEntry><a href="uvm_object-svh.html#uvm_object" class=LClass id=link44 onMouseOver="ShowTip(event, 'tt22', 'link44')" onMouseOut="HideTip('tt22')">uvm_object</a></div></div></td></tr>
<tr><td><div class=CHCurrent><div class=CHEntry>uvm_callback</div></div></td></tr>
</table>
</div>
</td></tr>
<!-- PROTOTYPE -->
<tr class="SPrototype SIndent1"><td colspan=2 class="SEntry SIndent1">Class Declaration</td></tr>
<tr class="SPrototype SIndent1"><td colspan=2 class=SDescription>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>class uvm_callback extends uvm_object
</td></tr></table></blockquote></td></tr>
<!-- index=25 -->
<tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_callback.Methods" >Methods</a></td><td class=SDescription></td></tr>
<!-- index=26 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_callback.new" id=link46 onMouseOver="ShowTip(event, 'tt23', 'link46')" onMouseOut="HideTip('tt23')">new</a></td><td class=SDescription>Creates a new uvm_callback object, giving it an optional <i>name</i>.</td></tr>
<!-- index=27 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_callback.callback_mode" id=link47 onMouseOver="ShowTip(event, 'tt24', 'link47')" onMouseOut="HideTip('tt24')">callback_mode</a></td><td class=SDescription>Enable/disable callbacks (modeled like rand_mode and constraint_mode).</td></tr>
<!-- index=28 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_callback.is_enabled" id=link48 onMouseOver="ShowTip(event, 'tt25', 'link48')" onMouseOut="HideTip('tt25')">is_enabled</a></td><td class=SDescription>Returns 1 if the callback is enabled, 0 otherwise.</td></tr>
<!-- index=29 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_callback.get_type_name" id=link49 onMouseOver="ShowTip(event, 'tt26', 'link49')" onMouseOut="HideTip('tt26')">get_type_name</a></td><td class=SDescription>Returns the type name of this callback object.</td></tr></table></div></div><!--END_ND_SUMMARY-->
</div></div></div>
<!--CONTENT index=25 -->
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_callback.Methods" href="../../src/base/uvm_callback.svh">Methods</a></h3></div></div>
<!--CONTENT index=26 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_callback.new" href="../../src/base/uvm_callback.svh">new</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>function new(</td> <td class=PType nowrap>string&nbsp;</td>
<td class=PParameter nowrap>name</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>&quot;uvm_callback&quot;</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>Creates a new uvm_callback object, giving it an optional <i>name</i>.</p></div></div></div>
<!--CONTENT index=27 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_callback.callback_mode" href="../../src/base/uvm_callback.svh">callback_mode</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>function bit callback_mode(</td> <td class=PType nowrap>int&nbsp;</td>
<td class=PParameter nowrap>on</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>-1</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>Enable/disable callbacks (modeled like rand_mode and constraint_mode).</p></div></div></div>
<!--CONTENT index=28 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_callback.is_enabled" href="../../src/base/uvm_callback.svh">is_enabled</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function bit is_enabled()
</td></tr></table></blockquote><div class=CBody><p>Returns 1 if the callback is enabled, 0 otherwise.</p></div></div></div>
<!--CONTENT index=29 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_callback.get_type_name" href="../../src/base/uvm_callback.svh">get_type_name</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function string get_type_name()
</td></tr></table></blockquote><div class=CBody><p>Returns the type name of this callback object.</p></div></div></div>
</div><!--Content-->
<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CClass>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>class uvm_callbacks #(</td> <td class=PType nowrap>type&nbsp;</td>
<td class=PParameter nowrap>T</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>uvm_object,</td>
</tr><tr><td></td> <td class=PType nowrap>type&nbsp;</td>
<td class=PParameter nowrap>CB</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>uvm_callback</td>
<td class=PAfterParameters nowrap>) extends uvm_typed_callbacks#(T)</td></tr>
</table></td></tr>
</table></blockquote>
The <i>uvm_callbacks</i> class provides a base class for implementing callbacks, which are typically used to modify or augment component behavior without changing the component class. </div></div><div class=CToolTip id="tt2"><div class=CClass>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>class uvm_callback_iter#(</td> <td class=PType nowrap>type&nbsp;</td>
<td class=PParameter nowrap>T</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%> uvm_object,</td>
</tr><tr><td></td> <td class=PType nowrap>type&nbsp;</td>
<td class=PParameter nowrap>CB</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%> uvm_callback</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
The <i>uvm_callback_iter</i> class is an iterator class for iterating over callback queues of a specific callback type. </div></div><div class=CToolTip id="tt3"><div class=CClass>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>class uvm_callback extends uvm_object
</td></tr></table></blockquote>The <i>uvm_callback</i> class is the base class for user-defined callback classes. </div></div><div class=CToolTip id="tt4"><div class=CParameter>This type parameter specifies the base callback type that will be managed by this callback class. </div></div><div class=CToolTip id="tt5"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>static function void add(</td> <td class=PType nowrap>T&nbsp;</td>
<td class=PParameter nowrap>obj,</td>
<td class=PDefaultValuePrefix>&nbsp;&nbsp;</td>
<td class=PDefaultValue width=100%></td>
</tr><tr><td></td> <td class=PType nowrap>uvm_callback&nbsp;</td>
<td class=PParameter nowrap>cb,</td>
<td class=PDefaultValuePrefix>&nbsp;&nbsp;</td>
<td class=PDefaultValue width=100%></td>
</tr><tr><td></td> <td class=PType nowrap>uvm_apprepend&nbsp;</td>
<td class=PParameter nowrap>ordering</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>UVM_APPEND</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
Registers the given callback object, <i>cb</i>, with the given <i>obj</i> handle. </div></div><div class=CToolTip id="tt6"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>static function void add_by_name(</td> <td class=PType nowrap>string&nbsp;</td>
<td class=PParameter nowrap>name,</td>
<td class=PDefaultValuePrefix>&nbsp;&nbsp;</td>
<td class=PDefaultValue width=100%></td>
</tr><tr><td></td> <td class=PType nowrap>uvm_callback&nbsp;</td>
<td class=PParameter nowrap>cb,</td>
<td class=PDefaultValuePrefix>&nbsp;&nbsp;</td>
<td class=PDefaultValue width=100%></td>
</tr><tr><td></td> <td class=PType nowrap>uvm_component&nbsp;</td>
<td class=PParameter nowrap>root,</td>
<td class=PDefaultValuePrefix>&nbsp;&nbsp;</td>
<td class=PDefaultValue width=100%></td>
</tr><tr><td></td> <td class=PType nowrap>uvm_apprepend&nbsp;</td>
<td class=PParameter nowrap>ordering</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>UVM_APPEND</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
Registers the given callback object, <i>cb</i>, with one or more uvm_components. </div></div><div class=CToolTip id="tt7"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>static function void delete(</td> <td class=PType nowrap>T&nbsp;</td>
<td class=PParameter nowrap>obj,</td>
</tr><tr><td></td> <td class=PType nowrap>uvm_callback&nbsp;</td>
<td class=PParameter nowrap>cb</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
Deletes the given callback object, <i>cb</i>, from the queue associated with the given <i>obj</i> handle. </div></div><div class=CToolTip id="tt8"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>static function void delete_by_name(</td> <td class=PType nowrap>string&nbsp;</td>
<td class=PParameter nowrap>name,</td>
</tr><tr><td></td> <td class=PType nowrap>uvm_callback&nbsp;</td>
<td class=PParameter nowrap>cb,</td>
</tr><tr><td></td> <td class=PType nowrap>uvm_component&nbsp;</td>
<td class=PParameter nowrap>root</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
Removes the given callback object, <i>cb</i>, associated with one or more uvm_component callback queues. </div></div><div class=CToolTip id="tt9"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>static function CB get_first (</td> <td class=PTypePrefix nowrap>ref&nbsp;</td>
<td class=PType nowrap>int&nbsp;</td>
<td class=PParameter nowrap>itr,</td>
</tr><tr><td></td> <td class=PTypePrefix nowrap>input&nbsp;</td>
<td class=PType nowrap>T&nbsp;</td>
<td class=PParameter nowrap>obj</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
Returns the first enabled callback of type CB which resides in the queue for <i>obj</i>. </div></div><div class=CToolTip id="tt10"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>static function CB get_last (</td> <td class=PTypePrefix nowrap>ref&nbsp;</td>
<td class=PType nowrap>int&nbsp;</td>
<td class=PParameter nowrap>itr,</td>
</tr><tr><td></td> <td class=PTypePrefix nowrap>input&nbsp;</td>
<td class=PType nowrap>T&nbsp;</td>
<td class=PParameter nowrap>obj</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
Returns the last enabled callback of type CB which resides in the queue for <i>obj</i>. </div></div><div class=CToolTip id="tt11"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>static function CB get_next (</td> <td class=PTypePrefix nowrap>ref&nbsp;</td>
<td class=PType nowrap>int&nbsp;</td>
<td class=PParameter nowrap>itr,</td>
</tr><tr><td></td> <td class=PTypePrefix nowrap>input&nbsp;</td>
<td class=PType nowrap>T&nbsp;</td>
<td class=PParameter nowrap>obj</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
Returns the next enabled callback of type CB which resides in the queue for <i>obj</i>, using <i>itr</i> as the starting point. </div></div><div class=CToolTip id="tt12"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>static function CB get_prev (</td> <td class=PTypePrefix nowrap>ref&nbsp;</td>
<td class=PType nowrap>int&nbsp;</td>
<td class=PParameter nowrap>itr,</td>
</tr><tr><td></td> <td class=PTypePrefix nowrap>input&nbsp;</td>
<td class=PType nowrap>T&nbsp;</td>
<td class=PParameter nowrap>obj</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
Returns the previous enabled callback of type CB which resides in the queue for <i>obj</i>, using <i>itr</i> as the starting point. </div></div><div class=CToolTip id="tt13"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>static function void display(</td> <td class=PType nowrap>T&nbsp;</td>
<td class=PParameter nowrap>obj</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>null</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
This function displays callback information for <i>obj</i>. </div></div><div class=CToolTip id="tt14"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>function void find_all (</td> <td class=PTypePrefix nowrap></td>
<td class=PType nowrap>string&nbsp;</td>
<td class=PParameter nowrap>comp_match,</td>
<td class=PDefaultValuePrefix>&nbsp;&nbsp;</td>
<td class=PDefaultValue width=100%></td>
</tr><tr><td></td> <td class=PTypePrefix nowrap>ref&nbsp;</td>
<td class=PType nowrap>uvm_component&nbsp;</td>
<td class=PParameter nowrap>comps[$],</td>
<td class=PDefaultValuePrefix>&nbsp;&nbsp;</td>
<td class=PDefaultValue width=100%></td>
</tr><tr><td></td> <td class=PTypePrefix nowrap>input&nbsp;</td>
<td class=PType nowrap>uvm_component&nbsp;</td>
<td class=PParameter nowrap>comp</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>null</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
Returns the component handle (find) or list of components handles (find_all) matching a given string. </div></div><div class=CToolTip id="tt15"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>function new(</td> <td class=PType nowrap>T&nbsp;</td>
<td class=PParameter nowrap>obj</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
Creates a new callback iterator object. </div></div><div class=CToolTip id="tt16"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function CB first()
</td></tr></table></blockquote>Returns the first valid (enabled) callback of the callback type (or a derivative) that is in the queue of the context object. </div></div><div class=CToolTip id="tt17"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function CB last()
</td></tr></table></blockquote>Returns the last valid (enabled) callback of the callback type (or a derivative) that is in the queue of the context object. </div></div><div class=CToolTip id="tt18"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function CB next()
</td></tr></table></blockquote>Returns the next valid (enabled) callback of the callback type (or a derivative) that is in the queue of the context object. </div></div><div class=CToolTip id="tt19"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function CB prev()
</td></tr></table></blockquote>Returns the previous valid (enabled) callback of the callback type (or a derivative) that is in the queue of the context object. </div></div><div class=CToolTip id="tt20"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function CB get_cb()
</td></tr></table></blockquote>Returns the last callback accessed via a first() or next() call.</div></div><div class=CToolTip id="tt21"><div class=CGeneric>The <i>uvm_void</i> class is the base class for all UVM classes. </div></div><div class=CToolTip id="tt22"><div class=CClass>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual class uvm_object extends uvm_void
</td></tr></table></blockquote>The uvm_object class is the base class for all UVM data and hierarchical classes. </div></div><div class=CToolTip id="tt23"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>function new(</td> <td class=PType nowrap>string&nbsp;</td>
<td class=PParameter nowrap>name</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>&quot;uvm_callback&quot;</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
Creates a new uvm_callback object, giving it an optional <i>name</i>.</div></div><div class=CToolTip id="tt24"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype>
<tr><td><table border=0 cellspacing=0 cellpadding=0><tr>
<td class=PBeforeParameters nowrap>function bit callback_mode(</td> <td class=PType nowrap>int&nbsp;</td>
<td class=PParameter nowrap>on</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>-1</td>
<td class=PAfterParameters nowrap>)</td></tr>
</table></td></tr>
</table></blockquote>
Enable/disable callbacks (modeled like rand_mode and constraint_mode).</div></div><div class=CToolTip id="tt25"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function bit is_enabled()
</td></tr></table></blockquote>Returns 1 if the callback is enabled, 0 otherwise.</div></div><div class=CToolTip id="tt26"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function string get_type_name()
</td></tr></table></blockquote>Returns the type name of this callback object.</div></div><!--END_ND_TOOLTIPS-->
<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>