blob: 6652936718f291d0b537e5ac89619f991f28781b [file] [log] [blame]
<html><head><title>ovm_component_registry #(T,Tname)</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="ovm_component_registry#(T,Tname)" href="../../../../src/base/ovm_registry.svh">ovm_component_registry #(T,Tname)</a></h1><div class=CBody><p>The ovm_component_registry serves as a lightweight proxy for a component of type <i>T</i> and type name <i>Tname</i>, a string.&nbsp; The proxy enables efficient registration with the <a href="ovm_factory-svh.html#ovm_factory" class=LClass id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">ovm_factory</a>.&nbsp; Without it, registration would require an instance of the component itself.</p><p>See Usage section below for information on using ovm_component_registry.</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="#ovm_component_registry#(T,Tname)" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">ovm_component_registry #(T,Tname)</a></td></tr>
<tr class=SMain><td colspan=2 class=SWideDescription>The ovm_component_registry serves as a lightweight proxy for a component of type <i>T</i> and type name <i>Tname</i>, a string. </td></tr>
<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="ovm_factory-svh.html#ovm_object_wrapper" class=LClass id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">ovm_object_wrapper</a></div></div></td></tr>
<tr><td><div class=CHCurrent><div class=CHEntry>ovm_component_registry#(T,Tname)</div></div></td></tr></table>
</div></td></tr>
<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 ovm_component_registry #(</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%>ovm_component,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PType nowrap>string&nbsp;</td><td class=PParameter nowrap>Tname</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>&quot;&lt;unknown&gt;&quot;</td></tr><tr><td class=PAfterParameters colspan=5>) extends ovm_object_wrapper</td></tr></table></td></tr></table></blockquote></td></tr>
<!-- index=1 -->
<tr class="SGroup SIndent1"><td class=SEntry><a href="#ovm_component_registry#(T,Tname).Methods" >Methods</a></td><td class=SDescription></td></tr>
<!-- index=2 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#ovm_component_registry#(T,Tname).create_component" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">create_component</a></td><td class=SDescription>Creates a component of type T having the provided <i>name</i> and <i>parent</i>. </td></tr>
<!-- index=3 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#ovm_component_registry#(T,Tname).get_type_name" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">get_type_name</a></td><td class=SDescription>Returns the value given by the string parameter, <i>Tname</i>. </td></tr>
<!-- index=4 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#ovm_component_registry#(T,Tname).get" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">get</a></td><td class=SDescription>Returns the singleton instance of this type. </td></tr>
<!-- index=5 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#ovm_component_registry#(T,Tname).create" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">create</a></td><td class=SDescription>Returns an instance of the component type, <i>T</i>, represented by this proxy, subject to any factory overrides based on the context provided by the <i>parent</i>&rsquo;s full name. </td></tr>
<!-- index=6 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#ovm_component_registry#(T,Tname).set_type_override" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">set_type_override</a></td><td class=SDescription>Configures the factory to create an object of the type represented by <i>override_type</i> whenever a request is made to create an object of the type, <i>T</i>, represented by this proxy, provided no instance override applies. </td></tr>
<!-- index=7 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#ovm_component_registry#(T,Tname).set_inst_override" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">set_inst_override</a></td><td class=SDescription>Configures the factory to create a component of the type represented by <i>override_type</i> whenever a request is made to create an object of the type, <i>T</i>, represented by this proxy, with matching instance paths. </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="ovm_component_registry#(T,Tname).Methods" href="../../../../src/base/ovm_registry.svh">Methods</a></h3></div></div>
<!--CONTENT index=2 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="ovm_component_registry#(T,Tname).create_component" href="../../../../src/base/ovm_registry.svh">create_component</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>virtual function ovm_component create_component (</td><td class=PType nowrap>string&nbsp;</td><td class=PParameter nowrap>name,</td></tr><tr><td></td><td class=PType nowrap>ovm_component&nbsp;</td><td class=PParameter nowrap>parent</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><div class=CBody><p>Creates a component of type T having the provided <i>name</i> and <i>parent</i>.&nbsp; This is an override of the method in <a href="ovm_factory-svh.html#ovm_object_wrapper" class=LClass id=link10 onMouseOver="ShowTip(event, 'tt1', 'link10')" onMouseOut="HideTip('tt1')">ovm_object_wrapper</a>.&nbsp; It is called by the factory after determining the type of object to create.&nbsp; You should not call this method directly.&nbsp; Call <a href="#ovm_component_registry#(T,Tname).create" class=LMethod id=link11 onMouseOver="ShowTip(event, 'tt6', 'link11')" onMouseOut="HideTip('tt6')">create</a> instead.</p></div></div></div>
<!--CONTENT index=3 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="ovm_component_registry#(T,Tname).get_type_name" href="../../../../src/base/ovm_registry.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 value given by the string parameter, <i>Tname</i>.&nbsp; This method overrides the method in <a href="ovm_factory-svh.html#ovm_object_wrapper" class=LClass id=link12 onMouseOver="ShowTip(event, 'tt1', 'link12')" onMouseOut="HideTip('tt1')">ovm_object_wrapper</a>.</p></div></div></div>
<!--CONTENT index=4 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="ovm_component_registry#(T,Tname).get" href="../../../../src/base/ovm_registry.svh">get</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>static function this_type get()</td></tr></table></blockquote><div class=CBody><p>Returns the singleton instance of this type.&nbsp; Type-based factory operation depends on there being a single proxy instance for each registered type.</p></div></div></div>
<!--CONTENT index=5 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="ovm_component_registry#(T,Tname).create" href="../../../../src/base/ovm_registry.svh">create</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 T create(</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>ovm_component&nbsp;</td><td class=PParameter nowrap>parent,</td><td class=PDefaultValuePrefix>&nbsp;&nbsp;</td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>string&nbsp;</td><td class=PParameter nowrap>contxt</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>&quot;&quot;</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><div class=CBody><p>Returns an instance of the component type, <i>T</i>, represented by this proxy, subject to any factory overrides based on the context provided by the <i>parent</i>&rsquo;s full name.&nbsp; The <i>contxt</i> argument, if supplied, supercedes the <i>parent</i>&rsquo;s context.&nbsp; The new instance will have the given leaf <i>name</i> and <i>parent</i>.</p></div></div></div>
<!--CONTENT index=6 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="ovm_component_registry#(T,Tname).set_type_override" href="../../../../src/base/ovm_registry.svh">set_type_override</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 set_type_override (</td><td class=PType nowrap>ovm_object_wrapper&nbsp;</td><td class=PParameter nowrap>override_type,</td><td class=PDefaultValuePrefix>&nbsp;&nbsp;</td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>bit&nbsp;</td><td class=PParameter nowrap>replace</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>Configures the factory to create an object of the type represented by <i>override_type</i> whenever a request is made to create an object of the type, <i>T</i>, represented by this proxy, provided no instance override applies.&nbsp; The original type, <i>T</i>, is typically a super class of the override type.</p></div></div></div>
<!--CONTENT index=7 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="ovm_component_registry#(T,Tname).set_inst_override" href="../../../../src/base/ovm_registry.svh">set_inst_override</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 set_inst_override(</td><td class=PType nowrap>ovm_object_wrapper&nbsp;</td><td class=PParameter nowrap>override_type,</td><td class=PDefaultValuePrefix>&nbsp;&nbsp;</td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>string&nbsp;</td><td class=PParameter nowrap>inst_path,</td><td class=PDefaultValuePrefix>&nbsp;&nbsp;</td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>ovm_component&nbsp;</td><td class=PParameter nowrap>parent</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>Configures the factory to create a component of the type represented by <i>override_type</i> whenever a request is made to create an object of the type, <i>T</i>, represented by this proxy, with matching instance paths.&nbsp; The original type, <i>T</i>, is typically a super class of the override type.</p><p>If <i>parent</i> is not specified, <i>inst_path</i> is interpreted as an absolute instance path, which enables instance overrides to be set from outside component classes.&nbsp; If <i>parent</i> is specified, <i>inst_path</i> is interpreted as being relative to the <i>parent</i>&rsquo;s hierarchical instance path, i.e.&nbsp; <i>{parent.get_full_name(),&rdquo;.&rdquo;,inst_path}</i> is the instance path that is registered with the override.&nbsp; The <i>inst_path</i> may contain wildcards for matching against multiple contexts.</p></div></div></div>
<!--CONTENT index=8 -->
<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="ovm_object_registry#(T,Tname)" href="../../../../src/base/ovm_registry.svh">ovm_object_registry #(T,Tname)</a></h2><div class=CBody><p>The ovm_object_registry serves as a lightweight proxy for an <a href="ovm_object-svh.html#ovm_object" class=LClass id=link23 onMouseOver="ShowTip(event, 'tt11', 'link23')" onMouseOut="HideTip('tt11')">ovm_object</a> of type <i>T</i> and type name <i>Tname</i>, a string.&nbsp; The proxy enables efficient registration with the <a href="ovm_factory-svh.html#ovm_factory" class=LClass id=link24 onMouseOver="ShowTip(event, 'tt9', 'link24')" onMouseOut="HideTip('tt9')">ovm_factory</a>.&nbsp; Without it, registration would require an instance of the object itself.</p><p>See Usage section below for information on using ovm_component_registry.</p>
<!--START_ND_SUMMARY index=8-->
<div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable>
<!-- index=8 -->
<tr class="SClass"><td colspan=2 class=SEntry><a href="#ovm_object_registry#(T,Tname)" id=link14 onMouseOver="ShowTip(event, 'tt10', 'link14')" onMouseOut="HideTip('tt10')">ovm_object_registry #(T,Tname)</a></td></tr>
<tr class=SMain><td colspan=2 class=SWideDescription>The ovm_object_registry serves as a lightweight proxy for an <a href="ovm_object-svh.html#ovm_object" class=LClass id=link15 onMouseOver="ShowTip(event, 'tt11', 'link15')" onMouseOut="HideTip('tt11')">ovm_object</a> of type <i>T</i> and type name <i>Tname</i>, a string. </td></tr>
<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="ovm_factory-svh.html#ovm_object_wrapper" class=LClass id=link13 onMouseOver="ShowTip(event, 'tt1', 'link13')" onMouseOut="HideTip('tt1')">ovm_object_wrapper</a></div></div></td></tr>
<tr><td><div class=CHCurrent><div class=CHEntry>ovm_object_registry#(T,Tname)</div></div></td></tr></table>
</div></td></tr>
<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 ovm_object_registry #(</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%>ovm_object,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PType nowrap>string&nbsp;</td><td class=PParameter nowrap>Tname</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>&quot;&lt;unknown&gt;&quot;</td></tr><tr><td class=PAfterParameters colspan=5>) extends ovm_object_wrapper</td></tr></table></td></tr></table></blockquote></td></tr>
<!-- index=9 -->
<tr class="SMethod SIndent1 SMarked"><td class=SEntry><a href="#ovm_object_registry#(T,Tname).create_object" id=link16 onMouseOver="ShowTip(event, 'tt12', 'link16')" onMouseOut="HideTip('tt12')">create_object</a></td><td class=SDescription>Creates an object of type <i>T</i> and returns it as a handle to an <a href="ovm_object-svh.html#ovm_object" class=LClass id=link17 onMouseOver="ShowTip(event, 'tt11', 'link17')" onMouseOut="HideTip('tt11')">ovm_object</a>. </td></tr>
<!-- index=10 -->
<tr class="SMethod SIndent1"><td class=SEntry><a href="#ovm_object_registry#(T,Tname).get_type_name" id=link18 onMouseOver="ShowTip(event, 'tt13', 'link18')" onMouseOut="HideTip('tt13')">get_type_name</a></td><td class=SDescription>Returns the value given by the string parameter, <i>Tname</i>. </td></tr>
<!-- index=11 -->
<tr class="SMethod SIndent1 SMarked"><td class=SEntry><a href="#ovm_object_registry#(T,Tname).get" id=link19 onMouseOver="ShowTip(event, 'tt14', 'link19')" onMouseOut="HideTip('tt14')">get</a></td><td class=SDescription>Returns the singleton instance of this type. </td></tr>
<!-- index=12 -->
<tr class="SMethod SIndent1"><td class=SEntry><a href="#ovm_object_registry#(T,Tname).create" id=link20 onMouseOver="ShowTip(event, 'tt15', 'link20')" onMouseOut="HideTip('tt15')">create</a></td><td class=SDescription>Returns an instance of the object type, <i>T</i>, represented by this proxy, subject to any factory overrides based on the context provided by the <i>parent</i>&rsquo;s full name. </td></tr>
<!-- index=13 -->
<tr class="SMethod SIndent1 SMarked"><td class=SEntry><a href="#ovm_object_registry#(T,Tname).set_type_override" id=link21 onMouseOver="ShowTip(event, 'tt16', 'link21')" onMouseOut="HideTip('tt16')">set_type_override</a></td><td class=SDescription>Configures the factory to create an object of the type represented by <i>override_type</i> whenever a request is made to create an object of the type represented by this proxy, provided no instance override applies. </td></tr>
<!-- index=14 -->
<tr class="SMethod SIndent1"><td class=SEntry><a href="#ovm_object_registry#(T,Tname).set_inst_override" id=link22 onMouseOver="ShowTip(event, 'tt17', 'link22')" onMouseOut="HideTip('tt17')">set_inst_override</a></td><td class=SDescription>Configures the factory to create an object of the type represented by <i>override_type</i> whenever a request is made to create an object of the type represented by this proxy, with matching instance paths. </td></tr>
<!-- index=15 -->
<tr class="SGroup SIndent1"><td class=SEntry><a href="#ovm_object_registry#(T,Tname).Usage" >Usage</a></td><td class=SDescription>This section describes usage for the ovm_*_registry classes.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<!--CONTENT index=9 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="ovm_object_registry#(T,Tname).create_object" href="../../../../src/base/ovm_registry.svh">create_object</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>virtual function ovm_object create_object(</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><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><div class=CBody><p>Creates an object of type <i>T</i> and returns it as a handle to an <a href="ovm_object-svh.html#ovm_object" class=LClass id=link25 onMouseOver="ShowTip(event, 'tt11', 'link25')" onMouseOut="HideTip('tt11')">ovm_object</a>.&nbsp; This is an override of the method in <a href="ovm_factory-svh.html#ovm_object_wrapper" class=LClass id=link26 onMouseOver="ShowTip(event, 'tt1', 'link26')" onMouseOut="HideTip('tt1')">ovm_object_wrapper</a>.&nbsp; It is called by the factory after determining the type of object to create.&nbsp; You should not call this method directly.&nbsp; Call <a href="#ovm_object_registry#(T,Tname).create" class=LMethod id=link27 onMouseOver="ShowTip(event, 'tt15', 'link27')" onMouseOut="HideTip('tt15')">create</a> instead.</p></div></div></div>
<!--CONTENT index=10 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="ovm_object_registry#(T,Tname).get_type_name" href="../../../../src/base/ovm_registry.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 value given by the string parameter, <i>Tname</i>.&nbsp; This method overrides the method in <a href="ovm_factory-svh.html#ovm_object_wrapper" class=LClass id=link28 onMouseOver="ShowTip(event, 'tt1', 'link28')" onMouseOut="HideTip('tt1')">ovm_object_wrapper</a>.</p></div></div></div>
<!--CONTENT index=11 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="ovm_object_registry#(T,Tname).get" href="../../../../src/base/ovm_registry.svh">get</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>static function this_type get()</td></tr></table></blockquote><div class=CBody><p>Returns the singleton instance of this type.&nbsp; Type-based factory operation depends on there being a single proxy instance for each registered type.</p></div></div></div>
<!--CONTENT index=12 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="ovm_object_registry#(T,Tname).create" href="../../../../src/base/ovm_registry.svh">create</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 T create (</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></td><td class=PType nowrap>ovm_component&nbsp;</td><td class=PParameter nowrap>parent</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null,</td></tr><tr><td></td><td class=PType nowrap>string&nbsp;</td><td class=PParameter nowrap>contxt</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>&quot;&quot;</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><div class=CBody><p>Returns an instance of the object type, <i>T</i>, represented by this proxy, subject to any factory overrides based on the context provided by the <i>parent</i>&rsquo;s full name.&nbsp; The <i>contxt</i> argument, if supplied, supercedes the <i>parent</i>&rsquo;s context.&nbsp; The new instance will have the given leaf <i>name</i>, if provided.</p></div></div></div>
<!--CONTENT index=13 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="ovm_object_registry#(T,Tname).set_type_override" href="../../../../src/base/ovm_registry.svh">set_type_override</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 set_type_override (</td><td class=PType nowrap>ovm_object_wrapper&nbsp;</td><td class=PParameter nowrap>override_type,</td><td class=PDefaultValuePrefix>&nbsp;&nbsp;</td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>bit&nbsp;</td><td class=PParameter nowrap>replace</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>Configures the factory to create an object of the type represented by <i>override_type</i> whenever a request is made to create an object of the type represented by this proxy, provided no instance override applies.&nbsp; The original type, <i>T</i>, is typically a super class of the override type.</p></div></div></div>
<!--CONTENT index=14 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="ovm_object_registry#(T,Tname).set_inst_override" href="../../../../src/base/ovm_registry.svh">set_inst_override</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 set_inst_override(</td><td class=PType nowrap>ovm_object_wrapper&nbsp;</td><td class=PParameter nowrap>override_type,</td><td class=PDefaultValuePrefix>&nbsp;&nbsp;</td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>string&nbsp;</td><td class=PParameter nowrap>inst_path,</td><td class=PDefaultValuePrefix>&nbsp;&nbsp;</td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>ovm_component&nbsp;</td><td class=PParameter nowrap>parent</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>Configures the factory to create an object of the type represented by <i>override_type</i> whenever a request is made to create an object of the type represented by this proxy, with matching instance paths.&nbsp; The original type, <i>T</i>, is typically a super class of the override type.</p><p>If <i>parent</i> is not specified, <i>inst_path</i> is interpreted as an absolute instance path, which enables instance overrides to be set from outside component classes.&nbsp; If <i>parent</i> is specified, <i>inst_path</i> is interpreted as being relative to the <i>parent</i>&rsquo;s hierarchical instance path, i.e.&nbsp; <i>{parent.get_full_name(),&rdquo;.&rdquo;,inst_path}</i> is the instance path that is registered with the override.&nbsp; The <i>inst_path</i> may contain wildcards for matching against multiple contexts.</p></div></div></div>
<!--CONTENT index=15 -->
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="ovm_object_registry#(T,Tname).Usage" href="../../../../src/base/ovm_registry.svh">Usage</a></h3><div class=CBody><p>This section describes usage for the ovm_*_registry classes.</p><p>The wrapper classes are used to register lightweight proxies of objects and components.</p><p>To register a particular component type, you need only typedef a specialization of its proxy class, which is typically done inside the class.</p><p>For example, to register an OVM component of type <i>mycomp</i></p><blockquote><pre>class mycomp extends ovm_component;
typedef ovm_component_registry #(mycomp,&quot;mycomp&quot;) type_id;
endclass</pre></blockquote><p>However, because of differences between simulators, it is necessary to use a macro to ensure vendor interoperability with factory registration.&nbsp; To register an OVM component of type <i>mycomp</i> in a vendor-independent way, you would write instead:</p><blockquote><pre>class mycomp extends ovm_component;
`ovm_component_utils(mycomp);
...
endclass</pre></blockquote><p>The <a href="../macros/ovm_object_defines-svh.html#`ovm_component_utils" class=LMacro >`ovm_component_utils</a> macro is for non-parameterized classes.&nbsp; In this example, the typedef underlying the macro specifies the <i>Tname</i> parameter as &ldquo;mycomp&rdquo;, and <i>mycomp</i>&rsquo;s get_type_name() is defined to return the same.&nbsp; With <i>Tname</i> defined, you can use the factory&rsquo;s name-based methods to set overrides and create objects and components of non-parameterized types.</p><p>For parameterized types, the type name changes with each specialization, so you can not specify a <i>Tname</i> inside a parameterized class and get the behavior you want; the same type name string would be registered for all specializations of the class!&nbsp; (The factory would produce warnings for each specialization beyond the first.)&nbsp; To avoid the warnings and simulator interoperability issues with parameterized classes, you must register parameterized classes with a different macro.</p><p>For example, to register an OVM component of type driver #(T), you would write:</p><blockquote><pre>class driver #(type T=int) extends ovm_component;
`ovm_component_param_utils(driver #(T));
...
endclass</pre></blockquote><p>The <a href="../macros/ovm_object_defines-svh.html#`ovm_component_param_utils" class=LMacro >`ovm_component_param_utils</a> and <a href="../macros/ovm_object_defines-svh.html#`ovm_object_param_utils" class=LMacro >`ovm_object_param_utils</a> macros are used to register parameterized classes with the factory.&nbsp; Unlike the the non-param versions, these macros do not specify the <i>Tname</i> parameter in the underlying ovm_component_registry typedef, and they do not define the get_type_name method for the user class.&nbsp; Consequently, you will not be able to use the factory&rsquo;s name-based methods for parameterized classes.</p><p>The primary purpose for adding the factory&rsquo;s type-based methods was to accommodate registration of parameterized types and eliminate the many sources of errors associated with string-based factory usage.&nbsp; Thus, use of name-based lookup in <a href="ovm_factory-svh.html#ovm_factory" class=LClass id=link29 onMouseOver="ShowTip(event, 'tt9', 'link29')" onMouseOut="HideTip('tt9')">ovm_factory</a> is no longer recommended.</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 ovm_object_wrapper</td></tr></table></blockquote>The ovm_object_wrapper provides an abstract interface for creating object and component proxies. </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 colspan=5>class ovm_component_registry #(</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%>ovm_component,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PType nowrap>string&nbsp;</td><td class=PParameter nowrap>Tname</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>&quot;&lt;unknown&gt;&quot;</td></tr><tr><td class=PAfterParameters colspan=5>) extends ovm_object_wrapper</td></tr></table></td></tr></table></blockquote>The ovm_component_registry serves as a lightweight proxy for a component of type <i>T</i> and type name <i>Tname</i>, a string. </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 nowrap>virtual function ovm_component create_component (</td><td class=PType nowrap>string&nbsp;</td><td class=PParameter nowrap>name,</td></tr><tr><td></td><td class=PType nowrap>ovm_component&nbsp;</td><td class=PParameter nowrap>parent</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Creates a component of type T having the provided <i>name</i> and <i>parent</i>. </div></div><div class=CToolTip id="tt4"><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 value given by the string parameter, <i>Tname</i>. </div></div><div class=CToolTip id="tt5"><div class=CMethod><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>static function this_type get()</td></tr></table></blockquote>Returns the singleton instance of this type. </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 T create(</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>ovm_component&nbsp;</td><td class=PParameter nowrap>parent,</td><td class=PDefaultValuePrefix>&nbsp;&nbsp;</td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>string&nbsp;</td><td class=PParameter nowrap>contxt</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>&quot;&quot;</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Returns an instance of the component type, <i>T</i>, represented by this proxy, subject to any factory overrides based on the context provided by the <i>parent</i>&rsquo;s full name. </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 set_type_override (</td><td class=PType nowrap>ovm_object_wrapper&nbsp;</td><td class=PParameter nowrap>override_type,</td><td class=PDefaultValuePrefix>&nbsp;&nbsp;</td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>bit&nbsp;</td><td class=PParameter nowrap>replace</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>Configures the factory to create an object of the type represented by <i>override_type</i> whenever a request is made to create an object of the type, <i>T</i>, represented by this proxy, provided no instance override applies. </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 set_inst_override(</td><td class=PType nowrap>ovm_object_wrapper&nbsp;</td><td class=PParameter nowrap>override_type,</td><td class=PDefaultValuePrefix>&nbsp;&nbsp;</td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>string&nbsp;</td><td class=PParameter nowrap>inst_path,</td><td class=PDefaultValuePrefix>&nbsp;&nbsp;</td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>ovm_component&nbsp;</td><td class=PParameter nowrap>parent</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>Configures the factory to create a component of the type represented by <i>override_type</i> whenever a request is made to create an object of the type, <i>T</i>, represented by this proxy, with matching instance paths. </div></div><div class=CToolTip id="tt9"><div class=CClass><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>class ovm_factory</td></tr></table></blockquote>As the name implies, ovm_factory is used to manufacture (create) OVM objects and components. </div></div><div class=CToolTip id="tt10"><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 colspan=5>class ovm_object_registry #(</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%>ovm_object,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PType nowrap>string&nbsp;</td><td class=PParameter nowrap>Tname</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>&quot;&lt;unknown&gt;&quot;</td></tr><tr><td class=PAfterParameters colspan=5>) extends ovm_object_wrapper</td></tr></table></td></tr></table></blockquote>The ovm_object_registry serves as a lightweight proxy for an ovm_object of type <i>T</i> and type name <i>Tname</i>, a string. </div></div><div class=CToolTip id="tt11"><div class=CClass><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual class ovm_object extends ovm_void</td></tr></table></blockquote>The ovm_object class is the base class for all OVM data and hierarchical classes. </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>virtual function ovm_object create_object(</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><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Creates an object of type <i>T</i> and returns it as a handle to an ovm_object. </div></div><div class=CToolTip id="tt13"><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 value given by the string parameter, <i>Tname</i>. </div></div><div class=CToolTip id="tt14"><div class=CMethod><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>static function this_type get()</td></tr></table></blockquote>Returns the singleton instance of this type. </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>static function T create (</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></td><td class=PType nowrap>ovm_component&nbsp;</td><td class=PParameter nowrap>parent</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null,</td></tr><tr><td></td><td class=PType nowrap>string&nbsp;</td><td class=PParameter nowrap>contxt</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>&quot;&quot;</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Returns an instance of the object type, <i>T</i>, represented by this proxy, subject to any factory overrides based on the context provided by the <i>parent</i>&rsquo;s full name. </div></div><div class=CToolTip id="tt16"><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 set_type_override (</td><td class=PType nowrap>ovm_object_wrapper&nbsp;</td><td class=PParameter nowrap>override_type,</td><td class=PDefaultValuePrefix>&nbsp;&nbsp;</td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>bit&nbsp;</td><td class=PParameter nowrap>replace</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>Configures the factory to create an object of the type represented by <i>override_type</i> whenever a request is made to create an object of the type represented by this proxy, provided no instance override applies. </div></div><div class=CToolTip id="tt17"><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 set_inst_override(</td><td class=PType nowrap>ovm_object_wrapper&nbsp;</td><td class=PParameter nowrap>override_type,</td><td class=PDefaultValuePrefix>&nbsp;&nbsp;</td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>string&nbsp;</td><td class=PParameter nowrap>inst_path,</td><td class=PDefaultValuePrefix>&nbsp;&nbsp;</td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>ovm_component&nbsp;</td><td class=PParameter nowrap>parent</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>Configures the factory to create an object of the type represented by <i>override_type</i> whenever a request is made to create an object of the type represented by this proxy, with matching instance paths. </div></div><!--END_ND_TOOLTIPS-->
<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>