blob: 4972fb18f68674eca03115002a614f8260b52bbd [file] [log] [blame]
<html><head><title>uvm_barrier</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_barrier" href="../../src/base/uvm_barrier.svh">uvm_barrier</a></h1><div class=CBody><p>The uvm_barrier class provides a multiprocess synchronization mechanism.&nbsp; It enables a set of processes to block until the desired number of processes get to the synchronization point, at which time all of the processes are released.</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_barrier" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">uvm_barrier</a></td></tr>
<tr class=SMain><td colspan=2 class=SWideDescription>The uvm_barrier class provides a multiprocess synchronization mechanism. </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=LClass id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">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=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">uvm_object</a></div></div></td></tr>
<tr><td><div class=CHCurrent><div class=CHEntry>uvm_barrier</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_barrier extends uvm_object
</td></tr></table></blockquote></td></tr>
<!-- index=1 -->
<tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_barrier.Methods" >Methods</a></td><td class=SDescription></td></tr>
<!-- index=2 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_barrier.new" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">new</a></td><td class=SDescription>Creates a new barrier object.</td></tr>
<!-- index=3 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_barrier.wait_for" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">wait_for</a></td><td class=SDescription>Waits for enough processes to reach the barrier before continuing.</td></tr>
<!-- index=4 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_barrier.reset" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">reset</a></td><td class=SDescription>Resets the barrier. </td></tr>
<!-- index=5 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_barrier.set_auto_reset" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">set_auto_reset</a></td><td class=SDescription>Determines if the barrier should reset itself after the threshold is reached.</td></tr>
<!-- index=6 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_barrier.set_threshold" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">set_threshold</a></td><td class=SDescription>Sets the process threshold.</td></tr>
<!-- index=7 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_barrier.get_threshold" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">get_threshold</a></td><td class=SDescription>Gets the current threshold setting for the barrier.</td></tr>
<!-- index=8 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_barrier.get_num_waiters" id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">get_num_waiters</a></td><td class=SDescription>Returns the number of processes currently waiting at the barrier.</td></tr>
<!-- index=9 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_barrier.cancel" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">cancel</a></td><td class=SDescription>Decrements the waiter count by one. </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_barrier.Methods" href="../../src/base/uvm_barrier.svh">Methods</a></h3></div></div>
<!--CONTENT index=2 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_barrier.new" href="../../src/base/uvm_barrier.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%>&quot;&quot;,</td>
</tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>int&nbsp;</td>
<td class=PParameter nowrap>threshold</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>0</td>
</tr>
<tr>
<td class=PAfterParameters colspan=5>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>Creates a new barrier object.</p></div></div></div>
<!--CONTENT index=3 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_barrier.wait_for" href="../../src/base/uvm_barrier.svh">wait_for</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual task wait_for()
</td></tr></table></blockquote><div class=CBody><p>Waits for enough processes to reach the barrier before continuing.</p><p>The number of processes to wait for is set by the <a href="#uvm_barrier.set_threshold" class=LMethod id=link12 onMouseOver="ShowTip(event, 'tt8', 'link12')" onMouseOut="HideTip('tt8')">set_threshold</a> method.</p></div></div></div>
<!--CONTENT index=4 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_barrier.reset" href="../../src/base/uvm_barrier.svh">reset</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>virtual function void reset (</td> </tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>bit&nbsp;</td>
<td class=PParameter nowrap>wakeup</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>1</td>
</tr>
<tr>
<td class=PAfterParameters colspan=5>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>Resets the barrier.&nbsp; This sets the waiter count back to zero.</p><p>The threshold is unchanged.&nbsp; After reset, the barrier will force processes to wait for the threshold again.</p><p>If the <i>wakeup</i> bit is set, any currently waiting processes will be activated.</p></div></div></div>
<!--CONTENT index=5 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_barrier.set_auto_reset" href="../../src/base/uvm_barrier.svh">set_auto_reset</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>virtual function void set_auto_reset (</td> </tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>bit&nbsp;</td>
<td class=PParameter nowrap>value</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>1</td>
</tr>
<tr>
<td class=PAfterParameters colspan=5>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>Determines if the barrier should reset itself after the threshold is reached.</p><p>The default is on, so when a barrier hits its threshold it will reset, and new processes will block until the threshold is reached again.</p><p>If auto reset is off, then once the threshold is achieved, new processes pass through without being blocked until the barrier is reset.</p></div></div></div>
<!--CONTENT index=6 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_barrier.set_threshold" href="../../src/base/uvm_barrier.svh">set_threshold</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>virtual function void set_threshold (</td> </tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>int&nbsp;</td>
<td class=PParameter nowrap width=100%>threshold</td>
</tr>
<tr>
<td class=PAfterParameters colspan=3>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>Sets the process threshold.</p><p>This determines how many processes must be waiting on the barrier before the processes may proceed.</p><p>Once the <i>threshold</i> is reached, all waiting processes are activated.</p><p>If <i>threshold</i> is set to a value less than the number of currently waiting processes, then the barrier is reset and waiting processes are activated.</p></div></div></div>
<!--CONTENT index=7 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_barrier.get_threshold" href="../../src/base/uvm_barrier.svh">get_threshold</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function int get_threshold ()
</td></tr></table></blockquote><div class=CBody><p>Gets the current threshold setting for the barrier.</p></div></div></div>
<!--CONTENT index=8 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_barrier.get_num_waiters" href="../../src/base/uvm_barrier.svh">get_num_waiters</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function int get_num_waiters ()
</td></tr></table></blockquote><div class=CBody><p>Returns the number of processes currently waiting at the barrier.</p></div></div></div>
<!--CONTENT index=9 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_barrier.cancel" href="../../src/base/uvm_barrier.svh">cancel</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function void cancel ()
</td></tr></table></blockquote><div class=CBody><p>Decrements the waiter count by one.&nbsp; This is used when a process that is waiting on the barrier is killed or activated by some other means.</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>virtual class uvm_void
</td></tr></table></blockquote>The <i>uvm_void</i> class is the base class for all UVM classes. </div></div><div class=CToolTip id="tt2"><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="tt3"><div class=CClass>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>class uvm_barrier extends uvm_object
</td></tr></table></blockquote>The uvm_barrier class provides a multiprocess synchronization mechanism. </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=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%>&quot;&quot;,</td>
</tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>int&nbsp;</td>
<td class=PParameter nowrap>threshold</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>0</td>
</tr>
<tr>
<td class=PAfterParameters colspan=5>)</td></tr>
</table></td></tr>
</table></blockquote>
Creates a new barrier object.</div></div><div class=CToolTip id="tt5"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual task wait_for()
</td></tr></table></blockquote>Waits for enough processes to reach the barrier before continuing.</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>virtual function void reset (</td> </tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>bit&nbsp;</td>
<td class=PParameter nowrap>wakeup</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>1</td>
</tr>
<tr>
<td class=PAfterParameters colspan=5>)</td></tr>
</table></td></tr>
</table></blockquote>
Resets the barrier. </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 colspan=5>virtual function void set_auto_reset (</td> </tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>bit&nbsp;</td>
<td class=PParameter nowrap>value</td>
<td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td>
<td class=PDefaultValue width=100%>1</td>
</tr>
<tr>
<td class=PAfterParameters colspan=5>)</td></tr>
</table></td></tr>
</table></blockquote>
Determines if the barrier should reset itself after the threshold is reached.</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 colspan=3>virtual function void set_threshold (</td> </tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>int&nbsp;</td>
<td class=PParameter nowrap width=100%>threshold</td>
</tr>
<tr>
<td class=PAfterParameters colspan=3>)</td></tr>
</table></td></tr>
</table></blockquote>
Sets the process threshold.</div></div><div class=CToolTip id="tt9"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function int get_threshold ()
</td></tr></table></blockquote>Gets the current threshold setting for the barrier.</div></div><div class=CToolTip id="tt10"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function int get_num_waiters ()
</td></tr></table></blockquote>Returns the number of processes currently waiting at the barrier.</div></div><div class=CToolTip id="tt11"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function void cancel ()
</td></tr></table></blockquote>Decrements the waiter count by one. </div></div><!--END_ND_TOOLTIPS-->
<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>