blob: 636f2852a90cdf7855bafb1977a714a87b07a129 [file] [log] [blame]
<html><head><title>uvm_agent</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_agent" href="../../src/comps/uvm_agent.svh">uvm_agent</a></h1><div class=CBody><p>The uvm_agent virtual class should be used as the base class for the user- defined agents.&nbsp; Deriving from uvm_agent will allow you to distinguish agents from other component types also using its inheritance.&nbsp; Such agents will automatically inherit features that may be added to uvm_agent in the future.</p><p>While an agent&rsquo;s build function, inherited from <a href="../base/uvm_component-svh.html#uvm_component" class=LClass id=link9 onMouseOver="ShowTip(event, 'tt4', 'link9')" onMouseOut="HideTip('tt4')">uvm_component</a>, can be implemented to define any agent topology, an agent typically contains three subcomponents: a driver, sequencer, and monitor.&nbsp; If the agent is active, subtypes should contain all three subcomponents.&nbsp; If the agent is passive, subtypes should contain only the monitor.</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_agent" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">uvm_agent</a></td></tr>
<tr class=SMain><td colspan=2 class=SWideDescription>The uvm_agent virtual class should be used as the base class for the user- defined agents. </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="../base/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="../base/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=CHParent><div class=CHEntry><a href="../base/uvm_report_object-svh.html#uvm_report_object" class=LClass id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">uvm_report_object</a></div></div></td></tr>
<tr><td><div class=CHParent><div class=CHEntry><a href="../base/uvm_component-svh.html#uvm_component" class=LClass id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">uvm_component</a></div></div></td></tr>
<tr><td><div class=CHCurrent><div class=CHEntry>uvm_agent</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>virtual class uvm_agent extends uvm_component
</td></tr></table></blockquote></td></tr>
<!-- index=1 -->
<tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_agent.Methods" >Methods</a></td><td class=SDescription></td></tr>
<!-- index=2 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_agent.new" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">new</a></td><td class=SDescription>Creates and initializes an instance of this class using the normal constructor arguments for <a href="../base/uvm_component-svh.html#uvm_component" class=LClass id=link7 onMouseOver="ShowTip(event, 'tt4', 'link7')" onMouseOut="HideTip('tt4')">uvm_component</a>: <i>name</i> is the name of the instance, and <i>parent</i> is the handle to the hierarchical parent, if any.</td></tr>
<!-- index=3 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_agent.get_is_active" id=link8 onMouseOver="ShowTip(event, 'tt7', 'link8')" onMouseOut="HideTip('tt7')">get_is_active</a></td><td class=SDescription>Returns UVM_ACTIVE is the agent is acting as an active agent and UVM_PASSIVE if it is acting as a passive agent. </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_agent.Methods" href="../../src/comps/uvm_agent.svh">Methods</a></h3></div></div>
<!--CONTENT index=2 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_agent.new" href="../../src/comps/uvm_agent.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=3>function new (</td> </tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>string&nbsp;</td>
<td class=PParameter nowrap width=100%>name,</td>
</tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>uvm_component&nbsp;</td>
<td class=PParameter nowrap width=100%>parent</td>
</tr>
<tr>
<td class=PAfterParameters colspan=3>)</td></tr>
</table></td></tr>
</table></blockquote>
<div class=CBody><p>Creates and initializes an instance of this class using the normal constructor arguments for <a href="../base/uvm_component-svh.html#uvm_component" class=LClass id=link10 onMouseOver="ShowTip(event, 'tt4', 'link10')" onMouseOut="HideTip('tt4')">uvm_component</a>: <i>name</i> is the name of the instance, and <i>parent</i> is the handle to the hierarchical parent, if any.</p><p>The int configuration parameter is_active is used to identify whether this agent should be acting in active or passive mode.&nbsp; This parameter can be set by doing:</p><blockquote><pre>uvm_config_int::set(this, &quot;&lt;relative_path_to_agent&gt;, &quot;is_active&quot;, UVM_ACTIVE);</pre></blockquote></div></div></div>
<!--CONTENT index=3 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_agent.get_is_active" href="../../src/comps/uvm_agent.svh">get_is_active</a></h3>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function uvm_active_passive_enum get_is_active()
</td></tr></table></blockquote><div class=CBody><p>Returns UVM_ACTIVE is the agent is acting as an active agent and UVM_PASSIVE if it is acting as a passive agent.&nbsp; The default implementation is to just return the is_active flag, but the component developer may override this behavior if a more complex algorithm is needed to determine the active/passive nature of the agent.</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_report_object extends uvm_object
</td></tr></table></blockquote>The uvm_report_object provides an interface to the UVM reporting facility. </div></div><div class=CToolTip id="tt4"><div class=CClass>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual class uvm_component extends uvm_report_object
</td></tr></table></blockquote>The uvm_component class is the root base class for UVM components. </div></div><div class=CToolTip id="tt5"><div class=CClass>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual class uvm_agent extends uvm_component
</td></tr></table></blockquote>The uvm_agent virtual class should be used as the base class for the user- defined agents. </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=3>function new (</td> </tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>string&nbsp;</td>
<td class=PParameter nowrap width=100%>name,</td>
</tr><tr><td>&nbsp;&nbsp;&nbsp;</td> <td class=PType nowrap>uvm_component&nbsp;</td>
<td class=PParameter nowrap width=100%>parent</td>
</tr>
<tr>
<td class=PAfterParameters colspan=3>)</td></tr>
</table></td></tr>
</table></blockquote>
Creates and initializes an instance of this class using the normal constructor arguments for uvm_component: <i>name</i> is the name of the instance, and <i>parent</i> is the handle to the hierarchical parent, if any.</div></div><div class=CToolTip id="tt7"><div class=CMethod>
<blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function uvm_active_passive_enum get_is_active()
</td></tr></table></blockquote>Returns UVM_ACTIVE is the agent is acting as an active agent and UVM_PASSIVE if it is acting as a passive agent. </div></div><!--END_ND_TOOLTIPS-->
<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>