| <html><head><title>Resources</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="Resources" href="../../src/base/uvm_resource.svh">Resources</a></h1><div class=CBody> |
| |
| <!--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="#Resources" >Resources</a></td><td class=SDescription></td></tr> |
| <!-- index=1 --> |
| |
| <tr class="SGeneric"><td class=SEntry><a href="#Intro" >Intro</a></td><td class=SDescription>A resource is a parameterized container that holds arbitrary data. </td></tr> |
| <!-- index=2 --> |
| |
| <tr class="SSMethod SMarked"><td class=SEntry><a href="#uvm_resource_types" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">uvm_resource_types</a></td><td class=SDescription>Provides typedefs and enums used throughout the resources facility. </td></tr> |
| <!-- index=3 --> |
| |
| <tr class="SSMethod"><td class=SEntry><a href="#uvm_resource_options" >uvm_resource_options</a></td><td class=SDescription>Provides a namespace for managing options for the resources facility. </td></tr> |
| <!-- index=8 --> |
| |
| <tr class="SSMethod SMarked"><td class=SEntry><a href="#uvm_resource_base" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">uvm_resource_base</a></td><td class=SDescription>Non-parameterized base class for resources. </td></tr> |
| <!-- index=31 --> |
| |
| <tr class="SSMethod"><td class=SEntry><a href="#uvm_resource_pool" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">uvm_resource_pool</a></td><td class=SDescription>The global (singleton) resource database.</td></tr> |
| <!-- index=57 --> |
| |
| <tr class="SSMethod SMarked"><td class=SEntry><a href="#uvm_resource#(T)" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">uvm_resource #(T)</a></td><td class=SDescription>Parameterized resource. </td></tr></table></div></div><!--END_ND_SUMMARY--> |
| </div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=1 --> |
| <div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="Intro" href="../../src/base/uvm_resource.svh">Intro</a></h3><div class=CBody><p>A resource is a parameterized container that holds arbitrary data. Resources can be used to configure components, supply data to sequences, or enable sharing of information across disparate parts of a testbench. They are stored using scoping information so their visibility can be constrained to certain parts of the testbench. Resource containers can hold any type of data, constrained only by the data types available in SystemVerilog. Resources can contain scalar objects, class handles, queues, lists, or even virtual interfaces.</p><p>Resources are stored in a resource database so that each resource can be retrieved by name or by type. The database has both a name table and a type table and each resource is entered into both. The database is globally accessible.</p><p>Each resource has a set of scopes over which it is visible. The set of scopes is represented as a regular expression. When a resource is looked up the scope of the entity doing the looking up is supplied to the lookup function. This is called the <i>current scope</i>. If the current scope is in the set of scopes over which a resource is visible then the resource can be retuned in the lookup.</p><p>Resources can be looked up by name or by type. To support type lookup each resource has a static type handle that uniquely identifies the type of each specialized resource container.</p><p>Multiple resources that have the same name are stored in a queue. Each resource is pushed into a queue with the first one at the front of the queue and each subsequent one behind it. The same happens for multiple resources that have the same type. The resource queues are searched front to back, so those placed earlier in the queue have precedence over those placed later.</p><p>The precedence of resources with the same name or same type can be altered. One way is to set the <i>precedence</i> member of the resource container to any arbitrary value. The search algorithm will return the resource with the highest precedence. In the case where there are multiple resources that match the search criteria and have the same (highest) precedence, the earliest one located in the queue will be one returned. Another way to change the precedence is to use the set_priority function to move a resource to either the front or back of the queue.</p><p>The classes defined here form the low level layer of the resource database. The classes include the resource container and the database that holds the containers. The following set of classes are defined here:</p><p><a href="#uvm_resource_types" class=LClass id=link5 onMouseOver="ShowTip(event, 'tt1', 'link5')" onMouseOut="HideTip('tt1')">uvm_resource_types</a>: A class without methods or members, only typedefs and enums. These types and enums are used throughout the resources facility. Putting the types in a class keeps them confined to a specific name space.</p><p><a href="#uvm_resource_options" class=LClass id=link6 onMouseOver="ShowTip(event, 'tt5', 'link6')" onMouseOut="HideTip('tt5')">uvm_resource_options</a>: policy class for setting options, such as auditing, which effect resources.</p><p><a href="#uvm_resource_base" class=LClass id=link7 onMouseOver="ShowTip(event, 'tt2', 'link7')" onMouseOut="HideTip('tt2')">uvm_resource_base</a>: the base (untyped) resource class living in the resource database. This class includes the interface for setting a resource as read-only, notification, scope management, altering search priority, and managing auditing.</p><p><a href="#uvm_resource#(T)" class=LClass id=link8 onMouseOver="ShowTip(event, 'tt4', 'link8')" onMouseOut="HideTip('tt4')">uvm_resource#(T)</a>: parameterized resource container. This class includes the interfaces for reading and writing each resource. Because the class is parameterized, all the access functions are type safe.</p><p><a href="#uvm_resource_pool" class=LClass id=link9 onMouseOver="ShowTip(event, 'tt3', 'link9')" onMouseOut="HideTip('tt3')">uvm_resource_pool</a>: the resource database. This is a singleton class object.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=2 --> |
| <div class="CClass"><div class=CTopic><h2 class=CTitle><a name="uvm_resource_types" href="../../src/base/uvm_resource.svh">uvm_resource_types</a></h2><div class=CBody><p>Provides typedefs and enums used throughout the resources facility. This class has no members or methods, only typedefs. It’s used in lieu of package-scope types. When needed, other classes can use these types by prefixing their usage with uvm_resource_types::. E.g.</p><blockquote><pre>uvm_resource_types::rsrc_q_t queue;</pre></blockquote> |
| |
| <!--START_ND_SUMMARY index=2--> |
| <div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable> |
| <!-- index=2 --> |
| |
| <tr class="SClass"><td colspan=2 class=SEntry><a href="#uvm_resource_types" id=link10 onMouseOver="ShowTip(event, 'tt1', 'link10')" onMouseOut="HideTip('tt1')">uvm_resource_types</a></td></tr> |
| <tr class=SMain><td colspan=2 class=SWideDescription>Provides typedefs and enums used throughout the resources facility. </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_resource_types |
| </td></tr></table></blockquote></td></tr> |
| </table></div></div><!--END_ND_SUMMARY--> |
| </div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=3 --> |
| <div class="CClass"><div class=CTopic><h2 class=CTitle><a name="uvm_resource_options" href="../../src/base/uvm_resource.svh">uvm_resource_options</a></h2><div class=CBody><p>Provides a namespace for managing options for the resources facility. The only thing allowed in this class is static local data members and static functions for manipulating and retrieving the value of the data members. The static local data members represent options and settings that control the behavior of the resources facility.</p> |
| |
| <!--START_ND_SUMMARY index=3--> |
| <div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable> |
| <!-- index=3 --> |
| |
| <tr class="SClass"><td colspan=2 class=SEntry><a href="#uvm_resource_options" >uvm_resource_options</a></td></tr> |
| <tr class=SMain><td colspan=2 class=SWideDescription>Provides a namespace for managing options for the resources facility. </td></tr> |
| <!-- index=4 --> |
| |
| <tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_resource_options.Methods" >Methods</a></td><td class=SDescription></td></tr> |
| <!-- index=5 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_resource_options.turn_on_auditing" id=link11 onMouseOver="ShowTip(event, 'tt6', 'link11')" onMouseOut="HideTip('tt6')">turn_on_auditing</a></td><td class=SDescription>Turn auditing on for the resource database. </td></tr> |
| <!-- index=6 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource_options.turn_off_auditing" id=link12 onMouseOver="ShowTip(event, 'tt7', 'link12')" onMouseOut="HideTip('tt7')">turn_off_auditing</a></td><td class=SDescription>Turn auditing off for the resource database. </td></tr> |
| <!-- index=7 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_resource_options.is_auditing" id=link13 onMouseOver="ShowTip(event, 'tt8', 'link13')" onMouseOut="HideTip('tt8')">is_auditing</a></td><td class=SDescription>Returns 1 if the auditing facility is on and 0 if it is off.</td></tr></table></div></div><!--END_ND_SUMMARY--> |
| </div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=4 --> |
| <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_options.Methods" href="../../src/base/uvm_resource.svh">Methods</a></h3></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=5 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_options.turn_on_auditing" href="../../src/base/uvm_resource.svh">turn_on_auditing</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>static function void turn_on_auditing() |
| </td></tr></table></blockquote><div class=CBody><p>Turn auditing on for the resource database. This causes all reads and writes to the database to store information about the accesses. Auditing is turned on by default.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=6 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_options.turn_off_auditing" href="../../src/base/uvm_resource.svh">turn_off_auditing</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>static function void turn_off_auditing() |
| </td></tr></table></blockquote><div class=CBody><p>Turn auditing off for the resource database. If auditing is turned off, it is not possible to get extra information about resource database accesses.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=7 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_options.is_auditing" href="../../src/base/uvm_resource.svh">is_auditing</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>static function bit is_auditing() |
| </td></tr></table></blockquote><div class=CBody><p>Returns 1 if the auditing facility is on and 0 if it is off.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=8 --> |
| <div class="CClass"><div class=CTopic><h2 class=CTitle><a name="uvm_resource_base" href="../../src/base/uvm_resource.svh">uvm_resource_base</a></h2><div class=CBody><p>Non-parameterized base class for resources. Supports interfaces for scope matching, and virtual functions for printing the resource and for printing the accessor list</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="#uvm_resource_base" id=link16 onMouseOver="ShowTip(event, 'tt2', 'link16')" onMouseOut="HideTip('tt2')">uvm_resource_base</a></td></tr> |
| <tr class=SMain><td colspan=2 class=SWideDescription>Non-parameterized base class for resources. </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=link14 onMouseOver="ShowTip(event, 'tt9', 'link14')" onMouseOut="HideTip('tt9')">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=link15 onMouseOver="ShowTip(event, 'tt10', 'link15')" onMouseOut="HideTip('tt10')">uvm_object</a></div></div></td></tr> |
| <tr><td><div class=CHCurrent><div class=CHEntry>uvm_resource_base</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_resource_base extends uvm_object |
| </td></tr></table></blockquote></td></tr> |
| |
| <!-- index=9 --> |
| |
| <tr class="SVariable SIndent1 SMarked"><td class=SEntry><a href="#uvm_resource_base.precedence" id=link17 onMouseOver="ShowTip(event, 'tt11', 'link17')" onMouseOut="HideTip('tt11')">precedence</a></td><td class=SDescription>This variable is used to associate a precedence that a resource has with respect to other resources which match the same scope and name. </td></tr> |
| <!-- index=10 --> |
| |
| <tr class="SVariable SIndent1"><td class=SEntry><a href="#uvm_resource_base.default_precedence" id=link18 onMouseOver="ShowTip(event, 'tt12', 'link18')" onMouseOut="HideTip('tt12')">default_precedence</a></td><td class=SDescription>The default precedence for an resource that has been created. </td></tr> |
| <!-- index=11 --> |
| |
| <tr class="SMethod SIndent1 SMarked"><td class=SEntry><a href="#uvm_resource_base.new" id=link19 onMouseOver="ShowTip(event, 'tt13', 'link19')" onMouseOut="HideTip('tt13')">new</a></td><td class=SDescription>constructor for uvm_resource_base. </td></tr> |
| <!-- index=12 --> |
| |
| <tr class="SMethod SIndent1"><td class=SEntry><a href="#uvm_resource_base.get_type_handle" id=link20 onMouseOver="ShowTip(event, 'tt14', 'link20')" onMouseOut="HideTip('tt14')">get_type_handle</a></td><td class=SDescription>Pure virtual function that returns the type handle of the resource container.</td></tr> |
| <!-- index=13 --> |
| |
| <tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_resource_base.Read-only_Interface" >Read-only Interface</a></td><td class=SDescription></td></tr> |
| <!-- index=14 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_resource_base.set_read_only" id=link21 onMouseOver="ShowTip(event, 'tt15', 'link21')" onMouseOut="HideTip('tt15')">set_read_only</a></td><td class=SDescription>Establishes this resource as a read-only resource. </td></tr> |
| <!-- index=15 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource_base.is_read_only" id=link22 onMouseOver="ShowTip(event, 'tt16', 'link22')" onMouseOut="HideTip('tt16')">is_read_only</a></td><td class=SDescription>Returns one if this resource has been set to read-only, zero otherwise</td></tr> |
| <!-- index=16 --> |
| |
| <tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_resource_base.Notification" >Notification</a></td><td class=SDescription></td></tr> |
| <!-- index=17 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_resource_base.wait_modified" id=link23 onMouseOver="ShowTip(event, 'tt17', 'link23')" onMouseOut="HideTip('tt17')">wait_modified</a></td><td class=SDescription>This task blocks until the resource has been modified -- that is, a <a href="#uvm_resource#(T).write" class=LMethod id=link24 onMouseOver="ShowTip(event, 'tt18', 'link24')" onMouseOut="HideTip('tt18')">uvm_resource#(T)::write</a> operation has been performed. </td></tr> |
| <!-- index=18 --> |
| |
| <tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_resource_base.Scope_Interface" >Scope Interface</a></td><td class=SDescription>Each resource has a name, a value and a set of scopes over which it is visible. </td></tr> |
| <!-- index=19 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource_base.set_scope" id=link25 onMouseOver="ShowTip(event, 'tt19', 'link25')" onMouseOut="HideTip('tt19')">set_scope</a></td><td class=SDescription>Set the value of the regular expression that identifies the set of scopes over which this resource is visible. </td></tr> |
| <!-- index=20 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_resource_base.get_scope" id=link26 onMouseOver="ShowTip(event, 'tt20', 'link26')" onMouseOut="HideTip('tt20')">get_scope</a></td><td class=SDescription>Retrieve the regular expression string that identifies the set of scopes over which this resource is visible.</td></tr> |
| <!-- index=21 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource_base.match_scope" id=link27 onMouseOver="ShowTip(event, 'tt21', 'link27')" onMouseOut="HideTip('tt21')">match_scope</a></td><td class=SDescription>Using the regular expression facility, determine if this resource is visible in a scope. </td></tr> |
| <!-- index=22 --> |
| |
| <tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_resource_base.Priority" >Priority</a></td><td class=SDescription>Functions for manipulating the search priority of resources. </td></tr> |
| <!-- index=23 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource_base.set_priority" >set priority</a></td><td class=SDescription>Change the search priority of the resource based on the value of the priority enum argument.</td></tr> |
| <!-- index=24 --> |
| |
| <tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_resource_base.Utility_Functions" >Utility Functions</a></td><td class=SDescription></td></tr> |
| <!-- index=25 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_resource_base.do_print" id=link28 onMouseOver="ShowTip(event, 'tt22', 'link28')" onMouseOut="HideTip('tt22')">do_print</a></td><td class=SDescription>Implementation of do_print which is called by print().</td></tr> |
| <!-- index=26 --> |
| |
| <tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_resource_base.Audit_Trail" >Audit Trail</a></td><td class=SDescription>To find out what is happening as the simulation proceeds, an audit trail of each read and write is kept. </td></tr> |
| <!-- index=27 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource_base.record_read_access" id=link29 onMouseOver="ShowTip(event, 'tt23', 'link29')" onMouseOut="HideTip('tt23')">record_read_access</a></td><td class=SDescription></td></tr> |
| <!-- index=28 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource_base.record_write_access" id=link30 onMouseOver="ShowTip(event, 'tt24', 'link30')" onMouseOut="HideTip('tt24')">record_write_access</a></td><td class=SDescription></td></tr> |
| <!-- index=29 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource_base.print_accessors" id=link31 onMouseOver="ShowTip(event, 'tt25', 'link31')" onMouseOut="HideTip('tt25')">print_accessors</a></td><td class=SDescription>Dump the access records for this resource</td></tr> |
| <!-- index=30 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_resource_base.init_access_record" id=link32 onMouseOver="ShowTip(event, 'tt26', 'link32')" onMouseOut="HideTip('tt26')">init_access_record</a></td><td class=SDescription>Initialize a new access record</td></tr></table></div></div><!--END_ND_SUMMARY--> |
| </div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=9 --> |
| <div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_base.precedence" href="../../src/base/uvm_resource.svh">precedence</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int unsigned precedence |
| </td></tr></table></blockquote><div class=CBody><p>This variable is used to associate a precedence that a resource has with respect to other resources which match the same scope and name. Resources are set to the <a href="#uvm_resource_base.default_precedence" class=LVariable id=link33 onMouseOver="ShowTip(event, 'tt12', 'link33')" onMouseOut="HideTip('tt12')">default_precedence</a> initially, and may be set to a higher or lower precedence as desired.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=10 --> |
| <div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_base.default_precedence" href="../../src/base/uvm_resource.svh">default_precedence</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>static int unsigned default_precedence = 1000 |
| </td></tr></table></blockquote><div class=CBody><p>The default precedence for an resource that has been created. When two resources have the same precedence, the first resource found has precedence.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=11 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_base.new" href="../../src/base/uvm_resource.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> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>name</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> "",</td> |
| </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>s</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> "*"</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=5>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>constructor for uvm_resource_base. The constructor takes two arguments, the name of the resource and a regular expression which represents the set of scopes over which this resource is visible.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=12 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_base.get_type_handle" href="../../src/base/uvm_resource.svh">get_type_handle</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>pure virtual function uvm_resource_base get_type_handle() |
| </td></tr></table></blockquote><div class=CBody><p>Pure virtual function that returns the type handle of the resource container.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=13 --> |
| <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_base.Read-only_Interface" href="../../src/base/uvm_resource.svh">Read-only Interface</a></h3></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=14 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_base.set_read_only" href="../../src/base/uvm_resource.svh">set_read_only</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function void set_read_only() |
| </td></tr></table></blockquote><div class=CBody><p>Establishes this resource as a read-only resource. An attempt to call <a href="#uvm_resource#(T).write" class=LMethod id=link34 onMouseOver="ShowTip(event, 'tt18', 'link34')" onMouseOut="HideTip('tt18')">uvm_resource#(T)::write</a> on the resource will cause an error.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=15 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_base.is_read_only" href="../../src/base/uvm_resource.svh">is_read_only</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function bit is_read_only() |
| </td></tr></table></blockquote><div class=CBody><p>Returns one if this resource has been set to read-only, zero otherwise</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=16 --> |
| <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_base.Notification" href="../../src/base/uvm_resource.svh">Notification</a></h3></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=17 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_base.wait_modified" href="../../src/base/uvm_resource.svh">wait_modified</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>task wait_modified() |
| </td></tr></table></blockquote><div class=CBody><p>This task blocks until the resource has been modified -- that is, a <a href="#uvm_resource#(T).write" class=LMethod id=link35 onMouseOver="ShowTip(event, 'tt18', 'link35')" onMouseOut="HideTip('tt18')">uvm_resource#(T)::write</a> operation has been performed. When a <a href="#uvm_resource#(T).write" class=LMethod id=link36 onMouseOver="ShowTip(event, 'tt18', 'link36')" onMouseOut="HideTip('tt18')">uvm_resource#(T)::write</a> is performed the modified bit is set which releases the block. Wait_modified() then clears the modified bit so it can be called repeatedly.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=18 --> |
| <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_base.Scope_Interface" href="../../src/base/uvm_resource.svh">Scope Interface</a></h3><div class=CBody><p>Each resource has a name, a value and a set of scopes over which it is visible. A scope is a hierarchical entity or a context. A scope name is a multi-element string that identifies a scope. Each element refers to a scope context and the elements are separated by dots (.).</p><blockquote><pre>top.env.agent.monitor</pre></blockquote><p>Consider the example above of a scope name. It consists of four elements: “top”, “env”, “agent”, and “monitor”. The elements are strung together with a dot separating each element. <i>top.env.agent</i> is the parent of <i>top.env.agent.monitor</i>, <i>top.env</i> is the parent of <i>top.env.agent</i>, and so on. A set of scopes can be represented by a set of scope name strings. A very straightforward way to represent a set of strings is to use regular expressions. A regular expression is a special string that contains placeholders which can be substituted in various ways to generate or recognize a particular set of strings. Here are a few simple examples:</p><blockquote><pre> top\..* all of the scopes whose top-level component |
| is top |
| top\.env\..*\.monitor all of the scopes in env that end in monitor; |
| i.e. all the monitors two levels down from env |
| .*\.monitor all of the scopes that end in monitor; i.e. |
| all the monitors (assuming a naming convention |
| was used where all monitors are named "monitor") |
| top\.u[1-5]\.* all of the scopes rooted and named u1, u2, u3,</pre></blockquote><p>u4, or u5, and any of their subscopes.</p><p>The examples above use POSIX regular expression notation. This is a very general and expressive notation. It is not always the case that so much expressiveness is required. Sometimes an expression syntax that is easy to read and easy to write is useful, even if the syntax is not as expressive as the full power of POSIX regular expressions. A popular substitute for regular expressions is globs. A glob is a simplified regular expression. It only has three metacharacters -- *, +, and ?. Character ranges are not allowed and dots are not a metacharacter in globs as they are in regular expressions. The following table shows glob metacharacters.</p><blockquote><pre>char meaning regular expression |
| equivalent |
| * 0 or more characters .* |
| + 1 or more characters .+ |
| ? exactly one character .</pre></blockquote><p>Of the examples above, the first three can easily be translated into globs. The last one cannot. It relies on notation that is not available in glob syntax.</p><blockquote><pre>regular expression glob equivalent |
| --------------------- ------------------ |
| top\..* top.* |
| top\.env\..*\.monitor top.env.*.monitor |
| .*\.monitor *.monitor</pre></blockquote><p>The resource facility supports both regular expression and glob syntax. Regular expressions are identified as such when they surrounded by ‘/’ characters. For example, <i>/^top\.*/</i> is interpreted as the regular expression <i>^top\.*</i>, where the surrounding ‘/’ characters have been removed. All other expressions are treated as glob expressions. They are converted from glob notation to regular expression notation internally. Regular expression compilation and matching as well as glob-to-regular expression conversion are handled by two DPI functions:</p><blockquote><pre>function int uvm_re_match(string re, string str); |
| function string uvm_glob_to_re(string glob);</pre></blockquote><p>uvm_re_match both compiles and matches the regular expression. All of the matching is done using regular expressions, so globs are converted to regular expressions and then processed.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=19 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_base.set_scope" href="../../src/base/uvm_resource.svh">set_scope</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 set_scope(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap width=100%>s</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Set the value of the regular expression that identifies the set of scopes over which this resource is visible. If the supplied argument is a glob it will be converted to a regular expression before it is stored.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=20 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_base.get_scope" href="../../src/base/uvm_resource.svh">get_scope</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function string get_scope() |
| </td></tr></table></blockquote><div class=CBody><p>Retrieve the regular expression string that identifies the set of scopes over which this resource is visible.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=21 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_base.match_scope" href="../../src/base/uvm_resource.svh">match_scope</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 bit match_scope(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap width=100%>s</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Using the regular expression facility, determine if this resource is visible in a scope. Return one if it is, zero otherwise.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=22 --> |
| <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_base.Priority" href="../../src/base/uvm_resource.svh">Priority</a></h3><div class=CBody><p>Functions for manipulating the search priority of resources. The function definitions here are pure virtual and are implemented in derived classes. The definitons serve as a priority management interface.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=23 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_base.set_priority" href="../../src/base/uvm_resource.svh">set priority</a></h3><div class=CBody><p>Change the search priority of the resource based on the value of the priority enum argument.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=24 --> |
| <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_base.Utility_Functions" href="../../src/base/uvm_resource.svh">Utility Functions</a></h3></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=25 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_base.do_print" href="../../src/base/uvm_resource.svh">do_print</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 do_print (</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_printer </td> |
| <td class=PParameter nowrap width=100%>printer</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Implementation of do_print which is called by print().</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=26 --> |
| <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_base.Audit_Trail" href="../../src/base/uvm_resource.svh">Audit Trail</a></h3><div class=CBody><p>To find out what is happening as the simulation proceeds, an audit trail of each read and write is kept. The <a href="#uvm_resource#(T).read" class=LMethod id=link37 onMouseOver="ShowTip(event, 'tt27', 'link37')" onMouseOut="HideTip('tt27')">uvm_resource#(T)::read</a> and <a href="#uvm_resource#(T).write" class=LMethod id=link38 onMouseOver="ShowTip(event, 'tt18', 'link38')" onMouseOut="HideTip('tt18')">uvm_resource#(T)::write</a> methods each take an accessor argument. This is a handle to the object that performed that resource access.</p><blockquote><pre>function T read(uvm_object accessor = null); |
| function void write(T t, uvm_object accessor = null);</pre></blockquote><p>The accessor can by anything as long as it is derived from uvm_object. The accessor object can be a component or a sequence or whatever object from which a read or write was invoked. Typically the <i>this</i> handle is used as the accessor. For example:</p><blockquote><pre>uvm_resource#(int) rint; |
| int i; |
| ... |
| rint.write(7, this); |
| i = rint.read(this);</pre></blockquote><p>The accessor’s <i>get_full_name()</i> is stored as part of the audit trail. This way you can find out what object performed each resource access. Each audit record also includes the time of the access (simulation time) and the particular operation performed (read or write).</p><p>Auditing is controlled through the <a href="#uvm_resource_options" class=LClass id=link39 onMouseOver="ShowTip(event, 'tt5', 'link39')" onMouseOut="HideTip('tt5')">uvm_resource_options</a> class.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=27 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_base.record_read_access" href="../../src/base/uvm_resource.svh">record_read_access</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 record_read_access(</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_object </td> |
| <td class=PParameter nowrap>accessor</td> |
| <td class=PDefaultValuePrefix> = </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></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=28 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_base.record_write_access" href="../../src/base/uvm_resource.svh">record_write_access</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 record_write_access(</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_object </td> |
| <td class=PParameter nowrap>accessor</td> |
| <td class=PDefaultValuePrefix> = </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></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=29 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_base.print_accessors" href="../../src/base/uvm_resource.svh">print_accessors</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function void print_accessors() |
| </td></tr></table></blockquote><div class=CBody><p>Dump the access records for this resource</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=30 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_base.init_access_record" href="../../src/base/uvm_resource.svh">init_access_record</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 init_access_record (</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap>inout uvm_resource_types::</td> |
| <td class=PType nowrap>access_t </td> |
| <td class=PParameter nowrap width=100%>access_record</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=4>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Initialize a new access record</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=31 --> |
| <div class="CClass"><div class=CTopic><h2 class=CTitle><a name="uvm_resource_pool" href="../../src/base/uvm_resource.svh">uvm_resource_pool</a></h2><div class=CBody><p>The global (singleton) resource database.</p><p>Each resource is stored both by primary name and by type handle. The resource pool contains two associative arrays, one with name as the key and one with the type handle as the key. Each associative array contains a queue of resources. Each resource has a regular expression that represents the set of scopes over which it is visible.</p><blockquote><pre>+------+------------+ +------------+------+ |
| | name | rsrc queue | | rsrc queue | type | |
| +------+------------+ +------------+------+ |
| | | | | | | |
| +------+------------+ +-+-+ +------------+------+ |
| | | | | | |<--+---* | T | |
| +------+------------+ +-+-+ +-+-+ +------------+------+ |
| | A | *---+-->| | | | | | | |
| +------+------------+ +-+-+ | +------------+------+ |
| | | | | | | | | |
| +------+------------+ +-------+ +-+ +------------+------+ |
| | | | | | | | | |
| +------+------------+ | | +------------+------+ |
| | | | V V | | | |
| +------+------------+ +------+ +------------+------+ |
| | | | | rsrc | | | | |
| +------+------------+ +------+ +------------+------+</pre></blockquote><p>The above diagrams illustrates how a resource whose name is A and type is T is stored in the pool. The pool contains an entry in the type map for type T and an entry in the name map for name A. The queues in each of the arrays each contain an entry for the resource A whose type is T. The name map can contain in its queue other resources whose name is A which may or may not have the same type as our resource A. Similarly, the type map can contain in its queue other resources whose type is T and whose name may or may not be A.</p><p>Resources are added to the pool by calling <a href="#uvm_resource_pool.set" class=LMethod id=link63 onMouseOver="ShowTip(event, 'tt30', 'link63')" onMouseOut="HideTip('tt30')">set</a>; they are retrieved from the pool by calling <a href="#uvm_resource_pool.get_by_name" class=LMethod id=link64 onMouseOver="ShowTip(event, 'tt38', 'link64')" onMouseOut="HideTip('tt38')">get_by_name</a> or <a href="#uvm_resource_pool.get_by_type" class=LMethod id=link65 onMouseOver="ShowTip(event, 'tt40', 'link65')" onMouseOut="HideTip('tt40')">get_by_type</a>. When an object creates a new resource and calls <a href="#uvm_resource_pool.set" class=LMethod id=link66 onMouseOver="ShowTip(event, 'tt30', 'link66')" onMouseOut="HideTip('tt30')">set</a> the resource is made available to be retrieved by other objects outside of itself; an object gets a resource when it wants to access a resource not currently available in its scope.</p><p>The scope is stored in the resource itself (not in the pool) so whether you get by name or by type the resource’s visibility is the same.</p><p>As an auditing capability, the pool contains a history of gets. A record of each get, whether by <a href="#uvm_resource_pool.get_by_type" class=LMethod id=link67 onMouseOver="ShowTip(event, 'tt40', 'link67')" onMouseOut="HideTip('tt40')">get_by_type</a> or <a href="#uvm_resource_pool.get_by_name" class=LMethod id=link68 onMouseOver="ShowTip(event, 'tt38', 'link68')" onMouseOut="HideTip('tt38')">get_by_name</a>, is stored in the audit record. Both successful and failed gets are recorded. At the end of simulation, or any time for that matter, you can dump the history list. This will tell which resources were successfully located and which were not. You can use this information to determine if there is some error in name, type, or scope that has caused a resource to not be located or to be incorrectly located (i.e. the wrong resource is located).</p> |
| |
| <!--START_ND_SUMMARY index=31--> |
| <div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable> |
| <!-- index=31 --> |
| |
| <tr class="SClass"><td colspan=2 class=SEntry><a href="#uvm_resource_pool" id=link40 onMouseOver="ShowTip(event, 'tt3', 'link40')" onMouseOut="HideTip('tt3')">uvm_resource_pool</a></td></tr> |
| <tr class=SMain><td colspan=2 class=SWideDescription>The global (singleton) resource database.</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_resource_pool |
| </td></tr></table></blockquote></td></tr> |
| |
| <!-- index=32 --> |
| |
| <tr class="SMethod SIndent1 SMarked"><td class=SEntry><a href="#uvm_resource_pool.get" id=link41 onMouseOver="ShowTip(event, 'tt28', 'link41')" onMouseOut="HideTip('tt28')">get</a></td><td class=SDescription>Returns the singleton handle to the resource pool</td></tr> |
| <!-- index=33 --> |
| |
| <tr class="SMethod SIndent1"><td class=SEntry><a href="#uvm_resource_pool.spell_check" id=link42 onMouseOver="ShowTip(event, 'tt29', 'link42')" onMouseOut="HideTip('tt29')">spell_check</a></td><td class=SDescription>Invokes the spell checker for a string s. </td></tr> |
| <!-- index=34 --> |
| |
| <tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_resource_pool.Set" >Set</a></td><td class=SDescription></td></tr> |
| <!-- index=35 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_resource_pool.set" id=link43 onMouseOver="ShowTip(event, 'tt30', 'link43')" onMouseOut="HideTip('tt30')">set</a></td><td class=SDescription>Add a new resource to the resource pool. </td></tr> |
| <!-- index=36 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource_pool.set_override" id=link44 onMouseOver="ShowTip(event, 'tt31', 'link44')" onMouseOut="HideTip('tt31')">set_override</a></td><td class=SDescription>The resource provided as an argument will be entered into the pool and will override both by name and type.</td></tr> |
| <!-- index=37 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_resource_pool.set_name_override" id=link45 onMouseOver="ShowTip(event, 'tt32', 'link45')" onMouseOut="HideTip('tt32')">set_name_override</a></td><td class=SDescription>The resource provided as an argument will entered into the pool using normal precedence in the type map and will override the name.</td></tr> |
| <!-- index=38 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource_pool.set_type_override" id=link46 onMouseOver="ShowTip(event, 'tt33', 'link46')" onMouseOut="HideTip('tt33')">set_type_override</a></td><td class=SDescription>The resource provided as an argument will be entered into the pool using normal precedence in the name map and will override the type.</td></tr> |
| <!-- index=39 --> |
| |
| <tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_resource_pool.Lookup" >Lookup</a></td><td class=SDescription>This group of functions is for finding resources in the resource database.</td></tr> |
| <!-- index=40 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource_pool.lookup_name" id=link47 onMouseOver="ShowTip(event, 'tt34', 'link47')" onMouseOut="HideTip('tt34')">lookup_name</a></td><td class=SDescription>Lookup resources by <i>name</i>. </td></tr> |
| <!-- index=41 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_resource_pool.get_highest_precedence" id=link48 onMouseOver="ShowTip(event, 'tt35', 'link48')" onMouseOut="HideTip('tt35')">get_highest_precedence</a></td><td class=SDescription>Traverse a queue, <i>q</i>, of resources and return the one with the highest precedence. </td></tr> |
| <!-- index=42 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource_pool.sort_by_precedence" id=link49 onMouseOver="ShowTip(event, 'tt36', 'link49')" onMouseOut="HideTip('tt36')">sort_by_precedence</a></td><td class=SDescription>Given a list of resources, obtained for example from <a href="#uvm_resource_pool.lookup_scope" class=LMethod id=link50 onMouseOver="ShowTip(event, 'tt37', 'link50')" onMouseOut="HideTip('tt37')">lookup_scope</a>, sort the resources in precedence order. </td></tr> |
| <!-- index=43 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_resource_pool.get_by_name" id=link51 onMouseOver="ShowTip(event, 'tt38', 'link51')" onMouseOut="HideTip('tt38')">get_by_name</a></td><td class=SDescription>Lookup a resource by <i>name</i>, <i>scope</i>, and <i>type_handle</i>. </td></tr> |
| <!-- index=44 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource_pool.lookup_type" id=link52 onMouseOver="ShowTip(event, 'tt39', 'link52')" onMouseOut="HideTip('tt39')">lookup_type</a></td><td class=SDescription>Lookup resources by type. </td></tr> |
| <!-- index=45 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_resource_pool.get_by_type" id=link53 onMouseOver="ShowTip(event, 'tt40', 'link53')" onMouseOut="HideTip('tt40')">get_by_type</a></td><td class=SDescription>Lookup a resource by <i>type_handle</i> and <i>scope</i>. </td></tr> |
| <!-- index=46 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource_pool.lookup_regex_names" id=link54 onMouseOver="ShowTip(event, 'tt41', 'link54')" onMouseOut="HideTip('tt41')">lookup_regex_names</a></td><td class=SDescription>This utility function answers the question, for a given <i>name</i>, <i>scope</i>, and <i>type_handle</i>, what are all of the resources with requested name, a matching scope (where the resource scope may be a regular expression), and a matching type? </td></tr> |
| <!-- index=47 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_resource_pool.lookup_regex" id=link55 onMouseOver="ShowTip(event, 'tt42', 'link55')" onMouseOut="HideTip('tt42')">lookup_regex</a></td><td class=SDescription>Looks for all the resources whose name matches the regular expression argument and whose scope matches the current scope.</td></tr> |
| <!-- index=48 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource_pool.lookup_scope" id=link56 onMouseOver="ShowTip(event, 'tt37', 'link56')" onMouseOut="HideTip('tt37')">lookup_scope</a></td><td class=SDescription>This is a utility function that answers the question: For a given <i>scope</i>, what resources are visible to it? </td></tr> |
| <!-- index=49 --> |
| |
| <tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_resource_pool.Set_Priority" >Set Priority</a></td><td class=SDescription>Functions for altering the search priority of resources. </td></tr> |
| <!-- index=50 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource_pool.set_priority_type" id=link57 onMouseOver="ShowTip(event, 'tt43', 'link57')" onMouseOut="HideTip('tt43')">set_priority_type</a></td><td class=SDescription>Change the priority of the <i>rsrc</i> based on the value of <i>pri</i>, the priority enum argument. </td></tr> |
| <!-- index=51 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_resource_pool.set_priority_name" id=link58 onMouseOver="ShowTip(event, 'tt44', 'link58')" onMouseOut="HideTip('tt44')">set_priority_name</a></td><td class=SDescription>Change the priority of the <i>rsrc</i> based on the value of <i>pri</i>, the priority enum argument. </td></tr> |
| <!-- index=52 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource_pool.set_priority" id=link59 onMouseOver="ShowTip(event, 'tt45', 'link59')" onMouseOut="HideTip('tt45')">set_priority</a></td><td class=SDescription>Change the search priority of the <i>rsrc</i> based on the value of <i>pri</i>, the priority enum argument. </td></tr> |
| <!-- index=53 --> |
| |
| <tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_resource_pool.Debug" >Debug</a></td><td class=SDescription></td></tr> |
| <!-- index=54 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_resource_pool.find_unused_resources" id=link60 onMouseOver="ShowTip(event, 'tt46', 'link60')" onMouseOut="HideTip('tt46')">find_unused_resources</a></td><td class=SDescription>Locate all the resources that have at least one write and no reads</td></tr> |
| <!-- index=55 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource_pool.print_resources" id=link61 onMouseOver="ShowTip(event, 'tt47', 'link61')" onMouseOut="HideTip('tt47')">print_resources</a></td><td class=SDescription>Print the resources that are in a single queue, <i>rq</i>. </td></tr> |
| <!-- index=56 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_resource_pool.dump" id=link62 onMouseOver="ShowTip(event, 'tt48', 'link62')" onMouseOut="HideTip('tt48')">dump</a></td><td class=SDescription>dump the entire resource pool. </td></tr></table></div></div><!--END_ND_SUMMARY--> |
| </div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=32 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.get" href="../../src/base/uvm_resource.svh">get</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>static function uvm_resource_pool get() |
| </td></tr></table></blockquote><div class=CBody><p>Returns the singleton handle to the resource pool</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=33 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.spell_check" href="../../src/base/uvm_resource.svh">spell_check</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 bit spell_check(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap width=100%>s</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Invokes the spell checker for a string s. The universe of correctly spelled strings -- i.e. the dictionary -- is the name map.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=34 --> |
| <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.Set" href="../../src/base/uvm_resource.svh">Set</a></h3></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=35 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.set" href="../../src/base/uvm_resource.svh">set</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=6>function void set (</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap></td> |
| <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap>rsrc,</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PTypePrefix nowrap>uvm_resource_types::</td> |
| <td class=PType nowrap>override_t </td> |
| <td class=PParameter nowrap>override</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> 0</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=6>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Add a new resource to the resource pool. The resource is inserted into both the name map and type map so it can be located by either.</p><p>An object creates a resources and <i>sets</i> it into the resource pool. Later, other objects that want to access the resource must <i>get</i> it from the pool</p><p>Overrides can be specified using this interface. Either a name override, a type override or both can be specified. If an override is specified then the resource is entered at the front of the queue instead of at the back. It is not recommended that users specify the override parameter directly, rather they use the <a href="#uvm_resource_pool.set_override" class=LMethod id=link69 onMouseOver="ShowTip(event, 'tt31', 'link69')" onMouseOut="HideTip('tt31')">set_override</a>, <a href="#uvm_resource_pool.set_name_override" class=LMethod id=link70 onMouseOver="ShowTip(event, 'tt32', 'link70')" onMouseOut="HideTip('tt32')">set_name_override</a>, or <a href="#uvm_resource_pool.set_type_override" class=LMethod id=link71 onMouseOver="ShowTip(event, 'tt33', 'link71')" onMouseOut="HideTip('tt33')">set_type_override</a> functions.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=36 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.set_override" href="../../src/base/uvm_resource.svh">set_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 colspan=3>function void set_override(</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap width=100%>rsrc</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>The resource provided as an argument will be entered into the pool and will override both by name and type.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=37 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.set_name_override" href="../../src/base/uvm_resource.svh">set_name_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 colspan=3>function void set_name_override(</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap width=100%>rsrc</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>The resource provided as an argument will entered into the pool using normal precedence in the type map and will override the name.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=38 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.set_type_override" href="../../src/base/uvm_resource.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 colspan=3>function void set_type_override(</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap width=100%>rsrc</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>The resource provided as an argument will be entered into the pool using normal precedence in the name map and will override the type.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=39 --> |
| <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.Lookup" href="../../src/base/uvm_resource.svh">Lookup</a></h3><div class=CBody><p>This group of functions is for finding resources in the resource database.</p><p><a href="#uvm_resource_pool.lookup_name" class=LMethod id=link72 onMouseOver="ShowTip(event, 'tt34', 'link72')" onMouseOut="HideTip('tt34')">lookup_name</a> and <a href="#uvm_resource_pool.lookup_type" class=LMethod id=link73 onMouseOver="ShowTip(event, 'tt39', 'link73')" onMouseOut="HideTip('tt39')">lookup_type</a> locate the set of resources that matches the name or type (respectively) and is visible in the current scope. These functions return a queue of resources.</p><p><a href="#uvm_resource_pool.get_highest_precedence" class=LMethod id=link74 onMouseOver="ShowTip(event, 'tt35', 'link74')" onMouseOut="HideTip('tt35')">get_highest_precedence</a> traverse a queue of resources and returns the one with the highest precedence -- i.e. the one whose precedence member has the highest value.</p><p><a href="#uvm_resource_pool.get_by_name" class=LMethod id=link75 onMouseOver="ShowTip(event, 'tt38', 'link75')" onMouseOut="HideTip('tt38')">get_by_name</a> and <a href="#uvm_resource_pool.get_by_type" class=LMethod id=link76 onMouseOver="ShowTip(event, 'tt40', 'link76')" onMouseOut="HideTip('tt40')">get_by_type</a> use <a href="#uvm_resource_pool.lookup_name" class=LMethod id=link77 onMouseOver="ShowTip(event, 'tt34', 'link77')" onMouseOut="HideTip('tt34')">lookup_name</a> and <a href="#uvm_resource_pool.lookup_type" class=LMethod id=link78 onMouseOver="ShowTip(event, 'tt39', 'link78')" onMouseOut="HideTip('tt39')">lookup_type</a> (respectively) and <a href="#uvm_resource_pool.get_highest_precedence" class=LMethod id=link79 onMouseOver="ShowTip(event, 'tt35', 'link79')" onMouseOut="HideTip('tt35')">get_highest_precedence</a> to find the resource with the highest priority that matches the other search criteria.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=40 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.lookup_name" href="../../src/base/uvm_resource.svh">lookup_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 colspan=5>function uvm_resource_types::rsrc_q_t lookup_name(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>scope</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> "",</td> |
| </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>name,</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap>type_handle</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> null,</td> |
| </tr><tr><td> </td> <td class=PType nowrap>bit </td> |
| <td class=PParameter nowrap>rpterr</td> |
| <td class=PDefaultValuePrefix> = </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>Lookup resources by <i>name</i>. Returns a queue of resources that match the <i>name</i>, <i>scope</i>, and <i>type_handle</i>. If no resources match the queue is returned empty. If <i>rpterr</i> is set then a warning is issued if no matches are found, and the spell checker is invoked on <i>name</i>. If <i>type_handle</i> is <i>null</i> then a type check is not made and resources are returned that match only <i>name</i> and <i>scope</i>.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=41 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.get_highest_precedence" href="../../src/base/uvm_resource.svh">get_highest_precedence</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 uvm_resource_base get_highest_precedence(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap>ref uvm_resource_types::</td> |
| <td class=PType nowrap>rsrc_q_t </td> |
| <td class=PParameter nowrap width=100%>q</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=4>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Traverse a queue, <i>q</i>, of resources and return the one with the highest precedence. In the case where there exists more than one resource with the highest precedence value, the first one that has that precedence will be the one that is returned.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=42 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.sort_by_precedence" href="../../src/base/uvm_resource.svh">sort_by_precedence</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>static function void sort_by_precedence(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap>ref uvm_resource_types::</td> |
| <td class=PType nowrap>rsrc_q_t </td> |
| <td class=PParameter nowrap width=100%>q</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=4>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Given a list of resources, obtained for example from <a href="#uvm_resource_pool.lookup_scope" class=LMethod id=link80 onMouseOver="ShowTip(event, 'tt37', 'link80')" onMouseOut="HideTip('tt37')">lookup_scope</a>, sort the resources in precedence order. The highest precedence resource will be first in the list and the lowest precedence will be last. Resources that have the same precedence and the same name will be ordered by most recently set first.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=43 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.get_by_name" href="../../src/base/uvm_resource.svh">get_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 colspan=5>function uvm_resource_base get_by_name(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>scope</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> "",</td> |
| </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>name,</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap>type_handle,</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PType nowrap>bit </td> |
| <td class=PParameter nowrap>rpterr</td> |
| <td class=PDefaultValuePrefix> = </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>Lookup a resource by <i>name</i>, <i>scope</i>, and <i>type_handle</i>. Whether the get succeeds or fails, save a record of the get attempt. The <i>rpterr</i> flag indicates whether to report errors or not. Essentially, it serves as a verbose flag. If set then the spell checker will be invoked and warnings about multiple resources will be produced.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=44 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.lookup_type" href="../../src/base/uvm_resource.svh">lookup_type</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_resource_types::rsrc_q_t lookup_type(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>scope</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> "",</td> |
| </tr><tr><td> </td> <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap>type_handle</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=5>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Lookup resources by type. Return a queue of resources that match the <i>type_handle</i> and <i>scope</i>. If no resources match then the returned queue is empty.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=45 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.get_by_type" href="../../src/base/uvm_resource.svh">get_by_type</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_resource_base get_by_type(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>scope</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> "",</td> |
| </tr><tr><td> </td> <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap>type_handle</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=5>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Lookup a resource by <i>type_handle</i> and <i>scope</i>. Insert a record into the get history list whether or not the get succeeded.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=46 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.lookup_regex_names" href="../../src/base/uvm_resource.svh">lookup_regex_names</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_resource_types::rsrc_q_t lookup_regex_names(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>scope,</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>name,</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap>type_handle</td> |
| <td class=PDefaultValuePrefix> = </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>This utility function answers the question, for a given <i>name</i>, <i>scope</i>, and <i>type_handle</i>, what are all of the resources with requested name, a matching scope (where the resource scope may be a regular expression), and a matching type? <i>name</i> and <i>scope</i> are explicit values.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=47 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.lookup_regex" href="../../src/base/uvm_resource.svh">lookup_regex</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 uvm_resource_types::rsrc_q_t lookup_regex(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap width=100%>re,</td> |
| </tr><tr><td> </td> <td class=PType nowrap> </td> |
| <td class=PParameter nowrap width=100%>scope</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Looks for all the resources whose name matches the regular expression argument and whose scope matches the current scope.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=48 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.lookup_scope" href="../../src/base/uvm_resource.svh">lookup_scope</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 uvm_resource_types::rsrc_q_t lookup_scope(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap width=100%>scope</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>This is a utility function that answers the question: For a given <i>scope</i>, what resources are visible to it? Locate all the resources that are visible to a particular scope. This operation could be quite expensive, as it has to traverse all of the resources in the database.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=49 --> |
| <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.Set_Priority" href="../../src/base/uvm_resource.svh">Set Priority</a></h3><div class=CBody><p>Functions for altering the search priority of resources. Resources are stored in queues in the type and name maps. When retrieving resources, either by type or by name, the resource queue is search from front to back. The first one that matches the search criteria is the one that is returned. The <i>set_priority</i> functions let you change the order in which resources are searched. For any particular resource, you can set its priority to UVM_HIGH, in which case the resource is moved to the front of the queue, or to UVM_LOW in which case the resource is moved to the back of the queue.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=50 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.set_priority_type" href="../../src/base/uvm_resource.svh">set_priority_type</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_priority_type(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap></td> |
| <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap width=100%>rsrc,</td> |
| </tr><tr><td> </td> <td class=PTypePrefix nowrap>uvm_resource_types::</td> |
| <td class=PType nowrap>priority_e </td> |
| <td class=PParameter nowrap width=100%>pri</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=4>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Change the priority of the <i>rsrc</i> based on the value of <i>pri</i>, the priority enum argument. This function changes the priority only in the type map, leaving the name map untouched.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=51 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.set_priority_name" href="../../src/base/uvm_resource.svh">set_priority_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 colspan=4>function void set_priority_name(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap></td> |
| <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap width=100%>rsrc,</td> |
| </tr><tr><td> </td> <td class=PTypePrefix nowrap>uvm_resource_types::</td> |
| <td class=PType nowrap>priority_e </td> |
| <td class=PParameter nowrap width=100%>pri</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=4>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Change the priority of the <i>rsrc</i> based on the value of <i>pri</i>, the priority enum argument. This function changes the priority only in the name map, leaving the type map untouched.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=52 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.set_priority" href="../../src/base/uvm_resource.svh">set_priority</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_priority (</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap></td> |
| <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap width=100%>rsrc,</td> |
| </tr><tr><td> </td> <td class=PTypePrefix nowrap>uvm_resource_types::</td> |
| <td class=PType nowrap>priority_e </td> |
| <td class=PParameter nowrap width=100%>pri</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=4>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Change the search priority of the <i>rsrc</i> based on the value of <i>pri</i>, the priority enum argument. This function changes the priority in both the name and type maps.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=53 --> |
| <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.Debug" href="../../src/base/uvm_resource.svh">Debug</a></h3></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=54 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.find_unused_resources" href="../../src/base/uvm_resource.svh">find_unused_resources</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function uvm_resource_types::rsrc_q_t find_unused_resources() |
| </td></tr></table></blockquote><div class=CBody><p>Locate all the resources that have at least one write and no reads</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=55 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.print_resources" href="../../src/base/uvm_resource.svh">print_resources</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=6>function void print_resources(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap>uvm_resource_types::</td> |
| <td class=PType nowrap>rsrc_q_t </td> |
| <td class=PParameter nowrap>rq,</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PTypePrefix nowrap></td> |
| <td class=PType nowrap>bit </td> |
| <td class=PParameter nowrap>audit</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> 0</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=6>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Print the resources that are in a single queue, <i>rq</i>. This is a utility function that can be used to print any collection of resources stored in a queue. The <i>audit</i> flag determines whether or not the audit trail is printed for each resource along with the name, value, and scope regular expression.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=56 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource_pool.dump" href="../../src/base/uvm_resource.svh">dump</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 dump(</td> </tr><tr><td> </td> <td class=PType nowrap>bit </td> |
| <td class=PParameter nowrap>audit</td> |
| <td class=PDefaultValuePrefix> = </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>dump the entire resource pool. The resource pool is traversed and each resource is printed. The utility function print_resources() is used to initiate the printing. If the <i>audit</i> bit is set then the audit trail is dumped for each resource.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=57 --> |
| <div class="CClass"><div class=CTopic><h2 class=CTitle><a name="uvm_resource#(T)" href="../../src/base/uvm_resource.svh">uvm_resource #(T)</a></h2><div class=CBody><p>Parameterized resource. Provides essential access methods to read from and write to the resource database.</p> |
| |
| <!--START_ND_SUMMARY index=57--> |
| <div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable> |
| <!-- index=57 --> |
| |
| <tr class="SClass"><td colspan=2 class=SEntry><a href="#uvm_resource#(T)" id=link84 onMouseOver="ShowTip(event, 'tt4', 'link84')" onMouseOut="HideTip('tt4')">uvm_resource #(T)</a></td></tr> |
| <tr class=SMain><td colspan=2 class=SWideDescription>Parameterized resource. </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=link81 onMouseOver="ShowTip(event, 'tt9', 'link81')" onMouseOut="HideTip('tt9')">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=link82 onMouseOver="ShowTip(event, 'tt10', 'link82')" onMouseOut="HideTip('tt10')">uvm_object</a></div></div></td></tr> |
| <tr><td><div class=CHParent><div class=CHEntry><a href="#uvm_resource_base" class=LClass id=link83 onMouseOver="ShowTip(event, 'tt2', 'link83')" onMouseOut="HideTip('tt2')">uvm_resource_base</a></div></div></td></tr> |
| <tr><td><div class=CHCurrent><div class=CHEntry>uvm_resource#(T)</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_resource #(</td> </tr><tr><td> </td> <td class=PType nowrap>type </td> |
| <td class=PParameter nowrap>T</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%>int</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=5>) extends uvm_resource_base</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| </td></tr> |
| |
| <!-- index=58 --> |
| |
| <tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_resource#(T).Type_Interface" >Type Interface</a></td><td class=SDescription>Resources can be identified by type using a static type handle. </td></tr> |
| <!-- index=59 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource#(T).get_type" id=link85 onMouseOver="ShowTip(event, 'tt49', 'link85')" onMouseOut="HideTip('tt49')">get_type</a></td><td class=SDescription>Static function that returns the static type handle. </td></tr> |
| <!-- index=60 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_resource#(T).get_type_handle" id=link86 onMouseOver="ShowTip(event, 'tt50', 'link86')" onMouseOut="HideTip('tt50')">get_type_handle</a></td><td class=SDescription>Returns the static type handle of this resource in a polymorphic fashion. </td></tr> |
| <!-- index=61 --> |
| |
| <tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_resource#(T).Set/Get_Interface" >Set/<span class=HB> </span>Get Interface</a></td><td class=SDescription>uvm_resource#(T) provides an interface for setting and getting a resources. </td></tr> |
| <!-- index=62 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource#(T).set" id=link87 onMouseOver="ShowTip(event, 'tt51', 'link87')" onMouseOut="HideTip('tt51')">set</a></td><td class=SDescription>Simply put this resource into the global resource pool</td></tr> |
| <!-- index=63 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_resource#(T).set_override" id=link88 onMouseOver="ShowTip(event, 'tt52', 'link88')" onMouseOut="HideTip('tt52')">set_override</a></td><td class=SDescription>Put a resource into the global resource pool as an override. </td></tr> |
| <!-- index=64 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource#(T).get_by_name" id=link89 onMouseOver="ShowTip(event, 'tt53', 'link89')" onMouseOut="HideTip('tt53')">get_by_name</a></td><td class=SDescription>looks up a resource by <i>name</i> in the name map. </td></tr> |
| <!-- index=65 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_resource#(T).get_by_type" id=link90 onMouseOver="ShowTip(event, 'tt54', 'link90')" onMouseOut="HideTip('tt54')">get_by_type</a></td><td class=SDescription>looks up a resource by <i>type_handle</i> in the type map. </td></tr> |
| <!-- index=66 --> |
| |
| <tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_resource#(T).Read/Write_Interface" >Read/<span class=HB> </span>Write Interface</a></td><td class=SDescription><a href="#uvm_resource#(T).read" class=LMethod id=link91 onMouseOver="ShowTip(event, 'tt27', 'link91')" onMouseOut="HideTip('tt27')">read</a> and <a href="#uvm_resource#(T).write" class=LMethod id=link92 onMouseOver="ShowTip(event, 'tt18', 'link92')" onMouseOut="HideTip('tt18')">write</a> provide a type-safe interface for getting and setting the object in the resource container. </td></tr> |
| <!-- index=67 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource#(T).read" id=link93 onMouseOver="ShowTip(event, 'tt27', 'link93')" onMouseOut="HideTip('tt27')">read</a></td><td class=SDescription>Return the object stored in the resource container. </td></tr> |
| <!-- index=68 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_resource#(T).write" id=link94 onMouseOver="ShowTip(event, 'tt18', 'link94')" onMouseOut="HideTip('tt18')">write</a></td><td class=SDescription>Modify the object stored in this resource container. </td></tr> |
| <!-- index=69 --> |
| |
| <tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_resource#(T).Priority" >Priority</a></td><td class=SDescription>Functions for manipulating the search priority of resources. </td></tr> |
| <!-- index=70 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_resource#(T).set_priority" >set priority</a></td><td class=SDescription>Change the search priority of the resource based on the value of the priority enum argument, <i>pri</i>.</td></tr> |
| <!-- index=71 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_resource#(T).get_highest_precedence" id=link95 onMouseOver="ShowTip(event, 'tt55', 'link95')" onMouseOut="HideTip('tt55')">get_highest_precedence</a></td><td class=SDescription>In a queue of resources, locate the first one with the highest precedence whose type is T. </td></tr></table></div></div><!--END_ND_SUMMARY--> |
| </div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=58 --> |
| <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_resource#(T).Type_Interface" href="../../src/base/uvm_resource.svh">Type Interface</a></h3><div class=CBody><p>Resources can be identified by type using a static type handle. The parent class provides the virtual function interface <a href="#uvm_resource#(T).get_type_handle" class=LMethod id=link96 onMouseOver="ShowTip(event, 'tt50', 'link96')" onMouseOut="HideTip('tt50')">get_type_handle</a>. Here we implement it by returning the static type handle.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=59 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource#(T).get_type" href="../../src/base/uvm_resource.svh">get_type</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>static function this_type get_type() |
| </td></tr></table></blockquote><div class=CBody><p>Static function that returns the static type handle. The return type is this_type, which is the type of the parameterized class.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=60 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource#(T).get_type_handle" href="../../src/base/uvm_resource.svh">get_type_handle</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function uvm_resource_base get_type_handle() |
| </td></tr></table></blockquote><div class=CBody><p>Returns the static type handle of this resource in a polymorphic fashion. The return type of get_type_handle() is uvm_resource_base. This function is not static and therefore can only be used by instances of a parameterized resource.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=61 --> |
| <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_resource#(T).Set/Get_Interface" href="../../src/base/uvm_resource.svh">Set/<span class=HB> </span>Get Interface</a></h3><div class=CBody><p>uvm_resource#(T) provides an interface for setting and getting a resources. Specifically, a resource can insert itself into the resource pool. It doesn’t make sense for a resource to get itself, since you can’t call a function on a handle you don’t have. However, a static get interface is provided as a convenience. This obviates the need for the user to get a handle to the global resource pool as this is done for him here.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=62 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource#(T).set" href="../../src/base/uvm_resource.svh">set</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function void set() |
| </td></tr></table></blockquote><div class=CBody><p>Simply put this resource into the global resource pool</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=63 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource#(T).set_override" href="../../src/base/uvm_resource.svh">set_override</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function void set_override( |
| </td></tr></table></blockquote><div class=CBody><p>Put a resource into the global resource pool as an override. This means it gets put at the head of the list and is searched before other existing resources that occupy the same position in the name map or the type map. The default is to override both the name and type maps. However, using the <i>override</i> argument you can specify that either the name map or type map is overridden.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=64 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource#(T).get_by_name" href="../../src/base/uvm_resource.svh">get_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 colspan=5>static function this_type get_by_name(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>scope,</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>name,</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PType nowrap>bit </td> |
| <td class=PParameter nowrap>rpterr</td> |
| <td class=PDefaultValuePrefix> = </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>looks up a resource by <i>name</i> in the name map. The first resource with the specified name, whose type is the current type, and is visible in the specified <i>scope</i> is returned, if one exists. The <i>rpterr</i> flag indicates whether or not an error should be reported if the search fails. If <i>rpterr</i> is set to one then a failure message is issued, including suggested spelling alternatives, based on resource names that exist in the database, gathered by the spell checker.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=65 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource#(T).get_by_type" href="../../src/base/uvm_resource.svh">get_by_type</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>static function this_type get_by_type(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>scope</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> "",</td> |
| </tr><tr><td> </td> <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap>type_handle</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=5>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>looks up a resource by <i>type_handle</i> in the type map. The first resource with the specified <i>type_handle</i> that is visible in the specified <i>scope</i> is returned, if one exists. If there is no resource matching the specifications, <i>null</i> is returned.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=66 --> |
| <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_resource#(T).Read/Write_Interface" href="../../src/base/uvm_resource.svh">Read/<span class=HB> </span>Write Interface</a></h3><div class=CBody><p><a href="#uvm_resource#(T).read" class=LMethod id=link97 onMouseOver="ShowTip(event, 'tt27', 'link97')" onMouseOut="HideTip('tt27')">read</a> and <a href="#uvm_resource#(T).write" class=LMethod id=link98 onMouseOver="ShowTip(event, 'tt18', 'link98')" onMouseOut="HideTip('tt18')">write</a> provide a type-safe interface for getting and setting the object in the resource container. The interface is type safe because the value argument for <a href="#uvm_resource#(T).write" class=LMethod id=link99 onMouseOver="ShowTip(event, 'tt18', 'link99')" onMouseOut="HideTip('tt18')">write</a> and the return value of <a href="#uvm_resource#(T).read" class=LMethod id=link100 onMouseOver="ShowTip(event, 'tt27', 'link100')" onMouseOut="HideTip('tt27')">read</a> are T, the type supplied in the class parameter. If either of these functions is used in an incorrect type context the compiler will complain.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=67 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource#(T).read" href="../../src/base/uvm_resource.svh">read</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 T read(</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_object </td> |
| <td class=PParameter nowrap>accessor</td> |
| <td class=PDefaultValuePrefix> = </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>Return the object stored in the resource container. If an <i>accessor</i> object is supplied then also update the accessor record for this resource.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=68 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource#(T).write" href="../../src/base/uvm_resource.svh">write</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 write(</td> </tr><tr><td> </td> <td class=PType nowrap>T </td> |
| <td class=PParameter nowrap>t,</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PType nowrap>uvm_object </td> |
| <td class=PParameter nowrap>accessor</td> |
| <td class=PDefaultValuePrefix> = </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>Modify the object stored in this resource container. If the resource is read-only then issue an error message and return without modifying the object in the container. If the resource is not read-only and an <i>accessor</i> object has been supplied then also update the accessor record. Lastly, replace the object value in the container with the value supplied as the argument, <i>t</i>, and release any processes blocked on <a href="#uvm_resource_base.wait_modified" class=LMethod id=link101 onMouseOver="ShowTip(event, 'tt17', 'link101')" onMouseOut="HideTip('tt17')">uvm_resource_base::wait_modified</a>. If the value to be written is the same as the value already present in the resource then the write is not done. That also means that the accessor record is not updated and the modified bit is not set.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=69 --> |
| <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_resource#(T).Priority" href="../../src/base/uvm_resource.svh">Priority</a></h3><div class=CBody><p>Functions for manipulating the search priority of resources. These implementations of the interface defined in the base class delegate to the resource pool.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=70 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource#(T).set_priority" href="../../src/base/uvm_resource.svh">set priority</a></h3><div class=CBody><p>Change the search priority of the resource based on the value of the priority enum argument, <i>pri</i>.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=71 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_resource#(T).get_highest_precedence" href="../../src/base/uvm_resource.svh">get_highest_precedence</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>static function this_type get_highest_precedence(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap>ref uvm_resource_types::</td> |
| <td class=PType nowrap>rsrc_q_t </td> |
| <td class=PParameter nowrap width=100%>q</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=4>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>In a queue of resources, locate the first one with the highest precedence whose type is T. This function is static so that it can be called from anywhere.</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>class uvm_resource_types |
| </td></tr></table></blockquote>Provides typedefs and enums used throughout the resources facility. </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_resource_base extends uvm_object |
| </td></tr></table></blockquote>Non-parameterized base class for resources. </div></div><div class=CToolTip id="tt3"><div class=CClass> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>class uvm_resource_pool |
| </td></tr></table></blockquote>The global (singleton) resource database.</div></div><div class=CToolTip id="tt4"><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 uvm_resource #(</td> </tr><tr><td> </td> <td class=PType nowrap>type </td> |
| <td class=PParameter nowrap>T</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%>int</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=5>) extends uvm_resource_base</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Parameterized resource. </div></div><div class=CToolTip id="tt5"><div class=CClass>Provides a namespace for managing options for the resources facility. </div></div><div class=CToolTip id="tt6"><div class=CMethod> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>static function void turn_on_auditing() |
| </td></tr></table></blockquote>Turn auditing on for the resource database. </div></div><div class=CToolTip id="tt7"><div class=CMethod> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>static function void turn_off_auditing() |
| </td></tr></table></blockquote>Turn auditing off for the resource database. </div></div><div class=CToolTip id="tt8"><div class=CMethod> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>static function bit is_auditing() |
| </td></tr></table></blockquote>Returns 1 if the auditing facility is on and 0 if it is off.</div></div><div class=CToolTip id="tt9"><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="tt10"><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="tt11"><div class=CVariable> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int unsigned precedence |
| </td></tr></table></blockquote>This variable is used to associate a precedence that a resource has with respect to other resources which match the same scope and name. </div></div><div class=CToolTip id="tt12"><div class=CVariable> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>static int unsigned default_precedence = 1000 |
| </td></tr></table></blockquote>The default precedence for an resource that has been created. </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 colspan=5>function new(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>name</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> "",</td> |
| </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>s</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> "*"</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=5>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| constructor for uvm_resource_base. </div></div><div class=CToolTip id="tt14"><div class=CMethod> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>pure virtual function uvm_resource_base get_type_handle() |
| </td></tr></table></blockquote>Pure virtual function that returns the type handle of the resource container.</div></div><div class=CToolTip id="tt15"><div class=CMethod> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function void set_read_only() |
| </td></tr></table></blockquote>Establishes this resource as a read-only resource. </div></div><div class=CToolTip id="tt16"><div class=CMethod> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function bit is_read_only() |
| </td></tr></table></blockquote>Returns one if this resource has been set to read-only, zero otherwise</div></div><div class=CToolTip id="tt17"><div class=CMethod> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>task wait_modified() |
| </td></tr></table></blockquote>This task blocks until the resource has been modified -- that is, a uvm_resource#(T)::write operation has been performed. </div></div><div class=CToolTip id="tt18"><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 write(</td> </tr><tr><td> </td> <td class=PType nowrap>T </td> |
| <td class=PParameter nowrap>t,</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PType nowrap>uvm_object </td> |
| <td class=PParameter nowrap>accessor</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> null</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=5>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Modify the object stored in this resource container. </div></div><div class=CToolTip id="tt19"><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 set_scope(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap width=100%>s</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Set the value of the regular expression that identifies the set of scopes over which this resource is visible. </div></div><div class=CToolTip id="tt20"><div class=CMethod> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function string get_scope() |
| </td></tr></table></blockquote>Retrieve the regular expression string that identifies the set of scopes over which this resource is visible.</div></div><div class=CToolTip id="tt21"><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 bit match_scope(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap width=100%>s</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Using the regular expression facility, determine if this resource is visible in a scope. </div></div><div class=CToolTip id="tt22"><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 do_print (</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_printer </td> |
| <td class=PParameter nowrap width=100%>printer</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Implementation of do_print which is called by print().</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 colspan=5>function void record_read_access(</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_object </td> |
| <td class=PParameter nowrap>accessor</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> null</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=5>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| </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 colspan=5>function void record_write_access(</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_object </td> |
| <td class=PParameter nowrap>accessor</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> null</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=5>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| </div></div><div class=CToolTip id="tt25"><div class=CMethod> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function void print_accessors() |
| </td></tr></table></blockquote>Dump the access records for this resource</div></div><div class=CToolTip id="tt26"><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 init_access_record (</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap>inout uvm_resource_types::</td> |
| <td class=PType nowrap>access_t </td> |
| <td class=PParameter nowrap width=100%>access_record</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=4>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Initialize a new access record</div></div><div class=CToolTip id="tt27"><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 T read(</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_object </td> |
| <td class=PParameter nowrap>accessor</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> null</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=5>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Return the object stored in the resource container. </div></div><div class=CToolTip id="tt28"><div class=CMethod> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>static function uvm_resource_pool get() |
| </td></tr></table></blockquote>Returns the singleton handle to the resource pool</div></div><div class=CToolTip id="tt29"><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 bit spell_check(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap width=100%>s</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Invokes the spell checker for a string s. </div></div><div class=CToolTip id="tt30"><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=6>function void set (</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap></td> |
| <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap>rsrc,</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PTypePrefix nowrap>uvm_resource_types::</td> |
| <td class=PType nowrap>override_t </td> |
| <td class=PParameter nowrap>override</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> 0</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=6>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Add a new resource to the resource pool. </div></div><div class=CToolTip id="tt31"><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 set_override(</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap width=100%>rsrc</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| The resource provided as an argument will be entered into the pool and will override both by name and type.</div></div><div class=CToolTip id="tt32"><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 set_name_override(</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap width=100%>rsrc</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| The resource provided as an argument will entered into the pool using normal precedence in the type map and will override the name.</div></div><div class=CToolTip id="tt33"><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 set_type_override(</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap width=100%>rsrc</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| The resource provided as an argument will be entered into the pool using normal precedence in the name map and will override the type.</div></div><div class=CToolTip id="tt34"><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_resource_types::rsrc_q_t lookup_name(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>scope</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> "",</td> |
| </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>name,</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap>type_handle</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> null,</td> |
| </tr><tr><td> </td> <td class=PType nowrap>bit </td> |
| <td class=PParameter nowrap>rpterr</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> 1</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=5>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Lookup resources by <i>name</i>. </div></div><div class=CToolTip id="tt35"><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 uvm_resource_base get_highest_precedence(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap>ref uvm_resource_types::</td> |
| <td class=PType nowrap>rsrc_q_t </td> |
| <td class=PParameter nowrap width=100%>q</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=4>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Traverse a queue, <i>q</i>, of resources and return the one with the highest precedence. </div></div><div class=CToolTip id="tt36"><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>static function void sort_by_precedence(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap>ref uvm_resource_types::</td> |
| <td class=PType nowrap>rsrc_q_t </td> |
| <td class=PParameter nowrap width=100%>q</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=4>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Given a list of resources, obtained for example from lookup_scope, sort the resources in precedence order. </div></div><div class=CToolTip id="tt37"><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 uvm_resource_types::rsrc_q_t lookup_scope(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap width=100%>scope</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| This is a utility function that answers the question: For a given <i>scope</i>, what resources are visible to it? </div></div><div class=CToolTip id="tt38"><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_resource_base get_by_name(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>scope</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> "",</td> |
| </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>name,</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap>type_handle,</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PType nowrap>bit </td> |
| <td class=PParameter nowrap>rpterr</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> 1</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=5>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Lookup a resource by <i>name</i>, <i>scope</i>, and <i>type_handle</i>. </div></div><div class=CToolTip id="tt39"><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_resource_types::rsrc_q_t lookup_type(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>scope</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> "",</td> |
| </tr><tr><td> </td> <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap>type_handle</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=5>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Lookup resources by type. </div></div><div class=CToolTip id="tt40"><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_resource_base get_by_type(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>scope</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> "",</td> |
| </tr><tr><td> </td> <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap>type_handle</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=5>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Lookup a resource by <i>type_handle</i> and <i>scope</i>. </div></div><div class=CToolTip id="tt41"><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_resource_types::rsrc_q_t lookup_regex_names(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>scope,</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>name,</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap>type_handle</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> null</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=5>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| This utility function answers the question, for a given <i>name</i>, <i>scope</i>, and <i>type_handle</i>, what are all of the resources with requested name, a matching scope (where the resource scope may be a regular expression), and a matching type? </div></div><div class=CToolTip id="tt42"><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 uvm_resource_types::rsrc_q_t lookup_regex(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap width=100%>re,</td> |
| </tr><tr><td> </td> <td class=PType nowrap> </td> |
| <td class=PParameter nowrap width=100%>scope</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Looks for all the resources whose name matches the regular expression argument and whose scope matches the current scope.</div></div><div class=CToolTip id="tt43"><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_priority_type(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap></td> |
| <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap width=100%>rsrc,</td> |
| </tr><tr><td> </td> <td class=PTypePrefix nowrap>uvm_resource_types::</td> |
| <td class=PType nowrap>priority_e </td> |
| <td class=PParameter nowrap width=100%>pri</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=4>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Change the priority of the <i>rsrc</i> based on the value of <i>pri</i>, the priority enum argument. </div></div><div class=CToolTip id="tt44"><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_priority_name(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap></td> |
| <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap width=100%>rsrc,</td> |
| </tr><tr><td> </td> <td class=PTypePrefix nowrap>uvm_resource_types::</td> |
| <td class=PType nowrap>priority_e </td> |
| <td class=PParameter nowrap width=100%>pri</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=4>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Change the priority of the <i>rsrc</i> based on the value of <i>pri</i>, the priority enum argument. </div></div><div class=CToolTip id="tt45"><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_priority (</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap></td> |
| <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap width=100%>rsrc,</td> |
| </tr><tr><td> </td> <td class=PTypePrefix nowrap>uvm_resource_types::</td> |
| <td class=PType nowrap>priority_e </td> |
| <td class=PParameter nowrap width=100%>pri</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=4>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Change the search priority of the <i>rsrc</i> based on the value of <i>pri</i>, the priority enum argument. </div></div><div class=CToolTip id="tt46"><div class=CMethod> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function uvm_resource_types::rsrc_q_t find_unused_resources() |
| </td></tr></table></blockquote>Locate all the resources that have at least one write and no reads</div></div><div class=CToolTip id="tt47"><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=6>function void print_resources(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap>uvm_resource_types::</td> |
| <td class=PType nowrap>rsrc_q_t </td> |
| <td class=PParameter nowrap>rq,</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PTypePrefix nowrap></td> |
| <td class=PType nowrap>bit </td> |
| <td class=PParameter nowrap>audit</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> 0</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=6>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Print the resources that are in a single queue, <i>rq</i>. </div></div><div class=CToolTip id="tt48"><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 dump(</td> </tr><tr><td> </td> <td class=PType nowrap>bit </td> |
| <td class=PParameter nowrap>audit</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> 0</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=5>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| dump the entire resource pool. </div></div><div class=CToolTip id="tt49"><div class=CMethod> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>static function this_type get_type() |
| </td></tr></table></blockquote>Static function that returns the static type handle. </div></div><div class=CToolTip id="tt50"><div class=CMethod> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function uvm_resource_base get_type_handle() |
| </td></tr></table></blockquote>Returns the static type handle of this resource in a polymorphic fashion. </div></div><div class=CToolTip id="tt51"><div class=CMethod> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function void set() |
| </td></tr></table></blockquote>Simply put this resource into the global resource pool</div></div><div class=CToolTip id="tt52"><div class=CMethod> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function void set_override( |
| </td></tr></table></blockquote>Put a resource into the global resource pool as an override. </div></div><div class=CToolTip id="tt53"><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>static function this_type get_by_name(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>scope,</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>name,</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PType nowrap>bit </td> |
| <td class=PParameter nowrap>rpterr</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> 1</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=5>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| looks up a resource by <i>name</i> in the name map. </div></div><div class=CToolTip id="tt54"><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>static function this_type get_by_type(</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap>scope</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> "",</td> |
| </tr><tr><td> </td> <td class=PType nowrap>uvm_resource_base </td> |
| <td class=PParameter nowrap>type_handle</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=5>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| looks up a resource by <i>type_handle</i> in the type map. </div></div><div class=CToolTip id="tt55"><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>static function this_type get_highest_precedence(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap>ref uvm_resource_types::</td> |
| <td class=PType nowrap>rsrc_q_t </td> |
| <td class=PParameter nowrap width=100%>q</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=4>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| In a queue of resources, locate the first one with the highest precedence whose type is T. </div></div><!--END_ND_TOOLTIPS--> |
| |
| <script language=JavaScript><!-- |
| if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> |