blob: 72084b50a89fcaf0ebcbec175afacd987856637b [file] [log] [blame]
<html><head><title>uvm_heartbeat</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="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="uvm_heartbeat" href="../../src/base/uvm_heartbeat.svh">uvm_heartbeat</a></h1><div class=CBody><p>Heartbeats provide a way for environments to easily ensure that their descendants are alive.&nbsp; A uvm_heartbeat is associated with a specific objection object.&nbsp; A component that is being tracked by the heartbeat object must raise (or drop) the synchronizing objection during the heartbeat window.</p><p>The uvm_heartbeat object has a list of participating objects.&nbsp; The heartbeat can be configured so that all components (UVM_ALL_ACTIVE), exactly one (UVM_ONE_ACTIVE), or any component (UVM_ANY_ACTIVE) must trigger the objection in order to satisfy the heartbeat condition.</p>
<!--START_ND_SUMMARY index=0-->
<div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable>
<!-- index=0 -->
<tr class="SClass"><td colspan=2 class=SEntry><a href="#uvm_heartbeat" >uvm_heartbeat</a></td></tr>
<tr class=SMain><td colspan=2 class=SWideDescription>Heartbeats provide a way for environments to easily ensure that their descendants are alive. </td></tr>
<!-- index=1 -->
<tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_heartbeat.Methods" >Methods</a></td><td class=SDescription></td></tr>
<!-- index=2 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_heartbeat.new" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">new</a></td><td class=SDescription>Creates a new heartbeat instance associated with <i>cntxt</i>. </td></tr>
<!-- index=3 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_heartbeat.set_mode" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">set_mode</a></td><td class=SDescription>Sets or retrieves the heartbeat mode. </td></tr>
<!-- index=4 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_heartbeat.set_heartbeat" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">set_heartbeat</a></td><td class=SDescription>Sets up the heartbeat event and assigns a list of objects to watch. </td></tr>
<!-- index=5 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_heartbeat.add" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">add</a></td><td class=SDescription>Add a single component to the set of components to be monitored. </td></tr>
<!-- index=6 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_heartbeat.remove" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">remove</a></td><td class=SDescription>Remove a single component to the set of components being monitored. </td></tr>
<!-- index=7 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_heartbeat.start" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">start</a></td><td class=SDescription>Starts the heartbeat monitor. </td></tr>
<!-- index=8 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_heartbeat.stop" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">stop</a></td><td class=SDescription>Stops the heartbeat monitor. </td></tr></table></div></div><!--END_ND_SUMMARY-->
</div></div></div>
<!--CONTENT index=1 -->
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_heartbeat.Methods" href="../../src/base/uvm_heartbeat.svh">Methods</a></h3></div></div>
<!--CONTENT index=2 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_heartbeat.new" href="../../src/base/uvm_heartbeat.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 colspan=5>function new(</td> </tr><tr><td>&nbsp;&nbsp;&nbsp;</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>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>uvm_component&nbsp;</td>
<td class=PParameter nowrap>cntxt,</td>
<td class=PDefaultValuePrefix>&nbsp;&nbsp;</td>
<td class=PDefaultValue width=100%></td>
</tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>uvm_objection&nbsp;</td>
<td class=PParameter nowrap>objection</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>null</td>
</tr>
<tr>
<td class=PAfterParameters colspan=5>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>Creates a new heartbeat instance associated with <i>cntxt</i>.&nbsp; The context is the hierarchical location that the heartbeat objections will flow through and be monitored at.&nbsp; The <i>objection</i> associated with the heartbeat is optional, if it is left <i>null</i> but it must be set before the heartbeat monitor will activate.</p><blockquote><pre>uvm_objection myobjection = new(&quot;myobjection&quot;); //some shared objection
class myenv extends uvm_env;
uvm_heartbeat hb = new(&quot;hb&quot;, this, myobjection);
...
endclass</pre></blockquote></div></div></div>
<!--CONTENT index=3 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_heartbeat.set_mode" href="../../src/base/uvm_heartbeat.svh">set_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 colspan=5>function uvm_heartbeat_modes set_mode (</td> </tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>uvm_heartbeat_modes&nbsp;</td>
<td class=PParameter nowrap>mode</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%> UVM_NO_HB_MODE</td>
</tr>
<tr>
<td class=PAfterParameters colspan=5>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>Sets or retrieves the heartbeat mode.&nbsp; The current value for the heartbeat mode is returned.&nbsp; If an argument is specified to change the mode then the mode is changed to the new value.</p></div></div></div>
<!--CONTENT index=4 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_heartbeat.set_heartbeat" href="../../src/base/uvm_heartbeat.svh">set_heartbeat</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 colspan=4>function void set_heartbeat (</td> </tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PTypePrefix nowrap></td>
<td class=PType nowrap>uvm_event#(uvm_object)&nbsp;</td>
<td class=PParameter nowrap width=100%>e,</td>
</tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PTypePrefix nowrap>ref&nbsp;</td>
<td class=PType nowrap>uvm_component&nbsp;</td>
<td class=PParameter nowrap width=100%>comps[$]</td>
</tr>
<tr>
<td class=PAfterParameters colspan=4>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>Sets up the heartbeat event and assigns a list of objects to watch.&nbsp; The monitoring is started as soon as this method is called.&nbsp; Once the monitoring has been started with a specific event, providing a new monitor event results in an error.&nbsp; To change trigger events, you must first <a href="#uvm_heartbeat.stop" class=LMethod id=link8 onMouseOver="ShowTip(event, 'tt7', 'link8')" onMouseOut="HideTip('tt7')">stop</a> the monitor and then <a href="#uvm_heartbeat.start" class=LMethod id=link9 onMouseOver="ShowTip(event, 'tt6', 'link9')" onMouseOut="HideTip('tt6')">start</a> with a new event trigger.</p><p>If the trigger event <i>e</i> is <i>null</i> and there was no previously set trigger event, then the monitoring is not started.&nbsp; Monitoring can be started by explicitly calling <a href="#uvm_heartbeat.start" class=LMethod id=link10 onMouseOver="ShowTip(event, 'tt6', 'link10')" onMouseOut="HideTip('tt6')">start</a>.</p></div></div></div>
<!--CONTENT index=5 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_heartbeat.add" href="../../src/base/uvm_heartbeat.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 colspan=3>function void add (</td> </tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>uvm_component&nbsp;</td>
<td class=PParameter nowrap width=100%>comp</td>
</tr>
<tr>
<td class=PAfterParameters colspan=3>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>Add a single component to the set of components to be monitored.&nbsp; This does not cause monitoring to be started.&nbsp; If monitoring is currently active then this component will be immediately added to the list of components and will be expected to participate in the currently active event window.</p></div></div></div>
<!--CONTENT index=6 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_heartbeat.remove" href="../../src/base/uvm_heartbeat.svh">remove</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 colspan=3>function void remove (</td> </tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>uvm_component&nbsp;</td>
<td class=PParameter nowrap width=100%>comp</td>
</tr>
<tr>
<td class=PAfterParameters colspan=3>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>Remove a single component to the set of components being monitored.&nbsp; Monitoring is not stopped, even if the last component has been removed (an explicit stop is required).</p></div></div></div>
<!--CONTENT index=7 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_heartbeat.start" href="../../src/base/uvm_heartbeat.svh">start</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 colspan=5>function void start (</td> </tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>uvm_event#(uvm_object)&nbsp;</td>
<td class=PParameter nowrap>e</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>null</td>
</tr>
<tr>
<td class=PAfterParameters colspan=5>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>Starts the heartbeat monitor.&nbsp; If <i>e</i> is <i>null</i> then whatever event was previously set is used.&nbsp; If no event was previously set then a warning is issued.&nbsp; It is an error if the monitor is currently running and <i>e</i> is specifying a different trigger event from the current event.</p></div></div></div>
<!--CONTENT index=8 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_heartbeat.stop" href="../../src/base/uvm_heartbeat.svh">stop</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function void stop ()
</td></tr></table></blockquote><div class=CBody><p>Stops the heartbeat monitor.&nbsp; Current state information is reset so that if <a href="#uvm_heartbeat.start" class=LMethod id=link11 onMouseOver="ShowTip(event, 'tt6', 'link11')" onMouseOut="HideTip('tt6')">start</a> is called again the process will wait for the first event trigger to start the monitoring.</p></div></div></div>
</div><!--Content-->
<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><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 colspan=5>function new(</td> </tr><tr><td>&nbsp;&nbsp;&nbsp;</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>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>uvm_component&nbsp;</td>
<td class=PParameter nowrap>cntxt,</td>
<td class=PDefaultValuePrefix>&nbsp;&nbsp;</td>
<td class=PDefaultValue width=100%></td>
</tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>uvm_objection&nbsp;</td>
<td class=PParameter nowrap>objection</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>null</td>
</tr>
<tr>
<td class=PAfterParameters colspan=5>)</td></tr>
</table></td></tr>
</table></blockquote>
Creates a new heartbeat instance associated with <i>cntxt</i>. </div></div><div class=CToolTip id="tt2"><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 colspan=5>function uvm_heartbeat_modes set_mode (</td> </tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>uvm_heartbeat_modes&nbsp;</td>
<td class=PParameter nowrap>mode</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%> UVM_NO_HB_MODE</td>
</tr>
<tr>
<td class=PAfterParameters colspan=5>)</td></tr>
</table></td></tr>
</table></blockquote>
Sets or retrieves the heartbeat mode. </div></div><div class=CToolTip id="tt3"><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 colspan=4>function void set_heartbeat (</td> </tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PTypePrefix nowrap></td>
<td class=PType nowrap>uvm_event#(uvm_object)&nbsp;</td>
<td class=PParameter nowrap width=100%>e,</td>
</tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PTypePrefix nowrap>ref&nbsp;</td>
<td class=PType nowrap>uvm_component&nbsp;</td>
<td class=PParameter nowrap width=100%>comps[$]</td>
</tr>
<tr>
<td class=PAfterParameters colspan=4>)</td></tr>
</table></td></tr>
</table></blockquote>
Sets up the heartbeat event and assigns a list of objects to watch. </div></div><div class=CToolTip id="tt4"><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 colspan=3>function void add (</td> </tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>uvm_component&nbsp;</td>
<td class=PParameter nowrap width=100%>comp</td>
</tr>
<tr>
<td class=PAfterParameters colspan=3>)</td></tr>
</table></td></tr>
</table></blockquote>
Add a single component to the set of components to be monitored. </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 colspan=3>function void remove (</td> </tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>uvm_component&nbsp;</td>
<td class=PParameter nowrap width=100%>comp</td>
</tr>
<tr>
<td class=PAfterParameters colspan=3>)</td></tr>
</table></td></tr>
</table></blockquote>
Remove a single component to the set of components being monitored. </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 colspan=5>function void start (</td> </tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>uvm_event#(uvm_object)&nbsp;</td>
<td class=PParameter nowrap>e</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>null</td>
</tr>
<tr>
<td class=PAfterParameters colspan=5>)</td></tr>
</table></td></tr>
</table></blockquote>
Starts the heartbeat monitor. </div></div><div class=CToolTip id="tt7"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function void stop ()
</td></tr></table></blockquote>Stops the heartbeat monitor. </div></div><!--END_ND_TOOLTIPS-->
<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>